diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..783a4ae --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*~ +*.sw[op] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f3cff84 --- /dev/null +++ b/LICENSE @@ -0,0 +1,4 @@ +File containing the license of your package. + +More information here: +https://github.com/YunoHost/doc/blob/master/packaging_apps_guidelines_fr.md#yep-13---indiquer-la-licence-associ%C3%A9e-au-paquet---brouillon--auto--working- diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 0000000..1948b1a --- /dev/null +++ b/NOTES.md @@ -0,0 +1,54 @@ +Noalyss pour YunoHost +--------------------- + +[noalyss](http://noalyss.eu) est une application de comptabilité que vous pourrez modifier suivant vos envies. + + * Report a bug: https://dev.yunohost.org/projects/apps/issues + * Nextcloud website: https://nextcloud.com/ + * YunoHost website: https://yunohost.org/ + +# Questions + +- comment fonctionnent les mails avec Noalyss ? + + +## PDF ? +voir : http://wiki.noalyss.eu/doku.php?id=installation:installation_sous_linux +- Pas de conversion en PDF (extension facturation et listing) +- Pas d'export en PDF des opérations de la comptabilité analytique avec les documents attachés + + +# Base de travail + +[example_ynh](https://github.com/YunoHost/example_ynh) a été utilisé comme source(s) d'inspiration. + +## Les helpers de YunoHost + +Dans yunohost/data/helpers.d + +- J'ai utilisé le `psql` pour en faire une copie en tant que `_psql.sh` pour pouvoir créer de user noalyss de postgress avec les droits de createdb. + +# Les sources de Noalyss + +**Version:** 7.0.15 (7015) + +Il faut les sources de Noalyss et différentes versions sont disponibles. + +http://download.noalyss.eu/version-6.9/ +http://download.noalyss.eu/version-6.9/noalyss-6.9.1.9.tar.gz +http://download.noalyss.eu/version-6.9/noalyss-6.9.2.0.tar.gz + +http://download.noalyss.eu/version-7.0/ +http://download.noalyss.eu/version-7.0/noalyss-7015.tar.gz + +Pour le moment elles sont extraites à la mains dans le dossier `sources`. + +Mais ont pourrait imaginer que le script + +- télécharge le .tar.gz +- l'extraire au bon endroit + +# Quid des mises à jours ? + +Pour Nextcloud par exemple il y a un dossier `upgrade.d` dans `scripts`. Mais si je ne me trompe, pour Noalyss il « suffit » de remplacer le dossier des sources. + diff --git a/README.md b/README.md new file mode 100644 index 0000000..4cf70e0 --- /dev/null +++ b/README.md @@ -0,0 +1,84 @@ +# Usage of this package (REMOVE THIS SECTION BEFORE RELEASE) +- Copy this app before working on it. +- Edit `conf/nginx.conf` file to match application prerequisites. +- Edit `manifest.json` with application specific information. +- Edit the `install`, `upgrade`, `remove`, `backup`, and `restore` scripts. +- Add a `LICENSE` file for the package. +- Edit `README.md` and README_fr.md. + +# Example app for YunoHost + +[![Integration level](https://dash.yunohost.org/integration/REPLACEBYYOURAPP.svg)](https://dash.yunohost.org/appci/app/REPLACEBYYOURAPP) +[![Install REPLACEBYYOURAPP with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=REPLACEBYYOURAPP) + +*[Lire ce readme en français.](./README_fr.md)* + +> *This package allow you to install REPLACEBYYOURAPP quickly and simply on a YunoHost server. +If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* + +## Overview +Quick description of this app. + +**Shipped version:** 1.0 + +## Screenshots + +![](Link to an screenshot for this app) + +## Demo + +* [Official demo](Link to a demo site for this app) + +## Configuration + +How to configure this app: by an admin panel, a plain file with SSH, or any other way. + +## Documentation + + * Official documentation: Link to the official documentation of this app + * YunoHost documentation: If specific documentation is needed, feel free to contribute. + +## YunoHost specific features + +#### Multi-users support + +Are LDAP and HTTP auth supported? +Can the app be used by multiple users? + +#### Supported architectures + +* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/REPLACEBYYOURAPP/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/REPLACEBYYOURAPP/) +* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/REPLACEBYYOURAPP%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/REPLACEBYYOURAPP/) + +## Limitations + +* Any known limitations. + +## Additional information + +* Other information you would add about this application + +**More information on the documentation page:** +https://yunohost.org/packaging_apps + +## Links + + * Report a bug: https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/issues + * App website: Link to the official website of this app + * YunoHost website: https://yunohost.org/ + +--- + +Developers info +---------------- + +**Only if you want to use a testing branch for coding, instead of merging directly into master.** +Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing). + +To try the testing branch, please proceed like that. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing --debug +or +sudo yunohost app upgrade REPLACEBYYOURAPP -u https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing --debug +``` diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..747f706 --- /dev/null +++ b/README_fr.md @@ -0,0 +1,76 @@ +# App exemple pour YunoHost + +[![Integration level](https://dash.yunohost.org/integration/REPLACEBYYOURAPP.svg)](https://dash.yunohost.org/appci/app/REPLACEBYYOURAPP) +[![Install REPLACEBYYOURAPP with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=REPLACEBYYOURAPP) + +*[Read this readme in english.](./README.md)* + +> *Ce package vous permet d'installer REPLACEBYYOURAPP rapidement et simplement sur un serveur Yunohost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* + +## Vue d'ensemble +Description rapide de cette application. + +**Version incluse:** 1.0 + +## Captures d'écran + +![](Lien vers une capture d'écran pour cette application) + +## Démo + +* [Démo officielle](Lien vers un site de démonstration pour cette application) + +## Configuration + +Comment configurer cette application: via le panneau d'administration, un fichier brut en SSH ou tout autre moyen. + +## Documentation + + * Documentation officielle: Lien vers la documentation officielle de cette application + * Documentation YunoHost: Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. + +## Caractéristiques spécifiques YunoHost + +#### Support multi-utilisateurs + +L'authentification LDAP et HTTP est-elle prise en charge? +L'application peut-elle être utilisée par plusieurs utilisateurs? + +#### Supported architectures + +* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/REPLACEBYYOURAPP/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/REPLACEBYYOURAPP/) +* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/REPLACEBYYOURAPP%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/REPLACEBYYOURAPP/) + +## Limitations + +* Limitations connues. + +## Informations additionnelles + +* Autres informations à ajouter sur cette application + +**Plus d'informations sur la page de documentation:** +https://yunohost.org/packaging_apps + +## Links + + * Signaler un bug: https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/issues + * Site de l'application: Lien vers le site officiel de cette application + * Site web YunoHost: https://yunohost.org/ + +--- + +Informations pour les développeurs +---------------- + +**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.** +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing --debug +ou +sudo yunohost app upgrade REPLACEBYYOURAPP -u https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing --debug +``` diff --git a/check_process.default b/check_process.default new file mode 100644 index 0000000..cbf2d12 --- /dev/null +++ b/check_process.default @@ -0,0 +1,49 @@ +# See here for more information +# https://github.com/YunoHost/package_check#syntax-check_process-file + +# Move this file from check_process.default to check_process when you have filled it. + +;; Test complet + ; Manifest + domain="domain.tld" (DOMAIN) + path="/path" (PATH) + admin="john" (USER) + language="fr" + is_public=1 (PUBLIC|public=1|private=0) + password="pass" + port="666" (PORT) + ; Checks + pkg_linter=1 + setup_sub_dir=1 + setup_root=1 + setup_nourl=0 + setup_private=1 + setup_public=1 + upgrade=1 + upgrade=1 from_commit=CommitHash + backup_restore=1 + multi_instance=1 + incorrect_path=1 + port_already_use=0 + change_url=1 +;;; Levels + Level 1=auto + Level 2=auto + Level 3=auto +# Level 4: If the app supports LDAP and SSOwat, turn level 4 to '1' and add a link to an issue or a part of your code to show it. +# If the app does not use LDAP nor SSOwat, and can't use them, turn level 4 to 'na' and explain as well. + Level 4=0 + Level 5=auto + Level 6=auto + Level 7=auto + Level 8=0 + Level 9=0 + Level 10=0 +;;; Options +Email= +Notification=none +;;; Upgrade options + ; commit=CommitHash + name=Name and date of the commit. + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& + diff --git a/conf/app.src b/conf/app.src new file mode 100644 index 0000000..c8c8448 --- /dev/null +++ b/conf/app.src @@ -0,0 +1,6 @@ +SOURCE_URL=http://download.noalyss.eu/version-7.0/noalyss-7015.tar.gz +SOURCE_FORMAT=tar.gz +SOURCE_IN_SUBDIR=true +SOURCE_FILENAME=noalyss-7015.tar.gz +SOURCE_SUM=586bd23eaa207a824b37eb94e6666e3992fb2d1846503d7f9cd85df84e18180c +SOURCE_SUM_PRG=sha256sum \ No newline at end of file diff --git a/conf/nginx.conf b/conf/nginx.conf index 3479a71..61f304a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,20 +1,33 @@ -location PATHTOCHANGE/ { - alias ALIASTOCHANGE; +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } + # Path to source + alias __FINALPATH__/html/ ; - index index.php; - try_files $uri $uri/ index.php; + # Force usage of https + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } - location ~ [^/]\.php(/|$) { - fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php5-fpm-noalyss.sock; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param REMOTE_USER $remote_user; - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $request_filename; - } +### Example PHP configuration (remove it if not used) + index index.php; + + # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file + #client_max_body_size 50M; + + try_files $uri $uri/ index.php; + location ~ [^/]\.php(/|$) { + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; + + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param REMOTE_USER $remote_user; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param SCRIPT_FILENAME $request_filename; + } +### End of PHP configuration part + + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; } diff --git a/conf/noalyss.conf b/conf/noalyss.conf index 3e51133..7d6c4a0 100644 --- a/conf/noalyss.conf +++ b/conf/noalyss.conf @@ -1,35 +1,34 @@ -}t tag +; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t +; %T: time the log has been written (the request has finished) +; it can accept a strftime(3) format: +; %d/%b/%Y:%H:%M:%S %z (default) +; The strftime(3) format must be encapsuled in a %{}t tag +; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t +; %u: remote user +; +; Default: "%R - %u %t \"%m %r\" %s" +;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" + +; The log file for slow requests +; Default Value: not set +; Note: slowlog is mandatory if request_slowlog_timeout is set +;slowlog = log/$pool.log.slow ; The timeout for serving a single request after which a PHP backtrace will be ; dumped to the 'slowlog' file. A value of '0s' means 'off'. ; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) ; Default Value: 0 -request_slowlog_timeout = 5s +;request_slowlog_timeout = 0 -; The log file for slow requests -; Default Value: not set -; Note: slowlog is mandatory if request_slowlog_timeout is set -slowlog = /var/log/nginx/NAMETOCHANGE.slow.log +; The timeout for serving a single request after which the worker process will +; be killed. This option should be used when the 'max_execution_time' ini option +; does not stop script execution for some reason. A value of '0' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +request_terminate_timeout = 1d ; Set open file descriptor rlimit. ; Default Value: system defined value -rlimit_files = 4096 +;rlimit_files = 1024 ; Set max core size rlimit. ; Possible Values: 'unlimited' or an integer greater or equal to 0 ; Default Value: system defined value -rlimit_core = 0 +;rlimit_core = 0 ; Chroot to this directory at the start. This value must be defined as an ; absolute path. When this value is not set, chroot is not used. @@ -195,14 +358,31 @@ rlimit_core = 0 ; Chdir to this directory at the start. ; Note: relative path can be used. ; Default Value: current directory or / when chroot -chdir = /var/www/NAMETOCHANGE +chdir = __FINALPATH__ ; Redirect worker stdout and stderr into main error log. If not set, stdout and ; stderr will be redirected to /dev/null according to FastCGI specs. ; Note: on highloaded environement, this can cause some delay in the page ; process time (several ms). ; Default Value: no -catch_workers_output = yes +;catch_workers_output = yes + +; Clear environment in FPM workers +; Prevents arbitrary environment variables from reaching FPM worker processes +; by clearing the environment in workers before env vars specified in this +; pool configuration are added. +; Setting to "no" will make all environment variables available to PHP code +; via getenv(), $_ENV and $_SERVER. +; Default Value: yes +;clear_env = no + +; Limits the extensions of the main script FPM will allow to parse. This can +; prevent configuration mistakes on the web server side. You should only limit +; FPM to .php extensions to prevent malicious users to use other extensions to +; execute php code. +; Note: set an empty value to allow all extensions. +; Default Value: .php +;security.limit_extensions = .php .php3 .php4 .php5 .php7 ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from ; the current environment. @@ -238,6 +418,13 @@ catch_workers_output = yes ;php_admin_flag[log_errors] = on ;php_admin_value[memory_limit] = 32M -php_value[upload_max_filesize] = 10G -php_value[post_max_size] = 10G -php_value[mail.add_x_header] = Off +; Common values to change to increase file upload limit +; php_admin_value[upload_max_filesize] = 50M +; php_admin_value[post_max_size] = 50M +; php_admin_flag[mail.add_x_header] = Off + +; Other common parameters +; php_admin_value[max_execution_time] = 600 +; php_admin_value[max_input_time] = 300 +; php_admin_value[memory_limit] = 256M +; php_admin_flag[short_open_tag] = On diff --git a/manifest.json b/manifest.json index d8af73c..e817365 100644 --- a/manifest.json +++ b/manifest.json @@ -1,33 +1,66 @@ { "name": "NOALYSS (phpcompta)", "id": "noalyss", + "packaging_format": 1, "description": { "en": "Accounting free software (Beligum and French accounting)", "fr": "Logiciel libre de comptabilité (comptabilité Belge et Française)" }, - "license": "GPL-2", + "version": "7.0.15", + "url": "http://noalyss.be", + "license": "free", "maintainer": { "name": "bram", "email": "cortex@worlddomination.be", "url": "http://worlddomination.be" }, - "multi_instance": "false", + "requirements": { + "yunohost": ">= 3.0" + }, + "multi_instance": false, + "services": [ + "nginx", + "php7.0-fpm" + ], "arguments": { "install" : [ { "name": "domain", + "type": "domain", "ask": { - "en": "Choose a domain for NOALYSS" + "en": "Choose a domain name for Noalyss", + "fr": "Choisissez un nom de domaine pour Noalyss" }, - "example": "domain.org" + "example": "example.com" }, { "name": "path", + "type": "path", "ask": { - "en": "Choose a path for NOALYSS" + "en": "Choose a path for Noalyss", + "fr": "Choisissez un chemin pour Noalyss" }, "example": "/compta", "default": "/compta" + }, + { + "name": "is_public", + "type": "boolean", + "ask": { + "en": "Is it a public application?", + "fr": "Est-ce une application publique ?" + }, + "default": true + }, + { + "name": "language", + "type": "string", + "ask": { + "en": "Choose the application language", + "fr": "Choisissez la langue de l'application" + }, + "choices": ["fr", "en"], + "default": "fr" } ] } diff --git a/scripts/_common.sh b/scripts/_common.sh new file mode 100644 index 0000000..b3b9f3d --- /dev/null +++ b/scripts/_common.sh @@ -0,0 +1,17 @@ + +#================================================= +# COMMON VARIABLES +#================================================= +# TODO : remove p7zip-full if not needed +# for jessie +pkg_dependencies="postgresql php5 php5-pgsql php5-gd php-gettext p7zip-full libgd2-xpm-dev" + +if [ "$(lsb_release --codename --short)" != "jessie" ]; then + pkg_dependencies="postgresql php-pgsql php-gd php-gettext p7zip-full php-zip php-bcmath" +fi + +#================================================= +# COMMON HELPERS +#================================================= + +# None for the moment. \ No newline at end of file diff --git a/scripts/_psql.sh b/scripts/_psql.sh new file mode 100644 index 0000000..31d2b69 --- /dev/null +++ b/scripts/_psql.sh @@ -0,0 +1,155 @@ +#!/bin/bash + +# Create a master password and set up global settings +# Please always call this script in install and restore scripts +# usage: noalyss_psql_test_if_first_run + +noalyss_psql_test_if_first_run() { + if [ -f /etc/yunohost/psql ]; + then + echo "PostgreSQL is already installed, no need to create master password" + else + local pgsql="$(ynh_string_random)" + echo "$pgsql" > /etc/yunohost/psql + + if [ -e /etc/postgresql/9.4/ ] + then + local pg_hba=/etc/postgresql/9.4/main/pg_hba.conf + elif [ -e /etc/postgresql/9.6/ ] + then + local pg_hba=/etc/postgresql/9.6/main/pg_hba.conf + else + ynh_die "postgresql shoud be 9.4 or 9.6" + fi + + systemctl start postgresql + sudo --login --user=postgres psql -c"ALTER user postgres WITH PASSWORD '$pgsql'" postgres + + # force all user to connect to local database using passwords + # https://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html#EXAMPLE-PG-HBA.CONF + # Note: we cant use peer since YunoHost create users with nologin + # See: https://github.com/YunoHost/yunohost/blob/unstable/data/helpers.d/user + sed -i '/local\s*all\s*all\s*peer/i \ + local all all password' "$pg_hba" + systemctl enable postgresql + systemctl reload postgresql + fi +} + +# Open a connection as a user +# +# example: noalyss_psql_connect_as 'user' 'pass' <<< "UPDATE ...;" +# example: noalyss_psql_connect_as 'user' 'pass' < /path/to/file.sql +# +# usage: noalyss_psql_connect_as user pwd [db] +# | arg: user - the user name to connect as +# | arg: pwd - the user password +# | arg: db - the database to connect to +noalyss_psql_connect_as() { + local user="$1" + local pwd="$2" + local db="$3" + sudo --login --user=postgres PGUSER="$user" PGPASSWORD="$pwd" psql "$db" +} + +# # Execute a command as root user +# +# usage: noalyss_psql_execute_as_root sql [db] +# | arg: sql - the SQL command to execute +noalyss_psql_execute_as_root () { + local sql="$1" + sudo --login --user=postgres psql <<< "$sql" +} + +# Execute a command from a file as root user +# +# usage: noalyss_psql_execute_file_as_root file [db] +# | arg: file - the file containing SQL commands +# | arg: db - the database to connect to +noalyss_psql_execute_file_as_root() { + local file="$1" + local db="$2" + sudo --login --user=postgres psql "$db" < "$file" +} + +# Create a database, an user and its password. Then store the password in the app s config +# +# After executing this helper, the password of the created database will be available in $db_pwd +# It will also be stored as "psqlpwd" into the app settings. +# +# usage: noalyss_psql_setup_db user name [pwd] +# | arg: user - Owner of the database +# | arg: name - Name of the database +# | arg: pwd - Password of the database. If not given, a password will be generated +noalyss_psql_setup_db () { + local db_user="$1" + local db_name="$2" + local new_db_pwd=$(ynh_string_random) # Generate a random password + # If $3 is not given, use new_db_pwd instead for db_pwd. + local db_pwd="${3:-$new_db_pwd}" + noalyss_psql_create_db "$db_name" "$db_user" "$db_pwd" # Create the database + + # sudo yunohost app setting "$app" "$key" --value="$value" --quiet + # sudo yunohost app setting noalyss psqlpwd -v=RhWNxNe6KdrncQdhbBvWsur6 --quiet + ynh_app_setting_set $app psqlpwd $db_pwd # Store the password in the app s config +} + +# Create a database and grant privilegies to a user +# +# usage: noalyss_psql_create_db db [user [pwd]] +# | arg: db - the database name to create +# | arg: user - the user to grant privilegies +# | arg: pwd - the user password +noalyss_psql_create_db() { + local db="$1" + local user="$2" + local pwd="$3" + noalyss_psql_create_user "$user" "$pwd" + sudo --login --user=postgres createdb --owner="$user" "$db" +} + +# Drop a database +# +# usage: noalyss_psql_remove_db user +# | arg: user - the user to drop +noalyss_psql_remove_db() { + local user="$1" + # because the user may have multiple databases + sudo su postgres --login -c "psql -l | grep \"\<$user\>\" | awk '{print \$1}' | xargs -l dropdb" + noalyss_psql_drop_user "$user" +} + +# Dump a database +# +# example: noalyss_psql_dump_db 'roundcube' > ./dump.sql +# +# usage: noalyss_psql_dump_db user +# | arg: db - the database name to dump +# | ret: the psqldump output +noalyss_psql_dump_db() { + local user="$1" + sudo su postgres --login -c "psql -l | grep \"\<$user\>\" | awk '{print \$1}' | xargs -l pg_dump -C" +} + + +# Create a user +# +# usage: noalyss_psql_create_user user pwd [host] +# | arg: user - the user name to create +# NOTICE : for Noalyss the user need to be able to createdb +noalyss_psql_create_user() { + local user="$1" + local pwd="$2" + sudo --login --user=postgres psql -c"CREATE USER $user createdb PASSWORD '$pwd'" postgres +} + +# Drop a user +# +# usage: noalyss_psql_drop_user user +# | arg: user - the user name to drop +noalyss_psql_drop_user() { + local user="$1" + sudo --login --user=postgres dropuser "$user" +} + + diff --git a/scripts/backup b/scripts/backup new file mode 100755 index 0000000..9605261 --- /dev/null +++ b/scripts/backup @@ -0,0 +1,92 @@ +#!/bin/bash + +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +source ../settings/scripts/_common.sh +source /usr/share/yunohost/helpers +source ../settings/scripts/_psql.sh + +#================================================= +# MANAGE SCRIPT FAILURE +#================================================= + +ynh_clean_setup () { + ### Remove this function if there's nothing to clean before calling the remove script. + true +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + +#================================================= +# LOAD SETTINGS +#================================================= +ynh_print_info "Loading installation settings..." + +app=$YNH_APP_INSTANCE_NAME + +final_path=$(ynh_app_setting_get $app final_path) +domain=$(ynh_app_setting_get $app domain) +db_name=$(ynh_app_setting_get $app db_name) + +#================================================= +# STANDARD BACKUP STEPS +#================================================= +# BACKUP THE APP MAIN DIR +#================================================= +ynh_print_info "Backing up the main app directory..." + +ynh_backup "$final_path" + +#================================================= +# BACKUP THE NGINX CONFIGURATION +#================================================= +ynh_print_info "Backing up nginx web server configuration..." + +ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" + +#================================================= +# BACKUP THE PHP-FPM CONFIGURATION +#================================================= +ynh_print_info "Backing up php-fpm configuration..." + +ynh_backup "/etc/php/7.0/fpm/pool.d/$app.conf" + +#================================================= +# BACKUP THE POSTGRES DATABASE +#================================================= +ynh_print_info "Backing up the Postgres database..." + +noalyss_psql_dump_db $app > db.sql + +#================================================= +# SPECIFIC BACKUP +#================================================= +# BACKUP LOGROTATE +#================================================= +#ynh_print_info "Backing up logrotate configuration..." + +#ynh_backup "/etc/logrotate.d/$app" + +#================================================= +# BACKUP SYSTEMD +#================================================= +#ynh_print_info "Backing up systemd configuration..." + +#ynh_backup "/etc/systemd/system/$app.service" + +#================================================= +# BACKUP A CRON FILE +#================================================= + +#ynh_backup "/etc/cron.d/$app" + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/install b/scripts/install old mode 100644 new mode 100755 index 0905aeb..ba1edbd --- a/scripts/install +++ b/scripts/install @@ -1,63 +1,320 @@ -set -e +#!/bin/bash -# Retrieve arguments -domain=$1 -path=$2 +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= -# Check domain/path availability -sudo yunohost app checkurl $domain$path -a noalyss -if [[ ! $? -eq 0 ]]; then - exit 1 +source _common.sh +source /usr/share/yunohost/helpers +source _psql.sh + +#================================================= +# MANAGE SCRIPT FAILURE +#================================================= + +ynh_clean_setup () { + ### Remove this function if there's nothing to clean before calling the remove script. + true +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + +#================================================= +# RETRIEVE ARGUMENTS FROM THE MANIFEST +#================================================= + +domain=$YNH_APP_ARG_DOMAIN +path_url=$YNH_APP_ARG_PATH +#admin=$YNH_APP_ARG_ADMIN +is_public=$YNH_APP_ARG_IS_PUBLIC +language=$YNH_APP_ARG_LANGUAGE +#password=$YNH_APP_ARG_PASSWORD + +### If it's a multi-instance app, meaning it can be installed several times independently +### The id of the app as stated in the manifest is available as $YNH_APP_ID +### The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...) +### The app instance name is available as $YNH_APP_INSTANCE_NAME +### - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample +### - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2 +### - ynhexample__{N} for the subsequent installations, with N=3,4, ... +### The app instance name is probably what interests you most, since this is +### guaranteed to be unique. This is a good unique identifier to define installation path, +### db names, ... +app=$YNH_APP_INSTANCE_NAME + +#================================================= +# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS +#================================================= +ynh_print_info "Validating installation parameters..." + +### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app". +### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app" +### NOTICE : for Noalyss the .tgz contains a /html, a /include and other files. only the /html have to be exposed and it is specified in ./conf/nginx.conf +final_path=/var/www/$app +test ! -e "$final_path" || ynh_die "This path already contains a folder" + +# Normalize the url path syntax +path_url=$(ynh_normalize_url_path $path_url) + +# Register (book) web path +ynh_webpath_register $app $domain $path_url + +#================================================= +# STORE SETTINGS FROM MANIFEST +#================================================= +ynh_print_info "Storing installation settings..." + +ynh_app_setting_set $app domain $domain +ynh_app_setting_set $app path $path_url +#ynh_app_setting_set $app admin $admin +ynh_app_setting_set $app is_public $is_public +ynh_app_setting_set $app language $language + +#================================================= +# STANDARD MODIFICATIONS +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_print_info "Installing dependencies..." + +### `ynh_install_app_dependencies` allows you to add any "apt" dependencies to the package. +### Those deb packages will be installed as dependencies of this package. +### If you're not using this helper: +### - Remove the section "REMOVE DEPENDENCIES" in the remove script +### - As well as the section "REINSTALL DEPENDENCIES" in the restore script +### - And the section "UPGRADE DEPENDENCIES" in the upgrade script + +ynh_install_app_dependencies $pkg_dependencies + +#================================================= +# CREATE A MYSQL DATABASE +#================================================= +#ynh_print_info "Creating a MySQL database..." + +### Use these lines if you need a database for the application. +### `ynh_mysql_setup_db` will create a database, an associated user and a ramdom password. +### The password will be stored as 'mysqlpwd' into the app settings, +### and will be available as $db_pwd +### If you're not using these lines: +### done - Remove the section "BACKUP THE MYSQL DATABASE" in the backup script +### done - Remove also the section "REMOVE THE MYSQL DATABASE" in the remove script +### TODO - As well as the section "RESTORE THE MYSQL DATABASE" in the restore script + +#db_name=$(ynh_sanitize_dbid $app) +#ynh_app_setting_set $app db_name $db_name +#ynh_mysql_setup_db $db_name $db_name + +#================================================= +# CREATE A POSTGRESS DATABASE +#================================================= + +ynh_print_info "Testing if Postgress is installed..." +noalyss_psql_test_if_first_run + +ynh_print_info "Creating a Postgress database..." +db_name=$(ynh_sanitize_dbid $app) +ynh_app_setting_set $app db_name $db_name +noalyss_psql_setup_db $db_name $db_name + + +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= +ynh_print_info "Setting up source files..." + +### `ynh_setup_source` is used to install an app from a zip or tar.gz file, +### downloaded from an upstream source, like a git repository. +### `ynh_setup_source` use the file conf/app.src + +ynh_app_setting_set $app final_path $final_path +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source "$final_path" + +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_print_info "Configuring nginx web server..." + +### `ynh_add_nginx_config` will use the file conf/nginx.conf + +# Create a dedicated nginx config +ynh_add_nginx_config + +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_print_info "Configuring system user..." + +# Create a system user +ynh_system_user_create $app + +#================================================= +# PHP-FPM CONFIGURATION +#================================================= +ynh_print_info "Configuring php-fpm..." + +### `ynh_add_fpm_config` is used to set up a PHP config. +### You can remove it if your app doesn't use PHP. +### `ynh_add_fpm_config` will use the files conf/php-fpm.conf and conf/php-fpm.ini +### If you're not using these lines: +### - You can remove these files in conf/. +### - Remove the section "BACKUP THE PHP-FPM CONFIGURATION" in the backup script +### - Remove also the section "REMOVE PHP-FPM CONFIGURATION" in the remove script +### - As well as the section "RESTORE THE PHP-FPM CONFIGURATION" in the restore script +### With the reload at the end of the script. +### - And the section "PHP-FPM CONFIGURATION" in the upgrade script + +# Create a dedicated php-fpm config +ynh_add_fpm_config + +#================================================= +# SPECIFIC SETUP +#================================================= +# ... +#================================================= + +#================================================= +# SETUP SYSTEMD +#================================================= +#ynh_print_info "Configuring a systemd service..." + +### `ynh_systemd_config` is used to configure a systemd script for an app. +### It can be used for apps that use sysvinit (with adaptation) or systemd. +### Have a look at the app to be sure this app needs a systemd script. +### `ynh_systemd_config` will use the file conf/systemd.service +### If you're not using these lines: +### - You can remove those files in conf/. +### - Remove the section "BACKUP SYSTEMD" in the backup script +### - Remove also the section "STOP AND REMOVE SERVICE" in the remove script +### - As well as the section "RESTORE SYSTEMD" in the restore script +### - And the section "SETUP SYSTEMD" in the upgrade script + +# Create a dedicated systemd config +#ynh_add_systemd_config + +#================================================= +# SETUP APPLICATION WITH CURL +#================================================= + +### Use these lines only if the app installation needs to be finalized through +### web forms. We generally don't want to ask the final user, +### so we're going to use curl to automatically fill the fields and submit the +### forms. + +# Set right permissions for curl install +chown -R $app: $final_path + +# Set the app as temporarily public for curl call +ynh_print_info "Configuring SSOwat..." +ynh_app_setting_set $app skipped_uris "/" +# Reload SSOwat config +yunohost app ssowatconf + +# Reload Nginx +systemctl reload nginx + +# Installation with curl +# ynh_print_info "Finalizing installation..." +# ynh_local_curl "/INSTALL_PATH" "key1=value1" "key2=value2" "key3=value3" + +# Remove the public access +if [ $is_public -eq 0 ] +then + ynh_app_setting_delete $app skipped_uris fi -path=${path%/} +#================================================= +# MODIFY A CONFIG FILE +#================================================= +ynh_print_info "Modifying $app config file..." +cp ../conf/noalyss.conf $final_path/include/config.inc.php -sudo apt-get install postgresql php5 php5-pgsql php5-gd php-gettext p7zip-full libgd2-xpm-dev -y +### `ynh_replace_string` is used to replace a string in a file. +### (It's compatible with sed regular expressions syntax) +#psqlpwd=$(ynh_app_setting_get $app psqlpwd) +#ynh_print_info "dbpass : $psqlpwd " +ynh_replace_string "DATABASE_PASSWORD" "$(ynh_app_setting_get $app psqlpwd)" "$final_path/include/config.inc.php" -final_path=/var/www/noalyss -sudo mkdir -p $final_path -sudo cp -a ../sources/html/ $final_path -sudo cp -a ../sources/include/ $final_path +#================================================= +# STORE THE CONFIG FILE CHECKSUM +#================================================= -sudo chown -R www-data: $final_path +### `ynh_store_file_checksum` is used to store the checksum of a file. +### That way, during the upgrade script, by using `ynh_backup_if_checksum_is_different`, +### you can make a backup of this file before modifying it again if the admin had modified it. -sudo yunohost app setting noalyss version -v "6.9.0.0" +# Calculate and store the config file checksum into the app settings +ynh_store_file_checksum "$final_path/include/config.inc.php" -if [[ "$path" == "" ]]; then - sed -i "s@PATHTOCHANGE@/@g" ../conf/nginx.conf -else - sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf +#================================================= +# GENERIC FINALIZATION +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +### For security reason, any app should set the permissions to root: before anything else. +### Then, if write authorization is needed, any access should be given only to directories +### that really need such authorization. + +# Set permissions to app files +# chown -R root: $final_path + +#================================================= +# SETUP LOGROTATE +#================================================= +ynh_print_info "Configuring log rotation..." + +### `ynh_use_logrotate` is used to configure a logrotate configuration for the logs of this app. +### Use this helper only if there is effectively a log file for this app. +### If you're not using this helper: +### - Remove the section "BACKUP LOGROTATE" in the backup script +### - Remove also the section "REMOVE LOGROTATE CONFIGURATION" in the remove script +### - As well as the section "RESTORE THE LOGROTATE CONFIGURATION" in the restore script +### - And the section "SETUP LOGROTATE" in the upgrade script + +# Use logrotate to manage application logfile(s) +ynh_use_logrotate + +#================================================= +# ADVERTISE SERVICE IN ADMIN PANEL +#================================================= + +### `yunohost service add` is a CLI yunohost command to add a service in the admin panel. +### You'll find the service in the 'services' section of YunoHost admin panel. +### This CLI command would be useless if the app does not have any services (systemd or sysvinit) +### If you're not using these lines: +### - You can remove these files in conf/. +### - Remove the section "REMOVE SERVICE FROM ADMIN PANEL" in the remove script +### - As well as the section "ADVERTISE SERVICE IN ADMIN PANEL" in the restore script + +# yunohost service add $app --log "/var/log/$app/$app.log" +# if using yunohost version 3.2 or more in the 'manifest.json', a description can be added +#yunohost service add $app --description "$app daemon for XXX" --log "/var/log/$app/$app.log" + +#================================================= +# SETUP SSOWAT +#================================================= +ynh_print_info "Configuring SSOwat..." + +# Make app public if necessary +if [ $is_public -eq 1 ] +then + # unprotected_uris allows SSO credentials to be passed anyway. + ynh_app_setting_set $app unprotected_uris "/" fi -sed -i "s@ALIASTOCHANGE@$final_path/html/@g" ../conf/nginx.conf +#================================================= +# RELOAD NGINX +#================================================= +ynh_print_info "Reloading nginx web server..." -sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/noalyss.conf +systemctl reload nginx -sed -i "s@NAMETOCHANGE@noalyss@g" ../conf/php-fpm.conf +#================================================= +# END OF SCRIPT +#================================================= -db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p') - -sudo su postgres -c "createuser -S -R --createdb noalyss" -sudo su postgres -c "psql -c \"ALTER USER noalyss with PASSWORD '$db_pwd';\"" - -sed -i "s@DATABASE_PASSWORD@$db_pwd@g" ../conf/noalyss.conf -sudo cp ../conf/noalyss.conf $final_path/include/config.inc.php - -finalphpconf=/etc/php5/fpm/pool.d/noalyss.conf - -sudo cp ../conf/php-fpm.conf $finalphpconf -sudo chown root: $finalphpconf -sudo chmod 644 $finalphpconf - -# Reload Nginx and regenerate SSOwat conf -sudo service php5-fpm restart -sudo service nginx reload -sudo yunohost app ssowatconf - -sudo yunohost app setting noalyss unprotected_uris -v "/" -sudo yunohost app ssowatconf -curl -kL -H "Host: $domain" -X POST https://127.0.0.1$path/admin/setup.php --data "go=yolo" > /dev/null 2>&1 -sudo yunohost app setting noalyss unprotected_uris -v "" -sudo yunohost app ssowatconf - -# su postgres -c "psql account_repository -c 'delete from ac_users;'" +ynh_print_info "Installation of $app completed" +ynh_print_info "Go to https://$domain$path_url/install.php to continue !" \ No newline at end of file diff --git a/scripts/remove b/scripts/remove old mode 100644 new mode 100755 index 4cfdcf8..42b98b7 --- a/scripts/remove +++ b/scripts/remove @@ -1,16 +1,134 @@ -set -e +#!/bin/bash -final_path=/var/www/noalyss +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= -sudo rm -rf $final_path +source _common.sh +source /usr/share/yunohost/helpers +source _psql.sh -sudo su postgres -c "psql -l | grep \"\\" | awk '{print \$1}' | xargs -l dropdb" +#================================================= +# LOAD SETTINGS +#================================================= +ynh_print_info "Loading installation settings..." -sudo su postgres -c 'dropuser noalyss' +app=$YNH_APP_INSTANCE_NAME -finalphpconf=/etc/php5/fpm/pool.d/noalyss.conf +domain=$(ynh_app_setting_get $app domain) +port=$(ynh_app_setting_get $app port) +db_name=$(ynh_app_setting_get $app db_name) +db_user=$db_name +final_path=$(ynh_app_setting_get $app final_path) -rm $finalphpconf -rm /etc/nginx/conf.d/$domain.d/noalyss.conf +#===============#================================== +# STANDARD REMOVE +#================================================= +# REMOVE SERVICE FROM ADMIN PANEL +#================================================= -domain=$(sudo yunohost app setting noalyss domain) +# Remove a service from the admin panel, added by `yunohost service add` +#if yunohost service status $app >/dev/null 2>&1 +#then +# ynh_print_info "Removing $app service" +# yunohost service remove $app +#fi + +#================================================= +# STOP AND REMOVE SERVICE +#================================================= +#ynh_print_info "Stopping and removing the systemd service" + +# Remove the dedicated systemd config +#ynh_remove_systemd_config + +#================================================= +# REMOVE THE POSTGRES DATABASE +#================================================= +ynh_print_info "Removing the Postgres database" + +# Remove a database if it exists, along with the associated user +noalyss_psql_remove_db $db_user + +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_print_info "Removing dependencies" + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + +#================================================= +# REMOVE APP MAIN DIR +#================================================= +ynh_print_info "Removing app main directory" + +# Remove the app directory securely +ynh_secure_remove "$final_path" + +#================================================= +# REMOVE NGINX CONFIGURATION +#================================================= +ynh_print_info "Removing nginx web server configuration" + +# Remove the dedicated nginx config +ynh_remove_nginx_config + +#================================================= +# REMOVE PHP-FPM CONFIGURATION +#================================================= +ynh_print_info "Removing php-fpm configuration" + +# Remove the dedicated php-fpm config +ynh_remove_fpm_config + +#================================================= +# REMOVE LOGROTATE CONFIGURATION +#================================================= +ynh_print_info "Removing logrotate configuration" + +# Remove the app-specific logrotate config +ynh_remove_logrotate + +#================================================= +# CLOSE A PORT +#================================================= + +#if yunohost firewall list | grep -q "\- $port$" +#then +# ynh_print_info "Closing port $port" +# ynh_exec_warn_less yunohost firewall disallow TCP $port +#fi + +#================================================= +# SPECIFIC REMOVE +#================================================= +# REMOVE THE CRON FILE +#================================================= + +# Remove a cron file +#ynh_secure_remove "/etc/cron.d/$app" + +# Remove a directory securely +#ynh_secure_remove "/etc/$app/" + +# Remove the log files +#ynh_secure_remove "/var/log/$app/"# +# +##================================================= +## GENERIC FINALIZATION +#================================================= +# REMOVE DEDICATED USER +#================================================= +ynh_print_info "Removing the dedicated system user" + +# Delete a system user +ynh_system_user_delete $app + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Removal of $app completed" diff --git a/scripts/restore b/scripts/restore new file mode 100755 index 0000000..8af25e8 --- /dev/null +++ b/scripts/restore @@ -0,0 +1,143 @@ +#!/bin/bash + +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +source ../settings/scripts/_common.sh +source /usr/share/yunohost/helpers +source ../settings/scripts/_psql.sh + +#================================================= +# MANAGE SCRIPT FAILURE +#================================================= + +ynh_clean_setup () { + #### Remove this function if there's nothing to clean before calling the remove script. + true +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + +#================================================= +# LOAD SETTINGS +#================================================= +ynh_print_info "Loading settings..." + +app=$YNH_APP_INSTANCE_NAME + +domain=$(ynh_app_setting_get $app domain) +path_url=$(ynh_app_setting_get $app path) +final_path=$(ynh_app_setting_get $app final_path) +db_name=$(ynh_app_setting_get $app db_name) + +#================================================= +# CHECK IF THE APP CAN BE RESTORED +#================================================= +ynh_print_info "Validating restoration parameters..." + +ynh_webpath_available $domain $path_url \ + || ynh_die "Path not available: ${domain}${path_url}" +test ! -d $final_path \ + || ynh_die "There is already a directory: $final_path " + +#================================================= +# STANDARD RESTORATION STEPS +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= + +ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf" + +#================================================= +# RESTORE THE APP MAIN DIR +#================================================= +ynh_print_info "Restoring the app main directory..." + +ynh_restore_file "$final_path" + +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +ynh_print_info "Recreating the dedicated system user..." + +# Create the dedicated user (if not existing) +ynh_system_user_create $app + +#================================================= +# RESTORE USER RIGHTS +#================================================= + +# Restore permissions on app files +chown -R $app: $final_path + +#================================================= +# RESTORE THE PHP-FPM CONFIGURATION +#================================================= + +ynh_restore_file "/etc/php/7.0/fpm/pool.d/$app.conf" + +#================================================= +# SPECIFIC RESTORATION +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_print_info "Reinstalling dependencies..." + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + +#================================================= +# RESTORE THE POSTGRES DATABASE +#================================================= +ynh_print_info "Restoring the Postgres database..." + +db_pwd=$(ynh_app_setting_get $app mysqlpwd) +noalyss_psql_test_if_first_run +noalyss_psql_setup_db $db_name $db_name $(ynh_app_setting_get $app psqlpwd) +noalyss_psql_execute_file_as_root ./db.sql $db_name + +#================================================= +# RESTORE SYSTEMD +#================================================= +#ynh_print_info "Restoring the systemd configuration..." + +#ynh_restore_file "/etc/systemd/system/$app.service" +#systemctl enable $app.service + +#================================================= +# ADVERTISE SERVICE IN ADMIN PANEL +#================================================= + +#yunohost service add $app --log "/var/log/$app/$app.log" + +#================================================= +# RESTORE THE CRON FILE +#================================================= + +#ynh_restore_file "/etc/cron.d/$app" + +#================================================= +# RESTORE THE LOGROTATE CONFIGURATION +#================================================= + +#ynh_restore_file "/etc/logrotate.d/$app" + +#================================================= +# GENERIC FINALIZATION +#================================================= +# RELOAD NGINX AND PHP-FPM +#================================================= +ynh_print_info "Reloading nginx web server and php-fpm..." + +systemctl reload php7.0-fpm +systemctl reload nginx + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Restoration completed for $app" diff --git a/sources/AUTHORS b/sources/AUTHORS deleted file mode 100644 index d5ff049..0000000 --- a/sources/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -Dany De Bontridder danydb@aevalys.eu, dany118@gmail.com -Stan Pinte stanpinte@sauvages.be diff --git a/sources/COPYING b/sources/COPYING deleted file mode 100644 index 295c64d..0000000 --- a/sources/COPYING +++ /dev/null @@ -1,138 +0,0 @@ -GNU GENERAL PUBLIC LICENSE - -Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc. -59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - -Preamble - -The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. - -We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. - -Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and modification follow. -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. - -You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - - * a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. - - * b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. - -* c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: - - * a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, - - * b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, - -* c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. - -If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. - -5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. - -7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. - -This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. - -10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - -NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -END OF TERMS AND CONDITIONS -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - -one line to give the program's name and an idea of what it does. -Copyright (C) yyyy name of author - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details -type `show w'. This is free software, and you are welcome -to redistribute it under certain conditions; type `show c' -for details. - -The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright -interest in the program `Gnomovision' -(which makes passes at compilers) written -by James Hacker. - -signature of Ty Coon, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. diff --git a/sources/README b/sources/README deleted file mode 100644 index 8403caf..0000000 --- a/sources/README +++ /dev/null @@ -1,4 +0,0 @@ -Si vous avez besoin d'aide pour l'installation -utilisez la mailing list -Pour souscrire ou faire des recherches - aller https://lists.nongnu.org/mailman/listinfo/noalyss-generale diff --git a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso.sql b/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso.sql deleted file mode 100644 index b930d53..0000000 --- a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso.sql +++ /dev/null @@ -1,175 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007/09/16 10:54 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tmp_pcmn; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_country) FROM stdin; -1 comptes de capitaux 0 FR -101 Capital 1 FR -105 Ecarts de rvaluation 1 FR -1061 Rserve lgale 1 FR -1063 Rserves statutaires ou contractuelles 1 FR -1064 Rserves rglementes 1 FR -1068 Autres rserves 1 FR -108 Compte de l'exploitant 1 FR -12 rsultat de l'exercice (bnfice ou perte) 1 FR -145 Amortissements drogatoires 1 FR -146 Provision spciale de rvaluation 1 FR -147 Plus-values rinvesties 1 FR -148 Autres provisions rglementes 1 FR -15 Provisions pour risques et charges 1 FR -16 emprunts et dettes assimilees 1 FR -2 comptes d'immobilisations 0 FR -20 immobilisations incorporelles 2 FR -201 Frais d'tablissement 20 FR -206 Droit au bail 20 FR -207 Fonds commercial 20 FR -208 Autres immobilisations incorporelles 20 FR -21 immobilisations corporelles 2 FR -23 immobilisations en cours 2 FR -27 autres immobilisations financieres 2 FR -280 Amortissements des immobilisations incorporelles 2 FR -281 Amortissements des immobilisations corporelles 2 FR -290 Provisions pour dprciation des immobilisations incorporelles 2 FR -291 Provisions pour dprciation des immobilisations corporelles (mme ventilation que celle du compte 21) 2 FR -297 Provisions pour dprciation des autres immobilisations financires 2 FR -3 comptes de stocks et en cours 0 FR -31 matieres premires (et fournitures) 3 FR -32 autres approvisionnements 3 FR -33 en-cours de production de biens 3 FR -34 en-cours de production de services 3 FR -35 stocks de produits 3 FR -37 stocks de marchandises 3 FR -391 Provisions pour dprciation des matires premires (et fournitures) 3 FR -392 Provisions pour dprciation des autres approvisionnements 3 FR -393 Provisions pour dprciation des en-cours de production de biens 3 FR -394 Provisions pour dprciation des en-cours de production de services 3 FR -395 Provisions pour dprciation des stocks de produits 3 FR -397 Provisions pour dprciation des stocks de marchandises 3 FR -4 comptes de tiers 0 FR -400 Fournisseurs et Comptes rattachs 4 FR -409 Fournisseurs dbiteurs 4 FR -410 Clients et Comptes rattachs 4 FR -419 Clients crditeurs 4 FR -421 Personnel - Rmunrations dues 4 FR -428 Personnel - Charges payer et produits recevoir 4 FR -43 Scurit sociale et autres organismes sociaux 4 FR -431 Scurit sociale 43 FR -43731 Cotis.Sal.+Pat. Retraite salaris des 43 FR -43732 Cotis.Sal.+Pat. Retraite cadres des 43 FR -4374 Cotis.Sal.+Pat. ASSEDIC des 43 FR -444 Etat - Impts sur les bnfices 4 FR -445 Etat - Taxes sur le chiffre d'affaires 4 FR -44562 T.V.A. sur immobilisations 445 FR -445661 T.V.A. dductible 19,6% sur autres biens et services 445 FR -445662 T.V.A. dductible 5,5% sur autres biens et services 445 FR -445663 T.V.A. dductible 2,1% sur autres biens et services 445 FR -44571 T.V.A. collecte 19,6% 445 FR -44572 T.V.A. collecte 5,5% 445 FR -44573 T.V.A. collecte 2,1% 445 FR -447 Autres impts, taxes et versements assimils 4 FR -45 Groupe et associes 4 FR -455 Associs - Comptes courants 45 FR -46 Dbiteurs divers et crditeurs divers 4 FR -47 comptes transitoires ou d'attente 4 FR -481 Charges rpartir sur plusieurs exercices 4 FR -486 Charges constates d'avance 4 FR -487 Produits constats d'avance 4 FR -491 Provisions pour dprciation des comptes de clients 4 FR -496 Provisions pour dprciation des comptes de dbiteurs divers 4 FR -5 comptes financiers 0 FR -50 valeurs mobilires de placement 5 FR -51 banques, tablissements financiers et assimils 5 FR -53 Caisse 5 FR -54 rgies d'avance et accrditifs 5 FR -58 virements internes 5 FR -590 Provisions pour dprciation des valeurs mobilires de placement 5 FR -6 comptes de charges 0 FR -60 Achats (sauf 603) 6 FR -607 Achats de marchandises 6 FR -603 variations des stocks (approvisionnements et marchandises) 6 FR -6031 Variation des stocks de matires premires (et fournitures) 603 FR -6032 Variation des stocks des autres approvisionnements 603 FR -6037 Variation des stocks de marchandises 603 FR -61 autres charges externes - Services extrieurs 6 FR -62 autres charges externes - Autres services extrieurs 6 FR -63 Impts, taxes et versements assimiles 6 FR -641 Rmunrations du personnel 6 FR -644 Rmunration du travail de l'exploitant 6 FR -645 Charges de scurit sociale et de prvoyance 6 FR -6451 Cotisations l'URSSAF 645 FR -6453 Cotisations aux caisses de retraites 645 FR -6454 Cotisations aux ASSEDIC 645 FR -646 Cotisations sociales personnelles de l'exploitant 6 FR -65 Autres charges de gestion courante 6 FR -66 Charges financires 6 FR -67 Charges exceptionnelles 6 FR -681 Dotations aux amortissements et aux provisions - Charges d'exploitation 6 FR -6811 Dotations aux amortissements sur immobilisations incorporelles et corporelles 681 FR -6815 Dotations aux provisions pour risques et charges d'exploitation 681 FR -6816 Dotations aux provisions pour dprciation des immobilisations incorporelles et corporelles 681 FR -6817 Dotations aux provisions pour dprciation des actifs circulants 681 FR -686 Dotations aux amortissements et aux provisions - Charges financires 6 FR -687 Dotations aux amortissements et aux provisions - Charges exceptionnelles 6 FR -691 Participation des salaris aux rsultats 6 FR -695 Impts sur les bnfices 6 FR -697 Imposition forfaitaire annuelle des socits 6 FR -699 Produits - Reports en arrire des dficits 6 FR -7 comptes de produits 0 FR -701 Ventes de produits finis 7 FR -706 Prestations de services 7 FR -707 Ventes de marchandises 7 FR -708 Produits des activits annexes 7 FR -709 Rabais, remises et ristournes accords par l'entreprise 7 FR -713 Variation des stocks (en-cours de production, produits) 7 FR -72 Production immobilise 7 FR -74 Subventions d'exploitation 7 FR -75 Autres produits de gestion courante 7 FR -753 Jetons de prsence et rmunrations d'administrateurs, grants,... 75 FR -754 Ristournes perues des coopratives (provenant des excdents) 75 FR -755 Quotes-parts de rsultat sur oprations faites en commun 75 FR -76 Produits financiers 7 FR -77 Produits exceptionnels 7 FR -781 Reprises sur amortissements et provisions ( inscrire dans les produits d'exploitation) 7 FR -786 Reprises sur provisions pour risques ( inscrire dans les produits financiers) 7 FR -787 Reprises sur provisions ( inscrire dans les produits exceptionnels) 7 FR -79 Transferts de charges 7 FR -8 Comptes spciaux 0 FR -80 Engagements hors bilan 8 FR -801 Engagements donns par l'entit 80 FR -8011 Avals, cautions, garanties 801 FR -8014 Effets circulant sous l'endos de l'entit 801 FR -8016 Redevances crdit-bail restant courir 801 FR -80161 Crdit-bail mobilier 8016 FR -80165 Crdit-bail immobilier 8016 FR -8018 Autres engagements donns 801 FR -802 Engagements reus par l'entit 80 FR -8021 Avals, cautions, garanties 802 FR -8024 Crances escomptes non chues 802 FR -8026 Engagements reus pour utilisation en crdit-bail 802 FR -80261 Crdit-bail mobilier 8026 FR -80265 Crdit-bail immobilier 8026 FR -8028 Autres engagements reus 802 FR -809 Contrepartie des engagements 80 FR -8091 Contrepartie 801 809 FR -8092 Contrepartie 802 809 FR -88 Rsultat en instance d'affectation 8 FR -89 Bilan 8 FR -890 Bilan d'ouverture 89 FR -891 Bilan de clture 89 FR -9 Comptes analytiques 0 FR -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_bil10000.form b/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_bil10000.form deleted file mode 100644 index 201a0b1..0000000 --- a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_bil10000.form +++ /dev/null @@ -1,179 +0,0 @@ -# Bilan (Systme abrg personnalis) -# version 2007/10/23 02:55 (en compte) - -# Liste des comptes utiliss -$C101=round([101%],2) -$C105=round([105%],2) -$C1061=round([1061%],2) -$C1063=round([1063%],2) -$C1064=round([1064%],2) -$C1068=round([1068%],2) -$C108=round([108%],2) -### REPORT A NOUVEAU -$C11=round([11%],2) -$C12=round([12%],2) -### RESULTAT DE L'EXERCICE -$C145=round([145%],2) -$C146=round([146%],2) -$C147=round([147%],2) -$C148=round([148%],2) -$C15=round([15%],2) -$C16=round([16%],2) -$C201=round([201%],2) -$C206=round([206%],2) -$C207=round([207%],2) -$C208=round([208%],2) -$C21=round([21%],2) -$C23=round([23%],2) -$C27=round([27%],2) -$C280=round([280%],2) -$C281=round([281%],2) -$C290=round([290%],2) -$C291=round([291%],2) -$C297=round([297%],2) -$C31=round([31%],2) -$C33=round([33%],2) -$C34=round([34%],2) -$C35=round([35%],2) -$C37=round([37%],2) -$C391=round([391%],2) -$C393=round([393%],2) -$C394=round([394%],2) -$C395=round([395%],2) -$C397=round([397%],2) -$C400=round([400%],2) -$C409=round([409%],2) -$C410=round([410%],2) -$C419=round([419%],2) -$C421=round([421%],2) -$C428=round([428%],2) -$C43D=round([43%],2) -$C43C=round([43%],2) -$C444D=round([444%],2) -$C444C=round([444%],2) -$C445D=round([445%],2) -$C445C=round([445%],2) -$C447=round([447%],2) -$C487=round([487%],2) -$C455D=round([455%],2) -$C455C=round([455%],2) -$C46=round([46%],2) -$C486=round([486%],2) -$C491=round([491%],2) -$C496=round([496%],2) -$C50=round([50%],2) -$C51D=round([51%],2) -$C53=round([53%],2) -$C54=round([54%],2) -$C58=round([58%],2) -$C590=round([590%],2) - -# --- ACTIF --- -## Actif immobilis -### immobilisations incorporelles -$S10001=$C206+$C207 -$S10002=$C201+$C208 -$S10003=$C280+$C290 -### immobilisations corporelles -$S10004=$C21+$C23 -$S10005=$C281+$C291 -### immobilisations financires -$S10006=$C27 -$S10007=$C297 -## Actif circulant -### Stock et en-cours (autres) -$S10011=$C31+$C33+$C34+$C35 -$S10012=$C391+$C393+$C394+$C395 -### Stock et en-cours (marchandises) -$S10013=$C37 -$S10014=$C397 -### Avances et acomptes verss -$S10015=$C409 -### Crances clients -$S10016=$C410 -$S10017=$C491 -### Crances autres -$S10018=$C428+$C43D+$C444D+$C445D+$C455D+$C46 -$S10019=$C496 -### Valeurs mobilires -$S10020=$C50 -$S10021=$C590 -### Disponibilits -$S10022=$C51D+$C54+$C58 -### Caisse -$S10023=$C53 -### Charges constates d'avance -$S10031=$C486 - -## Total I -$S10111=$S10001+$S10002+$S10004+$S10006 -$S10112=$S10003+$S10005+$S10007 -$S10113=$S10111-$S10112 -# N-1 -$S10114=0 -## Total II -$S10121=$S10011+$S10013+$S10015+$S10016+$S10018+$S10020+$S10022+$S10023 -$S10122=$S10012+$S10014+$S10017+$S10019+$S10021 -$S10123=$S10121-$S10122 -# N-1 -$S10124=0 -## Total III -$S10131=$S10031 -## Total I+II+III -$S10991=$S10111+$S10121+$S10131 -$S10992=$S10112+$S10122 -$S10993=$S10113+$S10123 -# N-1 -$S10994=0 - - -# --- PASSIF --- -## Capitaux propres -### Capital -$S11001=$C101+$C108 -### Ecarts de rvaluation -$S11002=$C105 -### Rserves -### Rserve lgale -$S11003=$C1061 -### Rserves rglementes -$S11004=$C1064 -### Autres rserves -$S11005=$C1063+$C1068 -### REPORT A NOUVEAU -$S11006=$C11 -# RESULTAT DE L'EXERCICE -$S11007=$C12 -### Provisions rglementes -$S11008=$C145+$C146+$C147+$C148 -## Provisions -$S11011=$C15 -## Dettes -### Emprunts et dettes assimiles -$S11021=$C16 -### Avances et acomptes reus -$S11022=$C419 -### Fournisseurs et comptes rattachs -$S11023=$C400 -### Autres dettes -$S11024=$C421+$C428+$C43C+$C444C+$C445C+$C447+$C455C+$C46 -## Produits constats d'avance -$S11031=$C487 - -## Total I -$S11111=$S11001+$S11002+$S11003+$S11004+$S11005+$S11007+$S11008 -$S11112=0 -# N-1 -## Total II -$S11121=$S11011 -$S11122=0 -# N-1 -## Total III -$S11131=$S11021+$S11022+$S11023+$S11024 -$S11132=0 -# N-1 -## Total IV -$S11141=$S11031 -## Total I+II+III+IV -$S11991=$S11111+$S11121+$S11131+$S11141 -$S11992=0 \ No newline at end of file diff --git a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_bil10000.ods b/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_bil10000.ods deleted file mode 100644 index a7f4183..0000000 Binary files a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_bil10000.ods and /dev/null differ diff --git a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_bil10000.xls b/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_bil10000.xls deleted file mode 100644 index 16244f3..0000000 Binary files a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_bil10000.xls and /dev/null differ diff --git a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_comptes-defaut.sql b/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_comptes-defaut.sql deleted file mode 100644 index cbaac1c..0000000 --- a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_comptes-defaut.sql +++ /dev/null @@ -1,26 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007-09-08 02:49 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: parm_code; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY parm_code (p_code, p_value, p_comment) FROM stdin; -BANQUE 51 Poste comptable par dfaut pour les banques -CAISSE 53 Poste comptable par dfaut pour les caisses -CUSTOMER 410 Poste comptable par dfaut pour les clients -VENTE 707 Poste comptable par dfaut pour les ventes -VIREMENT_INTERNE 58 Poste comptable par dfaut pour les virements internes -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_cr1000.form b/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_cr1000.form deleted file mode 100644 index 9e1bc90..0000000 --- a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_cr1000.form +++ /dev/null @@ -1,129 +0,0 @@ -# Compte de rsultat (Systme abrg personnalis) -# version 2007/10/23 14:00 (en compte) - -# Liste des comptes utiliss -$C60=round([60],2) -$C607=round([607%],2) -$C6031=round([6031%],2) -$C6032=round([6032%],2) -$C6037=round([6037%],2) -$C61=round([61%],2) -$C62=round([62%],2) -$C63=round([63%],2) -$C641=round([641%],2) -$C644=round([644%],2) -$C645=round([645%],2) -$C646=round([646%],2) -$C65=round([65%],2) -$C66=round([66%],2) -$C67=round([67%],2) -$C6811=round([6811%],2) -$C6815=round([6815%],2) -$C6816=round([6816%],2) -$C6817=round([6817%],2) -$C686=round([686%],2) -$C687=round([687%],2) -$C691=round([691%],2) -$C695=round([695%],2) -$C697=round([697%],2) -$C701=round([701%],2) -$C706=round([706%],2) -$C707=round([707%],2) -$C708=round([708%],2) -$C709=round([709%],2) -$C713=round([713%],2) -$C72=round([72%],2) -$C74=round([74%],2) -$C75=round([75%],2) -$C76=round([76%],2) -$C77=round([77%],2) -$C781=round([781%],2) -$C786=round([786%],2) -$C787=round([787%],2) -$C79=round([79%],2) - -# --- CHARGES --- -## Charges d'exploitation -### Achats marchandises -$S10001=$C607 -### Variation stocks marchandises -$S10002=$C6037 -### Achats approvisionnements sauf 607 -$S10003=$C60 -### Variation stocks approvisionnements -$S10004=$C6031+$C6032 -### Autres charges externes -$S10005=$C61+$C62 -### Impts et taxes assimils -$S10006=$C63 -### Rmunrations du personnel -$S10007=$C641+$C644 -### Charges sociales -$S10008=$C645+$C646 -### Dotation amortissements -$S10009=$C6811 -### Dotation provisions -$S10010=$C6815+$C6816+$C6817 -### Autres charges -$S10011=$C65 -## Charges financires -$S10012=$C66+$C686 -## Charges exceptionnelles -$S10021=$C67+$C687+$C691 -## Impts sur les bnfices -$S10031=$C695+$C697 -### Bnfice -$F1001=$S11131-$S10141 -$S10151=($F1001>=0)?$F1001:0 -$S10152=0 # N-1 - -## Total I -$S10111=$S10001+$S10002+$S10003+$S10004+$S10005+$S10006+$S10007+$S10008+$S10009+$S10010+$S10011+$S10012 -# N-1 -$S10112=0 -## Total II -$S10121=$S10021 -## Total III -$S10131=$S10031 -## Total I+II+III -$S10141=$S10111+$S10121+$S10131 -## Total -$S10991=$S10141+$S10151 -# N-1 -$S10992=0 - -# --- PRODUITS --- -## Produits d'exploitation -### Vente marchandises -$S11001=$C707-$C709 -### Production vendue -$S11002=$C701+$C706+$C708 -### Production stocke -$S11003=$C713 -### Production immobilise -$S11004=$C72 -### Subventions -$S11005=$C74 -###Autres produits -$S11006=$C75+$C781 -## Produits financiers -$S11007=$C76+$C786 -## Produits exceptionnels -$S11021=$C77+$C787+$C79 -### Perte -$F1002=$S10141-$S11131 -$S11141=($F1002>=0)?$F1002:0 -$S11142=0 # N-1 - -## Total I -$S11111=$S11001+$S11002+$C11003+$C11004+$C11005+$S11006+$S11007 -# N-1 -$S11112=0 -## Total II -$S11121=$S11021 -## Total I+II -$S11131=$S11111+$S11121 -## Total -$S11991=$S11131+$S11141 -# N-1 -$S11992=0 diff --git a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_cr1000.odt b/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_cr1000.odt deleted file mode 100644 index 704a788..0000000 Binary files a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_cr1000.odt and /dev/null differ diff --git a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_cr1000.rtf b/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_cr1000.rtf deleted file mode 100644 index 2696850..0000000 --- a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_cr1000.rtf +++ /dev/null @@ -1,259 +0,0 @@ -{\rtf1\ansi\deff1\adeflang1025 -{\fonttbl{\f0\froman\fprq2\fcharset0 Nimbus Roman No9 L{\*\falt Times New Roman};}{\f1\fnil\fprq0\fcharset0 Avant Garde Gothic;}{\f2\fnil\fprq2\fcharset0 FreeSans;}{\f3\fnil\fprq0\fcharset0 Avant Garde Gothic;}{\f4\froman\fprq2\fcharset0 Times New Roman;}{\f5\fnil\fprq2\fcharset0 \u26481 ?\u39080 ?\u26126 ?\u26397 ?;}{\f6\fswiss\fprq2\fcharset0 Arial;}{\f7\fnil\fprq2\fcharset0 Tahoma{\*\falt Lucidasans};}{\f8\fnil\fprq0\fcharset0 Tahoma{\*\falt Lucidasans};}} -{\colortbl;\red0\green0\blue0;\red128\green128\blue128;} -{\stylesheet{\s1\rtlch\af7\afs24\lang255\ltrch\dbch\af5\afs24\langfe1041\loch\fs24\lang1036\snext1 Default;} -{\s2\sa120\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1041\loch\fs24\lang1036\sbasedon1\snext2 Text body;} -{\s3\rtlch\af8\afs24\lang255\ltrch\dbch\afs24\langfe1041\loch\f1\fs24\lang1036\sbasedon2\snext3 List;} -{\s4\sb120\sa120\rtlch\af8\afs20\lang255\ai\ltrch\dbch\afs20\langfe1041\ai\loch\f1\fs20\lang1036\i\sbasedon1\snext4 Caption;} -{\s5\rtlch\af8\afs24\lang255\ltrch\dbch\afs24\langfe1041\loch\f1\fs24\lang1036\sbasedon1\snext5 Index;} -{\s6\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1036\loch\f4\fs24\lang1036\sbasedon1\snext6 Normal;} -{\s7\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1041\loch\fs24\lang1036\sbasedon2\snext7 Table Contents;} -{\s8\qc\rtlch\af1\afs24\lang255\ai\ab\ltrch\dbch\af1\afs24\langfe1041\ai\ab\loch\fs24\lang1036\i\b\sbasedon7\snext8 Table Heading;} -} -{\info{\creatim\yr2007\mo10\dy25\hr17\min55}{\revtim\yr1601\mo1\dy1\hr0\min0}{\printim\yr1601\mo1\dy1\hr0\min0}{\comment StarWriter}{\vern6450}}\deftab709 -{\*\pgdsctbl -{\pgdsc0\pgdscuse195\lndscpsxn\pgwsxn16837\pghsxn11905\marglsxn567\margrsxn567\margtsxn567\margbsxn567\pgdscnxt0 Default;}} -{\*\pgdscno0}\landscape\paperh11905\paperw16837\margl567\margr567\margt567\margb567\sectd\sbknone\lndscpsxn\pgwsxn16837\pghsxn11905\marglsxn567\margrsxn567\margtsxn567\margbsxn567\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc -\pard\plain \ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Soci\'e9t\'e9 : LaMule} -\par \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b -\par \pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Compte de r\'e9sultat (Syst\'e8me abr\'e9g\'e9 personnalis\'e9)} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ai\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 P\'e9riode du :__/__/____ au : __/__/____} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\ai\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 version 2007/09/10 21:25 (en compte) } -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1036\loch\f4\fs24\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1036\loch\f4\fs24\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b CHARGES (hors taxes)} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Exercice N} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Exercice N-1} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b PRODUITS (hors taxes)} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Exercice N} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Exercice N-1} -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Charges d'exploitation :} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Produits d'exploitation :} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh204\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Achat de marchandises} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\afs16\lang255\ltrch\dbch\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10001>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\afs16\lang255\ltrch\dbch\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Vente de marchandises} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S11001>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Variation de stocks (marchandises)} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10002>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Production vendue (B et S)} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S11002>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Achats d'approvisionnements} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10003>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Production stock\'e9e} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S11003>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Variation de stocks (approvisionnements)} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10004>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Production immobilis\'e9e} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S11004>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Autres charges externes} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10005>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Subvention d'exploitation} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S11005>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Imp\'f4ts, taxes et versements assimil\'e9s} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10006>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Autres produits} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S11006>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 R\'e9mun\'e9rations du personnel} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10007>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Charges sociales} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10008>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Dotation aux amortissements} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10009>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Dotation aux provisions} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10010>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Autres charges } -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10011>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Charges financi\'e8res} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang2057 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10012>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang2057 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang2057 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang2057\b {\loch\f2\fs16\lang2057\i0\b Produits financiers} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S11007>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang2057 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang2057\b {\loch\f2\fs16\lang2057\i0\b Total (I)} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1036\loch\f4\fs24\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang2057 {\loch\f2\fs16\lang2057\i0\b0 <<$S10111>>} -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang2057 {\loch\f2\fs16\lang2057\i0\b0 <<$S10112>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang2057 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang2057\b {\loch\f2\fs16\lang2057\i0\b Total (I)} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang2057\b -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S11111>>} -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S11112>>} -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Charges exceptionnelles (II)} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10121>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Produits exceptionnels (II)} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S11121>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Imp\'f4ts sur les b\'e9n\'e9fices (III)} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10131>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Total des charges (I+II+III)} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10141>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang1036\b {\loch\f2\fs16\lang1036\i0\b Total des produits (I+II)} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S11131>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Solde cr\'e9diteur : B\'e9n\'e9fice} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10151>>} -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S10152>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 Solde d\'e9biteur : Perte} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 (<<$S11141>>)} -\cell\pard\plain \intbl\ltrpar\s6\qc\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 (<<$S11142>>)} -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1036\loch\f4\fs24\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1036\loch\f4\fs24\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang2057 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang2057 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s6\ql\rtlch\af6\afs16\lang255\ab\ltrch\dbch\af6\afs16\langfe1036\ab\loch\f2\fs16\lang2057\b {\loch\f2\fs16\lang2057\i0\b TOTAL GENERAL} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1036\loch\f2\fs16\lang2057 {\loch\f2\fs16\lang2057\i0\b0 <<$S10991>>} -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1036\loch\f2\fs16\lang2057 {\loch\f2\fs16\lang2057\i0\b0 <<$S10992>>} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1036\loch\f4\fs24\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1036\loch\f2\fs16\lang2057\b {\loch\f2\fs16\lang2057\i0\b TOTAL GENERAL} -\cell\pard\plain \intbl\ltrpar\s6\ql\rtlch\afs24\lang255\ltrch\dbch\afs24\langfe1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S11991>>} -\cell\pard\plain \intbl\ltrpar\s6\qr\rtlch\af6\afs16\lang255\ltrch\dbch\af6\afs16\langfe1036\loch\f2\fs16\lang1036 {\loch\f2\fs16\lang1036\i0\b0 <<$S11992>>} -\cell\row\pard \pard\plain \ltrpar\s1\ql\rtlch\af7\afs24\lang255\ltrch\dbch\af5\afs24\langfe1041\loch\fs24\lang1036 -\par } \ No newline at end of file diff --git a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_tva.sql b/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_tva.sql deleted file mode 100644 index b2b6dd6..0000000 --- a/sources/contrib/comptabilite-francaise/abrege-perso/fr_plan_abrege_perso_tva.sql +++ /dev/null @@ -1,44 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007/10/23 22:23 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tva_rate; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) FROM stdin; -101 TVAFranceNormal 0.196 TVA 19,6% - France mtropolitaine - Taux normal 445661,44571 -102 TVAFranceRduit 0.055 TVA 5,5% - France mtropolitaine - Taux rduit 445662,44572 -103 TVAFranceSuperRduit 0.021 TVA 2,1% - France mtropolitaine - Taux super rduit 445663,44573 -104 TVAFranceImmos 0.196 TVA 19,6% - France mtropolitaine - Taux immobilisations 44562,0 -105 TVAFranceAnciens 0 TVA x% - France mtropolitaine - Taux anciens 445,445 -201 TVADomNormal 0.085 TVA 8,5% - DOM - Taux normal 445,445 -202 TVADomNPR 0.085 TVA 8,5% - DOM - Taux normal NPR 445,445 -203 TVADomRduit 0.021 TVA 2,1% - DOM - Taux rduit 445,445 -204 TVADom-I 0.0175 TVA 1,75% - DOM - Taux I 445,445 -205 TVADomPresse 0.0105 TVA 1,05% - DOM - Taux publications de presse 445,445 -206 TVADomOctroi 0 TVA x% - DOM - Taux octroi de mer 445,445 -207 TVADomImmos 0 TVA x% - DOM - Taux immobilisations 445,0 -301 TVACorse-I 0.13 TVA 13% - Corse - Taux I 445,445 -302 TVACorse-II 0.08 TVA 8% - Corse - Taux II 445,445 -303 TVACorse-III 0.021 TVA 2,1% - Corse - Taux III 445,445 -304 TVACorse-IV 0.009 TVA 0,9% - Corse - Taux IV 445,445 -305 TVACorseImmos 0 TVA x% - Corse - Taux immobilisations 445,0 -401 TVAacquisIntracom 0 TVA x% - Acquisitions intracommunautaires/Pays 445,445 -402 TVAacquisIntracomImmos 0 TVA x% - Acquisitions intracommunautaires immobilisations/Pays 445,0 -501 TVAfranchise 0 TVA x% - Non imposable : Achats en franchise -502 TVAexport 0 TVA x% - Non imposable : Exports hors CE/Pays -503 TVAautres 0 TVA x% - Non imposable : Autres oprations -504 TVAlivrIntracom 0 TVA x% - Non imposable : Livraisons intracommunautaires/Pays -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/abrege-strict/fr_plan_abrege.sql b/sources/contrib/comptabilite-francaise/abrege-strict/fr_plan_abrege.sql deleted file mode 100644 index a276a0c..0000000 --- a/sources/contrib/comptabilite-francaise/abrege-strict/fr_plan_abrege.sql +++ /dev/null @@ -1,132 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007-09-08 01:10 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tmp_pcmn; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_country) FROM stdin; -1 comptes de capitaux 0 FR -101 Capital 1 FR -105 Ecarts de rvaluation 1 FR -1061 Rserve lgale 1 FR -1063 Rserves statutaires ou contractuelles 1 FR -1064 Rserves rglementes 1 FR -1068 Autres rserves 1 FR -108 Compte de l'exploitant 1 FR -12 rsultat de l'exercice (bnfice ou perte) 1 FR -145 Amortissements drogatoires 1 FR -146 Provision spciale de rvaluation 1 FR -147 Plus-values rinvesties 1 FR -148 Autres provisions rglementes 1 FR -15 Provisions pour risques et charges 1 FR -16 emprunts et dettes assimilees 1 FR -2 comptes d'immobilisations 0 FR -20 immobilisations incorporelles 2 FR -201 Frais d'tablissement 20 FR -206 Droit au bail 20 FR -207 Fonds commercial 20 FR -208 Autres immobilisations incorporelles 20 FR -21 immobilisations corporelles 2 FR -23 immobilisations en cours 2 FR -27 autres immobilisations financieres 2 FR -280 Amortissements des immobilisations incorporelles 2 FR -281 Amortissements des immobilisations corporelles 2 FR -290 Provisions pour dprciation des immobilisations incorporelles 2 FR -291 Provisions pour dprciation des immobilisations corporelles (mme ventilation que celle du compte 21) 2 FR -297 Provisions pour dprciation des autres immobilisations financires 2 FR -3 comptes de stocks et en cours 0 FR -31 matieres premires (et fournitures) 3 FR -32 autres approvisionnements 3 FR -33 en-cours de production de biens 3 FR -34 en-cours de production de services 3 FR -35 stocks de produits 3 FR -37 stocks de marchandises 3 FR -391 Provisions pour dprciation des matires premires (et fournitures) 3 FR -392 Provisions pour dprciation des autres approvisionnements 3 FR -393 Provisions pour dprciation des en-cours de production de biens 3 FR -394 Provisions pour dprciation des en-cours de production de services 3 FR -395 Provisions pour dprciation des stocks de produits 3 FR -397 Provisions pour dprciation des stocks de marchandises 3 FR -4 comptes de tiers 0 FR -400 Fournisseurs et Comptes rattachs 4 FR -409 Fournisseurs dbiteurs 4 FR -410 Clients et Comptes rattachs 4 FR -419 Clients crditeurs 4 FR -421 Personnel - Rmunrations dues 4 FR -428 Personnel - Charges payer et produits recevoir 4 FR -43 Scurit sociale et autres organismes sociaux 4 FR -444 Etat - Impts sur les bnfices 4 FR -445 Etat - Taxes sur le chiffre d'affaires 4 FR -447 Autres impts, taxes et versements assimils 4 FR -45 Groupe et associes 4 FR -455 Associs - Comptes courants 45 FR -46 Dbiteurs divers et crditeurs divers 4 FR -47 comptes transitoires ou d'attente 4 FR -481 Charges rpartir sur plusieurs exercices 4 FR -486 Charges constates d'avance 4 FR -487 Produits constats d'avance 4 FR -491 Provisions pour dprciation des comptes de clients 4 FR -496 Provisions pour dprciation des comptes de dbiteurs divers 4 FR -5 comptes financiers 0 FR -50 valeurs mobilires de placement 5 FR -51 banques, tablissements financiers et assimils 5 FR -53 Caisse 5 FR -54 rgies d'avance et accrditifs 5 FR -58 virements internes 5 FR -590 Provisions pour dprciation des valeurs mobilires de placement 5 FR -6 comptes de charges 0 FR -60 Achats (sauf 603) 6 FR -603 variations des stocks (approvisionnements et marchandises) 6 FR -61 autres charges externes - Services extrieurs 6 FR -62 autres charges externes - Autres services extrieurs 6 FR -63 Impts, taxes et versements assimiles 6 FR -641 Rmunrations du personnel 6 FR -644 Rmunration du travail de l'exploitant 6 FR -645 Charges de scurit sociale et de prvoyance 6 FR -646 Cotisations sociales personnelles de l'exploitant 6 FR -65 Autres charges de gestion courante 6 FR -66 Charges financires 6 FR -67 Charges exceptionnelles 6 FR -681 Dotations aux amortissements et aux provisions - Charges d'exploitation 6 FR -686 Dotations aux amortissements et aux provisions - Charges financires 6 FR -687 Dotations aux amortissements et aux provisions - Charges exceptionnelles 6 FR -691 Participation des salaris aux rsultats 6 FR -695 Impts sur les bnfices 6 FR -697 Imposition forfaitaire annuelle des socits 6 FR -699 Produits - Reports en arrire des dficits 6 FR -7 comptes de produits 0 FR -701 Ventes de produits finis 7 FR -706 Prestations de services 7 FR -707 Ventes de marchandises 7 FR -708 Produits des activits annexes 7 FR -709 Rabais, remises et ristournes accords par l'entreprise 7 FR -713 Variation des stocks (en-cours de production, produits) 7 FR -72 Production immobilise 7 FR -73 Produits nets partiels sur oprations long terme 7 FR -74 Subventions d'exploitation 7 FR -75 Autres produits de gestion courante 7 FR -753 Jetons de prsence et rmunrations d'administrateurs, grants,... 75 FR -754 Ristournes perues des coopratives (provenant des excdents) 75 FR -755 Quotes-parts de rsultat sur oprations faites en commun 75 FR -76 Produits financiers 7 FR -77 Produits exceptionnels 7 FR -781 Reprises sur amortissements et provisions ( inscrire dans les produits d'exploitation) 7 FR -786 Reprises sur provisions pour risques ( inscrire dans les produits financiers) 7 FR -787 Reprises sur provisions ( inscrire dans les produits exceptionnels) 7 FR -79 Transferts de charges 7 FR -8 Comptes spciaux 0 FR -9 Comptes analytiques 0 FR -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/abrege-strict/fr_plan_abrege_tva.sql b/sources/contrib/comptabilite-francaise/abrege-strict/fr_plan_abrege_tva.sql deleted file mode 100644 index 4d3a75d..0000000 --- a/sources/contrib/comptabilite-francaise/abrege-strict/fr_plan_abrege_tva.sql +++ /dev/null @@ -1,44 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007/10/23 22:23 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tva_rate; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) FROM stdin; -101 TVAFranceNormal 0.196 TVA 19,6% - France mtropolitaine - Taux normal 445,445 -102 TVAFranceRduit 0.055 TVA 5,5% - France mtropolitaine - Taux rduit 445,445 -103 TVAFranceSuperRduit 0.021 TVA 2,1% - France mtropolitaine - Taux super rduit 445,445 -104 TVAFranceImmos 0.196 TVA 19,6% - France mtropolitaine - Taux immobilisations 445,445 -105 TVAFranceAnciens 0 TVA x% - France mtropolitaine - Taux anciens 445,445 -201 TVADomNormal 0.085 TVA 8,5% - DOM - Taux normal 445,445 -202 TVADomNPR 0.085 TVA 8,5% - DOM - Taux normal NPR 445,445 -203 TVADomRduit 0.021 TVA 2,1% - DOM - Taux rduit 445,445 -204 TVADom-I 0.0175 TVA 1,75% - DOM - Taux I 445,445 -205 TVADomPresse 0.0105 TVA 1,05% - DOM - Taux publications de presse 445,445 -206 TVADomOctroi 0 TVA x% - DOM - Taux octroi de mer 445,445 -207 TVADomImmos 0 TVA x% - DOM - Taux immobilisations 445,445 -301 TVACorse-I 0.13 TVA 13% - Corse - Taux I 445,445 -302 TVACorse-II 0.08 TVA 8% - Corse - Taux II 445,445 -303 TVACorse-III 0.021 TVA 2,1% - Corse - Taux III 445,445 -304 TVACorse-IV 0.009 TVA 0,9% - Corse - Taux IV 445,445 -305 TVACorseImmos 0 TVA x% - Corse - Taux immobilisations 445,445 -401 TVAacquisIntracom 0 TVA x% - Acquisitions intracommunautaires/Pays 445,445 -402 TVAacquisIntracomImmos 0 TVA x% - Acquisitions intracommunautaires immobilisations/Pays 445,445 -501 TVAfranchise 0 TVA x% - Non imposable : Achats en franchise -502 TVAexport 0 TVA x% - Non imposable : Exports hors CE/Pays -503 TVAautres 0 TVA x% - Non imposable : Autres oprations -504 TVAlivrIntracom 0 TVA x% - Non imposable : Livraisons intracommunautaires/Pays -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/base-perso/fr_plan_base_perso.sql b/sources/contrib/comptabilite-francaise/base-perso/fr_plan_base_perso.sql deleted file mode 100644 index 71ef054..0000000 --- a/sources/contrib/comptabilite-francaise/base-perso/fr_plan_base_perso.sql +++ /dev/null @@ -1,405 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007-09-08 01:10 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tmp_pcmn; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_country) FROM stdin; -1 comptes de capitaux 0 FR -10 capital et rserves 1 FR -104 Primes lies au capital social 10 FR -106 Rserves 10 FR -1062 Rserves indisponibles 106 FR -107 Ecart d'quivalence 10 FR -109 Actionnaires: Capital souscrit - non appel 10 FR -11 report a nouveau (solde crditeur ou dbiteur) 1 FR -13 subventions d'investissement 1 FR -131 Subventions d'quipement 13 FR -138 Autres subventions d'investissement (mme ventilation que celle du compte 131) 13 FR -139 Subventions d'investissement inscrites au compte de rsultat 13 FR -1391 Subventions d'quipement 139 FR -1398 Autres subventions d'investissement (mme ventilation que celle du compte 1391) 139 FR -14 provisions reglementees 1 FR -142 Provisions rglementes relatives aux immobilisations 14 FR -143 Provisions rglementes relatives aux stocks 14 FR -144 Provisions rglementes relatives aux autres lments de l'actif 14 FR -151 Provisions pour risques 1 FR -153 Provisions pour pensions et obligations similaires 1 FR -155 Provisions pour impts 1 FR -156 Provisions pour renouvellement des immobilisations (entreprises concessionnaires) 1 FR -157 Provisions pour charges rpartir sur plusieurs exercices 1 FR -158 Autres provisions pour charges 1 FR -161 Emprunts obligataires convertibles 1 FR -163 Autres emprunts obligataires 1 FR -164 Emprunts auprs des tablissements de crdit 1 FR -165 Dpts et cautionnements reus 1 FR -166 Participation des salaris aux rsultats 1 FR -167 Emprunts et dettes assortis de conditions particulires 1 FR -1671 Emissions de titres participatifs 167 FR -1674 Avances conditionnes de l'Etat 167 FR -1675 Emprunts participatifs 167 FR -168 Autres emprunts et dettes assimiles 1 FR -169 Primes de remboursement des obligations 1 FR -17 dettes rattaches a des participations 1 FR -171 Dettes rattaches des participations (groupe) 17 FR -174 Dettes rattaches des participations (hors groupe) 17 FR -178 Dettes rattaches des socits en participation 17 FR -18 comptes de liaison des tablissements et societes en participation 1 FR -2 comptes d'immobilisations 0 FR -203 Frais de recherche et de dveloppement 2 FR -205 Concessions et droits similaires, brevets, licences, marques, procds, logiciels, droits et valeurs similaires 2 FR -211 Terrains 2 FR -2111 Terrains nus 211 FR -2112 Terrains amnags 211 FR -2113 Sous-sols et sur-sols 211 FR -2114 Terrains de gisement 211 FR -2115 Terrains btis 211 FR -2116 Compte d'ordre sur immobilisations (art. 6 du dcret n 78-737 du 11 juillet 1978) 211 FR -212 Agencements et amnagements de terrains (mme ventilation que celle du compte 211) 2 FR -213 Constructions 2 FR -2131 Btiments 213 FR -2135 Installations gnrales - agencements - amnagements des constructions (mme ventilation que celle du compte 2131) 213 FR -2138 Ouvrages d'infrastructure 213 FR -214 Constructions sur sol d'autrui (mme ventilation que celle du compte 213) 2 FR -215 Installations techniques, matriels et outillage industriels 2 FR -2151 Installations complexes spcialises 215 FR -2153 Installations caractre spcifique 215 FR -2154 Matriel industriel 215 FR -2155 Outillage industriel 215 FR -2157 Agencements et amnagements du matriel et outillage industriels 215 FR -218 Autres immobilisations corporelles 2 FR -2181 Installations gnrales, agencements, amnagements divers 218 FR -2182 Matriel de transport 218 FR -2183 Matriel de bureau et matriel informatique 218 FR -2184 Mobilier 218 FR -2185 Cheptel 218 FR -2186 Emballages rcuprables 218 FR -22 immobilisations mises en concession 2 FR -231 Immobilisations corporelles en cours 2 FR -232 Immobilisations incorporelles en cours 2 FR -237 Avances et acomptes verss sur immobilisations incorporelles 2 FR -238 Avances et acomptes verss sur commandes d'immobilisations corporelles 2 FR -25 Parts dans des entreprises lies et crances sur des entreprises lies 2 FR -26 Participations et crances rattaches des participations 2 FR -261 Titres de participation 26 FR -266 Autres formes de participation 26 FR -267 Crances rattaches des participations 26 FR -268 Crances rattaches des socits en participation 26 FR -269 Versements restant effectuer sur titres de participation non librs 26 FR -271 Titres immobiliss autres que les titres immobiliss de l'activit de portefeuille (droit de proprit) 2 FR -272 Titres immobiliss (droit de crance) 2 FR -273 Titres immobiliss de l'activit de portefeuille 2 FR -274 Prts 2 FR -275 Dpts et cautionnements verss 2 FR -276 Autres crances immobilises 2 FR -277 (Actions propres ou parts propres) 2 FR -279 Versements restant effectuer sur titres immobiliss non librs 2 FR -28 amortissements des immobilisations 2 FR -2801 Frais d'tablissement (mme ventilation que celle du compte 201) 28 FR -2803 Frais de recherche et de dveloppement 28 FR -2805 Concessions et droits similaires, brevets, licences, logiciels, droits et valeurs similaires 28 FR -2807 Fonds commercial 28 FR -2808 Autres immobilisations incorporelles 28 FR -2811 Terrains de gisement 28 FR -2812 Agencements, amnagements de terrains (mme ventilation que celle du compte 212) 2 FR -2813 Constructions (mme ventilation que celle du compte 213) 2 FR -2814 Constructions sur sol d'autrui (mme ventilation que celle du compte 214) 2 FR -2815 Installations, matriel et outillage industriels (mme ventilation que celle du compte 215) 2 FR -2818 Autres immobilisations corporelles (mme ventilation que celle du compte 218) 2 FR -282 Amortissements des immobilisations mises en concession 28 FR -29 provisions pour dprciation des immobilisations 2 FR -2905 Marques, procds, droits et valeurs similaires 29 FR -2906 Droit au bail 29 FR -2907 Fonds commercial 29 FR -2908 Autres immobilisations incorporelles 29 FR -2911 Terrains (autres que terrains de gisement) 29 FR -292 Provisions pour dprciation des immobilisations mises en concession 29 FR -293 Provisions pour dprciation des immobilisations en cours 29 FR -2931 Immobilisations corporelles en cours 293 FR -2932 Immobilisations incorporelles en cours 293 FR -296 Provisions pour dprciation des participations et crances rattaches des participations 29 FR -2961 Titres de participation 296 FR -2966 Autres formes de participation 296 FR -2967 Crances rattaches des participations (mme ventilation que celle du compte 267) 26 FR -2968 Crances rattaches des socits en participation (mme ventilation que celle du compte 268) 26 FR -2971 Titres immobiliss autres que les titres immobiliss de l'activit de portefeuille -droit de proprit (mme ventilation que celle du compte 271) 2 FR -2972 Titres immobiliss - droit de crance (mme ventilation que celle du compte 272) 2 FR -2973 Titres immobiliss de l'activit de portefeuille 29 FR -2974 Prts (mme ventilation que celle du compte 274) 2 FR -2975 Dpts et cautionnements verss (mme ventilation que celle du compte 275) 2 FR -2976 Autres crances immobilises (mme ventilation que celle du compte 276) 2 FR -3 comptes de stocks et en cours 0 FR -321 Matires consommables 3 FR -322 Fournitures consommables 3 FR -326 Emballages 3 FR -331 Produits en cours 3 FR -335 Travaux en cours 3 FR -341 Etudes en cours 3 FR -345 Prestations de services en cours 3 FR -351 Produits intermdiaires 3 FR -355 Produits finis 3 FR -358 Produits rsiduels (ou matires de rcupration) 3 FR -36 (compte ouvrir, le cas chant, sous l'intitul "stocks provenant d'immobilisations") 3 FR -38 (lorsque l'entit tient un inventaire permanent en comptabilit gnrale, le compte 38 peut tre utilis pour comptabiliser les stocks en voie d'acheminement, mis en dpt ou donns en consignation) 3 FR -39 provisions pour dprciation des stocks et en-cours 3 FR -4 comptes de tiers 0 FR -40 fournisseurs et comptes rattaches 4 FR -401 Fournisseurs 40 FR -403 Fournisseurs - Effets payer 40 FR -404 Fournisseurs d'immobilisations 40 FR -405 Fournisseurs d'immobilisations - Effets payer 40 FR -408 Fournisseurs - Factures non parvenues 40 FR -4091 Fournisseurs - Avances et acomptes verss sur commandes 40 FR -4096 Fournisseurs - Crances pour emballages et matriel rendre 40 FR -4097 Fournisseurs - Autres avoirs 40 FR -4098 Rabais, remises, ristournes obtenir et autres avoirs non encore reus 40 FR -41 clients et comptes rattaches 4 FR -411 Clients 41 FR -413 Clients - Effets recevoir 41 FR -416 Clients douteux ou litigieux 41 FR -417 "Crances" sur travaux non encore facturables 41 FR -418 Clients - Produits non encore facturs 41 FR -4191 Clients - Avances et acomptes reus sur commandes 41 FR -4196 Clients - Dettes sur emballages et matriels consigns 41 FR -4197 Clients - Autres avoirs 41 FR -4198 Rabais, remises, ristournes accorder et autres avoirs tablir 41 FR -42 Personnel et comptes rattaches 4 FR -422 Comits d'entreprises, d'tablissement,... 42 FR -424 Participation des salaris aux rsultats 42 FR -425 Personnel - Avances et acomptes 42 FR -426 Personnel - Dpts 42 FR -427 Personnel - Oppositions 42 FR -431 Scurit sociale 4 FR -437 Autres organismes sociaux 4 FR -43731 Cotis.Sal.+Pat. Retraite salaris des 437 FR -43732 Cotis.Sal.+Pat. Retraite cadres des 437 FR -4374 Cotis.Sal.+Pat. ASSEDIC des 437 FR -438 Organismes sociaux - Charges payer et produits recevoir 4 FR -44 tat et autres collectivits publiques 4 FR -441 tat - Subventions recevoir 44 FR -442 Etat - Impts et taxes recouvrables sur des tiers 44 FR -443 Oprations particulires avec l'Etat les collectivits publiques, les organismes internationaux 44 FR -4431 Crances sur l'Etat rsultant de la suppression de la rgle du dcalage d'un mois en matire de T.V.A. 443 FR -4438 Intrts courus sur crances figurant au 4431 443 FR -4452 T.V.A. due intracommunautaire 44 FR -4455 Taxes sur le chiffre d'affaires dcaisser 44 FR -4456 Taxes sur le chiffre d'affaires dductibles 44 FR -445661 T.V.A. dductible 19,6% sur autres biens et services 4456 FR -445662 T.V.A. dductible 5,5% sur autres biens et services 4456 FR -445663 T.V.A. dductible 2,1% sur autres biens et services 4456 FR -4457 Taxes sur le chiffre d'affaires collectes par l'entreprise 44 FR -4458 Taxes sur le chiffre d'affaires rgulariser ou en attente 44 FR -446 Obligations cautionnes 44 FR -448 Etat - Charges payer et produits recevoir 44 FR -451 Groupe 4 FR -456 Associs - Oprations sur le capital 4 FR -457 Associs - Dividendes payer 4 FR -458 Associs - Oprations faites en commun et en G.I.E. 4 FR -471 Comptes d'attente 4 FR -472 Comptes d'attente 4 FR -473 Comptes d'attente 4 FR -474 Comptes d'attente 4 FR -475 Comptes d'attente 4 FR -476 Diffrence de conversion - Actif 4 FR -477 Diffrences de conversion - Passif 4 FR -478 Autres comptes transitoires 4 FR -48 comptes de rgularisation 4 FR -4811 Charges diffres 48 FR -4812 Frais d'acquisition des immobilisations 48 FR -4816 Frais d'mission des emprunts 48 FR -4818 Charges taler 48 FR -488 Comptes de rpartition priodique des charges et des produits 48 FR -49 provisions pour dprciation des comptes de tiers 4 FR -495 Provisions pour dprciation des comptes du groupe et des associs 49 FR -4951 Comptes du groupe 495 FR -4955 Comptes courants des associs 495 FR -4958 Oprations faites en commun et en G.I.E. 495 FR -5 comptes financiers 0 FR -501 Parts dans des entreprises lies 5 FR -502 Actions propres 5 FR -503 Actions 5 FR -504 Autres titres confrant un droit de proprit 5 FR -505 Obligations et bons mis par la socit et rachets par elle 5 FR -506 Obligations 5 FR -507 Bons du Trsor et bons de caisse court terme 5 FR -508 Autres valeurs mobilires de placement et autres crances assimiles 5 FR -509 Versements restant effectuer sur valeurs mobilires de placement non libres 5 FR -511 Valeurs l'encaissement 5 FR -512 Banques 5 FR -514 Chques postaux 5 FR -515 "Caisses" du Trsor et des tablissements publics 5 FR -516 Socits de bourse 5 FR -517 Autres organismes financiers 5 FR -518 Intrts courus 5 FR -519 Concours bancaires courants 5 FR -52 Instruments de trsorerie 5 FR -53 Caisse 5 FR -58 virements internes 5 FR -59 provisions pour dprciation des comptes financiers 5 FR -5903 Actions 59 FR -5904 Autres titres confrant un droit de proprit 59 FR -5906 Obligations 59 FR -5908 Autres valeurs mobilires de placement et crances assimiles 59 FR -6 comptes de charges 0 FR -601 Achats stocks - Matires premires (et fournitures) 6 FR -602 Achats stocks - Autres approvisionnements 6 FR -6021 Matires consommables 602 FR -6022 Fournitures consommables 602 FR -6026 Emballages 602 FR -604 Achats d'tudes et prestations de services 6 FR -605 Achats de matriel, quipements et travaux 6 FR -606 Achats non stocks de matire et fournitures 6 FR -607 Achats de marchandises 6 FR -608 (Compte rserv, le cas chant, la rcapitulation des frais accessoires incorpors aux achats) 6 FR -609 Rabais, remises et ristournes obtenus sur achats 6 FR -6031 Variation des stocks de matires premires (et fournitures) 6 FR -6032 Variation des stocks des autres approvisionnements 6 FR -6037 Variation des stocks de marchandises 6 FR -61 autres charges externes - Services extrieurs 6 FR -611 Sous-traitance gnrale 61 FR -612 Redevances de crdit-bail 61 FR -6122 Crdit-bail mobilier 612 FR -6125 Crdit-bail immobilier 612 FR -613 Locations 61 FR -614 Charges locatives et de coproprit 61 FR -615 Entretien et rparations 61 FR -616 Primes d'assurances 61 FR -617 Etudes et recherches 61 FR -618 Divers 61 FR -619 Rabais, remises et ristournes obtenus sur services extrieurs 61 FR -62 autres charges externes - Autres services extrieurs 6 FR -621 Personnel extrieur l'entreprise 62 FR -622 Rmunrations d'intermdiaires et honoraires 62 FR -623 Publicit, publications, relations publiques 62 FR -624 Transports de biens et transports collectifs du personnel 62 FR -625 Dplacements, missions et rceptions 62 FR -626 Frais postaux et de tlcommunications 62 FR -627 Services bancaires et assimils 62 FR -628 Divers 62 FR -629 Rabais, remises et ristournes obtenus sur autres services extrieurs 62 FR -631 Impts, taxes et versements assimils sur rmunrations (administrations des impts) 6 FR -633 Impts, taxes et versements assimils sur rmunrations (autres organismes) 6 FR -635 Autres impts, taxes et versements assimils (administrations des impts) 6 FR -637 Autres impts, taxes et versements assimils (autres organismes) 6 FR -64 Charges de personnel 6 FR -647 Autres charges sociales 64 FR -648 Autres charges de personnel 64 FR -651 Redevances pour concessions, brevets, licences, marques, procds, logiciels, droits et valeurs similaires 6 FR -653 Jetons de prsence 6 FR -654 Pertes sur crances irrcouvrables 6 FR -655 Quotes-parts de rsultat sur oprations faites en commun 6 FR -658 Charges diverses de gestion courante 6 FR -661 Charges d'intrts 6 FR -664 Pertes sur crances lies des participations 6 FR -665 Escomptes accords 6 FR -666 Pertes de change 6 FR -667 Charges nettes sur cessions de valeurs mobilires de placement 6 FR -668 Autres charges financires 6 FR -671 Charges exceptionnelles sur oprations de gestion 6 FR -672 (Compte la disposition des entits pour enregistrer, en cours d'exercice, les charges sur exercices antrieurs) 6 FR -675 Valeurs comptables des lments d'actif cds 6 FR -678 Autres charges exceptionnelles 6 FR -68 Dotations aux amortissements et aux provisions 6 FR -6811 Dotations aux amortissements sur immobilisations incorporelles et corporelles 68 FR -6812 Dotations aux amortissements des charges d'exploitation rpartir 68 FR -6815 Dotations aux provisions pour risques et charges d'exploitation 68 FR -6816 Dotations aux provisions pour dprciation des immobilisations incorporelles et corporelles 68 FR -6817 Dotations aux provisions pour dprciation des actifs circulants 68 FR -6861 Dotations aux amortissements des primes de remboursement des obligations 68 FR -6865 Dotations aux provisions pour risques et charges financiers 68 FR -6866 Dotations aux provisions pour dprciation des lments financiers 68 FR -6868 Autres dotations 68 FR -6871 Dotations aux amortissements exceptionnels des immobilisations 68 FR -6872 Dotations aux provisions rglementes (immobilisations) 68 FR -6873 Dotations aux provisions rglementes (stocks) 68 FR -6874 Dotations aux autres provisions rglementes 68 FR -6875 Dotations aux provisions pour risques et charges exceptionnels 68 FR -6876 Dotations aux provisions pour dprciations exceptionnelles 68 FR -69 participation des salaries - impts sur les benefices et assimiles 6 FR -696 Supplments d'impt sur les socits lis aux distributions 69 FR -698 Intgration fiscale 69 FR -6981 Intgration fiscale - Charges 698 FR -6989 Intgration fiscale - Produits 698 FR -7 comptes de produits 0 FR -70 ventes de produits fabriques, prestations de services, marchandises 7 FR -702 Ventes de produits intermdiaires 70 FR -703 Ventes de produits rsiduels 70 FR -704 Travaux 70 FR -705 Etudes 70 FR -71 production stocke (ou dstockage) 7 FR -7133 Variation des en-cours de production de biens 71 FR -7134 Variation des en-cours de production de services 71 FR -7135 Variation des stocks de produits 71 FR -721 Immobilisations incorporelles 7 FR -722 Immobilisations corporelles 7 FR -731 Produits nets partiels sur oprations en cours ( subdiviser par opration) 7 FR -739 Produits nets partiels sur oprations termines 7 FR -751 Redevances pour concessions, brevets, licences, marques, procds, logiciels, droits et valeurs similaires 7 FR -752 Revenus des immeubles non affects des activits professionnelles 7 FR -758 Produits divers de gestion courante 7 FR -761 Produits de participations 7 FR -762 Produits des autres immobilisations financires 7 FR -763 Revenus des autres crances 7 FR -764 Revenus des valeurs mobilires de placement 7 FR -765 Escomptes obtenus 7 FR -766 Gains de change 7 FR -767 Produits nets sur cessions de valeurs mobilires de placement 7 FR -768 Autres produits financiers 7 FR -771 Produits exceptionnels sur oprations de gestion 7 FR -772 (Compte la disposition des entits pour enregistrer, en cours d'exercice, les produits sur exercices antrieurs) 7 FR -775 Produits des cessions d'lments d'actif 7 FR -777 Quote-part des subventions d'investissement vire au rsultat de l'exercice 7 FR -778 Autres produits exceptionnels 7 FR -78 Reprises sur amortissements et provisions 7 FR -7811 Reprises sur amortissements des immobilisations incorporelles et corporelles 78 FR -7815 Reprises sur provisions pour risques et charges d'exploitation 78 FR -7816 Reprises sur provisions pour dprciation des immobilisations incorporelles et corporelles 78 FR -7817 Reprises sur provisions pour dprciation des actifs circulants 78 FR -7865 Reprises sur provisions pour risques et charges financiers 78 FR -7866 Reprises sur provisions pour dprciation des lments financiers 78 FR -7872 Reprises sur provisions rglementes (immobilisations) 78 FR -7873 Reprises sur provisions rglementes (stocks) 78 FR -7874 Reprises sur autres provisions rglementes 78 FR -7875 Reprises sur provisions pour risques et charges exceptionnels 78 FR -7876 Reprises sur provisions pour dprciations exceptionnelles 78 FR -791 Transferts de charges d'exploitation 7 FR -796 Transferts de charges financires 7 FR -797 Transferts de charges exceptionnelles 7 FR -8 Comptes spciaux 0 FR -80 Engagements hors bilan 8 FR -801 Engagements donns par l'entit 80 FR -8011 Avals, cautions, garanties 801 FR -8014 Effets circulant sous l'endos de l'entit 801 FR -8016 Redevances crdit-bail restant courir 801 FR -80161 Crdit-bail mobilier 8016 FR -80165 Crdit-bail immobilier 8016 FR -8018 Autres engagements donns 801 FR -802 Engagements reus par l'entit 80 FR -8021 Avals, cautions, garanties 802 FR -8024 Crances escomptes non chues 802 FR -8026 Engagements reus pour utilisation en crdit-bail 802 FR -80261 Crdit-bail mobilier 8026 FR -80265 Crdit-bail immobilier 8026 FR -8028 Autres engagements reus 802 FR -809 Contrepartie des engagements 80 FR -8091 Contrepartie 801 809 FR -8092 Contrepartie 802 809 FR -88 Rsultat en instance d'affectation 8 FR -89 Bilan 8 FR -890 Bilan d'ouverture 89 FR -891 Bilan de clture 89 FR -9 Comptes analytiques 0 FR -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/base-perso/fr_plan_base_perso_comptes-defaut.sql b/sources/contrib/comptabilite-francaise/base-perso/fr_plan_base_perso_comptes-defaut.sql deleted file mode 100644 index 51a572f..0000000 --- a/sources/contrib/comptabilite-francaise/base-perso/fr_plan_base_perso_comptes-defaut.sql +++ /dev/null @@ -1,27 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007-09-08 02:49 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: parm_code; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY parm_code (p_code, p_value, p_comment) FROM stdin; -BANQUE 512 Poste comptable par dfaut pour les banques -COMPTE_COURANT 514 Poste comptable par dfaut pour le compte courant -CAISSE 53 Poste comptable par dfaut pour les caisses -CUSTOMER 411 Poste comptable par dfaut pour les clients -VENTE 70 Poste comptable par dfaut pour les ventes -VIREMENT_INTERNE 58 Poste comptable par dfaut pour les virements internes -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/base-perso/fr_plan_base_perso_tva.sql b/sources/contrib/comptabilite-francaise/base-perso/fr_plan_base_perso_tva.sql deleted file mode 100644 index 9a6fb1d..0000000 --- a/sources/contrib/comptabilite-francaise/base-perso/fr_plan_base_perso_tva.sql +++ /dev/null @@ -1,44 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007/10/23 22:23 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tva_rate; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) FROM stdin; -101 TVAFranceNormal 0.196 TVA 19,6% - France mtropolitaine - Taux normal 4456,4457 -102 TVAFranceRduit 0.055 TVA 5,5% - France mtropolitaine - Taux rduit 4456,4457 -103 TVAFranceSuperRduit 0.021 TVA 2,1% - France mtropolitaine - Taux super rduit 4456,4457 -104 TVAFranceImmos 0.196 TVA 19,6% - France mtropolitaine - Taux immobilisations 4456,4457 -105 TVAFranceAnciens 0 TVA x% - France mtropolitaine - Taux anciens 4456,4457 -201 TVADomNormal 0.085 TVA 8,5% - DOM - Taux normal 4456,4457 -202 TVADomNPR 0.085 TVA 8,5% - DOM - Taux normal NPR 4456,4457 -203 TVADomRduit 0.021 TVA 2,1% - DOM - Taux rduit 4456,4457 -204 TVADom-I 0.0175 TVA 1,75% - DOM - Taux I 4456,4457 -205 TVADomPresse 0.0105 TVA 1,05% - DOM - Taux publications de presse 4456,4457 -206 TVADomOctroi 0 TVA x% - DOM - Taux octroi de mer 4456,4457 -207 TVADomImmos 0 TVA x% - DOM - Taux immobilisations 4456,4457 -301 TVACorse-I 0.13 TVA 13% - Corse - Taux I 4456,4457 -302 TVACorse-II 0.08 TVA 8% - Corse - Taux II 4456,4457 -303 TVACorse-III 0.021 TVA 2,1% - Corse - Taux III 4456,4457 -304 TVACorse-IV 0.009 TVA 0,9% - Corse - Taux IV 4456,4457 -305 TVACorseImmos 0 TVA x% - Corse - Taux immobilisations 4456,4457 -401 TVAacquisIntracom 0 TVA x% - Acquisitions intracommunautaires/Pays 4456,4457 -402 TVAacquisIntracomImmos 0 TVA x% - Acquisitions intracommunautaires immobilisations/Pays 4456,4457 -501 TVAfranchise 0 TVA x% - Non imposable : Achats en franchise -502 TVAexport 0 TVA x% - Non imposable : Exports hors CE/Pays -503 TVAautres 0 TVA x% - Non imposable : Autres oprations -504 TVAlivrIntracom 0 TVA x% - Non imposable : Livraisons intracommunautaires/Pays -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/base-strict/fr_plan_base.sql b/sources/contrib/comptabilite-francaise/base-strict/fr_plan_base.sql deleted file mode 100644 index 24ed450..0000000 --- a/sources/contrib/comptabilite-francaise/base-strict/fr_plan_base.sql +++ /dev/null @@ -1,397 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007-09-08 01:10 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tmp_pcmn; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_country) FROM stdin; -1 comptes de capitaux 0 FR -10 capital et rserves 1 FR -104 Primes lies au capital social 10 FR -106 Rserves 10 FR -1062 Rserves indisponibles 106 FR -107 Ecart d'quivalence 10 FR -109 Actionnaires: Capital souscrit - non appel 10 FR -11 report a nouveau (solde crditeur ou dbiteur) 1 FR -13 subventions d'investissement 1 FR -131 Subventions d'quipement 13 FR -138 Autres subventions d'investissement (mme ventilation que celle du compte 131) 13 FR -139 Subventions d'investissement inscrites au compte de rsultat 13 FR -1391 Subventions d'quipement 139 FR -1398 Autres subventions d'investissement (mme ventilation que celle du compte 1391) 139 FR -14 provisions reglementees 1 FR -142 Provisions rglementes relatives aux immobilisations 14 FR -143 Provisions rglementes relatives aux stocks 14 FR -144 Provisions rglementes relatives aux autres lments de l'actif 14 FR -151 Provisions pour risques 1 FR -153 Provisions pour pensions et obligations similaires 1 FR -155 Provisions pour impts 1 FR -156 Provisions pour renouvellement des immobilisations (entreprises concessionnaires) 1 FR -157 Provisions pour charges rpartir sur plusieurs exercices 1 FR -158 Autres provisions pour charges 1 FR -161 Emprunts obligataires convertibles 1 FR -163 Autres emprunts obligataires 1 FR -164 Emprunts auprs des tablissements de crdit 1 FR -165 Dpts et cautionnements reus 1 FR -166 Participation des salaris aux rsultats 1 FR -167 Emprunts et dettes assortis de conditions particulires 1 FR -1671 Emissions de titres participatifs 167 FR -1674 Avances conditionnes de l'Etat 167 FR -1675 Emprunts participatifs 167 FR -168 Autres emprunts et dettes assimiles 1 FR -169 Primes de remboursement des obligations 1 FR -17 dettes rattaches a des participations 1 FR -171 Dettes rattaches des participations (groupe) 17 FR -174 Dettes rattaches des participations (hors groupe) 17 FR -178 Dettes rattaches des socits en participation 17 FR -18 comptes de liaison des tablissements et societes en participation 1 FR -2 comptes d'immobilisations 0 FR -203 Frais de recherche et de dveloppement 2 FR -205 Concessions et droits similaires, brevets, licences, marques, procds, logiciels, droits et valeurs similaires 2 FR -211 Terrains 2 FR -2111 Terrains nus 211 FR -2112 Terrains amnags 211 FR -2113 Sous-sols et sur-sols 211 FR -2114 Terrains de gisement 211 FR -2115 Terrains btis 211 FR -2116 Compte d'ordre sur immobilisations (art. 6 du dcret n 78-737 du 11 juillet 1978) 211 FR -212 Agencements et amnagements de terrains (mme ventilation que celle du compte 211) 2 FR -213 Constructions 2 FR -2131 Btiments 213 FR -2135 Installations gnrales - agencements - amnagements des constructions (mme ventilation que celle du compte 2131) 213 FR -2138 Ouvrages d'infrastructure 213 FR -214 Constructions sur sol d'autrui (mme ventilation que celle du compte 213) 2 FR -215 Installations techniques, matriels et outillage industriels 2 FR -2151 Installations complexes spcialises 215 FR -2153 Installations caractre spcifique 215 FR -2154 Matriel industriel 215 FR -2155 Outillage industriel 215 FR -2157 Agencements et amnagements du matriel et outillage industriels 215 FR -218 Autres immobilisations corporelles 2 FR -2181 Installations gnrales, agencements, amnagements divers 218 FR -2182 Matriel de transport 218 FR -2183 Matriel de bureau et matriel informatique 218 FR -2184 Mobilier 218 FR -2185 Cheptel 218 FR -2186 Emballages rcuprables 218 FR -22 immobilisations mises en concession 2 FR -231 Immobilisations corporelles en cours 2 FR -232 Immobilisations incorporelles en cours 2 FR -237 Avances et acomptes verss sur immobilisations incorporelles 2 FR -238 Avances et acomptes verss sur commandes d'immobilisations corporelles 2 FR -25 Parts dans des entreprises lies et crances sur des entreprises lies 2 FR -26 Participations et crances rattaches des participations 2 FR -261 Titres de participation 26 FR -266 Autres formes de participation 26 FR -267 Crances rattaches des participations 26 FR -268 Crances rattaches des socits en participation 26 FR -269 Versements restant effectuer sur titres de participation non librs 26 FR -271 Titres immobiliss autres que les titres immobiliss de l'activit de portefeuille (droit de proprit) 2 FR -272 Titres immobiliss (droit de crance) 2 FR -273 Titres immobiliss de l'activit de portefeuille 2 FR -274 Prts 2 FR -275 Dpts et cautionnements verss 2 FR -276 Autres crances immobilises 2 FR -277 (Actions propres ou parts propres) 2 FR -279 Versements restant effectuer sur titres immobiliss non librs 2 FR -28 amortissements des immobilisations 2 FR -2801 Frais d'tablissement (mme ventilation que celle du compte 201) 28 FR -2803 Frais de recherche et de dveloppement 28 FR -2805 Concessions et droits similaires, brevets, licences, logiciels, droits et valeurs similaires 28 FR -2807 Fonds commercial 28 FR -2808 Autres immobilisations incorporelles 28 FR -2811 Terrains de gisement 28 FR -2812 Agencements, amnagements de terrains (mme ventilation que celle du compte 212) 2 FR -2813 Constructions (mme ventilation que celle du compte 213) 2 FR -2814 Constructions sur sol d'autrui (mme ventilation que celle du compte 214) 2 FR -2815 Installations, matriel et outillage industriels (mme ventilation que celle du compte 215) 2 FR -2818 Autres immobilisations corporelles (mme ventilation que celle du compte 218) 2 FR -282 Amortissements des immobilisations mises en concession 28 FR -29 provisions pour dprciation des immobilisations 2 FR -2905 Marques, procds, droits et valeurs similaires 29 FR -2906 Droit au bail 29 FR -2907 Fonds commercial 29 FR -2908 Autres immobilisations incorporelles 29 FR -2911 Terrains (autres que terrains de gisement) 29 FR -292 Provisions pour dprciation des immobilisations mises en concession 29 FR -293 Provisions pour dprciation des immobilisations en cours 29 FR -2931 Immobilisations corporelles en cours 293 FR -2932 Immobilisations incorporelles en cours 293 FR -296 Provisions pour dprciation des participations et crances rattaches des participations 29 FR -2961 Titres de participation 296 FR -2966 Autres formes de participation 296 FR -2967 Crances rattaches des participations (mme ventilation que celle du compte 267) 26 FR -2968 Crances rattaches des socits en participation (mme ventilation que celle du compte 268) 26 FR -2971 Titres immobiliss autres que les titres immobiliss de l'activit de portefeuille -droit de proprit (mme ventilation que celle du compte 271) 2 FR -2972 Titres immobiliss - droit de crance (mme ventilation que celle du compte 272) 2 FR -2973 Titres immobiliss de l'activit de portefeuille 29 FR -2974 Prts (mme ventilation que celle du compte 274) 2 FR -2975 Dpts et cautionnements verss (mme ventilation que celle du compte 275) 2 FR -2976 Autres crances immobilises (mme ventilation que celle du compte 276) 2 FR -3 comptes de stocks et en cours 0 FR -321 Matires consommables 3 FR -322 Fournitures consommables 3 FR -326 Emballages 3 FR -331 Produits en cours 3 FR -335 Travaux en cours 3 FR -341 Etudes en cours 3 FR -345 Prestations de services en cours 3 FR -351 Produits intermdiaires 3 FR -355 Produits finis 3 FR -358 Produits rsiduels (ou matires de rcupration) 3 FR -36 (compte ouvrir, le cas chant, sous l'intitul "stocks provenant d'immobilisations") 3 FR -38 (lorsque l'entit tient un inventaire permanent en comptabilit gnrale, le compte 38 peut tre utilis pour comptabiliser les stocks en voie d'acheminement, mis en dpt ou donns en consignation) 3 FR -39 provisions pour dprciation des stocks et en-cours 3 FR -4 comptes de tiers 0 FR -40 fournisseurs et comptes rattaches 4 FR -401 Fournisseurs 40 FR -403 Fournisseurs - Effets payer 40 FR -404 Fournisseurs d'immobilisations 40 FR -405 Fournisseurs d'immobilisations - Effets payer 40 FR -408 Fournisseurs - Factures non parvenues 40 FR -4091 Fournisseurs - Avances et acomptes verss sur commandes 40 FR -4096 Fournisseurs - Crances pour emballages et matriel rendre 40 FR -4097 Fournisseurs - Autres avoirs 40 FR -4098 Rabais, remises, ristournes obtenir et autres avoirs non encore reus 40 FR -41 clients et comptes rattaches 4 FR -411 Clients 41 FR -413 Clients - Effets recevoir 41 FR -416 Clients douteux ou litigieux 41 FR -417 "Crances" sur travaux non encore facturables 41 FR -418 Clients - Produits non encore facturs 41 FR -4191 Clients - Avances et acomptes reus sur commandes 41 FR -4196 Clients - Dettes sur emballages et matriels consigns 41 FR -4197 Clients - Autres avoirs 41 FR -4198 Rabais, remises, ristournes accorder et autres avoirs tablir 41 FR -42 Personnel et comptes rattaches 4 FR -422 Comits d'entreprises, d'tablissement,... 42 FR -424 Participation des salaris aux rsultats 42 FR -425 Personnel - Avances et acomptes 42 FR -426 Personnel - Dpts 42 FR -427 Personnel - Oppositions 42 FR -431 Scurit sociale 4 FR -437 Autres organismes sociaux 4 FR -438 Organismes sociaux - Charges payer et produits recevoir 4 FR -44 tat et autres collectivits publiques 4 FR -441 tat - Subventions recevoir 44 FR -442 Etat - Impts et taxes recouvrables sur des tiers 44 FR -443 Oprations particulires avec l'Etat les collectivits publiques, les organismes internationaux 44 FR -4431 Crances sur l'Etat rsultant de la suppression de la rgle du dcalage d'un mois en matire de T.V.A. 443 FR -4438 Intrts courus sur crances figurant au 4431 443 FR -4452 T.V.A. due intracommunautaire 44 FR -4455 Taxes sur le chiffre d'affaires dcaisser 44 FR -4456 Taxes sur le chiffre d'affaires dductibles 44 FR -4457 Taxes sur le chiffre d'affaires collectes par l'entreprise 44 FR -4458 Taxes sur le chiffre d'affaires rgulariser ou en attente 44 FR -446 Obligations cautionnes 44 FR -448 Etat - Charges payer et produits recevoir 44 FR -451 Groupe 4 FR -456 Associs - Oprations sur le capital 4 FR -457 Associs - Dividendes payer 4 FR -458 Associs - Oprations faites en commun et en G.I.E. 4 FR -471 Comptes d'attente 4 FR -472 Comptes d'attente 4 FR -473 Comptes d'attente 4 FR -474 Comptes d'attente 4 FR -475 Comptes d'attente 4 FR -476 Diffrence de conversion - Actif 4 FR -477 Diffrences de conversion - Passif 4 FR -478 Autres comptes transitoires 4 FR -48 comptes de rgularisation 4 FR -4811 Charges diffres 48 FR -4812 Frais d'acquisition des immobilisations 48 FR -4816 Frais d'mission des emprunts 48 FR -4818 Charges taler 48 FR -488 Comptes de rpartition priodique des charges et des produits 48 FR -49 provisions pour dprciation des comptes de tiers 4 FR -495 Provisions pour dprciation des comptes du groupe et des associs 49 FR -4951 Comptes du groupe 495 FR -4955 Comptes courants des associs 495 FR -4958 Oprations faites en commun et en G.I.E. 495 FR -5 comptes financiers 0 FR -501 Parts dans des entreprises lies 5 FR -502 Actions propres 5 FR -503 Actions 5 FR -504 Autres titres confrant un droit de proprit 5 FR -505 Obligations et bons mis par la socit et rachets par elle 5 FR -506 Obligations 5 FR -507 Bons du Trsor et bons de caisse court terme 5 FR -508 Autres valeurs mobilires de placement et autres crances assimiles 5 FR -509 Versements restant effectuer sur valeurs mobilires de placement non libres 5 FR -511 Valeurs l'encaissement 5 FR -512 Banques 5 FR -514 Chques postaux 5 FR -515 "Caisses" du Trsor et des tablissements publics 5 FR -516 Socits de bourse 5 FR -517 Autres organismes financiers 5 FR -518 Intrts courus 5 FR -519 Concours bancaires courants 5 FR -52 Instruments de trsorerie 5 FR -59 provisions pour dprciation des comptes financiers 5 FR -5903 Actions 59 FR -5904 Autres titres confrant un droit de proprit 59 FR -5906 Obligations 59 FR -5908 Autres valeurs mobilires de placement et crances assimiles 59 FR -6 comptes de charges 0 FR -601 Achats stocks - Matires premires (et fournitures) 6 FR -602 Achats stocks - Autres approvisionnements 6 FR -6021 Matires consommables 602 FR -6022 Fournitures consommables 602 FR -6026 Emballages 602 FR -604 Achats d'tudes et prestations de services 6 FR -605 Achats de matriel, quipements et travaux 6 FR -606 Achats non stocks de matire et fournitures 6 FR -607 Achats de marchandises 6 FR -608 (Compte rserv, le cas chant, la rcapitulation des frais accessoires incorpors aux achats) 6 FR -609 Rabais, remises et ristournes obtenus sur achats 6 FR -6031 Variation des stocks de matires premires (et fournitures) 6 FR -6032 Variation des stocks des autres approvisionnements 6 FR -6037 Variation des stocks de marchandises 6 FR -61 autres charges externes - Services extrieurs 6 FR -611 Sous-traitance gnrale 61 FR -612 Redevances de crdit-bail 61 FR -6122 Crdit-bail mobilier 612 FR -6125 Crdit-bail immobilier 612 FR -613 Locations 61 FR -614 Charges locatives et de coproprit 61 FR -615 Entretien et rparations 61 FR -616 Primes d'assurances 61 FR -617 Etudes et recherches 61 FR -618 Divers 61 FR -619 Rabais, remises et ristournes obtenus sur services extrieurs 61 FR -62 autres charges externes - Autres services extrieurs 6 FR -621 Personnel extrieur l'entreprise 62 FR -622 Rmunrations d'intermdiaires et honoraires 62 FR -623 Publicit, publications, relations publiques 62 FR -624 Transports de biens et transports collectifs du personnel 62 FR -625 Dplacements, missions et rceptions 62 FR -626 Frais postaux et de tlcommunications 62 FR -627 Services bancaires et assimils 62 FR -628 Divers 62 FR -629 Rabais, remises et ristournes obtenus sur autres services extrieurs 62 FR -631 Impts, taxes et versements assimils sur rmunrations (administrations des impts) 6 FR -633 Impts, taxes et versements assimils sur rmunrations (autres organismes) 6 FR -635 Autres impts, taxes et versements assimils (administrations des impts) 6 FR -637 Autres impts, taxes et versements assimils (autres organismes) 6 FR -64 Charges de personnel 6 FR -647 Autres charges sociales 64 FR -648 Autres charges de personnel 64 FR -651 Redevances pour concessions, brevets, licences, marques, procds, logiciels, droits et valeurs similaires 6 FR -653 Jetons de prsence 6 FR -654 Pertes sur crances irrcouvrables 6 FR -655 Quotes-parts de rsultat sur oprations faites en commun 6 FR -658 Charges diverses de gestion courante 6 FR -661 Charges d'intrts 6 FR -664 Pertes sur crances lies des participations 6 FR -665 Escomptes accords 6 FR -666 Pertes de change 6 FR -667 Charges nettes sur cessions de valeurs mobilires de placement 6 FR -668 Autres charges financires 6 FR -671 Charges exceptionnelles sur oprations de gestion 6 FR -672 (Compte la disposition des entits pour enregistrer, en cours d'exercice, les charges sur exercices antrieurs) 6 FR -675 Valeurs comptables des lments d'actif cds 6 FR -678 Autres charges exceptionnelles 6 FR -68 Dotations aux amortissements et aux provisions 6 FR -6811 Dotations aux amortissements sur immobilisations incorporelles et corporelles 68 FR -6812 Dotations aux amortissements des charges d'exploitation rpartir 68 FR -6815 Dotations aux provisions pour risques et charges d'exploitation 68 FR -6816 Dotations aux provisions pour dprciation des immobilisations incorporelles et corporelles 68 FR -6817 Dotations aux provisions pour dprciation des actifs circulants 68 FR -6861 Dotations aux amortissements des primes de remboursement des obligations 68 FR -6865 Dotations aux provisions pour risques et charges financiers 68 FR -6866 Dotations aux provisions pour dprciation des lments financiers 68 FR -6868 Autres dotations 68 FR -6871 Dotations aux amortissements exceptionnels des immobilisations 68 FR -6872 Dotations aux provisions rglementes (immobilisations) 68 FR -6873 Dotations aux provisions rglementes (stocks) 68 FR -6874 Dotations aux autres provisions rglementes 68 FR -6875 Dotations aux provisions pour risques et charges exceptionnels 68 FR -6876 Dotations aux provisions pour dprciations exceptionnelles 68 FR -69 participation des salaries - impts sur les benefices et assimiles 6 FR -696 Supplments d'impt sur les socits lis aux distributions 69 FR -698 Intgration fiscale 69 FR -6981 Intgration fiscale - Charges 698 FR -6989 Intgration fiscale - Produits 698 FR -7 comptes de produits 0 FR -70 ventes de produits fabriques, prestations de services, marchandises 7 FR -702 Ventes de produits intermdiaires 70 FR -703 Ventes de produits rsiduels 70 FR -704 Travaux 70 FR -705 Etudes 70 FR -71 production stocke (ou dstockage) 7 FR -7133 Variation des en-cours de production de biens 71 FR -7134 Variation des en-cours de production de services 71 FR -7135 Variation des stocks de produits 71 FR -721 Immobilisations incorporelles 7 FR -722 Immobilisations corporelles 7 FR -731 Produits nets partiels sur oprations en cours ( subdiviser par opration) 7 FR -739 Produits nets partiels sur oprations termines 7 FR -751 Redevances pour concessions, brevets, licences, marques, procds, logiciels, droits et valeurs similaires 7 FR -752 Revenus des immeubles non affects des activits professionnelles 7 FR -758 Produits divers de gestion courante 7 FR -761 Produits de participations 7 FR -762 Produits des autres immobilisations financires 7 FR -763 Revenus des autres crances 7 FR -764 Revenus des valeurs mobilires de placement 7 FR -765 Escomptes obtenus 7 FR -766 Gains de change 7 FR -767 Produits nets sur cessions de valeurs mobilires de placement 7 FR -768 Autres produits financiers 7 FR -771 Produits exceptionnels sur oprations de gestion 7 FR -772 (Compte la disposition des entits pour enregistrer, en cours d'exercice, les produits sur exercices antrieurs) 7 FR -775 Produits des cessions d'lments d'actif 7 FR -777 Quote-part des subventions d'investissement vire au rsultat de l'exercice 7 FR -778 Autres produits exceptionnels 7 FR -78 Reprises sur amortissements et provisions 7 FR -7811 Reprises sur amortissements des immobilisations incorporelles et corporelles 78 FR -7815 Reprises sur provisions pour risques et charges d'exploitation 78 FR -7816 Reprises sur provisions pour dprciation des immobilisations incorporelles et corporelles 78 FR -7817 Reprises sur provisions pour dprciation des actifs circulants 78 FR -7865 Reprises sur provisions pour risques et charges financiers 78 FR -7866 Reprises sur provisions pour dprciation des lments financiers 78 FR -7872 Reprises sur provisions rglementes (immobilisations) 78 FR -7873 Reprises sur provisions rglementes (stocks) 78 FR -7874 Reprises sur autres provisions rglementes 78 FR -7875 Reprises sur provisions pour risques et charges exceptionnels 78 FR -7876 Reprises sur provisions pour dprciations exceptionnelles 78 FR -791 Transferts de charges d'exploitation 7 FR -796 Transferts de charges financires 7 FR -797 Transferts de charges exceptionnelles 7 FR -8 Comptes spciaux 0 FR -80 Engagements hors bilan 8 FR -801 Engagements donns par l'entit 80 FR -8011 Avals, cautions, garanties 801 FR -8014 Effets circulant sous l'endos de l'entit 801 FR -8016 Redevances crdit-bail restant courir 801 FR -80161 Crdit-bail mobilier 8016 FR -80165 Crdit-bail immobilier 8016 FR -8018 Autres engagements donns 801 FR -802 Engagements reus par l'entit 80 FR -8021 Avals, cautions, garanties 802 FR -8024 Crances escomptes non chues 802 FR -8026 Engagements reus pour utilisation en crdit-bail 802 FR -80261 Crdit-bail mobilier 8026 FR -80265 Crdit-bail immobilier 8026 FR -8028 Autres engagements reus 802 FR -809 Contrepartie des engagements 80 FR -8091 Contrepartie 801 809 FR -8092 Contrepartie 802 809 FR -88 Rsultat en instance d'affectation 8 FR -89 Bilan 8 FR -890 Bilan d'ouverture 89 FR -891 Bilan de clture 89 FR -9 Comptes analytiques 0 FR -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/base-strict/fr_plan_base_tva.sql b/sources/contrib/comptabilite-francaise/base-strict/fr_plan_base_tva.sql deleted file mode 100644 index 9a6fb1d..0000000 --- a/sources/contrib/comptabilite-francaise/base-strict/fr_plan_base_tva.sql +++ /dev/null @@ -1,44 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007/10/23 22:23 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tva_rate; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) FROM stdin; -101 TVAFranceNormal 0.196 TVA 19,6% - France mtropolitaine - Taux normal 4456,4457 -102 TVAFranceRduit 0.055 TVA 5,5% - France mtropolitaine - Taux rduit 4456,4457 -103 TVAFranceSuperRduit 0.021 TVA 2,1% - France mtropolitaine - Taux super rduit 4456,4457 -104 TVAFranceImmos 0.196 TVA 19,6% - France mtropolitaine - Taux immobilisations 4456,4457 -105 TVAFranceAnciens 0 TVA x% - France mtropolitaine - Taux anciens 4456,4457 -201 TVADomNormal 0.085 TVA 8,5% - DOM - Taux normal 4456,4457 -202 TVADomNPR 0.085 TVA 8,5% - DOM - Taux normal NPR 4456,4457 -203 TVADomRduit 0.021 TVA 2,1% - DOM - Taux rduit 4456,4457 -204 TVADom-I 0.0175 TVA 1,75% - DOM - Taux I 4456,4457 -205 TVADomPresse 0.0105 TVA 1,05% - DOM - Taux publications de presse 4456,4457 -206 TVADomOctroi 0 TVA x% - DOM - Taux octroi de mer 4456,4457 -207 TVADomImmos 0 TVA x% - DOM - Taux immobilisations 4456,4457 -301 TVACorse-I 0.13 TVA 13% - Corse - Taux I 4456,4457 -302 TVACorse-II 0.08 TVA 8% - Corse - Taux II 4456,4457 -303 TVACorse-III 0.021 TVA 2,1% - Corse - Taux III 4456,4457 -304 TVACorse-IV 0.009 TVA 0,9% - Corse - Taux IV 4456,4457 -305 TVACorseImmos 0 TVA x% - Corse - Taux immobilisations 4456,4457 -401 TVAacquisIntracom 0 TVA x% - Acquisitions intracommunautaires/Pays 4456,4457 -402 TVAacquisIntracomImmos 0 TVA x% - Acquisitions intracommunautaires immobilisations/Pays 4456,4457 -501 TVAfranchise 0 TVA x% - Non imposable : Achats en franchise -502 TVAexport 0 TVA x% - Non imposable : Exports hors CE/Pays -503 TVAautres 0 TVA x% - Non imposable : Autres oprations -504 TVAlivrIntracom 0 TVA x% - Non imposable : Livraisons intracommunautaires/Pays -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/copropriete/fr_plan_syndiccoprop.sql b/sources/contrib/comptabilite-francaise/copropriete/fr_plan_syndiccoprop.sql deleted file mode 100644 index 0dd612d..0000000 --- a/sources/contrib/comptabilite-francaise/copropriete/fr_plan_syndiccoprop.sql +++ /dev/null @@ -1,133 +0,0 @@ --- --- PostgreSQL database dump --- Version 2008/02/10 09:19 --- - --- --- Name: TABLE tmp_pcmn; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON TABLE tmp_pcmn IS 'Plan comptable - Syndicat des copropritaires : strict'; - --- --- Data for Name: tmp_pcmn; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent) FROM stdin; -1 Classe 1 - Provisions, avances, subventions et emprunts 0 -10 Provisions et avances : 1 -102 Provisions pour travaux dcids 10 -103 Avances 10 -1031 Avances de trsorerie 103 -1032 Avances travaux au titre de l'article 18, 6e alina de la loi susvise 103 -1033 Autres avances 103 -12 Solde en attente sur travaux et oprations exceptionnelles 1 -13 Subventions : 1 -131 Subventions accordes en instance de versement 13 -4 Classe 4 - Copropritaires et tiers 0 -40 Fournisseurs : 4 -401 Factures parvenues 40 -408 Factures non parvenues 40 -409 Fournisseurs dbiteurs 40 -42 Personnel : 4 -421 Rmunrations dues 42 -43 Scurit sociale et autres organismes sociaux : 4 -431 Scurit sociale 43 -432 Autres organismes sociaux 43 -44 Etat et collectivits territoriales : 4 -441 Etat et autres organismes - subventions recevoir 44 -442 Etat - impts et versements assimils 44 -443 Collectivits territoriales - aides 44 -45 Collectivit des copropritaires : 4 -450 Copropritaire individualis 45 -4501 Sur dcision AG : Copropritaire - budget prvisionnel 450 -4502 Sur dcision AG : Copropritaire - travaux de l'article 14-2 de la loi susvise et oprations exceptionnelles 450 -4503 Sur dcision AG : Copropritaire - avances 450 -4504 Sur dcision AG : Copropritaire - emprunts 450 -459 Copropritaire - crances douteuses 45 -46 Dbiteurs et crditeurs divers : 4 -461 Dbiteurs divers 46 -462 Crditeurs divers 46 -47 Compte d'attente : 4 -471 Compte en attente d'imputation dbiteur 47 -472 Compte en attente d'imputation crditeur 47 -48 Compte de rgularisation : 4 -486 Charges payes d'avance 48 -487 Produits encaisss d'avance 48 -49 Dprciation des comptes de tiers : 4 -491 Copropritaires 49 -492 Personnes autres que les copropritaires 49 -5 Classe 5 - Comptes financiers 0 -50 Fonds placs : 5 -501 Compte terme 50 -502 Autre compte 50 -51 Banques, ou fonds disponibles en banque pour le syndicat : 5 -512 Banques 51 -514 Chques postaux 51 -53 Caisse. 5 -6 Classe 6 - Comptes de charges 0 -60 Achats de matires et fournitures : 6 -601 Eau 60 -602 Electrici 60 -603 Chauffage, nergie et combustibles 60 -604 Achats produits d'entretien et petits quipements 60 -605 Matriel 60 -606 Fournitures 60 -61 Services extrieurs : 6 -611 Nettoyage des locaux 5 -612 Locations immobilires 61 -613 Locations mobilires 61 -614 Contrats de maintenance 61 -615 Entretien et petites rparations 61 -616 Primes d'assurances 61 -62 Frais d'administration et honoraires : 6 -621 Rmunrations du syndic sur gestion coproprit 62 -6211 Rmunration du syndic 621 -6212 Dbours 621 -6213 Frais postaux 621 -622 Autres honoraires du syndic 62 -6221 Honoraires travaux 622 -6222 Prestations particulires 622 -6223 Autres honoraires 622 -623 Rmunrations de tiers intervenants 62 -624 Frais du conseil syndical 62 -63 Impts - taxes et versements assimils : 6 -632 Taxe de balayage 63 -633 Taxe foncire 63 -634 Autres impts et taxes 63 -64 Frais de personnel : 6 -641 Salaires 64 -642 Charges sociales et organismes sociaux 64 -643 Taxe sur les salaires 64 -644 Autres (mdecine du travail, mutuelles, etc.) 64 -66 Charges financires des emprunts, agios ou autres : 6 -661 Remboursement d'annuits d'emprunt 66 -662 Autres charges financires et agios 66 -67 Charges pour travaux et oprations exceptionnelles : 6 -671 Travaux dcids par l'assemble gnrale 67 -672 Travaux urgents 67 -673 Etudes techniques, diagnostic, consultation 67 -677 Pertes sur crances irrcouvrables 67 -678 Charges exceptionnelles 67 -68 Dotations aux dprciations sur crances douteuses. 6 -7 Classe 7 - Comptes de produits 0 -70 Appels de fonds : 7 -701 Provisions sur oprations courantes 70 -702 Provisions sur travaux de l'article 14-2 et oprations exceptionnelles 70 -703 Avances 70 -704 Remboursements d'annuits d'emprunts 70 -71 Autres produits : 7 -711 Subventions 71 -712 Emprunts 71 -713 Indemnits d'assurances 71 -714 Produits divers (dont intrts lgaux dus par les copropritaires) 71 -716 Produits financiers 71 -718 Produits exceptionnels 71 -78 Reprises de dprciations sur crances douteuses. 7 -8 Comptes spciaux 0 -9 Comptes analytique 0 -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/developpe-perso/fr_plan_developpe_perso.sql b/sources/contrib/comptabilite-francaise/developpe-perso/fr_plan_developpe_perso.sql deleted file mode 100644 index 72f9beb..0000000 --- a/sources/contrib/comptabilite-francaise/developpe-perso/fr_plan_developpe_perso.sql +++ /dev/null @@ -1,911 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007-09-08 01:10 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tmp_pcmn; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_country) FROM stdin; -1 comptes de capitaux 0 FR -10 capital et rserves 1 FR -1011 Capital souscrit - non appel 10 FR -1012 Capital souscrit - appel, non vers 10 FR -1013 Capital souscrit - appel, vers 10 FR -10131 Capital non amorti 1013 FR -10132 Capital amorti 1013 FR -1018 Capital souscrit soumis des rglementations particulires 10 FR -104 Primes lies au capital social 10 FR -1041 Primes d'mission 104 FR -1042 Primes de fusion 104 FR -1043 Primes d'apport 104 FR -1044 Primes de conversion d'obligations en actions 104 FR -1045 Bons de souscription d'actions 104 FR -1051 Rserve spciale de rvaluation 10 FR -1052 Ecart de rvaluation libre 10 FR -1053 Rserve de rvaluation 10 FR -1055 Ecarts de ravaluation (autres oprations lgales) 10 FR -1057 Autres carts de rvaluation en France 10 FR -1058 Autres carts de rvaluation l'Etranger 10 FR -106 Rserves 10 FR -10611 Rserve lgale proprement dite 106 FR -10612 Plus-values nettes long terme 106 FR -1062 Rserves indisponibles 106 FR -10641 Plus-values nettes long terme 106 FR -10643 Rserves conscutives l'octroi de subventions d'investissement 106 FR -10648 Autres rserves rglementes 106 FR -10681 Rserve de propre assureur 106 FR -10688 Rserves diverses 106 FR -107 Ecart d'quivalence 10 FR -109 Actionnaires: Capital souscrit - non appel 10 FR -11 report a nouveau (solde crditeur ou dbiteur) 1 FR -110 Report nouveau (solde crditeur) 11 FR -119 Report nouveau (solde dbiteur) 11 FR -120 Rsultat de l'exercice (bnfice) 1 FR -129 Rsultat de l'exercice (perte) 1 FR -13 subventions d'investissement 1 FR -131 Subventions d'quipement 13 FR -1311 Etat 131 FR -1312 Rgions 131 FR -1313 Dpartements 131 FR -1314 Communes 131 FR -1315 Collectivits publiques 131 FR -1316 Entreprises publiques 131 FR -1317 Entreprises et organismes privs 131 FR -1318 Autres 131 FR -138 Autres subventions d'investissement (mme ventilation que celle du compte 131) 13 FR -139 Subventions d'investissement inscrites au compte de rsultat 13 FR -1391 Subventions d'quipement 139 FR -13911 Etat 1391 FR -13912 Rgions 1391 FR -13913 Dpartements 1391 FR -13914 Communes 1391 FR -13915 Collectivits publiques 1391 FR -13916 Entreprises publiques 1391 FR -13917 Entreprises et organismes privs 1391 FR -13918 Autres 1391 FR -1398 Autres subventions d'investissement (mme ventilation que celle du compte 1391) 139 FR -14 provisions reglementees 1 FR -142 Provisions rglementes relatives aux immobilisations 14 FR -1423 Provisions pour reconstitution des gisements miniers et ptroliers 142 FR -1424 Provisions pour investissement (participation des salaris) 142 FR -143 Provisions rglementes relatives aux stocks 14 FR -1431 Hausse des prix 143 FR -1432 Fluctuation des cours 143 FR -144 Provisions rglementes relatives aux autres lments de l'actif 14 FR -151 Provisions pour risques 1 FR -1511 Provisions pour litiges 151 FR -1512 Provisions pour garanties donnes aux clients 151 FR -1513 Provisions pour pertes sur marchs terme 151 FR -1514 Provisions pour amendes et pnalits 151 FR -1515 Provisions pour pertes de change 151 FR -1518 Autres provisions pour risques 151 FR -153 Provisions pour pensions et obligations similaires 1 FR -155 Provisions pour impts 1 FR -156 Provisions pour renouvellement des immobilisations (entreprises concessionnaires) 1 FR -157 Provisions pour charges rpartir sur plusieurs exercices 1 FR -1572 Provisions pour grosses rparations 157 FR -158 Autres provisions pour charges 1 FR -1582 Provisions pour charges sociales et fiscales sur congs payer 158 FR -161 Emprunts obligataires convertibles 1 FR -163 Autres emprunts obligataires 1 FR -164 Emprunts auprs des tablissements de crdit 1 FR -165 Dpts et cautionnements reus 1 FR -1651 Dpts 165 FR -1655 Cautionnements 165 FR -166 Participation des salaris aux rsultats 1 FR -1661 Comptes bloqus 166 FR -1662 Fonds de participation 166 FR -167 Emprunts et dettes assortis de conditions particulires 1 FR -1671 Emissions de titres participatifs 167 FR -1674 Avances conditionnes de l'Etat 167 FR -1675 Emprunts participatifs 167 FR -168 Autres emprunts et dettes assimiles 1 FR -1681 Autres emprunts 168 FR -1685 Rentes viagres capitalises 168 FR -1687 Autres dettes 168 FR -1688 Intrts courus 168 FR -16881 Sur emprunts obligataires convertibles 168 FR -16883 Sur autres emprunts obligataires 168 FR -16884 Sur emprunts auprs des tablissements de crdit 168 FR -16885 Sur dpts et cautionnements reus 168 FR -16886 Sur participation des salaris aux rsultats 168 FR -16887 Sur emprunts et dettes assortis de conditions particulires 168 FR -16888 Sur autres emprunts et dettes assimiles 168 FR -169 Primes de remboursement des obligations 1 FR -17 dettes rattaches a des participations 1 FR -171 Dettes rattaches des participations (groupe) 17 FR -174 Dettes rattaches des participations (hors groupe) 17 FR -178 Dettes rattaches des socits en participation 17 FR -1781 Principal 178 FR -1788 Intrts courus 178 FR -18 comptes de liaison des tablissements et societes en participation 1 FR -181 Comptes de liaison des tablissements 18 FR -186 Biens et prestations de services changs entre tablissements (charges) 18 FR -187 Biens et prestations de services changs entre tablissements (produits) 18 FR -188 Comptes de liaison des socits en participation 18 FR -2 comptes d'immobilisations 0 FR -2011 Frais de constitution 2 FR -2012 Frais de premier tablissement 2 FR -20121 Frais de prospection 2 FR -20122 Frais de publicit 2 FR -2013 Frais d'augmentation de capital et d'oprations diverses (fusions, scissions, transformations) 2 FR -203 Frais de recherche et de dveloppement 2 FR -205 Concessions et droits similaires, brevets, licences, marques, procds, logiciels, droits et valeurs similaires 2 FR -211 Terrains 2 FR -2111 Terrains nus 211 FR -2112 Terrains amnags 211 FR -2113 Sous-sols et sur-sols 211 FR -2114 Terrains de gisement 211 FR -21141 Carrires 2114 FR -2115 Terrains btis 211 FR -21151 Ensembles immobiliers industriels (A, B...) 2115 FR -21155 Ensembles immobiliers administratifs et commerciaux (A, B...) 2115 FR -21158 Autres ensembles immobiliers 2115 FR -211581 affects aux oprations professionnelles (A, B...) 21158 FR -211588 affects aux oprations non professionnelles (A, B...) 21158 FR -2116 Compte d'ordre sur immobilisations (art. 6 du dcret n 78-737 du 11 juillet 1978) 211 FR -212 Agencements et amnagements de terrains (mme ventilation que celle du compte 211) 2 FR -213 Constructions 2 FR -2131 Btiments 213 FR -21311 Ensembles immobiliers industriels (A, B...) 2131 FR -21315 Ensembles immobiliers administratifs et commerciaux (A, B...) 2131 FR -21318 Autres ensembles immobiliers 2131 FR -213181 affects aux oprations professionnelles (A, B...) 21318 FR -213188 affects aux oprations non professionnelles (A, B...) 21318 FR -2135 Installations gnrales - agencements - amnagements des constructions (mme ventilation que celle du compte 2131) 213 FR -2138 Ouvrages d'infrastructure 213 FR -21381 Voies de terre 2138 FR -21382 Voies de fer 2138 FR -21383 Voies d'eau 2138 FR -21384 Barrages 2138 FR -21385 Pistes d'arodromes 2138 FR -214 Constructions sur sol d'autrui (mme ventilation que celle du compte 213) 2 FR -215 Installations techniques, matriels et outillage industriels 2 FR -2151 Installations complexes spcialises 215 FR -21511 sur sol propre 2151 FR -21514 sur sol d'autrui 2151 FR -2153 Installations caractre spcifique 215 FR -21531 sur sol propre 2153 FR -21534 sur sol d'autrui 2153 FR -2154 Matriel industriel 215 FR -2155 Outillage industriel 215 FR -2157 Agencements et amnagements du matriel et outillage industriels 215 FR -218 Autres immobilisations corporelles 2 FR -2181 Installations gnrales, agencements, amnagements divers 218 FR -2182 Matriel de transport 218 FR -2183 Matriel de bureau et matriel informatique 218 FR -2184 Mobilier 218 FR -2185 Cheptel 218 FR -2186 Emballages rcuprables 218 FR -22 immobilisations mises en concession 2 FR -231 Immobilisations corporelles en cours 2 FR -2312 Terrains 231 FR -2313 Constructions 231 FR -2315 Installations techniques, matriel et outillage industriels 231 FR -2318 Autres immobilisations corporelles 231 FR -232 Immobilisations incorporelles en cours 2 FR -237 Avances et acomptes verss sur immobilisations incorporelles 2 FR -238 Avances et acomptes verss sur commandes d'immobilisations corporelles 2 FR -2382 Terrains 238 FR -2383 Constructions 238 FR -2385 Installations techniques, matriel et outillage industriels 238 FR -2388 Autres immobilisations corporelles 238 FR -25 Parts dans des entreprises lies et crances sur des entreprises lies 2 FR -26 Participations et crances rattaches des participations 2 FR -261 Titres de participation 26 FR -2611 Actions 261 FR -2618 Autres titres 261 FR -266 Autres formes de participation 26 FR -267 Crances rattaches des participations 26 FR -2671 Crances rattaches des participations (groupe) 267 FR -2674 Crances rattaches des participations (hors groupe) 267 FR -2675 Versements reprsentatifs d'apports non capitaliss (appel de fonds) 267 FR -2676 Avances consolidables 267 FR -2677 Autres crances rattaches des participations 267 FR -2678 Intrts courus 267 FR -268 Crances rattaches des socits en participation 26 FR -2681 Principal 268 FR -2688 Intrts courus 268 FR -269 Versements restant effectuer sur titres de participation non librs 26 FR -271 Titres immobiliss autres que les titres immobiliss de l'activit de portefeuille (droit de proprit) 2 FR -2711 Actions 271 FR -2718 Autres titres 271 FR -272 Titres immobiliss (droit de crance) 2 FR -2721 Obligations 272 FR -2722 Bons 272 FR -273 Titres immobiliss de l'activit de portefeuille 2 FR -274 Prts 2 FR -2741 Prts participatifs 274 FR -2742 Prts aux associs 274 FR -2743 Prts au personnel 274 FR -2748 Autres prts 274 FR -275 Dpts et cautionnements verss 2 FR -2751 Dpts 275 FR -2755 Cautionnements 275 FR -276 Autres crances immobilises 2 FR -2761 Crances diverses 276 FR -2768 Intrts courus 276 FR -27682 Sur titres immobiliss (droit de crance) 2768 FR -27684 Sur prts 2768 FR -27685 Sur dpts et cautionnements 2768 FR -27688 Sur crances diverses 2768 FR -277 (Actions propres ou parts propres) 2 FR -2771 Actions propres ou parts propres 277 FR -2772 Actions propres ou parts propres en voie dannulation 277 FR -279 Versements restant effectuer sur titres immobiliss non librs 2 FR -28 amortissements des immobilisations 2 FR -2801 Frais d'tablissement (mme ventilation que celle du compte 201) 28 FR -2803 Frais de recherche et de dveloppement 28 FR -2805 Concessions et droits similaires, brevets, licences, logiciels, droits et valeurs similaires 28 FR -2807 Fonds commercial 28 FR -2808 Autres immobilisations incorporelles 28 FR -2811 Terrains de gisement 28 FR -2812 Agencements, amnagements de terrains (mme ventilation que celle du compte 212) 28 FR -2813 Constructions (mme ventilation que celle du compte 213) 28 FR -2814 Constructions sur sol d'autrui (mme ventilation que celle du compte 214) 28 FR -2815 Installations, matriel et outillage industriels (mme ventilation que celle du compte 215) 28 FR -2818 Autres immobilisations corporelles (mme ventilation que celle du compte 218) 28 FR -282 Amortissements des immobilisations mises en concession 28 FR -29 provisions pour dprciation des immobilisations 2 FR -2905 Marques, procds, droits et valeurs similaires 29 FR -2906 Droit au bail 29 FR -2907 Fonds commercial 29 FR -2908 Autres immobilisations incorporelles 29 FR -2911 Terrains (autres que terrains de gisement) 29 FR -292 Provisions pour dprciation des immobilisations mises en concession 29 FR -293 Provisions pour dprciation des immobilisations en cours 29 FR -2931 Immobilisations corporelles en cours 293 FR -2932 Immobilisations incorporelles en cours 293 FR -296 Provisions pour dprciation des participations et crances rattaches des participations 29 FR -2961 Titres de participation 296 FR -2966 Autres formes de participation 296 FR -2967 Crances rattaches des participations (mme ventilation que celle du compte 267) 296 FR -2968 Crances rattaches des socits en participation (mme ventilation que celle du compte 268) 296 FR -2971 Titres immobiliss autres que les titres immobiliss de l'activit de portefeuille -droit de proprit (mme ventilation que celle du compte 271) 29 FR -2972 Titres immobiliss - droit de crance (mme ventilation que celle du compte 272) 29 FR -2973 Titres immobiliss de l'activit de portefeuille 29 FR -2974 Prts (mme ventilation que celle du compte 274) 29 FR -2975 Dpts et cautionnements verss (mme ventilation que celle du compte 275) 29 FR -2976 Autres crances immobilises (mme ventilation que celle du compte 276) 29 FR -3 comptes de stocks et en cours 0 FR -311 Matires (ou groupe) A 3 FR -312 Matires (ou groupe) B 3 FR -317 Fournitures A, B, C, ... 3 FR -321 Matires consommables 3 FR -3211 Matires (ou groupe) C 321 FR -3212 Matires (ou groupe) D 321 FR -322 Fournitures consommables 3 FR -3221 Combustibles 322 FR -3222 Produits d'entretien 322 FR -3223 Fournitures d'atelier et d'usine 322 FR -3224 Fournitures de magasin 322 FR -3225 Fournitures de bureau 322 FR -326 Emballages 3 FR -3261 Emballages perdus 326 FR -3265 Emballages rcuprables non identifiables 326 FR -3267 Emballages usage mixte 326 FR -331 Produits en cours 3 FR -3311 Produits en cours P 1 331 FR -3312 Produits en cours P 2 331 FR -335 Travaux en cours 3 FR -3351 avaux en cours T 1 335 FR -3352 Travaux en cours T 2 335 FR -341 Etudes en cours 3 FR -3411 Etudes en cours E 1 341 FR -3412 Etudes en cours E 2 341 FR -345 Prestations de services en cours 3 FR -3451 Prestations de services S 1 345 FR -3452 Prestations de services S 2 345 FR -351 Produits intermdiaires 3 FR -3511 Produits intermdiaires (ou groupe) A 351 FR -3512 Produits intermdiaires (ou groupe) B 351 FR -355 Produits finis 3 FR -3551 Produits finis (ou groupe) A 355 FR -3552 Produits finis (ou groupe) B 355 FR -358 Produits rsiduels (ou matires de rcupration) 3 FR -3581 Dchets 358 FR -3585 Rebuts 358 FR -3586 Matires de rcupration 358 FR -36 (compte ouvrir, le cas chant, sous l'intitul "stocks provenant d'immobilisations") 3 FR -371 Marchandises (ou groupe) A 3 FR -372 Marchandises (ou groupe) B 3 FR -38 (lorsque l'entit tient un inventaire permanent en comptabilit gnrale, le compte 38 peut tre utilis pour comptabiliser les stocks en voie d'acheminement, mis en dpt ou donns en consignation) 3 FR -39 provisions pour dprciation des stocks et en-cours 3 FR -3911 Matires (ou groupe) A 39 FR -3912 Matires (ou groupe) B 39 FR -3917 Fournitures A, B, C, ... 39 FR -3921 Matires consommables (mme ventilation que celle du compte 321) 39 FR -3922 Fournitures consommables (mme ventilation que celle ducompte 322) 39 FR -3926 Emballages (mme ventilation que celle du compte 326) 39 FR -3931 Produits en cours (mme ventilation que celle du compte 331) 39 FR -3935 Travaux en cours (mme ventilation que celle du compte 335) 39 FR -3941 Etudes en cours (mme ventilation que celle du compte 341) 39 FR -3945 Prestations de services en cours (mme ventilation que celle du compte 345) 39 FR -3951 Produits intermdiaires (mme ventilation que celle du compte 351) 39 FR -3955 Produits finis (mme ventilation que celle du compte 355) 39 FR -3971 Marchandise (ou groupe) A 39 FR -3972 Marchandise (ou groupe) B 39 FR -4 comptes de tiers 0 FR -40 fournisseurs et comptes rattaches 4 FR -401 Fournisseurs 40 FR -4011 Fournisseurs - Achats de biens et prestations de services 401 FR -4017 Fournisseurs - Retenues de garantie 401 FR -403 Fournisseurs - Effets payer 40 FR -404 Fournisseurs d'immobilisations 40 FR -4041 Fournisseurs - Achats d'immobilisations 404 FR -4047 Fournisseurs d'immobilisations - Retenues de garantie 404 FR -405 Fournisseurs d'immobilisations - Effets payer 40 FR -408 Fournisseurs - Factures non parvenues 40 FR -4081 Fournisseurs 408 FR -4084 Fournisseurs d'immobilisations 408 FR -4088 Fournisseurs - Intrts courus 408 FR -4091 Fournisseurs - Avances et acomptes verss sur commandes 40 FR -4096 Fournisseurs - Crances pour emballages et matriel rendre 40 FR -4097 Fournisseurs - Autres avoirs 40 FR -40971 Fournisseurs d'exploitation 4097 FR -40974 Fournisseurs d'immobilisations 4097 FR -4098 Rabais, remises, ristournes obtenir et autres avoirs non encore reus 40 FR -41 clients et comptes rattaches 4 FR -411 Clients 41 FR -4111 Clients - Ventes de biens ou de prestations de services 411 FR -4117 Clients - Retenues de garantie 411 FR -413 Clients - Effets recevoir 41 FR -416 Clients douteux ou litigieux 41 FR -417 "Crances" sur travaux non encore facturables 41 FR -418 Clients - Produits non encore facturs 41 FR -4181 Clients - Factures tablir 418 FR -4188 Clients - Intrts courus 418 FR -4191 Clients - Avances et acomptes reus sur commandes 41 FR -4196 Clients - Dettes sur emballages et matriels consigns 41 FR -4197 Clients - Autres avoirs 41 FR -4198 Rabais, remises, ristournes accorder et autres avoirs tablir 41 FR -42 Personnel et comptes rattaches 4 FR -422 Comits d'entreprises, d'tablissement,... 42 FR -424 Participation des salaris aux rsultats 42 FR -4246 Rserve spciale (art. L. 442-2 du Code du travail) 424 FR -4248 Comptes courants 424 FR -425 Personnel - Avances et acomptes 42 FR -426 Personnel - Dpts 42 FR -427 Personnel - Oppositions 42 FR -4282 Dettes provisionnes pour congs payer 42 FR -4284 Dettes provisionnes pour participation des salaris aux rsultats 42 FR -4286 Autres charges payer 42 FR -4287 Produits recevoir 42 FR -431 Scurit sociale 4 FR -43731 Cotis.Sal.+Pat. Retraite salaris des 4 FR -43732 Cotis.Sal.+Pat. Retraite cadres des 4 FR -4374 Cotis.Sal.+Pat. ASSEDIC des 4 FR -438 Organismes sociaux - Charges payer et produits recevoir 4 FR -4382 Charges sociales sur congs payer 438 FR -4386 Autres charges payer 438 FR -4387 Produits recevoir 438 FR -44 tat et autres collectivits publiques 4 FR -441 tat - Subventions recevoir 44 FR -4411 Subventions d'investissement 441 FR -4417 Subventions d'exploitation 441 FR -4418 Subventions d'quilibre 441 FR -4419 Avances sur subventions 441 FR -442 Etat - Impts et taxes recouvrables sur des tiers 44 FR -4424 Obligataires 442 FR -4425 Associs 442 FR -443 Oprations particulires avec l'Etat les collectivits publiques, les organismes internationaux 44 FR -4431 Crances sur l'Etat rsultant de la suppression de la rgle du dcalage d'un mois en matire de T.V.A. 443 FR -4438 Intrts courus sur crances figurant au 4431 443 FR -4452 T.V.A. due intracommunautaire 44 FR -4455 Taxes sur le chiffre d'affaires dcaisser 44 FR -44551 T.V.A. dcaisser 4455 FR -44558 Taxes assimiles la T.V.A. 4455 FR -4456 Taxes sur le chiffre d'affaires dductibles 44 FR -44562 T.V.A. sur immobilisations 4456 FR -44563 T.V.A. transfre par d'autres entreprises 4456 FR -445661 T.V.A. dductible 19,6% sur autres biens et services 4456 FR -445662 T.V.A. dductible 5,5% sur autres biens et services 4456 FR -445663 T.V.A. dductible 2,1% sur autres biens et services 4456 FR -44567 Crdit de T.V.A. reporter 4456 FR -44568 Taxes assimiles la T.V.A. 4456 FR -4457 Taxes sur le chiffre d'affaires collectes par l'entreprise 44 FR -44571 T.V.A. collecte 4457 FR -44578 Taxes assimiles la T.V.A. 4457 FR -4458 Taxes sur le chiffre d'affaires rgulariser ou en attente 44 FR -44581 Acomptes - Rgime simplifi d'imposition 4458 FR -44582 Acomptes - Rgime de forfait 4458 FR -44583 Remboursement de taxes sur le chiffre d'affaires demand 4458 FR -44584 T.V.A. rcupre d'avance 4458 FR -44586 Taxes sur le chiffre d'affaires sur factures non parvenues 4458 FR -44587 Taxes sur le chiffres d'affaires sur factures tablir 4458 FR -446 Obligations cautionnes 44 FR -448 Etat - Charges payer et produits recevoir 44 FR -4482 Charges fiscales sur congs payer 448 FR -4486 Charges payer 448 FR -4487 Produits recevoir 448 FR -451 Groupe 4 FR -4551 Principal 4 FR -4558 Intrts courus 4 FR -456 Associs - Oprations sur le capital 4 FR -4561 Associs - Comptes d'apport en socit 456 FR -45611 Apports en nature 4561 FR -45615 Apports en numraire 4561 FR -4562 Apporteurs - Capital appel, non vers 456 FR -45621 Actionnaires - Capital souscrit et appel, non vers 4562 FR -45625 Associs - Capital appel, non vers 4562 FR -4563 Associs - Versements reus sur augmentation de capital 456 FR -4564 Associs - Versements anticips 456 FR -4566 Actionnaires dfaillants 456 FR -4567 Associs - Capital rembourser 456 FR -457 Associs - Dividendes payer 4 FR -458 Associs - Oprations faites en commun et en G.I.E. 4 FR -4581 Oprations courantes 458 FR -4588 Intrts courus 458 FR -462 Crances sur cessions d'immobilisations 4 FR -464 Dettes sur acquisitions de valeurs mobilires de placement 4 FR -465 Crances sur cessions de valeurs mobilires de placement 4 FR -467 Autres comptes dbiteurs ou crditeurs 4 FR -468 Divers - Charges payer et produits recevoir 4 FR -4686 Charges payer 468 FR -4687 Produits recevoir 468 FR -471 Comptes d'attente 4 FR -472 Comptes d'attente 4 FR -473 Comptes d'attente 4 FR -474 Comptes d'attente 4 FR -475 Comptes d'attente 4 FR -476 Diffrence de conversion - Actif 4 FR -4761 Diminution des crances 476 FR -4762 Augmentation des dettes 476 FR -4768 Diffrences compenses par couverture de change 476 FR -477 Diffrences de conversion - Passif 4 FR -4771 Augmentation des crances 477 FR -4772 Diminution des dettes 477 FR -4778 Diffrences compenses par couverture de change 477 FR -478 Autres comptes transitoires 4 FR -48 comptes de rgularisation 4 FR -4811 Charges diffres 48 FR -4812 Frais d'acquisition des immobilisations 481 FR -4816 Frais d'mission des emprunts 481 FR -4818 Charges taler 481 FR -488 Comptes de rpartition priodique des charges et des produits 48 FR -4886 Charges 48 FR -4887 Produits 48 FR -49 provisions pour dprciation des comptes de tiers 4 FR -495 Provisions pour dprciation des comptes du groupe et des associs 49 FR -4951 Comptes du groupe 495 FR -4955 Comptes courants des associs 495 FR -4958 Oprations faites en commun et en G.I.E. 495 FR -4962 Crances sur cessions d'immobilisations 49 FR -4965 Crances sur cessions de valeurs mobilires de placement 49 FR -4967 Autres comptes dbiteurs 49 FR -5 comptes financiers 0 FR -501 Parts dans des entreprises lies 5 FR -502 Actions propres 5 FR -503 Actions 5 FR -5031 Titres cots 503 FR -5035 Titres non cots 503 FR -504 Autres titres confrant un droit de proprit 5 FR -505 Obligations et bons mis par la socit et rachets par elle 5 FR -506 Obligations 5 FR -5061 Titres cots 506 FR -5065 Titres non cots 506 FR -507 Bons du Trsor et bons de caisse court terme 5 FR -508 Autres valeurs mobilires de placement et autres crances assimiles 5 FR -5081 Autres valeurs mobilires 508 FR -5082 Bons de souscription 508 FR -5088 Intrts courus sur obligations, bons et valeurs assimils 508 FR -509 Versements restant effectuer sur valeurs mobilires de placement non libres 5 FR -511 Valeurs l'encaissement 5 FR -5111 Coupons chus l'encaissement 511 FR -5112 Chques encaisser 511 FR -5113 Effets l'encaissement 511 FR -5114 Effets l'escompte 511 FR -512 Banques 5 FR -5121 Comptes en monnaie nationale 512 FR -5124 Comptes en devises 512 FR -514 Chques postaux 5 FR -515 "Caisses" du Trsor et des tablissements publics 5 FR -516 Socits de bourse 5 FR -517 Autres organismes financiers 5 FR -518 Intrts courus 5 FR -5181 Intrts courus payer 518 FR -5188 Intrts courus recevoir 518 FR -519 Concours bancaires courants 5 FR -5191 Crdit de mobilisation de crances commerciales (CMCC) 519 FR -5193 Mobilisation de crances nes l'tranger 519 FR -5198 Intrts courus sur concours bancaires courants 519 FR -52 Instruments de trsorerie 5 FR -531 Caisse sige social 5 FR -5311 Caisse en monnaie nationale 531 FR -5314 Caisse en devises 531 FR -532 Caisse succursale (ou usine) A 5 FR -533 Caisse succursale (ou usine) B 5 FR -58 virements internes 5 FR -59 provisions pour dprciation des comptes financiers 5 FR -5903 Actions 59 FR -5904 Autres titres confrant un droit de proprit 59 FR -5906 Obligations 59 FR -5908 Autres valeurs mobilires de placement et crances assimiles 59 FR -6 comptes de charges 0 FR -601 Achats stocks - Matires premires (et fournitures) 6 FR -6011 Matires (ou groupe) A 601 FR -6012 Matires (ou groupe) B 601 FR -6017 Fournitures A, B, C, ... 601 FR -602 Achats stocks - Autres approvisionnements 6 FR -6021 Matires consommables 602 FR -60211 Matires (ou groupe) C 6021 FR -60212 Matires (ou groupe) D 6021 FR -6022 Fournitures consommables 602 FR -60221 Combustibles 6022 FR -60222 Produits d'entretien 6022 FR -60223 Fournitures d'atelier et d'usine 6022 FR -60224 Fournitures de magasin 6022 FR -60225 Fourniture de bureau 6022 FR -6026 Emballages 602 FR -60261 Emballages perdus 6026 FR -60265 ballages rcuprables non identifiables 6026 FR -60267 Emballages usage mixte 6026 FR -604 Achats d'tudes et prestations de services 6 FR -605 Achats de matriel, quipements et travaux 6 FR -606 Achats non stocks de matire et fournitures 6 FR -6061 Fournitures non stockables (eau, nergie, ...) 606 FR -6063 Fournitures d'entretien et de petit quipement 606 FR -6064 Fournitures administratives 606 FR -6068 Autres matires et fournitures 606 FR -607 Achats de marchandises 6 FR -6071 Marchandise (ou groupe) A 607 FR -6072 Marchandise (ou groupe) B 607 FR -608 (Compte rserv, le cas chant, la rcapitulation des frais accessoires incorpors aux achats) 6 FR -609 Rabais, remises et ristournes obtenus sur achats 6 FR -6091 de matires premires (et fournitures) 609 FR -6092 d'autres approvisionnements stocks 609 FR -6094 d'tudes et prestations de services 609 FR -6095 de matriel, quipements et travaux 609 FR -6096 d'approvisionnements non stocks 609 FR -6097 de marchandises 609 FR -6098 Rabais, remises et ristournes non affects 609 FR -6031 Variation des stocks de matires premires (et fournitures) 6 FR -6032 Variation des stocks des autres approvisionnements 6 FR -6037 Variation des stocks de marchandises 6 FR -61 autres charges externes - Services extrieurs 6 FR -611 Sous-traitance gnrale 61 FR -612 Redevances de crdit-bail 61 FR -6122 Crdit-bail mobilier 612 FR -6125 Crdit-bail immobilier 612 FR -613 Locations 61 FR -6132 Locations immobilires 613 FR -6135 Locations mobilires 613 FR -6136 Malis sur emballages 613 FR -614 Charges locatives et de coproprit 61 FR -615 Entretien et rparations 61 FR -6152 sur biens immobiliers 615 FR -6155 sur biens mobiliers 615 FR -6156 Maintenance 615 FR -616 Primes d'assurances 61 FR -6161 Multirisques 616 FR -6162 Assurance obligatoire dommage construction 616 FR -6163 Assurance-transport 616 FR -61636 sur achats 6163 FR -61637 sur ventes 6163 FR -61638 sur autres biens 6163 FR -6164 Risques d'exploitation 616 FR -6165 Insolvabilit clients 616 FR -617 Etudes et recherches 61 FR -618 Divers 61 FR -6181 Documentation gnrale 618 FR -6183 Documentation technique 618 FR -6185 Frais de colloques, sminaires, confrences 618 FR -619 Rabais, remises et ristournes obtenus sur services extrieurs 61 FR -62 autres charges externes - Autres services extrieurs 6 FR -621 Personnel extrieur l'entreprise 62 FR -6211 Personnel intrimaire 621 FR -6214 Personnel dtach ou prt l'entreprise 621 FR -622 Rmunrations d'intermdiaires et honoraires 62 FR -6221 Commissions et courtages sur achats 622 FR -6222 Commissions et courtages sur ventes 622 FR -6224 Rmunrations des transitaires 622 FR -6225 Rmunrations d'affacturage 622 FR -6226 Honoraires 622 FR -6227 Frais d'actes et de contentieux 622 FR -6228 Divers 622 FR -623 Publicit, publications, relations publiques 62 FR -6231 Annonces et insertions 623 FR -6232 Echantillons 623 FR -6233 Foires et expositions 623 FR -6234 Cadeaux la clientle 623 FR -6235 Primes 623 FR -6236 Catalogues et imprims 623 FR -6237 Publications 623 FR -6238 Divers (pourboires, dont courant, ...) 623 FR -624 Transports de biens et transports collectifs du personnel 62 FR -6241 Transports sur achats 624 FR -6242 Transports sur ventes 624 FR -6243 Transports entre tablissements ou chantiers 624 FR -6244 Transports administratifs 624 FR -6247 Transports collectifs du personnel 624 FR -6248 Divers 624 FR -625 Dplacements, missions et rceptions 62 FR -6251 Voyages et dplacements 625 FR -6255 Frais de dmnagement 625 FR -6256 Missions 625 FR -6257 Rceptions 625 FR -626 Frais postaux et de tlcommunications 62 FR -627 Services bancaires et assimils 62 FR -6271 Frais sur titres (achat, vente, garde) 627 FR -6272 Commissions et frais sur mission d'emprunts 627 FR -6275 Frais sur effets 627 FR -6276 Location de coffres 627 FR -6278 Autres frais et commissions sur prestations de services 627 FR -628 Divers 62 FR -6281 Concours divers (cotisations, ...) 628 FR -6284 Frais de recrutement de personnel 628 FR -629 Rabais, remises et ristournes obtenus sur autres services extrieurs 62 FR -631 Impts, taxes et versements assimils sur rmunrations (administrations des impts) 6 FR -6311 Taxe sur les salaires 631 FR -6312 Taxe d'apprentissage 631 FR -6313 Participation des employeurs la formation professionnelle continue 631 FR -6314 Cotisation pour dfaut d'investissement obligatoire dans la construction 631 FR -6318 Autres 631 FR -633 Impts, taxes et versements assimils sur rmunrations (autres organismes) 6 FR -6331 Versement de transport 633 FR -6332 Allocations logement 633 FR -6333 Participation des employeurs la formation professionnelle continue 633 FR -6334 Participation des employeurs l'effort de construction 633 FR -6335 Versements libratoires ouvrant droit l'exonration de la taxe d'apprentissage 633 FR -6338 Autres 633 FR -635 Autres impts, taxes et versements assimils (administrations des impts) 6 FR -6351 Impts directs (sauf impts sur les bnfices) 635 FR -63511 Taxe professionnelle 6351 FR -63512 Taxes foncires 6351 FR -63513 Autres impts locaux 6351 FR -63514 Taxe sur les vhicules des socits 6351 FR -6352 Taxe sur le chiffre d'affaires non rcuprables 635 FR -6353 Impts indirects 635 FR -6354 Droits d'enregistrement et de timbre 635 FR -63541 Droits de mutation 6354 FR -6358 Autres droits 635 FR -637 Autres impts, taxes et versements assimils (autres organismes) 6 FR -6371 Contribution sociale de solidarit la charge des socits 637 FR -6372 Taxes perues par les organismes publics internationaux 637 FR -6374 Impts et taxes exigibles l'Etranger 637 FR -6378 Taxes diverses 637 FR -64 Charges de personnel 6 FR -6411 Salaires, appointements 64 FR -6412 Congs pays 641 FR -6413 Primes et gratifications 641 FR -6414 Indemnits et avantages divers 641 FR -6415 Supplment familial 641 FR -6451 Cotisations l'URSSAF 64 FR -6452 Cotisations aux mutuelles 64 FR -6453 Cotisations aux caisses de retraites 64 FR -6454 Cotisations aux ASSEDIC 64 FR -6458 Cotisations aux autres organismes sociaux 64 FR -647 Autres charges sociales 64 FR -6471 Prestations directes 647 FR -6472 Versements aux comits d'entreprise et d'tablissement 647 FR -6473 Versements aux comits d'hygine et de scurit 647 FR -6474 Versements aux autres uvres sociales 647 FR -6475 Mdecine du travail, pharmacie 647 FR -648 Autres charges de personnel 64 FR -651 Redevances pour concessions, brevets, licences, marques, procds, logiciels, droits et valeurs similaires 6 FR -6511 Redevances pour concessions, brevets, licences, marques, procds, logiciels 651 FR -6516 Droits d'auteur et de reproduction 651 FR -6518 Autres droits et valeurs similaires 651 FR -653 Jetons de prsence 6 FR -654 Pertes sur crances irrcouvrables 6 FR -6541 Crances de l'exercice 654 FR -6544 Crances des exercices antrieurs 654 FR -655 Quotes-parts de rsultat sur oprations faites en commun 6 FR -6551 Quote-part de bnfice transfre (comptabilit du grant) 655 FR -6555 Quote-part de perte supporte (comptabilit des associs non grants) 655 FR -658 Charges diverses de gestion courante 6 FR -661 Charges d'intrts 6 FR -6611 Intrts des emprunts et dettes 661 FR -66116 des emprunts et dettes assimiles 6611 FR -66117 des dettes rattaches des participations 6611 FR -6615 Intrts des comptes courants et des dpts crditeurs 661 FR -6616 Intrts bancaires et sur oprations de financement (escompte,...) 661 FR -6617 Intrts des obligations cautionnes 661 FR -6618 Intrts des autres dettes 661 FR -66181 des dettes commerciales 6618 FR -66188 des dettes diverses 66188 FR -664 Pertes sur crances lies des participations 6 FR -665 Escomptes accords 6 FR -666 Pertes de change 6 FR -667 Charges nettes sur cessions de valeurs mobilires de placement 6 FR -668 Autres charges financires 6 FR -671 Charges exceptionnelles sur oprations de gestion 6 FR -6711 Pnalits sur marchs (et ddits pays sur achats et ventes) 671 FR -6712 Pnalits, amendes fiscales et pnales 671 FR -6713 Dons, libralits 671 FR -6714 Crances devenues irrcouvrables dans l'exercice 671 FR -6715 Subventions accordes 671 FR -6717 Rappel d'impts (autres qu'impts sur les bnfices) 671 FR -6718 Autres charges exceptionnelles sur oprations de gestion 671 FR -672 (Compte la disposition des entits pour enregistrer, en cours d'exercice, les charges sur exercices antrieurs) 6 FR -675 Valeurs comptables des lments d'actif cds 6 FR -6751 Immobilisations incorporelles 675 FR -6752 Immobilisations corporelles 675 FR -6756 Immobilisations financires 675 FR -6758 Autres lments d'actif 675 FR -678 Autres charges exceptionnelles 6 FR -6781 Malis provenant de clauses d'indexation 678 FR -6782 Lots 678 FR -6783 Malis provenant du rachat par l'entreprise d'actions et obligations mises par elle-mme 678 FR -6788 Charges exceptionnelles diverses 678 FR -68 Dotations aux amortissements et aux provisions 6 FR -6811 Dotations aux amortissements sur immobilisations incorporelles et corporelles 68 FR -68111 Immobilisations incorporelles 6811 FR -68112 Immobilisations corporelles 6811 FR -6812 Dotations aux amortissements des charges d'exploitation rpartir 68 FR -6815 Dotations aux provisions pour risques et charges d'exploitation 68 FR -6816 Dotations aux provisions pour dprciation des immobilisations incorporelles et corporelles 68 FR -68161 Immobilisations incorporelles 6816 FR -68162 Immobilisations corporelles 6816 FR -6817 Dotations aux provisions pour dprciation des actifs circulants 68 FR -68173 Stocks et en-cours 6817 FR -68174 Crances 6817 FR -6861 Dotations aux amortissements des primes de remboursement des obligations 68 FR -6865 Dotations aux provisions pour risques et charges financiers 68 FR -6866 Dotations aux provisions pour dprciation des lments financiers 68 FR -68662 Immobilisations financires 6866 FR -68665 Valeurs mobilires de placement 6866 FR -6868 Autres dotations 68 FR -6871 Dotations aux amortissements exceptionnels des immobilisations 68 FR -6872 Dotations aux provisions rglementes (immobilisations) 68 FR -68725 Amortissements drogatoires 6872 FR -6873 Dotations aux provisions rglementes (stocks) 68 FR -6874 Dotations aux autres provisions rglementes 68 FR -6875 Dotations aux provisions pour risques et charges exceptionnels 68 FR -6876 Dotations aux provisions pour dprciations exceptionnelles 68 FR -69 participation des salaries - impts sur les benefices et assimiles 6 FR -6951 Impts dus en France 69 FR -6952 Contribution additionnelle l'impt sur les bnfices 69 FR -6954 Impts dus l'tranger 69 FR -696 Supplments d'impt sur les socits lis aux distributions 69 FR -698 Intgration fiscale 69 FR -6981 Intgration fiscale - Charges 698 FR -6989 Intgration fiscale - Produits 698 FR -7 comptes de produits 0 FR -70 ventes de produits fabriques, prestations de services, marchandises 7 FR -7011 Produits finis (ou groupe) A 70 FR -7012 Produits finis (ou groupe) B 70 FR -702 Ventes de produits intermdiaires 70 FR -703 Ventes de produits rsiduels 70 FR -704 Travaux 70 FR -7041 Travaux de catgorie (ou activit) A 704 FR -7042 Travaux de catgorie (ou activit) B 704 FR -705 Etudes 7 FR -7071 Marchandises (ou groupe) A 70 FR -7072 Marchandises (ou groupe) B 70 FR -7081 Produits des services exploits dans l'intrt du personnel 70 FR -7082 Commissions et courtages 70 FR -7083 Locations diverses 70 FR -7084 Mise disposition de personnel facture 70 FR -7085 Ports et frais accessoires facturs 70 FR -7086 Bonis sur reprises d'emballages consigns 70 FR -7087 Bonifications obtenues des clients et primes sur ventes 70 FR -7088 Autres produits d'activits annexes (cessions d'approvisionnements,...) 70 FR -7091 sur ventes de produits finis 70 FR -7092 sur ventes de produits intermdiaires 70 FR -7094 sur travaux 70 FR -7095 sur tudes 70 FR -7096 sur prestations de services 70 FR -7097 sur ventes de marchandises 70 FR -7098 sur produits des activits annexes 70 FR -71 production stocke (ou dstockage) 7 FR -7133 Variation des en-cours de production de biens 71 FR -71331 Produits en cours 7133 FR -71335 Travaux en cours 7133 FR -7134 Variation des en-cours de production de services 71 FR -71341 Etudes en cours 7134 FR -71345 Prestations de services en cours 7134 FR -7135 Variation des stocks de produits 71 FR -71351 Produits intermdiaires 7135 FR -71355 Produits finis 7135 FR -71358 Produits rsiduels 7135 FR -721 Immobilisations incorporelles 7 FR -722 Immobilisations corporelles 7 FR -731 Produits nets partiels sur oprations en cours ( subdiviser par opration) 7 FR -739 Produits nets partiels sur oprations termines 7 FR -751 Redevances pour concessions, brevets, licences, marques, procds, logiciels, droits et valeurs similaires 7 FR -7511 Redevances pour concessions, brevets, licences, marques, procds, logiciels 751 FR -7516 Droits d'auteur et de reproduction 751 FR -7518 Autres droits et valeurs similaires 751 FR -752 Revenus des immeubles non affects des activits professionnelles 7 FR -7551 Quote-part de perte transfre (comptabilit du grant) 7 FR -7555 Quote-part de bnfice attribue (comptabilit des associs non-grants) 7 FR -758 Produits divers de gestion courante 7 FR -761 Produits de participations 7 FR -7611 Revenus des titres de participation 761 FR -7616 Revenus sur autres formes de participation 761 FR -7617 Revenus des crances rattaches des participations 761 FR -762 Produits des autres immobilisations financires 7 FR -7621 Revenus des titres immobiliss 762 FR -7626 Revenus des prts 762 FR -7627 Revenus des crances immobilises 762 FR -763 Revenus des autres crances 7 FR -7631 Revenus des crances commerciales 763 FR -7638 Revenus des crances diverses 763 FR -764 Revenus des valeurs mobilires de placement 7 FR -765 Escomptes obtenus 7 FR -766 Gains de change 7 FR -767 Produits nets sur cessions de valeurs mobilires de placement 7 FR -768 Autres produits financiers 7 FR -771 Produits exceptionnels sur oprations de gestion 7 FR -7711 Ddits et pnalits perus sur achats et sur ventes 771 FR -7713 Libralits reues 771 FR -7714 Rentres sur crances amorties 771 FR -7715 Subventions d'quilibre 771 FR -7717 Dgrvements d'impts autres qu'impts sur les bnfices 771 FR -7718 Autres produits exceptionnels sur oprations de gestion 771 FR -772 (Compte la disposition des entits pour enregistrer, en cours d'exercice, les produits sur exercices antrieurs) 7 FR -775 Produits des cessions d'lments d'actif 7 FR -7751 Immobilisations incorporelles 775 FR -7752 Immobilisations corporelles 775 FR -7756 Immobilisations financires 775 FR -7758 Autres lments d'actif 775 FR -777 Quote-part des subventions d'investissement vire au rsultat de l'exercice 7 FR -778 Autres produits exceptionnels 7 FR -7781 Bonis provenant de clauses d'indexation 778 FR -7782 Lots 778 FR -7783 Bonis provenant du rachat par l'entreprise d'actions et d'obligations mises par elle-mme 778 FR -7788 Produits exceptionnels divers 778 FR -78 Reprises sur amortissements et provisions 7 FR -7811 Reprises sur amortissements des immobilisations incorporelles et corporelles 78 FR -78111 Immobilisations incorporelles 7811 FR -78112 Immobilisations corporelles 7811 FR -7815 Reprises sur provisions pour risques et charges d'exploitation 78 FR -7816 Reprises sur provisions pour dprciation des immobilisations incorporelles et corporelles 78 FR -78161 Immobilisations incorporelles 7816 FR -78162 Immobilisations corporelles 7816 FR -7817 Reprises sur provisions pour dprciation des actifs circulants 78 FR -78173 Stocks et en-cours 7817 FR -78174 Crances 7817 FR -7865 Reprises sur provisions pour risques et charges financiers 78 FR -7866 Reprises sur provisions pour dprciation des lments financiers 78 FR -78662 Immobilisations financires 7866 FR -78665 Valeurs mobilires de placements 7866 FR -7872 Reprises sur provisions rglementes (immobilisations) 78 FR -78725 Amortissements drogatoires 7872 FR -78726 Provision spciale de rvaluation 7872 FR -78727 Plus-values rinvesties 7872 FR -7873 Reprises sur provisions rglementes (stocks) 78 FR -7874 Reprises sur autres provisions rglementes 78 FR -7875 Reprises sur provisions pour risques et charges exceptionnels 78 FR -7876 Reprises sur provisions pour dprciations exceptionnelles 78 FR -791 Transferts de charges d'exploitation 7 FR -796 Transferts de charges financires 7 FR -797 Transferts de charges exceptionnelles 7 FR -8 Comptes spciaux 0 FR -80 Engagements hors bilan 8 FR -801 Engagements donns par l'entit 80 FR -8011 Avals, cautions, garanties 801 FR -8014 Effets circulant sous l'endos de l'entit 801 FR -8016 Redevances crdit-bail restant courir 801 FR -80161 Crdit-bail mobilier 8016 FR -80165 Crdit-bail immobilier 8016 FR -8018 Autres engagements donns 801 FR -802 Engagements reus par l'entit 80 FR -8021 Avals, cautions, garanties 802 FR -8024 Crances escomptes non chues 802 FR -8026 Engagements reus pour utilisation en crdit-bail 802 FR -80261 Crdit-bail mobilier 8026 FR -80265 Crdit-bail immobilier 8026 FR -8028 Autres engagements reus 802 FR -809 Contrepartie des engagements 80 FR -8091 Contrepartie 801 809 FR -8092 Contrepartie 802 809 FR -88 Rsultat en instance d'affectation 8 FR -89 Bilan 8 FR -890 Bilan d'ouverture 89 FR -891 Bilan de clture 89 FR -9 Comptes analytiques 0 FR -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/developpe-perso/fr_plan_developpe_perso_comptes-defaut.sql b/sources/contrib/comptabilite-francaise/developpe-perso/fr_plan_developpe_perso_comptes-defaut.sql deleted file mode 100644 index 0f56384..0000000 --- a/sources/contrib/comptabilite-francaise/developpe-perso/fr_plan_developpe_perso_comptes-defaut.sql +++ /dev/null @@ -1,27 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007-09-08 02:49 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: parm_code; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY parm_code (p_code, p_value, p_comment) FROM stdin; -BANQUE 512 Poste comptable par dfaut pour les banques -COMPTE_COURANT 514 Poste comptable par dfaut pour le compte courant -CAISSE 531 Poste comptable par dfaut pour les caisses -CUSTOMER 411 Poste comptable par dfaut pour les clients -VENTE 7071 Poste comptable par dfaut pour les ventes -VIREMENT_INTERNE 58 Poste comptable par dfaut pour les virements internes -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/developpe-perso/fr_plan_developpe_perso_tva.sql b/sources/contrib/comptabilite-francaise/developpe-perso/fr_plan_developpe_perso_tva.sql deleted file mode 100644 index 9a3adda..0000000 --- a/sources/contrib/comptabilite-francaise/developpe-perso/fr_plan_developpe_perso_tva.sql +++ /dev/null @@ -1,44 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007/10/23 22:23 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tva_rate; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) FROM stdin; -101 TVAFranceNormal 0.196 TVA 19,6% - France mtropolitaine - Taux normal 445661,44571 -102 TVAFranceRduit 0.055 TVA 5,5% - France mtropolitaine - Taux rduit 445662,44571 -103 TVAFranceSuperRduit 0.021 TVA 2,1% - France mtropolitaine - Taux super rduit 445663,44571 -104 TVAFranceImmos 0.196 TVA 19,6% - France mtropolitaine - Taux immobilisations 44562,44571 -105 TVAFranceAnciens 0 TVA x% - France mtropolitaine - Taux anciens 4456,44571 -201 TVADomNormal 0.085 TVA 8,5% - DOM - Taux normal 4456,44571 -202 TVADomNPR 0.085 TVA 8,5% - DOM - Taux normal NPR 4456,44571 -203 TVADomRduit 0.021 TVA 2,1% - DOM - Taux rduit 4456,44571 -204 TVADom-I 0.0175 TVA 1,75% - DOM - Taux I 4456,44571 -205 TVADomPresse 0.0105 TVA 1,05% - DOM - Taux publications de presse 4456,44571 -206 TVADomOctroi 0 TVA x% - DOM - Taux octroi de mer 4456,44571 -207 TVADomImmos 0 TVA x% - DOM - Taux immobilisations 44562,44571 -301 TVACorse-I 0.13 TVA 13% - Corse - Taux I 4456,44571 -302 TVACorse-II 0.08 TVA 8% - Corse - Taux II 4456,44571 -303 TVACorse-III 0.021 TVA 2,1% - Corse - Taux III 4456,44571 -304 TVACorse-IV 0.009 TVA 0,9% - Corse - Taux IV 4456,44571 -305 TVACorseImmos 0 TVA x% - Corse - Taux immobilisations 44562,44571 -401 TVAacquisIntracom 0 TVA x% - Acquisitions intracommunautaires/Pays 4456,44571 -402 TVAacquisIntracomImmos 0 TVA x% - Acquisitions intracommunautaires immobilisations/Pays 44562,44571 -501 TVAfranchise 0 TVA x% - Non imposable : Achats en franchise -502 TVAexport 0 TVA x% - Non imposable : Exports hors CE/Pays -503 TVAautres 0 TVA x% - Non imposable : Autres oprations -504 TVAlivrIntracom 0 TVA x% - Non imposable : Livraisons intracommunautaires/Pays -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/developpe-strict/fr_plan_developpe.sql b/sources/contrib/comptabilite-francaise/developpe-strict/fr_plan_developpe.sql deleted file mode 100644 index fac6ca8..0000000 --- a/sources/contrib/comptabilite-francaise/developpe-strict/fr_plan_developpe.sql +++ /dev/null @@ -1,906 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007-09-08 01:10 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tmp_pcmn; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_country) FROM stdin; -1 comptes de capitaux 0 FR -10 capital et rserves 1 FR -1011 Capital souscrit - non appel 10 FR -1012 Capital souscrit - appel, non vers 10 FR -1013 Capital souscrit - appel, vers 10 FR -10131 Capital non amorti 1013 FR -10132 Capital amorti 1013 FR -1018 Capital souscrit soumis des rglementations particulires 10 FR -104 Primes lies au capital social 10 FR -1041 Primes d'mission 104 FR -1042 Primes de fusion 104 FR -1043 Primes d'apport 104 FR -1044 Primes de conversion d'obligations en actions 104 FR -1045 Bons de souscription d'actions 104 FR -1051 Rserve spciale de rvaluation 10 FR -1052 Ecart de rvaluation libre 10 FR -1053 Rserve de rvaluation 10 FR -1055 Ecarts de ravaluation (autres oprations lgales) 10 FR -1057 Autres carts de rvaluation en France 10 FR -1058 Autres carts de rvaluation l'Etranger 10 FR -106 Rserves 10 FR -10611 Rserve lgale proprement dite 106 FR -10612 Plus-values nettes long terme 106 FR -1062 Rserves indisponibles 106 FR -10641 Plus-values nettes long terme 106 FR -10643 Rserves conscutives l'octroi de subventions d'investissement 106 FR -10648 Autres rserves rglementes 106 FR -10681 Rserve de propre assureur 106 FR -10688 Rserves diverses 106 FR -107 Ecart d'quivalence 10 FR -109 Actionnaires: Capital souscrit - non appel 10 FR -11 report a nouveau (solde crditeur ou dbiteur) 1 FR -110 Report nouveau (solde crditeur) 11 FR -119 Report nouveau (solde dbiteur) 11 FR -120 Rsultat de l'exercice (bnfice) 1 FR -129 Rsultat de l'exercice (perte) 1 FR -13 subventions d'investissement 1 FR -131 Subventions d'quipement 13 FR -1311 Etat 131 FR -1312 Rgions 131 FR -1313 Dpartements 131 FR -1314 Communes 131 FR -1315 Collectivits publiques 131 FR -1316 Entreprises publiques 131 FR -1317 Entreprises et organismes privs 131 FR -1318 Autres 131 FR -138 Autres subventions d'investissement (mme ventilation que celle du compte 131) 13 FR -139 Subventions d'investissement inscrites au compte de rsultat 13 FR -1391 Subventions d'quipement 139 FR -13911 Etat 1391 FR -13912 Rgions 1391 FR -13913 Dpartements 1391 FR -13914 Communes 1391 FR -13915 Collectivits publiques 1391 FR -13916 Entreprises publiques 1391 FR -13917 Entreprises et organismes privs 1391 FR -13918 Autres 1391 FR -1398 Autres subventions d'investissement (mme ventilation que celle du compte 1391) 139 FR -14 provisions reglementees 1 FR -142 Provisions rglementes relatives aux immobilisations 14 FR -1423 Provisions pour reconstitution des gisements miniers et ptroliers 142 FR -1424 Provisions pour investissement (participation des salaris) 142 FR -143 Provisions rglementes relatives aux stocks 14 FR -1431 Hausse des prix 143 FR -1432 Fluctuation des cours 143 FR -144 Provisions rglementes relatives aux autres lments de l'actif 14 FR -151 Provisions pour risques 1 FR -1511 Provisions pour litiges 151 FR -1512 Provisions pour garanties donnes aux clients 151 FR -1513 Provisions pour pertes sur marchs terme 151 FR -1514 Provisions pour amendes et pnalits 151 FR -1515 Provisions pour pertes de change 151 FR -1518 Autres provisions pour risques 151 FR -153 Provisions pour pensions et obligations similaires 1 FR -155 Provisions pour impts 1 FR -156 Provisions pour renouvellement des immobilisations (entreprises concessionnaires) 1 FR -157 Provisions pour charges rpartir sur plusieurs exercices 1 FR -1572 Provisions pour grosses rparations 157 FR -158 Autres provisions pour charges 1 FR -1582 Provisions pour charges sociales et fiscales sur congs payer 158 FR -161 Emprunts obligataires convertibles 1 FR -163 Autres emprunts obligataires 1 FR -164 Emprunts auprs des tablissements de crdit 1 FR -165 Dpts et cautionnements reus 1 FR -1651 Dpts 165 FR -1655 Cautionnements 165 FR -166 Participation des salaris aux rsultats 1 FR -1661 Comptes bloqus 166 FR -1662 Fonds de participation 166 FR -167 Emprunts et dettes assortis de conditions particulires 1 FR -1671 Emissions de titres participatifs 167 FR -1674 Avances conditionnes de l'Etat 167 FR -1675 Emprunts participatifs 167 FR -168 Autres emprunts et dettes assimiles 1 FR -1681 Autres emprunts 168 FR -1685 Rentes viagres capitalises 168 FR -1687 Autres dettes 168 FR -1688 Intrts courus 168 FR -16881 Sur emprunts obligataires convertibles 168 FR -16883 Sur autres emprunts obligataires 168 FR -16884 Sur emprunts auprs des tablissements de crdit 168 FR -16885 Sur dpts et cautionnements reus 168 FR -16886 Sur participation des salaris aux rsultats 168 FR -16887 Sur emprunts et dettes assortis de conditions particulires 168 FR -16888 Sur autres emprunts et dettes assimiles 168 FR -169 Primes de remboursement des obligations 1 FR -17 dettes rattaches a des participations 1 FR -171 Dettes rattaches des participations (groupe) 17 FR -174 Dettes rattaches des participations (hors groupe) 17 FR -178 Dettes rattaches des socits en participation 17 FR -1781 Principal 178 FR -1788 Intrts courus 178 FR -18 comptes de liaison des tablissements et societes en participation 1 FR -181 Comptes de liaison des tablissements 18 FR -186 Biens et prestations de services changs entre tablissements (charges) 18 FR -187 Biens et prestations de services changs entre tablissements (produits) 18 FR -188 Comptes de liaison des socits en participation 18 FR -2 comptes d'immobilisations 0 FR -2011 Frais de constitution 2 FR -2012 Frais de premier tablissement 2 FR -20121 Frais de prospection 2 FR -20122 Frais de publicit 2 FR -2013 Frais d'augmentation de capital et d'oprations diverses (fusions, scissions, transformations) 2 FR -203 Frais de recherche et de dveloppement 2 FR -205 Concessions et droits similaires, brevets, licences, marques, procds, logiciels, droits et valeurs similaires 2 FR -211 Terrains 2 FR -2111 Terrains nus 211 FR -2112 Terrains amnags 211 FR -2113 Sous-sols et sur-sols 211 FR -2114 Terrains de gisement 211 FR -21141 Carrires 2114 FR -2115 Terrains btis 211 FR -21151 Ensembles immobiliers industriels (A, B...) 2115 FR -21155 Ensembles immobiliers administratifs et commerciaux (A, B...) 2115 FR -21158 Autres ensembles immobiliers 2115 FR -211581 affects aux oprations professionnelles (A, B...) 21158 FR -211588 affects aux oprations non professionnelles (A, B...) 21158 FR -2116 Compte d'ordre sur immobilisations (art. 6 du dcret n 78-737 du 11 juillet 1978) 211 FR -212 Agencements et amnagements de terrains (mme ventilation que celle du compte 211) 2 FR -213 Constructions 2 FR -2131 Btiments 213 FR -21311 Ensembles immobiliers industriels (A, B...) 2131 FR -21315 Ensembles immobiliers administratifs et commerciaux (A, B...) 2131 FR -21318 Autres ensembles immobiliers 2131 FR -213181 affects aux oprations professionnelles (A, B...) 21318 FR -213188 affects aux oprations non professionnelles (A, B...) 21318 FR -2135 Installations gnrales - agencements - amnagements des constructions (mme ventilation que celle du compte 2131) 213 FR -2138 Ouvrages d'infrastructure 213 FR -21381 Voies de terre 2138 FR -21382 Voies de fer 2138 FR -21383 Voies d'eau 2138 FR -21384 Barrages 2138 FR -21385 Pistes d'arodromes 2138 FR -214 Constructions sur sol d'autrui (mme ventilation que celle du compte 213) 2 FR -215 Installations techniques, matriels et outillage industriels 2 FR -2151 Installations complexes spcialises 215 FR -21511 sur sol propre 2151 FR -21514 sur sol d'autrui 2151 FR -2153 Installations caractre spcifique 215 FR -21531 sur sol propre 2153 FR -21534 sur sol d'autrui 2153 FR -2154 Matriel industriel 215 FR -2155 Outillage industriel 215 FR -2157 Agencements et amnagements du matriel et outillage industriels 215 FR -218 Autres immobilisations corporelles 2 FR -2181 Installations gnrales, agencements, amnagements divers 218 FR -2182 Matriel de transport 218 FR -2183 Matriel de bureau et matriel informatique 218 FR -2184 Mobilier 218 FR -2185 Cheptel 218 FR -2186 Emballages rcuprables 218 FR -22 immobilisations mises en concession 2 FR -231 Immobilisations corporelles en cours 2 FR -2312 Terrains 231 FR -2313 Constructions 231 FR -2315 Installations techniques, matriel et outillage industriels 231 FR -2318 Autres immobilisations corporelles 231 FR -232 Immobilisations incorporelles en cours 2 FR -237 Avances et acomptes verss sur immobilisations incorporelles 2 FR -238 Avances et acomptes verss sur commandes d'immobilisations corporelles 2 FR -2382 Terrains 238 FR -2383 Constructions 238 FR -2385 Installations techniques, matriel et outillage industriels 238 FR -2388 Autres immobilisations corporelles 238 FR -25 Parts dans des entreprises lies et crances sur des entreprises lies 2 FR -26 Participations et crances rattaches des participations 2 FR -261 Titres de participation 26 FR -2611 Actions 261 FR -2618 Autres titres 261 FR -266 Autres formes de participation 26 FR -267 Crances rattaches des participations 26 FR -2671 Crances rattaches des participations (groupe) 267 FR -2674 Crances rattaches des participations (hors groupe) 267 FR -2675 Versements reprsentatifs d'apports non capitaliss (appel de fonds) 267 FR -2676 Avances consolidables 267 FR -2677 Autres crances rattaches des participations 267 FR -2678 Intrts courus 267 FR -268 Crances rattaches des socits en participation 26 FR -2681 Principal 268 FR -2688 Intrts courus 268 FR -269 Versements restant effectuer sur titres de participation non librs 26 FR -271 Titres immobiliss autres que les titres immobiliss de l'activit de portefeuille (droit de proprit) 2 FR -2711 Actions 271 FR -2718 Autres titres 271 FR -272 Titres immobiliss (droit de crance) 2 FR -2721 Obligations 272 FR -2722 Bons 272 FR -273 Titres immobiliss de l'activit de portefeuille 2 FR -274 Prts 2 FR -2741 Prts participatifs 274 FR -2742 Prts aux associs 274 FR -2743 Prts au personnel 274 FR -2748 Autres prts 274 FR -275 Dpts et cautionnements verss 2 FR -2751 Dpts 275 FR -2755 Cautionnements 275 FR -276 Autres crances immobilises 2 FR -2761 Crances diverses 276 FR -2768 Intrts courus 276 FR -27682 Sur titres immobiliss (droit de crance) 2768 FR -27684 Sur prts 2768 FR -27685 Sur dpts et cautionnements 2768 FR -27688 Sur crances diverses 2768 FR -277 (Actions propres ou parts propres) 2 FR -2771 Actions propres ou parts propres 277 FR -2772 Actions propres ou parts propres en voie dannulation 277 FR -279 Versements restant effectuer sur titres immobiliss non librs 2 FR -28 amortissements des immobilisations 2 FR -2801 Frais d'tablissement (mme ventilation que celle du compte 201) 28 FR -2803 Frais de recherche et de dveloppement 28 FR -2805 Concessions et droits similaires, brevets, licences, logiciels, droits et valeurs similaires 28 FR -2807 Fonds commercial 28 FR -2808 Autres immobilisations incorporelles 28 FR -2811 Terrains de gisement 28 FR -2812 Agencements, amnagements de terrains (mme ventilation que celle du compte 212) 28 FR -2813 Constructions (mme ventilation que celle du compte 213) 28 FR -2814 Constructions sur sol d'autrui (mme ventilation que celle du compte 214) 28 FR -2815 Installations, matriel et outillage industriels (mme ventilation que celle du compte 215) 28 FR -2818 Autres immobilisations corporelles (mme ventilation que celle du compte 218) 28 FR -282 Amortissements des immobilisations mises en concession 28 FR -29 provisions pour dprciation des immobilisations 2 FR -2905 Marques, procds, droits et valeurs similaires 29 FR -2906 Droit au bail 29 FR -2907 Fonds commercial 29 FR -2908 Autres immobilisations incorporelles 29 FR -2911 Terrains (autres que terrains de gisement) 29 FR -292 Provisions pour dprciation des immobilisations mises en concession 29 FR -293 Provisions pour dprciation des immobilisations en cours 29 FR -2931 Immobilisations corporelles en cours 293 FR -2932 Immobilisations incorporelles en cours 293 FR -296 Provisions pour dprciation des participations et crances rattaches des participations 29 FR -2961 Titres de participation 296 FR -2966 Autres formes de participation 296 FR -2967 Crances rattaches des participations (mme ventilation que celle du compte 267) 296 FR -2968 Crances rattaches des socits en participation (mme ventilation que celle du compte 268) 296 FR -2971 Titres immobiliss autres que les titres immobiliss de l'activit de portefeuille -droit de proprit (mme ventilation que celle du compte 271) 29 FR -2972 Titres immobiliss - droit de crance (mme ventilation que celle du compte 272) 29 FR -2973 Titres immobiliss de l'activit de portefeuille 29 FR -2974 Prts (mme ventilation que celle du compte 274) 29 FR -2975 Dpts et cautionnements verss (mme ventilation que celle du compte 275) 29 FR -2976 Autres crances immobilises (mme ventilation que celle du compte 276) 29 FR -3 comptes de stocks et en cours 0 FR -311 Matires (ou groupe) A 3 FR -312 Matires (ou groupe) B 3 FR -317 Fournitures A, B, C, ... 3 FR -321 Matires consommables 3 FR -3211 Matires (ou groupe) C 321 FR -3212 Matires (ou groupe) D 321 FR -322 Fournitures consommables 3 FR -3221 Combustibles 322 FR -3222 Produits d'entretien 322 FR -3223 Fournitures d'atelier et d'usine 322 FR -3224 Fournitures de magasin 322 FR -3225 Fournitures de bureau 322 FR -326 Emballages 3 FR -3261 Emballages perdus 326 FR -3265 Emballages rcuprables non identifiables 326 FR -3267 Emballages usage mixte 326 FR -331 Produits en cours 3 FR -3311 Produits en cours P 1 331 FR -3312 Produits en cours P 2 331 FR -335 Travaux en cours 3 FR -3351 avaux en cours T 1 335 FR -3352 Travaux en cours T 2 335 FR -341 Etudes en cours 3 FR -3411 Etudes en cours E 1 341 FR -3412 Etudes en cours E 2 341 FR -345 Prestations de services en cours 3 FR -3451 Prestations de services S 1 345 FR -3452 Prestations de services S 2 345 FR -351 Produits intermdiaires 3 FR -3511 Produits intermdiaires (ou groupe) A 351 FR -3512 Produits intermdiaires (ou groupe) B 351 FR -355 Produits finis 3 FR -3551 Produits finis (ou groupe) A 355 FR -3552 Produits finis (ou groupe) B 355 FR -358 Produits rsiduels (ou matires de rcupration) 3 FR -3581 Dchets 358 FR -3585 Rebuts 358 FR -3586 Matires de rcupration 358 FR -36 (compte ouvrir, le cas chant, sous l'intitul "stocks provenant d'immobilisations") 3 FR -371 Marchandises (ou groupe) A 3 FR -372 Marchandises (ou groupe) B 3 FR -38 (lorsque l'entit tient un inventaire permanent en comptabilit gnrale, le compte 38 peut tre utilis pour comptabiliser les stocks en voie d'acheminement, mis en dpt ou donns en consignation) 3 FR -39 provisions pour dprciation des stocks et en-cours 3 FR -3911 Matires (ou groupe) A 39 FR -3912 Matires (ou groupe) B 39 FR -3917 Fournitures A, B, C, ... 39 FR -3921 Matires consommables (mme ventilation que celle du compte 321) 39 FR -3922 Fournitures consommables (mme ventilation que celle ducompte 322) 39 FR -3926 Emballages (mme ventilation que celle du compte 326) 39 FR -3931 Produits en cours (mme ventilation que celle du compte 331) 39 FR -3935 Travaux en cours (mme ventilation que celle du compte 335) 39 FR -3941 Etudes en cours (mme ventilation que celle du compte 341) 39 FR -3945 Prestations de services en cours (mme ventilation que celle du compte 345) 39 FR -3951 Produits intermdiaires (mme ventilation que celle du compte 351) 39 FR -3955 Produits finis (mme ventilation que celle du compte 355) 39 FR -3971 Marchandise (ou groupe) A 39 FR -3972 Marchandise (ou groupe) B 39 FR -4 comptes de tiers 0 FR -40 fournisseurs et comptes rattaches 4 FR -401 Fournisseurs 40 FR -4011 Fournisseurs - Achats de biens et prestations de services 401 FR -4017 Fournisseurs - Retenues de garantie 401 FR -403 Fournisseurs - Effets payer 40 FR -404 Fournisseurs d'immobilisations 40 FR -4041 Fournisseurs - Achats d'immobilisations 404 FR -4047 Fournisseurs d'immobilisations - Retenues de garantie 404 FR -405 Fournisseurs d'immobilisations - Effets payer 40 FR -408 Fournisseurs - Factures non parvenues 40 FR -4081 Fournisseurs 408 FR -4084 Fournisseurs d'immobilisations 408 FR -4088 Fournisseurs - Intrts courus 408 FR -4091 Fournisseurs - Avances et acomptes verss sur commandes 40 FR -4096 Fournisseurs - Crances pour emballages et matriel rendre 40 FR -4097 Fournisseurs - Autres avoirs 40 FR -40971 Fournisseurs d'exploitation 4097 FR -40974 Fournisseurs d'immobilisations 4097 FR -4098 Rabais, remises, ristournes obtenir et autres avoirs non encore reus 40 FR -41 clients et comptes rattaches 4 FR -411 Clients 41 FR -4111 Clients - Ventes de biens ou de prestations de services 411 FR -4117 Clients - Retenues de garantie 411 FR -413 Clients - Effets recevoir 41 FR -416 Clients douteux ou litigieux 41 FR -417 "Crances" sur travaux non encore facturables 41 FR -418 Clients - Produits non encore facturs 41 FR -4181 Clients - Factures tablir 418 FR -4188 Clients - Intrts courus 418 FR -4191 Clients - Avances et acomptes reus sur commandes 41 FR -4196 Clients - Dettes sur emballages et matriels consigns 41 FR -4197 Clients - Autres avoirs 41 FR -4198 Rabais, remises, ristournes accorder et autres avoirs tablir 41 FR -42 Personnel et comptes rattaches 4 FR -422 Comits d'entreprises, d'tablissement,... 42 FR -424 Participation des salaris aux rsultats 42 FR -4246 Rserve spciale (art. L. 442-2 du Code du travail) 424 FR -4248 Comptes courants 424 FR -425 Personnel - Avances et acomptes 42 FR -426 Personnel - Dpts 42 FR -427 Personnel - Oppositions 42 FR -4282 Dettes provisionnes pour congs payer 42 FR -4284 Dettes provisionnes pour participation des salaris aux rsultats 42 FR -4286 Autres charges payer 42 FR -4287 Produits recevoir 42 FR -431 Scurit sociale 4 FR -437 Autres organismes sociaux 4 FR -438 Organismes sociaux - Charges payer et produits recevoir 4 FR -4382 Charges sociales sur congs payer 438 FR -4386 Autres charges payer 438 FR -4387 Produits recevoir 438 FR -44 tat et autres collectivits publiques 4 FR -441 tat - Subventions recevoir 44 FR -4411 Subventions d'investissement 441 FR -4417 Subventions d'exploitation 441 FR -4418 Subventions d'quilibre 441 FR -4419 Avances sur subventions 441 FR -442 Etat - Impts et taxes recouvrables sur des tiers 44 FR -4424 Obligataires 442 FR -4425 Associs 442 FR -443 Oprations particulires avec l'Etat les collectivits publiques, les organismes internationaux 44 FR -4431 Crances sur l'Etat rsultant de la suppression de la rgle du dcalage d'un mois en matire de T.V.A. 443 FR -4438 Intrts courus sur crances figurant au 4431 443 FR -4452 T.V.A. due intracommunautaire 44 FR -4455 Taxes sur le chiffre d'affaires dcaisser 44 FR -44551 T.V.A. dcaisser 4455 FR -44558 Taxes assimiles la T.V.A. 4455 FR -4456 Taxes sur le chiffre d'affaires dductibles 44 FR -44562 T.V.A. sur immobilisations 4456 FR -44563 T.V.A. transfre par d'autres entreprises 4456 FR -44566 T.V.A. sur autres biens et services 4456 FR -44567 Crdit de T.V.A. reporter 4456 FR -44568 Taxes assimiles la T.V.A. 4456 FR -4457 Taxes sur le chiffre d'affaires collectes par l'entreprise 44 FR -44571 T.V.A. collecte 4457 FR -44578 Taxes assimiles la T.V.A. 4457 FR -4458 Taxes sur le chiffre d'affaires rgulariser ou en attente 44 FR -44581 Acomptes - Rgime simplifi d'imposition 4458 FR -44582 Acomptes - Rgime de forfait 4458 FR -44583 Remboursement de taxes sur le chiffre d'affaires demand 4458 FR -44584 T.V.A. rcupre d'avance 4458 FR -44586 Taxes sur le chiffre d'affaires sur factures non parvenues 4458 FR -44587 Taxes sur le chiffres d'affaires sur factures tablir 4458 FR -446 Obligations cautionnes 44 FR -448 Etat - Charges payer et produits recevoir 44 FR -4482 Charges fiscales sur congs payer 448 FR -4486 Charges payer 448 FR -4487 Produits recevoir 448 FR -451 Groupe 4 FR -4551 Principal 4 FR -4558 Intrts courus 4 FR -456 Associs - Oprations sur le capital 4 FR -4561 Associs - Comptes d'apport en socit 456 FR -45611 Apports en nature 4561 FR -45615 Apports en numraire 4561 FR -4562 Apporteurs - Capital appel, non vers 456 FR -45621 Actionnaires - Capital souscrit et appel, non vers 4562 FR -45625 Associs - Capital appel, non vers 4562 FR -4563 Associs - Versements reus sur augmentation de capital 456 FR -4564 Associs - Versements anticips 456 FR -4566 Actionnaires dfaillants 456 FR -4567 Associs - Capital rembourser 456 FR -457 Associs - Dividendes payer 4 FR -458 Associs - Oprations faites en commun et en G.I.E. 4 FR -4581 Oprations courantes 458 FR -4588 Intrts courus 458 FR -462 Crances sur cessions d'immobilisations 4 FR -464 Dettes sur acquisitions de valeurs mobilires de placement 4 FR -465 Crances sur cessions de valeurs mobilires de placement 4 FR -467 Autres comptes dbiteurs ou crditeurs 4 FR -468 Divers - Charges payer et produits recevoir 4 FR -4686 Charges payer 468 FR -4687 Produits recevoir 468 FR -471 Comptes d'attente 4 FR -472 Comptes d'attente 4 FR -473 Comptes d'attente 4 FR -474 Comptes d'attente 4 FR -475 Comptes d'attente 4 FR -476 Diffrence de conversion - Actif 4 FR -4761 Diminution des crances 476 FR -4762 Augmentation des dettes 476 FR -4768 Diffrences compenses par couverture de change 476 FR -477 Diffrences de conversion - Passif 4 FR -4771 Augmentation des crances 477 FR -4772 Diminution des dettes 477 FR -4778 Diffrences compenses par couverture de change 477 FR -478 Autres comptes transitoires 4 FR -48 comptes de rgularisation 4 FR -4811 Charges diffres 48 FR -4812 Frais d'acquisition des immobilisations 481 FR -4816 Frais d'mission des emprunts 481 FR -4818 Charges taler 481 FR -488 Comptes de rpartition priodique des charges et des produits 48 FR -4886 Charges 48 FR -4887 Produits 48 FR -49 provisions pour dprciation des comptes de tiers 4 FR -495 Provisions pour dprciation des comptes du groupe et des associs 49 FR -4951 Comptes du groupe 495 FR -4955 Comptes courants des associs 495 FR -4958 Oprations faites en commun et en G.I.E. 495 FR -4962 Crances sur cessions d'immobilisations 49 FR -4965 Crances sur cessions de valeurs mobilires de placement 49 FR -4967 Autres comptes dbiteurs 49 FR -5 comptes financiers 0 FR -501 Parts dans des entreprises lies 5 FR -502 Actions propres 5 FR -503 Actions 5 FR -5031 Titres cots 503 FR -5035 Titres non cots 503 FR -504 Autres titres confrant un droit de proprit 5 FR -505 Obligations et bons mis par la socit et rachets par elle 5 FR -506 Obligations 5 FR -5061 Titres cots 506 FR -5065 Titres non cots 506 FR -507 Bons du Trsor et bons de caisse court terme 5 FR -508 Autres valeurs mobilires de placement et autres crances assimiles 5 FR -5081 Autres valeurs mobilires 508 FR -5082 Bons de souscription 508 FR -5088 Intrts courus sur obligations, bons et valeurs assimils 508 FR -509 Versements restant effectuer sur valeurs mobilires de placement non libres 5 FR -511 Valeurs l'encaissement 5 FR -5111 Coupons chus l'encaissement 511 FR -5112 Chques encaisser 511 FR -5113 Effets l'encaissement 511 FR -5114 Effets l'escompte 511 FR -512 Banques 5 FR -5121 Comptes en monnaie nationale 512 FR -5124 Comptes en devises 512 FR -514 Chques postaux 5 FR -515 "Caisses" du Trsor et des tablissements publics 5 FR -516 Socits de bourse 5 FR -517 Autres organismes financiers 5 FR -518 Intrts courus 5 FR -5181 Intrts courus payer 518 FR -5188 Intrts courus recevoir 518 FR -519 Concours bancaires courants 5 FR -5191 Crdit de mobilisation de crances commerciales (CMCC) 519 FR -5193 Mobilisation de crances nes l'tranger 519 FR -5198 Intrts courus sur concours bancaires courants 519 FR -52 Instruments de trsorerie 5 FR -531 Caisse sige social 5 FR -5311 Caisse en monnaie nationale 531 FR -5314 Caisse en devises 531 FR -532 Caisse succursale (ou usine) A 5 FR -533 Caisse succursale (ou usine) B 5 FR -59 provisions pour dprciation des comptes financiers 5 FR -5903 Actions 59 FR -5904 Autres titres confrant un droit de proprit 59 FR -5906 Obligations 59 FR -5908 Autres valeurs mobilires de placement et crances assimiles 59 FR -6 comptes de charges 0 FR -601 Achats stocks - Matires premires (et fournitures) 6 FR -6011 Matires (ou groupe) A 601 FR -6012 Matires (ou groupe) B 601 FR -6017 Fournitures A, B, C, ... 601 FR -602 Achats stocks - Autres approvisionnements 6 FR -6021 Matires consommables 602 FR -60211 Matires (ou groupe) C 6021 FR -60212 Matires (ou groupe) D 6021 FR -6022 Fournitures consommables 602 FR -60221 Combustibles 6022 FR -60222 Produits d'entretien 6022 FR -60223 Fournitures d'atelier et d'usine 6022 FR -60224 Fournitures de magasin 6022 FR -60225 Fourniture de bureau 6022 FR -6026 Emballages 602 FR -60261 Emballages perdus 6026 FR -60265 ballages rcuprables non identifiables 6026 FR -60267 Emballages usage mixte 6026 FR -604 Achats d'tudes et prestations de services 6 FR -605 Achats de matriel, quipements et travaux 6 FR -606 Achats non stocks de matire et fournitures 6 FR -6061 Fournitures non stockables (eau, nergie, ...) 606 FR -6063 Fournitures d'entretien et de petit quipement 606 FR -6064 Fournitures administratives 606 FR -6068 Autres matires et fournitures 606 FR -607 Achats de marchandises 6 FR -6071 Marchandise (ou groupe) A 607 FR -6072 Marchandise (ou groupe) B 607 FR -608 (Compte rserv, le cas chant, la rcapitulation des frais accessoires incorpors aux achats) 6 FR -609 Rabais, remises et ristournes obtenus sur achats 6 FR -6091 de matires premires (et fournitures) 609 FR -6092 d'autres approvisionnements stocks 609 FR -6094 d'tudes et prestations de services 609 FR -6095 de matriel, quipements et travaux 609 FR -6096 d'approvisionnements non stocks 609 FR -6097 de marchandises 609 FR -6098 Rabais, remises et ristournes non affects 609 FR -6031 Variation des stocks de matires premires (et fournitures) 6 FR -6032 Variation des stocks des autres approvisionnements 6 FR -6037 Variation des stocks de marchandises 6 FR -61 autres charges externes - Services extrieurs 6 FR -611 Sous-traitance gnrale 61 FR -612 Redevances de crdit-bail 61 FR -6122 Crdit-bail mobilier 612 FR -6125 Crdit-bail immobilier 612 FR -613 Locations 61 FR -6132 Locations immobilires 613 FR -6135 Locations mobilires 613 FR -6136 Malis sur emballages 613 FR -614 Charges locatives et de coproprit 61 FR -615 Entretien et rparations 61 FR -6152 sur biens immobiliers 615 FR -6155 sur biens mobiliers 615 FR -6156 Maintenance 615 FR -616 Primes d'assurances 61 FR -6161 Multirisques 616 FR -6162 Assurance obligatoire dommage construction 616 FR -6163 Assurance-transport 616 FR -61636 sur achats 6163 FR -61637 sur ventes 6163 FR -61638 sur autres biens 6163 FR -6164 Risques d'exploitation 616 FR -6165 Insolvabilit clients 616 FR -617 Etudes et recherches 61 FR -618 Divers 61 FR -6181 Documentation gnrale 618 FR -6183 Documentation technique 618 FR -6185 Frais de colloques, sminaires, confrences 618 FR -619 Rabais, remises et ristournes obtenus sur services extrieurs 61 FR -62 autres charges externes - Autres services extrieurs 6 FR -621 Personnel extrieur l'entreprise 62 FR -6211 Personnel intrimaire 621 FR -6214 Personnel dtach ou prt l'entreprise 621 FR -622 Rmunrations d'intermdiaires et honoraires 62 FR -6221 Commissions et courtages sur achats 622 FR -6222 Commissions et courtages sur ventes 622 FR -6224 Rmunrations des transitaires 622 FR -6225 Rmunrations d'affacturage 622 FR -6226 Honoraires 622 FR -6227 Frais d'actes et de contentieux 622 FR -6228 Divers 622 FR -623 Publicit, publications, relations publiques 62 FR -6231 Annonces et insertions 623 FR -6232 Echantillons 623 FR -6233 Foires et expositions 623 FR -6234 Cadeaux la clientle 623 FR -6235 Primes 623 FR -6236 Catalogues et imprims 623 FR -6237 Publications 623 FR -6238 Divers (pourboires, dont courant, ...) 623 FR -624 Transports de biens et transports collectifs du personnel 62 FR -6241 Transports sur achats 624 FR -6242 Transports sur ventes 624 FR -6243 Transports entre tablissements ou chantiers 624 FR -6244 Transports administratifs 624 FR -6247 Transports collectifs du personnel 624 FR -6248 Divers 624 FR -625 Dplacements, missions et rceptions 62 FR -6251 Voyages et dplacements 625 FR -6255 Frais de dmnagement 625 FR -6256 Missions 625 FR -6257 Rceptions 625 FR -626 Frais postaux et de tlcommunications 62 FR -627 Services bancaires et assimils 62 FR -6271 Frais sur titres (achat, vente, garde) 627 FR -6272 Commissions et frais sur mission d'emprunts 627 FR -6275 Frais sur effets 627 FR -6276 Location de coffres 627 FR -6278 Autres frais et commissions sur prestations de services 627 FR -628 Divers 62 FR -6281 Concours divers (cotisations, ...) 628 FR -6284 Frais de recrutement de personnel 628 FR -629 Rabais, remises et ristournes obtenus sur autres services extrieurs 62 FR -631 Impts, taxes et versements assimils sur rmunrations (administrations des impts) 6 FR -6311 Taxe sur les salaires 631 FR -6312 Taxe d'apprentissage 631 FR -6313 Participation des employeurs la formation professionnelle continue 631 FR -6314 Cotisation pour dfaut d'investissement obligatoire dans la construction 631 FR -6318 Autres 631 FR -633 Impts, taxes et versements assimils sur rmunrations (autres organismes) 6 FR -6331 Versement de transport 633 FR -6332 Allocations logement 633 FR -6333 Participation des employeurs la formation professionnelle continue 633 FR -6334 Participation des employeurs l'effort de construction 633 FR -6335 Versements libratoires ouvrant droit l'exonration de la taxe d'apprentissage 633 FR -6338 Autres 633 FR -635 Autres impts, taxes et versements assimils (administrations des impts) 6 FR -6351 Impts directs (sauf impts sur les bnfices) 635 FR -63511 Taxe professionnelle 6351 FR -63512 Taxes foncires 6351 FR -63513 Autres impts locaux 6351 FR -63514 Taxe sur les vhicules des socits 6351 FR -6352 Taxe sur le chiffre d'affaires non rcuprables 635 FR -6353 Impts indirects 635 FR -6354 Droits d'enregistrement et de timbre 635 FR -63541 Droits de mutation 6354 FR -6358 Autres droits 635 FR -637 Autres impts, taxes et versements assimils (autres organismes) 6 FR -6371 Contribution sociale de solidarit la charge des socits 637 FR -6372 Taxes perues par les organismes publics internationaux 637 FR -6374 Impts et taxes exigibles l'Etranger 637 FR -6378 Taxes diverses 637 FR -64 Charges de personnel 6 FR -6411 Salaires, appointements 64 FR -6412 Congs pays 641 FR -6413 Primes et gratifications 641 FR -6414 Indemnits et avantages divers 641 FR -6415 Supplment familial 641 FR -6451 Cotisations l'URSSAF 64 FR -6452 Cotisations aux mutuelles 64 FR -6453 Cotisations aux caisses de retraites 64 FR -6454 Cotisations aux ASSEDIC 64 FR -6458 Cotisations aux autres organismes sociaux 64 FR -647 Autres charges sociales 64 FR -6471 Prestations directes 647 FR -6472 Versements aux comits d'entreprise et d'tablissement 647 FR -6473 Versements aux comits d'hygine et de scurit 647 FR -6474 Versements aux autres uvres sociales 647 FR -6475 Mdecine du travail, pharmacie 647 FR -648 Autres charges de personnel 64 FR -651 Redevances pour concessions, brevets, licences, marques, procds, logiciels, droits et valeurs similaires 6 FR -6511 Redevances pour concessions, brevets, licences, marques, procds, logiciels 651 FR -6516 Droits d'auteur et de reproduction 651 FR -6518 Autres droits et valeurs similaires 651 FR -653 Jetons de prsence 6 FR -654 Pertes sur crances irrcouvrables 6 FR -6541 Crances de l'exercice 654 FR -6544 Crances des exercices antrieurs 654 FR -655 Quotes-parts de rsultat sur oprations faites en commun 6 FR -6551 Quote-part de bnfice transfre (comptabilit du grant) 655 FR -6555 Quote-part de perte supporte (comptabilit des associs non grants) 655 FR -658 Charges diverses de gestion courante 6 FR -661 Charges d'intrts 6 FR -6611 Intrts des emprunts et dettes 661 FR -66116 des emprunts et dettes assimiles 6611 FR -66117 des dettes rattaches des participations 6611 FR -6615 Intrts des comptes courants et des dpts crditeurs 661 FR -6616 Intrts bancaires et sur oprations de financement (escompte,...) 661 FR -6617 Intrts des obligations cautionnes 661 FR -6618 Intrts des autres dettes 661 FR -66181 des dettes commerciales 6618 FR -66188 des dettes diverses 66188 FR -664 Pertes sur crances lies des participations 6 FR -665 Escomptes accords 6 FR -666 Pertes de change 6 FR -667 Charges nettes sur cessions de valeurs mobilires de placement 6 FR -668 Autres charges financires 6 FR -671 Charges exceptionnelles sur oprations de gestion 6 FR -6711 Pnalits sur marchs (et ddits pays sur achats et ventes) 671 FR -6712 Pnalits, amendes fiscales et pnales 671 FR -6713 Dons, libralits 671 FR -6714 Crances devenues irrcouvrables dans l'exercice 671 FR -6715 Subventions accordes 671 FR -6717 Rappel d'impts (autres qu'impts sur les bnfices) 671 FR -6718 Autres charges exceptionnelles sur oprations de gestion 671 FR -672 (Compte la disposition des entits pour enregistrer, en cours d'exercice, les charges sur exercices antrieurs) 6 FR -675 Valeurs comptables des lments d'actif cds 6 FR -6751 Immobilisations incorporelles 675 FR -6752 Immobilisations corporelles 675 FR -6756 Immobilisations financires 675 FR -6758 Autres lments d'actif 675 FR -678 Autres charges exceptionnelles 6 FR -6781 Malis provenant de clauses d'indexation 678 FR -6782 Lots 678 FR -6783 Malis provenant du rachat par l'entreprise d'actions et obligations mises par elle-mme 678 FR -6788 Charges exceptionnelles diverses 678 FR -68 Dotations aux amortissements et aux provisions 6 FR -6811 Dotations aux amortissements sur immobilisations incorporelles et corporelles 68 FR -68111 Immobilisations incorporelles 6811 FR -68112 Immobilisations corporelles 6811 FR -6812 Dotations aux amortissements des charges d'exploitation rpartir 68 FR -6815 Dotations aux provisions pour risques et charges d'exploitation 68 FR -6816 Dotations aux provisions pour dprciation des immobilisations incorporelles et corporelles 68 FR -68161 Immobilisations incorporelles 6816 FR -68162 Immobilisations corporelles 6816 FR -6817 Dotations aux provisions pour dprciation des actifs circulants 68 FR -68173 Stocks et en-cours 6817 FR -68174 Crances 6817 FR -6861 Dotations aux amortissements des primes de remboursement des obligations 68 FR -6865 Dotations aux provisions pour risques et charges financiers 68 FR -6866 Dotations aux provisions pour dprciation des lments financiers 68 FR -68662 Immobilisations financires 6866 FR -68665 Valeurs mobilires de placement 6866 FR -6868 Autres dotations 68 FR -6871 Dotations aux amortissements exceptionnels des immobilisations 68 FR -6872 Dotations aux provisions rglementes (immobilisations) 68 FR -68725 Amortissements drogatoires 6872 FR -6873 Dotations aux provisions rglementes (stocks) 68 FR -6874 Dotations aux autres provisions rglementes 68 FR -6875 Dotations aux provisions pour risques et charges exceptionnels 68 FR -6876 Dotations aux provisions pour dprciations exceptionnelles 68 FR -69 participation des salaries - impts sur les benefices et assimiles 6 FR -6951 Impts dus en France 69 FR -6952 Contribution additionnelle l'impt sur les bnfices 69 FR -6954 Impts dus l'tranger 69 FR -696 Supplments d'impt sur les socits lis aux distributions 69 FR -698 Intgration fiscale 69 FR -6981 Intgration fiscale - Charges 698 FR -6989 Intgration fiscale - Produits 698 FR -7 comptes de produits 0 FR -70 ventes de produits fabriques, prestations de services, marchandises 7 FR -7011 Produits finis (ou groupe) A 70 FR -7012 Produits finis (ou groupe) B 70 FR -702 Ventes de produits intermdiaires 70 FR -703 Ventes de produits rsiduels 70 FR -704 Travaux 70 FR -7041 Travaux de catgorie (ou activit) A 704 FR -7042 Travaux de catgorie (ou activit) B 704 FR -705 Etudes 7 FR -7071 Marchandises (ou groupe) A 70 FR -7072 Marchandises (ou groupe) B 70 FR -7081 Produits des services exploits dans l'intrt du personnel 70 FR -7082 Commissions et courtages 70 FR -7083 Locations diverses 70 FR -7084 Mise disposition de personnel facture 70 FR -7085 Ports et frais accessoires facturs 70 FR -7086 Bonis sur reprises d'emballages consigns 70 FR -7087 Bonifications obtenues des clients et primes sur ventes 70 FR -7088 Autres produits d'activits annexes (cessions d'approvisionnements,...) 70 FR -7091 sur ventes de produits finis 70 FR -7092 sur ventes de produits intermdiaires 70 FR -7094 sur travaux 70 FR -7095 sur tudes 70 FR -7096 sur prestations de services 70 FR -7097 sur ventes de marchandises 70 FR -7098 sur produits des activits annexes 70 FR -71 production stocke (ou dstockage) 7 FR -7133 Variation des en-cours de production de biens 71 FR -71331 Produits en cours 7133 FR -71335 Travaux en cours 7133 FR -7134 Variation des en-cours de production de services 71 FR -71341 Etudes en cours 7134 FR -71345 Prestations de services en cours 7134 FR -7135 Variation des stocks de produits 71 FR -71351 Produits intermdiaires 7135 FR -71355 Produits finis 7135 FR -71358 Produits rsiduels 7135 FR -721 Immobilisations incorporelles 7 FR -722 Immobilisations corporelles 7 FR -731 Produits nets partiels sur oprations en cours ( subdiviser par opration) 7 FR -739 Produits nets partiels sur oprations termines 7 FR -751 Redevances pour concessions, brevets, licences, marques, procds, logiciels, droits et valeurs similaires 7 FR -7511 Redevances pour concessions, brevets, licences, marques, procds, logiciels 751 FR -7516 Droits d'auteur et de reproduction 751 FR -7518 Autres droits et valeurs similaires 751 FR -752 Revenus des immeubles non affects des activits professionnelles 7 FR -7551 Quote-part de perte transfre (comptabilit du grant) 7 FR -7555 Quote-part de bnfice attribue (comptabilit des associs non-grants) 7 FR -758 Produits divers de gestion courante 7 FR -761 Produits de participations 7 FR -7611 Revenus des titres de participation 761 FR -7616 Revenus sur autres formes de participation 761 FR -7617 Revenus des crances rattaches des participations 761 FR -762 Produits des autres immobilisations financires 7 FR -7621 Revenus des titres immobiliss 762 FR -7626 Revenus des prts 762 FR -7627 Revenus des crances immobilises 762 FR -763 Revenus des autres crances 7 FR -7631 Revenus des crances commerciales 763 FR -7638 Revenus des crances diverses 763 FR -764 Revenus des valeurs mobilires de placement 7 FR -765 Escomptes obtenus 7 FR -766 Gains de change 7 FR -767 Produits nets sur cessions de valeurs mobilires de placement 7 FR -768 Autres produits financiers 7 FR -771 Produits exceptionnels sur oprations de gestion 7 FR -7711 Ddits et pnalits perus sur achats et sur ventes 771 FR -7713 Libralits reues 771 FR -7714 Rentres sur crances amorties 771 FR -7715 Subventions d'quilibre 771 FR -7717 Dgrvements d'impts autres qu'impts sur les bnfices 771 FR -7718 Autres produits exceptionnels sur oprations de gestion 771 FR -772 (Compte la disposition des entits pour enregistrer, en cours d'exercice, les produits sur exercices antrieurs) 7 FR -775 Produits des cessions d'lments d'actif 7 FR -7751 Immobilisations incorporelles 775 FR -7752 Immobilisations corporelles 775 FR -7756 Immobilisations financires 775 FR -7758 Autres lments d'actif 775 FR -777 Quote-part des subventions d'investissement vire au rsultat de l'exercice 7 FR -778 Autres produits exceptionnels 7 FR -7781 Bonis provenant de clauses d'indexation 778 FR -7782 Lots 778 FR -7783 Bonis provenant du rachat par l'entreprise d'actions et d'obligations mises par elle-mme 778 FR -7788 Produits exceptionnels divers 778 FR -78 Reprises sur amortissements et provisions 7 FR -7811 Reprises sur amortissements des immobilisations incorporelles et corporelles 78 FR -78111 Immobilisations incorporelles 7811 FR -78112 Immobilisations corporelles 7811 FR -7815 Reprises sur provisions pour risques et charges d'exploitation 78 FR -7816 Reprises sur provisions pour dprciation des immobilisations incorporelles et corporelles 78 FR -78161 Immobilisations incorporelles 7816 FR -78162 Immobilisations corporelles 7816 FR -7817 Reprises sur provisions pour dprciation des actifs circulants 78 FR -78173 Stocks et en-cours 7817 FR -78174 Crances 7817 FR -7865 Reprises sur provisions pour risques et charges financiers 78 FR -7866 Reprises sur provisions pour dprciation des lments financiers 78 FR -78662 Immobilisations financires 7866 FR -78665 Valeurs mobilires de placements 7866 FR -7872 Reprises sur provisions rglementes (immobilisations) 78 FR -78725 Amortissements drogatoires 7872 FR -78726 Provision spciale de rvaluation 7872 FR -78727 Plus-values rinvesties 7872 FR -7873 Reprises sur provisions rglementes (stocks) 78 FR -7874 Reprises sur autres provisions rglementes 78 FR -7875 Reprises sur provisions pour risques et charges exceptionnels 78 FR -7876 Reprises sur provisions pour dprciations exceptionnelles 78 FR -791 Transferts de charges d'exploitation 7 FR -796 Transferts de charges financires 7 FR -797 Transferts de charges exceptionnelles 7 FR -8 Comptes spciaux 0 FR -80 Engagements hors bilan 8 FR -801 Engagements donns par l'entit 80 FR -8011 Avals, cautions, garanties 801 FR -8014 Effets circulant sous l'endos de l'entit 801 FR -8016 Redevances crdit-bail restant courir 801 FR -80161 Crdit-bail mobilier 8016 FR -80165 Crdit-bail immobilier 8016 FR -8018 Autres engagements donns 801 FR -802 Engagements reus par l'entit 80 FR -8021 Avals, cautions, garanties 802 FR -8024 Crances escomptes non chues 802 FR -8026 Engagements reus pour utilisation en crdit-bail 802 FR -80261 Crdit-bail mobilier 8026 FR -80265 Crdit-bail immobilier 8026 FR -8028 Autres engagements reus 802 FR -809 Contrepartie des engagements 80 FR -8091 Contrepartie 801 809 FR -8092 Contrepartie 802 809 FR -88 Rsultat en instance d'affectation 8 FR -89 Bilan 8 FR -890 Bilan d'ouverture 89 FR -891 Bilan de clture 89 FR -9 Comptes analytiques 0 FR -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/developpe-strict/fr_plan_developpe_tva.sql b/sources/contrib/comptabilite-francaise/developpe-strict/fr_plan_developpe_tva.sql deleted file mode 100644 index f314258..0000000 --- a/sources/contrib/comptabilite-francaise/developpe-strict/fr_plan_developpe_tva.sql +++ /dev/null @@ -1,44 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007/10/23 22:23 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tva_rate; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) FROM stdin; -101 TVAFranceNormal 0.196 TVA 19,6% - France mtropolitaine - Taux normal 44566,44571 -102 TVAFranceRduit 0.055 TVA 5,5% - France mtropolitaine - Taux rduit 44566,44571 -103 TVAFranceSuperRduit 0.021 TVA 2,1% - France mtropolitaine - Taux super rduit 44566,44571 -104 TVAFranceImmos 0.196 TVA 19,6% - France mtropolitaine - Taux immobilisations 44562,44571 -105 TVAFranceAnciens 0 TVA x% - France mtropolitaine - Taux anciens 44566,44571 -201 TVADomNormal 0.085 TVA 8,5% - DOM - Taux normal 44566,44571 -202 TVADomNPR 0.085 TVA 8,5% - DOM - Taux normal NPR 44566,44571 -203 TVADomRduit 0.021 TVA 2,1% - DOM - Taux rduit 44566,44571 -204 TVADom-I 0.0175 TVA 1,75% - DOM - Taux I 44566,44571 -205 TVADomPresse 0.0105 TVA 1,05% - DOM - Taux publications de presse 44566,44571 -206 TVADomOctroi 0 TVA x% - DOM - Taux octroi de mer 44566,44571 -207 TVADomImmos 0 TVA x% - DOM - Taux immobilisations 44562,44571 -301 TVACorse-I 0.13 TVA 13% - Corse - Taux I 44566,44571 -302 TVACorse-II 0.08 TVA 8% - Corse - Taux II 44566,44571 -303 TVACorse-III 0.021 TVA 2,1% - Corse - Taux III 44566,44571 -304 TVACorse-IV 0.009 TVA 0,9% - Corse - Taux IV 44566,44571 -305 TVACorseImmos 0 TVA x% - Corse - Taux immobilisations 44562,44571 -401 TVAacquisIntracom 0 TVA x% - Acquisitions intracommunautaires/Pays 44566,44571 -402 TVAacquisIntracomImmos 0 TVA x% - Acquisitions intracommunautaires immobilisations/Pays 44562,44571 -501 TVAfranchise 0 TVA x% - Non imposable : Achats en franchise -502 TVAexport 0 TVA x% - Non imposable : Exports hors CE/Pays -503 TVAautres 0 TVA x% - Non imposable : Autres oprations -504 TVAlivrIntracom 0 TVA x% - Non imposable : Livraisons intracommunautaires/Pays -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/lisez-moi.txt b/sources/contrib/comptabilite-francaise/lisez-moi.txt deleted file mode 100644 index f0fb394..0000000 --- a/sources/contrib/comptabilite-francaise/lisez-moi.txt +++ /dev/null @@ -1 +0,0 @@ -Pour plus d'informatoin http://www.vaugham.eu/ diff --git a/sources/contrib/comptabilite-francaise/loi-1901/fr_plan_loi1901.sql b/sources/contrib/comptabilite-francaise/loi-1901/fr_plan_loi1901.sql deleted file mode 100644 index 7af6aa2..0000000 --- a/sources/contrib/comptabilite-francaise/loi-1901/fr_plan_loi1901.sql +++ /dev/null @@ -1,535 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007-09-08 01:18 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tmp_pcmn; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_country) FROM stdin; -1 CLASSE 1. Comptes de capitaux 0 FR -10 FONDS ASSOCIATIF ET RESERVES (pour les fondations : "fonds propres et rserves") 1 FR -102 Fonds associatif sans droit de reprise 10 FR -1021 Valeur du patrimoine intgr 102 FR -1022 Fonds statutaire ( clater en fonction des statuts) 102 FR -1023 Subventions d'investissement non renouvelables 102 FR -1024 Apports sans droit de reprise 102 FR -1025 Legs et donations avec contrepartie d'actifs immobiliss 102 FR -1026 Subventions d'investissement affectes des biens renouvelables 102 FR -103 Fonds associatif avec droit de reprise 10 FR -1031 Valeur des biens affects repris la fin du contrat d'apport 103 FR -1032 Valeur des biens affects repris la dissolution de l'association 103 FR -1033 Valeur des biens non affects repris la fin du contrat d'apport 103 FR -1034 Apports avec droit de reprise 103 FR -1035 Legs et donations avec contrepartie d'actifs immobiliss assortis d'une obligation ou d'une condition 103 FR -1036 Subventions d'investissement affectes des biens renouvelables 103 FR -1039 Fonds associatif avec doit de reprise inscrit au compte de rsultat 103 FR -105 Ecarts de rvaluation 10 FR -1051 Ecarts de rvaluation sur des biens sans droit de reprise 105 FR -1052 Ecarts de rvaluation (immobilisations non greves d'un droit de reprise) 105 FR -1053 Ecarts de rvaluation (immobilisations greves d'un droit de reprise) 105 FR -10531 Ecarts de rvaluation (immobilisations greves d'un droit de reprise avant dissolution de l'association) 1053 FR -10532 Ecarts de rvaluation (immobilisations greves d'un droit de reprise la dissolution de l'association) 1053 FR -106 Rserves 10 FR -1062 Rserves indisponibles 106 FR -1063 Rserves statutaires ou contractuelles 106 FR -1064 Rserves rglementes 106 FR -1068 Autres rserves (dont rserves pour projet associatif) 106 FR -10682 Rserves pour investissements 1068 FR -10683 Rserves de trsorerie (provenant du rsultat) 1068 FR -10688 Rserves diverses 1068 FR -11 ELEMENTS EN INSTANCE D'AFFECTATION 1 FR -110 Report nouveau (solde crditeur) 11 FR -115 Rsultats sous contrle de tiers financeurs 11 FR -119 Report nouveau (solde dbiteur) 11 FR -12 RESULTAT NET DE L'EXERCICE 1 FR -120 Rsultat de l'exercice (excdent) 12 FR -129 Rsultat de l'exercice (dficit) 12 FR -13 SUBVENTIONS D'INVESTISSEMENT (affects des biens renouvelables) 1 FR -131 Subventions d'investissement (renouvelables) 13 FR -139 Subventions d'investissement inscrites au compte de rsultat 13 FR -15 PROVISIONS POUR RISQUES ET CHARGES 1 FR -151 Provisions pour risques 15 FR -1516 Provisions pour risques d'emploi 151 FR -1518 Autres provisions pour risques 151 FR -157 Provisions pour charges rpartir sur plusieurs exercices 15 FR -1572 Provisions pour grosses rparations 157 FR -16 EMPRUNTS ET DETTES ASSIMILEES 1 FR -164 Emprunts auprs des tablissements de crdit 16 FR -1641 Emprunts ( dtailler) 164 FR -167 Emprunts et dettes assorties de conditions particulires 16 FR -1672 Titres associatifs 167 FR -168 Autres emprunts et dettes assimiles 16 FR -1681 Autres emprunts ( dtailler) 168 FR -1685 Rentes viagres capitalises 168 FR -1687 Autres dettes ( dtailler) 168 FR -1688 Intrts courus ( dtailler) 168 FR -18 COMPTES DE LIAISON DES ETABLISSEMENTS 1 FR -181 Apports permanents entre sige social et tablissements 18 FR -185 Biens et prestations de services changs entre tablissements et sige social 18 FR -186 Biens et prestations de services changs entre tablissements (charges) 18 FR -187 Biens et prestations de services changs entre tablissements (produits) 18 FR -19 FONDS DEDIES 1 FR -194 Fonds ddis sur subventions de fonctionnement 19 FR -195 Fonds ddis sur dons manuels affects 19 FR -197 Fonds ddis sur legs et donations affects 19 FR -198 Excdent disponible aprs affectation au projet associatif 19 FR -199 Reprise des fonds affects au projet associatif 19 FR -2 CLASSE 2. Comptes d'immobilisations 0 FR -20 IMMOBILISATIONS INCORPORELLES 2 FR -201 Frais d'tablissement 20 FR -2012 Frais de premier tablissement 201 FR -206 Droit au bail 20 FR -208 Autres immobilisations incorporelles 20 FR -21 IMMOBILISATIONS CORPORELLES 2 FR -211 Terrains 21 FR -212 Agencements et amnagements des constructions 21 FR -213 Constructions 21 FR -2131 Btiments 213 FR -2135 Installations gnrales, agencements, amnagements des constructions 213 FR -214 Constructions sur sol d'autrui 21 FR -215 Installations techniques, matriel et outillage industriels 21 FR -2151 Installations complexes spcialises 215 FR -2154 Matriel industriel 215 FR -2155 Outillage industriel 215 FR -218 Autres immobilisations corporelles 21 FR -2181 Installations gnrales, agencements, amnagements divers 218 FR -2182 Matriel de transport 218 FR -2183 Matriel de bureau et matriel informatique 218 FR -2184 Mobilier 218 FR -2185 Cheptel 218 FR -228 Immobilisations greves de droits 2 FR -229 Droits des propritaires 2 FR -23 IMMOBILISATIONS EN COURS 2 FR -231 Immobilisations corporelles en cours 23 FR -2313 Constructions 231 FR -2315 Installations techniques, matriel et outillage industriels 231 FR -2318 Autres immobilisations corporelles 231 FR -238 Avances et acomptes verss sur commande d'immobilisations corporelles 23 FR -26 PARTICIPATIONS ET CREANCES RATTACHEES A DES PARTICIPATIONS 2 FR -261 Titres de participation 26 FR -266 Autres formes de participation 26 FR -267 Crances rattaches des participations 26 FR -269 Versements restant effectuer sur titres de participation non librs 26 FR -27 AUTRES IMMOBILISATIONS FINANCIERES 2 FR -271 Titres immobiliss (droit de proprit) 27 FR -2711 Actions 271 FR -272 Titres immobiliss (droit de crance) 27 FR -2721 Obligations 272 FR -2722 Bons 272 FR -2728 Autres 272 FR -274 Prts 27 FR -2743 Prts au personnel 274 FR -2748 Autres prts 274 FR -275 Dpts et cautionnements verss 27 FR -2751 Dpts 275 FR -2755 Cautionnements 275 FR -276 Autres crances immobilises 27 FR -2761 Crances diverses 276 FR -2768 Intrts courus ( dtailler) 276 FR -279 Versement restant effectuer sur titres immobiliss non librs 27 FR -28 AMORTISSEMENTS DES IMMOBILISATIONS 2 FR -280 Amortissements des immobilisations incorporelles 28 FR -2801 Frais d'tablissement (mme ventilation que celle du compte 201) 280 FR -2808 Autres immobilisations incorporelles 280 FR -281 Amortissements des immobilisations corporelles 28 FR -2812 Agencements, amnagements de terrains (mme ventilation que celle du compte 212) 281 FR -2813 Constructions (mme ventilation que celle du compte 213) 281 FR -2814 Constructions sur sol d'autrui (mme ventilation que celle du compte 214) 281 FR -2815 Installations techniques, matriel et outillage industriels (mme ventilation que celle du compte 215) 281 FR -2818 Autres immobilisations corporelles (mme ventilation que celle du compte 218) 281 FR -29 PROVISIONS POUR DEPRECIATION DES IMMOBILISATIONS 2 FR -290 Provisions pour dprciation des immobilisations incorporelles 29 FR -2906 Droit au bail 290 FR -2908 Autres immobilisations incorporelles 290 FR -291 Provisions pour dprciation des autres immobilisations corporelles 29 FR -2911 Terrains 291 FR -296 Provisions pour dprciation des participations et crances rattaches des participations 29 FR -2961 Titres de participation 296 FR -2966 Autres formes de participation 296 FR -2967 Crances rattaches des participations (mme ventilation que celle du compte 267) 296 FR -297 Provisions pour dprciation des autres immobilisations financires 29 FR -2971 Titres immobiliss (droit de proprit) (mme ventilation que celle du compte 271) 297 FR -2972 Titres immobiliss (droit de crance) (mme ventilation que celle du compte 272) 297 FR -2974 Prts (mme ventilation que celle du compte 274) 297 FR -2975 Dpts et cautionnements verss (mme ventilation que celle du compte 275) 297 FR -2976 Autres crances immobilises (mme ventilation que celle du compte 276) 297 FR -3 CLASSE 3. Comptes de stocks et en-cours 0 FR -31 MATIERES PREMIERES ET FOURNITURES 3 FR -32 AUTRES APPROVISIONNEMENTS 3 FR -33 EN-COURS DE PRODUCTION DE BIENS 3 FR -34 EN-COURS DE PRODUCTION DE SERVICES 3 FR -35 STOCKS DE PRODUITS 3 FR -37 STOCKS DE MARCHANDISES 3 FR -39 PROVISIONS POUR DEPRECIATION DES STOCKS ET EN-COURS 3 FR -391 Provisions pour dprciation des matires premires et fournitures 39 FR -392 Provisions pour dprciation des autres approvisionnements 39 FR -393 Provisions pour dprciation des en-cours de production de biens 39 FR -394 Provisions pour dprciation des en-cours de production de services 39 FR -395 Provisions pour dprciation des stocks de produits 39 FR -397 Provisions pour dprciation des stocks de marchandises 39 FR -4 CLASSE 4. Comptes de tiers 0 FR -40 FOURNISSEURS ET COMPTES RATTACHES 4 FR -401 Fournisseurs 40 FR -4011 Fournisseurs - Achats de biens ou de prestations de services 401 FR -404 Fournisseurs d'immobilisations 40 FR -4041 Fournisseurs - achats d'immobilisations 404 FR -4047 Fournisseurs d'immobilisations - Retenues de garantie 404 FR -408 Fournisseurs - Factures non parvenues 40 FR -4081 Fournisseurs - Achats de biens ou de prestations de services 408 FR -4084 Fournisseurs - achats d'immobilisations 408 FR -409 Fournisseurs dbiteurs 40 FR -4091 Fournisseurs - Avances et acomptes verss sur commandes 409 FR -4096 Fournisseurs - Crances pour emballage et matriel rendre 409 FR -41 USAGERS ET COMPTES RATTACHES 4 FR -411 Usagers (et organismes de prise en charge) 41 FR -416 Crances douteuses ou litigieuses 41 FR -418 Usagers - Produits non encore facturs 41 FR -419 Usagers crditeurs 41 FR -42 PERSONNEL ET COMPTES RATTACHES 4 FR -421 Personnel - Rmunrations dues 42 FR -422 Comits d'entreprises, d'tablissement... 42 FR -425 Personnel - Avances et acomptes 42 FR -427 Personnel - Oppositions 42 FR -428 Personnel - Charges payer et produits recevoir 42 FR -4282 Dettes provisionnes pour congs payer 428 FR -4286 Autres charges payer 428 FR -4287 Produits recevoir 428 FR -43 SECURITE SOCIALE ET AUTRES ORGANISMES SOCIAUX 4 FR -431 Scurit sociale 43 FR -437 Autres organismes sociaux 43 FR -4372 Mutuelles 437 FR -4373 Caisses de retraites et de prvoyance 437 FR -4374 Caisses d'allocations de chmage - ASSEDIC 437 FR -4378 Autres organismes sociaux - divers 437 FR -438 Organismes sociaux - Charges payer et produits recevoir 43 FR -4382 Charges sociales sur congs payer 438 FR -4386 Autres charges payer 438 FR -4387 Produits recevoir 438 FR -44 ETAT ET AUTRES COLLECTIVITES PUBLIQUES 4 FR -441 Etat - Subventions recevoir 44 FR -4411 Subventions d'investissement 441 FR -4417 Subventions d'exploitation 441 FR -4419 Avances sur subventions 441 FR -444 Etat - Impts sur les bnfices 44 FR -4445 Etat - Impt sur les socit (organismes sans but lucratif) 444 FR -445 Etat - Taxes sur le chiffre d'affaires 44 FR -447 Autres impts, taxes et versements assimils 44 FR -4471 Impts, taxes et versements assimils sur rmunrations (administration des impts) 447 FR -44711 Taxe sur les salaires 4471 FR -44713 Participation des employeurs la formation professionnelle continue 4471 FR -44714 Cotisation pour dfaut d'investissement obligatoire dans la construction 4471 FR -44718 Autres impts, taxes et versements assimils 4471 FR -4473 Impts, taxes et versements assimils sur rmunrations (autres organismes) 447 FR -44733 Participation des employeurs la formation professionnelle continue 4473 FR -44734 Participation des employeurs l'effort de construction (versements fonds perdus) 4473 FR -4475 Autres impts, taxes et versements assimils (administration des impts) 447 FR -4477 Autres impts, taxes et versements assimils (autres organismes) 447 FR -448 Etat - Charges payer et produits recevoir 44 FR -4482 Charges fiscales sur congs payer 448 FR -4486 Autres charges payer 448 FR -4487 Produits recevoir 448 FR -45 CONFEDERATION, FEDERATION, UNION, ASSOCIATIONS AFFILIEES ET SOCIETAIRES 4 FR -451 Confdration, fdration, union et associations affilies - Compte courant 45 FR -455 Socitaires - Comptes courants 45 FR -46 DEBITEURS DIVERS ET CREDITEURS DIVERS 4 FR -467 Autres comptes dbiteurs ou crditeurs 46 FR -468 Divers - Charges payer et produits recevoir 46 FR -4686 Charges payer 468 FR -4687 Produits recevoir 468 FR -47 COMPTES D'ATTENTE 4 FR -471 Recettes classer 47 FR -472 Dpenses classer et rgulariser 47 FR -475 Legs et donations en cours de ralisation 47 FR -48 COMPTE DE REGULARISATION 4 FR -481 Charges rpartir sur plusieurs exercices 48 FR -4812 Frais d'acquisition des immobilisations 481 FR -4818 Charges taler 481 FR -486 Charges constates d'avance 48 FR -487 Produits constats d'avance 48 FR -49 PROVISIONS POUR DEPRECIATION DES COMPTES DE TIERS 4 FR -491 Provisions pour dprciation des comptes d'usagers (et organismes de prise en charge) 49 FR -496 Provisions pour dprciation des comptes de dbiteurs divers 49 FR -5 CLASSE 5. Comptes financiers 0 FR -50 VALEURS MOBILIERES DE PLACEMENT 5 FR -503 Actions 50 FR -5031 Titres cots 503 FR -5035 Titres non cots 503 FR -506 Obligations 50 FR -5061 Titres cots 506 FR -5065 Titres non cots 506 FR -507 Bons du Trsor et bons de caisse court terme 50 FR -508 Autres valeurs mobilires et crances assimiles 50 FR -5081 Autres valeurs mobilires 508 FR -5088 Intrts courus sur obligations, bons et valeurs assimiles 508 FR -51 BANQUES, ETABLISSEMENTS FINANCIERS ET ASSIMILES 5 FR -512 Banques 51 FR -514 Chques postaux 51 FR -515 Caisses 51 FR -517 Autres organismes financiers 51 FR -5171 Caisse d'pargne 517 FR -518 Intrts courus 51 FR -5186 Intrts courus payer 518 FR -5187 Intrts courus recevoir 518 FR -53 CAISSE 5 FR -531 Caisse du sige 53 FR -532 Caisses des lieux d'activits 53 FR -54 REGIES D'AVANCES ET ACCREDITIFS 5 FR -541 Rgies d'avances 54 FR -542 Accrditifs 54 FR -58 VIREMENTS INTERNES 5 FR -581 Virements de fonds 58 FR -59 PROVISIONS POUR DEPRECIATION DES COMPTES FINANCIERS 5 FR -590 Provisions pour dprciation des valeurs mobilires de placement 59 FR -6 CLASSE 6. Comptes de charges 0 FR -60 ACHATS (sauf 603) 6 FR -601 Achats stocks - Matires premires et fournitures (*1 Structure laisse libre en vue de rpondre la diversit des actions entreprises par le secteur associatif) 60 FR -602 Achats stocks - Autres approvisionnements (*1 Structure laisse libre en vue de rpondre la diversit des actions entreprises par le secteur associatif) 60 FR -604 Achats d'tudes et prestations de services (*2 Incorpors directement aux produits et prestations de services) 60 FR -606 Achats non stocks de matires et fournitures (*1 Structure laisse libre en vue de rpondre la diversit des actions entreprises par le secteur associatif) 60 FR -6061 Fournitures non stockables (eau, nergie...) 606 FR -6063 Fournitures d'entretien et de petit quipement 606 FR -6064 Fournitures administratives 606 FR -6068 Autres matires et fournitures 606 FR -607 Achats de marchandises 60 FR -6071 Marchandise A 607 FR -6072 Marchandise B 607 FR -609 Rabais, remises et ristournes obtenues sur achats 60 FR -603 Variation des stocks (approvisionnements et marchandises) 6 FR -6031 Variation des stocks de matires premires et fournitures 6 FR -6032 Variation des stocks des autres approvisionnements 6 FR -6037 Variation des stocks de marchandises 6 FR -61 AUTRES CHARGES EXTERNES - Services extrieurs 6 FR -611 Sous-traitance gnrale 61 FR -612 Redevances de crdit-bail 61 FR -6122 Crdit-bail mobilier 612 FR -613 Locations 61 FR -6132 Locations immobilires 613 FR -6135 Locations mobilires 613 FR -614 Charges locatives et de co-proprit 61 FR -615 Entretien et rparations 61 FR -6152 ... sur biens immobiliers 615 FR -6155 ... sur biens mobiliers 615 FR -6156 Maintenance 615 FR -616 Primes d'assurances 61 FR -6161 Multirisques 616 FR -6162 Assurance obligatoire dommage-construction 616 FR -6168 Autres assurances 616 FR -617 Etudes et recherches 61 FR -618 Divers 61 FR -6181 Documentation gnrale 618 FR -6183 Documentation technique 618 FR -6185 Frais de colloques, sminaires, confrences 618 FR -619 Rabais, remises et ristournes obtenues sur services extrieurs 61 FR -62 AUTRES CHARGES EXTERNES - AUTRES SERVICES EXTERIEURS 6 FR -621 Personnel extrieur l'association 62 FR -622 Rmunrations d'intermdiaires et honoraires 62 FR -6226 Honoraires 622 FR -6227 Frais d'actes et de contentieux 622 FR -623 Publicit, publications, relations publiques 62 FR -6231 Annonces et insertions 623 FR -6233 Foires et expositions 623 FR -6236 Catalogues et imprims 623 FR -6237 Publications 623 FR -6238 Divers (pourboires, dons courants...) 623 FR -624 Transports de biens et transports collectifs du personnel 62 FR -6241 Transports sur achats 624 FR -6243 Transports entre tablissements 624 FR -6247 Transports collectifs du personnel 624 FR -6248 Divers 624 FR -625 Dplacements, missions et rceptions 62 FR -6251 Voyages et dplacements 625 FR -6256 Missions 625 FR -6257 Rceptions 625 FR -626 Frais postaux et frais de tlcommunications 62 FR -627 Services bancaires et assimils 62 FR -628 Divers 62 FR -6281 Cotisations (lies l'activit conomique) 628 FR -6284 Frais de recrutement du personnel 628 FR -629 Rabais, remises et ristournes obtenus sur autres services extrieurs 62 FR -63 IMPOTS, TAXES ET VERSEMENTS ASSIMILES 6 FR -631 Impts, taxes et versements assimils sur rmunrations (administration des impts) 63 FR -6311 Taxe sur les salaires 631 FR -6313 Participation des employeurs la formation professionnelle continue 631 FR -6314 Cotisation pour dfaut d'investissement obligatoire dans la construction 631 FR -633 Impts, taxes et versements assimils sur rmunrations (autres organismes) 63 FR -6331 Versement de transport 633 FR -6333 Participation des employeurs la formation professionnelle continue 633 FR -6334 Participation des employeurs l'effort de construction (versements fonds perdus) 633 FR -635 Autres impts, taxes et versements assimils (administration des impts) 63 FR -6351 Impts directs 635 FR -63512 Taxes foncires 6351 FR -63513 Autres impts locaux 6351 FR -63518 Autres impts directs 6351 FR -6353 Impts indirects 635 FR -6354 Droits d'enregistrement et de timbre 635 FR -6358 Autres droits 635 FR -637 Autres impts, taxes et versements assimils (autres organismes) 63 FR -64 CHARGES DE PERSONNEL 6 FR -641 Rmunrations du personnel 64 FR -6411 Salaires, appointements 641 FR -6412 Congs pays 641 FR -6413 Primes et gratifications 641 FR -6414 Indemnits et avantages divers 641 FR -6415 Supplment familial 641 FR -645 Charges de scurit sociale et de prvoyance 64 FR -6451 Cotisations l'URSSAF 645 FR -6452 Cotisations aux mutuelles 645 FR -6453 Cotisations aux caisses de retraites et de prvoyance 645 FR -6454 Cotisations aux ASSEDIC 645 FR -6458 Cotisations aux autres organismes sociaux 645 FR -647 Autres charges sociales 64 FR -6472 Versements aux comits d'entreprise et d'tablissement 647 FR -6475 Mdecine du travail, pharmacie 647 FR -648 Autres charges de personnel 64 FR -65 AUTRES CHARGES DE GESTION COURANTE 6 FR -651 Redevances pour concessions, brevets, licences, marques, procds, droits et valeurs similaires 65 FR -6511 Redevances pour concessions, brevets, licences, marques, procds 651 FR -6516 Droits d'auteur et de reproduction (SACEM) 651 FR -6518 Autres droits et valeurs similaires 651 FR -654 Pertes sur crances irrcouvrables 65 FR -6541 Crances de l'exercice 654 FR -6544 Crances des exercices antrieurs 654 FR -657 Subventions verses par l'association 65 FR -6571 Bourses accordes aux usagers 657 FR -658 Charges diverses de gestion courante 65 FR -6586 Cotisations (lies la vie statutaire) 658 FR -66 CHARGES FINANCIERES 6 FR -661 Charges d'intrts 66 FR -6611 Intrts des emprunts et dettes 661 FR -6616 Intrts bancaires 661 FR -6618 Intrts des autres dettes 661 FR -666 Pertes de change 66 FR -667 Charges nettes sur cessions de valeurs mobilires de placement 66 FR -67 CHARGES EXCEPTIONNELLES 6 FR -671 Charges exceptionnelles sur oprations de gestion 67 FR -6712 Pnalits et amendes fiscales ou pnales 671 FR -6713 Dons, libralits 671 FR -6714 Crances devenues irrcouvrables dans l'exercice 671 FR -6717 Rappels d'impts (autres qu'impts sur les bnfices) 671 FR -6718 Autres charges exceptionnelles sur oprations de gestion 671 FR -672 Charges sur exercices antrieurs ( reclasser) 67 FR -675 Valeurs comptables des lments d'actif cds 67 FR -6751 Immobilisations incorporelles 675 FR -6752 Immobilisations corporelles 675 FR -6756 Immobilisations financires 675 FR -678 Autres charges exceptionnelles 67 FR -68 DOTATIONS AUX AMORTISSEMENTS, PROVISIONS ET ENGAGEMENTS 6 FR -681 Dotations aux amortissements, provisions et engagements 68 FR -6811 Dotations aux amortissements des immobilisations incorporelles et corporelles 681 FR -68111 Dotations aux amortissements des immobilisations incorporelles 6811 FR -68112 Dotations aux amortissements des immobilisations corporelles 6811 FR -6812 Dotations aux amortissements des charges d'exploitation rpartir 681 FR -6815 Dotations aux provisions pour risques et charges d'exploitation 681 FR -6816 Dotations aux provisions pour dprciation des immobilisations incorporelles et corporelles 681 FR -6817 Dotations aux provisions pour dprciation des actifs circulants (autres que les valeurs mobilires de placement) 681 FR -686 Dotations aux amortissements et aux provisions - Charges financires 68 FR -6866 Dotations aux provisions pour dprciation des lments financiers 686 FR -68662 Dotations aux provisions financires 6866 FR -68665 Valeurs mobilires de placement 6866 FR -687 Dotations aux amortissements et aux provisions - Charges exceptionnelles 68 FR -6871 Dotations aux amortissements exceptionnels des immobilisations 687 FR -6876 Dotations aux provisions pour dprciations exceptionnelles 687 FR -689 Engagements raliser sur ressources affectes 68 FR -6894 Engagements raliser sur subventions attribues 689 FR -6895 Engagements raliser sur dons manuels affects 689 FR -6897 Engagements raliser sur legs et donations affects 689 FR -69 IMPOTS SUR LES BENEFICES 6 FR -695 Impts sur les socits 69 FR -7 CLASSE 7. Comptes de produits 0 FR -70 VENTES DE PRODUITS FINIS, PRESTATIONS DE SERVICES, MARCHANDISES 7 FR -701 Ventes de produits finis 70 FR -706 Prestations de services 70 FR -707 Ventes de marchandises 70 FR -708 Produits des activits annexes 70 FR -7081 Produits des prestations fournies au personnel 708 FR -7083 Locations diverses 708 FR -7084 Mise disposition de personnel facture 708 FR -7088 Autres produits d'activits annexes 708 FR -709 Rabais, remises et ristournes accords par l'association 70 FR -71 PRODUCTION STOCKEE (OU DESTOCKAGE) 7 FR -713 Variation des stocks (en-cours de production, produits) 71 FR -7133 Variation des en-cours de production de biens 713 FR -7134 Variation des en-cours de production de services 713 FR -7135 Variation des stocks de produits 713 FR -72 PRODUCTION IMMOBILISEE 7 FR -74 SUBVENTIONS D'EXPLOITATION 7 FR -75 AUTRES PRODUITS DE GESTION COURANTE 7 FR -751 Redevances pour concessions, brevets, licences, marques, procds, droits et valeurs similaires 75 FR -754 Collectes 75 FR -756 Cotisations 75 FR -757 Quote-part d'lments du fonds associatif vire au compte de rsultat 75 FR -7571 Quote-part de subventions d'investissement (renouvelables) vire au compte de rsultat 757 FR -7573 Quote-part des apports vire au compte de rsultat 757 FR -758 Produits divers de gestion courante 75 FR -7585 Contributions volontaires 758 FR -7586 Contributions volontaires 758 FR -7587 Contributions volontaires 758 FR -7588 Contributions volontaires 758 FR -76 PRODUITS FINANCIERS 7 FR -761 Produits des participations 76 FR -762 Produits des autres immobilisations financires 76 FR -7621 Revenus des titres immobiliss 762 FR -7624 Revenus des prts 762 FR -764 Revenus des valeurs mobilires de placement 76 FR -765 Escomptes obtenus 76 FR -766 Gains de change 76 FR -767 Produits nets sur cessions de valeurs mobilires de placement 76 FR -768 Autres produits financiers 76 FR -7681 Intrts des comptes financiers dbiteurs 768 FR -77 PRODUITS EXCEPTIONNELS 7 FR -771 Produits exceptionnels sur oprations de gestion 77 FR -7713 Libralits perues 771 FR -7714 Rentres sur crances amorties 771 FR -7715 Subvention d'quilibre 771 FR -7717 Dgrvements d'impts (autres qu'impts sur les bnfices) 771 FR -7718 Autres produits exceptionnels sur oprations de gestion 771 FR -772 Produits sur exercices antrieurs ( reclasser) 77 FR -775 Produits des cessions d'lments d'actif 77 FR -7751 Immobilisations incorporelles 775 FR -7752 Immobilisations corporelles 775 FR -7756 Immobilisations financires 775 FR -777 Quote-part des subventions d'investissement vire au rsultat de l'exercice 77 FR -778 Autres produits exceptionnels 77 FR -78 REPRISES SUR AMORTISSEMENTS ET PROVISIONS 7 FR -781 Reprises sur amortissements et provisions ( inscrire dans les produits d'exploitation) 78 FR -7811 Reprises sur amortissements des immobilisations incorporelles et corporelles 781 FR -7815 Reprises sur provisions pour risques et charges d'exploitation 781 FR -7816 Reprises sur provisions pour dprciation des immobilisations incorporelles et corporelles 781 FR -7817 Reprises sur provisions pour dprciation des actifs circulants (autres que les valeurs mobilires de placement) 781 FR -786 Reprises sur provisions ( inscrire dans les produits financiers) 78 FR -7866 Reprises sur provisions pour dprciation des lments financiers 786 FR -78662 Immobilisations financires 7866 FR -78665 Valeurs mobilires de placement 7866 FR -787 Reprises sur provisions ( inscrire dans les produits exceptionnels) 78 FR -7876 Reprise sur provisions pour dprciations exceptionnelles 787 FR -789 Report des ressources non utilises des exercices antrieurs 78 FR -79 TRANSFERTS DE CHARGES 7 FR -791 Transferts de charges d'exploitation 79 FR -796 Transferts de charges financires 79 FR -797 Transferts de charges exceptionnelles 79 FR -8 CLASSE 8. CONTRIBUTIONS VOLONTAIRES 0 FR -86 EMPLOIS DES CONTRIBUTIONS VOLONTAIRES EN NATURE - Rpartition par nature de charges 8 FR -860 Secours en nature, alimentaires, vestimentaires, ... 86 FR -861 Mise disposition gratuite de biens 86 FR -8611 Mise disposition gratuite de locaux 861 FR -8612 Mise disposition gratuite de matriels 861 FR -862 Prestations 86 FR -864 Personnel bnvole 86 FR -87 CONTRIBUTIONS VOLONTAIRES EN NATURE - Rpartition par nature de ressources 8 FR -870 Bnvolat 87 FR -871 Prestations en nature 87 FR -875 Dons en nature 87 FR -9 Comptes analytiques 0 FR -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/loi-1901/fr_plan_loi1901_comptes-defaut.sql b/sources/contrib/comptabilite-francaise/loi-1901/fr_plan_loi1901_comptes-defaut.sql deleted file mode 100644 index f423be4..0000000 --- a/sources/contrib/comptabilite-francaise/loi-1901/fr_plan_loi1901_comptes-defaut.sql +++ /dev/null @@ -1,27 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007-09-08 02:49 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: parm_code; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY parm_code (p_code, p_value, p_comment) FROM stdin; -BANQUE 512 Poste comptable par dfaut pour les banques -COMPTE_COURANT 514 Poste comptable par dfaut pour le compte courant -CAISSE 531 Poste comptable par dfaut pour les caisses -CUSTOMER 41 Poste comptable par dfaut pour les clients -VENTE 70 Poste comptable par dfaut pour les ventes -VIREMENT_INTERNE 581 Poste comptable par dfaut pour les virements internes -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/loi-1901/fr_plan_loi1901_tva.sql b/sources/contrib/comptabilite-francaise/loi-1901/fr_plan_loi1901_tva.sql deleted file mode 100644 index 4d3a75d..0000000 --- a/sources/contrib/comptabilite-francaise/loi-1901/fr_plan_loi1901_tva.sql +++ /dev/null @@ -1,44 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007/10/23 22:23 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tva_rate; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) FROM stdin; -101 TVAFranceNormal 0.196 TVA 19,6% - France mtropolitaine - Taux normal 445,445 -102 TVAFranceRduit 0.055 TVA 5,5% - France mtropolitaine - Taux rduit 445,445 -103 TVAFranceSuperRduit 0.021 TVA 2,1% - France mtropolitaine - Taux super rduit 445,445 -104 TVAFranceImmos 0.196 TVA 19,6% - France mtropolitaine - Taux immobilisations 445,445 -105 TVAFranceAnciens 0 TVA x% - France mtropolitaine - Taux anciens 445,445 -201 TVADomNormal 0.085 TVA 8,5% - DOM - Taux normal 445,445 -202 TVADomNPR 0.085 TVA 8,5% - DOM - Taux normal NPR 445,445 -203 TVADomRduit 0.021 TVA 2,1% - DOM - Taux rduit 445,445 -204 TVADom-I 0.0175 TVA 1,75% - DOM - Taux I 445,445 -205 TVADomPresse 0.0105 TVA 1,05% - DOM - Taux publications de presse 445,445 -206 TVADomOctroi 0 TVA x% - DOM - Taux octroi de mer 445,445 -207 TVADomImmos 0 TVA x% - DOM - Taux immobilisations 445,445 -301 TVACorse-I 0.13 TVA 13% - Corse - Taux I 445,445 -302 TVACorse-II 0.08 TVA 8% - Corse - Taux II 445,445 -303 TVACorse-III 0.021 TVA 2,1% - Corse - Taux III 445,445 -304 TVACorse-IV 0.009 TVA 0,9% - Corse - Taux IV 445,445 -305 TVACorseImmos 0 TVA x% - Corse - Taux immobilisations 445,445 -401 TVAacquisIntracom 0 TVA x% - Acquisitions intracommunautaires/Pays 445,445 -402 TVAacquisIntracomImmos 0 TVA x% - Acquisitions intracommunautaires immobilisations/Pays 445,445 -501 TVAfranchise 0 TVA x% - Non imposable : Achats en franchise -502 TVAexport 0 TVA x% - Non imposable : Exports hors CE/Pays -503 TVAautres 0 TVA x% - Non imposable : Autres oprations -504 TVAlivrIntracom 0 TVA x% - Non imposable : Livraisons intracommunautaires/Pays -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/profession-liberale/fr_plan_proflib.sql b/sources/contrib/comptabilite-francaise/profession-liberale/fr_plan_proflib.sql deleted file mode 100644 index 6e3d0d0..0000000 --- a/sources/contrib/comptabilite-francaise/profession-liberale/fr_plan_proflib.sql +++ /dev/null @@ -1,66 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007-09-08 01:26 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tmp_pcmn; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_country) FROM stdin; -1 Comptes de capitaux 0 FR -2 Comptes d'immobilisations 0 FR -21 Immobilisations corporelles 2 FR -3 Comptes de stocks et en-cours 0 FR -4 Comptes de tiers 0 FR -445 T.V.A. collecte 19,6% sur honoraires 4 FR -4456 T.V.A. dductible 4 FR -445661 T.V.A. dductible 19,6% 4456 FR -445662 T.V.A. dductible 5,5% 4456 FR -445663 T.V.A. dductible 2,1% 4456 FR -455 Apports et prlvements de l'exploitant 4 FR -5 Comptes financiers 0 FR -512001 Banque 1 5 FR -512002 Banque 2 5 FR -53 Caisse 4 FR -58 Virements internes 5 FR -6 Comptes de charges 0 FR -62 Honoraires rtrocds 6 FR -60 Achats 6 FR -641 Rmunration du personnel 6 FR -645 Charges sociales sur salaires (pat.+sal.) 6 FR -63 Taxe professionnelle et autres impts 6 FR -610 Loyer et charges locatives 6 FR -613 Location de matriel et de mobilier 6 FR -615 T.F.S.E. Entretien et rparation 6 FR -621 T.F.S.E. Personnel intrimaire 6 FR -618 T.F.S.E. Petit outillage 6 FR -610001 T.F.S.E. Chauffage lectricit 610 FR -622 T.F.S.E. Honoraires non rtrocds 6 FR -616 T.F.S.E. Primes d'assurances 6 FR -625 Transports et dplacements 6 FR -647 Loi Madelin 6 FR -646 Charges sociales personnelles 6 FR -6257 Frais de rception, reprsentation et de congrs 625 FR -626 Frais divers de gestion : Frais postaux et tlcommunications 6 FR -658001 Frais divers de gestion : Actes et contentieux 6 FR -628 Frais divers de gestion : Cotis. syndic. et prof. 6 FR -658 Frais divers de gestion : Autres 6 FR -66 Frais financiers 6 FR -635 Charges non dductibles : CSG 6 FR -7 Comptes de produits 0 FR -706 Honoraires 7 FR -708 Autres recettes diverses 7 FR -8 Comptes spciaux 0 FR -9 Comptabilit analytique 0 FR -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/profession-liberale/fr_plan_proflib_comptes-defaut.sql b/sources/contrib/comptabilite-francaise/profession-liberale/fr_plan_proflib_comptes-defaut.sql deleted file mode 100644 index 21ded8b..0000000 --- a/sources/contrib/comptabilite-francaise/profession-liberale/fr_plan_proflib_comptes-defaut.sql +++ /dev/null @@ -1,26 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007-09-08 02:49 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: parm_code; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY parm_code (p_code, p_value, p_comment) FROM stdin; -BANQUE 512001 Poste comptable par dfaut pour les banques -COMPTE_COURANT 512002 Poste comptable par dfaut pour le compte courant -CAISSE 53 Poste comptable par dfaut pour les caisses -VENTE 706 Poste comptable par dfaut pour les ventes -VIREMENT_INTERNE 58 Poste comptable par dfaut pour les virements internes -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/comptabilite-francaise/profession-liberale/fr_plan_proflib_tva.sql b/sources/contrib/comptabilite-francaise/profession-liberale/fr_plan_proflib_tva.sql deleted file mode 100644 index 38810b8..0000000 --- a/sources/contrib/comptabilite-francaise/profession-liberale/fr_plan_proflib_tva.sql +++ /dev/null @@ -1,44 +0,0 @@ --- --- PostgreSQL database dump --- Version 2007/10/23 22:23 --- - -SET client_encoding = 'LATIN1'; -SET check_function_bodies = false; -SET client_min_messages = warning; - -SET search_path = public, pg_catalog; - --- --- Data for Name: tva_rate; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -COPY tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) FROM stdin; -101 TVAFranceNormal 0.196 TVA 19,6% - France mtropolitaine - Taux normal 4456,445 -102 TVAFranceRduit 0.055 TVA 5,5% - France mtropolitaine - Taux rduit 4456,445 -103 TVAFranceSuperRduit 0.021 TVA 2,1% - France mtropolitaine - Taux super rduit 4456,445 -104 TVAFranceImmos 0.196 TVA 19,6% - France mtropolitaine - Taux immobilisations 4456,445 -105 TVAFranceAnciens 0 TVA x% - France mtropolitaine - Taux anciens 4456,445 -201 TVADomNormal 0.085 TVA 8,5% - DOM - Taux normal 4456,445 -202 TVADomNPR 0.085 TVA 8,5% - DOM - Taux normal NPR 4456,445 -203 TVADomRduit 0.021 TVA 2,1% - DOM - Taux rduit 4456,445 -204 TVADom-I 0.0175 TVA 1,75% - DOM - Taux I 4456,445 -205 TVADomPresse 0.0105 TVA 1,05% - DOM - Taux publications de presse 4456,445 -206 TVADomOctroi 0 TVA x% - DOM - Taux octroi de mer 4456,445 -207 TVADomImmos 0 TVA x% - DOM - Taux immobilisations 4456,445 -301 TVACorse-I 0.13 TVA 13% - Corse - Taux I 4456,445 -302 TVACorse-II 0.08 TVA 8% - Corse - Taux II 4456,445 -303 TVACorse-III 0.021 TVA 2,1% - Corse - Taux III 4456,445 -304 TVACorse-IV 0.009 TVA 0,9% - Corse - Taux IV 4456,445 -305 TVACorseImmos 0 TVA x% - Corse - Taux immobilisations 4456,445 -401 TVAacquisIntracom 0 TVA x% - Acquisitions intracommunautaires/Pays 4456,445 -402 TVAacquisIntracomImmos 0 TVA x% - Acquisitions intracommunautaires immobilisations/Pays 4456,445 -501 TVAfranchise 0 TVA x% - Non imposable : Achats en franchise -502 TVAexport 0 TVA x% - Non imposable : Exports hors CE/Pays -503 TVAautres 0 TVA x% - Non imposable : Autres oprations -504 TVAlivrIntracom 0 TVA x% - Non imposable : Livraisons intracommunautaires/Pays -\. - --- --- PostgreSQL database dump complete --- diff --git a/sources/contrib/document_test/all_tags.odt b/sources/contrib/document_test/all_tags.odt deleted file mode 100644 index 1b6afbb..0000000 Binary files a/sources/contrib/document_test/all_tags.odt and /dev/null differ diff --git a/sources/contrib/document_test/facture-calc.ods b/sources/contrib/document_test/facture-calc.ods deleted file mode 100644 index 2006f7d..0000000 Binary files a/sources/contrib/document_test/facture-calc.ods and /dev/null differ diff --git a/sources/contrib/document_test/facture.html b/sources/contrib/document_test/facture.html deleted file mode 100644 index addb2c0..0000000 --- a/sources/contrib/document_test/facture.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - Facture - - - - - -

- Client <>
- Adresse <>
- <> <>
-

-

FACTURE

-
-

Détail

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
marchandises
ArticlePrix unitaireQuantitéCode TVAMontant TVAMontant TVAC
<> <> <><> <> <><>
<> <> <><> <> <><>
<> <> <><> <> <><>
<> <> <><> <> <><>
<> <> <><> <> <><>
<> <> <><> <> <><>
-
-
-

-Prix total HTVA = <> -

-

-Total TVA = <> -

- -

-Prix total TVAC = <> -

- -
- - diff --git a/sources/contrib/document_test/facture.odt b/sources/contrib/document_test/facture.odt deleted file mode 100644 index 64496bd..0000000 Binary files a/sources/contrib/document_test/facture.odt and /dev/null differ diff --git a/sources/contrib/document_test/facture1.rtf b/sources/contrib/document_test/facture1.rtf deleted file mode 100644 index 4d2dedc..0000000 --- a/sources/contrib/document_test/facture1.rtf +++ /dev/null @@ -1,30 +0,0 @@ -{\rtf1\ansi\ansicpg1252\uc1\deff0 -{\fonttbl{\f0\fnil\fprq2 Bitstream Vera Sans;} -}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;}{\stylesheet -{\ql\fi0\f0\fs20\i0\b0\cf1\ul0\strike0\snext0 Standard;} -{\s1\qc\fi0\f0\fs48\i0\b\cf1\ul0\strike0\snext0 Document Title;} -{\s2\ql\fi0\f0\fs40\i0\b\cf1\ul0\strike0\snext0 Head 1;} -{\s3\ql\fi0\f0\fs32\i0\b\cf1\ul0\strike0\snext0 Head 2;} -{\s4\ql\fi0\f0\fs24\i0\b\cf1\ul0\strike0\snext0 Head 3;} -{\s5\ql\fi0\f0\fs20\i0\b0\cf1\ul0\strike0\snext5 Enumerated List;} -{\s6\ql\fi0\f0\fs20\i0\b0\cf1\ul0\strike0\snext6 Alphabetical List;} -{\s7\ql\fi0\f0\fs20\i0\b0\cf1\ul0\strike0\snext7 Bullet List;} -}{\info {\author Dany De Bontridder}{\comment Generated by KWord's RTF Export Filter 388763 }{\creatim\yr2006\mo6\dy25\hr0\min41\sec49}{\revtim\yr2006\mo6\dy25\hr0\min46\sec22}{\printim\yr1970\mo1\dy1\hr1\min0\sec0}}\paperw11900\paperh16820\margl1140\margr1140\margt840\margb840\widowctrl\ftnbj\aenddoc\formshade \fet0\sectd -\pgnstart1 -\pard\plain\pard\plain\s0\ql\fi0\f0\fs20\i0\b0\cf1\ul0\strike0 {<>} -\par\pard\plain\s0\ql\fi0\f0\fs20\i0\b0\cf1\ul0\strike0 {<> <>} -\par\pard\plain\s0\ql\fi0\f0\fs20\i0\b0\cf1\ul0\strike0 {<><>} -\par\pard\plain\s0\ql\fi0\f0\fs20\i0\b0\cf1\ul0\strike0 {<>} -\par\pard\plain\par\pard\plain\par\pard\plain\par\pard\plain\par\pard\plain\par\pard\plain\s0\ql\fi0\tx4200\f0\fs20\i0\b0\cf1\ul0\strike0 {\tab \tab \tab Bruxelles le <>} -\par\pard\plain\par\pard\plain\s0\ql\fi0\tx3080\f0\fs20\i0\b0\cf1\ul0\strike0 {\tab {\fs28\b\ul0 Facture n\'b0 <>}} -\par\pard\plain\par\pard\plain\par\pard\plain\s0\ql\fi0\tx4200\f0\fs20\i0\b0\cf1\ul0\strike0 {\tab <>} -\par\pard\plain\s0\ql\fi0\tx4200\f0\fs20\i0\b0\cf1\ul0\strike0 {\tab <>} -\par\pard\plain\s0\ql\fi0\tx4200\f0\fs20\i0\b0\cf1\ul0\strike0 {\tab <> <>} -\par\pard\plain\par\pard\plain\par\pard\plain\s0\ql\fi0\tx2640\f0\fs20\i0\b0\cf1\ul0\strike0 {<> \tab <> <> <>} -\par\pard\plain\par\pard\plain\s0\ql\fi0\tx2640\f0\fs20\i0\b0\cf1\ul0\strike0 {<> \tab <> <> <>} -\par\pard\plain\par\pard\plain\s0\ql\fi0\tx2640\f0\fs20\i0\b0\cf1\ul0\strike0 {<> \tab <> <> <>} -\par\pard\plain\par\pard\plain\s0\ql\fi0\tx2640\f0\fs20\i0\b0\cf1\ul0\strike0 {<> \tab <> <> <>} -\par\pard\plain\par\pard\plain\s0\ql\fi0\tx2640\f0\fs20\i0\b0\cf1\ul0\strike0 {<> \tab <> <> <>} -\par\pard\plain\par\pard\plain\par\pard\plain\par\pard\plain\par\pard\plain\par\pard\plain\s0\ql\fi0\tx2980\f0\fs20\i0\b0\cf1\ul0\strike0 {TOTAL A PAYER : <>} -\par\pard\plain\par\pard\plain\par\pard\plain\s0\ql\fi0\tx2980\f0\fs20\i0\b0\cf1\ul0\strike0 {Si t'es pas d'accord appel-moi au <>} -} diff --git a/sources/contrib/document_test/logo.png b/sources/contrib/document_test/logo.png deleted file mode 100644 index 75a022a..0000000 Binary files a/sources/contrib/document_test/logo.png and /dev/null differ diff --git a/sources/contrib/document_test/logo.svg b/sources/contrib/document_test/logo.svg deleted file mode 100644 index ed1b517..0000000 --- a/sources/contrib/document_test/logo.svg +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/sources/contrib/document_test/modele-facture.ods b/sources/contrib/document_test/modele-facture.ods deleted file mode 100644 index 7fc70d5..0000000 Binary files a/sources/contrib/document_test/modele-facture.ods and /dev/null differ diff --git a/sources/contrib/document_test/note-de-frais.odt b/sources/contrib/document_test/note-de-frais.odt deleted file mode 100644 index 3112083..0000000 Binary files a/sources/contrib/document_test/note-de-frais.odt and /dev/null differ diff --git a/sources/contrib/document_test/rappel.odt b/sources/contrib/document_test/rappel.odt deleted file mode 100644 index 7a9908f..0000000 Binary files a/sources/contrib/document_test/rappel.odt and /dev/null differ diff --git a/sources/contrib/mono-dossier/mono-belge.sql b/sources/contrib/mono-dossier/mono-belge.sql deleted file mode 100644 index a03d3ff..0000000 --- a/sources/contrib/mono-dossier/mono-belge.sql +++ /dev/null @@ -1,9345 +0,0 @@ --- --- PostgreSQL database dump --- - -SET statement_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = off; -SET check_function_bodies = false; -SET client_min_messages = warning; -SET escape_string_warning = off; - --- --- Name: comptaproc; Type: SCHEMA; Schema: -; Owner: - --- - -CREATE SCHEMA comptaproc; - - --- --- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: - --- - -CREATE PROCEDURAL LANGUAGE plpgsql; - - -SET search_path = public, pg_catalog; - --- --- Name: account_type; Type: DOMAIN; Schema: public; Owner: - --- - -CREATE DOMAIN account_type AS character varying(40); - - --- --- Name: anc_table_account_type; Type: TYPE; Schema: public; Owner: - --- - -CREATE TYPE anc_table_account_type AS ( - po_id bigint, - pa_id bigint, - po_name text, - po_description text, - sum_amount numeric(25,4), - card_account text, - name text -); - - --- --- Name: anc_table_card_type; Type: TYPE; Schema: public; Owner: - --- - -CREATE TYPE anc_table_card_type AS ( - po_id bigint, - pa_id bigint, - po_name text, - po_description text, - sum_amount numeric(25,4), - f_id bigint, - card_account text, - name text -); - - --- --- Name: menu_tree; Type: TYPE; Schema: public; Owner: - --- - -CREATE TYPE menu_tree AS ( - code text, - description text -); - - -SET search_path = comptaproc, pg_catalog; - --- --- Name: account_add(public.account_type, character varying); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION 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; -end ; -$$; - - --- --- Name: account_alphanum(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION account_alphanum() RETURNS boolean - LANGUAGE plpgsql - AS $$ -declare - l_auto bool; -begin - l_auto := true; - select pr_value into l_auto from parameter where pr_id='MY_ALPHANUM'; - if l_auto = 'N' or l_auto is null then - l_auto:=false; - end if; - return l_auto; -end; -$$; - - --- --- Name: account_auto(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION account_auto(p_fd_id integer) RETURNS boolean - LANGUAGE plpgsql - AS $$ -declare - l_auto bool; -begin - - select fd_create_account into l_auto from fiche_def where fd_id=p_fd_id; - if l_auto is null then - l_auto:=false; - end if; - return l_auto; -end; -$$; - - --- --- Name: account_compute(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION 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 account_type; - 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 - 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 - -- 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 := class_base||sName; - end if; - return sResult; -end; -$$; - - --- --- Name: account_insert(integer, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION 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; -begin - - 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'; - select count(*) into nCount from tmp_pcmn where pcm_val=p_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,p_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(p_account::account_type); - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::account_type,sName,nParent); - perform attribut_insert(p_f_id,5,p_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 '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); - - 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; - -return 0; -end; -$$; - - --- --- Name: account_parent(public.account_type); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION account_parent(p_account public.account_type) RETURNS public.account_type - LANGUAGE plpgsql - AS $$ -declare - sSubParent tmp_pcmn.pcm_val_parent%type; - sResult tmp_pcmn.pcm_val_parent%type; - nCount integer; -begin - if p_account is NULL then - return NULL; - end if; - sSubParent:=p_account; - while true loop - select count(*) into nCount - from tmp_pcmn - where - pcm_val = sSubParent; - if nCount != 0 then - sResult:= sSubParent; - exit; - end if; - sSubParent:= substr(sSubParent,1,length(sSubParent)-1); - if length(sSubParent) <= 0 then - raise exception 'Impossible de trouver le compte parent pour %',p_account; - end if; - raise notice 'sSubParent % % ',sSubParent,length(sSubParent); - end loop; - raise notice 'account_parent : Parent is %',sSubParent; - return sSubParent; -end; -$$; - - --- --- Name: account_update(integer, public.account_type); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION account_update(p_f_id integer, p_account public.account_type) RETURNS integer - LANGUAGE plpgsql - AS $$ -declare - nMax fiche.f_id%type; - nCount integer; - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - first text; - second text; -begin - - if length(trim(p_account)) != 0 then - -- 2 accounts in card separated by comma - if position (',' in p_account) = 0 then - 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; - 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 - - end if; - else - -- account is null - update fiche_detail set ad_value=null where f_id=p_f_id and ad_id=5 ; - end if; - - update fiche_detail set ad_value=p_account where f_id=p_f_id and ad_id=5 ; - -return 0; -end; -$$; - - --- --- Name: action_gestion_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION action_gestion_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -begin -NEW.ag_title := substr(trim(NEW.ag_title),1,70); -NEW.ag_hour := substr(trim(NEW.ag_hour),1,5); -return NEW; -end; -$$; - - --- --- Name: action_get_tree(bigint); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION action_get_tree(p_id bigint) RETURNS SETOF bigint - LANGUAGE plpgsql - AS $$ - -declare - e bigint; - i bigint; -begin - for e in select ag_id from action_gestion where ag_ref_ag_id=p_id - loop - for i in select action_get_tree from comptaproc.action_get_tree(e) - loop - raise notice ' == i %', i; - return next i; - end loop; - raise notice ' = e %', e; - return next e; - end loop; - return; - -end; -$$; - - --- --- Name: attribut_insert(integer, integer, character varying); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION attribut_insert(p_f_id integer, p_ad_id integer, p_value character varying) RETURNS void - LANGUAGE plpgsql - AS $$ -begin - insert into fiche_detail (f_id,ad_id, ad_value) values (p_f_id,p_ad_id,p_value); - -return; -end; -$$; - - --- --- Name: attribute_correct_order(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION attribute_correct_order() RETURNS void - LANGUAGE plpgsql - AS $$ -declare - crs_correct cursor for select A.jnt_id,A.jnt_order from jnt_fic_attr as A join jnt_fic_attr as B using (fd_id) where A.jnt_order=B.jnt_order and A.jnt_id > B.jnt_id; - rec record; -begin - open crs_correct; - loop - fetch crs_correct into rec; - if NOT FOUND then - close crs_correct; - return; - end if; - update jnt_fic_attr set jnt_order=jnt_order + 1 where jnt_id = rec.jnt_id; - end loop; - close crs_correct; - perform attribute_correct_order (); -end; -$$; - - --- --- Name: card_after_delete(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION card_after_delete() RETURNS trigger - LANGUAGE plpgsql - AS $$ - -begin - - delete from action_gestion where f_id_dest = OLD.f_id; - return OLD; - -end; -$$; - - --- --- Name: card_class_base(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION card_class_base(p_f_id integer) RETURNS text - LANGUAGE plpgsql - AS $$ -declare - n_poste fiche_def.fd_class_base%type; -begin - - select fd_class_base into n_poste from fiche_def join fiche using -(fd_id) - where f_id=p_f_id; - if not FOUND then - raise exception 'Invalid fiche card_class_base(%)',p_f_id; - end if; -return n_poste; -end; -$$; - - --- --- Name: check_balance(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION check_balance(p_grpt integer) RETURNS numeric - LANGUAGE plpgsql - AS $$ -declare - amount_jrnx_debit numeric; - amount_jrnx_credit numeric; - amount_jrn numeric; -begin - select sum (j_montant) into amount_jrnx_credit - from jrnx - where - j_grpt=p_grpt - and j_debit=false; - - select sum (j_montant) into amount_jrnx_debit - from jrnx - where - j_grpt=p_grpt - and j_debit=true; - - select jr_montant into amount_jrn - from jrn - where - jr_grpt_id=p_grpt; - - if ( amount_jrnx_debit != amount_jrnx_credit ) - then - return abs(amount_jrnx_debit-amount_jrnx_credit); - end if; - if ( amount_jrn != amount_jrnx_credit) - then - return -1*abs(amount_jrn - amount_jrnx_credit); - end if; - return 0; -end; -$$; - - --- --- Name: correct_sequence(text, text, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION correct_sequence(p_sequence text, p_col text, p_table text) RETURNS integer - LANGUAGE plpgsql - AS $$ -declare -last_sequence int8; -max_sequence int8; -n integer; -begin - select count(*) into n from pg_class where relkind='S' and relname=lower(p_sequence); - if n = 0 then - raise exception ' Unknow sequence % ',p_sequence; - end if; - select count(*) into n from pg_class where relkind='r' and relname=lower(p_table); - if n = 0 then - raise exception ' Unknow table % ',p_table; - end if; - - execute 'select last_value from '||p_sequence into last_sequence; - raise notice 'Last value of the sequence is %', last_sequence; - - execute 'select max('||p_col||') from '||p_table into max_sequence; - if max_sequence is null then - max_sequence := 0; - end if; - raise notice 'Max value of the sequence is %', max_sequence; - max_sequence:= max_sequence +1; - execute 'alter sequence '||p_sequence||' restart with '||max_sequence; -return 0; - -end; -$$; - - --- --- Name: FUNCTION correct_sequence(p_sequence text, p_col text, p_table text); Type: COMMENT; Schema: comptaproc; Owner: - --- - -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'; - - --- --- Name: create_missing_sequence(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION create_missing_sequence() RETURNS integer - LANGUAGE plpgsql - AS $$ -declare -p_sequence text; -nSeq integer; -c1 cursor for select jrn_def_id from jrn_def; -begin - open c1; - loop - fetch c1 into nSeq; - if not FOUND THEN - close c1; - return 0; - end if; - p_sequence:='s_jrn_pj'||nSeq::text; - execute 'create sequence '||p_sequence; - end loop; -close c1; -return 0; - -end; -$$; - - --- --- Name: drop_index(character varying); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION drop_index(p_constraint character varying) RETURNS void - LANGUAGE plpgsql - AS $$ -declare - nCount integer; -begin - select count(*) into nCount from pg_indexes where indexname=p_constraint; - if nCount = 1 then - execute 'drop index '||p_constraint ; - end if; -end; -$$; - - --- --- Name: drop_it(character varying); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION drop_it(p_constraint character varying) RETURNS void - LANGUAGE plpgsql - AS $$ -declare - nCount integer; -begin - select count(*) into nCount from pg_constraint where conname=p_constraint; - if nCount = 1 then - execute 'alter table parm_periode drop constraint '||p_constraint ; - end if; -end; -$$; - - --- --- Name: extension_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION extension_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - sCode text; - sFile text; -begin -sCode:=trim(upper(NEW.ex_code)); -sCode:=replace(sCode,' ','_'); -sCode:=substr(sCode,1,15); -sCode=upper(sCode); -NEW.ex_code:=sCode; -sFile:=NEW.ex_file; -sFile:=replace(sFile,';','_'); -sFile:=replace(sFile,'<','_'); -sFile:=replace(sFile,'>','_'); -sFile:=replace(sFile,'..',''); -sFile:=replace(sFile,'&',''); -sFile:=replace(sFile,'|',''); - - - -return NEW; - -end; - -$$; - - --- --- Name: fiche_account_parent(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION fiche_account_parent(p_f_id integer) RETURNS public.account_type - LANGUAGE plpgsql - AS $$ -declare -ret tmp_pcmn.pcm_val%TYPE; -begin - select fd_class_base into ret from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if not FOUND then - raise exception '% N''existe pas',p_f_id; - end if; - return ret; -end; -$$; - - --- --- Name: fiche_attribut_synchro(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION fiche_attribut_synchro(p_fd_id integer) RETURNS void - LANGUAGE plpgsql - AS $$ -declare - -- this sql gives the f_id and the missing attribute (ad_id) - list_missing cursor for select f_id,fd_id,ad_id,jnt_order from jnt_fic_attr join fiche as A using (fd_id) where fd_id=p_fd_id and ad_id not in (select ad_id from fiche join fiche_detail using (f_id) where fd_id=jnt_fic_attr.fd_id and A.f_id=f_id); - rec record; -begin - open list_missing; - loop - - fetch list_missing into rec; - IF NOT FOUND then - exit; - end if; - - -- now we insert into attr_value - insert into fiche_detail (f_id,ad_id,ad_value) values (rec.f_id,rec.ad_id,null); - end loop; - close list_missing; -end; -$$; - - --- --- Name: fiche_def_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION fiche_def_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -begin - -if position (',' in NEW.fd_class_base) != 0 then - NEW.fd_create_account='f'; - -end if; -return NEW; -end;$$; - - --- --- Name: fill_quant_fin(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION fill_quant_fin() RETURNS void - LANGUAGE plpgsql - AS $$ -declare - sBank text; - sCassa text; - sCustomer text; - sSupplier text; - rec record; - recBank record; - recSupp_Cust record; - nCount integer; - nAmount numeric; - nBank integer; - nOther integer; - nSupp_Cust integer; -begin - select p_value into sBank from parm_code where p_code='BANQUE'; - select p_value into sCassa from parm_code where p_code='CAISSE'; - select p_value into sSupplier from parm_code where p_code='SUPPLIER'; - select p_value into sCustomer from parm_code where p_code='CUSTOMER'; - - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') - and jr_id not in (select jr_id from quant_fin) - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nBank := 0; nOther:=0; - for recBank in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recBank.j_poste like sBank||'%' then - -- retrieve f_id for bank - select f_id into nBank from vw_poste_qcode where j_qcode=recBank.j_qcode; - if recBank.j_debit = false then - nAmount=recBank.j_montant*(-1); - else - nAmount=recBank.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recBank.j_qcode; - end if; - end loop; - if nBank != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nBank,nOther,nAmount); - end if; - end loop; - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') and jr_id not in (select jr_id from quant_fin) - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nBank := 0; nOther:=0; - for recBank in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recBank.j_poste like sCassa||'%' then - -- retrieve f_id for bank - select f_id into nBank from vw_poste_qcode where j_qcode=recBank.j_qcode; - if recBank.j_debit = false then - nAmount=recBank.j_montant*(-1); - else - nAmount=recBank.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recBank.j_qcode; - end if; - end loop; - if nBank != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nBank,nOther,nAmount); - end if; - end loop; - - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') and jr_id not in (select jr_id from quant_fin) - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nSupp_Cust := 0; nOther:=0; - for recSupp_Cust in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recSupp_Cust.j_poste like sSupplier||'%' then - -- retrieve f_id for bank - select f_id into nSupp_Cust from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - if recSupp_Cust.j_debit = true then - nAmount=recSupp_Cust.j_montant*(-1); - else - nAmount=recSupp_Cust.j_montant; - end if; - else if recSupp_Cust.j_poste like sCustomer||'%' then - select f_id into nSupp_Cust from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - if recSupp_Cust.j_debit = false then - nAmount=recSupp_Cust.j_montant*(-1); - else - nAmount=recSupp_Cust.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - - end if; - end if; - end loop; - if nSupp_Cust != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nOther,nSupp_Cust,nAmount); - end if; - end loop; - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') and jr_id not in (select jr_id from quant_fin) - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nSupp_Cust := 0; nOther:=0; - for recSupp_Cust in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recSupp_Cust.j_poste like '441%' then - -- retrieve f_id for bank - select f_id into nSupp_Cust from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - if recSupp_Cust.j_debit = false then - nAmount=recSupp_Cust.j_montant*(-1); - else - nAmount=recSupp_Cust.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - - - end if; - end loop; - if nSupp_Cust != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nOther,nSupp_Cust,nAmount); - end if; - end loop; - return; -end; -$$; - - --- --- Name: find_pcm_type(public.account_type); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION find_pcm_type(pp_value public.account_type) RETURNS text - LANGUAGE plpgsql - AS $$ -declare - str_type parm_poste.p_type%TYPE; - str_value parm_poste.p_type%TYPE; - nLength integer; -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 - return str_type; - end if; - nLength:=nLength-1; - str_value:=substring(str_value::text from 1 for nLength)::account_type; - end loop; -return 'CON'; -end; -$$; - - --- --- Name: find_periode(text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION find_periode(p_date text) RETURNS integer - LANGUAGE plpgsql - AS $$ - -declare n_p_id int4; -begin - -select p_id into n_p_id - from parm_periode - where - p_start <= to_date(p_date,'DD.MM.YYYY') - and - p_end >= to_date(p_date,'DD.MM.YYYY'); - -if NOT FOUND then - return -1; -end if; - -return n_p_id; - -end;$$; - - --- --- Name: format_account(public.account_type); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION format_account(p_account public.account_type) RETURNS public.account_type - LANGUAGE plpgsql - AS $_$ - -declare - -sResult account_type; - -begin -sResult := lower(p_account); - -sResult := translate(sResult,'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc'); -sResult := translate(sResult,' $€µ£%.+-/\!(){}(),;_&|"#''^<>*',''); - -return upper(sResult); - -end; -$_$; - - --- --- Name: FUNCTION format_account(p_account public.account_type); Type: COMMENT; Schema: comptaproc; Owner: - --- - -COMMENT ON FUNCTION format_account(p_account public.account_type) IS 'format the accounting : -- upper case -- remove space and special char. -'; - - --- --- Name: get_letter_jnt(bigint); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION get_letter_jnt(a bigint) RETURNS bigint - LANGUAGE plpgsql - AS $$ -declare - nResult bigint; -begin - select jl_id into nResult from jnt_letter join letter_deb using (jl_id) where j_id = a; - if NOT FOUND then - select jl_id into nResult from jnt_letter join letter_cred using (jl_id) where j_id = a; - if NOT found then - return null; - end if; - end if; -return nResult; -end; -$$; - - --- --- Name: get_menu_tree(text, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION get_menu_tree(p_code text, login text) RETURNS SETOF public.menu_tree - LANGUAGE plpgsql - AS $$ -declare - i menu_tree; - e menu_tree; - a text; - x v_all_menu%ROWTYPE; -begin - for x in select * from v_all_menu where me_code_dep=p_code::text and user_name=login::text - loop - if x.me_code_dep is not null then - i.code := x.me_code_dep||'/'||x.me_code; - else - i.code := x.me_code; - end if; - - i.description := x.me_description; - - return next i; - - for e in select * from get_menu_tree(x.me_code,login) - loop - e.code:=x.me_code_dep||'/'||e.code; - return next e; - end loop; - - end loop; - return; -end; -$$; - - --- --- Name: get_pcm_tree(public.account_type); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION get_pcm_tree(source public.account_type) RETURNS SETOF public.account_type - LANGUAGE plpgsql - AS $$ -declare - i account_type; - e account_type; -begin - for i in select pcm_val from tmp_pcmn where pcm_val_parent=source - loop - return next i; - for e in select get_pcm_tree from get_pcm_tree(i) - loop - return next e; - end loop; - - end loop; - return; -end; -$$; - - --- --- Name: get_profile_menu(text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION get_profile_menu(login text) RETURNS SETOF public.menu_tree - LANGUAGE plpgsql - AS $$ -declare - a menu_tree; - e menu_tree; -begin -for a in select me_code,me_description from v_all_menu where user_name=login - and me_code_dep is null and me_type <> 'PR' and me_type <>'SP' -loop - return next a; - - for e in select * from get_menu_tree(a.code,login) - loop - return next e; - end loop; - - end loop; -return; -end; -$$; - - --- --- Name: group_analytic_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION group_analytic_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -name text; -begin -name:=upper(NEW.ga_id); -name:=trim(name); -name:=replace(name,' ',''); -NEW.ga_id:=name; -return NEW; -end;$$; - - --- --- Name: group_analytique_del(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION group_analytique_del() RETURNS trigger - LANGUAGE plpgsql - AS $$ -begin -update poste_analytique set ga_id=null -where ga_id=OLD.ga_id; -return OLD; -end;$$; - - --- --- Name: html_quote(text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION html_quote(p_string text) RETURNS text - LANGUAGE plpgsql - AS $$ -declare - r text; -begin - r:=p_string; - r:=replace(r,'<','<'); - r:=replace(r,'>','>'); - r:=replace(r,'''','"'); - return r; -end;$$; - - --- --- Name: FUNCTION html_quote(p_string text); Type: COMMENT; Schema: comptaproc; Owner: - --- - -COMMENT ON FUNCTION html_quote(p_string text) IS 'remove harmfull HTML char'; - - --- --- Name: info_def_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION info_def_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - row_info_def info_def%ROWTYPE; - str_type text; -begin -row_info_def:=NEW; -str_type:=upper(trim(NEW.id_type)); -str_type:=replace(str_type,' ',''); -str_type:=replace(str_type,',',''); -str_type:=replace(str_type,';',''); -if length(str_type) =0 then - raise exception 'id_type cannot be null'; -end if; -row_info_def.id_type:=str_type; -return row_info_def; -end; -$$; - - --- --- Name: insert_jrnx(character varying, numeric, public.account_type, integer, integer, boolean, text, integer, text, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -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 - LANGUAGE plpgsql - AS $$ -begin - insert into jrnx - ( - j_date, - j_montant, - j_poste, - j_grpt, - j_jrn_def, - j_debit, - j_text, - j_tech_user, - j_tech_per, - j_qcode - ) values - ( - to_date(p_date,'DD.MM.YYYY'), - p_montant, - p_poste, - p_grpt, - p_jrn_def, - p_debit, - p_comment, - p_tech_user, - p_tech_per, - p_qcode - ); - -return; -end; -$$; - - --- --- Name: insert_quant_purchase(text, numeric, character varying, numeric, numeric, numeric, integer, numeric, numeric, numeric, numeric, character varying, numeric); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -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) RETURNS void - LANGUAGE plpgsql - AS $$ -declare - fid_client integer; - fid_good integer; -begin - select f_id into fid_client from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_client)); - select f_id into fid_good from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_fiche)); - insert into quant_purchase - (qp_internal, - j_id, - qp_fiche, - qp_quantite, - qp_price, - qp_vat, - qp_vat_code, - qp_nd_amount, - qp_nd_tva, - qp_nd_tva_recup, - qp_supplier, - qp_dep_priv, - qp_vat_sided) - values - (p_internal, - p_j_id, - fid_good, - p_quant, - p_price, - p_vat, - p_vat_code, - p_nd_amount, - p_nd_tva, - p_nd_tva_recup, - fid_client, - p_dep_priv, - p_tva_sided); - return; -end; - $$; - - --- --- Name: insert_quant_sold(text, numeric, character varying, numeric, numeric, numeric, integer, character varying, numeric); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -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) RETURNS void - LANGUAGE plpgsql - AS $$ -declare - fid_client integer; - fid_good integer; -begin - - select f_id into fid_client from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_client)); - select f_id into fid_good from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_fiche)); - insert into quant_sold - (qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client,qs_valid,qs_vat_sided) - values - (p_internal,p_jid,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client,'Y',p_tva_sided); - return; -end; - $$; - - --- --- Name: insert_quick_code(integer, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION insert_quick_code(nf_id integer, tav_text text) RETURNS integer - LANGUAGE plpgsql - AS $$ - declare - ns integer; - nExist integer; - tText text; - begin - tText := upper(trim(tav_text)); - tText := replace(tText,' ',''); - - loop - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - if length (tText) = 0 or tText is null then - tText := 'FID'||ns; - 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; - tText:='FID'||ns; - end loop; - - - insert into fiche_detail(jft_id,f_id,ad_id,ad_value) values (ns,nf_id,23,upper(tText)); - return ns; - end; -$$; - - --- --- Name: is_closed(integer, integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION is_closed(p_periode integer, p_jrn_def_id integer) RETURNS boolean - LANGUAGE plpgsql - AS $$ -declare -bClosed bool; -str_status text; -begin -select p_closed into bClosed from parm_periode - where p_id=p_periode; - -if bClosed = true then - return bClosed; -end if; - -select status into str_status from jrn_periode - where p_id =p_periode and jrn_def_id=p_jrn_def_id; - -if str_status <> 'OP' then - return bClosed; -end if; -return false; -end; -$$; - - --- --- Name: jnt_fic_attr_ins(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jnt_fic_attr_ins() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - r_record jnt_fic_attr%ROWTYPE; - i_max integer; -begin -r_record=NEW; -perform comptaproc.fiche_attribut_synchro(r_record.fd_id); -select coalesce(max(jnt_order),0) into i_max from jnt_fic_attr where fd_id=r_record.fd_id; -i_max := i_max + 10; -NEW.jnt_order=i_max; -return NEW; -end; -$$; - - --- --- Name: jrn_add_note(bigint, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrn_add_note(p_jrid bigint, p_note text) RETURNS void - LANGUAGE plpgsql - AS $$ -declare - tmp bigint; -begin - if length(trim(p_note)) = 0 then - delete from jrn_note where jr_id= p_jrid; - return; - end if; - - select n_id into tmp from jrn_note where jr_id = p_jrid; - - if FOUND then - update jrn_note set n_text=trim(p_note) where jr_id = p_jrid; - else - insert into jrn_note (jr_id,n_text) values ( p_jrid, p_note); - - end if; - - return; -end; -$$; - - --- --- Name: jrn_check_periode(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrn_check_periode() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -bClosed bool; -str_status text; -ljr_tech_per jrn.jr_tech_per%TYPE; -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; -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; -end if; - -if TG_OP='DELETE' then - 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'; -end if; - -return lreturn; -end;$$; - - --- --- Name: jrn_def_add(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION 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||', - case when p_central=true then ''CE'' - when p_closed=true then ''CL'' - else ''OP'' - end -from -parm_periode '; -return NEW; -end;$$; - - --- --- Name: jrn_def_delete(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrn_def_delete() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -nb numeric; -begin -select count(*) into nb from jrn where jr_def_id=OLD.jrn_def_id; - -if nb <> 0 then - raise exception 'EFFACEMENT INTERDIT: JOURNAL UTILISE'; -end if; -return OLD; -end;$$; - - --- --- Name: jrn_del(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrn_del() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -row jrn%ROWTYPE; -begin -row:=OLD; -insert into del_jrn ( jr_id, - jr_def_id, - jr_montant, - jr_comment, - jr_date, - jr_grpt_id, - jr_internal, - jr_tech_date, - jr_tech_per, - jrn_ech, - jr_ech, - jr_rapt, - jr_valid, - jr_opid, - jr_c_opid, - jr_pj, - jr_pj_name, - jr_pj_type, - jr_pj_number, - del_jrn_date) - select jr_id, - jr_def_id, - jr_montant, - jr_comment, - jr_date, - jr_grpt_id, - jr_internal, - jr_tech_date, - jr_tech_per, - jrn_ech, - jr_ech, - jr_rapt, - jr_valid, - jr_opid, - jr_c_opid, - jr_pj, - jr_pj_name, - jr_pj_type, - jr_pj_number - ,now() from jrn where jr_id=row.jr_id; -return row; -end; -$$; - - --- --- Name: jrnx_del(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrnx_del() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -row jrnx%ROWTYPE; -begin -row:=OLD; - - -insert into del_jrnx( - j_id, j_date, j_montant, j_poste, j_grpt, j_rapt, j_jrn_def, - j_debit, j_text, j_centralized, j_internal, j_tech_user, j_tech_date, - j_tech_per, j_qcode, f_id) SELECT j_id, j_date, j_montant, j_poste, j_grpt, j_rapt, j_jrn_def, - j_debit, j_text, j_centralized, j_internal, j_tech_user, j_tech_date, - j_tech_per, j_qcode, f_id from jrnx where j_id=row.j_id; -return row; -end; -$$; - - --- --- Name: jrnx_ins(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrnx_ins() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -n_fid bigint; -begin - -NEW.j_tech_per := comptaproc.find_periode(to_char(NEW.j_date,'DD.MM.YYYY')); -if NEW.j_tech_per = -1 then - raise exception 'Période invalide'; -end if; - -if NEW.j_qcode is NULL then - return NEW; -end if; - -NEW.j_qcode=trim(upper(NEW.j_qcode)); - -if length (NEW.j_qcode) = 0 then - NEW.j_qcode=NULL; - else - select f_id into n_fid from fiche_detail where ad_id=23 and ad_value=NEW.j_qcode; - if NOT FOUND then - raise exception 'La fiche dont le quick code est % n''existe pas',NEW.j_qcode; - end if; -end if; -NEW.f_id:=n_fid; -return NEW; -end; -$$; - - --- --- Name: jrnx_letter_del(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrnx_letter_del() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -row jrnx%ROWTYPE; -begin -row:=OLD; -delete from jnt_letter - where (jl_id in (select jl_id from letter_deb) and jl_id not in(select jl_id from letter_cred )) - or (jl_id not in (select jl_id from letter_deb ) and jl_id in(select jl_id from letter_cred )); -return row; -end; -$$; - - --- --- Name: plan_analytic_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION plan_analytic_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - name text; -begin - name:=upper(NEW.pa_name); - name:=trim(name); - name:=replace(name,' ',''); - NEW.pa_name:=name; -return NEW; -end; -$$; - - --- --- Name: poste_analytique_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION poste_analytique_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$declare -name text; -rCount record; - -begin -name:=upper(NEW.po_name); -name:=trim(name); -name:=replace(name,' ',''); -NEW.po_name:=name; - -if NEW.ga_id is NULL then -return NEW; -end if; - -if length(trim(NEW.ga_id)) = 0 then - NEW.ga_id:=NULL; - return NEW; -end if; -perform 'select ga_id from groupe_analytique where ga_id='||NEW.ga_id; -if NOT FOUND then - raise exception' Inexistent Group Analytic %',NEW.ga_id; -end if; -return NEW; -end;$$; - - --- --- Name: proc_check_balance(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION proc_check_balance() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - diff numeric; - tt integer; -begin - if TG_OP = 'INSERT' or TG_OP='UPDATE' then - tt=NEW.jr_grpt_id; - diff:=check_balance(tt); - if diff != 0 then - raise exception 'balance error %',diff ; - end if; - return NEW; - end if; -end; -$$; - - --- --- Name: quant_purchase_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION quant_purchase_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ - begin - if NEW.qp_price < 0 OR NEW.qp_quantite <0 THEN - NEW.qp_price := abs (NEW.qp_price)*(-1); - NEW.qp_quantite := abs (NEW.qp_quantite)*(-1); - end if; -return NEW; -end; -$$; - - --- --- Name: quant_sold_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION quant_sold_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ - begin - if NEW.qs_price < 0 OR NEW.qs_quantite <0 THEN - NEW.qs_price := abs (NEW.qs_price)*(-1); - NEW.qs_quantite := abs (NEW.qs_quantite)*(-1); - end if; -return NEW; -end; -$$; - - --- --- Name: t_document_modele_validate(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION t_document_modele_validate() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - lText text; - modified document_modele%ROWTYPE; -begin - modified:=NEW; - - modified.md_filename:=replace(NEW.md_filename,' ','_'); - return modified; -end; -$$; - - --- --- Name: t_document_type_insert(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION t_document_type_insert() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -nCounter integer; - BEGIN -select count(*) into nCounter from pg_class where relname='seq_doc_type_'||NEW.dt_id; -if nCounter = 0 then - execute 'create sequence seq_doc_type_'||NEW.dt_id; -end if; - RETURN NEW; - END; -$$; - - --- --- Name: t_document_validate(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION t_document_validate() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - lText text; - modified document%ROWTYPE; -begin - modified:=NEW; - modified.d_filename:=replace(NEW.d_filename,' ','_'); - return modified; -end; -$$; - - --- --- Name: t_jrn_def_sequence(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION t_jrn_def_sequence() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -nCounter integer; - - BEGIN - select count(*) into nCounter - from pg_class where relname='s_jrn_'||NEW.jrn_def_id; - if nCounter = 0 then - execute 'create sequence s_jrn_'||NEW.jrn_def_id; - raise notice 'Creating sequence s_jrn_%',NEW.jrn_def_id; - end if; - - RETURN NEW; - END; -$$; - - --- --- Name: table_analytic_account(text, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION table_analytic_account(p_from text, p_to text) RETURNS SETOF public.anc_table_account_type - LANGUAGE plpgsql - AS $$ -declare - ret ANC_table_account_type%ROWTYPE; - sql_from text:=''; - sql_to text:=''; - sWhere text:=''; - sAnd text:=''; - sResult text:=''; -begin -if p_from <> '' and p_from is not null then - sql_from:='oa_date >= to_date('''||p_from::text||''',''DD.MM.YYYY'')'; - sWhere:=' where '; -end if; - -if p_to <> '' and p_to is not null then - sql_to=' oa_date <= to_date('''||p_to::text||''',''DD.MM.YYYY'')'; - sWhere := ' where '; -end if; - -if sql_to <> '' and sql_from <> '' then - sAnd:=' and '; -end if; - -sResult := sWhere || sql_from || sAnd || sql_to; - -for ret in EXECUTE 'SELECT po.po_id, - po.pa_id, po.po_name, - po.po_description,sum( - CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount - END) AS sum_amount, jrnx.j_poste, tmp_pcmn.pcm_lib AS name - FROM operation_analytique - JOIN poste_analytique po USING (po_id) - JOIN jrnx USING (j_id) - JOIN tmp_pcmn ON jrnx.j_poste::text = tmp_pcmn.pcm_val::text -'|| sResult ||' - GROUP BY po.po_id, po.po_name, po.pa_id, jrnx.j_poste, tmp_pcmn.pcm_lib, po.po_description - HAVING sum( -CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount -END) <> 0::numeric ' - loop - return next ret; -end loop; -end; -$$; - - --- --- Name: table_analytic_card(text, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION table_analytic_card(p_from text, p_to text) RETURNS SETOF public.anc_table_card_type - LANGUAGE plpgsql - AS $$ -declare - ret ANC_table_card_type%ROWTYPE; - sql_from text:=''; - sql_to text:=''; - sWhere text:=''; - sAnd text:=''; - sResult text:=''; -begin -if p_from <> '' and p_from is not null then - sql_from:='oa_date >= to_date('''||p_from::text||''',''DD.MM.YYYY'')'; - sWhere:=' where '; -end if; - -if p_to <> '' and p_to is not null then - sql_to=' oa_date <= to_date('''||p_to::text||''',''DD.MM.YYYY'')'; - sWhere := ' where '; -end if; - -if sql_to <> '' and sql_from <> '' then - sAnd :=' and '; -end if; - -sResult := sWhere || sql_from || sAnd || sql_to; - -for ret in EXECUTE ' SELECT po.po_id, po.pa_id, po.po_name, po.po_description, sum( - CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount - END) AS sum_amount, jrnx.f_id, jrnx.j_qcode, ( SELECT fiche_detail.ad_value - FROM fiche_detail - WHERE fiche_detail.ad_id = 1 AND fiche_detail.f_id = jrnx.f_id) AS name - FROM operation_analytique - JOIN poste_analytique po USING (po_id) - JOIN jrnx USING (j_id)'|| sResult ||' - GROUP BY po.po_id, po.po_name, po.pa_id, jrnx.f_id, jrnx.j_qcode, ( SELECT fiche_detail.ad_value - FROM fiche_detail - WHERE fiche_detail.ad_id = 1 AND fiche_detail.f_id = jrnx.f_id), po.po_description - HAVING sum( -CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount -END) <> 0::numeric;' - - - loop - return next ret; -end loop; -end; -$$; - - --- --- Name: tmp_pcmn_alphanum_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION tmp_pcmn_alphanum_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - r_record tmp_pcmn%ROWTYPE; -begin -r_record := NEW; -r_record.pcm_val:=format_account(NEW.pcm_val); - -return r_record; -end; -$$; - - --- --- Name: tmp_pcmn_ins(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION tmp_pcmn_ins() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - r_record tmp_pcmn%ROWTYPE; -begin -r_record := NEW; -if length(trim(r_record.pcm_type))=0 or r_record.pcm_type is NULL then - r_record.pcm_type:=find_pcm_type(NEW.pcm_val); - return r_record; -end if; -return NEW; -end; -$$; - - --- --- Name: trim_cvs_quote(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION trim_cvs_quote() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - modified import_tmp%ROWTYPE; -begin - modified:=NEW; - modified.devise=replace(new.devise,'"',''); - modified.poste_comptable=replace(new.poste_comptable,'"',''); - modified.compte_ordre=replace(NEW.COMPTE_ORDRE,'"',''); - modified.detail=replace(NEW.DETAIL,'"',''); - modified.num_compte=replace(NEW.NUM_COMPTE,'"',''); - return modified; -end; -$$; - - --- --- Name: trim_space_format_csv_banque(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION trim_space_format_csv_banque() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - modified format_csv_banque%ROWTYPE; -begin - modified.name=trim(NEW.NAME); - modified.include_file=trim(new.include_file); - if ( length(modified.name) = 0 ) then - modified.name=null; - end if; - if ( length(modified.include_file) = 0 ) then - modified.include_file=null; - end if; - - return modified; -end; -$$; - - --- --- Name: tva_delete(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION tva_delete(integer) RETURNS void - LANGUAGE plpgsql - AS $_$ -declare - p_tva_id alias for $1; - nCount integer; -begin - nCount=0; - select count(*) into nCount from quant_sold where qs_vat_code=p_tva_id; - if nCount != 0 then - return; - - end if; - select count(*) into nCount from quant_purchase where qp_vat_code=p_tva_id; - if nCount != 0 then - return; - - end if; - -delete from tva_rate where tva_id=p_tva_id; - return; -end; -$_$; - - --- --- Name: tva_insert(text, numeric, text, text, integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION tva_insert(text, numeric, text, text, integer) RETURNS integer - LANGUAGE plpgsql - AS $_$ -declare - l_tva_id integer; - p_tva_label alias for $1; - p_tva_rate alias for $2; - p_tva_comment alias for $3; - p_tva_poste alias for $4; - p_tva_both_side alias for $5; - debit text; - credit text; - nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::account_type; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::account_type; - if nCount = 0 then return 4; end if; - -end if; -select into l_tva_id nextval('s_tva') ; -insert into tva_rate(tva_id,tva_label,tva_rate,tva_comment,tva_poste,tva_both_side) - values (l_tva_id,p_tva_label,p_tva_rate,p_tva_comment,p_tva_poste,p_tva_both_side); -return 0; -end; -$_$; - - --- --- Name: tva_modify(integer, text, numeric, text, text, integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION tva_modify(integer, text, numeric, text, text, integer) RETURNS integer - LANGUAGE plpgsql - AS $_$ -declare - p_tva_id alias for $1; - p_tva_label alias for $2; - p_tva_rate alias for $3; - p_tva_comment alias for $4; - p_tva_poste alias for $5; - p_tva_both_side alias for $6; - debit text; - credit text; - nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::account_type; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::account_type; - if nCount = 0 then return 4; end if; - -end if; -update tva_rate set tva_label=p_tva_label,tva_rate=p_tva_rate,tva_comment=p_tva_comment,tva_poste=p_tva_poste,tva_both_side=p_tva_both_side - where tva_id=p_tva_id; -return 0; -end; -$_$; - - --- --- Name: update_quick_code(integer, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION update_quick_code(njft_id integer, tav_text text) RETURNS integer - LANGUAGE plpgsql - AS $$ - declare - ns integer; - nExist integer; - tText text; - old_qcode varchar; - 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 - return 0; - end if; - - tText := trim(upper(tav_text)); - tText := replace(tText,' ',''); - if length ( tText) = 0 or tText is null then - return 0; - end if; - - ns := njft_id; - - loop - -- 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; - if tText = 'FID'||ns then - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - end if; - tText :='FID'||ns; - - end loop; - update fiche_detail set ad_value = tText where 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); - - - update jrnx set j_qcode=tText where j_qcode = old_qcode; - return ns; - end; -$$; - - -SET search_path = public, pg_catalog; - --- --- Name: bud_card_ins_upd(); Type: FUNCTION; Schema: public; Owner: - --- - -CREATE FUNCTION bud_card_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$declare - sCode text; -begin - -sCode:=trim(upper(NEW.bc_code)); -sCode:=replace(sCode,' ','_'); -sCode:=substr(sCode,1,10); -NEW.bc_code:=sCode; -return NEW; -end;$$; - - --- --- Name: bud_detail_ins_upd(); Type: FUNCTION; Schema: public; Owner: - --- - -CREATE FUNCTION bud_detail_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$declare -mline bud_detail%ROWTYPE; -begin -mline:=NEW; -if mline.po_id = -1 then - mline.po_id:=NULL; -end if; -return mline; -end;$$; - - --- --- Name: correct_quant_purchase(); Type: FUNCTION; Schema: public; Owner: - --- - -CREATE FUNCTION correct_quant_purchase() RETURNS void - LANGUAGE plpgsql - AS $$ -declare - r_invalid quant_purchase; - s_QuickCode text; - b_j_debit bool; - r_new record; - r_jrnx record; -begin - -for r_invalid in select * from quant_purchase where qp_valid='A' -loop - -select j_qcode into s_QuickCode from vw_poste_qcode where f_id=r_invalid.qp_fiche; -raise notice 'qp_id % Quick code is %',r_invalid.qp_id,s_QuickCode; - -select j_debit,j_grpt,j_jrn_def,j_montant into r_jrnx from jrnx where j_id=r_invalid.j_id; -if NOT FOUND then - raise notice 'error not found jrnx %',r_invalid.j_id; - update quant_purchase set qp_valid='Y' where qp_id=r_invalid.qp_id; - continue; -end if; -raise notice 'j_debit % , j_grpt % ,j_jrn_def % qp_price %',r_jrnx.j_debit,r_jrnx.j_grpt,r_jrnx.j_jrn_def ,r_invalid.qp_price; - -select jr_internal,j_id,j_montant into r_new - from jrnx join jrn on (j_grpt=jr_grpt_id) - where - j_jrn_def=r_jrnx.j_jrn_def - and j_id not in (select j_id from quant_purchase) - and j_qcode=s_QuickCode - and j_montant=r_jrnx.j_montant - and j_debit != r_jrnx.j_debit; - -if NOT FOUND then - raise notice 'error not found %', r_invalid.j_id; - update quant_purchase set qp_valid='Y' where qp_id=r_invalid.qp_id; - continue; -end if; -raise notice 'j_id % found amount %',r_new.j_id,r_new.j_montant; - -insert into quant_purchase (qp_internal,j_id,qp_fiche,qp_quantite,qp_price,qp_vat,qp_nd_amount,qp_nd_tva_recup,qp_valid,qp_dep_priv,qp_supplier,qp_vat_code) -values (r_new.jr_internal,r_invalid.j_id,r_invalid.qp_fiche,(r_invalid.qp_quantite * (-1)),r_invalid.qp_price * (-1),r_invalid.qp_vat*(-1),r_invalid.qp_nd_amount*(-1),r_invalid.qp_nd_tva_recup*(-1) ,'Y',r_invalid.qp_dep_priv*(-1),r_invalid.qp_supplier,r_invalid.qp_vat_code); - -update quant_purchase set qp_valid='Y' where qp_id=r_invalid.qp_id; -end loop; -return; -end; -$$; - - --- --- Name: correct_quant_sale(); Type: FUNCTION; Schema: public; Owner: - --- - -CREATE FUNCTION correct_quant_sale() RETURNS void - LANGUAGE plpgsql - AS $$ -declare - r_invalid quant_sold; - s_QuickCode text; - b_j_debit bool; - r_new record; - r_jrnx record; -begin - -for r_invalid in select * from quant_sold where qs_valid='A' -loop - -select j_qcode into s_QuickCode from vw_poste_qcode where f_id=r_invalid.qs_fiche; -raise notice 'qp_id % Quick code is %',r_invalid.qs_id,s_QuickCode; - -select j_debit,j_grpt,j_jrn_def,j_montant into r_jrnx from jrnx where j_id=r_invalid.j_id; -if NOT FOUND then - update quant_sold set qs_valid='Y' where qs_id=r_invalid.qs_id; - raise notice 'error not found jrnx %',r_invalid.j_id; - continue; -end if; -raise notice 'j_debit % , j_grpt % ,j_jrn_def % qs_price %',r_jrnx.j_debit,r_jrnx.j_grpt,r_jrnx.j_jrn_def ,r_invalid.qs_price; - -select jr_internal,j_id,j_montant into r_new - from jrnx join jrn on (j_grpt=jr_grpt_id) - where - j_jrn_def=r_jrnx.j_jrn_def - and j_id not in (select j_id from quant_sold) - and j_qcode=s_QuickCode - and j_montant=r_jrnx.j_montant - and j_debit != r_jrnx.j_debit; - -if NOT FOUND then - update quant_sold set qs_valid='Y' where qs_id=r_invalid.qs_id; - raise notice 'error not found %', r_invalid.j_id; - continue; -end if; -raise notice 'j_id % found amount %',r_new.j_id,r_new.j_montant; - - - insert into quant_sold (qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_valid,qs_client,qs_vat_code) - values (r_new.jr_internal,r_invalid.j_id,r_invalid.qs_fiche,(r_invalid.qs_quantite * (-1)),r_invalid.qs_price * (-1),r_invalid.qs_vat*(-1),'Y',r_invalid.qs_client,r_invalid.qs_vat_code); - update quant_sold set qs_valid='Y' where qs_id=r_invalid.qs_id; -end loop; -return; -end; -$$; - - -SET default_tablespace = ''; - -SET default_with_oids = true; - --- --- Name: action; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE action ( - ac_id integer NOT NULL, - ac_description text NOT NULL, - ac_module text, - ac_code character varying(9) -); - - --- --- Name: TABLE action; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE action IS 'The different privileges'; - - --- --- Name: COLUMN action.ac_code; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action.ac_code IS 'this code will be used in the code with the function User::check_action '; - - -SET default_with_oids = false; - --- --- Name: action_detail; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE action_detail ( - ad_id integer NOT NULL, - f_id bigint, - ad_text text, - ad_pu numeric(20,4) DEFAULT 0, - ad_quant numeric(20,4) DEFAULT 0, - ad_tva_id integer DEFAULT 0, - ad_tva_amount numeric(20,4) DEFAULT 0, - ad_total_amount numeric(20,4) DEFAULT 0, - ag_id integer DEFAULT 0 NOT NULL -); - - --- --- Name: TABLE action_detail; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE action_detail IS 'Detail of action_gestion, see class Action_Detail'; - - --- --- Name: COLUMN action_detail.f_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.f_id IS 'the concerned card'; - - --- --- Name: COLUMN action_detail.ad_text; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.ad_text IS ' Description '; - - --- --- Name: COLUMN action_detail.ad_pu; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.ad_pu IS ' price per unit '; - - --- --- Name: COLUMN action_detail.ad_quant; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.ad_quant IS 'quantity '; - - --- --- Name: COLUMN action_detail.ad_tva_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.ad_tva_id IS ' tva_id '; - - --- --- Name: COLUMN action_detail.ad_tva_amount; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.ad_tva_amount IS ' tva_amount '; - - --- --- Name: COLUMN action_detail.ad_total_amount; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.ad_total_amount IS ' total amount'; - - --- --- Name: action_detail_ad_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE action_detail_ad_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: action_detail_ad_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE action_detail_ad_id_seq OWNED BY action_detail.ad_id; - - --- --- Name: action_detail_ad_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('action_detail_ad_id_seq', 1, false); - - --- --- Name: action_gestion_ag_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE action_gestion_ag_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: action_gestion_ag_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('action_gestion_ag_id_seq', 1, false); - - -SET default_with_oids = true; - --- --- Name: action_gestion; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE action_gestion ( - ag_id integer DEFAULT nextval('action_gestion_ag_id_seq'::regclass) NOT NULL, - ag_type integer, - f_id_dest integer NOT NULL, - ag_title character varying(70), - ag_timestamp timestamp without time zone DEFAULT now(), - ag_cal character(1) DEFAULT 'C'::bpchar, - ag_ref_ag_id integer, - ag_comment text, - ag_ref text, - ag_hour text, - ag_priority integer DEFAULT 2, - ag_dest text, - ag_owner text, - ag_contact bigint, - ag_state integer -); - - --- --- Name: TABLE action_gestion; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE action_gestion IS 'Contains the details for the follow-up of customer, supplier, administration'; - - --- --- Name: COLUMN action_gestion.ag_type; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_type IS ' type of action: see document_type '; - - --- --- Name: COLUMN action_gestion.f_id_dest; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.f_id_dest IS ' third party '; - - --- --- Name: COLUMN action_gestion.ag_title; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_title IS ' title '; - - --- --- Name: COLUMN action_gestion.ag_timestamp; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_timestamp IS ' '; - - --- --- Name: COLUMN action_gestion.ag_cal; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_cal IS ' visible in the calendar if = C'; - - --- --- Name: COLUMN action_gestion.ag_ref_ag_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_ref_ag_id IS ' concerning the action '; - - --- --- Name: COLUMN action_gestion.ag_comment; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_comment IS ' comment of the action'; - - --- --- Name: COLUMN action_gestion.ag_ref; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_ref IS 'its reference '; - - --- --- Name: COLUMN action_gestion.ag_priority; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_priority IS 'Low, medium, important '; - - --- --- Name: COLUMN action_gestion.ag_dest; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_dest IS ' is the person who has to take care of this action '; - - --- --- Name: COLUMN action_gestion.ag_owner; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_owner IS ' is the owner of this action '; - - --- --- Name: COLUMN action_gestion.ag_contact; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_contact IS ' contact of the third part '; - - --- --- Name: COLUMN action_gestion.ag_state; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_state IS 'state of the action same as document_state '; - - --- --- Name: attr_def; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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 -); - - --- --- Name: TABLE attr_def; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE attr_def IS 'The available attributs for the cards'; - - --- --- Name: attr_min; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE attr_min ( - frd_id integer NOT NULL, - ad_id integer NOT NULL -); - - --- --- Name: TABLE attr_min; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE attr_min IS 'The value of attributs for the cards'; - - --- --- Name: bilan_b_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE bilan_b_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: bilan_b_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('bilan_b_id_seq', 4, true); - - -SET default_with_oids = false; - --- --- Name: bilan; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE bilan ( - b_id integer DEFAULT nextval('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 -); - - --- --- Name: TABLE bilan; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE bilan IS 'contains the template and the data for generating different documents '; - - --- --- Name: COLUMN bilan.b_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN bilan.b_id IS 'primary key'; - - --- --- Name: COLUMN bilan.b_name; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN bilan.b_name IS 'Name of the document'; - - --- --- Name: COLUMN bilan.b_file_template; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN bilan.b_file_template IS 'path of the template (document/...)'; - - --- --- Name: COLUMN bilan.b_file_form; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN bilan.b_file_form IS 'path of the file with forms'; - - --- --- Name: COLUMN bilan.b_type; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN bilan.b_type IS 'type = ODS, RTF...'; - - --- --- Name: bud_card_bc_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE bud_card_bc_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: bud_card_bc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('bud_card_bc_id_seq', 1, false); - - --- --- Name: bud_detail_bd_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE bud_detail_bd_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: bud_detail_bd_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('bud_detail_bd_id_seq', 1, false); - - --- --- Name: bud_detail_periode_bdp_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE bud_detail_periode_bdp_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: bud_detail_periode_bdp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('bud_detail_periode_bdp_id_seq', 1, false); - - -SET default_with_oids = true; - --- --- Name: centralized; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE centralized ( - c_id integer DEFAULT nextval(('s_centralized'::text)::regclass) NOT NULL, - c_j_id integer, - c_date date NOT NULL, - c_internal text NOT NULL, - c_montant numeric(20,4) NOT NULL, - c_debit boolean DEFAULT true, - c_jrn_def integer NOT NULL, - c_poste account_type, - c_description text, - c_grp integer NOT NULL, - c_comment text, - c_rapt text, - c_periode integer, - c_order integer -); - - --- --- Name: TABLE centralized; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE centralized IS 'The centralized journal'; - - -SET default_with_oids = false; - --- --- Name: del_action; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE del_action ( - del_id integer NOT NULL, - del_name text NOT NULL, - del_time timestamp without time zone -); - - --- --- Name: del_action_del_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE del_action_del_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: del_action_del_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE del_action_del_id_seq OWNED BY del_action.del_id; - - --- --- Name: del_action_del_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('del_action_del_id_seq', 1, false); - - --- --- Name: del_jrn; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE del_jrn ( - jr_id integer NOT NULL, - jr_def_id integer, - jr_montant numeric(20,4), - jr_comment text, - jr_date date, - jr_grpt_id integer, - jr_internal text, - jr_tech_date timestamp without time zone, - jr_tech_per integer, - jrn_ech date, - jr_ech date, - jr_rapt text, - jr_valid boolean, - jr_opid integer, - jr_c_opid integer, - jr_pj oid, - jr_pj_name text, - jr_pj_type text, - del_jrn_date timestamp without time zone, - jr_pj_number text, - dj_id integer NOT NULL -); - - --- --- Name: del_jrn_dj_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE del_jrn_dj_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: del_jrn_dj_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE del_jrn_dj_id_seq OWNED BY del_jrn.dj_id; - - --- --- Name: del_jrn_dj_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('del_jrn_dj_id_seq', 1, false); - - --- --- Name: del_jrnx; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE del_jrnx ( - j_id integer NOT NULL, - j_date date, - j_montant numeric(20,4), - j_poste account_type, - j_grpt integer, - j_rapt text, - j_jrn_def integer, - j_debit boolean, - j_text text, - j_centralized boolean, - j_internal text, - j_tech_user text, - j_tech_date timestamp without time zone, - j_tech_per integer, - j_qcode text, - djx_id integer NOT NULL, - f_id bigint -); - - --- --- Name: del_jrnx_djx_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE del_jrnx_djx_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: del_jrnx_djx_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE del_jrnx_djx_id_seq OWNED BY del_jrnx.djx_id; - - --- --- Name: del_jrnx_djx_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('del_jrnx_djx_id_seq', 1, false); - - --- --- Name: document_d_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE document_d_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: document_d_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('document_d_id_seq', 1, false); - - -SET default_with_oids = true; - --- --- Name: document; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE document ( - d_id integer DEFAULT nextval('document_d_id_seq'::regclass) NOT NULL, - ag_id integer NOT NULL, - d_lob oid, - d_number bigint NOT NULL, - d_filename text, - d_mimetype text -); - - --- --- Name: TABLE document; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE document IS 'This table contains all the documents : summary and lob files'; - - --- --- Name: document_modele_md_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE document_modele_md_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: document_modele_md_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('document_modele_md_id_seq', 1, false); - - --- --- Name: document_modele; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -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 -); - - --- --- Name: TABLE document_modele; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE document_modele IS ' contains all the template for the documents'; - - --- --- Name: document_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE document_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: SEQUENCE document_seq; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON SEQUENCE document_seq IS 'Sequence for the sequence bound to the document modele'; - - --- --- Name: document_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('document_seq', 1, false); - - --- --- Name: document_state_s_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE document_state_s_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: document_state_s_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('document_state_s_id_seq', 3, true); - - --- --- Name: document_state; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE document_state ( - s_id integer DEFAULT nextval('document_state_s_id_seq'::regclass) NOT NULL, - s_value character varying(50) NOT NULL -); - - --- --- Name: TABLE document_state; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE document_state IS 'State of the document'; - - --- --- Name: document_type_dt_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE document_type_dt_id_seq - START WITH 25 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: document_type_dt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('document_type_dt_id_seq', 25, false); - - --- --- Name: document_type; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE document_type ( - dt_id integer DEFAULT nextval('document_type_dt_id_seq'::regclass) NOT NULL, - dt_value character varying(80) -); - - --- --- Name: TABLE document_type; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE document_type IS 'Type of document : meeting, invoice,...'; - - -SET default_with_oids = false; - --- --- Name: extension; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE extension ( - ex_id integer NOT NULL, - ex_name character varying(30) NOT NULL, - ex_code character varying(15) NOT NULL, - ex_desc character varying(250), - ex_file character varying NOT NULL, - ex_enable "char" DEFAULT 'Y'::"char" NOT NULL -); - - --- --- Name: TABLE extension; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE extension IS 'Content the needed information for the extension'; - - --- --- Name: COLUMN extension.ex_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN extension.ex_id IS 'Primary key'; - - --- --- Name: COLUMN extension.ex_name; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN extension.ex_name IS 'code of the extension '; - - --- --- Name: COLUMN extension.ex_code; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN extension.ex_code IS 'code of the extension '; - - --- --- Name: COLUMN extension.ex_desc; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN extension.ex_desc IS 'Description of the extension '; - - --- --- Name: COLUMN extension.ex_file; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN extension.ex_file IS 'path to the extension to include'; - - --- --- Name: COLUMN extension.ex_enable; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN extension.ex_enable IS 'Y : enabled N : disabled '; - - --- --- Name: extension_ex_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE extension_ex_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: extension_ex_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE extension_ex_id_seq OWNED BY extension.ex_id; - - --- --- Name: extension_ex_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('extension_ex_id_seq', 1, true); - - -SET default_with_oids = true; - --- --- Name: fiche; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE fiche ( - f_id integer DEFAULT nextval(('s_fiche'::text)::regclass) NOT NULL, - fd_id integer -); - - --- --- Name: TABLE fiche; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE fiche IS 'Cards'; - - --- --- Name: fiche_def; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE fiche_def ( - fd_id integer DEFAULT nextval(('s_fdef'::text)::regclass) NOT NULL, - fd_class_base text, - fd_label text NOT NULL, - fd_create_account boolean DEFAULT false, - frd_id integer NOT NULL -); - - --- --- Name: TABLE fiche_def; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE fiche_def IS 'Cards definition'; - - --- --- Name: fiche_def_ref; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE fiche_def_ref ( - frd_id integer DEFAULT nextval(('s_fiche_def_ref'::text)::regclass) NOT NULL, - frd_text text, - frd_class_base account_type -); - - --- --- Name: TABLE fiche_def_ref; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE fiche_def_ref IS 'Family Cards definition'; - - --- --- Name: fiche_detail; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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 -); - - --- --- Name: TABLE fiche_detail; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE fiche_detail IS 'join between the card and the attribut definition'; - - -SET default_with_oids = false; - --- --- Name: forecast; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE forecast ( - f_id integer NOT NULL, - f_name text NOT NULL, - f_start_date bigint, - f_end_date bigint -); - - --- --- Name: TABLE forecast; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE forecast IS 'contains the name of the forecast'; - - --- --- Name: forecast_cat; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE forecast_cat ( - fc_id integer NOT NULL, - fc_desc text NOT NULL, - f_id bigint, - fc_order integer DEFAULT 0 NOT NULL -); - - --- --- Name: COLUMN forecast_cat.fc_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_cat.fc_id IS 'primary key'; - - --- --- Name: COLUMN forecast_cat.fc_desc; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_cat.fc_desc IS 'text of the category'; - - --- --- Name: COLUMN forecast_cat.f_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_cat.f_id IS 'Foreign key, it is the parent from the table forecast'; - - --- --- Name: COLUMN forecast_cat.fc_order; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_cat.fc_order IS 'Order of the category, used when displaid'; - - --- --- Name: forecast_cat_fc_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE forecast_cat_fc_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: forecast_cat_fc_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE forecast_cat_fc_id_seq OWNED BY forecast_cat.fc_id; - - --- --- Name: forecast_cat_fc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('forecast_cat_fc_id_seq', 1, false); - - --- --- Name: forecast_f_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE forecast_f_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: forecast_f_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE forecast_f_id_seq OWNED BY forecast.f_id; - - --- --- Name: forecast_f_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('forecast_f_id_seq', 1, false); - - --- --- Name: forecast_item; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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 -); - - --- --- Name: COLUMN forecast_item.fi_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_id IS 'Primary key'; - - --- --- Name: COLUMN forecast_item.fi_text; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_text IS 'Label of the i tem'; - - --- --- Name: COLUMN forecast_item.fi_account; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_account IS 'Accountancy entry'; - - --- --- Name: COLUMN forecast_item.fi_card; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_card IS 'Card (fiche.f_id)'; - - --- --- Name: COLUMN forecast_item.fi_order; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_order IS 'Order of showing (not used)'; - - --- --- Name: COLUMN forecast_item.fi_amount; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_amount IS 'Amount'; - - --- --- Name: COLUMN forecast_item.fi_debit; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_debit IS 'possible values are D or C'; - - --- --- Name: COLUMN forecast_item.fi_pid; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_pid IS '0 for every month, or the value parm_periode.p_id '; - - --- --- Name: forecast_item_fi_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE forecast_item_fi_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: forecast_item_fi_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE forecast_item_fi_id_seq OWNED BY forecast_item.fi_id; - - --- --- Name: forecast_item_fi_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('forecast_item_fi_id_seq', 1, false); - - -SET default_with_oids = true; - --- --- Name: form; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -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 -); - - --- --- Name: TABLE form; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE form IS 'Forms content'; - - --- --- Name: formdef; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE formdef ( - fr_id integer DEFAULT nextval(('s_formdef'::text)::regclass) NOT NULL, - fr_label text -); - - -SET default_with_oids = false; - --- --- Name: groupe_analytique; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE groupe_analytique ( - ga_id character varying(10) NOT NULL, - pa_id integer, - ga_description text -); - - --- --- Name: historique_analytique_ha_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE historique_analytique_ha_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: historique_analytique_ha_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('historique_analytique_ha_id_seq', 1, false); - - --- --- Name: info_def; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE info_def ( - id_type text NOT NULL, - id_description text -); - - --- --- Name: TABLE info_def; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE info_def IS 'Contains the types of additionnal info we can add to a operation'; - - --- --- Name: s_jnt_id; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jnt_id - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jnt_id; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jnt_id', 53, true); - - -SET default_with_oids = true; - --- --- Name: jnt_fic_attr; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jnt_fic_attr ( - fd_id integer, - ad_id integer, - jnt_id bigint DEFAULT nextval('s_jnt_id'::regclass) NOT NULL, - jnt_order integer NOT NULL -); - - --- --- Name: TABLE jnt_fic_attr; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jnt_fic_attr IS 'join between the family card and the attribut definition'; - - -SET default_with_oids = false; - --- --- Name: jnt_letter; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jnt_letter ( - jl_id integer NOT NULL, - jl_amount_deb numeric(20,4) -); - - --- --- Name: jnt_letter_jl_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE jnt_letter_jl_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: jnt_letter_jl_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE jnt_letter_jl_id_seq OWNED BY jnt_letter.jl_id; - - --- --- Name: jnt_letter_jl_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('jnt_letter_jl_id_seq', 1, false); - - -SET default_with_oids = true; - --- --- Name: jrn; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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, - jr_comment text, - jr_date date, - jr_grpt_id integer NOT NULL, - jr_internal text, - jr_tech_date timestamp without time zone DEFAULT now() NOT NULL, - jr_tech_per integer NOT NULL, - jrn_ech date, - jr_ech date, - jr_rapt text, - jr_valid boolean DEFAULT true, - jr_opid integer, - jr_c_opid integer, - jr_pj oid, - jr_pj_name text, - jr_pj_type text, - jr_pj_number text, - jr_mt text -); - - --- --- Name: TABLE jrn; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrn IS 'Journal: content one line for a group of accountancy writing'; - - --- --- Name: jrn_action; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jrn_action ( - ja_id integer DEFAULT nextval(('s_jrnaction'::text)::regclass) NOT NULL, - ja_name text NOT NULL, - ja_desc text, - ja_url text NOT NULL, - ja_action text NOT NULL, - ja_lang text DEFAULT 'FR'::text, - ja_jrn_type character(3) -); - - --- --- Name: TABLE jrn_action; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrn_action IS 'Possible action when we are in journal (menu)'; - - --- --- Name: jrn_def; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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, - jrn_def_class_cred text, - jrn_def_fiche_deb text, - jrn_def_fiche_cred text, - jrn_deb_max_line integer DEFAULT 1, - jrn_cred_max_line integer DEFAULT 1, - jrn_def_ech boolean DEFAULT false, - jrn_def_ech_lib text, - jrn_def_type character(3) NOT NULL, - jrn_def_code text NOT NULL, - jrn_def_pj_pref text, - jrn_def_bank bigint, - jrn_def_num_op integer -); - - --- --- Name: TABLE jrn_def; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrn_def IS 'Definition of a journal, his properties'; - - -SET default_with_oids = false; - --- --- Name: jrn_info; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jrn_info ( - ji_id integer NOT NULL, - jr_id integer NOT NULL, - id_type text NOT NULL, - ji_value text -); - - --- --- Name: jrn_info_ji_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE jrn_info_ji_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: jrn_info_ji_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE jrn_info_ji_id_seq OWNED BY jrn_info.ji_id; - - --- --- Name: jrn_info_ji_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('jrn_info_ji_id_seq', 1, false); - - --- --- Name: jrn_note; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jrn_note ( - n_id integer NOT NULL, - n_text text, - jr_id bigint NOT NULL -); - - --- --- Name: TABLE jrn_note; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrn_note IS 'Note about operation'; - - --- --- Name: jrn_note_n_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE jrn_note_n_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: jrn_note_n_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE jrn_note_n_id_seq OWNED BY jrn_note.n_id; - - --- --- Name: jrn_note_n_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('jrn_note_n_id_seq', 1, false); - - --- --- Name: jrn_periode; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jrn_periode ( - jrn_def_id integer NOT NULL, - p_id integer NOT NULL, - status text -); - - -SET default_with_oids = true; - --- --- Name: jrn_rapt; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jrn_rapt ( - jra_id integer DEFAULT nextval(('s_jrn_rapt'::text)::regclass) NOT NULL, - jr_id integer NOT NULL, - jra_concerned integer NOT NULL -); - - --- --- Name: TABLE jrn_rapt; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrn_rapt IS 'Rapprochement between operation'; - - --- --- Name: jrn_type; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jrn_type ( - jrn_type_id character(3) NOT NULL, - jrn_desc text -); - - --- --- Name: TABLE jrn_type; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrn_type IS 'Type of journal (Sell, Buy, Financial...)'; - - --- --- Name: jrnx; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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_grpt integer NOT NULL, - j_rapt text, - j_jrn_def integer NOT NULL, - j_debit boolean DEFAULT true, - j_text text, - j_centralized boolean DEFAULT false, - j_internal text, - j_tech_user text NOT NULL, - j_tech_date timestamp without time zone DEFAULT now() NOT NULL, - j_tech_per integer NOT NULL, - j_qcode text, - f_id bigint -); - - --- --- Name: TABLE jrnx; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrnx IS 'Journal: content one line for each accountancy writing'; - - -SET default_with_oids = false; - --- --- Name: letter_cred; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE letter_cred ( - lc_id integer NOT NULL, - j_id bigint NOT NULL, - jl_id bigint NOT NULL -); - - --- --- Name: letter_cred_lc_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE letter_cred_lc_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: letter_cred_lc_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE letter_cred_lc_id_seq OWNED BY letter_cred.lc_id; - - --- --- Name: letter_cred_lc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('letter_cred_lc_id_seq', 1, false); - - --- --- Name: letter_deb; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE letter_deb ( - ld_id integer NOT NULL, - j_id bigint NOT NULL, - jl_id bigint NOT NULL -); - - --- --- Name: letter_deb_ld_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE letter_deb_ld_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: letter_deb_ld_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE letter_deb_ld_id_seq OWNED BY letter_deb.ld_id; - - --- --- Name: letter_deb_ld_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('letter_deb_ld_id_seq', 1, false); - - --- --- Name: menu_ref; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE menu_ref ( - me_code text NOT NULL, - me_menu text, - me_file text, - me_url text, - me_description text, - me_parameter text, - me_javascript text, - me_type character varying(2) -); - - --- --- Name: COLUMN menu_ref.me_code; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN menu_ref.me_code IS 'Menu Code '; - - --- --- Name: COLUMN menu_ref.me_menu; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN menu_ref.me_menu IS 'Label to display'; - - --- --- Name: COLUMN menu_ref.me_file; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN menu_ref.me_file IS 'if not empty file to include'; - - --- --- Name: COLUMN menu_ref.me_url; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN menu_ref.me_url IS 'url '; - - --- --- Name: COLUMN menu_ref.me_type; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN menu_ref.me_type IS 'ME for menu -PR for Printing -SP for special meaning (ex: return to line) -PL for plugin'; - - --- --- Name: mod_payment; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE mod_payment ( - mp_id integer NOT NULL, - mp_lib text NOT NULL, - mp_jrn_def_id integer NOT NULL, - mp_fd_id bigint, - mp_qcode text, - jrn_def_id bigint -); - - --- --- Name: TABLE mod_payment; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE mod_payment IS 'Contains the different media of payment and the corresponding ledger'; - - --- --- Name: COLUMN mod_payment.jrn_def_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN mod_payment.jrn_def_id IS 'Ledger using this payment method'; - - --- --- Name: mod_payment_mp_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE mod_payment_mp_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: mod_payment_mp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE mod_payment_mp_id_seq OWNED BY mod_payment.mp_id; - - --- --- Name: mod_payment_mp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('mod_payment_mp_id_seq', 10, true); - - --- --- Name: op_def_op_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE op_def_op_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: op_def_op_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('op_def_op_seq', 1, false); - - --- --- Name: op_predef; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE op_predef ( - od_id integer DEFAULT nextval('op_def_op_seq'::regclass) NOT NULL, - jrn_def_id integer NOT NULL, - od_name text NOT NULL, - od_item integer NOT NULL, - od_jrn_type text NOT NULL, - od_direct boolean NOT NULL -); - - --- --- Name: TABLE op_predef; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE op_predef IS 'predefined operation'; - - --- --- Name: COLUMN op_predef.jrn_def_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN op_predef.jrn_def_id IS 'jrn_id'; - - --- --- Name: COLUMN op_predef.od_name; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN op_predef.od_name IS 'name of the operation'; - - --- --- Name: op_predef_detail_opd_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE op_predef_detail_opd_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: op_predef_detail_opd_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('op_predef_detail_opd_id_seq', 1, false); - - --- --- Name: op_predef_detail; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE op_predef_detail ( - opd_id integer DEFAULT nextval('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_quantity numeric(20,4), - opd_debit boolean NOT NULL, - opd_tva_amount numeric(20,4), - opd_comment text, - opd_qc boolean -); - - --- --- Name: TABLE op_predef_detail; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE op_predef_detail IS 'contains the detail of predefined operations'; - - --- --- Name: s_oa_group; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_oa_group - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_oa_group; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_oa_group', 1, true); - - --- --- Name: operation_analytique; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE operation_analytique ( - oa_id integer DEFAULT nextval('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_date date NOT NULL, - oa_row integer, - CONSTRAINT operation_analytique_oa_amount_check CHECK ((oa_amount >= (0)::numeric)) -); - - --- --- Name: TABLE operation_analytique; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE operation_analytique IS 'History of the analytic account'; - - -SET default_with_oids = true; - --- --- Name: parameter; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE parameter ( - pr_id text NOT NULL, - pr_value text -); - - --- --- Name: TABLE parameter; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE parameter IS 'parameter of the company'; - - --- --- Name: parm_code; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE parm_code ( - p_code text NOT NULL, - p_value text, - p_comment text -); - - --- --- Name: parm_money; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE parm_money ( - pm_id integer DEFAULT nextval(('s_currency'::text)::regclass), - pm_code character(3) NOT NULL, - pm_rate numeric(20,4) -); - - --- --- Name: TABLE parm_money; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE parm_money IS 'Currency conversion'; - - --- --- Name: parm_periode; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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, - CONSTRAINT parm_periode_check CHECK ((p_end >= p_start)) -); - - --- --- Name: TABLE parm_periode; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE parm_periode IS 'Periode definition'; - - -SET default_with_oids = false; - --- --- Name: parm_poste; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE parm_poste ( - p_value account_type NOT NULL, - p_type text NOT NULL -); - - --- --- Name: TABLE parm_poste; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE parm_poste IS 'Contains data for finding is the type of the account (asset)'; - - --- --- Name: plan_analytique_pa_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE plan_analytique_pa_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: plan_analytique_pa_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('plan_analytique_pa_id_seq', 1, false); - - --- --- Name: plan_analytique; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE plan_analytique ( - pa_id integer DEFAULT nextval('plan_analytique_pa_id_seq'::regclass) NOT NULL, - pa_name text DEFAULT 'Sans Nom'::text NOT NULL, - pa_description text -); - - --- --- Name: TABLE plan_analytique; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE plan_analytique IS 'Plan Analytique (max 5)'; - - --- --- Name: poste_analytique_po_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE poste_analytique_po_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: poste_analytique_po_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('poste_analytique_po_id_seq', 1, false); - - --- --- Name: poste_analytique; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE poste_analytique ( - po_id integer DEFAULT nextval('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) -); - - --- --- Name: TABLE poste_analytique; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE poste_analytique IS 'Poste Analytique'; - - --- --- Name: profile; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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 -); - - --- --- Name: TABLE profile; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE profile IS 'Available profile '; - - --- --- Name: COLUMN profile.p_name; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile.p_name IS 'Name of the profile'; - - --- --- Name: COLUMN profile.p_desc; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile.p_desc IS 'description of the profile'; - - --- --- Name: COLUMN profile.with_calc; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile.with_calc IS 'show the calculator'; - - --- --- Name: COLUMN profile.with_direct_form; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile.with_direct_form IS 'show the direct form'; - - --- --- Name: profile_menu; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -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 -); - - --- --- Name: TABLE profile_menu; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE profile_menu IS 'Join between the profile and the menu '; - - --- --- Name: COLUMN profile_menu.me_code_dep; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_menu.me_code_dep IS 'menu code dependency'; - - --- --- Name: COLUMN profile_menu.p_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_menu.p_id IS 'link to profile'; - - --- --- Name: COLUMN profile_menu.p_order; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_menu.p_order IS 'order of displaying menu'; - - --- --- Name: COLUMN profile_menu.p_type_display; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_menu.p_type_display IS 'M is a module -E is a menu -S is a select (for plugin)'; - - --- --- Name: COLUMN profile_menu.pm_default; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_menu.pm_default IS 'default menu'; - - --- --- Name: profile_menu_pm_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE profile_menu_pm_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: profile_menu_pm_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE profile_menu_pm_id_seq OWNED BY profile_menu.pm_id; - - --- --- Name: profile_menu_pm_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('profile_menu_pm_id_seq', 779, true); - - --- --- Name: profile_menu_type; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE profile_menu_type ( - pm_type text NOT NULL, - pm_desc text -); - - --- --- Name: profile_p_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE profile_p_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: profile_p_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE profile_p_id_seq OWNED BY profile.p_id; - - --- --- Name: profile_p_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('profile_p_id_seq', 11, true); - - --- --- Name: profile_user; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE profile_user ( - user_name text NOT NULL, - pu_id integer NOT NULL, - p_id integer -); - - --- --- Name: TABLE profile_user; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE profile_user IS 'Contains the available profile for users'; - - --- --- Name: COLUMN profile_user.user_name; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_user.user_name IS 'fk to available_user : login'; - - --- --- Name: COLUMN profile_user.p_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_user.p_id IS 'fk to profile'; - - --- --- Name: profile_user_pu_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE profile_user_pu_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: profile_user_pu_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE profile_user_pu_id_seq OWNED BY profile_user.pu_id; - - --- --- Name: profile_user_pu_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('profile_user_pu_id_seq', 6, true); - - --- --- Name: quant_fin; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE quant_fin ( - qf_id bigint NOT NULL, - qf_bank bigint, - jr_id bigint, - qf_other bigint, - qf_amount numeric(20,4) DEFAULT 0 -); - - --- --- Name: TABLE quant_fin; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE quant_fin IS 'Simple operation for financial'; - - --- --- Name: quant_fin_qf_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE quant_fin_qf_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: quant_fin_qf_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE quant_fin_qf_id_seq OWNED BY quant_fin.qf_id; - - --- --- Name: quant_fin_qf_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('quant_fin_qf_id_seq', 1, false); - - --- --- Name: quant_purchase; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE quant_purchase ( - qp_id integer DEFAULT nextval(('s_quantity'::text)::regclass) NOT NULL, - qp_internal text, - j_id integer NOT NULL, - qp_fiche integer NOT NULL, - qp_quantite numeric(20,4) NOT NULL, - qp_price numeric(20,4), - qp_vat numeric(20,4) DEFAULT 0.0, - qp_vat_code integer, - qp_nd_amount numeric(20,4) DEFAULT 0.0, - qp_nd_tva numeric(20,4) DEFAULT 0.0, - qp_nd_tva_recup numeric(20,4) DEFAULT 0.0, - qp_supplier integer NOT NULL, - qp_valid character(1) DEFAULT 'Y'::bpchar NOT NULL, - qp_dep_priv numeric(20,4) DEFAULT 0.0, - qp_vat_sided numeric(20,4) DEFAULT 0.0 -); - - --- --- Name: COLUMN quant_purchase.qp_vat_sided; Type: COMMENT; Schema: public; Owner: - --- - -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'; - - -SET default_with_oids = true; - --- --- Name: quant_sold; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE quant_sold ( - qs_id integer DEFAULT nextval(('s_quantity'::text)::regclass) NOT NULL, - qs_internal text, - qs_fiche integer NOT NULL, - qs_quantite numeric(20,4) NOT NULL, - qs_price numeric(20,4), - qs_vat numeric(20,4), - qs_vat_code integer, - qs_client integer NOT NULL, - qs_valid character(1) DEFAULT 'Y'::bpchar NOT NULL, - j_id integer NOT NULL, - qs_vat_sided numeric(20,4) DEFAULT 0.0 -); - - --- --- Name: TABLE quant_sold; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE quant_sold IS 'Contains about invoice for customer'; - - --- --- Name: s_attr_def; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_attr_def - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_attr_def; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_attr_def', 9001, false); - - --- --- Name: s_cbc; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_cbc - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_cbc; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_cbc', 1, false); - - --- --- Name: s_central; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_central - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_central; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_central', 1, false); - - --- --- Name: s_central_order; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_central_order - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_central_order; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_central_order', 1, false); - - --- --- Name: s_centralized; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_centralized - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_centralized; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_centralized', 1, false); - - --- --- Name: s_currency; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_currency - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_currency; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_currency', 1, true); - - --- --- Name: s_fdef; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_fdef - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_fdef; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_fdef', 6, true); - - --- --- Name: s_fiche; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_fiche - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_fiche; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_fiche', 20, true); - - --- --- Name: s_fiche_def_ref; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_fiche_def_ref - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_fiche_def_ref; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_fiche_def_ref', 16, true); - - --- --- Name: s_form; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_form - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_form; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_form', 1, false); - - --- --- Name: s_formdef; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_formdef - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_formdef; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_formdef', 1, false); - - --- --- Name: s_grpt; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_grpt - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_grpt; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_grpt', 2, true); - - --- --- Name: s_idef; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_idef - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_idef; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_idef', 1, false); - - --- --- Name: s_internal; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_internal - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_internal; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_internal', 1, false); - - --- --- Name: s_invoice; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_invoice - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_invoice; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_invoice', 1, false); - - --- --- Name: s_isup; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_isup - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_isup; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_isup', 1, false); - - --- --- Name: s_jnt_fic_att_value; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jnt_fic_att_value - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jnt_fic_att_value; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jnt_fic_att_value', 371, true); - - --- --- Name: s_jrn; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn', 1, false); - - --- --- Name: s_jrn_1; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_1 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_1; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_1', 1, false); - - --- --- Name: s_jrn_2; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_2 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_2; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_2', 1, false); - - --- --- Name: s_jrn_3; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_3 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_3; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_3', 1, false); - - --- --- Name: s_jrn_4; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_4 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_4; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_4', 1, false); - - --- --- Name: s_jrn_def; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_def - START WITH 5 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_def; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_def', 5, false); - - --- --- Name: s_jrn_op; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_op - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_op; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_op', 1, false); - - --- --- Name: s_jrn_pj1; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_pj1 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_pj1; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_pj1', 1, false); - - --- --- Name: s_jrn_pj2; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_pj2 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_pj2; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_pj2', 1, false); - - --- --- Name: s_jrn_pj3; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_pj3 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_pj3; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_pj3', 1, false); - - --- --- Name: s_jrn_pj4; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_pj4 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_pj4; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_pj4', 1, false); - - --- --- Name: s_jrn_rapt; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_rapt - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_rapt; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_rapt', 1, false); - - --- --- Name: s_jrnaction; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrnaction - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrnaction; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrnaction', 5, true); - - --- --- Name: s_jrnx; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrnx - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrnx; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrnx', 1, false); - - --- --- Name: s_periode; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_periode - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_periode; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_periode', 91, true); - - --- --- Name: s_quantity; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_quantity - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_quantity; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_quantity', 7, true); - - --- --- Name: s_stock_goods; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_stock_goods - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_stock_goods; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_stock_goods', 1, false); - - --- --- Name: s_tva; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_tva - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_tva; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_tva', 1001, true); - - --- --- Name: s_user_act; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_user_act - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_user_act; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_user_act', 1, false); - - --- --- Name: s_user_jrn; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_user_jrn - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_user_jrn; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_user_jrn', 1, false); - - --- --- Name: seq_bud_hypothese_bh_id; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_bud_hypothese_bh_id - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_bud_hypothese_bh_id; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_bud_hypothese_bh_id', 1, false); - - --- --- Name: seq_doc_type_1; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_1 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_1; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_1', 1, false); - - --- --- Name: seq_doc_type_10; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_10 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_10; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_10', 1, false); - - --- --- Name: seq_doc_type_2; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_2 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_2; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_2', 1, false); - - --- --- Name: seq_doc_type_20; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_20 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_20; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_20', 1, false); - - --- --- Name: seq_doc_type_21; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_21 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_21; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_21', 1, false); - - --- --- Name: seq_doc_type_22; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_22 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_22; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_22', 1, false); - - --- --- Name: seq_doc_type_3; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_3 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_3; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_3', 1, false); - - --- --- Name: seq_doc_type_4; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_4 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_4; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_4', 1, false); - - --- --- Name: seq_doc_type_5; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_5 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_5; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_5', 1, false); - - --- --- Name: seq_doc_type_6; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_6 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_6; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_6', 1, false); - - --- --- Name: seq_doc_type_7; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_7 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_7; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_7', 1, false); - - --- --- Name: seq_doc_type_8; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_8 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_8; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_8', 1, false); - - --- --- Name: seq_doc_type_9; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_9 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_9; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_9', 1, false); - - --- --- Name: stock_goods; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE stock_goods ( - sg_id integer DEFAULT nextval(('s_stock_goods'::text)::regclass) NOT NULL, - j_id integer, - f_id integer, - sg_code text, - sg_quantity numeric(8,4) DEFAULT 0, - sg_type character(1) DEFAULT 'c'::bpchar NOT NULL, - sg_date date, - sg_tech_date date DEFAULT now(), - sg_tech_user text, - sg_comment character varying(80), - sg_exercice character varying(4), - CONSTRAINT stock_goods_sg_type CHECK (((sg_type = 'c'::bpchar) OR (sg_type = 'd'::bpchar))) -); - - --- --- Name: TABLE stock_goods; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE stock_goods IS 'About the goods'; - - --- --- Name: tmp_pcmn; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE tmp_pcmn ( - pcm_val account_type NOT NULL, - pcm_lib text, - pcm_val_parent account_type DEFAULT 0, - pcm_type text -); - - --- --- Name: TABLE tmp_pcmn; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE tmp_pcmn IS 'Plan comptable minimum normalisé'; - - --- --- Name: todo_list_tl_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE todo_list_tl_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: todo_list_tl_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('todo_list_tl_id_seq', 1, false); - - -SET default_with_oids = false; - --- --- Name: todo_list; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE todo_list ( - tl_id integer DEFAULT nextval('todo_list_tl_id_seq'::regclass) NOT NULL, - tl_date date NOT NULL, - tl_title text NOT NULL, - tl_desc text, - use_login text NOT NULL -); - - --- --- Name: TABLE todo_list; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE todo_list IS 'Todo list'; - - -SET default_with_oids = true; - --- --- Name: tva_rate; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE tva_rate ( - tva_id integer DEFAULT nextval('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 -); - - --- --- Name: TABLE tva_rate; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE tva_rate IS 'Rate of vat'; - - --- --- Name: user_local_pref; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE user_local_pref ( - user_id text NOT NULL, - parameter_type text NOT NULL, - parameter_value text -); - - --- --- Name: TABLE user_local_pref; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE user_local_pref IS 'The user''s local parameter '; - - --- --- Name: COLUMN user_local_pref.user_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN user_local_pref.user_id IS 'user''s login '; - - --- --- Name: COLUMN user_local_pref.parameter_type; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN user_local_pref.parameter_type IS 'the type of parameter '; - - --- --- Name: COLUMN user_local_pref.parameter_value; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN user_local_pref.parameter_value IS 'the value of parameter '; - - --- --- Name: user_sec_act; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE user_sec_act ( - ua_id integer DEFAULT nextval(('s_user_act'::text)::regclass) NOT NULL, - ua_login text, - ua_act_id integer -); - - -SET default_with_oids = false; - --- --- Name: user_sec_extension; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE user_sec_extension ( - use_id integer NOT NULL, - ex_id integer NOT NULL, - use_login text NOT NULL, - use_access character(1) DEFAULT 0 NOT NULL -); - - --- --- Name: TABLE user_sec_extension; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE user_sec_extension IS 'Security for extension'; - - --- --- Name: user_sec_extension_use_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE user_sec_extension_use_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: user_sec_extension_use_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE user_sec_extension_use_id_seq OWNED BY user_sec_extension.use_id; - - --- --- Name: user_sec_extension_use_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('user_sec_extension_use_id_seq', 1, true); - - -SET default_with_oids = true; - --- --- Name: user_sec_jrn; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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 -); - - --- --- Name: v_all_menu; Type: VIEW; Schema: public; Owner: - --- - -CREATE VIEW v_all_menu AS - SELECT pm.me_code, pm.pm_id, pm.me_code_dep, pm.p_order, pm.p_type_display, pu.user_name, pu.pu_id, 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_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)) ORDER BY pm.p_order; - - --- --- Name: version; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE version ( - val integer -); - - --- --- Name: vw_client; Type: VIEW; Schema: public; Owner: - --- - -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)) 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 = 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 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 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 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 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 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 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 fiche_detail WHERE (fiche_detail.ad_id = 18)) h USING (f_id)) WHERE (fiche_def_ref.frd_id = 9); - - --- --- Name: vw_fiche_attr; Type: VIEW; Schema: public; Owner: - --- - -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 FROM ((((((((((((SELECT fiche.f_id, fiche.fd_id, fiche_detail.ad_value FROM (fiche LEFT JOIN fiche_detail USING (f_id)) WHERE (fiche_detail.ad_id = 1)) a LEFT JOIN (SELECT fiche_detail.f_id, fiche_detail.ad_value FROM 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 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 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 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 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 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 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 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 fiche_detail WHERE (fiche_detail.ad_id = 32)) k ON ((a.f_id = k.f_id))) LEFT JOIN tva_rate ON ((d.ad_value = (tva_rate.tva_id)::text))) JOIN fiche_def USING (fd_id)); - - --- --- Name: vw_fiche_def; Type: VIEW; Schema: public; Owner: - --- - -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))); - - --- --- Name: VIEW vw_fiche_def; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON VIEW vw_fiche_def IS 'all the attributs for card family'; - - --- --- Name: vw_fiche_min; Type: VIEW; Schema: public; Owner: - --- - -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)); - - --- --- Name: vw_fiche_name; Type: VIEW; Schema: public; Owner: - --- - -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); - - --- --- Name: vw_poste_qcode; Type: VIEW; Schema: public; Owner: - --- - -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)); - - --- --- Name: vw_supplier; Type: VIEW; Schema: public; Owner: - --- - -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)) 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 = 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 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 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 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 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 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 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 fiche_detail WHERE (fiche_detail.ad_id = 18)) h USING (f_id)) WHERE (fiche_def_ref.frd_id = 8); - - --- --- Name: ad_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY action_detail ALTER COLUMN ad_id SET DEFAULT nextval('action_detail_ad_id_seq'::regclass); - - --- --- Name: del_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY del_action ALTER COLUMN del_id SET DEFAULT nextval('del_action_del_id_seq'::regclass); - - --- --- Name: dj_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY del_jrn ALTER COLUMN dj_id SET DEFAULT nextval('del_jrn_dj_id_seq'::regclass); - - --- --- Name: djx_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY del_jrnx ALTER COLUMN djx_id SET DEFAULT nextval('del_jrnx_djx_id_seq'::regclass); - - --- --- Name: ex_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY extension ALTER COLUMN ex_id SET DEFAULT nextval('extension_ex_id_seq'::regclass); - - --- --- Name: f_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY forecast ALTER COLUMN f_id SET DEFAULT nextval('forecast_f_id_seq'::regclass); - - --- --- Name: fc_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY forecast_cat ALTER COLUMN fc_id SET DEFAULT nextval('forecast_cat_fc_id_seq'::regclass); - - --- --- Name: fi_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY forecast_item ALTER COLUMN fi_id SET DEFAULT nextval('forecast_item_fi_id_seq'::regclass); - - --- --- Name: jl_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jnt_letter ALTER COLUMN jl_id SET DEFAULT nextval('jnt_letter_jl_id_seq'::regclass); - - --- --- Name: ji_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrn_info ALTER COLUMN ji_id SET DEFAULT nextval('jrn_info_ji_id_seq'::regclass); - - --- --- Name: n_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrn_note ALTER COLUMN n_id SET DEFAULT nextval('jrn_note_n_id_seq'::regclass); - - --- --- Name: lc_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY letter_cred ALTER COLUMN lc_id SET DEFAULT nextval('letter_cred_lc_id_seq'::regclass); - - --- --- Name: ld_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY letter_deb ALTER COLUMN ld_id SET DEFAULT nextval('letter_deb_ld_id_seq'::regclass); - - --- --- Name: mp_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY mod_payment ALTER COLUMN mp_id SET DEFAULT nextval('mod_payment_mp_id_seq'::regclass); - - --- --- Name: p_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY profile ALTER COLUMN p_id SET DEFAULT nextval('profile_p_id_seq'::regclass); - - --- --- Name: pm_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY profile_menu ALTER COLUMN pm_id SET DEFAULT nextval('profile_menu_pm_id_seq'::regclass); - - --- --- Name: pu_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY profile_user ALTER COLUMN pu_id SET DEFAULT nextval('profile_user_pu_id_seq'::regclass); - - --- --- Name: qf_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY quant_fin ALTER COLUMN qf_id SET DEFAULT nextval('quant_fin_qf_id_seq'::regclass); - - --- --- Name: use_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY user_sec_extension ALTER COLUMN use_id SET DEFAULT nextval('user_sec_extension_use_id_seq'::regclass); - - --- --- Data for Name: action; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO action VALUES (800, 'Ajout de fiche', 'fiche', 'FICADD'); -INSERT INTO action VALUES (805, 'Création, modification et effacement de fiche', 'fiche', 'FIC'); -INSERT INTO action VALUES (910, 'création, modification et effacement de catégorie de fiche', 'fiche', 'FICCAT'); -INSERT INTO action VALUES (1020, 'Effacer les documents du suivi', 'followup', 'RMDOC'); -INSERT INTO action VALUES (1010, 'Voir les documents du suivi', 'followup', 'VIEWDOC'); -INSERT INTO action VALUES (1050, 'Modifier le type de document', 'followup', 'PARCATDOC'); - - --- --- Data for Name: action_detail; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: action_gestion; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: attr_def; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO attr_def VALUES (20, 'Partie fiscalement non déductible', 'numeric', '22'); -INSERT INTO attr_def VALUES (10, 'Date début', 'date', '8'); -INSERT INTO attr_def VALUES (6, 'Prix vente', 'numeric', '6'); -INSERT INTO attr_def VALUES (7, 'Prix achat', 'numeric', '6'); -INSERT INTO attr_def VALUES (8, 'Durée Amortissement', 'numeric', '6'); -INSERT INTO attr_def VALUES (11, 'Montant initial', 'numeric', '6'); -INSERT INTO attr_def VALUES (21, 'TVA non déductible', 'numeric', '6'); -INSERT INTO attr_def VALUES (22, 'TVA non déductible récupérable par l''impôt', 'numeric', '6'); -INSERT INTO attr_def VALUES (1, 'Nom', 'text', '22'); -INSERT INTO attr_def VALUES (2, 'Taux TVA', 'text', '22'); -INSERT INTO attr_def VALUES (3, 'Numéro de compte', 'text', '22'); -INSERT INTO attr_def VALUES (4, 'Nom de la banque', 'text', '22'); -INSERT INTO attr_def VALUES (5, 'Poste Comptable', 'text', '22'); -INSERT INTO attr_def VALUES (9, 'Description', 'text', '22'); -INSERT INTO attr_def VALUES (12, 'Personne de contact ', 'text', '22'); -INSERT INTO attr_def VALUES (13, 'numéro de tva ', 'text', '22'); -INSERT INTO attr_def VALUES (14, 'Adresse ', 'text', '22'); -INSERT INTO attr_def VALUES (16, 'pays ', 'text', '22'); -INSERT INTO attr_def VALUES (17, 'téléphone ', 'text', '22'); -INSERT INTO attr_def VALUES (18, 'email ', 'text', '22'); -INSERT INTO attr_def VALUES (19, 'Gestion stock', 'text', '22'); -INSERT INTO attr_def VALUES (23, 'Quick Code', 'text', '22'); -INSERT INTO attr_def VALUES (24, 'Ville', 'text', '22'); -INSERT INTO attr_def VALUES (25, 'Société', 'text', '22'); -INSERT INTO attr_def VALUES (26, 'Fax', 'text', '22'); -INSERT INTO attr_def VALUES (27, 'GSM', 'text', '22'); -INSERT INTO attr_def VALUES (15, 'code postal', 'text', '22'); -INSERT INTO attr_def VALUES (30, 'Numero de client', 'text', '22'); -INSERT INTO attr_def VALUES (32, 'Prénom', 'text', '22'); -INSERT INTO attr_def VALUES (31, 'Dépense charge du grant (partie privé) ', 'text', '22'); -INSERT INTO attr_def VALUES (50, 'Contrepartie pour TVA récup par impot', 'poste', '22'); -INSERT INTO attr_def VALUES (51, 'Contrepartie pour TVA non Ded.', 'poste', '22'); -INSERT INTO attr_def VALUES (52, 'Contrepartie pour dépense à charge du gérant', 'poste', '22'); -INSERT INTO attr_def VALUES (53, 'Contrepartie pour dépense fiscal. non déd.', 'poste', '22'); - - --- --- Data for Name: attr_min; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO attr_min VALUES (1, 1); -INSERT INTO attr_min VALUES (1, 2); -INSERT INTO attr_min VALUES (2, 1); -INSERT INTO attr_min VALUES (2, 2); -INSERT INTO attr_min VALUES (3, 1); -INSERT INTO attr_min VALUES (3, 2); -INSERT INTO attr_min VALUES (4, 1); -INSERT INTO attr_min VALUES (4, 3); -INSERT INTO attr_min VALUES (4, 4); -INSERT INTO attr_min VALUES (4, 12); -INSERT INTO attr_min VALUES (4, 13); -INSERT INTO attr_min VALUES (4, 14); -INSERT INTO attr_min VALUES (4, 15); -INSERT INTO attr_min VALUES (4, 16); -INSERT INTO attr_min VALUES (4, 17); -INSERT INTO attr_min VALUES (4, 18); -INSERT INTO attr_min VALUES (8, 1); -INSERT INTO attr_min VALUES (8, 12); -INSERT INTO attr_min VALUES (8, 13); -INSERT INTO attr_min VALUES (8, 14); -INSERT INTO attr_min VALUES (8, 15); -INSERT INTO attr_min VALUES (8, 16); -INSERT INTO attr_min VALUES (8, 17); -INSERT INTO attr_min VALUES (8, 18); -INSERT INTO attr_min VALUES (9, 1); -INSERT INTO attr_min VALUES (9, 12); -INSERT INTO attr_min VALUES (9, 13); -INSERT INTO attr_min VALUES (9, 14); -INSERT INTO attr_min VALUES (9, 16); -INSERT INTO attr_min VALUES (9, 17); -INSERT INTO attr_min VALUES (9, 18); -INSERT INTO attr_min VALUES (1, 6); -INSERT INTO attr_min VALUES (1, 7); -INSERT INTO attr_min VALUES (2, 6); -INSERT INTO attr_min VALUES (2, 7); -INSERT INTO attr_min VALUES (3, 7); -INSERT INTO attr_min VALUES (1, 19); -INSERT INTO attr_min VALUES (2, 19); -INSERT INTO attr_min VALUES (14, 1); -INSERT INTO attr_min VALUES (5, 1); -INSERT INTO attr_min VALUES (5, 4); -INSERT INTO attr_min VALUES (5, 10); -INSERT INTO attr_min VALUES (5, 12); -INSERT INTO attr_min VALUES (6, 1); -INSERT INTO attr_min VALUES (6, 4); -INSERT INTO attr_min VALUES (6, 10); -INSERT INTO attr_min VALUES (6, 12); -INSERT INTO attr_min VALUES (10, 1); -INSERT INTO attr_min VALUES (10, 12); -INSERT INTO attr_min VALUES (11, 1); -INSERT INTO attr_min VALUES (11, 12); -INSERT INTO attr_min VALUES (12, 1); -INSERT INTO attr_min VALUES (12, 12); -INSERT INTO attr_min VALUES (13, 1); -INSERT INTO attr_min VALUES (13, 9); -INSERT INTO attr_min VALUES (7, 1); -INSERT INTO attr_min VALUES (7, 8); -INSERT INTO attr_min VALUES (7, 9); -INSERT INTO attr_min VALUES (7, 10); -INSERT INTO attr_min VALUES (5, 11); -INSERT INTO attr_min VALUES (6, 11); -INSERT INTO attr_min VALUES (1, 15); -INSERT INTO attr_min VALUES (9, 15); -INSERT INTO attr_min VALUES (15, 1); -INSERT INTO attr_min VALUES (15, 9); -INSERT INTO attr_min VALUES (1, 23); -INSERT INTO attr_min VALUES (2, 23); -INSERT INTO attr_min VALUES (3, 23); -INSERT INTO attr_min VALUES (4, 23); -INSERT INTO attr_min VALUES (5, 23); -INSERT INTO attr_min VALUES (6, 23); -INSERT INTO attr_min VALUES (8, 23); -INSERT INTO attr_min VALUES (9, 23); -INSERT INTO attr_min VALUES (10, 23); -INSERT INTO attr_min VALUES (11, 23); -INSERT INTO attr_min VALUES (12, 23); -INSERT INTO attr_min VALUES (13, 23); -INSERT INTO attr_min VALUES (14, 23); -INSERT INTO attr_min VALUES (15, 23); -INSERT INTO attr_min VALUES (7, 23); -INSERT INTO attr_min VALUES (9, 24); -INSERT INTO attr_min VALUES (8, 24); -INSERT INTO attr_min VALUES (14, 24); -INSERT INTO attr_min VALUES (16, 1); -INSERT INTO attr_min VALUES (16, 17); -INSERT INTO attr_min VALUES (16, 18); -INSERT INTO attr_min VALUES (16, 25); -INSERT INTO attr_min VALUES (16, 26); -INSERT INTO attr_min VALUES (16, 27); -INSERT INTO attr_min VALUES (16, 23); -INSERT INTO attr_min VALUES (25, 1); -INSERT INTO attr_min VALUES (25, 4); -INSERT INTO attr_min VALUES (25, 3); -INSERT INTO attr_min VALUES (25, 5); -INSERT INTO attr_min VALUES (25, 15); -INSERT INTO attr_min VALUES (25, 16); -INSERT INTO attr_min VALUES (25, 24); -INSERT INTO attr_min VALUES (25, 23); -INSERT INTO attr_min VALUES (2, 30); - - --- --- Data for Name: bilan; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO bilan VALUES (1, 'Bilan Belge complet', 'document/fr_be/bnb.rtf', 'document/fr_be/bnb.form', 'RTF'); - - --- --- Data for Name: centralized; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: del_action; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: del_jrn; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: del_jrnx; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: document; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: document_modele; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: document_state; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO document_state VALUES (1, 'Clôturé'); -INSERT INTO document_state VALUES (2, 'A suivre'); -INSERT INTO document_state VALUES (3, 'A faire'); -INSERT INTO document_state VALUES (4, 'Abandonné'); - - --- --- Data for Name: document_type; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO document_type VALUES (1, 'Document Interne'); -INSERT INTO document_type VALUES (2, 'Bons de commande client'); -INSERT INTO document_type VALUES (3, 'Bon de commande Fournisseur'); -INSERT INTO document_type VALUES (4, 'Facture'); -INSERT INTO document_type VALUES (5, 'Lettre de rappel'); -INSERT INTO document_type VALUES (6, 'Courrier'); -INSERT INTO document_type VALUES (7, 'Proposition'); -INSERT INTO document_type VALUES (8, 'Email'); -INSERT INTO document_type VALUES (9, 'Divers'); -INSERT INTO document_type VALUES (10, 'Note de frais'); -INSERT INTO document_type VALUES (20, 'Réception commande Fournisseur'); -INSERT INTO document_type VALUES (21, 'Réception commande Client'); -INSERT INTO document_type VALUES (22, 'Réception magazine'); - - --- --- Data for Name: extension; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO extension VALUES (1, 'Module de TVA', 'TVA', 'Cette extension permet de faire les listings et declarations TVA', 'tva/index.php', 'Y'); - - --- --- Data for Name: fiche; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: fiche_def; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO fiche_def VALUES (2, '400', 'Client', true, 9); -INSERT INTO fiche_def VALUES (1, '604', 'Marchandises', true, 2); -INSERT INTO fiche_def VALUES (3, '5500', 'Banque', true, 4); -INSERT INTO fiche_def VALUES (4, '440', 'Fournisseur', true, 8); -INSERT INTO fiche_def VALUES (5, '61', 'S & B D', true, 3); -INSERT INTO fiche_def VALUES (6, '700', 'Vente', true, 1); - - --- --- Data for Name: fiche_def_ref; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO fiche_def_ref VALUES (1, 'Vente Service', '700'); -INSERT INTO fiche_def_ref VALUES (2, 'Achat Marchandises', '604'); -INSERT INTO fiche_def_ref VALUES (3, 'Achat Service et biens divers', '61'); -INSERT INTO fiche_def_ref VALUES (4, 'Banque', '5500'); -INSERT INTO fiche_def_ref VALUES (5, 'Prêt > a un an', '17'); -INSERT INTO fiche_def_ref VALUES (6, 'Prêt < a un an', '430'); -INSERT INTO fiche_def_ref VALUES (8, 'Fournisseurs', '440'); -INSERT INTO fiche_def_ref VALUES (9, 'Clients', '400'); -INSERT INTO fiche_def_ref VALUES (10, 'Salaire Administrateur', '6200'); -INSERT INTO fiche_def_ref VALUES (11, 'Salaire Ouvrier', '6203'); -INSERT INTO fiche_def_ref VALUES (12, 'Salaire Employé', '6202'); -INSERT INTO fiche_def_ref VALUES (13, 'Dépenses non admises', '674'); -INSERT INTO fiche_def_ref VALUES (14, 'Administration des Finances', NULL); -INSERT INTO fiche_def_ref VALUES (15, 'Autres fiches', NULL); -INSERT INTO fiche_def_ref VALUES (7, 'Matériel à amortir', '2400'); -INSERT INTO fiche_def_ref VALUES (16, 'Contact', NULL); -INSERT INTO fiche_def_ref VALUES (25, 'Compte Salarié / Administrateur', NULL); - - --- --- Data for Name: fiche_detail; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: forecast; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: forecast_cat; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: forecast_item; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: form; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO form VALUES (3000398, 3000000, 1, 'Prestation [ case 03 ]', '[700%]-[7000005]'); -INSERT INTO form VALUES (3000399, 3000000, 2, 'Prestation intra [ case 47 ]', '[7000005]'); -INSERT INTO form VALUES (3000400, 3000000, 3, 'Tva due [case 54]', '[4513]+[4512]+[4511] FROM=01.2005'); -INSERT INTO form VALUES (3000401, 3000000, 4, 'Marchandises, matière première et auxiliaire [case 81 ]', '[60%]'); -INSERT INTO form VALUES (3000402, 3000000, 7, 'Service et bien divers [case 82]', '[61%]'); -INSERT INTO form VALUES (3000403, 3000000, 8, 'bien d''invest [ case 83 ]', '[2400%]'); -INSERT INTO form VALUES (3000404, 3000000, 9, 'TVA déductible [ case 59 ]', 'abs([4117]-[411%])'); -INSERT INTO form VALUES (3000405, 3000000, 8, 'TVA non ded -> voiture', '[610022]*0.21/2'); -INSERT INTO form VALUES (3000406, 3000000, 9, 'Acompte TVA', '[4117]'); - - --- --- Data for Name: formdef; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO formdef VALUES (3000000, 'TVA déclaration Belge'); - - --- --- Data for Name: groupe_analytique; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: info_def; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO info_def VALUES ('BON_COMMANDE', 'Numero de bon de commande'); -INSERT INTO info_def VALUES ('OTHER', 'Info diverses'); - - --- --- Data for Name: jnt_fic_attr; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO jnt_fic_attr VALUES (3, 1, 16, 0); -INSERT INTO jnt_fic_attr VALUES (4, 1, 27, 0); -INSERT INTO jnt_fic_attr VALUES (5, 1, 36, 0); -INSERT INTO jnt_fic_attr VALUES (6, 1, 40, 0); -INSERT INTO jnt_fic_attr VALUES (3, 4, 18, 2); -INSERT INTO jnt_fic_attr VALUES (3, 12, 19, 3); -INSERT INTO jnt_fic_attr VALUES (6, 19, 44, 2); -INSERT INTO jnt_fic_attr VALUES (2, 13, 9, 31); -INSERT INTO jnt_fic_attr VALUES (3, 13, 20, 31); -INSERT INTO jnt_fic_attr VALUES (4, 13, 29, 31); -INSERT INTO jnt_fic_attr VALUES (1, 2, 3, 1); -INSERT INTO jnt_fic_attr VALUES (2, 12, 8, 1); -INSERT INTO jnt_fic_attr VALUES (3, 3, 17, 1); -INSERT INTO jnt_fic_attr VALUES (4, 12, 28, 1); -INSERT INTO jnt_fic_attr VALUES (5, 2, 37, 1); -INSERT INTO jnt_fic_attr VALUES (6, 2, 41, 1); -INSERT INTO jnt_fic_attr VALUES (1, 6, 4, 120); -INSERT INTO jnt_fic_attr VALUES (6, 6, 42, 120); -INSERT INTO jnt_fic_attr VALUES (1, 7, 5, 130); -INSERT INTO jnt_fic_attr VALUES (5, 7, 38, 130); -INSERT INTO jnt_fic_attr VALUES (6, 7, 43, 130); -INSERT INTO jnt_fic_attr VALUES (2, 14, 10, 40); -INSERT INTO jnt_fic_attr VALUES (3, 14, 21, 40); -INSERT INTO jnt_fic_attr VALUES (4, 14, 30, 40); -INSERT INTO jnt_fic_attr VALUES (2, 16, 12, 70); -INSERT INTO jnt_fic_attr VALUES (3, 16, 23, 70); -INSERT INTO jnt_fic_attr VALUES (4, 16, 32, 70); -INSERT INTO jnt_fic_attr VALUES (2, 17, 13, 80); -INSERT INTO jnt_fic_attr VALUES (3, 17, 24, 80); -INSERT INTO jnt_fic_attr VALUES (4, 17, 33, 80); -INSERT INTO jnt_fic_attr VALUES (2, 18, 14, 90); -INSERT INTO jnt_fic_attr VALUES (3, 18, 25, 90); -INSERT INTO jnt_fic_attr VALUES (4, 18, 34, 90); -INSERT INTO jnt_fic_attr VALUES (2, 23, 45, 400); -INSERT INTO jnt_fic_attr VALUES (1, 23, 46, 400); -INSERT INTO jnt_fic_attr VALUES (3, 23, 47, 400); -INSERT INTO jnt_fic_attr VALUES (4, 23, 48, 400); -INSERT INTO jnt_fic_attr VALUES (5, 23, 49, 400); -INSERT INTO jnt_fic_attr VALUES (6, 23, 50, 400); -INSERT INTO jnt_fic_attr VALUES (2, 24, 51, 60); -INSERT INTO jnt_fic_attr VALUES (4, 24, 52, 60); -INSERT INTO jnt_fic_attr VALUES (2, 15, 11, 50); -INSERT INTO jnt_fic_attr VALUES (3, 15, 22, 50); -INSERT INTO jnt_fic_attr VALUES (4, 15, 31, 50); -INSERT INTO jnt_fic_attr VALUES (1, 5, 1, 30); -INSERT INTO jnt_fic_attr VALUES (2, 5, 6, 30); -INSERT INTO jnt_fic_attr VALUES (3, 5, 15, 30); -INSERT INTO jnt_fic_attr VALUES (4, 5, 26, 30); -INSERT INTO jnt_fic_attr VALUES (5, 5, 35, 30); -INSERT INTO jnt_fic_attr VALUES (6, 5, 39, 30); -INSERT INTO jnt_fic_attr VALUES (1, 1, 2, 0); -INSERT INTO jnt_fic_attr VALUES (2, 1, 7, 0); - - --- --- Data for Name: jnt_letter; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: jrn; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: jrn_action; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO jrn_action VALUES (2, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'VEN'); -INSERT INTO jrn_action VALUES (4, 'Voir Impayés', 'Voir toutes les factures non payées', 'user_jrn.php', 'action=voir_jrn_non_paye', 'FR', 'VEN'); -INSERT INTO jrn_action VALUES (1, 'Nouvelle', 'Création d''une facture', 'user_jrn.php', 'action=insert_vente&blank', 'FR', 'VEN'); -INSERT INTO jrn_action VALUES (10, 'Nouveau', 'Encode un nouvel achat (matériel, marchandises, services et biens divers)', 'user_jrn.php', 'action=new&blank', 'FR', 'ACH'); -INSERT INTO jrn_action VALUES (12, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'ACH'); -INSERT INTO jrn_action VALUES (14, 'Voir Impayés', 'Voir toutes les factures non payées', 'user_jrn.php', 'action=voir_jrn_non_paye', 'FR', 'ACH'); -INSERT INTO jrn_action VALUES (20, 'Nouveau', 'Encode un nouvel achat (matériel, marchandises, services et biens divers)', 'user_jrn.php', 'action=new&blank', 'FR', 'FIN'); -INSERT INTO jrn_action VALUES (22, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'FIN'); -INSERT INTO jrn_action VALUES (30, 'Nouveau', NULL, 'user_jrn.php', 'action=new&blank', 'FR', 'ODS'); -INSERT INTO jrn_action VALUES (32, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'ODS'); -INSERT INTO jrn_action VALUES (40, 'Soldes', 'Voir les soldes des comptes en banques', 'user_jrn.php', 'action=solde', 'FR', 'FIN'); - - --- --- Data for Name: jrn_def; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO jrn_def VALUES (4, 'Opération Diverses', NULL, NULL, NULL, NULL, 5, 5, false, NULL, 'ODS', 'O01', 'ODS', NULL, NULL); -INSERT INTO jrn_def VALUES (1, 'Financier', '5* ', '5*', '3,2,4', '3,2,4', 5, 5, false, NULL, 'FIN', 'F01', 'FIN', NULL, NULL); -INSERT INTO jrn_def VALUES (3, 'Achat', '6*', '4*', '5', '4', 1, 3, true, 'échéance', 'ACH', 'A01', 'ACH', NULL, NULL); -INSERT INTO jrn_def VALUES (2, 'Vente', '4*', '7*', '2', '6', 2, 1, true, 'échéance', 'VEN', 'V01', 'VEN', NULL, NULL); - - --- --- Data for Name: jrn_info; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: jrn_note; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: jrn_periode; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO jrn_periode VALUES (4, 79, 'OP'); -INSERT INTO jrn_periode VALUES (1, 79, 'OP'); -INSERT INTO jrn_periode VALUES (3, 79, 'OP'); -INSERT INTO jrn_periode VALUES (2, 79, 'OP'); -INSERT INTO jrn_periode VALUES (4, 80, 'OP'); -INSERT INTO jrn_periode VALUES (1, 80, 'OP'); -INSERT INTO jrn_periode VALUES (3, 80, 'OP'); -INSERT INTO jrn_periode VALUES (2, 80, 'OP'); -INSERT INTO jrn_periode VALUES (4, 81, 'OP'); -INSERT INTO jrn_periode VALUES (1, 81, 'OP'); -INSERT INTO jrn_periode VALUES (3, 81, 'OP'); -INSERT INTO jrn_periode VALUES (2, 81, 'OP'); -INSERT INTO jrn_periode VALUES (4, 82, 'OP'); -INSERT INTO jrn_periode VALUES (1, 82, 'OP'); -INSERT INTO jrn_periode VALUES (3, 82, 'OP'); -INSERT INTO jrn_periode VALUES (2, 82, 'OP'); -INSERT INTO jrn_periode VALUES (4, 83, 'OP'); -INSERT INTO jrn_periode VALUES (1, 83, 'OP'); -INSERT INTO jrn_periode VALUES (3, 83, 'OP'); -INSERT INTO jrn_periode VALUES (2, 83, 'OP'); -INSERT INTO jrn_periode VALUES (4, 84, 'OP'); -INSERT INTO jrn_periode VALUES (1, 84, 'OP'); -INSERT INTO jrn_periode VALUES (3, 84, 'OP'); -INSERT INTO jrn_periode VALUES (2, 84, 'OP'); -INSERT INTO jrn_periode VALUES (4, 85, 'OP'); -INSERT INTO jrn_periode VALUES (1, 85, 'OP'); -INSERT INTO jrn_periode VALUES (3, 85, 'OP'); -INSERT INTO jrn_periode VALUES (2, 85, 'OP'); -INSERT INTO jrn_periode VALUES (4, 86, 'OP'); -INSERT INTO jrn_periode VALUES (1, 86, 'OP'); -INSERT INTO jrn_periode VALUES (3, 86, 'OP'); -INSERT INTO jrn_periode VALUES (2, 86, 'OP'); -INSERT INTO jrn_periode VALUES (4, 87, 'OP'); -INSERT INTO jrn_periode VALUES (1, 87, 'OP'); -INSERT INTO jrn_periode VALUES (3, 87, 'OP'); -INSERT INTO jrn_periode VALUES (2, 87, 'OP'); -INSERT INTO jrn_periode VALUES (4, 88, 'OP'); -INSERT INTO jrn_periode VALUES (1, 88, 'OP'); -INSERT INTO jrn_periode VALUES (3, 88, 'OP'); -INSERT INTO jrn_periode VALUES (2, 88, 'OP'); -INSERT INTO jrn_periode VALUES (4, 89, 'OP'); -INSERT INTO jrn_periode VALUES (1, 89, 'OP'); -INSERT INTO jrn_periode VALUES (3, 89, 'OP'); -INSERT INTO jrn_periode VALUES (2, 89, 'OP'); -INSERT INTO jrn_periode VALUES (4, 90, 'OP'); -INSERT INTO jrn_periode VALUES (1, 90, 'OP'); -INSERT INTO jrn_periode VALUES (3, 90, 'OP'); -INSERT INTO jrn_periode VALUES (2, 90, 'OP'); -INSERT INTO jrn_periode VALUES (4, 91, 'OP'); -INSERT INTO jrn_periode VALUES (1, 91, 'OP'); -INSERT INTO jrn_periode VALUES (3, 91, 'OP'); -INSERT INTO jrn_periode VALUES (2, 91, 'OP'); - - --- --- Data for Name: jrn_rapt; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: jrn_type; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO jrn_type VALUES ('FIN', 'Financier'); -INSERT INTO jrn_type VALUES ('VEN', 'Vente'); -INSERT INTO jrn_type VALUES ('ACH', 'Achat'); -INSERT INTO jrn_type VALUES ('ODS', 'Opérations Diverses'); - - --- --- Data for Name: jrnx; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: letter_cred; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: letter_deb; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: menu_ref; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO menu_ref VALUES ('ACH', 'Achat', 'compta_ach.inc.php', NULL, 'Nouvel achat ou dépense', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCHOP', 'Historique', 'anc_history.inc.php', NULL, 'Historique des imputations analytiques', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCGL', 'Grand''Livre', 'anc_great_ledger.inc.php', NULL, 'Grand livre d''plan analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCBS', 'Balance simple', 'anc_balance_simple.inc.php', NULL, 'Balance simple des imputations analytiques', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCBC2', 'Balance croisée double', 'anc_balance_double.inc.php', NULL, 'Balance double croisées des imputations analytiques', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCTAB', 'Tableau', 'anc_acc_table.inc.php', NULL, 'Tableau lié à la comptabilité', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCBCC', 'Balance Analytique/comptabilité', 'anc_acc_balance.inc.php', NULL, 'Lien entre comptabilité et Comptabilité analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCGR', 'Groupe', 'anc_group_balance.inc.php', NULL, 'Balance par groupe', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CSV:AncGrandLivre', 'Impression Grand-Livre', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncBalGroup', 'Export Balance groupe analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('OTH:Bilan', 'Export Bilan', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:ledger', 'Export Journaux', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:postedetail', 'Export Poste détail', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:postedetail', 'Export Poste détail', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:fichedetail', 'Export Fiche détail', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('SEARCH', 'Recherche', NULL, NULL, 'Recherche', NULL, 'popup_recherche()', 'ME'); -INSERT INTO menu_ref VALUES ('DIVPARM', 'Divers', NULL, NULL, 'Paramètres divers', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGTVA', 'TVA', 'tva.inc.php', NULL, 'Config. de la tva', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CARD', 'Fiche', 'fiche.inc.php', NULL, 'Fiche', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('STOCK', 'Stock', 'stock.inc.php', NULL, 'Stock', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('MOD', 'Menu et profile', NULL, NULL, 'Menu ', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGPRO', 'Profile', 'profile.inc.php', NULL, 'Configuration profile', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGPAY', 'Moyen de paiement', 'payment_middle.inc.php', NULL, 'Config. des méthodes de paiement', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGACC', 'Poste', 'poste.inc.php', NULL, 'Config. poste comptable de base', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('VEN', 'Vente', 'compta_ven.inc.php', NULL, 'Nouvelle vente ou recette', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGMENU', 'Config. Menu', 'menu.inc.php', NULL, 'Configuration des menus et plugins', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('COMPANY', 'Sociétés', 'company.inc.php', NULL, 'Parametre societe', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PERIODE', 'Période', 'periode.inc.php', NULL, 'Gestion des périodes', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PDF:fichedetail', 'Export Fiche détail', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:fiche_balance', 'Export Fiche balance', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:fiche_balance', 'Export Fiche balance', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:report', 'Export report', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:report', 'Export report', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:fiche', 'Export Fiche', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:fiche', 'Export Fiche', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:glcompte', 'Export Grand Livre', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:glcompte', 'Export Grand Livre', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:sec', 'Export Sécurité', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncList', 'Export Comptabilité analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncBalSimple', 'Export Comptabilité analytique balance simple', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:AncBalSimple', 'Export Comptabilité analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncBalDouble', 'Export Comptabilité analytique balance double', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:AncBalDouble', 'Export Comptabilité analytique balance double', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:balance', 'Export Balance comptable', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:balance', 'Export Balance comptable', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:histo', 'Export Historique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:ledger', 'Export Journaux', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncTable', 'Export Tableau Analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncAccList', 'Export Historique Compt. Analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('SUPPL', 'Fournisseur', 'supplier.inc.php', NULL, 'Suivi fournisseur', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('LET', 'Lettrage', NULL, NULL, 'Lettrage', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCODS', 'Opérations diverses', 'anc_od.inc.php', NULL, 'OD analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('VERIFBIL', 'Vérification ', 'verif_bilan.inc.php', NULL, 'Vérification de la comptabilité', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('REPORT', 'Création de rapport', 'report.inc.php', NULL, 'Création de rapport', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('OPEN', 'Ecriture Ouverture', 'opening.inc.php', NULL, 'Ecriture d''ouverture', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ACHIMP', 'Historique achat', 'history_operation.inc.php', NULL, 'Historique achat', 'ledger_type=ACH', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FOLLOW', 'Courrier', 'action.inc.php', NULL, 'Suivi, courrier, devis', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FORECAST', 'Prévision', 'forecast.inc.php', NULL, 'Prévision', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('EXT', 'Extension', 'extension_choice.inc.php', NULL, 'Extensions (plugins)', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGDOC', 'Document', 'document_modele.inc.php', NULL, 'Config. modèle de document', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGLED', 'journaux', 'cfgledger.inc.php', NULL, 'Configuration des journaux', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PREDOP', 'Ecriture prédefinie', 'preod.inc.php', NULL, 'Gestion des opérations prédéfinifies', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ADV', 'Avancé', NULL, NULL, 'Menu avancé', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANC', 'Compta Analytique', NULL, NULL, 'Module comptabilité analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGSEC', 'Sécurité', 'param_sec.inc.php', NULL, 'configuration de la sécurité', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PLANANC', 'Plan Compt. analytique', 'anc_pa.inc.php', NULL, 'Plan analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCGROUP', 'Groupe', 'anc_group.inc.php', NULL, 'Groupe analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ODSIMP', 'Historique opérations diverses', 'history_operation.inc.php', NULL, 'Historique opérations diverses', 'ledger_type=ODS', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('VENMENU', 'Vente / Recette', NULL, NULL, 'Menu ventes et recettes', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PREFERENCE', 'Préférence', 'pref.inc.php', NULL, 'Préférence', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('HIST', 'Historique', 'history_operation.inc.php', NULL, 'Historique', 'ledger_type=ALL', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('MENUFIN', 'Financier', NULL, NULL, 'Menu Financier', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FIMP', 'Historique financier', 'history_operation.inc.php', NULL, 'Historique financier', 'ledger_type=FIN', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('MENUACH', 'Achat', NULL, NULL, 'Menu achat', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('MENUODS', 'Opérations diverses', NULL, NULL, 'Menu opérations diverses', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ODS', 'Opérations Diverses', 'compta_ods.inc.php', NULL, 'Nouvelle opérations diverses', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FREC', 'Rapprochement', 'compta_fin_rec.inc.php', NULL, 'Rapprochement bancaire', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ADM', 'Administration', 'adm.inc.php', NULL, 'Suivi administration, banque', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FIN', 'Nouvel extrait', 'compta_fin.inc.php', NULL, 'Nouvel extrait bancaire', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGATCARD', 'Attribut de fiche', 'card_attr.inc.php', NULL, 'Gestion des modèles de fiches', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FSALDO', 'Soldes', 'compta_fin_saldo.inc.php', NULL, 'Solde des comptes en banques, caisse...', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('JSSEARCH', 'Recherche', NULL, NULL, 'Recherche', NULL, 'search_reconcile()', 'ME'); -INSERT INTO menu_ref VALUES ('LETACC', 'Lettrage par Poste', 'lettering.account.inc.php', NULL, 'lettrage par poste comptable', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CARDBAL', 'Balance', 'balance_card.inc.php', NULL, 'Balance par catégorie de fiche', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CUST', 'Client', 'client.inc.php', NULL, 'Suivi client', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGCARDCAT', 'Catégorie de fiche', 'fiche_def.inc.php', NULL, 'Gestion catégorie de fiche', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGCATDOC', 'Catégorie de documents', 'cat_document.inc.php', NULL, 'Config. catégorie de documents', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('VENIMP', 'Historique vente', 'history_operation.inc.php', NULL, 'Historique des ventes', 'ledger_type=VEN', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('LETCARD', 'Lettrage par Fiche', 'lettering.card.inc.php', NULL, 'Lettrage par fiche', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGPCMN', 'Plan Comptable', 'param_pcmn.inc.php', NULL, 'Config. du plan comptable', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('LOGOUT', 'Sortie', NULL, 'logout.php', 'Sortie', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('DASHBOARD', 'Tableau de bord', 'dashboard.inc.php', NULL, 'Tableau de bord', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('COMPTA', 'Comptabilité', NULL, NULL, 'Module comptabilité', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('GESTION', 'Gestion', NULL, NULL, 'Module gestion', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PARAM', 'Paramètre', NULL, NULL, 'Module paramètre', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTJRN', 'Historique', 'impress_jrn.inc.php', NULL, 'Impression historique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTREC', 'Rapprochement', 'impress_rec.inc.php', NULL, 'Impression des rapprochements', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTPOSTE', 'Poste', 'impress_poste.inc.php', NULL, 'Impression du détail d''un poste comptable', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTREPORT', 'Rapport', 'impress_rapport.inc.php', NULL, 'Impression de rapport', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTBILAN', 'Bilan', 'impress_bilan.inc.php', NULL, 'Impression de bilan', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTGL', 'Grand Livre', 'impress_gl_comptes.inc.php', NULL, 'Impression du grand livre', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTBAL', 'Balance', 'balance.inc.php', NULL, 'Impression des balances comptables', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTCARD', 'Catégorie de Fiches', 'impress_fiche.inc.php', NULL, 'Impression catégorie de fiches', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINT', 'Impression', NULL, NULL, 'Menu impression', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ACCESS', 'Accueil', NULL, 'user_login.php', 'Accueil', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCIMP', 'Impression', NULL, NULL, 'Impression compta. analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('new_line', 'saut de ligne', NULL, NULL, 'Saut de ligne', NULL, NULL, 'SP'); -INSERT INTO menu_ref VALUES ('TVA', 'Module de TVA', 'tva/index.php', NULL, 'Cette extension permet de faire les listings et declarations TVA', 'plugin_code=TVA', NULL, 'PL'); - - --- --- Data for Name: mod_payment; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO mod_payment VALUES (2, 'Caisse', 1, NULL, NULL, 2); -INSERT INTO mod_payment VALUES (1, 'Paiement électronique', 1, NULL, NULL, 2); -INSERT INTO mod_payment VALUES (4, 'Caisse', 1, NULL, NULL, 3); -INSERT INTO mod_payment VALUES (3, 'Par gérant ou administrateur', 2, NULL, NULL, 3); - - --- --- Data for Name: op_predef; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: op_predef_detail; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: operation_analytique; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: parameter; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO parameter VALUES ('MY_NAME', NULL); -INSERT INTO parameter VALUES ('MY_CP', NULL); -INSERT INTO parameter VALUES ('MY_COMMUNE', NULL); -INSERT INTO parameter VALUES ('MY_TVA', NULL); -INSERT INTO parameter VALUES ('MY_STREET', NULL); -INSERT INTO parameter VALUES ('MY_NUMBER', NULL); -INSERT INTO parameter VALUES ('MY_TEL', NULL); -INSERT INTO parameter VALUES ('MY_PAYS', NULL); -INSERT INTO parameter VALUES ('MY_FAX', NULL); -INSERT INTO parameter VALUES ('MY_ANALYTIC', 'nu'); -INSERT INTO parameter VALUES ('MY_COUNTRY', 'BE'); -INSERT INTO parameter VALUES ('MY_STRICT', 'Y'); -INSERT INTO parameter VALUES ('MY_TVA_USE', 'Y'); -INSERT INTO parameter VALUES ('MY_PJ_SUGGEST', 'Y'); -INSERT INTO parameter VALUES ('MY_DATE_SUGGEST', 'Y'); -INSERT INTO parameter VALUES ('MY_ALPHANUM', 'N'); -INSERT INTO parameter VALUES ('MY_CHECK_PERIODE', 'N'); - - --- --- Data for Name: parm_code; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO parm_code VALUES ('DNA', '6740', 'Dépense non déductible'); -INSERT INTO parm_code VALUES ('CUSTOMER', '400', 'Poste comptable de base pour les clients'); -INSERT INTO parm_code VALUES ('COMPTE_TVA', '451', 'TVA à payer'); -INSERT INTO parm_code VALUES ('BANQUE', '550', 'Poste comptable de base pour les banques'); -INSERT INTO parm_code VALUES ('VIREMENT_INTERNE', '58', 'Poste Comptable pour les virements internes'); -INSERT INTO parm_code VALUES ('COMPTE_COURANT', '56', 'Poste comptable pour le compte courant'); -INSERT INTO parm_code VALUES ('CAISSE', '57', 'Poste comptable pour la caisse'); -INSERT INTO parm_code VALUES ('TVA_DNA', '6740', 'Tva non déductible s'); -INSERT INTO parm_code VALUES ('TVA_DED_IMPOT', '619000', 'Tva déductible par l''impôt'); -INSERT INTO parm_code VALUES ('VENTE', '70', 'Poste comptable de base pour les ventes'); -INSERT INTO parm_code VALUES ('DEP_PRIV', '4890', 'Depense a charge du gerant'); -INSERT INTO parm_code VALUES ('SUPPLIER', '440', 'Poste par défaut pour les fournisseurs'); - - --- --- Data for Name: parm_money; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO parm_money VALUES (1, 'EUR', 1.0000); - - --- --- Data for Name: parm_periode; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO parm_periode VALUES (79, '2010-01-01', '2010-01-31', '2010', false, false); -INSERT INTO parm_periode VALUES (80, '2010-02-01', '2010-02-28', '2010', false, false); -INSERT INTO parm_periode VALUES (81, '2010-03-01', '2010-03-31', '2010', false, false); -INSERT INTO parm_periode VALUES (82, '2010-04-01', '2010-04-30', '2010', false, false); -INSERT INTO parm_periode VALUES (83, '2010-05-01', '2010-05-31', '2010', false, false); -INSERT INTO parm_periode VALUES (84, '2010-06-01', '2010-06-30', '2010', false, false); -INSERT INTO parm_periode VALUES (85, '2010-07-01', '2010-07-31', '2010', false, false); -INSERT INTO parm_periode VALUES (86, '2010-08-01', '2010-08-31', '2010', false, false); -INSERT INTO parm_periode VALUES (87, '2010-09-01', '2010-09-30', '2010', false, false); -INSERT INTO parm_periode VALUES (88, '2010-10-01', '2010-10-31', '2010', false, false); -INSERT INTO parm_periode VALUES (89, '2010-11-01', '2010-11-30', '2010', false, false); -INSERT INTO parm_periode VALUES (90, '2010-12-01', '2010-12-30', '2010', false, false); -INSERT INTO parm_periode VALUES (91, '2010-12-31', '2010-12-31', '2010', false, false); - - --- --- Data for Name: parm_poste; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO parm_poste VALUES ('1', 'PAS'); -INSERT INTO parm_poste VALUES ('101', 'PASINV'); -INSERT INTO parm_poste VALUES ('141', 'PASINV'); -INSERT INTO parm_poste VALUES ('42', 'PAS'); -INSERT INTO parm_poste VALUES ('43', 'PAS'); -INSERT INTO parm_poste VALUES ('44', 'PAS'); -INSERT INTO parm_poste VALUES ('45', 'PAS'); -INSERT INTO parm_poste VALUES ('46', 'PAS'); -INSERT INTO parm_poste VALUES ('47', 'PAS'); -INSERT INTO parm_poste VALUES ('48', 'PAS'); -INSERT INTO parm_poste VALUES ('492', 'PAS'); -INSERT INTO parm_poste VALUES ('493', 'PAS'); -INSERT INTO parm_poste VALUES ('2', 'ACT'); -INSERT INTO parm_poste VALUES ('2409', 'ACTINV'); -INSERT INTO parm_poste VALUES ('3', 'ACT'); -INSERT INTO parm_poste VALUES ('5', 'ACT'); -INSERT INTO parm_poste VALUES ('491', 'ACT'); -INSERT INTO parm_poste VALUES ('490', 'ACT'); -INSERT INTO parm_poste VALUES ('6', 'CHA'); -INSERT INTO parm_poste VALUES ('7', 'PRO'); -INSERT INTO parm_poste VALUES ('4', 'ACT'); -INSERT INTO parm_poste VALUES ('40', 'ACT'); -INSERT INTO parm_poste VALUES ('5501', 'ACTINV'); -INSERT INTO parm_poste VALUES ('5511', 'ACTINV'); -INSERT INTO parm_poste VALUES ('5521', 'ACTINV'); -INSERT INTO parm_poste VALUES ('5531', 'ACTINV'); -INSERT INTO parm_poste VALUES ('5541', 'ACTINV'); -INSERT INTO parm_poste VALUES ('5551', 'ACTINV'); -INSERT INTO parm_poste VALUES ('5561', 'ACTINV'); -INSERT INTO parm_poste VALUES ('5571', 'ACTINV'); -INSERT INTO parm_poste VALUES ('5581', 'ACTINV'); -INSERT INTO parm_poste VALUES ('5591', 'ACTINV'); -INSERT INTO parm_poste VALUES ('6311', 'CHAINV'); -INSERT INTO parm_poste VALUES ('6321', 'CHAINV'); -INSERT INTO parm_poste VALUES ('6331', 'CHAINV'); -INSERT INTO parm_poste VALUES ('6341', 'CHAINV'); -INSERT INTO parm_poste VALUES ('6351', 'CHAINV'); -INSERT INTO parm_poste VALUES ('6361', 'CHAINV'); -INSERT INTO parm_poste VALUES ('6371', 'CHAINV'); -INSERT INTO parm_poste VALUES ('649', 'CHAINV'); -INSERT INTO parm_poste VALUES ('6511', 'CHAINV'); -INSERT INTO parm_poste VALUES ('6701', 'CHAINV'); -INSERT INTO parm_poste VALUES ('608', 'CHAINV'); -INSERT INTO parm_poste VALUES ('709', 'PROINV'); - - --- --- Data for Name: plan_analytique; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: poste_analytique; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: profile; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO profile VALUES ('Administrateur', 1, 'Profil par défaut pour les adminstrateurs', true, true); -INSERT INTO profile VALUES ('Utilisateur', 2, 'Profil par défaut pour les utilisateurs', true, true); - - --- --- Data for Name: profile_menu; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO profile_menu VALUES (59, 'CFGPAY', 'DIVPARM', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (68, 'CFGATCARD', 'DIVPARM', 1, 9, 'E', 0); -INSERT INTO profile_menu VALUES (61, 'CFGACC', 'DIVPARM', 1, 6, 'E', 0); -INSERT INTO profile_menu VALUES (54, 'COMPANY', 'PARAM', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (651, 'ANCHOP', 'ANCIMP', 1, 10, 'E', 0); -INSERT INTO profile_menu VALUES (173, 'COMPTA', NULL, 1, 40, 'M', 0); -INSERT INTO profile_menu VALUES (55, 'PERIODE', 'PARAM', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (56, 'DIVPARM', 'PARAM', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (652, 'ANCGL', 'ANCIMP', 1, 20, 'E', 0); -INSERT INTO profile_menu VALUES (60, 'CFGTVA', 'DIVPARM', 1, 5, 'E', 0); -INSERT INTO profile_menu VALUES (653, 'ANCBS', 'ANCIMP', 1, 30, 'E', 0); -INSERT INTO profile_menu VALUES (654, 'ANCBC2', 'ANCIMP', 1, 40, 'E', 0); -INSERT INTO profile_menu VALUES (655, 'ANCTAB', 'ANCIMP', 1, 50, 'E', 0); -INSERT INTO profile_menu VALUES (656, 'ANCBCC', 'ANCIMP', 1, 60, 'E', 0); -INSERT INTO profile_menu VALUES (657, 'ANCGR', 'ANCIMP', 1, 70, 'E', 0); -INSERT INTO profile_menu VALUES (658, 'CSV:AncGrandLivre', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (662, 'new_line', NULL, 1, 35, 'M', 0); -INSERT INTO profile_menu VALUES (67, 'CFGCATDOC', 'DIVPARM', 1, 8, 'E', 0); -INSERT INTO profile_menu VALUES (69, 'CFGPCMN', 'PARAM', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (526, 'PRINTGL', 'PRINT', 1, 20, 'E', 0); -INSERT INTO profile_menu VALUES (23, 'LET', 'COMPTA', 1, 8, 'E', 0); -INSERT INTO profile_menu VALUES (523, 'PRINTBAL', 'PRINT', 1, 50, 'E', 0); -INSERT INTO profile_menu VALUES (529, 'PRINTREPORT', 'PRINT', 1, 85, 'E', 0); -INSERT INTO profile_menu VALUES (72, 'PREDOP', 'PARAM', 1, 7, 'E', 0); -INSERT INTO profile_menu VALUES (75, 'PLANANC', 'ANC', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (65, 'CFGCARDCAT', 'DIVPARM', 1, 7, 'E', 0); -INSERT INTO profile_menu VALUES (76, 'ANCODS', 'ANC', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (77, 'ANCGROUP', 'ANC', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (78, 'ANCIMP', 'ANC', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (45, 'PARAM', NULL, 1, 20, 'M', 0); -INSERT INTO profile_menu VALUES (527, 'PRINTJRN', 'PRINT', 1, 10, 'E', 0); -INSERT INTO profile_menu VALUES (530, 'PRINTREC', 'PRINT', 1, 100, 'E', 0); -INSERT INTO profile_menu VALUES (524, 'PRINTBILAN', 'PRINT', 1, 90, 'E', 0); -INSERT INTO profile_menu VALUES (79, 'PREFERENCE', NULL, 1, 15, 'M', 0); -INSERT INTO profile_menu VALUES (37, 'CUST', 'GESTION', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (38, 'SUPPL', 'GESTION', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (39, 'ADM', 'GESTION', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (36, 'CARD', 'GESTION', 1, 6, 'E', 0); -INSERT INTO profile_menu VALUES (40, 'STOCK', 'GESTION', 1, 5, 'E', 0); -INSERT INTO profile_menu VALUES (41, 'FORECAST', 'GESTION', 1, 7, 'E', 0); -INSERT INTO profile_menu VALUES (42, 'FOLLOW', 'GESTION', 1, 8, 'E', 0); -INSERT INTO profile_menu VALUES (29, 'VERIFBIL', 'ADV', 1, 21, 'E', 0); -INSERT INTO profile_menu VALUES (30, 'STOCK', 'ADV', 1, 22, 'E', 0); -INSERT INTO profile_menu VALUES (31, 'PREDOP', 'ADV', 1, 23, 'E', 0); -INSERT INTO profile_menu VALUES (32, 'OPEN', 'ADV', 1, 24, 'E', 0); -INSERT INTO profile_menu VALUES (33, 'REPORT', 'ADV', 1, 25, 'E', 0); -INSERT INTO profile_menu VALUES (5, 'CARD', 'COMPTA', 1, 7, 'E', 0); -INSERT INTO profile_menu VALUES (43, 'HIST', 'COMPTA', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (28, 'ADV', 'COMPTA', 1, 20, 'E', 0); -INSERT INTO profile_menu VALUES (53, 'ACCESS', NULL, 1, 25, 'M', 0); -INSERT INTO profile_menu VALUES (123, 'CSV:histo', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (20, 'LOGOUT', NULL, 1, 30, 'M', 0); -INSERT INTO profile_menu VALUES (35, 'PRINT', 'GESTION', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (124, 'CSV:ledger', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (125, 'PDF:ledger', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (6, 'PRINT', 'COMPTA', 1, 6, 'E', 0); -INSERT INTO profile_menu VALUES (126, 'CSV:postedetail', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (3, 'MENUACH', 'COMPTA', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (86, 'ACHIMP', 'MENUACH', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (34, 'GESTION', NULL, 1, 45, 'M', 0); -INSERT INTO profile_menu VALUES (18, 'MENUODS', 'COMPTA', 1, 5, 'E', 0); -INSERT INTO profile_menu VALUES (88, 'ODS', 'MENUODS', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (89, 'ODSIMP', 'MENUODS', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (2, 'ANC', NULL, 1, 50, 'M', 0); -INSERT INTO profile_menu VALUES (4, 'VENMENU', 'COMPTA', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (90, 'VEN', 'VENMENU', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (91, 'VENIMP', 'VENMENU', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (19, 'FIN', 'MENUFIN', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (73, 'CFGDOC', 'PARAM', 1, 8, 'E', 0); -INSERT INTO profile_menu VALUES (74, 'CFGLED', 'PARAM', 1, 9, 'E', 0); -INSERT INTO profile_menu VALUES (71, 'CFGSEC', 'PARAM', 1, 6, 'E', 0); -INSERT INTO profile_menu VALUES (82, 'EXT', NULL, 1, 55, 'M', 0); -INSERT INTO profile_menu VALUES (95, 'FREC', 'MENUFIN', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (94, 'FSALDO', 'MENUFIN', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (27, 'LETACC', 'LET', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (24, 'LETCARD', 'LET', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (167, 'MOD', 'PARAM', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (92, 'MENUFIN', 'COMPTA', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (93, 'FIMP', 'MENUFIN', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (151, 'SEARCH', NULL, 1, 60, 'M', 0); -INSERT INTO profile_menu VALUES (85, 'ACH', 'MENUACH', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (127, 'PDF:postedetail', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (128, 'CSV:fichedetail', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (129, 'PDF:fichedetail', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (130, 'CSV:fiche_balance', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (131, 'PDF:fiche_balance', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (132, 'CSV:report', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (133, 'PDF:report', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (134, 'CSV:fiche', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (135, 'PDF:fiche', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (136, 'CSV:glcompte', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (137, 'PDF:glcompte', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (138, 'PDF:sec', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (139, 'CSV:AncList', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (140, 'CSV:AncBalSimple', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (141, 'PDF:AncBalSimple', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (142, 'CSV:AncBalDouble', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (143, 'PDF:AncBalDouble', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (144, 'CSV:balance', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (145, 'PDF:balance', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (146, 'CSV:AncTable', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (147, 'CSV:AncAccList', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (148, 'CSV:AncBalGroup', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (149, 'OTH:Bilan', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (528, 'PRINTPOSTE', 'PRINT', 1, 30, 'E', 0); -INSERT INTO profile_menu VALUES (525, 'PRINTCARD', 'PRINT', 1, 40, 'E', 0); -INSERT INTO profile_menu VALUES (1, 'DASHBOARD', NULL, 1, 10, 'M', 1); -INSERT INTO profile_menu VALUES (172, 'CFGPRO', 'MOD', 1, NULL, 'E', 0); -INSERT INTO profile_menu VALUES (171, 'CFGMENU', 'MOD', 1, NULL, 'E', 0); -INSERT INTO profile_menu VALUES (663, 'CFGPAY', 'DIVPARM', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (664, 'CFGATCARD', 'DIVPARM', 2, 9, 'E', 0); -INSERT INTO profile_menu VALUES (665, 'CFGACC', 'DIVPARM', 2, 6, 'E', 0); -INSERT INTO profile_menu VALUES (668, 'ANCHOP', 'ANCIMP', 2, 10, 'E', 0); -INSERT INTO profile_menu VALUES (669, 'COMPTA', NULL, 2, 40, 'M', 0); -INSERT INTO profile_menu VALUES (672, 'ANCGL', 'ANCIMP', 2, 20, 'E', 0); -INSERT INTO profile_menu VALUES (673, 'CFGTVA', 'DIVPARM', 2, 5, 'E', 0); -INSERT INTO profile_menu VALUES (674, 'ANCBS', 'ANCIMP', 2, 30, 'E', 0); -INSERT INTO profile_menu VALUES (675, 'ANCBC2', 'ANCIMP', 2, 40, 'E', 0); -INSERT INTO profile_menu VALUES (676, 'ANCTAB', 'ANCIMP', 2, 50, 'E', 0); -INSERT INTO profile_menu VALUES (677, 'ANCBCC', 'ANCIMP', 2, 60, 'E', 0); -INSERT INTO profile_menu VALUES (678, 'ANCGR', 'ANCIMP', 2, 70, 'E', 0); -INSERT INTO profile_menu VALUES (679, 'CSV:AncGrandLivre', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (680, 'new_line', NULL, 2, 35, 'M', 0); -INSERT INTO profile_menu VALUES (681, 'CFGCATDOC', 'DIVPARM', 2, 8, 'E', 0); -INSERT INTO profile_menu VALUES (683, 'PRINTGL', 'PRINT', 2, 20, 'E', 0); -INSERT INTO profile_menu VALUES (684, 'LET', 'COMPTA', 2, 8, 'E', 0); -INSERT INTO profile_menu VALUES (685, 'PRINTBAL', 'PRINT', 2, 50, 'E', 0); -INSERT INTO profile_menu VALUES (686, 'PRINTREPORT', 'PRINT', 2, 85, 'E', 0); -INSERT INTO profile_menu VALUES (688, 'PLANANC', 'ANC', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (689, 'CFGCARDCAT', 'DIVPARM', 2, 7, 'E', 0); -INSERT INTO profile_menu VALUES (690, 'ANCODS', 'ANC', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (717, 'CSV:ledger', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (718, 'PDF:ledger', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (719, 'PRINT', 'COMPTA', 2, 6, 'E', 0); -INSERT INTO profile_menu VALUES (720, 'CSV:postedetail', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (721, 'MENUACH', 'COMPTA', 2, 3, 'E', 0); -INSERT INTO profile_menu VALUES (722, 'ACHIMP', 'MENUACH', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (723, 'GESTION', NULL, 2, 45, 'M', 0); -INSERT INTO profile_menu VALUES (724, 'MENUODS', 'COMPTA', 2, 5, 'E', 0); -INSERT INTO profile_menu VALUES (725, 'ODS', 'MENUODS', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (726, 'ODSIMP', 'MENUODS', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (727, 'ANC', NULL, 2, 50, 'M', 0); -INSERT INTO profile_menu VALUES (728, 'VENMENU', 'COMPTA', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (729, 'VEN', 'VENMENU', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (730, 'VENIMP', 'VENMENU', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (731, 'FIN', 'MENUFIN', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (735, 'EXT', NULL, 2, 55, 'M', 0); -INSERT INTO profile_menu VALUES (736, 'FREC', 'MENUFIN', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (737, 'FSALDO', 'MENUFIN', 2, 3, 'E', 0); -INSERT INTO profile_menu VALUES (738, 'LETACC', 'LET', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (691, 'ANCGROUP', 'ANC', 2, 3, 'E', 0); -INSERT INTO profile_menu VALUES (692, 'ANCIMP', 'ANC', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (694, 'PRINTJRN', 'PRINT', 2, 10, 'E', 0); -INSERT INTO profile_menu VALUES (695, 'PRINTREC', 'PRINT', 2, 100, 'E', 0); -INSERT INTO profile_menu VALUES (696, 'PRINTBILAN', 'PRINT', 2, 90, 'E', 0); -INSERT INTO profile_menu VALUES (697, 'PREFERENCE', NULL, 2, 15, 'M', 0); -INSERT INTO profile_menu VALUES (698, 'CUST', 'GESTION', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (699, 'SUPPL', 'GESTION', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (700, 'ADM', 'GESTION', 2, 3, 'E', 0); -INSERT INTO profile_menu VALUES (701, 'CARD', 'GESTION', 2, 6, 'E', 0); -INSERT INTO profile_menu VALUES (702, 'STOCK', 'GESTION', 2, 5, 'E', 0); -INSERT INTO profile_menu VALUES (703, 'FORECAST', 'GESTION', 2, 7, 'E', 0); -INSERT INTO profile_menu VALUES (704, 'FOLLOW', 'GESTION', 2, 8, 'E', 0); -INSERT INTO profile_menu VALUES (705, 'VERIFBIL', 'ADV', 2, 21, 'E', 0); -INSERT INTO profile_menu VALUES (706, 'STOCK', 'ADV', 2, 22, 'E', 0); -INSERT INTO profile_menu VALUES (707, 'PREDOP', 'ADV', 2, 23, 'E', 0); -INSERT INTO profile_menu VALUES (708, 'OPEN', 'ADV', 2, 24, 'E', 0); -INSERT INTO profile_menu VALUES (709, 'REPORT', 'ADV', 2, 25, 'E', 0); -INSERT INTO profile_menu VALUES (710, 'CARD', 'COMPTA', 2, 7, 'E', 0); -INSERT INTO profile_menu VALUES (711, 'HIST', 'COMPTA', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (712, 'ADV', 'COMPTA', 2, 20, 'E', 0); -INSERT INTO profile_menu VALUES (713, 'ACCESS', NULL, 2, 25, 'M', 0); -INSERT INTO profile_menu VALUES (714, 'CSV:histo', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (715, 'LOGOUT', NULL, 2, 30, 'M', 0); -INSERT INTO profile_menu VALUES (716, 'PRINT', 'GESTION', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (739, 'LETCARD', 'LET', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (742, 'MENUFIN', 'COMPTA', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (743, 'FIMP', 'MENUFIN', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (744, 'SEARCH', NULL, 2, 60, 'M', 0); -INSERT INTO profile_menu VALUES (745, 'ACH', 'MENUACH', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (746, 'PDF:postedetail', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (747, 'CSV:fichedetail', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (748, 'PDF:fichedetail', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (749, 'CSV:fiche_balance', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (750, 'PDF:fiche_balance', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (751, 'CSV:report', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (752, 'PDF:report', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (753, 'CSV:fiche', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (754, 'PDF:fiche', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (755, 'CSV:glcompte', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (756, 'PDF:glcompte', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (757, 'PDF:sec', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (758, 'CSV:AncList', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (759, 'CSV:AncBalSimple', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (760, 'PDF:AncBalSimple', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (761, 'CSV:AncBalDouble', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (762, 'PDF:AncBalDouble', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (763, 'CSV:balance', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (764, 'PDF:balance', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (765, 'CSV:AncTable', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (766, 'CSV:AncAccList', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (767, 'CSV:AncBalGroup', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (768, 'OTH:Bilan', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (769, 'PRINTPOSTE', 'PRINT', 2, 30, 'E', 0); -INSERT INTO profile_menu VALUES (770, 'PRINTCARD', 'PRINT', 2, 40, 'E', 0); -INSERT INTO profile_menu VALUES (777, 'CFGPRO', 'MOD', 2, NULL, 'E', 0); -INSERT INTO profile_menu VALUES (778, 'CFGMENU', 'MOD', 2, NULL, 'E', 0); -INSERT INTO profile_menu VALUES (772, 'DASHBOARD', NULL, 2, 10, 'M', 1); -INSERT INTO profile_menu VALUES (779, 'TVA', 'EXT', 1, NULL, 'S', NULL); - - --- --- Data for Name: profile_menu_type; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO profile_menu_type VALUES ('P', 'Impression'); -INSERT INTO profile_menu_type VALUES ('S', 'Extension'); -INSERT INTO profile_menu_type VALUES ('E', 'Menu'); -INSERT INTO profile_menu_type VALUES ('M', 'Module'); - - --- --- Data for Name: profile_user; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO profile_user VALUES ('phpcompta', 1, 1); - - --- --- Data for Name: quant_fin; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: quant_purchase; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: quant_sold; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: stock_goods; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: tmp_pcmn; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO tmp_pcmn VALUES ('794', 'Intervention d''associés (ou du propriétaire) dans la perte', '79', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('1', 'Fonds propres, provisions pour risques et charges à plus d''un an', '0', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('2', 'Frais d''établissement, actifs immobilisés et créances à plus d''un an', '0', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('3', 'Stocks et commandes en cours d''éxécution', '0', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4', 'Créances et dettes à un an au plus', '0', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5', 'Placements de trésorerie et valeurs disponibles', '0', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('6', 'Charges', '0', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('7', 'Produits', '0', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('4000001', 'Client 1', '400', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4000002', 'Client 2', '400', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4000003', 'Client 3', '400', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('6040001', 'Electricité', '604', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6040002', 'Loyer', '604', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('55000002', 'Banque 1', '5500', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('55000003', 'Banque 2', '5500', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4400001', 'Fournisseur 1', '440', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4400002', 'Fournisseur 2', '440', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4400003', 'Fournisseur 4', '440', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('610001', 'Electricité', '61', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('610002', 'Loyer', '61', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('610003', 'Assurance', '61', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('610004', 'Matériel bureau', '61', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('7000002', 'Marchandise A', '700', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('7000001', 'Prestation', '700', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('7000003', 'Déplacement', '700', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('101', 'Capital non appelé', '10', 'PASINV'); -INSERT INTO tmp_pcmn VALUES ('6190', 'TVA récupérable par l''impôt', '61', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6740', 'Dépense non admise', '67', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('9', 'Comptes hors Compta', '0', 'CON'); -INSERT INTO tmp_pcmn VALUES ('100', 'Capital souscrit', '10', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1311', 'Autres réserves indisponibles', '131', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('132', ' Réserves immunisées', '13', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('6711', 'Suppléments d''impôts estimés', '671', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6712', 'Provisions fiscales constituées', '671', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('672', 'Impôts étrangers sur le résultat de l''exercice', '67', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('673', 'Impôts étrangers sur le résultat d''exercice antérieures', '67', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('68', 'Transferts aux réserves immunisées', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('69', 'Affectations et prélévements', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('690', 'Perte reportée de l''exercice précédent', '69', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('691', 'Dotation à la réserve légale', '69', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('692', 'Dotation aux autres réserves', '69', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('693', 'Bénéfice à reporter', '69', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('694', 'Rémunération du capital', '69', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('695', 'Administrateurs ou gérants', '69', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('696', 'Autres allocataires', '69', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('70', 'Chiffre d''affaire', '7', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('700', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('701', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('702', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('703', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('704', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('706', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('707', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('709', 'Remises, ristournes et rabais accordés(-)', '70', 'PROINV'); -INSERT INTO tmp_pcmn VALUES ('71', 'Variations des stocks et commandes en cours d''éxécution', '7', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('712', 'des en-cours de fabrication', '71', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('713', 'des produits finis', '71', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('715', 'des immeubles construits destinés à la vente', '71', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('717', ' des commandes en cours d''éxécution', '71', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('7170', 'Valeur d''acquisition', '717', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('7171', 'Bénéfice pris en compte', '717', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('72', 'Production immobilisée', '7', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('74', 'Autres produits d''exploitation', '7', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('740', 'Subsides d'' exploitation et montants compensatoires', '74', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('741', 'Plus-values sur réalisation courantes d'' immobilisations corporelles', '74', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('742', 'Plus-values sur réalisations de créances commerciales', '74', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('743', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('744', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('745', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('746', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('747', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('748', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('75', 'Produits financiers', '7', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('750', 'Produits sur immobilisations financières', '75', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('751', 'Produits des actifs circulants', '75', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('752', 'Plus-value sur réalisations d''actis circulants', '75', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('753', 'Subsides en capital et intérêts', '75', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('754', 'Différences de change', '75', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('755', 'Ecarts de conversion des devises', '75', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('221', 'Construction', '22', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('756', 'Produits financiers divers', '75', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('757', 'Produits financiers divers', '75', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('758', 'Produits financiers divers', '75', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('759', 'Produits financiers divers', '75', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('76', 'Produits exceptionnels', '7', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('760', 'Reprise d''amortissements et de réductions de valeur', '76', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('7601', 'sur immobilisations corporelles', '760', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('7602', 'sur immobilisations incorporelles', '760', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('761', 'Reprises de réductions de valeur sur immobilisations financières', '76', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('762', 'Reprises de provisions pour risques et charges exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('763', 'Plus-value sur réalisation d''actifs immobilisé', '76', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('764', 'Autres produits exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('765', 'Autres produits exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('766', 'Autres produits exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('767', 'Autres produits exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('768', 'Autres produits exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('769', 'Autres produits exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('77', 'Régularisations d''impôts et reprises de provisions fiscales', '7', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('771', 'impôts belges sur le résultat', '77', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('7710', 'Régularisations d''impôts dus ou versé', '771', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('7711', 'Régularisations d''impôts estimés', '771', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('7712', 'Reprises de provisions fiscales', '771', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('773', 'Impôts étrangers sur le résultats', '77', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('79', 'Affectations et prélévements', '7', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('790', 'Bénéfice reporté de l''exercice précédent', '79', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('791', 'Prélévement sur le capital et les primes d''émission', '79', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('792', 'Prélévement sur les réserves', '79', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('793', 'Perte à reporter', '79', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('6301', 'Dotations aux amortissements sur immobilisations incorporelles', '630', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6302', 'Dotations aux amortissements sur immobilisations corporelles', '630', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6308', 'Dotations aux réductions de valeur sur immobilisations incorporelles', '630', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6309', 'Dotations aux réductions de valeur sur immobilisations corporelles', '630', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('631', 'Réductions de valeur sur stocks', '63', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6310', 'Dotations', '631', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6311', 'Reprises(-)', '631', 'CHAINV'); -INSERT INTO tmp_pcmn VALUES ('632', 'Réductions de valeur sur commande en cours d''éxécution', '63', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6320', 'Dotations', '632', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6321', 'Reprises(-)', '632', 'CHAINV'); -INSERT INTO tmp_pcmn VALUES ('633', 'Réductions de valeurs sur créances commerciales à plus d''un an', '63', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6330', 'Dotations', '633', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6331', 'Reprises(-)', '633', 'CHAINV'); -INSERT INTO tmp_pcmn VALUES ('634', 'Réductions de valeur sur créances commerciales à un an au plus', '63', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6340', 'Dotations', '634', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6341', 'Reprise', '634', 'CHAINV'); -INSERT INTO tmp_pcmn VALUES ('635', 'Provisions pour pensions et obligations similaires', '63', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6350', 'Dotations', '635', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6351', 'Utilisation et reprises', '635', 'CHAINV'); -INSERT INTO tmp_pcmn VALUES ('636', 'Provisions pour grosses réparations et gros entretien', '63', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6360', 'Dotations', '636', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6361', 'Reprises(-)', '636', 'CHAINV'); -INSERT INTO tmp_pcmn VALUES ('637', 'Provisions pour autres risques et charges', '63', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6370', 'Dotations', '637', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6371', 'Reprises(-)', '637', 'CHAINV'); -INSERT INTO tmp_pcmn VALUES ('64', 'Autres charges d''exploitation', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('640', 'Charges fiscales d''exploitation', '64', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('641', 'Moins-values sur réalisations courantes d''immobilisations corporelles', '64', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('642', 'Moins-value sur réalisation de créances commerciales', '64', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('643', 'Charges d''exploitations', '64', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('644', 'Charges d''exploitations', '64', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('645', 'Charges d''exploitations', '64', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('646', 'Charges d''exploitations', '64', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('647', 'Charges d''exploitations', '64', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('648', 'Charges d''exploitations', '64', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('649', 'Charges d''exploitation portées à l''actif au titre de frais de restructuration(-)', '64', 'CHAINV'); -INSERT INTO tmp_pcmn VALUES ('65', 'Charges financières', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('650', 'Charges des dettes', '65', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6500', 'Intérêts, commmissions et frais afférents aux dettes', '650', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6501', 'Amortissements des frais d''émissions d''emrunts et des primes de remboursement', '650', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6502', 'Autres charges des dettes', '650', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6503', 'Intérêts intercalaires portés à l''actif(-)', '650', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('651', 'Réductions de valeur sur actifs circulants', '65', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6510', 'Dotations', '651', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6511', 'Reprises(-)', '651', 'CHAINV'); -INSERT INTO tmp_pcmn VALUES ('652', 'Moins-value sur réalisation d''actifs circulants', '65', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('653', 'Charges d''escompte de créances', '65', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('654', 'Différences de changes', '65', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('655', 'Ecarts de conversion des devises', '65', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('656', 'Charges financières diverses', '65', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('657', 'Charges financières diverses', '65', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('658', 'Charges financières diverses', '65', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('659', 'Charges financières diverses', '65', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('66', 'Charges exceptionnelles', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('660', 'Amortissements et réductions de valeur exceptionnels (dotations)', '66', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6600', 'sur frais d''établissement', '660', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6601', 'sur immobilisations incorporelles', '660', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6602', 'sur immobilisations corporelles', '660', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('661', 'Réductions de valeur sur immobilisations financières (dotations)', '66', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('662', 'Provisions pour risques et charges exceptionnels', '66', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('663', 'Moins-values sur réalisations d''actifs immobilisés', '66', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('664', 'Autres charges exceptionnelles', '66', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('665', 'Autres charges exceptionnelles', '66', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('666', 'Autres charges exceptionnelles', '66', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('667', 'Autres charges exceptionnelles', '66', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('668', 'Autres charges exceptionnelles', '66', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('669', ' Charges exceptionnelles portées à l''actif au titre de frais de restructuration', '66', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('67', 'impôts sur le résultat', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('670', 'Impôts belge sur le résultat de l''exercice', '67', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6700', 'Impôts et précomptes dus ou versés', '670', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6701', 'Excédents de versement d''impôts et de précomptes portés à l''actifs (-)', '670', 'CHAINV'); -INSERT INTO tmp_pcmn VALUES ('6702', 'Charges fiscales estimées', '670', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('671', 'Impôts belges sur le résultats d''exercices antérieures', '67', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6710', 'Suppléments d''impôt dus ou versés', '671', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('50', 'Actions propres', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('51', 'Actions et parts', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('510', 'Valeur d''acquisition', '51', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('511', 'Montant non appelés', '51', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('519', 'Réductions de valeur actées', '51', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('52', 'Titres à revenu fixe', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('520', 'Valeur d''acquisition', '52', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('529', 'Réductions de valeur actées', '52', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('53', 'Dépôts à terme', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('530', 'de plus d''un an', '53', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('531', 'de plus d''un mois et d''un an au plus', '53', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('532', 'd''un mois au plus', '53', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('539', 'Réductions de valeur actées', '53', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('54', 'Valeurs échues à l''encaissement', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('55', 'Etablissement de crédit', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('550', 'Banque 1', '55', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5500', 'Comptes courants', '550', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5501', 'Chèques émis (-)', '550', 'ACTINV'); -INSERT INTO tmp_pcmn VALUES ('5509', 'Réduction de valeur actée', '550', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5510', 'Comptes courants', '551', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5511', 'Chèques émis (-)', '551', 'ACTINV'); -INSERT INTO tmp_pcmn VALUES ('5519', 'Réduction de valeur actée', '551', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5520', 'Comptes courants', '552', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5521', 'Chèques émis (-)', '552', 'ACTINV'); -INSERT INTO tmp_pcmn VALUES ('5529', 'Réduction de valeur actée', '552', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5530', 'Comptes courants', '553', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5531', 'Chèques émis (-)', '553', 'ACTINV'); -INSERT INTO tmp_pcmn VALUES ('5539', 'Réduction de valeur actée', '553', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5540', 'Comptes courants', '554', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5541', 'Chèques émis (-)', '554', 'ACTINV'); -INSERT INTO tmp_pcmn VALUES ('5549', 'Réduction de valeur actée', '554', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5550', 'Comptes courants', '555', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5551', 'Chèques émis (-)', '555', 'ACTINV'); -INSERT INTO tmp_pcmn VALUES ('5559', 'Réduction de valeur actée', '555', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5560', 'Comptes courants', '556', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5561', 'Chèques émis (-)', '556', 'ACTINV'); -INSERT INTO tmp_pcmn VALUES ('5569', 'Réduction de valeur actée', '556', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5570', 'Comptes courants', '557', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5571', 'Chèques émis (-)', '557', 'ACTINV'); -INSERT INTO tmp_pcmn VALUES ('5579', 'Réduction de valeur actée', '557', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5580', 'Comptes courants', '558', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5581', 'Chèques émis (-)', '558', 'ACTINV'); -INSERT INTO tmp_pcmn VALUES ('5589', 'Réduction de valeur actée', '558', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5590', 'Comptes courants', '559', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('5591', 'Chèques émis (-)', '559', 'ACTINV'); -INSERT INTO tmp_pcmn VALUES ('5599', 'Réduction de valeur actée', '559', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('56', 'Office des chèques postaux', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('560', 'Compte courant', '56', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('561', 'Chèques émis', '56', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('578', 'Caisse timbre', '57', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('58', 'Virement interne', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('60', 'Approvisionnement et marchandises', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('600', 'Achats de matières premières', '60', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('601', 'Achats de fournitures', '60', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('602', 'Achats de services, travaux et études', '60', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('603', 'Sous-traitances générales', '60', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('604', 'Achats de marchandises', '60', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('605', 'Achats d''immeubles destinés à la vente', '60', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('608', 'Remises, ristournes et rabais obtenus(-)', '60', 'CHAINV'); -INSERT INTO tmp_pcmn VALUES ('609', 'Variation de stock', '60', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6090', 'de matières premières', '609', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6091', 'de fournitures', '609', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6094', 'de marchandises', '609', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6095', 'immeubles achetés destinés à la vente', '609', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('61', 'Services et biens divers', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('62', 'Rémunérations, charges sociales et pensions', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('620', 'Rémunérations et avantages sociaux directs', '62', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6200', 'Administrateurs ou gérants', '620', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6201', 'Personnel de directions', '620', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6202', 'Employés,620', '6202', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6203', 'Ouvriers', '620', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6204', 'Autres membres du personnel', '620', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('621', 'Cotisations patronales d''assurances sociales', '62', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('622', 'Primes partonales pour assurances extra-légales', '62', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('623', 'Autres frais de personnel', '62', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('624', 'Pensions de retraite et de survie', '62', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6240', 'Administrateurs ou gérants', '624', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6241', 'Personnel', '624', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('63', 'Amortissements, réductions de valeurs et provisions pour risques et charges', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('630', 'Dotations aux amortissements et réduction de valeurs sur immobilisations', '63', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('6300', ' Dotations aux amortissements sur frais d''établissement', '630', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('705', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('414', 'Produits à recevoir', '41', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('416', 'Créances diverses', '41', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4160', 'Comptes de l''exploitant', '416', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('417', 'Créances douteuses', '41', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('418', 'Cautionnements versés en numéraires', '41', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('419', 'Réductions de valeur actées', '41', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('42', 'Dettes à plus dun an échéant dans l''année', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('420', 'Emprunts subordonnés', '42', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4200', 'convertibles', '420', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4201', 'non convertibles', '420', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('421', 'Emprunts subordonnés', '42', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4210', 'convertibles', '420', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4211', 'non convertibles', '420', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('422', ' Dettes de locations financement', '42', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('423', ' Etablissement de crédit', '42', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4230', 'Dettes en comptes', '423', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4231', 'Promesses', '423', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4232', 'Crédits d''acceptation', '423', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('424', 'Autres emprunts', '42', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('425', 'Dettes commerciales', '42', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4250', 'Fournisseurs', '425', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4251', 'Effets à payer', '425', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('426', 'Acomptes reçus sur commandes', '42', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('428', 'Cautionnement reçus en numéraires', '42', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('429', 'Dettes diverses', '42', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('43', 'Dettes financières', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('430', 'Etablissements de crédit - Emprunts à compte à terme fixe', '43', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('431', 'Etablissements de crédit - Promesses', '43', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('432', ' Etablissements de crédit - Crédits d''acceptation', '43', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('433', 'Etablissements de crédit -Dettes en comptes courant', '43', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('439', 'Autres emprunts', '43', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('44', 'Dettes commerciales', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('440', 'Fournisseurs', '44', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('441', 'Effets à payer', '44', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('444', 'Factures à recevoir', '44', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('45', 'Dettes fiscales, salariales et sociales', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('450', 'Dettes fiscales estimées', '45', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4500', 'Impôts belges sur le résultat', '450', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4501', 'Impôts belges sur le résultat', '450', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4502', 'Impôts belges sur le résultat', '450', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4503', 'Impôts belges sur le résultat', '450', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4504', 'Impôts belges sur le résultat', '450', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4505', 'Autres impôts et taxes belges', '450', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4506', 'Autres impôts et taxes belges', '450', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4507', 'Autres impôts et taxes belges', '450', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4508', 'Impôts et taxes étrangers', '450', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('451', 'TVA à payer', '45', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4511', 'TVA à payer 21%', '451', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4512', 'TVA à payer 12%', '451', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4513', 'TVA à payer 6%', '451', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4514', 'TVA à payer 0%', '451', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('452', 'Impôts et taxes à payer', '45', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4520', 'Impôts belges sur le résultat', '452', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4521', 'Impôts belges sur le résultat', '452', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4522', 'Impôts belges sur le résultat', '452', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4523', 'Impôts belges sur le résultat', '452', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4524', 'Impôts belges sur le résultat', '452', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4525', 'Autres impôts et taxes belges', '452', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('55000001', 'Caisse', '5500', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4526', 'Autres impôts et taxes belges', '452', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4527', 'Autres impôts et taxes belges', '452', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4528', 'Impôts et taxes étrangers', '452', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('453', 'Précomptes retenus', '45', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('454', 'Office National de la Sécurité Sociales', '45', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('455', 'Rémunérations', '45', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('456', 'Pécules de vacances', '45', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('459', 'Autres dettes sociales', '45', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('46', 'Acomptes reçus sur commandes', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('47', 'Dettes découlant de l''affectation du résultat', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('470', 'Dividendes et tantièmes d''exercices antérieurs', '47', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('471', 'Dividendes de l''exercice', '47', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('472', 'Tantièmes de l''exercice', '47', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('473', 'Autres allocataires', '47', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('48', 'Dettes diverses', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('480', 'Obligations et coupons échus', '48', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('488', 'Cautionnements reçus en numéraires', '48', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('489', 'Autres dettes diverses', '48', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4890', 'Compte de l''exploitant', '489', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('49', 'Comptes de régularisation', '4', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('490', 'Charges à reporter', '49', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('491', 'Produits acquis', '49', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('492', 'Charges à imputer', '49', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('493', 'Produits à reporter', '49', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('499', 'Comptes d''attentes', '49', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2821', 'Montants non-appelés(-)', '282', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2828', 'Plus-values actées', '282', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2829', 'Réductions de valeurs actées', '282', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('283', 'Créances sur des entreprises avec lesquelles existe un lien de participation', '28', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2830', 'Créance en compte', '283', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2831', 'Effets à recevoir', '283', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('57', 'Caisse', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2832', 'Titre à revenu fixe', '283', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2837', 'Créances douteuses', '283', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2839', 'Réduction de valeurs actées', '283', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('284', 'Autres actions et parts', '28', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2840', 'Valeur d''acquisition', '284', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2841', 'Montants non-appelés(-)', '284', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2848', 'Plus-values actées', '284', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2849', 'Réductions de valeurs actées', '284', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('285', 'Autres créances', '28', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2850', 'Créance en compte', '285', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2851', 'Effets à recevoir', '285', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2852', 'Titre à revenu fixe', '285', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2857', 'Créances douteuses', '285', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2859', 'Réductions de valeurs actées', '285', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('288', 'Cautionnements versés en numéraires', '28', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('29', 'Créances à plus d''un an', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('290', 'Créances commerciales', '29', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2900', 'Clients', '290', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2901', 'Effets à recevoir', '290', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2906', 'Acomptes versés', '290', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2907', 'Créances douteuses', '290', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2909', 'Réductions de valeurs actées', '290', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('291', 'Autres créances', '29', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2910', 'Créances en comptes', '291', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2911', 'Effets à recevoir', '291', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2917', 'Créances douteuses', '291', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2919', 'Réductions de valeurs actées(-)', '291', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('30', 'Approvisionements - Matières premières', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('300', 'Valeur d''acquisition', '30', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('309', 'Réductions de valeur actées', '30', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('31', 'Approvisionnements - fournitures', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('310', 'Valeur d''acquisition', '31', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('319', 'Réductions de valeurs actées(-)', '31', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('32', 'En-cours de fabrication', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('320', 'Valeurs d''acquisition', '32', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('329', 'Réductions de valeur actées', '32', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('33', 'Produits finis', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('330', 'Valeur d''acquisition', '33', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('339', 'Réductions de valeur actées', '33', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('34', 'Marchandises', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('340', 'Valeur d''acquisition', '34', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('349', 'Réductions de valeur actées', '34', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('35', 'Immeubles destinés à la vente', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('350', 'Valeur d''acquisition', '35', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('359', 'Réductions de valeur actées', '35', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('36', 'Acomptes versés sur achats pour stocks', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('360', 'Valeur d''acquisition', '36', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('369', 'Réductions de valeur actées', '36', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('37', 'Commandes en cours éxécution', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('370', 'Valeur d''acquisition', '37', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('371', 'Bénéfice pris en compte ', '37', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('379', 'Réductions de valeur actées', '37', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('40', 'Créances commerciales', '4', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('400', 'Clients', '40', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('401', 'Effets à recevoir', '40', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('404', 'Produits à recevoir', '40', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('406', 'Acomptes versés', '40', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('407', 'Créances douteuses', '40', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('409', 'Réductions de valeur actées', '40', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('41', 'Autres créances', '4', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('410', 'Capital appelé non versé', '41', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('411', 'TVA à récupérer', '41', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4111', 'TVA à récupérer 21%', '411', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4112', 'TVA à récupérer 12%', '411', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4113', 'TVA à récupérer 6% ', '411', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4114', 'TVA à récupérer 0%', '411', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('412', 'Impôts et précomptes à récupérer', '41', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4120', 'Impôt belge sur le résultat', '412', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4121', 'Impôt belge sur le résultat', '412', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4122', 'Impôt belge sur le résultat', '412', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4123', 'Impôt belge sur le résultat', '412', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4124', 'Impôt belge sur le résultat', '412', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4125', 'Autres impôts et taxes belges', '412', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4126', 'Autres impôts et taxes belges', '412', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4127', 'Autres impôts et taxes belges', '412', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4128', 'Impôts et taxes étrangers', '412', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('10', 'Capital ', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('6040003', 'Petit matériel', '604', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('11', 'Prime d''émission ', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('12', 'Plus Value de réévaluation ', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('13', 'Réserve ', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('130', 'Réserve légale', '13', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('131', 'Réserve indisponible', '13', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1310', 'Réserve pour actions propres', '131', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('6040004', 'Assurance', '604', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('133', 'Réserves disponibles', '13', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('14', 'Bénéfice ou perte reportée', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('140', 'Bénéfice reporté', '14', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('141', 'Perte reportée', '14', 'PASINV'); -INSERT INTO tmp_pcmn VALUES ('15', 'Subside en capital', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('16', 'Provisions pour risques et charges', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('160', 'Provisions pour pensions et obligations similaires', '16', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('161', 'Provisions pour charges fiscales', '16', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('749', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn VALUES ('162', 'Provisions pour grosses réparation et gros entretien', '16', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('17', ' Dettes à plus d''un an', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('170', 'Emprunts subordonnés', '17', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1700', 'convertibles', '170', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1701', 'non convertibles', '170', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('171', 'Emprunts subordonnés', '17', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1710', 'convertibles', '170', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1711', 'non convertibles', '170', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('172', ' Dettes de locations financement', '17', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('173', ' Etablissement de crédit', '17', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1730', 'Dettes en comptes', '173', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1731', 'Promesses', '173', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1732', 'Crédits d''acceptation', '173', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('174', 'Autres emprunts', '17', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('175', 'Dettes commerciales', '17', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1750', 'Fournisseurs', '175', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1751', 'Effets à payer', '175', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('176', 'Acomptes reçus sur commandes', '17', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('178', 'Cautionnement reçus en numéraires', '17', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('179', 'Dettes diverses', '17', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('20', 'Frais d''établissement', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('200', 'Frais de constitution et d''augmentation de capital', '20', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('201', ' Frais d''émission d''emprunts et primes de remboursement', '20', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('202', 'Autres frais d''établissement', '20', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('204', 'Frais de restructuration', '20', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('21', 'Immobilisations incorporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('210', 'Frais de recherche et de développement', '21', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('211', 'Concessions, brevet, licence savoir faire, marque et droit similaires', '21', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('212', 'Goodwill', '21', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('213', 'Acomptes versés', '21', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('22', 'Terrains et construction', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('220', 'Terrains', '22', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('222', 'Terrains bâtis', '22', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('223', 'Autres droits réels sur des immeubles', '22', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('23', ' Installations, machines et outillages', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('24', 'Mobilier et Matériel roulant', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('25', 'Immobilisations détenus en location-financement et droits similaires', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('250', 'Terrains', '25', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('251', 'Construction', '25', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('252', 'Terrains bâtis', '25', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('253', 'Mobilier et matériels roulants', '25', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('26', 'Autres immobilisations corporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('27', 'Immobilisations corporelles en cours et acomptes versés', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('28', 'Immobilisations financières', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('280', 'Participation dans des entreprises liées', '28', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2800', 'Valeur d''acquisition', '280', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2801', 'Montants non-appelés(-)', '280', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2808', 'Plus-values actées', '280', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2809', 'Réductions de valeurs actées', '280', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('281', 'Créance sur des entreprises liées', '28', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2810', 'Créance en compte', '281', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2811', 'Effets à recevoir', '281', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2812', 'Titre à reveny fixe', '281', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2817', 'Créances douteuses', '281', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2819', 'Réduction de valeurs actées', '281', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('282', 'Participations dans des entreprises avec lesquelles il existe un lien de participation', '28', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('2820', 'Valeur d''acquisition', '282', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4516', 'Tva Export 0%', '451', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4115', 'Tva Intracomm 0%', '411', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4116', 'Tva Export 0%', '411', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('41141', 'TVA pour l\\''export', '4114', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('41142', 'TVA sur les opérations intracommunautaires', '4114', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('45141', 'TVA pour l\\''export', '451', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('45142', 'TVA sur les opérations intracommunautaires', '4514', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('41143', 'TVA sur les opérations avec des assujettis art 44 Code TVA', '4114', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('45143', 'TVA sur les opérations avec des assujettis art 44 Code TVA', '4514', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('41144', 'TVA sur les opérations avec des cocontractants', '4114', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('45144', 'TVA sur les opérations avec des cocontractants', '4514', 'PAS'); - - --- --- Data for Name: todo_list; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: tva_rate; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO tva_rate VALUES (1, '21%', 0.2100, 'Tva applicable à tout ce qui bien et service divers', '4111,4511', 0); -INSERT INTO tva_rate VALUES (2, '12%', 0.1200, 'Tva ', '4112,4512', 0); -INSERT INTO tva_rate VALUES (3, '6%', 0.0600, 'Tva applicable aux journaux et livres', '4113,4513', 0); -INSERT INTO tva_rate VALUES (4, '0%', 0.0000, 'Aucune tva n''est applicable', '4114,4514', 0); -INSERT INTO tva_rate VALUES (6, 'EXPORT', 0.0000, 'Tva pour les exportations', '41141,45144', 0); -INSERT INTO tva_rate VALUES (5, 'INTRA', 0.0000, 'Tva pour les livraisons / acquisition intra communautaires', '41142,45142', 0); -INSERT INTO tva_rate VALUES (7, 'COC', 0.0000, 'Opérations avec des cocontractants', '41144,45144', 0); -INSERT INTO tva_rate VALUES (8, 'ART44', 0.0000, 'Opérations pour les opérations avec des assujettis à l\\''art 44 Code TVA', '41143,45143', 0); - - --- --- Data for Name: user_local_pref; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO user_local_pref VALUES ('1', 'MINIREPORT', '0'); -INSERT INTO user_local_pref VALUES ('1', 'PERIODE', '79'); - - --- --- Data for Name: user_sec_act; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: user_sec_extension; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO user_sec_extension VALUES (1, 1, 'phpcompta', 'Y'); - - --- --- Data for Name: user_sec_jrn; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: version; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO version VALUES (99); - - --- --- Name: action_detail_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY action_detail - ADD CONSTRAINT action_detail_pkey PRIMARY KEY (ad_id); - - --- --- Name: action_gestion_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY action_gestion - ADD CONSTRAINT action_gestion_pkey PRIMARY KEY (ag_id); - - --- --- Name: action_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY action - ADD CONSTRAINT action_pkey PRIMARY KEY (ac_id); - - --- --- Name: attr_def_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY attr_def - ADD CONSTRAINT attr_def_pkey PRIMARY KEY (ad_id); - - --- --- Name: bilan_b_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY bilan - ADD CONSTRAINT bilan_b_name_key UNIQUE (b_name); - - --- --- Name: bilan_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY bilan - ADD CONSTRAINT bilan_pkey PRIMARY KEY (b_id); - - --- --- Name: centralized_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY centralized - ADD CONSTRAINT centralized_pkey PRIMARY KEY (c_id); - - --- --- Name: del_action_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY del_action - ADD CONSTRAINT del_action_pkey PRIMARY KEY (del_id); - - --- --- Name: dj_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY del_jrn - ADD CONSTRAINT dj_id PRIMARY KEY (dj_id); - - --- --- Name: djx_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY del_jrnx - ADD CONSTRAINT djx_id PRIMARY KEY (djx_id); - - --- --- Name: document_modele_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY document_modele - ADD CONSTRAINT document_modele_pkey PRIMARY KEY (md_id); - - --- --- Name: document_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY document - ADD CONSTRAINT document_pkey PRIMARY KEY (d_id); - - --- --- Name: document_state_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY document_state - ADD CONSTRAINT document_state_pkey PRIMARY KEY (s_id); - - --- --- Name: document_type_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY document_type - ADD CONSTRAINT document_type_pkey PRIMARY KEY (dt_id); - - --- --- Name: fiche_def_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY fiche_def - ADD CONSTRAINT fiche_def_pkey PRIMARY KEY (fd_id); - - --- --- Name: fiche_def_ref_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY fiche_def_ref - ADD CONSTRAINT fiche_def_ref_pkey PRIMARY KEY (frd_id); - - --- --- Name: fiche_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY fiche - ADD CONSTRAINT fiche_pkey PRIMARY KEY (f_id); - - --- --- Name: forecast_cat_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY forecast_cat - ADD CONSTRAINT forecast_cat_pk PRIMARY KEY (fc_id); - - --- --- Name: forecast_item_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY forecast_item - ADD CONSTRAINT forecast_item_pkey PRIMARY KEY (fi_id); - - --- --- Name: forecast_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY forecast - ADD CONSTRAINT forecast_pk PRIMARY KEY (f_id); - - --- --- Name: form_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY form - ADD CONSTRAINT form_pkey PRIMARY KEY (fo_id); - - --- --- Name: formdef_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY formdef - ADD CONSTRAINT formdef_pkey PRIMARY KEY (fr_id); - - --- --- Name: frd_ad_attr_min_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY attr_min - ADD CONSTRAINT frd_ad_attr_min_pk PRIMARY KEY (frd_id, ad_id); - - --- --- Name: historique_analytique_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY operation_analytique - ADD CONSTRAINT historique_analytique_pkey PRIMARY KEY (oa_id); - - --- --- Name: idx_ex_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY extension - ADD CONSTRAINT idx_ex_code UNIQUE (ex_code); - - --- --- Name: info_def_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY info_def - ADD CONSTRAINT info_def_pkey PRIMARY KEY (id_type); - - --- --- Name: jnt_fic_att_value_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY fiche_detail - ADD CONSTRAINT jnt_fic_att_value_pkey PRIMARY KEY (jft_id); - - --- --- Name: jnt_letter_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jnt_letter - ADD CONSTRAINT jnt_letter_pk PRIMARY KEY (jl_id); - - --- --- Name: jrn_action_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_action - ADD CONSTRAINT jrn_action_pkey PRIMARY KEY (ja_id); - - --- --- Name: jrn_def_jrn_def_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_def - ADD CONSTRAINT jrn_def_jrn_def_name_key UNIQUE (jrn_def_name); - - --- --- Name: jrn_def_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_def - ADD CONSTRAINT jrn_def_pkey PRIMARY KEY (jrn_def_id); - - --- --- Name: jrn_info_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_info - ADD CONSTRAINT jrn_info_pkey PRIMARY KEY (ji_id); - - --- --- Name: jrn_periode_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_periode - ADD CONSTRAINT jrn_periode_pk PRIMARY KEY (jrn_def_id, p_id); - - --- --- Name: jrn_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn - ADD CONSTRAINT jrn_pkey PRIMARY KEY (jr_id, jr_def_id); - - --- --- Name: jrn_rapt_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_rapt - ADD CONSTRAINT jrn_rapt_pkey PRIMARY KEY (jra_id); - - --- --- Name: jrn_type_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_type - ADD CONSTRAINT jrn_type_pkey PRIMARY KEY (jrn_type_id); - - --- --- Name: jrnx_note_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_note - ADD CONSTRAINT jrnx_note_pkey PRIMARY KEY (n_id); - - --- --- Name: jrnx_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrnx - ADD CONSTRAINT jrnx_pkey PRIMARY KEY (j_id); - - --- --- Name: letter_cred_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY letter_cred - ADD CONSTRAINT letter_cred_pk PRIMARY KEY (lc_id); - - --- --- Name: letter_deb_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY letter_deb - ADD CONSTRAINT letter_deb_pk PRIMARY KEY (ld_id); - - --- --- Name: menu_ref_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY menu_ref - ADD CONSTRAINT menu_ref_pkey PRIMARY KEY (me_code); - - --- --- Name: mod_payment_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY mod_payment - ADD CONSTRAINT mod_payment_pkey PRIMARY KEY (mp_id); - - --- --- Name: op_def_op_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY op_predef - ADD CONSTRAINT op_def_op_name_key UNIQUE (od_name, jrn_def_id); - - --- --- Name: op_def_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY op_predef - ADD CONSTRAINT op_def_pkey PRIMARY KEY (od_id); - - --- --- Name: op_predef_detail_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY op_predef_detail - ADD CONSTRAINT op_predef_detail_pkey PRIMARY KEY (opd_id); - - --- --- Name: parameter_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY parameter - ADD CONSTRAINT parameter_pkey PRIMARY KEY (pr_id); - - --- --- Name: parm_code_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY parm_code - ADD CONSTRAINT parm_code_pkey PRIMARY KEY (p_code); - - --- --- Name: parm_money_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY parm_money - ADD CONSTRAINT parm_money_pkey PRIMARY KEY (pm_code); - - --- --- Name: parm_periode_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY parm_periode - ADD CONSTRAINT parm_periode_pkey PRIMARY KEY (p_id); - - --- --- Name: parm_poste_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY parm_poste - ADD CONSTRAINT parm_poste_pkey PRIMARY KEY (p_value); - - --- --- Name: pk_extension; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY extension - ADD CONSTRAINT pk_extension PRIMARY KEY (ex_id); - - --- --- Name: pk_ga_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY groupe_analytique - ADD CONSTRAINT pk_ga_id PRIMARY KEY (ga_id); - - --- --- Name: pk_jnt_fic_attr; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jnt_fic_attr - ADD CONSTRAINT pk_jnt_fic_attr PRIMARY KEY (jnt_id); - - --- --- Name: pk_user_local_pref; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY user_local_pref - ADD CONSTRAINT pk_user_local_pref PRIMARY KEY (user_id, parameter_type); - - --- --- Name: plan_analytique_pa_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY plan_analytique - ADD CONSTRAINT plan_analytique_pa_name_key UNIQUE (pa_name); - - --- --- Name: plan_analytique_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY plan_analytique - ADD CONSTRAINT plan_analytique_pkey PRIMARY KEY (pa_id); - - --- --- Name: poste_analytique_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY poste_analytique - ADD CONSTRAINT poste_analytique_pkey PRIMARY KEY (po_id); - - --- --- Name: profile_menu_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY profile_menu - ADD CONSTRAINT profile_menu_pkey PRIMARY KEY (pm_id); - - --- --- Name: profile_menu_type_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY profile_menu_type - ADD CONSTRAINT profile_menu_type_pkey PRIMARY KEY (pm_type); - - --- --- Name: profile_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY profile - ADD CONSTRAINT profile_pkey PRIMARY KEY (p_id); - - --- --- Name: profile_user_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY profile_user - ADD CONSTRAINT profile_user_pkey PRIMARY KEY (pu_id); - - --- --- Name: profile_user_user_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY profile_user - ADD CONSTRAINT profile_user_user_name_key UNIQUE (user_name, p_id); - - --- --- Name: qp_id_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY quant_purchase - ADD CONSTRAINT qp_id_pk PRIMARY KEY (qp_id); - - --- --- Name: qs_id_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY quant_sold - ADD CONSTRAINT qs_id_pk PRIMARY KEY (qs_id); - - --- --- Name: quant_fin_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY quant_fin - ADD CONSTRAINT quant_fin_pk PRIMARY KEY (qf_id); - - --- --- Name: stock_goods_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY stock_goods - ADD CONSTRAINT stock_goods_pkey PRIMARY KEY (sg_id); - - --- --- Name: tmp_pcmn_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY tmp_pcmn - ADD CONSTRAINT tmp_pcmn_pkey PRIMARY KEY (pcm_val); - - --- --- Name: todo_list_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY todo_list - ADD CONSTRAINT todo_list_pkey PRIMARY KEY (tl_id); - - --- --- Name: tva_id_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY tva_rate - ADD CONSTRAINT tva_id_pk PRIMARY KEY (tva_id); - - --- --- Name: user_sec_act_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY user_sec_act - ADD CONSTRAINT user_sec_act_pkey PRIMARY KEY (ua_id); - - --- --- Name: user_sec_extension_ex_id_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY user_sec_extension - ADD CONSTRAINT user_sec_extension_ex_id_key UNIQUE (ex_id, use_login); - - --- --- Name: user_sec_extension_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY user_sec_extension - ADD CONSTRAINT user_sec_extension_pkey PRIMARY KEY (use_id); - - --- --- Name: user_sec_jrn_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY user_sec_jrn - ADD CONSTRAINT user_sec_jrn_pkey PRIMARY KEY (uj_id); - - --- --- Name: ux_internal; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn - ADD CONSTRAINT ux_internal UNIQUE (jr_internal); - - --- --- Name: fd_id_ad_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX fd_id_ad_id_x ON jnt_fic_attr USING btree (fd_id, ad_id); - - --- --- Name: fiche_detail_f_id_ad_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX fiche_detail_f_id_ad_id ON fiche_detail USING btree (f_id, ad_id); - - --- --- Name: fk_stock_goods_f_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fk_stock_goods_f_id ON stock_goods USING btree (f_id); - - --- --- Name: fk_stock_goods_j_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fk_stock_goods_j_id ON stock_goods USING btree (j_id); - - --- --- Name: fki_f_end_date; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fki_f_end_date ON forecast USING btree (f_end_date); - - --- --- Name: fki_f_start_date; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fki_f_start_date ON forecast USING btree (f_start_date); - - --- --- Name: fki_jrnx_f_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fki_jrnx_f_id ON jrnx USING btree (f_id); - - --- --- Name: fki_profile_menu_me_code; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fki_profile_menu_me_code ON profile_menu USING btree (me_code); - - --- --- Name: fki_profile_menu_profile; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fki_profile_menu_profile ON profile_menu USING btree (p_id); - - --- --- Name: fki_profile_menu_type_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fki_profile_menu_type_fkey ON profile_menu USING btree (p_type_display); - - --- --- Name: idx_qs_internal; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX idx_qs_internal ON quant_sold USING btree (qs_internal); - - --- --- Name: jnt_fic_att_value_fd_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX jnt_fic_att_value_fd_id_idx ON fiche_detail USING btree (f_id); - - --- --- Name: jnt_fic_attr_fd_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX jnt_fic_attr_fd_id_idx ON jnt_fic_attr USING btree (fd_id); - - --- --- Name: k_ag_ref; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX k_ag_ref ON action_gestion USING btree (ag_ref); - - --- --- Name: qcode_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX qcode_idx ON fiche_detail USING btree (ad_value) WHERE (ad_id = 23); - - --- --- Name: qf_jr_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX qf_jr_id ON quant_fin USING btree (jr_id); - - --- --- Name: qp_j_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX qp_j_id ON quant_purchase USING btree (j_id); - - --- --- Name: qs_j_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX qs_j_id ON quant_sold USING btree (j_id); - - --- --- Name: uj_login_uj_jrn_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX uj_login_uj_jrn_id ON user_sec_jrn USING btree (uj_login, uj_jrn_id); - - --- --- Name: ux_po_name; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX ux_po_name ON poste_analytique USING btree (po_name); - - --- --- Name: x_jrn_jr_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX x_jrn_jr_id ON jrn USING btree (jr_id); - - --- --- Name: x_mt; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX x_mt ON jrn USING btree (jr_mt); - - --- --- Name: x_periode; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX x_periode ON parm_periode USING btree (p_start, p_end); - - --- --- Name: x_poste; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX x_poste ON jrnx USING btree (j_poste); - - --- --- Name: action_gestion_t_insert_update; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER action_gestion_t_insert_update - BEFORE INSERT OR UPDATE ON action_gestion - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.action_gestion_ins_upd(); - - --- --- Name: TRIGGER action_gestion_t_insert_update ON action_gestion; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TRIGGER action_gestion_t_insert_update ON action_gestion IS 'Truncate the column ag_title to 70 char'; - - --- --- Name: document_modele_validate; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER document_modele_validate - BEFORE INSERT OR UPDATE ON document_modele - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.t_document_modele_validate(); - - --- --- Name: document_validate; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER document_validate - BEFORE INSERT OR UPDATE ON document - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.t_document_validate(); - - --- --- Name: fiche_def_ins_upd; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER fiche_def_ins_upd - BEFORE INSERT OR UPDATE ON fiche_def - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.fiche_def_ins_upd(); - - --- --- Name: info_def_ins_upd_t; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER info_def_ins_upd_t - BEFORE INSERT OR UPDATE ON info_def - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.info_def_ins_upd(); - - --- --- Name: quant_sold_ins_upd_tr; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER quant_sold_ins_upd_tr - AFTER INSERT OR UPDATE ON quant_purchase - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.quant_purchase_ins_upd(); - - --- --- Name: quant_sold_ins_upd_tr; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER quant_sold_ins_upd_tr - AFTER INSERT OR UPDATE ON quant_sold - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.quant_sold_ins_upd(); - - --- --- Name: remove_action_gestion; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER remove_action_gestion - AFTER DELETE ON fiche - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.card_after_delete(); - - --- --- Name: t_check_balance; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_check_balance - AFTER INSERT OR UPDATE ON jrn - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.proc_check_balance(); - - --- --- Name: t_check_jrn; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_check_jrn - BEFORE INSERT OR DELETE OR UPDATE ON jrn - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrn_check_periode(); - - --- --- Name: t_group_analytic_del; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_group_analytic_del - BEFORE DELETE ON groupe_analytique - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.group_analytique_del(); - - --- --- Name: t_group_analytic_ins_upd; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_group_analytic_ins_upd - BEFORE INSERT OR UPDATE ON groupe_analytique - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.group_analytic_ins_upd(); - - --- --- Name: t_jnt_fic_attr_ins; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jnt_fic_attr_ins - AFTER INSERT ON jnt_fic_attr - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jnt_fic_attr_ins(); - - --- --- Name: t_jrn_def_add_periode; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jrn_def_add_periode - AFTER INSERT ON jrn_def - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrn_def_add(); - - --- --- Name: t_jrn_def_delete; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jrn_def_delete - BEFORE DELETE ON jrn_def - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrn_def_delete(); - - --- --- Name: t_jrn_del; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jrn_del - BEFORE DELETE ON jrn - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrn_del(); - - --- --- Name: t_jrnx_del; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jrnx_del - BEFORE DELETE ON jrnx - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrnx_del(); - - --- --- Name: t_jrnx_ins; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jrnx_ins - BEFORE INSERT ON jrnx - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrnx_ins(); - - --- --- Name: TRIGGER t_jrnx_ins ON jrnx; Type: COMMENT; Schema: public; Owner: - --- - -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'; - - --- --- Name: t_jrnx_upd; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jrnx_upd - BEFORE UPDATE ON jrnx - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrnx_ins(); - - --- --- Name: t_letter_del; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_letter_del - AFTER DELETE ON jrnx - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrnx_letter_del(); - - --- --- Name: TRIGGER t_letter_del ON jrnx; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TRIGGER t_letter_del ON jrnx IS 'Delete the lettering for this row'; - - --- --- Name: t_plan_analytique_ins_upd; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_plan_analytique_ins_upd - BEFORE INSERT OR UPDATE ON plan_analytique - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.plan_analytic_ins_upd(); - - --- --- Name: t_poste_analytique_ins_upd; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_poste_analytique_ins_upd - BEFORE INSERT OR UPDATE ON poste_analytique - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.poste_analytique_ins_upd(); - - --- --- Name: t_tmp_pcm_alphanum_ins_upd; Type: TRIGGER; Schema: public; Owner: - --- - -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(); - - --- --- Name: t_tmp_pcmn_ins; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_tmp_pcmn_ins - BEFORE INSERT ON tmp_pcmn - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.tmp_pcmn_ins(); - - --- --- Name: trg_extension_ins_upd; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER trg_extension_ins_upd - BEFORE INSERT OR UPDATE ON extension - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.extension_ins_upd(); - - --- --- Name: trigger_document_type_i; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER trigger_document_type_i - AFTER INSERT ON document_type - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.t_document_type_insert(); - - --- --- Name: trigger_jrn_def_sequence_i; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER trigger_jrn_def_sequence_i - AFTER INSERT ON jrn_def - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.t_jrn_def_sequence(); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY centralized - ADD CONSTRAINT "$1" FOREIGN KEY (c_jrn_def) REFERENCES jrn_def(jrn_def_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY user_sec_act - ADD CONSTRAINT "$1" FOREIGN KEY (ua_act_id) REFERENCES action(ac_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY fiche_def - ADD CONSTRAINT "$1" FOREIGN KEY (frd_id) REFERENCES fiche_def_ref(frd_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY attr_min - ADD CONSTRAINT "$1" FOREIGN KEY (frd_id) REFERENCES fiche_def_ref(frd_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY fiche - ADD CONSTRAINT "$1" FOREIGN KEY (fd_id) REFERENCES fiche_def(fd_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY fiche_detail - ADD CONSTRAINT "$1" FOREIGN KEY (f_id) REFERENCES fiche(f_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jnt_fic_attr - ADD CONSTRAINT "$1" FOREIGN KEY (fd_id) REFERENCES fiche_def(fd_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrn - ADD CONSTRAINT "$1" FOREIGN KEY (jr_def_id) REFERENCES jrn_def(jrn_def_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrn_action - ADD CONSTRAINT "$1" FOREIGN KEY (ja_jrn_type) REFERENCES jrn_type(jrn_type_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrn_def - ADD CONSTRAINT "$1" FOREIGN KEY (jrn_def_type) REFERENCES jrn_type(jrn_type_id); - - --- --- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrnx - ADD CONSTRAINT "$2" FOREIGN KEY (j_jrn_def) REFERENCES jrn_def(jrn_def_id); - - --- --- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY attr_min - ADD CONSTRAINT "$2" FOREIGN KEY (ad_id) REFERENCES attr_def(ad_id); - - --- --- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY fiche_detail - ADD CONSTRAINT "$2" FOREIGN KEY (ad_id) REFERENCES attr_def(ad_id); - - --- --- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jnt_fic_attr - ADD CONSTRAINT "$2" FOREIGN KEY (ad_id) REFERENCES attr_def(ad_id); - - --- --- Name: action_detail_ag_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: card; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY forecast_item - ADD CONSTRAINT card FOREIGN KEY (fi_card) REFERENCES fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: fk_card; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY quant_fin - ADD CONSTRAINT fk_card FOREIGN KEY (qf_bank) REFERENCES fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: fk_card_other; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY quant_fin - ADD CONSTRAINT fk_card_other FOREIGN KEY (qf_other) REFERENCES fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: fk_forecast; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY forecast_item - ADD CONSTRAINT fk_forecast FOREIGN KEY (fc_id) REFERENCES forecast_cat(fc_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: fk_info_def; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: fk_jrn; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrn_info - ADD CONSTRAINT fk_jrn FOREIGN KEY (jr_id) REFERENCES jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: fk_jrn; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY quant_fin - ADD CONSTRAINT fk_jrn FOREIGN KEY (jr_id) REFERENCES jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: fk_pa_id; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY groupe_analytique - ADD CONSTRAINT fk_pa_id FOREIGN KEY (pa_id) REFERENCES plan_analytique(pa_id) ON DELETE CASCADE; - - --- --- Name: fk_pcmn_val; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrnx - ADD CONSTRAINT fk_pcmn_val FOREIGN KEY (j_poste) REFERENCES tmp_pcmn(pcm_val); - - --- --- Name: fk_pcmn_val; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY centralized - ADD CONSTRAINT fk_pcmn_val FOREIGN KEY (c_poste) REFERENCES tmp_pcmn(pcm_val); - - --- --- Name: fk_stock_good_f_id; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: forecast_child; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY forecast_cat - ADD CONSTRAINT forecast_child FOREIGN KEY (f_id) REFERENCES forecast(f_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: forecast_f_end_date_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: forecast_f_start_date_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: formdef_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY form - ADD CONSTRAINT formdef_fk FOREIGN KEY (fo_fr_id) REFERENCES formdef(fr_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: jnt_cred_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jnt_deb_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jrn_def_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jrn_per_jrn_def_id; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jrn_periode_p_id; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jrn_rapt_jr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jrn_rapt_jra_concerned_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jrnx_f_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrnx - ADD CONSTRAINT jrnx_f_id_fkey FOREIGN KEY (f_id) REFERENCES fiche(f_id) ON UPDATE CASCADE; - - --- --- Name: jrnx_note_j_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: letter_cred_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY letter_cred - ADD CONSTRAINT letter_cred_fk FOREIGN KEY (j_id) REFERENCES jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: letter_deb_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY letter_deb - ADD CONSTRAINT letter_deb_fk FOREIGN KEY (j_id) REFERENCES jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: md_type; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY document_modele - ADD CONSTRAINT md_type FOREIGN KEY (md_type) REFERENCES document_type(dt_id); - - --- --- Name: mod_payment_jrn_def_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: mod_payment_mp_fd_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY mod_payment - ADD CONSTRAINT mod_payment_mp_fd_id_fkey FOREIGN KEY (mp_fd_id) REFERENCES fiche_def(fd_id); - - --- --- Name: mod_payment_mp_jrn_def_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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); - - --- --- Name: operation_analytique_j_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: operation_analytique_po_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: poste_analytique_pa_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: profile_menu_me_code_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: profile_menu_p_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: profile_menu_type_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY profile_menu - ADD CONSTRAINT profile_menu_type_fkey FOREIGN KEY (p_type_display) REFERENCES profile_menu_type(pm_type); - - --- --- Name: profile_user_p_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: qp_vat_code_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY quant_purchase - ADD CONSTRAINT qp_vat_code_fk FOREIGN KEY (qp_vat_code) REFERENCES tva_rate(tva_id); - - --- --- Name: qs_vat_code_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY quant_sold - ADD CONSTRAINT qs_vat_code_fk FOREIGN KEY (qs_vat_code) REFERENCES tva_rate(tva_id); - - --- --- Name: quant_purchase_j_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: quant_purchase_qp_internal_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: quant_sold_j_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: quant_sold_qs_internal_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: stock_goods_j_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: uj_priv_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- PostgreSQL database dump complete --- - -commit; diff --git a/sources/contrib/mono-dossier/mono-france.sql b/sources/contrib/mono-dossier/mono-france.sql deleted file mode 100644 index a359f64..0000000 --- a/sources/contrib/mono-dossier/mono-france.sql +++ /dev/null @@ -1,8976 +0,0 @@ --- --- PostgreSQL database dump --- - -SET statement_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = off; -SET check_function_bodies = false; -SET client_min_messages = warning; -SET escape_string_warning = off; - --- --- Name: comptaproc; Type: SCHEMA; Schema: -; Owner: - --- - -CREATE SCHEMA comptaproc; - - --- --- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: - --- - -CREATE PROCEDURAL LANGUAGE plpgsql; - - -SET search_path = public, pg_catalog; - --- --- Name: account_type; Type: DOMAIN; Schema: public; Owner: - --- - -CREATE DOMAIN account_type AS character varying(40); - - --- --- Name: anc_table_account_type; Type: TYPE; Schema: public; Owner: - --- - -CREATE TYPE anc_table_account_type AS ( - po_id bigint, - pa_id bigint, - po_name text, - po_description text, - sum_amount numeric(25,4), - card_account text, - name text -); - - --- --- Name: anc_table_card_type; Type: TYPE; Schema: public; Owner: - --- - -CREATE TYPE anc_table_card_type AS ( - po_id bigint, - pa_id bigint, - po_name text, - po_description text, - sum_amount numeric(25,4), - f_id bigint, - card_account text, - name text -); - - --- --- Name: menu_tree; Type: TYPE; Schema: public; Owner: - --- - -CREATE TYPE menu_tree AS ( - code text, - description text -); - - -SET search_path = comptaproc, pg_catalog; - --- --- Name: account_add(public.account_type, character varying); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION 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; -end ; -$$; - - --- --- Name: account_alphanum(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION account_alphanum() RETURNS boolean - LANGUAGE plpgsql - AS $$ -declare - l_auto bool; -begin - l_auto := true; - select pr_value into l_auto from parameter where pr_id='MY_ALPHANUM'; - if l_auto = 'N' or l_auto is null then - l_auto:=false; - end if; - return l_auto; -end; -$$; - - --- --- Name: account_auto(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION account_auto(p_fd_id integer) RETURNS boolean - LANGUAGE plpgsql - AS $$ -declare - l_auto bool; -begin - - select fd_create_account into l_auto from fiche_def where fd_id=p_fd_id; - if l_auto is null then - l_auto:=false; - end if; - return l_auto; -end; -$$; - - --- --- Name: account_compute(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION 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 account_type; - 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 - 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 - -- 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 := class_base||sName; - end if; - return sResult; -end; -$$; - - --- --- Name: account_insert(integer, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION 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; -begin - - 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'; - select count(*) into nCount from tmp_pcmn where pcm_val=p_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,p_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(p_account::account_type); - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::account_type,sName,nParent); - perform attribut_insert(p_f_id,5,p_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 '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); - - 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; - -return 0; -end; -$$; - - --- --- Name: account_parent(public.account_type); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION account_parent(p_account public.account_type) RETURNS public.account_type - LANGUAGE plpgsql - AS $$ -declare - sSubParent tmp_pcmn.pcm_val_parent%type; - sResult tmp_pcmn.pcm_val_parent%type; - nCount integer; -begin - if p_account is NULL then - return NULL; - end if; - sSubParent:=p_account; - while true loop - select count(*) into nCount - from tmp_pcmn - where - pcm_val = sSubParent; - if nCount != 0 then - sResult:= sSubParent; - exit; - end if; - sSubParent:= substr(sSubParent,1,length(sSubParent)-1); - if length(sSubParent) <= 0 then - raise exception 'Impossible de trouver le compte parent pour %',p_account; - end if; - raise notice 'sSubParent % % ',sSubParent,length(sSubParent); - end loop; - raise notice 'account_parent : Parent is %',sSubParent; - return sSubParent; -end; -$$; - - --- --- Name: account_update(integer, public.account_type); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION account_update(p_f_id integer, p_account public.account_type) RETURNS integer - LANGUAGE plpgsql - AS $$ -declare - nMax fiche.f_id%type; - nCount integer; - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - first text; - second text; -begin - - if length(trim(p_account)) != 0 then - -- 2 accounts in card separated by comma - if position (',' in p_account) = 0 then - 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; - 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 - - end if; - else - -- account is null - update fiche_detail set ad_value=null where f_id=p_f_id and ad_id=5 ; - end if; - - update fiche_detail set ad_value=p_account where f_id=p_f_id and ad_id=5 ; - -return 0; -end; -$$; - - --- --- Name: action_gestion_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION action_gestion_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -begin -NEW.ag_title := substr(trim(NEW.ag_title),1,70); -NEW.ag_hour := substr(trim(NEW.ag_hour),1,5); -return NEW; -end; -$$; - - --- --- Name: action_get_tree(bigint); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION action_get_tree(p_id bigint) RETURNS SETOF bigint - LANGUAGE plpgsql - AS $$ - -declare - e bigint; - i bigint; -begin - for e in select ag_id from action_gestion where ag_ref_ag_id=p_id - loop - for i in select action_get_tree from comptaproc.action_get_tree(e) - loop - raise notice ' == i %', i; - return next i; - end loop; - raise notice ' = e %', e; - return next e; - end loop; - return; - -end; -$$; - - --- --- Name: attribut_insert(integer, integer, character varying); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION attribut_insert(p_f_id integer, p_ad_id integer, p_value character varying) RETURNS void - LANGUAGE plpgsql - AS $$ -begin - insert into fiche_detail (f_id,ad_id, ad_value) values (p_f_id,p_ad_id,p_value); - -return; -end; -$$; - - --- --- Name: attribute_correct_order(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION attribute_correct_order() RETURNS void - LANGUAGE plpgsql - AS $$ -declare - crs_correct cursor for select A.jnt_id,A.jnt_order from jnt_fic_attr as A join jnt_fic_attr as B using (fd_id) where A.jnt_order=B.jnt_order and A.jnt_id > B.jnt_id; - rec record; -begin - open crs_correct; - loop - fetch crs_correct into rec; - if NOT FOUND then - close crs_correct; - return; - end if; - update jnt_fic_attr set jnt_order=jnt_order + 1 where jnt_id = rec.jnt_id; - end loop; - close crs_correct; - perform attribute_correct_order (); -end; -$$; - - --- --- Name: card_after_delete(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION card_after_delete() RETURNS trigger - LANGUAGE plpgsql - AS $$ - -begin - - delete from action_gestion where f_id_dest = OLD.f_id; - return OLD; - -end; -$$; - - --- --- Name: card_class_base(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION card_class_base(p_f_id integer) RETURNS text - LANGUAGE plpgsql - AS $$ -declare - n_poste fiche_def.fd_class_base%type; -begin - - select fd_class_base into n_poste from fiche_def join fiche using -(fd_id) - where f_id=p_f_id; - if not FOUND then - raise exception 'Invalid fiche card_class_base(%)',p_f_id; - end if; -return n_poste; -end; -$$; - - --- --- Name: check_balance(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION check_balance(p_grpt integer) RETURNS numeric - LANGUAGE plpgsql - AS $$ -declare - amount_jrnx_debit numeric; - amount_jrnx_credit numeric; - amount_jrn numeric; -begin - select sum (j_montant) into amount_jrnx_credit - from jrnx - where - j_grpt=p_grpt - and j_debit=false; - - select sum (j_montant) into amount_jrnx_debit - from jrnx - where - j_grpt=p_grpt - and j_debit=true; - - select jr_montant into amount_jrn - from jrn - where - jr_grpt_id=p_grpt; - - if ( amount_jrnx_debit != amount_jrnx_credit ) - then - return abs(amount_jrnx_debit-amount_jrnx_credit); - end if; - if ( amount_jrn != amount_jrnx_credit) - then - return -1*abs(amount_jrn - amount_jrnx_credit); - end if; - return 0; -end; -$$; - - --- --- Name: correct_sequence(text, text, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION correct_sequence(p_sequence text, p_col text, p_table text) RETURNS integer - LANGUAGE plpgsql - AS $$ -declare -last_sequence int8; -max_sequence int8; -n integer; -begin - select count(*) into n from pg_class where relkind='S' and relname=lower(p_sequence); - if n = 0 then - raise exception ' Unknow sequence % ',p_sequence; - end if; - select count(*) into n from pg_class where relkind='r' and relname=lower(p_table); - if n = 0 then - raise exception ' Unknow table % ',p_table; - end if; - - execute 'select last_value from '||p_sequence into last_sequence; - raise notice 'Last value of the sequence is %', last_sequence; - - execute 'select max('||p_col||') from '||p_table into max_sequence; - if max_sequence is null then - max_sequence := 0; - end if; - raise notice 'Max value of the sequence is %', max_sequence; - max_sequence:= max_sequence +1; - execute 'alter sequence '||p_sequence||' restart with '||max_sequence; -return 0; - -end; -$$; - - --- --- Name: FUNCTION correct_sequence(p_sequence text, p_col text, p_table text); Type: COMMENT; Schema: comptaproc; Owner: - --- - -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'; - - --- --- Name: create_missing_sequence(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION create_missing_sequence() RETURNS integer - LANGUAGE plpgsql - AS $$ -declare -p_sequence text; -nSeq integer; -c1 cursor for select jrn_def_id from jrn_def; -begin - open c1; - loop - fetch c1 into nSeq; - if not FOUND THEN - close c1; - return 0; - end if; - p_sequence:='s_jrn_pj'||nSeq::text; - execute 'create sequence '||p_sequence; - end loop; -close c1; -return 0; - -end; -$$; - - --- --- Name: drop_index(character varying); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION drop_index(p_constraint character varying) RETURNS void - LANGUAGE plpgsql - AS $$ -declare - nCount integer; -begin - select count(*) into nCount from pg_indexes where indexname=p_constraint; - if nCount = 1 then - execute 'drop index '||p_constraint ; - end if; -end; -$$; - - --- --- Name: drop_it(character varying); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION drop_it(p_constraint character varying) RETURNS void - LANGUAGE plpgsql - AS $$ -declare - nCount integer; -begin - select count(*) into nCount from pg_constraint where conname=p_constraint; - if nCount = 1 then - execute 'alter table parm_periode drop constraint '||p_constraint ; - end if; -end; -$$; - - --- --- Name: extension_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION extension_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - sCode text; - sFile text; -begin -sCode:=trim(upper(NEW.ex_code)); -sCode:=replace(sCode,' ','_'); -sCode:=substr(sCode,1,15); -sCode=upper(sCode); -NEW.ex_code:=sCode; -sFile:=NEW.ex_file; -sFile:=replace(sFile,';','_'); -sFile:=replace(sFile,'<','_'); -sFile:=replace(sFile,'>','_'); -sFile:=replace(sFile,'..',''); -sFile:=replace(sFile,'&',''); -sFile:=replace(sFile,'|',''); - - - -return NEW; - -end; - -$$; - - --- --- Name: fiche_account_parent(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION fiche_account_parent(p_f_id integer) RETURNS public.account_type - LANGUAGE plpgsql - AS $$ -declare -ret tmp_pcmn.pcm_val%TYPE; -begin - select fd_class_base into ret from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if not FOUND then - raise exception '% N''existe pas',p_f_id; - end if; - return ret; -end; -$$; - - --- --- Name: fiche_attribut_synchro(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION fiche_attribut_synchro(p_fd_id integer) RETURNS void - LANGUAGE plpgsql - AS $$ -declare - -- this sql gives the f_id and the missing attribute (ad_id) - list_missing cursor for select f_id,fd_id,ad_id,jnt_order from jnt_fic_attr join fiche as A using (fd_id) where fd_id=p_fd_id and ad_id not in (select ad_id from fiche join fiche_detail using (f_id) where fd_id=jnt_fic_attr.fd_id and A.f_id=f_id); - rec record; -begin - open list_missing; - loop - - fetch list_missing into rec; - IF NOT FOUND then - exit; - end if; - - -- now we insert into attr_value - insert into fiche_detail (f_id,ad_id,ad_value) values (rec.f_id,rec.ad_id,null); - end loop; - close list_missing; -end; -$$; - - --- --- Name: fiche_def_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION fiche_def_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -begin - -if position (',' in NEW.fd_class_base) != 0 then - NEW.fd_create_account='f'; - -end if; -return NEW; -end;$$; - - --- --- Name: fill_quant_fin(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION fill_quant_fin() RETURNS void - LANGUAGE plpgsql - AS $$ -declare - sBank text; - sCassa text; - sCustomer text; - sSupplier text; - rec record; - recBank record; - recSupp_Cust record; - nCount integer; - nAmount numeric; - nBank integer; - nOther integer; - nSupp_Cust integer; -begin - select p_value into sBank from parm_code where p_code='BANQUE'; - select p_value into sCassa from parm_code where p_code='CAISSE'; - select p_value into sSupplier from parm_code where p_code='SUPPLIER'; - select p_value into sCustomer from parm_code where p_code='CUSTOMER'; - - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') - and jr_id not in (select jr_id from quant_fin) - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nBank := 0; nOther:=0; - for recBank in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recBank.j_poste like sBank||'%' then - -- retrieve f_id for bank - select f_id into nBank from vw_poste_qcode where j_qcode=recBank.j_qcode; - if recBank.j_debit = false then - nAmount=recBank.j_montant*(-1); - else - nAmount=recBank.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recBank.j_qcode; - end if; - end loop; - if nBank != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nBank,nOther,nAmount); - end if; - end loop; - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') and jr_id not in (select jr_id from quant_fin) - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nBank := 0; nOther:=0; - for recBank in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recBank.j_poste like sCassa||'%' then - -- retrieve f_id for bank - select f_id into nBank from vw_poste_qcode where j_qcode=recBank.j_qcode; - if recBank.j_debit = false then - nAmount=recBank.j_montant*(-1); - else - nAmount=recBank.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recBank.j_qcode; - end if; - end loop; - if nBank != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nBank,nOther,nAmount); - end if; - end loop; - - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') and jr_id not in (select jr_id from quant_fin) - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nSupp_Cust := 0; nOther:=0; - for recSupp_Cust in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recSupp_Cust.j_poste like sSupplier||'%' then - -- retrieve f_id for bank - select f_id into nSupp_Cust from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - if recSupp_Cust.j_debit = true then - nAmount=recSupp_Cust.j_montant*(-1); - else - nAmount=recSupp_Cust.j_montant; - end if; - else if recSupp_Cust.j_poste like sCustomer||'%' then - select f_id into nSupp_Cust from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - if recSupp_Cust.j_debit = false then - nAmount=recSupp_Cust.j_montant*(-1); - else - nAmount=recSupp_Cust.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - - end if; - end if; - end loop; - if nSupp_Cust != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nOther,nSupp_Cust,nAmount); - end if; - end loop; - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') and jr_id not in (select jr_id from quant_fin) - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nSupp_Cust := 0; nOther:=0; - for recSupp_Cust in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recSupp_Cust.j_poste like '441%' then - -- retrieve f_id for bank - select f_id into nSupp_Cust from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - if recSupp_Cust.j_debit = false then - nAmount=recSupp_Cust.j_montant*(-1); - else - nAmount=recSupp_Cust.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - - - end if; - end loop; - if nSupp_Cust != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nOther,nSupp_Cust,nAmount); - end if; - end loop; - return; -end; -$$; - - --- --- Name: find_pcm_type(public.account_type); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION find_pcm_type(pp_value public.account_type) RETURNS text - LANGUAGE plpgsql - AS $$ -declare - str_type parm_poste.p_type%TYPE; - str_value parm_poste.p_type%TYPE; - nLength integer; -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 - return str_type; - end if; - nLength:=nLength-1; - str_value:=substring(str_value::text from 1 for nLength)::account_type; - end loop; -return 'CON'; -end; -$$; - - --- --- Name: find_periode(text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION find_periode(p_date text) RETURNS integer - LANGUAGE plpgsql - AS $$ - -declare n_p_id int4; -begin - -select p_id into n_p_id - from parm_periode - where - p_start <= to_date(p_date,'DD.MM.YYYY') - and - p_end >= to_date(p_date,'DD.MM.YYYY'); - -if NOT FOUND then - return -1; -end if; - -return n_p_id; - -end;$$; - - --- --- Name: format_account(public.account_type); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION format_account(p_account public.account_type) RETURNS public.account_type - LANGUAGE plpgsql - AS $_$ - -declare - -sResult account_type; - -begin -sResult := lower(p_account); - -sResult := translate(sResult,'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc'); -sResult := translate(sResult,' $€µ£%.+-/\!(){}(),;_&|"#''^<>*',''); - -return upper(sResult); - -end; -$_$; - - --- --- Name: FUNCTION format_account(p_account public.account_type); Type: COMMENT; Schema: comptaproc; Owner: - --- - -COMMENT ON FUNCTION format_account(p_account public.account_type) IS 'format the accounting : -- upper case -- remove space and special char. -'; - - --- --- Name: get_letter_jnt(bigint); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION get_letter_jnt(a bigint) RETURNS bigint - LANGUAGE plpgsql - AS $$ -declare - nResult bigint; -begin - select jl_id into nResult from jnt_letter join letter_deb using (jl_id) where j_id = a; - if NOT FOUND then - select jl_id into nResult from jnt_letter join letter_cred using (jl_id) where j_id = a; - if NOT found then - return null; - end if; - end if; -return nResult; -end; -$$; - - --- --- Name: get_menu_tree(text, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION get_menu_tree(p_code text, login text) RETURNS SETOF public.menu_tree - LANGUAGE plpgsql - AS $$ -declare - i menu_tree; - e menu_tree; - a text; - x v_all_menu%ROWTYPE; -begin - for x in select * from v_all_menu where me_code_dep=p_code::text and user_name=login::text - loop - if x.me_code_dep is not null then - i.code := x.me_code_dep||'/'||x.me_code; - else - i.code := x.me_code; - end if; - - i.description := x.me_description; - - return next i; - - for e in select * from get_menu_tree(x.me_code,login) - loop - e.code:=x.me_code_dep||'/'||e.code; - return next e; - end loop; - - end loop; - return; -end; -$$; - - --- --- Name: get_pcm_tree(public.account_type); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION get_pcm_tree(source public.account_type) RETURNS SETOF public.account_type - LANGUAGE plpgsql - AS $$ -declare - i account_type; - e account_type; -begin - for i in select pcm_val from tmp_pcmn where pcm_val_parent=source - loop - return next i; - for e in select get_pcm_tree from get_pcm_tree(i) - loop - return next e; - end loop; - - end loop; - return; -end; -$$; - - --- --- Name: get_profile_menu(text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION get_profile_menu(login text) RETURNS SETOF public.menu_tree - LANGUAGE plpgsql - AS $$ -declare - a menu_tree; - e menu_tree; -begin -for a in select me_code,me_description from v_all_menu where user_name=login - and me_code_dep is null and me_type <> 'PR' and me_type <>'SP' -loop - return next a; - - for e in select * from get_menu_tree(a.code,login) - loop - return next e; - end loop; - - end loop; -return; -end; -$$; - - --- --- Name: group_analytic_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION group_analytic_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -name text; -begin -name:=upper(NEW.ga_id); -name:=trim(name); -name:=replace(name,' ',''); -NEW.ga_id:=name; -return NEW; -end;$$; - - --- --- Name: group_analytique_del(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION group_analytique_del() RETURNS trigger - LANGUAGE plpgsql - AS $$ -begin -update poste_analytique set ga_id=null -where ga_id=OLD.ga_id; -return OLD; -end;$$; - - --- --- Name: html_quote(text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION html_quote(p_string text) RETURNS text - LANGUAGE plpgsql - AS $$ -declare - r text; -begin - r:=p_string; - r:=replace(r,'<','<'); - r:=replace(r,'>','>'); - r:=replace(r,'''','"'); - return r; -end;$$; - - --- --- Name: FUNCTION html_quote(p_string text); Type: COMMENT; Schema: comptaproc; Owner: - --- - -COMMENT ON FUNCTION html_quote(p_string text) IS 'remove harmfull HTML char'; - - --- --- Name: info_def_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION info_def_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - row_info_def info_def%ROWTYPE; - str_type text; -begin -row_info_def:=NEW; -str_type:=upper(trim(NEW.id_type)); -str_type:=replace(str_type,' ',''); -str_type:=replace(str_type,',',''); -str_type:=replace(str_type,';',''); -if length(str_type) =0 then - raise exception 'id_type cannot be null'; -end if; -row_info_def.id_type:=str_type; -return row_info_def; -end; -$$; - - --- --- Name: insert_jrnx(character varying, numeric, public.account_type, integer, integer, boolean, text, integer, text, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -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 - LANGUAGE plpgsql - AS $$ -begin - insert into jrnx - ( - j_date, - j_montant, - j_poste, - j_grpt, - j_jrn_def, - j_debit, - j_text, - j_tech_user, - j_tech_per, - j_qcode - ) values - ( - to_date(p_date,'DD.MM.YYYY'), - p_montant, - p_poste, - p_grpt, - p_jrn_def, - p_debit, - p_comment, - p_tech_user, - p_tech_per, - p_qcode - ); - -return; -end; -$$; - - --- --- Name: insert_quant_purchase(text, numeric, character varying, numeric, numeric, numeric, integer, numeric, numeric, numeric, numeric, character varying, numeric); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -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) RETURNS void - LANGUAGE plpgsql - AS $$ -declare - fid_client integer; - fid_good integer; -begin - select f_id into fid_client from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_client)); - select f_id into fid_good from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_fiche)); - insert into quant_purchase - (qp_internal, - j_id, - qp_fiche, - qp_quantite, - qp_price, - qp_vat, - qp_vat_code, - qp_nd_amount, - qp_nd_tva, - qp_nd_tva_recup, - qp_supplier, - qp_dep_priv, - qp_vat_sided) - values - (p_internal, - p_j_id, - fid_good, - p_quant, - p_price, - p_vat, - p_vat_code, - p_nd_amount, - p_nd_tva, - p_nd_tva_recup, - fid_client, - p_dep_priv, - p_tva_sided); - return; -end; - $$; - - --- --- Name: insert_quant_sold(text, numeric, character varying, numeric, numeric, numeric, integer, character varying, numeric); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -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) RETURNS void - LANGUAGE plpgsql - AS $$ -declare - fid_client integer; - fid_good integer; -begin - - select f_id into fid_client from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_client)); - select f_id into fid_good from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_fiche)); - insert into quant_sold - (qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client,qs_valid,qs_vat_sided) - values - (p_internal,p_jid,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client,'Y',p_tva_sided); - return; -end; - $$; - - --- --- Name: insert_quick_code(integer, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION insert_quick_code(nf_id integer, tav_text text) RETURNS integer - LANGUAGE plpgsql - AS $$ - declare - ns integer; - nExist integer; - tText text; - begin - tText := upper(trim(tav_text)); - tText := replace(tText,' ',''); - - loop - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - if length (tText) = 0 or tText is null then - tText := 'FID'||ns; - 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; - tText:='FID'||ns; - end loop; - - - insert into fiche_detail(jft_id,f_id,ad_id,ad_value) values (ns,nf_id,23,upper(tText)); - return ns; - end; -$$; - - --- --- Name: is_closed(integer, integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION is_closed(p_periode integer, p_jrn_def_id integer) RETURNS boolean - LANGUAGE plpgsql - AS $$ -declare -bClosed bool; -str_status text; -begin -select p_closed into bClosed from parm_periode - where p_id=p_periode; - -if bClosed = true then - return bClosed; -end if; - -select status into str_status from jrn_periode - where p_id =p_periode and jrn_def_id=p_jrn_def_id; - -if str_status <> 'OP' then - return bClosed; -end if; -return false; -end; -$$; - - --- --- Name: jnt_fic_attr_ins(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jnt_fic_attr_ins() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - r_record jnt_fic_attr%ROWTYPE; - i_max integer; -begin -r_record=NEW; -perform comptaproc.fiche_attribut_synchro(r_record.fd_id); -select coalesce(max(jnt_order),0) into i_max from jnt_fic_attr where fd_id=r_record.fd_id; -i_max := i_max + 10; -NEW.jnt_order=i_max; -return NEW; -end; -$$; - - --- --- Name: jrn_add_note(bigint, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrn_add_note(p_jrid bigint, p_note text) RETURNS void - LANGUAGE plpgsql - AS $$ -declare - tmp bigint; -begin - if length(trim(p_note)) = 0 then - delete from jrn_note where jr_id= p_jrid; - return; - end if; - - select n_id into tmp from jrn_note where jr_id = p_jrid; - - if FOUND then - update jrn_note set n_text=trim(p_note) where jr_id = p_jrid; - else - insert into jrn_note (jr_id,n_text) values ( p_jrid, p_note); - - end if; - - return; -end; -$$; - - --- --- Name: jrn_check_periode(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrn_check_periode() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -bClosed bool; -str_status text; -ljr_tech_per jrn.jr_tech_per%TYPE; -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; -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; -end if; - -if TG_OP='DELETE' then - 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'; -end if; - -return lreturn; -end;$$; - - --- --- Name: jrn_def_add(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION 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||', - case when p_central=true then ''CE'' - when p_closed=true then ''CL'' - else ''OP'' - end -from -parm_periode '; -return NEW; -end;$$; - - --- --- Name: jrn_def_delete(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrn_def_delete() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -nb numeric; -begin -select count(*) into nb from jrn where jr_def_id=OLD.jrn_def_id; - -if nb <> 0 then - raise exception 'EFFACEMENT INTERDIT: JOURNAL UTILISE'; -end if; -return OLD; -end;$$; - - --- --- Name: jrn_del(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrn_del() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -row jrn%ROWTYPE; -begin -row:=OLD; -insert into del_jrn ( jr_id, - jr_def_id, - jr_montant, - jr_comment, - jr_date, - jr_grpt_id, - jr_internal, - jr_tech_date, - jr_tech_per, - jrn_ech, - jr_ech, - jr_rapt, - jr_valid, - jr_opid, - jr_c_opid, - jr_pj, - jr_pj_name, - jr_pj_type, - jr_pj_number, - del_jrn_date) - select jr_id, - jr_def_id, - jr_montant, - jr_comment, - jr_date, - jr_grpt_id, - jr_internal, - jr_tech_date, - jr_tech_per, - jrn_ech, - jr_ech, - jr_rapt, - jr_valid, - jr_opid, - jr_c_opid, - jr_pj, - jr_pj_name, - jr_pj_type, - jr_pj_number - ,now() from jrn where jr_id=row.jr_id; -return row; -end; -$$; - - --- --- Name: jrnx_del(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrnx_del() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -row jrnx%ROWTYPE; -begin -row:=OLD; - - -insert into del_jrnx( - j_id, j_date, j_montant, j_poste, j_grpt, j_rapt, j_jrn_def, - j_debit, j_text, j_centralized, j_internal, j_tech_user, j_tech_date, - j_tech_per, j_qcode, f_id) SELECT j_id, j_date, j_montant, j_poste, j_grpt, j_rapt, j_jrn_def, - j_debit, j_text, j_centralized, j_internal, j_tech_user, j_tech_date, - j_tech_per, j_qcode, f_id from jrnx where j_id=row.j_id; -return row; -end; -$$; - - --- --- Name: jrnx_ins(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrnx_ins() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -n_fid bigint; -begin - -NEW.j_tech_per := comptaproc.find_periode(to_char(NEW.j_date,'DD.MM.YYYY')); -if NEW.j_tech_per = -1 then - raise exception 'Période invalide'; -end if; - -if NEW.j_qcode is NULL then - return NEW; -end if; - -NEW.j_qcode=trim(upper(NEW.j_qcode)); - -if length (NEW.j_qcode) = 0 then - NEW.j_qcode=NULL; - else - select f_id into n_fid from fiche_detail where ad_id=23 and ad_value=NEW.j_qcode; - if NOT FOUND then - raise exception 'La fiche dont le quick code est % n''existe pas',NEW.j_qcode; - end if; -end if; -NEW.f_id:=n_fid; -return NEW; -end; -$$; - - --- --- Name: jrnx_letter_del(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION jrnx_letter_del() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -row jrnx%ROWTYPE; -begin -row:=OLD; -delete from jnt_letter - where (jl_id in (select jl_id from letter_deb) and jl_id not in(select jl_id from letter_cred )) - or (jl_id not in (select jl_id from letter_deb ) and jl_id in(select jl_id from letter_cred )); -return row; -end; -$$; - - --- --- Name: plan_analytic_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION plan_analytic_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - name text; -begin - name:=upper(NEW.pa_name); - name:=trim(name); - name:=replace(name,' ',''); - NEW.pa_name:=name; -return NEW; -end; -$$; - - --- --- Name: poste_analytique_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION poste_analytique_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$declare -name text; -rCount record; - -begin -name:=upper(NEW.po_name); -name:=trim(name); -name:=replace(name,' ',''); -NEW.po_name:=name; - -if NEW.ga_id is NULL then -return NEW; -end if; - -if length(trim(NEW.ga_id)) = 0 then - NEW.ga_id:=NULL; - return NEW; -end if; -perform 'select ga_id from groupe_analytique where ga_id='||NEW.ga_id; -if NOT FOUND then - raise exception' Inexistent Group Analytic %',NEW.ga_id; -end if; -return NEW; -end;$$; - - --- --- Name: proc_check_balance(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION proc_check_balance() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - diff numeric; - tt integer; -begin - if TG_OP = 'INSERT' or TG_OP='UPDATE' then - tt=NEW.jr_grpt_id; - diff:=check_balance(tt); - if diff != 0 then - raise exception 'balance error %',diff ; - end if; - return NEW; - end if; -end; -$$; - - --- --- Name: quant_purchase_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION quant_purchase_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ - begin - if NEW.qp_price < 0 OR NEW.qp_quantite <0 THEN - NEW.qp_price := abs (NEW.qp_price)*(-1); - NEW.qp_quantite := abs (NEW.qp_quantite)*(-1); - end if; -return NEW; -end; -$$; - - --- --- Name: quant_sold_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION quant_sold_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ - begin - if NEW.qs_price < 0 OR NEW.qs_quantite <0 THEN - NEW.qs_price := abs (NEW.qs_price)*(-1); - NEW.qs_quantite := abs (NEW.qs_quantite)*(-1); - end if; -return NEW; -end; -$$; - - --- --- Name: t_document_modele_validate(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION t_document_modele_validate() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - lText text; - modified document_modele%ROWTYPE; -begin - modified:=NEW; - - modified.md_filename:=replace(NEW.md_filename,' ','_'); - return modified; -end; -$$; - - --- --- Name: t_document_type_insert(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION t_document_type_insert() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -nCounter integer; - BEGIN -select count(*) into nCounter from pg_class where relname='seq_doc_type_'||NEW.dt_id; -if nCounter = 0 then - execute 'create sequence seq_doc_type_'||NEW.dt_id; -end if; - RETURN NEW; - END; -$$; - - --- --- Name: t_document_validate(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION t_document_validate() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - lText text; - modified document%ROWTYPE; -begin - modified:=NEW; - modified.d_filename:=replace(NEW.d_filename,' ','_'); - return modified; -end; -$$; - - --- --- Name: t_jrn_def_sequence(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION t_jrn_def_sequence() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare -nCounter integer; - - BEGIN - select count(*) into nCounter - from pg_class where relname='s_jrn_'||NEW.jrn_def_id; - if nCounter = 0 then - execute 'create sequence s_jrn_'||NEW.jrn_def_id; - raise notice 'Creating sequence s_jrn_%',NEW.jrn_def_id; - end if; - - RETURN NEW; - END; -$$; - - --- --- Name: table_analytic_account(text, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION table_analytic_account(p_from text, p_to text) RETURNS SETOF public.anc_table_account_type - LANGUAGE plpgsql - AS $$ -declare - ret ANC_table_account_type%ROWTYPE; - sql_from text:=''; - sql_to text:=''; - sWhere text:=''; - sAnd text:=''; - sResult text:=''; -begin -if p_from <> '' and p_from is not null then - sql_from:='oa_date >= to_date('''||p_from::text||''',''DD.MM.YYYY'')'; - sWhere:=' where '; -end if; - -if p_to <> '' and p_to is not null then - sql_to=' oa_date <= to_date('''||p_to::text||''',''DD.MM.YYYY'')'; - sWhere := ' where '; -end if; - -if sql_to <> '' and sql_from <> '' then - sAnd:=' and '; -end if; - -sResult := sWhere || sql_from || sAnd || sql_to; - -for ret in EXECUTE 'SELECT po.po_id, - po.pa_id, po.po_name, - po.po_description,sum( - CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount - END) AS sum_amount, jrnx.j_poste, tmp_pcmn.pcm_lib AS name - FROM operation_analytique - JOIN poste_analytique po USING (po_id) - JOIN jrnx USING (j_id) - JOIN tmp_pcmn ON jrnx.j_poste::text = tmp_pcmn.pcm_val::text -'|| sResult ||' - GROUP BY po.po_id, po.po_name, po.pa_id, jrnx.j_poste, tmp_pcmn.pcm_lib, po.po_description - HAVING sum( -CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount -END) <> 0::numeric ' - loop - return next ret; -end loop; -end; -$$; - - --- --- Name: table_analytic_card(text, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION table_analytic_card(p_from text, p_to text) RETURNS SETOF public.anc_table_card_type - LANGUAGE plpgsql - AS $$ -declare - ret ANC_table_card_type%ROWTYPE; - sql_from text:=''; - sql_to text:=''; - sWhere text:=''; - sAnd text:=''; - sResult text:=''; -begin -if p_from <> '' and p_from is not null then - sql_from:='oa_date >= to_date('''||p_from::text||''',''DD.MM.YYYY'')'; - sWhere:=' where '; -end if; - -if p_to <> '' and p_to is not null then - sql_to=' oa_date <= to_date('''||p_to::text||''',''DD.MM.YYYY'')'; - sWhere := ' where '; -end if; - -if sql_to <> '' and sql_from <> '' then - sAnd :=' and '; -end if; - -sResult := sWhere || sql_from || sAnd || sql_to; - -for ret in EXECUTE ' SELECT po.po_id, po.pa_id, po.po_name, po.po_description, sum( - CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount - END) AS sum_amount, jrnx.f_id, jrnx.j_qcode, ( SELECT fiche_detail.ad_value - FROM fiche_detail - WHERE fiche_detail.ad_id = 1 AND fiche_detail.f_id = jrnx.f_id) AS name - FROM operation_analytique - JOIN poste_analytique po USING (po_id) - JOIN jrnx USING (j_id)'|| sResult ||' - GROUP BY po.po_id, po.po_name, po.pa_id, jrnx.f_id, jrnx.j_qcode, ( SELECT fiche_detail.ad_value - FROM fiche_detail - WHERE fiche_detail.ad_id = 1 AND fiche_detail.f_id = jrnx.f_id), po.po_description - HAVING sum( -CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount -END) <> 0::numeric;' - - - loop - return next ret; -end loop; -end; -$$; - - --- --- Name: tmp_pcmn_alphanum_ins_upd(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION tmp_pcmn_alphanum_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - r_record tmp_pcmn%ROWTYPE; -begin -r_record := NEW; -r_record.pcm_val:=format_account(NEW.pcm_val); - -return r_record; -end; -$$; - - --- --- Name: tmp_pcmn_ins(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION tmp_pcmn_ins() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - r_record tmp_pcmn%ROWTYPE; -begin -r_record := NEW; -if length(trim(r_record.pcm_type))=0 or r_record.pcm_type is NULL then - r_record.pcm_type:=find_pcm_type(NEW.pcm_val); - return r_record; -end if; -return NEW; -end; -$$; - - --- --- Name: trim_cvs_quote(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION trim_cvs_quote() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - modified import_tmp%ROWTYPE; -begin - modified:=NEW; - modified.devise=replace(new.devise,'"',''); - modified.poste_comptable=replace(new.poste_comptable,'"',''); - modified.compte_ordre=replace(NEW.COMPTE_ORDRE,'"',''); - modified.detail=replace(NEW.DETAIL,'"',''); - modified.num_compte=replace(NEW.NUM_COMPTE,'"',''); - return modified; -end; -$$; - - --- --- Name: trim_space_format_csv_banque(); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION trim_space_format_csv_banque() RETURNS trigger - LANGUAGE plpgsql - AS $$ -declare - modified format_csv_banque%ROWTYPE; -begin - modified.name=trim(NEW.NAME); - modified.include_file=trim(new.include_file); - if ( length(modified.name) = 0 ) then - modified.name=null; - end if; - if ( length(modified.include_file) = 0 ) then - modified.include_file=null; - end if; - - return modified; -end; -$$; - - --- --- Name: tva_delete(integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION tva_delete(integer) RETURNS void - LANGUAGE plpgsql - AS $_$ -declare - p_tva_id alias for $1; - nCount integer; -begin - nCount=0; - select count(*) into nCount from quant_sold where qs_vat_code=p_tva_id; - if nCount != 0 then - return; - - end if; - select count(*) into nCount from quant_purchase where qp_vat_code=p_tva_id; - if nCount != 0 then - return; - - end if; - -delete from tva_rate where tva_id=p_tva_id; - return; -end; -$_$; - - --- --- Name: tva_insert(text, numeric, text, text, integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION tva_insert(text, numeric, text, text, integer) RETURNS integer - LANGUAGE plpgsql - AS $_$ -declare - l_tva_id integer; - p_tva_label alias for $1; - p_tva_rate alias for $2; - p_tva_comment alias for $3; - p_tva_poste alias for $4; - p_tva_both_side alias for $5; - debit text; - credit text; - nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::account_type; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::account_type; - if nCount = 0 then return 4; end if; - -end if; -select into l_tva_id nextval('s_tva') ; -insert into tva_rate(tva_id,tva_label,tva_rate,tva_comment,tva_poste,tva_both_side) - values (l_tva_id,p_tva_label,p_tva_rate,p_tva_comment,p_tva_poste,p_tva_both_side); -return 0; -end; -$_$; - - --- --- Name: tva_modify(integer, text, numeric, text, text, integer); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION tva_modify(integer, text, numeric, text, text, integer) RETURNS integer - LANGUAGE plpgsql - AS $_$ -declare - p_tva_id alias for $1; - p_tva_label alias for $2; - p_tva_rate alias for $3; - p_tva_comment alias for $4; - p_tva_poste alias for $5; - p_tva_both_side alias for $6; - debit text; - credit text; - nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::account_type; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::account_type; - if nCount = 0 then return 4; end if; - -end if; -update tva_rate set tva_label=p_tva_label,tva_rate=p_tva_rate,tva_comment=p_tva_comment,tva_poste=p_tva_poste,tva_both_side=p_tva_both_side - where tva_id=p_tva_id; -return 0; -end; -$_$; - - --- --- Name: update_quick_code(integer, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION update_quick_code(njft_id integer, tav_text text) RETURNS integer - LANGUAGE plpgsql - AS $$ - declare - ns integer; - nExist integer; - tText text; - old_qcode varchar; - 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 - return 0; - end if; - - tText := trim(upper(tav_text)); - tText := replace(tText,' ',''); - if length ( tText) = 0 or tText is null then - return 0; - end if; - - ns := njft_id; - - loop - -- 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; - if tText = 'FID'||ns then - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - end if; - tText :='FID'||ns; - - end loop; - update fiche_detail set ad_value = tText where 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); - - - update jrnx set j_qcode=tText where j_qcode = old_qcode; - return ns; - end; -$$; - - -SET search_path = public, pg_catalog; - --- --- Name: bud_card_ins_upd(); Type: FUNCTION; Schema: public; Owner: - --- - -CREATE FUNCTION bud_card_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$declare - sCode text; -begin - -sCode:=trim(upper(NEW.bc_code)); -sCode:=replace(sCode,' ','_'); -sCode:=substr(sCode,1,10); -NEW.bc_code:=sCode; -return NEW; -end;$$; - - --- --- Name: bud_detail_ins_upd(); Type: FUNCTION; Schema: public; Owner: - --- - -CREATE FUNCTION bud_detail_ins_upd() RETURNS trigger - LANGUAGE plpgsql - AS $$declare -mline bud_detail%ROWTYPE; -begin -mline:=NEW; -if mline.po_id = -1 then - mline.po_id:=NULL; -end if; -return mline; -end;$$; - - --- --- Name: correct_quant_purchase(); Type: FUNCTION; Schema: public; Owner: - --- - -CREATE FUNCTION correct_quant_purchase() RETURNS void - LANGUAGE plpgsql - AS $$ -declare - r_invalid quant_purchase; - s_QuickCode text; - b_j_debit bool; - r_new record; - r_jrnx record; -begin - -for r_invalid in select * from quant_purchase where qp_valid='A' -loop - -select j_qcode into s_QuickCode from vw_poste_qcode where f_id=r_invalid.qp_fiche; -raise notice 'qp_id % Quick code is %',r_invalid.qp_id,s_QuickCode; - -select j_debit,j_grpt,j_jrn_def,j_montant into r_jrnx from jrnx where j_id=r_invalid.j_id; -if NOT FOUND then - raise notice 'error not found jrnx %',r_invalid.j_id; - update quant_purchase set qp_valid='Y' where qp_id=r_invalid.qp_id; - continue; -end if; -raise notice 'j_debit % , j_grpt % ,j_jrn_def % qp_price %',r_jrnx.j_debit,r_jrnx.j_grpt,r_jrnx.j_jrn_def ,r_invalid.qp_price; - -select jr_internal,j_id,j_montant into r_new - from jrnx join jrn on (j_grpt=jr_grpt_id) - where - j_jrn_def=r_jrnx.j_jrn_def - and j_id not in (select j_id from quant_purchase) - and j_qcode=s_QuickCode - and j_montant=r_jrnx.j_montant - and j_debit != r_jrnx.j_debit; - -if NOT FOUND then - raise notice 'error not found %', r_invalid.j_id; - update quant_purchase set qp_valid='Y' where qp_id=r_invalid.qp_id; - continue; -end if; -raise notice 'j_id % found amount %',r_new.j_id,r_new.j_montant; - -insert into quant_purchase (qp_internal,j_id,qp_fiche,qp_quantite,qp_price,qp_vat,qp_nd_amount,qp_nd_tva_recup,qp_valid,qp_dep_priv,qp_supplier,qp_vat_code) -values (r_new.jr_internal,r_invalid.j_id,r_invalid.qp_fiche,(r_invalid.qp_quantite * (-1)),r_invalid.qp_price * (-1),r_invalid.qp_vat*(-1),r_invalid.qp_nd_amount*(-1),r_invalid.qp_nd_tva_recup*(-1) ,'Y',r_invalid.qp_dep_priv*(-1),r_invalid.qp_supplier,r_invalid.qp_vat_code); - -update quant_purchase set qp_valid='Y' where qp_id=r_invalid.qp_id; -end loop; -return; -end; -$$; - - --- --- Name: correct_quant_sale(); Type: FUNCTION; Schema: public; Owner: - --- - -CREATE FUNCTION correct_quant_sale() RETURNS void - LANGUAGE plpgsql - AS $$ -declare - r_invalid quant_sold; - s_QuickCode text; - b_j_debit bool; - r_new record; - r_jrnx record; -begin - -for r_invalid in select * from quant_sold where qs_valid='A' -loop - -select j_qcode into s_QuickCode from vw_poste_qcode where f_id=r_invalid.qs_fiche; -raise notice 'qp_id % Quick code is %',r_invalid.qs_id,s_QuickCode; - -select j_debit,j_grpt,j_jrn_def,j_montant into r_jrnx from jrnx where j_id=r_invalid.j_id; -if NOT FOUND then - update quant_sold set qs_valid='Y' where qs_id=r_invalid.qs_id; - raise notice 'error not found jrnx %',r_invalid.j_id; - continue; -end if; -raise notice 'j_debit % , j_grpt % ,j_jrn_def % qs_price %',r_jrnx.j_debit,r_jrnx.j_grpt,r_jrnx.j_jrn_def ,r_invalid.qs_price; - -select jr_internal,j_id,j_montant into r_new - from jrnx join jrn on (j_grpt=jr_grpt_id) - where - j_jrn_def=r_jrnx.j_jrn_def - and j_id not in (select j_id from quant_sold) - and j_qcode=s_QuickCode - and j_montant=r_jrnx.j_montant - and j_debit != r_jrnx.j_debit; - -if NOT FOUND then - update quant_sold set qs_valid='Y' where qs_id=r_invalid.qs_id; - raise notice 'error not found %', r_invalid.j_id; - continue; -end if; -raise notice 'j_id % found amount %',r_new.j_id,r_new.j_montant; - - - insert into quant_sold (qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_valid,qs_client,qs_vat_code) - values (r_new.jr_internal,r_invalid.j_id,r_invalid.qs_fiche,(r_invalid.qs_quantite * (-1)),r_invalid.qs_price * (-1),r_invalid.qs_vat*(-1),'Y',r_invalid.qs_client,r_invalid.qs_vat_code); - update quant_sold set qs_valid='Y' where qs_id=r_invalid.qs_id; -end loop; -return; -end; -$$; - - -SET default_tablespace = ''; - -SET default_with_oids = true; - --- --- Name: action; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE action ( - ac_id integer NOT NULL, - ac_description text NOT NULL, - ac_module text, - ac_code character varying(9) -); - - --- --- Name: TABLE action; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE action IS 'The different privileges'; - - --- --- Name: COLUMN action.ac_code; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action.ac_code IS 'this code will be used in the code with the function User::check_action '; - - -SET default_with_oids = false; - --- --- Name: action_detail; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE action_detail ( - ad_id integer NOT NULL, - f_id bigint, - ad_text text, - ad_pu numeric(20,4) DEFAULT 0, - ad_quant numeric(20,4) DEFAULT 0, - ad_tva_id integer DEFAULT 0, - ad_tva_amount numeric(20,4) DEFAULT 0, - ad_total_amount numeric(20,4) DEFAULT 0, - ag_id integer DEFAULT 0 NOT NULL -); - - --- --- Name: TABLE action_detail; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE action_detail IS 'Detail of action_gestion, see class Action_Detail'; - - --- --- Name: COLUMN action_detail.f_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.f_id IS 'the concerned card'; - - --- --- Name: COLUMN action_detail.ad_text; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.ad_text IS ' Description '; - - --- --- Name: COLUMN action_detail.ad_pu; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.ad_pu IS ' price per unit '; - - --- --- Name: COLUMN action_detail.ad_quant; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.ad_quant IS 'quantity '; - - --- --- Name: COLUMN action_detail.ad_tva_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.ad_tva_id IS ' tva_id '; - - --- --- Name: COLUMN action_detail.ad_tva_amount; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.ad_tva_amount IS ' tva_amount '; - - --- --- Name: COLUMN action_detail.ad_total_amount; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_detail.ad_total_amount IS ' total amount'; - - --- --- Name: action_detail_ad_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE action_detail_ad_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: action_detail_ad_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE action_detail_ad_id_seq OWNED BY action_detail.ad_id; - - --- --- Name: action_detail_ad_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('action_detail_ad_id_seq', 1, false); - - --- --- Name: action_gestion_ag_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE action_gestion_ag_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: action_gestion_ag_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('action_gestion_ag_id_seq', 1, false); - - -SET default_with_oids = true; - --- --- Name: action_gestion; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE action_gestion ( - ag_id integer DEFAULT nextval('action_gestion_ag_id_seq'::regclass) NOT NULL, - ag_type integer, - f_id_dest integer NOT NULL, - ag_title character varying(70), - ag_timestamp timestamp without time zone DEFAULT now(), - ag_cal character(1) DEFAULT 'C'::bpchar, - ag_ref_ag_id integer, - ag_comment text, - ag_ref text, - ag_hour text, - ag_priority integer DEFAULT 2, - ag_dest text, - ag_owner text, - ag_contact bigint, - ag_state integer -); - - --- --- Name: TABLE action_gestion; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE action_gestion IS 'Contains the details for the follow-up of customer, supplier, administration'; - - --- --- Name: COLUMN action_gestion.ag_type; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_type IS ' type of action: see document_type '; - - --- --- Name: COLUMN action_gestion.f_id_dest; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.f_id_dest IS ' third party '; - - --- --- Name: COLUMN action_gestion.ag_title; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_title IS ' title '; - - --- --- Name: COLUMN action_gestion.ag_timestamp; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_timestamp IS ' '; - - --- --- Name: COLUMN action_gestion.ag_cal; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_cal IS ' visible in the calendar if = C'; - - --- --- Name: COLUMN action_gestion.ag_ref_ag_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_ref_ag_id IS ' concerning the action '; - - --- --- Name: COLUMN action_gestion.ag_comment; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_comment IS ' comment of the action'; - - --- --- Name: COLUMN action_gestion.ag_ref; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_ref IS 'its reference '; - - --- --- Name: COLUMN action_gestion.ag_priority; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_priority IS 'Low, medium, important '; - - --- --- Name: COLUMN action_gestion.ag_dest; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_dest IS ' is the person who has to take care of this action '; - - --- --- Name: COLUMN action_gestion.ag_owner; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_owner IS ' is the owner of this action '; - - --- --- Name: COLUMN action_gestion.ag_contact; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_contact IS ' contact of the third part '; - - --- --- Name: COLUMN action_gestion.ag_state; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN action_gestion.ag_state IS 'state of the action same as document_state '; - - --- --- Name: attr_def; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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 -); - - --- --- Name: TABLE attr_def; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE attr_def IS 'The available attributs for the cards'; - - --- --- Name: attr_min; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE attr_min ( - frd_id integer NOT NULL, - ad_id integer NOT NULL -); - - --- --- Name: TABLE attr_min; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE attr_min IS 'The value of attributs for the cards'; - - --- --- Name: bilan_b_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE bilan_b_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: bilan_b_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('bilan_b_id_seq', 4, true); - - -SET default_with_oids = false; - --- --- Name: bilan; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE bilan ( - b_id integer DEFAULT nextval('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 -); - - --- --- Name: TABLE bilan; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE bilan IS 'contains the template and the data for generating different documents '; - - --- --- Name: COLUMN bilan.b_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN bilan.b_id IS 'primary key'; - - --- --- Name: COLUMN bilan.b_name; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN bilan.b_name IS 'Name of the document'; - - --- --- Name: COLUMN bilan.b_file_template; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN bilan.b_file_template IS 'path of the template (document/...)'; - - --- --- Name: COLUMN bilan.b_file_form; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN bilan.b_file_form IS 'path of the file with forms'; - - --- --- Name: COLUMN bilan.b_type; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN bilan.b_type IS 'type = ODS, RTF...'; - - --- --- Name: bud_card_bc_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE bud_card_bc_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: bud_card_bc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('bud_card_bc_id_seq', 1, false); - - --- --- Name: bud_detail_bd_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE bud_detail_bd_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: bud_detail_bd_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('bud_detail_bd_id_seq', 1, false); - - --- --- Name: bud_detail_periode_bdp_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE bud_detail_periode_bdp_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: bud_detail_periode_bdp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('bud_detail_periode_bdp_id_seq', 1, false); - - -SET default_with_oids = true; - --- --- Name: centralized; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE centralized ( - c_id integer DEFAULT nextval(('s_centralized'::text)::regclass) NOT NULL, - c_j_id integer, - c_date date NOT NULL, - c_internal text NOT NULL, - c_montant numeric(20,4) NOT NULL, - c_debit boolean DEFAULT true, - c_jrn_def integer NOT NULL, - c_poste account_type, - c_description text, - c_grp integer NOT NULL, - c_comment text, - c_rapt text, - c_periode integer, - c_order integer -); - - --- --- Name: TABLE centralized; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE centralized IS 'The centralized journal'; - - -SET default_with_oids = false; - --- --- Name: del_action; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE del_action ( - del_id integer NOT NULL, - del_name text NOT NULL, - del_time timestamp without time zone -); - - --- --- Name: del_action_del_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE del_action_del_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: del_action_del_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE del_action_del_id_seq OWNED BY del_action.del_id; - - --- --- Name: del_action_del_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('del_action_del_id_seq', 1, true); - - --- --- Name: del_jrn; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE del_jrn ( - jr_id integer NOT NULL, - jr_def_id integer, - jr_montant numeric(20,4), - jr_comment text, - jr_date date, - jr_grpt_id integer, - jr_internal text, - jr_tech_date timestamp without time zone, - jr_tech_per integer, - jrn_ech date, - jr_ech date, - jr_rapt text, - jr_valid boolean, - jr_opid integer, - jr_c_opid integer, - jr_pj oid, - jr_pj_name text, - jr_pj_type text, - del_jrn_date timestamp without time zone, - jr_pj_number text, - dj_id integer NOT NULL -); - - --- --- Name: del_jrn_dj_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE del_jrn_dj_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: del_jrn_dj_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE del_jrn_dj_id_seq OWNED BY del_jrn.dj_id; - - --- --- Name: del_jrn_dj_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('del_jrn_dj_id_seq', 1, false); - - --- --- Name: del_jrnx; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE del_jrnx ( - j_id integer NOT NULL, - j_date date, - j_montant numeric(20,4), - j_poste account_type, - j_grpt integer, - j_rapt text, - j_jrn_def integer, - j_debit boolean, - j_text text, - j_centralized boolean, - j_internal text, - j_tech_user text, - j_tech_date timestamp without time zone, - j_tech_per integer, - j_qcode text, - djx_id integer NOT NULL, - f_id bigint -); - - --- --- Name: del_jrnx_djx_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE del_jrnx_djx_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: del_jrnx_djx_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE del_jrnx_djx_id_seq OWNED BY del_jrnx.djx_id; - - --- --- Name: del_jrnx_djx_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('del_jrnx_djx_id_seq', 1, false); - - --- --- Name: document_d_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE document_d_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: document_d_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('document_d_id_seq', 1, false); - - -SET default_with_oids = true; - --- --- Name: document; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE document ( - d_id integer DEFAULT nextval('document_d_id_seq'::regclass) NOT NULL, - ag_id integer NOT NULL, - d_lob oid, - d_number bigint NOT NULL, - d_filename text, - d_mimetype text -); - - --- --- Name: TABLE document; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE document IS 'This table contains all the documents : summary and lob files'; - - --- --- Name: document_modele_md_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE document_modele_md_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: document_modele_md_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('document_modele_md_id_seq', 1, false); - - --- --- Name: document_modele; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -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 -); - - --- --- Name: TABLE document_modele; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE document_modele IS ' contains all the template for the documents'; - - --- --- Name: document_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE document_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: SEQUENCE document_seq; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON SEQUENCE document_seq IS 'Sequence for the sequence bound to the document modele'; - - --- --- Name: document_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('document_seq', 1, false); - - --- --- Name: document_state_s_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE document_state_s_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: document_state_s_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('document_state_s_id_seq', 3, true); - - --- --- Name: document_state; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE document_state ( - s_id integer DEFAULT nextval('document_state_s_id_seq'::regclass) NOT NULL, - s_value character varying(50) NOT NULL -); - - --- --- Name: TABLE document_state; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE document_state IS 'State of the document'; - - --- --- Name: document_type_dt_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE document_type_dt_id_seq - START WITH 25 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: document_type_dt_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('document_type_dt_id_seq', 25, false); - - --- --- Name: document_type; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE document_type ( - dt_id integer DEFAULT nextval('document_type_dt_id_seq'::regclass) NOT NULL, - dt_value character varying(80) -); - - --- --- Name: TABLE document_type; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE document_type IS 'Type of document : meeting, invoice,...'; - - -SET default_with_oids = false; - --- --- Name: extension; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE extension ( - ex_id integer NOT NULL, - ex_name character varying(30) NOT NULL, - ex_code character varying(15) NOT NULL, - ex_desc character varying(250), - ex_file character varying NOT NULL, - ex_enable "char" DEFAULT 'Y'::"char" NOT NULL -); - - --- --- Name: TABLE extension; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE extension IS 'Content the needed information for the extension'; - - --- --- Name: COLUMN extension.ex_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN extension.ex_id IS 'Primary key'; - - --- --- Name: COLUMN extension.ex_name; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN extension.ex_name IS 'code of the extension '; - - --- --- Name: COLUMN extension.ex_code; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN extension.ex_code IS 'code of the extension '; - - --- --- Name: COLUMN extension.ex_desc; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN extension.ex_desc IS 'Description of the extension '; - - --- --- Name: COLUMN extension.ex_file; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN extension.ex_file IS 'path to the extension to include'; - - --- --- Name: COLUMN extension.ex_enable; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN extension.ex_enable IS 'Y : enabled N : disabled '; - - --- --- Name: extension_ex_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE extension_ex_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: extension_ex_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE extension_ex_id_seq OWNED BY extension.ex_id; - - --- --- Name: extension_ex_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('extension_ex_id_seq', 1, false); - - -SET default_with_oids = true; - --- --- Name: fiche; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE fiche ( - f_id integer DEFAULT nextval(('s_fiche'::text)::regclass) NOT NULL, - fd_id integer -); - - --- --- Name: TABLE fiche; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE fiche IS 'Cards'; - - --- --- Name: fiche_def; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE fiche_def ( - fd_id integer DEFAULT nextval(('s_fdef'::text)::regclass) NOT NULL, - fd_class_base text, - fd_label text NOT NULL, - fd_create_account boolean DEFAULT false, - frd_id integer NOT NULL -); - - --- --- Name: TABLE fiche_def; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE fiche_def IS 'Cards definition'; - - --- --- Name: fiche_def_ref; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE fiche_def_ref ( - frd_id integer DEFAULT nextval(('s_fiche_def_ref'::text)::regclass) NOT NULL, - frd_text text, - frd_class_base account_type -); - - --- --- Name: TABLE fiche_def_ref; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE fiche_def_ref IS 'Family Cards definition'; - - --- --- Name: fiche_detail; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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 -); - - --- --- Name: TABLE fiche_detail; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE fiche_detail IS 'join between the card and the attribut definition'; - - -SET default_with_oids = false; - --- --- Name: forecast; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE forecast ( - f_id integer NOT NULL, - f_name text NOT NULL, - f_start_date bigint, - f_end_date bigint -); - - --- --- Name: TABLE forecast; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE forecast IS 'contains the name of the forecast'; - - --- --- Name: forecast_cat; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE forecast_cat ( - fc_id integer NOT NULL, - fc_desc text NOT NULL, - f_id bigint, - fc_order integer DEFAULT 0 NOT NULL -); - - --- --- Name: COLUMN forecast_cat.fc_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_cat.fc_id IS 'primary key'; - - --- --- Name: COLUMN forecast_cat.fc_desc; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_cat.fc_desc IS 'text of the category'; - - --- --- Name: COLUMN forecast_cat.f_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_cat.f_id IS 'Foreign key, it is the parent from the table forecast'; - - --- --- Name: COLUMN forecast_cat.fc_order; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_cat.fc_order IS 'Order of the category, used when displaid'; - - --- --- Name: forecast_cat_fc_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE forecast_cat_fc_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: forecast_cat_fc_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE forecast_cat_fc_id_seq OWNED BY forecast_cat.fc_id; - - --- --- Name: forecast_cat_fc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('forecast_cat_fc_id_seq', 1, false); - - --- --- Name: forecast_f_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE forecast_f_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: forecast_f_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE forecast_f_id_seq OWNED BY forecast.f_id; - - --- --- Name: forecast_f_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('forecast_f_id_seq', 1, false); - - --- --- Name: forecast_item; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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 -); - - --- --- Name: COLUMN forecast_item.fi_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_id IS 'Primary key'; - - --- --- Name: COLUMN forecast_item.fi_text; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_text IS 'Label of the i tem'; - - --- --- Name: COLUMN forecast_item.fi_account; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_account IS 'Accountancy entry'; - - --- --- Name: COLUMN forecast_item.fi_card; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_card IS 'Card (fiche.f_id)'; - - --- --- Name: COLUMN forecast_item.fi_order; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_order IS 'Order of showing (not used)'; - - --- --- Name: COLUMN forecast_item.fi_amount; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_amount IS 'Amount'; - - --- --- Name: COLUMN forecast_item.fi_debit; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_debit IS 'possible values are D or C'; - - --- --- Name: COLUMN forecast_item.fi_pid; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN forecast_item.fi_pid IS '0 for every month, or the value parm_periode.p_id '; - - --- --- Name: forecast_item_fi_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE forecast_item_fi_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: forecast_item_fi_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE forecast_item_fi_id_seq OWNED BY forecast_item.fi_id; - - --- --- Name: forecast_item_fi_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('forecast_item_fi_id_seq', 1, false); - - -SET default_with_oids = true; - --- --- Name: form; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -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 -); - - --- --- Name: TABLE form; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE form IS 'Forms content'; - - --- --- Name: formdef; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE formdef ( - fr_id integer DEFAULT nextval(('s_formdef'::text)::regclass) NOT NULL, - fr_label text -); - - -SET default_with_oids = false; - --- --- Name: groupe_analytique; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE groupe_analytique ( - ga_id character varying(10) NOT NULL, - pa_id integer, - ga_description text -); - - --- --- Name: historique_analytique_ha_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE historique_analytique_ha_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: historique_analytique_ha_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('historique_analytique_ha_id_seq', 1, false); - - --- --- Name: info_def; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE info_def ( - id_type text NOT NULL, - id_description text -); - - --- --- Name: TABLE info_def; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE info_def IS 'Contains the types of additionnal info we can add to a operation'; - - --- --- Name: s_jnt_id; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jnt_id - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jnt_id; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jnt_id', 53, true); - - -SET default_with_oids = true; - --- --- Name: jnt_fic_attr; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jnt_fic_attr ( - fd_id integer, - ad_id integer, - jnt_id bigint DEFAULT nextval('s_jnt_id'::regclass) NOT NULL, - jnt_order integer NOT NULL -); - - --- --- Name: TABLE jnt_fic_attr; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jnt_fic_attr IS 'join between the family card and the attribut definition'; - - -SET default_with_oids = false; - --- --- Name: jnt_letter; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jnt_letter ( - jl_id integer NOT NULL, - jl_amount_deb numeric(20,4) -); - - --- --- Name: jnt_letter_jl_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE jnt_letter_jl_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: jnt_letter_jl_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE jnt_letter_jl_id_seq OWNED BY jnt_letter.jl_id; - - --- --- Name: jnt_letter_jl_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('jnt_letter_jl_id_seq', 1, false); - - -SET default_with_oids = true; - --- --- Name: jrn; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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, - jr_comment text, - jr_date date, - jr_grpt_id integer NOT NULL, - jr_internal text, - jr_tech_date timestamp without time zone DEFAULT now() NOT NULL, - jr_tech_per integer NOT NULL, - jrn_ech date, - jr_ech date, - jr_rapt text, - jr_valid boolean DEFAULT true, - jr_opid integer, - jr_c_opid integer, - jr_pj oid, - jr_pj_name text, - jr_pj_type text, - jr_pj_number text, - jr_mt text -); - - --- --- Name: TABLE jrn; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrn IS 'Journal: content one line for a group of accountancy writing'; - - --- --- Name: jrn_action; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jrn_action ( - ja_id integer DEFAULT nextval(('s_jrnaction'::text)::regclass) NOT NULL, - ja_name text NOT NULL, - ja_desc text, - ja_url text NOT NULL, - ja_action text NOT NULL, - ja_lang text DEFAULT 'FR'::text, - ja_jrn_type character(3) -); - - --- --- Name: TABLE jrn_action; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrn_action IS 'Possible action when we are in journal (menu)'; - - --- --- Name: jrn_def; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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, - jrn_def_class_cred text, - jrn_def_fiche_deb text, - jrn_def_fiche_cred text, - jrn_deb_max_line integer DEFAULT 1, - jrn_cred_max_line integer DEFAULT 1, - jrn_def_ech boolean DEFAULT false, - jrn_def_ech_lib text, - jrn_def_type character(3) NOT NULL, - jrn_def_code text NOT NULL, - jrn_def_pj_pref text, - jrn_def_bank bigint, - jrn_def_num_op integer -); - - --- --- Name: TABLE jrn_def; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrn_def IS 'Definition of a journal, his properties'; - - -SET default_with_oids = false; - --- --- Name: jrn_info; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jrn_info ( - ji_id integer NOT NULL, - jr_id integer NOT NULL, - id_type text NOT NULL, - ji_value text -); - - --- --- Name: jrn_info_ji_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE jrn_info_ji_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: jrn_info_ji_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE jrn_info_ji_id_seq OWNED BY jrn_info.ji_id; - - --- --- Name: jrn_info_ji_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('jrn_info_ji_id_seq', 1, false); - - --- --- Name: jrn_note; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jrn_note ( - n_id integer NOT NULL, - n_text text, - jr_id bigint NOT NULL -); - - --- --- Name: TABLE jrn_note; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrn_note IS 'Note about operation'; - - --- --- Name: jrn_note_n_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE jrn_note_n_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: jrn_note_n_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE jrn_note_n_id_seq OWNED BY jrn_note.n_id; - - --- --- Name: jrn_note_n_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('jrn_note_n_id_seq', 1, false); - - --- --- Name: jrn_periode; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jrn_periode ( - jrn_def_id integer NOT NULL, - p_id integer NOT NULL, - status text -); - - -SET default_with_oids = true; - --- --- Name: jrn_rapt; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jrn_rapt ( - jra_id integer DEFAULT nextval(('s_jrn_rapt'::text)::regclass) NOT NULL, - jr_id integer NOT NULL, - jra_concerned integer NOT NULL -); - - --- --- Name: TABLE jrn_rapt; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrn_rapt IS 'Rapprochement between operation'; - - --- --- Name: jrn_type; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE jrn_type ( - jrn_type_id character(3) NOT NULL, - jrn_desc text -); - - --- --- Name: TABLE jrn_type; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrn_type IS 'Type of journal (Sell, Buy, Financial...)'; - - --- --- Name: jrnx; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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_grpt integer NOT NULL, - j_rapt text, - j_jrn_def integer NOT NULL, - j_debit boolean DEFAULT true, - j_text text, - j_centralized boolean DEFAULT false, - j_internal text, - j_tech_user text NOT NULL, - j_tech_date timestamp without time zone DEFAULT now() NOT NULL, - j_tech_per integer NOT NULL, - j_qcode text, - f_id bigint -); - - --- --- Name: TABLE jrnx; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE jrnx IS 'Journal: content one line for each accountancy writing'; - - -SET default_with_oids = false; - --- --- Name: letter_cred; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE letter_cred ( - lc_id integer NOT NULL, - j_id bigint NOT NULL, - jl_id bigint NOT NULL -); - - --- --- Name: letter_cred_lc_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE letter_cred_lc_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: letter_cred_lc_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE letter_cred_lc_id_seq OWNED BY letter_cred.lc_id; - - --- --- Name: letter_cred_lc_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('letter_cred_lc_id_seq', 1, false); - - --- --- Name: letter_deb; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE letter_deb ( - ld_id integer NOT NULL, - j_id bigint NOT NULL, - jl_id bigint NOT NULL -); - - --- --- Name: letter_deb_ld_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE letter_deb_ld_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: letter_deb_ld_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE letter_deb_ld_id_seq OWNED BY letter_deb.ld_id; - - --- --- Name: letter_deb_ld_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('letter_deb_ld_id_seq', 1, false); - - --- --- Name: menu_ref; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE menu_ref ( - me_code text NOT NULL, - me_menu text, - me_file text, - me_url text, - me_description text, - me_parameter text, - me_javascript text, - me_type character varying(2) -); - - --- --- Name: COLUMN menu_ref.me_code; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN menu_ref.me_code IS 'Menu Code '; - - --- --- Name: COLUMN menu_ref.me_menu; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN menu_ref.me_menu IS 'Label to display'; - - --- --- Name: COLUMN menu_ref.me_file; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN menu_ref.me_file IS 'if not empty file to include'; - - --- --- Name: COLUMN menu_ref.me_url; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN menu_ref.me_url IS 'url '; - - --- --- Name: COLUMN menu_ref.me_type; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN menu_ref.me_type IS 'ME for menu -PR for Printing -SP for special meaning (ex: return to line) -PL for plugin'; - - --- --- Name: mod_payment; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE mod_payment ( - mp_id integer NOT NULL, - mp_lib text NOT NULL, - mp_jrn_def_id integer NOT NULL, - mp_fd_id bigint, - mp_qcode text, - jrn_def_id bigint -); - - --- --- Name: TABLE mod_payment; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE mod_payment IS 'Contains the different media of payment and the corresponding ledger'; - - --- --- Name: COLUMN mod_payment.jrn_def_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN mod_payment.jrn_def_id IS 'Ledger using this payment method'; - - --- --- Name: mod_payment_mp_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE mod_payment_mp_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: mod_payment_mp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE mod_payment_mp_id_seq OWNED BY mod_payment.mp_id; - - --- --- Name: mod_payment_mp_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('mod_payment_mp_id_seq', 10, true); - - --- --- Name: op_def_op_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE op_def_op_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: op_def_op_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('op_def_op_seq', 1, false); - - --- --- Name: op_predef; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE op_predef ( - od_id integer DEFAULT nextval('op_def_op_seq'::regclass) NOT NULL, - jrn_def_id integer NOT NULL, - od_name text NOT NULL, - od_item integer NOT NULL, - od_jrn_type text NOT NULL, - od_direct boolean NOT NULL -); - - --- --- Name: TABLE op_predef; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE op_predef IS 'predefined operation'; - - --- --- Name: COLUMN op_predef.jrn_def_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN op_predef.jrn_def_id IS 'jrn_id'; - - --- --- Name: COLUMN op_predef.od_name; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN op_predef.od_name IS 'name of the operation'; - - --- --- Name: op_predef_detail_opd_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE op_predef_detail_opd_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: op_predef_detail_opd_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('op_predef_detail_opd_id_seq', 1, false); - - --- --- Name: op_predef_detail; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE op_predef_detail ( - opd_id integer DEFAULT nextval('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_quantity numeric(20,4), - opd_debit boolean NOT NULL, - opd_tva_amount numeric(20,4), - opd_comment text, - opd_qc boolean -); - - --- --- Name: TABLE op_predef_detail; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE op_predef_detail IS 'contains the detail of predefined operations'; - - --- --- Name: s_oa_group; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_oa_group - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_oa_group; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_oa_group', 7, true); - - --- --- Name: operation_analytique; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE operation_analytique ( - oa_id integer DEFAULT nextval('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_date date NOT NULL, - oa_row integer, - CONSTRAINT operation_analytique_oa_amount_check CHECK ((oa_amount >= (0)::numeric)) -); - - --- --- Name: TABLE operation_analytique; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE operation_analytique IS 'History of the analytic account'; - - -SET default_with_oids = true; - --- --- Name: parameter; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE parameter ( - pr_id text NOT NULL, - pr_value text -); - - --- --- Name: TABLE parameter; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE parameter IS 'parameter of the company'; - - --- --- Name: parm_code; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE parm_code ( - p_code text NOT NULL, - p_value text, - p_comment text -); - - --- --- Name: parm_money; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE parm_money ( - pm_id integer DEFAULT nextval(('s_currency'::text)::regclass), - pm_code character(3) NOT NULL, - pm_rate numeric(20,4) -); - - --- --- Name: TABLE parm_money; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE parm_money IS 'Currency conversion'; - - --- --- Name: parm_periode; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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, - CONSTRAINT parm_periode_check CHECK ((p_end >= p_start)) -); - - --- --- Name: TABLE parm_periode; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE parm_periode IS 'Periode definition'; - - -SET default_with_oids = false; - --- --- Name: parm_poste; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE parm_poste ( - p_value account_type NOT NULL, - p_type text NOT NULL -); - - --- --- Name: TABLE parm_poste; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE parm_poste IS 'Contains data for finding is the type of the account (asset)'; - - --- --- Name: plan_analytique_pa_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE plan_analytique_pa_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: plan_analytique_pa_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('plan_analytique_pa_id_seq', 1, false); - - --- --- Name: plan_analytique; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE plan_analytique ( - pa_id integer DEFAULT nextval('plan_analytique_pa_id_seq'::regclass) NOT NULL, - pa_name text DEFAULT 'Sans Nom'::text NOT NULL, - pa_description text -); - - --- --- Name: TABLE plan_analytique; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE plan_analytique IS 'Plan Analytique (max 5)'; - - --- --- Name: poste_analytique_po_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE poste_analytique_po_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: poste_analytique_po_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('poste_analytique_po_id_seq', 1, false); - - --- --- Name: poste_analytique; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE poste_analytique ( - po_id integer DEFAULT nextval('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) -); - - --- --- Name: TABLE poste_analytique; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE poste_analytique IS 'Poste Analytique'; - - --- --- Name: profile; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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 -); - - --- --- Name: TABLE profile; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE profile IS 'Available profile '; - - --- --- Name: COLUMN profile.p_name; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile.p_name IS 'Name of the profile'; - - --- --- Name: COLUMN profile.p_desc; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile.p_desc IS 'description of the profile'; - - --- --- Name: COLUMN profile.with_calc; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile.with_calc IS 'show the calculator'; - - --- --- Name: COLUMN profile.with_direct_form; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile.with_direct_form IS 'show the direct form'; - - --- --- Name: profile_menu; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -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 -); - - --- --- Name: TABLE profile_menu; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE profile_menu IS 'Join between the profile and the menu '; - - --- --- Name: COLUMN profile_menu.me_code_dep; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_menu.me_code_dep IS 'menu code dependency'; - - --- --- Name: COLUMN profile_menu.p_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_menu.p_id IS 'link to profile'; - - --- --- Name: COLUMN profile_menu.p_order; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_menu.p_order IS 'order of displaying menu'; - - --- --- Name: COLUMN profile_menu.p_type_display; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_menu.p_type_display IS 'M is a module -E is a menu -S is a select (for plugin)'; - - --- --- Name: COLUMN profile_menu.pm_default; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_menu.pm_default IS 'default menu'; - - --- --- Name: profile_menu_pm_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE profile_menu_pm_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: profile_menu_pm_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE profile_menu_pm_id_seq OWNED BY profile_menu.pm_id; - - --- --- Name: profile_menu_pm_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('profile_menu_pm_id_seq', 778, true); - - --- --- Name: profile_menu_type; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE profile_menu_type ( - pm_type text NOT NULL, - pm_desc text -); - - --- --- Name: profile_p_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE profile_p_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: profile_p_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE profile_p_id_seq OWNED BY profile.p_id; - - --- --- Name: profile_p_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('profile_p_id_seq', 11, true); - - --- --- Name: profile_user; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE profile_user ( - user_name text NOT NULL, - pu_id integer NOT NULL, - p_id integer -); - - --- --- Name: TABLE profile_user; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE profile_user IS 'Contains the available profile for users'; - - --- --- Name: COLUMN profile_user.user_name; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_user.user_name IS 'fk to available_user : login'; - - --- --- Name: COLUMN profile_user.p_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN profile_user.p_id IS 'fk to profile'; - - --- --- Name: profile_user_pu_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE profile_user_pu_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: profile_user_pu_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE profile_user_pu_id_seq OWNED BY profile_user.pu_id; - - --- --- Name: profile_user_pu_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('profile_user_pu_id_seq', 6, true); - - --- --- Name: quant_fin; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE quant_fin ( - qf_id bigint NOT NULL, - qf_bank bigint, - jr_id bigint, - qf_other bigint, - qf_amount numeric(20,4) DEFAULT 0 -); - - --- --- Name: TABLE quant_fin; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE quant_fin IS 'Simple operation for financial'; - - --- --- Name: quant_fin_qf_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE quant_fin_qf_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: quant_fin_qf_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE quant_fin_qf_id_seq OWNED BY quant_fin.qf_id; - - --- --- Name: quant_fin_qf_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('quant_fin_qf_id_seq', 1, false); - - --- --- Name: quant_purchase; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE quant_purchase ( - qp_id integer DEFAULT nextval(('s_quantity'::text)::regclass) NOT NULL, - qp_internal text, - j_id integer NOT NULL, - qp_fiche integer NOT NULL, - qp_quantite numeric(20,4) NOT NULL, - qp_price numeric(20,4), - qp_vat numeric(20,4) DEFAULT 0.0, - qp_vat_code integer, - qp_nd_amount numeric(20,4) DEFAULT 0.0, - qp_nd_tva numeric(20,4) DEFAULT 0.0, - qp_nd_tva_recup numeric(20,4) DEFAULT 0.0, - qp_supplier integer NOT NULL, - qp_valid character(1) DEFAULT 'Y'::bpchar NOT NULL, - qp_dep_priv numeric(20,4) DEFAULT 0.0, - qp_vat_sided numeric(20,4) DEFAULT 0.0 -); - - --- --- Name: COLUMN quant_purchase.qp_vat_sided; Type: COMMENT; Schema: public; Owner: - --- - -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'; - - -SET default_with_oids = true; - --- --- Name: quant_sold; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE quant_sold ( - qs_id integer DEFAULT nextval(('s_quantity'::text)::regclass) NOT NULL, - qs_internal text, - qs_fiche integer NOT NULL, - qs_quantite numeric(20,4) NOT NULL, - qs_price numeric(20,4), - qs_vat numeric(20,4), - qs_vat_code integer, - qs_client integer NOT NULL, - qs_valid character(1) DEFAULT 'Y'::bpchar NOT NULL, - j_id integer NOT NULL, - qs_vat_sided numeric(20,4) DEFAULT 0.0 -); - - --- --- Name: TABLE quant_sold; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE quant_sold IS 'Contains about invoice for customer'; - - --- --- Name: s_attr_def; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_attr_def - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_attr_def; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_attr_def', 9001, false); - - --- --- Name: s_cbc; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_cbc - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_cbc; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_cbc', 1, false); - - --- --- Name: s_central; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_central - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_central; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_central', 1, false); - - --- --- Name: s_central_order; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_central_order - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_central_order; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_central_order', 1, false); - - --- --- Name: s_centralized; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_centralized - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_centralized; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_centralized', 1, false); - - --- --- Name: s_currency; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_currency - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_currency; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_currency', 1, true); - - --- --- Name: s_fdef; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_fdef - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_fdef; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_fdef', 6, true); - - --- --- Name: s_fiche; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_fiche - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_fiche; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_fiche', 79, true); - - --- --- Name: s_fiche_def_ref; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_fiche_def_ref - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_fiche_def_ref; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_fiche_def_ref', 18, true); - - --- --- Name: s_form; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_form - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_form; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_form', 1, false); - - --- --- Name: s_formdef; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_formdef - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_formdef; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_formdef', 1, false); - - --- --- Name: s_grpt; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_grpt - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_grpt; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_grpt', 102, true); - - --- --- Name: s_idef; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_idef - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_idef; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_idef', 1, false); - - --- --- Name: s_internal; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_internal - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_internal; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_internal', 1, false); - - --- --- Name: s_invoice; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_invoice - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_invoice; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_invoice', 1, false); - - --- --- Name: s_isup; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_isup - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_isup; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_isup', 1, false); - - --- --- Name: s_jnt_fic_att_value; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jnt_fic_att_value - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jnt_fic_att_value; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jnt_fic_att_value', 875, true); - - --- --- Name: s_jrn; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn', 1, false); - - --- --- Name: s_jrn_1; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_1 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_1; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_1', 1, false); - - --- --- Name: s_jrn_2; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_2 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_2; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_2', 1, false); - - --- --- Name: s_jrn_3; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_3 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_3; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_3', 1, false); - - --- --- Name: s_jrn_4; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_4 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_4; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_4', 1, false); - - --- --- Name: s_jrn_def; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_def - START WITH 5 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_def; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_def', 5, false); - - --- --- Name: s_jrn_op; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_op - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_op; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_op', 1, false); - - --- --- Name: s_jrn_pj1; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_pj1 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_pj1; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_pj1', 1, false); - - --- --- Name: s_jrn_pj2; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_pj2 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_pj2; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_pj2', 1, false); - - --- --- Name: s_jrn_pj3; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_pj3 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_pj3; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_pj3', 1, false); - - --- --- Name: s_jrn_pj4; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_pj4 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_pj4; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_pj4', 1, false); - - --- --- Name: s_jrn_rapt; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrn_rapt - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrn_rapt; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrn_rapt', 20, true); - - --- --- Name: s_jrnaction; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrnaction - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrnaction; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrnaction', 5, true); - - --- --- Name: s_jrnx; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_jrnx - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_jrnx; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_jrnx', 1, false); - - --- --- Name: s_periode; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_periode - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_periode; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_periode', 117, true); - - --- --- Name: s_quantity; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_quantity - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_quantity; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_quantity', 13, true); - - --- --- Name: s_stock_goods; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_stock_goods - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_stock_goods; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_stock_goods', 1, false); - - --- --- Name: s_tva; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_tva - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_tva; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_tva', 1000, false); - - --- --- Name: s_user_act; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_user_act - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_user_act; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_user_act', 1, false); - - --- --- Name: s_user_jrn; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_user_jrn - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_user_jrn; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_user_jrn', 8, true); - - --- --- Name: seq_bud_hypothese_bh_id; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_bud_hypothese_bh_id - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_bud_hypothese_bh_id; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_bud_hypothese_bh_id', 1, false); - - --- --- Name: seq_doc_type_1; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_1 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_1; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_1', 1, false); - - --- --- Name: seq_doc_type_10; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_10 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_10; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_10', 1, false); - - --- --- Name: seq_doc_type_2; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_2 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_2; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_2', 1, false); - - --- --- Name: seq_doc_type_20; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_20 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_20; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_20', 1, false); - - --- --- Name: seq_doc_type_21; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_21 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_21; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_21', 1, false); - - --- --- Name: seq_doc_type_22; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_22 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_22; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_22', 1, false); - - --- --- Name: seq_doc_type_3; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_3 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_3; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_3', 1, false); - - --- --- Name: seq_doc_type_4; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_4 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_4; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_4', 1, false); - - --- --- Name: seq_doc_type_5; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_5 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_5; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_5', 1, false); - - --- --- Name: seq_doc_type_6; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_6 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_6; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_6', 1, false); - - --- --- Name: seq_doc_type_7; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_7 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_7; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_7', 1, false); - - --- --- Name: seq_doc_type_8; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_8 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_8; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_8', 1, false); - - --- --- Name: seq_doc_type_9; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_doc_type_9 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_doc_type_9; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_doc_type_9', 1, false); - - --- --- Name: stock_goods; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE stock_goods ( - sg_id integer DEFAULT nextval(('s_stock_goods'::text)::regclass) NOT NULL, - j_id integer, - f_id integer, - sg_code text, - sg_quantity numeric(8,4) DEFAULT 0, - sg_type character(1) DEFAULT 'c'::bpchar NOT NULL, - sg_date date, - sg_tech_date date DEFAULT now(), - sg_tech_user text, - sg_comment character varying(80), - sg_exercice character varying(4), - CONSTRAINT stock_goods_sg_type CHECK (((sg_type = 'c'::bpchar) OR (sg_type = 'd'::bpchar))) -); - - --- --- Name: TABLE stock_goods; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE stock_goods IS 'About the goods'; - - --- --- Name: tmp_pcmn; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE tmp_pcmn ( - pcm_val account_type NOT NULL, - pcm_lib text, - pcm_val_parent account_type DEFAULT 0, - pcm_type text -); - - --- --- Name: TABLE tmp_pcmn; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE tmp_pcmn IS 'Plan comptable minimum normalisé'; - - --- --- Name: todo_list_tl_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE todo_list_tl_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: todo_list_tl_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('todo_list_tl_id_seq', 1, false); - - -SET default_with_oids = false; - --- --- Name: todo_list; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE todo_list ( - tl_id integer DEFAULT nextval('todo_list_tl_id_seq'::regclass) NOT NULL, - tl_date date NOT NULL, - tl_title text NOT NULL, - tl_desc text, - use_login text NOT NULL -); - - --- --- Name: TABLE todo_list; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE todo_list IS 'Todo list'; - - -SET default_with_oids = true; - --- --- Name: tva_rate; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE tva_rate ( - tva_id integer DEFAULT nextval('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 -); - - --- --- Name: TABLE tva_rate; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE tva_rate IS 'Rate of vat'; - - --- --- Name: user_local_pref; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE user_local_pref ( - user_id text NOT NULL, - parameter_type text NOT NULL, - parameter_value text -); - - --- --- Name: TABLE user_local_pref; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE user_local_pref IS 'The user''s local parameter '; - - --- --- Name: COLUMN user_local_pref.user_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN user_local_pref.user_id IS 'user''s login '; - - --- --- Name: COLUMN user_local_pref.parameter_type; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN user_local_pref.parameter_type IS 'the type of parameter '; - - --- --- Name: COLUMN user_local_pref.parameter_value; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN user_local_pref.parameter_value IS 'the value of parameter '; - - --- --- Name: user_sec_act; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE user_sec_act ( - ua_id integer DEFAULT nextval(('s_user_act'::text)::regclass) NOT NULL, - ua_login text, - ua_act_id integer -); - - -SET default_with_oids = false; - --- --- Name: user_sec_extension; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE user_sec_extension ( - use_id integer NOT NULL, - ex_id integer NOT NULL, - use_login text NOT NULL, - use_access character(1) DEFAULT 0 NOT NULL -); - - --- --- Name: TABLE user_sec_extension; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE user_sec_extension IS 'Security for extension'; - - --- --- Name: user_sec_extension_use_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE user_sec_extension_use_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: user_sec_extension_use_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE user_sec_extension_use_id_seq OWNED BY user_sec_extension.use_id; - - --- --- Name: user_sec_extension_use_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('user_sec_extension_use_id_seq', 1, false); - - -SET default_with_oids = true; - --- --- Name: user_sec_jrn; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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 -); - - --- --- Name: v_all_menu; Type: VIEW; Schema: public; Owner: - --- - -CREATE VIEW v_all_menu AS - SELECT pm.me_code, pm.pm_id, pm.me_code_dep, pm.p_order, pm.p_type_display, pu.user_name, pu.pu_id, 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_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)) ORDER BY pm.p_order; - - --- --- Name: version; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE version ( - val integer -); - - --- --- Name: vw_client; Type: VIEW; Schema: public; Owner: - --- - -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)) 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 = 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 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 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 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 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 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 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 fiche_detail WHERE (fiche_detail.ad_id = 18)) h USING (f_id)) WHERE (fiche_def_ref.frd_id = 9); - - --- --- Name: vw_fiche_attr; Type: VIEW; Schema: public; Owner: - --- - -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 FROM ((((((((((((SELECT fiche.f_id, fiche.fd_id, fiche_detail.ad_value FROM (fiche LEFT JOIN fiche_detail USING (f_id)) WHERE (fiche_detail.ad_id = 1)) a LEFT JOIN (SELECT fiche_detail.f_id, fiche_detail.ad_value FROM 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 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 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 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 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 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 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 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 fiche_detail WHERE (fiche_detail.ad_id = 32)) k ON ((a.f_id = k.f_id))) LEFT JOIN tva_rate ON ((d.ad_value = (tva_rate.tva_id)::text))) JOIN fiche_def USING (fd_id)); - - --- --- Name: vw_fiche_def; Type: VIEW; Schema: public; Owner: - --- - -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))); - - --- --- Name: VIEW vw_fiche_def; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON VIEW vw_fiche_def IS 'all the attributs for card family'; - - --- --- Name: vw_fiche_min; Type: VIEW; Schema: public; Owner: - --- - -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)); - - --- --- Name: vw_fiche_name; Type: VIEW; Schema: public; Owner: - --- - -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); - - --- --- Name: vw_poste_qcode; Type: VIEW; Schema: public; Owner: - --- - -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)); - - --- --- Name: vw_supplier; Type: VIEW; Schema: public; Owner: - --- - -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)) 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 = 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 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 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 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 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 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 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 fiche_detail WHERE (fiche_detail.ad_id = 18)) h USING (f_id)) WHERE (fiche_def_ref.frd_id = 8); - - --- --- Name: ad_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY action_detail ALTER COLUMN ad_id SET DEFAULT nextval('action_detail_ad_id_seq'::regclass); - - --- --- Name: del_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY del_action ALTER COLUMN del_id SET DEFAULT nextval('del_action_del_id_seq'::regclass); - - --- --- Name: dj_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY del_jrn ALTER COLUMN dj_id SET DEFAULT nextval('del_jrn_dj_id_seq'::regclass); - - --- --- Name: djx_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY del_jrnx ALTER COLUMN djx_id SET DEFAULT nextval('del_jrnx_djx_id_seq'::regclass); - - --- --- Name: ex_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY extension ALTER COLUMN ex_id SET DEFAULT nextval('extension_ex_id_seq'::regclass); - - --- --- Name: f_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY forecast ALTER COLUMN f_id SET DEFAULT nextval('forecast_f_id_seq'::regclass); - - --- --- Name: fc_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY forecast_cat ALTER COLUMN fc_id SET DEFAULT nextval('forecast_cat_fc_id_seq'::regclass); - - --- --- Name: fi_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY forecast_item ALTER COLUMN fi_id SET DEFAULT nextval('forecast_item_fi_id_seq'::regclass); - - --- --- Name: jl_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jnt_letter ALTER COLUMN jl_id SET DEFAULT nextval('jnt_letter_jl_id_seq'::regclass); - - --- --- Name: ji_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrn_info ALTER COLUMN ji_id SET DEFAULT nextval('jrn_info_ji_id_seq'::regclass); - - --- --- Name: n_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrn_note ALTER COLUMN n_id SET DEFAULT nextval('jrn_note_n_id_seq'::regclass); - - --- --- Name: lc_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY letter_cred ALTER COLUMN lc_id SET DEFAULT nextval('letter_cred_lc_id_seq'::regclass); - - --- --- Name: ld_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY letter_deb ALTER COLUMN ld_id SET DEFAULT nextval('letter_deb_ld_id_seq'::regclass); - - --- --- Name: mp_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY mod_payment ALTER COLUMN mp_id SET DEFAULT nextval('mod_payment_mp_id_seq'::regclass); - - --- --- Name: p_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY profile ALTER COLUMN p_id SET DEFAULT nextval('profile_p_id_seq'::regclass); - - --- --- Name: pm_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY profile_menu ALTER COLUMN pm_id SET DEFAULT nextval('profile_menu_pm_id_seq'::regclass); - - --- --- Name: pu_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY profile_user ALTER COLUMN pu_id SET DEFAULT nextval('profile_user_pu_id_seq'::regclass); - - --- --- Name: qf_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY quant_fin ALTER COLUMN qf_id SET DEFAULT nextval('quant_fin_qf_id_seq'::regclass); - - --- --- Name: use_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY user_sec_extension ALTER COLUMN use_id SET DEFAULT nextval('user_sec_extension_use_id_seq'::regclass); - - --- --- Data for Name: action; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO action VALUES (800, 'Ajout de fiche', 'fiche', 'FICADD'); -INSERT INTO action VALUES (805, 'Création, modification et effacement de fiche', 'fiche', 'FIC'); -INSERT INTO action VALUES (910, 'création, modification et effacement de catégorie de fiche', 'fiche', 'FICCAT'); -INSERT INTO action VALUES (1020, 'Effacer les documents du suivi', 'followup', 'RMDOC'); -INSERT INTO action VALUES (1010, 'Voir les documents du suivi', 'followup', 'VIEWDOC'); -INSERT INTO action VALUES (1050, 'Modifier le type de document', 'followup', 'PARCATDOC'); - - --- --- Data for Name: action_detail; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: action_gestion; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: attr_def; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO attr_def VALUES (20, 'Partie fiscalement non déductible', 'numeric', '22'); -INSERT INTO attr_def VALUES (10, 'Date début', 'date', '8'); -INSERT INTO attr_def VALUES (6, 'Prix vente', 'numeric', '6'); -INSERT INTO attr_def VALUES (7, 'Prix achat', 'numeric', '6'); -INSERT INTO attr_def VALUES (8, 'Durée Amortissement', 'numeric', '6'); -INSERT INTO attr_def VALUES (11, 'Montant initial', 'numeric', '6'); -INSERT INTO attr_def VALUES (21, 'TVA non déductible', 'numeric', '6'); -INSERT INTO attr_def VALUES (22, 'TVA non déductible récupérable par l''impôt', 'numeric', '6'); -INSERT INTO attr_def VALUES (1, 'Nom', 'text', '22'); -INSERT INTO attr_def VALUES (2, 'Taux TVA', 'text', '22'); -INSERT INTO attr_def VALUES (3, 'Numéro de compte', 'text', '22'); -INSERT INTO attr_def VALUES (4, 'Nom de la banque', 'text', '22'); -INSERT INTO attr_def VALUES (5, 'Poste Comptable', 'text', '22'); -INSERT INTO attr_def VALUES (9, 'Description', 'text', '22'); -INSERT INTO attr_def VALUES (12, 'Personne de contact ', 'text', '22'); -INSERT INTO attr_def VALUES (13, 'numéro de tva ', 'text', '22'); -INSERT INTO attr_def VALUES (14, 'Adresse ', 'text', '22'); -INSERT INTO attr_def VALUES (16, 'pays ', 'text', '22'); -INSERT INTO attr_def VALUES (17, 'téléphone ', 'text', '22'); -INSERT INTO attr_def VALUES (18, 'email ', 'text', '22'); -INSERT INTO attr_def VALUES (19, 'Gestion stock', 'text', '22'); -INSERT INTO attr_def VALUES (23, 'Quick Code', 'text', '22'); -INSERT INTO attr_def VALUES (24, 'Ville', 'text', '22'); -INSERT INTO attr_def VALUES (25, 'Société', 'text', '22'); -INSERT INTO attr_def VALUES (26, 'Fax', 'text', '22'); -INSERT INTO attr_def VALUES (27, 'GSM', 'text', '22'); -INSERT INTO attr_def VALUES (15, 'code postal', 'text', '22'); -INSERT INTO attr_def VALUES (30, 'Numero de client', 'text', '22'); -INSERT INTO attr_def VALUES (32, 'Prénom', 'text', '22'); -INSERT INTO attr_def VALUES (31, 'Dépense charge du grant (partie privé) ', 'text', '22'); -INSERT INTO attr_def VALUES (50, 'Contrepartie pour TVA récup par impot', 'poste', '22'); -INSERT INTO attr_def VALUES (51, 'Contrepartie pour TVA non Ded.', 'poste', '22'); -INSERT INTO attr_def VALUES (52, 'Contrepartie pour dépense à charge du gérant', 'poste', '22'); -INSERT INTO attr_def VALUES (53, 'Contrepartie pour dépense fiscal. non déd.', 'poste', '22'); - - --- --- Data for Name: attr_min; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO attr_min VALUES (1, 1); -INSERT INTO attr_min VALUES (1, 2); -INSERT INTO attr_min VALUES (2, 1); -INSERT INTO attr_min VALUES (2, 2); -INSERT INTO attr_min VALUES (3, 1); -INSERT INTO attr_min VALUES (3, 2); -INSERT INTO attr_min VALUES (4, 1); -INSERT INTO attr_min VALUES (4, 3); -INSERT INTO attr_min VALUES (4, 4); -INSERT INTO attr_min VALUES (4, 12); -INSERT INTO attr_min VALUES (4, 13); -INSERT INTO attr_min VALUES (4, 14); -INSERT INTO attr_min VALUES (4, 15); -INSERT INTO attr_min VALUES (4, 16); -INSERT INTO attr_min VALUES (4, 17); -INSERT INTO attr_min VALUES (4, 18); -INSERT INTO attr_min VALUES (8, 1); -INSERT INTO attr_min VALUES (8, 12); -INSERT INTO attr_min VALUES (8, 13); -INSERT INTO attr_min VALUES (8, 14); -INSERT INTO attr_min VALUES (8, 15); -INSERT INTO attr_min VALUES (8, 16); -INSERT INTO attr_min VALUES (8, 17); -INSERT INTO attr_min VALUES (8, 18); -INSERT INTO attr_min VALUES (9, 1); -INSERT INTO attr_min VALUES (9, 12); -INSERT INTO attr_min VALUES (9, 13); -INSERT INTO attr_min VALUES (9, 14); -INSERT INTO attr_min VALUES (9, 16); -INSERT INTO attr_min VALUES (9, 17); -INSERT INTO attr_min VALUES (9, 18); -INSERT INTO attr_min VALUES (1, 6); -INSERT INTO attr_min VALUES (1, 7); -INSERT INTO attr_min VALUES (2, 6); -INSERT INTO attr_min VALUES (2, 7); -INSERT INTO attr_min VALUES (3, 7); -INSERT INTO attr_min VALUES (1, 19); -INSERT INTO attr_min VALUES (2, 19); -INSERT INTO attr_min VALUES (14, 1); -INSERT INTO attr_min VALUES (5, 1); -INSERT INTO attr_min VALUES (5, 4); -INSERT INTO attr_min VALUES (5, 10); -INSERT INTO attr_min VALUES (5, 12); -INSERT INTO attr_min VALUES (6, 1); -INSERT INTO attr_min VALUES (6, 4); -INSERT INTO attr_min VALUES (6, 10); -INSERT INTO attr_min VALUES (6, 12); -INSERT INTO attr_min VALUES (10, 1); -INSERT INTO attr_min VALUES (10, 12); -INSERT INTO attr_min VALUES (11, 1); -INSERT INTO attr_min VALUES (11, 12); -INSERT INTO attr_min VALUES (12, 1); -INSERT INTO attr_min VALUES (12, 12); -INSERT INTO attr_min VALUES (13, 1); -INSERT INTO attr_min VALUES (13, 9); -INSERT INTO attr_min VALUES (7, 1); -INSERT INTO attr_min VALUES (7, 8); -INSERT INTO attr_min VALUES (7, 9); -INSERT INTO attr_min VALUES (7, 10); -INSERT INTO attr_min VALUES (5, 11); -INSERT INTO attr_min VALUES (6, 11); -INSERT INTO attr_min VALUES (1, 15); -INSERT INTO attr_min VALUES (9, 15); -INSERT INTO attr_min VALUES (15, 1); -INSERT INTO attr_min VALUES (15, 9); -INSERT INTO attr_min VALUES (1, 23); -INSERT INTO attr_min VALUES (2, 23); -INSERT INTO attr_min VALUES (3, 23); -INSERT INTO attr_min VALUES (4, 23); -INSERT INTO attr_min VALUES (5, 23); -INSERT INTO attr_min VALUES (6, 23); -INSERT INTO attr_min VALUES (8, 23); -INSERT INTO attr_min VALUES (9, 23); -INSERT INTO attr_min VALUES (10, 23); -INSERT INTO attr_min VALUES (11, 23); -INSERT INTO attr_min VALUES (12, 23); -INSERT INTO attr_min VALUES (13, 23); -INSERT INTO attr_min VALUES (14, 23); -INSERT INTO attr_min VALUES (15, 23); -INSERT INTO attr_min VALUES (7, 23); -INSERT INTO attr_min VALUES (9, 24); -INSERT INTO attr_min VALUES (8, 24); -INSERT INTO attr_min VALUES (14, 24); -INSERT INTO attr_min VALUES (16, 1); -INSERT INTO attr_min VALUES (16, 17); -INSERT INTO attr_min VALUES (16, 18); -INSERT INTO attr_min VALUES (16, 25); -INSERT INTO attr_min VALUES (16, 26); -INSERT INTO attr_min VALUES (16, 27); -INSERT INTO attr_min VALUES (16, 23); -INSERT INTO attr_min VALUES (17, 1); -INSERT INTO attr_min VALUES (17, 9); -INSERT INTO attr_min VALUES (18, 1); -INSERT INTO attr_min VALUES (18, 9); -INSERT INTO attr_min VALUES (25, 1); -INSERT INTO attr_min VALUES (25, 4); -INSERT INTO attr_min VALUES (25, 3); -INSERT INTO attr_min VALUES (25, 5); -INSERT INTO attr_min VALUES (25, 15); -INSERT INTO attr_min VALUES (25, 16); -INSERT INTO attr_min VALUES (25, 24); -INSERT INTO attr_min VALUES (25, 23); -INSERT INTO attr_min VALUES (2, 30); - - --- --- Data for Name: bilan; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO bilan VALUES (5, 'Comptes de résultat', 'document/fr_fr/fr_plan_abrege_perso_cr1000.rtf', 'document/fr_fr/fr_plan_abrege_perso_cr1000.form', 'rtf'); -INSERT INTO bilan VALUES (1, 'Bilan français', 'document/fr_fr/fr_plan_abrege_perso_bil10000.ods', 'document/fr_fr/fr_plan_abrege_perso_bil10000.form', 'ods'); - - --- --- Data for Name: centralized; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: del_action; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: del_jrn; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: del_jrnx; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: document; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: document_modele; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: document_state; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO document_state VALUES (1, 'Clôturé'); -INSERT INTO document_state VALUES (2, 'A suivre'); -INSERT INTO document_state VALUES (3, 'A faire'); -INSERT INTO document_state VALUES (4, 'Abandonné'); - - --- --- Data for Name: document_type; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO document_type VALUES (1, 'Document Interne'); -INSERT INTO document_type VALUES (2, 'Bons de commande client'); -INSERT INTO document_type VALUES (3, 'Bon de commande Fournisseur'); -INSERT INTO document_type VALUES (4, 'Facture'); -INSERT INTO document_type VALUES (5, 'Lettre de rappel'); -INSERT INTO document_type VALUES (6, 'Courrier'); -INSERT INTO document_type VALUES (7, 'Proposition'); -INSERT INTO document_type VALUES (8, 'Email'); -INSERT INTO document_type VALUES (9, 'Divers'); -INSERT INTO document_type VALUES (10, 'Note de frais'); -INSERT INTO document_type VALUES (20, 'Réception commande Fournisseur'); -INSERT INTO document_type VALUES (21, 'Réception commande Client'); -INSERT INTO document_type VALUES (22, 'Réception magazine'); - - --- --- Data for Name: extension; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: fiche; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: fiche_def; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO fiche_def VALUES (2, '400', 'Client', true, 9); -INSERT INTO fiche_def VALUES (1, '604', 'Marchandises', true, 2); -INSERT INTO fiche_def VALUES (3, '5500', 'Banque', true, 4); -INSERT INTO fiche_def VALUES (4, '440', 'Fournisseur', true, 8); -INSERT INTO fiche_def VALUES (5, '61', 'S & B D', true, 3); -INSERT INTO fiche_def VALUES (6, '700', 'Vente', true, 1); - - --- --- Data for Name: fiche_def_ref; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO fiche_def_ref VALUES (13, 'Dépenses non admises', '674'); -INSERT INTO fiche_def_ref VALUES (14, 'Administration des Finances', NULL); -INSERT INTO fiche_def_ref VALUES (15, 'Autres fiches', NULL); -INSERT INTO fiche_def_ref VALUES (4, 'Banque', '51'); -INSERT INTO fiche_def_ref VALUES (5, 'Prêt > a un an', '27'); -INSERT INTO fiche_def_ref VALUES (8, 'Fournisseurs', '400'); -INSERT INTO fiche_def_ref VALUES (6, 'Prêt < a un an', NULL); -INSERT INTO fiche_def_ref VALUES (16, 'Contact', NULL); -INSERT INTO fiche_def_ref VALUES (1, 'Vente Service', '706'); -INSERT INTO fiche_def_ref VALUES (2, 'Achat Marchandises', '603'); -INSERT INTO fiche_def_ref VALUES (9, 'Clients', '410'); -INSERT INTO fiche_def_ref VALUES (10, 'Salaire Administrateur', '644'); -INSERT INTO fiche_def_ref VALUES (11, 'Salaire Ouvrier', '641'); -INSERT INTO fiche_def_ref VALUES (12, 'Salaire Employé', '641'); -INSERT INTO fiche_def_ref VALUES (7, 'Matériel à amortir, immobilisation corporelle', '21'); -INSERT INTO fiche_def_ref VALUES (3, 'Achat Service et biens divers', '61'); -INSERT INTO fiche_def_ref VALUES (17, 'Escomptes accordées', '66'); -INSERT INTO fiche_def_ref VALUES (18, 'Produits Financiers', '76'); -INSERT INTO fiche_def_ref VALUES (25, 'Compte Salarié / Administrateur', NULL); - - --- --- Data for Name: fiche_detail; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: forecast; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: forecast_cat; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: forecast_item; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: form; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO form VALUES (3000398, 3000000, 1, 'Prestation [ case 03 ]', '[700%]-[7000005]'); -INSERT INTO form VALUES (3000399, 3000000, 2, 'Prestation intra [ case 47 ]', '[7000005]'); -INSERT INTO form VALUES (3000400, 3000000, 3, 'Tva due [case 54]', '[4513]+[4512]+[4511] FROM=01.2005'); -INSERT INTO form VALUES (3000401, 3000000, 4, 'Marchandises, matière première et auxiliaire [case 81 ]', '[60%]'); -INSERT INTO form VALUES (3000402, 3000000, 7, 'Service et bien divers [case 82]', '[61%]'); -INSERT INTO form VALUES (3000403, 3000000, 8, 'bien d''invest [ case 83 ]', '[2400%]'); -INSERT INTO form VALUES (3000404, 3000000, 9, 'TVA déductible [ case 59 ]', 'abs([4117]-[411%])'); -INSERT INTO form VALUES (3000405, 3000000, 8, 'TVA non ded -> voiture', '[610022]*0.21/2'); -INSERT INTO form VALUES (3000406, 3000000, 9, 'Acompte TVA', '[4117]'); - - --- --- Data for Name: formdef; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO formdef VALUES (3000000, 'TVA déclaration Belge'); - - --- --- Data for Name: groupe_analytique; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: info_def; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO info_def VALUES ('BON_COMMANDE', 'Numero de bon de commande'); -INSERT INTO info_def VALUES ('OTHER', 'Info diverses'); - - --- --- Data for Name: jnt_fic_attr; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO jnt_fic_attr VALUES (1, 2, 3, 1); -INSERT INTO jnt_fic_attr VALUES (2, 12, 8, 1); -INSERT INTO jnt_fic_attr VALUES (3, 3, 17, 1); -INSERT INTO jnt_fic_attr VALUES (4, 12, 28, 1); -INSERT INTO jnt_fic_attr VALUES (5, 2, 37, 1); -INSERT INTO jnt_fic_attr VALUES (6, 2, 41, 1); -INSERT INTO jnt_fic_attr VALUES (1, 6, 4, 120); -INSERT INTO jnt_fic_attr VALUES (6, 6, 42, 120); -INSERT INTO jnt_fic_attr VALUES (1, 7, 5, 130); -INSERT INTO jnt_fic_attr VALUES (5, 7, 38, 130); -INSERT INTO jnt_fic_attr VALUES (6, 7, 43, 130); -INSERT INTO jnt_fic_attr VALUES (2, 14, 10, 40); -INSERT INTO jnt_fic_attr VALUES (3, 14, 21, 40); -INSERT INTO jnt_fic_attr VALUES (4, 14, 30, 40); -INSERT INTO jnt_fic_attr VALUES (2, 16, 12, 70); -INSERT INTO jnt_fic_attr VALUES (3, 16, 23, 70); -INSERT INTO jnt_fic_attr VALUES (4, 16, 32, 70); -INSERT INTO jnt_fic_attr VALUES (2, 17, 13, 80); -INSERT INTO jnt_fic_attr VALUES (3, 17, 24, 80); -INSERT INTO jnt_fic_attr VALUES (4, 17, 33, 80); -INSERT INTO jnt_fic_attr VALUES (2, 18, 14, 90); -INSERT INTO jnt_fic_attr VALUES (3, 18, 25, 90); -INSERT INTO jnt_fic_attr VALUES (4, 18, 34, 90); -INSERT INTO jnt_fic_attr VALUES (2, 23, 45, 400); -INSERT INTO jnt_fic_attr VALUES (1, 23, 46, 400); -INSERT INTO jnt_fic_attr VALUES (3, 23, 47, 400); -INSERT INTO jnt_fic_attr VALUES (4, 23, 48, 400); -INSERT INTO jnt_fic_attr VALUES (5, 23, 49, 400); -INSERT INTO jnt_fic_attr VALUES (6, 23, 50, 400); -INSERT INTO jnt_fic_attr VALUES (2, 24, 51, 60); -INSERT INTO jnt_fic_attr VALUES (4, 24, 52, 60); -INSERT INTO jnt_fic_attr VALUES (2, 15, 11, 50); -INSERT INTO jnt_fic_attr VALUES (3, 15, 22, 50); -INSERT INTO jnt_fic_attr VALUES (4, 15, 31, 50); -INSERT INTO jnt_fic_attr VALUES (1, 5, 1, 30); -INSERT INTO jnt_fic_attr VALUES (2, 5, 6, 30); -INSERT INTO jnt_fic_attr VALUES (3, 5, 15, 30); -INSERT INTO jnt_fic_attr VALUES (4, 5, 26, 30); -INSERT INTO jnt_fic_attr VALUES (5, 5, 35, 30); -INSERT INTO jnt_fic_attr VALUES (6, 5, 39, 30); -INSERT INTO jnt_fic_attr VALUES (1, 1, 2, 0); -INSERT INTO jnt_fic_attr VALUES (2, 1, 7, 0); -INSERT INTO jnt_fic_attr VALUES (3, 1, 16, 0); -INSERT INTO jnt_fic_attr VALUES (4, 1, 27, 0); -INSERT INTO jnt_fic_attr VALUES (5, 1, 36, 0); -INSERT INTO jnt_fic_attr VALUES (6, 1, 40, 0); -INSERT INTO jnt_fic_attr VALUES (3, 4, 18, 2); -INSERT INTO jnt_fic_attr VALUES (3, 12, 19, 3); -INSERT INTO jnt_fic_attr VALUES (6, 19, 44, 2); -INSERT INTO jnt_fic_attr VALUES (2, 13, 9, 31); -INSERT INTO jnt_fic_attr VALUES (3, 13, 20, 31); -INSERT INTO jnt_fic_attr VALUES (4, 13, 29, 31); - - --- --- Data for Name: jnt_letter; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: jrn; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: jrn_action; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO jrn_action VALUES (2, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'VEN'); -INSERT INTO jrn_action VALUES (4, 'Voir Impayés', 'Voir toutes les factures non payées', 'user_jrn.php', 'action=voir_jrn_non_paye', 'FR', 'VEN'); -INSERT INTO jrn_action VALUES (1, 'Nouvelle', 'Création d''une facture', 'user_jrn.php', 'action=insert_vente&blank', 'FR', 'VEN'); -INSERT INTO jrn_action VALUES (10, 'Nouveau', 'Encode un nouvel achat (matériel, marchandises, services et biens divers)', 'user_jrn.php', 'action=new&blank', 'FR', 'ACH'); -INSERT INTO jrn_action VALUES (12, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'ACH'); -INSERT INTO jrn_action VALUES (14, 'Voir Impayés', 'Voir toutes les factures non payées', 'user_jrn.php', 'action=voir_jrn_non_paye', 'FR', 'ACH'); -INSERT INTO jrn_action VALUES (20, 'Nouveau', 'Encode un nouvel achat (matériel, marchandises, services et biens divers)', 'user_jrn.php', 'action=new&blank', 'FR', 'FIN'); -INSERT INTO jrn_action VALUES (22, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'FIN'); -INSERT INTO jrn_action VALUES (40, 'Soldes', 'Voir les soldes des comptes en banques', 'user_jrn.php', 'action=solde', 'FR', 'FIN'); -INSERT INTO jrn_action VALUES (30, 'Nouveau', NULL, 'user_jrn.php', 'action=new&blank', 'FR', 'ODS'); -INSERT INTO jrn_action VALUES (32, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'ODS'); - - --- --- Data for Name: jrn_def; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO jrn_def VALUES (4, 'Opération Diverses', NULL, NULL, NULL, NULL, 5, 5, false, NULL, 'ODS', 'O01', 'ODS', NULL, NULL); -INSERT INTO jrn_def VALUES (2, 'Vente', '', '', '2', '6', 10, 10, true, '''echeance''', 'VEN', 'V01', 'VEN', NULL, NULL); -INSERT INTO jrn_def VALUES (3, 'Achat', '', '', '5', '4', 10, 10, true, '''echeance''', 'ACH', 'A01', 'ACH', NULL, NULL); -INSERT INTO jrn_def VALUES (1, 'Financier', '', '', '3,2,4,5', '3,2,4,5', 10, 10, true, '''echeance''', 'FIN', 'F01', 'FIN', NULL, NULL); - - --- --- Data for Name: jrn_info; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: jrn_note; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: jrn_periode; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO jrn_periode VALUES (4, 105, 'OP'); -INSERT INTO jrn_periode VALUES (2, 105, 'OP'); -INSERT INTO jrn_periode VALUES (3, 105, 'OP'); -INSERT INTO jrn_periode VALUES (1, 105, 'OP'); -INSERT INTO jrn_periode VALUES (4, 106, 'OP'); -INSERT INTO jrn_periode VALUES (2, 106, 'OP'); -INSERT INTO jrn_periode VALUES (3, 106, 'OP'); -INSERT INTO jrn_periode VALUES (1, 106, 'OP'); -INSERT INTO jrn_periode VALUES (4, 107, 'OP'); -INSERT INTO jrn_periode VALUES (2, 107, 'OP'); -INSERT INTO jrn_periode VALUES (3, 107, 'OP'); -INSERT INTO jrn_periode VALUES (1, 107, 'OP'); -INSERT INTO jrn_periode VALUES (4, 108, 'OP'); -INSERT INTO jrn_periode VALUES (2, 108, 'OP'); -INSERT INTO jrn_periode VALUES (3, 108, 'OP'); -INSERT INTO jrn_periode VALUES (1, 108, 'OP'); -INSERT INTO jrn_periode VALUES (4, 109, 'OP'); -INSERT INTO jrn_periode VALUES (2, 109, 'OP'); -INSERT INTO jrn_periode VALUES (3, 109, 'OP'); -INSERT INTO jrn_periode VALUES (1, 109, 'OP'); -INSERT INTO jrn_periode VALUES (4, 110, 'OP'); -INSERT INTO jrn_periode VALUES (2, 110, 'OP'); -INSERT INTO jrn_periode VALUES (3, 110, 'OP'); -INSERT INTO jrn_periode VALUES (1, 110, 'OP'); -INSERT INTO jrn_periode VALUES (4, 111, 'OP'); -INSERT INTO jrn_periode VALUES (2, 111, 'OP'); -INSERT INTO jrn_periode VALUES (3, 111, 'OP'); -INSERT INTO jrn_periode VALUES (1, 111, 'OP'); -INSERT INTO jrn_periode VALUES (4, 112, 'OP'); -INSERT INTO jrn_periode VALUES (2, 112, 'OP'); -INSERT INTO jrn_periode VALUES (3, 112, 'OP'); -INSERT INTO jrn_periode VALUES (1, 112, 'OP'); -INSERT INTO jrn_periode VALUES (4, 113, 'OP'); -INSERT INTO jrn_periode VALUES (2, 113, 'OP'); -INSERT INTO jrn_periode VALUES (3, 113, 'OP'); -INSERT INTO jrn_periode VALUES (1, 113, 'OP'); -INSERT INTO jrn_periode VALUES (4, 114, 'OP'); -INSERT INTO jrn_periode VALUES (2, 114, 'OP'); -INSERT INTO jrn_periode VALUES (3, 114, 'OP'); -INSERT INTO jrn_periode VALUES (1, 114, 'OP'); -INSERT INTO jrn_periode VALUES (4, 115, 'OP'); -INSERT INTO jrn_periode VALUES (2, 115, 'OP'); -INSERT INTO jrn_periode VALUES (3, 115, 'OP'); -INSERT INTO jrn_periode VALUES (1, 115, 'OP'); -INSERT INTO jrn_periode VALUES (4, 116, 'OP'); -INSERT INTO jrn_periode VALUES (2, 116, 'OP'); -INSERT INTO jrn_periode VALUES (3, 116, 'OP'); -INSERT INTO jrn_periode VALUES (1, 116, 'OP'); -INSERT INTO jrn_periode VALUES (4, 117, 'OP'); -INSERT INTO jrn_periode VALUES (2, 117, 'OP'); -INSERT INTO jrn_periode VALUES (3, 117, 'OP'); -INSERT INTO jrn_periode VALUES (1, 117, 'OP'); - - --- --- Data for Name: jrn_rapt; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: jrn_type; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO jrn_type VALUES ('VEN', 'Vente'); -INSERT INTO jrn_type VALUES ('ACH', 'Achat'); -INSERT INTO jrn_type VALUES ('ODS', 'Opérations Diverses'); -INSERT INTO jrn_type VALUES ('FIN', 'Banque'); - - --- --- Data for Name: jrnx; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: letter_cred; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: letter_deb; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: menu_ref; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO menu_ref VALUES ('ACH', 'Achat', 'compta_ach.inc.php', NULL, 'Nouvel achat ou dépense', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCHOP', 'Historique', 'anc_history.inc.php', NULL, 'Historique des imputations analytiques', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCGL', 'Grand''Livre', 'anc_great_ledger.inc.php', NULL, 'Grand livre d''plan analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCBS', 'Balance simple', 'anc_balance_simple.inc.php', NULL, 'Balance simple des imputations analytiques', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCBC2', 'Balance croisée double', 'anc_balance_double.inc.php', NULL, 'Balance double croisées des imputations analytiques', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCTAB', 'Tableau', 'anc_acc_table.inc.php', NULL, 'Tableau lié à la comptabilité', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCBCC', 'Balance Analytique/comptabilité', 'anc_acc_balance.inc.php', NULL, 'Lien entre comptabilité et Comptabilité analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCGR', 'Groupe', 'anc_group_balance.inc.php', NULL, 'Balance par groupe', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CSV:AncGrandLivre', 'Impression Grand-Livre', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncBalGroup', 'Export Balance groupe analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('OTH:Bilan', 'Export Bilan', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:ledger', 'Export Journaux', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:postedetail', 'Export Poste détail', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:postedetail', 'Export Poste détail', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:fichedetail', 'Export Fiche détail', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('SEARCH', 'Recherche', NULL, NULL, 'Recherche', NULL, 'popup_recherche()', 'ME'); -INSERT INTO menu_ref VALUES ('DIVPARM', 'Divers', NULL, NULL, 'Paramètres divers', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGTVA', 'TVA', 'tva.inc.php', NULL, 'Config. de la tva', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CARD', 'Fiche', 'fiche.inc.php', NULL, 'Fiche', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('STOCK', 'Stock', 'stock.inc.php', NULL, 'Stock', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('MOD', 'Menu et profile', NULL, NULL, 'Menu ', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGPRO', 'Profile', 'profile.inc.php', NULL, 'Configuration profile', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGPAY', 'Moyen de paiement', 'payment_middle.inc.php', NULL, 'Config. des méthodes de paiement', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGACC', 'Poste', 'poste.inc.php', NULL, 'Config. poste comptable de base', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('VEN', 'Vente', 'compta_ven.inc.php', NULL, 'Nouvelle vente ou recette', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGMENU', 'Config. Menu', 'menu.inc.php', NULL, 'Configuration des menus et plugins', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('COMPANY', 'Sociétés', 'company.inc.php', NULL, 'Parametre societe', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PERIODE', 'Période', 'periode.inc.php', NULL, 'Gestion des périodes', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PDF:fichedetail', 'Export Fiche détail', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:fiche_balance', 'Export Fiche balance', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:fiche_balance', 'Export Fiche balance', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:report', 'Export report', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:report', 'Export report', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:fiche', 'Export Fiche', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:fiche', 'Export Fiche', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:glcompte', 'Export Grand Livre', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:glcompte', 'Export Grand Livre', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:sec', 'Export Sécurité', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncList', 'Export Comptabilité analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncBalSimple', 'Export Comptabilité analytique balance simple', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:AncBalSimple', 'Export Comptabilité analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncBalDouble', 'Export Comptabilité analytique balance double', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:AncBalDouble', 'Export Comptabilité analytique balance double', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:balance', 'Export Balance comptable', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:balance', 'Export Balance comptable', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:histo', 'Export Historique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:ledger', 'Export Journaux', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncTable', 'Export Tableau Analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncAccList', 'Export Historique Compt. Analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('SUPPL', 'Fournisseur', 'supplier.inc.php', NULL, 'Suivi fournisseur', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('LET', 'Lettrage', NULL, NULL, 'Lettrage', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCODS', 'Opérations diverses', 'anc_od.inc.php', NULL, 'OD analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('VERIFBIL', 'Vérification ', 'verif_bilan.inc.php', NULL, 'Vérification de la comptabilité', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('REPORT', 'Création de rapport', 'report.inc.php', NULL, 'Création de rapport', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('OPEN', 'Ecriture Ouverture', 'opening.inc.php', NULL, 'Ecriture d''ouverture', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ACHIMP', 'Historique achat', 'history_operation.inc.php', NULL, 'Historique achat', 'ledger_type=ACH', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FOLLOW', 'Courrier', 'action.inc.php', NULL, 'Suivi, courrier, devis', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FORECAST', 'Prévision', 'forecast.inc.php', NULL, 'Prévision', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('EXT', 'Extension', 'extension_choice.inc.php', NULL, 'Extensions (plugins)', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGDOC', 'Document', 'document_modele.inc.php', NULL, 'Config. modèle de document', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGLED', 'journaux', 'cfgledger.inc.php', NULL, 'Configuration des journaux', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PREDOP', 'Ecriture prédefinie', 'preod.inc.php', NULL, 'Gestion des opérations prédéfinifies', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ADV', 'Avancé', NULL, NULL, 'Menu avancé', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANC', 'Compta Analytique', NULL, NULL, 'Module comptabilité analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGSEC', 'Sécurité', 'param_sec.inc.php', NULL, 'configuration de la sécurité', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PLANANC', 'Plan Compt. analytique', 'anc_pa.inc.php', NULL, 'Plan analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCGROUP', 'Groupe', 'anc_group.inc.php', NULL, 'Groupe analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ODSIMP', 'Historique opérations diverses', 'history_operation.inc.php', NULL, 'Historique opérations diverses', 'ledger_type=ODS', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('VENMENU', 'Vente / Recette', NULL, NULL, 'Menu ventes et recettes', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PREFERENCE', 'Préférence', 'pref.inc.php', NULL, 'Préférence', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('HIST', 'Historique', 'history_operation.inc.php', NULL, 'Historique', 'ledger_type=ALL', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('MENUFIN', 'Financier', NULL, NULL, 'Menu Financier', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FIMP', 'Historique financier', 'history_operation.inc.php', NULL, 'Historique financier', 'ledger_type=FIN', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('MENUACH', 'Achat', NULL, NULL, 'Menu achat', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('MENUODS', 'Opérations diverses', NULL, NULL, 'Menu opérations diverses', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ODS', 'Opérations Diverses', 'compta_ods.inc.php', NULL, 'Nouvelle opérations diverses', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FREC', 'Rapprochement', 'compta_fin_rec.inc.php', NULL, 'Rapprochement bancaire', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ADM', 'Administration', 'adm.inc.php', NULL, 'Suivi administration, banque', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FIN', 'Nouvel extrait', 'compta_fin.inc.php', NULL, 'Nouvel extrait bancaire', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGATCARD', 'Attribut de fiche', 'card_attr.inc.php', NULL, 'Gestion des modèles de fiches', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FSALDO', 'Soldes', 'compta_fin_saldo.inc.php', NULL, 'Solde des comptes en banques, caisse...', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('JSSEARCH', 'Recherche', NULL, NULL, 'Recherche', NULL, 'search_reconcile()', 'ME'); -INSERT INTO menu_ref VALUES ('LETACC', 'Lettrage par Poste', 'lettering.account.inc.php', NULL, 'lettrage par poste comptable', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CARDBAL', 'Balance', 'balance_card.inc.php', NULL, 'Balance par catégorie de fiche', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CUST', 'Client', 'client.inc.php', NULL, 'Suivi client', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGCARDCAT', 'Catégorie de fiche', 'fiche_def.inc.php', NULL, 'Gestion catégorie de fiche', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGCATDOC', 'Catégorie de documents', 'cat_document.inc.php', NULL, 'Config. catégorie de documents', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('VENIMP', 'Historique vente', 'history_operation.inc.php', NULL, 'Historique des ventes', 'ledger_type=VEN', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('LETCARD', 'Lettrage par Fiche', 'lettering.card.inc.php', NULL, 'Lettrage par fiche', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGPCMN', 'Plan Comptable', 'param_pcmn.inc.php', NULL, 'Config. du plan comptable', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('LOGOUT', 'Sortie', NULL, 'logout.php', 'Sortie', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('DASHBOARD', 'Tableau de bord', 'dashboard.inc.php', NULL, 'Tableau de bord', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('COMPTA', 'Comptabilité', NULL, NULL, 'Module comptabilité', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('GESTION', 'Gestion', NULL, NULL, 'Module gestion', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PARAM', 'Paramètre', NULL, NULL, 'Module paramètre', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTJRN', 'Historique', 'impress_jrn.inc.php', NULL, 'Impression historique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTREC', 'Rapprochement', 'impress_rec.inc.php', NULL, 'Impression des rapprochements', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTPOSTE', 'Poste', 'impress_poste.inc.php', NULL, 'Impression du détail d''un poste comptable', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTREPORT', 'Rapport', 'impress_rapport.inc.php', NULL, 'Impression de rapport', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTBILAN', 'Bilan', 'impress_bilan.inc.php', NULL, 'Impression de bilan', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTGL', 'Grand Livre', 'impress_gl_comptes.inc.php', NULL, 'Impression du grand livre', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTBAL', 'Balance', 'balance.inc.php', NULL, 'Impression des balances comptables', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTCARD', 'Catégorie de Fiches', 'impress_fiche.inc.php', NULL, 'Impression catégorie de fiches', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINT', 'Impression', NULL, NULL, 'Menu impression', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ACCESS', 'Accueil', NULL, 'user_login.php', 'Accueil', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCIMP', 'Impression', NULL, NULL, 'Impression compta. analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('new_line', 'saut de ligne', NULL, NULL, 'Saut de ligne', NULL, NULL, 'SP'); - - --- --- Data for Name: mod_payment; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO mod_payment VALUES (2, 'Caisse', 1, NULL, NULL, 2); -INSERT INTO mod_payment VALUES (1, 'Paiement électronique', 1, NULL, NULL, 2); -INSERT INTO mod_payment VALUES (4, 'Caisse', 1, NULL, NULL, 3); -INSERT INTO mod_payment VALUES (3, 'Par gérant ou administrateur', 2, NULL, NULL, 3); - - --- --- Data for Name: op_predef; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: op_predef_detail; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: operation_analytique; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: parameter; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO parameter VALUES ('MY_NAME', 'LaMule'); -INSERT INTO parameter VALUES ('MY_TVA', 'FR33 123 456 789'); -INSERT INTO parameter VALUES ('MY_STREET', ''); -INSERT INTO parameter VALUES ('MY_NUMBER', ''); -INSERT INTO parameter VALUES ('MY_CP', ''); -INSERT INTO parameter VALUES ('MY_TEL', ''); -INSERT INTO parameter VALUES ('MY_PAYS', ''); -INSERT INTO parameter VALUES ('MY_COMMUNE', ''); -INSERT INTO parameter VALUES ('MY_FAX', ''); -INSERT INTO parameter VALUES ('MY_ANALYTIC', 'nu'); -INSERT INTO parameter VALUES ('MY_COUNTRY', 'FR'); -INSERT INTO parameter VALUES ('MY_STRICT', 'Y'); -INSERT INTO parameter VALUES ('MY_TVA_USE', 'Y'); -INSERT INTO parameter VALUES ('MY_PJ_SUGGEST', 'Y'); -INSERT INTO parameter VALUES ('MY_DATE_SUGGEST', 'Y'); -INSERT INTO parameter VALUES ('MY_ALPHANUM', 'N'); -INSERT INTO parameter VALUES ('MY_CHECK_PERIODE', 'N'); - - --- --- Data for Name: parm_code; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO parm_code VALUES ('BANQUE', '51', 'Poste comptable par défaut pour les banques'); -INSERT INTO parm_code VALUES ('CAISSE', '53', 'Poste comptable par défaut pour les caisses'); -INSERT INTO parm_code VALUES ('CUSTOMER', '410', 'Poste comptable par défaut pour les clients'); -INSERT INTO parm_code VALUES ('VENTE', '707', 'Poste comptable par défaut pour les ventes'); -INSERT INTO parm_code VALUES ('VIREMENT_INTERNE', '58', 'Poste comptable par défaut pour les virements internes'); -INSERT INTO parm_code VALUES ('DEP_PRIV', '4890', 'Depense a charge du gerant'); -INSERT INTO parm_code VALUES ('SUPPLIER', '400', 'Poste par défaut pour les fournisseurs'); - - --- --- Data for Name: parm_money; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO parm_money VALUES (1, 'EUR', 1.0000); - - --- --- Data for Name: parm_periode; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO parm_periode VALUES (105, '2009-01-01', '2009-01-31', '2009', false, false); -INSERT INTO parm_periode VALUES (106, '2009-02-01', '2009-02-28', '2009', false, false); -INSERT INTO parm_periode VALUES (107, '2009-03-01', '2009-03-31', '2009', false, false); -INSERT INTO parm_periode VALUES (108, '2009-04-01', '2009-04-30', '2009', false, false); -INSERT INTO parm_periode VALUES (109, '2009-05-01', '2009-05-31', '2009', false, false); -INSERT INTO parm_periode VALUES (110, '2009-06-01', '2009-06-30', '2009', false, false); -INSERT INTO parm_periode VALUES (111, '2009-07-01', '2009-07-31', '2009', false, false); -INSERT INTO parm_periode VALUES (112, '2009-08-01', '2009-08-31', '2009', false, false); -INSERT INTO parm_periode VALUES (113, '2009-09-01', '2009-09-30', '2009', false, false); -INSERT INTO parm_periode VALUES (114, '2009-10-01', '2009-10-31', '2009', false, false); -INSERT INTO parm_periode VALUES (115, '2009-11-01', '2009-11-30', '2009', false, false); -INSERT INTO parm_periode VALUES (116, '2009-12-01', '2009-12-30', '2009', false, false); -INSERT INTO parm_periode VALUES (117, '2009-12-31', '2009-12-31', '2009', false, false); - - --- --- Data for Name: parm_poste; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO parm_poste VALUES ('1', 'PAS'); -INSERT INTO parm_poste VALUES ('12', 'CON'); -INSERT INTO parm_poste VALUES ('2', 'ACT'); -INSERT INTO parm_poste VALUES ('3', 'ACT'); -INSERT INTO parm_poste VALUES ('41', 'ACT'); -INSERT INTO parm_poste VALUES ('42', 'PAS'); -INSERT INTO parm_poste VALUES ('43', 'PAS'); -INSERT INTO parm_poste VALUES ('44', 'PAS'); -INSERT INTO parm_poste VALUES ('45', 'PAS'); -INSERT INTO parm_poste VALUES ('46', 'CON'); -INSERT INTO parm_poste VALUES ('47', 'CON'); -INSERT INTO parm_poste VALUES ('481', 'PAS'); -INSERT INTO parm_poste VALUES ('482', 'PAS'); -INSERT INTO parm_poste VALUES ('483', 'PAS'); -INSERT INTO parm_poste VALUES ('484', 'PAS'); -INSERT INTO parm_poste VALUES ('485', 'PAS'); -INSERT INTO parm_poste VALUES ('486', 'PAS'); -INSERT INTO parm_poste VALUES ('487', 'ACT'); -INSERT INTO parm_poste VALUES ('49', 'PAS'); -INSERT INTO parm_poste VALUES ('5', 'ACT'); -INSERT INTO parm_poste VALUES ('6', 'CHA'); -INSERT INTO parm_poste VALUES ('7', 'PAS'); -INSERT INTO parm_poste VALUES ('40', 'ACT'); - - --- --- Data for Name: plan_analytique; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: poste_analytique; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: profile; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO profile VALUES ('Administrateur', 1, 'Profil par défaut pour les adminstrateurs', true, true); -INSERT INTO profile VALUES ('Utilisateur', 2, 'Profil par défaut pour les utilisateurs', true, true); - - --- --- Data for Name: profile_menu; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO profile_menu VALUES (59, 'CFGPAY', 'DIVPARM', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (68, 'CFGATCARD', 'DIVPARM', 1, 9, 'E', 0); -INSERT INTO profile_menu VALUES (61, 'CFGACC', 'DIVPARM', 1, 6, 'E', 0); -INSERT INTO profile_menu VALUES (54, 'COMPANY', 'PARAM', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (651, 'ANCHOP', 'ANCIMP', 1, 10, 'E', 0); -INSERT INTO profile_menu VALUES (173, 'COMPTA', NULL, 1, 40, 'M', 0); -INSERT INTO profile_menu VALUES (55, 'PERIODE', 'PARAM', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (56, 'DIVPARM', 'PARAM', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (652, 'ANCGL', 'ANCIMP', 1, 20, 'E', 0); -INSERT INTO profile_menu VALUES (60, 'CFGTVA', 'DIVPARM', 1, 5, 'E', 0); -INSERT INTO profile_menu VALUES (653, 'ANCBS', 'ANCIMP', 1, 30, 'E', 0); -INSERT INTO profile_menu VALUES (654, 'ANCBC2', 'ANCIMP', 1, 40, 'E', 0); -INSERT INTO profile_menu VALUES (655, 'ANCTAB', 'ANCIMP', 1, 50, 'E', 0); -INSERT INTO profile_menu VALUES (656, 'ANCBCC', 'ANCIMP', 1, 60, 'E', 0); -INSERT INTO profile_menu VALUES (657, 'ANCGR', 'ANCIMP', 1, 70, 'E', 0); -INSERT INTO profile_menu VALUES (658, 'CSV:AncGrandLivre', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (662, 'new_line', NULL, 1, 35, 'M', 0); -INSERT INTO profile_menu VALUES (67, 'CFGCATDOC', 'DIVPARM', 1, 8, 'E', 0); -INSERT INTO profile_menu VALUES (69, 'CFGPCMN', 'PARAM', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (526, 'PRINTGL', 'PRINT', 1, 20, 'E', 0); -INSERT INTO profile_menu VALUES (23, 'LET', 'COMPTA', 1, 8, 'E', 0); -INSERT INTO profile_menu VALUES (523, 'PRINTBAL', 'PRINT', 1, 50, 'E', 0); -INSERT INTO profile_menu VALUES (529, 'PRINTREPORT', 'PRINT', 1, 85, 'E', 0); -INSERT INTO profile_menu VALUES (72, 'PREDOP', 'PARAM', 1, 7, 'E', 0); -INSERT INTO profile_menu VALUES (75, 'PLANANC', 'ANC', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (65, 'CFGCARDCAT', 'DIVPARM', 1, 7, 'E', 0); -INSERT INTO profile_menu VALUES (76, 'ANCODS', 'ANC', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (77, 'ANCGROUP', 'ANC', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (78, 'ANCIMP', 'ANC', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (45, 'PARAM', NULL, 1, 20, 'M', 0); -INSERT INTO profile_menu VALUES (527, 'PRINTJRN', 'PRINT', 1, 10, 'E', 0); -INSERT INTO profile_menu VALUES (530, 'PRINTREC', 'PRINT', 1, 100, 'E', 0); -INSERT INTO profile_menu VALUES (524, 'PRINTBILAN', 'PRINT', 1, 90, 'E', 0); -INSERT INTO profile_menu VALUES (79, 'PREFERENCE', NULL, 1, 15, 'M', 0); -INSERT INTO profile_menu VALUES (37, 'CUST', 'GESTION', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (38, 'SUPPL', 'GESTION', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (39, 'ADM', 'GESTION', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (36, 'CARD', 'GESTION', 1, 6, 'E', 0); -INSERT INTO profile_menu VALUES (40, 'STOCK', 'GESTION', 1, 5, 'E', 0); -INSERT INTO profile_menu VALUES (41, 'FORECAST', 'GESTION', 1, 7, 'E', 0); -INSERT INTO profile_menu VALUES (42, 'FOLLOW', 'GESTION', 1, 8, 'E', 0); -INSERT INTO profile_menu VALUES (29, 'VERIFBIL', 'ADV', 1, 21, 'E', 0); -INSERT INTO profile_menu VALUES (30, 'STOCK', 'ADV', 1, 22, 'E', 0); -INSERT INTO profile_menu VALUES (31, 'PREDOP', 'ADV', 1, 23, 'E', 0); -INSERT INTO profile_menu VALUES (32, 'OPEN', 'ADV', 1, 24, 'E', 0); -INSERT INTO profile_menu VALUES (33, 'REPORT', 'ADV', 1, 25, 'E', 0); -INSERT INTO profile_menu VALUES (5, 'CARD', 'COMPTA', 1, 7, 'E', 0); -INSERT INTO profile_menu VALUES (43, 'HIST', 'COMPTA', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (28, 'ADV', 'COMPTA', 1, 20, 'E', 0); -INSERT INTO profile_menu VALUES (53, 'ACCESS', NULL, 1, 25, 'M', 0); -INSERT INTO profile_menu VALUES (123, 'CSV:histo', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (20, 'LOGOUT', NULL, 1, 30, 'M', 0); -INSERT INTO profile_menu VALUES (35, 'PRINT', 'GESTION', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (124, 'CSV:ledger', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (125, 'PDF:ledger', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (6, 'PRINT', 'COMPTA', 1, 6, 'E', 0); -INSERT INTO profile_menu VALUES (126, 'CSV:postedetail', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (3, 'MENUACH', 'COMPTA', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (86, 'ACHIMP', 'MENUACH', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (34, 'GESTION', NULL, 1, 45, 'M', 0); -INSERT INTO profile_menu VALUES (18, 'MENUODS', 'COMPTA', 1, 5, 'E', 0); -INSERT INTO profile_menu VALUES (88, 'ODS', 'MENUODS', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (89, 'ODSIMP', 'MENUODS', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (2, 'ANC', NULL, 1, 50, 'M', 0); -INSERT INTO profile_menu VALUES (4, 'VENMENU', 'COMPTA', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (90, 'VEN', 'VENMENU', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (91, 'VENIMP', 'VENMENU', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (19, 'FIN', 'MENUFIN', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (73, 'CFGDOC', 'PARAM', 1, 8, 'E', 0); -INSERT INTO profile_menu VALUES (74, 'CFGLED', 'PARAM', 1, 9, 'E', 0); -INSERT INTO profile_menu VALUES (71, 'CFGSEC', 'PARAM', 1, 6, 'E', 0); -INSERT INTO profile_menu VALUES (82, 'EXT', NULL, 1, 55, 'M', 0); -INSERT INTO profile_menu VALUES (95, 'FREC', 'MENUFIN', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (94, 'FSALDO', 'MENUFIN', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (27, 'LETACC', 'LET', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (24, 'LETCARD', 'LET', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (167, 'MOD', 'PARAM', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (92, 'MENUFIN', 'COMPTA', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (93, 'FIMP', 'MENUFIN', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (151, 'SEARCH', NULL, 1, 60, 'M', 0); -INSERT INTO profile_menu VALUES (85, 'ACH', 'MENUACH', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (127, 'PDF:postedetail', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (128, 'CSV:fichedetail', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (129, 'PDF:fichedetail', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (130, 'CSV:fiche_balance', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (131, 'PDF:fiche_balance', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (132, 'CSV:report', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (133, 'PDF:report', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (134, 'CSV:fiche', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (135, 'PDF:fiche', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (136, 'CSV:glcompte', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (137, 'PDF:glcompte', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (138, 'PDF:sec', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (139, 'CSV:AncList', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (140, 'CSV:AncBalSimple', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (141, 'PDF:AncBalSimple', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (142, 'CSV:AncBalDouble', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (143, 'PDF:AncBalDouble', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (144, 'CSV:balance', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (145, 'PDF:balance', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (146, 'CSV:AncTable', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (147, 'CSV:AncAccList', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (148, 'CSV:AncBalGroup', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (149, 'OTH:Bilan', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (528, 'PRINTPOSTE', 'PRINT', 1, 30, 'E', 0); -INSERT INTO profile_menu VALUES (525, 'PRINTCARD', 'PRINT', 1, 40, 'E', 0); -INSERT INTO profile_menu VALUES (1, 'DASHBOARD', NULL, 1, 10, 'M', 1); -INSERT INTO profile_menu VALUES (172, 'CFGPRO', 'MOD', 1, NULL, 'E', 0); -INSERT INTO profile_menu VALUES (171, 'CFGMENU', 'MOD', 1, NULL, 'E', 0); -INSERT INTO profile_menu VALUES (663, 'CFGPAY', 'DIVPARM', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (664, 'CFGATCARD', 'DIVPARM', 2, 9, 'E', 0); -INSERT INTO profile_menu VALUES (665, 'CFGACC', 'DIVPARM', 2, 6, 'E', 0); -INSERT INTO profile_menu VALUES (668, 'ANCHOP', 'ANCIMP', 2, 10, 'E', 0); -INSERT INTO profile_menu VALUES (669, 'COMPTA', NULL, 2, 40, 'M', 0); -INSERT INTO profile_menu VALUES (672, 'ANCGL', 'ANCIMP', 2, 20, 'E', 0); -INSERT INTO profile_menu VALUES (673, 'CFGTVA', 'DIVPARM', 2, 5, 'E', 0); -INSERT INTO profile_menu VALUES (674, 'ANCBS', 'ANCIMP', 2, 30, 'E', 0); -INSERT INTO profile_menu VALUES (675, 'ANCBC2', 'ANCIMP', 2, 40, 'E', 0); -INSERT INTO profile_menu VALUES (676, 'ANCTAB', 'ANCIMP', 2, 50, 'E', 0); -INSERT INTO profile_menu VALUES (677, 'ANCBCC', 'ANCIMP', 2, 60, 'E', 0); -INSERT INTO profile_menu VALUES (678, 'ANCGR', 'ANCIMP', 2, 70, 'E', 0); -INSERT INTO profile_menu VALUES (679, 'CSV:AncGrandLivre', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (680, 'new_line', NULL, 2, 35, 'M', 0); -INSERT INTO profile_menu VALUES (681, 'CFGCATDOC', 'DIVPARM', 2, 8, 'E', 0); -INSERT INTO profile_menu VALUES (683, 'PRINTGL', 'PRINT', 2, 20, 'E', 0); -INSERT INTO profile_menu VALUES (684, 'LET', 'COMPTA', 2, 8, 'E', 0); -INSERT INTO profile_menu VALUES (685, 'PRINTBAL', 'PRINT', 2, 50, 'E', 0); -INSERT INTO profile_menu VALUES (686, 'PRINTREPORT', 'PRINT', 2, 85, 'E', 0); -INSERT INTO profile_menu VALUES (688, 'PLANANC', 'ANC', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (689, 'CFGCARDCAT', 'DIVPARM', 2, 7, 'E', 0); -INSERT INTO profile_menu VALUES (690, 'ANCODS', 'ANC', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (717, 'CSV:ledger', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (718, 'PDF:ledger', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (719, 'PRINT', 'COMPTA', 2, 6, 'E', 0); -INSERT INTO profile_menu VALUES (720, 'CSV:postedetail', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (721, 'MENUACH', 'COMPTA', 2, 3, 'E', 0); -INSERT INTO profile_menu VALUES (722, 'ACHIMP', 'MENUACH', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (723, 'GESTION', NULL, 2, 45, 'M', 0); -INSERT INTO profile_menu VALUES (724, 'MENUODS', 'COMPTA', 2, 5, 'E', 0); -INSERT INTO profile_menu VALUES (725, 'ODS', 'MENUODS', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (726, 'ODSIMP', 'MENUODS', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (727, 'ANC', NULL, 2, 50, 'M', 0); -INSERT INTO profile_menu VALUES (728, 'VENMENU', 'COMPTA', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (729, 'VEN', 'VENMENU', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (730, 'VENIMP', 'VENMENU', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (731, 'FIN', 'MENUFIN', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (735, 'EXT', NULL, 2, 55, 'M', 0); -INSERT INTO profile_menu VALUES (736, 'FREC', 'MENUFIN', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (737, 'FSALDO', 'MENUFIN', 2, 3, 'E', 0); -INSERT INTO profile_menu VALUES (738, 'LETACC', 'LET', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (691, 'ANCGROUP', 'ANC', 2, 3, 'E', 0); -INSERT INTO profile_menu VALUES (692, 'ANCIMP', 'ANC', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (694, 'PRINTJRN', 'PRINT', 2, 10, 'E', 0); -INSERT INTO profile_menu VALUES (695, 'PRINTREC', 'PRINT', 2, 100, 'E', 0); -INSERT INTO profile_menu VALUES (696, 'PRINTBILAN', 'PRINT', 2, 90, 'E', 0); -INSERT INTO profile_menu VALUES (697, 'PREFERENCE', NULL, 2, 15, 'M', 0); -INSERT INTO profile_menu VALUES (698, 'CUST', 'GESTION', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (699, 'SUPPL', 'GESTION', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (700, 'ADM', 'GESTION', 2, 3, 'E', 0); -INSERT INTO profile_menu VALUES (701, 'CARD', 'GESTION', 2, 6, 'E', 0); -INSERT INTO profile_menu VALUES (702, 'STOCK', 'GESTION', 2, 5, 'E', 0); -INSERT INTO profile_menu VALUES (703, 'FORECAST', 'GESTION', 2, 7, 'E', 0); -INSERT INTO profile_menu VALUES (704, 'FOLLOW', 'GESTION', 2, 8, 'E', 0); -INSERT INTO profile_menu VALUES (705, 'VERIFBIL', 'ADV', 2, 21, 'E', 0); -INSERT INTO profile_menu VALUES (706, 'STOCK', 'ADV', 2, 22, 'E', 0); -INSERT INTO profile_menu VALUES (707, 'PREDOP', 'ADV', 2, 23, 'E', 0); -INSERT INTO profile_menu VALUES (708, 'OPEN', 'ADV', 2, 24, 'E', 0); -INSERT INTO profile_menu VALUES (709, 'REPORT', 'ADV', 2, 25, 'E', 0); -INSERT INTO profile_menu VALUES (710, 'CARD', 'COMPTA', 2, 7, 'E', 0); -INSERT INTO profile_menu VALUES (711, 'HIST', 'COMPTA', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (712, 'ADV', 'COMPTA', 2, 20, 'E', 0); -INSERT INTO profile_menu VALUES (713, 'ACCESS', NULL, 2, 25, 'M', 0); -INSERT INTO profile_menu VALUES (714, 'CSV:histo', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (715, 'LOGOUT', NULL, 2, 30, 'M', 0); -INSERT INTO profile_menu VALUES (716, 'PRINT', 'GESTION', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (739, 'LETCARD', 'LET', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (742, 'MENUFIN', 'COMPTA', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (743, 'FIMP', 'MENUFIN', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (744, 'SEARCH', NULL, 2, 60, 'M', 0); -INSERT INTO profile_menu VALUES (745, 'ACH', 'MENUACH', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (746, 'PDF:postedetail', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (747, 'CSV:fichedetail', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (748, 'PDF:fichedetail', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (749, 'CSV:fiche_balance', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (750, 'PDF:fiche_balance', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (751, 'CSV:report', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (752, 'PDF:report', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (753, 'CSV:fiche', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (754, 'PDF:fiche', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (755, 'CSV:glcompte', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (756, 'PDF:glcompte', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (757, 'PDF:sec', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (758, 'CSV:AncList', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (759, 'CSV:AncBalSimple', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (760, 'PDF:AncBalSimple', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (761, 'CSV:AncBalDouble', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (762, 'PDF:AncBalDouble', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (763, 'CSV:balance', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (764, 'PDF:balance', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (765, 'CSV:AncTable', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (766, 'CSV:AncAccList', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (767, 'CSV:AncBalGroup', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (768, 'OTH:Bilan', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (769, 'PRINTPOSTE', 'PRINT', 2, 30, 'E', 0); -INSERT INTO profile_menu VALUES (770, 'PRINTCARD', 'PRINT', 2, 40, 'E', 0); -INSERT INTO profile_menu VALUES (777, 'CFGPRO', 'MOD', 2, NULL, 'E', 0); -INSERT INTO profile_menu VALUES (778, 'CFGMENU', 'MOD', 2, NULL, 'E', 0); -INSERT INTO profile_menu VALUES (772, 'DASHBOARD', NULL, 2, 10, 'M', 1); - - --- --- Data for Name: profile_menu_type; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO profile_menu_type VALUES ('P', 'Impression'); -INSERT INTO profile_menu_type VALUES ('S', 'Extension'); -INSERT INTO profile_menu_type VALUES ('E', 'Menu'); -INSERT INTO profile_menu_type VALUES ('M', 'Module'); - - --- --- Data for Name: profile_user; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO profile_user VALUES ('phpcompta', 1, 1); - - --- --- Data for Name: quant_fin; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: quant_purchase; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: quant_sold; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: stock_goods; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: tmp_pcmn; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO tmp_pcmn VALUES ('1', 'comptes de capitaux', '0', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('101', 'Capital', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('105', 'Ecarts de réévaluation', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1061', 'Réserve légale', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1063', 'Réserves statutaires ou contractuelles', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1064', 'Réserves réglementées', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('1068', 'Autres réserves', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('108', 'Compte de l''exploitant', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('12', 'résultat de l''exercice (bénéfice ou perte)', '1', 'CON'); -INSERT INTO tmp_pcmn VALUES ('145', 'Amortissements dérogatoires', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('146', 'Provision spéciale de réévaluation', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('147', 'Plus-values réinvesties', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('148', 'Autres provisions réglementées', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('15', 'Provisions pour risques et charges', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('16', 'emprunts et dettes assimilees', '1', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('2', 'comptes d''immobilisations', '0', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('20', 'immobilisations incorporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('201', 'Frais d''établissement', '20', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('206', 'Droit au bail', '20', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('207', 'Fonds commercial', '20', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('208', 'Autres immobilisations incorporelles', '20', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('21', 'immobilisations corporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('23', 'immobilisations en cours', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('27', 'autres immobilisations financieres', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('280', 'Amortissements des immobilisations incorporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('281', 'Amortissements des immobilisations corporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('290', 'Provisions pour dépréciation des immobilisations incorporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('291', 'Provisions pour dépréciation des immobilisations corporelles (même ventilation que celle du compte 21)', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('297', 'Provisions pour dépréciation des autres immobilisations financières', '2', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('3', 'comptes de stocks et en cours', '0', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('31', 'matieres premières (et fournitures)', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('32', 'autres approvisionnements', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('33', 'en-cours de production de biens', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('34', 'en-cours de production de services', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('35', 'stocks de produits', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('37', 'stocks de marchandises', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('391', 'Provisions pour dépréciation des matières premières (et fournitures)', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('392', 'Provisions pour dépréciation des autres approvisionnements', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('393', 'Provisions pour dépréciation des en-cours de production de biens', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('394', 'Provisions pour dépréciation des en-cours de production de services', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('395', 'Provisions pour dépréciation des stocks de produits', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('397', 'Provisions pour dépréciation des stocks de marchandises', '3', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4', 'comptes de tiers', '0', 'CON'); -INSERT INTO tmp_pcmn VALUES ('400', 'Fournisseurs et Comptes rattachés', '4', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('409', 'Fournisseurs débiteurs', '4', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('410', 'Clients et Comptes rattachés', '4', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('419', 'Clients créditeurs', '4', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('421', 'Personnel - Rémunérations dues', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('428', 'Personnel - Charges à payer et produits à recevoir', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('43', 'Sécurité sociale et autres organismes sociaux', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('444', 'Etat - Impôts sur les bénéfices', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('445', 'Etat - Taxes sur le chiffre d''affaires', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('447', 'Autres impôts, taxes et versements assimilés', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('45', 'Groupe et associes', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('455', 'Associés - Comptes courants', '45', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('46', 'Débiteurs divers et créditeurs divers', '4', 'CON'); -INSERT INTO tmp_pcmn VALUES ('47', 'comptes transitoires ou d''attente', '4', 'CON'); -INSERT INTO tmp_pcmn VALUES ('481', 'Charges à répartir sur plusieurs exercices', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('486', 'Charges constatées d''avance', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('487', 'Produits constatés d''avance', '4', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('491', 'Provisions pour dépréciation des comptes de clients', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('496', 'Provisions pour dépréciation des comptes de débiteurs divers', '4', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('5', 'comptes financiers', '0', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('50', 'valeurs mobilières de placement', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('51', 'banques, établissements financiers et assimilés', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('53', 'Caisse', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('54', 'régies d''avance et accréditifs', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('58', 'virements internes', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('590', 'Provisions pour dépréciation des valeurs mobilières de placement', '5', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('6', 'comptes de charges', '0', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('60', 'Achats (sauf 603)', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('603', 'variations des stocks (approvisionnements et marchandises)', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('61', 'autres charges externes - Services extérieurs', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('62', 'autres charges externes - Autres services extérieurs', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('63', 'Impôts, taxes et versements assimiles', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('641', 'Rémunérations du personnel', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('644', 'Rémunération du travail de l''exploitant', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('645', 'Charges de sécurité sociale et de prévoyance', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('646', 'Cotisations sociales personnelles de l''exploitant', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('65', 'Autres charges de gestion courante', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('66', 'Charges financières', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('67', 'Charges exceptionnelles', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('681', 'Dotations aux amortissements et aux provisions - Charges d''exploitation', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('686', 'Dotations aux amortissements et aux provisions - Charges financières', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('687', 'Dotations aux amortissements et aux provisions - Charges exceptionnelles', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('691', 'Participation des salariés aux résultats', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('695', 'Impôts sur les bénéfices', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('697', 'Imposition forfaitaire annuelle des sociétés', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('699', 'Produits - Reports en arrière des déficits', '6', 'CHA'); -INSERT INTO tmp_pcmn VALUES ('7', 'comptes de produits', '0', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('701', 'Ventes de produits finis', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('706', 'Prestations de services', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('707', 'Ventes de marchandises', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('708', 'Produits des activités annexes', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('709', 'Rabais, remises et ristournes accordés par l''entreprise', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('713', 'Variation des stocks (en-cours de production, produits)', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('72', 'Production immobilisée', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('73', 'Produits nets partiels sur opérations à long terme', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('74', 'Subventions d''exploitation', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('75', 'Autres produits de gestion courante', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('753', 'Jetons de présence et rémunérations d''administrateurs, gérants,...', '75', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('754', 'Ristournes perçues des coopératives (provenant des excédents)', '75', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('755', 'Quotes-parts de résultat sur opérations faites en commun', '75', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('76', 'Produits financiers', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('77', 'Produits exceptionnels', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('781', 'Reprises sur amortissements et provisions (à inscrire dans les produits d''exploitation)', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('786', 'Reprises sur provisions pour risques (à inscrire dans les produits financiers)', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('787', 'Reprises sur provisions (à inscrire dans les produits exceptionnels)', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('79', 'Transferts de charges', '7', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('8', 'Comptes spéciaux', '0', 'CON'); -INSERT INTO tmp_pcmn VALUES ('9', 'Comptes analytiques', '0', 'CON'); -INSERT INTO tmp_pcmn VALUES ('4456601', 'TVA 19,6% - France métropolitaine - Taux immobilisations Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('445701', 'TVA 19,6% - France métropolitaine - Taux immobilisations Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4456602', 'TVA x% - France métropolitaine - Taux anciens Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('445702', 'TVA x% - France métropolitaine - Taux anciens Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4456603', 'TVA 8,5% - DOM - Taux normal Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('445703', 'TVA 8,5% - DOM - Taux normal Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4456604', 'TVA 8,5% - DOM - Taux normal NPR Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('445704', 'TVA 8,5% - DOM - Taux normal NPR Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4456605', 'TVA 2,1% - DOM - Taux réduit Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('445705', 'TVA 2,1% - DOM - Taux réduit Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4456606', 'TVA 1,75% - DOM - Taux I Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('445706', 'TVA 1,75% - DOM - Taux I Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4456607', 'TVA 1,05% - DOM - Taux publications de presse Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('445707', 'TVA 1,05% - DOM - Taux publications de presse Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4456608', 'TVA x% - DOM - Taux octroi de mer Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('445708', 'TVA x% - DOM - Taux octroi de mer Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('4456609', 'TVA x% - DOM - Taux immobilisations Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('445709', 'TVA x% - DOM - Taux immobilisations Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('44566010', 'TVA 13% - Corse - Taux I Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4457010', 'TVA 13% - Corse - Taux I Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('44566011', 'TVA 8% - Corse - Taux II Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4457011', 'TVA 8% - Corse - Taux II Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('44566012', 'TVA 2,1% - Corse - Taux III Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4457012', 'TVA 2,1% - Corse - Taux III Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('44566013', 'TVA 0,9% - Corse - Taux IV Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4457013', 'TVA 0,9% - Corse - Taux IV Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('44566014', 'TVA x% - Corse - Taux immobilisations Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4457014', 'TVA x% - Corse - Taux immobilisations Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('44566015', 'TVA x% - Acquisitions intracommunautaires/Pays Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4457015', 'TVA x% - Acquisitions intracommunautaires/Pays Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('44566016', 'TVA x% - Acquisitions intracommunautaires immobilisations/Pays Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4457016', 'TVA x% - Acquisitions intracommunautaires immobilisations/Pays Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('44566017', 'TVA x% - Non imposable : Achats en franchise Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4457017', 'TVA x% - Non imposable : Achats en franchise Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('44566018', 'TVA x% - Non imposable : Exports hors CE/Pays Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4457018', 'TVA x% - Non imposable : Exports hors CE/Pays Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('44566019', 'TVA x% - Non imposable : Autres opérations Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4457019', 'TVA x% - Non imposable : Autres opérations Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('44566020', 'TVA x% - Non imposable : Livraisons intracommunautaires/Pays Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('4457020', 'TVA x% - Non imposable : Livraisons intracommunautaires/Pays Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('445661', 'TVA 19,6% - France métropolitaine - Taux normal', '445', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('445662', 'TVA 5,5% - France métropolitaine - Taux réduit', '445', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('445663', 'TVA 2,1% - France métropolitaine - Taux super réduit', '445', 'PAS'); -INSERT INTO tmp_pcmn VALUES ('44571', 'TVA 19,6% - France métropolitaine - Taux normal', '445', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('44572', 'TVA 5,5% - France métropolitaine - Taux réduit', '445', 'ACT'); -INSERT INTO tmp_pcmn VALUES ('44573', 'TVA 2,1% - France métropolitaine - Taux super réduit', '445', 'ACT'); - - --- --- Data for Name: todo_list; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: tva_rate; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO tva_rate VALUES (101, 'FR_NOR', 0.1960, 'TVA 19,6% - France métropolitaine - Taux normal', '445661,44571', 0); -INSERT INTO tva_rate VALUES (102, 'FR_RED', 0.0550, 'TVA 5,5% - France métropolitaine - Taux réduit', '445662,44572', 0); -INSERT INTO tva_rate VALUES (103, 'FR_SRED', 0.0210, 'TVA 2,1% - France métropolitaine - Taux super réduit', '445663,44573', 0); -INSERT INTO tva_rate VALUES (104, 'FR_IMMO', 0.1960, 'TVA 19,6% - France métropolitaine - Taux immobilisations', '4456601,445701', 0); -INSERT INTO tva_rate VALUES (105, 'FR_ANC', 0.0000, 'TVA x% - France métropolitaine - Taux anciens', '4456602,445702', 0); -INSERT INTO tva_rate VALUES (201, 'DOM', 0.0850, 'TVA 8,5% - DOM - Taux normal', '4456603,445703', 0); -INSERT INTO tva_rate VALUES (202, 'DOM_NPR', 0.0850, 'TVA 8,5% - DOM - Taux normal NPR', '4456604,445704', 0); -INSERT INTO tva_rate VALUES (203, 'DOM_REDUIT', 0.0210, 'TVA 2,1% - DOM - Taux réduit', '4456605,445705', 0); -INSERT INTO tva_rate VALUES (204, 'DOM_I', 0.0175, 'TVA 1,75% - DOM - Taux I', '4456606,445706', 0); -INSERT INTO tva_rate VALUES (205, 'DOM_PRESSE', 0.0105, 'TVA 1,05% - DOM - Taux publications de presse', '4456607,445707', 0); -INSERT INTO tva_rate VALUES (206, 'DOM_OCTROI', 0.0000, 'TVA x% - DOM - Taux octroi de mer', '4456608,445708', 0); -INSERT INTO tva_rate VALUES (207, 'DOM_IMMO', 0.0000, 'TVA x% - DOM - Taux immobilisations', '4456609,445709', 0); -INSERT INTO tva_rate VALUES (301, 'COR_I', 0.1300, 'TVA 13% - Corse - Taux I', '44566010,4457010', 0); -INSERT INTO tva_rate VALUES (302, 'COR_II', 0.0800, 'TVA 8% - Corse - Taux II', '44566011,4457011', 0); -INSERT INTO tva_rate VALUES (303, 'COR_III', 0.0210, 'TVA 2,1% - Corse - Taux III', '44566012,4457012', 0); -INSERT INTO tva_rate VALUES (304, 'COR_IV', 0.0090, 'TVA 0,9% - Corse - Taux IV', '44566013,4457013', 0); -INSERT INTO tva_rate VALUES (305, 'COR_IMMO', 0.0000, 'TVA x% - Corse - Taux immobilisations', '44566014,4457014', 0); -INSERT INTO tva_rate VALUES (401, 'INTRA', 0.0000, 'TVA x% - Acquisitions intracommunautaires/Pays', '44566015,4457015', 0); -INSERT INTO tva_rate VALUES (402, 'INTRA_IMMMO', 0.0000, 'TVA x% - Acquisitions intracommunautaires immobilisations/Pays', '44566016,4457016', 0); -INSERT INTO tva_rate VALUES (501, 'FRANCH', 0.0000, 'TVA x% - Non imposable : Achats en franchise', '44566017,4457017', 0); -INSERT INTO tva_rate VALUES (502, 'EXPORT', 0.0000, 'TVA x% - Non imposable : Exports hors CE/Pays', '44566018,4457018', 0); -INSERT INTO tva_rate VALUES (503, 'AUTRE', 0.0000, 'TVA x% - Non imposable : Autres opérations', '44566019,4457019', 0); -INSERT INTO tva_rate VALUES (504, 'INTRA_LIV', 0.0000, 'TVA x% - Non imposable : Livraisons intracommunautaires/Pays', '44566020,4457020', 0); - - --- --- Data for Name: user_local_pref; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO user_local_pref VALUES ('1', 'MINIREPORT', '0'); -INSERT INTO user_local_pref VALUES ('1', 'PERIODE', '105'); - - --- --- Data for Name: user_sec_act; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: user_sec_extension; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: user_sec_jrn; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: version; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO version VALUES (99); - - --- --- Name: action_detail_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY action_detail - ADD CONSTRAINT action_detail_pkey PRIMARY KEY (ad_id); - - --- --- Name: action_gestion_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY action_gestion - ADD CONSTRAINT action_gestion_pkey PRIMARY KEY (ag_id); - - --- --- Name: action_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY action - ADD CONSTRAINT action_pkey PRIMARY KEY (ac_id); - - --- --- Name: attr_def_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY attr_def - ADD CONSTRAINT attr_def_pkey PRIMARY KEY (ad_id); - - --- --- Name: bilan_b_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY bilan - ADD CONSTRAINT bilan_b_name_key UNIQUE (b_name); - - --- --- Name: bilan_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY bilan - ADD CONSTRAINT bilan_pkey PRIMARY KEY (b_id); - - --- --- Name: centralized_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY centralized - ADD CONSTRAINT centralized_pkey PRIMARY KEY (c_id); - - --- --- Name: del_action_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY del_action - ADD CONSTRAINT del_action_pkey PRIMARY KEY (del_id); - - --- --- Name: dj_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY del_jrn - ADD CONSTRAINT dj_id PRIMARY KEY (dj_id); - - --- --- Name: djx_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY del_jrnx - ADD CONSTRAINT djx_id PRIMARY KEY (djx_id); - - --- --- Name: document_modele_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY document_modele - ADD CONSTRAINT document_modele_pkey PRIMARY KEY (md_id); - - --- --- Name: document_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY document - ADD CONSTRAINT document_pkey PRIMARY KEY (d_id); - - --- --- Name: document_state_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY document_state - ADD CONSTRAINT document_state_pkey PRIMARY KEY (s_id); - - --- --- Name: document_type_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY document_type - ADD CONSTRAINT document_type_pkey PRIMARY KEY (dt_id); - - --- --- Name: fiche_def_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY fiche_def - ADD CONSTRAINT fiche_def_pkey PRIMARY KEY (fd_id); - - --- --- Name: fiche_def_ref_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY fiche_def_ref - ADD CONSTRAINT fiche_def_ref_pkey PRIMARY KEY (frd_id); - - --- --- Name: fiche_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY fiche - ADD CONSTRAINT fiche_pkey PRIMARY KEY (f_id); - - --- --- Name: forecast_cat_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY forecast_cat - ADD CONSTRAINT forecast_cat_pk PRIMARY KEY (fc_id); - - --- --- Name: forecast_item_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY forecast_item - ADD CONSTRAINT forecast_item_pkey PRIMARY KEY (fi_id); - - --- --- Name: forecast_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY forecast - ADD CONSTRAINT forecast_pk PRIMARY KEY (f_id); - - --- --- Name: form_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY form - ADD CONSTRAINT form_pkey PRIMARY KEY (fo_id); - - --- --- Name: formdef_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY formdef - ADD CONSTRAINT formdef_pkey PRIMARY KEY (fr_id); - - --- --- Name: frd_ad_attr_min_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY attr_min - ADD CONSTRAINT frd_ad_attr_min_pk PRIMARY KEY (frd_id, ad_id); - - --- --- Name: historique_analytique_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY operation_analytique - ADD CONSTRAINT historique_analytique_pkey PRIMARY KEY (oa_id); - - --- --- Name: idx_ex_code; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY extension - ADD CONSTRAINT idx_ex_code UNIQUE (ex_code); - - --- --- Name: info_def_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY info_def - ADD CONSTRAINT info_def_pkey PRIMARY KEY (id_type); - - --- --- Name: jnt_fic_att_value_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY fiche_detail - ADD CONSTRAINT jnt_fic_att_value_pkey PRIMARY KEY (jft_id); - - --- --- Name: jnt_letter_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jnt_letter - ADD CONSTRAINT jnt_letter_pk PRIMARY KEY (jl_id); - - --- --- Name: jrn_action_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_action - ADD CONSTRAINT jrn_action_pkey PRIMARY KEY (ja_id); - - --- --- Name: jrn_def_jrn_def_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_def - ADD CONSTRAINT jrn_def_jrn_def_name_key UNIQUE (jrn_def_name); - - --- --- Name: jrn_def_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_def - ADD CONSTRAINT jrn_def_pkey PRIMARY KEY (jrn_def_id); - - --- --- Name: jrn_info_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_info - ADD CONSTRAINT jrn_info_pkey PRIMARY KEY (ji_id); - - --- --- Name: jrn_periode_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_periode - ADD CONSTRAINT jrn_periode_pk PRIMARY KEY (jrn_def_id, p_id); - - --- --- Name: jrn_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn - ADD CONSTRAINT jrn_pkey PRIMARY KEY (jr_id, jr_def_id); - - --- --- Name: jrn_rapt_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_rapt - ADD CONSTRAINT jrn_rapt_pkey PRIMARY KEY (jra_id); - - --- --- Name: jrn_type_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_type - ADD CONSTRAINT jrn_type_pkey PRIMARY KEY (jrn_type_id); - - --- --- Name: jrnx_note_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn_note - ADD CONSTRAINT jrnx_note_pkey PRIMARY KEY (n_id); - - --- --- Name: jrnx_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrnx - ADD CONSTRAINT jrnx_pkey PRIMARY KEY (j_id); - - --- --- Name: letter_cred_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY letter_cred - ADD CONSTRAINT letter_cred_pk PRIMARY KEY (lc_id); - - --- --- Name: letter_deb_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY letter_deb - ADD CONSTRAINT letter_deb_pk PRIMARY KEY (ld_id); - - --- --- Name: menu_ref_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY menu_ref - ADD CONSTRAINT menu_ref_pkey PRIMARY KEY (me_code); - - --- --- Name: mod_payment_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY mod_payment - ADD CONSTRAINT mod_payment_pkey PRIMARY KEY (mp_id); - - --- --- Name: op_def_op_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY op_predef - ADD CONSTRAINT op_def_op_name_key UNIQUE (od_name, jrn_def_id); - - --- --- Name: op_def_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY op_predef - ADD CONSTRAINT op_def_pkey PRIMARY KEY (od_id); - - --- --- Name: op_predef_detail_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY op_predef_detail - ADD CONSTRAINT op_predef_detail_pkey PRIMARY KEY (opd_id); - - --- --- Name: parameter_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY parameter - ADD CONSTRAINT parameter_pkey PRIMARY KEY (pr_id); - - --- --- Name: parm_code_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY parm_code - ADD CONSTRAINT parm_code_pkey PRIMARY KEY (p_code); - - --- --- Name: parm_money_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY parm_money - ADD CONSTRAINT parm_money_pkey PRIMARY KEY (pm_code); - - --- --- Name: parm_periode_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY parm_periode - ADD CONSTRAINT parm_periode_pkey PRIMARY KEY (p_id); - - --- --- Name: parm_poste_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY parm_poste - ADD CONSTRAINT parm_poste_pkey PRIMARY KEY (p_value); - - --- --- Name: pk_extension; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY extension - ADD CONSTRAINT pk_extension PRIMARY KEY (ex_id); - - --- --- Name: pk_ga_id; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY groupe_analytique - ADD CONSTRAINT pk_ga_id PRIMARY KEY (ga_id); - - --- --- Name: pk_jnt_fic_attr; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jnt_fic_attr - ADD CONSTRAINT pk_jnt_fic_attr PRIMARY KEY (jnt_id); - - --- --- Name: pk_user_local_pref; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY user_local_pref - ADD CONSTRAINT pk_user_local_pref PRIMARY KEY (user_id, parameter_type); - - --- --- Name: plan_analytique_pa_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY plan_analytique - ADD CONSTRAINT plan_analytique_pa_name_key UNIQUE (pa_name); - - --- --- Name: plan_analytique_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY plan_analytique - ADD CONSTRAINT plan_analytique_pkey PRIMARY KEY (pa_id); - - --- --- Name: poste_analytique_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY poste_analytique - ADD CONSTRAINT poste_analytique_pkey PRIMARY KEY (po_id); - - --- --- Name: profile_menu_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY profile_menu - ADD CONSTRAINT profile_menu_pkey PRIMARY KEY (pm_id); - - --- --- Name: profile_menu_type_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY profile_menu_type - ADD CONSTRAINT profile_menu_type_pkey PRIMARY KEY (pm_type); - - --- --- Name: profile_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY profile - ADD CONSTRAINT profile_pkey PRIMARY KEY (p_id); - - --- --- Name: profile_user_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY profile_user - ADD CONSTRAINT profile_user_pkey PRIMARY KEY (pu_id); - - --- --- Name: profile_user_user_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY profile_user - ADD CONSTRAINT profile_user_user_name_key UNIQUE (user_name, p_id); - - --- --- Name: qp_id_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY quant_purchase - ADD CONSTRAINT qp_id_pk PRIMARY KEY (qp_id); - - --- --- Name: qs_id_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY quant_sold - ADD CONSTRAINT qs_id_pk PRIMARY KEY (qs_id); - - --- --- Name: quant_fin_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY quant_fin - ADD CONSTRAINT quant_fin_pk PRIMARY KEY (qf_id); - - --- --- Name: stock_goods_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY stock_goods - ADD CONSTRAINT stock_goods_pkey PRIMARY KEY (sg_id); - - --- --- Name: tmp_pcmn_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY tmp_pcmn - ADD CONSTRAINT tmp_pcmn_pkey PRIMARY KEY (pcm_val); - - --- --- Name: todo_list_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY todo_list - ADD CONSTRAINT todo_list_pkey PRIMARY KEY (tl_id); - - --- --- Name: tva_id_pk; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY tva_rate - ADD CONSTRAINT tva_id_pk PRIMARY KEY (tva_id); - - --- --- Name: user_sec_act_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY user_sec_act - ADD CONSTRAINT user_sec_act_pkey PRIMARY KEY (ua_id); - - --- --- Name: user_sec_extension_ex_id_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY user_sec_extension - ADD CONSTRAINT user_sec_extension_ex_id_key UNIQUE (ex_id, use_login); - - --- --- Name: user_sec_extension_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY user_sec_extension - ADD CONSTRAINT user_sec_extension_pkey PRIMARY KEY (use_id); - - --- --- Name: user_sec_jrn_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY user_sec_jrn - ADD CONSTRAINT user_sec_jrn_pkey PRIMARY KEY (uj_id); - - --- --- Name: ux_internal; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jrn - ADD CONSTRAINT ux_internal UNIQUE (jr_internal); - - --- --- Name: fd_id_ad_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX fd_id_ad_id_x ON jnt_fic_attr USING btree (fd_id, ad_id); - - --- --- Name: fiche_detail_f_id_ad_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX fiche_detail_f_id_ad_id ON fiche_detail USING btree (f_id, ad_id); - - --- --- Name: fk_stock_goods_f_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fk_stock_goods_f_id ON stock_goods USING btree (f_id); - - --- --- Name: fk_stock_goods_j_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fk_stock_goods_j_id ON stock_goods USING btree (j_id); - - --- --- Name: fki_f_end_date; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fki_f_end_date ON forecast USING btree (f_end_date); - - --- --- Name: fki_f_start_date; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fki_f_start_date ON forecast USING btree (f_start_date); - - --- --- Name: fki_jrnx_f_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fki_jrnx_f_id ON jrnx USING btree (f_id); - - --- --- Name: fki_profile_menu_me_code; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fki_profile_menu_me_code ON profile_menu USING btree (me_code); - - --- --- Name: fki_profile_menu_profile; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fki_profile_menu_profile ON profile_menu USING btree (p_id); - - --- --- Name: fki_profile_menu_type_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fki_profile_menu_type_fkey ON profile_menu USING btree (p_type_display); - - --- --- Name: idx_qs_internal; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX idx_qs_internal ON quant_sold USING btree (qs_internal); - - --- --- Name: jnt_fic_att_value_fd_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX jnt_fic_att_value_fd_id_idx ON fiche_detail USING btree (f_id); - - --- --- Name: jnt_fic_attr_fd_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX jnt_fic_attr_fd_id_idx ON jnt_fic_attr USING btree (fd_id); - - --- --- Name: k_ag_ref; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX k_ag_ref ON action_gestion USING btree (ag_ref); - - --- --- Name: qcode_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX qcode_idx ON fiche_detail USING btree (ad_value) WHERE (ad_id = 23); - - --- --- Name: qf_jr_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX qf_jr_id ON quant_fin USING btree (jr_id); - - --- --- Name: qp_j_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX qp_j_id ON quant_purchase USING btree (j_id); - - --- --- Name: qs_j_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX qs_j_id ON quant_sold USING btree (j_id); - - --- --- Name: uj_login_uj_jrn_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX uj_login_uj_jrn_id ON user_sec_jrn USING btree (uj_login, uj_jrn_id); - - --- --- Name: ux_po_name; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX ux_po_name ON poste_analytique USING btree (po_name); - - --- --- Name: x_jrn_jr_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX x_jrn_jr_id ON jrn USING btree (jr_id); - - --- --- Name: x_mt; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX x_mt ON jrn USING btree (jr_mt); - - --- --- Name: x_periode; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE UNIQUE INDEX x_periode ON parm_periode USING btree (p_start, p_end); - - --- --- Name: x_poste; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX x_poste ON jrnx USING btree (j_poste); - - --- --- Name: action_gestion_t_insert_update; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER action_gestion_t_insert_update - BEFORE INSERT OR UPDATE ON action_gestion - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.action_gestion_ins_upd(); - - --- --- Name: TRIGGER action_gestion_t_insert_update ON action_gestion; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TRIGGER action_gestion_t_insert_update ON action_gestion IS 'Truncate the column ag_title to 70 char'; - - --- --- Name: document_modele_validate; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER document_modele_validate - BEFORE INSERT OR UPDATE ON document_modele - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.t_document_modele_validate(); - - --- --- Name: document_validate; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER document_validate - BEFORE INSERT OR UPDATE ON document - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.t_document_validate(); - - --- --- Name: fiche_def_ins_upd; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER fiche_def_ins_upd - BEFORE INSERT OR UPDATE ON fiche_def - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.fiche_def_ins_upd(); - - --- --- Name: info_def_ins_upd_t; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER info_def_ins_upd_t - BEFORE INSERT OR UPDATE ON info_def - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.info_def_ins_upd(); - - --- --- Name: quant_sold_ins_upd_tr; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER quant_sold_ins_upd_tr - AFTER INSERT OR UPDATE ON quant_purchase - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.quant_purchase_ins_upd(); - - --- --- Name: quant_sold_ins_upd_tr; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER quant_sold_ins_upd_tr - AFTER INSERT OR UPDATE ON quant_sold - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.quant_sold_ins_upd(); - - --- --- Name: remove_action_gestion; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER remove_action_gestion - AFTER DELETE ON fiche - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.card_after_delete(); - - --- --- Name: t_check_balance; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_check_balance - AFTER INSERT OR UPDATE ON jrn - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.proc_check_balance(); - - --- --- Name: t_check_jrn; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_check_jrn - BEFORE INSERT OR DELETE OR UPDATE ON jrn - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrn_check_periode(); - - --- --- Name: t_group_analytic_del; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_group_analytic_del - BEFORE DELETE ON groupe_analytique - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.group_analytique_del(); - - --- --- Name: t_group_analytic_ins_upd; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_group_analytic_ins_upd - BEFORE INSERT OR UPDATE ON groupe_analytique - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.group_analytic_ins_upd(); - - --- --- Name: t_jnt_fic_attr_ins; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jnt_fic_attr_ins - AFTER INSERT ON jnt_fic_attr - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jnt_fic_attr_ins(); - - --- --- Name: t_jrn_def_add_periode; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jrn_def_add_periode - AFTER INSERT ON jrn_def - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrn_def_add(); - - --- --- Name: t_jrn_def_delete; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jrn_def_delete - BEFORE DELETE ON jrn_def - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrn_def_delete(); - - --- --- Name: t_jrn_del; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jrn_del - BEFORE DELETE ON jrn - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrn_del(); - - --- --- Name: t_jrnx_del; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jrnx_del - BEFORE DELETE ON jrnx - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrnx_del(); - - --- --- Name: t_jrnx_ins; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jrnx_ins - BEFORE INSERT ON jrnx - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrnx_ins(); - - --- --- Name: TRIGGER t_jrnx_ins ON jrnx; Type: COMMENT; Schema: public; Owner: - --- - -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'; - - --- --- Name: t_jrnx_upd; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_jrnx_upd - BEFORE UPDATE ON jrnx - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrnx_ins(); - - --- --- Name: t_letter_del; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_letter_del - AFTER DELETE ON jrnx - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrnx_letter_del(); - - --- --- Name: TRIGGER t_letter_del ON jrnx; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TRIGGER t_letter_del ON jrnx IS 'Delete the lettering for this row'; - - --- --- Name: t_plan_analytique_ins_upd; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_plan_analytique_ins_upd - BEFORE INSERT OR UPDATE ON plan_analytique - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.plan_analytic_ins_upd(); - - --- --- Name: t_poste_analytique_ins_upd; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_poste_analytique_ins_upd - BEFORE INSERT OR UPDATE ON poste_analytique - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.poste_analytique_ins_upd(); - - --- --- Name: t_tmp_pcm_alphanum_ins_upd; Type: TRIGGER; Schema: public; Owner: - --- - -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(); - - --- --- Name: t_tmp_pcmn_ins; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER t_tmp_pcmn_ins - BEFORE INSERT ON tmp_pcmn - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.tmp_pcmn_ins(); - - --- --- Name: trg_extension_ins_upd; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER trg_extension_ins_upd - BEFORE INSERT OR UPDATE ON extension - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.extension_ins_upd(); - - --- --- Name: trigger_document_type_i; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER trigger_document_type_i - AFTER INSERT ON document_type - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.t_document_type_insert(); - - --- --- Name: trigger_jrn_def_sequence_i; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER trigger_jrn_def_sequence_i - AFTER INSERT ON jrn_def - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.t_jrn_def_sequence(); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY centralized - ADD CONSTRAINT "$1" FOREIGN KEY (c_jrn_def) REFERENCES jrn_def(jrn_def_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY user_sec_act - ADD CONSTRAINT "$1" FOREIGN KEY (ua_act_id) REFERENCES action(ac_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY fiche_def - ADD CONSTRAINT "$1" FOREIGN KEY (frd_id) REFERENCES fiche_def_ref(frd_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY attr_min - ADD CONSTRAINT "$1" FOREIGN KEY (frd_id) REFERENCES fiche_def_ref(frd_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY fiche - ADD CONSTRAINT "$1" FOREIGN KEY (fd_id) REFERENCES fiche_def(fd_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY fiche_detail - ADD CONSTRAINT "$1" FOREIGN KEY (f_id) REFERENCES fiche(f_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jnt_fic_attr - ADD CONSTRAINT "$1" FOREIGN KEY (fd_id) REFERENCES fiche_def(fd_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrn - ADD CONSTRAINT "$1" FOREIGN KEY (jr_def_id) REFERENCES jrn_def(jrn_def_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrn_action - ADD CONSTRAINT "$1" FOREIGN KEY (ja_jrn_type) REFERENCES jrn_type(jrn_type_id); - - --- --- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrn_def - ADD CONSTRAINT "$1" FOREIGN KEY (jrn_def_type) REFERENCES jrn_type(jrn_type_id); - - --- --- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrnx - ADD CONSTRAINT "$2" FOREIGN KEY (j_jrn_def) REFERENCES jrn_def(jrn_def_id); - - --- --- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY attr_min - ADD CONSTRAINT "$2" FOREIGN KEY (ad_id) REFERENCES attr_def(ad_id); - - --- --- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY fiche_detail - ADD CONSTRAINT "$2" FOREIGN KEY (ad_id) REFERENCES attr_def(ad_id); - - --- --- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jnt_fic_attr - ADD CONSTRAINT "$2" FOREIGN KEY (ad_id) REFERENCES attr_def(ad_id); - - --- --- Name: action_detail_ag_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: card; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY forecast_item - ADD CONSTRAINT card FOREIGN KEY (fi_card) REFERENCES fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: fk_card; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY quant_fin - ADD CONSTRAINT fk_card FOREIGN KEY (qf_bank) REFERENCES fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: fk_card_other; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY quant_fin - ADD CONSTRAINT fk_card_other FOREIGN KEY (qf_other) REFERENCES fiche(f_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: fk_forecast; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY forecast_item - ADD CONSTRAINT fk_forecast FOREIGN KEY (fc_id) REFERENCES forecast_cat(fc_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: fk_info_def; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: fk_jrn; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrn_info - ADD CONSTRAINT fk_jrn FOREIGN KEY (jr_id) REFERENCES jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: fk_jrn; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY quant_fin - ADD CONSTRAINT fk_jrn FOREIGN KEY (jr_id) REFERENCES jrn(jr_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: fk_pa_id; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY groupe_analytique - ADD CONSTRAINT fk_pa_id FOREIGN KEY (pa_id) REFERENCES plan_analytique(pa_id) ON DELETE CASCADE; - - --- --- Name: fk_pcmn_val; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrnx - ADD CONSTRAINT fk_pcmn_val FOREIGN KEY (j_poste) REFERENCES tmp_pcmn(pcm_val); - - --- --- Name: fk_pcmn_val; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY centralized - ADD CONSTRAINT fk_pcmn_val FOREIGN KEY (c_poste) REFERENCES tmp_pcmn(pcm_val); - - --- --- Name: fk_stock_good_f_id; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: forecast_child; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY forecast_cat - ADD CONSTRAINT forecast_child FOREIGN KEY (f_id) REFERENCES forecast(f_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: forecast_f_end_date_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: forecast_f_start_date_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: formdef_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY form - ADD CONSTRAINT formdef_fk FOREIGN KEY (fo_fr_id) REFERENCES formdef(fr_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: jnt_cred_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jnt_deb_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jrn_def_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jrn_per_jrn_def_id; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jrn_periode_p_id; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jrn_rapt_jr_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jrn_rapt_jra_concerned_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jrnx_f_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jrnx - ADD CONSTRAINT jrnx_f_id_fkey FOREIGN KEY (f_id) REFERENCES fiche(f_id) ON UPDATE CASCADE; - - --- --- Name: jrnx_note_j_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: letter_cred_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY letter_cred - ADD CONSTRAINT letter_cred_fk FOREIGN KEY (j_id) REFERENCES jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: letter_deb_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY letter_deb - ADD CONSTRAINT letter_deb_fk FOREIGN KEY (j_id) REFERENCES jrnx(j_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: md_type; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY document_modele - ADD CONSTRAINT md_type FOREIGN KEY (md_type) REFERENCES document_type(dt_id); - - --- --- Name: mod_payment_jrn_def_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: mod_payment_mp_fd_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY mod_payment - ADD CONSTRAINT mod_payment_mp_fd_id_fkey FOREIGN KEY (mp_fd_id) REFERENCES fiche_def(fd_id); - - --- --- Name: mod_payment_mp_jrn_def_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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); - - --- --- Name: operation_analytique_j_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: operation_analytique_po_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: poste_analytique_pa_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: profile_menu_me_code_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: profile_menu_p_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: profile_menu_type_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY profile_menu - ADD CONSTRAINT profile_menu_type_fkey FOREIGN KEY (p_type_display) REFERENCES profile_menu_type(pm_type); - - --- --- Name: profile_user_p_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: qp_vat_code_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY quant_purchase - ADD CONSTRAINT qp_vat_code_fk FOREIGN KEY (qp_vat_code) REFERENCES tva_rate(tva_id); - - --- --- Name: qs_vat_code_fk; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY quant_sold - ADD CONSTRAINT qs_vat_code_fk FOREIGN KEY (qs_vat_code) REFERENCES tva_rate(tva_id); - - --- --- Name: quant_purchase_j_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: quant_purchase_qp_internal_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: quant_sold_j_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: quant_sold_qs_internal_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: stock_goods_j_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: uj_priv_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- PostgreSQL database dump complete --- -commit; diff --git a/sources/contrib/mono-dossier/mono.sql b/sources/contrib/mono-dossier/mono.sql deleted file mode 100644 index fe4fef0..0000000 --- a/sources/contrib/mono-dossier/mono.sql +++ /dev/null @@ -1,538 +0,0 @@ --- --- PostgreSQL database dump --- - -SET statement_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = off; -SET check_function_bodies = false; -SET client_min_messages = warning; -SET escape_string_warning = off; - --- --- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: - --- - -SET search_path = public, pg_catalog; - --- --- Name: limit_user(); Type: FUNCTION; Schema: public; Owner: - --- - -CREATE FUNCTION limit_user() RETURNS trigger - LANGUAGE plpgsql - AS $$ - -begin -NEW.ac_user := substring(NEW.ac_user from 1 for 80); -return NEW; -end; $$; - - -SET default_tablespace = ''; - -SET default_with_oids = false; - --- --- Name: ac_dossier; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE ac_dossier ( - dos_id integer DEFAULT nextval(('dossier_id'::text)::regclass) NOT NULL, - dos_name text NOT NULL, - dos_description text, - dos_jnt_user integer DEFAULT 0 -); - - --- --- Name: ac_users; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE ac_users ( - use_id integer DEFAULT nextval(('users_id'::text)::regclass) NOT NULL, - use_first_name text, - use_name text, - use_login text NOT NULL, - use_active integer DEFAULT 0, - use_pass text, - use_admin integer DEFAULT 0, - CONSTRAINT ac_users_use_active_check CHECK (((use_active = 0) OR (use_active = 1))) -); - - --- --- Name: audit_connect; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE audit_connect ( - ac_id integer NOT NULL, - ac_user text, - ac_date timestamp without time zone DEFAULT now(), - ac_ip text, - 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))) -); - - --- --- Name: audit_connect_ac_id_seq; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE audit_connect_ac_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: audit_connect_ac_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - --- - -ALTER SEQUENCE audit_connect_ac_id_seq OWNED BY audit_connect.ac_id; - - --- --- Name: audit_connect_ac_id_seq; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('audit_connect_ac_id_seq', 287, true); - - --- --- Name: dossier_id; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE dossier_id - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: dossier_id; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('dossier_id', 29, true); - - --- --- Name: jnt_use_dos; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE 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 -); - - --- --- Name: modeledef; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE modeledef ( - mod_id integer DEFAULT nextval(('s_modid'::text)::regclass) NOT NULL, - mod_name text NOT NULL, - mod_desc text -); - - --- --- Name: priv_user; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE priv_user ( - priv_id integer DEFAULT nextval(('seq_priv_user'::text)::regclass) NOT NULL, - priv_jnt integer NOT NULL, - priv_priv text -); - - --- --- Name: s_modid; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE s_modid - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: s_modid; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_modid', 8, true); - - --- --- Name: seq_jnt_use_dos; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_jnt_use_dos - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_jnt_use_dos; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_jnt_use_dos', 33, true); - - --- --- Name: seq_priv_user; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE seq_priv_user - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: seq_priv_user; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_priv_user', 16, true); - - --- --- Name: theme; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE theme ( - the_name text NOT NULL, - the_filestyle text, - the_filebutton text -); - - --- --- Name: user_global_pref; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE user_global_pref ( - user_id text NOT NULL, - parameter_type text NOT NULL, - parameter_value text -); - - --- --- Name: TABLE user_global_pref; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON TABLE user_global_pref IS 'The user''s global parameter '; - - --- --- Name: COLUMN user_global_pref.user_id; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN user_global_pref.user_id IS 'user''s login '; - - --- --- Name: COLUMN user_global_pref.parameter_type; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN user_global_pref.parameter_type IS 'the type of parameter '; - - --- --- Name: COLUMN user_global_pref.parameter_value; Type: COMMENT; Schema: public; Owner: - --- - -COMMENT ON COLUMN user_global_pref.parameter_value IS 'the value of parameter '; - - --- --- Name: users_id; Type: SEQUENCE; Schema: public; Owner: - --- - -CREATE SEQUENCE users_id - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: users_id; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('users_id', 5, true); - - --- --- Name: version; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE repo_version ( - val integer NOT NULL -); - - --- --- Name: ac_id; Type: DEFAULT; Schema: public; Owner: - --- - -ALTER TABLE ONLY audit_connect ALTER COLUMN ac_id SET DEFAULT nextval('audit_connect_ac_id_seq'::regclass); - - --- --- Data for Name: ac_dossier; Type: TABLE DATA; Schema: public; Owner: - --- - -COPY ac_dossier (dos_id, dos_name, dos_description, dos_jnt_user) FROM stdin; -25 Dossier Dossier par défaut 0 -\. - - --- --- Data for Name: ac_users; Type: TABLE DATA; Schema: public; Owner: - --- - -COPY ac_users (use_id, use_first_name, use_name, use_login, use_active, use_pass, use_admin) FROM stdin; -1 \N \N phpcompta 1 b1cc88e1907cde80cb2595fa793b3da9 1 -\. - - --- --- Data for Name: audit_connect; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: jnt_use_dos; Type: TABLE DATA; Schema: public; Owner: - --- - -COPY jnt_use_dos (jnt_id, use_id, dos_id) FROM stdin; -29 1 25 -\. - - --- --- Data for Name: modeledef; Type: TABLE DATA; Schema: public; Owner: - --- - -COPY modeledef (mod_id, mod_name, mod_desc) FROM stdin; -1 (BE) Basique Comptabilité Belge, à adapter -2 (FR) Basique Comptabilité Française, à adapter -\. - - --- --- Data for Name: priv_user; Type: TABLE DATA; Schema: public; Owner: - --- - -COPY priv_user (priv_id, priv_jnt, priv_priv) FROM stdin; -\. - - --- --- Data for Name: theme; Type: TABLE DATA; Schema: public; Owner: - --- - -COPY theme (the_name, the_filestyle, the_filebutton) FROM stdin; -classic style.css \N -Light style-light.css \N -Colored style-color.css \N -EPad style-epad.css \N -\. - - --- --- Data for Name: user_global_pref; Type: TABLE DATA; Schema: public; Owner: - --- - -COPY user_global_pref (user_id, parameter_type, parameter_value) FROM stdin; -phpcompta TOPMENU TEXT -phpcompta PAGESIZE 50 -phpcompta THEME classic -phpcompta LANG fr_FR.utf8 -\. - - --- --- Data for Name: version; Type: TABLE DATA; Schema: public; Owner: - --- - -COPY repo_version (val) FROM stdin; -14 -\. - - --- --- Name: ac_dossier_dos_name_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY ac_dossier - ADD CONSTRAINT ac_dossier_dos_name_key UNIQUE (dos_name); - - --- --- Name: ac_dossier_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY ac_dossier - ADD CONSTRAINT ac_dossier_pkey PRIMARY KEY (dos_id); - - --- --- Name: ac_users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY ac_users - ADD CONSTRAINT ac_users_pkey PRIMARY KEY (use_id); - - --- --- Name: ac_users_use_login_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY ac_users - ADD CONSTRAINT ac_users_use_login_key UNIQUE (use_login); - - --- --- Name: audit_connect_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY audit_connect - ADD CONSTRAINT audit_connect_pkey PRIMARY KEY (ac_id); - - --- --- Name: jnt_use_dos_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY jnt_use_dos - ADD CONSTRAINT jnt_use_dos_pkey PRIMARY KEY (jnt_id); - - --- --- Name: modeledef_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY modeledef - ADD CONSTRAINT modeledef_pkey PRIMARY KEY (mod_id); - - --- --- Name: pk_user_global_pref; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY user_global_pref - ADD CONSTRAINT pk_user_global_pref PRIMARY KEY (user_id, parameter_type); - - --- --- Name: priv_user_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY priv_user - ADD CONSTRAINT priv_user_pkey PRIMARY KEY (priv_id); - - --- --- Name: version_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: --- - -ALTER TABLE ONLY version - ADD CONSTRAINT version_pkey PRIMARY KEY (val); - - --- --- Name: audit_connect_ac_user; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX audit_connect_ac_user ON audit_connect USING btree (ac_user); - - --- --- Name: fk_jnt_dos_id; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fk_jnt_dos_id ON jnt_use_dos USING btree (dos_id); - - --- --- Name: fk_jnt_use_dos; Type: INDEX; Schema: public; Owner: -; Tablespace: --- - -CREATE INDEX fk_jnt_use_dos ON jnt_use_dos USING btree (use_id); - - --- --- Name: limit_user_trg; Type: TRIGGER; Schema: public; Owner: - --- - -CREATE TRIGGER limit_user_trg - BEFORE INSERT OR UPDATE ON audit_connect - FOR EACH ROW - EXECUTE PROCEDURE limit_user(); - - --- --- Name: fk_user_id; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jnt_use_dos_dos_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -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; - - --- --- Name: jnt_use_dos_use_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY jnt_use_dos - ADD CONSTRAINT jnt_use_dos_use_id_fkey FOREIGN KEY (use_id) REFERENCES ac_users(use_id); - - --- --- Name: priv_user_priv_jnt_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY priv_user - ADD CONSTRAINT priv_user_priv_jnt_fkey FOREIGN KEY (priv_jnt) REFERENCES jnt_use_dos(jnt_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- PostgreSQL database dump complete --- - -begin; -update theme set the_name='Mandarine' ,the_filestyle='style-mandarine.css' where the_name='Colored'; -update theme set the_name='Mobile' ,the_filestyle='style-mobile.css' where the_name='EPad'; -update theme set the_name = 'Classique' where the_name='classic'; -update user_global_pref set parameter_value='Classique' where parameter_type='THEME'; -update theme set the_filestyle='style-classic.css' where the_filestyle='style.css'; -update repo_version set val=15; -commit; diff --git a/sources/contrib/rapport/README b/sources/contrib/rapport/README deleted file mode 100644 index ab1615d..0000000 --- a/sources/contrib/rapport/README +++ /dev/null @@ -1,8 +0,0 @@ -En rgle gnrale, il suffit d'executer le script -sql dans la base de donnes o le rapport doit tre -ajout. - -IMPORTANT: le numro (fr_id) du rapport est rserv et -unique - -exemple fr_id=3000000 est rserv au dclaration TVA belge diff --git a/sources/contrib/rapport/tva_decla.sql b/sources/contrib/rapport/tva_decla.sql deleted file mode 100644 index 2b75bdc..0000000 --- a/sources/contrib/rapport/tva_decla.sql +++ /dev/null @@ -1,16 +0,0 @@ --- --- PostgreSQL database dump --- - -SET client_encoding = 'LATIN1'; - -SET search_path = public, pg_catalog; - -delete from form where fo_fr_id=3000000; -delete from formdef where fr_id=3000000; - -INSERT INTO formdef (fr_id, fr_label) VALUES (3000000, 'TVA dclaration'); --- --- Data for TOC entry 2 (OID 315304) --- Name: formdef; Type: TABLE DATA; Schema: public; Owner: dany --- diff --git a/sources/contrib/rapport/tva_decla_fr_BE.sql b/sources/contrib/rapport/tva_decla_fr_BE.sql deleted file mode 100644 index 7dc3467..0000000 --- a/sources/contrib/rapport/tva_decla_fr_BE.sql +++ /dev/null @@ -1,28 +0,0 @@ --- --- PostgreSQL database dump --- - -SET client_encoding = 'LATIN1'; - -SET search_path = public, pg_catalog; - -delete from form where fo_fr_id=3000000; -delete from formdef where fr_id=3000000; - -INSERT INTO formdef (fr_id, fr_label) VALUES (3000000, 'TVA dclaration'); --- --- Data for TOC entry 2 (OID 315304) --- Name: formdef; Type: TABLE DATA; Schema: public; Owner: dany --- --- - -INSERT INTO form VALUES (3000398, 3000000, 1, 'Prestation [ case 03 ]', '[700%]-[7000005]'); -INSERT INTO form VALUES (3000399, 3000000, 2, 'Prestation intra [ case 47 ]', '[7000005]'); -INSERT INTO form VALUES (3000400, 3000000, 3, 'Tva due [case 54]', '[4513]+[4512]+[4511] FROM=01.2005'); -INSERT INTO form VALUES (3000401, 3000000, 4, 'Marchandises, matire premire et auxiliaire [case 81 ]', '[60%]'); -INSERT INTO form VALUES (3000402, 3000000, 7, 'Service et bien divers [case 82]', '[61%]'); -INSERT INTO form VALUES (3000403, 3000000, 8, 'bien d''invest [ case 83 ]', '[2400%]'); -INSERT INTO form VALUES (3000404, 3000000, 9, 'TVA dductible [ case 59 ]', 'abs([4117]-[411%])'); -INSERT INTO form VALUES (3000405, 3000000, 8, 'TVA non ded -> voiture', '[610022]*0.21/2'); -INSERT INTO form VALUES (3000406, 3000000, 9, 'Acompte TVA', '[4117]'); - diff --git a/sources/contrib/sql-utility/get-sql.sh b/sources/contrib/sql-utility/get-sql.sh deleted file mode 100755 index b04f42f..0000000 --- a/sources/contrib/sql-utility/get-sql.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# -# Author Dany De Bontridder -# Under the GPL 2 minimun -# -Help () { - cat <<_eof -$0 [option] database - -f function only - -t table only -_eof -} - - -if [ $# -lt 2 ]; then - Help -fi - -case "$1" in - -f) - pg_dump -s "$2"|awk '/CREATE FUNCTION/,/LANGUAGE/ { print $0;}' - ;; - -t) - pg_dump -s "$2"| awk '/CREATE TABLE/,/;/ { print $0;}' - pg_dump -s "$2"| awk '/ALTER TABLE/,/;/ { print $0;}' - ;; -esac diff --git a/sources/contrib/wiki-tools/transform.pl b/sources/contrib/wiki-tools/transform.pl deleted file mode 100755 index 8737f7a..0000000 --- a/sources/contrib/wiki-tools/transform.pl +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/perl -# -# -# -# -# -use strict; -my $block=0; -while (my $line=<>) { - $line=~s/\/!/ ; - $line=~s/\/!!/ ; - $line=~s/\/!!!/ ; - $line=~s/\/!!!!/ ; - $line=~s/\/!!!!!/ ; - $line=~s/<\/sect1>// ; - $line=~s/<\/sect>// ; - $line=~s/<\/sect2>// ; - $line=~s/<\/sect3>// ; - $line=~s/<\/sect4>// ; - $line=~s/

//; - $line=~s/<\/p>//; - $line=~s///; - $line=~s/<\/itemize>//; - $line=~s/<\/item>//; - $line=~s/[1-9]\./#/; - $line=~s//\*/; - $line=~s//(:toc:) (:num:)/; - $line=~s///; - if ( $line =~ // ) { - $line=~s//[@/; - $block=1; - } - if ( $line =~ /<\/verb>/ ) { - $line=~s/<\/verb>/@]/; - $block=0; - } - $line=~s/

//; - $line=~s/(.*)<\/title>/[++$1 ++]/; - $line=~s/<author>//; - $line=~s/<name>(.*)<\/name>/''$1''/; - $line=~s/<\/author>//; - $line=~s/<date>(.*)<\/date>/$1/; - $line=~s/<abstract>//; - $line=~s/<\/article>//; - $line=~s/<tscreen>//; - $line=~s/<\/tscreen>//; - print "$line"; -} diff --git a/sources/dev/README b/sources/dev/README deleted file mode 100644 index b666e0e..0000000 --- a/sources/dev/README +++ /dev/null @@ -1,2 +0,0 @@ -Tools for developpers only -Don't use them if you don't know their purpose diff --git a/sources/dev/compile_text.sh b/sources/dev/compile_text.sh deleted file mode 100755 index 2e22a45..0000000 --- a/sources/dev/compile_text.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# Brief : compite the file .mo, -# It is used for the translation -# -# -# This file is a part of NOALYSS under GPL -# Author D. DE BONTRIDDER danydb@aevalys.eu -cd ../html/lang -echo "English" -cd en_US/LC_MESSAGES -msgfmt -c -v messages.po -echo "Dutch" -cd ../.. -cd nl_NL/LC_MESSAGES -msgfmt -c -v messages.po - diff --git a/sources/dev/compose_list.sh b/sources/dev/compose_list.sh deleted file mode 100755 index b337c2b..0000000 --- a/sources/dev/compose_list.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# -# This file is a part of NOALYSS under GPL -# Author D. DE BONTRIDDER danydb@aevalys.eu - -cat <<EOF -This script create a list of all the function on only page, -you must first run doxygen and call this file from the phpcompta directory -EOF -DOC=doc/developper/html -cat $DOC/globals_func.html > $DOC/list_function.html -find $DOC/globals_func*.html | - xargs awk '/<h3>/,/\/ul/ { print $0; }' >> $DOC/list_function.html -cat $DOC/list_function.html > $DOC/globals_func.html -[ $? -eq 0 ]&&echo "********************** DONE ***************" diff --git a/sources/dev/create_changelog.sh b/sources/dev/create_changelog.sh deleted file mode 100644 index 6dbeaf0..0000000 --- a/sources/dev/create_changelog.sh +++ /dev/null @@ -1 +0,0 @@ -cd .. && svn2cl --break-before-msg --group-by-day -a -o Changelog diff --git a/sources/dev/extract_text.sh b/sources/dev/extract_text.sh deleted file mode 100644 index c9eef35..0000000 --- a/sources/dev/extract_text.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# Brief : extract strings from the file, in order to update a -# po file. It is used for the translation -# -# -# This file is a part of NOALYSS under GPL -# Author D. DE BONTRIDDER danydb@aevalys.eu -echo "Extract" -cd .. -# CATALOG -xgettext -L PHP -j --from-code=UTF-8 -p html/lang/ html/*.php include/*.php include/template/*.php include/ext/*/*.php include/ext/*/include/*.php include/ext/*/include/template/*.php - -# For dutch -echo "Dutch" -msgmerge -U -s html/lang/nl_NL/LC_MESSAGES/messages.po html/lang/messages.po - -#For english -echo "English" -msgmerge -U -s html/lang/en_US/LC_MESSAGES/messages.po html/lang/messages.po - -#For new language -# export LOCAL=nl_NL -# msginit --locale=$LOCAL -i html/lang/messages.po -o html/lang/$LOCAL/LC_MESSAGES/messages.po diff --git a/sources/dev/get_database_item.sh b/sources/dev/get_database_item.sh deleted file mode 100755 index 618082f..0000000 --- a/sources/dev/get_database_item.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -export PGUSER=dany -export PGPASSWORD=dany -export PGHOST=localhost -export PGDATABASE=rel671mod1 -export PGPORT=5432 -( -echo "<?php " -psql -A -F" " -t -c "select '\$menu[]=_('''||replace(me_menu,'''',E'\\\\''')||''');' , '\$desc[]=_('''||replace(me_description,'''',E'\\\\''')||''');' from menu_ref ;" -echo "?>" ) > ../include/database.item.php -( -echo "<?php " -psql -A -F" " -t -c "select '\$attr_def[]=_('''||replace(ad_text,'''',E'\\\\''')||''');' from attr_def ;" -echo "?>" ) >> ../include/database.item.php -( -echo "<?php " -psql -A -F" " -t -c "select '\$document_type[]=_('''||replace(dt_value,'''',E'\\\\''')||''');' from document_type ;" -echo "?>" ) >> ../include/database.item.php -( -echo "<?php " -psql -A -F" " -t -c "select '\$action[]=_('''||replace(ac_description,'''',E'\\\\''')||''');' from action ;" -echo "?>" ) >> ../include/database.item.php -( -echo "<?php " -psql -A -F" " -t -c "select '\$mdp[]=_('''||replace(mp_lib,'''',E'\\\\''')||''');' from mod_payment ;" -echo "?>" ) >> ../include/database.item.php -( -echo "<?php " -psql -A -F" " -t -c "select '\$jrn_def_name[]=_('''||replace(jrn_def_name,'''',E'\\\\''')||''');' from jrn_def ;" -echo "?>" ) >> ../include/database.item.php -( -echo "<?php " -psql -A -F" " -t -c "select '\$jrn_def_description[]=_('''||replace(jrn_def_description,'''',E'\\\\''')||''');' from jrn_def ;" -echo "?>" ) >> ../include/database.item.php - -echo "File ../include/database.item.php is created" diff --git a/sources/dev/manage-code/create-file/create_config.py b/sources/dev/manage-code/create-file/create_config.py deleted file mode 100755 index 93789b3..0000000 --- a/sources/dev/manage-code/create-file/create_config.py +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/python -#-*- coding: utf-8 -*- -# -import psycopg2 -import psycopg2.extras -import getopt -import sys - -try: - opt,args=getopt.getopt(sys.argv[1:],'s:t:c:') - if len (opt) == 0 : - raise NameError ('option') - schema='public' - table='' - connexion_string='' - class_name="None" - for o,a in opt: - if o == '-s': - schema=a - elif o == '-t': - table=a - elif o == '-c': - connexion_string=a - - if table == '': - raise NameError('table') -except: - print "Utilisation "+sys.argv[0]+" -s nom_du_schema -t nom de la table + c connexion string" - print 'example -t jrnxc -c "dbname=xxx user=xx port=xx password=xxx"' - print """ - This utility create a file, this file can be given as input to the script - create_phpclass.py with the option -f - This will create the corresponding PHP File that you need to put in the include folder - """ - sys.exit(-1) - -cnx=psycopg2.connect (connexion_string) -curs=cnx.cursor(cursor_factory=psycopg2.extras.DictCursor) - -curs.execute(''' - SELECT - columns.column_name,columns.data_type,columns.column_default -FROM - information_schema.columns -WHERE - columns.table_schema=%s - and columns.table_name=%s -''',(schema,table)) -record=curs.fetchall() -file_name=table+"_struct.txt" -file=open(file_name,'w+') - -# class_name -world=table.split('_') -worlds=[] -for i in world: - worlds.append(i.capitalize()) - -class_name='_'.join(worlds) -class_name=class_name+"_SQL" - -file.write(class_name+"\n") -file.write(schema+"."+table+"\n") -record.reverse() -for l in record: - col_name,col_type,col_default=l - file.write ("%s\t|%s\t|%s\n"%(col_name,col_type,col_default)) - -file.close() -print "file %s has been created "%(file_name) -print "check that the first column is the primary key" diff --git a/sources/dev/manage-code/create-file/create_phpclass.py b/sources/dev/manage-code/create-file/create_phpclass.py deleted file mode 100755 index 3786aee..0000000 --- a/sources/dev/manage-code/create-file/create_phpclass.py +++ /dev/null @@ -1,190 +0,0 @@ -#!/usr/bin/python - - -# Command we have to replace -# @table@ by the table name -# @id@ by the primary key -# @class_name@ Name of the class (uppercase) -# @column_array@ fill the $this->name -# @column_type_array@ fill the $this->type -# read the file with the name -# first line = table name -# second line = pk - -import sys, getopt - -def help(): - print """ - option are -h for help - -f input file containing the structure - -n the PK is not serial - The input file contains : - first line class name : mother class separator : (optionnal) - second line table name - 3rd PK type - ... and after all the column names and column type (see create_file_table.sql) - see the file example - """ -def main(): - try: - opts,args=getopt.getopt(sys.argv[1:],'f:h',['file','help','pk-not-serial']) - except getopt.GetOptError, err: - print str(err) - help() - sys.exit(-1) - filein='' - for option,value in opts: - if option in ('-f','--file'): - filein=value - elif option in ('-h','--help'): - help() - sys.exit(-1) - elif option in ('-n','--pk-not-serial'): - nopk=True - if filein=='' : - help() - sys.exit(-2) - sParent="""<?php -/** - *@file - *@brief Manage the table @table@ - * - * -Example -@code - -@endcode - */ -require_once('class_noalyss_sql.php'); - - -/** - *@brief Manage the table @table@ -*/ -class @class_name@ extends Noalyss_SQL -{ - @vars@ - /* example private $variable=array("easy_name"=>column_name,"email"=>"column_name_email","val3"=>0); */ - function __construct($p_id=-1) - { - - - $this->table = "@table@"; - $this->primary_key = "@id@"; - - $this->name = array( - @column_array@ - ); - - $this->type = array( - @column_type_array@ - ); - - $this->default = array( - "@id@" => "auto" - ); - global $cn; - $this->date_format = "DD.MM.YYYY"; - parent::__construct($cn, $p_id); - } - /** - *@brief Add here your own code: verify is always call BEFORE insert or update - */ - public function verify() { - parent::verify(); - @set_tech_user@ - } - -} - -?> -""" - - - # read the file - try : - file=open(filein,'r') - line=file.readlines() - class_name=line[0].strip() - - - table=line[1].strip() - (id,type_id,default)=line[2].strip().split('|') - id=id.strip() - fileoutput=open("class_"+class_name.lower()+".php",'w+') - print "Create the file "+fileoutput.name - - sep='' - i=1 - set_tech_user="" - for e in line[3:]: - if e.find('|') < 0 : - continue - col_name=(e.split('|'))[0].strip() - col_type=(e.split('|'))[1].strip() - if col_name == 'tech_date': - print "*"*80 - print ('Warning : tech_date est un champs technique a utiliser avec un trigger') - print "*"*80 - - if col_name == 'tech_user' : - set_tech_user=" $this->tech_user=$_SESSION['g_user']; " - i+=1 - sep=',' - column_array='' - column_type_array='' - sep='' - var='//------ Attributes-----'+"\n" - for e in line [2:]: - if e.find('|') < 0 : - continue - col_name=(e.split('|'))[0].strip() - col_type=(e.split('|'))[1].strip() - if col_type == 'integer' or col_type == 'numeric' or col_type=='bigint': - col_type="numeric" - elif col_type=='text' or col_type=='character varying' or col_type=='character': - col_type="text" - elif col_type=='oid': - col_type='oid' - elif col_type=='date' or col_type=='timestamp without timezone' or col_type=='timestamp with timezone': - col_type='date' - else : - col_type='set_me' - column_array+=sep+'"'+col_name+'"=>"'+col_name+'"'+"\n" - column_type_array+=sep+'"'+col_name+'"=>"'+col_type+'"'+"\n" - var=var+' var $'+col_name+";\n" - sep=',' - column_array='"'+id+'"=>"'+id+'",'+column_array - i=1;sep='';set=' set ' - column_comma='' - verify_data_type='' - # create verify data_type - for e in line[3:]: - if e.find('|') < 0 : - continue - - (col_id,col_type,default)=e.split('|') - col_id=col_id.strip() - col_type=col_type.strip() - verify_data_type+=" if ( trim($this->"+col_id+") == '') $this->"+col_id+"=null;\n" - if col_type in ('float','integer','numeric','bigint') : - verify_data_type+="if ( $this->"+col_id+"!== null && settype($this->"+col_id+",'float') == false )\n \ - throw new Exception('DATATYPE "+col_id+" $this->"+col_id+" non numerique');\n" - if col_type in ('date',' timestamp without time zone','timestamp with time zone'): - verify_data_type+=" if (isDate($this->"+col_id+") == null )\n \ - throw new Exception('DATATYPE "+col_id+" $this->"+col_id+" date invalide');\n" - - sParent=sParent.replace('@id@',id) - sParent=sParent.replace('@vars@',var) - sParent=sParent.replace('@table@',table) - sParent=sParent.replace('@class_name@',class_name) - sParent=sParent.replace('@column_array@',column_array) - sParent=sParent.replace('@column_type_array@',column_type_array) - sParent=sParent.replace('@set_tech_user@',set_tech_user) - fileoutput.writelines(sParent) - - except : - print "error " - print sys.exc_info() -if __name__ == "__main__": - main() diff --git a/sources/dev/manage-code/create-file/create_trigger.py b/sources/dev/manage-code/create-file/create_trigger.py deleted file mode 100755 index 22fa358..0000000 --- a/sources/dev/manage-code/create-file/create_trigger.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/python -# -# Give the code for a trigger -import sys, getopt -def help(): - print """ - option are -h for help - -d default trigger for tech_date - -a action : insert update or delete or a combination separated by comma - -t table name - -s schema name - """ -def main(): - try: - opts,args=getopt.getopt(sys.argv[1:],'hda:t:s:',['help','tech_date','action','table','schema']) - except getopt.GetOptError, err: - print str(err) - help() - sys.exit(-1) - table_name='' - action='' - schema='' - tech_date=False - for option,value in opts: - if option in ('-a','--action'): - action=value - elif option in ('-h','--help'): - help() - sys.exit(-1) - elif option in ('-t','--table'): - table_name=value - elif option in ('-s','--schema'): - schema=value - elif option in ('-d','--tech_date'): - tech_date=True - if table_name=='': - help() - print "The table name is missing" - sys.exit(-2) - - if schema == '': - schema='public' - - if not tech_date and action == '' : - help() - print "No action specified " - sys.exit(-3) - - print ('CREATE OR REPLACE FUNCTION '+schema+'.'+table_name+"_trg"+'() ') - print (' returns trigger ') - print (' as ') - print ('$_BODY_$') - print ('declare ') - print ('begin') - if tech_date : - print (' NEW.tech_date=now() ;') - else : - print (' -- insert your code here ') - print ('return NEW;') - print ('end;') - print ('$_BODY_$ LANGUAGE plpgsql;') - - - print ('CREATE TRIGGER '+table_name+"_trg") - print (" BEFORE / AFTER ") - if action == '' and tech_date : - print (" INSERT OR UPDATE ") - elif len(action.split(',')) > 0: - a_action=action.split(',') - str_or='' - for e in a_action: - print str_or+(e.upper()) - str_or=" OR " - else: - print (action.upper()) - - print (" on "+schema+'.'+table_name) - print (" FOR EACH ROW EXECUTE PROCEDURE "+schema+'.'+table_name+"_trg();") - - - -main() diff --git a/sources/dev/manage-code/create-file/example b/sources/dev/manage-code/create-file/example deleted file mode 100644 index 8ca444f..0000000 --- a/sources/dev/manage-code/create-file/example +++ /dev/null @@ -1,7 +0,0 @@ -Fiche_Attr -attr_def - ad_id | integer - ad_text | text - ad_type | numeric - tech_user | text - tech_date | date diff --git a/sources/dev/manage-code/housekeeping/cleanup.sh b/sources/dev/manage-code/housekeeping/cleanup.sh deleted file mode 100755 index 3be4db6..0000000 --- a/sources/dev/manage-code/housekeeping/cleanup.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# clean all phpcompta related DB. -DOMAIN="rel500_" -export PGPASSWORD="dany" -export PGUSER="dany" -export PGHOST=localhost -echo "Etes vous sur de vouloir effacer les db du domaine $DOMAIN Y/N ?" -read A -if [ "$A" == 'Y' ];then - dropdb ${DOMAIN}account_repository - dropdb ${DOMAIN}dossier1 - dropdb ${DOMAIN}dossier3 - dropdb ${DOMAIN}dossier4 - dropdb ${DOMAIN}dossier5 - dropdb ${DOMAIN}dossier13 - dropdb ${DOMAIN}dossier17 - - dropdb ${DOMAIN}mod1 - dropdb ${DOMAIN}mod2 - dropdb ${DOMAIN}mod3 - dropdb ${DOMAIN}mod7 -else - echo "Effacement annule" -fi diff --git a/sources/dev/manage-code/housekeeping/transform.py b/sources/dev/manage-code/housekeeping/transform.py deleted file mode 100755 index c76e9ca..0000000 --- a/sources/dev/manage-code/housekeeping/transform.py +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/python -# brief : replace the all class widget -# -# This file is a part of NOALYSS under GPL -# Author D. DE BONTRIDDER danydb@aevalys.eu -import glob -import sys -import re -class Transform: - widget=re.compile("new widget.*;.*") - wegal=re.compile('.*=') - wtext=re.compile("text",re.IGNORECASE) - wselect=re.compile("select",re.IGNORECASE) - wjsDate=re.compile("js_date",re.IGNORECASE) - wHidden=re.compile("hidden",re.IGNORECASE) - wcheckbox=re.compile("checkbox",re.IGNORECASE) - wJSSearch_Poste=re.compile("js_search_poste",re.IGNORECASE) - wJSSearch_only=re.compile("js_search_only",re.IGNORECASE) - wSpan=re.compile("span",re.IGNORECASE) - wFile=re.compile("file",re.IGNORECASE) - wRadio=re.compile("radio",re.IGNORECASE) - wButton=re.compile("button",re.IGNORECASE) - wTextarea=re.compile("textarea",re.IGNORECASE) - wJSConcerned=re.compile("js_concerned",re.IGNORECASE) - wTva=re.compile("js_tva",re.IGNORECASE) - wSearch=re.compile("js_search\"",re.IGNORECASE) - string="" - def __init__(self,p_string): - self.string=p_string - def transform(self): - result=self.string - found_widgets=self.widget.findall(self.string) - if len(found_widgets) > 0: - sEgal=self.wegal.findall(result) - found_widget=found_widgets[0] - result="" - if len(self.wtext.findall(found_widget))>0: - result="new IText" - if len(self.wselect.findall(found_widget))>0: - result="new ISelect" - if len(self.wjsDate.findall(found_widget))>0: - result="new IDate" - if len(self.wHidden.findall(found_widget))>0: - result="new IHidden" - if len(self.wcheckbox.findall(found_widget))>0: - result="new ICheckBox" - if len(self.wJSSearch_Poste.findall(found_widget))>0: - result="new IPoste" - if len(self.wJSSearch_only.findall(found_widget))>0: - result="new ICard" - if len(self.wSpan.findall(found_widget))>0: - result="new ISpan" - if len(self.wFile.findall(found_widget))>0: - result="new IFile" - if len(self.wRadio.findall(found_widget))>0: - result="new IRadio" - if len(self.wTextarea.findall(found_widget))>0: - result="new ITextArea" - if len(self.wButton.findall(found_widget))>0: - result="new IButton" - if len(self.wJSConcerned.findall(found_widget))>0: - result="new IConcerned" - if len(self.wTva.findall(found_widget))>0: - result="new ITva" - if len(self.wSearch.findall(found_widget))>0: - result="new ISearch" - if result == "" : - print "Invalid widget :"+self.string - return 'INVALIDWIDGET '+self.string - result=sEgal[0]+result - reArg=re.compile('\(.*\)') - content=reArg.findall(self.string) - reSplit=re.compile(',') - aArg=reSplit.split(content[0]) - if len(aArg) == 1 : - return result+'();'+"\n" - b=aArg[1:] - virg="" - arg="" - for i in b: - arg=arg+virg+i - virg=',' - return result+'('+arg+';'+"\n" - return result - - -if __name__ == "__main__": - string=" $button_escape=new widget('button','Echapper');" - a=Transform(string) - print a.transform() - -# -# if len(sys.argv) < 1 : -# print "Erreur pas de fichier comme argument" -# sys.exit(1) -# files=glob.glob(sys.argv[1]) -# for file in files: -# lines=file.readlines() -# for line in lines: -# diff --git a/sources/dev/manage-code/housekeeping/usage_file.py b/sources/dev/manage-code/housekeeping/usage_file.py deleted file mode 100755 index 8961872..0000000 --- a/sources/dev/manage-code/housekeeping/usage_file.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/python -# Check if the files in include are still used -# -# This file is a part of NOALYSS under GPL -# Author D. DE BONTRIDDER danydb@aevalys.eu -from transform import * -import sys -import os -import glob -if len(sys.argv) < 2 : - print "you need at least two arguments : the file name and the files " - print " into you look" - sys.exit(3) - -filenames=glob.glob(sys.argv[1]) -if len(filenames) == 0: - filenames=[] - filenames.append(sys.argv[1]) -print str(filenames)+ "<-"+sys.argv[1] -for f in filenames: - file_usage=[] - filename=os.path.basename(f) - - for a in range(2,len(sys.argv)): - files=glob.glob(sys.argv[a]) - print str(a)+" : "+sys.argv[a] - reFunction=re.compile(filename) - #reFunction=re.compile('(require|include|form).*'+filename,re.IGNORECASE) - for file in files: - #print "Working on file "+file - fold=open(file) - lines=fold.readlines() - for line in lines: - found=reFunction.findall(line) - if len(found) != 0 : - tmp={file:filename} - file_usage.append(tmp) - - fold.close() - #print 'finished, remaining %d' % (total) - #print file_usage - #print "lenght "+str(len(file_usage)) - if len (file_usage) > 0 : - print "This file "+filename+" is used in " - for x in file_usage: - print x.keys()[0] - else: - print filename +" is never used " - diff --git a/sources/dev/manage-code/housekeeping/usage_function.py b/sources/dev/manage-code/housekeeping/usage_function.py deleted file mode 100755 index c41ea75..0000000 --- a/sources/dev/manage-code/housekeeping/usage_function.py +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/python -# Check if a function is still used -# -# This file is a part of NOALYSS under GPL -# Author D. DE BONTRIDDER danydb@aevalys.eu - -from transform import * -import sys -import os -import glob -if len(sys.argv) < 2 : - print "you need at least one argument : the file containing the function" - print " the second and the thirst are the files where you look for those functions" - sys.exit(3) - -files=glob.glob(sys.argv[1]) -total=len(files) -print "Total file to handle %d " % (len(files)) -reFunction=re.compile('(function) (\w+).*\((.*)\)') -function_name=[] -fList=open("function.txt","a+") -for file in files: - print "Working on file "+file - if file.find('class_') != -1: - continue - fold=open(file) - lines=fold.readlines() - for line in lines: - found=reFunction.findall(line) - if len(found) != 0 : - fctname=found[0][1] - tmp={file:fctname} - function_name.append(tmp) - fList.write(file + ";" + fctname+"\n") - fold.close() - total=total-1 - print 'finished, remaining %d' % (total) -fList.close() -if len(sys.argv) == 2 : - print "the fonctions are " - for e in function_name: - fct=e.values()[0] - print fct - -used={} -for e in function_name: - fct=e.values()[0] - used[fct]=0 -for a in range(2,len(sys.argv)): - print str(a)+ ': '+sys.argv[a] - files_target=glob.glob(sys.argv[a]) - - for e in function_name: - fct=e.values()[0] - for file in files_target: - fd=open(file) - buffer=fd.readlines() - for line in buffer: - if line.find(fct)!= -1: - used[fct]=used[fct]+1 - fd.close() - - -for u in used.keys(): - print "%s : %d " % ( u,used[u]) diff --git a/sources/dev/manage-code/security/without_check.py b/sources/dev/manage-code/security/without_check.py deleted file mode 100755 index bad9a55..0000000 --- a/sources/dev/manage-code/security/without_check.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/python -# brief = check if the files given in arguments using -# the -> check_dossier function -# -# This file is a part of NOALYSS under GPL -# Author D. DE BONTRIDDER danydb@aevalys.eu - - -import sys -import os -import glob - -if len(sys.argv) == 1: - print "you need one or more filename as argument" - sys.exit(3) - -files=glob.glob(sys.argv[1]) -total=len(files) -print "Total file to handle %d " % (len(files)) -for file in files: - #print "Working on file "+file - fold=open(file) - lines=fold.readlines() - widget=('new User','->check_dossier','->Check') - check={} - for w in widget: - check[w]=0 - require="" - for line in lines: - for w in widget: - if check[w] == 1: - continue - if line.find(w) != -1 : - check[w]=1 - fold.close() - for w in widget: - if check[w] == 0 : - print "Missing in "+file+" "+w - total=total-1 - #print 'finished, remaining %d' % (total) - diff --git a/sources/dev/manage-code/widget/add_require.py b/sources/dev/manage-code/widget/add_require.py deleted file mode 100755 index 9debc5e..0000000 --- a/sources/dev/manage-code/widget/add_require.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/python -# brief : replace the all class widget -# -# This file is a part of NOALYSS under GPL -# Author D. DE BONTRIDDER danydb@aevalys.eu - -from transform import * -import sys -import os -import glob - -if len(sys.argv) == 1: - print "you need one or more filename as argument" - sys.exit(3) - -files=glob.glob(sys.argv[1]) -total=len(files) -print "Total file to handle %d " % (len(files)) -for file in files: - print "Working on file "+file - new_file=file - old_file=(file+'.arold') - os.rename(new_file,old_file) - fnew=open(new_file,'a+') - fold=open(old_file) - lines=fold.readlines() - widget=('IHidden','IText','ISpan','ISelect','IDate','ICheckBox','IPoste','ICard','IFile','IRadio','ITextarea','IButton','IConcerned','ITva','ISearch') - check={} - for w in widget: - check[w]=0 - require="" - for line in lines: - for w in widget: - if check[w] == 1: - continue - if line.find(w) != -1 : - require=require+'require_once("class_'+w.lower()+'.php");'+"\n" - check[w]=1 - flag=0 - for line in lines: - if line.find('require')!=-1 and flag == 0: - fnew.write(require) - flag=1 - fnew.write(line) - fnew.close() - fold.close() - total=total-1 - print 'finished, remaining %d' % (total) - diff --git a/sources/dev/manage-code/widget/change.py b/sources/dev/manage-code/widget/change.py deleted file mode 100755 index 02b10bf..0000000 --- a/sources/dev/manage-code/widget/change.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/python -# brief : replace the all class widget -# -# This file is a part of NOALYSS under GPL -# Author D. DE BONTRIDDER danydb@aevalys.eu - -from transform import * -import sys -import os -import glob - -if len(sys.argv) == 1: - print "you need one or more filename as argument" - sys.exit(3) - -files=glob.glob(sys.argv[1]) -total=len(files) -print "Total file to handle %d " % (len(files)) -for file in files: - print "Working on file "+file - new_file=file - old_file=(file+'.old') - os.rename(new_file,old_file) - fnew=open(new_file,'a+') - fold=open(old_file) - lines=fold.readlines() - for line in lines: - buf=Transform(line) - fnew.write(buf.transform()) - fnew.close() - fold.close() - total=total-1 - print 'finished, remaining %d' % (total) - diff --git a/sources/dev/manage-code/widget/transform.py b/sources/dev/manage-code/widget/transform.py deleted file mode 100755 index c76e9ca..0000000 --- a/sources/dev/manage-code/widget/transform.py +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/python -# brief : replace the all class widget -# -# This file is a part of NOALYSS under GPL -# Author D. DE BONTRIDDER danydb@aevalys.eu -import glob -import sys -import re -class Transform: - widget=re.compile("new widget.*;.*") - wegal=re.compile('.*=') - wtext=re.compile("text",re.IGNORECASE) - wselect=re.compile("select",re.IGNORECASE) - wjsDate=re.compile("js_date",re.IGNORECASE) - wHidden=re.compile("hidden",re.IGNORECASE) - wcheckbox=re.compile("checkbox",re.IGNORECASE) - wJSSearch_Poste=re.compile("js_search_poste",re.IGNORECASE) - wJSSearch_only=re.compile("js_search_only",re.IGNORECASE) - wSpan=re.compile("span",re.IGNORECASE) - wFile=re.compile("file",re.IGNORECASE) - wRadio=re.compile("radio",re.IGNORECASE) - wButton=re.compile("button",re.IGNORECASE) - wTextarea=re.compile("textarea",re.IGNORECASE) - wJSConcerned=re.compile("js_concerned",re.IGNORECASE) - wTva=re.compile("js_tva",re.IGNORECASE) - wSearch=re.compile("js_search\"",re.IGNORECASE) - string="" - def __init__(self,p_string): - self.string=p_string - def transform(self): - result=self.string - found_widgets=self.widget.findall(self.string) - if len(found_widgets) > 0: - sEgal=self.wegal.findall(result) - found_widget=found_widgets[0] - result="" - if len(self.wtext.findall(found_widget))>0: - result="new IText" - if len(self.wselect.findall(found_widget))>0: - result="new ISelect" - if len(self.wjsDate.findall(found_widget))>0: - result="new IDate" - if len(self.wHidden.findall(found_widget))>0: - result="new IHidden" - if len(self.wcheckbox.findall(found_widget))>0: - result="new ICheckBox" - if len(self.wJSSearch_Poste.findall(found_widget))>0: - result="new IPoste" - if len(self.wJSSearch_only.findall(found_widget))>0: - result="new ICard" - if len(self.wSpan.findall(found_widget))>0: - result="new ISpan" - if len(self.wFile.findall(found_widget))>0: - result="new IFile" - if len(self.wRadio.findall(found_widget))>0: - result="new IRadio" - if len(self.wTextarea.findall(found_widget))>0: - result="new ITextArea" - if len(self.wButton.findall(found_widget))>0: - result="new IButton" - if len(self.wJSConcerned.findall(found_widget))>0: - result="new IConcerned" - if len(self.wTva.findall(found_widget))>0: - result="new ITva" - if len(self.wSearch.findall(found_widget))>0: - result="new ISearch" - if result == "" : - print "Invalid widget :"+self.string - return 'INVALIDWIDGET '+self.string - result=sEgal[0]+result - reArg=re.compile('\(.*\)') - content=reArg.findall(self.string) - reSplit=re.compile(',') - aArg=reSplit.split(content[0]) - if len(aArg) == 1 : - return result+'();'+"\n" - b=aArg[1:] - virg="" - arg="" - for i in b: - arg=arg+virg+i - virg=',' - return result+'('+arg+';'+"\n" - return result - - -if __name__ == "__main__": - string=" $button_escape=new widget('button','Echapper');" - a=Transform(string) - print a.transform() - -# -# if len(sys.argv) < 1 : -# print "Erreur pas de fichier comme argument" -# sys.exit(1) -# files=glob.glob(sys.argv[1]) -# for file in files: -# lines=file.readlines() -# for line in lines: -# diff --git a/sources/dev/plugin_client.txt b/sources/dev/plugin_client.txt deleted file mode 100644 index 13e99c5..0000000 --- a/sources/dev/plugin_client.txt +++ /dev/null @@ -1,4 +0,0 @@ -"Nom client1","Prénom","C1","Rue de la boite,55" -"Nom client2","Prénom","C2","Rue du couvercle,55" -"Nom client3","Prénom","C3","Rue de la chaussure,55" -"Nom client4","Prénom","C4","Rue de la couleur,55" diff --git a/sources/dev/test-size/readme b/sources/dev/test-size/readme deleted file mode 100644 index 42ebbe4..0000000 --- a/sources/dev/test-size/readme +++ /dev/null @@ -1,15 +0,0 @@ -to use it ---------------- -a. in NOALYSS create a new "dossier" -b. in the "accueil page" you can see it id -c. ./simul.py (-l|-x|-s) |psql database_name (the database name is the DOMAIN_dossierID, replace the uppercase - by the good values) - you must use -l -x or -s (see -h for help) - - -for reusing the same database ------------------------------- -* drop the database = dropdb database_name -* recreate it - createdb -T mod1 -E UTF8 -O noalyss database_name - diff --git a/sources/dev/test-size/simul.py b/sources/dev/test-size/simul.py deleted file mode 100755 index 5fd48da..0000000 --- a/sources/dev/test-size/simul.py +++ /dev/null @@ -1,243 +0,0 @@ -#!/usr/bin/python -# -# -# This file is part of NOALYSS. -# -# NOALYSS is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# NOALYSS is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with NOALYSS; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -#/ -# $Revision$ -# Copyright Author Dany De Bontridder danydb@aevalys.eu - -import random -import getopt -import sys - - - - -def usage(): - print """ - For use with the demo database, this utility helps - you to create differente kind of databases for tuning - and improve the performance - parameters are : - -h help - -s generate a sql file for a small database test - -l generate a sql file for a large database test - -x generate a extra large sql for a huge database test - """ - sys.exit(-1) - -def Add_Attribut_Fiche(p_jft,p_f,p_ad_id,p_value): - # Ajout du nom - #print "insert into jnt_fic_att_value(jft_id,f_id,ad_id) values (%d,%d,%d);" % (p_jft,p_f,p_ad_id) - jnt="%d\t%d\t%d" % (p_jft,p_f,p_ad_id) - #print "insert into attr_value(jft_id,av_text) values (%d,'%s');" % (p_jft,p_value) - attr="%d\t%s" % (p_jft,p_value) - return (jnt,attr) - -def Creation_fiche (p_seq_f_id,p_seq_jft_id,p_fd_id,p_type,p_base_poste,p_nbfiche): - fiche=[] - poste_comptable=[] - Attribut=[] - jnt=[] - for i in range (0,p_nbfiche): - #def Creation fiche : - #print "insert into fiche(f_id,fd_id)values (%d,%d);" % (p_seq_f_id,p_fd_id) - fiche.append("%d\t%d" % (p_seq_f_id,p_fd_id)) - # ajout nom - nom="%s numero %08d" % (p_type,i+100) - (t1,t2)=Add_Attribut_Fiche(p_seq_jft_id,p_seq_f_id,1,nom) - jnt.append(t1) - Attribut.append(t2) - #poste comptable - str_poste_comptable='%s%04d'% (p_base_poste,i+100) - # print "insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent) values (%s,'%s',%s); " % (poste_comptable,nom,p_base_poste) - poste_comptable.append("%s\t%s\t%s" % (str_poste_comptable,nom,p_base_poste)) - p_seq_jft_id+=1 - (t1,t2)=Add_Attribut_Fiche(p_seq_jft_id,p_seq_f_id,5,str_poste_comptable) - jnt.append(t1) - Attribut.append(t2) - p_seq_jft_id+=1 - str_quick_code="FID%06d" % (p_seq_f_id) - (t1,t2)=Add_Attribut_Fiche(p_seq_jft_id,p_seq_f_id,23,str_quick_code) - jnt.append(t1) - Attribut.append(t2) - - p_seq_f_id+=1 - p_seq_jft_id+=1 - print "copy fiche(f_id,fd_id) from stdin;" - for e in fiche: print e - print "\." - print "copy tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) from stdin;" - for e in poste_comptable: print e - print "\." - print "copy jnt_fic_att_value(jft_id,f_id,ad_id) from stdin;" - for e in jnt: print e - print "\." - print "copy attr_value(jft_id,av_text) from stdin;" - for e in Attribut: print e - print "\." - - - - -def Creation_operation(p_base,p_type): - #jrn="insert into jrn (jr_def_id,jr_montant,jr_comment,jr_date,jr_grpt_id,jr_internal,jr_tech_per)" - jrn="%d\t%.2f\t%s\t%d.%d.2005\t%d\t%s\t%d" - #jrnx="insert into jrnx (j_date,j_montant,j_poste,j_grpt,j_jrn_def,j_debit,j_tech_user,j_tech_per)" - jrnx="%d.%d.2005\t%.2f\t%s\t%d\t%d\t%s\tSIMULATION\t%d" - array_jrnx=[] - array_jrn=[] - for loop_periode in range (53,64): - for loop_day in range (1,28): - for loop_op in range (0,nb_per_day): - j_montant=round(random.randrange(100,5000)/100.0,2) - j_tva=round(j_montant*0.21,2) - month=loop_periode-52 - if p_type == 'V': - j_internal='1VEN-01-%d' % (p_base) - j_client='400%04d' % (random.randrange(1,nb_fiche)+100) - #jrnx1=jrnx % (loop_day,loop_periode-39,j_montant,j_client,p_base,2,'true',loop_periode) - array_jrnx.append(jrnx % (loop_day,month,j_montant,j_client,p_base,2,'true',loop_periode)) - #print jrnx1 - array_jrnx.append(jrnx % (loop_day,month,j_tva,'4511',p_base,2,'false',loop_periode)) - #print jrnx1 - total=j_montant+j_tva - array_jrnx.append( jrnx % (loop_day,month,total,'700',p_base,2,'false',loop_periode)) - #print jrnx1 - array_jrn.append(jrn%(2,total,j_internal,loop_day,month,p_base,j_internal,loop_periode)) - #print jrn1 - p_base+=1 - if p_type== 'A': - j_internal='1ACH-01-%d' % (p_base) - j_fournisseur='440%04d' % (random.randrange(0,nb_fiche)+100) - j_charge='61%04d' % (random.randrange(0,nb_charge)+100) - array_jrnx.append(jrnx%(loop_day,month,j_montant,j_fournisseur,p_base,3,'false',loop_periode)) - #print jrnx1 - array_jrnx.append(jrnx % (loop_day,month,j_tva,'4111',p_base,3,'true',loop_periode)) - #print jrnx1 - total=j_montant+j_tva - array_jrnx.append(jrnx % (loop_day,month,total,j_charge,p_base,3,'true',loop_periode)) - #print jrnx1 - array_jrn.append(jrn%(3,total,j_internal,loop_day,month,p_base,j_internal,loop_periode)) - ##print jrn1 - p_base+=1 - if p_type== 'O': - j_internal='4ODS-01-%d' % (p_base) - j_banque='400' - j_charge='440' - array_jrnx.append(jrnx%(loop_day,month,j_montant,j_banque,p_base,4,'false',loop_periode)) - array_jrnx.append(jrnx % (loop_day,month,j_montant,j_charge,p_base,4,'true',loop_periode)) - #print jrnx1 - array_jrn.append(jrn%(4,j_montant,j_internal,loop_day,month,p_base,j_internal,loop_periode)) - ##print jrn1 - p_base+=1 - if p_type== 'F': - j_internal='1FIN-01-%d' % (p_base) - j_banque='550' - j_charge='400' - array_jrnx.append(jrnx%(loop_day,month,j_montant,j_banque,p_base,1,'false',loop_periode)) - array_jrnx.append(jrnx % (loop_day,month,j_montant,j_charge,p_base,1,'true',loop_periode)) - #print jrnx1 - array_jrn.append(jrn%(1,j_montant,j_internal,loop_day,month,p_base,j_internal,loop_periode)) - ##print jrn1 - p_base+=1 - print """copy -jrn (jr_def_id,jr_montant,jr_comment,jr_date,jr_grpt_id,jr_internal,jr_tech_per) -from stdin;""" - for e in array_jrn: print e - print "\." - print "copy jrnx (j_date,j_montant,j_poste,j_grpt,j_jrn_def,j_debit,j_tech_user,j_tech_per) from stdin;" - for e in array_jrnx: print e - print "\." - -################################################################################ -# MAIN -################################################################################ -if len(sys.argv) == 1 : - usage() - -cmd_line=sys.argv[1:] - -try : - a1,a2=getopt.getopt(cmd_line,"slxh",['small','large','extra-large','help']) -except getopt.GetoptError,msg: - print "ERROR " - print msg.msg - usage() -for option,value in a1: - if option in ('-h','--help'): - usage() - if option in ('-s','--small'): - nb_fiche=100 - nb_charge=50 - nb_per_day=5 - break - if option in ('-l','--large'): - nb_fiche=5000 - nb_charge=350 - nb_per_day=50 - if option in ('-x','--extra-large'): - nb_fiche=10000 - nb_charge=1500 - nb_per_day=500 - -print '\\timing' -print "begin;" -print "set DateStyle=European;" -# fd_id => client -fd_id=2 -# type fiche -type='Client' - -# numero de sequence fiche -f_id=1000 -# numero de sequence jnt_fic_att_value -jft_id=1000 -# poste comptable -base_poste='400' - -Creation_fiche(f_id,jft_id,fd_id,type,'400',nb_fiche) - -# fournisseur -fd_id=4 -type='Fournisseur' -f_id+=nb_fiche+100 -jft_id+=2*nb_fiche+100 -base_poste='440' - -Creation_fiche(f_id,jft_id,fd_id,type,base_poste,nb_fiche) - -# Creation Service et bien divers -fd_id=5 -type='Charge ' -f_id+=nb_fiche+100 -jft_id+=2*nb_fiche+100 -base_poste='61' - -Creation_fiche(f_id,jft_id,fd_id,type,base_poste,nb_charge) - -#Creation_operation Vente -Creation_operation(1000,'V') - -#Creation_operation Achat -Creation_operation(17000,'A') -#Creation_operation FIN -Creation_operation(34000,'F') -#Creation_operation ODS -Creation_operation(51000,'O') - -print "commit;" diff --git a/sources/dev/test_parse_formula.php b/sources/dev/test_parse_formula.php deleted file mode 100644 index 6bd2bfb..0000000 --- a/sources/dev/test_parse_formula.php +++ /dev/null @@ -1,53 +0,0 @@ -<? -/* -# check the Impress::check_formula and the parse_formula -# This file is a part of NOALYSS under GPL -# Author D. DE BONTRIDDER danydb@aevalys.eu -*/ -include_once('class_impress.php'); - -echo '<hr>'; -foreach ( array('1', - '(45+5)', - 'round([45])', - '$A=9', - '$S30=($F1 >=0)?$F1:0', - - '[45%]', - '[50]*[51%]', - '$A1=[50]*[51%]', - '[50]*9', - '[50]*9.0', - '[50%]*9', - '$C1111=[50%]*9', - '$C1111=[50%]*9*$D1', - '$C10=[10%]', - '[50%]*9.0', - '[50%]*9.0 FROM=01.2004', - '[50%]*9.0FROM=01.2004', - 'system', - 'unlink', - 'ls -1') - as $a ) { - echo "Testing :".$a; - echo (Impress::check_formula($a)==false)?'Non valide ':'ok'; - - echo '<br>'; - - foreach (array('+','-','/') as $b ) { - $ee=str_replace('*',$b,$a); - echo "Testing :".$ee; - echo (Impress::check_formula($ee)==false)?'Non valide ':'ok'; - echo '<br>'; - - } - for($e=0;$e<3;$e++) { - $a.="*".$a; - echo "Testing :".$a; - echo (Impress::check_formula($a)==false)?'Non valide ':'ok'; - echo '<br>'; - - } - } - -?> diff --git a/sources/doc/Diagram5.dia b/sources/doc/Diagram5.dia deleted file mode 100644 index 8b3aff7..0000000 Binary files a/sources/doc/Diagram5.dia and /dev/null differ diff --git a/sources/doc/Makefile b/sources/doc/Makefile deleted file mode 100644 index 1093b65..0000000 --- a/sources/doc/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# Makefile for creating the doc -# html, txt format -# $Revision$ - -.PHONY: clean devel - -all: devel - -devel: - cd developper && ./create_doc.sh -clean: - rm -f *~ - diff --git a/sources/doc/Schemaabrege1.pdf b/sources/doc/Schemaabrege1.pdf deleted file mode 100644 index 1dc6441..0000000 Binary files a/sources/doc/Schemaabrege1.pdf and /dev/null differ diff --git a/sources/doc/commencer-avec-noalyss.odt b/sources/doc/commencer-avec-noalyss.odt deleted file mode 100644 index b6f8247..0000000 Binary files a/sources/doc/commencer-avec-noalyss.odt and /dev/null differ diff --git a/sources/doc/commencer-avec-noalyss.pdf b/sources/doc/commencer-avec-noalyss.pdf deleted file mode 100644 index 286b1b6..0000000 Binary files a/sources/doc/commencer-avec-noalyss.pdf and /dev/null differ diff --git a/sources/doc/data.dia b/sources/doc/data.dia deleted file mode 100644 index feb7080..0000000 --- a/sources/doc/data.dia +++ /dev/null @@ -1,18232 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/"> - <dia:diagramdata> - <dia:attribute name="background"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="pagebreak"> - <dia:color val="#000099"/> - </dia:attribute> - <dia:attribute name="paper"> - <dia:composite type="paper"> - <dia:attribute name="name"> - <dia:string>#Letter#</dia:string> - </dia:attribute> - <dia:attribute name="tmargin"> - <dia:real val="2.5399999618530273"/> - </dia:attribute> - <dia:attribute name="bmargin"> - <dia:real val="2.5399999618530273"/> - </dia:attribute> - <dia:attribute name="lmargin"> - <dia:real val="2.5399999618530273"/> - </dia:attribute> - <dia:attribute name="rmargin"> - <dia:real val="2.5399999618530273"/> - </dia:attribute> - <dia:attribute name="is_portrait"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="scaling"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="fitto"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="grid"> - <dia:composite type="grid"> - <dia:attribute name="width_x"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="width_y"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="visible_x"> - <dia:int val="1"/> - </dia:attribute> - <dia:attribute name="visible_y"> - <dia:int val="1"/> - </dia:attribute> - <dia:composite type="color"/> - </dia:composite> - </dia:attribute> - <dia:attribute name="color"> - <dia:color val="#d8e5e5"/> - </dia:attribute> - <dia:attribute name="guides"> - <dia:composite type="guides"> - <dia:attribute name="hguides"/> - <dia:attribute name="vguides"/> - </dia:composite> - </dia:attribute> - </dia:diagramdata> - <dia:layer name="Background" visible="true" active="true"> - <dia:object type="UML - Class" version="0" id="O0"> - <dia:attribute name="obj_pos"> - <dia:point val="-371.112,24.0506"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-371.162,24.0006;-358.242,29.9006"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-371.112,24.0506"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="12.82"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="5.8000000000000007"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#action#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#The different privileges#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ac_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ac_description#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ac_module#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ac_code#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character varying(9)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O1"> - <dia:attribute name="obj_pos"> - <dia:point val="-364.388,116.017"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-364.438,115.967;-343.818,126.667"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-364.388,116.017"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="20.52"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="10.6"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#action_gestion#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Action for Managing#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ag_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('action_g ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ag_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># f_id_dest#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># f_id_exp#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ag_title#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character varying(70)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ag_timestamp#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#timestamp without time zone#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#now()#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ag_cal#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character(1)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#'C'::bpchar#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ag_ref_ag_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ag_comment#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ag_ref#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O2"> - <dia:attribute name="obj_pos"> - <dia:point val="-368.714,22.8854"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-368.764,22.8354;-350.069,27.1354"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-368.714,22.8854"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4.2000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#attr_def#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#The available attributs for the cards#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ad_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_attr_ ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ad_text#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O3"> - <dia:attribute name="obj_pos"> - <dia:point val="-383.41,20.1203"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-383.46,20.0703;-368.618,24.3703"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-383.41,20.1203"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="14.742500000000001"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4.2000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#attr_min#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#The value of attributs for the cards#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># frd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ad_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O4"> - <dia:attribute name="obj_pos"> - <dia:point val="-327.653,32.225"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-327.703,32.175;-320.173,35.475"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-327.653,32.225"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="7.4299999999999997"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="3.2000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#attr_value#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jft_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># av_text#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O5"> - <dia:attribute name="obj_pos"> - <dia:point val="-383.003,71.9626"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-383.053,71.9126;-364.743,79.6126"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-383.003,71.9626"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.210000000000001"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="7.5999999999999996"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#bilan#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#contains the template and the data ... nts #</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># b_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('bilan_b_ ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># b_name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># b_file_template#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># b_file_form#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># b_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O6"> - <dia:attribute name="obj_pos"> - <dia:point val="-365.054,99.0696"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-365.104,99.0196;-346.409,106.52"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-365.054,99.0696"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="7.4000000000000004"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#bud_card#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#card for budget module#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bc_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('bud_card ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bc_code#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character varying(10)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bc_description#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bc_price_unit#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#0.0#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bc_unit#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character varying(20)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bh_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O7"> - <dia:attribute name="obj_pos"> - <dia:point val="-361.394,102.292"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-361.444,102.242;-342.749,108.942"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-361.394,102.292"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="6.5999999999999996"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#bud_detail#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Detail for card #</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('bud_deta ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># po_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bc_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bh_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pcm_val#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#poste_comptable#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O8"> - <dia:attribute name="obj_pos"> - <dia:point val="-357.734,89.8124"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-357.784,89.7624;-338.704,95.6624"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-357.734,89.8124"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.98"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="5.8000000000000007"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#bud_detail_periode#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Module budget detail by periode#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bdp_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('bud_deta ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bdp_amount#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#0.0#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># p_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O9"> - <dia:attribute name="obj_pos"> - <dia:point val="-353.725,88.6473"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-353.775,88.5973;-335.08,94.2973"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-353.725,88.6473"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="5.5999999999999996"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#bud_hypothese#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bh_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('seq_bud_ ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bh_name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bh_saldo#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bh_description#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pa_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O10"> - <dia:attribute name="obj_pos"> - <dia:point val="-350.065,-39.8147"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-350.115,-39.8647;-331.805,-25.9647"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-350.065,-39.8147"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.210000000000001"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="13.800000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#centralized#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#The centralized journal#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_centr ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_j_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_internal#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_montant#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_debit#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#true#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_jrn_def#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_poste#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#poste_comptable#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_description#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_grp#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_comment#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_rapt#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_periode#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># c_order#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O11"> - <dia:attribute name="obj_pos"> - <dia:point val="-386.815,48.7468"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-386.865,48.6968;-370.865,52.7968"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-386.815,48.7468"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="15.9"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#del_action#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># del_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#serial#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># del_name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># del_time#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#timestamp without time zone#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O12"> - <dia:attribute name="obj_pos"> - <dia:point val="-346.755,0"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-346.805,-0.05;-329.265,17.65"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-346.755,0"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="17.440000000000001"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="17.600000000000005"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#del_jrn#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_def_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_montant#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_comment#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_grpt_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_internal#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_tech_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#timestamp without time zone#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_tech_per#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_ech#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_ech#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_rapt#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_valid#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_opid#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_c_opid#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_pj#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#oid#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_pj_name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_pj_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># del_jrn_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#timestamp without time zone#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_pj_number#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O13"> - <dia:attribute name="obj_pos"> - <dia:point val="-379.694,-26.6895"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-379.744,-26.7395;-362.589,-13.0395"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-379.694,-26.6895"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="17.055"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="13.600000000000003"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#del_jrnx#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_montant#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_poste#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#poste_comptable#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_grpt#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_rapt#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_jrn_def#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_debit#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_text#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_centralized#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_internal#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_tech_user#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_tech_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#timestamp without time zone#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_tech_per#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_qcode#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O14"> - <dia:attribute name="obj_pos"> - <dia:point val="-391.534,-52.4344"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-391.584,-52.4844;-373.274,-43.1844"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-391.534,-52.4344"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.210000000000001"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="9.1999999999999993"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#document#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#This table contains all the documen ... files#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># d_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('document ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ag_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># d_lob#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#oid#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># d_number#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#bigint#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># d_filename#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># d_mimetype#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># d_state#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O15"> - <dia:attribute name="obj_pos"> - <dia:point val="-332.145,-52.3495"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-332.195,-52.3995;-313.5,-43.8995"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-332.145,-52.3495"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="8.4000000000000004"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#document_modele#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string># contains all the template for the ... ments#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># md_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('document ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># md_name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># md_lob#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#oid#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># md_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># md_filename#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># md_mimetype#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O16"> - <dia:attribute name="obj_pos"> - <dia:point val="-340.485,63.7379"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-340.535,63.6879;-322.225,67.9879"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-340.485,63.7379"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.210000000000001"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4.2000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#document_state#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#State of the document#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># s_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('document ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># s_value#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character varying(50)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O17"> - <dia:attribute name="obj_pos"> - <dia:point val="-336.025,71.5228"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-336.075,71.4728;-317.38,75.7728"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-336.025,71.5228"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4.2000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#document_type#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Type of document : meeting, invoice,...#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># dt_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('document ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># dt_value#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character varying(80)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O18"> - <dia:attribute name="obj_pos"> - <dia:point val="-333.515,87.2821"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-333.565,87.2321;-315.255,91.5321"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-333.515,87.2821"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.210000000000001"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4.2000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#fiche#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Cards#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># f_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_fiche ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O19"> - <dia:attribute name="obj_pos"> - <dia:point val="-330.206,-32.9798"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-330.256,-33.0298;-311.561,-26.3298"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-330.206,-32.9798"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="6.5999999999999996"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#fiche_def#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Cards definition#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_fdef' ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fd_class_base#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#poste_comptable#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fd_label#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fd_create_account#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#false#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># frd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O20"> - <dia:attribute name="obj_pos"> - <dia:point val="-374.796,-31.9449"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-374.846,-31.9949;-355.766,-26.8949"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-374.796,-31.9449"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.98"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="5"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#fiche_def_ref#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Family Cards definition#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># frd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_fiche ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># frd_text#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># frd_class_base#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O21"> - <dia:attribute name="obj_pos"> - <dia:point val="-322.536,58.2076"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-322.586,58.1576;-303.891,64.8576"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-322.536,58.2076"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="6.5999999999999996"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#form#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Forms content#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fo_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_form' ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fo_fr_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fo_pos#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fo_label#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fo_formula#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O22"> - <dia:attribute name="obj_pos"> - <dia:point val="-341.684,3.76513"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-341.734,3.71513;-332.447,7.01513"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-341.684,3.76513"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="9.1875"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="3.2000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#format_csv_banque#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># include_file#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O23"> - <dia:attribute name="obj_pos"> - <dia:point val="-318.876,12.9954"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-318.926,12.9454;-300.231,16.2454"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-318.876,12.9954"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="3.2000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#formdef#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fr_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_formd ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fr_label#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O24"> - <dia:attribute name="obj_pos"> - <dia:point val="-372.702,101.927"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-372.752,101.877;-360.217,105.977"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-372.702,101.927"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="12.434999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#groupe_analytique#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ga_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character varying(10)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pa_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ga_description#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O25"> - <dia:attribute name="obj_pos"> - <dia:point val="-259.778,45.7817"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-259.828,45.7317;-233.818,60.8317"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-259.778,45.7817"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="25.91"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="15.000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#import_tmp#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Table temporaire pour l'importation ... t CSV#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># code#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># date_exec#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># date_valeur#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># devise#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># compte_ordre#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># detail#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># num_compte#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># poste_comptable#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># status#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character varying(1)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#'n'::character varying#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># bq_account#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_rapt#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># montant#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"> - <dia:composite type="umloperation"> - <dia:attribute name="name"> - <dia:string>#import_tmp_status_check#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="inheritance_type"> - <dia:enum val="2"/> - </dia:attribute> - <dia:attribute name="query"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="parameters"> - <dia:composite type="umlparameter"> - <dia:attribute name="name"> - <dia:string>#CHECK ((((((status)::text = 'n ... xt)))#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="kind"> - <dia:enum val="0"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O26"> - <dia:attribute name="obj_pos"> - <dia:point val="-385.605,53.8166"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-385.655,53.7666;-370.265,59.0666"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-385.605,53.8166"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="15.290000000000001"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="5.2000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#info_def#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Contains the types of additionnal i ... ation#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># id_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># id_description#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O27"> - <dia:attribute name="obj_pos"> - <dia:point val="-330.016,48.2514"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-330.066,48.2014;-311.371,52.3014"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-330.016,48.2514"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#invoice#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># iv_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_invoi ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># iv_name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># iv_file#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#oid#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O28"> - <dia:attribute name="obj_pos"> - <dia:point val="-311.556,49.0863"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-311.606,49.0363;-292.526,55.1363"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-311.556,49.0863"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.98"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="6"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#jnt_fic_att_value#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#join between the card and the attri ... ition#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jft_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_jnt_f ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># f_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ad_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O29"> - <dia:attribute name="obj_pos"> - <dia:point val="-297.946,14.1712"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-297.996,14.1212;-279.301,21.0212"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-297.946,14.1712"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="6.8000000000000007"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#jnt_fic_attr#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#join between the family card and th ... ition#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ad_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jnt_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#bigint#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('s_jnt_id ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jnt_order#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O30"> - <dia:attribute name="obj_pos"> - <dia:point val="-20.9385,73"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-20.9885,72.95;-0.3685,91.85"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-20.9385,73"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="20.52"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="18.800000000000004"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#jrn#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Journal: content one line for a gro ... iting#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_jrn': ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_def_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_montant#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_comment#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_grpt_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_internal#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_tech_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#timestamp without time zone#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#now()#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_tech_per#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_ech#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_ech#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_rapt#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_valid#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#true#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_opid#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_c_opid#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_pj#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#oid#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_pj_name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_pj_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_pj_number#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O31"> - <dia:attribute name="obj_pos"> - <dia:point val="-303.887,-39.8036"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-303.937,-39.8536;-285.242,-30.5536"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-303.887,-39.8036"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="9.1999999999999993"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#jrn_action#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Possible action when we are in jour ... menu)#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ja_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_jrnac ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ja_name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ja_desc#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ja_url#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ja_action#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ja_lang#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#'FR'::text#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ja_jrn_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character(3)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O32"> - <dia:attribute name="obj_pos"> - <dia:point val="-296.127,58.6387"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-296.177,58.5887;-275.557,71.6887"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-296.127,58.6387"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="20.52"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="13.000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#jrn_def#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Definition of a journal, his properties#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_def_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_jrn_d ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_def_name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_def_class_deb#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_def_class_cred#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_def_fiche_deb#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_def_fiche_cred#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_deb_max_line#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#1#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_cred_max_line#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#1#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_def_ech#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#false#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_def_ech_lib#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_def_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character(3)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_def_code#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_def_pj_pref#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O33"> - <dia:attribute name="obj_pos"> - <dia:point val="-346.551,47.956"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-346.601,47.906;-339.456,52.806"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-346.551,47.956"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="7.0449999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4.8000000000000007"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#jrn_info#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ji_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#serial#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># id_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ji_value#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O34"> - <dia:attribute name="obj_pos"> - <dia:point val="-353.391,45.7909"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-353.441,45.7409;-344.371,49.8409"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-353.391,45.7909"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="8.9700000000000006"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#jrn_periode#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_def_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># p_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># status#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O35"> - <dia:attribute name="obj_pos"> - <dia:point val="-293.417,30.7258"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-293.467,30.6758;-274.387,35.7758"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-293.417,30.7258"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.98"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="5"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#jrn_rapt#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Rapprochement between operation#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jra_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_jrn_r ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jr_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jra_concerned#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O36"> - <dia:attribute name="obj_pos"> - <dia:point val="-374.642,40.8606"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-374.692,40.8106;-363.312,46.1106"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-374.642,40.8606"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="11.279999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="5.2000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#jrn_type#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Type of journal (Sell, Buy, Financial...)#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_type_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character(3)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_desc#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O37"> - <dia:attribute name="obj_pos"> - <dia:point val="85.4803,0.2"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="85.4303,0.15;105.665,15.85"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="85.4803,0.2"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="20.134999999999998"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="15.600000000000003"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#jrnx#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Journal: content one line for each ... iting#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_jrn_o ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#now()#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_montant#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_poste#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#poste_comptable#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_grpt#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_rapt#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_jrn_def#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_debit#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#true#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_text#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_centralized#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#false#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_internal#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_tech_user#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_tech_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#timestamp without time zone#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#now()#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_tech_per#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_qcode#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O38"> - <dia:attribute name="obj_pos"> - <dia:point val="-408.968,-56.6661"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-409.018,-56.7161;-393.128,-48.2161"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-408.968,-56.6661"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="15.790000000000001"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="8.4000000000000004"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#mod_payment#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Contains the different media of pay ... edger#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># mp_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#serial#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># mp_lib#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># mp_jrn_def_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># mp_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character varying(3)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># mp_fd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#bigint#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># mp_qcode#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O39"> - <dia:attribute name="obj_pos"> - <dia:point val="-290.807,-20.0546"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-290.857,-20.1046;-272.162,-12.6046"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-290.807,-20.0546"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="7.4000000000000004"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#op_predef#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#predefined operation#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># od_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('op_def_o ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># jrn_def_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># od_name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># od_item#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># od_jrn_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># od_direct#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O40"> - <dia:attribute name="obj_pos"> - <dia:point val="51.7106,66.8"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="51.6606,66.75;70.7406,78.45"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="51.7106,66.8"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.98"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="11.6"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#op_predef_detail#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#contains the detail of predefined operations#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># opd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('op_prede ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># od_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># opd_poste#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># opd_amount#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># opd_tva_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># opd_quantity#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># opd_debit#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># opd_tva_amount#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># opd_comment#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># opd_qc#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O41"> - <dia:attribute name="obj_pos"> - <dia:point val="-287.147,-12.9418"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-287.197,-12.9918;-267.347,-2.2918"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-287.147,-12.9418"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="19.75"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="10.6"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#operation_analytique#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#History of the analytic account#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># oa_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('historiq ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># po_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pa_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># oa_amount#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># oa_description#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># oa_debit#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#true#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># oa_group#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('s_oa_gro ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># oa_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># oa_row#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O42"> - <dia:attribute name="obj_pos"> - <dia:point val="-377.632,39.0955"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-377.682,39.0455;-366.307,43.3455"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-377.632,39.0955"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="11.275"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4.2000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#parameter#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#parameter of the company#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pr_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pr_value#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O43"> - <dia:attribute name="obj_pos"> - <dia:point val="-358.482,57.8425"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-358.532,57.7925;-351.002,61.8925"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-358.482,57.8425"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="7.4299999999999997"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#parm_code#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># p_code#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># p_value#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># p_comment#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O44"> - <dia:attribute name="obj_pos"> - <dia:point val="-282.437,54.8774"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-282.487,54.8274;-263.792,59.9274"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-282.437,54.8774"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="5"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#parm_money#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Currency conversion#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pm_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_curre ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pm_code#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character(3)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pm_rate#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O45"> - <dia:attribute name="obj_pos"> - <dia:point val="-278.777,-11.5728"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-278.827,-11.6228;-259.362,-3.1228"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-278.777,-11.5728"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="19.365000000000002"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="8.4000000000000004"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#parm_periode#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Periode definition#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># p_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_perio ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># p_start#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># p_end#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># p_exercice#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#to_char(now(), 'Y ... text)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># p_closed#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#false#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># p_central#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#false#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"> - <dia:composite type="umloperation"> - <dia:attribute name="name"> - <dia:string>#parm_periode_check#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="inheritance_type"> - <dia:enum val="2"/> - </dia:attribute> - <dia:attribute name="query"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="parameters"> - <dia:composite type="umlparameter"> - <dia:attribute name="name"> - <dia:string>#CHECK ((p_end >= p_start))#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="kind"> - <dia:enum val="0"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O46"> - <dia:attribute name="obj_pos"> - <dia:point val="-383.776,98.962"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-383.826,98.912;-368.761,104.212"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-383.776,98.962"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="14.965"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="5.2000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#parm_poste#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Contains data for finding is the ty ... sset)#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># p_value#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#poste_comptable#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># p_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O47"> - <dia:attribute name="obj_pos"> - <dia:point val="-274.418,97.1969"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-274.468,97.1469;-255.773,102.247"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-274.418,97.1969"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="5"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#plan_analytique#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Plan Analytique (max 5)#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pa_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('plan_ana ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pa_name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#'Sans Nom'::text#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pa_description#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O48"> - <dia:attribute name="obj_pos"> - <dia:point val="-270.758,44.1538"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-270.808,44.1038;-252.113,51.6038"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-270.758,44.1538"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="7.4000000000000004"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#poste_analytique#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Poste Analytique#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># po_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('poste_an ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># po_name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pa_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># po_amount#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#0.0#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># po_description#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ga_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character varying(10)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O49"> - <dia:attribute name="obj_pos"> - <dia:point val="71.6,38.2"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="71.55,38.15;90.245,51.05"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="71.6,38.2"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="12.800000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#quant_purchase#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qp_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_quant ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qp_internal#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qp_fiche#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qp_quantite#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qp_price#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qp_vat#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#0.0#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qp_vat_code#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qp_nd_amount#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#0.0#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qp_nd_tva#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#0.0#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qp_nd_tva_recup#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#0.0#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qp_supplier#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qp_valid#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character(1)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#'Y'::bpchar#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qp_dep_priv#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#0.0#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O50"> - <dia:attribute name="obj_pos"> - <dia:point val="-15.5286,-33.8"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-15.5786,-33.85;3.1164,-23.15"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-15.5286,-33.8"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="10.6"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#quant_sold#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Contains about invoice for customer#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qs_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_quant ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qs_internal#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qs_fiche#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qs_quantite#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qs_price#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qs_vat#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(20,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qs_vat_code#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qs_client#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># qs_valid#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character(1)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#'Y'::bpchar#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O51"> - <dia:attribute name="obj_pos"> - <dia:point val="-249.468,30.6"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-249.518,30.55;-225.048,43.05"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-249.468,30.6"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="24.369999999999997"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="12.4"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#stock_goods#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#About the goods#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># sg_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_stock ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># f_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># sg_code#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># sg_quantity#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(8,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># sg_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character(1)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#'c'::bpchar#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># sg_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># sg_tech_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#now()#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># sg_tech_user#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># sg_comment#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character varying(80)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># sg_exercice#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#character varying(4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"> - <dia:composite type="umloperation"> - <dia:attribute name="name"> - <dia:string>#stock_goods_sg_type#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="inheritance_type"> - <dia:enum val="2"/> - </dia:attribute> - <dia:attribute name="query"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="parameters"> - <dia:composite type="umlparameter"> - <dia:attribute name="name"> - <dia:string>#CHECK (((sg_type = 'c'::bpchar ... ar)))#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="kind"> - <dia:enum val="0"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O52"> - <dia:attribute name="obj_pos"> - <dia:point val="-290.583,38.8235"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-290.633,38.7735;-275.57,44.6735"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-290.583,38.8235"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="14.9625"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="5.8000000000000007"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#tmp_pcmn#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Plan comptable minimum normalisé#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pcm_val#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#poste_comptable#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pcm_lib#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pcm_val_parent#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#poste_comptable#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pcm_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O53"> - <dia:attribute name="obj_pos"> - <dia:point val="-267.098,72.5974"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-267.148,72.5474;-248.453,79.2474"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-267.098,72.5974"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="6.5999999999999996"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#todo_list#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Todo list#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tl_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('todo_lis ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tl_date#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#date#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tl_title#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tl_desc#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># use_login#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O54"> - <dia:attribute name="obj_pos"> - <dia:point val="-95.6789,-24"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-95.7289,-24.05;-77.0339,-17.35"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-95.6789,-24"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="6.5999999999999996"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#tva_rate#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#Rate of vat#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tva_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval('s_tva'::regclass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tva_label#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tva_rate#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(8,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#0.0#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tva_comment#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tva_poste#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O55"> - <dia:attribute name="obj_pos"> - <dia:point val="-380.62,72.2323"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-380.67,72.1823;-369.087,77.2823"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-380.62,72.2323"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="11.4825"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="5"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#user_local_pref#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#The user's local parameter #</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># user_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># parameter_type#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># parameter_value#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O56"> - <dia:attribute name="obj_pos"> - <dia:point val="-263.438,95.2317"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-263.488,95.1817;-244.793,99.2817"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-263.438,95.2317"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#user_sec_act#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ua_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_user_ ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ua_login#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ua_act_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O57"> - <dia:attribute name="obj_pos"> - <dia:point val="-71.2,16.8"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-71.25,16.75;-52.555,21.65"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-71.2,16.8"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="18.594999999999999"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4.8000000000000007"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#user_sec_jrn#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># uj_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>#nextval(('s_user_ ... lass)#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># uj_login#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># uj_jrn_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># uj_priv#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O58"> - <dia:attribute name="obj_pos"> - <dia:point val="-334.143,97.8838"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-334.193,97.8338;-327.818,100.334"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-334.143,97.8838"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="6.2750000000000004"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="2.3999999999999999"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#version#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># val#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O59"> - <dia:attribute name="obj_pos"> - <dia:point val="56.1007,69.2"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="56.0507,69.15;65.8907,78.85"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="56.1007,69.2"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="9.7400000000000002"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="9.5999999999999996"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#vw_client#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># f_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># quick_code#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tva_num#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># poste_comptable#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># rue#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># code_postal#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pays#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># telephone#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># email#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O60"> - <dia:attribute name="obj_pos"> - <dia:point val="-13.4082,28"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-13.4582,27.95;-3.2332,40.05"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-13.4082,28"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="10.125"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="12.000000000000002"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#vw_fiche_attr#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># f_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># vw_name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># vw_sell#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># vw_buy#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tva_code#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tva_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tva_rate#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#numeric(8,4)#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tva_label#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># vw_addr#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># vw_cp#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># quick_code#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># frd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O61"> - <dia:attribute name="obj_pos"> - <dia:point val="-12.1681,40.8"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-12.2181,40.75;1.0869,49.85"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-12.1681,40.8"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="13.205"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="9"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#vw_fiche_def#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#all the attributs for card family#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ad_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ad_text#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># av_text#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fd_class_base#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#poste_comptable#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fd_label#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># fd_create_account#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#boolean#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># frd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O62"> - <dia:attribute name="obj_pos"> - <dia:point val="-12.6204,12.6"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-12.6704,12.55;2.4746,19.25"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-12.6204,12.6"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="15.044999999999998"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="6.5999999999999996"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#vw_fiche_min#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>#minimum attribut for reference card#</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># frd_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ad_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># ad_text#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># frd_text#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># frd_class_base#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O63"> - <dia:attribute name="obj_pos"> - <dia:point val="-364.972,70.2672"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-365.022,70.2172;-357.124,74.3172"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-364.972,70.2672"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="7.7974999999999994"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="4"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#vw_poste_qcode#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># f_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_poste#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># j_qcode#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Class" version="0" id="O64"> - <dia:attribute name="obj_pos"> - <dia:point val="-67.5401,-7.4"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-67.5901,-7.45;-57.7501,2.25"/> - </dia:attribute> - <dia:attribute name="elem_corner"> - <dia:point val="-67.5401,-7.4"/> - </dia:attribute> - <dia:attribute name="elem_width"> - <dia:real val="9.7400000000000002"/> - </dia:attribute> - <dia:attribute name="elem_height"> - <dia:real val="9.5999999999999996"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#vw_supplier#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_attributes"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="suppress_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_attributes"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="visible_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="visible_comments"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:attribute name="wrap_operations"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="wrap_after_char"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_line_length"> - <dia:int val="40"/> - </dia:attribute> - <dia:attribute name="comment_tagging"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="line_width"> - <dia:real val="0.10000000000000001"/> - </dia:attribute> - <dia:attribute name="line_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="fill_color"> - <dia:color val="#ffffff"/> - </dia:attribute> - <dia:attribute name="text_color"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="normal_font"> - <dia:font family="monospace" style="0" name="Courier"/> - </dia:attribute> - <dia:attribute name="abstract_font"> - <dia:font family="monospace" style="88" name="Courier-BoldOblique"/> - </dia:attribute> - <dia:attribute name="polymorphic_font"> - <dia:font family="monospace" style="8" name="Courier-Oblique"/> - </dia:attribute> - <dia:attribute name="classname_font"> - <dia:font family="sans" style="80" name="Helvetica-Bold"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font"> - <dia:font family="sans" style="88" name="Helvetica-BoldOblique"/> - </dia:attribute> - <dia:attribute name="comment_font"> - <dia:font family="sans" style="8" name="Helvetica-Oblique"/> - </dia:attribute> - <dia:attribute name="normal_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="polymorphic_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="abstract_font_height"> - <dia:real val="0.80000000000000004"/> - </dia:attribute> - <dia:attribute name="classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="abstract_classname_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="comment_font_height"> - <dia:real val="1"/> - </dia:attribute> - <dia:attribute name="attributes"> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># f_id#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#integer#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># name#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># quick_code#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># tva_num#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># poste_comptable#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># rue#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># code_postal#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># pays#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># telephone#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - <dia:composite type="umlattribute"> - <dia:attribute name="name"> - <dia:string># email#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - <dia:string>#text#</dia:string> - </dia:attribute> - <dia:attribute name="value"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="visibility"> - <dia:enum val="3"/> - </dia:attribute> - <dia:attribute name="abstract"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="class_scope"> - <dia:boolean val="false"/> - </dia:attribute> - </dia:composite> - </dia:attribute> - <dia:attribute name="operations"/> - <dia:attribute name="template"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="templates"/> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O65"> - <dia:attribute name="obj_pos"> - <dia:point val="-383.41,23.0203"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-383.46,-29.8449;-357.046,23.0703"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-383.41,23.0203"/> - <dia:point val="-383.41,-29.0449"/> - <dia:point val="-357.496,-29.0449"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O3" connection="8"/> - <dia:connection handle="1" to="O20" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O66"> - <dia:attribute name="obj_pos"> - <dia:point val="-383.41,23.8203"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-383.46,23.7703;-351.314,26.5854"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-383.41,23.8203"/> - <dia:point val="-383.41,25.7854"/> - <dia:point val="-351.764,25.7854"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O3" connection="10"/> - <dia:connection handle="1" to="O2" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O67"> - <dia:attribute name="obj_pos"> - <dia:point val="-327.653,34.125"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-327.703,34.075;-293.806,53.7863"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-327.653,34.125"/> - <dia:point val="-327.653,52.9863"/> - <dia:point val="-294.256,52.9863"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O4" connection="8"/> - <dia:connection handle="1" to="O28" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O68"> - <dia:attribute name="obj_pos"> - <dia:point val="-365.054,105.97"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-365.104,89.7473;-336.325,106.02"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-365.054,105.97"/> - <dia:point val="-365.054,90.5473"/> - <dia:point val="-336.775,90.5473"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#bud_hypothese_bh_id#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O6" connection="18"/> - <dia:connection handle="1" to="O9" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O69"> - <dia:attribute name="obj_pos"> - <dia:point val="-365.054,105.97"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-365.104,89.7473;-336.325,106.02"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-365.054,105.97"/> - <dia:point val="-365.054,90.5473"/> - <dia:point val="-336.775,90.5473"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#fk_bud_hypo_bh_id#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O6" connection="18"/> - <dia:connection handle="1" to="O9" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O70"> - <dia:attribute name="obj_pos"> - <dia:point val="-361.394,106.792"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-361.444,101.17;-347.654,106.842"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-361.394,106.792"/> - <dia:point val="-361.394,101.97"/> - <dia:point val="-348.104,101.97"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#fk_bud_card#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O7" connection="12"/> - <dia:connection handle="1" to="O6" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O71"> - <dia:attribute name="obj_pos"> - <dia:point val="-361.394,107.592"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-361.444,89.7473;-336.325,107.642"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-361.394,107.592"/> - <dia:point val="-361.394,90.5473"/> - <dia:point val="-336.775,90.5473"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#fk_bud_hypothese_not_null#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O7" connection="14"/> - <dia:connection handle="1" to="O9" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O72"> - <dia:attribute name="obj_pos"> - <dia:point val="-361.394,108.392"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-361.444,40.9235;-275.171,108.442"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-361.394,108.392"/> - <dia:point val="-361.394,41.7235"/> - <dia:point val="-275.62,41.7235"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#fk_tmp_pcmn#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O7" connection="16"/> - <dia:connection handle="1" to="O52" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O73"> - <dia:attribute name="obj_pos"> - <dia:point val="-357.734,94.3124"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-357.784,-9.47284;-260.677,94.3624"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-357.734,94.3124"/> - <dia:point val="-357.734,-8.67284"/> - <dia:point val="-261.127,-8.67284"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#fk_parm_periode#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O8" connection="12"/> - <dia:connection handle="1" to="O45" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O74"> - <dia:attribute name="obj_pos"> - <dia:point val="-357.734,95.1124"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-357.784,95.0624;-343.994,105.992"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-357.734,95.1124"/> - <dia:point val="-357.734,105.192"/> - <dia:point val="-344.444,105.192"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#fk_bud_detail_bd_id#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O8" connection="14"/> - <dia:connection handle="1" to="O7" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O75"> - <dia:attribute name="obj_pos"> - <dia:point val="-353.725,93.7473"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-353.775,93.6973;-257.018,100.897"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-353.725,93.7473"/> - <dia:point val="-353.725,100.097"/> - <dia:point val="-257.468,100.097"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#fk_bud_hypo_pa_id#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O9" connection="16"/> - <dia:connection handle="1" to="O47" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O76"> - <dia:attribute name="obj_pos"> - <dia:point val="-350.065,-32.1147"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-350.115,-32.1647;-276.977,62.3387"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-350.065,-32.1147"/> - <dia:point val="-350.065,61.5387"/> - <dia:point val="-277.427,61.5387"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O10" connection="20"/> - <dia:connection handle="1" to="O32" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O77"> - <dia:attribute name="obj_pos"> - <dia:point val="-350.065,-31.3147"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-350.115,-31.3647;-275.171,42.5235"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-350.065,-31.3147"/> - <dia:point val="-350.065,41.7235"/> - <dia:point val="-275.62,41.7235"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O10" connection="22"/> - <dia:connection handle="1" to="O52" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O78"> - <dia:attribute name="obj_pos"> - <dia:point val="-332.145,-46.0495"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-332.195,-46.0995;-318.625,75.2228"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-332.145,-46.0495"/> - <dia:point val="-332.145,74.4228"/> - <dia:point val="-319.075,74.4228"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#md_type#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O15" connection="14"/> - <dia:connection handle="1" to="O17" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O79"> - <dia:attribute name="obj_pos"> - <dia:point val="-333.515,90.9821"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-333.565,-30.8798;-312.806,91.0321"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-333.515,90.9821"/> - <dia:point val="-333.515,-30.0798"/> - <dia:point val="-313.256,-30.0798"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O18" connection="10"/> - <dia:connection handle="1" to="O19" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O80"> - <dia:attribute name="obj_pos"> - <dia:point val="-330.206,-26.8798"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-357.946,-29.8449;-330.156,-26.8298"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-330.206,-26.8798"/> - <dia:point val="-330.206,-29.0449"/> - <dia:point val="-357.496,-29.0449"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O19" connection="16"/> - <dia:connection handle="1" to="O20" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O81"> - <dia:attribute name="obj_pos"> - <dia:point val="-322.536,61.9076"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-322.586,14.0954;-301.476,61.9576"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-322.536,61.9076"/> - <dia:point val="-322.536,14.8954"/> - <dia:point val="-301.926,14.8954"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#formdef_fk#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O21" connection="10"/> - <dia:connection handle="1" to="O23" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O82"> - <dia:attribute name="obj_pos"> - <dia:point val="-311.556,53.7863"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-317.365,53.7363;-311.506,90.9821"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-311.556,53.7863"/> - <dia:point val="-311.556,90.1821"/> - <dia:point val="-316.915,90.1821"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O28" connection="10"/> - <dia:connection handle="1" to="O18" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O83"> - <dia:attribute name="obj_pos"> - <dia:point val="-311.556,54.5863"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-352.214,24.9854;-311.506,54.6363"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-311.556,54.5863"/> - <dia:point val="-311.556,25.7854"/> - <dia:point val="-351.764,25.7854"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O28" connection="12"/> - <dia:connection handle="1" to="O2" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O84"> - <dia:attribute name="obj_pos"> - <dia:point val="-297.946,18.0712"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-313.706,-30.8798;-297.896,18.1212"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-297.946,18.0712"/> - <dia:point val="-297.946,-30.0798"/> - <dia:point val="-313.256,-30.0798"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O29" connection="8"/> - <dia:connection handle="1" to="O19" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O85"> - <dia:attribute name="obj_pos"> - <dia:point val="-297.946,18.8712"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-352.214,18.8212;-297.896,26.5854"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-297.946,18.8712"/> - <dia:point val="-297.946,25.7854"/> - <dia:point val="-351.764,25.7854"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O29" connection="10"/> - <dia:connection handle="1" to="O2" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O86"> - <dia:attribute name="obj_pos"> - <dia:point val="-20.9385,77.7"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-277.877,60.7387;-20.8885,77.75"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-20.9385,77.7"/> - <dia:point val="-20.9385,61.5387"/> - <dia:point val="-277.427,61.5387"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O30" connection="10"/> - <dia:connection handle="1" to="O32" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O87"> - <dia:attribute name="obj_pos"> - <dia:point val="-303.887,-31.1036"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-364.792,-31.1536;-303.837,45.5606"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-303.887,-31.1036"/> - <dia:point val="-303.887,44.7606"/> - <dia:point val="-364.342,44.7606"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O31" connection="20"/> - <dia:connection handle="1" to="O36" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O88"> - <dia:attribute name="obj_pos"> - <dia:point val="-296.127,69.5387"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-364.792,43.9606;-296.077,69.5887"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-296.127,69.5387"/> - <dia:point val="-296.127,44.7606"/> - <dia:point val="-364.342,44.7606"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O32" connection="28"/> - <dia:connection handle="1" to="O36" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O89"> - <dia:attribute name="obj_pos"> - <dia:point val="-346.551,50.656"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-346.601,50.606;-1.78849,77.7"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-346.551,50.656"/> - <dia:point val="-346.551,76.9"/> - <dia:point val="-2.23849,76.9"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#fk_jrn#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O33" connection="10"/> - <dia:connection handle="1" to="O30" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O90"> - <dia:attribute name="obj_pos"> - <dia:point val="-346.551,51.456"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-372.078,51.406;-346.501,58.5166"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-346.551,51.456"/> - <dia:point val="-346.551,57.7166"/> - <dia:point val="-371.628,57.7166"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#fk_info_def#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O33" connection="12"/> - <dia:connection handle="1" to="O26" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O91"> - <dia:attribute name="obj_pos"> - <dia:point val="-353.391,47.6909"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-353.441,47.6409;-276.977,62.3387"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-353.391,47.6909"/> - <dia:point val="-353.391,61.5387"/> - <dia:point val="-277.427,61.5387"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#jrn_per_jrn_def_id#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O34" connection="8"/> - <dia:connection handle="1" to="O32" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O92"> - <dia:attribute name="obj_pos"> - <dia:point val="-353.391,48.4909"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-353.441,-9.47284;-260.677,48.5409"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-353.391,48.4909"/> - <dia:point val="-353.391,-8.67284"/> - <dia:point val="-261.127,-8.67284"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#jrn_periode_p_id#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O34" connection="10"/> - <dia:connection handle="1" to="O45" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O93"> - <dia:attribute name="obj_pos"> - <dia:point val="85.4803,6.5"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-276.07,6.45;85.5303,42.5235"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="85.4803,6.5"/> - <dia:point val="85.4803,41.7235"/> - <dia:point val="-275.62,41.7235"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O37" connection="14"/> - <dia:connection handle="1" to="O52" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O94"> - <dia:attribute name="obj_pos"> - <dia:point val="85.4803,8.9"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-277.877,8.85;85.5303,62.3387"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="85.4803,8.9"/> - <dia:point val="85.4803,61.5387"/> - <dia:point val="-277.427,61.5387"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O37" connection="20"/> - <dia:connection handle="1" to="O32" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O95"> - <dia:attribute name="obj_pos"> - <dia:point val="-408.968,-51.1661"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-409.018,-51.2161;-276.977,62.3387"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-408.968,-51.1661"/> - <dia:point val="-408.968,61.5387"/> - <dia:point val="-277.427,61.5387"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#mod_payment_mp_jrn_def_id_fkey#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O38" connection="12"/> - <dia:connection handle="1" to="O32" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O96"> - <dia:attribute name="obj_pos"> - <dia:point val="-408.968,-49.5661"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-409.018,-49.6161;-312.806,-29.2798"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-408.968,-49.5661"/> - <dia:point val="-408.968,-30.0798"/> - <dia:point val="-313.256,-30.0798"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#mod_payment_mp_fd_id_fkey#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O38" connection="16"/> - <dia:connection handle="1" to="O19" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O97"> - <dia:attribute name="obj_pos"> - <dia:point val="-290.807,-16.3546"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-290.857,-16.4046;-276.977,62.3387"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-290.807,-16.3546"/> - <dia:point val="-290.807,61.5387"/> - <dia:point val="-277.427,61.5387"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#jrn_def_id_fk#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O39" connection="10"/> - <dia:connection handle="1" to="O32" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O98"> - <dia:attribute name="obj_pos"> - <dia:point val="-287.147,-9.24178"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-287.197,-9.29178;-253.358,47.8538"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-287.147,-9.24178"/> - <dia:point val="-287.147,47.0538"/> - <dia:point val="-253.808,47.0538"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#operation_analytique_po_id_fkey#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O41" connection="10"/> - <dia:connection handle="1" to="O48" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O99"> - <dia:attribute name="obj_pos"> - <dia:point val="-287.147,-5.24178"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-287.197,-5.29178;104.28,4.9"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-287.147,-5.24178"/> - <dia:point val="-287.147,4.1"/> - <dia:point val="103.83,4.1"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#operation_analytique_j_id_fkey#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O41" connection="20"/> - <dia:connection handle="1" to="O37" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O100"> - <dia:attribute name="obj_pos"> - <dia:point val="-270.758,48.6538"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-270.808,48.6038;-257.018,100.897"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-270.758,48.6538"/> - <dia:point val="-270.758,100.097"/> - <dia:point val="-257.468,100.097"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#poste_analytique_pa_id_fkey#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O48" connection="12"/> - <dia:connection handle="1" to="O47" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O101"> - <dia:attribute name="obj_pos"> - <dia:point val="71.6,41.7"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="71.55,3.3;104.28,41.75"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="71.6,41.7"/> - <dia:point val="71.6,4.1"/> - <dia:point val="103.83,4.1"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#quant_purchase_j_id_fkey#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O49" connection="12"/> - <dia:connection handle="1" to="O37" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O102"> - <dia:attribute name="obj_pos"> - <dia:point val="71.6,45.7"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-79.1789,-21.9;71.65,45.75"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="71.6,45.7"/> - <dia:point val="71.6,-21.1"/> - <dia:point val="-78.7289,-21.1"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#qp_vat_code_fk#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O49" connection="22"/> - <dia:connection handle="1" to="O54" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O103"> - <dia:attribute name="obj_pos"> - <dia:point val="-15.5286,-26.1"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-79.1789,-26.15;-15.4786,-20.3"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-15.5286,-26.1"/> - <dia:point val="-15.5286,-21.1"/> - <dia:point val="-78.7289,-21.1"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#qs_vat_code_fk#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O50" connection="20"/> - <dia:connection handle="1" to="O54" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O104"> - <dia:attribute name="obj_pos"> - <dia:point val="-15.5286,-23.7"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-15.5786,-23.75;104.28,4.9"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-15.5286,-23.7"/> - <dia:point val="-15.5286,4.1"/> - <dia:point val="103.83,4.1"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#quant_sold_j_id_fkey#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O50" connection="26"/> - <dia:connection handle="1" to="O37" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O105"> - <dia:attribute name="obj_pos"> - <dia:point val="-263.438,98.7317"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-359.862,26.1506;-263.388,98.7817"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-263.438,98.7317"/> - <dia:point val="-263.438,26.9506"/> - <dia:point val="-359.412,26.9506"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O56" connection="12"/> - <dia:connection handle="1" to="O0" connection="9"/> - </dia:connections> - </dia:object> - <dia:object type="UML - Dependency" version="1" id="O106"> - <dia:attribute name="obj_pos"> - <dia:point val="-71.2,20.3"/> - </dia:attribute> - <dia:attribute name="obj_bb"> - <dia:rectangle val="-277.877,20.25;-71.15,62.3387"/> - </dia:attribute> - <dia:attribute name="meta"> - <dia:composite type="dict"/> - </dia:attribute> - <dia:attribute name="orth_points"> - <dia:point val="-71.2,20.3"/> - <dia:point val="-71.2,61.5387"/> - <dia:point val="-277.427,61.5387"/> - </dia:attribute> - <dia:attribute name="orth_orient"> - <dia:enum val="1"/> - <dia:enum val="0"/> - </dia:attribute> - <dia:attribute name="orth_autoroute"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="text_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="line_colour"> - <dia:color val="#000000"/> - </dia:attribute> - <dia:attribute name="name"> - <dia:string>#uj_priv_id_fkey#</dia:string> - </dia:attribute> - <dia:attribute name="stereotype"> - <dia:string>##</dia:string> - </dia:attribute> - <dia:attribute name="draw_arrow"> - <dia:boolean val="true"/> - </dia:attribute> - <dia:connections> - <dia:connection handle="0" to="O57" connection="12"/> - <dia:connection handle="1" to="O32" connection="9"/> - </dia:connections> - </dia:object> - </dia:layer> -</dia:diagram> diff --git a/sources/doc/developper/Doxyfile b/sources/doc/developper/Doxyfile deleted file mode 100644 index e89acbb..0000000 --- a/sources/doc/developper/Doxyfile +++ /dev/null @@ -1,1618 +0,0 @@ -# Doxyfile 1.6.3 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = noalyss - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = Version-6.8.0.0 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = . - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = YES - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it parses. -# With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this tag. -# The format is ext=language, where ext is a file extension, and language is one of -# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, -# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = YES - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = YES - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation -# rather than with sharp brackets. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = YES - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = YES - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. -# This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command <command> <input-file>, where <command> is the value of -# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name -# of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = doxygen-warn.log - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = ../../include \ - ../../html - - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.C \ - *.CC \ - *.C++ \ - *.II \ - *.I++ \ - *.H \ - *.HH \ - *.H++ \ - *.CS \ - *.PHP \ - *.PHP3 \ - *.M \ - *.MM \ - *.js \ - *.inc.php - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = ../../html/addon ../../include/tfpdf ../../unit-test - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = a?.php \ - b?.php \ - ?.php \ - test*.php \ - calendar-*.js \ - richtext.js \ - builder.js \ - controls.js \ - dragdrop.js \ - effects.js \ - prototype.js \ - scriptaculous.js \ - slider.js \ - sound.js \ - unittest.js. - - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command <filter> <input-file>, where <filter> -# is the value of the INPUT_FILTER tag, and <input-file> is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. -# If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. -# Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. -# The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = YES - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = NO - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. -# Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = header.html - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting -# this to NO can help when comparing the output of multiple runs. - -HTML_TIMESTAMP = YES - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = YES - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated -# HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. -# For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see -# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's -# filter section matches. -# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before the help appears. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have -# this name. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list. - -USE_INLINE_TREES = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. - -SEARCHENGINE = YES - -# When the SERVER_BASED_SEARCH tag is enabled the search engine will be implemented using a PHP enabled web server instead of at the web client using Javascript. Doxygen will generate the search PHP script and index -# file to put on the web server. The advantage of the server based approach is that it scales better to large projects and allows full text search. The disadvances is that it is more difficult to setup -# and does not have live searching capabilities. - -SERVER_BASED_SEARCH = NO - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. -# Note that when enabling USE_PDFLATEX this option is only used for -# generating bitmaps for formulas in the HTML output, but not in the -# Makefile that is written to the output directory. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = YES - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. - -LATEX_SOURCE_CODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. -# This is useful -# if you want to understand what is going on. -# On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = NO - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = FreeSans - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = YES - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 1000 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES diff --git a/sources/doc/developper/create_doc.sh b/sources/doc/developper/create_doc.sh deleted file mode 100755 index 23418cb..0000000 --- a/sources/doc/developper/create_doc.sh +++ /dev/null @@ -1,9 +0,0 @@ -doxygen -cd html; sed -i "s/utf-8/utf-8/g" * -cd .. -if [ ! -z "$PGUSER" ] ; then - echo "DOMAINE = $DOMAIN" - postgresql_autodoc -u $PGUSER --password=$PGPASSWORD -h localhost -d ${DOMAIN}mod1 - postgresql_autodoc -u $PGUSER --password=$PGPASSWORD -h localhost -d ${DOMAIN}account_repository -fi -cd ../../ && bash dev/compose_list.sh diff --git a/sources/doc/developper/header.html b/sources/doc/developper/header.html deleted file mode 100644 index e04310f..0000000 --- a/sources/doc/developper/header.html +++ /dev/null @@ -1,2 +0,0 @@ -</BODY> -</HTML> diff --git a/sources/doc/developper/html/.htaccess b/sources/doc/developper/html/.htaccess deleted file mode 100644 index f111ed1..0000000 --- a/sources/doc/developper/html/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -AddDefaultCharset utf-8 - diff --git a/sources/doc/document.dia b/sources/doc/document.dia deleted file mode 100644 index 2de7623..0000000 Binary files a/sources/doc/document.dia and /dev/null differ diff --git a/sources/doc/document2.dia b/sources/doc/document2.dia deleted file mode 100644 index c316d1b..0000000 Binary files a/sources/doc/document2.dia and /dev/null differ diff --git a/sources/doc/fiche.dia b/sources/doc/fiche.dia deleted file mode 100644 index f641d72..0000000 Binary files a/sources/doc/fiche.dia and /dev/null differ diff --git a/sources/doc/fpdf/FAQ.htm b/sources/doc/fpdf/FAQ.htm deleted file mode 100755 index 05d85c6..0000000 --- a/sources/doc/fpdf/FAQ.htm +++ /dev/null @@ -1,341 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> -<title>FAQ - - - - -

FAQ

- - -
    -
  • -

    1. What's exactly the license of FPDF? Are there any usage restrictions?

    -FPDF is released under a permissive license: there is no usage restriction. You may embed it -freely in your application (commercial or not), with or without modifications. -
  • - -
  • -

    2. When I try to create a PDF, a lot of weird characters show on the screen. Why?

    -These "weird" characters are in fact the actual content of your PDF. This behavior is a bug of -IE6. When it first receives an HTML page, then a PDF from the same URL, it displays it directly -without launching Acrobat. This happens frequently during the development stage: on the least -script error, an HTML page is sent, and after correction, the PDF arrives. -
    -To solve the problem, simply quit and restart IE. You can also go to another URL and come -back. -
    -To avoid this kind of inconvenience during the development, you can generate the PDF directly -to a file and open it through the explorer. -
  • - -
  • -

    3. I try to generate a PDF and IE displays a blank page. What happens?

    -First of all, check that you send nothing to the browser after the PDF (not even a space or a -carriage return). You can put an exit statement just after the call to the Output() method to -be sure. If it still doesn't work, it means you're a victim of the "blank page syndrome". IE -used in conjunction with the Acrobat plug-in suffers from many bugs. To avoid these problems -in a reliable manner, two main techniques exist: -
    -
    -- Disable the plug-in and use Acrobat as a helper application. To do this, launch Acrobat, go -to the Edit menu, Preferences, Internet, and uncheck "Display PDF in browser". Then, the next -time you load a PDF in IE, it displays the dialog box "Open it" or "Save it to disk". Uncheck -the option "Always ask before opening this type of file" and choose Open. From now on, PDF files -will open automatically in an external Acrobat window. -
    -The drawback of the method is that you need to alter the client configuration, which you can do -in an intranet environment but not for the Internet. -
    -
    -- Use a redirection technique. It consists in generating the PDF in a temporary file on the server -and redirect the client to it. For example, at the end of the script, you can put the following: -
    -
    //Determine a temporary file name in the current directory
    -$file = basename(tempnam('.', 'tmp'));
    -rename($file, $file.'.pdf');
    -$file .= '.pdf';
    -//Save PDF to file
    -$pdf->Output($file, 'F');
    -//Redirect
    -header('Location: '.$file);
    -
    -This method turns the dynamic PDF into a static one and avoids all troubles. But you have to do -some cleaning in order to delete the temporary files. For example: -
    -
    function CleanFiles($dir)
    -{
    -    //Delete temporary files
    -    $t = time();
    -    $h = opendir($dir);
    -    while($file=readdir($h))
    -    {
    -        if(substr($file,0,3)=='tmp' && substr($file,-4)=='.pdf')
    -        {
    -            $path = $dir.'/'.$file;
    -            if($t-filemtime($path)>3600)
    -                @unlink($path);
    -        }
    -    }
    -    closedir($h);
    -}
    -
    -This function deletes all files of the form tmp*.pdf older than an hour in the specified -directory. You may call it where you want, for example in the script which generates the PDF. -
  • - -
  • -

    4. I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.

    -You have to enclose your string with double quotes, not single ones. -
  • - -
  • -

    5. I try to display a variable in the Header method but nothing prints.

    -You have to use the global keyword to access global variables, for example: -
    -
    function Header()
    -{
    -    global $title;
    -
    -    $this->SetFont('Arial', 'B', 15);
    -    $this->Cell(0, 10, $title, 1, 1, 'C');
    -}
    -
    -$title = 'My title';
    -
    -Alternatively, you can use an object property: -
    -
    function Header()
    -{
    -    $this->SetFont('Arial', 'B', 15);
    -    $this->Cell(0, 10, $this->title, 1, 1, 'C');
    -}
    -
    -$pdf->title = 'My title';
    -
    -
  • - -
  • -

    6. I defined the Header and Footer methods in my PDF class but nothing appears.

    -You have to create an object from the PDF class, not FPDF: -
    -
    $pdf = new PDF();
    -
    -
  • - -
  • -

    7. Accented characters are replaced by some strange characters like é.

    -Don't use UTF-8 encoding. Standard FPDF fonts use ISO-8859-1 or Windows-1252. -It is possible to perform a conversion to ISO-8859-1 with utf8_decode(): -
    -
    $str = utf8_decode($str);
    -
    -But some characters such as Euro won't be translated correctly. If the iconv extension is available, the -right way to do it is the following: -
    -
    $str = iconv('UTF-8', 'windows-1252', $str);
    -
    -
  • - -
  • -

    8. I try to display the Euro symbol but it doesn't work.

    -The standard fonts have the Euro character at position 128. You can define a constant like this -for convenience: -
    -
    define('EURO', chr(128));
    -
    -
  • - -
  • -

    9. I get the following error when I try to generate a PDF: Some data has already been output, can't send PDF file

    -You must send nothing to the browser except the PDF itself: no HTML, no space, no carriage return. A common -case is having extra blank at the end of an included script file.
    -If you can't figure out where the problem comes from, this other message appearing just before can help you:
    -
    -Warning: Cannot modify header information - headers already sent by (output started at script.php:X)
    -
    -It means that script.php outputs something at line X. Go to this line and fix it. -In case the message doesn't show, first check that you didn't disable warnings, then add this at the very -beginning of your script: -
    -
    ob_end_clean();
    -
    -If you still don't see it, disable zlib.output_compression in your php.ini and it should appear. -
  • - -
  • -

    10. I draw a frame with very precise dimensions, but when printed I notice some differences.

    -To respect dimensions, select "None" for the Page Scaling setting instead of "Shrink to Printable Area" in the print dialog box. -
  • - -
  • -

    11. I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?

    -Printers have physical margins (different depending on the models); it is therefore impossible to remove -them and print on the whole surface of the paper. -
  • - -
  • -

    12. How can I put a background in my PDF?

    -For a picture, call Image() in the Header() method, before any other output. To set a background color, use Rect(). -
  • - -
  • -

    13. How can I set a specific header or footer on the first page?

    -Simply test the page number: -
    -
    function Header()
    -{
    -    if($this->PageNo()==1)
    -    {
    -        //First page
    -        ...
    -    }
    -    else
    -    {
    -        //Other pages
    -        ...
    -    }
    -}
    -
    -
  • - -
  • -

    14. I'd like to use extensions provided by different scripts. How can I combine them?

    -Use an inheritance chain. If you have two classes, say A in a.php: -
    -
    require('fpdf.php');
    -
    -class A extends FPDF
    -{
    -...
    -}
    -
    -and B in b.php: -
    -
    require('fpdf.php');
    -
    -class B extends FPDF
    -{
    -...
    -}
    -
    -then make B extend A: -
    -
    require('a.php');
    -
    -class B extends A
    -{
    -...
    -}
    -
    -and make your own class extend B: -
    -
    require('b.php');
    -
    -class PDF extends B
    -{
    -...
    -}
    -
    -$pdf = new PDF();
    -
    -
  • - -
  • -

    15. How can I send the PDF by email?

    -As any other file, but an easy way is to use PHPMailer and -its in-memory attachment: -
    -
    $mail = new PHPMailer();
    -...
    -$doc = $pdf->Output('', 'S');
    -$mail->AddStringAttachment($doc, 'doc.pdf', 'base64', 'application/pdf');
    -$mail->Send();
    -
    -
  • - -
  • -

    16. What's the limit of the file sizes I can generate with FPDF?

    -There is no particular limit. There are some constraints, however: -
    -
    -- The maximum memory size allocated to PHP scripts is usually 8MB. For very big documents, -especially with images, this limit may be reached (the file being built into memory). The -parameter is configured in the php.ini file. -
    -
    -- The maximum execution time allocated defaults to 30 seconds. This limit can of course be easily -reached. It is configured in php.ini and may be altered dynamically with set_time_limit(). -
    -
    -- Browsers generally have a 5 minute time-out. If you send the PDF directly to the browser and -reach the limit, it will be lost. It is therefore advised for very big documents to -generate them in a file, and to send some data to the browser from time to time (with a call -to flush() to force the output). When the document is finished, you can send a redirection to -it or create a link. -
    -Remark: even if the browser times out, the script may continue to run on the server. -
  • - -
  • -

    17. Can I modify a PDF with FPDF?

    -It is possible to import pages from an existing PDF document thanks to the FPDI extension:
    -
    -http://www.setasign.de/products/pdf-php-solutions/fpdi/
    -
    -You can then add some content to them. -
  • - -
  • -

    18. I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?

    -No. But a GPL C utility does exist, pdftotext, which is able to extract the textual content from -a PDF. It is provided with the Xpdf package:
    -
    -http://www.foolabs.com/xpdf/ -
  • - -
  • -

    19. Can I convert an HTML page to PDF with FPDF?

    -Not real-world pages. But a GPL C utility does exist, htmldoc, which allows to do it and gives good results:
    -
    -http://www.htmldoc.org -
  • - -
  • -

    20. Can I concatenate PDF files with FPDF?

    -Not directly, but it is possible to use FPDI -to perform this task. Some free command-line tools also exist:
    -
    -mbtPdfAsm
    -pdftk -
  • -
- - diff --git a/sources/doc/fpdf/doc/acceptpagebreak.htm b/sources/doc/fpdf/doc/acceptpagebreak.htm deleted file mode 100755 index ea067b5..0000000 --- a/sources/doc/fpdf/doc/acceptpagebreak.htm +++ /dev/null @@ -1,63 +0,0 @@ - - - - -AcceptPageBreak - - - -

AcceptPageBreak

-boolean AcceptPageBreak() -

Description

-Whenever a page break condition is met, the method is called, and the break is issued or not -depending on the returned value. The default implementation returns a value according to the -mode selected by SetAutoPageBreak(). -
-This method is called automatically and should not be called directly by the application. -

Example

-The method is overriden in an inherited class in order to obtain a 3 column layout: -
-
class PDF extends FPDF
-{
-var $col=0;
-
-function SetCol($col)
-{
-    //Move position to a column
-    $this->col=$col;
-    $x=10+$col*65;
-    $this->SetLeftMargin($x);
-    $this->SetX($x);
-}
-
-function AcceptPageBreak()
-{
-    if($this->col<2)
-    {
-        //Go to next column
-        $this->SetCol($this->col+1);
-        $this->SetY(10);
-        return false;
-    }
-    else
-    {
-        //Go back to first column and issue page break
-        $this->SetCol(0);
-        return true;
-    }
-}
-}
-
-$pdf=new PDF();
-$pdf->AddPage();
-$pdf->SetFont('Arial','',12);
-for($i=1;$i<=300;$i++)
-    $pdf->Cell(0,5,"Line $i",0,1);
-$pdf->Output();
-
-

See also

-SetAutoPageBreak(). -
- - - diff --git a/sources/doc/fpdf/doc/addfont.htm b/sources/doc/fpdf/doc/addfont.htm deleted file mode 100755 index 15c156f..0000000 --- a/sources/doc/fpdf/doc/addfont.htm +++ /dev/null @@ -1,55 +0,0 @@ - - - - -AddFont - - - -

AddFont

-AddFont(string family [, string style [, string file]]) -

Description

-Imports a TrueType or Type1 font and makes it available. It is necessary to generate a font -definition file first with the makefont.php utility. -
-The definition file (and the font file itself when embedding) must be present in the font directory. -If it is not found, the error "Could not include font definition file" is generated. -

Parameters

-
-
family
-
-Font family. The name can be chosen arbitrarily. If it is a standard family name, it will -override the corresponding font. -
-
style
-
-Font style. Possible values are (case insensitive): -
    -
  • empty string: regular
  • -
  • B: bold
  • -
  • I: italic
  • -
  • BI or IB: bold italic
  • -
-The default value is regular. -
-
file
-
-The font definition file. -
-By default, the name is built from the family and style, in lower case with no space. -
-
-

Example

-
-
$pdf->AddFont('Comic','I');
-
-is equivalent to: -
-
$pdf->AddFont('Comic','I','comici.php');
-
-

See also

-SetFont(). -
- - - diff --git a/sources/doc/fpdf/doc/addlink.htm b/sources/doc/fpdf/doc/addlink.htm deleted file mode 100755 index 5681d58..0000000 --- a/sources/doc/fpdf/doc/addlink.htm +++ /dev/null @@ -1,26 +0,0 @@ - - - - -AddLink - - - -

AddLink

-int AddLink() -

Description

-Creates a new internal link and returns its identifier. An internal link is a clickable area -which directs to another place within the document. -
-The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is -defined with SetLink(). -

See also

-Cell(), -Write(), -Image(), -Link(), -SetLink(). -
- - - diff --git a/sources/doc/fpdf/doc/addpage.htm b/sources/doc/fpdf/doc/addpage.htm deleted file mode 100755 index f88d8ac..0000000 --- a/sources/doc/fpdf/doc/addpage.htm +++ /dev/null @@ -1,56 +0,0 @@ - - - - -AddPage - - - -

AddPage

-AddPage([string orientation ,[ mixed format]]) -

Description

-Adds a new page to the document. If a page is already present, the Footer() method is called -first to output the footer. Then the page is added, the current position set to the top-left -corner according to the left and top margins, and Header() is called to display the header. -
-The font which was set before calling is automatically restored. There is no need to call -SetFont() again if you want to continue with the same font. The same is true for colors and -line width. -
-The origin of the coordinate system is at the top-left corner and increasing ordinates go -downwards. -

Parameters

-
-
orientation
-
-Page orientation. Possible values are (case insensitive): -
    -
  • P or Portrait
  • -
  • L or Landscape
  • -
-The default value is the one passed to the constructor. -
-
format
-
-Page format. It can be either one of the following values (case insensitive): -
    -
  • A3
  • -
  • A4
  • -
  • A5
  • -
  • Letter
  • -
  • Legal
  • -
-or an array containing the width and the height (expressed in user unit).
-
-The default value is the one passed to the constructor. -
-
-

See also

-FPDF(), -Header(), -Footer(), -SetMargins(). -
- - - diff --git a/sources/doc/fpdf/doc/aliasnbpages.htm b/sources/doc/fpdf/doc/aliasnbpages.htm deleted file mode 100755 index 2acfff1..0000000 --- a/sources/doc/fpdf/doc/aliasnbpages.htm +++ /dev/null @@ -1,45 +0,0 @@ - - - - -AliasNbPages - - - -

AliasNbPages

-AliasNbPages([string alias]) -

Description

-Defines an alias for the total number of pages. It will be substituted as the document is -closed. -

Parameters

-
-
alias
-
-The alias. Default value: {nb}. -
-
-

Example

-
-
class PDF extends FPDF
-{
-function Footer()
-{
-    //Go to 1.5 cm from bottom
-    $this->SetY(-15);
-    //Select Arial italic 8
-    $this->SetFont('Arial','I',8);
-    //Print current and total page numbers
-    $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
-}
-}
-
-$pdf=new PDF();
-$pdf->AliasNbPages();
-
-

See also

-PageNo(), -Footer(). -
- - - diff --git a/sources/doc/fpdf/doc/cell.htm b/sources/doc/fpdf/doc/cell.htm deleted file mode 100755 index 2182cf7..0000000 --- a/sources/doc/fpdf/doc/cell.htm +++ /dev/null @@ -1,104 +0,0 @@ - - - - -Cell - - - -

Cell

-Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]]) -

Description

-Prints a cell (rectangular area) with optional borders, background color and character string. -The upper-left corner of the cell corresponds to the current position. The text can be aligned -or centered. After the call, the current position moves to the right or to the next line. It is -possible to put a link on the text. -
-If automatic page breaking is enabled and the cell goes beyond the limit, a page break is -done before outputting. -

Parameters

-
-
w
-
-Cell width. If 0, the cell extends up to the right margin. -
-
h
-
-Cell height. -Default value: 0. -
-
txt
-
-String to print. -Default value: empty string. -
-
border
-
-Indicates if borders must be drawn around the cell. The value can be either a number: -
    -
  • 0: no border
  • -
  • 1: frame
  • -
-or a string containing some or all of the following characters (in any order): -
    -
  • L: left
  • -
  • T: top
  • -
  • R: right
  • -
  • B: bottom
  • -
-Default value: 0. -
-
ln
-
-Indicates where the current position should go after the call. Possible values are: -
    -
  • 0: to the right
  • -
  • 1: to the beginning of the next line
  • -
  • 2: below
  • -
-Putting 1 is equivalent to putting 0 and calling Ln() just after. -Default value: 0. -
-
align
-
-Allows to center or align the text. Possible values are: -
    -
  • L or empty string: left align (default value)
  • -
  • C: center
  • -
  • R: right align
  • -
-
-
fill
-
-Indicates if the cell background must be painted (true) or transparent (false). -Default value: false. -
-
link
-
-URL or identifier returned by AddLink(). -
-
-

Example

-
-
//Set font
-$pdf->SetFont('Arial','B',16);
-//Move to 8 cm to the right
-$pdf->Cell(80);
-//Centered text in a framed 20*10 mm cell and line break
-$pdf->Cell(20,10,'Title',1,1,'C');
-
-

See also

-SetFont(), -SetDrawColor(), -SetFillColor(), -SetTextColor(), -SetLineWidth(), -AddLink(), -Ln(), -MultiCell(), -Write(), -SetAutoPageBreak(). -
- - - diff --git a/sources/doc/fpdf/doc/close.htm b/sources/doc/fpdf/doc/close.htm deleted file mode 100755 index 6d8c192..0000000 --- a/sources/doc/fpdf/doc/close.htm +++ /dev/null @@ -1,21 +0,0 @@ - - - - -Close - - - -

Close

-Close() -

Description

-Terminates the PDF document. It is not necessary to call this method explicitly because Output() -does it automatically. -
-If the document contains no page, AddPage() is called to prevent from getting an invalid document. -

See also

-Output(). -
- - - diff --git a/sources/doc/fpdf/doc/error.htm b/sources/doc/fpdf/doc/error.htm deleted file mode 100755 index 49b6083..0000000 --- a/sources/doc/fpdf/doc/error.htm +++ /dev/null @@ -1,25 +0,0 @@ - - - - -Error - - - -

Error

-Error(string msg) -

Description

-This method is automatically called in case of fatal error; it simply outputs the message -and halts the execution. An inherited class may override it to customize the error handling -but should always halt the script, or the resulting document would probably be invalid. -

Parameters

-
-
msg
-
-The error message. -
-
-
- - - diff --git a/sources/doc/fpdf/doc/footer.htm b/sources/doc/fpdf/doc/footer.htm deleted file mode 100755 index 0ba9d32..0000000 --- a/sources/doc/fpdf/doc/footer.htm +++ /dev/null @@ -1,35 +0,0 @@ - - - - -Footer - - - -

Footer

-Footer() -

Description

-This method is used to render the page footer. It is automatically called by AddPage() and -Close() and should not be called directly by the application. The implementation in FPDF is -empty, so you have to subclass it and override the method if you want a specific processing. -

Example

-
-
class PDF extends FPDF
-{
-function Footer()
-{
-    //Go to 1.5 cm from bottom
-    $this->SetY(-15);
-    //Select Arial italic 8
-    $this->SetFont('Arial','I',8);
-    //Print centered page number
-    $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
-}
-}
-
-

See also

-Header(). -
- - - diff --git a/sources/doc/fpdf/doc/fpdf.htm b/sources/doc/fpdf/doc/fpdf.htm deleted file mode 100755 index 078e7db..0000000 --- a/sources/doc/fpdf/doc/fpdf.htm +++ /dev/null @@ -1,63 +0,0 @@ - - - - -FPDF - - - -

FPDF

-FPDF([string orientation [, string unit [, mixed format]]]) -

Description

-This is the class constructor. It allows to set up the page format, the orientation and the -unit of measure used in all methods (except for font sizes). -

Parameters

-
-
orientation
-
-Default page orientation. Possible values are (case insensitive): -
    -
  • P or Portrait
  • -
  • L or Landscape
  • -
-Default value is P. -
-
unit
-
-User unit. Possible values are: -
    -
  • pt: point
  • -
  • mm: millimeter
  • -
  • cm: centimeter
  • -
  • in: inch
  • -
-A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This -is a very common unit in typography; font sizes are expressed in that unit. -
-
-Default value is mm. -
-
format
-
-The format used for pages. It can be either one of the following values (case insensitive): -
    -
  • A3
  • -
  • A4
  • -
  • A5
  • -
  • Letter
  • -
  • Legal
  • -
-or an array containing the width and the height (expressed in the unit given by unit).
-
-Default value is A4. -
-
-

Example

-Example with a custom 100x150 mm page format: -
-
$pdf = new FPDF('P', 'mm', array(100,150));
-
-
- - - diff --git a/sources/doc/fpdf/doc/getstringwidth.htm b/sources/doc/fpdf/doc/getstringwidth.htm deleted file mode 100755 index 7cb1119..0000000 --- a/sources/doc/fpdf/doc/getstringwidth.htm +++ /dev/null @@ -1,23 +0,0 @@ - - - - -GetStringWidth - - - -

GetStringWidth

-float GetStringWidth(string s) -

Description

-Returns the length of a string in user unit. A font must be selected. -

Parameters

-
-
s
-
-The string whose length is to be computed. -
-
-
- - - diff --git a/sources/doc/fpdf/doc/getx.htm b/sources/doc/fpdf/doc/getx.htm deleted file mode 100755 index 1d1310c..0000000 --- a/sources/doc/fpdf/doc/getx.htm +++ /dev/null @@ -1,20 +0,0 @@ - - - - -GetX - - - -

GetX

-float GetX() -

Description

-Returns the abscissa of the current position. -

See also

-SetX(), -GetY(), -SetY(). -
- - - diff --git a/sources/doc/fpdf/doc/gety.htm b/sources/doc/fpdf/doc/gety.htm deleted file mode 100755 index e8ce6cf..0000000 --- a/sources/doc/fpdf/doc/gety.htm +++ /dev/null @@ -1,20 +0,0 @@ - - - - -GetY - - - -

GetY

-float GetY() -

Description

-Returns the ordinate of the current position. -

See also

-SetY(), -GetX(), -SetX(). -
- - - diff --git a/sources/doc/fpdf/doc/header.htm b/sources/doc/fpdf/doc/header.htm deleted file mode 100755 index f320e13..0000000 --- a/sources/doc/fpdf/doc/header.htm +++ /dev/null @@ -1,37 +0,0 @@ - - - - -Header - - - -

Header

-Header() -

Description

-This method is used to render the page header. It is automatically called by AddPage() and -should not be called directly by the application. The implementation in FPDF is empty, so -you have to subclass it and override the method if you want a specific processing. -

Example

-
-
class PDF extends FPDF
-{
-function Header()
-{
-    //Select Arial bold 15
-    $this->SetFont('Arial','B',15);
-    //Move to the right
-    $this->Cell(80);
-    //Framed title
-    $this->Cell(30,10,'Title',1,0,'C');
-    //Line break
-    $this->Ln(20);
-}
-}
-
-

See also

-Footer(). -
- - - diff --git a/sources/doc/fpdf/doc/image.htm b/sources/doc/fpdf/doc/image.htm deleted file mode 100755 index 3375dad..0000000 --- a/sources/doc/fpdf/doc/image.htm +++ /dev/null @@ -1,86 +0,0 @@ - - - - -Image - - - -

Image

-Image(string file [, float x [, float y [, float w [, float h [, string type [, mixed link]]]]]]) -

Description

-Puts an image. The size it will take on the page can be specified in different ways: -
    -
  • explicit width and height (expressed in user unit)
  • -
  • one explicit dimension, the other being calculated automatically in order to keep the original proportions
  • -
  • no explicit dimension, in which case the image is put at 72 dpi
  • -
-Supported formats are JPEG, PNG and GIF. The GD extension is required for GIF. -
-
-For JPEGs, all flavors are allowed: -
    -
  • gray scales
  • -
  • true colors (24 bits)
  • -
  • CMYK (32 bits)
  • -
-For PNGs, are allowed: -
    -
  • gray scales on at most 8 bits (256 levels)
  • -
  • indexed colors
  • -
  • true colors (24 bits)
  • -
-but are not supported: -
    -
  • Interlacing
  • -
  • Alpha channel
  • -
-For GIFs: in case of an animated GIF, only the first frame is used.
-
-If a transparent color is defined, it is taken into account.
-
-The format can be specified explicitly or inferred from the file extension.
-It is possible to put a link on the image.
-
-Remark: if an image is used several times, only one copy is embedded in the file. -

Parameters

-
-
file
-
-Path or URL of the image. -
-
x
-
-Abscissa of the upper-left corner. If not specified or equal to null, the current abscissa -is used. -
-
y
-
-Ordinate of the upper-left corner. If not specified or equal to null, the current ordinate -is used; moreover, a page break is triggered first if necessary (in case automatic page breaking is enabled) -and, after the call, the current ordinate is moved to the bottom of the image. -
-
w
-
-Width of the image in the page. If not specified or equal to zero, it is automatically calculated. -
-
h
-
-Height of the image in the page. If not specified or equal to zero, it is automatically calculated. -
-
type
-
-Image format. Possible values are (case insensitive): JPG, JPEG, PNG and GIF. -If not specified, the type is inferred from the file extension. -
-
link
-
-URL or identifier returned by AddLink(). -
-
-

See also

-AddLink(). -
- - - diff --git a/sources/doc/fpdf/doc/index.htm b/sources/doc/fpdf/doc/index.htm deleted file mode 100755 index 93d3e13..0000000 --- a/sources/doc/fpdf/doc/index.htm +++ /dev/null @@ -1,57 +0,0 @@ - - - - -FPDF 1.6 Reference Manual - - - -

FPDF 1.6 Reference Manual

-AcceptPageBreak - accept or not automatic page break
-AddFont - add a new font
-AddLink - create an internal link
-AddPage - add a new page
-AliasNbPages - define an alias for number of pages
-Cell - print a cell
-Close - terminate the document
-Error - fatal error
-Footer - page footer
-FPDF - constructor
-GetStringWidth - compute string length
-GetX - get current x position
-GetY - get current y position
-Header - page header
-Image - output an image
-Line - draw a line
-Link - put a link
-Ln - line break
-MultiCell - print text with line breaks
-Output - save or send the document
-PageNo - page number
-Rect - draw a rectangle
-SetAuthor - set the document author
-SetAutoPageBreak - set the automatic page breaking mode
-SetCompression - turn compression on or off
-SetCreator - set document creator
-SetDisplayMode - set display mode
-SetDrawColor - set drawing color
-SetFillColor - set filling color
-SetFont - set font
-SetFontSize - set font size
-SetKeywords - associate keywords with document
-SetLeftMargin - set left margin
-SetLineWidth - set line width
-SetLink - set internal link destination
-SetMargins - set margins
-SetRightMargin - set right margin
-SetSubject - set document subject
-SetTextColor - set text color
-SetTitle - set document title
-SetTopMargin - set top margin
-SetX - set current x position
-SetXY - set current x and y positions
-SetY - set current y position
-Text - print a string
-Write - print flowing text
- - diff --git a/sources/doc/fpdf/doc/line.htm b/sources/doc/fpdf/doc/line.htm deleted file mode 100755 index a9c5194..0000000 --- a/sources/doc/fpdf/doc/line.htm +++ /dev/null @@ -1,38 +0,0 @@ - - - - -Line - - - -

Line

-Line(float x1, float y1, float x2, float y2) -

Description

-Draws a line between two points. -

Parameters

-
-
x1
-
-Abscissa of first point. -
-
y1
-
-Ordinate of first point. -
-
x2
-
-Abscissa of second point. -
-
y2
-
-Ordinate of second point. -
-
-

See also

-SetLineWidth(), -SetDrawColor(). -
- - - diff --git a/sources/doc/fpdf/doc/link.htm b/sources/doc/fpdf/doc/link.htm deleted file mode 100755 index d6c728c..0000000 --- a/sources/doc/fpdf/doc/link.htm +++ /dev/null @@ -1,46 +0,0 @@ - - - - -Link - - - -

Link

-Link(float x, float y, float w, float h, mixed link) -

Description

-Puts a link on a rectangular area of the page. Text or image links are generally put via Cell(), -Write() or Image(), but this method can be useful for instance to define a clickable area inside -an image. -

Parameters

-
-
x
-
-Abscissa of the upper-left corner of the rectangle. -
-
y
-
-Ordinate of the upper-left corner of the rectangle. -
-
w
-
-Width of the rectangle. -
-
h
-
-Height of the rectangle. -
-
link
-
-URL or identifier returned by AddLink(). -
-
-

See also

-AddLink(), -Cell(), -Write(), -Image(). -
- - - diff --git a/sources/doc/fpdf/doc/ln.htm b/sources/doc/fpdf/doc/ln.htm deleted file mode 100755 index 0b91b00..0000000 --- a/sources/doc/fpdf/doc/ln.htm +++ /dev/null @@ -1,28 +0,0 @@ - - - - -Ln - - - -

Ln

-Ln([float h]) -

Description

-Performs a line break. The current abscissa goes back to the left margin and the ordinate -increases by the amount passed in parameter. -

Parameters

-
-
h
-
-The height of the break. -
-By default, the value equals the height of the last printed cell. -
-
-

See also

-Cell(). -
- - - diff --git a/sources/doc/fpdf/doc/multicell.htm b/sources/doc/fpdf/doc/multicell.htm deleted file mode 100755 index c41bbd7..0000000 --- a/sources/doc/fpdf/doc/multicell.htm +++ /dev/null @@ -1,76 +0,0 @@ - - - - -MultiCell - - - -

MultiCell

-MultiCell(float w, float h, string txt [, mixed border [, string align [, boolean fill]]]) -

Description

-This method allows printing text with line breaks. They can be automatic (as soon as the -text reaches the right border of the cell) or explicit (via the \n character). As many cells -as necessary are output, one below the other. -
-Text can be aligned, centered or justified. The cell block can be framed and the background -painted. -

Parameters

-
-
w
-
-Width of cells. If 0, they extend up to the right margin of the page. -
-
h
-
-Height of cells. -
-
txt
-
-String to print. -
-
border
-
-Indicates if borders must be drawn around the cell block. The value can be either a number: -
    -
  • 0: no border
  • -
  • 1: frame
  • -
-or a string containing some or all of the following characters (in any order): -
    -
  • L: left
  • -
  • T: top
  • -
  • R: right
  • -
  • B: bottom
  • -
-Default value: 0. -
-
align
-
-Sets the text alignment. Possible values are: -
    -
  • L: left alignment
  • -
  • C: center
  • -
  • R: right alignment
  • -
  • J: justification (default value)
  • -
-
-
fill
-
-Indicates if the cell background must be painted (true) or transparent (false). -Default value: false. -
-
-

See also

-SetFont(), -SetDrawColor(), -SetFillColor(), -SetTextColor(), -SetLineWidth(), -Cell(), -Write(), -SetAutoPageBreak(). -
- - - diff --git a/sources/doc/fpdf/doc/output.htm b/sources/doc/fpdf/doc/output.htm deleted file mode 100755 index b62291c..0000000 --- a/sources/doc/fpdf/doc/output.htm +++ /dev/null @@ -1,42 +0,0 @@ - - - - -Output - - - -

Output

-string Output([string name, string dest]) -

Description

-Send the document to a given destination: browser, file or string. In the case of browser, the -plug-in may be used (if present) or a download ("Save as" dialog box) may be forced. -
-The method first calls Close() if necessary to terminate the document. -

Parameters

-
-
name
-
-The name of the file. If not specified, the document will be sent to the browser -(destination I) with the name doc.pdf. -
-
dest
-
-Destination where to send the document. It can take one of the following values: -
    -
  • I: send the file inline to the browser. The plug-in is used if available. -The name given by name is used when one selects the "Save as" option on the -link generating the PDF.
  • -
  • D: send to the browser and force a file download with the name given by -name.
  • -
  • F: save to a local file with the name given by name (may include a path).
  • -
  • S: return the document as a string. name is ignored.
  • -
-
-
-

See also

-Close(). -
- - - diff --git a/sources/doc/fpdf/doc/pageno.htm b/sources/doc/fpdf/doc/pageno.htm deleted file mode 100755 index 84e0f22..0000000 --- a/sources/doc/fpdf/doc/pageno.htm +++ /dev/null @@ -1,18 +0,0 @@ - - - - -PageNo - - - -

PageNo

-int PageNo() -

Description

-Returns the current page number. -

See also

-AliasNbPages(). -
- - - diff --git a/sources/doc/fpdf/doc/rect.htm b/sources/doc/fpdf/doc/rect.htm deleted file mode 100755 index fa71375..0000000 --- a/sources/doc/fpdf/doc/rect.htm +++ /dev/null @@ -1,48 +0,0 @@ - - - - -Rect - - - -

Rect

-Rect(float x, float y, float w, float h [, string style]) -

Description

-Outputs a rectangle. It can be drawn (border only), filled (with no border) or both. -

Parameters

-
-
x
-
-Abscissa of upper-left corner. -
-
y
-
-Ordinate of upper-left corner. -
-
w
-
-Width. -
-
h
-
-Height. -
-
style
-
-Style of rendering. Possible values are: -
    -
  • D or empty string: draw. This is the default value.
  • -
  • F: fill
  • -
  • DF or FD: draw and fill
  • -
-
-
-

See also

-SetLineWidth(), -SetDrawColor(), -SetFillColor(). -
- - - diff --git a/sources/doc/fpdf/doc/setauthor.htm b/sources/doc/fpdf/doc/setauthor.htm deleted file mode 100755 index 60d3b7c..0000000 --- a/sources/doc/fpdf/doc/setauthor.htm +++ /dev/null @@ -1,33 +0,0 @@ - - - - -SetAuthor - - - -

SetAuthor

-SetAuthor(string author [, boolean isUTF8]) -

Description

-Defines the author of the document. -

Parameters

-
-
author
-
-The name of the author. -
-
isUTF8
-
-Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
-Default value: false. -
-
-

See also

-SetCreator(), -SetKeywords(), -SetSubject(), -SetTitle(). -
- - - diff --git a/sources/doc/fpdf/doc/setautopagebreak.htm b/sources/doc/fpdf/doc/setautopagebreak.htm deleted file mode 100755 index 71dec89..0000000 --- a/sources/doc/fpdf/doc/setautopagebreak.htm +++ /dev/null @@ -1,33 +0,0 @@ - - - - -SetAutoPageBreak - - - -

SetAutoPageBreak

-SetAutoPageBreak(boolean auto [, float margin]) -

Description

-Enables or disables the automatic page breaking mode. When enabling, the second parameter is -the distance from the bottom of the page that defines the triggering limit. By default, the -mode is on and the margin is 2 cm. -

Parameters

-
-
auto
-
-Boolean indicating if mode should be on or off. -
-
margin
-
-Distance from the bottom of the page. -
-
-

See also

-Cell(), -MultiCell(), -AcceptPageBreak(). -
- - - diff --git a/sources/doc/fpdf/doc/setcompression.htm b/sources/doc/fpdf/doc/setcompression.htm deleted file mode 100755 index 3f81ab0..0000000 --- a/sources/doc/fpdf/doc/setcompression.htm +++ /dev/null @@ -1,31 +0,0 @@ - - - - -SetCompression - - - -

SetCompression

-SetCompression(boolean compress) -

Description

-Activates or deactivates page compression. When activated, the internal representation of -each page is compressed, which leads to a compression ratio of about 2 for the resulting -document. -
-Compression is on by default. -
-
-Note: the Zlib extension is required for this feature. If not present, compression -will be turned off. -

Parameters

-
-
compress
-
-Boolean indicating if compression must be enabled. -
-
-
- - - diff --git a/sources/doc/fpdf/doc/setcreator.htm b/sources/doc/fpdf/doc/setcreator.htm deleted file mode 100755 index 2c0db3c..0000000 --- a/sources/doc/fpdf/doc/setcreator.htm +++ /dev/null @@ -1,34 +0,0 @@ - - - - -SetCreator - - - -

SetCreator

-SetCreator(string creator [, boolean isUTF8]) -

Description

-Defines the creator of the document. This is typically the name of the application that -generates the PDF. -

Parameters

-
-
creator
-
-The name of the creator. -
-
isUTF8
-
-Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
-Default value: false. -
-
-

See also

-SetAuthor(), -SetKeywords(), -SetSubject(), -SetTitle(). -
- - - diff --git a/sources/doc/fpdf/doc/setdisplaymode.htm b/sources/doc/fpdf/doc/setdisplaymode.htm deleted file mode 100755 index 081e7d6..0000000 --- a/sources/doc/fpdf/doc/setdisplaymode.htm +++ /dev/null @@ -1,47 +0,0 @@ - - - - -SetDisplayMode - - - -

SetDisplayMode

-SetDisplayMode(mixed zoom [, string layout]) -

Description

-Defines the way the document is to be displayed by the viewer. The zoom level can be set: pages can be -displayed entirely on screen, occupy the full width of the window, use real size, be scaled by a -specific zooming factor or use viewer default (configured in the Preferences menu of Acrobat). -The page layout can be specified too: single at once, continuous display, two columns or viewer -default. -
-By default, documents use the full width mode with continuous display. -

Parameters

-
-
zoom
-
-The zoom to use. It can be one of the following string values: -
    -
  • fullpage: displays the entire page on screen
  • -
  • fullwidth: uses maximum width of window
  • -
  • real: uses real size (equivalent to 100% zoom)
  • -
  • default: uses viewer default mode
  • -
-or a number indicating the zooming factor to use. -
-
layout
-
-The page layout. Possible values are: -
    -
  • single: displays one page at once
  • -
  • continuous: displays pages continuously
  • -
  • two: displays two pages on two columns
  • -
  • default: uses viewer default mode
  • -
-Default value is continuous. -
-
-
- - - diff --git a/sources/doc/fpdf/doc/setdrawcolor.htm b/sources/doc/fpdf/doc/setdrawcolor.htm deleted file mode 100755 index 6be79c5..0000000 --- a/sources/doc/fpdf/doc/setdrawcolor.htm +++ /dev/null @@ -1,41 +0,0 @@ - - - - -SetDrawColor - - - -

SetDrawColor

-SetDrawColor(int r [, int g, int b]) -

Description

-Defines the color used for all drawing operations (lines, rectangles and cell borders). It -can be expressed in RGB components or gray scale. The method can be called before the first -page is created and the value is retained from page to page. -

Parameters

-
-
r
-
-If g et b are given, red component; if not, indicates the gray level. -Value between 0 and 255. -
-
g
-
-Green component (between 0 and 255). -
-
b
-
-Blue component (between 0 and 255). -
-
-

See also

-SetFillColor(), -SetTextColor(), -Line(), -Rect(), -Cell(), -MultiCell(). -
- - - diff --git a/sources/doc/fpdf/doc/setfillcolor.htm b/sources/doc/fpdf/doc/setfillcolor.htm deleted file mode 100755 index 64f66d3..0000000 --- a/sources/doc/fpdf/doc/setfillcolor.htm +++ /dev/null @@ -1,40 +0,0 @@ - - - - -SetFillColor - - - -

SetFillColor

-SetFillColor(int r [, int g, int b]) -

Description

-Defines the color used for all filling operations (filled rectangles and cell backgrounds). -It can be expressed in RGB components or gray scale. The method can be called before the first -page is created and the value is retained from page to page. -

Parameters

-
-
r
-
-If g and b are given, red component; if not, indicates the gray level. -Value between 0 and 255. -
-
g
-
-Green component (between 0 and 255). -
-
b
-
-Blue component (between 0 and 255). -
-
-

See also

-SetDrawColor(), -SetTextColor(), -Rect(), -Cell(), -MultiCell(). -
- - - diff --git a/sources/doc/fpdf/doc/setfont.htm b/sources/doc/fpdf/doc/setfont.htm deleted file mode 100755 index 5a13f51..0000000 --- a/sources/doc/fpdf/doc/setfont.htm +++ /dev/null @@ -1,92 +0,0 @@ - - - - -SetFont - - - -

SetFont

-SetFont(string family [, string style [, float size]]) -

Description

-Sets the font used to print character strings. It is mandatory to call this method -at least once before printing text or the resulting document would not be valid. -
-The font can be either a standard one or a font added via the AddFont() method. Standard fonts -use Windows encoding cp1252 (Western Europe). -
-The method can be called before the first page is created and the font is retained from page -to page. -
-If you just wish to change the current font size, it is simpler to call SetFontSize(). -
-
-Note: the font metric files must be accessible. They are searched successively in: -
    -
  • The directory defined by the FPDF_FONTPATH constant (if this constant is defined)
  • -
  • The font directory located in the directory containing fpdf.php (if it exists)
  • -
  • The directories accessible through include()
  • -
-Example defining FPDF_FONTPATH (note the mandatory trailing slash): -
-
define('FPDF_FONTPATH','/home/www/font/');
-require('fpdf.php');
-
-If the file corresponding to the requested font is not found, the error "Could not include -font metric file" is issued. -

Parameters

-
-
family
-
-Family font. It can be either a name defined by AddFont() or one of the standard families (case -insensitive): -
    -
  • Courier (fixed-width)
  • -
  • Helvetica or Arial (synonymous; sans serif)
  • -
  • Times (serif)
  • -
  • Symbol (symbolic)
  • -
  • ZapfDingbats (symbolic)
  • -
-It is also possible to pass an empty string. In that case, the current family is retained. -
-
style
-
-Font style. Possible values are (case insensitive): -
    -
  • empty string: regular
  • -
  • B: bold
  • -
  • I: italic
  • -
  • U: underline
  • -
-or any combination. The default value is regular. -Bold and italic styles do not apply to Symbol and ZapfDingbats. -
-
size
-
-Font size in points. -
-The default value is the current size. If no size has been specified since the beginning of -the document, the value taken is 12. -
-
-

Example

-
-
//Times regular 12
-$pdf->SetFont('Times');
-//Arial bold 14
-$pdf->SetFont('Arial','B',14);
-//Removes bold
-$pdf->SetFont('');
-//Times bold, italic and underlined 14
-$pdf->SetFont('Times','BIU');
-
-

See also

-AddFont(), -SetFontSize(), -Cell(), -MultiCell(), -Write(). -
- - - diff --git a/sources/doc/fpdf/doc/setfontsize.htm b/sources/doc/fpdf/doc/setfontsize.htm deleted file mode 100755 index 20b35cd..0000000 --- a/sources/doc/fpdf/doc/setfontsize.htm +++ /dev/null @@ -1,25 +0,0 @@ - - - - -SetFontSize - - - -

SetFontSize

-SetFontSize(float size) -

Description

-Defines the size of the current font. -

Parameters

-
-
size
-
-The size (in points). -
-
-

See also

-SetFont(). -
- - - diff --git a/sources/doc/fpdf/doc/setkeywords.htm b/sources/doc/fpdf/doc/setkeywords.htm deleted file mode 100755 index 8b8897e..0000000 --- a/sources/doc/fpdf/doc/setkeywords.htm +++ /dev/null @@ -1,33 +0,0 @@ - - - - -SetKeywords - - - -

SetKeywords

-SetKeywords(string keywords [, boolean isUTF8]) -

Description

-Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'. -

Parameters

-
-
keywords
-
-The list of keywords. -
-
isUTF8
-
-Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
-Default value: false. -
-
-

See also

-SetAuthor(), -SetCreator(), -SetSubject(), -SetTitle(). -
- - - diff --git a/sources/doc/fpdf/doc/setleftmargin.htm b/sources/doc/fpdf/doc/setleftmargin.htm deleted file mode 100755 index dde7a7c..0000000 --- a/sources/doc/fpdf/doc/setleftmargin.htm +++ /dev/null @@ -1,30 +0,0 @@ - - - - -SetLeftMargin - - - -

SetLeftMargin

-SetLeftMargin(float margin) -

Description

-Defines the left margin. The method can be called before creating the first page. -
-If the current abscissa gets out of page, it is brought back to the margin. -

Parameters

-
-
margin
-
-The margin. -
-
-

See also

-SetTopMargin(), -SetRightMargin(), -SetAutoPageBreak(), -SetMargins(). -
- - - diff --git a/sources/doc/fpdf/doc/setlinewidth.htm b/sources/doc/fpdf/doc/setlinewidth.htm deleted file mode 100755 index 11e417c..0000000 --- a/sources/doc/fpdf/doc/setlinewidth.htm +++ /dev/null @@ -1,29 +0,0 @@ - - - - -SetLineWidth - - - -

SetLineWidth

-SetLineWidth(float width) -

Description

-Defines the line width. By default, the value equals 0.2 mm. The method can be called before -the first page is created and the value is retained from page to page. -

Parameters

-
-
width
-
-The width. -
-
-

See also

-Line(), -Rect(), -Cell(), -MultiCell(). -
- - - diff --git a/sources/doc/fpdf/doc/setlink.htm b/sources/doc/fpdf/doc/setlink.htm deleted file mode 100755 index b524525..0000000 --- a/sources/doc/fpdf/doc/setlink.htm +++ /dev/null @@ -1,34 +0,0 @@ - - - - -SetLink - - - -

SetLink

-SetLink(int link [, float y [, int page]]) -

Description

-Defines the page and position a link points to. -

Parameters

-
-
link
-
-The link identifier returned by AddLink(). -
-
y
-
-Ordinate of target position; -1 indicates the current position. -The default value is 0 (top of page). -
-
page
-
-Number of target page; -1 indicates the current page. This is the default value. -
-
-

See also

-AddLink(). -
- - - diff --git a/sources/doc/fpdf/doc/setmargins.htm b/sources/doc/fpdf/doc/setmargins.htm deleted file mode 100755 index 7cc8c6d..0000000 --- a/sources/doc/fpdf/doc/setmargins.htm +++ /dev/null @@ -1,37 +0,0 @@ - - - - -SetMargins - - - -

SetMargins

-SetMargins(float left, float top [, float right]) -

Description

-Defines the left, top and right margins. By default, they equal 1 cm. Call this method to change -them. -

Parameters

-
-
left
-
-Left margin. -
-
top
-
-Top margin. -
-
right
-
-Right margin. Default value is the left one. -
-
-

See also

-SetLeftMargin(), -SetTopMargin(), -SetRightMargin(), -SetAutoPageBreak(). -
- - - diff --git a/sources/doc/fpdf/doc/setrightmargin.htm b/sources/doc/fpdf/doc/setrightmargin.htm deleted file mode 100755 index 7915647..0000000 --- a/sources/doc/fpdf/doc/setrightmargin.htm +++ /dev/null @@ -1,28 +0,0 @@ - - - - -SetRightMargin - - - -

SetRightMargin

-SetRightMargin(float margin) -

Description

-Defines the right margin. The method can be called before creating the first page. -

Parameters

-
-
margin
-
-The margin. -
-
-

See also

-SetLeftMargin(), -SetTopMargin(), -SetAutoPageBreak(), -SetMargins(). -
- - - diff --git a/sources/doc/fpdf/doc/setsubject.htm b/sources/doc/fpdf/doc/setsubject.htm deleted file mode 100755 index e8c628c..0000000 --- a/sources/doc/fpdf/doc/setsubject.htm +++ /dev/null @@ -1,33 +0,0 @@ - - - - -SetSubject - - - -

SetSubject

-SetSubject(string subject [, boolean isUTF8]) -

Description

-Defines the subject of the document. -

Parameters

-
-
subject
-
-The subject. -
-
isUTF8
-
-Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
-Default value: false. -
-
-

See also

-SetAuthor(), -SetCreator(), -SetKeywords(), -SetTitle(). -
- - - diff --git a/sources/doc/fpdf/doc/settextcolor.htm b/sources/doc/fpdf/doc/settextcolor.htm deleted file mode 100755 index cb12fec..0000000 --- a/sources/doc/fpdf/doc/settextcolor.htm +++ /dev/null @@ -1,40 +0,0 @@ - - - - -SetTextColor - - - -

SetTextColor

-SetTextColor(int r [, int g, int b]) -

Description

-Defines the color used for text. It can be expressed in RGB components or gray scale. The -method can be called before the first page is created and the value is retained from page to -page. -

Parameters

-
-
r
-
-If g et b are given, red component; if not, indicates the gray level. -Value between 0 and 255. -
-
g
-
-Green component (between 0 and 255). -
-
b
-
-Blue component (between 0 and 255). -
-
-

See also

-SetDrawColor(), -SetFillColor(), -Text(), -Cell(), -MultiCell(). -
- - - diff --git a/sources/doc/fpdf/doc/settitle.htm b/sources/doc/fpdf/doc/settitle.htm deleted file mode 100755 index 3bc0fe8..0000000 --- a/sources/doc/fpdf/doc/settitle.htm +++ /dev/null @@ -1,33 +0,0 @@ - - - - -SetTitle - - - -

SetTitle

-SetTitle(string title [, boolean isUTF8]) -

Description

-Defines the title of the document. -

Parameters

-
-
title
-
-The title. -
-
isUTF8
-
-Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
-Default value: false. -
-
-

See also

-SetAuthor(), -SetCreator(), -SetKeywords(), -SetSubject(). -
- - - diff --git a/sources/doc/fpdf/doc/settopmargin.htm b/sources/doc/fpdf/doc/settopmargin.htm deleted file mode 100755 index 65a4b7d..0000000 --- a/sources/doc/fpdf/doc/settopmargin.htm +++ /dev/null @@ -1,28 +0,0 @@ - - - - -SetTopMargin - - - -

SetTopMargin

-SetTopMargin(float margin) -

Description

-Defines the top margin. The method can be called before creating the first page. -

Parameters

-
-
margin
-
-The margin. -
-
-

See also

-SetLeftMargin(), -SetRightMargin(), -SetAutoPageBreak(), -SetMargins(). -
- - - diff --git a/sources/doc/fpdf/doc/setx.htm b/sources/doc/fpdf/doc/setx.htm deleted file mode 100755 index 7c92465..0000000 --- a/sources/doc/fpdf/doc/setx.htm +++ /dev/null @@ -1,29 +0,0 @@ - - - - -SetX - - - -

SetX

-SetX(float x) -

Description

-Defines the abscissa of the current position. If the passed value is negative, it is relative -to the right of the page. -

Parameters

-
-
x
-
-The value of the abscissa. -
-
-

See also

-GetX(), -GetY(), -SetY(), -SetXY(). -
- - - diff --git a/sources/doc/fpdf/doc/setxy.htm b/sources/doc/fpdf/doc/setxy.htm deleted file mode 100755 index c0602e5..0000000 --- a/sources/doc/fpdf/doc/setxy.htm +++ /dev/null @@ -1,31 +0,0 @@ - - - - -SetXY - - - -

SetXY

-SetXY(float x, float y) -

Description

-Defines the abscissa and ordinate of the current position. If the passed values are negative, -they are relative respectively to the right and bottom of the page. -

Parameters

-
-
x
-
-The value of the abscissa. -
-
y
-
-The value of the ordinate. -
-
-

See also

-SetX(), -SetY(). -
- - - diff --git a/sources/doc/fpdf/doc/sety.htm b/sources/doc/fpdf/doc/sety.htm deleted file mode 100755 index e9afe11..0000000 --- a/sources/doc/fpdf/doc/sety.htm +++ /dev/null @@ -1,29 +0,0 @@ - - - - -SetY - - - -

SetY

-SetY(float y) -

Description

-Moves the current abscissa back to the left margin and sets the ordinate. If the passed value -is negative, it is relative to the bottom of the page. -

Parameters

-
-
y
-
-The value of the ordinate. -
-
-

See also

-GetX(), -GetY(), -SetX(), -SetXY(). -
- - - diff --git a/sources/doc/fpdf/doc/text.htm b/sources/doc/fpdf/doc/text.htm deleted file mode 100755 index ccd86eb..0000000 --- a/sources/doc/fpdf/doc/text.htm +++ /dev/null @@ -1,39 +0,0 @@ - - - - -Text - - - -

Text

-Text(float x, float y, string txt) -

Description

-Prints a character string. The origin is on the left of the first character, on the baseline. -This method allows to place a string precisely on the page, but it is usually easier to use -Cell(), MultiCell() or Write() which are the standard methods to print text. -

Parameters

-
-
x
-
-Abscissa of the origin. -
-
y
-
-Ordinate of the origin. -
-
txt
-
-String to print. -
-
-

See also

-SetFont(), -SetTextColor(), -Cell(), -MultiCell(), -Write(). -
- - - diff --git a/sources/doc/fpdf/doc/write.htm b/sources/doc/fpdf/doc/write.htm deleted file mode 100755 index dd14799..0000000 --- a/sources/doc/fpdf/doc/write.htm +++ /dev/null @@ -1,51 +0,0 @@ - - - - -Write - - - -

Write

-Write(float h, string txt [, mixed link]) -

Description

-This method prints text from the current position. When the right margin is reached (or the \n -character is met) a line break occurs and text continues from the left margin. Upon method exit, -the current position is left just at the end of the text. -
-It is possible to put a link on the text. -

Parameters

-
-
h
-
-Line height. -
-
txt
-
-String to print. -
-
link
-
-URL or identifier returned by AddLink(). -
-
-

Example

-
-
//Begin with regular font
-$pdf->SetFont('Arial','',14);
-$pdf->Write(5,'Visit ');
-//Then put a blue underlined link
-$pdf->SetTextColor(0,0,255);
-$pdf->SetFont('','U');
-$pdf->Write(5,'www.fpdf.org','http://www.fpdf.org');
-
-

See also

-SetFont(), -SetTextColor(), -AddLink(), -MultiCell(), -SetAutoPageBreak(). -
- - - diff --git a/sources/doc/fpdf/fpdf.css b/sources/doc/fpdf/fpdf.css deleted file mode 100755 index dd2c540..0000000 --- a/sources/doc/fpdf/fpdf.css +++ /dev/null @@ -1,21 +0,0 @@ -body {font-family:"Times New Roman",serif} -h1 {font:bold 135% Arial,sans-serif; color:#4000A0; margin-bottom:0.9em} -h2 {font:bold 95% Arial,sans-serif; color:#900000; margin-top:1.5em; margin-bottom:1em} -dl.param dt {text-decoration:underline} -dl.param dd {margin-top:1em; margin-bottom:1em} -dl.param ul {margin-top:1em; margin-bottom:1em} -tt, code, kbd {font-family:"Courier New",Courier,monospace; font-size:82%} -div.source {margin-top:1.4em; margin-bottom:1.3em} -div.source pre {display:table; border:1px solid #24246A; width:100%; margin:0em; font-family:inherit; font-size:100%} -div.source code {display:block; border:1px solid #C5C5EC; background-color:#F0F5FF; padding:6px; color:#000000} -div.doc-source {margin-top:1.4em; margin-bottom:1.3em} -div.doc-source pre {display:table; width:100%; margin:0em; font-family:inherit; font-size:100%} -div.doc-source code {display:block; background-color:#E0E0E0; padding:4px} -.kw {color:#000080; font-weight:bold} -.str {color:#CC0000} -.cmt {color:#008000} -p.demo {text-align:center; margin-top:-0.9em} -a.demo {text-decoration:none; font-weight:bold; color:#0000CC} -a.demo:link {text-decoration:none; font-weight:bold; color:#0000CC} -a.demo:hover {text-decoration:none; font-weight:bold; color:#0000FF} -a.demo:active {text-decoration:none; font-weight:bold; color:#0000FF} diff --git a/sources/doc/fpdf/histo.htm b/sources/doc/fpdf/histo.htm deleted file mode 100755 index 7097fd8..0000000 --- a/sources/doc/fpdf/histo.htm +++ /dev/null @@ -1,128 +0,0 @@ - - - - -History - - - - -

History

-
-
v1.6 (2008-08-03)
-
-- GIF image support.
-- Images can now trigger page breaks.
-- Possibility to have different page formats in a single document.
-- Document properties (author, creator, keywords, subject and title) can now be specified in UTF-8.
-- Fixed a bug: when a PNG was inserted through a URL, an error sometimes occurred.
-- An automatic page break in Header() doesn't cause an infinite loop any more.
-- Removed some warning messages appearing with recent PHP versions.
-- Added HTTP headers to reduce problems with IE.
-
-
v1.53 (2004-12-31)
-
-- When the font subdirectory is in the same directory as fpdf.php, it is no longer necessary to define the FPDF_FONTPATH constant.
-- The array $HTTP_SERVER_VARS is no longer used. It could cause trouble on PHP5-based configurations with the register_long_arrays option disabled.
-- Fixed a problem related to Type1 font embedding which caused trouble to some PDF processors.
-- The file name sent to the browser could not contain a space character.
-- The Cell() method could not print the number 0 (you had to pass the string '0').
-
-
v1.52 (2003-12-30)
-
-- Image() now displays the image at 72 dpi if no dimension is given.
-- Output() takes a string as second parameter to indicate destination.
-- Open() is now called automatically by AddPage().
-- Inserting remote JPEG images doesn't generate an error any longer.
-- Decimal separator is forced to dot in the constructor.
-- Added several encodings (Turkish, Thai, Hebrew, Ukrainian and Vietnamese).
-- The last line of a right-aligned MultiCell() was not correctly aligned if it was terminated by a carriage return.
-- No more error message about already sent headers when outputting the PDF to the standard output from the command line.
-- The underlining was going too far for text containing characters \, ( or ).
-- $HTTP_ENV_VARS has been replaced by $HTTP_SERVER_VARS.
-
-
v1.51 (2002-08-03)
-
-- Type1 font support.
-- Added Baltic encoding.
-- The class now works internally in points with the origin at the bottom in order to avoid two bugs occurring with Acrobat 5 :
  * The line thickness was too large when printed under Windows 98 SE and ME.
  * TrueType fonts didn't appear immediately inside the plug-in (a substitution font was used), one had to cause a window refresh to make them show up.
-- It is no longer necessary to set the decimal separator as dot to produce valid documents.
-- The clickable area in a cell was always on the left independently from the text alignment.
-- JPEG images in CMYK mode appeared in inverted colors.
-- Transparent PNG images in grayscale or true color mode were incorrectly handled.
-- Adding new fonts now works correctly even with the magic_quotes_runtime option set to on.
-
-
v1.5 (2002-05-28)
-
-- TrueType font (AddFont()) and encoding support (Western and Eastern Europe, Cyrillic and Greek).
-- Added Write() method.
-- Added underlined style.
-- Internal and external link support (AddLink(), SetLink(), Link()).
-- Added right margin management and methods SetRightMargin(), SetTopMargin().
-- Modification of SetDisplayMode() to select page layout.
-- The border parameter of MultiCell() now lets choose borders to draw as Cell().
-- When a document contains no page, Close() now calls AddPage() instead of causing a fatal error.
-
-
v1.41 (2002-03-13)
-
-- Fixed SetDisplayMode() which no longer worked (the PDF viewer used its default display).
-
-
v1.4 (2002-03-02)
-
-- PHP3 is no longer supported.
-- Page compression (SetCompression()).
-- Choice of page format and possibility to change orientation inside document.
-- Added AcceptPageBreak() method.
-- Ability to print the total number of pages (AliasNbPages()).
-- Choice of cell borders to draw.
-- New mode for Cell(): the current position can now move under the cell.
-- Ability to include an image by specifying height only (width is calculated automatically).
-- Fixed a bug: when a justified line triggered a page break, the footer inherited the corresponding word spacing.
-
-
v1.31 (2002-01-12)
-
-- Fixed a bug in drawing frame with MultiCell(): the last line always started from the left margin.
-- Removed Expires HTTP header (gives trouble in some situations).
-- Added Content-disposition HTTP header (seems to help in some situations).
-
-
v1.3 (2001-12-03)
-
-- Line break and text justification support (MultiCell()).
-- Color support (SetDrawColor(), SetFillColor(), SetTextColor()). Possibility to draw filled rectangles and paint cell background.
-- A cell whose width is declared null extends up to the right margin of the page.
-- Line width is now retained from page to page and defaults to 0.2 mm.
-- Added SetXY() method.
-- Fixed a passing by reference done in a deprecated manner for PHP4.
-
-
v1.2 (2001-11-11)
-
-- Added font metric files and GetStringWidth() method.
-- Centering and right-aligning text in cells.
-- Display mode control (SetDisplayMode()).
-- Added methods to set document properties (SetAuthor(), SetCreator(), SetKeywords(), SetSubject(), SetTitle()).
-- Possibility to force PDF download by browser.
-- Added SetX() and GetX() methods.
-- During automatic page break, current abscissa is now retained.
-
-
v1.11 (2001-10-20)
-
-- PNG support doesn't require PHP4/zlib any more. Data are now put directly into PDF without any decompression/recompression stage.
-- Image insertion now works correctly even with magic_quotes_runtime option set to on.
-
-
v1.1 (2001-10-07)
-
-- JPEG and PNG image support.
-
-
v1.01 (2001-10-03)
-
-- Fixed a bug involving page break: in case when Header() doesn't specify a font, the one from previous page was not restored and produced an incorrect document.
-
-
v1.0 (2001-09-17)
-
-- First version.
-
-
- - diff --git a/sources/doc/fpdf/install.txt b/sources/doc/fpdf/install.txt deleted file mode 100755 index 8ee326b..0000000 --- a/sources/doc/fpdf/install.txt +++ /dev/null @@ -1,26 +0,0 @@ -The FPDF library is made up of the following elements: - -- the main file, fpdf.php, which contains the class -- the font metric files (located in the font directory of this archive) - -The metric files are necessary as soon as you want to output some text in a document. -They can be accessed from three different locations: - -- the directory defined by the FPDF_FONTPATH constant (if this constant is defined) -- the font directory located in the directory containing fpdf.php (as it is the case in this archive) -- the directories accessible through include() - -Here is an example defining FPDF_FONTPATH (note the mandatory final slash): - -define('FPDF_FONTPATH','/home/www/font/'); -require('fpdf.php'); - -If the files are not accessible, the SetFont() method will produce the following error: - -FPDF error: Could not include font metric file - - -Remarks: - -- Only the files corresponding to the fonts actually used are necessary -- The tutorials provided in this package are ready to be executed diff --git a/sources/doc/fpdf/license.txt b/sources/doc/fpdf/license.txt deleted file mode 100755 index fd811c6..0000000 --- a/sources/doc/fpdf/license.txt +++ /dev/null @@ -1,6 +0,0 @@ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software to use, copy, modify, distribute, sublicense, and/or sell -copies of the software, and to permit persons to whom the software is furnished -to do so. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. \ No newline at end of file diff --git a/sources/doc/fpdf/sfpdf.html b/sources/doc/fpdf/sfpdf.html deleted file mode 100644 index 5727708..0000000 --- a/sources/doc/fpdf/sfpdf.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - -sFPDF - - - -

sFPDF

-

Informations

-Author: Ian Back
-License: LGPL -

Description

-This class is a modified version of FPDF that adds UTF-8 support. Moreover, it embeds only -the necessary parts of the fonts that are used in the document, making the file size much -smaller than if the whole fonts were embedded. These features were originally developed -for the mPDF project.
-
-Before you can use UTF-8, you have to install at least one Unicode font in the font/unifont directory. -Some free font packages are available for download (extract them into font/unifont): - -

Fonts from the DejaVu family:

- - -

Fonts from the GNU FreeFont family:

- - -You can also make your own fonts by pointing your browser to font/unifont/makefonts/makefonts.php -and following instructions (if you're on Windows).
-
-Then, to use a Unicode font in your script, pass true as the fourth parameter of AddFont().
-
-Note: this class requires the mbstring extension. - - diff --git a/sources/doc/fpdf/tutorial/20k_c1.txt b/sources/doc/fpdf/tutorial/20k_c1.txt deleted file mode 100755 index 0b09f26..0000000 --- a/sources/doc/fpdf/tutorial/20k_c1.txt +++ /dev/null @@ -1,10 +0,0 @@ -The year 1866 was marked by a bizarre development, an unexplained and downright inexplicable phenomenon that surely no one has forgotten. Without getting into those rumors that upset civilians in the seaports and deranged the public mind even far inland, it must be said that professional seamen were especially alarmed. Traders, shipowners, captains of vessels, skippers, and master mariners from Europe and America, naval officers from every country, and at their heels the various national governments on these two continents, were all extremely disturbed by the business. -In essence, over a period of time several ships had encountered "an enormous thing" at sea, a long spindle-shaped object, sometimes giving off a phosphorescent glow, infinitely bigger and faster than any whale. -The relevant data on this apparition, as recorded in various logbooks, agreed pretty closely as to the structure of the object or creature in question, its unprecedented speed of movement, its startling locomotive power, and the unique vitality with which it seemed to be gifted. If it was a cetacean, it exceeded in bulk any whale previously classified by science. No naturalist, neither Cuvier nor Lacpde, neither Professor Dumeril nor Professor de Quatrefages, would have accepted the existence of such a monster sight unseen -- specifically, unseen by their own scientific eyes. -Striking an average of observations taken at different times -- rejecting those timid estimates that gave the object a length of 200 feet, and ignoring those exaggerated views that saw it as a mile wide and three long--you could still assert that this phenomenal creature greatly exceeded the dimensions of anything then known to ichthyologists, if it existed at all. -Now then, it did exist, this was an undeniable fact; and since the human mind dotes on objects of wonder, you can understand the worldwide excitement caused by this unearthly apparition. As for relegating it to the realm of fiction, that charge had to be dropped. -In essence, on July 20, 1866, the steamer Governor Higginson, from the Calcutta & Burnach Steam Navigation Co., encountered this moving mass five miles off the eastern shores of Australia. Captain Baker at first thought he was in the presence of an unknown reef; he was even about to fix its exact position when two waterspouts shot out of this inexplicable object and sprang hissing into the air some 150 feet. So, unless this reef was subject to the intermittent eruptions of a geyser, the Governor Higginson had fair and honest dealings with some aquatic mammal, until then unknown, that could spurt from its blowholes waterspouts mixed with air and steam. -Similar events were likewise observed in Pacific seas, on July 23 of the same year, by the Christopher Columbus from the West India & Pacific Steam Navigation Co. Consequently, this extraordinary cetacean could transfer itself from one locality to another with startling swiftness, since within an interval of just three days, the Governor Higginson and the Christopher Columbus had observed it at two positions on the charts separated by a distance of more than 700 nautical leagues. -Fifteen days later and 2,000 leagues farther, the Helvetia from the Compagnie Nationale and the Shannon from the Royal Mail line, running on opposite tacks in that part of the Atlantic lying between the United States and Europe, respectively signaled each other that the monster had been sighted in latitude 42 degrees 15' north and longitude 60 degrees 35' west of the meridian of Greenwich. From their simultaneous observations, they were able to estimate the mammal's minimum length at more than 350 English feet; this was because both the Shannon and the Helvetia were of smaller dimensions, although each measured 100 meters stem to stern. Now then, the biggest whales, those rorqual whales that frequent the waterways of the Aleutian Islands, have never exceeded a length of 56 meters--if they reach even that. -One after another, reports arrived that would profoundly affect public opinion: new observations taken by the transatlantic liner Pereire, the Inman line's Etna running afoul of the monster, an official report drawn up by officers on the French frigate Normandy, dead-earnest reckonings obtained by the general staff of Commodore Fitz-James aboard the Lord Clyde. In lighthearted countries, people joked about this phenomenon, but such serious, practical countries as England, America, and Germany were deeply concerned. -In every big city the monster was the latest rage; they sang about it in the coffee houses, they ridiculed it in the newspapers, they dramatized it in the theaters. The tabloids found it a fine opportunity for hatching all sorts of hoaxes. In those newspapers short of copy, you saw the reappearance of every gigantic imaginary creature, from "Moby Dick," that dreadful white whale from the High Arctic regions, to the stupendous kraken whose tentacles could entwine a 500-ton craft and drag it into the ocean depths. They even reprinted reports from ancient times: the views of Aristotle and Pliny accepting the existence of such monsters, then the Norwegian stories of Bishop Pontoppidan, the narratives of Paul Egede, and finally the reports of Captain Harrington -- whose good faith is above suspicion--in which he claims he saw, while aboard the Castilian in 1857, one of those enormous serpents that, until then, had frequented only the seas of France's old extremist newspaper, The Constitutionalist. diff --git a/sources/doc/fpdf/tutorial/20k_c2.txt b/sources/doc/fpdf/tutorial/20k_c2.txt deleted file mode 100755 index 096dbd1..0000000 --- a/sources/doc/fpdf/tutorial/20k_c2.txt +++ /dev/null @@ -1,23 +0,0 @@ -During the period in which these developments were occurring, I had returned from a scientific undertaking organized to explore the Nebraska badlands in the United States. In my capacity as Assistant Professor at the Paris Museum of Natural History, I had been attached to this expedition by the French government. After spending six months in Nebraska, I arrived in New York laden with valuable collections near the end of March. My departure for France was set for early May. In the meantime, then, I was busy classifying my mineralogical, botanical, and zoological treasures when that incident took place with the Scotia. -I was perfectly abreast of this question, which was the big news of the day, and how could I not have been? I had read and reread every American and European newspaper without being any farther along. This mystery puzzled me. Finding it impossible to form any views, I drifted from one extreme to the other. Something was out there, that much was certain, and any doubting Thomas was invited to place his finger on the Scotia's wound. -When I arrived in New York, the question was at the boiling point. The hypothesis of a drifting islet or an elusive reef, put forward by people not quite in their right minds, was completely eliminated. And indeed, unless this reef had an engine in its belly, how could it move about with such prodigious speed? -Also discredited was the idea of a floating hull or some other enormous wreckage, and again because of this speed of movement. -So only two possible solutions to the question were left, creating two very distinct groups of supporters: on one side, those favoring a monster of colossal strength; on the other, those favoring an "underwater boat" of tremendous motor power. -Now then, although the latter hypothesis was completely admissible, it couldn't stand up to inquiries conducted in both the New World and the Old. That a private individual had such a mechanism at his disposal was less than probable. Where and when had he built it, and how could he have built it in secret? -Only some government could own such an engine of destruction, and in these disaster-filled times, when men tax their ingenuity to build increasingly powerful aggressive weapons, it was possible that, unknown to the rest of the world, some nation could have been testing such a fearsome machine. The Chassepot rifle led to the torpedo, and the torpedo has led to this underwater battering ram, which in turn will lead to the world putting its foot down. At least I hope it will. -But this hypothesis of a war machine collapsed in the face of formal denials from the various governments. Since the public interest was at stake and transoceanic travel was suffering, the sincerity of these governments could not be doubted. Besides, how could the assembly of this underwater boat have escaped public notice? Keeping a secret under such circumstances would be difficult enough for an individual, and certainly impossible for a nation whose every move is under constant surveillance by rival powers. -So, after inquiries conducted in England, France, Russia, Prussia, Spain, Italy, America, and even Turkey, the hypothesis of an underwater Monitor was ultimately rejected. -After I arrived in New York, several people did me the honor of consulting me on the phenomenon in question. In France I had published a two-volume work, in quarto, entitled The Mysteries of the Great Ocean Depths. Well received in scholarly circles, this book had established me as a specialist in this pretty obscure field of natural history. My views were in demand. As long as I could deny the reality of the business, I confined myself to a flat "no comment." But soon, pinned to the wall, I had to explain myself straight out. And in this vein, "the honorable Pierre Aronnax, Professor at the Paris Museum," was summoned by The New York Herald to formulate his views no matter what. -I complied. Since I could no longer hold my tongue, I let it wag. I discussed the question in its every aspect, both political and scientific, and this is an excerpt from the well-padded article I published in the issue of April 30. - -"Therefore," I wrote, "after examining these different hypotheses one by one, we are forced, every other supposition having been refuted, to accept the existence of an extremely powerful marine animal. -"The deepest parts of the ocean are totally unknown to us. No soundings have been able to reach them. What goes on in those distant depths? What creatures inhabit, or could inhabit, those regions twelve or fifteen miles beneath the surface of the water? What is the constitution of these animals? It's almost beyond conjecture. -"However, the solution to this problem submitted to me can take the form of a choice between two alternatives. -"Either we know every variety of creature populating our planet, or we do not. -"If we do not know every one of them, if nature still keeps ichthyological secrets from us, nothing is more admissible than to accept the existence of fish or cetaceans of new species or even new genera, animals with a basically 'cast-iron' constitution that inhabit strata beyond the reach of our soundings, and which some development or other, an urge or a whim if you prefer, can bring to the upper level of the ocean for long intervals. -"If, on the other hand, we do know every living species, we must look for the animal in question among those marine creatures already cataloged, and in this event I would be inclined to accept the existence of a giant narwhale. -"The common narwhale, or sea unicorn, often reaches a length of sixty feet. Increase its dimensions fivefold or even tenfold, then give this cetacean a strength in proportion to its size while enlarging its offensive weapons, and you have the animal we're looking for. It would have the proportions determined by the officers of the Shannon, the instrument needed to perforate the Scotia, and the power to pierce a steamer's hull. -"In essence, the narwhale is armed with a sort of ivory sword, or lance, as certain naturalists have expressed it. It's a king-sized tooth as hard as steel. Some of these teeth have been found buried in the bodies of baleen whales, which the narwhale attacks with invariable success. Others have been wrenched, not without difficulty, from the undersides of vessels that narwhales have pierced clean through, as a gimlet pierces a wine barrel. The museum at the Faculty of Medicine in Paris owns one of these tusks with a length of 2.25 meters and a width at its base of forty-eight centimeters! -"All right then! Imagine this weapon to be ten times stronger and the animal ten times more powerful, launch it at a speed of twenty miles per hour, multiply its mass times its velocity, and you get just the collision we need to cause the specified catastrophe. -"So, until information becomes more abundant, I plump for a sea unicorn of colossal dimensions, no longer armed with a mere lance but with an actual spur, like ironclad frigates or those warships called 'rams,' whose mass and motor power it would possess simultaneously. -"This inexplicable phenomenon is thus explained away--unless it's something else entirely, which, despite everything that has been sighted, studied, explored and experienced, is still possible!" diff --git a/sources/doc/fpdf/tutorial/calligra.afm b/sources/doc/fpdf/tutorial/calligra.afm deleted file mode 100755 index 806685e..0000000 --- a/sources/doc/fpdf/tutorial/calligra.afm +++ /dev/null @@ -1,275 +0,0 @@ -StartFontMetrics 4.1 -FontName Calligrapher-Regular -FullName Calligrapher Regular -Notice Generated by Fontographer 3.5 -EncodingScheme FontSpecific -FamilyName Calligrapher -Weight Regular -Version (Altsys Fontographer 3.5 5/26/92) -Characters 215 -ItalicAngle 0.0 -Ascender 899 -Descender -234 -UnderlineThickness 20 -UnderlinePosition -200 -IsFixedPitch false -FontBBox -50 -234 1328 899 -StartCharMetrics 256 -C 0 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 1 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 2 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 3 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 4 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 5 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 6 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 7 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 8 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 9 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 10 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 11 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 12 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 13 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 14 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 15 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 16 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 17 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 18 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 19 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 20 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 21 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 22 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 23 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 24 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 25 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 26 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 27 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 28 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 29 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 30 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 31 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 32 ; WX 282 ; N space ; B 67 -16 251 718 ; -C 33 ; WX 324 ; N exclam ; B 67 -16 251 718 ; -C 34 ; WX 405 ; N quotedbl ; B 60 460 353 718 ; -C 35 ; WX 584 ; N numbersign ; B 35 0 549 701 ; -C 36 ; WX 632 ; N dollar ; B 32 -126 595 814 ; -C 37 ; WX 980 ; N percent ; B 35 -16 945 703 ; -C 38 ; WX 776 ; N ampersand ; B 41 -17 811 670 ; -C 39 ; WX 259 ; N quotesingle ; B 72 460 206 718 ; -C 40 ; WX 299 ; N parenleft ; B 57 -119 299 785 ; -C 41 ; WX 299 ; N parenright ; B 0 -119 242 785 ; -C 42 ; WX 377 ; N asterisk ; B 35 407 342 714 ; -C 43 ; WX 600 ; N plus ; B 47 0 553 506 ; -C 44 ; WX 259 ; N comma ; B 35 -67 224 162 ; -C 45 ; WX 432 ; N hyphen ; B 28 249 404 377 ; -C 46 ; WX 254 ; N period ; B 43 -16 227 162 ; -C 47 ; WX 597 ; N slash ; B 7 -14 591 714 ; -C 48 ; WX 529 ; N zero ; B 21 -18 508 583 ; -C 49 ; WX 298 ; N one ; B 8 -15 233 582 ; -C 50 ; WX 451 ; N two ; B 17 -8 430 588 ; -C 51 ; WX 359 ; N three ; B 11 -54 337 582 ; -C 52 ; WX 525 ; N four ; B 18 -20 519 602 ; -C 53 ; WX 423 ; N five ; B 10 -55 420 582 ; -C 54 ; WX 464 ; N six ; B 23 -14 447 589 ; -C 55 ; WX 417 ; N seven ; B 8 -18 415 589 ; -C 56 ; WX 457 ; N eight ; B 19 -16 432 583 ; -C 57 ; WX 479 ; N nine ; B 26 -16 450 588 ; -C 58 ; WX 275 ; N colon ; B 59 -16 242 491 ; -C 59 ; WX 282 ; N semicolon ; B 54 -67 245 491 ; -C 60 ; WX 600 ; N less ; B 47 -8 553 514 ; -C 61 ; WX 600 ; N equal ; B 47 98 553 408 ; -C 62 ; WX 600 ; N greater ; B 47 -8 553 514 ; -C 63 ; WX 501 ; N question ; B 21 -16 473 721 ; -C 64 ; WX 800 ; N at ; B 29 -12 771 730 ; -C 65 ; WX 743 ; N A ; B -23 -14 754 723 ; -C 66 ; WX 636 ; N B ; B -42 -7 608 706 ; -C 67 ; WX 598 ; N C ; B 27 -12 572 712 ; -C 68 ; WX 712 ; N D ; B -42 -11 684 705 ; -C 69 ; WX 608 ; N E ; B -21 0 608 708 ; -C 70 ; WX 562 ; N F ; B -21 -18 584 716 ; -C 71 ; WX 680 ; N G ; B 29 -8 668 714 ; -C 72 ; WX 756 ; N H ; B 70 -17 777 728 ; -C 73 ; WX 308 ; N I ; B 14 -15 238 718 ; -C 74 ; WX 314 ; N J ; B 7 -223 244 727 ; -C 75 ; WX 676 ; N K ; B 14 -16 683 725 ; -C 76 ; WX 552 ; N L ; B 14 -8 580 713 ; -C 77 ; WX 1041 ; N M ; B 42 -17 1017 739 ; -C 78 ; WX 817 ; N N ; B -42 -17 747 736 ; -C 79 ; WX 729 ; N O ; B 32 -16 698 709 ; -C 80 ; WX 569 ; N P ; B -35 -15 570 716 ; -C 81 ; WX 698 ; N Q ; B 27 -201 1328 715 ; -C 82 ; WX 674 ; N R ; B -35 -20 696 712 ; -C 83 ; WX 618 ; N S ; B 31 -16 589 709 ; -C 84 ; WX 673 ; N T ; B -21 -20 702 714 ; -C 85 ; WX 805 ; N U ; B 0 -19 804 722 ; -C 86 ; WX 753 ; N V ; B -28 -20 788 729 ; -C 87 ; WX 1238 ; N W ; B -28 -17 1273 736 ; -C 88 ; WX 716 ; N X ; B 7 -38 709 731 ; -C 89 ; WX 754 ; N Y ; B -35 -17 789 747 ; -C 90 ; WX 599 ; N Z ; B 30 -5 584 748 ; -C 91 ; WX 315 ; N bracketleft ; B 93 -124 322 718 ; -C 92 ; WX 463 ; N backslash ; B -21 -18 484 736 ; -C 93 ; WX 315 ; N bracketright ; B -7 -124 222 718 ; -C 94 ; WX 600 ; N asciicircum ; B 63 266 537 658 ; -C 95 ; WX 547 ; N underscore ; B -7 -198 554 -163 ; -C 96 ; WX 278 ; N grave ; B -1 541 214 693 ; -C 97 ; WX 581 ; N a ; B 21 -16 581 494 ; -C 98 ; WX 564 ; N b ; B -24 -17 543 793 ; -C 99 ; WX 440 ; N c ; B 21 -17 422 490 ; -C 100 ; WX 571 ; N d ; B 0 -15 550 659 ; -C 101 ; WX 450 ; N e ; B 28 -23 428 493 ; -C 102 ; WX 347 ; N f ; B -35 -14 474 785 ; -C 103 ; WX 628 ; N g ; B 19 -219 612 496 ; -C 104 ; WX 611 ; N h ; B -29 -18 569 785 ; -C 105 ; WX 283 ; N i ; B -14 -15 241 679 ; -C 106 ; WX 283 ; N j ; B -14 -234 241 679 ; -C 107 ; WX 560 ; N k ; B -24 -15 582 789 ; -C 108 ; WX 252 ; N l ; B -28 -15 210 789 ; -C 109 ; WX 976 ; N m ; B -21 -16 927 494 ; -C 110 ; WX 595 ; N n ; B -28 -15 574 493 ; -C 111 ; WX 508 ; N o ; B 27 -17 485 490 ; -C 112 ; WX 549 ; N p ; B -28 -216 526 496 ; -C 113 ; WX 540 ; N q ; B 28 -219 491 493 ; -C 114 ; WX 395 ; N r ; B -21 -19 430 492 ; -C 115 ; WX 441 ; N s ; B 34 -15 413 493 ; -C 116 ; WX 307 ; N t ; B -21 -16 378 621 ; -C 117 ; WX 614 ; N u ; B -14 -18 558 501 ; -C 118 ; WX 556 ; N v ; B -28 -20 569 483 ; -C 119 ; WX 915 ; N w ; B -28 -17 928 495 ; -C 120 ; WX 559 ; N x ; B 14 -17 546 500 ; -C 121 ; WX 597 ; N y ; B -21 -227 541 500 ; -C 122 ; WX 452 ; N z ; B 28 -5 442 515 ; -C 123 ; WX 315 ; N braceleft ; B 6 -118 309 718 ; -C 124 ; WX 222 ; N bar ; B 63 -18 159 730 ; -C 125 ; WX 315 ; N braceright ; B 6 -118 309 718 ; -C 126 ; WX 600 ; N asciitilde ; B 69 166 531 340 ; -C 127 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 128 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 129 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 130 ; WX 0 ; N quotesinglbase ; B -23 -14 754 877 ; -C 131 ; WX 0 ; N florin ; B 0 -19 804 854 ; -C 132 ; WX 0 ; N quotedblbase ; B -23 -14 754 877 ; -C 133 ; WX 780 ; N ellipsis ; B 43 -16 747 162 ; -C 134 ; WX 0 ; N dagger ; B 27 -122 437 592 ; -C 135 ; WX 0 ; N daggerdbl ; B 43 278 227 456 ; -C 136 ; WX 278 ; N circumflex ; B -14 557 292 677 ; -C 137 ; WX 0 ; N perthousand ; B -23 -14 754 877 ; -C 138 ; WX 0 ; N Scaron ; B 0 0 0 100 ; -C 139 ; WX 0 ; N guilsinglleft ; B 43 278 227 456 ; -C 140 ; WX 1064 ; N OE ; B 32 -16 1055 709 ; -C 141 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 142 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 143 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 144 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 145 ; WX 259 ; N quoteleft ; B 35 489 224 717 ; -C 146 ; WX 259 ; N quoteright ; B 35 489 224 717 ; -C 147 ; WX 470 ; N quotedblleft ; B 35 489 443 717 ; -C 148 ; WX 470 ; N quotedblright ; B 35 487 443 717 ; -C 149 ; WX 500 ; N bullet ; B 70 179 430 539 ; -C 150 ; WX 300 ; N endash ; B 0 245 300 350 ; -C 151 ; WX 600 ; N emdash ; B 0 245 600 350 ; -C 152 ; WX 278 ; N tilde ; B -44 563 326 689 ; -C 153 ; WX 990 ; N trademark ; B 62 306 928 718 ; -C 154 ; WX 0 ; N scaron ; B 0 0 0 100 ; -C 155 ; WX 0 ; N guilsinglright ; B 43 278 227 456 ; -C 156 ; WX 790 ; N oe ; B 27 -23 764 493 ; -C 157 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 158 ; WX 800 ; N .notdef ; B 50 0 750 800 ; -C 159 ; WX 754 ; N Ydieresis ; B -35 -17 789 882 ; -C 160 ; WX 282 ; N nbspace ; B -23 -14 754 893 ; -C 161 ; WX 324 ; N exclamdown ; B 69 -203 253 531 ; -C 162 ; WX 450 ; N cent ; B 27 -122 437 592 ; -C 163 ; WX 640 ; N sterling ; B 0 -9 619 716 ; -C 164 ; WX 518 ; N currency ; B 3 72 515 586 ; -C 165 ; WX 603 ; N yen ; B -28 -65 631 747 ; -C 166 ; WX 0 ; N brokenbar ; B 0 0 0 100 ; -C 167 ; WX 519 ; N section ; B -50 -216 524 762 ; -C 168 ; WX 254 ; N dieresis ; B -20 554 308 682 ; -C 169 ; WX 800 ; N copyright ; B 29 -12 771 730 ; -C 170 ; WX 349 ; N ordfeminine ; B 13 385 349 717 ; -C 171 ; WX 0 ; N guillemotleft ; B 43 -16 747 162 ; -C 172 ; WX 0 ; N logicalnot ; B 30 0 730 700 ; -C 173 ; WX 432 ; N hyphen ; B 28 249 404 377 ; -C 174 ; WX 800 ; N registered ; B 29 -12 771 730 ; -C 175 ; WX 278 ; N macron ; B -47 584 325 665 ; -C 176 ; WX 0 ; N degree ; B 27 -122 437 592 ; -C 177 ; WX 0 ; N plusminus ; B 29 -8 668 877 ; -C 178 ; WX 0 ; N twosuperior ; B 0 0 0 100 ; -C 179 ; WX 0 ; N threesuperior ; B 0 0 0 100 ; -C 180 ; WX 278 ; N acute ; B 49 536 279 693 ; -C 181 ; WX 614 ; N mu ; B -14 -231 558 501 ; -C 182 ; WX 0 ; N paragraph ; B -35 -15 668 785 ; -C 183 ; WX 254 ; N periodcentered ; B 43 278 227 456 ; -C 184 ; WX 278 ; N cedilla ; B -8 -216 231 6 ; -C 185 ; WX 0 ; N onesuperior ; B 0 0 0 100 ; -C 186 ; WX 305 ; N ordmasculine ; B 16 373 291 702 ; -C 187 ; WX 0 ; N guillemotright ; B 43 -16 747 162 ; -C 188 ; WX 0 ; N onequarter ; B 0 0 0 100 ; -C 189 ; WX 0 ; N onehalf ; B 0 0 0 100 ; -C 190 ; WX 0 ; N threequarters ; B 0 0 0 100 ; -C 191 ; WX 501 ; N questiondown ; B 15 -196 467 541 ; -C 192 ; WX 743 ; N Agrave ; B -23 -14 754 893 ; -C 193 ; WX 743 ; N Aacute ; B -23 -14 754 893 ; -C 194 ; WX 743 ; N Acircumflex ; B -23 -14 754 877 ; -C 195 ; WX 743 ; N Atilde ; B -23 -14 754 889 ; -C 196 ; WX 743 ; N Adieresis ; B -23 -14 754 882 ; -C 197 ; WX 743 ; N Aring ; B -23 -14 754 899 ; -C 198 ; WX 1060 ; N AE ; B -29 -14 1053 708 ; -C 199 ; WX 598 ; N Ccedilla ; B 27 -183 572 712 ; -C 200 ; WX 608 ; N Egrave ; B -21 0 608 893 ; -C 201 ; WX 608 ; N Eacute ; B -21 0 608 893 ; -C 202 ; WX 608 ; N Ecircumflex ; B -21 0 608 877 ; -C 203 ; WX 608 ; N Edieresis ; B -21 0 608 882 ; -C 204 ; WX 308 ; N Igrave ; B 14 -15 264 893 ; -C 205 ; WX 308 ; N Iacute ; B 14 -15 274 893 ; -C 206 ; WX 308 ; N Icircumflex ; B 1 -15 307 877 ; -C 207 ; WX 308 ; N Idieresis ; B -15 -15 313 882 ; -C 208 ; WX 0 ; N Eth ; B 0 0 0 100 ; -C 209 ; WX 817 ; N Ntilde ; B -42 -17 747 889 ; -C 210 ; WX 729 ; N Ograve ; B 32 -16 698 893 ; -C 211 ; WX 729 ; N Oacute ; B 32 -16 698 893 ; -C 212 ; WX 729 ; N Ocircumflex ; B 32 -16 698 877 ; -C 213 ; WX 729 ; N Otilde ; B 32 -16 698 889 ; -C 214 ; WX 729 ; N Odieresis ; B 32 -16 698 882 ; -C 215 ; WX 0 ; N multiply ; B 0 0 0 100 ; -C 216 ; WX 729 ; N Oslash ; B 14 -24 724 709 ; -C 217 ; WX 805 ; N Ugrave ; B 0 -19 804 893 ; -C 218 ; WX 805 ; N Uacute ; B 0 -19 804 893 ; -C 219 ; WX 805 ; N Ucircumflex ; B 0 -19 804 877 ; -C 220 ; WX 805 ; N Udieresis ; B 0 -19 804 882 ; -C 221 ; WX 0 ; N _235 ; B 0 0 0 100 ; -C 222 ; WX 0 ; N Thorn ; B 0 0 0 100 ; -C 223 ; WX 688 ; N germandbls ; B -35 -15 668 785 ; -C 224 ; WX 581 ; N agrave ; B 21 -16 581 693 ; -C 225 ; WX 581 ; N aacute ; B 21 -16 581 693 ; -C 226 ; WX 581 ; N acircumflex ; B 21 -16 581 677 ; -C 227 ; WX 581 ; N atilde ; B 21 -16 581 689 ; -C 228 ; WX 581 ; N adieresis ; B 21 -16 581 682 ; -C 229 ; WX 581 ; N aring ; B 21 -16 581 734 ; -C 230 ; WX 792 ; N ae ; B 21 -23 773 494 ; -C 231 ; WX 440 ; N ccedilla ; B 21 -183 422 490 ; -C 232 ; WX 450 ; N egrave ; B 28 -23 428 693 ; -C 233 ; WX 450 ; N eacute ; B 28 -23 428 693 ; -C 234 ; WX 450 ; N ecircumflex ; B 28 -23 432 677 ; -C 235 ; WX 450 ; N edieresis ; B 28 -23 428 682 ; -C 236 ; WX 283 ; N igrave ; B -14 -15 244 693 ; -C 237 ; WX 283 ; N iacute ; B -14 -15 269 693 ; -C 238 ; WX 283 ; N icircumflex ; B -14 -15 297 677 ; -C 239 ; WX 283 ; N idieresis ; B -25 -15 303 682 ; -C 240 ; WX 0 ; N Yacute ; B 0 0 0 100 ; -C 241 ; WX 595 ; N ntilde ; B -28 -15 574 689 ; -C 242 ; WX 508 ; N ograve ; B 27 -17 485 693 ; -C 243 ; WX 508 ; N oacute ; B 27 -17 485 693 ; -C 244 ; WX 508 ; N ocircumflex ; B 27 -17 485 677 ; -C 245 ; WX 508 ; N otilde ; B 27 -17 485 689 ; -C 246 ; WX 508 ; N odieresis ; B 27 -17 485 682 ; -C 247 ; WX 0 ; N divide ; B 35 0 760 727 ; -C 248 ; WX 508 ; N oslash ; B -8 -54 496 589 ; -C 249 ; WX 614 ; N ugrave ; B -14 -18 558 693 ; -C 250 ; WX 614 ; N uacute ; B -14 -18 558 693 ; -C 251 ; WX 614 ; N ucircumflex ; B -14 -18 558 677 ; -C 252 ; WX 614 ; N udieresis ; B -14 -18 558 682 ; -C 253 ; WX 0 ; N yacute ; B 0 0 0 100 ; -C 254 ; WX 0 ; N thorn ; B 0 0 0 100 ; -C 255 ; WX 597 ; N ydieresis ; B -21 -227 541 682 ; -EndCharMetrics -EndFontMetrics diff --git a/sources/doc/fpdf/tutorial/calligra.php b/sources/doc/fpdf/tutorial/calligra.php deleted file mode 100755 index 1af82ac..0000000 --- a/sources/doc/fpdf/tutorial/calligra.php +++ /dev/null @@ -1,24 +0,0 @@ -899,'Descent'=>-234,'CapHeight'=>731,'Flags'=>32,'FontBBox'=>'[-50 -234 1328 899]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>800); -$up=-200; -$ut=20; -$cw=array( - chr(0)=>800,chr(1)=>800,chr(2)=>800,chr(3)=>800,chr(4)=>800,chr(5)=>800,chr(6)=>800,chr(7)=>800,chr(8)=>800,chr(9)=>800,chr(10)=>800,chr(11)=>800,chr(12)=>800,chr(13)=>800,chr(14)=>800,chr(15)=>800,chr(16)=>800,chr(17)=>800,chr(18)=>800,chr(19)=>800,chr(20)=>800,chr(21)=>800, - chr(22)=>800,chr(23)=>800,chr(24)=>800,chr(25)=>800,chr(26)=>800,chr(27)=>800,chr(28)=>800,chr(29)=>800,chr(30)=>800,chr(31)=>800,' '=>282,'!'=>324,'"'=>405,'#'=>584,'$'=>632,'%'=>980,'&'=>776,'\''=>259,'('=>299,')'=>299,'*'=>377,'+'=>600, - ','=>259,'-'=>432,'.'=>254,'/'=>597,'0'=>529,'1'=>298,'2'=>451,'3'=>359,'4'=>525,'5'=>423,'6'=>464,'7'=>417,'8'=>457,'9'=>479,':'=>275,';'=>282,'<'=>600,'='=>600,'>'=>600,'?'=>501,'@'=>800,'A'=>743, - 'B'=>636,'C'=>598,'D'=>712,'E'=>608,'F'=>562,'G'=>680,'H'=>756,'I'=>308,'J'=>314,'K'=>676,'L'=>552,'M'=>1041,'N'=>817,'O'=>729,'P'=>569,'Q'=>698,'R'=>674,'S'=>618,'T'=>673,'U'=>805,'V'=>753,'W'=>1238, - 'X'=>716,'Y'=>754,'Z'=>599,'['=>315,'\\'=>463,']'=>315,'^'=>600,'_'=>547,'`'=>278,'a'=>581,'b'=>564,'c'=>440,'d'=>571,'e'=>450,'f'=>347,'g'=>628,'h'=>611,'i'=>283,'j'=>283,'k'=>560,'l'=>252,'m'=>976, - 'n'=>595,'o'=>508,'p'=>549,'q'=>540,'r'=>395,'s'=>441,'t'=>307,'u'=>614,'v'=>556,'w'=>915,'x'=>559,'y'=>597,'z'=>452,'{'=>315,'|'=>222,'}'=>315,'~'=>600,chr(127)=>800,chr(128)=>800,chr(129)=>800,chr(130)=>0,chr(131)=>0, - chr(132)=>0,chr(133)=>780,chr(134)=>0,chr(135)=>0,chr(136)=>278,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>1064,chr(141)=>800,chr(142)=>800,chr(143)=>800,chr(144)=>800,chr(145)=>259,chr(146)=>259,chr(147)=>470,chr(148)=>470,chr(149)=>500,chr(150)=>300,chr(151)=>600,chr(152)=>278,chr(153)=>990, - chr(154)=>0,chr(155)=>0,chr(156)=>790,chr(157)=>800,chr(158)=>800,chr(159)=>754,chr(160)=>282,chr(161)=>324,chr(162)=>450,chr(163)=>640,chr(164)=>518,chr(165)=>603,chr(166)=>0,chr(167)=>519,chr(168)=>254,chr(169)=>800,chr(170)=>349,chr(171)=>0,chr(172)=>0,chr(173)=>432,chr(174)=>800,chr(175)=>278, - chr(176)=>0,chr(177)=>0,chr(178)=>0,chr(179)=>0,chr(180)=>278,chr(181)=>614,chr(182)=>0,chr(183)=>254,chr(184)=>278,chr(185)=>0,chr(186)=>305,chr(187)=>0,chr(188)=>0,chr(189)=>0,chr(190)=>0,chr(191)=>501,chr(192)=>743,chr(193)=>743,chr(194)=>743,chr(195)=>743,chr(196)=>743,chr(197)=>743, - chr(198)=>1060,chr(199)=>598,chr(200)=>608,chr(201)=>608,chr(202)=>608,chr(203)=>608,chr(204)=>308,chr(205)=>308,chr(206)=>308,chr(207)=>308,chr(208)=>0,chr(209)=>817,chr(210)=>729,chr(211)=>729,chr(212)=>729,chr(213)=>729,chr(214)=>729,chr(215)=>0,chr(216)=>729,chr(217)=>805,chr(218)=>805,chr(219)=>805, - chr(220)=>805,chr(221)=>0,chr(222)=>0,chr(223)=>688,chr(224)=>581,chr(225)=>581,chr(226)=>581,chr(227)=>581,chr(228)=>581,chr(229)=>581,chr(230)=>792,chr(231)=>440,chr(232)=>450,chr(233)=>450,chr(234)=>450,chr(235)=>450,chr(236)=>283,chr(237)=>283,chr(238)=>283,chr(239)=>283,chr(240)=>800,chr(241)=>595, - chr(242)=>508,chr(243)=>508,chr(244)=>508,chr(245)=>508,chr(246)=>508,chr(247)=>0,chr(248)=>508,chr(249)=>614,chr(250)=>614,chr(251)=>614,chr(252)=>614,chr(253)=>0,chr(254)=>0,chr(255)=>597); -$enc='cp1252'; -$diff=''; -$file='calligra.z'; -$originalsize=40120; -?> diff --git a/sources/doc/fpdf/tutorial/calligra.ttf b/sources/doc/fpdf/tutorial/calligra.ttf deleted file mode 100755 index 9713c46..0000000 Binary files a/sources/doc/fpdf/tutorial/calligra.ttf and /dev/null differ diff --git a/sources/doc/fpdf/tutorial/calligra.z b/sources/doc/fpdf/tutorial/calligra.z deleted file mode 100755 index 1c0bebd..0000000 Binary files a/sources/doc/fpdf/tutorial/calligra.z and /dev/null differ diff --git a/sources/doc/fpdf/tutorial/countries.txt b/sources/doc/fpdf/tutorial/countries.txt deleted file mode 100755 index aa8886c..0000000 --- a/sources/doc/fpdf/tutorial/countries.txt +++ /dev/null @@ -1,15 +0,0 @@ -Austria;Vienna;83859;8075 -Belgium;Brussels;30518;10192 -Denmark;Copenhagen;43094;5295 -Finland;Helsinki;304529;5147 -France;Paris;543965;58728 -Germany;Berlin;357022;82057 -Greece;Athens;131625;10511 -Ireland;Dublin;70723;3694 -Italy;Roma;301316;57563 -Luxembourg;Luxembourg;2586;424 -Netherlands;Amsterdam;41526;15654 -Portugal;Lisbon;91906;9957 -Spain;Madrid;504790;39348 -Sweden;Stockholm;410934;8839 -United Kingdom;London;243820;58862 diff --git a/sources/doc/fpdf/tutorial/index.htm b/sources/doc/fpdf/tutorial/index.htm deleted file mode 100755 index 0861878..0000000 --- a/sources/doc/fpdf/tutorial/index.htm +++ /dev/null @@ -1,21 +0,0 @@ - - - - -Tutorials - - - -

Tutorials

-

The different examples rapidly show how to use FPDF. You will find all main features explained.

- - - diff --git a/sources/doc/fpdf/tutorial/logo.png b/sources/doc/fpdf/tutorial/logo.png deleted file mode 100755 index 284a007..0000000 Binary files a/sources/doc/fpdf/tutorial/logo.png and /dev/null differ diff --git a/sources/doc/fpdf/tutorial/logo_pb.png b/sources/doc/fpdf/tutorial/logo_pb.png deleted file mode 100755 index e6827c1..0000000 Binary files a/sources/doc/fpdf/tutorial/logo_pb.png and /dev/null differ diff --git a/sources/doc/fpdf/tutorial/makefont.php b/sources/doc/fpdf/tutorial/makefont.php deleted file mode 100755 index 3773429..0000000 --- a/sources/doc/fpdf/tutorial/makefont.php +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/sources/doc/fpdf/tutorial/tuto1.htm b/sources/doc/fpdf/tutorial/tuto1.htm deleted file mode 100755 index 7f1779f..0000000 --- a/sources/doc/fpdf/tutorial/tuto1.htm +++ /dev/null @@ -1,77 +0,0 @@ - - - - -Minimal example - - - -

Minimal example

-Let's start with the classic example: -
-
<?php
-require('fpdf.php');
-
-$pdf=new FPDF();
-$pdf->AddPage();
-$pdf->SetFont('Arial','B',16);
-$pdf->Cell(40,10,'Hello World!');
-$pdf->Output();
-?>
-
-

[Demo]

-After including the library file, we create an FPDF object. -The FPDF() constructor is used here with the default values: pages are in A4 portrait and -the unit of measure is millimeter. It could have been specified explicitly with: -
-
$pdf=new FPDF('P','mm','A4');
-
-
-It is possible to use landscape (L), other page formats (such as Letter and -Legal) and units of measure (pt, cm, in). -
-
-There is no page for the moment, so we have to add one with AddPage(). The origin -is at the upper-left corner and the current position is by default placed at 1 cm from the -borders; the margins can be changed with SetMargins(). -
-
-Before we can print text, it is mandatory to select a font with SetFont(), otherwise the -document would be invalid. We choose Arial bold 16: -
-
$pdf->SetFont('Arial','B',16);
-
-
-We could have specified italics with I, underlined with U or a regular font with an empty string -(or any combination). Note that the font size is given in points, not millimeters (or another -user unit); it is the only exception. The other standard fonts are Times, Courier, Symbol and -ZapfDingbats. -
-
-We can now print a cell with Cell(). A cell is a rectangular area, possibly framed, -which contains a line of text. It is output at the current position. We specify its dimensions, -its text (centered or aligned), if borders should be drawn, and where the current position -moves after it (to the right, below or to the beginning of the next line). To add a frame, we would do this: -
-
$pdf->Cell(40,10,'Hello World !',1);
-
-
-To add a new cell next to it with centered text and go to the next line, we would do: -
-
$pdf->Cell(60,10,'Powered by FPDF.',0,1,'C');
-
-
-Remark: the line break can also be done with Ln(). This method additionnaly allows to specify -the height of the break. -
-
-Finally, the document is closed and sent to the browser with Output(). We could have saved -it to a file by passing the desired file name. -
-
-Caution: in case when the PDF is sent to the browser, nothing else must be output by the -script, neither before nor after (no HTML, not even a space or a carriage return). If you send something -before, you will get the error message: "Some data has already been output, can't send PDF file". If you -send something after, the document might not display. - - diff --git a/sources/doc/fpdf/tutorial/tuto1.php b/sources/doc/fpdf/tutorial/tuto1.php deleted file mode 100755 index 39db1fd..0000000 --- a/sources/doc/fpdf/tutorial/tuto1.php +++ /dev/null @@ -1,9 +0,0 @@ -AddPage(); -$pdf->SetFont('Arial','B',16); -$pdf->Cell(40,10,'Hello World!'); -$pdf->Output(); -?> diff --git a/sources/doc/fpdf/tutorial/tuto2.htm b/sources/doc/fpdf/tutorial/tuto2.htm deleted file mode 100755 index 6cff8f4..0000000 --- a/sources/doc/fpdf/tutorial/tuto2.htm +++ /dev/null @@ -1,80 +0,0 @@ - - - - -Header, footer, page break and image - - - -

Header, footer, page break and image

-Here is a two page example with header, footer and logo: -
-
<?php
-require('fpdf.php');
-
-class PDF extends FPDF
-{
-//Page header
-function Header()
-{
-    //Logo
-    $this->Image('logo_pb.png',10,8,33);
-    //Arial bold 15
-    $this->SetFont('Arial','B',15);
-    //Move to the right
-    $this->Cell(80);
-    //Title
-    $this->Cell(30,10,'Title',1,0,'C');
-    //Line break
-    $this->Ln(20);
-}
-
-//Page footer
-function Footer()
-{
-    //Position at 1.5 cm from bottom
-    $this->SetY(-15);
-    //Arial italic 8
-    $this->SetFont('Arial','I',8);
-    //Page number
-    $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
-}
-}
-
-//Instanciation of inherited class
-$pdf=new PDF();
-$pdf->AliasNbPages();
-$pdf->AddPage();
-$pdf->SetFont('Times','',12);
-for($i=1;$i<=40;$i++)
-    $pdf->Cell(0,10,'Printing line number '.$i,0,1);
-$pdf->Output();
-?>
-
-

[Demo]

-This example makes use of the Header() and Footer() methods to process page headers and -footers. They are called automatically. They already exist in the FPDF class but do nothing, -therefore we have to extend the class and override them. -
-
-The logo is printed with the Image() method by specifying its upper-left corner and -its width. The height is calculated automatically to respect the image proportions. -
-
-To print the page number, a null value is passed as the cell width. It means that the cell -should extend up to the right margin of the page; it is handy to center text. The current page -number is returned by the PageNo() method; as for the total number of pages, it is obtained -by means of the special value {nb} which will be substituted on document closure -(provided you first called AliasNbPages()). -
-Note the use of the SetY() method which allows to set position at an absolute location in -the page, starting from the top or the bottom. -
-
-Another interesting feature is used here: the automatic page breaking. As soon as a cell would -cross a limit in the page (at 2 centimeters from the bottom by default), a break is performed -and the font restored. Although the header and footer select their own font (Arial), the body -continues with Times. This mechanism of automatic restoration also applies to colors and line -width. The limit which triggers page breaks can be set with SetAutoPageBreak(). - - diff --git a/sources/doc/fpdf/tutorial/tuto2.php b/sources/doc/fpdf/tutorial/tuto2.php deleted file mode 100755 index f400713..0000000 --- a/sources/doc/fpdf/tutorial/tuto2.php +++ /dev/null @@ -1,41 +0,0 @@ -Image('logo_pb.png',10,8,33); - //Arial bold 15 - $this->SetFont('Arial','B',15); - //Move to the right - $this->Cell(80); - //Title - $this->Cell(30,10,'Title',1,0,'C'); - //Line break - $this->Ln(20); -} - -//Page footer -function Footer() -{ - //Position at 1.5 cm from bottom - $this->SetY(-15); - //Arial italic 8 - $this->SetFont('Arial','I',8); - //Page number - $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C'); -} -} - -//Instanciation of inherited class -$pdf=new PDF(); -$pdf->AliasNbPages(); -$pdf->AddPage(); -$pdf->SetFont('Times','',12); -for($i=1;$i<=40;$i++) - $pdf->Cell(0,10,'Printing line number '.$i,0,1); -$pdf->Output(); -?> diff --git a/sources/doc/fpdf/tutorial/tuto3.htm b/sources/doc/fpdf/tutorial/tuto3.htm deleted file mode 100755 index b85cad9..0000000 --- a/sources/doc/fpdf/tutorial/tuto3.htm +++ /dev/null @@ -1,116 +0,0 @@ - - - - -Line breaks and colors - - - -

Line breaks and colors

-Let's continue with an example which prints justified paragraphs. It also illustrates the use -of colors. -
-
<?php
-require('fpdf.php');
-
-class PDF extends FPDF
-{
-function Header()
-{
-    global $title;
-
-    //Arial bold 15
-    $this->SetFont('Arial','B',15);
-    //Calculate width of title and position
-    $w=$this->GetStringWidth($title)+6;
-    $this->SetX((210-$w)/2);
-    //Colors of frame, background and text
-    $this->SetDrawColor(0,80,180);
-    $this->SetFillColor(230,230,0);
-    $this->SetTextColor(220,50,50);
-    //Thickness of frame (1 mm)
-    $this->SetLineWidth(1);
-    //Title
-    $this->Cell($w,9,$title,1,1,'C',true);
-    //Line break
-    $this->Ln(10);
-}
-
-function Footer()
-{
-    //Position at 1.5 cm from bottom
-    $this->SetY(-15);
-    //Arial italic 8
-    $this->SetFont('Arial','I',8);
-    //Text color in gray
-    $this->SetTextColor(128);
-    //Page number
-    $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
-}
-
-function ChapterTitle($num,$label)
-{
-    //Arial 12
-    $this->SetFont('Arial','',12);
-    //Background color
-    $this->SetFillColor(200,220,255);
-    //Title
-    $this->Cell(0,6,"Chapter $num : $label",0,1,'L',true);
-    //Line break
-    $this->Ln(4);
-}
-
-function ChapterBody($file)
-{
-    //Read text file
-    $f=fopen($file,'r');
-    $txt=fread($f,filesize($file));
-    fclose($f);
-    //Times 12
-    $this->SetFont('Times','',12);
-    //Output justified text
-    $this->MultiCell(0,5,$txt);
-    //Line break
-    $this->Ln();
-    //Mention in italics
-    $this->SetFont('','I');
-    $this->Cell(0,5,'(end of excerpt)');
-}
-
-function PrintChapter($num,$title,$file)
-{
-    $this->AddPage();
-    $this->ChapterTitle($num,$title);
-    $this->ChapterBody($file);
-}
-}
-
-$pdf=new PDF();
-$title='20000 Leagues Under the Seas';
-$pdf->SetTitle($title);
-$pdf->SetAuthor('Jules Verne');
-$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt');
-$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt');
-$pdf->Output();
-?>
-
-

[Demo]

-The GetStringWidth() method allows to determine the length of a string in the current font, -which is used here to calculate the position and the width of the frame surrounding the title. -Then colors are set (via SetDrawColor(), SetFillColor() and SetTextColor()) and the -thickness of the line is set to 1 mm (against 0.2 by default) with SetLineWidth(). Finally, -we output the cell (the last parameter to true indicates that the background must -be filled). -
-
-The method used to print the paragraphs is MultiCell(). Each time a line reaches the -right extremity of the cell or a carriage return character is met, a line break is issued -and a new cell automatically created under the current one. Text is justified by default. -
-
-Two document properties are defined: the title (SetTitle()) and the author (SetAuthor()). -Properties can be viewed by two means. First is to open the document directly with Acrobat Reader, -go to the File menu and choose the Document Properties option. The second, also available from -the plug-in, is to right-click and select Document Properties. - - diff --git a/sources/doc/fpdf/tutorial/tuto3.php b/sources/doc/fpdf/tutorial/tuto3.php deleted file mode 100755 index f84589a..0000000 --- a/sources/doc/fpdf/tutorial/tuto3.php +++ /dev/null @@ -1,83 +0,0 @@ -SetFont('Arial','B',15); - //Calculate width of title and position - $w=$this->GetStringWidth($title)+6; - $this->SetX((210-$w)/2); - //Colors of frame, background and text - $this->SetDrawColor(0,80,180); - $this->SetFillColor(230,230,0); - $this->SetTextColor(220,50,50); - //Thickness of frame (1 mm) - $this->SetLineWidth(1); - //Title - $this->Cell($w,9,$title,1,1,'C',true); - //Line break - $this->Ln(10); -} - -function Footer() -{ - //Position at 1.5 cm from bottom - $this->SetY(-15); - //Arial italic 8 - $this->SetFont('Arial','I',8); - //Text color in gray - $this->SetTextColor(128); - //Page number - $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C'); -} - -function ChapterTitle($num,$label) -{ - //Arial 12 - $this->SetFont('Arial','',12); - //Background color - $this->SetFillColor(200,220,255); - //Title - $this->Cell(0,6,"Chapter $num : $label",0,1,'L',true); - //Line break - $this->Ln(4); -} - -function ChapterBody($file) -{ - //Read text file - $f=fopen($file,'r'); - $txt=fread($f,filesize($file)); - fclose($f); - //Times 12 - $this->SetFont('Times','',12); - //Output justified text - $this->MultiCell(0,5,$txt); - //Line break - $this->Ln(); - //Mention in italics - $this->SetFont('','I'); - $this->Cell(0,5,'(end of excerpt)'); -} - -function PrintChapter($num,$title,$file) -{ - $this->AddPage(); - $this->ChapterTitle($num,$title); - $this->ChapterBody($file); -} -} - -$pdf=new PDF(); -$title='20000 Leagues Under the Seas'; -$pdf->SetTitle($title); -$pdf->SetAuthor('Jules Verne'); -$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt'); -$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt'); -$pdf->Output(); -?> diff --git a/sources/doc/fpdf/tutorial/tuto4.htm b/sources/doc/fpdf/tutorial/tuto4.htm deleted file mode 100755 index f39b5b2..0000000 --- a/sources/doc/fpdf/tutorial/tuto4.htm +++ /dev/null @@ -1,136 +0,0 @@ - - - - -Multi-columns - - - -

Multi-columns

-This example is a variant of the previous one showing how to lay the text across multiple -columns. -
-
<?php
-require('fpdf.php');
-
-class PDF extends FPDF
-{
-//Current column
-var $col=0;
-//Ordinate of column start
-var $y0;
-
-function Header()
-{
-    //Page header
-    global $title;
-
-    $this->SetFont('Arial','B',15);
-    $w=$this->GetStringWidth($title)+6;
-    $this->SetX((210-$w)/2);
-    $this->SetDrawColor(0,80,180);
-    $this->SetFillColor(230,230,0);
-    $this->SetTextColor(220,50,50);
-    $this->SetLineWidth(1);
-    $this->Cell($w,9,$title,1,1,'C',true);
-    $this->Ln(10);
-    //Save ordinate
-    $this->y0=$this->GetY();
-}
-
-function Footer()
-{
-    //Page footer
-    $this->SetY(-15);
-    $this->SetFont('Arial','I',8);
-    $this->SetTextColor(128);
-    $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
-}
-
-function SetCol($col)
-{
-    //Set position at a given column
-    $this->col=$col;
-    $x=10+$col*65;
-    $this->SetLeftMargin($x);
-    $this->SetX($x);
-}
-
-function AcceptPageBreak()
-{
-    //Method accepting or not automatic page break
-    if($this->col<2)
-    {
-        //Go to next column
-        $this->SetCol($this->col+1);
-        //Set ordinate to top
-        $this->SetY($this->y0);
-        //Keep on page
-        return false;
-    }
-    else
-    {
-        //Go back to first column
-        $this->SetCol(0);
-        //Page break
-        return true;
-    }
-}
-
-function ChapterTitle($num,$label)
-{
-    //Title
-    $this->SetFont('Arial','',12);
-    $this->SetFillColor(200,220,255);
-    $this->Cell(0,6,"Chapter $num : $label",0,1,'L',true);
-    $this->Ln(4);
-    //Save ordinate
-    $this->y0=$this->GetY();
-}
-
-function ChapterBody($file)
-{
-    //Read text file
-    $f=fopen($file,'r');
-    $txt=fread($f,filesize($file));
-    fclose($f);
-    //Font
-    $this->SetFont('Times','',12);
-    //Output text in a 6 cm width column
-    $this->MultiCell(60,5,$txt);
-    $this->Ln();
-    //Mention
-    $this->SetFont('','I');
-    $this->Cell(0,5,'(end of excerpt)');
-    //Go back to first column
-    $this->SetCol(0);
-}
-
-function PrintChapter($num,$title,$file)
-{
-    //Add chapter
-    $this->AddPage();
-    $this->ChapterTitle($num,$title);
-    $this->ChapterBody($file);
-}
-}
-
-$pdf=new PDF();
-$title='20000 Leagues Under the Seas';
-$pdf->SetTitle($title);
-$pdf->SetAuthor('Jules Verne');
-$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt');
-$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt');
-$pdf->Output();
-?>
-
-

[Demo]

-The key method used is AcceptPageBreak(). It allows to accept or not an automatic page -break. By refusing it and altering the margin and current position, the desired column layout -is achieved. -
-For the rest, not many changes; two properties have been added to the class to save the current -column number and the position where columns begin, and the MultiCell() call specifies a -6 centimeter width. - - diff --git a/sources/doc/fpdf/tutorial/tuto4.php b/sources/doc/fpdf/tutorial/tuto4.php deleted file mode 100755 index d54bc8a..0000000 --- a/sources/doc/fpdf/tutorial/tuto4.php +++ /dev/null @@ -1,113 +0,0 @@ -SetFont('Arial','B',15); - $w=$this->GetStringWidth($title)+6; - $this->SetX((210-$w)/2); - $this->SetDrawColor(0,80,180); - $this->SetFillColor(230,230,0); - $this->SetTextColor(220,50,50); - $this->SetLineWidth(1); - $this->Cell($w,9,$title,1,1,'C',true); - $this->Ln(10); - //Save ordinate - $this->y0=$this->GetY(); -} - -function Footer() -{ - //Page footer - $this->SetY(-15); - $this->SetFont('Arial','I',8); - $this->SetTextColor(128); - $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C'); -} - -function SetCol($col) -{ - //Set position at a given column - $this->col=$col; - $x=10+$col*65; - $this->SetLeftMargin($x); - $this->SetX($x); -} - -function AcceptPageBreak() -{ - //Method accepting or not automatic page break - if($this->col<2) - { - //Go to next column - $this->SetCol($this->col+1); - //Set ordinate to top - $this->SetY($this->y0); - //Keep on page - return false; - } - else - { - //Go back to first column - $this->SetCol(0); - //Page break - return true; - } -} - -function ChapterTitle($num,$label) -{ - //Title - $this->SetFont('Arial','',12); - $this->SetFillColor(200,220,255); - $this->Cell(0,6,"Chapter $num : $label",0,1,'L',true); - $this->Ln(4); - //Save ordinate - $this->y0=$this->GetY(); -} - -function ChapterBody($file) -{ - //Read text file - $f=fopen($file,'r'); - $txt=fread($f,filesize($file)); - fclose($f); - //Font - $this->SetFont('Times','',12); - //Output text in a 6 cm width column - $this->MultiCell(60,5,$txt); - $this->Ln(); - //Mention - $this->SetFont('','I'); - $this->Cell(0,5,'(end of excerpt)'); - //Go back to first column - $this->SetCol(0); -} - -function PrintChapter($num,$title,$file) -{ - //Add chapter - $this->AddPage(); - $this->ChapterTitle($num,$title); - $this->ChapterBody($file); -} -} - -$pdf=new PDF(); -$title='20000 Leagues Under the Seas'; -$pdf->SetTitle($title); -$pdf->SetAuthor('Jules Verne'); -$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt'); -$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt'); -$pdf->Output(); -?> diff --git a/sources/doc/fpdf/tutorial/tuto5.htm b/sources/doc/fpdf/tutorial/tuto5.htm deleted file mode 100755 index f22b175..0000000 --- a/sources/doc/fpdf/tutorial/tuto5.htm +++ /dev/null @@ -1,133 +0,0 @@ - - - - -Tables - - - -

Tables

-This tutorial shows how to make tables easily. -
-
<?php
-require('fpdf.php');
-
-class PDF extends FPDF
-{
-//Load data
-function LoadData($file)
-{
-    //Read file lines
-    $lines=file($file);
-    $data=array();
-    foreach($lines as $line)
-        $data[]=explode(';',chop($line));
-    return $data;
-}
-
-//Simple table
-function BasicTable($header,$data)
-{
-    //Header
-    foreach($header as $col)
-        $this->Cell(40,7,$col,1);
-    $this->Ln();
-    //Data
-    foreach($data as $row)
-    {
-        foreach($row as $col)
-            $this->Cell(40,6,$col,1);
-        $this->Ln();
-    }
-}
-
-//Better table
-function ImprovedTable($header,$data)
-{
-    //Column widths
-    $w=array(40,35,40,45);
-    //Header
-    for($i=0;$i<count($header);$i++)
-        $this->Cell($w[$i],7,$header[$i],1,0,'C');
-    $this->Ln();
-    //Data
-    foreach($data as $row)
-    {
-        $this->Cell($w[0],6,$row[0],'LR');
-        $this->Cell($w[1],6,$row[1],'LR');
-        $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R');
-        $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R');
-        $this->Ln();
-    }
-    //Closure line
-    $this->Cell(array_sum($w),0,'','T');
-}
-
-//Colored table
-function FancyTable($header,$data)
-{
-    //Colors, line width and bold font
-    $this->SetFillColor(255,0,0);
-    $this->SetTextColor(255);
-    $this->SetDrawColor(128,0,0);
-    $this->SetLineWidth(.3);
-    $this->SetFont('','B');
-    //Header
-    $w=array(40,35,40,45);
-    for($i=0;$i<count($header);$i++)
-        $this->Cell($w[$i],7,$header[$i],1,0,'C',true);
-    $this->Ln();
-    //Color and font restoration
-    $this->SetFillColor(224,235,255);
-    $this->SetTextColor(0);
-    $this->SetFont('');
-    //Data
-    $fill=false;
-    foreach($data as $row)
-    {
-        $this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);
-        $this->Cell($w[1],6,$row[1],'LR',0,'L',$fill);
-        $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill);
-        $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill);
-        $this->Ln();
-        $fill=!$fill;
-    }
-    $this->Cell(array_sum($w),0,'','T');
-}
-}
-
-$pdf=new PDF();
-//Column titles
-$header=array('Country','Capital','Area (sq km)','Pop. (thousands)');
-//Data loading
-$data=$pdf->LoadData('countries.txt');
-$pdf->SetFont('Arial','',14);
-$pdf->AddPage();
-$pdf->BasicTable($header,$data);
-$pdf->AddPage();
-$pdf->ImprovedTable($header,$data);
-$pdf->AddPage();
-$pdf->FancyTable($header,$data);
-$pdf->Output();
-?>
-
-

[Demo]

-A table being just a collection of cells, it is natural to build one from them. The first -example is achieved in the most basic way possible: simple framed cells, all of the same size -and left aligned. The result is rudimentary but very quick to obtain. -
-
-The second table brings some improvements: each column has its own width, titles are centered -and figures right aligned. Moreover, horizontal lines have been removed. This is done by means -of the border parameter of the Cell() method, which specifies which sides of the -cell must be drawn. Here we want the left (L) and right (R) ones. It remains -the problem of the horizontal line to finish the table. There are two possibilities: either -check for the last line in the loop, in which case we use LRB for the border -parameter; or, as done here, add the line once the loop is over. -
-
-The third table is similar to the second one but uses colors. Fill, text and line colors are -simply specified. Alternate coloring for rows is obtained by using alternatively transparent -and filled cells. - - diff --git a/sources/doc/fpdf/tutorial/tuto5.php b/sources/doc/fpdf/tutorial/tuto5.php deleted file mode 100755 index eb13772..0000000 --- a/sources/doc/fpdf/tutorial/tuto5.php +++ /dev/null @@ -1,101 +0,0 @@ -Cell(40,7,$col,1); - $this->Ln(); - //Data - foreach($data as $row) - { - foreach($row as $col) - $this->Cell(40,6,$col,1); - $this->Ln(); - } -} - -//Better table -function ImprovedTable($header,$data) -{ - //Column widths - $w=array(40,35,40,45); - //Header - for($i=0;$iCell($w[$i],7,$header[$i],1,0,'C'); - $this->Ln(); - //Data - foreach($data as $row) - { - $this->Cell($w[0],6,$row[0],'LR'); - $this->Cell($w[1],6,$row[1],'LR'); - $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R'); - $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R'); - $this->Ln(); - } - //Closure line - $this->Cell(array_sum($w),0,'','T'); -} - -//Colored table -function FancyTable($header,$data) -{ - //Colors, line width and bold font - $this->SetFillColor(255,0,0); - $this->SetTextColor(255); - $this->SetDrawColor(128,0,0); - $this->SetLineWidth(.3); - $this->SetFont('','B'); - //Header - $w=array(40,35,40,45); - for($i=0;$iCell($w[$i],7,$header[$i],1,0,'C',true); - $this->Ln(); - //Color and font restoration - $this->SetFillColor(224,235,255); - $this->SetTextColor(0); - $this->SetFont(''); - //Data - $fill=false; - foreach($data as $row) - { - $this->Cell($w[0],6,$row[0],'LR',0,'L',$fill); - $this->Cell($w[1],6,$row[1],'LR',0,'L',$fill); - $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill); - $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill); - $this->Ln(); - $fill=!$fill; - } - $this->Cell(array_sum($w),0,'','T'); -} -} - -$pdf=new PDF(); -//Column titles -$header=array('Country','Capital','Area (sq km)','Pop. (thousands)'); -//Data loading -$data=$pdf->LoadData('countries.txt'); -$pdf->SetFont('Arial','',14); -$pdf->AddPage(); -$pdf->BasicTable($header,$data); -$pdf->AddPage(); -$pdf->ImprovedTable($header,$data); -$pdf->AddPage(); -$pdf->FancyTable($header,$data); -$pdf->Output(); -?> diff --git a/sources/doc/fpdf/tutorial/tuto6.htm b/sources/doc/fpdf/tutorial/tuto6.htm deleted file mode 100755 index c9c5783..0000000 --- a/sources/doc/fpdf/tutorial/tuto6.htm +++ /dev/null @@ -1,165 +0,0 @@ - - - - -Links and flowing text - - - -

Links and flowing text

-This tutorial explains how to insert links (internal and external) and shows a new text writing -mode. It also contains a basic HTML parser. -
-
<?php
-require('fpdf.php');
-
-class PDF extends FPDF
-{
-var $B;
-var $I;
-var $U;
-var $HREF;
-
-function PDF($orientation='P',$unit='mm',$format='A4')
-{
-    //Call parent constructor
-    $this->FPDF($orientation,$unit,$format);
-    //Initialization
-    $this->B=0;
-    $this->I=0;
-    $this->U=0;
-    $this->HREF='';
-}
-
-function WriteHTML($html)
-{
-    //HTML parser
-    $html=str_replace("\n",' ',$html);
-    $a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE);
-    foreach($a as $i=>$e)
-    {
-        if($i%2==0)
-        {
-            //Text
-            if($this->HREF)
-                $this->PutLink($this->HREF,$e);
-            else
-                $this->Write(5,$e);
-        }
-        else
-        {
-            //Tag
-            if($e[0]=='/')
-                $this->CloseTag(strtoupper(substr($e,1)));
-            else
-            {
-                //Extract attributes
-                $a2=explode(' ',$e);
-                $tag=strtoupper(array_shift($a2));
-                $attr=array();
-                foreach($a2 as $v)
-                {
-                    if(preg_match('/([^=]*)=["\']?([^"\']*)/',$v,$a3))
-                        $attr[strtoupper($a3[1])]=$a3[2];
-                }
-                $this->OpenTag($tag,$attr);
-            }
-        }
-    }
-}
-
-function OpenTag($tag,$attr)
-{
-    //Opening tag
-    if($tag=='B' || $tag=='I' || $tag=='U')
-        $this->SetStyle($tag,true);
-    if($tag=='A')
-        $this->HREF=$attr['HREF'];
-    if($tag=='BR')
-        $this->Ln(5);
-}
-
-function CloseTag($tag)
-{
-    //Closing tag
-    if($tag=='B' || $tag=='I' || $tag=='U')
-        $this->SetStyle($tag,false);
-    if($tag=='A')
-        $this->HREF='';
-}
-
-function SetStyle($tag,$enable)
-{
-    //Modify style and select corresponding font
-    $this->$tag+=($enable ? 1 : -1);
-    $style='';
-    foreach(array('B','I','U') as $s)
-    {
-        if($this->$s>0)
-            $style.=$s;
-    }
-    $this->SetFont('',$style);
-}
-
-function PutLink($URL,$txt)
-{
-    //Put a hyperlink
-    $this->SetTextColor(0,0,255);
-    $this->SetStyle('U',true);
-    $this->Write(5,$txt,$URL);
-    $this->SetStyle('U',false);
-    $this->SetTextColor(0);
-}
-}
-
-$html='You can now easily print text mixing different styles: <b>bold</b>, <i>italic</i>,
-<u>underlined</u>, or <b><i><u>all at once</u></i></b>!<br><br>You can also insert links on
-text, such as <a href="http://www.fpdf.org">www.fpdf.org</a>, or on an image: click on the logo.';
-
-$pdf=new PDF();
-//First page
-$pdf->AddPage();
-$pdf->SetFont('Arial','',20);
-$pdf->Write(5,'To find out what\'s new in this tutorial, click ');
-$pdf->SetFont('','U');
-$link=$pdf->AddLink();
-$pdf->Write(5,'here',$link);
-$pdf->SetFont('');
-//Second page
-$pdf->AddPage();
-$pdf->SetLink($link);
-$pdf->Image('logo.png',10,12,30,0,'','http://www.fpdf.org');
-$pdf->SetLeftMargin(45);
-$pdf->SetFontSize(14);
-$pdf->WriteHTML($html);
-$pdf->Output();
-?>
-
-

[Demo]

-The new method to print text is Write(). It is very close to MultiCell(); the differences are: -
    -
  • The end of line is at the right margin and the next line begins at the left one
  • -
  • The current position moves at the end of the text
  • -
-So it allows to write a chunk of text, alter the font style, then continue from the exact -place we left it. On the other hand, you cannot justify it. -
-
-The method is used on the first page to put a link pointing to the second one. The beginning of -the sentence is written in regular style, then we switch to underline and finish it. The link -is created with AddLink(), which returns a link identifier. The identifier is -passed as third parameter of Write(). Once the second page is created, we use SetLink() to -make the link point to the beginning of the current page. -
-
-Then we put an image with a link on it. An external link points to an URL (HTTP, mailto...). -The URL is simply passed as last parameter of Image(). -
-
-Finally, the left margin is moved after the image with SetLeftMargin() and some text in -HTML format is output. A very simple HTML parser is used for this, based on regular expressions. -Recognized tags are <b>, <i>, <u>, <a> and <br>; the others are -ignored. The parser also makes use of the Write() method. An external link is put the same way as -an internal one (third parameter of Write()). Note that Cell() also allows to put links. - - diff --git a/sources/doc/fpdf/tutorial/tuto6.php b/sources/doc/fpdf/tutorial/tuto6.php deleted file mode 100755 index 0de8947..0000000 --- a/sources/doc/fpdf/tutorial/tuto6.php +++ /dev/null @@ -1,124 +0,0 @@ -FPDF($orientation,$unit,$format); - //Initialization - $this->B=0; - $this->I=0; - $this->U=0; - $this->HREF=''; -} - -function WriteHTML($html) -{ - //HTML parser - $html=str_replace("\n",' ',$html); - $a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE); - foreach($a as $i=>$e) - { - if($i%2==0) - { - //Text - if($this->HREF) - $this->PutLink($this->HREF,$e); - else - $this->Write(5,$e); - } - else - { - //Tag - if($e[0]=='/') - $this->CloseTag(strtoupper(substr($e,1))); - else - { - //Extract attributes - $a2=explode(' ',$e); - $tag=strtoupper(array_shift($a2)); - $attr=array(); - foreach($a2 as $v) - { - if(preg_match('/([^=]*)=["\']?([^"\']*)/',$v,$a3)) - $attr[strtoupper($a3[1])]=$a3[2]; - } - $this->OpenTag($tag,$attr); - } - } - } -} - -function OpenTag($tag,$attr) -{ - //Opening tag - if($tag=='B' || $tag=='I' || $tag=='U') - $this->SetStyle($tag,true); - if($tag=='A') - $this->HREF=$attr['HREF']; - if($tag=='BR') - $this->Ln(5); -} - -function CloseTag($tag) -{ - //Closing tag - if($tag=='B' || $tag=='I' || $tag=='U') - $this->SetStyle($tag,false); - if($tag=='A') - $this->HREF=''; -} - -function SetStyle($tag,$enable) -{ - //Modify style and select corresponding font - $this->$tag+=($enable ? 1 : -1); - $style=''; - foreach(array('B','I','U') as $s) - { - if($this->$s>0) - $style.=$s; - } - $this->SetFont('',$style); -} - -function PutLink($URL,$txt) -{ - //Put a hyperlink - $this->SetTextColor(0,0,255); - $this->SetStyle('U',true); - $this->Write(5,$txt,$URL); - $this->SetStyle('U',false); - $this->SetTextColor(0); -} -} - -$html='You can now easily print text mixing different styles: bold, italic, -underlined, or all at once!

You can also insert links on -text, such as www.fpdf.org, or on an image: click on the logo.'; - -$pdf=new PDF(); -//First page -$pdf->AddPage(); -$pdf->SetFont('Arial','',20); -$pdf->Write(5,'To find out what\'s new in this tutorial, click '); -$pdf->SetFont('','U'); -$link=$pdf->AddLink(); -$pdf->Write(5,'here',$link); -$pdf->SetFont(''); -//Second page -$pdf->AddPage(); -$pdf->SetLink($link); -$pdf->Image('logo.png',10,12,30,0,'','http://www.fpdf.org'); -$pdf->SetLeftMargin(45); -$pdf->SetFontSize(14); -$pdf->WriteHTML($html); -$pdf->Output(); -?> diff --git a/sources/doc/fpdf/tutorial/tuto7.htm b/sources/doc/fpdf/tutorial/tuto7.htm deleted file mode 100755 index 0212fb9..0000000 --- a/sources/doc/fpdf/tutorial/tuto7.htm +++ /dev/null @@ -1,303 +0,0 @@ - - - - -Adding new fonts and encoding support - - - - -

Adding new fonts and encoding support

-This tutorial explains how to use TrueType or Type1 fonts so that you are not limited to the standard -fonts any more. The other interest is that you can choose the font encoding, which allows you to -use other languages than the Western ones (the standard fonts having too few available characters). -
-
-There are two ways to use a new font: embedding it in the PDF or not. When a font is not -embedded, it is searched in the system. The advantage is that the PDF file is lighter; on the other -hand, if it is not available, a substitution font is used. So it is preferable to ensure that the -needed font is installed on the client systems. If the file is to be viewed by a large audience, -it is recommended to embed. -
-
-Adding a new font requires three steps for TrueTypes: -
    -
  • Generation of the metric file (.afm)
  • -
  • Generation of the font definition file (.php)
  • -
  • Declaration of the font in the script
  • -
-For Type1, the first one is theoretically not necessary because the AFM file is usually shipped -with the font. In case you have only a metric file in PFM format, use the convertor available -here. -

Generation of the metric file

-The first step for a TrueType consists in generating the AFM file. A utility exists to do this -task: ttf2pt1. The Windows binary -is available here. The command line to use is -the following: -
-
-ttf2pt1 -a font.ttf font -
-
-For example, for Comic Sans MS Regular: -
-
-ttf2pt1 -a c:\windows\fonts\comic.ttf comic -
-
-Two files are created; the one we are interested in is comic.afm. -

Generation of the font definition file

-The second step consists in generating a PHP file containing all the information needed by FPDF; -in addition, the font file is compressed. To do this, a helper script is provided in the font/makefont/ -directory of the package: makefont.php. It contains the following function: -
-
-MakeFont(string fontfile, string afmfile [, string enc [, array patch [, string type]]]) -
-
fontfile
-
-

Path to the .ttf or .pfb file.

-
-
afmfile
-
-

Path to the .afm file.

-
-
enc
-
-

Name of the encoding to use. Default value: cp1252.

-
-
patch
-
-

Optional modification of the encoding. Empty by default.

-
-
type
-
-

Type of the font (TrueType or Type1). Default value: TrueType.

-
-
-The first parameter is the name of the font file. The extension must be either .ttf or .pfb and -determines the font type. If you own a Type1 font in ASCII format (.pfa), you can convert it to -binary format with t1utils. -
-If you don't want to embed the font, pass an empty string. In this case, type is given by the -type parameter. -
-Note: in the case of a font with the same name as a standard one, for instance arial.ttf, it is -recommended to embed. If you don't, some versions of Acrobat will use their own fonts. -
-
-The AFM file is the one previously generated. -
-
-The encoding defines the association between a code (from 0 to 255) and a character. The first -128 are fixed and correspond to ASCII; the following are variable. The encodings are stored in -.map files. Those available are: -
    -
  • cp1250 (Central Europe)
  • -
  • cp1251 (Cyrillic)
  • -
  • cp1252 (Western Europe)
  • -
  • cp1253 (Greek)
  • -
  • cp1254 (Turkish)
  • -
  • cp1255 (Hebrew)
  • -
  • cp1257 (Baltic)
  • -
  • cp1258 (Vietnamese)
  • -
  • cp874 (Thai)
  • -
  • ISO-8859-1 (Western Europe)
  • -
  • ISO-8859-2 (Central Europe)
  • -
  • ISO-8859-4 (Baltic)
  • -
  • ISO-8859-5 (Cyrillic)
  • -
  • ISO-8859-7 (Greek)
  • -
  • ISO-8859-9 (Turkish)
  • -
  • ISO-8859-11 (Thai)
  • -
  • ISO-8859-15 (Western Europe)
  • -
  • ISO-8859-16 (Central Europe)
  • -
  • KOI8-R (Russian)
  • -
  • KOI8-U (Ukrainian)
  • -
-Of course, the font must contain the characters corresponding to the chosen encoding. -
-In the particular case of a symbolic font (that is to say which does not contain letters, such -as Symbol or ZapfDingbats), pass an empty string. -
-The encodings which begin with cp are those used by Windows; Linux systems usually use ISO. -
-Remark: the standard fonts use cp1252. -
-
-The fourth parameter gives the possibility to alter the encoding. Sometimes you may want to add -some characters. For instance, ISO-8859-1 does not contain the euro symbol. To add it at position -164, pass array(164=>'Euro'). -
-
-The last parameter is used to give the type of the font in case it is not embedded (that is to -say the first parameter is empty). -
-
-After you have called the function (create a new file for this and include makefont.php, or -simply add the call directly inside), a .php file is created, with the same name as the .afm one. -You may rename it if you wish. If the case of embedding, the font file is compressed and gives a -second file with .z as extension (except if the compression function is not available, it -requires zlib). You may rename it too, but in this case you have to alter the variable $file -in the .php file accordingly. -
-
-Example: -
-
MakeFont('c:\\windows\\fonts\\comic.ttf','comic.afm','cp1252');
-
-
-which gives the files comic.php and comic.z. -
-
-Then you have to copy the generated file(s) to the font directory. If the font file -could not be compressed, copy the .ttf or .pfb instead of the .z. -
-
-Remark: for TTF fonts, you can generate the files online here -instead of doing it manually. -

Declaration of the font in the script

-The last step is the most simple. You just need to call the AddFont() method. For instance: -
-
$pdf->AddFont('Comic','','comic.php');
-
-
-or simply: -
-
$pdf->AddFont('Comic');
-
-
-And the font is now available (in regular and underlined styles), usable like the others. If we -had worked with Comic Sans MS Bold (comicbd.ttf), we would have put: -
-
$pdf->AddFont('Comic','B','comicbd.php');
-
-
-

Example

-Let's now see a small complete example. The font used is Calligrapher, available at -www.abstractfonts.com (a site -offering numerous free TrueType fonts). The first step is the generation of the AFM file: -
-
-ttf2pt1 -a calligra.ttf calligra -
-
-which gives calligra.afm (and calligra.t1a that we can delete). Then we generate the definition -file: -
-
<?php
-require('font/makefont/makefont.php');
-
-MakeFont('calligra.ttf','calligra.afm');
-?>
-
-The function call gives the following report: -
-
-Warning: character Euro is missing
-Warning: character Zcaron is missing
-Warning: character zcaron is missing
-Warning: character eth is missing
-Font file compressed (calligra.z)
-Font definition file generated (calligra.php)
-
-The euro character is not present in the font (it is too old). Three other characters are missing -too, but we are not interested in them anyway. -
-We can now copy the two files to the font directory and write the script: -
-
<?php
-require('fpdf.php');
-
-$pdf=new FPDF();
-$pdf->AddFont('Calligrapher','','calligra.php');
-$pdf->AddPage();
-$pdf->SetFont('Calligrapher','',35);
-$pdf->Cell(0,10,'Enjoy new fonts with FPDF!');
-$pdf->Output();
-?>
-
-

[Demo]

-

About the euro symbol

-The euro character is not present in all encodings, and is not always placed at the same position: - - - - - - - - - - - - - - - - - - - - - - -
EncodingPosition
cp1250128
cp1251136
cp1252128
cp1253128
cp1254128
cp1255128
cp1257128
cp1258128
cp874128
ISO-8859-1absent
ISO-8859-2absent
ISO-8859-4absent
ISO-8859-5absent
ISO-8859-7absent
ISO-8859-9absent
ISO-8859-11absent
ISO-8859-15164
ISO-8859-16164
KOI8-Rabsent
KOI8-Uabsent
-ISO-8859-1 is widespread but does not include the euro sign. If you need it, the simplest thing -to do is using cp1252 or ISO-8859-15 instead, which are nearly identical but contain the precious -symbol. -
-As for ISO-8859-2, it is possible to use ISO-8859-16 instead, but it contains many differences. -It is therefore simpler to patch the encoding to add the symbol to it, as explained above. The -same is true for the other encodings. -

Font synthesis under Windows

-When a TrueType font is not available in a given style, Windows is able to synthesize it from the -regular version. For instance, there is no Comic Sans MS Italic, but it can be built from Comic -Sans MS Regular. This feature can be used in a PDF file, but unfortunately requires that the -regular font be present in the system (you must not embed it). Here is how to do it: -
    -
  • Generate the definition file for the regular font without embedding (you may rename it to -reflect the desired style)
  • -
  • Open it and append to the variable $name a comma followed by the desired style -(Italic, Bold or BoldItalic)
  • -
-For instance, for the file comici.php: -
-
-$name='ComicSansMS,Italic'; -
-
-It can then be used normally: -
-
$pdf->AddFont('Comic','I','comici.php');
-
-
-

Reducing the size of TrueType fonts

-Font files are often quite voluminous (more than 100, even 200KB); this is due to the fact that -they contain the characters corresponding to many encodings. zlib compression reduces them but -they remain fairly big. A technique exists to reduce them further. It consists in converting the -font to the Type1 format with ttf2pt1 by specifying the encoding you are interested in; all other -characters will be discarded. -
-For instance, the arial.ttf font shipped with Windows 98 is 267KB (it contains 1296 characters). -After compression it gives 147. Let's convert it to Type1 by keeping only cp1250 characters: -
-
-ttf2pt1 -b -L cp1250.map c:\windows\fonts\arial.ttf arial -
-
-The .map files are located in the font/makefont/ directory of the package. The command produces -arial.pfb and arial.afm. The arial.pfb file is only 35KB, and 30KB after compression. -
-
-It is possible to go even further. If you are interested only by a subset of the encoding (you -probably don't need all 217 characters), you can open the .map file and remove the lines you are -not interested in. This will reduce the file size accordingly. - - diff --git a/sources/doc/fpdf/tutorial/tuto7.php b/sources/doc/fpdf/tutorial/tuto7.php deleted file mode 100755 index 0d309d0..0000000 --- a/sources/doc/fpdf/tutorial/tuto7.php +++ /dev/null @@ -1,11 +0,0 @@ -AddFont('Calligrapher','','calligra.php'); -$pdf->AddPage(); -$pdf->SetFont('Calligrapher','',35); -$pdf->Cell(0,10,'Enjoy new fonts with FPDF!'); -$pdf->Output(); -?> diff --git a/sources/doc/heading.php b/sources/doc/heading.php deleted file mode 100644 index 0774083..0000000 --- a/sources/doc/heading.php +++ /dev/null @@ -1,25 +0,0 @@ - - -/*!\file - * \brief Description of the file - */ diff --git a/sources/doc/installation-window.odt b/sources/doc/installation-window.odt deleted file mode 100644 index 2a265b0..0000000 Binary files a/sources/doc/installation-window.odt and /dev/null differ diff --git a/sources/doc/installation-window.pdf b/sources/doc/installation-window.pdf deleted file mode 100644 index dbdbc80..0000000 Binary files a/sources/doc/installation-window.pdf and /dev/null differ diff --git a/sources/doc/manuel-fr.odt b/sources/doc/manuel-fr.odt deleted file mode 100644 index 6770c4f..0000000 Binary files a/sources/doc/manuel-fr.odt and /dev/null differ diff --git a/sources/doc/manuel-fr.pdf b/sources/doc/manuel-fr.pdf deleted file mode 100644 index 7a04162..0000000 Binary files a/sources/doc/manuel-fr.pdf and /dev/null differ diff --git a/sources/doc/php.ini-minimum b/sources/doc/php.ini-minimum deleted file mode 100644 index 56725db..0000000 --- a/sources/doc/php.ini-minimum +++ /dev/null @@ -1,41 +0,0 @@ -[PHP] -include_path=../include:.:/opt/php431/lib/php -; ****************************************************** -; Normalement register_global est mis a off * -; J'ai du le modifier a cause du projet GNU Compta * -; ****************************************************** -register_globals = on -[Session] -session.save_handler = files ; handler used to store/retrieve data -session.save_path = /tmp ; argument passed to save_handler - ; in the case of files, this is the - ; path where data files are stored -session.use_cookies = 1 ; whether to use cookies -session.name = PHPSESSID - ; name of the session - ; is used as cookie name -session.auto_start = 1 ; initialize session on request startup -session.cookie_lifetime = 0 ; lifetime in seconds of cookie - ; or if 0, until browser is restarted -session.cookie_path = /tmp ; the path the cookie is valid for -session.cookie_domain = ; the domain the cookie is valid for -session.serialize_handler = php ; handler used to serialize data - ; php is the standard serializer of PHP -session.gc_probability = 1 ; percentual probability that the - ; 'garbage collection' process is started - ; on every session initialization -session.gc_maxlifetime = 1440 ; after this number of seconds, stored - ; data will be seen as 'garbage' and - ; cleaned up by the gc process -session.referer_check = ; check HTTP Referer to invalidate - ; externally stored URLs containing ids -session.entropy_length = 0 ; how many bytes to read from the file -session.entropy_file = ; specified here to create the session id -; session.entropy_length = 16 -; session.entropy_file = /dev/urandom -session.cache_limiter = nocache ; set to {nocache,private,public} to - ; determine HTTP caching aspects -session.cache_expire = 180 ; document expires after n minutes -session.use_trans_sid = 1 ; use transient sid support if enabled - ; by compiling with --enable-trans-sid -url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" diff --git a/sources/doc/tfpdf/HelloWorld.txt b/sources/doc/tfpdf/HelloWorld.txt deleted file mode 100644 index 0408a32..0000000 --- a/sources/doc/tfpdf/HelloWorld.txt +++ /dev/null @@ -1,6 +0,0 @@ -English: Hello World -Greek: Γειά σου κόσμος -Polish: Witaj świecie -Portuguese: Olá mundo -Russian: Здравствулте мир -Vietnamese: Xin chào thế giới diff --git a/sources/doc/tfpdf/README.txt b/sources/doc/tfpdf/README.txt deleted file mode 100644 index 212128b..0000000 --- a/sources/doc/tfpdf/README.txt +++ /dev/null @@ -1,15 +0,0 @@ -tFPDF accepts UTF-8 encoded text. It embeds font subsets allowing small PDF files. - -It requires a folder 'unifont' as a subfolder of the 'font' folder. - -You should make the 'unifont' folder writeable (CHMOD 755 or 644). Although this -is not essential, it allows caching of the font metrics the first time a font is used, -making subsequent uses much faster. - -All tFPDF requires is a .ttf TrueType font file. The file should be placed in the -'unifont' directory. Optionally, you can also define the path to your system fonts e.g. 'C:\Windows\Font' -(see the example ex.php file) and reference TrueType fonts in this directory. - -Pass a fourth parameter as true when calling AddFont(), and use utf-8 encoded text -when using Write() etc. - diff --git a/sources/doc/tfpdf/ex.pdf b/sources/doc/tfpdf/ex.pdf deleted file mode 100644 index f204693..0000000 Binary files a/sources/doc/tfpdf/ex.pdf and /dev/null differ diff --git a/sources/doc/tfpdf/ex.php b/sources/doc/tfpdf/ex.php deleted file mode 100644 index a9cf301..0000000 --- a/sources/doc/tfpdf/ex.php +++ /dev/null @@ -1,26 +0,0 @@ -AddPage(); - -// Add a Unicode font (uses UTF-8) -$pdf->AddFont('DejaVu','','DejaVuSansCondensed.ttf',true); -$pdf->SetFont('DejaVu','',14); - -// Load a UTF-8 string from a file and print it -$txt = file_get_contents('HelloWorld.txt'); -$pdf->Write(8,$txt); - -// Select a standard font (uses windows-1252) -$pdf->SetFont('Arial','',14); -$pdf->Ln(10); -$pdf->Write(5,'The file size of this PDF is only 17 KB.'); - -$pdf->Output(); -?> diff --git a/sources/doc/tfpdf/info.htm b/sources/doc/tfpdf/info.htm deleted file mode 100644 index 962ee07..0000000 --- a/sources/doc/tfpdf/info.htm +++ /dev/null @@ -1,32 +0,0 @@ - - - - -tFPDF - - - -

tFPDF

-

Informations

-Author: Ian Back
-License: LGPL -

Description

-This class is a modified version of FPDF that adds UTF-8 support. Moreover, it embeds only -the necessary parts of the fonts that are used in the document, making the file size much -smaller than if the whole fonts were embedded. These features were originally developed -for the mPDF project.
-
-To use a Unicode font in your script, pass the font file name as third parameter of -AddFont() and true as fourth parameter. The font may be located -either in the font/unifont directory or directly in the system font folder (in case the -_SYSTEM_TTFONTS constant is defined). -The package ships with the DejaVu -font family.
-
-Note: this class requires the mbstring extension. - - diff --git a/sources/doc/xmlwriter.php b/sources/doc/xmlwriter.php deleted file mode 100755 index f6985cb..0000000 --- a/sources/doc/xmlwriter.php +++ /dev/null @@ -1,77 +0,0 @@ -indent = $indent; - $this->xml = ''."\n"; - } - function _indent() { - for ($i = 0, $j = count($this->stack); $i < $j; $i++) { - $this->xml .= $this->indent; - } - } - function push($element, $attributes = array()) { - $this->_indent(); - $this->xml .= '<'.$element; - foreach ($attributes as $key => $value) { - $this->xml .= ' '.$key.'="'.htmlentities($value).'"'; - } - $this->xml .= ">\n"; - $this->stack[] = $element; - } - function element($element, $content, $attributes = array()) { - $this->_indent(); - $this->xml .= '<'.$element; - foreach ($attributes as $key => $value) { - $this->xml .= ' '.$key.'="'.htmlentities($value).'"'; - } - $this->xml .= '>'.htmlentities($content).''."\n"; - } - function emptyelement($element, $attributes = array()) { - $this->_indent(); - $this->xml .= '<'.$element; - foreach ($attributes as $key => $value) { - $this->xml .= ' '.$key.'="'.htmlentities($value).'"'; - } - $this->xml .= " />\n"; - } - function pop() { - $element = array_pop($this->stack); - $this->_indent(); - $this->xml .= "\n"; - } - function getXml() { - return $this->xml; - } -} - -/* Test - -$xml = new XmlWriter(); -$array = array( - array('monkey', 'banana', 'Jim'), - array('hamster', 'apples', 'Kola'), - array('turtle', 'beans', 'Berty'), -); - -$xml->push('zoo'); -foreach ($array as $animal) { - $xml->push('animal', array('species' => $animal[0])); - $xml->element('name', $animal[2]); - $xml->element('food', $animal[1]); - $xml->pop(); -} -$xml->pop(); - -print $xml->getXml(); - -*/ -?> - diff --git a/sources/extra_files/app/.gitignore b/sources/extra_files/app/.gitignore new file mode 100644 index 0000000..783a4ae --- /dev/null +++ b/sources/extra_files/app/.gitignore @@ -0,0 +1,2 @@ +*~ +*.sw[op] diff --git a/sources/html/.cvsignore b/sources/html/.cvsignore deleted file mode 100755 index 0d3c38d..0000000 --- a/sources/html/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.log -ajax diff --git a/sources/html/admin/setup.js b/sources/html/admin/setup.js deleted file mode 100644 index 3e0d95c..0000000 --- a/sources/html/admin/setup.js +++ /dev/null @@ -1,30 +0,0 @@ -//This file is part of NOALYSS and is under GPL -//see licence.txt -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - -content[200]="Indiquez ici le récuterpertoire où les documents temporaires peuvent être sauvés exemple c:/temp, /tmp" -content[201]="Désactiver le changement de langue (requis pour MacOSX)"; -content[202]="Le chemin vers le repertoire contenant psql, pg_dump..."; -content[203]="Utilisateur de la base de donnée postgresql"; -content[204]="Mot de passe de l'utilisateur "; -content[205]="Port de postgresql"; -content[206]="En version mono dossier, le nom de la base de données doit être mentionné"; -content[207]="Vous devez choisir si NOALYSS est installé sur l'un de vos servers ou sur un server mutualisé qui ne donne qu'une seule base de données"; - - -function show_dbname(obj) { - try { - if (obj.checked === true) - { - this.document.getElementById('div_db').style.visibility= 'visible'; - } - else { - this.document.getElementById('div_db').style.visibility= 'hidden'; - } - } catch (e) { - alert_box(e.getMessage); - } -} diff --git a/sources/html/admin/setup.php b/sources/html/admin/setup.php deleted file mode 100644 index bfd9ca1..0000000 --- a/sources/html/admin/setup.php +++ /dev/null @@ -1,596 +0,0 @@ - - - Noalyss - Mise à jour - - - - - - - - - - -

- NOALYSS -

- -
- - - -✖"; -$succeed=""; -$inc_path=get_include_path(); -global $os; -$inc_path=get_include_path(); -global $os; -if ( strpos($inc_path,";") != 0 ) { - $new_path=$inc_path.';../../include;addon'; - $os=0; /* $os is 0 for windoz */ -} else { - $new_path=$inc_path.':../../include:addon'; - $os=1; /* $os is 1 for unix */ -} - -/** - *@brief create correctly the htaccess file - */ -function create_htaccess() -{ - global $os; - - - /* If htaccess file doesn't exists we create them here - * if os == 1 then windows, 0 means Unix - */ - $file='..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'.htaccess'; - if (! file_exists($file)) - { - $hFile=@fopen($file,'w+'); - if ( ! $hFile ) exit('Impossible d\'écrire dans le répertoire include'); - fwrite($hFile,'order deny,allow'."\n"); - fwrite($hFile,'deny from all'."\n"); - fclose($hFile); - } - $file='..'.DIRECTORY_SEPARATOR.'.htaccess'; - if (! file_exists($file)) - { - - $hFile=@fopen($file,'w+'); - if ( ! $hFile ) exit('Impossible d\'écrire dans le répertoire html'); - $array=array("php_flag magic_quotes_gpc off", - "php_value max_execution_time 240", - "php_value memory_limit 20M", - "AddDefaultCharset utf-8", - "php_flag register_globals off", - "php_value error_reporting 10239", - "php_value post_max_size 20M", - "php_flag short_open_tag on", - "php_value upload_max_filesize 20M", - "php_value session.use_trans_sid 1", - "php_value session.use_cookies 1", - "php_flag session.use_only_cookies on"); - - if ( $os == 0 ) - fwrite($hFile,'php_value include_path .;../../include;../include;addon'."\n"); - else - fwrite($hFile,'php_value include_path .:../../include:../include:addon'."\n"); - foreach ($array as $value ) fwrite($hFile,$value."\n"); - fclose($hFile); - } - -} - -/* The config file is created here */ -if (isset($_POST['save_config'])) { - require_once '../../include/config_file.php'; - $url=config_file_create($_POST,1,$os); -echo ' -
- Les informations sont sauvées vous pouvez continuer - -
'; - exit(); - } -if ( is_writable ('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'constant.php') == false ) { - echo '

'._("Ecriture non possible").'

'. - '

'. - _("On ne peut pas écrire dans le répertoire de NOALYSS, changez-en les droits ") - .'

'; - exit(); - } - - -if ( ! file_exists('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'config.inc.php')) { - echo '

'._('Entrez les informations nécessaires à noalyss').'

'; - echo '
'; - require_once('../../include/config_file.php'); - echo config_file_form(); - echo '
'; - echo '

', - HtmlInput::submit('save_config',_('Sauver la configuration'),"","button"), - '

'; - echo ""; - echo '
'; - exit(); -} - -//---------------------------------------------------------------------- -// End functions -// -//---------------------------------------------------------------------- - -// Verify some PHP parameters -// magic_quotes_gpc = Off -// magic_quotes_runtime = Off -// magic_quotes_sybase = Off -// include_path -require_once NOALYSS_INCLUDE.'/config_file.php'; -require_once NOALYSS_INCLUDE.'/class_database.php'; - -if ( defined ("MULTI") && MULTI==1) { create_htaccess();} - -echo '

'._('Configuration').'

'; -?> -

Info

-Vous utilisez le domaine -

PHP

-"; -foreach (array('magic_quotes_gpc','magic_quotes_runtime') as $a) { -echo "
  • "; - if ( ini_get($a) == false ) print $a.': '.$succeed; - else { - print $a.': '.$failed; - print ("

    $a a une mauvaise valeur !

    "); - $flag_php++; - } - -echo "
  • "; -} -$module=get_loaded_extensions(); - -echo "
  • "; -$str_error_message=_('Vous devez installer ou activer l\'extension %s '); -if ( in_array('mbstring',$module) == false ){ - echo 'module mbstring '.$failed; - echo '', - sprintf($str_error_message, "mbstring"), - ' '; - $flag_php++; -} else echo 'module mbstring '.$succeed; -echo "
  • "; - -echo "
  • "; -if ( in_array('pgsql',$module) == false ) -{ - echo 'module PGSQL '.$failed; - echo '', - sprintf($str_error_message, "psql"), - ' '; - $flag_php++; -} else echo 'module PGSQL '.$succeed; -echo "
  • "; - -echo "
  • "; -if ( in_array('bcmath',$module) == false ) -{ - echo 'module BCMATH ok '.$failed; - echo '', - sprintf($str_error_message, "bcmath"), - ' '; - $flag_php++; -} else echo 'module BCMATH '.$succeed; -echo "
  • "; - -echo "
  • "; -if (in_array('gettext',$module) == false ) -{ - echo 'module GETTEXT '.$failed; - echo '', - sprintf($str_error_message, "gettext"), - ' '; - $flag_php++; -} else echo 'module GETTEXT '.$succeed; -echo "
  • "; - -echo "
  • "; -if ( in_array('zip',$module) == false ) -{ - echo 'module ZIP '.$failed; - echo '', - sprintf($str_error_message, "zip"), - ' '; - $flag_php++; -} else echo 'module ZIP '.$succeed; -echo "
  • "; -echo "
  • "; -if ( in_array('gd',$module) == false ) -{ - echo 'module GD '.$failed; - echo '', - sprintf($str_error_message, "gd"), - ' '; - $flag_php++; -} else echo 'module GD '.$succeed; -echo "
  • "; - -if ( ini_get("max_execution_time") < 60 ) { - echo "
  • "; - echo _('Avertissement').' : '.$failed; - echo ' ', - _("max_execution_time devrait être de 60 minimum"), - ''; - echo "
  • "; -} - -if ( ini_get("register_globals") == true) { - echo "
  • "; - echo _('Avertissement').' : '.$failed; - print ' register_globals doit être à off'; - echo "
  • "; - $flag_php++; -} - -if ( ini_get("session.use_trans_sid") == false ) { - echo "
  • "; - echo _('Avertissement').' : '.$failed; - print ' avertissement session.use_trans_sid should be set to true '; - echo "
  • "; -} - -echo ""; - - echo ""; -if ( $flag_php==0 ) { - echo '

    php.ini est bien configuré '.$succeed.'

    '; -} else { - echo '

    php mal configuré '.$failed.'

    '; -} -/* check user */ -if ( (defined("MULTI") && MULTI==1)|| !defined("MULTI")) -{ - - $cn=new Database(-1,'template'); -} else -{ - $cn=new Database(); -} - -?> -

    Base de données

    -get_value($sql); - -echo "Version base de données :",$version; - -if ( $version[0] < 8 || - ($version[0]=='8' && $version[2]<4) - ) - { -?> -

    Vous devez absolument utiliser au minimum une version 8.4 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 -

    - -

    Paramètre base de données

    -count_sql($sql); -if ( $Res==0) { ?> -

    Vous devez installer le langage plpgsql pour permettre aux fonctions SQL de fonctionner.

    -

    Pour cela, sur la ligne de commande en tant qu\'utilisateur postgres, faites createlang plpgsql template1 -

    - -exec_sql($sql); -$flag=0; -for ($e=0;$e<$cn->size();$e++) { - $a=$cn->fetch($e); - switch ($a['name']){ - case 'effective_cache_size': - if ( $a['setting'] < 1000 ){ - - print '

    '.$failed.'Attention le paramètre effective_cache_size est de '. - $a['setting']." au lieu de 1000

    "; - $flag++; - } - break; - case 'shared_buffers': - if ( $a['setting'] < 640 ){ - print '

    '.$failed.'Attention le paramètre shared_buffer est de '. - $a['setting']."au lieu de 640

    "; - $flag++; - } - break; - } - } -if ( $flag == 0 ) { - echo '

    La base de données est bien configurée '.$succeed.'

    '; - } else { - echo '

    '.$failed.'Il y a '.$flag.' paramètre qui sont trop bas

    '; - } -if ( ! isset($_POST['go']) ) { -?> - -
    -"> -
    -
    -count_sql("select * from pg_database where datname=lower('" . domaine . "account_repository')"); - else - $account=1; - -// Create the account_repository -if ($account == 0 ) { - - echo "Creation of ".domaine."account_repository"; - if ( ! DEBUG) ob_start(); - $cn->exec_sql("create database ".domaine."account_repository encoding='utf8'"); - $cn=new Database(); - $cn->start(); - $cn->execute_script("sql/account_repository/schema.sql"); - $cn->execute_script("sql/account_repository/data.sql"); - $cn->execute_script("sql/account_repository/constraint.sql"); - $cn->commit($cn); - - if ( ! DEBUG) ob_end_clean(); - - echo "Creation of Modele1"; - if ( ! DEBUG) ob_start(); - $cn->exec_sql("create database ".domaine."mod1 encoding='utf8'"); - - $cn=new Database(1,'mod'); - $cn->start(); - $cn->execute_script('sql/mod1/schema.sql'); - $cn->execute_script('sql/mod1/data.sql'); - $cn->execute_script('sql/mod1/constraint.sql'); - $cn->commit(); - - if ( ! DEBUG) ob_end_clean(); - - echo "Creation of Modele2"; - $cn->exec_sql("create database ".domaine."mod2 encoding='utf8'"); - $cn=new Database(2,'mod'); - $cn->start(); - if ( ! DEBUG) { ob_start(); } - $cn->execute_script('sql/mod1/schema.sql'); - $cn->execute_script('sql/mod2/data.sql'); - $cn->execute_script('sql/mod1/constraint.sql'); - $cn->commit(); - - if ( ! DEBUG) ob_end_clean(); - - }// end if -// Add a french accountancy model -//-- -$cn=new Database(); - -echo "

    Mise a jour du systeme

    "; -echo "

    Mise à jour dossier

    "; -if (defined("MULTI") && MULTI == 0) -{ - $db = new Database(); - if ($db->exist_table("version") == false) - { - echo '

    ' . $failed . 'La base de donnée ' . dbname . ' est vide, veuillez executer noalyss/contrib/mono-dossier/mono.sql - puis faites un seul de ces choix : -

      -
    • soit noalyss/contrib/mono-dossier/mono-france.sql pour la comptabilité française
    • -
    • soit noalyss/contrib/mono-dossier/mono-belge.sql pour la comptabilité belge
    • -
    • soit y restaurer un backup ou un modèle
    • -
    -

    '; - exit(); - } - echo "

    Patching " . dbname . '

    '; - $db->apply_patch(dbname); - echo "

    Tout est installé $succeed"; - - echo "

    Mise à jour Repository

    "; - if ( DEBUG == false ) ob_start(); - $MaxVersion=DBVERSIONREPO-1; - for ($i=4;$i<= $MaxVersion;$i++) - { - if ( $db->get_value (' select val from repo_version') <= $i ) { - $db->execute_script('sql/patch/ac-upgrade'.$i.'.sql'); - } - } - - ?> -

    - Connectez-vous à NOALYSS -

    - exec_sql("select dos_id, dos_name from ac_dossier"); -$MaxDossier=$cn->size($Resdossier); - -//---------------------------------------------------------------------- -// Upgrade the folders -//---------------------------------------------------------------------- - -for ($e=0;$e < $MaxDossier;$e++) { - $db_row=Database::fetch_array($Resdossier,$e); - echo "

    Patching ".$db_row['dos_name'].'

    '; - - $name=$cn->format_name($db_row['dos_id'],'dos'); - - if ( $cn->exist_database($name)> 0 ) - { - $db=new Database($db_row['dos_id'],'dos'); - $db->apply_patch($db_row['dos_name']); - Dossier::synchro_admin($db_row['dos_id']); - - } else - { - echo_warning(_("Dossier inexistant")." $name"); - } - } - -//---------------------------------------------------------------------- -// Upgrade the template -//---------------------------------------------------------------------- -$Resdossier=$cn->exec_sql("select mod_id, mod_name from modeledef"); -$MaxDossier=$cn->size(); -echo "

    Mise à jour modèle

    "; - -for ($e=0;$e < $MaxDossier;$e++) { - $db_row=Database::fetch_array($Resdossier,$e); - echo "

    Patching ".$db_row['mod_name']."

    "; - $name=$cn->format_name($db_row['mod_id'],'mod'); - - if ( $cn->exist_database($name)> 0 ) - { - $db=new Database($db_row['mod_id'],'mod'); - $db->apply_patch($db_row['mod_name']); - } else - { - echo_warning(_("Modèle inexistant")." $name"); - } - } - -//---------------------------------------------------------------------- -// Upgrade the account_repository -//---------------------------------------------------------------------- - echo "

    Mise à jour Repository

    "; - $cn=new Database(); - if ( DEBUG == false ) ob_start(); - $MaxVersion=DBVERSIONREPO-1; - for ($i=4;$i<= $MaxVersion;$i++) - { - if ( $cn->get_version() <= $i ) { - $cn->execute_script('sql/patch/ac-upgrade'.$i.'.sql'); - } - } - - if (! DEBUG) ob_end_clean(); - echo "

    Tout est installé $succeed"; -?> -

    -

    -Connectez-vous à NOALYSS -

    \ No newline at end of file diff --git a/sources/html/admin/sql/account_repository/comment.sql b/sources/html/admin/sql/account_repository/comment.sql deleted file mode 100644 index fe1826f..0000000 --- a/sources/html/admin/sql/account_repository/comment.sql +++ /dev/null @@ -1,4 +0,0 @@ -COMMENT ON TABLE user_global_pref IS 'The user''s global parameter '; -COMMENT ON COLUMN 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 user_global_pref.parameter_value IS 'the value of parameter '; diff --git a/sources/html/admin/sql/account_repository/constraint.sql b/sources/html/admin/sql/account_repository/constraint.sql deleted file mode 100644 index c13d9d6..0000000 --- a/sources/html/admin/sql/account_repository/constraint.sql +++ /dev/null @@ -1,22 +0,0 @@ - SET client_encoding = 'utf8'; - SET check_function_bodies = false; - SET client_min_messages = warning; -SET search_path = public, pg_catalog; -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 jnt_use_dos - ADD CONSTRAINT jnt_use_dos_pkey PRIMARY KEY (use_id, dos_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 priv_user - ADD CONSTRAINT priv_user_pkey PRIMARY KEY (priv_id); -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; diff --git a/sources/html/admin/sql/account_repository/data.sql b/sources/html/admin/sql/account_repository/data.sql deleted file mode 100644 index c7e6946..0000000 --- a/sources/html/admin/sql/account_repository/data.sql +++ /dev/null @@ -1,114 +0,0 @@ --- --- PostgreSQL database dump --- - -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = off; -SET check_function_bodies = false; -SET client_min_messages = warning; -SET escape_string_warning = off; - -SET search_path = public, pg_catalog; - --- --- Name: dossier_id; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('dossier_id', 24, true); - - --- --- Name: s_modid; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('s_modid', 8, true); - - --- --- Name: seq_jnt_use_dos; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_jnt_use_dos', 28, true); - - --- --- Name: seq_priv_user; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('seq_priv_user', 12, true); - - --- --- Name: users_id; Type: SEQUENCE SET; Schema: public; Owner: - --- - -SELECT pg_catalog.setval('users_id', 5, true); - - --- --- Data for Name: ac_dossier; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: ac_users; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO ac_users (use_id, use_first_name, use_name, use_login, use_active, use_pass, use_admin) VALUES (4, 'demo', 'demo', 'demo', 1, 'fe01ce2a7fbac8fafaed7c982a04e229', 0); -INSERT INTO ac_users (use_id, use_first_name, use_name, use_login, use_active, use_pass, use_admin) VALUES (1, NULL, NULL, 'phpcompta', 1, 'b1cc88e1907cde80cb2595fa793b3da9', 1); - - --- --- Data for Name: jnt_use_dos; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: modeledef; Type: TABLE DATA; Schema: public; Owner: - --- - -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'); - - --- --- Data for Name: priv_user; Type: TABLE DATA; Schema: public; Owner: - --- - - - --- --- Data for Name: theme; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO theme (the_name, the_filestyle, the_filebutton) VALUES ('classic', 'style.css', NULL); -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 ('Colored', 'style-color.css', NULL); - - --- --- Data for Name: user_global_pref; Type: TABLE DATA; Schema: public; Owner: - --- - -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 ('phpcompta', 'PAGESIZE', '50'); -INSERT INTO user_global_pref (user_id, parameter_type, parameter_value) VALUES ('demo', 'THEME', 'classic'); -INSERT INTO user_global_pref (user_id, parameter_type, parameter_value) VALUES ('phpcompta', 'THEME', 'classic'); -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 ('phpcompta', 'LANG', 'fr_FR.utf8'); -INSERT INTO user_global_pref (user_id, parameter_type, parameter_value) VALUES ('phpcompta', 'TOPMENU', 'TEXT'); - - --- --- Data for Name: version; Type: TABLE DATA; Schema: public; Owner: - --- - -INSERT INTO version (val) VALUES (11); - - --- --- PostgreSQL database dump complete --- - diff --git a/sources/html/admin/sql/account_repository/function.sql b/sources/html/admin/sql/account_repository/function.sql deleted file mode 100644 index e69de29..0000000 diff --git a/sources/html/admin/sql/account_repository/index.sql b/sources/html/admin/sql/account_repository/index.sql deleted file mode 100644 index 5f56296..0000000 --- a/sources/html/admin/sql/account_repository/index.sql +++ /dev/null @@ -1,2 +0,0 @@ -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); diff --git a/sources/html/admin/sql/account_repository/make-sql b/sources/html/admin/sql/account_repository/make-sql deleted file mode 100755 index 6d2bd31..0000000 --- a/sources/html/admin/sql/account_repository/make-sql +++ /dev/null @@ -1,21 +0,0 @@ -pg_dump -O -U phpcompta -s ${DOMAIN}account_repository | awk '!/--/ {if ( ! /^$/) print $0;}'|grep -v "COMMENT ON SCHEMA public IS 'Standard public schema';" > 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 FUNCTION/,/LANGUAGE/ { print $0;}' < schema.sql > function.sql -awk '/COMMENT/,/;/ {print $0;}' < schema.sql > comment.sql -sed -i -e "/ALTER TABLE.*/d" -e "/ADD CONSTRAINT/d" -e "/CREATE PROCEDURAL.*/d" schema.sql - -grep setval schema.sql >> sequence.sql -pg_dump -U phpcompta -D -a -O ${DOMAIN}account_repository > data.sql - diff --git a/sources/html/admin/sql/account_repository/schema.sql b/sources/html/admin/sql/account_repository/schema.sql deleted file mode 100644 index 0a9f8ba..0000000 --- a/sources/html/admin/sql/account_repository/schema.sql +++ /dev/null @@ -1,83 +0,0 @@ -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = off; -SET check_function_bodies = false; -SET client_min_messages = warning; -SET escape_string_warning = off; -SET search_path = public, pg_catalog; -SET default_tablespace = ''; -SET default_with_oids = false; -CREATE TABLE ac_dossier ( - dos_id integer DEFAULT nextval(('dossier_id'::text)::regclass) NOT NULL, - dos_name text NOT NULL, - dos_description text, - dos_jnt_user integer DEFAULT 0 -); -CREATE TABLE ac_users ( - use_id integer DEFAULT nextval(('users_id'::text)::regclass) NOT NULL, - use_first_name text, - use_name text, - use_login text NOT NULL, - use_active integer DEFAULT 0, - use_pass text, - use_admin integer DEFAULT 0, - CONSTRAINT ac_users_use_active_check CHECK (((use_active = 0) OR (use_active = 1))) -); -CREATE SEQUENCE dossier_id - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE TABLE 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 ( - mod_id integer DEFAULT nextval(('s_modid'::text)::regclass) NOT NULL, - mod_name text NOT NULL, - mod_desc text -); -CREATE TABLE priv_user ( - priv_id integer DEFAULT nextval(('seq_priv_user'::text)::regclass) NOT NULL, - priv_jnt integer NOT NULL, - priv_priv text -); -CREATE SEQUENCE s_modid - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_jnt_use_dos - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_priv_user - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE TABLE theme ( - the_name text NOT NULL, - the_filestyle text, - the_filebutton text -); -CREATE TABLE user_global_pref ( - user_id text NOT NULL, - parameter_type text NOT NULL, - parameter_value text -); -COMMENT ON TABLE user_global_pref IS 'The user''s global parameter '; -COMMENT ON COLUMN 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 user_global_pref.parameter_value IS 'the value of parameter '; -CREATE SEQUENCE users_id - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE TABLE version ( - val integer -); -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); diff --git a/sources/html/admin/sql/account_repository/sequence.sql b/sources/html/admin/sql/account_repository/sequence.sql deleted file mode 100644 index dedfacf..0000000 --- a/sources/html/admin/sql/account_repository/sequence.sql +++ /dev/null @@ -1,25 +0,0 @@ -CREATE SEQUENCE dossier_id - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_modid - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_jnt_use_dos - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_priv_user - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE users_id - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; diff --git a/sources/html/admin/sql/account_repository/table.sql b/sources/html/admin/sql/account_repository/table.sql deleted file mode 100644 index d56f15b..0000000 --- a/sources/html/admin/sql/account_repository/table.sql +++ /dev/null @@ -1,44 +0,0 @@ -CREATE TABLE ac_dossier ( - dos_id integer DEFAULT nextval(('dossier_id'::text)::regclass) NOT NULL, - dos_name text NOT NULL, - dos_description text, - dos_jnt_user integer DEFAULT 0 -); -CREATE TABLE ac_users ( - use_id integer DEFAULT nextval(('users_id'::text)::regclass) NOT NULL, - use_first_name text, - use_name text, - use_login text NOT NULL, - use_active integer DEFAULT 0, - use_pass text, - use_admin integer DEFAULT 0, - CONSTRAINT ac_users_use_active_check CHECK (((use_active = 0) OR (use_active = 1))) -); -CREATE TABLE 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 ( - mod_id integer DEFAULT nextval(('s_modid'::text)::regclass) NOT NULL, - mod_name text NOT NULL, - mod_desc text -); -CREATE TABLE priv_user ( - priv_id integer DEFAULT nextval(('seq_priv_user'::text)::regclass) NOT NULL, - priv_jnt integer NOT NULL, - priv_priv text -); -CREATE TABLE theme ( - the_name text NOT NULL, - the_filestyle text, - the_filebutton text -); -CREATE TABLE user_global_pref ( - user_id text NOT NULL, - parameter_type text NOT NULL, - parameter_value text -); -CREATE TABLE version ( - val integer -); diff --git a/sources/html/admin/sql/account_repository/view.sql b/sources/html/admin/sql/account_repository/view.sql deleted file mode 100644 index e69de29..0000000 diff --git a/sources/html/admin/sql/make-sql b/sources/html/admin/sql/make-sql deleted file mode 100755 index 9a733d6..0000000 --- a/sources/html/admin/sql/make-sql +++ /dev/null @@ -1,6 +0,0 @@ -for i in account_repository mod1 mod2;do -echo "In the folder $i" -cd $i -./make-sql -cd .. -done diff --git a/sources/html/admin/sql/mod1/comment.sql b/sources/html/admin/sql/mod1/comment.sql deleted file mode 100644 index 547b138..0000000 --- a/sources/html/admin/sql/mod1/comment.sql +++ /dev/null @@ -1,99 +0,0 @@ -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 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_cal IS ' visible in the calendar if = C'; -COMMENT ON COLUMN action_gestion.ag_ref_ag_id IS ' concerning the action '; -COMMENT ON COLUMN action_gestion.ag_comment IS ' comment of the action'; -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 person who 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 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 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 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 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 import_tmp IS 'Table temporaire pour l''importation des banques en format CSV'; -COMMENT ON COLUMN import_tmp.status IS 'Status w waiting, d delete t transfert'; -COMMENT ON TABLE info_def IS 'Contains the types of additionnal info we can add to a operation'; -COMMENT ON TABLE jnt_fic_att_value IS 'join between the card and the attribut definition'; -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 TABLE jrn_action IS 'Possible action when we are in journal (menu)'; -COMMENT ON TABLE jrn_def IS 'Definition of a journal, his properties'; -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 mod_payment IS 'Contains the different media of payment and the corresponding ledger'; -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 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 quant_sold IS 'Contains about invoice for customer'; -COMMENT ON TABLE stock_goods IS 'About the goods'; -COMMENT ON TABLE tmp_pcmn IS 'Plan comptable minimum normalisé'; -COMMENT ON TABLE todo_list IS 'Todo list'; -COMMENT ON TABLE tva_rate IS 'Rate of vat'; -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_extension IS 'Security for extension'; -COMMENT ON VIEW vw_fiche_def IS 'all the attributs for card family'; -COMMENT ON TRIGGER action_gestion_t_insert_update ON action_gestion IS 'Truncate the column ag_title to 70 char'; diff --git a/sources/html/admin/sql/mod1/constraint.sql b/sources/html/admin/sql/mod1/constraint.sql deleted file mode 100644 index d25f1b0..0000000 --- a/sources/html/admin/sql/mod1/constraint.sql +++ /dev/null @@ -1,236 +0,0 @@ - SET client_encoding = 'utf8'; - SET check_function_bodies = false; - SET client_min_messages = warning; -SET search_path = public, pg_catalog; -ALTER TABLE action_detail ALTER COLUMN ad_id SET DEFAULT nextval('action_detail_ad_id_seq'::regclass); -ALTER TABLE del_action ALTER COLUMN del_id SET DEFAULT nextval('del_action_del_id_seq'::regclass); -ALTER TABLE extension ALTER COLUMN ex_id SET DEFAULT nextval('extension_ex_id_seq'::regclass); -ALTER TABLE forecast ALTER COLUMN f_id SET DEFAULT nextval('forecast_f_id_seq'::regclass); -ALTER TABLE forecast_cat ALTER COLUMN fc_id SET DEFAULT nextval('forecast_cat_fc_id_seq'::regclass); -ALTER TABLE forecast_item ALTER COLUMN fi_id SET DEFAULT nextval('forecast_item_fi_id_seq'::regclass); -ALTER TABLE jnt_letter ALTER COLUMN jl_id SET DEFAULT nextval('jnt_letter_jl_id_seq'::regclass); -ALTER TABLE jrn_info ALTER COLUMN ji_id SET DEFAULT nextval('jrn_info_ji_id_seq'::regclass); -ALTER TABLE letter_cred ALTER COLUMN lc_id SET DEFAULT nextval('letter_cred_lc_id_seq'::regclass); -ALTER TABLE letter_deb ALTER COLUMN ld_id SET DEFAULT nextval('letter_deb_ld_id_seq'::regclass); -ALTER TABLE mod_payment ALTER COLUMN mp_id SET DEFAULT nextval('mod_payment_mp_id_seq'::regclass); -ALTER TABLE user_sec_extension ALTER COLUMN use_id SET DEFAULT nextval('user_sec_extension_use_id_seq'::regclass); -ALTER TABLE ONLY action_detail - ADD CONSTRAINT action_detail_pkey PRIMARY KEY (ad_id); -ALTER TABLE ONLY action_gestion - ADD CONSTRAINT action_gestion_pkey PRIMARY KEY (ag_id); -ALTER TABLE ONLY action - ADD CONSTRAINT action_pkey PRIMARY KEY (ac_id); -ALTER TABLE ONLY attr_def - ADD CONSTRAINT attr_def_pkey PRIMARY KEY (ad_id); -ALTER TABLE ONLY bilan - ADD CONSTRAINT bilan_b_name_key UNIQUE (b_name); -ALTER TABLE ONLY bilan - ADD CONSTRAINT bilan_pkey PRIMARY KEY (b_id); -ALTER TABLE ONLY centralized - ADD CONSTRAINT centralized_pkey PRIMARY KEY (c_id); -ALTER TABLE ONLY del_action - ADD CONSTRAINT del_action_pkey PRIMARY KEY (del_id); -ALTER TABLE ONLY document_modele - ADD CONSTRAINT document_modele_pkey PRIMARY KEY (md_id); -ALTER TABLE ONLY document - ADD CONSTRAINT document_pkey PRIMARY KEY (d_id); -ALTER TABLE ONLY document_state - ADD CONSTRAINT document_state_pkey PRIMARY KEY (s_id); -ALTER TABLE ONLY document_type - ADD CONSTRAINT document_type_pkey PRIMARY KEY (dt_id); -ALTER TABLE ONLY fiche_def - ADD CONSTRAINT fiche_def_pkey PRIMARY KEY (fd_id); -ALTER TABLE ONLY fiche_def_ref - ADD CONSTRAINT fiche_def_ref_pkey PRIMARY KEY (frd_id); -ALTER TABLE ONLY fiche - ADD CONSTRAINT fiche_pkey PRIMARY KEY (f_id); -ALTER TABLE ONLY forecast_cat - ADD CONSTRAINT forecast_cat_pk PRIMARY KEY (fc_id); -ALTER TABLE ONLY forecast_item - ADD CONSTRAINT forecast_item_pkey PRIMARY KEY (fi_id); -ALTER TABLE ONLY forecast - ADD CONSTRAINT forecast_pk PRIMARY KEY (f_id); -ALTER TABLE ONLY form - ADD CONSTRAINT form_pkey PRIMARY KEY (fo_id); -ALTER TABLE ONLY format_csv_banque - ADD CONSTRAINT format_csv_banque_pkey PRIMARY KEY (name); -ALTER TABLE ONLY formdef - ADD CONSTRAINT formdef_pkey PRIMARY KEY (fr_id); -ALTER TABLE ONLY operation_analytique - ADD CONSTRAINT historique_analytique_pkey PRIMARY KEY (oa_id); -ALTER TABLE ONLY extension - ADD CONSTRAINT idx_ex_code UNIQUE (ex_code); -ALTER TABLE ONLY info_def - ADD CONSTRAINT info_def_pkey PRIMARY KEY (id_type); -ALTER TABLE ONLY del_jrnx - ADD CONSTRAINT j_id PRIMARY KEY (j_id); -ALTER TABLE ONLY jnt_fic_att_value - ADD CONSTRAINT jnt_fic_att_value_pkey PRIMARY KEY (jft_id); -ALTER TABLE ONLY jnt_letter - ADD CONSTRAINT jnt_letter_pk PRIMARY KEY (jl_id); -ALTER TABLE ONLY del_jrn - ADD CONSTRAINT jr_id PRIMARY KEY (jr_id); -ALTER TABLE ONLY jrn_action - ADD CONSTRAINT jrn_action_pkey PRIMARY KEY (ja_id); -ALTER TABLE ONLY jrn_def - ADD CONSTRAINT jrn_def_jrn_def_name_key UNIQUE (jrn_def_name); -ALTER TABLE ONLY jrn_def - ADD CONSTRAINT jrn_def_pkey PRIMARY KEY (jrn_def_id); -ALTER TABLE ONLY jrn_info - ADD CONSTRAINT jrn_info_pkey PRIMARY KEY (ji_id); -ALTER TABLE ONLY jrn_periode - ADD CONSTRAINT jrn_periode_pk PRIMARY KEY (jrn_def_id, p_id); -ALTER TABLE ONLY jrn - ADD CONSTRAINT jrn_pkey PRIMARY KEY (jr_id, jr_def_id); -ALTER TABLE ONLY jrn_rapt - ADD CONSTRAINT jrn_rapt_pkey PRIMARY KEY (jra_id); -ALTER TABLE ONLY jrn_type - ADD CONSTRAINT jrn_type_pkey PRIMARY KEY (jrn_type_id); -ALTER TABLE ONLY jrnx - ADD CONSTRAINT jrnx_pkey PRIMARY KEY (j_id); -ALTER TABLE ONLY letter_cred - ADD CONSTRAINT letter_cred_pk PRIMARY KEY (lc_id); -ALTER TABLE ONLY letter_deb - ADD CONSTRAINT letter_deb_pk PRIMARY KEY (ld_id); -ALTER TABLE ONLY mod_payment - ADD CONSTRAINT mod_payment_pkey PRIMARY KEY (mp_id); -ALTER TABLE ONLY op_predef - ADD CONSTRAINT op_def_op_name_key UNIQUE (od_name, jrn_def_id); -ALTER TABLE ONLY op_predef - ADD CONSTRAINT op_def_pkey PRIMARY KEY (od_id); -ALTER TABLE ONLY op_predef_detail - ADD CONSTRAINT op_predef_detail_pkey PRIMARY KEY (opd_id); -ALTER TABLE ONLY parameter - ADD CONSTRAINT parameter_pkey PRIMARY KEY (pr_id); -ALTER TABLE ONLY parm_code - ADD CONSTRAINT parm_code_pkey PRIMARY KEY (p_code); -ALTER TABLE ONLY parm_money - ADD CONSTRAINT parm_money_pkey PRIMARY KEY (pm_code); -ALTER TABLE ONLY parm_periode - ADD CONSTRAINT parm_periode_pkey PRIMARY KEY (p_id); -ALTER TABLE ONLY parm_poste - ADD CONSTRAINT parm_poste_pkey PRIMARY KEY (p_value); -ALTER TABLE ONLY extension - ADD CONSTRAINT pk_extension PRIMARY KEY (ex_id); -ALTER TABLE ONLY groupe_analytique - ADD CONSTRAINT pk_ga_id PRIMARY KEY (ga_id); -ALTER TABLE ONLY jnt_fic_attr - ADD CONSTRAINT pk_jnt_fic_attr PRIMARY KEY (jnt_id); -ALTER TABLE ONLY user_local_pref - ADD CONSTRAINT pk_user_local_pref PRIMARY KEY (user_id, parameter_type); -ALTER TABLE ONLY plan_analytique - ADD CONSTRAINT plan_analytique_pa_name_key UNIQUE (pa_name); -ALTER TABLE ONLY plan_analytique - ADD CONSTRAINT plan_analytique_pkey PRIMARY KEY (pa_id); -ALTER TABLE ONLY poste_analytique - ADD CONSTRAINT poste_analytique_pkey PRIMARY KEY (po_id); -ALTER TABLE ONLY quant_purchase - ADD CONSTRAINT qp_id_pk PRIMARY KEY (qp_id); -ALTER TABLE ONLY quant_sold - ADD CONSTRAINT qs_id_pk PRIMARY KEY (qs_id); -ALTER TABLE ONLY stock_goods - ADD CONSTRAINT stock_goods_pkey PRIMARY KEY (sg_id); -ALTER TABLE ONLY tmp_pcmn - ADD CONSTRAINT tmp_pcmn_pkey PRIMARY KEY (pcm_val); -ALTER TABLE ONLY todo_list - ADD CONSTRAINT todo_list_pkey PRIMARY KEY (tl_id); -ALTER TABLE ONLY tva_rate - ADD CONSTRAINT tva_id_pk PRIMARY KEY (tva_id); -ALTER TABLE ONLY user_sec_act - ADD CONSTRAINT user_sec_act_pkey PRIMARY KEY (ua_id); -ALTER TABLE ONLY user_sec_extension - ADD CONSTRAINT user_sec_extension_ex_id_key UNIQUE (ex_id, use_login); -ALTER TABLE ONLY user_sec_extension - ADD CONSTRAINT user_sec_extension_pkey PRIMARY KEY (use_id); -ALTER TABLE ONLY user_sec_jrn - ADD CONSTRAINT user_sec_jrn_pkey PRIMARY KEY (uj_id); -ALTER TABLE ONLY jrn - ADD CONSTRAINT ux_internal UNIQUE (jr_internal); -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 jnt_fic_att_value - ADD CONSTRAINT "$1" FOREIGN KEY (f_id) REFERENCES fiche(f_id); -ALTER TABLE ONLY attr_value - ADD CONSTRAINT "$1" FOREIGN KEY (jft_id) REFERENCES jnt_fic_att_value(jft_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_action - ADD CONSTRAINT "$1" FOREIGN KEY (ja_jrn_type) REFERENCES jrn_type(jrn_type_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 jnt_fic_att_value - ADD CONSTRAINT "$2" FOREIGN KEY (ad_id) REFERENCES attr_def(ad_id); -ALTER TABLE ONLY jnt_fic_attr - ADD CONSTRAINT "$2" FOREIGN KEY (ad_id) REFERENCES attr_def(ad_id); -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 forecast_item - ADD CONSTRAINT card FOREIGN KEY (fi_card) 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 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 forecast_cat - ADD CONSTRAINT forecast_child FOREIGN KEY (f_id) REFERENCES forecast(f_id) ON UPDATE CASCADE ON DELETE CASCADE; -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 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 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_mp_fd_id_fkey FOREIGN KEY (mp_fd_id) REFERENCES fiche_def(fd_id); -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); -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 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_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 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; diff --git a/sources/html/admin/sql/mod1/data.sql b/sources/html/admin/sql/mod1/data.sql deleted file mode 100644 index 068950c..0000000 --- a/sources/html/admin/sql/mod1/data.sql +++ /dev/null @@ -1,1491 +0,0 @@ - -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = off; -SET check_function_bodies = false; -SET client_min_messages = warning; -SET escape_string_warning = off; - -SET search_path = public, pg_catalog; - - -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('bilan_b_id_seq', 4, true); - - - -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); - - - -SELECT pg_catalog.setval('del_action_del_id_seq', 1, false); - - - -SELECT pg_catalog.setval('document_d_id_seq', 1, false); - - - -SELECT pg_catalog.setval('document_modele_md_id_seq', 1, false); - - - -SELECT pg_catalog.setval('document_seq', 1, false); - - - -SELECT pg_catalog.setval('document_state_s_id_seq', 3, true); - - - -SELECT pg_catalog.setval('document_type_dt_id_seq', 25, false); - - - -SELECT pg_catalog.setval('extension_ex_id_seq', 1, true); - - - -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); - - - -SELECT pg_catalog.setval('historique_analytique_ha_id_seq', 1, false); - - - -SELECT pg_catalog.setval('s_jnt_id', 53, true); - - - -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('letter_cred_lc_id_seq', 1, false); - - - -SELECT pg_catalog.setval('letter_deb_ld_id_seq', 1, false); - - - -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); - - - -SELECT pg_catalog.setval('s_oa_group', 1, true); - - - -SELECT pg_catalog.setval('plan_analytique_pa_id_seq', 1, false); - - - -SELECT pg_catalog.setval('poste_analytique_po_id_seq', 1, false); - - - -SELECT pg_catalog.setval('s_attr_def', 27, true); - - - -SELECT pg_catalog.setval('s_cbc', 1, false); - - - -SELECT pg_catalog.setval('s_central', 1, false); - - - -SELECT pg_catalog.setval('s_central_order', 1, false); - - - -SELECT pg_catalog.setval('s_centralized', 1, false); - - - -SELECT pg_catalog.setval('s_currency', 1, true); - - - -SELECT pg_catalog.setval('s_fdef', 6, true); - - - -SELECT pg_catalog.setval('s_fiche', 20, true); - - - -SELECT pg_catalog.setval('s_fiche_def_ref', 16, true); - - - -SELECT pg_catalog.setval('s_form', 1, false); - - - -SELECT pg_catalog.setval('s_formdef', 1, false); - - - -SELECT pg_catalog.setval('s_grpt', 2, true); - - - -SELECT pg_catalog.setval('s_idef', 1, false); - - - -SELECT pg_catalog.setval('s_internal', 1, false); - - - -SELECT pg_catalog.setval('s_invoice', 1, false); - - - -SELECT pg_catalog.setval('s_isup', 1, false); - - - -SELECT pg_catalog.setval('s_jnt_fic_att_value', 371, true); - - - -SELECT pg_catalog.setval('s_jrn', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_1', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_2', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_3', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_4', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_def', 5, false); - - - -SELECT pg_catalog.setval('s_jrn_op', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_pj1', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_pj2', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_pj3', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_pj4', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_rapt', 1, false); - - - -SELECT pg_catalog.setval('s_jrnaction', 5, true); - - - -SELECT pg_catalog.setval('s_jrnx', 1, false); - - - -SELECT pg_catalog.setval('s_periode', 91, true); - - - -SELECT pg_catalog.setval('s_quantity', 7, true); - - - -SELECT pg_catalog.setval('s_stock_goods', 1, false); - - - -SELECT pg_catalog.setval('s_tva', 1001, true); - - - -SELECT pg_catalog.setval('s_user_act', 1, false); - - - -SELECT pg_catalog.setval('s_user_jrn', 1, false); - - - -SELECT pg_catalog.setval('seq_bud_hypothese_bh_id', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_1', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_10', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_2', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_20', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_21', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_22', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_3', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_4', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_5', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_6', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_7', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_8', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_9', 1, false); - - - -SELECT pg_catalog.setval('todo_list_tl_id_seq', 1, false); - - - -SELECT pg_catalog.setval('user_sec_extension_use_id_seq', 1, true); - - - -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (313, 'Administration', 'gestion', 'GEADM'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1600, 'Gestion des extensions', 'extension', 'EXTENSION'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1701, 'Consultation', 'prvision', 'PREVCON'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1702, 'Modification et cration', 'prvision', 'PREVMOD'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1135, 'Ajoute ou modifie des catégories de documents', 'parametre', 'PARCATDOC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (210, 'Ajout de plan analytique', 'compta_anal', 'CAPA'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (220, 'Ajout de poste analytique', 'compta_anal', 'CAPO'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (230, 'Ajout de groupe analytique', 'compta_anal', 'CAGA'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (235, 'Ajout d''operation diverses', 'compta_anal', 'CAOD'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (240, 'Impression', 'compta_anal', 'CAIMP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (300, 'Gestion', 'gestion', 'GESTION'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (305, 'Import en Banque', 'gestion', 'GEBQ'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (307, 'Effacement d''opération', 'gestion', 'GEOP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (310, 'Courrier (lecture & écriture)', 'gestion', 'GECOUR'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (311, 'Fournisseur', 'gestion', 'GESUPPL'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (312, 'Client', 'gestion', 'GECUST'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (700, 'Rapport', 'impression', 'IMPRAP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (710, 'Journaux', 'impression', 'IMPJRN'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (720, 'Fiche', 'impression', 'IMPFIC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (730, 'Poste', 'impression', 'IMPPOSTE'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (740, 'Bilan', 'impression', 'IMPBIL'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (750, 'Balance', 'impression', 'IMPBAL'); -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 (1100, 'Mode comptabilité analytique', 'parametre', 'PARCA'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1110, 'Ajout de période', 'parametre', 'PARPER'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1120, 'Catégorie des fiches', 'parametre', 'PARFIC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1130, 'Document', 'parametre', 'PARDOC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1140, 'Modification journaux', 'parametre', 'PARJRN'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1150, 'TVA', 'parametre', 'PARTVA'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1160, 'Moyen de paiement', 'parametre', 'PARMP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1180, 'Clôture ', 'parametre', 'PARCLO'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1185, 'Changement du plan comptable ', 'parametre', 'PARPCMN'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1170, 'Poste Comptable de base', 'parametre', 'PARPOS'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1190, 'Centralisation', 'parametre', 'PARCENT'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1200, 'Écriture d''ouverture', 'parametre', 'PAREO'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1210, 'Mode strict', 'parametre', 'PARSTR'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1220, 'Coordonnées société', 'parametre', 'PARCOORD'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1230, 'Création de rapport', 'parametre', 'PARRAP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1240, 'Effacement et création d''opération prédéfinie', 'parametre', 'PARPREDE'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1245, 'Sécurité du dossier', 'parametre', 'PARSEC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1500, 'Stock (lecture)', 'stock', 'STOLE'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1510, 'Stock (changement)', 'stock', 'STOWRITE'); - - - - - - - - - -INSERT INTO attr_def (ad_id, ad_text) VALUES (1, 'Nom'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (2, 'Taux TVA'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (3, 'Numéro de compte'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (4, 'Nom de la banque'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (5, 'Poste Comptable'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (6, 'Prix vente'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (7, 'Prix achat'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (8, 'Durée Amortissement'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (9, 'Description'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (10, 'Date début'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (11, 'Montant initial'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (12, 'Personne de contact '); -INSERT INTO attr_def (ad_id, ad_text) VALUES (13, 'numéro de tva '); -INSERT INTO attr_def (ad_id, ad_text) VALUES (14, 'Adresse '); -INSERT INTO attr_def (ad_id, ad_text) VALUES (16, 'pays '); -INSERT INTO attr_def (ad_id, ad_text) VALUES (17, 'téléphone '); -INSERT INTO attr_def (ad_id, ad_text) VALUES (18, 'email '); -INSERT INTO attr_def (ad_id, ad_text) VALUES (19, 'Gestion stock'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (20, 'Partie fiscalement non déductible'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (21, 'TVA non déductible'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (22, 'TVA non déductible récupérable par l''impôt'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (23, 'Quick Code'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (24, 'Ville'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (25, 'Société'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (26, 'Fax'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (27, 'GSM'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (15, 'code postal'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (30, 'Numero de client'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (31, 'Dpense charge du grant (partie prive)'); - - - -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 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 document_state (s_id, s_value) VALUES (1, 'Clôturé'); -INSERT INTO document_state (s_id, s_value) VALUES (2, 'A suivre'); -INSERT INTO document_state (s_id, s_value) VALUES (3, 'A faire'); -INSERT INTO document_state (s_id, s_value) VALUES (4, 'Abandonné'); - - - -INSERT INTO document_type (dt_id, dt_value) VALUES (1, 'Document Interne'); -INSERT INTO document_type (dt_id, dt_value) VALUES (2, 'Bons de commande client'); -INSERT INTO document_type (dt_id, dt_value) VALUES (3, 'Bon de commande Fournisseur'); -INSERT INTO document_type (dt_id, dt_value) VALUES (4, 'Facture'); -INSERT INTO document_type (dt_id, dt_value) VALUES (5, 'Lettre de rappel'); -INSERT INTO document_type (dt_id, dt_value) VALUES (6, 'Courrier'); -INSERT INTO document_type (dt_id, dt_value) VALUES (7, 'Proposition'); -INSERT INTO document_type (dt_id, dt_value) VALUES (8, 'Email'); -INSERT INTO document_type (dt_id, dt_value) VALUES (9, 'Divers'); -INSERT INTO document_type (dt_id, dt_value) VALUES (10, 'Note de frais'); -INSERT INTO document_type (dt_id, dt_value) VALUES (20, 'Réception commande Fournisseur'); -INSERT INTO document_type (dt_id, dt_value) VALUES (21, 'Réception commande Client'); -INSERT INTO document_type (dt_id, dt_value) VALUES (22, 'Réception magazine'); - - - -INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account, frd_id) VALUES (2, '400', 'Client', true, 9); -INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account, frd_id) VALUES (1, '604', 'Marchandises', true, 2); -INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account, frd_id) VALUES (3, '5500', 'Banque', true, 4); -INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account, frd_id) VALUES (4, '440', 'Fournisseur', true, 8); -INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account, frd_id) VALUES (5, '61', 'S & B D', true, 3); -INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account, frd_id) VALUES (6, '700', 'Vente', true, 1); - - - -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 (4, 'Banque', 5500); -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 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]'); - - - -INSERT INTO format_csv_banque (name, include_file) VALUES ('Fortis', 'fortis_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('EUB', 'eub_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('ING', 'ing_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('CBC', 'cbc_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('Argenta Belgique', 'argenta_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('CBC Belgique', 'cbc_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('Dexia', 'dexia_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('VMS Keytrade', 'keytrade_be.inc.php'); - - - -INSERT INTO formdef (fr_id, fr_label) VALUES (3000000, 'TVA déclaration Belge'); - - - - - - - - - -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 jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (2, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'VEN'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (4, 'Voir Impayés', 'Voir toutes les factures non payées', 'user_jrn.php', 'action=voir_jrn_non_paye', 'FR', 'VEN'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (1, 'Nouvelle', 'Création d''une facture', 'user_jrn.php', 'action=insert_vente&blank', 'FR', 'VEN'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (10, 'Nouveau', 'Encode un nouvel achat (matériel, marchandises, services et biens divers)', 'user_jrn.php', 'action=new&blank', 'FR', 'ACH'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (12, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'ACH'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (14, 'Voir Impayés', 'Voir toutes les factures non payées', 'user_jrn.php', 'action=voir_jrn_non_paye', 'FR', 'ACH'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (20, 'Nouveau', 'Encode un nouvel achat (matériel, marchandises, services et biens divers)', 'user_jrn.php', 'action=new&blank', 'FR', 'FIN'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (22, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'FIN'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (30, 'Nouveau', NULL, 'user_jrn.php', 'action=new&blank', 'FR', 'ODS'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (32, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'ODS'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (40, 'Soldes', 'Voir les soldes des comptes en banques', 'user_jrn.php', 'action=solde', 'FR', 'FIN'); - - - -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) VALUES (4, 'Opération Diverses', NULL, NULL, NULL, NULL, 5, 5, false, NULL, 'ODS', 'ODS-01', 'ODS'); -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) VALUES (1, 'Financier', '5* ', '5*', '3,2,4', '3,2,4', 5, 5, false, NULL, 'FIN', 'FIN-01', 'FIN'); -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) VALUES (3, 'Achat', '6*', '4*', '5', '4', 1, 3, true, 'échéance', 'ACH', 'ACH-01', 'ACH'); -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) VALUES (2, 'Vente', '4*', '7*', '2', '6', 2, 1, true, 'échéance', 'VEN', 'VEN-01', 'VEN'); - - - - - - -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 79, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 79, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 79, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 79, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 80, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 80, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 80, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 80, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 81, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 81, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 81, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 81, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 82, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 82, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 82, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 82, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 83, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 83, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 83, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 83, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 84, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 84, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 84, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 84, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 85, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 85, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 85, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 85, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 86, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 86, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 86, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 86, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 87, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 87, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 87, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 87, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 88, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 88, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 88, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 88, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 89, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 89, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 89, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 89, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 90, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 90, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 90, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 90, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 91, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 91, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 91, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 91, 'OP'); - - - - - - -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 mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (2, 'Caisse', 1, 'VEN', NULL, NULL); -INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (4, 'Caisse', 1, 'ACH', NULL, NULL); -INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (1, 'Paiement électronique', 1, 'VEN', NULL, NULL); -INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (3, 'Par gérant ou administrateur', 2, 'ACH', NULL, NULL); - - - - - - - - - - - - -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_CHECK_PERIODE', 'N'); - - - -INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('DNA', '6740', 'Dépense non déductible'); -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_money (pm_id, pm_code, pm_rate) VALUES (1, 'EUR', 1.0000); - - - -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); - - - -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'); - - - - - - - - - - - - - - - - - - -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('794', 'Intervention d''associés (ou du propriétaire) dans la perte', '79', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1', 'Fonds propres, provisions pour risques et charges à plus d''un an', '0', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2', 'Frais d''établissement, actifs immobilisés et créances à plus d''un an', '0', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('3', 'Stocks et commandes en cours d''éxécution', '0', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4', 'Créances et dettes à un an au plus', '0', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5', 'Placements de trésorerie et valeurs disponibles', '0', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6', 'Charges', '0', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('7', 'Produits', '0', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4000001', 'Client 1', '400', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4000002', 'Client 2', '400', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4000003', 'Client 3', '400', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6040001', 'Electricité', '604', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6040002', 'Loyer', '604', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('55000002', 'Banque 1', '5500', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('55000003', 'Banque 2', '5500', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4400001', 'Fournisseur 1', '440', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4400002', 'Fournisseur 2', '440', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4400003', 'Fournisseur 4', '440', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('610001', 'Electricité', '61', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('610002', 'Loyer', '61', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('610003', 'Assurance', '61', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('610004', 'Matériel bureau', '61', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('7000002', 'Marchandise A', '700', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('7000001', 'Prestation', '700', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('7000003', 'Déplacement', '700', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('101', 'Capital non appelé', '10', 'PASINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6190', 'TVA récupérable par l''impôt', '61', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6740', 'Dépense non admise', '67', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('9', 'Comptes hors Compta', '0', 'CON'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('100', 'Capital souscrit', '10', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1311', 'Autres réserves indisponibles', '131', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('132', ' Réserves immunisées', '13', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6711', 'Suppléments d''impôts estimés', '671', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6712', 'Provisions fiscales constituées', '671', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('672', 'Impôts étrangers sur le résultat de l''exercice', '67', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('673', 'Impôts étrangers sur le résultat d''exercice antérieures', '67', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('68', 'Transferts aux réserves immunisées', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('69', 'Affectations et prélévements', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('690', 'Perte reportée de l''exercice précédent', '69', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('691', 'Dotation à la réserve légale', '69', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('692', 'Dotation aux autres réserves', '69', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('693', 'Bénéfice à reporter', '69', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('694', 'Rémunération du capital', '69', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('695', 'Administrateurs ou gérants', '69', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('696', 'Autres allocataires', '69', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('70', 'Chiffre d''affaire', '7', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('700', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('701', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('702', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('703', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('704', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('706', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('707', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('709', 'Remises, ristournes et rabais accordés(-)', '70', 'PROINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('71', 'Variations des stocks et commandes en cours d''éxécution', '7', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('712', 'des en-cours de fabrication', '71', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('713', 'des produits finis', '71', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('715', 'des immeubles construits destinés à la vente', '71', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('717', ' des commandes en cours d''éxécution', '71', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('7170', 'Valeur d''acquisition', '717', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('7171', 'Bénéfice pris en compte', '717', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('72', 'Production immobilisée', '7', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('74', 'Autres produits d''exploitation', '7', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('740', 'Subsides d'' exploitation et montants compensatoires', '74', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('741', 'Plus-values sur réalisation courantes d'' immobilisations corporelles', '74', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('742', 'Plus-values sur réalisations de créances commerciales', '74', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('743', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('744', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('745', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('746', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('747', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('748', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('75', 'Produits financiers', '7', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('750', 'Produits sur immobilisations financières', '75', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('751', 'Produits des actifs circulants', '75', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('752', 'Plus-value sur réalisations d''actis circulants', '75', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('753', 'Subsides en capital et intérêts', '75', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('754', 'Différences de change', '75', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('755', 'Ecarts de conversion des devises', '75', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('221', 'Construction', '22', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('756', 'Produits financiers divers', '75', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('757', 'Produits financiers divers', '75', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('758', 'Produits financiers divers', '75', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('759', 'Produits financiers divers', '75', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('76', 'Produits exceptionnels', '7', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('760', 'Reprise d''amortissements et de réductions de valeur', '76', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('7601', 'sur immobilisations corporelles', '760', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('7602', 'sur immobilisations incorporelles', '760', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('761', 'Reprises de réductions de valeur sur immobilisations financières', '76', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('762', 'Reprises de provisions pour risques et charges exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('763', 'Plus-value sur réalisation d''actifs immobilisé', '76', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('764', 'Autres produits exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('765', 'Autres produits exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('766', 'Autres produits exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('767', 'Autres produits exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('768', 'Autres produits exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('769', 'Autres produits exceptionnels', '76', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('77', 'Régularisations d''impôts et reprises de provisions fiscales', '7', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('771', 'impôts belges sur le résultat', '77', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('7710', 'Régularisations d''impôts dus ou versé', '771', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('7711', 'Régularisations d''impôts estimés', '771', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('7712', 'Reprises de provisions fiscales', '771', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('773', 'Impôts étrangers sur le résultats', '77', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('79', 'Affectations et prélévements', '7', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('790', 'Bénéfice reporté de l''exercice précédent', '79', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('791', 'Prélévement sur le capital et les primes d''émission', '79', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('792', 'Prélévement sur les réserves', '79', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('793', 'Perte à reporter', '79', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6301', 'Dotations aux amortissements sur immobilisations incorporelles', '630', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6302', 'Dotations aux amortissements sur immobilisations corporelles', '630', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6308', 'Dotations aux réductions de valeur sur immobilisations incorporelles', '630', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6309', 'Dotations aux réductions de valeur sur immobilisations corporelles', '630', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('631', 'Réductions de valeur sur stocks', '63', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6310', 'Dotations', '631', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6311', 'Reprises(-)', '631', 'CHAINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('632', 'Réductions de valeur sur commande en cours d''éxécution', '63', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6320', 'Dotations', '632', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6321', 'Reprises(-)', '632', 'CHAINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('633', 'Réductions de valeurs sur créances commerciales à plus d''un an', '63', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6330', 'Dotations', '633', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6331', 'Reprises(-)', '633', 'CHAINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('634', 'Réductions de valeur sur créances commerciales à un an au plus', '63', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6340', 'Dotations', '634', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6341', 'Reprise', '634', 'CHAINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('635', 'Provisions pour pensions et obligations similaires', '63', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6350', 'Dotations', '635', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6351', 'Utilisation et reprises', '635', 'CHAINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('636', 'Provisions pour grosses réparations et gros entretien', '63', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6360', 'Dotations', '636', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6361', 'Reprises(-)', '636', 'CHAINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('637', 'Provisions pour autres risques et charges', '63', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6370', 'Dotations', '637', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6371', 'Reprises(-)', '637', 'CHAINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('64', 'Autres charges d''exploitation', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('640', 'Charges fiscales d''exploitation', '64', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('641', 'Moins-values sur réalisations courantes d''immobilisations corporelles', '64', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('642', 'Moins-value sur réalisation de créances commerciales', '64', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('643', 'Charges d''exploitations', '64', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('644', 'Charges d''exploitations', '64', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('645', 'Charges d''exploitations', '64', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('646', 'Charges d''exploitations', '64', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('647', 'Charges d''exploitations', '64', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('648', 'Charges d''exploitations', '64', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('649', 'Charges d''exploitation portées à l''actif au titre de frais de restructuration(-)', '64', 'CHAINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('65', 'Charges financières', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('650', 'Charges des dettes', '65', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6500', 'Intérêts, commmissions et frais afférents aux dettes', '650', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6501', 'Amortissements des frais d''émissions d''emrunts et des primes de remboursement', '650', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6502', 'Autres charges des dettes', '650', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6503', 'Intérêts intercalaires portés à l''actif(-)', '650', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('651', 'Réductions de valeur sur actifs circulants', '65', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6510', 'Dotations', '651', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6511', 'Reprises(-)', '651', 'CHAINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('652', 'Moins-value sur réalisation d''actifs circulants', '65', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('653', 'Charges d''escompte de créances', '65', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('654', 'Différences de changes', '65', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('655', 'Ecarts de conversion des devises', '65', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('656', 'Charges financières diverses', '65', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('657', 'Charges financières diverses', '65', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('658', 'Charges financières diverses', '65', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('659', 'Charges financières diverses', '65', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('66', 'Charges exceptionnelles', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('660', 'Amortissements et réductions de valeur exceptionnels (dotations)', '66', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6600', 'sur frais d''établissement', '660', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6601', 'sur immobilisations incorporelles', '660', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6602', 'sur immobilisations corporelles', '660', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('661', 'Réductions de valeur sur immobilisations financières (dotations)', '66', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('662', 'Provisions pour risques et charges exceptionnels', '66', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('663', 'Moins-values sur réalisations d''actifs immobilisés', '66', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('664', 'Autres charges exceptionnelles', '66', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('665', 'Autres charges exceptionnelles', '66', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('666', 'Autres charges exceptionnelles', '66', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('667', 'Autres charges exceptionnelles', '66', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('668', 'Autres charges exceptionnelles', '66', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('669', ' Charges exceptionnelles portées à l''actif au titre de frais de restructuration', '66', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('67', 'impôts sur le résultat', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('670', 'Impôts belge sur le résultat de l''exercice', '67', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6700', 'Impôts et précomptes dus ou versés', '670', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6701', 'Excédents de versement d''impôts et de précomptes portés à l''actifs (-)', '670', 'CHAINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6702', 'Charges fiscales estimées', '670', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('671', 'Impôts belges sur le résultats d''exercices antérieures', '67', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6710', 'Suppléments d''impôt dus ou versés', '671', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('50', 'Actions propres', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('51', 'Actions et parts', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('510', 'Valeur d''acquisition', '51', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('511', 'Montant non appelés', '51', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('519', 'Réductions de valeur actées', '51', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('52', 'Titres à revenu fixe', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('520', 'Valeur d''acquisition', '52', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('529', 'Réductions de valeur actées', '52', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('53', 'Dépôts à terme', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('530', 'de plus d''un an', '53', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('531', 'de plus d''un mois et d''un an au plus', '53', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('532', 'd''un mois au plus', '53', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('539', 'Réductions de valeur actées', '53', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('54', 'Valeurs échues à l''encaissement', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('55', 'Etablissement de crédit', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('550', 'Banque 1', '55', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5500', 'Comptes courants', '550', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5501', 'Chèques émis (-)', '550', 'ACTINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5509', 'Réduction de valeur actée', '550', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5510', 'Comptes courants', '551', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5511', 'Chèques émis (-)', '551', 'ACTINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5519', 'Réduction de valeur actée', '551', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5520', 'Comptes courants', '552', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5521', 'Chèques émis (-)', '552', 'ACTINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5529', 'Réduction de valeur actée', '552', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5530', 'Comptes courants', '553', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5531', 'Chèques émis (-)', '553', 'ACTINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5539', 'Réduction de valeur actée', '553', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5540', 'Comptes courants', '554', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5541', 'Chèques émis (-)', '554', 'ACTINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5549', 'Réduction de valeur actée', '554', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5550', 'Comptes courants', '555', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5551', 'Chèques émis (-)', '555', 'ACTINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5559', 'Réduction de valeur actée', '555', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5560', 'Comptes courants', '556', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5561', 'Chèques émis (-)', '556', 'ACTINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5569', 'Réduction de valeur actée', '556', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5570', 'Comptes courants', '557', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5571', 'Chèques émis (-)', '557', 'ACTINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5579', 'Réduction de valeur actée', '557', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5580', 'Comptes courants', '558', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5581', 'Chèques émis (-)', '558', 'ACTINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5589', 'Réduction de valeur actée', '558', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5590', 'Comptes courants', '559', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5591', 'Chèques émis (-)', '559', 'ACTINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5599', 'Réduction de valeur actée', '559', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('56', 'Office des chèques postaux', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('560', 'Compte courant', '56', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('561', 'Chèques émis', '56', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('578', 'Caisse timbre', '57', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('58', 'Virement interne', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('60', 'Approvisionnement et marchandises', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('600', 'Achats de matières premières', '60', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('601', 'Achats de fournitures', '60', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('602', 'Achats de services, travaux et études', '60', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('603', 'Sous-traitances générales', '60', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('604', 'Achats de marchandises', '60', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('605', 'Achats d''immeubles destinés à la vente', '60', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('608', 'Remises, ristournes et rabais obtenus(-)', '60', 'CHAINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('609', 'Variation de stock', '60', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6090', 'de matières premières', '609', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6091', 'de fournitures', '609', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6094', 'de marchandises', '609', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6095', 'immeubles achetés destinés à la vente', '609', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('61', 'Services et biens divers', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('62', 'Rémunérations, charges sociales et pensions', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('620', 'Rémunérations et avantages sociaux directs', '62', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6200', 'Administrateurs ou gérants', '620', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6201', 'Personnel de directions', '620', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6202', 'Employés,620', '6202', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6203', 'Ouvriers', '620', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6204', 'Autres membres du personnel', '620', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('621', 'Cotisations patronales d''assurances sociales', '62', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('622', 'Primes partonales pour assurances extra-légales', '62', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('623', 'Autres frais de personnel', '62', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('624', 'Pensions de retraite et de survie', '62', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6240', 'Administrateurs ou gérants', '624', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6241', 'Personnel', '624', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('63', 'Amortissements, réductions de valeurs et provisions pour risques et charges', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('630', 'Dotations aux amortissements et réduction de valeurs sur immobilisations', '63', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6300', ' Dotations aux amortissements sur frais d''établissement', '630', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('705', 'Ventes et prestations de services', '70', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('414', 'Produits à recevoir', '41', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('416', 'Créances diverses', '41', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4160', 'Comptes de l''exploitant', '416', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('417', 'Créances douteuses', '41', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('418', 'Cautionnements versés en numéraires', '41', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('419', 'Réductions de valeur actées', '41', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('42', 'Dettes à plus dun an échéant dans l''année', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('420', 'Emprunts subordonnés', '42', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4200', 'convertibles', '420', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4201', 'non convertibles', '420', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('421', 'Emprunts subordonnés', '42', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4210', 'convertibles', '420', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4211', 'non convertibles', '420', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('422', ' Dettes de locations financement', '42', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('423', ' Etablissement de crédit', '42', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4230', 'Dettes en comptes', '423', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4231', 'Promesses', '423', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4232', 'Crédits d''acceptation', '423', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('424', 'Autres emprunts', '42', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('425', 'Dettes commerciales', '42', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4250', 'Fournisseurs', '425', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4251', 'Effets à payer', '425', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('426', 'Acomptes reçus sur commandes', '42', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('428', 'Cautionnement reçus en numéraires', '42', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('429', 'Dettes diverses', '42', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('43', 'Dettes financières', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('430', 'Etablissements de crédit - Emprunts à compte à terme fixe', '43', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('431', 'Etablissements de crédit - Promesses', '43', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('432', ' Etablissements de crédit - Crédits d''acceptation', '43', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('433', 'Etablissements de crédit -Dettes en comptes courant', '43', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('439', 'Autres emprunts', '43', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('44', 'Dettes commerciales', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('440', 'Fournisseurs', '44', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('441', 'Effets à payer', '44', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('444', 'Factures à recevoir', '44', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('45', 'Dettes fiscales, salariales et sociales', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('450', 'Dettes fiscales estimées', '45', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4500', 'Impôts belges sur le résultat', '450', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4501', 'Impôts belges sur le résultat', '450', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4502', 'Impôts belges sur le résultat', '450', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4503', 'Impôts belges sur le résultat', '450', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4504', 'Impôts belges sur le résultat', '450', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4505', 'Autres impôts et taxes belges', '450', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4506', 'Autres impôts et taxes belges', '450', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4507', 'Autres impôts et taxes belges', '450', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4508', 'Impôts et taxes étrangers', '450', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('451', 'TVA à payer', '45', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4511', 'TVA à payer 21%', '451', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4512', 'TVA à payer 12%', '451', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4513', 'TVA à payer 6%', '451', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4514', 'TVA à payer 0%', '451', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('452', 'Impôts et taxes à payer', '45', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4520', 'Impôts belges sur le résultat', '452', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4521', 'Impôts belges sur le résultat', '452', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4522', 'Impôts belges sur le résultat', '452', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4523', 'Impôts belges sur le résultat', '452', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4524', 'Impôts belges sur le résultat', '452', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4525', 'Autres impôts et taxes belges', '452', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4526', 'Autres impôts et taxes belges', '452', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4527', 'Autres impôts et taxes belges', '452', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4528', 'Impôts et taxes étrangers', '452', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('453', 'Précomptes retenus', '45', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('454', 'Office National de la Sécurité Sociales', '45', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('455', 'Rémunérations', '45', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('456', 'Pécules de vacances', '45', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('459', 'Autres dettes sociales', '45', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('46', 'Acomptes reçus sur commandes', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('47', 'Dettes découlant de l''affectation du résultat', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('470', 'Dividendes et tantièmes d''exercices antérieurs', '47', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('471', 'Dividendes de l''exercice', '47', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('472', 'Tantièmes de l''exercice', '47', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('473', 'Autres allocataires', '47', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('48', 'Dettes diverses', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('480', 'Obligations et coupons échus', '48', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('488', 'Cautionnements reçus en numéraires', '48', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('489', 'Autres dettes diverses', '48', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4890', 'Compte de l''exploitant', '489', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('49', 'Comptes de régularisation', '4', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('490', 'Charges à reporter', '49', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('491', 'Produits acquis', '49', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('492', 'Charges à imputer', '49', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('493', 'Produits à reporter', '49', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('499', 'Comptes d''attentes', '49', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2821', 'Montants non-appelés(-)', '282', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2828', 'Plus-values actées', '282', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2829', 'Réductions de valeurs actées', '282', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('283', 'Créances sur des entreprises avec lesquelles existe un lien de participation', '28', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2830', 'Créance en compte', '283', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2831', 'Effets à recevoir', '283', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('57', 'Caisse', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2832', 'Titre à revenu fixe', '283', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2837', 'Créances douteuses', '283', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2839', 'Réduction de valeurs actées', '283', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('284', 'Autres actions et parts', '28', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2840', 'Valeur d''acquisition', '284', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2841', 'Montants non-appelés(-)', '284', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2848', 'Plus-values actées', '284', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2849', 'Réductions de valeurs actées', '284', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('285', 'Autres créances', '28', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2850', 'Créance en compte', '285', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2851', 'Effets à recevoir', '285', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2852', 'Titre à revenu fixe', '285', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2857', 'Créances douteuses', '285', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2859', 'Réductions de valeurs actées', '285', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('288', 'Cautionnements versés en numéraires', '28', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('29', 'Créances à plus d''un an', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('290', 'Créances commerciales', '29', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2900', 'Clients', '290', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2901', 'Effets à recevoir', '290', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2906', 'Acomptes versés', '290', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2907', 'Créances douteuses', '290', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2909', 'Réductions de valeurs actées', '290', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('291', 'Autres créances', '29', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2910', 'Créances en comptes', '291', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2911', 'Effets à recevoir', '291', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2917', 'Créances douteuses', '291', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2919', 'Réductions de valeurs actées(-)', '291', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('30', 'Approvisionements - Matières premières', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('300', 'Valeur d''acquisition', '30', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('309', 'Réductions de valeur actées', '30', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('31', 'Approvisionnements - fournitures', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('310', 'Valeur d''acquisition', '31', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('319', 'Réductions de valeurs actées(-)', '31', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('32', 'En-cours de fabrication', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('320', 'Valeurs d''acquisition', '32', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('329', 'Réductions de valeur actées', '32', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('33', 'Produits finis', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('330', 'Valeur d''acquisition', '33', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('339', 'Réductions de valeur actées', '33', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('34', 'Marchandises', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('340', 'Valeur d''acquisition', '34', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('349', 'Réductions de valeur actées', '34', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('35', 'Immeubles destinés à la vente', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('350', 'Valeur d''acquisition', '35', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('359', 'Réductions de valeur actées', '35', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('36', 'Acomptes versés sur achats pour stocks', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('360', 'Valeur d''acquisition', '36', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('369', 'Réductions de valeur actées', '36', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('37', 'Commandes en cours éxécution', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('370', 'Valeur d''acquisition', '37', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('371', 'Bénéfice pris en compte ', '37', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('379', 'Réductions de valeur actées', '37', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('40', 'Créances commerciales', '4', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('400', 'Clients', '40', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('401', 'Effets à recevoir', '40', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('404', 'Produits à recevoir', '40', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('406', 'Acomptes versés', '40', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('407', 'Créances douteuses', '40', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('409', 'Réductions de valeur actées', '40', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('41', 'Autres créances', '4', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('410', 'Capital appelé non versé', '41', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('411', 'TVA à récupérer', '41', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4111', 'TVA à récupérer 21%', '411', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4112', 'TVA à récupérer 12%', '411', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4113', 'TVA à récupérer 6% ', '411', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4114', 'TVA à récupérer 0%', '411', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('412', 'Impôts et précomptes à récupérer', '41', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4120', 'Impôt belge sur le résultat', '412', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4121', 'Impôt belge sur le résultat', '412', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4122', 'Impôt belge sur le résultat', '412', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4123', 'Impôt belge sur le résultat', '412', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4124', 'Impôt belge sur le résultat', '412', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4125', 'Autres impôts et taxes belges', '412', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4126', 'Autres impôts et taxes belges', '412', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4127', 'Autres impôts et taxes belges', '412', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4128', 'Impôts et taxes étrangers', '412', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('10', 'Capital ', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6040003', 'Petit matériel', '604', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('11', 'Prime d''émission ', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('12', 'Plus Value de réévaluation ', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('13', 'Réserve ', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('130', 'Réserve légale', '13', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('131', 'Réserve indisponible', '13', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1310', 'Réserve pour actions propres', '131', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6040004', 'Assurance', '604', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('55000001', 'Caisse', '5500', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('133', 'Réserves disponibles', '13', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('14', 'Bénéfice ou perte reportée', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('140', 'Bénéfice reporté', '14', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('141', 'Perte reportée', '14', 'PASINV'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('15', 'Subside en capital', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('16', 'Provisions pour risques et charges', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('160', 'Provisions pour pensions et obligations similaires', '16', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('161', 'Provisions pour charges fiscales', '16', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('749', 'Produits d''exploitations divers', '74', 'PRO'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('162', 'Provisions pour grosses réparation et gros entretien', '16', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('17', ' Dettes à plus d''un an', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('170', 'Emprunts subordonnés', '17', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1700', 'convertibles', '170', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1701', 'non convertibles', '170', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('171', 'Emprunts subordonnés', '17', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1710', 'convertibles', '170', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1711', 'non convertibles', '170', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('172', ' Dettes de locations financement', '17', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('173', ' Etablissement de crédit', '17', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1730', 'Dettes en comptes', '173', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1731', 'Promesses', '173', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1732', 'Crédits d''acceptation', '173', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('174', 'Autres emprunts', '17', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('175', 'Dettes commerciales', '17', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1750', 'Fournisseurs', '175', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1751', 'Effets à payer', '175', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('176', 'Acomptes reçus sur commandes', '17', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('178', 'Cautionnement reçus en numéraires', '17', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('179', 'Dettes diverses', '17', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('20', 'Frais d''établissement', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('200', 'Frais de constitution et d''augmentation de capital', '20', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('201', ' Frais d''émission d''emprunts et primes de remboursement', '20', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('202', 'Autres frais d''établissement', '20', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('204', 'Frais de restructuration', '20', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('21', 'Immobilisations incorporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('210', 'Frais de recherche et de développement', '21', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('211', 'Concessions, brevet, licence savoir faire, marque et droit similaires', '21', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('212', 'Goodwill', '21', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('213', 'Acomptes versés', '21', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('22', 'Terrains et construction', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('220', 'Terrains', '22', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('222', 'Terrains bâtis', '22', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('223', 'Autres droits réels sur des immeubles', '22', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('23', ' Installations, machines et outillages', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('24', 'Mobilier et Matériel roulant', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('25', 'Immobilisations détenus en location-financement et droits similaires', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('250', 'Terrains', '25', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('251', 'Construction', '25', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('252', 'Terrains bâtis', '25', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('253', 'Mobilier et matériels roulants', '25', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('26', 'Autres immobilisations corporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('27', 'Immobilisations corporelles en cours et acomptes versés', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('28', 'Immobilisations financières', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('280', 'Participation dans des entreprises liées', '28', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2800', 'Valeur d''acquisition', '280', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2801', 'Montants non-appelés(-)', '280', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2808', 'Plus-values actées', '280', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2809', 'Réductions de valeurs actées', '280', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('281', 'Créance sur des entreprises liées', '28', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2810', 'Créance en compte', '281', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2811', 'Effets à recevoir', '281', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2812', 'Titre à reveny fixe', '281', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2817', 'Créances douteuses', '281', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2819', 'Réduction de valeurs actées', '281', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('282', 'Participations dans des entreprises avec lesquelles il existe un lien de participation', '28', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2820', 'Valeur d''acquisition', '282', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4516', 'Tva Export 0%', '451', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4115', 'Tva Intracomm 0%', '411', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4116', 'Tva Export 0%', '411', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('41141', 'TVA pour l\\''export', '4114', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('41142', 'TVA sur les opérations intracommunautaires', '4114', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('45141', 'TVA pour l\\''export', '451', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('45142', 'TVA sur les opérations intracommunautaires', '4514', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('41143', 'TVA sur les opérations avec des assujettis art 44 Code TVA', '4114', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('45143', 'TVA sur les opérations avec des assujettis art 44 Code TVA', '4514', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('41144', 'TVA sur les opérations avec des cocontractants', '4114', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('45144', 'TVA sur les opérations avec des cocontractants', '4514', 'PAS'); - - - - - - -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (1, '21%', 0.2100, 'Tva applicable à tout ce qui bien et service divers', '4111,4511'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (2, '12%', 0.1200, 'Tva ', '4112,4512'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (3, '6%', 0.0600, 'Tva applicable aux journaux et livres', '4113,4513'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (4, '0%', 0.0000, 'Aucune tva n''est applicable', '4114,4514'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (6, 'EXPORT', 0.0000, 'Tva pour les exportations', '41141,45144'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (5, 'INTRA', 0.0000, 'Tva pour les livraisons / acquisition intra communautaires', '41142,45142'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (7, 'COC', 0.0000, 'Opérations avec des cocontractants', '41144,45144'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (8, 'ART44', 0.0000, 'Opérations pour les opérations avec des assujettis à l\\''art 44 Code TVA', '41143,45143'); - - - -INSERT INTO user_local_pref (user_id, parameter_type, parameter_value) VALUES ('1', 'MINIREPORT', '0'); -INSERT INTO user_local_pref (user_id, parameter_type, parameter_value) VALUES ('1', 'PERIODE', '79'); - - - - - - -INSERT INTO user_sec_extension (use_id, ex_id, use_login, use_access) VALUES (1, 1, 'phpcompta', 'Y'); - - - - - - -INSERT INTO version (val) VALUES (75); - - - diff --git a/sources/html/admin/sql/mod1/function.sql b/sources/html/admin/sql/mod1/function.sql deleted file mode 100644 index d90e0c5..0000000 --- a/sources/html/admin/sql/mod1/function.sql +++ /dev/null @@ -1,1193 +0,0 @@ -CREATE FUNCTION account_add(p_id public.account_type, p_name character varying) RETURNS void - AS $$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - nCount integer; -begin - select count(*) into nCount from tmp_pcmn where pcm_val=p_id; - 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); - end if; -return; -end ; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION account_auto(p_fd_id integer) RETURNS boolean - AS $$ -declare - l_auto bool; -begin - - select fd_create_account into l_auto from fiche_def where fd_id=p_fd_id; - if l_auto is null then - l_auto:=false; - end if; - return l_auto; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION account_compute(p_f_id integer) RETURNS public.account_type - AS $$ -declare - class_base fiche_def.fd_class_base%type; - maxcode numeric; - sResult account_type; -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; - 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; - return sResult; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION account_insert(p_f_id integer, p_account text) RETURNS integer - AS $_$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - nNew tmp_pcmn.pcm_val%type; - bAuto bool; - nFd_id integer; - sClass_Base fiche_def.fd_class_base%TYPE; - nCount integer; - first text; - second text; -begin - - if 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'; - select count(*) into nCount from tmp_pcmn where pcm_val=p_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,p_account); - else - -- account doesn't exist, create it - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - - nParent:=account_parent(p_account::account_type); - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::account_type,sName,nParent); - perform attribut_insert(p_f_id,5,p_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 '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'; - nNew:=account_compute(p_f_id); - raise info 'nNew %', nNew; - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(nNew); - perform account_add (nNew,sName); - perform attribut_insert(p_f_id,5,nNew); - - else - -- if there is an account_base then it is the default - select fd_class_base::account_type into nNew from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if nNew is null or length(trim(nNew)) = 0 then - raise notice 'count is null'; - perform attribut_insert(p_f_id,5,null); - else - perform attribut_insert(p_f_id,5,nNew); - end if; - end if; - end if; - -return 0; -end; -$_$ - LANGUAGE plpgsql; -CREATE FUNCTION account_parent(p_account public.account_type) RETURNS public.account_type - AS $$ -declare - sSubParent tmp_pcmn.pcm_val_parent%type; - sResult tmp_pcmn.pcm_val_parent%type; - nCount integer; -begin - if p_account is NULL then - return NULL; - end if; - sSubParent:=p_account; - while true loop - select count(*) into nCount - from tmp_pcmn - where - pcm_val = sSubParent; - if nCount != 0 then - sResult:= sSubParent; - exit; - end if; - sSubParent:= substr(sSubParent,1,length(sSubParent)-1); - if length(sSubParent) <= 0 then - raise exception 'Impossible de trouver le compte parent pour %',p_account; - end if; - raise notice 'sSubParent % % ',sSubParent,length(sSubParent); - end loop; - raise notice 'account_parent : Parent is %',sSubParent; - return sSubParent; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION account_update(p_f_id integer, p_account public.account_type) RETURNS integer - AS $$ -declare - nMax fiche.f_id%type; - nCount integer; - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - nJft_id attr_value.jft_id%type; - first text; - second text; -begin - - if length(trim(p_account)) != 0 then - if position (',' in p_account) = 0 then - select count(*) into nCount from tmp_pcmn where pcm_val=p_account; - if nCount = 0 then - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - 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; - 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; - end if; - end if; - select jft_id into njft_id from jnt_fic_att_value where f_id=p_f_id and ad_id=5; - update attr_value set av_text=p_account where jft_id=njft_id; - -return njft_id; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION action_gestion_ins_upd() RETURNS trigger - AS $$ -begin -NEW.ag_title := substr(trim(NEW.ag_title),1,70); -NEW.ag_hour := substr(trim(NEW.ag_hour),1,5); -return NEW; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION action_get_tree(p_id bigint) RETURNS SETOF bigint - AS $$ - -declare - e bigint; - i bigint; -begin - for e in select ag_id from action_gestion where ag_ref_ag_id=p_id - loop - if e = 0 then - return; - end if; - return next e; - for i in select ag_id from action_gestion where ag_ref_ag_id=e - loop - if i = 0 then - return; - end if; - return next i; - end loop; - end loop; - return; - -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION attribut_insert(p_f_id integer, p_ad_id integer, p_value character varying) RETURNS void - AS $$ -declare - n_jft_id integer; -begin - select nextval('s_jnt_fic_att_value') into n_jft_id; - insert into jnt_fic_att_value (jft_id,f_id,ad_id) values (n_jft_id,p_f_id,p_ad_id); - insert into attr_value (jft_id,av_text) values (n_jft_id,trim(p_value)); -return; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION attribute_correct_order() RETURNS void - AS $$ -declare - crs_correct cursor for select A.jnt_id,A.jnt_order from jnt_fic_attr as A join jnt_fic_attr as B using (fd_id) where A.jnt_order=B.jnt_order and A.jnt_id > B.jnt_id; - rec record; -begin - open crs_correct; - loop - fetch crs_correct into rec; - if NOT FOUND then - close crs_correct; - return; - end if; - update jnt_fic_attr set jnt_order=jnt_order + 1 where jnt_id = rec.jnt_id; - end loop; - close crs_correct; - perform attribute_correct_order (); -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION card_class_base(p_f_id integer) RETURNS text - AS $$ -declare - n_poste fiche_def.fd_class_base%type; -begin - - select fd_class_base into n_poste from fiche_def join fiche using -(fd_id) - where f_id=p_f_id; - if not FOUND then - raise exception 'Invalid fiche card_class_base(%)',p_f_id; - end if; -return n_poste; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION check_balance(p_grpt integer) RETURNS numeric - AS $$ -declare - amount_jrnx_debit numeric; - amount_jrnx_credit numeric; - amount_jrn numeric; -begin - select sum (j_montant) into amount_jrnx_credit - from jrnx - where - j_grpt=p_grpt - and j_debit=false; - - select sum (j_montant) into amount_jrnx_debit - from jrnx - where - j_grpt=p_grpt - and j_debit=true; - - select jr_montant into amount_jrn - from jrn - where - jr_grpt_id=p_grpt; - - if ( amount_jrnx_debit != amount_jrnx_credit ) - then - return abs(amount_jrnx_debit-amount_jrnx_credit); - end if; - if ( amount_jrn != amount_jrnx_credit) - then - return -1*abs(amount_jrn - amount_jrnx_credit); - end if; - return 0; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION correct_sequence(p_sequence text, p_col text, p_table text) RETURNS integer - AS $$ -declare -last_sequence int8; -max_sequence int8; -n integer; -begin - select count(*) into n from pg_class where relkind='S' and relname=lower(p_sequence); - if n = 0 then - raise exception ' Unknow sequence % ',p_sequence; - end if; - select count(*) into n from pg_class where relkind='r' and relname=lower(p_table); - if n = 0 then - raise exception ' Unknow table % ',p_table; - end if; - - execute 'select last_value from '||p_sequence into last_sequence; - raise notice 'Last value of the sequence is %', last_sequence; - - execute 'select max('||p_col||') from '||p_table into max_sequence; - if max_sequence is null then - max_sequence := 0; - end if; - raise notice 'Max value of the sequence is %', max_sequence; - max_sequence:= max_sequence +1; - execute 'alter sequence '||p_sequence||' restart with '||max_sequence; -return 0; - -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION create_missing_sequence() RETURNS integer - AS $$ -declare -p_sequence text; -nSeq integer; -c1 cursor for select jrn_def_id from jrn_def; -begin - open c1; - loop - fetch c1 into nSeq; - if not FOUND THEN - close c1; - return 0; - end if; - p_sequence:='s_jrn_pj'||nSeq::text; - execute 'create sequence '||p_sequence; - end loop; -close c1; -return 0; - -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION drop_index(p_constraint character varying) RETURNS void - AS $$ -declare - nCount integer; -begin - select count(*) into nCount from pg_indexes where indexname=p_constraint; - if nCount = 1 then - execute 'drop index '||p_constraint ; - end if; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION drop_it(p_constraint character varying) RETURNS void - AS $$ -declare - nCount integer; -begin - select count(*) into nCount from pg_constraint where conname=p_constraint; - if nCount = 1 then - execute 'alter table parm_periode drop constraint '||p_constraint ; - end if; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION extension_ins_upd() RETURNS trigger - AS $$ -declare - sCode text; - sFile text; -begin -sCode:=trim(upper(NEW.ex_code)); -sCode:=replace(sCode,' ','_'); -sCode:=substr(sCode,1,15); -sCode=upper(sCode); -NEW.ex_code:=sCode; -sFile:=NEW.ex_file; -sFile:=replace(sFile,';','_'); -sFile:=replace(sFile,'<','_'); -sFile:=replace(sFile,'>','_'); -sFile:=replace(sFile,'..',''); -sFile:=replace(sFile,'&',''); -sFile:=replace(sFile,'|',''); - - - -return NEW; - -end; - -$$ - LANGUAGE plpgsql; -CREATE FUNCTION fiche_account_parent(p_f_id integer) RETURNS public.account_type - AS $$ -declare -ret tmp_pcmn.pcm_val%TYPE; -begin - select fd_class_base into ret from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if not FOUND then - raise exception '% N''existe pas',p_f_id; - end if; - return ret; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION fiche_attribut_synchro(p_fd_id integer) RETURNS void - AS $$ -declare - -- this sql gives the f_id and the missing attribute (ad_id) - list_missing cursor for select f_id,fd_id,ad_id,jnt_order from jnt_fic_attr join fiche as A using (fd_id) where fd_id=p_fd_id and ad_id not in (select ad_id from fiche join jnt_fic_att_value using (f_id) where fd_id=jnt_fic_attr.fd_id and A.f_id=f_id); - rec record; - -- value of the last insert - jnt jnt_fic_att_value%ROWTYPE; -begin - open list_missing; - loop - - fetch list_missing into rec; - IF NOT FOUND then - exit; - end if; - -- insert a value into jnt_fic_att_value - insert into jnt_fic_att_value (f_id,ad_id) values (rec.f_id,rec.ad_id) returning * into jnt; - - -- now we insert into attr_value - insert into attr_value values (jnt.jft_id,''); - end loop; - close list_missing; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION fiche_def_ins_upd() RETURNS trigger - AS $$ -begin - -if position (',' in NEW.fd_class_base) != 0 then - NEW.fd_create_account='f'; - -end if; -return NEW; -end;$$ - LANGUAGE plpgsql; -CREATE FUNCTION find_pcm_type(pp_value public.account_type) RETURNS text - AS $$ -declare - str_type parm_poste.p_type%TYPE; - str_value parm_poste.p_type%TYPE; - nLength integer; -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 - return str_type; - end if; - nLength:=nLength-1; - str_value:=substring(str_value::text from 1 for nLength)::account_type; - end loop; -return 'CON'; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION get_letter_jnt(a bigint) RETURNS bigint - AS $$ -declare - nResult bigint; -begin - select jl_id into nResult from jnt_letter join letter_deb using (jl_id) where j_id = a; - if NOT FOUND then - select jl_id into nResult from jnt_letter join letter_cred using (jl_id) where j_id = a; - if NOT found then - return null; - end if; - end if; -return nResult; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION get_pcm_tree(source public.account_type) RETURNS SETOF public.account_type - AS $$ -declare - i account_type; - e account_type; -begin - for i in select pcm_val from tmp_pcmn where pcm_val_parent=source - loop - return next i; - for e in select get_pcm_tree from get_pcm_tree(i) - loop - return next e; - end loop; - - end loop; - return; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION group_analytic_ins_upd() RETURNS trigger - AS $$ -declare -name text; -begin -name:=upper(NEW.ga_id); -name:=trim(name); -name:=replace(name,' ',''); -NEW.ga_id:=name; -return NEW; -end;$$ - LANGUAGE plpgsql; -CREATE FUNCTION group_analytique_del() RETURNS trigger - AS $$ -begin -update poste_analytique set ga_id=null -where ga_id=OLD.ga_id; -return OLD; -end;$$ - LANGUAGE plpgsql; -CREATE FUNCTION html_quote(p_string text) RETURNS text - AS $$ -declare - r text; -begin - r:=p_string; - r:=replace(r,'<','<'); - r:=replace(r,'>','>'); - r:=replace(r,'''','"'); - return r; -end;$$ - LANGUAGE plpgsql; -CREATE FUNCTION info_def_ins_upd() RETURNS trigger - AS $$ -declare - row_info_def info_def%ROWTYPE; - str_type text; -begin -row_info_def:=NEW; -str_type:=upper(trim(NEW.id_type)); -str_type:=replace(str_type,' ',''); -str_type:=replace(str_type,',',''); -str_type:=replace(str_type,';',''); -if length(str_type) =0 then - raise exception 'id_type cannot be null'; -end if; -row_info_def.id_type:=str_type; -return row_info_def; -end; -$$ - LANGUAGE plpgsql; -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 - AS $$ -declare - sCode varchar; - nCount_qcode integer; -begin - sCode=trim(p_qcode); - - -- if p_qcode is empty try to find one - if length(sCode) = 0 or p_qcode is null then - select count(*) into nCount_qcode - from vw_poste_qcode where j_poste=p_poste; - -- if we find only one q_code for a accountancy account - -- then retrieve it - if nCount_qcode = 1 then - select j_qcode::text into sCode - from vw_poste_qcode where j_poste=p_poste; - else - sCode=NULL; - end if; - - end if; - - insert into jrnx - ( - j_date, - j_montant, - j_poste, - j_grpt, - j_jrn_def, - j_debit, - j_text, - j_tech_user, - j_tech_per, - j_qcode - ) values - ( - to_date(p_date,'DD.MM.YYYY'), - p_montant, - p_poste, - p_grpt, - p_jrn_def, - p_debit, - p_comment, - p_tech_user, - p_tech_per, - sCode - ); - -return; -end; -$$ - LANGUAGE plpgsql; -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) RETURNS void - AS $$ -declare - fid_client integer; - fid_good integer; -begin - select f_id into fid_client from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(trim(p_client)); - select f_id into fid_good from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(trim(p_fiche)); - insert into quant_purchase - (qp_internal, - j_id, - qp_fiche, - qp_quantite, - qp_price, - qp_vat, - qp_vat_code, - qp_nd_amount, - qp_nd_tva, - qp_nd_tva_recup, - qp_supplier, - qp_dep_priv) - values - (p_internal, - p_j_id, - fid_good, - p_quant, - p_price, - p_vat, - p_vat_code, - p_nd_amount, - p_nd_tva, - p_nd_tva_recup, - fid_client, - p_dep_priv); - return; -end; - $$ - LANGUAGE plpgsql; -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) RETURNS void - AS $$ -declare - fid_client integer; - fid_good integer; -begin - - select f_id into fid_client from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(trim(p_client)); - select f_id into fid_good from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(trim(p_fiche)); - insert into quant_sold - (qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client,qs_valid) - values - (p_internal,p_jid,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client,'Y'); - return; -end; - $$ - LANGUAGE plpgsql; -CREATE FUNCTION insert_quick_code(nf_id integer, tav_text text) RETURNS integer - AS $$ - declare - ns integer; - nExist integer; - tText text; - begin - tText := upper(trim(tav_text)); - tText := replace(tText,' ',''); - - loop - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - if length (tText) = 0 or tText is null then - tText := 'FID'||ns; - end if; - -- av_text already used ? - select count(*) into nExist - from jnt_fic_att_value join attr_value using (jft_id) - where - ad_id=23 and av_text=upper(tText); - - if nExist = 0 then - exit; - end if; - tText:='FID'||ns; - end loop; - -- insert into table jnt_fic_att_value - insert into jnt_fic_att_value values (ns,nf_id,23); - -- insert value into attr_value - insert into attr_value values (ns,upper(tText)); - return ns; - end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION jrn_check_periode() RETURNS trigger - AS $$ -declare -bClosed bool; -str_status text; -ljr_tech_per jrn.jr_tech_per%TYPE; -ljr_def_id jrn.jr_def_id%TYPE; -lreturn jrn%ROWTYPE; -begin -if TG_OP='INSERT' then - 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; -end if; - -select p_closed into bClosed from parm_periode - where p_id=ljr_tech_per; - -if bClosed = true then - raise exception 'Periode fermee'; -end if; - -select status into str_status from jrn_periode - where p_id =ljr_tech_per and jrn_def_id=ljr_def_id; - -if str_status <> 'OP' then - raise exception 'Periode fermee'; -end if; - -return lreturn; -end;$$ - LANGUAGE plpgsql; -CREATE FUNCTION jrn_def_add() RETURNS trigger - AS $$begin -execute 'insert into jrn_periode(p_id,jrn_def_id,status) select p_id,'||NEW.jrn_def_id||', - case when p_central=true then ''CE'' - when p_closed=true then ''CL'' - else ''OP'' - end -from -parm_periode '; -return NEW; -end;$$ - LANGUAGE plpgsql; -CREATE FUNCTION jrn_def_delete() RETURNS trigger - AS $$ -declare -nb numeric; -begin -select count(*) into nb from jrn where jr_def_id=OLD.jrn_def_id; - -if nb <> 0 then - raise exception 'EFFACEMENT INTERDIT: JOURNAL UTILISE'; -end if; -return OLD; -end;$$ - LANGUAGE plpgsql; -CREATE FUNCTION jrn_del() RETURNS trigger - AS $$ -declare -row jrn%ROWTYPE; -begin -row:=OLD; -insert into del_jrn ( jr_id, - jr_def_id, - jr_montant, - jr_comment, - jr_date, - jr_grpt_id, - jr_internal, - jr_tech_date, - jr_tech_per, - jrn_ech, - jr_ech, - jr_rapt, - jr_valid, - jr_opid, - jr_c_opid, - jr_pj, - jr_pj_name, - jr_pj_type, - jr_pj_number, - del_jrn_date) - select jr_id, - jr_def_id, - jr_montant, - jr_comment, - jr_date, - jr_grpt_id, - jr_internal, - jr_tech_date, - jr_tech_per, - jrn_ech, - jr_ech, - jr_rapt, - jr_valid, - jr_opid, - jr_c_opid, - jr_pj, - jr_pj_name, - jr_pj_type, - jr_pj_number - ,now() from jrn where jr_id=row.jr_id; -return row; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION jrnx_del() RETURNS trigger - AS $$ -declare -row jrnx%ROWTYPE; -begin -row:=OLD; -insert into del_jrnx select * from jrnx where j_id=row.j_id; -return row; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION plan_analytic_ins_upd() RETURNS trigger - AS $$ -declare - name text; -begin - name:=upper(NEW.pa_name); - name:=trim(name); - name:=replace(name,' ',''); - NEW.pa_name:=name; -return NEW; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION poste_analytique_ins_upd() RETURNS trigger - AS $$declare -name text; -rCount record; - -begin -name:=upper(NEW.po_name); -name:=trim(name); -name:=replace(name,' ',''); -NEW.po_name:=name; - -if NEW.ga_id is NULL then -return NEW; -end if; - -if length(trim(NEW.ga_id)) = 0 then - NEW.ga_id:=NULL; - return NEW; -end if; -perform 'select ga_id from groupe_analytique where ga_id='||NEW.ga_id; -if NOT FOUND then - raise exception' Inexistent Group Analytic %',NEW.ga_id; -end if; -return NEW; -end;$$ - LANGUAGE plpgsql; -CREATE FUNCTION proc_check_balance() RETURNS trigger - AS $$ -declare - diff numeric; - tt integer; -begin - if TG_OP = 'INSERT' or TG_OP='UPDATE' then - tt=NEW.jr_grpt_id; - diff:=check_balance(tt); - if diff != 0 then - raise exception 'balance error %',diff ; - end if; - return NEW; - end if; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION t_document_modele_validate() RETURNS trigger - AS $$ -declare - lText text; - modified document_modele%ROWTYPE; -begin - modified:=NEW; - - modified.md_filename:=replace(NEW.md_filename,' ','_'); - return modified; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION t_document_type_insert() RETURNS trigger - AS $$ -declare -nCounter integer; - BEGIN -select count(*) into nCounter from pg_class where relname='seq_doc_type_'||NEW.dt_id; -if nCounter = 0 then - execute 'create sequence seq_doc_type_'||NEW.dt_id; -end if; - RETURN NEW; - END; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION t_document_validate() RETURNS trigger - AS $$ -declare - lText text; - modified document%ROWTYPE; -begin - modified:=NEW; - modified.d_filename:=replace(NEW.d_filename,' ','_'); - return modified; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION t_jrn_def_sequence() RETURNS trigger - AS $$ -declare -nCounter integer; - - BEGIN - select count(*) into nCounter - from pg_class where relname='s_jrn_'||NEW.jrn_def_id; - if nCounter = 0 then - execute 'create sequence s_jrn_'||NEW.jrn_def_id; - raise notice 'Creating sequence s_jrn_%',NEW.jrn_def_id; - end if; - - RETURN NEW; - END; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION tmp_pcmn_ins() RETURNS trigger - AS $$ -declare - r_record tmp_pcmn%ROWTYPE; -begin -r_record=NEW; -if length(trim(r_record.pcm_type))=0 or r_record.pcm_type is NULL then - r_record.pcm_type:=find_pcm_type(NEW.pcm_val); - return r_record; -end if; -return NEW; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION trim_cvs_quote() RETURNS trigger - AS $$ -declare - modified import_tmp%ROWTYPE; -begin - modified:=NEW; - modified.devise=replace(new.devise,'"',''); - modified.poste_comptable=replace(new.poste_comptable,'"',''); - modified.compte_ordre=replace(NEW.COMPTE_ORDRE,'"',''); - modified.detail=replace(NEW.DETAIL,'"',''); - modified.num_compte=replace(NEW.NUM_COMPTE,'"',''); - return modified; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION trim_space_format_csv_banque() RETURNS trigger - AS $$ -declare - modified format_csv_banque%ROWTYPE; -begin - modified.name=trim(NEW.NAME); - modified.include_file=trim(new.include_file); - if ( length(modified.name) = 0 ) then - modified.name=null; - end if; - if ( length(modified.include_file) = 0 ) then - modified.include_file=null; - end if; - - return modified; -end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION tva_delete(integer) RETURNS void - AS $_$ -declare - p_tva_id alias for $1; - nCount integer; -begin - nCount=0; - select count(*) into nCount from quant_sold where qs_vat_code=p_tva_id; - if nCount != 0 then - return; - - end if; - select count(*) into nCount from quant_purchase where qp_vat_code=p_tva_id; - if nCount != 0 then - return; - - end if; - -delete from tva_rate where tva_id=p_tva_id; - return; -end; -$_$ - LANGUAGE plpgsql; -CREATE FUNCTION tva_insert(text, numeric, text, text) RETURNS integer - AS $_$ -declare - l_tva_id integer; - p_tva_label alias for $1; - p_tva_rate alias for $2; - p_tva_comment alias for $3; - p_tva_poste alias for $4; - debit text; - credit text; - nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::account_type; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::account_type; - if nCount = 0 then return 4; end if; - -end if; -select into l_tva_id nextval('s_tva') ; -insert into tva_rate(tva_id,tva_label,tva_rate,tva_comment,tva_poste) - values (l_tva_id,p_tva_label,p_tva_rate,p_tva_comment,p_tva_poste); -return 0; -end; -$_$ - LANGUAGE plpgsql; -CREATE FUNCTION tva_modify(integer, text, numeric, text, text) RETURNS integer - AS $_$ -declare - p_tva_id alias for $1; - p_tva_label alias for $2; - p_tva_rate alias for $3; - p_tva_comment alias for $4; - p_tva_poste alias for $5; - debit text; - credit text; - nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::account_type; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::account_type; - if nCount = 0 then return 4; end if; - -end if; -update tva_rate set tva_label=p_tva_label,tva_rate=p_tva_rate,tva_comment=p_tva_comment,tva_poste=p_tva_poste - where tva_id=p_tva_id; -return 0; -end; -$_$ - LANGUAGE plpgsql; -CREATE FUNCTION update_quick_code(njft_id integer, tav_text text) RETURNS integer - AS $$ - declare - ns integer; - nExist integer; - tText text; - old_qcode varchar; - begin - -- get current value - select av_text into old_qcode from attr_value where jft_id=njft_id; - -- av_text didn't change so no update - if tav_text = upper( trim(old_qcode)) then - return 0; - end if; - - tText := trim(upper(tav_text)); - tText := replace(tText,' ',''); - if length ( tText) = 0 or tText is null then - return 0; - end if; - - ns := njft_id; - - loop - -- av_text already used ? - select count(*) into nExist - from jnt_fic_att_value join attr_value using (jft_id) - where - ad_id=23 and av_text=tText; - - if nExist = 0 then - exit; - end if; - if tText = 'FID'||ns then - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - end if; - tText :='FID'||ns; - - end loop; - update attr_value set av_text = tText where jft_id=njft_id; - - -- update also the contact - update attr_value set av_text = tText - where jft_id in - ( select jft_id - from jnt_fic_att_value join attr_value using (jft_id) - where ad_id=25 and av_text=old_qcode); - - - update jrnx set j_qcode=tText where j_qcode = old_qcode; - return ns; - end; -$$ - LANGUAGE plpgsql; -CREATE FUNCTION bud_card_ins_upd() RETURNS trigger - AS $$declare - sCode text; -begin - -sCode:=trim(upper(NEW.bc_code)); -sCode:=replace(sCode,' ','_'); -sCode:=substr(sCode,1,10); -NEW.bc_code:=sCode; -return NEW; -end;$$ - LANGUAGE plpgsql; -CREATE FUNCTION bud_detail_ins_upd() RETURNS trigger - AS $$declare -mline bud_detail%ROWTYPE; -begin -mline:=NEW; -if mline.po_id = -1 then - mline.po_id:=NULL; -end if; -return mline; -end;$$ - LANGUAGE plpgsql; diff --git a/sources/html/admin/sql/mod1/index.sql b/sources/html/admin/sql/mod1/index.sql deleted file mode 100644 index 5f94a96..0000000 --- a/sources/html/admin/sql/mod1/index.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE UNIQUE INDEX attr_value_jft_id ON attr_value USING btree (jft_id); -CREATE UNIQUE INDEX fd_id_ad_id_x ON jnt_fic_attr USING btree (fd_id, ad_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 UNIQUE INDEX idx_case ON format_csv_banque USING btree (upper(name)); -CREATE INDEX idx_qs_internal ON quant_sold USING btree (qs_internal); -CREATE INDEX jnt_fic_att_value_fd_id_idx ON jnt_fic_att_value USING btree (f_id); -CREATE INDEX jnt_fic_attr_fd_id_idx ON jnt_fic_attr USING btree (fd_id); -CREATE UNIQUE INDEX k_ag_ref ON action_gestion USING btree (ag_ref); -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); diff --git a/sources/html/admin/sql/mod1/make-sql b/sources/html/admin/sql/mod1/make-sql deleted file mode 100755 index 9863b8f..0000000 --- a/sources/html/admin/sql/mod1/make-sql +++ /dev/null @@ -1,23 +0,0 @@ -pg_dump -O -U phpcompta -s ${DOMAIN}mod1|grep -v "COMMENT ON SCHEMA public IS 'Standard public schema';" |sed "/^--/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 FUNCTION/,/LANGUAGE/ { print $0;}' < schema.sql > function.sql -awk '/COMMENT/,/;/ {print $0;}' < schema.sql > comment.sql - -sed -i -e "/ALTER TABLE.*/d" -e "/ADD CONSTRAINT/d" -e "/CREATE PROCEDURAL/d" schema.sql - -grep setval schema.sql >> sequence.sql -pg_dump -O -U phpcompta -D -a -O ${DOMAIN}mod1 |sed "/^--/d" > data.sql - diff --git a/sources/html/admin/sql/mod1/schema.sql b/sources/html/admin/sql/mod1/schema.sql deleted file mode 100644 index b0f4bf0..0000000 --- a/sources/html/admin/sql/mod1/schema.sql +++ /dev/null @@ -1,3740 +0,0 @@ - -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = off; -SET check_function_bodies = false; -SET client_min_messages = warning; -SET escape_string_warning = off; - - -CREATE SCHEMA comptaproc; - - - - - -SET search_path = public, pg_catalog; - - -CREATE DOMAIN account_type AS character varying(40); - - -SET search_path = comptaproc, pg_catalog; - - -CREATE FUNCTION account_add(p_id public.account_type, p_name character varying) RETURNS void - AS $$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - nCount integer; -begin - select count(*) into nCount from tmp_pcmn where pcm_val=p_id; - 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); - end if; -return; -end ; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION account_auto(p_fd_id integer) RETURNS boolean - AS $$ -declare - l_auto bool; -begin - - select fd_create_account into l_auto from fiche_def where fd_id=p_fd_id; - if l_auto is null then - l_auto:=false; - end if; - return l_auto; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION account_compute(p_f_id integer) RETURNS public.account_type - AS $$ -declare - class_base fiche_def.fd_class_base%type; - maxcode numeric; - sResult account_type; -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; - 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; - return sResult; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION account_insert(p_f_id integer, p_account text) RETURNS integer - AS $_$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - nNew tmp_pcmn.pcm_val%type; - bAuto bool; - nFd_id integer; - sClass_Base fiche_def.fd_class_base%TYPE; - nCount integer; - first text; - second text; -begin - - if 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'; - select count(*) into nCount from tmp_pcmn where pcm_val=p_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,p_account); - else - -- account doesn't exist, create it - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - - nParent:=account_parent(p_account::account_type); - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::account_type,sName,nParent); - perform attribut_insert(p_f_id,5,p_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 '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'; - nNew:=account_compute(p_f_id); - raise info 'nNew %', nNew; - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(nNew); - perform account_add (nNew,sName); - perform attribut_insert(p_f_id,5,nNew); - - else - -- if there is an account_base then it is the default - select fd_class_base::account_type into nNew from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if nNew is null or length(trim(nNew)) = 0 then - raise notice 'count is null'; - perform attribut_insert(p_f_id,5,null); - else - perform attribut_insert(p_f_id,5,nNew); - end if; - end if; - end if; - -return 0; -end; -$_$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION account_parent(p_account public.account_type) RETURNS public.account_type - AS $$ -declare - sSubParent tmp_pcmn.pcm_val_parent%type; - sResult tmp_pcmn.pcm_val_parent%type; - nCount integer; -begin - if p_account is NULL then - return NULL; - end if; - sSubParent:=p_account; - while true loop - select count(*) into nCount - from tmp_pcmn - where - pcm_val = sSubParent; - if nCount != 0 then - sResult:= sSubParent; - exit; - end if; - sSubParent:= substr(sSubParent,1,length(sSubParent)-1); - if length(sSubParent) <= 0 then - raise exception 'Impossible de trouver le compte parent pour %',p_account; - end if; - raise notice 'sSubParent % % ',sSubParent,length(sSubParent); - end loop; - raise notice 'account_parent : Parent is %',sSubParent; - return sSubParent; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION account_update(p_f_id integer, p_account public.account_type) RETURNS integer - AS $$ -declare - nMax fiche.f_id%type; - nCount integer; - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - nJft_id attr_value.jft_id%type; - first text; - second text; -begin - - if length(trim(p_account)) != 0 then - if position (',' in p_account) = 0 then - select count(*) into nCount from tmp_pcmn where pcm_val=p_account; - if nCount = 0 then - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - 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; - 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; - end if; - end if; - select jft_id into njft_id from jnt_fic_att_value where f_id=p_f_id and ad_id=5; - update attr_value set av_text=p_account where jft_id=njft_id; - -return njft_id; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION action_gestion_ins_upd() RETURNS trigger - AS $$ -begin -NEW.ag_title := substr(trim(NEW.ag_title),1,70); -NEW.ag_hour := substr(trim(NEW.ag_hour),1,5); -return NEW; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION action_get_tree(p_id bigint) RETURNS SETOF bigint - AS $$ - -declare - e bigint; - i bigint; -begin - for e in select ag_id from action_gestion where ag_ref_ag_id=p_id - loop - if e = 0 then - return; - end if; - return next e; - for i in select ag_id from action_gestion where ag_ref_ag_id=e - loop - if i = 0 then - return; - end if; - return next i; - end loop; - end loop; - return; - -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION attribut_insert(p_f_id integer, p_ad_id integer, p_value character varying) RETURNS void - AS $$ -declare - n_jft_id integer; -begin - select nextval('s_jnt_fic_att_value') into n_jft_id; - insert into jnt_fic_att_value (jft_id,f_id,ad_id) values (n_jft_id,p_f_id,p_ad_id); - insert into attr_value (jft_id,av_text) values (n_jft_id,trim(p_value)); -return; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION attribute_correct_order() RETURNS void - AS $$ -declare - crs_correct cursor for select A.jnt_id,A.jnt_order from jnt_fic_attr as A join jnt_fic_attr as B using (fd_id) where A.jnt_order=B.jnt_order and A.jnt_id > B.jnt_id; - rec record; -begin - open crs_correct; - loop - fetch crs_correct into rec; - if NOT FOUND then - close crs_correct; - return; - end if; - update jnt_fic_attr set jnt_order=jnt_order + 1 where jnt_id = rec.jnt_id; - end loop; - close crs_correct; - perform attribute_correct_order (); -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION card_class_base(p_f_id integer) RETURNS text - AS $$ -declare - n_poste fiche_def.fd_class_base%type; -begin - - select fd_class_base into n_poste from fiche_def join fiche using -(fd_id) - where f_id=p_f_id; - if not FOUND then - raise exception 'Invalid fiche card_class_base(%)',p_f_id; - end if; -return n_poste; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION check_balance(p_grpt integer) RETURNS numeric - AS $$ -declare - amount_jrnx_debit numeric; - amount_jrnx_credit numeric; - amount_jrn numeric; -begin - select sum (j_montant) into amount_jrnx_credit - from jrnx - where - j_grpt=p_grpt - and j_debit=false; - - select sum (j_montant) into amount_jrnx_debit - from jrnx - where - j_grpt=p_grpt - and j_debit=true; - - select jr_montant into amount_jrn - from jrn - where - jr_grpt_id=p_grpt; - - if ( amount_jrnx_debit != amount_jrnx_credit ) - then - return abs(amount_jrnx_debit-amount_jrnx_credit); - end if; - if ( amount_jrn != amount_jrnx_credit) - then - return -1*abs(amount_jrn - amount_jrnx_credit); - end if; - return 0; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION correct_sequence(p_sequence text, p_col text, p_table text) RETURNS integer - AS $$ -declare -last_sequence int8; -max_sequence int8; -n integer; -begin - select count(*) into n from pg_class where relkind='S' and relname=lower(p_sequence); - if n = 0 then - raise exception ' Unknow sequence % ',p_sequence; - end if; - select count(*) into n from pg_class where relkind='r' and relname=lower(p_table); - if n = 0 then - raise exception ' Unknow table % ',p_table; - end if; - - execute 'select last_value from '||p_sequence into last_sequence; - raise notice 'Last value of the sequence is %', last_sequence; - - execute 'select max('||p_col||') from '||p_table into max_sequence; - if max_sequence is null then - max_sequence := 0; - end if; - raise notice 'Max value of the sequence is %', max_sequence; - max_sequence:= max_sequence +1; - execute 'alter sequence '||p_sequence||' restart with '||max_sequence; -return 0; - -end; -$$ - LANGUAGE plpgsql; - - - -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'; - - - -CREATE FUNCTION create_missing_sequence() RETURNS integer - AS $$ -declare -p_sequence text; -nSeq integer; -c1 cursor for select jrn_def_id from jrn_def; -begin - open c1; - loop - fetch c1 into nSeq; - if not FOUND THEN - close c1; - return 0; - end if; - p_sequence:='s_jrn_pj'||nSeq::text; - execute 'create sequence '||p_sequence; - end loop; -close c1; -return 0; - -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION drop_index(p_constraint character varying) RETURNS void - AS $$ -declare - nCount integer; -begin - select count(*) into nCount from pg_indexes where indexname=p_constraint; - if nCount = 1 then - execute 'drop index '||p_constraint ; - end if; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION drop_it(p_constraint character varying) RETURNS void - AS $$ -declare - nCount integer; -begin - select count(*) into nCount from pg_constraint where conname=p_constraint; - if nCount = 1 then - execute 'alter table parm_periode drop constraint '||p_constraint ; - end if; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION extension_ins_upd() RETURNS trigger - AS $$ -declare - sCode text; - sFile text; -begin -sCode:=trim(upper(NEW.ex_code)); -sCode:=replace(sCode,' ','_'); -sCode:=substr(sCode,1,15); -sCode=upper(sCode); -NEW.ex_code:=sCode; -sFile:=NEW.ex_file; -sFile:=replace(sFile,';','_'); -sFile:=replace(sFile,'<','_'); -sFile:=replace(sFile,'>','_'); -sFile:=replace(sFile,'..',''); -sFile:=replace(sFile,'&',''); -sFile:=replace(sFile,'|',''); - - - -return NEW; - -end; - -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION fiche_account_parent(p_f_id integer) RETURNS public.account_type - AS $$ -declare -ret tmp_pcmn.pcm_val%TYPE; -begin - select fd_class_base into ret from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if not FOUND then - raise exception '% N''existe pas',p_f_id; - end if; - return ret; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION fiche_attribut_synchro(p_fd_id integer) RETURNS void - AS $$ -declare - -- this sql gives the f_id and the missing attribute (ad_id) - list_missing cursor for select f_id,fd_id,ad_id,jnt_order from jnt_fic_attr join fiche as A using (fd_id) where fd_id=p_fd_id and ad_id not in (select ad_id from fiche join jnt_fic_att_value using (f_id) where fd_id=jnt_fic_attr.fd_id and A.f_id=f_id); - rec record; - -- value of the last insert - jnt jnt_fic_att_value%ROWTYPE; -begin - open list_missing; - loop - - fetch list_missing into rec; - IF NOT FOUND then - exit; - end if; - -- insert a value into jnt_fic_att_value - insert into jnt_fic_att_value (f_id,ad_id) values (rec.f_id,rec.ad_id) returning * into jnt; - - -- now we insert into attr_value - insert into attr_value values (jnt.jft_id,''); - end loop; - close list_missing; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION fiche_def_ins_upd() RETURNS trigger - AS $$ -begin - -if position (',' in NEW.fd_class_base) != 0 then - NEW.fd_create_account='f'; - -end if; -return NEW; -end;$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION find_pcm_type(pp_value public.account_type) RETURNS text - AS $$ -declare - str_type parm_poste.p_type%TYPE; - str_value parm_poste.p_type%TYPE; - nLength integer; -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 - return str_type; - end if; - nLength:=nLength-1; - str_value:=substring(str_value::text from 1 for nLength)::account_type; - end loop; -return 'CON'; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION get_letter_jnt(a bigint) RETURNS bigint - AS $$ -declare - nResult bigint; -begin - select jl_id into nResult from jnt_letter join letter_deb using (jl_id) where j_id = a; - if NOT FOUND then - select jl_id into nResult from jnt_letter join letter_cred using (jl_id) where j_id = a; - if NOT found then - return null; - end if; - end if; -return nResult; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION get_pcm_tree(source public.account_type) RETURNS SETOF public.account_type - AS $$ -declare - i account_type; - e account_type; -begin - for i in select pcm_val from tmp_pcmn where pcm_val_parent=source - loop - return next i; - for e in select get_pcm_tree from get_pcm_tree(i) - loop - return next e; - end loop; - - end loop; - return; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION group_analytic_ins_upd() RETURNS trigger - AS $$ -declare -name text; -begin -name:=upper(NEW.ga_id); -name:=trim(name); -name:=replace(name,' ',''); -NEW.ga_id:=name; -return NEW; -end;$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION group_analytique_del() RETURNS trigger - AS $$ -begin -update poste_analytique set ga_id=null -where ga_id=OLD.ga_id; -return OLD; -end;$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION html_quote(p_string text) RETURNS text - AS $$ -declare - r text; -begin - r:=p_string; - r:=replace(r,'<','<'); - r:=replace(r,'>','>'); - r:=replace(r,'''','"'); - return r; -end;$$ - LANGUAGE plpgsql; - - - -COMMENT ON FUNCTION html_quote(p_string text) IS 'remove harmfull HTML char'; - - - -CREATE FUNCTION info_def_ins_upd() RETURNS trigger - AS $$ -declare - row_info_def info_def%ROWTYPE; - str_type text; -begin -row_info_def:=NEW; -str_type:=upper(trim(NEW.id_type)); -str_type:=replace(str_type,' ',''); -str_type:=replace(str_type,',',''); -str_type:=replace(str_type,';',''); -if length(str_type) =0 then - raise exception 'id_type cannot be null'; -end if; -row_info_def.id_type:=str_type; -return row_info_def; -end; -$$ - LANGUAGE plpgsql; - - - -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 - AS $$ -declare - sCode varchar; - nCount_qcode integer; -begin - sCode=trim(p_qcode); - - -- if p_qcode is empty try to find one - if length(sCode) = 0 or p_qcode is null then - select count(*) into nCount_qcode - from vw_poste_qcode where j_poste=p_poste; - -- if we find only one q_code for a accountancy account - -- then retrieve it - if nCount_qcode = 1 then - select j_qcode::text into sCode - from vw_poste_qcode where j_poste=p_poste; - else - sCode=NULL; - end if; - - end if; - - insert into jrnx - ( - j_date, - j_montant, - j_poste, - j_grpt, - j_jrn_def, - j_debit, - j_text, - j_tech_user, - j_tech_per, - j_qcode - ) values - ( - to_date(p_date,'DD.MM.YYYY'), - p_montant, - p_poste, - p_grpt, - p_jrn_def, - p_debit, - p_comment, - p_tech_user, - p_tech_per, - sCode - ); - -return; -end; -$$ - LANGUAGE plpgsql; - - - -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) RETURNS void - AS $$ -declare - fid_client integer; - fid_good integer; -begin - select f_id into fid_client from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(trim(p_client)); - select f_id into fid_good from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(trim(p_fiche)); - insert into quant_purchase - (qp_internal, - j_id, - qp_fiche, - qp_quantite, - qp_price, - qp_vat, - qp_vat_code, - qp_nd_amount, - qp_nd_tva, - qp_nd_tva_recup, - qp_supplier, - qp_dep_priv) - values - (p_internal, - p_j_id, - fid_good, - p_quant, - p_price, - p_vat, - p_vat_code, - p_nd_amount, - p_nd_tva, - p_nd_tva_recup, - fid_client, - p_dep_priv); - return; -end; - $$ - LANGUAGE plpgsql; - - - -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) RETURNS void - AS $$ -declare - fid_client integer; - fid_good integer; -begin - - select f_id into fid_client from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(trim(p_client)); - select f_id into fid_good from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(trim(p_fiche)); - insert into quant_sold - (qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client,qs_valid) - values - (p_internal,p_jid,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client,'Y'); - return; -end; - $$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION insert_quick_code(nf_id integer, tav_text text) RETURNS integer - AS $$ - declare - ns integer; - nExist integer; - tText text; - begin - tText := upper(trim(tav_text)); - tText := replace(tText,' ',''); - - loop - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - if length (tText) = 0 or tText is null then - tText := 'FID'||ns; - end if; - -- av_text already used ? - select count(*) into nExist - from jnt_fic_att_value join attr_value using (jft_id) - where - ad_id=23 and av_text=upper(tText); - - if nExist = 0 then - exit; - end if; - tText:='FID'||ns; - end loop; - -- insert into table jnt_fic_att_value - insert into jnt_fic_att_value values (ns,nf_id,23); - -- insert value into attr_value - insert into attr_value values (ns,upper(tText)); - return ns; - end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION jrn_check_periode() RETURNS trigger - AS $$ -declare -bClosed bool; -str_status text; -ljr_tech_per jrn.jr_tech_per%TYPE; -ljr_def_id jrn.jr_def_id%TYPE; -lreturn jrn%ROWTYPE; -begin -if TG_OP='INSERT' then - 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; -end if; - -select p_closed into bClosed from parm_periode - where p_id=ljr_tech_per; - -if bClosed = true then - raise exception 'Periode fermee'; -end if; - -select status into str_status from jrn_periode - where p_id =ljr_tech_per and jrn_def_id=ljr_def_id; - -if str_status <> 'OP' then - raise exception 'Periode fermee'; -end if; - -return lreturn; -end;$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION jrn_def_add() RETURNS trigger - AS $$begin -execute 'insert into jrn_periode(p_id,jrn_def_id,status) select p_id,'||NEW.jrn_def_id||', - case when p_central=true then ''CE'' - when p_closed=true then ''CL'' - else ''OP'' - end -from -parm_periode '; -return NEW; -end;$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION jrn_def_delete() RETURNS trigger - AS $$ -declare -nb numeric; -begin -select count(*) into nb from jrn where jr_def_id=OLD.jrn_def_id; - -if nb <> 0 then - raise exception 'EFFACEMENT INTERDIT: JOURNAL UTILISE'; -end if; -return OLD; -end;$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION jrn_del() RETURNS trigger - AS $$ -declare -row jrn%ROWTYPE; -begin -row:=OLD; -insert into del_jrn ( jr_id, - jr_def_id, - jr_montant, - jr_comment, - jr_date, - jr_grpt_id, - jr_internal, - jr_tech_date, - jr_tech_per, - jrn_ech, - jr_ech, - jr_rapt, - jr_valid, - jr_opid, - jr_c_opid, - jr_pj, - jr_pj_name, - jr_pj_type, - jr_pj_number, - del_jrn_date) - select jr_id, - jr_def_id, - jr_montant, - jr_comment, - jr_date, - jr_grpt_id, - jr_internal, - jr_tech_date, - jr_tech_per, - jrn_ech, - jr_ech, - jr_rapt, - jr_valid, - jr_opid, - jr_c_opid, - jr_pj, - jr_pj_name, - jr_pj_type, - jr_pj_number - ,now() from jrn where jr_id=row.jr_id; -return row; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION jrnx_del() RETURNS trigger - AS $$ -declare -row jrnx%ROWTYPE; -begin -row:=OLD; -insert into del_jrnx select * from jrnx where j_id=row.j_id; -return row; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION plan_analytic_ins_upd() RETURNS trigger - AS $$ -declare - name text; -begin - name:=upper(NEW.pa_name); - name:=trim(name); - name:=replace(name,' ',''); - NEW.pa_name:=name; -return NEW; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION poste_analytique_ins_upd() RETURNS trigger - AS $$declare -name text; -rCount record; - -begin -name:=upper(NEW.po_name); -name:=trim(name); -name:=replace(name,' ',''); -NEW.po_name:=name; - -if NEW.ga_id is NULL then -return NEW; -end if; - -if length(trim(NEW.ga_id)) = 0 then - NEW.ga_id:=NULL; - return NEW; -end if; -perform 'select ga_id from groupe_analytique where ga_id='||NEW.ga_id; -if NOT FOUND then - raise exception' Inexistent Group Analytic %',NEW.ga_id; -end if; -return NEW; -end;$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION proc_check_balance() RETURNS trigger - AS $$ -declare - diff numeric; - tt integer; -begin - if TG_OP = 'INSERT' or TG_OP='UPDATE' then - tt=NEW.jr_grpt_id; - diff:=check_balance(tt); - if diff != 0 then - raise exception 'balance error %',diff ; - end if; - return NEW; - end if; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION t_document_modele_validate() RETURNS trigger - AS $$ -declare - lText text; - modified document_modele%ROWTYPE; -begin - modified:=NEW; - - modified.md_filename:=replace(NEW.md_filename,' ','_'); - return modified; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION t_document_type_insert() RETURNS trigger - AS $$ -declare -nCounter integer; - BEGIN -select count(*) into nCounter from pg_class where relname='seq_doc_type_'||NEW.dt_id; -if nCounter = 0 then - execute 'create sequence seq_doc_type_'||NEW.dt_id; -end if; - RETURN NEW; - END; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION t_document_validate() RETURNS trigger - AS $$ -declare - lText text; - modified document%ROWTYPE; -begin - modified:=NEW; - modified.d_filename:=replace(NEW.d_filename,' ','_'); - return modified; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION t_jrn_def_sequence() RETURNS trigger - AS $$ -declare -nCounter integer; - - BEGIN - select count(*) into nCounter - from pg_class where relname='s_jrn_'||NEW.jrn_def_id; - if nCounter = 0 then - execute 'create sequence s_jrn_'||NEW.jrn_def_id; - raise notice 'Creating sequence s_jrn_%',NEW.jrn_def_id; - end if; - - RETURN NEW; - END; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION tmp_pcmn_ins() RETURNS trigger - AS $$ -declare - r_record tmp_pcmn%ROWTYPE; -begin -r_record=NEW; -if length(trim(r_record.pcm_type))=0 or r_record.pcm_type is NULL then - r_record.pcm_type:=find_pcm_type(NEW.pcm_val); - return r_record; -end if; -return NEW; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION trim_cvs_quote() RETURNS trigger - AS $$ -declare - modified import_tmp%ROWTYPE; -begin - modified:=NEW; - modified.devise=replace(new.devise,'"',''); - modified.poste_comptable=replace(new.poste_comptable,'"',''); - modified.compte_ordre=replace(NEW.COMPTE_ORDRE,'"',''); - modified.detail=replace(NEW.DETAIL,'"',''); - modified.num_compte=replace(NEW.NUM_COMPTE,'"',''); - return modified; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION trim_space_format_csv_banque() RETURNS trigger - AS $$ -declare - modified format_csv_banque%ROWTYPE; -begin - modified.name=trim(NEW.NAME); - modified.include_file=trim(new.include_file); - if ( length(modified.name) = 0 ) then - modified.name=null; - end if; - if ( length(modified.include_file) = 0 ) then - modified.include_file=null; - end if; - - return modified; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION tva_delete(integer) RETURNS void - AS $_$ -declare - p_tva_id alias for $1; - nCount integer; -begin - nCount=0; - select count(*) into nCount from quant_sold where qs_vat_code=p_tva_id; - if nCount != 0 then - return; - - end if; - select count(*) into nCount from quant_purchase where qp_vat_code=p_tva_id; - if nCount != 0 then - return; - - end if; - -delete from tva_rate where tva_id=p_tva_id; - return; -end; -$_$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION tva_insert(text, numeric, text, text) RETURNS integer - AS $_$ -declare - l_tva_id integer; - p_tva_label alias for $1; - p_tva_rate alias for $2; - p_tva_comment alias for $3; - p_tva_poste alias for $4; - debit text; - credit text; - nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::account_type; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::account_type; - if nCount = 0 then return 4; end if; - -end if; -select into l_tva_id nextval('s_tva') ; -insert into tva_rate(tva_id,tva_label,tva_rate,tva_comment,tva_poste) - values (l_tva_id,p_tva_label,p_tva_rate,p_tva_comment,p_tva_poste); -return 0; -end; -$_$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION tva_modify(integer, text, numeric, text, text) RETURNS integer - AS $_$ -declare - p_tva_id alias for $1; - p_tva_label alias for $2; - p_tva_rate alias for $3; - p_tva_comment alias for $4; - p_tva_poste alias for $5; - debit text; - credit text; - nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::account_type; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::account_type; - if nCount = 0 then return 4; end if; - -end if; -update tva_rate set tva_label=p_tva_label,tva_rate=p_tva_rate,tva_comment=p_tva_comment,tva_poste=p_tva_poste - where tva_id=p_tva_id; -return 0; -end; -$_$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION update_quick_code(njft_id integer, tav_text text) RETURNS integer - AS $$ - declare - ns integer; - nExist integer; - tText text; - old_qcode varchar; - begin - -- get current value - select av_text into old_qcode from attr_value where jft_id=njft_id; - -- av_text didn't change so no update - if tav_text = upper( trim(old_qcode)) then - return 0; - end if; - - tText := trim(upper(tav_text)); - tText := replace(tText,' ',''); - if length ( tText) = 0 or tText is null then - return 0; - end if; - - ns := njft_id; - - loop - -- av_text already used ? - select count(*) into nExist - from jnt_fic_att_value join attr_value using (jft_id) - where - ad_id=23 and av_text=tText; - - if nExist = 0 then - exit; - end if; - if tText = 'FID'||ns then - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - end if; - tText :='FID'||ns; - - end loop; - update attr_value set av_text = tText where jft_id=njft_id; - - -- update also the contact - update attr_value set av_text = tText - where jft_id in - ( select jft_id - from jnt_fic_att_value join attr_value using (jft_id) - where ad_id=25 and av_text=old_qcode); - - - update jrnx set j_qcode=tText where j_qcode = old_qcode; - return ns; - end; -$$ - LANGUAGE plpgsql; - - -SET search_path = public, pg_catalog; - - -CREATE FUNCTION bud_card_ins_upd() RETURNS trigger - AS $$declare - sCode text; -begin - -sCode:=trim(upper(NEW.bc_code)); -sCode:=replace(sCode,' ','_'); -sCode:=substr(sCode,1,10); -NEW.bc_code:=sCode; -return NEW; -end;$$ - LANGUAGE plpgsql; - - - -CREATE FUNCTION bud_detail_ins_upd() RETURNS trigger - AS $$declare -mline bud_detail%ROWTYPE; -begin -mline:=NEW; -if mline.po_id = -1 then - mline.po_id:=NULL; -end if; -return mline; -end;$$ - LANGUAGE plpgsql; - - -SET default_tablespace = ''; - -SET default_with_oids = true; - - -CREATE TABLE action ( - ac_id integer NOT NULL, - ac_description text NOT NULL, - ac_module text, - ac_code character varying(9) -); - - - -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 '; - - -SET default_with_oids = false; - - -CREATE TABLE action_detail ( - ad_id integer NOT NULL, - f_id bigint, - ad_text text, - ad_pu numeric(20,4) DEFAULT 0, - ad_quant numeric(20,4) DEFAULT 0, - ad_tva_id integer DEFAULT 0, - ad_tva_amount numeric(20,4) DEFAULT 0, - ad_total_amount numeric(20,4) DEFAULT 0, - ag_id integer DEFAULT 0 NOT NULL -); - - - -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'; - - - -CREATE SEQUENCE action_detail_ad_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -ALTER SEQUENCE action_detail_ad_id_seq OWNED BY action_detail.ad_id; - - - -CREATE SEQUENCE action_gestion_ag_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - -SET default_with_oids = true; - - -CREATE TABLE action_gestion ( - ag_id integer DEFAULT nextval('action_gestion_ag_id_seq'::regclass) NOT NULL, - ag_type integer, - f_id_dest integer NOT NULL, - ag_title character varying(70), - ag_timestamp timestamp without time zone DEFAULT now(), - ag_cal character(1) DEFAULT 'C'::bpchar, - ag_ref_ag_id integer, - ag_comment text, - ag_ref text, - ag_hour text, - ag_priority integer DEFAULT 2, - ag_dest text, - ag_owner text, - ag_contact bigint, - ag_state integer -); - - - -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_cal IS ' visible in the calendar if = C'; - - - -COMMENT ON COLUMN action_gestion.ag_ref_ag_id IS ' concerning the action '; - - - -COMMENT ON COLUMN action_gestion.ag_comment IS ' comment of the action'; - - - -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 person who 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 '; - - - -CREATE TABLE attr_def ( - ad_id integer DEFAULT nextval(('s_attr_def'::text)::regclass) NOT NULL, - ad_text text -); - - - -COMMENT ON TABLE attr_def IS 'The available attributs for the cards'; - - - -CREATE TABLE attr_min ( - frd_id integer, - ad_id integer -); - - - -COMMENT ON TABLE attr_min IS 'The value of attributs for the cards'; - - - -CREATE TABLE attr_value ( - jft_id integer, - av_text text -); - - - -CREATE SEQUENCE bilan_b_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - -SET default_with_oids = false; - - -CREATE TABLE bilan ( - b_id integer DEFAULT nextval('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 -); - - - -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...'; - - - -CREATE SEQUENCE bud_card_bc_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE bud_detail_bd_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE bud_detail_periode_bdp_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - -SET default_with_oids = true; - - -CREATE TABLE centralized ( - c_id integer DEFAULT nextval(('s_centralized'::text)::regclass) NOT NULL, - c_j_id integer, - c_date date NOT NULL, - c_internal text NOT NULL, - c_montant numeric(20,4) NOT NULL, - c_debit boolean DEFAULT true, - c_jrn_def integer NOT NULL, - c_poste account_type, - c_description text, - c_grp integer NOT NULL, - c_comment text, - c_rapt text, - c_periode integer, - c_order integer -); - - - -COMMENT ON TABLE centralized IS 'The centralized journal'; - - -SET default_with_oids = false; - - -CREATE TABLE del_action ( - del_id integer NOT NULL, - del_name text NOT NULL, - del_time timestamp without time zone -); - - - -CREATE SEQUENCE del_action_del_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -ALTER SEQUENCE del_action_del_id_seq OWNED BY del_action.del_id; - - - -CREATE TABLE del_jrn ( - jr_id integer NOT NULL, - jr_def_id integer, - jr_montant numeric(20,4), - jr_comment text, - jr_date date, - jr_grpt_id integer, - jr_internal text, - jr_tech_date timestamp without time zone, - jr_tech_per integer, - jrn_ech date, - jr_ech date, - jr_rapt text, - jr_valid boolean, - jr_opid integer, - jr_c_opid integer, - jr_pj oid, - jr_pj_name text, - jr_pj_type text, - del_jrn_date timestamp without time zone, - jr_pj_number text -); - - - -CREATE TABLE del_jrnx ( - j_id integer NOT NULL, - j_date date, - j_montant numeric(20,4), - j_poste account_type, - j_grpt integer, - j_rapt text, - j_jrn_def integer, - j_debit boolean, - j_text text, - j_centralized boolean, - j_internal text, - j_tech_user text, - j_tech_date timestamp without time zone, - j_tech_per integer, - j_qcode text -); - - - -CREATE SEQUENCE document_d_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - -SET default_with_oids = true; - - -CREATE TABLE document ( - d_id integer DEFAULT nextval('document_d_id_seq'::regclass) NOT NULL, - ag_id integer NOT NULL, - d_lob oid, - d_number bigint NOT NULL, - d_filename text, - d_mimetype text -); - - - -COMMENT ON TABLE 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 MAXVALUE - NO MINVALUE - CACHE 1; - - - -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 document_modele IS ' contains all the template for the documents'; - - - -CREATE SEQUENCE document_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -COMMENT ON SEQUENCE document_seq IS 'Sequence for the sequence bound to the document modele'; - - - -CREATE SEQUENCE document_state_s_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE TABLE document_state ( - s_id integer DEFAULT nextval('document_state_s_id_seq'::regclass) NOT NULL, - s_value character varying(50) NOT NULL -); - - - -COMMENT ON TABLE document_state IS 'State of the document'; - - - -CREATE SEQUENCE document_type_dt_id_seq - START WITH 25 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE TABLE document_type ( - dt_id integer DEFAULT nextval('document_type_dt_id_seq'::regclass) NOT NULL, - dt_value character varying(80) -); - - - -COMMENT ON TABLE document_type IS 'Type of document : meeting, invoice,...'; - - -SET default_with_oids = false; - - -CREATE TABLE extension ( - ex_id integer NOT NULL, - ex_name character varying(30) NOT NULL, - ex_code character varying(15) NOT NULL, - ex_desc character varying(250), - ex_file character varying NOT NULL, - ex_enable "char" DEFAULT 'Y'::"char" NOT NULL -); - - - -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 '; - - - -CREATE SEQUENCE extension_ex_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -ALTER SEQUENCE extension_ex_id_seq OWNED BY extension.ex_id; - - -SET default_with_oids = true; - - -CREATE TABLE fiche ( - f_id integer DEFAULT nextval(('s_fiche'::text)::regclass) NOT NULL, - fd_id integer -); - - - -COMMENT ON TABLE fiche IS 'Cards'; - - - -CREATE TABLE fiche_def ( - fd_id integer DEFAULT nextval(('s_fdef'::text)::regclass) NOT NULL, - fd_class_base text, - fd_label text NOT NULL, - fd_create_account boolean DEFAULT false, - frd_id integer NOT NULL -); - - - -COMMENT ON TABLE fiche_def IS 'Cards definition'; - - - -CREATE TABLE fiche_def_ref ( - frd_id integer DEFAULT nextval(('s_fiche_def_ref'::text)::regclass) NOT NULL, - frd_text text, - frd_class_base integer -); - - - -COMMENT ON TABLE fiche_def_ref IS 'Family Cards definition'; - - -SET default_with_oids = false; - - -CREATE TABLE forecast ( - f_id integer NOT NULL, - f_name text NOT NULL -); - - - -COMMENT ON TABLE forecast IS 'contains the name of the forecast'; - - - -CREATE TABLE forecast_cat ( - fc_id integer NOT NULL, - fc_desc text NOT NULL, - f_id bigint, - fc_order integer DEFAULT 0 NOT NULL -); - - - -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'; - - - -CREATE SEQUENCE forecast_cat_fc_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -ALTER SEQUENCE forecast_cat_fc_id_seq OWNED BY forecast_cat.fc_id; - - - -CREATE SEQUENCE forecast_f_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -ALTER SEQUENCE forecast_f_id_seq OWNED BY forecast.f_id; - - - -CREATE TABLE 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 -); - - - -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 '; - - - -CREATE SEQUENCE forecast_item_fi_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -ALTER SEQUENCE forecast_item_fi_id_seq OWNED BY forecast_item.fi_id; - - -SET default_with_oids = true; - - -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 -); - - - -COMMENT ON TABLE form IS 'Forms content'; - - - -CREATE TABLE format_csv_banque ( - name text NOT NULL, - include_file text NOT NULL -); - - - -CREATE TABLE formdef ( - fr_id integer DEFAULT nextval(('s_formdef'::text)::regclass) NOT NULL, - fr_label text -); - - -SET default_with_oids = false; - - -CREATE TABLE groupe_analytique ( - ga_id character varying(10) NOT NULL, - pa_id integer, - ga_description text -); - - - -CREATE SEQUENCE historique_analytique_ha_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - -SET default_with_oids = true; - - -CREATE TABLE import_tmp ( - code text NOT NULL, - date_exec date NOT NULL, - date_valeur date NOT NULL, - devise text, - compte_ordre text, - detail text, - num_compte text, - poste_comptable text, - status character varying(1) DEFAULT 'n'::character varying NOT NULL, - bq_account text NOT NULL, - jrn integer NOT NULL, - jr_rapt text, - montant numeric(20,4) DEFAULT 0 NOT NULL, - CONSTRAINT import_tmp_status_check CHECK ((((((status)::text = 'n'::text) OR ((status)::text = 't'::text)) OR ((status)::text = 'd'::text)) OR ((status)::text = 'w'::text))) -); - - - -COMMENT ON TABLE import_tmp IS 'Table temporaire pour l''importation des banques en format CSV'; - - - -COMMENT ON COLUMN import_tmp.status IS 'Status w waiting, d delete t transfert'; - - -SET default_with_oids = false; - - -CREATE TABLE 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'; - - -SET default_with_oids = true; - - -CREATE TABLE jnt_fic_att_value ( - jft_id integer DEFAULT nextval(('s_jnt_fic_att_value'::text)::regclass) NOT NULL, - f_id integer, - ad_id integer -); - - - -COMMENT ON TABLE jnt_fic_att_value IS 'join between the card and the attribut definition'; - - - -CREATE SEQUENCE s_jnt_id - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE TABLE jnt_fic_attr ( - fd_id integer, - ad_id integer, - jnt_id bigint DEFAULT nextval('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'; - - -SET default_with_oids = false; - - -CREATE TABLE jnt_letter ( - jl_id integer NOT NULL, - jl_amount_deb numeric(20,4) -); - - - -CREATE SEQUENCE jnt_letter_jl_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -ALTER SEQUENCE jnt_letter_jl_id_seq OWNED BY jnt_letter.jl_id; - - -SET default_with_oids = true; - - -CREATE TABLE 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, - jr_comment text, - jr_date date, - jr_grpt_id integer NOT NULL, - jr_internal text, - jr_tech_date timestamp without time zone DEFAULT now() NOT NULL, - jr_tech_per integer NOT NULL, - jrn_ech date, - jr_ech date, - jr_rapt text, - jr_valid boolean DEFAULT true, - jr_opid integer, - jr_c_opid integer, - jr_pj oid, - jr_pj_name text, - jr_pj_type text, - jr_pj_number text, - jr_mt text -); - - - -COMMENT ON TABLE jrn IS 'Journal: content one line for a group of accountancy writing'; - - - -CREATE TABLE jrn_action ( - ja_id integer DEFAULT nextval(('s_jrnaction'::text)::regclass) NOT NULL, - ja_name text NOT NULL, - ja_desc text, - ja_url text NOT NULL, - ja_action text NOT NULL, - ja_lang text DEFAULT 'FR'::text, - ja_jrn_type character(3) -); - - - -COMMENT ON TABLE jrn_action IS 'Possible action when we are in journal (menu)'; - - - -CREATE TABLE 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, - jrn_def_class_cred text, - jrn_def_fiche_deb text, - jrn_def_fiche_cred text, - jrn_deb_max_line integer DEFAULT 1, - jrn_cred_max_line integer DEFAULT 1, - jrn_def_ech boolean DEFAULT false, - jrn_def_ech_lib text, - jrn_def_type character(3) NOT NULL, - jrn_def_code text NOT NULL, - jrn_def_pj_pref text -); - - - -COMMENT ON TABLE jrn_def IS 'Definition of a journal, his properties'; - - -SET default_with_oids = false; - - -CREATE TABLE jrn_info ( - ji_id integer NOT NULL, - jr_id integer NOT NULL, - id_type text NOT NULL, - ji_value text -); - - - -CREATE SEQUENCE jrn_info_ji_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -ALTER SEQUENCE jrn_info_ji_id_seq OWNED BY jrn_info.ji_id; - - - -CREATE TABLE jrn_periode ( - jrn_def_id integer NOT NULL, - p_id integer NOT NULL, - status text -); - - -SET default_with_oids = true; - - -CREATE TABLE jrn_rapt ( - jra_id integer DEFAULT nextval(('s_jrn_rapt'::text)::regclass) NOT NULL, - jr_id integer NOT NULL, - jra_concerned integer NOT NULL -); - - - -COMMENT ON TABLE jrn_rapt IS 'Rapprochement between operation'; - - - -CREATE TABLE jrn_type ( - jrn_type_id character(3) NOT NULL, - jrn_desc text -); - - - -COMMENT ON TABLE jrn_type IS 'Type of journal (Sell, Buy, Financial...)'; - - - -CREATE TABLE 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_grpt integer NOT NULL, - j_rapt text, - j_jrn_def integer NOT NULL, - j_debit boolean DEFAULT true, - j_text text, - j_centralized boolean DEFAULT false, - j_internal text, - j_tech_user text NOT NULL, - j_tech_date timestamp without time zone DEFAULT now() NOT NULL, - j_tech_per integer NOT NULL, - j_qcode text -); - - - -COMMENT ON TABLE jrnx IS 'Journal: content one line for each accountancy writing'; - - -SET default_with_oids = false; - - -CREATE TABLE letter_cred ( - lc_id integer NOT NULL, - j_id bigint NOT NULL, - jl_id bigint NOT NULL -); - - - -CREATE SEQUENCE letter_cred_lc_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -ALTER SEQUENCE letter_cred_lc_id_seq OWNED BY letter_cred.lc_id; - - - -CREATE TABLE letter_deb ( - ld_id integer NOT NULL, - j_id bigint NOT NULL, - jl_id bigint NOT NULL -); - - - -CREATE SEQUENCE letter_deb_ld_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -ALTER SEQUENCE letter_deb_ld_id_seq OWNED BY letter_deb.ld_id; - - - -CREATE TABLE mod_payment ( - mp_id integer NOT NULL, - mp_lib text NOT NULL, - mp_jrn_def_id integer NOT NULL, - mp_type character varying(3) NOT NULL, - mp_fd_id bigint, - mp_qcode text -); - - - -COMMENT ON TABLE mod_payment IS 'Contains the different media of payment and the corresponding ledger'; - - - -CREATE SEQUENCE mod_payment_mp_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -ALTER SEQUENCE mod_payment_mp_id_seq OWNED BY mod_payment.mp_id; - - - -CREATE SEQUENCE op_def_op_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE TABLE op_predef ( - od_id integer DEFAULT nextval('op_def_op_seq'::regclass) NOT NULL, - jrn_def_id integer NOT NULL, - od_name text NOT NULL, - od_item integer NOT NULL, - od_jrn_type text NOT NULL, - od_direct boolean NOT NULL -); - - - -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'; - - - -CREATE SEQUENCE op_predef_detail_opd_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE TABLE op_predef_detail ( - opd_id integer DEFAULT nextval('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_quantity numeric(20,4), - opd_debit boolean NOT NULL, - opd_tva_amount numeric(20,4), - opd_comment text, - opd_qc boolean -); - - - -COMMENT ON TABLE op_predef_detail IS 'contains the detail of predefined operations'; - - - -CREATE SEQUENCE s_oa_group - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE TABLE operation_analytique ( - oa_id integer DEFAULT nextval('historique_analytique_ha_id_seq'::regclass) NOT NULL, - po_id integer NOT NULL, - pa_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_date date NOT NULL, - oa_row integer -); - - - -COMMENT ON TABLE operation_analytique IS 'History of the analytic account'; - - -SET default_with_oids = true; - - -CREATE TABLE parameter ( - pr_id text NOT NULL, - pr_value text -); - - - -COMMENT ON TABLE parameter IS 'parameter of the company'; - - - -CREATE TABLE parm_code ( - p_code text NOT NULL, - p_value text, - p_comment text -); - - - -CREATE TABLE parm_money ( - pm_id integer DEFAULT nextval(('s_currency'::text)::regclass), - pm_code character(3) NOT NULL, - pm_rate numeric(20,4) -); - - - -COMMENT ON TABLE parm_money IS 'Currency conversion'; - - - -CREATE TABLE 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, - CONSTRAINT parm_periode_check CHECK ((p_end >= p_start)) -); - - - -COMMENT ON TABLE parm_periode IS 'Periode definition'; - - -SET default_with_oids = false; - - -CREATE TABLE parm_poste ( - p_value 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)'; - - - -CREATE SEQUENCE plan_analytique_pa_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE TABLE plan_analytique ( - pa_id integer DEFAULT nextval('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)'; - - - -CREATE SEQUENCE poste_analytique_po_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE TABLE poste_analytique ( - po_id integer DEFAULT nextval('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) -); - - - -COMMENT ON TABLE poste_analytique IS 'Poste Analytique'; - - - -CREATE TABLE quant_purchase ( - qp_id integer DEFAULT nextval(('s_quantity'::text)::regclass) NOT NULL, - qp_internal text NOT NULL, - j_id integer NOT NULL, - qp_fiche integer NOT NULL, - qp_quantite numeric(20,4) NOT NULL, - qp_price numeric(20,4), - qp_vat numeric(20,4) DEFAULT 0.0, - qp_vat_code integer, - qp_nd_amount numeric(20,4) DEFAULT 0.0, - qp_nd_tva numeric(20,4) DEFAULT 0.0, - qp_nd_tva_recup numeric(20,4) DEFAULT 0.0, - qp_supplier integer NOT NULL, - qp_valid character(1) DEFAULT 'Y'::bpchar NOT NULL, - qp_dep_priv numeric(20,4) DEFAULT 0.0 -); - - -SET default_with_oids = true; - - -CREATE TABLE quant_sold ( - qs_id integer DEFAULT nextval(('s_quantity'::text)::regclass) NOT NULL, - qs_internal text NOT NULL, - qs_fiche integer NOT NULL, - qs_quantite numeric(20,4) NOT NULL, - qs_price numeric(20,4), - qs_vat numeric(20,4), - qs_vat_code integer, - qs_client integer NOT NULL, - qs_valid character(1) DEFAULT 'Y'::bpchar NOT NULL, - j_id integer NOT NULL -); - - - -COMMENT ON TABLE quant_sold IS 'Contains about invoice for customer'; - - - -CREATE SEQUENCE s_attr_def - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_cbc - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_central - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_central_order - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_centralized - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_currency - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_fdef - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_fiche - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_fiche_def_ref - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_form - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_formdef - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_grpt - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_idef - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_internal - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_invoice - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_isup - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jnt_fic_att_value - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrn - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrn_1 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrn_2 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrn_3 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrn_4 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrn_def - START WITH 5 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrn_op - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrn_pj1 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrn_pj2 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrn_pj3 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrn_pj4 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrn_rapt - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrnaction - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_jrnx - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_periode - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_quantity - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_stock_goods - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_tva - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_user_act - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE s_user_jrn - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_bud_hypothese_bh_id - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_doc_type_1 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_doc_type_10 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_doc_type_2 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_doc_type_20 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_doc_type_21 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_doc_type_22 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_doc_type_3 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_doc_type_4 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_doc_type_5 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_doc_type_6 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_doc_type_7 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_doc_type_8 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE SEQUENCE seq_doc_type_9 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -CREATE TABLE stock_goods ( - sg_id integer DEFAULT nextval(('s_stock_goods'::text)::regclass) NOT NULL, - j_id integer, - f_id integer NOT NULL, - sg_code text, - sg_quantity numeric(8,4) DEFAULT 0, - sg_type character(1) DEFAULT 'c'::bpchar NOT NULL, - sg_date date, - sg_tech_date date DEFAULT now(), - sg_tech_user text, - sg_comment character varying(80), - sg_exercice character varying(4), - CONSTRAINT stock_goods_sg_type CHECK (((sg_type = 'c'::bpchar) OR (sg_type = 'd'::bpchar))) -); - - - -COMMENT ON TABLE stock_goods IS 'About the goods'; - - - -CREATE TABLE tmp_pcmn ( - pcm_val account_type NOT NULL, - pcm_lib text, - pcm_val_parent account_type DEFAULT 0, - pcm_type text -); - - - -COMMENT ON TABLE tmp_pcmn IS 'Plan comptable minimum normalisé'; - - - -CREATE SEQUENCE todo_list_tl_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - -SET default_with_oids = false; - - -CREATE TABLE todo_list ( - tl_id integer DEFAULT nextval('todo_list_tl_id_seq'::regclass) NOT NULL, - tl_date date NOT NULL, - tl_title text NOT NULL, - tl_desc text, - use_login text NOT NULL -); - - - -COMMENT ON TABLE todo_list IS 'Todo list'; - - -SET default_with_oids = true; - - -CREATE TABLE tva_rate ( - tva_id integer DEFAULT nextval('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 -); - - - -COMMENT ON TABLE tva_rate IS 'Rate of vat'; - - - -CREATE TABLE user_local_pref ( - user_id text NOT NULL, - parameter_type text NOT NULL, - parameter_value text -); - - - -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 '; - - - -CREATE TABLE user_sec_act ( - ua_id integer DEFAULT nextval(('s_user_act'::text)::regclass) NOT NULL, - ua_login text, - ua_act_id integer -); - - -SET default_with_oids = false; - - -CREATE TABLE user_sec_extension ( - use_id integer NOT NULL, - ex_id integer NOT NULL, - use_login text NOT NULL, - use_access character(1) DEFAULT 0 NOT NULL -); - - - -COMMENT ON TABLE user_sec_extension IS 'Security for extension'; - - - -CREATE SEQUENCE user_sec_extension_use_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - -ALTER SEQUENCE user_sec_extension_use_id_seq OWNED BY user_sec_extension.use_id; - - -SET default_with_oids = true; - - -CREATE TABLE 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 ( - val integer -); - - - -CREATE VIEW vw_client AS - SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email FROM (((((((((SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 1)) a JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 13)) b USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 23)) a1 USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 5)) c USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 14)) d USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 15)) e USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 16)) f USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 17)) g USING (f_id)) LEFT JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 18)) h USING (f_id)) WHERE (a.frd_id = 9); - - - -CREATE VIEW vw_fiche_attr AS - SELECT a.f_id, a.fd_id, a.av_text AS vw_name, b.av_text AS vw_sell, c.av_text AS vw_buy, d.av_text AS tva_code, tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label, e.av_text AS vw_addr, f.av_text AS vw_cp, j.av_text AS quick_code, h.av_text AS vw_description, i.av_text AS tva_num, fiche_def.frd_id FROM (((((((((((SELECT fiche.f_id, fiche.fd_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 1)) a LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 6)) b ON ((a.f_id = b.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 7)) c ON ((a.f_id = c.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 2)) d ON ((a.f_id = d.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 14)) e ON ((a.f_id = e.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 15)) f ON ((a.f_id = f.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 23)) j ON ((a.f_id = j.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 9)) h ON ((a.f_id = h.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 13)) i ON ((a.f_id = i.f_id))) LEFT JOIN tva_rate ON ((d.av_text = (tva_rate.tva_id)::text))) JOIN fiche_def USING (fd_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))); - - - -COMMENT ON VIEW vw_fiche_def IS 'all the attributs for card family'; - - - -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 a.f_id, a.av_text AS j_poste, b.av_text AS j_qcode FROM ((SELECT jnt_fic_att_value.f_id, attr_value.av_text FROM (attr_value JOIN jnt_fic_att_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 5)) a JOIN (SELECT jnt_fic_att_value.f_id, attr_value.av_text FROM (attr_value JOIN jnt_fic_att_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 23)) b USING (f_id)); - - - -CREATE VIEW vw_supplier AS - SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email FROM (((((((((SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 1)) a JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 13)) b USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 23)) a1 USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 5)) c USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 14)) d USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 15)) e USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 16)) f USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 17)) g USING (f_id)) LEFT JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 18)) h USING (f_id)) WHERE (a.frd_id = 8); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -CREATE UNIQUE INDEX attr_value_jft_id ON attr_value USING btree (jft_id); - - - -CREATE UNIQUE INDEX fd_id_ad_id_x ON jnt_fic_attr USING btree (fd_id, ad_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 UNIQUE INDEX idx_case ON format_csv_banque USING btree (upper(name)); - - - -CREATE INDEX idx_qs_internal ON quant_sold USING btree (qs_internal); - - - -CREATE INDEX jnt_fic_att_value_fd_id_idx ON jnt_fic_att_value USING btree (f_id); - - - -CREATE INDEX jnt_fic_attr_fd_id_idx ON jnt_fic_attr USING btree (fd_id); - - - -CREATE UNIQUE INDEX k_ag_ref ON action_gestion USING btree (ag_ref); - - - -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 TRIGGER action_gestion_t_insert_update - BEFORE INSERT OR UPDATE ON action_gestion - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.action_gestion_ins_upd(); - - - -COMMENT ON TRIGGER action_gestion_t_insert_update ON action_gestion IS 'Truncate the column ag_title to 70 char'; - - - -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 info_def_ins_upd_t - BEFORE INSERT OR UPDATE ON info_def - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.info_def_ins_upd(); - - - -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 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_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_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_pcmn_ins - BEFORE INSERT ON tmp_pcmn - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.tmp_pcmn_ins(); - - - -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 trim_quote - BEFORE INSERT OR UPDATE ON import_tmp - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.trim_cvs_quote(); - - - -CREATE TRIGGER trim_space - BEFORE INSERT OR UPDATE ON format_csv_banque - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.trim_space_format_csv_banque(); diff --git a/sources/html/admin/sql/mod1/sequence.sql b/sources/html/admin/sql/mod1/sequence.sql deleted file mode 100644 index a27a569..0000000 --- a/sources/html/admin/sql/mod1/sequence.sql +++ /dev/null @@ -1,481 +0,0 @@ -CREATE SEQUENCE action_detail_ad_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE action_detail_ad_id_seq OWNED BY action_detail.ad_id; -CREATE SEQUENCE action_gestion_ag_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE bilan_b_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE bud_card_bc_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE bud_detail_bd_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE bud_detail_periode_bdp_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE del_action_del_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE del_action_del_id_seq OWNED BY del_action.del_id; -CREATE SEQUENCE document_d_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE document_modele_md_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE document_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -COMMENT ON SEQUENCE document_seq IS 'Sequence for the sequence bound to the document modele'; -CREATE SEQUENCE document_state_s_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE document_type_dt_id_seq - START WITH 25 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE extension_ex_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE extension_ex_id_seq OWNED BY extension.ex_id; -CREATE SEQUENCE forecast_cat_fc_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE forecast_cat_fc_id_seq OWNED BY forecast_cat.fc_id; -CREATE SEQUENCE forecast_f_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE forecast_f_id_seq OWNED BY forecast.f_id; -CREATE SEQUENCE forecast_item_fi_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE forecast_item_fi_id_seq OWNED BY forecast_item.fi_id; -CREATE SEQUENCE historique_analytique_ha_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jnt_id - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE jnt_letter_jl_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE jnt_letter_jl_id_seq OWNED BY jnt_letter.jl_id; -CREATE SEQUENCE jrn_info_ji_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE jrn_info_ji_id_seq OWNED BY jrn_info.ji_id; -CREATE SEQUENCE letter_cred_lc_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE letter_cred_lc_id_seq OWNED BY letter_cred.lc_id; -CREATE SEQUENCE letter_deb_ld_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE letter_deb_ld_id_seq OWNED BY letter_deb.ld_id; -CREATE SEQUENCE mod_payment_mp_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE mod_payment_mp_id_seq OWNED BY mod_payment.mp_id; -CREATE SEQUENCE op_def_op_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE op_predef_detail_opd_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_oa_group - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE plan_analytique_pa_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE poste_analytique_po_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_attr_def - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_cbc - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_central - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_central_order - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_centralized - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_currency - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_fdef - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_fiche - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_fiche_def_ref - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_form - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_formdef - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_grpt - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_idef - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_internal - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_invoice - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_isup - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jnt_fic_att_value - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrn - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrn_1 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrn_2 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrn_3 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrn_4 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrn_def - START WITH 5 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrn_op - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrn_pj1 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrn_pj2 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrn_pj3 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrn_pj4 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrn_rapt - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrnaction - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_jrnx - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_periode - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_quantity - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_stock_goods - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_tva - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_user_act - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE s_user_jrn - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_bud_hypothese_bh_id - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_doc_type_1 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_doc_type_10 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_doc_type_2 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_doc_type_20 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_doc_type_21 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_doc_type_22 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_doc_type_3 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_doc_type_4 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_doc_type_5 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_doc_type_6 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_doc_type_7 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_doc_type_8 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE seq_doc_type_9 - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE todo_list_tl_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -CREATE SEQUENCE user_sec_extension_use_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE user_sec_extension_use_id_seq OWNED BY user_sec_extension.use_id; diff --git a/sources/html/admin/sql/mod1/table.sql b/sources/html/admin/sql/mod1/table.sql deleted file mode 100644 index 510dbe3..0000000 --- a/sources/html/admin/sql/mod1/table.sql +++ /dev/null @@ -1,499 +0,0 @@ -CREATE DOMAIN account_type AS character varying(40); -CREATE TABLE action ( - ac_id integer NOT NULL, - ac_description text NOT NULL, - ac_module text, - ac_code character varying(9) -); -CREATE TABLE action_detail ( - ad_id integer NOT NULL, - f_id bigint, - ad_text text, - ad_pu numeric(20,4) DEFAULT 0, - ad_quant numeric(20,4) DEFAULT 0, - ad_tva_id integer DEFAULT 0, - ad_tva_amount numeric(20,4) DEFAULT 0, - 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, - ag_type integer, - f_id_dest integer NOT NULL, - ag_title character varying(70), - ag_timestamp timestamp without time zone DEFAULT now(), - ag_cal character(1) DEFAULT 'C'::bpchar, - ag_ref_ag_id integer, - ag_comment text, - ag_ref text, - ag_hour text, - ag_priority integer DEFAULT 2, - ag_dest text, - ag_owner text, - ag_contact bigint, - ag_state integer -); -CREATE TABLE attr_def ( - ad_id integer DEFAULT nextval(('s_attr_def'::text)::regclass) NOT NULL, - ad_text text -); -CREATE TABLE attr_min ( - frd_id integer, - ad_id integer -); -CREATE TABLE attr_value ( - jft_id integer, - av_text text -); -CREATE TABLE bilan ( - b_id integer DEFAULT nextval('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 centralized ( - c_id integer DEFAULT nextval(('s_centralized'::text)::regclass) NOT NULL, - c_j_id integer, - c_date date NOT NULL, - c_internal text NOT NULL, - c_montant numeric(20,4) NOT NULL, - c_debit boolean DEFAULT true, - c_jrn_def integer NOT NULL, - c_poste account_type, - c_description text, - c_grp integer NOT NULL, - c_comment text, - c_rapt text, - c_periode integer, - c_order integer -); -CREATE TABLE del_action ( - del_id integer NOT NULL, - del_name text NOT NULL, - del_time timestamp without time zone -); -CREATE TABLE del_jrn ( - jr_id integer NOT NULL, - jr_def_id integer, - jr_montant numeric(20,4), - jr_comment text, - jr_date date, - jr_grpt_id integer, - jr_internal text, - jr_tech_date timestamp without time zone, - jr_tech_per integer, - jrn_ech date, - jr_ech date, - jr_rapt text, - jr_valid boolean, - jr_opid integer, - jr_c_opid integer, - jr_pj oid, - jr_pj_name text, - jr_pj_type text, - del_jrn_date timestamp without time zone, - jr_pj_number text -); -CREATE TABLE del_jrnx ( - j_id integer NOT NULL, - j_date date, - j_montant numeric(20,4), - j_poste account_type, - j_grpt integer, - j_rapt text, - j_jrn_def integer, - j_debit boolean, - j_text text, - j_centralized boolean, - j_internal text, - j_tech_user text, - j_tech_date timestamp without time zone, - j_tech_per integer, - j_qcode text -); -CREATE TABLE document ( - d_id integer DEFAULT nextval('document_d_id_seq'::regclass) NOT NULL, - ag_id integer NOT NULL, - d_lob oid, - d_number bigint NOT NULL, - d_filename text, - d_mimetype text -); -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 -); -CREATE TABLE document_state ( - s_id integer DEFAULT nextval('document_state_s_id_seq'::regclass) NOT NULL, - s_value character varying(50) NOT NULL -); -CREATE TABLE document_type ( - dt_id integer DEFAULT nextval('document_type_dt_id_seq'::regclass) NOT NULL, - dt_value character varying(80) -); -CREATE TABLE extension ( - ex_id integer NOT NULL, - ex_name character varying(30) NOT NULL, - ex_code character varying(15) NOT NULL, - ex_desc character varying(250), - ex_file character varying NOT NULL, - ex_enable "char" DEFAULT 'Y'::"char" NOT NULL -); -CREATE TABLE fiche ( - f_id integer DEFAULT nextval(('s_fiche'::text)::regclass) NOT NULL, - fd_id integer -); -CREATE TABLE fiche_def ( - fd_id integer DEFAULT nextval(('s_fdef'::text)::regclass) NOT NULL, - fd_class_base text, - fd_label text NOT NULL, - fd_create_account boolean DEFAULT false, - frd_id integer NOT NULL -); -CREATE TABLE fiche_def_ref ( - frd_id integer DEFAULT nextval(('s_fiche_def_ref'::text)::regclass) NOT NULL, - frd_text text, - frd_class_base integer -); -CREATE TABLE forecast ( - f_id integer NOT NULL, - f_name text NOT NULL -); -CREATE TABLE forecast_cat ( - fc_id integer NOT NULL, - fc_desc text NOT NULL, - f_id bigint, - fc_order integer DEFAULT 0 NOT NULL -); -CREATE TABLE 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 -); -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 format_csv_banque ( - name text NOT NULL, - include_file text NOT NULL -); -CREATE TABLE formdef ( - fr_id integer DEFAULT nextval(('s_formdef'::text)::regclass) NOT NULL, - fr_label text -); -CREATE TABLE groupe_analytique ( - ga_id character varying(10) NOT NULL, - pa_id integer, - ga_description text -); -CREATE TABLE import_tmp ( - code text NOT NULL, - date_exec date NOT NULL, - date_valeur date NOT NULL, - devise text, - compte_ordre text, - detail text, - num_compte text, - poste_comptable text, - status character varying(1) DEFAULT 'n'::character varying NOT NULL, - bq_account text NOT NULL, - jrn integer NOT NULL, - jr_rapt text, - montant numeric(20,4) DEFAULT 0 NOT NULL, - CONSTRAINT import_tmp_status_check CHECK ((((((status)::text = 'n'::text) OR ((status)::text = 't'::text)) OR ((status)::text = 'd'::text)) OR ((status)::text = 'w'::text))) -); -CREATE TABLE info_def ( - id_type text NOT NULL, - id_description text -); -CREATE TABLE jnt_fic_att_value ( - jft_id integer DEFAULT nextval(('s_jnt_fic_att_value'::text)::regclass) NOT NULL, - f_id integer, - ad_id integer -); -CREATE TABLE jnt_fic_attr ( - fd_id integer, - ad_id integer, - jnt_id bigint DEFAULT nextval('s_jnt_id'::regclass) NOT NULL, - jnt_order integer NOT NULL -); -CREATE TABLE jnt_letter ( - jl_id integer NOT NULL, - jl_amount_deb numeric(20,4) -); -CREATE TABLE 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, - jr_comment text, - jr_date date, - jr_grpt_id integer NOT NULL, - jr_internal text, - jr_tech_date timestamp without time zone DEFAULT now() NOT NULL, - jr_tech_per integer NOT NULL, - jrn_ech date, - jr_ech date, - jr_rapt text, - jr_valid boolean DEFAULT true, - jr_opid integer, - jr_c_opid integer, - jr_pj oid, - jr_pj_name text, - jr_pj_type text, - jr_pj_number text, - jr_mt text -); -CREATE TABLE jrn_action ( - ja_id integer DEFAULT nextval(('s_jrnaction'::text)::regclass) NOT NULL, - ja_name text NOT NULL, - ja_desc text, - ja_url text NOT NULL, - ja_action text NOT NULL, - ja_lang text DEFAULT 'FR'::text, - ja_jrn_type character(3) -); -CREATE TABLE 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, - jrn_def_class_cred text, - jrn_def_fiche_deb text, - jrn_def_fiche_cred text, - jrn_deb_max_line integer DEFAULT 1, - jrn_cred_max_line integer DEFAULT 1, - jrn_def_ech boolean DEFAULT false, - jrn_def_ech_lib text, - jrn_def_type character(3) NOT NULL, - jrn_def_code text NOT NULL, - jrn_def_pj_pref text -); -CREATE TABLE jrn_info ( - ji_id integer NOT NULL, - jr_id integer NOT NULL, - id_type text NOT NULL, - ji_value text -); -CREATE TABLE jrn_periode ( - jrn_def_id integer NOT NULL, - p_id integer NOT NULL, - status text -); -CREATE TABLE 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 ( - jrn_type_id character(3) NOT NULL, - jrn_desc text -); -CREATE TABLE 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_grpt integer NOT NULL, - j_rapt text, - j_jrn_def integer NOT NULL, - j_debit boolean DEFAULT true, - j_text text, - j_centralized boolean DEFAULT false, - j_internal text, - j_tech_user text NOT NULL, - j_tech_date timestamp without time zone DEFAULT now() NOT NULL, - j_tech_per integer NOT NULL, - j_qcode text -); -CREATE TABLE letter_cred ( - lc_id integer NOT NULL, - j_id bigint NOT NULL, - jl_id bigint NOT NULL -); -CREATE TABLE letter_deb ( - ld_id integer NOT NULL, - j_id bigint NOT NULL, - jl_id bigint NOT NULL -); -CREATE TABLE mod_payment ( - mp_id integer NOT NULL, - mp_lib text NOT NULL, - mp_jrn_def_id integer NOT NULL, - mp_type character varying(3) NOT NULL, - mp_fd_id bigint, - mp_qcode text -); -CREATE TABLE op_predef ( - od_id integer DEFAULT nextval('op_def_op_seq'::regclass) NOT NULL, - jrn_def_id integer NOT NULL, - od_name text NOT NULL, - od_item integer NOT NULL, - od_jrn_type text NOT NULL, - od_direct boolean NOT NULL -); -CREATE TABLE op_predef_detail ( - opd_id integer DEFAULT nextval('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_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, - po_id integer NOT NULL, - pa_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_date date NOT NULL, - oa_row integer -); -CREATE TABLE parameter ( - pr_id text NOT NULL, - pr_value text -); -CREATE TABLE parm_code ( - p_code text NOT NULL, - p_value text, - p_comment text -); -CREATE TABLE 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 ( - 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, - CONSTRAINT parm_periode_check CHECK ((p_end >= p_start)) -); -CREATE TABLE parm_poste ( - p_value 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, - 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, - 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) -); -CREATE TABLE quant_purchase ( - qp_id integer DEFAULT nextval(('s_quantity'::text)::regclass) NOT NULL, - qp_internal text NOT NULL, - j_id integer NOT NULL, - qp_fiche integer NOT NULL, - qp_quantite numeric(20,4) NOT NULL, - qp_price numeric(20,4), - qp_vat numeric(20,4) DEFAULT 0.0, - qp_vat_code integer, - qp_nd_amount numeric(20,4) DEFAULT 0.0, - qp_nd_tva numeric(20,4) DEFAULT 0.0, - qp_nd_tva_recup numeric(20,4) DEFAULT 0.0, - qp_supplier integer NOT NULL, - qp_valid character(1) DEFAULT 'Y'::bpchar NOT NULL, - qp_dep_priv numeric(20,4) DEFAULT 0.0 -); -CREATE TABLE quant_sold ( - qs_id integer DEFAULT nextval(('s_quantity'::text)::regclass) NOT NULL, - qs_internal text NOT NULL, - qs_fiche integer NOT NULL, - qs_quantite numeric(20,4) NOT NULL, - qs_price numeric(20,4), - qs_vat numeric(20,4), - qs_vat_code integer, - qs_client integer NOT NULL, - qs_valid character(1) DEFAULT 'Y'::bpchar NOT NULL, - j_id integer NOT NULL -); -CREATE TABLE stock_goods ( - sg_id integer DEFAULT nextval(('s_stock_goods'::text)::regclass) NOT NULL, - j_id integer, - f_id integer NOT NULL, - sg_code text, - sg_quantity numeric(8,4) DEFAULT 0, - sg_type character(1) DEFAULT 'c'::bpchar NOT NULL, - sg_date date, - sg_tech_date date DEFAULT now(), - sg_tech_user text, - sg_comment character varying(80), - sg_exercice character varying(4), - CONSTRAINT stock_goods_sg_type CHECK (((sg_type = 'c'::bpchar) OR (sg_type = 'd'::bpchar))) -); -CREATE TABLE tmp_pcmn ( - pcm_val account_type NOT NULL, - pcm_lib text, - pcm_val_parent account_type DEFAULT 0, - pcm_type text -); -CREATE TABLE todo_list ( - tl_id integer DEFAULT nextval('todo_list_tl_id_seq'::regclass) NOT NULL, - tl_date date NOT NULL, - tl_title text NOT NULL, - tl_desc text, - use_login text NOT NULL -); -CREATE TABLE tva_rate ( - tva_id integer DEFAULT nextval('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 -); -CREATE TABLE user_local_pref ( - user_id text NOT NULL, - parameter_type text NOT NULL, - parameter_value text -); -CREATE TABLE 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_extension ( - use_id integer NOT NULL, - ex_id integer NOT NULL, - use_login text NOT NULL, - use_access character(1) DEFAULT 0 NOT NULL -); -CREATE TABLE 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 ( - val integer -); diff --git a/sources/html/admin/sql/mod1/view.sql b/sources/html/admin/sql/mod1/view.sql deleted file mode 100644 index 317c4af..0000000 --- a/sources/html/admin/sql/mod1/view.sql +++ /dev/null @@ -1,12 +0,0 @@ -CREATE VIEW vw_client AS - SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email FROM (((((((((SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 1)) a JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 13)) b USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 23)) a1 USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 5)) c USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 14)) d USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 15)) e USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 16)) f USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 17)) g USING (f_id)) LEFT JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 18)) h USING (f_id)) WHERE (a.frd_id = 9); -CREATE VIEW vw_fiche_attr AS - SELECT a.f_id, a.fd_id, a.av_text AS vw_name, b.av_text AS vw_sell, c.av_text AS vw_buy, d.av_text AS tva_code, tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label, e.av_text AS vw_addr, f.av_text AS vw_cp, j.av_text AS quick_code, h.av_text AS vw_description, i.av_text AS tva_num, fiche_def.frd_id FROM (((((((((((SELECT fiche.f_id, fiche.fd_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 1)) a LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 6)) b ON ((a.f_id = b.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 7)) c ON ((a.f_id = c.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 2)) d ON ((a.f_id = d.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 14)) e ON ((a.f_id = e.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 15)) f ON ((a.f_id = f.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 23)) j ON ((a.f_id = j.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 9)) h ON ((a.f_id = h.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 13)) i ON ((a.f_id = i.f_id))) LEFT JOIN tva_rate ON ((d.av_text = (tva_rate.tva_id)::text))) JOIN fiche_def USING (fd_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))); -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 a.f_id, a.av_text AS j_poste, b.av_text AS j_qcode FROM ((SELECT jnt_fic_att_value.f_id, attr_value.av_text FROM (attr_value JOIN jnt_fic_att_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 5)) a JOIN (SELECT jnt_fic_att_value.f_id, attr_value.av_text FROM (attr_value JOIN jnt_fic_att_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 23)) b USING (f_id)); -CREATE VIEW vw_supplier AS - SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email FROM (((((((((SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 1)) a JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 13)) b USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 23)) a1 USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 5)) c USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 14)) d USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 15)) e USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 16)) f USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 17)) g USING (f_id)) LEFT JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 18)) h USING (f_id)) WHERE (a.frd_id = 8); diff --git a/sources/html/admin/sql/mod2/data.sql b/sources/html/admin/sql/mod2/data.sql deleted file mode 100644 index fa90153..0000000 --- a/sources/html/admin/sql/mod2/data.sql +++ /dev/null @@ -1,1126 +0,0 @@ - -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = off; -SET check_function_bodies = false; -SET client_min_messages = warning; -SET escape_string_warning = off; - -SET search_path = public, pg_catalog; - - -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('bilan_b_id_seq', 4, true); - - - -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); - - - -SELECT pg_catalog.setval('del_action_del_id_seq', 1, true); - - - -SELECT pg_catalog.setval('document_d_id_seq', 1, false); - - - -SELECT pg_catalog.setval('document_modele_md_id_seq', 1, false); - - - -SELECT pg_catalog.setval('document_seq', 1, false); - - - -SELECT pg_catalog.setval('document_state_s_id_seq', 3, true); - - - -SELECT pg_catalog.setval('document_type_dt_id_seq', 25, false); - - - -SELECT pg_catalog.setval('extension_ex_id_seq', 1, false); - - - -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); - - - -SELECT pg_catalog.setval('historique_analytique_ha_id_seq', 1, false); - - - -SELECT pg_catalog.setval('s_jnt_id', 53, true); - - - -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('letter_cred_lc_id_seq', 1, false); - - - -SELECT pg_catalog.setval('letter_deb_ld_id_seq', 1, false); - - - -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); - - - -SELECT pg_catalog.setval('s_oa_group', 7, true); - - - -SELECT pg_catalog.setval('plan_analytique_pa_id_seq', 1, false); - - - -SELECT pg_catalog.setval('poste_analytique_po_id_seq', 1, false); - - - -SELECT pg_catalog.setval('s_attr_def', 27, true); - - - -SELECT pg_catalog.setval('s_cbc', 1, false); - - - -SELECT pg_catalog.setval('s_central', 1, false); - - - -SELECT pg_catalog.setval('s_central_order', 1, false); - - - -SELECT pg_catalog.setval('s_centralized', 1, false); - - - -SELECT pg_catalog.setval('s_currency', 1, true); - - - -SELECT pg_catalog.setval('s_fdef', 6, true); - - - -SELECT pg_catalog.setval('s_fiche', 79, true); - - - -SELECT pg_catalog.setval('s_fiche_def_ref', 18, true); - - - -SELECT pg_catalog.setval('s_form', 1, false); - - - -SELECT pg_catalog.setval('s_formdef', 1, false); - - - -SELECT pg_catalog.setval('s_grpt', 102, true); - - - -SELECT pg_catalog.setval('s_idef', 1, false); - - - -SELECT pg_catalog.setval('s_internal', 1, false); - - - -SELECT pg_catalog.setval('s_invoice', 1, false); - - - -SELECT pg_catalog.setval('s_isup', 1, false); - - - -SELECT pg_catalog.setval('s_jnt_fic_att_value', 875, true); - - - -SELECT pg_catalog.setval('s_jrn', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_1', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_2', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_3', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_4', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_def', 5, false); - - - -SELECT pg_catalog.setval('s_jrn_op', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_pj1', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_pj2', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_pj3', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_pj4', 1, false); - - - -SELECT pg_catalog.setval('s_jrn_rapt', 20, true); - - - -SELECT pg_catalog.setval('s_jrnaction', 5, true); - - - -SELECT pg_catalog.setval('s_jrnx', 1, false); - - - -SELECT pg_catalog.setval('s_periode', 117, true); - - - -SELECT pg_catalog.setval('s_quantity', 13, true); - - - -SELECT pg_catalog.setval('s_stock_goods', 1, false); - - - -SELECT pg_catalog.setval('s_tva', 1000, false); - - - -SELECT pg_catalog.setval('s_user_act', 1, false); - - - -SELECT pg_catalog.setval('s_user_jrn', 8, true); - - - -SELECT pg_catalog.setval('seq_bud_hypothese_bh_id', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_1', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_10', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_2', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_20', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_21', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_22', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_3', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_4', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_5', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_6', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_7', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_8', 1, false); - - - -SELECT pg_catalog.setval('seq_doc_type_9', 1, false); - - - -SELECT pg_catalog.setval('todo_list_tl_id_seq', 1, false); - - - -SELECT pg_catalog.setval('user_sec_extension_use_id_seq', 1, false); - - - -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1135, 'Ajoute ou modifie des catégories de documents', 'parametre', 'PARCATDOC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (210, 'Ajout de plan analytique', 'compta_anal', 'CAPA'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (220, 'Ajout de poste analytique', 'compta_anal', 'CAPO'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (230, 'Ajout de groupe analytique', 'compta_anal', 'CAGA'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (235, 'Ajout d''operation diverses', 'compta_anal', 'CAOD'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (240, 'Impression', 'compta_anal', 'CAIMP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (300, 'Gestion', 'gestion', 'GESTION'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (305, 'Import en Banque', 'gestion', 'GEBQ'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (307, 'Effacement d''opération', 'gestion', 'GEOP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (310, 'Courrier (lecture & écriture)', 'gestion', 'GECOUR'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (311, 'Fournisseur', 'gestion', 'GESUPPL'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (312, 'Client', 'gestion', 'GECUST'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (700, 'Rapport', 'impression', 'IMPRAP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (710, 'Journaux', 'impression', 'IMPJRN'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (720, 'Fiche', 'impression', 'IMPFIC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (730, 'Poste', 'impression', 'IMPPOSTE'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (740, 'Bilan', 'impression', 'IMPBIL'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (750, 'Balance', 'impression', 'IMPBAL'); -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 (1100, 'Mode comptabilité analytique', 'parametre', 'PARCA'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1110, 'Ajout de période', 'parametre', 'PARPER'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1120, 'Catégorie des fiches', 'parametre', 'PARFIC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1130, 'Document', 'parametre', 'PARDOC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1140, 'Modification journaux', 'parametre', 'PARJRN'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1150, 'TVA', 'parametre', 'PARTVA'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1160, 'Moyen de paiement', 'parametre', 'PARMP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1180, 'Clôture ', 'parametre', 'PARCLO'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1185, 'Changement du plan comptable ', 'parametre', 'PARPCMN'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1170, 'Poste Comptable de base', 'parametre', 'PARPOS'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1190, 'Centralisation', 'parametre', 'PARCENT'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1200, 'Écriture d''ouverture', 'parametre', 'PAREO'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1210, 'Mode strict', 'parametre', 'PARSTR'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1220, 'Coordonnées société', 'parametre', 'PARCOORD'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1230, 'Création de rapport', 'parametre', 'PARRAP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1240, 'Effacement et création d''opération prédéfinie', 'parametre', 'PARPREDE'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1245, 'Sécurité du dossier', 'parametre', 'PARSEC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1500, 'Stock (lecture)', 'stock', 'STOLE'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1510, 'Stock (changement)', 'stock', 'STOWRITE'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (313, 'Administration', 'gestion', 'GEADM'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1600, 'Gestion des extensions', 'extension', 'EXTENSION'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1701, 'Consultation', 'prvision', 'PREVCON'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1702, 'Modification et cration', 'prvision', 'PREVMOD'); - - - - - - - - - -INSERT INTO attr_def (ad_id, ad_text) VALUES (1, 'Nom'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (2, 'Taux TVA'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (3, 'Numéro de compte'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (4, 'Nom de la banque'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (5, 'Poste Comptable'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (6, 'Prix vente'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (7, 'Prix achat'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (8, 'Durée Amortissement'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (9, 'Description'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (10, 'Date début'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (11, 'Montant initial'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (12, 'Personne de contact '); -INSERT INTO attr_def (ad_id, ad_text) VALUES (13, 'numéro de tva '); -INSERT INTO attr_def (ad_id, ad_text) VALUES (14, 'Adresse '); -INSERT INTO attr_def (ad_id, ad_text) VALUES (16, 'pays '); -INSERT INTO attr_def (ad_id, ad_text) VALUES (17, 'téléphone '); -INSERT INTO attr_def (ad_id, ad_text) VALUES (18, 'email '); -INSERT INTO attr_def (ad_id, ad_text) VALUES (19, 'Gestion stock'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (20, 'Partie fiscalement non déductible'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (21, 'TVA non déductible'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (22, 'TVA non déductible récupérable par l''impôt'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (23, 'Quick Code'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (24, 'Ville'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (25, 'Société'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (26, 'Fax'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (27, 'GSM'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (15, 'code postal'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (30, 'Numero de client'); -INSERT INTO attr_def (ad_id, ad_text) VALUES (31, 'Dépense charge du gérant (partie privée)'); - - - -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 (17, 1); -INSERT INTO attr_min (frd_id, ad_id) VALUES (17, 9); -INSERT INTO attr_min (frd_id, ad_id) VALUES (18, 1); -INSERT INTO attr_min (frd_id, ad_id) VALUES (18, 9); -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 bilan (b_id, b_name, b_file_template, b_file_form, b_type) VALUES (5, 'Comptes de résultat', 'document/fr_fr/fr_plan_abrege_perso_cr1000.rtf', 'document/fr_fr/fr_plan_abrege_perso_cr1000.form', 'rtf'); -INSERT INTO bilan (b_id, b_name, b_file_template, b_file_form, b_type) VALUES (1, 'Bilan français', 'document/fr_fr/fr_plan_abrege_perso_bil10000.ods', 'document/fr_fr/fr_plan_abrege_perso_bil10000.form', 'ods'); - - - - - - - - - - - - - - - - - - - - - -INSERT INTO document_state (s_id, s_value) VALUES (1, 'Clôturé'); -INSERT INTO document_state (s_id, s_value) VALUES (2, 'A suivre'); -INSERT INTO document_state (s_id, s_value) VALUES (3, 'A faire'); -INSERT INTO document_state (s_id, s_value) VALUES (4, 'Abandonné'); - - - -INSERT INTO document_type (dt_id, dt_value) VALUES (1, 'Document Interne'); -INSERT INTO document_type (dt_id, dt_value) VALUES (2, 'Bons de commande client'); -INSERT INTO document_type (dt_id, dt_value) VALUES (3, 'Bon de commande Fournisseur'); -INSERT INTO document_type (dt_id, dt_value) VALUES (4, 'Facture'); -INSERT INTO document_type (dt_id, dt_value) VALUES (5, 'Lettre de rappel'); -INSERT INTO document_type (dt_id, dt_value) VALUES (6, 'Courrier'); -INSERT INTO document_type (dt_id, dt_value) VALUES (7, 'Proposition'); -INSERT INTO document_type (dt_id, dt_value) VALUES (8, 'Email'); -INSERT INTO document_type (dt_id, dt_value) VALUES (9, 'Divers'); -INSERT INTO document_type (dt_id, dt_value) VALUES (10, 'Note de frais'); -INSERT INTO document_type (dt_id, dt_value) VALUES (20, 'Réception commande Fournisseur'); -INSERT INTO document_type (dt_id, dt_value) VALUES (21, 'Réception commande Client'); -INSERT INTO document_type (dt_id, dt_value) VALUES (22, 'Réception magazine'); - - - - - - - - - -INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account, frd_id) VALUES (2, '410', 'Client', true, 9); -INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account, frd_id) VALUES (1, '604', 'Marchandises', true, 2); -INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account, frd_id) VALUES (3, '51', 'Banque', true, 4); -INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account, frd_id) VALUES (4, '400', 'Fournisseur', true, 8); -INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account, frd_id) VALUES (5, '61', 'S & B D', true, 3); -INSERT INTO fiche_def (fd_id, fd_class_base, fd_label, fd_create_account, frd_id) VALUES (6, '700', 'Vente', true, 1); - - - -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 (4, 'Banque', 51); -INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (5, 'Prêt > a un an', 27); -INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (8, 'Fournisseurs', 400); -INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (6, 'Prêt < a un an', NULL); -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 (1, 'Vente Service', 706); -INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (2, 'Achat Marchandises', 603); -INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (9, 'Clients', 410); -INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (10, 'Salaire Administrateur', 644); -INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (11, 'Salaire Ouvrier', 641); -INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (12, 'Salaire Employé', 641); -INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (7, 'Matériel à amortir, immobilisation corporelle', 21); -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 (17, 'Escomptes accordées', 66); -INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (18, 'Produits Financiers', 76); -INSERT INTO fiche_def_ref (frd_id, frd_text, frd_class_base) VALUES (25, 'Compte Salarié / Administrateur', NULL); - - - - - - - - - - - - -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]'); - - - -INSERT INTO format_csv_banque (name, include_file) VALUES ('Fortis', 'fortis_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('EUB', 'eub_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('ING', 'ing_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('CBC', 'cbc_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('Argenta Belgique', 'argenta_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('CBC Belgique', 'cbc_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('Dexia', 'dexia_be.inc.php'); -INSERT INTO format_csv_banque (name, include_file) VALUES ('VMS Keytrade', 'keytrade_be.inc.php'); - - - -INSERT INTO formdef (fr_id, fr_label) VALUES (3000000, 'TVA déclaration Belge'); - - - - - - - - - -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 (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 (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 jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (2, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'VEN'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (4, 'Voir Impayés', 'Voir toutes les factures non payées', 'user_jrn.php', 'action=voir_jrn_non_paye', 'FR', 'VEN'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (1, 'Nouvelle', 'Création d''une facture', 'user_jrn.php', 'action=insert_vente&blank', 'FR', 'VEN'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (10, 'Nouveau', 'Encode un nouvel achat (matériel, marchandises, services et biens divers)', 'user_jrn.php', 'action=new&blank', 'FR', 'ACH'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (12, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'ACH'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (14, 'Voir Impayés', 'Voir toutes les factures non payées', 'user_jrn.php', 'action=voir_jrn_non_paye', 'FR', 'ACH'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (20, 'Nouveau', 'Encode un nouvel achat (matériel, marchandises, services et biens divers)', 'user_jrn.php', 'action=new&blank', 'FR', 'FIN'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (22, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'FIN'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (40, 'Soldes', 'Voir les soldes des comptes en banques', 'user_jrn.php', 'action=solde', 'FR', 'FIN'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (30, 'Nouveau', NULL, 'user_jrn.php', 'action=new&blank', 'FR', 'ODS'); -INSERT INTO jrn_action (ja_id, ja_name, ja_desc, ja_url, ja_action, ja_lang, ja_jrn_type) VALUES (32, 'Voir', 'Voir toutes les factures', 'user_jrn.php', 'action=voir_jrn', 'FR', 'ODS'); - - - -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) VALUES (4, 'Opération Diverses', NULL, NULL, NULL, NULL, 5, 5, false, NULL, 'ODS', 'OD-01', 'ODS'); -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) VALUES (2, 'Vente', '', '', '2', '6', 10, 10, true, '''echeance''', 'VEN', 'VEN-01', 'VEN'); -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) VALUES (3, 'Achat', '', '', '5', '4', 10, 10, true, '''echeance''', 'ACH', 'ACH-01', 'ACH'); -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) VALUES (1, 'Financier', '', '', '3,2,4,5', '3,2,4,5', 10, 10, true, '''echeance''', 'FIN', 'FIN-01', 'FIN'); - - - - - - -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 105, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 105, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 105, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 105, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 106, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 106, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 106, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 106, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 107, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 107, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 107, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 107, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 108, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 108, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 108, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 108, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 109, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 109, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 109, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 109, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 110, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 110, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 110, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 110, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 111, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 111, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 111, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 111, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 112, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 112, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 112, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 112, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 113, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 113, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 113, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 113, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 114, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 114, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 114, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 114, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 115, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 115, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 115, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 115, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 116, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 116, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 116, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 116, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (4, 117, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (2, 117, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (3, 117, 'OP'); -INSERT INTO jrn_periode (jrn_def_id, p_id, status) VALUES (1, 117, 'OP'); - - - - - - -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 jrn_type (jrn_type_id, jrn_desc) VALUES ('FIN', 'Banque'); - - - - - - - - - - - - -INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (2, 'Caisse', 1, 'VEN', NULL, NULL); -INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (4, 'Caisse', 1, 'ACH', NULL, NULL); -INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (1, 'Paiement électronique', 1, 'VEN', NULL, NULL); -INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (3, 'Par gérant ou administrateur', 2, 'ACH', NULL, NULL); - - - - - - - - - - - - -INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_NAME', 'LaMule'); -INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_TVA', 'FR33 123 456 789'); -INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_STREET', ''); -INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_NUMBER', ''); -INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_CP', ''); -INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_TEL', ''); -INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_PAYS', ''); -INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_COMMUNE', ''); -INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_FAX', ''); -INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_ANALYTIC', 'nu'); -INSERT INTO parameter (pr_id, pr_value) VALUES ('MY_COUNTRY', 'FR'); -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_CHECK_PERIODE', 'N'); - - - -INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('BANQUE', '51', 'Poste comptable par défaut pour les banques'); -INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('CAISSE', '53', 'Poste comptable par défaut pour les caisses'); -INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('CUSTOMER', '410', 'Poste comptable par défaut pour les clients'); -INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('VENTE', '707', 'Poste comptable par défaut pour les ventes'); -INSERT INTO parm_code (p_code, p_value, p_comment) VALUES ('VIREMENT_INTERNE', '58', 'Poste comptable par défaut pour les virements internes'); -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', '400', 'Poste par défaut pour les fournisseurs'); - - - -INSERT INTO parm_money (pm_id, pm_code, pm_rate) VALUES (1, 'EUR', 1.0000); - - - -INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed, p_central) VALUES (105, '2009-01-01', '2009-01-31', '2009', false, false); -INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed, p_central) VALUES (106, '2009-02-01', '2009-02-28', '2009', false, false); -INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed, p_central) VALUES (107, '2009-03-01', '2009-03-31', '2009', false, false); -INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed, p_central) VALUES (108, '2009-04-01', '2009-04-30', '2009', false, false); -INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed, p_central) VALUES (109, '2009-05-01', '2009-05-31', '2009', false, false); -INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed, p_central) VALUES (110, '2009-06-01', '2009-06-30', '2009', false, false); -INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed, p_central) VALUES (111, '2009-07-01', '2009-07-31', '2009', false, false); -INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed, p_central) VALUES (112, '2009-08-01', '2009-08-31', '2009', false, false); -INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed, p_central) VALUES (113, '2009-09-01', '2009-09-30', '2009', false, false); -INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed, p_central) VALUES (114, '2009-10-01', '2009-10-31', '2009', false, false); -INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed, p_central) VALUES (115, '2009-11-01', '2009-11-30', '2009', false, false); -INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed, p_central) VALUES (116, '2009-12-01', '2009-12-30', '2009', false, false); -INSERT INTO parm_periode (p_id, p_start, p_end, p_exercice, p_closed, p_central) VALUES (117, '2009-12-31', '2009-12-31', '2009', false, false); - - - -INSERT INTO parm_poste (p_value, p_type) VALUES ('1', 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('12', 'CON'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('2', 'ACT'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('3', 'ACT'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('41', 'ACT'); -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', 'CON'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('47', 'CON'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('481', 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('482', 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('483', 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('484', 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('485', 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('486', 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('487', 'ACT'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('49', 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('5', 'ACT'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('6', 'CHA'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('7', 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES ('40', 'ACT'); - - - - - - - - - - - - - - - - - - -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1', 'comptes de capitaux', '0', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('101', 'Capital', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('105', 'Ecarts de réévaluation', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1061', 'Réserve légale', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1063', 'Réserves statutaires ou contractuelles', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1064', 'Réserves réglementées', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('1068', 'Autres réserves', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('108', 'Compte de l''exploitant', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('12', 'résultat de l''exercice (bénéfice ou perte)', '1', 'CON'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('145', 'Amortissements dérogatoires', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('146', 'Provision spéciale de réévaluation', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('147', 'Plus-values réinvesties', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('148', 'Autres provisions réglementées', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('15', 'Provisions pour risques et charges', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('16', 'emprunts et dettes assimilees', '1', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('2', 'comptes d''immobilisations', '0', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('20', 'immobilisations incorporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('201', 'Frais d''établissement', '20', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('206', 'Droit au bail', '20', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('207', 'Fonds commercial', '20', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('208', 'Autres immobilisations incorporelles', '20', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('21', 'immobilisations corporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('23', 'immobilisations en cours', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('27', 'autres immobilisations financieres', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('280', 'Amortissements des immobilisations incorporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('281', 'Amortissements des immobilisations corporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('290', 'Provisions pour dépréciation des immobilisations incorporelles', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('291', 'Provisions pour dépréciation des immobilisations corporelles (même ventilation que celle du compte 21)', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('297', 'Provisions pour dépréciation des autres immobilisations financières', '2', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('3', 'comptes de stocks et en cours', '0', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('31', 'matieres premières (et fournitures)', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('32', 'autres approvisionnements', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('33', 'en-cours de production de biens', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('34', 'en-cours de production de services', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('35', 'stocks de produits', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('37', 'stocks de marchandises', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('391', 'Provisions pour dépréciation des matières premières (et fournitures)', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('392', 'Provisions pour dépréciation des autres approvisionnements', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('393', 'Provisions pour dépréciation des en-cours de production de biens', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('394', 'Provisions pour dépréciation des en-cours de production de services', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('395', 'Provisions pour dépréciation des stocks de produits', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('397', 'Provisions pour dépréciation des stocks de marchandises', '3', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4', 'comptes de tiers', '0', 'CON'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('400', 'Fournisseurs et Comptes rattachés', '4', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('409', 'Fournisseurs débiteurs', '4', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('410', 'Clients et Comptes rattachés', '4', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('419', 'Clients créditeurs', '4', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('421', 'Personnel - Rémunérations dues', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('428', 'Personnel - Charges à payer et produits à recevoir', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('43', 'Sécurité sociale et autres organismes sociaux', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('444', 'Etat - Impôts sur les bénéfices', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('445', 'Etat - Taxes sur le chiffre d''affaires', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('447', 'Autres impôts, taxes et versements assimilés', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('45', 'Groupe et associes', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('455', 'Associés - Comptes courants', '45', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('46', 'Débiteurs divers et créditeurs divers', '4', 'CON'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('47', 'comptes transitoires ou d''attente', '4', 'CON'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('481', 'Charges à répartir sur plusieurs exercices', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('486', 'Charges constatées d''avance', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('487', 'Produits constatés d''avance', '4', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('491', 'Provisions pour dépréciation des comptes de clients', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('496', 'Provisions pour dépréciation des comptes de débiteurs divers', '4', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('5', 'comptes financiers', '0', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('50', 'valeurs mobilières de placement', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('51', 'banques, établissements financiers et assimilés', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('53', 'Caisse', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('54', 'régies d''avance et accréditifs', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('58', 'virements internes', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('590', 'Provisions pour dépréciation des valeurs mobilières de placement', '5', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('6', 'comptes de charges', '0', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('60', 'Achats (sauf 603)', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('603', 'variations des stocks (approvisionnements et marchandises)', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('61', 'autres charges externes - Services extérieurs', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('62', 'autres charges externes - Autres services extérieurs', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('63', 'Impôts, taxes et versements assimiles', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('641', 'Rémunérations du personnel', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('644', 'Rémunération du travail de l''exploitant', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('645', 'Charges de sécurité sociale et de prévoyance', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('646', 'Cotisations sociales personnelles de l''exploitant', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('65', 'Autres charges de gestion courante', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('66', 'Charges financières', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('67', 'Charges exceptionnelles', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('681', 'Dotations aux amortissements et aux provisions - Charges d''exploitation', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('686', 'Dotations aux amortissements et aux provisions - Charges financières', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('687', 'Dotations aux amortissements et aux provisions - Charges exceptionnelles', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('691', 'Participation des salariés aux résultats', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('695', 'Impôts sur les bénéfices', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('697', 'Imposition forfaitaire annuelle des sociétés', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('699', 'Produits - Reports en arrière des déficits', '6', 'CHA'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('7', 'comptes de produits', '0', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('701', 'Ventes de produits finis', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('706', 'Prestations de services', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('707', 'Ventes de marchandises', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('708', 'Produits des activités annexes', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('709', 'Rabais, remises et ristournes accordés par l''entreprise', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('713', 'Variation des stocks (en-cours de production, produits)', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('72', 'Production immobilisée', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('73', 'Produits nets partiels sur opérations à long terme', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('74', 'Subventions d''exploitation', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('75', 'Autres produits de gestion courante', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('753', 'Jetons de présence et rémunérations d''administrateurs, gérants,...', '75', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('754', 'Ristournes perçues des coopératives (provenant des excédents)', '75', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('755', 'Quotes-parts de résultat sur opérations faites en commun', '75', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('76', 'Produits financiers', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('77', 'Produits exceptionnels', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('781', 'Reprises sur amortissements et provisions (à inscrire dans les produits d''exploitation)', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('786', 'Reprises sur provisions pour risques (à inscrire dans les produits financiers)', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('787', 'Reprises sur provisions (à inscrire dans les produits exceptionnels)', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('79', 'Transferts de charges', '7', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('8', 'Comptes spéciaux', '0', 'CON'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('9', 'Comptes analytiques', '0', 'CON'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4456601', 'TVA 19,6% - France métropolitaine - Taux immobilisations Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('445701', 'TVA 19,6% - France métropolitaine - Taux immobilisations Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4456602', 'TVA x% - France métropolitaine - Taux anciens Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('445702', 'TVA x% - France métropolitaine - Taux anciens Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4456603', 'TVA 8,5% - DOM - Taux normal Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('445703', 'TVA 8,5% - DOM - Taux normal Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4456604', 'TVA 8,5% - DOM - Taux normal NPR Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('445704', 'TVA 8,5% - DOM - Taux normal NPR Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4456605', 'TVA 2,1% - DOM - Taux réduit Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('445705', 'TVA 2,1% - DOM - Taux réduit Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4456606', 'TVA 1,75% - DOM - Taux I Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('445706', 'TVA 1,75% - DOM - Taux I Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4456607', 'TVA 1,05% - DOM - Taux publications de presse Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('445707', 'TVA 1,05% - DOM - Taux publications de presse Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4456608', 'TVA x% - DOM - Taux octroi de mer Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('445708', 'TVA x% - DOM - Taux octroi de mer Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4456609', 'TVA x% - DOM - Taux immobilisations Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('445709', 'TVA x% - DOM - Taux immobilisations Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('44566010', 'TVA 13% - Corse - Taux I Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4457010', 'TVA 13% - Corse - Taux I Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('44566011', 'TVA 8% - Corse - Taux II Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4457011', 'TVA 8% - Corse - Taux II Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('44566012', 'TVA 2,1% - Corse - Taux III Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4457012', 'TVA 2,1% - Corse - Taux III Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('44566013', 'TVA 0,9% - Corse - Taux IV Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4457013', 'TVA 0,9% - Corse - Taux IV Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('44566014', 'TVA x% - Corse - Taux immobilisations Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4457014', 'TVA x% - Corse - Taux immobilisations Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('44566015', 'TVA x% - Acquisitions intracommunautaires/Pays Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4457015', 'TVA x% - Acquisitions intracommunautaires/Pays Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('44566016', 'TVA x% - Acquisitions intracommunautaires immobilisations/Pays Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4457016', 'TVA x% - Acquisitions intracommunautaires immobilisations/Pays Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('44566017', 'TVA x% - Non imposable : Achats en franchise Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4457017', 'TVA x% - Non imposable : Achats en franchise Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('44566018', 'TVA x% - Non imposable : Exports hors CE/Pays Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4457018', 'TVA x% - Non imposable : Exports hors CE/Pays Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('44566019', 'TVA x% - Non imposable : Autres opérations Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4457019', 'TVA x% - Non imposable : Autres opérations Collectée ', '4457', 'PAS'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('44566020', 'TVA x% - Non imposable : Livraisons intracommunautaires/Pays Déductible', '4456', 'ACT'); -INSERT INTO tmp_pcmn (pcm_val, pcm_lib, pcm_val_parent, pcm_type) VALUES ('4457020', 'TVA x% - Non imposable : Livraisons intracommunautaires/Pays Collectée ', '4457', 'PAS'); - - - - - - -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (101, 'FR_NOR', 0.1960, 'TVA 19,6% - France métropolitaine - Taux normal', '445661,44571'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (102, 'FR_RED', 0.0550, 'TVA 5,5% - France métropolitaine - Taux réduit', '445662,44572'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (103, 'FR_SRED', 0.0210, 'TVA 2,1% - France métropolitaine - Taux super réduit', '445663,44573'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (104, 'FR_IMMO', 0.1960, 'TVA 19,6% - France métropolitaine - Taux immobilisations', '4456601,445701'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (105, 'FR_ANC', 0.0000, 'TVA x% - France métropolitaine - Taux anciens', '4456602,445702'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (201, 'DOM', 0.0850, 'TVA 8,5% - DOM - Taux normal', '4456603,445703'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (202, 'DOM_NPR', 0.0850, 'TVA 8,5% - DOM - Taux normal NPR', '4456604,445704'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (203, 'DOM_REDUIT', 0.0210, 'TVA 2,1% - DOM - Taux réduit', '4456605,445705'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (204, 'DOM_I', 0.0175, 'TVA 1,75% - DOM - Taux I', '4456606,445706'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (205, 'DOM_PRESSE', 0.0105, 'TVA 1,05% - DOM - Taux publications de presse', '4456607,445707'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (206, 'DOM_OCTROI', 0.0000, 'TVA x% - DOM - Taux octroi de mer', '4456608,445708'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (207, 'DOM_IMMO', 0.0000, 'TVA x% - DOM - Taux immobilisations', '4456609,445709'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (301, 'COR_I', 0.1300, 'TVA 13% - Corse - Taux I', '44566010,4457010'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (302, 'COR_II', 0.0800, 'TVA 8% - Corse - Taux II', '44566011,4457011'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (303, 'COR_III', 0.0210, 'TVA 2,1% - Corse - Taux III', '44566012,4457012'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (304, 'COR_IV', 0.0090, 'TVA 0,9% - Corse - Taux IV', '44566013,4457013'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (305, 'COR_IMMO', 0.0000, 'TVA x% - Corse - Taux immobilisations', '44566014,4457014'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (401, 'INTRA', 0.0000, 'TVA x% - Acquisitions intracommunautaires/Pays', '44566015,4457015'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (402, 'INTRA_IMMMO', 0.0000, 'TVA x% - Acquisitions intracommunautaires immobilisations/Pays', '44566016,4457016'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (501, 'FRANCH', 0.0000, 'TVA x% - Non imposable : Achats en franchise', '44566017,4457017'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (502, 'EXPORT', 0.0000, 'TVA x% - Non imposable : Exports hors CE/Pays', '44566018,4457018'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (503, 'AUTRE', 0.0000, 'TVA x% - Non imposable : Autres opérations', '44566019,4457019'); -INSERT INTO tva_rate (tva_id, tva_label, tva_rate, tva_comment, tva_poste) VALUES (504, 'INTRA_LIV', 0.0000, 'TVA x% - Non imposable : Livraisons intracommunautaires/Pays', '44566020,4457020'); - - - -INSERT INTO user_local_pref (user_id, parameter_type, parameter_value) VALUES ('1', 'MINIREPORT', '0'); -INSERT INTO user_local_pref (user_id, parameter_type, parameter_value) VALUES ('1', 'PERIODE', '105'); - - - - - - - - - - - - -INSERT INTO version (val) VALUES (75); - - - diff --git a/sources/html/admin/sql/mod2/make-sql b/sources/html/admin/sql/mod2/make-sql deleted file mode 100755 index abf4e55..0000000 --- a/sources/html/admin/sql/mod2/make-sql +++ /dev/null @@ -1,2 +0,0 @@ -pg_dump -O -U phpcompta -D -a -O ${DOMAIN}mod2 |sed -e "/^--/d" > data.sql - diff --git a/sources/html/admin/sql/patch/ac-upgrade10.sql b/sources/html/admin/sql/patch/ac-upgrade10.sql deleted file mode 100644 index 1f708b5..0000000 --- a/sources/html/admin/sql/patch/ac-upgrade10.sql +++ /dev/null @@ -1,9 +0,0 @@ -begin; ---- on account_repository -delete from user_global_pref where parameter_type='fr_FR.utf8'; - -insert into user_global_pref(user_id,parameter_type,parameter_value ) select use_login,'LANG','fr_FR.utf8' from ac_users ; - -update version set val=11; -commit; - diff --git a/sources/html/admin/sql/patch/ac-upgrade11.sql b/sources/html/admin/sql/patch/ac-upgrade11.sql deleted file mode 100644 index 513ef22..0000000 --- a/sources/html/admin/sql/patch/ac-upgrade11.sql +++ /dev/null @@ -1,25 +0,0 @@ -begin; -delete from jnt_use_dos where use_id not in (select use_id from ac_users); - -delete from jnt_use_dos where dos_id not in (select dos_id from ac_dossier); - -alter table jnt_use_dos add CONSTRAINT jnt_use_dos_dos_id_fkey FOREIGN KEY (dos_id) - REFERENCES ac_dossier (dos_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE; -alter table jnt_use_dos add CONSTRAINT jnt_use_dos_use_id_fkey FOREIGN KEY (use_id) - REFERENCES ac_users (use_id) MATCH SIMPLE - ON UPDATE NO ACTION ON DELETE NO ACTION; - - -delete from priv_user where priv_jnt not in (select jnt_id from jnt_use_dos); - -alter table jnt_use_dos drop constraint jnt_use_dos_pkey; - -alter table jnt_use_dos add constraint jnt_use_dos_pkey PRIMARY KEY (jnt_id); - -alter table priv_user add CONSTRAINT priv_user_priv_jnt_fkey FOREIGN KEY (priv_jnt) - REFERENCES jnt_use_dos (jnt_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE cascade; -alter table version add primary key (val); -update version set val=12; -commit; diff --git a/sources/html/admin/sql/patch/ac-upgrade12.sql b/sources/html/admin/sql/patch/ac-upgrade12.sql deleted file mode 100644 index 3613b63..0000000 --- a/sources/html/admin/sql/patch/ac-upgrade12.sql +++ /dev/null @@ -1,46 +0,0 @@ -begin; --- Table: audit_connect - --- DROP TABLE audit_connect; - -CREATE TABLE audit_connect -( - ac_id serial NOT NULL, - ac_user text, - ac_date timestamp without time zone DEFAULT now(), - ac_ip text, - ac_state text, - ac_module text, - ac_url text, - CONSTRAINT audit_connect_pkey PRIMARY KEY (ac_id), - CONSTRAINT valid_state CHECK (ac_state = 'FAIL'::text OR ac_state = 'SUCCESS'::text) -); - -CREATE OR REPLACE FUNCTION limit_user() - RETURNS trigger AS -$BODY$ - -begin -NEW.ac_user := substring(NEW.ac_user from 1 for 80); -return NEW; -end; $BODY$ -LANGUAGE plpgsql; - -CREATE TRIGGER limit_user_trg - BEFORE INSERT OR UPDATE - ON audit_connect - FOR EACH ROW - EXECUTE PROCEDURE limit_user(); - - --- Index: audit_connect_ac_user - --- DROP INDEX audit_connect_ac_user; - -CREATE INDEX audit_connect_ac_user - ON audit_connect - USING btree - (ac_user); - -update version set val=13; -commit; diff --git a/sources/html/admin/sql/patch/ac-upgrade13.sql b/sources/html/admin/sql/patch/ac-upgrade13.sql deleted file mode 100644 index 5449e40..0000000 --- a/sources/html/admin/sql/patch/ac-upgrade13.sql +++ /dev/null @@ -1,11 +0,0 @@ -begin; --- Check: valid_state - ALTER TABLE audit_connect DROP CONSTRAINT valid_state; - -ALTER TABLE audit_connect ADD CONSTRAINT valid_state CHECK (ac_state = 'FAIL'::text OR ac_state = 'SUCCESS'::text or ac_state='AUDIT'); --- run to the account_repository -insert into theme values ('EPad','style-epad.css',null); -update priv_user set priv_priv='R' where priv_priv='L'; -update priv_user set priv_priv='R' where priv_priv='P'; -update version set val=14; -commit; diff --git a/sources/html/admin/sql/patch/ac-upgrade14.sql b/sources/html/admin/sql/patch/ac-upgrade14.sql deleted file mode 100644 index 2c39589..0000000 --- a/sources/html/admin/sql/patch/ac-upgrade14.sql +++ /dev/null @@ -1,25 +0,0 @@ -begin; -update theme set the_name='Mandarine' ,the_filestyle='style-mandarine.css' where the_name='Colored'; -update theme set the_name='Mobile' ,the_filestyle='style-mobile.css' where the_name='EPad'; -update theme set the_name = 'Classique' where the_name='classic'; -update user_global_pref set parameter_value='Classique' where parameter_type='THEME'; -update theme set the_filestyle='style-classic.css' where the_filestyle='style.css'; - -CREATE OR REPLACE FUNCTION public.upgrade_repo(p_version integer) - RETURNS void -AS $function$ -declare - is_mono integer; -begin - select count (*) into is_mono from information_schema.tables where table_name='repo_version'; - if is_mono = 1 then - update repo_version set val=p_version; - else - update version set val=p_version; - end if; -end; -$function$ - language plpgsql; -select upgrade_repo(15); - -commit; diff --git a/sources/html/admin/sql/patch/ac-upgrade15.sql b/sources/html/admin/sql/patch/ac-upgrade15.sql deleted file mode 100644 index a5b8f94..0000000 --- a/sources/html/admin/sql/patch/ac-upgrade15.sql +++ /dev/null @@ -1,45 +0,0 @@ -begin; - -ALTER TABLE ac_dossier drop COLUMN dos_jnt_user ; -delete from jnt_use_dos where jnt_id in (select priv_jnt from priv_user where priv_priv='X'); -delete from jnt_use_dos where use_id in (select use_id from ac_users where use_admin=1 or use_active=0); -ALTER TABLE ac_users ADD COLUMN use_email text; -COMMENT ON COLUMN ac_users.use_email IS 'Email of the user'; - -CREATE OR REPLACE FUNCTION public.upgrade_repo(p_version integer) - RETURNS void -AS $function$ -declare - is_mono integer; -begin - select count (*) into is_mono from information_schema.tables where table_name='repo_version'; - if is_mono = 1 then - update repo_version set val=p_version; - else - update version set val=p_version; - end if; -end; -$function$ - language plpgsql; - -drop table priv_user; - -CREATE TABLE recover_pass -( - use_id bigint NOT NULL, - request text NOT NULL, - password text NOT NULL, - created_on timestamp with time zone, - created_host text, - recover_on timestamp with time zone, - recover_by text, - CONSTRAINT recover_pass_pkey PRIMARY KEY (request ), - CONSTRAINT ac_users_recover_pass_fk FOREIGN KEY (use_id) - REFERENCES ac_users (use_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE -); - -CREATE INDEX fki_ac_users_recover_pass_fk ON recover_pass USING btree (use_id ); - -select upgrade_repo(16); -commit; diff --git a/sources/html/admin/sql/patch/ac-upgrade4.sql b/sources/html/admin/sql/patch/ac-upgrade4.sql deleted file mode 100644 index 283454d..0000000 --- a/sources/html/admin/sql/patch/ac-upgrade4.sql +++ /dev/null @@ -1,4 +0,0 @@ -delete from jnt_use_dos where dos_id not in (select dos_id from ac_dossier ); - -delete from jnt_use_dos where dos_id not in (select dos_id from ac_dossier); -update version set val=5; diff --git a/sources/html/admin/sql/patch/ac-upgrade5.sql b/sources/html/admin/sql/patch/ac-upgrade5.sql deleted file mode 100644 index a868659..0000000 --- a/sources/html/admin/sql/patch/ac-upgrade5.sql +++ /dev/null @@ -1 +0,0 @@ -update version set val=6; diff --git a/sources/html/admin/sql/patch/ac-upgrade6.sql b/sources/html/admin/sql/patch/ac-upgrade6.sql deleted file mode 100644 index 0c9a6f7..0000000 --- a/sources/html/admin/sql/patch/ac-upgrade6.sql +++ /dev/null @@ -1,21 +0,0 @@ -begin; -create table user_global_pref ( - user_id text, - parameter_type text, - parameter_value text -); -comment on table user_global_pref is 'The user''s global parameter '; -comment on column 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 user_global_pref.parameter_value is 'the value of parameter '; - -alter table user_global_pref add constraint fk_user_id foreign key (user_id) references ac_users(use_login) on delete cascade on update cascade; -alter table user_global_pref add constraint pk_user_global_pref primary key (user_id,parameter_type); - -insert into user_global_pref select use_login,'PAGESIZE','50' from ac_users; -insert into user_global_pref select use_login,'THEME',use_theme from ac_users; -alter table ac_users drop use_usertype; -alter table ac_users drop use_theme; -update version set val=7; -commit; - diff --git a/sources/html/admin/sql/patch/ac-upgrade7.sql b/sources/html/admin/sql/patch/ac-upgrade7.sql deleted file mode 100644 index 2b5ffb6..0000000 --- a/sources/html/admin/sql/patch/ac-upgrade7.sql +++ /dev/null @@ -1,6 +0,0 @@ -begin; - insert into Theme values ('Colored','style-color.css',null); -delete from theme where the_filestyle='style-aqua.css' or the_filestyle='style-elegant.css'; -update version set val=8; -commit; - diff --git a/sources/html/admin/sql/patch/ac-upgrade8.sql b/sources/html/admin/sql/patch/ac-upgrade8.sql deleted file mode 100644 index a6f14c7..0000000 --- a/sources/html/admin/sql/patch/ac-upgrade8.sql +++ /dev/null @@ -1,6 +0,0 @@ -begin; -update modeledef set mod_desc='Comptabilité Belge, à adapter' where mod_id=1; -update modeledef set mod_desc='Comptabilité Française, à adapter' where mod_id=2; -update version set val=9; -commit; - diff --git a/sources/html/admin/sql/patch/ac-upgrade9.sql b/sources/html/admin/sql/patch/ac-upgrade9.sql deleted file mode 100644 index 5e45190..0000000 --- a/sources/html/admin/sql/patch/ac-upgrade9.sql +++ /dev/null @@ -1,10 +0,0 @@ -begin; ---- on account_repository -update priv_user set priv_priv='X' where priv_priv='NO'; -update priv_user set priv_priv='R' where priv_priv='W'; -update user_global_pref set parameter_value='TEXT' where parameter_type='TOPMENU'; - - -update version set val=10; -commit; - diff --git a/sources/html/admin/sql/patch/downgrade7.sql b/sources/html/admin/sql/patch/downgrade7.sql deleted file mode 100644 index ce05a2c..0000000 --- a/sources/html/admin/sql/patch/downgrade7.sql +++ /dev/null @@ -1,29 +0,0 @@ -begin; - -insert into tva_rate values (5,'0%',0, 'Pas soumis à la TVA',null); - -update fiche_def_ref set frd_class_base=2400 where frd_id=7; - -update version set val=8; --- banque n'a pas de gestion stock -delete from jnt_fic_attr where fd_id=1 and ad_id=19; --- client n'a pas de gestion stock -delete from jnt_fic_attr where fd_id=2 and ad_id=19; --- default periode for phpcompta - update user_pref set pref_periode=40 where pref_user='phpcompta'; --- create index ix_j_grp on jrnx(j_grpt); --- create index ix_jr_grp on jrn(jr_grpt_id); -update jrnx set j_tech_per = jr_tech_per from jrn where j_grpt=jr_grpt_id and j_tech_per is null; -alter table jrnx alter j_tech_per set not null; -alter table jrn alter jr_tech_per set not null; -alter table jrn alter jr_montant type numeric(8,4); -alter table jrnx alter j_montant type numeric(8,4); - -update version set val=7; -commit; -drop trigger tr_jrn_check_balance on jrn ; -drop function proc_check_balance(); -drop function check_balance(text); -drop table user_local_pref; -commit; - diff --git a/sources/html/admin/sql/patch/upgrade10.sql b/sources/html/admin/sql/patch/upgrade10.sql deleted file mode 100644 index 000d21a..0000000 --- a/sources/html/admin/sql/patch/upgrade10.sql +++ /dev/null @@ -1,140 +0,0 @@ -begin; --- Function: proc_check_balance() - -CREATE OR REPLACE FUNCTION proc_check_balance() - RETURNS "trigger" AS -$BODY$ -declare - diff numeric; - tt integer; -begin - if TG_OP = 'INSERT' then - tt=NEW.jr_grpt_id; - diff:=check_balance(tt); - if diff != 0 then - raise exception 'balance error %',diff ; - end if; - return NEW; - end if; -end; -$BODY$ - LANGUAGE plpgsql VOLATILE; - - --- Function: check_balance(p_grpt text) - -DROP FUNCTION check_balance(text); - -CREATE OR REPLACE FUNCTION check_balance(p_grpt integer) - RETURNS "numeric" AS -$BODY$ -declare - amount_jrnx_debit numeric; - amount_jrnx_credit numeric; - amount_jrn numeric; -begin - select sum (j_montant) into amount_jrnx_credit - from jrnx - where - j_grpt=p_grpt - and j_debit=false; - - select sum (j_montant) into amount_jrnx_debit - from jrnx - where - j_grpt=p_grpt - and j_debit=true; - - select jr_montant into amount_jrn - from jrn - where - jr_grpt_id=p_grpt; - - if ( amount_jrnx_debit != amount_jrnx_credit ) - then - return abs(amount_jrnx_debit-amount_jrnx_credit); - end if; - if ( amount_jrn != amount_jrnx_credit) - then - return -1*abs(amount_jrn - amount_jrnx_credit); - end if; - return 0; -end; -$BODY$ - LANGUAGE plpgsql VOLATILE; - --- add quick_code to the vw_client view -drop view vw_client; - - -create view vw_client as - SELECT a.f_id, a.av_text AS name, a1.av_text as quick_code,b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email - FROM ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 1) a - inner JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 13) b USING (f_id) - inner JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 23) a1 USING (f_id) - inner JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 5) c USING (f_id) - inner JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 14) d USING (f_id) - inner JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 15) e USING (f_id) - inner JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 16) f USING (f_id) - inner JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 17) g USING (f_id) - LEFT JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 18) h USING (f_id) - WHERE a.frd_id = 9; - - - -update version set val=11; -commit; diff --git a/sources/html/admin/sql/patch/upgrade100.sql b/sources/html/admin/sql/patch/upgrade100.sql deleted file mode 100644 index 38bc440..0000000 --- a/sources/html/admin/sql/patch/upgrade100.sql +++ /dev/null @@ -1,27 +0,0 @@ -begin; -alter table attr_def add ad_extra text ; - -insert into attr_def (ad_id,ad_text,ad_type,ad_size) values (33,'Date Fin','date',8); - -ALTER TABLE fiche_detail DROP CONSTRAINT "$2"; - -ALTER TABLE fiche_detail - ADD CONSTRAINT fiche_detail_attr_def_fk FOREIGN KEY (ad_id) - REFERENCES attr_def (ad_id) MATCH SIMPLE - ON UPDATE cascade ON DELETE cascade; - -ALTER TABLE jnt_fic_attr DROP CONSTRAINT "$2"; - -ALTER TABLE jnt_fic_attr - ADD CONSTRAINT jnt_fic_attr_attr_def_fk FOREIGN KEY (ad_id) - REFERENCES attr_def (ad_id) MATCH SIMPLE - ON UPDATE cascade ON DELETE cascade; - -insert into menu_ref(me_code,me_menu,me_type) values ('CVS:reportinit','Export définition d''un raport','PR'); - -insert into profile_menu (me_code,p_id,p_type_display) values ('CVS:reportinit',1,'P'); -insert into profile_menu (me_code,p_id,p_type_display) values ('CVS:reportinit',2,'P'); - -update version set val=101; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade101.sql b/sources/html/admin/sql/patch/upgrade101.sql deleted file mode 100644 index b79c0f5..0000000 --- a/sources/html/admin/sql/patch/upgrade101.sql +++ /dev/null @@ -1,11 +0,0 @@ -begin; -delete from letter_deb where ld_id in (select a.ld_id from letter_deb as a join letter_deb as b on (a.j_id=b.j_id and a.ld_id > b.ld_id)); -delete from letter_cred where lc_id in (select a.lc_id from letter_cred as a join letter_cred as b on (a.j_id=b.j_id and a.lc_id > b.lc_id)); - -ALTER TABLE letter_deb ADD CONSTRAINT letter_deb_j_id_key UNIQUE(j_id ); -ALTER TABLE letter_cred ADD CONSTRAINT letter_cred_j_id_key UNIQUE(j_id ); - - -update version set val=102; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade102.sql b/sources/html/admin/sql/patch/upgrade102.sql deleted file mode 100644 index 2e4d25d..0000000 --- a/sources/html/admin/sql/patch/upgrade102.sql +++ /dev/null @@ -1,499 +0,0 @@ -begin; -CREATE OR REPLACE FUNCTION comptaproc.check_balance(p_grpt integer) - RETURNS numeric AS -$BODY$ -declare - amount_jrnx_debit numeric; - amount_jrnx_credit numeric; - amount_jrn numeric; -begin - select coalesce(sum (j_montant),0) into amount_jrnx_credit - from jrnx - where - j_grpt=p_grpt - and j_debit=false; - - select coalesce(sum (j_montant),0) into amount_jrnx_debit - from jrnx - where - j_grpt=p_grpt - and j_debit=true; - - select coalesce(jr_montant,0) into amount_jrn - from jrn - where - jr_grpt_id=p_grpt; - - if ( amount_jrnx_debit != amount_jrnx_credit ) - then - return abs(amount_jrnx_debit-amount_jrnx_credit); - end if; - if ( amount_jrn != amount_jrnx_credit) - then - return -1*abs(amount_jrn - amount_jrnx_credit); - end if; - return 0; -end; -$BODY$ - LANGUAGE plpgsql; - -update op_predef set od_direct='t' where od_jrn_type='ODS'; - - -update profile_menu set p_order=p_order*10; - -INSERT INTO menu_ref( - me_code, me_menu, me_file, me_url, me_description, me_parameter, - me_javascript, me_type) - VALUES ('BK', 'Banque', 'bank.inc.php', null, 'Information Banque', null,null,'ME'); - -INSERT INTO profile_menu( - me_code, me_code_dep, p_id, p_order, p_type_display, pm_default) - VALUES ('BK', 'GESTION', 1, 35, 'E', 0); -INSERT INTO profile_menu( - me_code, me_code_dep, p_id, p_order, p_type_display, pm_default) - VALUES ('BK', 'GESTION', 2, 35, 'E', 0); - - - -update menu_ref set me_description='Grand livre analytique' where me_code='ANCGL'; - -alter table action_gestion add ag_remind_date date; - -drop table jrn_action; - -update action_gestion set ag_dest=null; - alter table action_gestion alter ag_dest type bigint using ag_dest::numeric; - alter table action_gestion alter ag_dest set default null; -COMMENT ON COLUMN action_gestion.ag_dest IS ' is the profile which has to take care of this action '; -ALTER TABLE action_gestion - ADD CONSTRAINT profile_fkey FOREIGN KEY (ag_dest) - REFERENCES profile (p_id) MATCH SIMPLE - ON UPDATE SET NULL ON DELETE SET NULL; - -CREATE TABLE action_gestion_comment -( - agc_id bigserial NOT NULL, -- PK - ag_id bigint, -- FK to action_gestion - agc_date timestamp with time zone, - agc_comment text, -- comment - tech_user text, -- user_login - CONSTRAINT action_gestion_comment_pkey PRIMARY KEY (agc_id ), - CONSTRAINT action_gestion_comment_ag_id_fkey FOREIGN KEY (ag_id) - REFERENCES action_gestion (ag_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE -); -ALTER TABLE action_gestion_comment ALTER COLUMN agc_date SET DEFAULT now(); -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'; - - -insert into action_gestion_comment (ag_id,agc_date,agc_comment,tech_user) select ag_id,ag_timestamp,ag_comment,ag_owner from action_gestion; -ALTER TABLE action_gestion drop COLUMN ag_comment; - -CREATE TABLE action_gestion_operation -( - ago_id bigserial NOT NULL, -- pk - ag_id bigint, -- fk to action_gestion - jr_id bigint, -- fk to jrn - CONSTRAINT action_comment_operation_pkey PRIMARY KEY (ago_id ), - CONSTRAINT action_comment_operation_ag_id_fkey FOREIGN KEY (ag_id) - REFERENCES action_gestion (ag_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE, - CONSTRAINT action_comment_operation_jr_id_fkey FOREIGN KEY (jr_id) - REFERENCES jrn (jr_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE -); -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'; - -CREATE TABLE link_action_type -( - l_id bigserial NOT NULL, -- PK - l_desc character varying, - CONSTRAINT link_action_type_pkey PRIMARY KEY (l_id ) -); - - -CREATE TABLE action_gestion_related -( - aga_id bigserial NOT NULL, -- pk - aga_least bigint NOT NULL, -- fk to action_gestion, smallest ag_id - aga_greatest bigint NOT NULL, -- fk to action_gestion greatest ag_id - aga_type bigint, -- Type de liens - CONSTRAINT action_gestion_related_pkey PRIMARY KEY (aga_id ), - CONSTRAINT action_gestion_related_aga_greatest_fkey FOREIGN KEY (aga_greatest) - REFERENCES action_gestion (ag_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE, - CONSTRAINT action_gestion_related_aga_least_fkey FOREIGN KEY (aga_least) - REFERENCES action_gestion (ag_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE, - CONSTRAINT action_gestion_related_aga_type_fkey FOREIGN KEY (aga_type) - REFERENCES link_action_type (l_id) MATCH SIMPLE - ON UPDATE NO ACTION ON DELETE NO ACTION, - CONSTRAINT ux_aga_least_aga_greatest UNIQUE (aga_least , aga_greatest ) -); - -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'; - -CREATE INDEX link_action_type_fki - ON action_gestion_related - USING btree - (aga_type ); - --- Trigger: trg_action_gestion_related on action_gestion_related -CREATE OR REPLACE FUNCTION comptaproc.action_gestion_related_ins_up() - RETURNS trigger AS -$BODY$ -declare - nTmp bigint; -begin - -if NEW.aga_least > NEW.aga_greatest then - nTmp := NEW.aga_least; - NEW.aga_least := NEW.aga_greatest; - NEW.aga_greatest := nTmp; -end if; - -if NEW.aga_least = NEW.aga_greatest then - return NULL; -end if; - -return NEW; - -end; -$BODY$ - LANGUAGE plpgsql ; --- DROP TRIGGER trg_action_gestion_related ON action_gestion_related; - -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(); - - -insert into action_gestion_related(aga_least,aga_greatest) select ag_id,ag_ref_ag_id from action_gestion where ag_ref_ag_id<>0; - -update menu_ref set me_menu='Action Gestion' where me_code='FOLLOW'; - -DROP FUNCTION comptaproc.action_get_tree(bigint); - -insert into menu_ref(me_code,me_menu,me_type) values ('CSV:ActionGestion','Export Action Gestion','PR'); -insert into profile_menu(me_code,p_id,p_type_display,pm_default) values ('CSV:ActionGestion',1,'P',0); - - -ALTER TABLE document_type ADD COLUMN dt_prefix text; -COMMENT ON COLUMN document_type.dt_prefix IS 'Prefix for ag_ref'; - -update document_type set dt_prefix= upper(substr(replace(dt_value,' ',''),0,7))||dt_id::text; - -CREATE TABLE user_sec_action_profile -( - ua_id bigserial NOT NULL, -- pk - p_id bigint, -- fk to profile - p_granted bigint, -- fk to profile - ua_right character(1), -- Type of right : R for readonly W for write - CONSTRAINT user_sec_action_profile_pkey PRIMARY KEY (ua_id ), - CONSTRAINT user_sec_action_profile_p_id_fkey FOREIGN KEY (p_id) - REFERENCES profile (p_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE, - CONSTRAINT user_sec_action_profile_p_granted_fkey FOREIGN KEY (p_granted) - REFERENCES profile (p_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE, - CONSTRAINT user_sec_action_profile_ua_right_check CHECK (ua_right = ANY (ARRAY['R'::bpchar, 'W'::bpchar])) -); -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'; -INSERT INTO profile (p_name, p_id, p_desc, with_calc, with_direct_form) VALUES ('Public', -1, 'faux groupe', NULL, NULL); -insert into user_sec_action_profile(p_id,p_granted,ua_right) select 1,p_id,'W' from profile; -insert into user_sec_action_profile(p_id,p_granted ,ua_right) select 2,p_id,'W' from profile; -insert into parameter values('MY_STOCK','N'); - -INSERT INTO menu_ref(me_code, me_menu, me_file, me_url, me_description, me_parameter, - me_javascript, me_type) - VALUES ('CFGSTOCK', 'Configuration des dépôts', 'stock_cfg.inc.php', null, 'Configuration dépôts', null,null,'ME'); - -INSERT INTO profile_menu(me_code, me_code_dep, p_id, p_order, p_type_display, pm_default) - VALUES ('CFGSTOCK', 'PARAM', 1, 40, 'E', 0); -update menu_ref set me_file=null where me_code='STOCK'; -update profile_menu set me_code_dep='COMPTA',p_order=90 where me_code='STOCK' and me_code_dep='ADV'; - -CREATE TABLE stock_repository -( - r_id bigserial NOT NULL, -- pk - r_name text, -- name of the stock - r_adress text, -- adress of the stock - r_country text, -- country of the stock - r_city text, -- City of the stock - r_phone text, -- City of the stock - CONSTRAINT stock_repository_pkey PRIMARY KEY (r_id ) -); - -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'; - -insert into stock_repository(r_name) values ('Dépôt par défaut'); - - -CREATE TABLE profile_sec_repository -( - ur_id bigserial NOT NULL, -- pk - p_id bigint, -- fk to profile - r_id bigint, - ur_right character(1), -- Type of right : R for readonly W for write - CONSTRAINT profile_sec_repository_pkey PRIMARY KEY (ur_id ), - CONSTRAINT profile_sec_repository_p_id_fkey FOREIGN KEY (p_id) - REFERENCES profile (p_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE, - CONSTRAINT profile_sec_repository_r_id_fkey FOREIGN KEY (r_id) - REFERENCES stock_repository (r_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE, - CONSTRAINT user_sec_profile_ur_right_check CHECK (ur_right = ANY (ARRAY['R'::bpchar, 'W'::bpchar])) -); -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'; -alter table stock_goods add r_id bigint; - -alter table profile_sec_repository add constraint profile_sec_repository_r_id_p_id_u unique (r_id,p_id); -alter table user_sec_action_profile add constraint user_sec_action_profile_p_id_p_granted_u unique (p_id,p_granted); -update stock_goods set r_id=1; - -insert into profile_sec_repository (p_id,r_id,ur_right) select p_id,1,'W' from profile where p_id > 0; - -CREATE INDEX fk_stock_good_repository_r_id ON stock_goods (r_id ); -alter table action_gestion drop ag_cal; - - -update menu_ref set me_file=null where me_code='STOCK'; - -insert into menu_ref (me_code,me_file,me_menu,me_description,me_type) values ('STOCK_HISTO','stock_histo.inc.php','Historique stock','Historique des mouvement de stock','ME'); -insert into menu_ref (me_code,me_file,me_menu,me_description,me_type) values ('STOCK_STATE','stock_state.inc.php','Etat des stock','Etat des stock','ME'); -insert into menu_ref (me_code,me_file,me_menu,me_description,me_type) values ('STOCK_INVHISTO','stock_inv_histo.inc.php','Histo. Changement','Liste des changements manuels des stocks','ME'); -insert into menu_ref (me_code,me_menu,me_type) values ('CSV:StockHisto','Export Historique mouvement stock','PR'); -insert into menu_ref (me_code,me_menu,me_type) values ('CSV:StockResmList','Export Résumé list stock','PR'); - -insert into profile_menu(me_code,me_code_dep,p_id,p_order,p_type_display) values ('STOCK_HISTO','STOCK',1,10,'E'); -insert into profile_menu(me_code,me_code_dep,p_id,p_order,p_type_display) values ('STOCK_STATE','STOCK',1,20,'E'); -insert into profile_menu(me_code,me_code_dep,p_id,p_order,p_type_display) values ('STOCK_HISTO','STOCK',2,10,'E'); -insert into profile_menu(me_code,me_code_dep,p_id,p_order,p_type_display) values ('STOCK_STATE','STOCK',2,20,'E'); -insert into profile_menu(me_code,me_code_dep,p_id,p_order,p_type_display) values ('STOCK_INVHISTO','STOCK',1,30,'E'); -insert into profile_menu(me_code,me_code_dep,p_id,p_order,p_type_display) values ('STOCK_INVHISTO','STOCK',2,30,'E'); -insert into profile_menu(me_code,p_id,p_type_display) values ('CSV:StockHisto',1,'P'); -insert into profile_menu(me_code,p_id,p_type_display) values ('CSV:StockResmList',1,'P'); -insert into profile_menu(me_code,p_id,p_type_display) values ('CSV:StockHisto',2,'P'); -insert into profile_menu(me_code,p_id,p_type_display) values ('CSV:StockResmList',2,'P'); -insert into menu_ref (me_code,me_file,me_menu,me_description,me_type) values ('STOCK_INV','stock_inv.inc.php','Modification Stocks','Modification des stocks (inventaire)','ME'); -insert into profile_menu(me_code,me_code_dep,p_id,p_order,p_type_display) values ('STOCK_INV','STOCK',1,30,'E'); -insert into profile_menu(me_code,me_code_dep,p_id,p_order,p_type_display) values ('STOCK_INV','STOCK',2,30,'E'); - - --- clean stock_goods -delete from stock_goods where sg_code is null or sg_code='' or sg_code not in (select ad_value from fiche_detail as fd where ad_id=19 and ad_value is not null); - -CREATE INDEX fki_jrnx_j_grpt ON jrnx (j_grpt ); -CREATE INDEX fki_jrn_jr_grpt_id ON jrn (jr_grpt_id ); - --- -insert into fiche_def (fd_id,frd_id,fd_label) values (500000,15,'Stock'); -insert into jnt_fic_attr (fd_id,ad_id,jnt_order) values (500000,1,10); -insert into jnt_fic_attr (fd_id,ad_id,jnt_order) values (500000,9,20); -insert into jnt_fic_attr (fd_id,ad_id,jnt_order) values (500000,23,30); - -create or replace function migrate_stock() returns void -as -$body$ -declare - rt_row text; - n_fid bigint; -begin - for rt_row in select distinct ad_value from fiche_Detail where ad_id=19 and ad_value is not null and ad_Value <> '' - loop - insert into fiche (fd_id) values(500000) returning f_id into n_fid; - insert into fiche_detail (f_id,ad_id,ad_value) values (n_fid,1,rt_row); - insert into fiche_detail (f_id,ad_id,ad_value) values (n_fid,9,'Code stock '||rt_row); - insert into fiche_detail (f_id,ad_id,ad_value) values (n_fid,23,'STOCK'||n_fid::text); - update fiche_detail set ad_value='STOCK'||n_fid::text where ad_id=19 and ad_value=rt_row; - update stock_goods set sg_code='STOCK'||n_fid::text where sg_code=rt_row; - end loop; - -end; -$body$ language plpgsql; - -select migrate_stock(); - -select migrate_stock(); - -drop function migrate_stock(); - -update attr_def set ad_type='card', ad_extra='[sql] fd_id = 500000 ' where ad_id=19; - -create table tmp_stockgood (s_id bigserial primary key,s_date timestamp default now()); -create table tmp_stockgood_detail(d_id bigserial primary key,s_id bigint references tmp_stockgood(s_id) on delete cascade, -sg_code text,s_qin numeric(20,4),s_qout numeric(20,4),r_id bigint,f_id bigint); - - - -CREATE OR REPLACE FUNCTION comptaproc.fiche_detail_qcode_upd() - RETURNS trigger AS -$BODY$ -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; - - 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; -end; -$BODY$ - LANGUAGE plpgsql VOLATILE; - - -CREATE TRIGGER fiche_detail_upd_trg BEFORE UPDATE ON fiche_detail FOR EACH ROW EXECUTE PROCEDURE comptaproc.fiche_detail_qcode_upd(); - -update menu_ref set me_description='Gestion des attributs de fiches ' where me_code='CFGATCARD'; -ALTER TABLE stock_goods ADD COLUMN c_id bigint; - -CREATE TABLE stock_change -( - c_id bigserial NOT NULL, - c_comment text, - c_date date, - tech_user text, - r_id bigint, - tech_date time with time zone NOT NULL DEFAULT now(), - CONSTRAINT stock_change_pkey PRIMARY KEY (c_id ), - CONSTRAINT stock_change_r_id_fkey FOREIGN KEY (r_id) - REFERENCES stock_repository (r_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE -); - -ALTER TABLE stock_goods ADD CONSTRAINT stock_goods_c_id_fkey FOREIGN KEY (c_id) REFERENCES stock_change (c_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE; - -update action_gestion set ag_dest=-1 ; -alter table action_gestion alter ag_dest set not null; -alter table action_gestion alter ag_dest set default -1; - -update menu_ref set me_code='CSV:reportinit' where me_code='CVS:reportinit'; - update menu_ref set me_file='export_histo_csv.php' where me_code='CSV:histo'; - update menu_ref set me_file='export_ledger_csv.php' where me_code='CSV:ledger'; - update menu_ref set me_file='export_ledger_pdf.php' where me_code='PDF:ledger'; - update menu_ref set me_file='export_poste_detail_csv.php' where me_code='CSV:postedetail'; - update menu_ref set me_file='export_poste_detail_pdf.php' where me_code='PDF:postedetail'; - update menu_ref set me_file='export_fiche_detail_csv.php' where me_code='CSV:fichedetail'; - update menu_ref set me_file='export_fiche_detail_pdf.php' where me_code='PDF:fichedetail'; - update menu_ref set me_file='export_fiche_balance_csv.php' where me_code='CSV:fiche_balance'; - update menu_ref set me_file='export_fiche_balance_pdf.php' where me_code='PDF:fiche_balance'; - update menu_ref set me_file='export_form_csv.php' where me_code='CSV:report'; - update menu_ref set me_file='export_form_pdf.php' where me_code='PDF:report'; - update menu_ref set me_file='export_fiche_csv.php' where me_code='CSV:fiche'; - update menu_ref set me_file='export_fiche_pdf.php' where me_code='PDF:fiche'; - update menu_ref set me_file='export_gl_csv.php' where me_code='CSV:glcompte'; - update menu_ref set me_file='export_gl_pdf.php' where me_code='PDF:glcompte'; - update menu_ref set me_file='export_security_pdf.php' where me_code='PDF:sec'; - update menu_ref set me_file='export_anc_list_csv.php' where me_code='CSV:AncList'; - update menu_ref set me_file='export_anc_balance_simple_csv.php' where me_code='CSV:AncBalSimple'; - update menu_ref set me_file='export_anc_balance_simple_pdf.php' where me_code='PDF:AncBalSimple'; - update menu_ref set me_file='export_anc_balance_double_csv.php' where me_code='CSV:AncBalDouble'; - update menu_ref set me_file='export_anc_balance_double_pdf.php' where me_code='PDF:AncBalDouble'; - update menu_ref set me_file='export_balance_csv.php' where me_code='CSV:balance'; - update menu_ref set me_file='export_balance_pdf.php' where me_code='PDF:balance'; - update menu_ref set me_file='export_anc_table_csv.php' where me_code='CSV:AncTable'; - update menu_ref set me_file='export_anc_acc_list_csv.php' where me_code='CSV:AncAccList'; - update menu_ref set me_file='export_anc_balance_group_csv.php' where me_code='CSV:AncBalGroup'; - update menu_ref set me_file='export_bilan_oth.php' where me_code='OTH:Bilan'; - update menu_ref set me_file='export_anc_grandlivre_csv.php' where me_code='CSV:AncGrandLivre'; - update menu_ref set me_file='export_reportinit_csv.php' where me_code='CSV:reportinit'; - update menu_ref set me_file='export_follow_up_csv.php' where me_code='CSV:ActionGestion'; - update menu_ref set me_file='export_stock_histo_csv.php' where me_code='CSV:StockHisto'; - update menu_ref set me_file='export_stock_resume_list.php' where me_code='CSV:StockResmList'; - -INSERT INTO menu_ref( - me_code, me_menu, me_file, me_url, me_description, me_parameter, - me_javascript, me_type) - VALUES ('CFGDOCST', 'Etat des documents', 'doc_state.inc.php', null, 'Etat des documents', null,null,'ME'); - -INSERT INTO profile_menu( - me_code, me_code_dep, p_id, p_order, p_type_display, pm_default) - VALUES ('CFGDOCST', 'DIVPARM', 1, 9, 'E', 0); -INSERT INTO profile_menu( - me_code, me_code_dep, p_id, p_order, p_type_display, pm_default) - VALUES ('CFGDOCST', 'DIVPARM', 2,9, 'E', 0); - -alter sequence document_state_s_id_seq restart with 100; - -CREATE INDEX quant_purchase_jrn_fki - ON quant_purchase - USING btree - (qp_internal ); - - - -ALTER TABLE quant_purchase DROP CONSTRAINT quant_purchase_qp_internal_fkey; - - -ALTER TABLE quant_purchase - ADD CONSTRAINT quant_purchase_qp_internal_fkey FOREIGN KEY (qp_internal) - REFERENCES jrn (jr_internal) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; - - -ALTER TABLE quant_sold DROP CONSTRAINT quant_sold_qs_internal_fkey; - -ALTER TABLE quant_sold - ADD CONSTRAINT quant_sold_qs_internal_fkey FOREIGN KEY (qs_internal) - REFERENCES jrn (jr_internal) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; -CREATE INDEX quant_sold_jrn_fki - ON quant_sold - USING btree - (qs_internal ); - - -create sequence uos_pk_seq; -create table tool_uos ( uos_value bigint default nextval ('uos_pk_seq') primary key ); - -update menu_ref set me_code='CFGCARD',me_file='cfgfiche.inc.php' where me_code='CARD'; -update menu_ref set me_code='CARD',me_file='fiche.inc.php' where me_code='PRINTCARD'; -update profile_menu set me_code='CARD' where me_code='CFGCARD'; -update profile_menu set me_code='CFGCARD' , me_code_dep='PARAM' where me_code='CARD' and me_code_dep='PRINT'; -update menu_ref set me_menu='Fiche',me_description='Liste,Balance,Historique par fiche' where me_code='CARD'; -update menu_ref set me_menu='Fiche',me_description='Configuration de catégorie de fiches' where me_code='CFGCARD'; - -drop table user_sec_extension; - -update attr_def set ad_type='card', ad_extra='[sql] frd_id in (4,8,9,14)' where ad_id=25; - -update attr_Def set ad_extra='2' where ad_type='numeric'; -update attr_Def set ad_extra='4' where ad_id=31; - -update version set val=103; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade103.sql b/sources/html/admin/sql/patch/upgrade103.sql deleted file mode 100644 index f09d0a0..0000000 --- a/sources/html/admin/sql/patch/upgrade103.sql +++ /dev/null @@ -1,37 +0,0 @@ -begin; -CREATE OR REPLACE FUNCTION comptaproc.format_account(p_account account_type) - RETURNS account_type AS -$BODY$ - -declare - -sResult account_type; - -begin -sResult := lower(p_account); - -sResult := translate(sResult,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc'); -sResult := translate(sResult,E' $€µ£%.+-/\\!(){}(),;_&|"#''^<>*',''); - -return upper(sResult); - -end; -$BODY$ - LANGUAGE plpgsql ; - -COMMENT ON FUNCTION comptaproc.format_account(account_type) IS 'format the accounting : -- upper case -- remove space and special char. -'; - -update tmp_pcmn set pcm_val_parent = '62' where pcm_val='6202'; - -update fiche_detail set ad_value = (to_number(ad_value,'9.99')*100)::text where ad_id in (21,22,20,31) and ad_value is not null and ad_value <> ''; - -update menu_ref set me_code='ACHISTO' WHERE me_code='ACHIMP'; -update menu_ref set me_code='VEHISTO' WHERE me_code='VENIMP'; -update menu_ref set me_code='FIHISTO' WHERE me_code='FIMP'; -update menu_ref set me_code='ODHISTO' WHERE me_code='ODSIMP'; -update version set val=104; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade104.sql b/sources/html/admin/sql/patch/upgrade104.sql deleted file mode 100644 index 0df6521..0000000 --- a/sources/html/admin/sql/patch/upgrade104.sql +++ /dev/null @@ -1,105 +0,0 @@ -begin; -CREATE OR REPLACE FUNCTION comptaproc.insert_quick_code(nf_id integer, tav_text text) - RETURNS integer AS -$BODY$ - declare - ns integer; - nExist integer; - tText text; - begin - tText := lower(trim(tav_text)); - tText := replace(tText,' ',''); - tText := translate(tText,E' $€µ£%.+-/\\!(){}(),;_&|"#''^<>*',''); - tText := translate(tText,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc'); - - - loop - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - if length (tText) = 0 or tText is null then - tText := 'FID'||ns; - 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; - tText:='FID'||ns; - end loop; - - - insert into fiche_detail(jft_id,f_id,ad_id,ad_value) values (ns,nf_id,23,upper(tText)); - return ns; - end; -$BODY$ -LANGUAGE plpgsql; - - - -CREATE OR REPLACE FUNCTION comptaproc.update_quick_code(njft_id integer, tav_text text) - RETURNS integer AS -$BODY$ - declare - ns integer; - nExist integer; - tText text; - old_qcode varchar; - 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 - return 0; - end if; - - tText := trim(lower(tav_text)); - tText := replace(tText,' ',''); - 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; - - loop - -- 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; - if tText = 'FID'||ns then - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - end if; - tText :='FID'||ns; - - end loop; - update fiche_detail set ad_value = tText where 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); - - - update jrnx set j_qcode=tText where j_qcode = old_qcode; - return ns; - end; -$BODY$ -LANGUAGE plpgsql; - -update version set val=105; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade105.sql b/sources/html/admin/sql/patch/upgrade105.sql deleted file mode 100644 index 784e8cc..0000000 --- a/sources/html/admin/sql/patch/upgrade105.sql +++ /dev/null @@ -1,109 +0,0 @@ -begin; - -CREATE OR REPLACE FUNCTION comptaproc.insert_quick_code(nf_id integer, tav_text text) - RETURNS integer AS -$BODY$ - declare - ns integer; - nExist integer; - tText text; - begin - tText := lower(trim(tav_text)); - tText := replace(tText,' ',''); - tText := translate(tText,E' $€µ£%.+-/\\!(){}(),;_&|"#''^<>*',''); - tText := translate(tText,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc'); - - - loop - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - if length (tText) = 0 or tText is null then - tText := 'FID'||ns; - 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; - tText:='FID'||ns; - end loop; - - - insert into fiche_detail(jft_id,f_id,ad_id,ad_value) values (ns,nf_id,23,upper(tText)); - return ns; - end; -$BODY$ - LANGUAGE plpgsql; - -CREATE OR REPLACE FUNCTION comptaproc.update_quick_code(njft_id integer, tav_text text) - RETURNS integer AS -$BODY$ - declare - ns integer; - nExist integer; - tText text; - old_qcode varchar; - 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 - return 0; - end if; - - tText := trim(lower(tav_text)); - tText := replace(tText,' ',''); - 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; - - loop - -- 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; - if tText = 'FID'||ns then - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - end if; - tText :='FID'||ns; - - end loop; - update fiche_detail set ad_value = tText where 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); - - - update jrnx set j_qcode=tText where j_qcode = old_qcode; - return ns; - end; -$BODY$ - LANGUAGE plpgsql; - - -alter table document_state add s_status char(1); - -update document_state set s_status='C' where s_id in (1,4); - -update version set val=106; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade106.sql b/sources/html/admin/sql/patch/upgrade106.sql deleted file mode 100644 index 8eb2e72..0000000 --- a/sources/html/admin/sql/patch/upgrade106.sql +++ /dev/null @@ -1,69 +0,0 @@ -begin; -update attr_def set ad_text='Compte bancaire' where ad_id=3; -ALTER TABLE mod_payment DROP CONSTRAINT mod_payment_mp_fd_id_fkey ; -ALTER TABLE mod_payment ADD CONSTRAINT mod_payment_mp_fd_id_fkey FOREIGN KEY (mp_fd_id) REFERENCES fiche_def (fd_id) MATCH SIMPLE ON UPDATE cascade ON DELETE cascade; -ALTER TABLE mod_payment DROP CONSTRAINT mod_payment_mp_jrn_def_id_fkey ; -ALTER TABLE mod_payment ADD CONSTRAINT mod_payment_mp_jrn_def_id_fkey FOREIGN KEY (mp_jrn_def_id) REFERENCES jrn_def (jrn_def_id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE; -ALTER TABLE fiche_def ADD COLUMN fd_description text; -update fiche_def set fd_description='Achats de marchandises' where fd_id=1; -update fiche_def set fd_description='Catégorie qui contient la liste des clients' where fd_id=2; -update fiche_def set fd_description='Catégorie qui contient la liste des comptes financiers: banque, caisse,...' where fd_id=3; -update fiche_def set fd_description='Catégorie qui contient la liste des fournisseurs' where fd_id=4; -update fiche_def set fd_label='Services & Biens Divers',fd_description='Catégorie qui contient la liste des charges diverses' where fd_id=5; -update fiche_def set fd_description='Catégorie qui contient la liste des prestations, marchandises... que l''on vend ' where fd_id=6; - -update jrn_def set jrn_deb_max_line=5 where jrn_deb_max_line is null; - -CREATE OR REPLACE FUNCTION comptaproc.periode_exist(p_date text,p_periode_id bigint) - RETURNS integer -AS $function$ - -declare n_p_id int4; -begin - -select p_id into n_p_id - from parm_periode - where - p_start <= to_date(p_date,'DD.MM.YYYY') - and - p_end >= to_date(p_date,'DD.MM.YYYY') - and - p_id <> p_periode_id; - -if NOT FOUND then - return -1; -end if; - -return n_p_id; - -end;$function$ - LANGUAGE plpgsql; - -create or replace function comptaproc.check_periode () returns trigger -as -$$ -declare - nPeriode 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; - -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; -$$ language plpgsql -; - - -create trigger parm_periode_check_periode_trg before update or insert on parm_periode for each row execute procedure check_periode(); -update version set val=107; - -commit; - diff --git a/sources/html/admin/sql/patch/upgrade107.sql b/sources/html/admin/sql/patch/upgrade107.sql deleted file mode 100644 index fa89168..0000000 --- a/sources/html/admin/sql/patch/upgrade107.sql +++ /dev/null @@ -1,303 +0,0 @@ -begin; - --- si la fiche utilise le code DEPENSE PRIVEE alors ajout dans QP_DEP_PRIV -create or replace view m as -select qp_id, qp_price from quant_purchase join fiche_detail on (qp_fiche=f_id and ad_id=5) where ad_value in (select p_value from parm_code where p_code='DEP_PRIV'); - -update quant_purchase as e set qp_dep_priv=(select qp_price from m where m.qp_id=e.qp_id); - -update quant_purchase as e set qp_dep_priv=(select qp_price from m where m.qp_id=e.qp_id); - -update quant_purchase as e set qp_dep_priv=0 where qp_dep_priv is null; --- évite les valeurs nulles dans quant_purchase -update quant_purchase set qp_dep_priv = 0 where qp_dep_priv is null; - -drop view m; - --- update script insert_quant_purchase - - -CREATE OR REPLACE FUNCTION comptaproc.insert_quant_purchase( - p_internal text, - p_j_id numeric, - p_fiche text, - 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 text, - p_tva_sided numeric) - RETURNS void AS -$BODY$ -declare - fid_client integer; - fid_good integer; - account_priv account_type; - fid_good_account account_type; - n_dep_priv numeric; -begin - n_dep_priv := 0; - 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)); - select f_id into fid_good from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_fiche)); - select ad_value into fid_good_account from fiche_detail where ad_id=5 and f_id=fid_good; - if strpos( fid_good_account , account_priv ) = 1 then - n_dep_priv=p_price; - end if; - - insert into quant_purchase - (qp_internal, - j_id, - qp_fiche, - qp_quantite, - qp_price, - qp_vat, - qp_vat_code, - qp_nd_amount, - qp_nd_tva, - qp_nd_tva_recup, - qp_supplier, - qp_dep_priv, - qp_vat_sided) - values - (p_internal, - p_j_id, - fid_good, - p_quant, - p_price, - p_vat, - p_vat_code, - p_nd_amount, - p_nd_tva, - p_nd_tva_recup, - fid_client, - n_dep_priv, - p_tva_sided); - return; -end; - $BODY$ - LANGUAGE plpgsql; - - --- ajout code manquant dans parm_code -create or replace function add_parm_code() returns void as -$fct$ -declare - country_code text; -begin - select pr_value into country_code from parameter where pr_id='MY_COUNTRY'; - if country_code='FR' then - insert into parm_code (p_code,p_comment,p_value) values ('DNA','Dépense non déductible','67'); - insert into parm_code (p_code,p_comment,p_value) values ('TVA_DNA','TVA non déductible',''); - insert into parm_code (p_code,p_comment,p_value) values ('TVA_DED_IMPOT','TVA déductible à l''impôt',''); - insert into parm_code (p_code,p_comment,p_value) values ('COMPTE_COURANT','Poste comptable pour le compte courant',''); - insert into parm_code (p_code,p_comment,p_value) values ('COMPTE_TVA','TVA à payer ou à recevoir',''); - end if; -end; -$fct$ -language plpgsql; - -select add_parm_code(); - -drop function add_parm_code(); - -update parm_code set p_value='67' where p_value='6740' and p_code='DNA'; - - alter table menu_ref add me_description_etendue text; - -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()','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 rapidement'); - -insert into profile_menu (me_code,me_code_dep,p_id,p_order, p_type_display,pm_default) -values -('NAVI',null,1,90,'M',0), ('NAVI',null,2,90,'M',0); - -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()','ME','Ce menu vous présente un menu rapide des menus que vous utilisez le plus souvent'); - -insert into profile_menu (me_code,me_code_dep,p_id,p_order, p_type_display,pm_default) -values -('BOOKMARK',null,1,85,'M',0), ('BOOKMARK',null,2,85,'M',0); - -update menu_ref set me_menu='Impression Journaux' where me_code='PRINTJRN'; -update menu_ref set me_description='Impression des journaux' where me_code='PRINTJRN'; -update menu_ref set me_menu='Liste Suivi' where me_code='FOLLOW'; -update menu_ref set me_description='Document de suivi sous forme de liste' where me_code='FOLLOW'; -update menu_ref set me_javascript='popup_recherche()' where me_code='SEARCH'; -update menu_ref set me_file=null,me_javascript='set_preference()' , me_description_etendue='Préférence de l''utilisateur, apparence de l''application pour l''utilisateur, période par défaut et mot de passe' where me_code='PREFERENCE'; -/* - * Vue montrant toutes les possibilités - */ -CREATE OR REPLACE VIEW v_menu_description 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) - 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 AND (COALESCE(v1.me_file, ''::text) <> ''::text OR COALESCE(v1.me_javascript, ''::text) <> ''::text); - -COMMENT ON VIEW v_menu_description - IS 'Description des menus'; - -CREATE TABLE bookmark -( -b_id serial primary key, -b_order integer default 1, -b_action text, -login text -); -comment on table bookmark is 'Bookmark of the connected user'; - -create table tags ( - t_id serial primary key, - t_tag text not null, - t_description text -); - -create table action_tags -( - at_id serial primary key, - t_id integer references tags(t_id) on delete cascade on update cascade, - ag_id integer references action_gestion(ag_id) on delete cascade on update cascade -); -/* Config tag */ -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 étiquettes. Vous pouvez en ajouter, en supprimer ou les modifier'); - -insert into profile_menu (me_code,me_code_dep,p_id,p_order, p_type_display,pm_default) -values -('CFGTAG','PARAM',1,390,'E',0); - -update fiche_def_ref set frd_text='Trésorerie' where frd_id=4; - -CREATE OR REPLACE FUNCTION comptaproc.insert_quick_code(nf_id integer, tav_text text) - RETURNS integer AS -$BODY$ - 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; - - - insert into fiche_detail(jft_id,f_id,ad_id,ad_value) values (ns,nf_id,23,upper(tText)); - return ns; - end; -$BODY$ - -LANGUAGE plpgsql VOLATILE; - -alter table op_predef add od_description text; -create or replace function comptaproc.opd_limit_description() -returns trigger -as -$BEGIN$ - declare - sDescription text; - begin - sDescription := NEW.od_description; - NEW.od_description := substr(sDescription,1,80); - return NEW; - end; -$BEGIN$ -LANGUAGE plpgsql; - -create trigger opd_limit_description before update or insert on op_predef for each row execute procedure comptaproc.opd_limit_description(); - -update menu_ref set me_menu = 'Trésorerie' where me_code='MENUFIN'; - -create or replace function do_insert() returns void -as -$$ -declare - nCount integer; -begin - select count(*) into nCount from menu_ref where me_file='contact.inc.php'; - if nCount = 0 then - insert into menu_ref(ME_CODE,me_menu,me_file,me_description,me_type) values ('CONTACT','Contact','contact.inc.php','Liste des contacts','ME'); - end if; -end; -$$ -language plpgsql; - -select do_insert(); - -drop function do_insert(); - -update version set val=108; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade108.sql b/sources/html/admin/sql/patch/upgrade108.sql deleted file mode 100644 index e6c0f29..0000000 --- a/sources/html/admin/sql/patch/upgrade108.sql +++ /dev/null @@ -1,265 +0,0 @@ -begin; - - update menu_ref set me_description_etendue='Liste de tous vos contacts' where me_code='CONTACT' ; - update menu_ref set me_description_etendue='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' where me_code='ACH' ; - update menu_ref set me_description_etendue='Historique des imputations analytiques' where me_code='ANCHOP' ; - update menu_ref set me_description_etendue='Balance simple des imputations analytiques' where me_code='ANCBS' ; - update menu_ref set me_description_etendue='Tableau lié à la comptabilité' where me_code='ANCTAB' ; - update menu_ref set me_description_etendue='Lien entre comptabilité et Comptabilité analytique' where me_code='ANCBCC' ; - update menu_ref set me_description_etendue='Balance par groupe' where me_code='ANCGR' ; - update menu_ref set me_description_etendue='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' where me_code='CFGTVA' ; - update menu_ref set me_description_etendue='Encodage de tous vos revenus ou vente' where me_code='VEN' ; - update menu_ref set me_description_etendue='Ajout de menu ou de plugins' where me_code='CFGMENU' ; - update menu_ref set me_description_etendue='Suivi des fournisseurs : devis, lettres, email....' where me_code='SUPPL' ; - update menu_ref set me_description_etendue='Opérations diverses en Analytique' where me_code='ANCODS' ; - update menu_ref set me_description_etendue='Création de rapport sur mesure, comme les ratios, vous permet de créer des graphiques de vos données (vente, achat...)' where me_code='REPORT' ; - update menu_ref set me_description_etendue='Menu regroupant les plugins' where me_code='EXT' ; - update menu_ref set me_description_etendue='Les opérations prédéfinies sont des opérations que vous faites régulièrement (loyer, abonnement,...) ' where me_code='PREDOP' ; - update menu_ref set me_description_etendue='Axe analytique' where me_code='PLANANC' ; - update menu_ref set me_description_etendue='Regroupement de compte analytique' where me_code='ANCGROUP' ; - update menu_ref set me_description_etendue='Opération diverses tels que les amortissements, les augmentations de capital, les salaires, ...' where me_code='ODS' ; - update menu_ref set me_description_etendue='Encodage d''un extrait bancaire (=relevé bancaire)' where me_code='FIN' ; - update menu_ref set me_description_etendue='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' where me_code='JSSEARCH' ; - update menu_ref set me_description_etendue='Suivi client : devis, réunion, courrier, commande...' where me_code='CUST' ; - update menu_ref set me_description_etendue='Vous permet d''ajouter de nouveaux type de documents (bordereau de livraison, devis..)' where me_code='CFGCATDOC' ; - update menu_ref set me_description_etendue='Lettrage par fiche' where me_code='LETCARD' ; - update menu_ref set me_description_etendue='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' where me_code='ACHISTO' ; - update menu_ref set me_description_etendue='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' where me_code='ODHISTO' ; - update menu_ref set me_description_etendue='Impression du détail d''un poste comptable' where me_code='PRINTPOSTE' ; - update menu_ref set me_description_etendue='Impression de rapport personnalisé, il est aussi possible d''exporter en CSV afin de faire des graphiques' where me_code='PRINTREPORT' ; - update menu_ref set me_description_etendue='Impression du grand livre' where me_code='PRINTGL' ; - update menu_ref set me_description_etendue='Impression des balances comptables' where me_code='PRINTBAL' ; - update menu_ref set me_description_etendue='Regroupement pour les menus d''achats(nouvelle opération, historique...)' where me_code='MENUACH' ; - update menu_ref set me_description_etendue='Regroupement pour les menus et les profils' where me_code='MOD' ; - update menu_ref set me_description_etendue='Module paramètres' where me_code='PARAM' ; - update menu_ref set me_description_etendue='Menu impression' where me_code='PRINT' ; - update menu_ref set me_description_etendue='Regroupement des menus des journaux de trésorerie' where me_code='BK' ; - update menu_ref set me_description_etendue='Grand livre pour la comptabilité analytique' where me_code='ANCGL' ; - update menu_ref set me_description_etendue='Module gestion' where me_code='GESTION' ; - update menu_ref set me_description_etendue='Menu Lettrage' where me_code='LET' ; - update menu_ref set me_description_etendue='Choix de votre dossier' where me_code='ACCESS' ; - update menu_ref set me_description_etendue='Module comptabilité' where me_code='COMPTA' ; - update menu_ref set me_description_etendue='Menu de différents paramètres' where me_code='DIVPARM' ; - update menu_ref set me_description_etendue='Déconnexion ' where me_code='LOGOUT' ; - update menu_ref set me_description_etendue='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' where me_code='CFGPRO' ; - update menu_ref set me_description_etendue='Config. poste comptable de base' where me_code='CFGACC' ; - update menu_ref set me_description_etendue='Permet d''avoir la balance de toutes vos fiches, les résumés exportables en CSV, les historiques avec ou sans lettrages' where me_code='CARD' ; - update menu_ref set me_description_etendue='Préférence de l''utilisateur, apparence de l''application pour l''utilisateur, période par défaut et mot de passe' where me_code='PREFERENCE' ; - update menu_ref set me_description_etendue='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' where me_code='CFGTAG' ; - update menu_ref set me_description_etendue='Balance double croisées des imputations analytiques' where me_code='ANCBC2' ; - update menu_ref set me_description_etendue='Information sur votre société : nom, adresse... utilisé lors de la génération de documents' where me_code='COMPANY' ; - update menu_ref set me_description_etendue='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' where me_code='PERIODE' ; - update menu_ref set me_description_etendue='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...' where me_code='VERIFBIL' ; - update menu_ref set me_description_etendue='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' where me_code='OPEN' ; - update menu_ref set me_description_etendue='Chargement de modèles de documents qui seront générés par NOALYSS, les formats utilisables sont libreoffice, html, text et rtf' where me_code='CFGDOC' ; - update menu_ref set me_description_etendue='Création et modification des journaux, préfixe des pièces justificatives, numérotation, catégories de fiches accessibles à ce journal' where me_code='CFGLED' ; - update menu_ref set me_description_etendue='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' where me_code='CFGSEC' ; - update menu_ref set me_description_etendue='Permet d''ajouter de nouveaux attributs que vous pourrez par la suite ajouter à des catégories de fiches' where me_code='CFGATCARD' ; - update menu_ref set me_description_etendue='Etat des stock de l''exercice indiqué' where me_code='STOCK_STATE' ; - update menu_ref set me_description_etendue='Modification des stocks, menu utilisé pour l''inventaire' where me_code='STOCK_INV' ; - update menu_ref set me_description_etendue='Liste des changements manuels des stocks, inventaire, transfert de marchandises entre dépôts...' where me_code='STOCK_INVHISTO' ; - update menu_ref set me_description_etendue='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' where me_code='NAVI' ; - update menu_ref set me_description_etendue='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...' where me_code='SEARCH' ; - update menu_ref set me_description_etendue='Historique de toutes vos opérations un menu de recherche, vous permettra de retrouver rapidement l''opération qui vous intéresse' where me_code='HIST' ; - update menu_ref set me_description_etendue='Permet de faire correspondre vos extraits bancaires avec les opérations de vente ou d''achat, le lettrage se fait automatiquement' where me_code='FREC' ; - update menu_ref set me_description_etendue='Solde des journaux de trésorerie cela concerne les comptes en banques, caisse , les chèques... ' where me_code='FSALDO' ; - update menu_ref set me_description_etendue='lettrage par poste comptable' where me_code='LETACC' ; - update menu_ref set me_description_etendue='Balance par catégorie de fiche ou pour toutes les fiches ayant un poste comptable' where me_code='CARDBAL' ; - update menu_ref set me_description_etendue='Modification de votre plan comptable, parfois il est plus rapide d''utiliser le plugin "Poste Comptable"' where me_code='CFGPCMN' ; - update menu_ref set me_description_etendue='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' where me_code='VEHISTO' ; - update menu_ref set me_description_etendue='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' where me_code='FIHISTO' ; - update menu_ref set me_description_etendue='Impression des rapprochements : opérations non rapprochées ou avec des montants différents' where me_code='PRINTREC' ; - update menu_ref set me_description_etendue='Impression de bilan, ce module est basique, il est plus intéressant d''utiliser le plugin "rapport avancés"' where me_code='PRINTBILAN' ; - update menu_ref set me_description_etendue='Configuration des entrepots de dépôts' where me_code='CFGSTOCK' ; - update menu_ref set me_description_etendue='Permet d''ajouter de nouvelles catégorie de fiche, d''ajouter des attributs à ces catégories (numéro de téléphone, gsm, email...)' where me_code='STOCK' ; - update menu_ref set me_description_etendue='Permet de changer le poste comptable de base des catégories de fiches' where me_code='CFGCARDCAT' ; - update menu_ref set me_description_etendue='Permet d''ajouter de nouvelles catégorie de fiche, d''ajouter des attributs à ces catégories (numéro de téléphone, gsm, email...)' where me_code='CFGCARD' ; - update menu_ref set me_description_etendue='Permet d''ajouter des état pour les documents utilisés dans le suivi (à faire, à suivre...)' where me_code='CFGDOCST' ; - update menu_ref set me_description_etendue='Regroupement pour les menus d''opérations diverses (nouvelle opération, historique...)' where me_code='MENUODS' ; - update menu_ref set me_description_etendue='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' where me_code='PRINTJRN' ; - update menu_ref set me_description_etendue='Regroupement des menus ventes et recettes' where me_code='VENMENU' ; - update menu_ref set me_description_etendue='Impression compta. analytique' where me_code='ANCIMP' ; - update menu_ref set me_description_etendue='Module comptabilité analytique' where me_code='ANC' ; - update menu_ref set me_description_etendue='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...' where me_code='DASHBOARD' ; - update menu_ref set me_description_etendue='Menu regroupant la création de rapport, la vérification de la comptabilité...' where me_code='ADV' ; - update menu_ref set me_description_etendue='Ce menu vous présente un menu rapide de vos menus préférés' where me_code='BOOKMARK' ; - update menu_ref set me_description_etendue='Regroupement pour les menus de trésorerie (nouvelle opération, historique...)' where me_code='MENUFIN' ; - update menu_ref set me_description_etendue='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...' where me_code='FOLLOW' ; - update menu_ref set me_description_etendue='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' where me_code='CFGPAY' ; - update menu_ref set me_description_etendue='Suivi des administrations : courrrier, déclarations.' where me_code='ADM' ; - update menu_ref set me_description_etendue='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.' where me_code='FORECAST' ; - -CREATE OR REPLACE VIEW v_detail_sale AS -with m as - (select sum(qs_price) as htva, sum(qs_vat) as tot_vat,jr_id from quant_sold join jrnx using (j_id) join jrn on (j_grpt=jr_grpt_id) group by jr_id) - SELECT jrn.jr_id, - jrn.jr_date, - 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, - 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 - , htva - ,tot_vat - FROM jrn - JOIN jrnx ON jrn.jr_grpt_id = jrnx.j_grpt - JOIN quant_sold USING (j_id) - JOIN vw_fiche_name a ON quant_sold.qs_fiche = a.f_id - JOIN vw_fiche_attr b ON quant_sold.qs_client = b.f_id - JOIN tva_rate ON quant_sold.qs_vat_code = tva_rate.tva_id - join m on (m.jr_id=jrn.jr_id) - ; - -CREATE OR REPLACE VIEW v_detail_purchase AS - WITH m AS ( - SELECT sum(quant_purchase.qp_price) AS htva, sum(quant_purchase.qp_vat) AS tot_vat, 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_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 - , 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 - FROM jrn - JOIN jrnx ON jrn.jr_grpt_id = jrnx.j_grpt - JOIN quant_purchase USING (j_id) - JOIN vw_fiche_name a ON quant_purchase.qp_fiche = a.f_id - JOIN vw_fiche_attr b ON quant_purchase.qp_supplier = b.f_id - JOIN tva_rate ON quant_purchase.qp_vat_code = tva_rate.tva_id - JOIN m ON m.jr_id = jrn.jr_id; - - create or replace view v_quant_detail as -with quant as - (select - j_id, - qp_fiche as fiche_id, - qp_supplier as tiers, - qp_vat as vat_amount, - qp_price as price, - qp_vat_code as vat_code, - qp_dep_priv as dep_priv, - qp_nd_tva as nd_tva, - qp_nd_tva_recup as nd_tva_recup, - qp_nd_amount as nd_amount, - qp_vat_sided as vat_sided - from quant_purchase - union all - select - j_id, - qs_fiche, - qs_client, - qs_vat, - qs_price, - qs_vat_code, - 0, - 0, - 0, - 0, - qs_vat_sided - from - quant_sold -) -select - jr_id,quant.tiers,jrn_def_name,jrn_def_type,name,jr_comment,jr_montant,sum(price) as price,vat_code,sum(vat_amount) as vat_amount,sum(dep_priv) as dep_priv,sum(nd_tva) as nd_tva,sum(nd_tva_recup) as nd_tva_recup,sum(nd_amount) as nd_amount,vat_sided,tva_label -from -jrn -join jrnx on (jrnx.j_grpt=jrn.jr_grpt_id) -join quant using (j_id) -left join vw_fiche_name on (tiers=vw_fiche_name.f_id) -join jrn_def on (jrn_def_id=jr_def_id) -join tva_rate on (tva_id=vat_code) -group by -jr_id,quant.tiers,jr_comment,jr_montant,vat_code,vat_sided,name,jrn_def_name,jrn_def_type,tva_label; - - -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 profile_menu (me_code,me_code_dep,p_id,p_order, p_type_display,pm_default) -values -('CSV:Reconciliation',null,1,0,'P',0), ('CSV:Reconciliation',null,2,null,'P',0); - -alter table stock_change alter tech_date type time; - -alter table jrn add column jr_date_paid date; - -create or replace function set_paiement_date() returns void - as - $body$ - declare - row_jrn jrn%ROWTYPE; - cursor_jrn cursor for select * from jrn where substr(jr_internal,1,1) in ('A','V') and jr_date_paid is null; - n_rec jrn_rapt.jr_id%TYPE; - nCount integer; - jrn_date jrn.jr_date%TYPE; - begin - for row_jrn in cursor_jrn - loop - select count(*) into nCount from jrn_rapt where jr_id=row_jrn.jr_id or jra_concerned=row_jrn.jr_id; - if nCount = 1 then - select jr_id into n_rec from jrn_rapt where jra_concerned=row_jrn.jr_id; - if NOT FOUND then - select jra_concerned into n_rec from jrn_rapt where jr_id=row_jrn.jr_id; - end if; - select jr_date into jrn_date from jrn where jr_id=n_rec; - update jrn set jr_date_paid = jrn_date where current of cursor_jrn; - end if; - - end loop; - -end; -$body$ -language plpgsql; - -select set_paiement_date(); - -drop function set_paiement_date(); - -update version set val=109; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade109.sql b/sources/html/admin/sql/patch/upgrade109.sql deleted file mode 100644 index e11b927..0000000 --- a/sources/html/admin/sql/patch/upgrade109.sql +++ /dev/null @@ -1,32 +0,0 @@ -begin; - -alter table jrn_def add jrn_def_description text; - -CREATE OR REPLACE FUNCTION comptaproc.t_jrn_def_description() - RETURNS trigger -AS $function$ - declare - str varchar(200); - BEGIN - str := substr(NEW.jrn_def_description,1,200); - NEW.jrn_def_description := str; - - RETURN NEW; - END; -$function$ - LANGUAGE plpgsql -; -create trigger jrn_def_description_ins_upd before insert or update on jrn_def for each row execute procedure comptaproc.t_jrn_def_description(); - -update jrn_def set jrn_def_description='Concerne tous les achats, factures reçues, notes de crédit reçues et notes de frais' where jrn_def_id=3; -update jrn_def set jrn_def_description='Concerne tous les mouvements financiers (comptes en banque, caisses, visa...)' where jrn_def_id=1; -update jrn_def set jrn_def_description='Concerne toutes les opérations comme les amortissements, les comptes TVA, ...' where jrn_def_id=4; -update jrn_def set jrn_def_description='Concerne toutes les ventes, notes de crédit envoyées' where jrn_def_id=2; - -alter table document add d_description text; - -update document set d_description = d_filename; - -update version set val=110; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade11.sql b/sources/html/admin/sql/patch/upgrade11.sql deleted file mode 100644 index ce2e89b..0000000 --- a/sources/html/admin/sql/patch/upgrade11.sql +++ /dev/null @@ -1,126 +0,0 @@ -begin; - -create table parm_code ( - p_code text primary key, - p_value text, - p_comment text -); - -INSERT INTO parm_code VALUES ('DNA', '6740', 'Dépense non déductible'); -INSERT INTO parm_code VALUES ('CUSTOMER', '400', 'Poste comptable de base pour les clients'); -INSERT INTO parm_code VALUES ('COMPTE_TVA', '451', 'TVA à payer'); -INSERT INTO parm_code VALUES ('BANQUE', '550', 'Poste comptable de base pour les banques'); -INSERT INTO parm_code VALUES ('VIREMENT_INTERNE', '58', 'Poste Comptable pour les virements internes'); -INSERT INTO parm_code VALUES ('COMPTE_COURANT', '56', 'Poste comptable pour le compte courant'); -INSERT INTO parm_code VALUES ('CAISSE', '57', 'Poste comptable pour la caisse'); -INSERT INTO parm_code VALUES ('TVA_DNA', '6740', 'Tva non déductible s'); -INSERT INTO parm_code VALUES ('TVA_DED_IMPOT', '619000', 'Tva déductible par l''impôt'); -INSERT INTO parm_code VALUES ('VENTE ', '70', 'Poste comptable de base pour les ventes'); - --- Function: tva_delete(p_tva_id int4) - -CREATE OR REPLACE FUNCTION tva_delete(int4) - RETURNS void AS -$BODY$ -declare - p_tva_id alias for $1; - nCount integer; -begin - nCount=0; - select count(*) into nCount from quant_sold where qs_vat_code=p_tva_id; - if nCount = 0 then - delete from tva_rate where tva_id=p_tva_id; - end if; - return; -end; -$BODY$ -LANGUAGE plpgsql VOLATILE; - --- Function: tva_insert(int4, text, numeric, text, text) - -CREATE OR REPLACE FUNCTION tva_insert(int4, text, "numeric", text, text) - RETURNS int4 AS -$BODY$ -declare -p_tva_id alias for $1; -p_tva_label alias for $2; -p_tva_rate alias for $3; -p_tva_comment alias for $4; -p_tva_poste alias for $5; -debit text; -credit text; -nCount integer; -begin --- verify that label is not null -if length(trim(p_tva_label)) = 0 then - return 3; -end if; -select count(*) into nCount from tva_rate - where tva_id=p_tva_id; -if nCount != 0 then - return 5; -end if; --- check is poste exists -if length(trim(p_tva_poste)) != 0 then --- check if it is a comma list - if position (',' in p_tva_poste) = 0 then return 4; end if; --- separate "credit" and "debit" - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); --- check if those account exist - select count(*) into nCount from tmp_pcmn where pcm_val=debit; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit; - if nCount = 0 then return 4; end if; - -end if; -insert into tva_rate(tva_id,tva_label,tva_rate,tva_comment,tva_poste) - values (p_tva_id,p_tva_label,p_tva_rate,p_tva_comment,p_tva_poste); -return 0; -end; -$BODY$ -LANGUAGE plpgsql VOLATILE; - --- Function: tva_insert(p_tva_id text, p_tva_label text, p_tva_rate text, p_tva_comment text, p_tva_poste text) - -CREATE OR REPLACE FUNCTION tva_modify(integer, text, numeric, text, text) - RETURNS int4 AS -$BODY$declare -p_tva_id alias for $1; -p_tva_label alias for $2; -p_tva_rate alias for $3; -p_tva_comment alias for $4; -p_tva_poste alias for $5; -debit text; -credit text; -nCount integer; -begin --- verify that label is not null -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - --- check is poste exists -if length(trim(p_tva_poste)) != 0 then --- check if it is a comma list - if position (',' in p_tva_poste) = 0 then return 4; end if; --- separate "credit" and "debit" - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); --- check if those account exist - select count(*) into nCount from tmp_pcmn where pcm_val=debit; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit; - if nCount = 0 then return 4; end if; - -end if; -update tva_rate set tva_label=p_tva_label,tva_rate=p_tva_rate,tva_comment=p_tva_comment,tva_poste=p_tva_poste - where tva_id=p_tva_id; -return 0; -end; -$BODY$ -LANGUAGE plpgsql VOLATILE; - - -update version set val=12; -commit; diff --git a/sources/html/admin/sql/patch/upgrade110.sql b/sources/html/admin/sql/patch/upgrade110.sql deleted file mode 100644 index 251671d..0000000 --- a/sources/html/admin/sql/patch/upgrade110.sql +++ /dev/null @@ -1,26 +0,0 @@ -begin; -create or replace 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) - 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; -update version set val=111; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade111.sql b/sources/html/admin/sql/patch/upgrade111.sql deleted file mode 100644 index f7614e8..0000000 --- a/sources/html/admin/sql/patch/upgrade111.sql +++ /dev/null @@ -1,38 +0,0 @@ -begin; - -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 profile_menu (me_code,me_code_dep,p_id,p_order, p_type_display,pm_default) -values -('MANAGER','GESTION',1,25,'E',0), ('MANAGER','GESTION',2,25,'E',0); - -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 profile_menu (me_code,me_code_dep,p_id,p_order, p_type_display,pm_default) -values -('CFGDEFMENU','MOD',1,30,'E',0); - -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 profile_menu (me_code,me_code_dep,p_id,p_order, p_type_display,pm_default) -values -('AGENDA','NULL',1,410,'M',0),('AGENDA','NULL',2,410,'M',0); - -create table menu_default -( - md_id serial primary key, - md_code text not null unique , - me_code text not null -); -insert into menu_default (md_code,me_code) values ('code_invoice','COMPTA/VENMENU/VEN'),('code_follow','GESTION/FOLLOW'); -update menu_ref set me_file='customer.inc.php' where me_code ='CUST'; - -update version set val=112; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade112.sql b/sources/html/admin/sql/patch/upgrade112.sql deleted file mode 100644 index 786ee72..0000000 --- a/sources/html/admin/sql/patch/upgrade112.sql +++ /dev/null @@ -1,15 +0,0 @@ -begin; - -ALTER TABLE operation_analytique ADD COLUMN oa_jrnx_id_source bigint; -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.'; - -ALTER TABLE operation_analytique ADD COLUMN oa_signed character(1); -ALTER TABLE operation_analytique ALTER COLUMN oa_signed SET DEFAULT 'Y'::bpchar; -update operation_analytique set oa_signed='Y'; -ALTER TABLE operation_analytique ALTER COLUMN oa_signed SET NOT NULL; - -COMMENT ON COLUMN operation_analytique.oa_signed IS 'Sign of the amount'; - -update version set val=113; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade113.sql b/sources/html/admin/sql/patch/upgrade113.sql deleted file mode 100644 index 39e445f..0000000 --- a/sources/html/admin/sql/patch/upgrade113.sql +++ /dev/null @@ -1,7 +0,0 @@ -begin; - -alter table operation_analytique rename oa_signed to oa_positive; - -update version set val=114; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade114.sql b/sources/html/admin/sql/patch/upgrade114.sql deleted file mode 100644 index e17e03a..0000000 --- a/sources/html/admin/sql/patch/upgrade114.sql +++ /dev/null @@ -1,51 +0,0 @@ -begin; - -DROP VIEW v_detail_purchase; - -CREATE OR REPLACE VIEW v_detail_purchase AS - WITH m AS ( - SELECT sum(quant_purchase.qp_price) AS htva, sum(quant_purchase.qp_vat) AS tot_vat, 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,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, 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 - FROM jrn - JOIN jrnx ON jrn.jr_grpt_id = jrnx.j_grpt - JOIN quant_purchase USING (j_id) - JOIN vw_fiche_name a ON quant_purchase.qp_fiche = a.f_id - JOIN vw_fiche_attr b ON quant_purchase.qp_supplier = b.f_id - JOIN tva_rate ON quant_purchase.qp_vat_code = tva_rate.tva_id - JOIN m ON m.jr_id = jrn.jr_id; - -DROP VIEW v_detail_sale; - -CREATE OR REPLACE VIEW v_detail_sale AS - WITH m AS ( - SELECT sum(quant_sold.qs_price) AS htva, sum(quant_sold.qs_vat) AS tot_vat, 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,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, 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 - FROM jrn - JOIN jrnx ON jrn.jr_grpt_id = jrnx.j_grpt - JOIN quant_sold USING (j_id) - JOIN vw_fiche_name a ON quant_sold.qs_fiche = a.f_id - JOIN vw_fiche_attr b ON quant_sold.qs_client = b.f_id - JOIN tva_rate ON quant_sold.qs_vat_code = tva_rate.tva_id - join m on m.jr_id=jrn.jr_id; - -update version set val=115; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade115.sql b/sources/html/admin/sql/patch/upgrade115.sql deleted file mode 100644 index f458f13..0000000 --- a/sources/html/admin/sql/patch/upgrade115.sql +++ /dev/null @@ -1,9 +0,0 @@ -begin; - -INSERT INTO menu_ref(me_code, me_menu, me_file, me_type)VALUES ('PDF:AncReceipt', 'Export pièce PDF', 'export_anc_receipt_pdf.php','PR'); - -insert into profile_menu(me_code,p_id,p_type_display,pm_default) values ('PDF:AncReceipt',1,'P',0); - -update version set val=116; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade116.sql b/sources/html/admin/sql/patch/upgrade116.sql deleted file mode 100644 index 4d3f98c..0000000 --- a/sources/html/admin/sql/patch/upgrade116.sql +++ /dev/null @@ -1,225 +0,0 @@ -begin; - -insert into fiche_def_ref(frd_id,frd_text) values (26,'Projet'); -insert into attr_min (frd_id,ad_id) values (26,1),(26,9); -CREATE OR REPLACE FUNCTION public.upgrade_repo(p_version integer) - RETURNS void -AS $function$ -declare - is_mono integer; -begin - select count (*) into is_mono from information_schema.tables where table_name='repo_version'; - if is_mono = 1 then - update repo_version set val=p_version; - else - update version set val=p_version; - end if; -end; -$function$ - language plpgsql; - --- bug -alter table action_gestion alter ag_title type text; - -INSERT INTO menu_ref(me_code, me_menu, me_file, me_type,me_description_etendue)VALUES ('ANCKEY', 'Clef de répartition', 'anc_key.inc.php','ME','Permet de gèrer les clefs de répartition en comptabilité analytique'); - -insert into profile_menu(me_code,p_id,p_type_display,pm_default,me_code_dep,p_order) values ('ANCKEY',1,'E',0,'ANC',15); -insert into profile_menu(me_code,p_id,p_type_display,pm_default,me_code_dep,p_order) values ('ANCKEY',2,'E',0,'ANC',15); - -INSERT INTO menu_ref(me_code, me_menu, me_file, me_type,me_description_etendue)VALUES ('CFGPLUGIN', 'Configuration extension', 'cfgplugin.inc.php','ME','Permet d''installer et d''activer facilement des extensions'); - -insert into profile_menu(me_code,p_id,p_type_display,pm_default,me_code_dep,p_order) values ('CFGPLUGIN',1,'E',0,'PARAM',15); -insert into profile_menu(me_code,p_id,p_type_display,pm_default,me_code_dep,p_order) values ('CFGPLUGIN',2,'E',0,'PARAM',15); - -create table key_distribution ( - kd_id serial primary key, - kd_name text, - kd_description text); - -create table key_distribution_ledger ( - kl_id serial primary key, - kd_id bigint not null references key_distribution(kd_id) on update cascade on delete cascade, - jrn_def_id bigint not null references jrn_def(jrn_def_id) on update cascade on delete cascade - ); - -create table key_distribution_detail( - ke_id serial primary key, - kd_id bigint not null references key_distribution(kd_id) on update cascade on delete cascade, - ke_row integer not null, - ke_percent numeric(20,4) not null - - ); - -create table key_distribution_activity -( - ka_id serial primary key, - ke_id bigint not null references key_distribution_detail(ke_id) on update cascade on delete cascade, - po_id bigint references poste_analytique(po_id) on update cascade on delete cascade, - pa_id bigint not null references plan_analytique(pa_id) on update cascade on delete cascade -); - -comment on table key_distribution is 'Distribution key for analytic'; -comment on table key_distribution_activity is 'activity (account) linked to the row'; -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_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 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_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'; - -drop view vw_fiche_attr cascade; - -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) - WHERE fiche_detail.ad_id = 1) a - LEFT JOIN ( SELECT fiche_detail.f_id, fiche_detail.ad_value - FROM 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 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 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 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 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 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 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 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 fiche_detail - WHERE fiche_detail.ad_id = 32) k ON a.f_id = k.f_id - LEFT JOIN tva_rate ON d.ad_value = tva_rate.tva_id::text - JOIN fiche_def USING (fd_id) -LEFT JOIN ( SELECT fiche_detail.f_id, fiche_detail.ad_value - FROM fiche_detail - WHERE fiche_detail.ad_id = 5) l ON a.f_id = l.f_id; - - -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, 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 - FROM jrn - JOIN jrnx ON jrn.jr_grpt_id = jrnx.j_grpt - JOIN quant_sold USING (j_id) - JOIN vw_fiche_name a ON quant_sold.qs_fiche = a.f_id - JOIN vw_fiche_attr b ON quant_sold.qs_client = b.f_id - JOIN tva_rate ON quant_sold.qs_vat_code = tva_rate.tva_id - JOIN m ON m.jr_id = jrn.jr_id; - - -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, 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 - FROM jrn - JOIN jrnx ON jrn.jr_grpt_id = jrnx.j_grpt - JOIN quant_purchase USING (j_id) - JOIN vw_fiche_name a ON quant_purchase.qp_fiche = a.f_id - JOIN vw_fiche_attr b ON quant_purchase.qp_supplier = b.f_id - JOIN tva_rate ON quant_purchase.qp_vat_code = tva_rate.tva_id - JOIN m ON m.jr_id = jrn.jr_id; - -create index jrnx_j_qcode_ix on jrnx (j_qcode); - -CREATE TABLE action_person -( - ap_id SERIAL NOT NULL, - ag_id int4 NOT NULL references action_gestion(ag_id) on update cascade on delete cascade, - f_id int4 not null references fiche(f_id) on update cascade on delete cascade, - PRIMARY KEY (ap_id)); - -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 action_action'; -comment on column action_person.ag_id is 'fk to fiche'; - -ALTER TABLE action_person ADD CONSTRAINT action_gestion_ag_id_fk2 FOREIGN KEY (ag_id) REFERENCES action_gestion (ag_id); -ALTER TABLE action_person ADD CONSTRAINT fiche_f_id_fk2 FOREIGN KEY (f_id) REFERENCES fiche(f_id); - -alter table action_gestion alter f_id_dest drop not null; -update action_gestion set f_id_dest = null where f_id_dest = 0; -update action_gestion set f_id_dest =null where f_id_dest not in (select f_id from fiche); - -ALTER TABLE action_gestion ADD CONSTRAINT fiche_f_id_fk3 FOREIGN KEY (f_id_dest) REFERENCES fiche(f_id); -create index fk_action_person_action_gestion on action_person (ag_id); -create index fk_action_person_fiche on action_person (f_id); - - -CREATE OR REPLACE FUNCTION comptaproc.category_card_before_delete() - RETURNS trigger AS -$BODY$ - -begin - if OLD.fd_id > 499000 then - return null; - end if; - return OLD; - -end; -$BODY$ -language plpgsql; - -CREATE TRIGGER trg_category_card_before_delete - BEFORE delete - ON fiche_def - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.category_card_before_delete(); - -alter table action_gestion add constraint fk_action_gestion_document_type foreign key (ag_type) references document_type(dt_id); - - -update version set val=117; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade117.sql b/sources/html/admin/sql/patch/upgrade117.sql deleted file mode 100644 index dc43576..0000000 --- a/sources/html/admin/sql/patch/upgrade117.sql +++ /dev/null @@ -1,184 +0,0 @@ -begin; - -ALTER TABLE action ALTER COLUMN ac_code TYPE character varying(30); - -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'); - - -CREATE TABLE todo_list_shared (id serial primary key, todo_list_id int4 NOT NULL, use_login text NOT NULL, CONSTRAINT unique_todo_list_id_login - UNIQUE (todo_list_id, use_login)); - -ALTER TABLE todo_list_shared ADD CONSTRAINT fk_todo_list_shared_todo_list FOREIGN KEY (todo_list_id) REFERENCES todo_list (tl_id); - -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'; - -alter table todo_list add is_public char(1) default 'N'; -comment on column todo_list.is_public is 'Flag for the public parameter'; -ALTER TABLE todo_list ALTER COLUMN is_public SET NOT NULL; - -ALTER TABLE todo_list ADD CONSTRAINT ck_is_public CHECK (is_public in ('Y','N')); - -update menu_ref set me_menu = 'Favori ★ ' where me_code='BOOKMARK'; -update menu_ref set me_menu = 'Sortie ⎆' where me_code='LOGOUT'; - -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') , -('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 profile_menu (me_code,me_code_dep,p_id,p_order, p_type_display,pm_default) -values -('BALAGE','PRINT',1,550,'E',0),('BALAGE','PRINT',2,550,'E',0), -('CSV:balance_age',null,1,null,'P',0),('CSV:balance_age',null,2,null,'P',0); - -CREATE OR REPLACE FUNCTION comptaproc.account_compute(p_f_id integer) - RETURNS account_type AS -$BODY$ -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; -end; -$BODY$ -LANGUAGE plpgsql ; - -CREATE OR REPLACE FUNCTION comptaproc.account_insert(p_f_id integer, p_account text) - RETURNS text AS -$BODY$ -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 - - 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); - - 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; - -return 0; -end; -$BODY$ LANGUAGE plpgsql ; - - -update version set val=118; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade118.sql b/sources/html/admin/sql/patch/upgrade118.sql deleted file mode 100644 index 23a03dd..0000000 --- a/sources/html/admin/sql/patch/upgrade118.sql +++ /dev/null @@ -1,167 +0,0 @@ -begin; - - -alter table profile_menu add pm_id_dep bigint ; -comment on column profile_menu.pm_id_dep is 'parent of this menu item'; - - -CREATE OR REPLACE 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('/'::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 OR REPLACE FUNCTION modify_menu_system(n_profile numeric) - RETURNS void AS -$BODY$ -declare -r_duplicate profile_menu%ROWTYPE; -str_duplicate text; -n_lowest_id numeric; -- lowest pm_id : update the dependency in profile_menu -n_highest_id numeric; -- highest pm_id insert into profile_menu - -begin - -for str_duplicate in - select me_code - from profile_menu - where - p_id=n_profile and - p_type_display <> 'P' and - pm_id_dep is null - group by me_code - having count(*) > 1 -loop - raise info 'str_duplicate %',str_duplicate; - for r_duplicate in select * - from profile_menu - where - p_id=n_profile and - me_code_dep=str_duplicate - loop - raise info 'r_duplicate %',r_duplicate; - -- get the lowest - select a.pm_id into n_lowest_id from profile_menu a join profile_menu b on (a.me_code=b.me_code and a.p_id = b.p_id) - where - a.me_code=str_duplicate - and a.p_id=n_profile - and a.pm_id < b.pm_id; - raise info 'lowest is %',n_lowest_id; - -- get the highest - select a.pm_id into n_highest_id from profile_menu a join profile_menu b on (a.me_code=b.me_code and a.p_id = b.p_id) - where - a.me_code=str_duplicate - and a.p_id=n_profile - and a.pm_id > b.pm_id; - raise info 'highest is %',n_highest_id; - - -- update the first one - update profile_menu set pm_id_dep = n_lowest_id where pm_id=r_duplicate.pm_id; - -- insert a new one - insert into profile_menu (me_code, - me_code_dep, - p_id, - p_order, - p_type_display, - pm_default, - pm_id_dep) - values (r_duplicate.me_code, - r_duplicate.me_code_dep, - r_duplicate.p_id, - r_duplicate.p_order, - r_duplicate.p_type_display, - r_duplicate.pm_default, - n_highest_id); - - end loop; - -end loop; -end; -$BODY$ -language plpgsql; - -select modify_menu_system(1); -select modify_menu_system(2); - -update profile_menu set pm_id_dep=(select higher_dep from v_menu_dependency as a where - a.pm_id= profile_menu.pm_id) where pm_id_dep is null and p_id=1; - -update profile_menu set pm_id_dep=(select higher_dep from v_menu_dependency as a where - a.pm_id= profile_menu.pm_id) where pm_id_dep is null and p_id=2; -CREATE OR REPLACE 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 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 v_menu_profile IS 'Give the profile and the menu + dependencies'; - -CREATE OR REPLACE 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 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 v_menu_description IS 'Description des menus'; - - -update version set val=119; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade119.sql b/sources/html/admin/sql/patch/upgrade119.sql deleted file mode 100644 index 07476ba..0000000 --- a/sources/html/admin/sql/patch/upgrade119.sql +++ /dev/null @@ -1,5 +0,0 @@ -begin; -update menu_ref set me_file = null where me_code='EXT'; -update version set val=120; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade12.sql b/sources/html/admin/sql/patch/upgrade12.sql deleted file mode 100644 index b1193b9..0000000 --- a/sources/html/admin/sql/patch/upgrade12.sql +++ /dev/null @@ -1,11 +0,0 @@ -begin; - -ALTER TABLE quant_sold ADD CONSTRAINT qs_id_pk PRIMARY KEY(qs_id); -COMMENT ON TABLE quant_sold IS 'Contains about invoice for customer'; -drop table user_pref; --- trim the space -update parm_code set p_code=trim(p_code); - -update version set val=13; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade120.sql b/sources/html/admin/sql/patch/upgrade120.sql deleted file mode 100644 index 1eb7daf..0000000 --- a/sources/html/admin/sql/patch/upgrade120.sql +++ /dev/null @@ -1,280 +0,0 @@ -begin; -update menu_ref set me_file = null where me_code='EXT'; -update op_predef_detail set opd_poste=trim(opd_poste) ; - -CREATE OR REPLACE FUNCTION comptaproc.fiche_detail_qcode_upd() - RETURNS trigger AS -$BODY$ -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; - - end loop; - end if; -return NEW; -end; -$BODY$ -LANGUAGE plpgsql; - -CREATE OR REPLACE FUNCTION comptaproc.update_quick_code(njft_id integer, tav_text text) - RETURNS integer AS -$BODY$ - declare - ns integer; - nExist integer; - tText 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; - - loop - -- 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; - if tText = 'FID'||ns then - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - end if; - tText :='FID'||ns; - - end loop; - update fiche_detail set ad_value = tText where 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); - - - return ns; - end; -$BODY$ - LANGUAGE plpgsql ; - - -CREATE OR REPLACE FUNCTION comptaproc.insert_quick_code(nf_id integer, tav_text text) - RETURNS integer AS -$BODY$ - declare - ns integer; - nExist integer; - tText text; - tBase text; - tName text; - nCount Integer; - nDuplicate Integer; - begin - tText := lower(trim(tav_text)); - tText := replace(tText,' ',''); - tName:= translate(tName,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; - - - insert into fiche_detail(jft_id,f_id,ad_id,ad_value) values (ns,nf_id,23,upper(tText)); - return ns; - end; -$BODY$ -LANGUAGE plpgsql; - -create or replace function insert_menu() -returns void as -$BODY$ -declare - n_count integer := 0; -begin - select count(*) into n_count from menu_ref where me_code='CONTACT'; - if n_count = 0 then - insert into menu_ref(me_code, - me_file, - me_menu, - me_description,me_type,me_description_etendue) - values - ('CONTACT', - 'contact.inc.php', - 'Contact','Liste de vos contacts','ME','Liste de vos contacts normalement liée à des fiches de sociétés'); - end if; - - select count(*) into n_count from profile_menu where me_code='CONTACT' and p_id=1; - if n_count = 0 then - insert into profile_menu(me_code,me_code_dep,p_id,p_order,p_type_display,pm_default,pm_id_dep) select 'CONTACT','GESTION',1,22,'E',0,(select pm_id from profile_menu where me_code='GESTION' and p_id=1); - end if; - - select count(*) into n_count from profile_menu where me_code='CONTACT' and p_id=2; - if n_count = 0 then - insert into profile_menu(me_code,me_code_dep,p_id,p_order,p_type_display,pm_default,pm_id_dep) select 'CONTACT','GESTION',2,22,'E',0,(select pm_id from profile_menu where me_code='GESTION' and p_id=2); - end if; -end; -$BODY$ -LANGUAGE plpgsql; - -select insert_menu(); - -drop function insert_menu(); -drop view v_all_menu; - -CREATE OR REPLACE 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; - -DROP FUNCTION comptaproc.get_profile_menu(text); - -CREATE OR REPLACE FUNCTION comptaproc.get_profile_menu(p_profile integer) - RETURNS SETOF menu_tree AS -$BODY$ -declare - a menu_tree; - e menu_tree; -begin -for a in select me_code,me_description from v_all_menu where p_id=p_profile - and me_code_dep is null and me_type <> 'PR' and me_type <>'SP' -loop - return next a; - - for e in select * from get_menu_tree(a.code,p_profile) - loop - return next e; - end loop; - - end loop; -return; -end; -$BODY$ - LANGUAGE plpgsql ; - -DROP FUNCTION comptaproc.get_menu_tree(text, text); - -CREATE OR REPLACE FUNCTION comptaproc.get_menu_tree(p_code text, p_profile integer) - RETURNS SETOF menu_tree AS -$BODY$ -declare - i menu_tree; - e menu_tree; - a text; - x v_all_menu%ROWTYPE; -begin - for x in select * from v_all_menu where me_code_dep=p_code::text and p_id=p_profile - loop - if x.me_code_dep is not null then - i.code := x.me_code_dep||'/'||x.me_code; - else - i.code := x.me_code; - end if; - - i.description := x.me_description; - - return next i; - - for e in select * from get_menu_tree(x.me_code,p_profile) - loop - e.code:=x.me_code_dep||'/'||e.code; - return next e; - end loop; - - end loop; - return; -end; -$BODY$ -LANGUAGE plpgsql; - -update version set val=121; - -commit; - diff --git a/sources/html/admin/sql/patch/upgrade13.sql b/sources/html/admin/sql/patch/upgrade13.sql deleted file mode 100644 index 9a3343d..0000000 --- a/sources/html/admin/sql/patch/upgrade13.sql +++ /dev/null @@ -1,566 +0,0 @@ -begin; --- dropped all the views --- Name: vw_client; Type: VIEW; Schema: public; Owner: phpcompta -DROP VIEW vw_client ; --- Name: vw_fiche_attr; Type: VIEW; Schema: public; Owner: phpcompta -DROP VIEW vw_fiche_attr ; --- Name: vw_fiche_def; Type: VIEW; Schema: public; Owner: phpcompta -DROP VIEW vw_fiche_def ; --- Name: vw_fiche_min; Type: VIEW; Schema: public; Owner: phpcompta -DROP VIEW vw_fiche_min ; --- Name: vw_poste_qcode; Type: VIEW; Schema: public; Owner: phpcompta -DROP VIEW vw_poste_qcode; - --- Stan's problem : account were not large enough --- Converted to numeric to avoid integer limit -create domain poste_comptable as numeric(25); -alter table tmp_pcmn alter pcm_val type poste_comptable; -alter table tmp_pcmn alter pcm_val_parent type poste_comptable; -alter table jrnx alter j_poste TYPE poste_comptable ; -alter table centralized alter c_poste TYPE poste_comptable ; -alter table fiche_def alter fd_class_base TYPE poste_comptable ; - --- recreate all the views -CREATE VIEW vw_client AS -SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email FROM (((((((((SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 1)) a JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 13)) b USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 23)) a1 USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 5)) c USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 14)) d USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 15)) e USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 16)) f USING (f_id)) JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 17)) g USING (f_id)) LEFT JOIN (SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text FROM ((((fiche JOIN fiche_def USING (fd_id)) JOIN fiche_def_ref USING (frd_id)) JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 18)) h USING (f_id)) WHERE (a.frd_id = 9); -CREATE VIEW vw_fiche_attr AS -SELECT a.f_id, a.fd_id, a.av_text AS vw_name, b.av_text AS vw_sell, c.av_text AS vw_buy, d.av_text AS tva_code, tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label, e.av_text AS vw_addr, f.av_text AS vw_cp, j.av_text AS quick_code, fiche_def.frd_id FROM (((((((((SELECT fiche.f_id, fiche.fd_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 1)) a LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 6)) b ON ((a.f_id = b.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 7)) c ON ((a.f_id = c.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 2)) d ON ((a.f_id = d.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 14)) e ON ((a.f_id = e.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 15)) f ON ((a.f_id = f.f_id))) LEFT JOIN (SELECT fiche.f_id, attr_value.av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (jnt_fic_att_value.ad_id = 23)) j ON ((a.f_id = j.f_id))) LEFT JOIN tva_rate ON ((d.av_text = (tva_rate.tva_id)::text))) JOIN fiche_def USING (fd_id)); -CREATE VIEW vw_fiche_def AS -SELECT jnt_fic_attr.fd_id, jnt_fic_attr.ad_id, attr_def.ad_text, attr_value.av_text, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def.frd_id FROM (((((jnt_fic_att_value JOIN attr_value USING (jft_id)) JOIN fiche USING (f_id)) JOIN jnt_fic_attr USING (fd_id)) JOIN attr_def ON ((attr_def.ad_id = jnt_fic_attr.ad_id))) JOIN fiche_def USING (fd_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 a.f_id, a.av_text AS j_poste, b.av_text AS j_qcode FROM ((SELECT jnt_fic_att_value.f_id, attr_value.av_text FROM (attr_value JOIN jnt_fic_att_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 5)) a JOIN (SELECT jnt_fic_att_value.f_id, attr_value.av_text FROM (attr_value JOIN jnt_fic_att_value USING (jft_id)) WHERE (jnt_fic_att_value.ad_id = 23)) b USING (f_id)); - --- comment -COMMENT ON VIEW vw_fiche_def IS 'all the attributs for card family'; --- Name: VIEW vw_fiche_min; Type: COMMENT; Schema: public; Owner: phpcompta -COMMENT ON VIEW vw_fiche_min IS 'minimum attribut for reference card'; - -create or replace function account_auto (p_fd_id fiche_def.fd_id%type) -returns bool -as -$$ --- account_auto --- param fd_id --- return true if the card generate automatically an account -declare - l_auto bool; -begin - - select fd_create_account into l_auto from fiche_def where fd_id=p_fd_id; - if l_auto is null then - l_auto:=false; - end if; - return l_auto; -end; -$$ language plpgsql; - -create or replace function account_compute(p_f_id fiche.f_id%type) -returns poste_comptable -as -$body$ --- account_compute --- param f_id --- compute the next account --- return new account -declare - class_base poste_comptable; - maxcode int8; -begin - -- Get the class base - select fd_class_base into class_base - from - fiche_def join fiche using (fd_id) - where - f_id=p_f_id; - raise notice 'class base %',class_base; - select max(pcm_val) into maxcode from tmp_pcmn where pcm_val = class_base; - if maxcode = class_base then - maxcode=class_base*1000+1; - end if; - raise notice 'Max code %',maxcode; -return maxcode+1; -end; -$body$ language plpgsql; - - - -create or replace function attribut_insert ( p_f_id integer, p_ad_id integer, p_value varchar) -returns void -as -$$ --- attribut_integer --- parameter : f_id, ad_id, p_value --- purpose add an attribute to a card --- it inserts a row into jnt_fic_att_value and attr_value -declare - n_jft_id integer; -begin - select nextval('s_jnt_fic_att_value') into n_jft_id; - insert into jnt_fic_att_value (jft_id,f_id,ad_id) values (n_jft_id,p_f_id,p_ad_id); - insert into attr_value (jft_id,av_text) values (n_jft_id,p_value); -return; -end; -$$ -language plpgsql volatile; - - - -CREATE OR REPLACE FUNCTION account_insert(p_f_id fiche.f_id%type,p_account tmp_pcmn.pcm_val%type) - RETURNS int4 AS -$BODY$ -declare --- account_insert --- parameter f_id,p_account label of account --- purpose : create a new account for a card --- check if the accound needs to be created automatically --- if p_account is empty or null --- into tables attr_value -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nNew tmp_pcmn.pcm_val%type; -bAuto bool; -nFd_id integer; -nCount integer; -begin - - -- if p_value empty - if length(trim(p_account)) != 0 then - -- does the account exist ? - select * into nCount from tmp_pcmn where pcm_val=p_account; - if nCount !=0 then - -- retrieve name - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - -- get parent - nParent:=account_parent(p_account); - -- account doesn't exist we need to add id - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) - values (p_account,sName,nParent); - -- insert as card's attribute - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999')); - - end if; - else - select fd_id into nFd_id from fiche where f_id=p_f_id; - bAuto:= account_auto(nFd_id); - - if bAuto = true then - -- create automatically the account - -- compute the next account - nNew:=account_compute(p_f_id); -raise debug 'nNew %', nNew; - -- retrieve name - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - - -- get parent - nParent:=account_parent(nNew); - -- account doesn't exist we need to add id - perform account_add (nNew,sName); - -- insert as card's attribute - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999')); - - else - perform attribut_insert(p_f_id,5,null); - end if; - - end if; - -return 0; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -create or replace function account_parent(p_account tmp_pcmn.pcm_val%type) -returns - -- account_parent - -- parameter pcm_val%type; - -- purpose compute the parent account - - poste_comptable -as -$$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - sParent varchar; - nCount integer; -begin - sParent:=to_char(p_account,'9999999999999999'); - sParent:=trim(sParent); - nParent:=0; - while nParent = 0 loop - select count(*) into nCount - from tmp_pcmn - where - pcm_val = to_number(sParent,'9999999999999999'); - if nCount != 0 then - nParent:=to_number(sParent,'9999999999999999'); - end if; - sParent:= substr(sParent,1,length(sParent)-1); - if length(sParent) <= 0 then - raise exception 'Impossible de trouver le compte parent pour %',p_account; - end if; - - end loop; - - return nParent; -end; -$$ language plpgsql volatile; --- Function: account_update() - --- DROP FUNCTION account_update(); - -CREATE OR REPLACE FUNCTION account_update(p_f_id fiche.f_id%type,p_account tmp_pcmn.pcm_val%type) - RETURNS int4 AS -$BODY$ --- account_update --- parameter f_id, pcm_val --- purpose update the account of a card and create it into PCMN if it doesn't exist yet --- -declare -nMax fiche.f_id%type; -nCount integer; -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nJft_id attr_value.jft_id%type; -begin - - -- if p_value empty - if length(trim(p_account)) != 0 then - -- does the account exist ? - select count(*) into nCount from tmp_pcmn where pcm_val=p_account; - if nCount = 0 then - -- retrieve name - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - -- get parent - nParent:=fiche_account_parent(p_f_id); - -- account doesn't exist we need to add id - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account,sName,nParent); - end if; - end if; - -- we retrieve jft_id - select jft_id into njft_id from jnt_fic_att_value where f_id=p_f_id and ad_id=5; - -- we update the account - update attr_value set av_text=p_account where jft_id=njft_id; - -return njft_id; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -create or replace function account_add (p_id tmp_pcmn.pcm_val%type,p_name varchar) -returns void -as -$$ --- account_add (p_id tmp_pcmn.pcm_val%type,p_name varchar) --- parameter --- p_id id of the account --- name account's name --- purpose insert a new account if it doesn't exist yet -declare - nParent tmp_pcmn.pcm_val_parent%type; - nCount integer; -begin - select count(*) into nCount from tmp_pcmn where pcm_val=p_id; - 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); - end if; -return; -end ; -$$ language plpgsql; - - -create table document_type ( - dt_id serial primary key, - dt_value varchar(80) -); - -comment on table document_type is 'Type of document : meeting, invoice,...'; -CREATE or replace FUNCTION t_document_type_insert() RETURNS trigger AS $body$ - BEGIN - execute 'create sequence seq_doc_type_'||NEW.dt_id; -raise notice 'Creating sequence seq_doc_type_%',NEW.dt_id; - RETURN NEW; - END; -$body$ LANGUAGE plpgsql; - -CREATE TRIGGER trigger_document_type_i after INSERT oN document_type - FOR EACH ROW EXECUTE PROCEDURE t_document_type_insert(); - -INSERT INTO document_type VALUES (1,'Document Interne'); -INSERT INTO document_type VALUES (2,'Bons de commande client'); -INSERT INTO document_type VALUES (3,'Bon de commande Fournisseur'); -INSERT INTO document_type VALUES (4,'Facture'); -INSERT INTO document_type VALUES (5,'Lettre de rappel'); -INSERT INTO document_type VALUES (6,'Courrier'); -INSERT INTO document_type VALUES (7,'Proposition'); -INSERT INTO document_type VALUES (8,'Email'); -INSERT INTO document_type VALUES (9,'Divers'); -alter sequence document_type_dt_id_seq restart with 10; - -create table document_modele ( - md_id serial primary key, - md_name text not null, - md_lob oid, - md_type integer not null , - md_filename text, - md_mimetype text -); - - -comment on table document_modele is ' contains all the template for the documents'; - -alter table document_modele add constraint md_type foreign key (md_type) references document_type(dt_id); - - - -create or replace function card_class_base(p_f_id fiche.f_id%type) -returns fiche_def.fd_class_base%type -as -$$ - -declare - n_poste fiche_def.fd_class_base%type; -begin --- card_class_base (integer) --- param: $1 fiche.f_id --- purpose : retrieve the class of a card --- - - select fd_class_base into n_poste from fiche_def join fiche using (fd_id) - where f_id=p_f_id; - if not FOUND then - raise exception 'Invalid fiche card_class_base(%)',p_f_id; - end if; -return n_poste; -end; -$$ language plpgsql; - --- fiche_account_parent -create or replace function fiche_account_parent(p_f_id integer) -returns poste_comptable as $$ -declare --- fiche_account_parent returns the fd_class_base --- parameter f_id (from fiche) -ret poste_comptable; -begin - select fd_class_base into ret from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if not FOUND then - raise exception '% N''existe pas',p_f_id; - end if; - return ret; -end; -$$ -language plpgsql ; -delete from form where fo_fr_id=3000000; -delete from formdef where fr_id=3000000; - -INSERT INTO formdef (fr_id, fr_label) VALUES (3000000, 'TVA déclaration Belge'); --- --- Data for TOC entry 2 (OID 315304) --- Name: formdef; Type: TABLE DATA; Schema: public; Owner: dany --- --- - -INSERT INTO form VALUES (3000398, 3000000, 1, 'Prestation [ case 03 ]', '[700%]-[7000005]'); -INSERT INTO form VALUES (3000399, 3000000, 2, 'Prestation intra [ case 47 ]', '[7000005]'); -INSERT INTO form VALUES (3000400, 3000000, 3, 'Tva due [case 54]', '[4513]+[4512]+[4511] FROM=01.2005'); -INSERT INTO form VALUES (3000401, 3000000, 4, 'Marchandises, matière première et auxiliaire [case 81 ]', '[60%]'); -INSERT INTO form VALUES (3000402, 3000000, 7, 'Service et bien divers [case 82]', '[61%]'); -INSERT INTO form VALUES (3000403, 3000000, 8, 'bien d''invest [ case 83 ]', '[2400%]'); -INSERT INTO form VALUES (3000404, 3000000, 9, 'TVA déductible [ case 59 ]', 'abs([4117]-[411%])'); -INSERT INTO form VALUES (3000405, 3000000, 8, 'TVA non ded -> voiture', '[610022]*0.21/2'); -INSERT INTO form VALUES (3000406, 3000000, 9, 'Acompte TVA', '[4117]'); - --- create the table document - -create table document -( - d_id serial primary key, - ag_id int4 not null, - d_lob oid, - d_number int8 not null, - d_filename text, - d_mimetype text -); - - - -comment on table document is 'This table contains all the documents : summary and lob files'; - -create sequence document_seq; - -comment on sequence document_seq is 'Sequence for the sequence bound to the document modele'; - -CREATE TABLE document_state ( - s_id serial NOT NULL, - s_value character varying(50) NOT NULL -); - - -COMMENT ON TABLE document_state IS 'State of the document'; - -SELECT pg_catalog.setval(pg_catalog.pg_get_serial_sequence('document_state', 's_id'), 3, true); - - -INSERT INTO document_state VALUES (1, 'Envoyé'); -INSERT INTO document_state VALUES (2, 'Brouillon'); -INSERT INTO document_state VALUES (3, 'A envoyer'); -INSERT INTO document_state VALUES (4, 'Reçu'); - -ALTER TABLE ONLY document_state ADD CONSTRAINT document_state_pkey PRIMARY KEY (s_id); -alter sequence s_attr_def restart with 24; -insert into attr_def (ad_text) values ('Ville'); -insert into attr_min values(9,24); -insert into attr_min values(8,24); -insert into attr_min values(14,24); --- upgrade all customer -insert into jnt_fic_attr select fd_id,24 from jnt_fic_attr join fiche_def using (fd_id) where frd_id=9 and ad_id=1; --- supplier -insert into jnt_fic_attr select fd_id,24 from jnt_fic_attr join fiche_def using (fd_id) where frd_id=8 and ad_id=1; --- administration - -insert into jnt_fic_attr select fd_id,24 from jnt_fic_attr join fiche_def using (fd_id) where frd_id=9 and ad_id=14; - --- -create table action_gestion ( - ag_id serial primary key, - ag_type int4, - f_id_dest int4 not null, - f_id_exp int4 not null, - ag_title varchar(70), - ag_timestamp timestamp default now(), - ag_cal char(1) default 'C', - ag_ref_ag_id int4, - ag_comment text -); - -comment on table action_gestion is 'Action for Managing'; - - --- add contact -alter sequence s_fiche_def_ref restart 16; -insert into fiche_def_ref(frd_text) values ('Contact'); - -insert into attr_def(ad_text) values ('Société'); -insert into attr_def(ad_text) values ('Fax'); -insert into attr_min values(16,1); -insert into attr_min values(16,17); -insert into attr_min values(16,18); -insert into attr_min values(16,25); -insert into attr_min values(16,26); -insert into attr_def (ad_text) values ('GSM'); -insert into attr_min values(16,27); - -CREATE or replace FUNCTION t_jrn_def_sequence() RETURNS trigger AS $body$ - BEGIN - execute 'create sequence s_jrn_'||NEW.jrn_def_id; -raise notice 'Creating sequence s_jrn_%',NEW.jrn_def_id; - RETURN NEW; - END; -$body$ LANGUAGE plpgsql; - -CREATE TRIGGER trigger_jrn_def_sequence_i after INSERT oN jrn_def - FOR EACH ROW EXECUTE PROCEDURE t_jrn_def_sequence(); - -create view vw_supplier as SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email - FROM ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 1) a - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 13) b USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 23) a1 USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 5) c USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 14) d USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 15) e USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 16) f USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 17) g USING (f_id) - LEFT JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 18) h USING (f_id) - WHERE a.frd_id = 8; - - -insert into parameter (pr_id) values ('MY_TEL'); -insert into parameter (pr_id) values ('MY_PAYS'); -insert into parameter (pr_id) values ('MY_FAX'); -alter table document add d_state int; -alter table action_gestion add ag_ref text; - -create unique index k_ag_ref on action_gestion(ag_ref); -update version set val=14; -insert into action values(28,'Module Suivi Document'); -insert into action values(22,'Module Client'); -insert into action values (24,'Module Fournisseur'); -insert into action values (26,'Module Administration'); -insert into action values (30,'Module Gestion'); - -insert into format_csv_banque values ('Argenta Belgique','argenta_be.inc.php'); -insert into format_csv_banque values ('CBC Belgique','cbc_be.inc.php'); -CREATE SEQUENCE s_cbc - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade14.sql b/sources/html/admin/sql/patch/upgrade14.sql deleted file mode 100644 index b880124..0000000 --- a/sources/html/admin/sql/patch/upgrade14.sql +++ /dev/null @@ -1,45 +0,0 @@ -begin; -alter table import_tmp add column status varchar(1); -alter table import_tmp alter status set default 'n'; -create or replace function trim_cvs_quote() returns trigger as $trim$ -declare - modified import_tmp%ROWTYPE; -begin - modified:=NEW; - modified.devise=replace(new.devise,'"',''); - modified.poste_comptable=replace(new.poste_comptable,'"',''); - modified.compte_ordre=replace(NEW.COMPTE_ORDRE,'"',''); - modified.detail=replace(NEW.DETAIL,'"',''); - modified.num_compte=replace(NEW.NUM_COMPTE,'"',''); - return modified; -end; -$trim$ language plpgsql; - -update import_tmp set status = 't' where ok=true; -update import_tmp set status = 'n' where ok = false; -update import_tmp set status = 'n' where ok is null; - -alter table import_tmp add constraint chk_status check (status in ('n','w','d','t')); - - -alter table import_tmp drop column ok ; -comment on table import_tmp is 'Table temporaire pour l''importation des banques en format CSV'; -comment on column import_tmp.status is 'Status doit être w pour en attente, t pour transfèrer ou d à effacer'; - - -create or replace function trim_cvs_quote() returns trigger as $trim$ -declare - modified import_tmp%ROWTYPE; -begin - modified:=NEW; - modified.devise=replace(new.devise,'"',''); - modified.poste_comptable=replace(new.poste_comptable,'"',''); - modified.compte_ordre=replace(NEW.COMPTE_ORDRE,'"',''); - modified.detail=replace(NEW.DETAIL,'"',''); - modified.num_compte=replace(NEW.NUM_COMPTE,'"',''); - return modified; -end; -$trim$ language plpgsql; - -update version set val=15; -commit; diff --git a/sources/html/admin/sql/patch/upgrade15.sql b/sources/html/admin/sql/patch/upgrade15.sql deleted file mode 100644 index 7e4cfee..0000000 --- a/sources/html/admin/sql/patch/upgrade15.sql +++ /dev/null @@ -1,4 +0,0 @@ -begin; -update attr_def set ad_text='code postal' where ad_id=15; -update version set val=16; -commit; diff --git a/sources/html/admin/sql/patch/upgrade16.sql b/sources/html/admin/sql/patch/upgrade16.sql deleted file mode 100644 index b860869..0000000 --- a/sources/html/admin/sql/patch/upgrade16.sql +++ /dev/null @@ -1,25 +0,0 @@ -begin; - -create or replace function card_class_base(p_f_id fiche.f_id%type) -returns fiche_def.fd_class_base%type -as -$$ -declare - n_poste fiche_def.fd_class_base%type; -begin --- card_class_base (integer) --- param: $1 fiche.f_id --- purpose : retrieve the class of a card --- - - select fd_class_base into n_poste from fiche_def join fiche using -(fd_id) - where f_id=p_f_id; - if not FOUND then - raise exception 'Invalid fiche card_class_base(%)',p_f_id; - end if; -return n_poste; -end; -$$ language plpgsql; -update version set val=17; -commit; diff --git a/sources/html/admin/sql/patch/upgrade17.sql b/sources/html/admin/sql/patch/upgrade17.sql deleted file mode 100644 index 4bac8b2..0000000 --- a/sources/html/admin/sql/patch/upgrade17.sql +++ /dev/null @@ -1,14 +0,0 @@ -begin; --- add quick code for contact -insert into attr_min (frd_id,ad_id) values (16,23); - - - -insert into jnt_fic_attr select fd_id,23 from fiche_Def where frd_id=16; -insert into jnt_fic_att_value(jft_id,f_id,ad_id) select nextval('s_jnt_fic_att_value')+200,f_id,23 from fiche - where fd_id in (select fd_id from fiche_Def where frd_id=16); -insert into attr_value select jft_id,'FID'||f_id from jnt_fic_att_value join fiche using(f_id) where ad_id=23 and - fd_id in (select fd_id from fiche_Def where frd_id=16); - -update version set val=18; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade18.sql b/sources/html/admin/sql/patch/upgrade18.sql deleted file mode 100644 index 5f3e68e..0000000 --- a/sources/html/admin/sql/patch/upgrade18.sql +++ /dev/null @@ -1,5 +0,0 @@ -begin; -alter table parm_periode drop constraint parm_periode_p_start_key; - -update version set val=19; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade19.sql b/sources/html/admin/sql/patch/upgrade19.sql deleted file mode 100644 index 30f0e3d..0000000 --- a/sources/html/admin/sql/patch/upgrade19.sql +++ /dev/null @@ -1,181 +0,0 @@ -begin; --- bug 1753 -create or replace function correct_sequence ( p_sequence text,p_col text, p_table text ) -returns integer -as -$body$ -declare --- fonction description --- Often the primary key is a sequence number and sometimes --- the value of the sequence is not synchronized with the --- primary key --- parameter p_sequence : sequence name --- parameter p_col : col of the pk --- parameter p_table : concerned table --- variable --- last value of the sequence -last_sequence int8; --- max value of the pk -max_sequence int8; --- n integer -n integer; -begin --- the sequence exist ? - select count(*) into n from pg_class where relkind='S' and relname=lower(p_sequence); - if n = 0 then - raise exception ' Unknow sequence % ',p_sequence; - end if; - select count(*) into n from pg_class where relkind='r' and relname=lower(p_table); - if n = 0 then - raise exception ' Unknow table % ',p_table; - end if; - - execute 'select last_value from '||p_sequence into last_sequence; - raise notice 'Last value of the sequence is %', last_sequence; - - execute 'select max('||p_col||') from '||p_table into max_sequence; - if max_sequence is null then - max_sequence := 0; - end if; - raise notice 'Max value of the sequence is %', max_sequence; - max_sequence:= max_sequence +1; - execute 'alter sequence '||p_sequence||' restart with '||max_sequence; -return 0; - -end; -$body$ language plpgsql; - -comment on function correct_sequence (text,text,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'; -commit; -begin; -select correct_sequence('s_jnt_fic_att_value','jft_id','jnt_fic_att_value'); - --- bug 17544 --- add a pk to the table jnt_fic_attr -alter table jnt_fic_attr add jnt_id int8; -create sequence s_jnt_id; -alter table jnt_fic_attr alter jnt_id set default nextval('s_jnt_id'); -update jnt_fic_attr set jnt_id=nextval('s_jnt_id'); -alter table jnt_fic_attr add constraint pk_jnt_fic_attr primary key (jnt_id); - --- remove duplicate attr -delete from jnt_fic_attr where jnt_id in ( select a.jnt_id from jnt_fic_attr a join jnt_fic_attr b on (a.fd_id=b.fd_id and a.ad_id=b.ad_id) where a.jnt_id > b.jnt_id); - --- bug 17543 - ---account_compute -CREATE or replace FUNCTION account_parent(p_account poste_comptable) RETURNS poste_comptable - AS $$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - sParent varchar; - nCount integer; -begin - sParent:=to_char(p_account,'9999999999999999'); - sParent:=trim(sParent); - nParent:=0; - while nParent = 0 loop - select count(*) into nCount - from tmp_pcmn - where - pcm_val = to_number(sParent,'9999999999999999'); - if nCount != 0 then - nParent:=to_number(sParent,'9999999999999999'); - end if; - sParent:= substr(sParent,1,length(sParent)-1); - if length(sParent) <= 0 then - raise exception 'Impossible de trouver le compte parent pour %',p_account; - end if; - end loop; - raise notice 'account_parent : Parent is %',nParent; - return nParent; -end; -$$ - LANGUAGE plpgsql; - - -commit; - - -CREATE or replace FUNCTION account_compute(p_f_id integer) RETURNS poste_comptable - AS $$ -declare - class_base poste_comptable; - maxcode int8; -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; - select max(pcm_val) into maxcode from tmp_pcmn where pcm_val_parent = class_base; - if maxcode = class_base then - maxcode:=class_base*1000; - end if; - maxcode:=maxcode+1; - raise notice 'account_compute Max code %',maxcode; - return maxcode; -end; -$$ - LANGUAGE plpgsql; - - - --- --- Name: account_insert(integer, poste_comptable); Type: FUNCTION; Schema: public; Owner: phpcompta --- - -CREATE or replace FUNCTION account_insert(p_f_id integer, p_account poste_comptable) RETURNS integer - AS $$ -declare -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nNew tmp_pcmn.pcm_val%type; -bAuto bool; -nFd_id integer; -nCount integer; -begin - - if length(trim(p_account)) != 0 then - raise notice 'p_account is not empty'; - select * into nCount from tmp_pcmn where pcm_val=p_account; - if nCount !=0 then - raise notice 'this account exists in tmp_pcmn '; - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - 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); - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999')); - - end if; - else - raise notice 'p_account is empty'; - select fd_id into nFd_id from fiche where f_id=p_f_id; - bAuto:= account_auto(nFd_id); - if bAuto = true then - raise notice 'account generated automatically'; - nNew:=account_compute(p_f_id); - raise notice 'nNew %', nNew; - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(nNew); - perform account_add (nNew,sName); - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999')); - - else - perform attribut_insert(p_f_id,5,null); - end if; - end if; - -return 0; -end; -$$ - LANGUAGE plpgsql; -update version set val=20; -commit; diff --git a/sources/html/admin/sql/patch/upgrade20.sql b/sources/html/admin/sql/patch/upgrade20.sql deleted file mode 100644 index a779be7..0000000 --- a/sources/html/admin/sql/patch/upgrade20.sql +++ /dev/null @@ -1,125 +0,0 @@ -begin; -CREATE or replace FUNCTION insert_quant_sold - (p_internal text, - p_fiche character varying, - p_quant integer, - p_price numeric, - p_vat numeric, - p_vat_code integer, - p_client character varying) -RETURNS void -AS - $body$ -declare - fid_client integer; - fid_good integer; -begin - select f_id into fid_client from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(p_client); - - select f_id into fid_good from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(p_fiche); - - - insert into quant_sold - (qs_internal,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client) - values - (p_internal,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client); - return; -end; - $body$ LANGUAGE plpgsql; - --- add quick code for contact - -insert into attr_min (frd_id,ad_id) - select distinct 16,23 - from attr_min - where not exists (select * from attr_min where ad_id=23 and frd_id=16); - - -insert into jnt_fic_attr (fd_id,ad_id) - select fd_id,23 from fiche_def where frd_id=16 - and not exists (select * - from jnt_fic_attr join fiche_def using (fd_id) - where frd_id=16 and ad_id=23); - - -CREATE or replace FUNCTION update_quick_code(njft_id integer, tav_text text) RETURNS integer - AS $body$ - declare - ns integer; - nExist integer; - tText text; - old_qcode varchar; - begin - -- get current value - select av_text into old_qcode from attr_value where jft_id=njft_id; - -- av_text didn't change so no update - if tav_text = upper( trim(old_qcode)) then - return 0; - end if; - - tText := trim(upper(tav_text)); - tText := replace(tText,' ',''); - if length ( tText) = 0 or tText is null then - return 0; - end if; - - ns := njft_id; - - loop - -- av_text already used ? - select count(*) into nExist - from jnt_fic_att_value join attr_value using (jft_id) - where - ad_id=23 and av_text=tText; - - if nExist = 0 then - exit; - end if; - if tText = 'FID'||ns then - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - end if; - tText :='FID'||ns; - - end loop; - update attr_value set av_text = tText where jft_id=njft_id; - - -- update also the contact - update attr_value set av_text = tText - where jft_id in - ( select jft_id - from jnt_fic_att_value join attr_value using (jft_id) - where ad_id=25 and av_text=old_qcode); - - - update jrnx set j_qcode=tText where j_qcode = old_qcode; - return ns; - end; -$body$ - LANGUAGE plpgsql; - - -update parm_periode set p_end = p_start where p_end is null; -alter table parm_periode alter p_end set not null; - -create or replace function drop_it (p_constraint varchar) -returns void as -$body$ -declare --- drop a constraint if it exists - nCount integer; -begin - select count(*) into nCount from pg_constraint where conname=p_constraint; - if nCount = 1 then - execute 'alter table parm_periode drop constraint '||p_constraint ; - end if; -end; -$body$ language plpgsql; - -select drop_it('parm_periode_p_start_key'); -create unique index x_periode on parm_periode (p_start,p_end); - -update version set val=21; -commit; diff --git a/sources/html/admin/sql/patch/upgrade21.sql b/sources/html/admin/sql/patch/upgrade21.sql deleted file mode 100644 index 2c34de4..0000000 --- a/sources/html/admin/sql/patch/upgrade21.sql +++ /dev/null @@ -1,14 +0,0 @@ -begin; -alter table import_tmp add jr_rapt text; - -delete from jnt_fic_attr - where jnt_id in ( - select a.jnt_id - from jnt_fic_attr as a join jnt_fic_attr as b - on (a.fd_id=b.fd_id and a.ad_id=b.ad_id) - where b.jnt_id > a.jnt_id); - -create unique index fd_id_ad_id_x on jnt_fic_attr( fd_id,ad_id); - -update version set val=22; -commit; diff --git a/sources/html/admin/sql/patch/upgrade22.sql b/sources/html/admin/sql/patch/upgrade22.sql deleted file mode 100644 index d913d26..0000000 --- a/sources/html/admin/sql/patch/upgrade22.sql +++ /dev/null @@ -1,88 +0,0 @@ -begin; -create or replace function account_insert (p_f_id integer, p_account poste_comptable) -RETURNS int4 AS -$body$ -declare -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nNew tmp_pcmn.pcm_val%type; -bAuto bool; -nFd_id integer; -nCount integer; -begin - - if length(trim(p_account)) != 0 then - raise notice 'p_account is not empty'; - select * into nCount from tmp_pcmn where pcm_val=p_account; - if nCount !=0 then - raise notice 'this account exists in tmp_pcmn '; - perform attribut_insert(p_f_id,5,to_char(p_account,'999999999999')); - else - -- account doesn't exist, create it - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - 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); - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999')); - - end if; - else - raise notice 'p_account is empty'; - select fd_id into nFd_id from fiche where f_id=p_f_id; - bAuto:= account_auto(nFd_id); - if bAuto = true then - raise notice 'account generated automatically'; - nNew:=account_compute(p_f_id); - raise notice 'nNew %', nNew; - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(nNew); - perform account_add (nNew,sName); - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999')); - - else - perform attribut_insert(p_f_id,5,null); - end if; - end if; - -return 0; -end; -$body$ -LANGUAGE 'plpgsql' VOLATILE; - --- Function: attribut_insert(p_f_id int4, p_ad_id int4, p_value "varchar") - --- DROP FUNCTION attribut_insert(p_f_id int4, p_ad_id int4, p_value "varchar"); - -CREATE OR REPLACE FUNCTION attribut_insert(p_f_id int4, p_ad_id int4, p_value "varchar") - RETURNS void AS -$BODY$ -declare - n_jft_id integer; -begin - select nextval('s_jnt_fic_att_value') into n_jft_id; - insert into jnt_fic_att_value (jft_id,f_id,ad_id) values (n_jft_id,p_f_id,p_ad_id); - insert into attr_value (jft_id,av_text) values (n_jft_id,trim(p_value)); -return; -end; -$BODY$ LANGUAGE 'plpgsql' VOLATILE; - -update attr_value set av_text=trim(av_text); - -update jrnx set j_qcode = B.av_text from - (select f_id,av_text from attr_value join jnt_fic_att_value using (jft_id) - where ad_id=5) as A - join ( select f_id,av_text from attr_value join jnt_fic_att_value using (jft_id) - where ad_id=23) as B using(f_id) where j_poste=a.av_text; - - -update jrnx set j_qcode = upper(j_qcode); - -update version set val=23; -commit; diff --git a/sources/html/admin/sql/patch/upgrade23.sql b/sources/html/admin/sql/patch/upgrade23.sql deleted file mode 100644 index 70a06be..0000000 --- a/sources/html/admin/sql/patch/upgrade23.sql +++ /dev/null @@ -1,40 +0,0 @@ -begin; - -delete from jnt_fic_attr where jnt_id in ( select a.jnt_id from jnt_fic_attr a join jnt_fic_attr b using (fd_id, ad_id) where a.jnt_id > b.jnt_id); - - -alter table quant_sold alter qs_quantite type numeric(20,4); - -drop fUNCTION public.insert_quant_sold(p_internal text, p_fiche character varying, p_quant integer, p_price numeric, -p_vat numeric, p_vat_code integer, p_client character varying) ; -CREATE FUNCTION insert_quant_sold( - p_internal text, - p_fiche character varying, - p_quant numeric, - p_price numeric, - p_vat numeric, - p_vat_code integer, - p_client character varying) RETURNS void - AS $$ -declare - fid_client integer; - fid_good integer; -begin - select f_id into fid_client from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(p_client); - - select f_id into fid_good from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(p_fiche); - - - insert into quant_sold - (qs_internal,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client) - values - (p_internal,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client); - return; -end; - $$ - LANGUAGE plpgsql; -update version set val=24; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade24.sql b/sources/html/admin/sql/patch/upgrade24.sql deleted file mode 100644 index 7c36280..0000000 --- a/sources/html/admin/sql/patch/upgrade24.sql +++ /dev/null @@ -1,7 +0,0 @@ -begin; - -delete from attr_min where ad_id=5; - -update version set val=25; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade25.sql b/sources/html/admin/sql/patch/upgrade25.sql deleted file mode 100644 index 4a99abb..0000000 --- a/sources/html/admin/sql/patch/upgrade25.sql +++ /dev/null @@ -1,67 +0,0 @@ -begin; - -create or replace function account_insert (p_f_id integer, p_account poste_comptable) -RETURNS int4 AS -$body$ -declare -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nNew tmp_pcmn.pcm_val%type; -bAuto bool; -nFd_id integer; -nCount integer; -begin - - if length(trim(p_account)) != 0 then - raise notice 'p_account is not empty'; - select * into nCount from tmp_pcmn where pcm_val=p_account; - if nCount !=0 then - raise notice 'this account exists in tmp_pcmn '; - perform attribut_insert(p_f_id,5,to_char(p_account,'999999999999999999999999')); - else - -- account doesn't exist, create it - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - 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); - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999999999999999')); - - end if; - else - raise notice 'p_account is empty'; - select fd_id into nFd_id from fiche where f_id=p_f_id; - bAuto:= account_auto(nFd_id); - if bAuto = true then - raise notice 'account generated automatically'; - nNew:=account_compute(p_f_id); - raise notice 'nNew %', nNew; - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(nNew); - perform account_add (nNew,sName); - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999999999999999')); - - else - -- if there is an account_base then it is the default - select fd_class_base into nNew from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if nNew is null or length(trim(nNew)) = 0 then - raise notice 'count is null'; - perform attribut_insert(p_f_id,5,null); - else - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999999999999999')); - end if; - end if; - end if; - -return 0; -end; -$body$ -LANGUAGE 'plpgsql' VOLATILE; -update version set val=26; -commit; diff --git a/sources/html/admin/sql/patch/upgrade26.sql b/sources/html/admin/sql/patch/upgrade26.sql deleted file mode 100644 index 3cfc9d5..0000000 --- a/sources/html/admin/sql/patch/upgrade26.sql +++ /dev/null @@ -1,94 +0,0 @@ -begin; -CREATE or replace FUNCTION account_compute(p_f_id integer) RETURNS poste_comptable - AS $$ -declare - class_base poste_comptable; - maxcode poste_comptable; -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; - select count (pcm_val) into maxcode from tmp_pcmn where pcm_val_parent = class_base; - if maxcode = 0 then - maxcode:=class_base; - else - select max (pcm_val) into maxcode from tmp_pcmn where pcm_val_parent = class_base; - end if; - if maxcode = class_base then - maxcode:=class_base*1000; - end if; - maxcode:=maxcode+1; - raise notice 'account_compute Max code %',maxcode; - return maxcode; -end; -$$ - LANGUAGE plpgsql; - -CREATE OR REPLACE FUNCTION account_insert(p_f_id integer, p_account poste_comptable) RETURNS integer - AS $$ -declare -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nNew tmp_pcmn.pcm_val%type; -bAuto bool; -nFd_id integer; -nCount integer; -begin - - if length(trim(p_account)) != 0 then - raise notice 'p_account is not empty'; - select * into nCount from tmp_pcmn where pcm_val=p_account; - if nCount !=0 then - raise notice 'this account exists in tmp_pcmn '; - perform attribut_insert(p_f_id,5,to_char(p_account,'999999999999999999999999')); - else - -- account doesn't exist, create it - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - 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); - perform attribut_insert(p_f_id,5,to_char(p_account,'999999999999999999999999')); - - end if; - else - raise notice 'p_account is empty'; - select fd_id into nFd_id from fiche where f_id=p_f_id; - bAuto:= account_auto(nFd_id); - if bAuto = true then - raise notice 'account generated automatically'; - nNew:=account_compute(p_f_id); - raise notice 'nNew %', nNew; - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(nNew); - perform account_add (nNew,sName); - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999999999999999')); - - else - -- if there is an account_base then it is the default - select fd_class_base into nNew from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if nNew is null or length(trim(nNew)) = 0 then - raise notice 'count is null'; - perform attribut_insert(p_f_id,5,null); - else - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999999999999999')); - end if; - end if; - end if; - -return 0; -end; -$$ - LANGUAGE plpgsql; - - -update version set val=27; -commit; diff --git a/sources/html/admin/sql/patch/upgrade27.sql b/sources/html/admin/sql/patch/upgrade27.sql deleted file mode 100644 index 0f38ef9..0000000 --- a/sources/html/admin/sql/patch/upgrade27.sql +++ /dev/null @@ -1,8 +0,0 @@ -begin; - -insert into format_csv_banque values ('Dexia','dexia_be.inc.php'); -alter table stock_goods alter sg_quantity type numeric(8,4); -alter table stock_goods add sg_comment varchar(80); -alter table stock_goods add sg_exercice varchar(4); -update version set val=28; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade28.sql b/sources/html/admin/sql/patch/upgrade28.sql deleted file mode 100644 index 950b895..0000000 --- a/sources/html/admin/sql/patch/upgrade28.sql +++ /dev/null @@ -1,14 +0,0 @@ -begin; -delete from user_sec_act where ua_act_id in (2,9,19,18); -delete from action where ac_id=2; -delete from action where ac_id=9; -delete from action where ac_id=19; -delete from action where ac_id=18; -update action set ac_description='Lecture du Grand-Livre' where ac_id=1; -insert into action values (31,'Gestion des périodes comptables'); -update action set ac_description = 'Lecture des fiches' where ac_id=3; -update action set ac_description = 'Ajout de fiche et modification' where ac_id=15; -update action set ac_description = 'Création et modifications des rapports' where ac_id=5; - -update version set val=29; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade29.sql b/sources/html/admin/sql/patch/upgrade29.sql deleted file mode 100644 index b8a09ec..0000000 --- a/sources/html/admin/sql/patch/upgrade29.sql +++ /dev/null @@ -1,31 +0,0 @@ -begin; -CREATE or REPLACE FUNCTION account_update(p_f_id integer, p_account poste_comptable) RETURNS integer - AS $$ -declare -nMax fiche.f_id%type; -nCount integer; -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nJft_id attr_value.jft_id%type; -begin - - if length(trim(p_account)) != 0 then - select count(*) into nCount from tmp_pcmn where pcm_val=p_account; - if nCount = 0 then - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - 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; - end if; - select jft_id into njft_id from jnt_fic_att_value where f_id=p_f_id and ad_id=5; - update attr_value set av_text=p_account where jft_id=njft_id; - -return njft_id; -end; -$$ - LANGUAGE plpgsql; -update version set val=30; -commit; diff --git a/sources/html/admin/sql/patch/upgrade30.sql b/sources/html/admin/sql/patch/upgrade30.sql deleted file mode 100644 index 364d728..0000000 --- a/sources/html/admin/sql/patch/upgrade30.sql +++ /dev/null @@ -1,14 +0,0 @@ -begin ; -alter table jrn_action drop constraint "$1"; -alter table jrn_def drop constraint "$1"; - -update jrn_action set ja_jrn_type='ODS' where ja_jrn_type='OD '; -update jrn_def set jrn_def_type='ODS' where jrn_def_type = 'OD '; -update jrn_type set jrn_type_id='ODS' where jrn_type_id ='OD '; - -alter table jrn_action add constraint "$1" foreign key (ja_jrn_type) references jrn_type(jrn_type_id); - -alter table jrn_def add constraint "$1" FOREIGN KEY (jrn_def_type) REFERENCES jrn_type(jrn_type_id); -update version set val=31; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade31.sql b/sources/html/admin/sql/patch/upgrade31.sql deleted file mode 100644 index 38345b2..0000000 --- a/sources/html/admin/sql/patch/upgrade31.sql +++ /dev/null @@ -1,613 +0,0 @@ -begin ; - -CREATE or replace 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) - RETURNS void - AS $$ -declare - fid_client integer; - fid_good integer; -begin - - select f_id into fid_client from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(p_client); - select f_id into fid_good from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(p_fiche); - insert into quant_sold - (qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client,qs_valid) - values - (p_internal,p_jid,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client,'Y'); - return; -end; - $$ - LANGUAGE plpgsql; - - - -CREATE or REPLACE FUNCTION account_update(p_f_id integer, p_account poste_comptable) RETURNS integer - AS $$ -declare -nMax fiche.f_id%type; -nCount integer; -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nJft_id attr_value.jft_id%type; -begin - - if length(trim(p_account)) != 0 then - select count(*) into nCount from tmp_pcmn where pcm_val=p_account; - if nCount = 0 then - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - 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; - end if; - select jft_id into njft_id from jnt_fic_att_value where f_id=p_f_id and ad_id=5; - update attr_value set av_text=p_account where jft_id=njft_id; - -return njft_id; -end; -$$ - LANGUAGE plpgsql; - - - -CREATE TABLE quant_purchase ( - qp_id integer DEFAULT nextval(('s_quantity'::text)::regclass) NOT NULL, - qp_internal text NOT NULL, - j_id integer not null, - qp_fiche integer NOT NULL, - qp_quantite numeric(20,4) NOT NULL, - qp_price numeric(20,4), - qp_vat numeric(20,4) default 0.0, - qp_vat_code integer, - qp_nd_amount numeric(20,4) default 0.0, - qp_nd_tva numeric(20,4) default 0.0, - qp_nd_tva_recup numeric(20,4) default 0.0, - qp_supplier integer NOT NULL, - qp_valid char(1) default 'Y' not null -); -ALTER TABLE ONLY quant_purchase - ADD CONSTRAINT qp_id_pk PRIMARY KEY (qp_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; - ---- -truncate quant_sold; -alter table quant_sold ADD qs_valid char(1) ; -alter table quant_sold add j_id integer; -alter table quant_sold alter j_id set not null; - -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; - -update quant_sold set qs_valid='Y'; -alter table quant_sold alter qs_valid set default 'Y'; -alter table quant_sold alter qs_valid set not null; - - - -CREATE or replace 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_client character varying) RETURNS void - AS $$ -declare - fid_client integer; - fid_good integer; -begin - select f_id into fid_client from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(p_client); - select f_id into fid_good from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(p_fiche); - insert into quant_purchase - (qp_internal, - j_id, - qp_fiche, - qp_quantite, - qp_price, - qp_vat, - qp_vat_code, - qp_nd_amount, - qp_nd_tva, - qp_nd_tva_recup, - qp_supplier) - values - (p_internal, - p_j_id, - fid_good, - p_quant, - p_price, - p_vat, - p_vat_code, - p_nd_amount, - p_nd_tva, - p_nd_tva_recup, - fid_client); - return; -end; - $$ - LANGUAGE plpgsql; -insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values(9,'Comptes hors Compta',0); - -COMMENT ON TABLE parameter IS 'parameter of the company'; - --- --- Name: plan_analytique; Type: TABLE; Schema: public; Owner: phpcompta; Tablespace: --- - -CREATE TABLE plan_analytique ( - pa_id integer NOT NULL, - pa_name text DEFAULT 'Sans Nom'::text NOT NULL, - pa_description text -); - --- --- Name: TABLE plan_analytique; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON TABLE plan_analytique IS 'Plan Analytique (max 5)'; - - --- --- Name: plan_analytique_pa_id_seq; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE plan_analytique_pa_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: pa_id; Type: DEFAULT; Schema: public; Owner: phpcompta --- - -ALTER TABLE plan_analytique ALTER COLUMN pa_id SET DEFAULT nextval('plan_analytique_pa_id_seq'::regclass); - - --- --- Name: plan_analytique_pa_name_key; Type: CONSTRAINT; Schema: public; Owner: phpcompta; Tablespace: --- - -ALTER TABLE ONLY plan_analytique - ADD CONSTRAINT plan_analytique_pa_name_key UNIQUE (pa_name); - - --- --- Name: plan_analytique_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta; Tablespace: --- - -ALTER TABLE ONLY plan_analytique - ADD CONSTRAINT plan_analytique_pkey PRIMARY KEY (pa_id); - - --- Ajout table operation_analytique - --- Ajout table poste_analytique --- --- Name: poste_analytique; Type: TABLE; Schema: public; Owner: phpcompta; Tablespace: --- - -CREATE TABLE poste_analytique ( - po_id integer 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 -); - - - --- --- Name: TABLE poste_analytique; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON TABLE poste_analytique IS 'Poste Analytique'; - - --- --- Name: poste_analytique_po_id_seq; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE poste_analytique_po_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - - - - --- --- Name: po_id; Type: DEFAULT; Schema: public; Owner: phpcompta --- - -ALTER TABLE poste_analytique ALTER COLUMN po_id SET DEFAULT nextval('poste_analytique_po_id_seq'::regclass); - - --- --- Name: poste_analytique_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta; Tablespace: --- - -ALTER TABLE ONLY poste_analytique - ADD CONSTRAINT poste_analytique_pkey PRIMARY KEY (po_id); - - --- --- Name: poste_analytique_pa_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: phpcompta --- - -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; - - --- --- Name: operation_analytique; Type: TABLE; Schema: public; Owner: phpcompta; Tablespace: --- -create sequence s_oa_group; - -CREATE TABLE operation_analytique ( - oa_id integer NOT NULL, - po_id integer NOT NULL, - pa_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_date date NOT NULL -); - - - --- --- Name: TABLE operation_analytique; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON TABLE operation_analytique IS 'History of the analytic account'; - - --- --- Name: historique_analytique_ha_id_seq; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE historique_analytique_ha_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: oa_id; Type: DEFAULT; Schema: public; Owner: phpcompta --- - -ALTER TABLE operation_analytique ALTER COLUMN oa_id SET DEFAULT nextval('historique_analytique_ha_id_seq'::regclass); - - --- --- Name: historique_analytique_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta; Tablespace: --- - -ALTER TABLE ONLY operation_analytique - ADD CONSTRAINT historique_analytique_pkey PRIMARY KEY (oa_id); - - --- --- Name: operation_analytique_j_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: phpcompta --- - -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; - - --- --- Name: operation_analytique_po_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: phpcompta --- - -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; - -INSERT INTO parameter VALUES ('MY_ANALYTIC', 'nu'); - -alter table jrn add constraint ux_internal unique (jr_internal); - -alter table 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 user_sec_jrn drop constraint "$1"; -alter table operation_analytique add oa_row int4; - -create or replace function upper_po_name() returns trigger as $$ -declare - name text; -begin - name:=upper(NEW.po_name); - name:=trim(name); - name:=replace(name,' ',''); - NEW.po_name:=name; - -return NEW; -end; -$$ LANGUAGE plpgsql; - -create or replace function upper_pa_name() returns trigger as $$ -declare - name text; -begin - name:=upper(NEW.pa_name); - name:=trim(name); - name:=replace(name,' ',''); - NEW.pa_name:=name; -return NEW; -end; -$$ LANGUAGE plpgsql; - - -CREATE TRIGGER t_upper_po_name BEFORE INSERT OR UPDATE ON poste_analytique - FOR EACH ROW EXECUTE PROCEDURE upper_po_name(); - -CREATE TRIGGER t_upper_pa_name before INSERT OR UPDATE on plan_analytique - FOR EACH ROW EXECUTE PROCEDURE upper_pa_name(); - -create unique index ux_po_name on poste_analytique (po_name); - -insert into parameter (pr_id,pr_value) select distinct 'MY_COUNTRY',pcm_country from tmp_pcmn limit 1; - -alter table tmp_pcmn drop pcm_country; - - -CREATE TABLE bilan ( - b_id integer NOT NULL, - b_name text NOT NULL, - b_file_template text NOT NULL, - b_file_form text, - b_type text NOT NULL -); - - - --- --- Name: TABLE bilan; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON TABLE bilan IS 'contains the template and the data for generating different documents '; - - --- --- Name: COLUMN bilan.b_id; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN bilan.b_id IS 'primary key'; - - --- --- Name: COLUMN bilan.b_name; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN bilan.b_name IS 'Name of the document'; - - --- --- Name: COLUMN bilan.b_file_template; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN bilan.b_file_template IS 'path of the template (document/...)'; - - --- --- Name: COLUMN bilan.b_file_form; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN bilan.b_file_form IS 'path of the file with forms'; - - --- --- Name: COLUMN bilan.b_type; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN bilan.b_type IS 'type = ODS, RTF...'; - - --- --- Name: bilan_b_id_seq; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE bilan_b_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - - --- --- Name: bilan_b_id_seq; Type: SEQUENCE SET; Schema: public; Owner: phpcompta --- - -SELECT pg_catalog.setval('bilan_b_id_seq', 4, true); - - --- --- Name: b_id; Type: DEFAULT; Schema: public; Owner: phpcompta --- - -ALTER TABLE bilan ALTER COLUMN b_id SET DEFAULT nextval('bilan_b_id_seq'::regclass); - - --- --- Data for Name: bilan; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -INSERT INTO bilan VALUES (1, 'Bilan Belge complet', 'document/fr_be/bnb.rtf', 'document/fr_be/bnb.form', 'RTF'); - - --- --- Name: bilan_b_name_key; Type: CONSTRAINT; Schema: public; Owner: phpcompta; Tablespace: --- - -ALTER TABLE ONLY bilan - ADD CONSTRAINT bilan_b_name_key UNIQUE (b_name); - - --- --- Name: bilan_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta; Tablespace: --- - -ALTER TABLE ONLY bilan - ADD CONSTRAINT bilan_pkey PRIMARY KEY (b_id); - - --- --- PostgreSQL database dump complete --- -CREATE TABLE op_predef ( - od_id integer NOT NULL, - jrn_def_id integer NOT NULL, - od_name text NOT NULL, - od_item integer NOT NULL, - od_jrn_type text NOT NULL -); - - - --- --- Name: TABLE op_predef; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON TABLE op_predef IS 'predefined operation'; - - --- --- Name: COLUMN op_predef.jrn_def_id; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN op_predef.jrn_def_id IS 'jrn_id'; - - --- --- Name: COLUMN op_predef.od_name; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN op_predef.od_name IS 'name of the operation'; - - --- --- Name: op_def_op_seq; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE op_def_op_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - --- --- Name: od_id; Type: DEFAULT; Schema: public; Owner: phpcompta --- - -ALTER TABLE op_predef ALTER COLUMN od_id SET DEFAULT nextval('op_def_op_seq'::regclass); - - --- --- Name: op_def_op_name_key; Type: CONSTRAINT; Schema: public; Owner: phpcompta; Tablespace: --- - -ALTER TABLE ONLY op_predef - ADD CONSTRAINT op_def_op_name_key UNIQUE (od_name,jrn_def_id); - - --- --- Name: op_def_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta; Tablespace: --- - -ALTER TABLE ONLY op_predef - ADD CONSTRAINT op_def_pkey PRIMARY KEY (od_id); - - --- --- Name: jrn_def_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: phpcompta --- - -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; - -CREATE TABLE op_predef_detail ( - opd_id integer NOT NULL, - od_id integer NOT NULL, - opd_poste text NOT NULL, - opd_amount numeric(20,4), - opd_tva_id integer, - opd_quantity numeric(20,4), - opd_debit boolean NOT NULL, - opd_tva_amount numeric(20,4), - opd_comment text -); - - - --- --- Name: TABLE op_predef_detail; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON TABLE op_predef_detail IS 'contains the detail of predefined operations'; - - --- --- Name: op_predef_detail_opd_id_seq; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE op_predef_detail_opd_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - --- --- Name: opd_id; Type: DEFAULT; Schema: public; Owner: phpcompta --- - -ALTER TABLE op_predef_detail ALTER COLUMN opd_id SET DEFAULT nextval('op_predef_detail_opd_id_seq'::regclass); - - --- --- Name: op_predef_detail_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta; Tablespace: --- - -ALTER TABLE ONLY op_predef_detail - ADD CONSTRAINT op_predef_detail_pkey PRIMARY KEY (opd_id); - -INSERT INTO "action" VALUES (50, 'Definir les Plans Analytiques et les postes'); -INSERT INTO "action" VALUES (51, 'Impression CA'); -INSERT INTO "action" VALUES (52, 'Operations Diverses CA'); -update version set val=32; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade32.sql b/sources/html/admin/sql/patch/upgrade32.sql deleted file mode 100644 index 55d77a2..0000000 --- a/sources/html/admin/sql/patch/upgrade32.sql +++ /dev/null @@ -1,10 +0,0 @@ -begin ; -delete from jrn where jr_internal is null; -delete from jrnx where j_grpt not in (select jr_grpt_id from jrn); -alter table op_predef add od_direct bool; -update op_predef set od_direct=false; -alter table op_predef alter od_direct set not null; -alter table op_predef_detail add od_qc bool; -update version set val=33; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade33.sql b/sources/html/admin/sql/patch/upgrade33.sql deleted file mode 100644 index 5c5c169..0000000 --- a/sources/html/admin/sql/patch/upgrade33.sql +++ /dev/null @@ -1,6 +0,0 @@ -begin ; - -alter table op_predef_detail rename od_qc to opd_qc; - -update version set val=34; -commit; diff --git a/sources/html/admin/sql/patch/upgrade34.sql b/sources/html/admin/sql/patch/upgrade34.sql deleted file mode 100644 index 6e158df..0000000 --- a/sources/html/admin/sql/patch/upgrade34.sql +++ /dev/null @@ -1,72 +0,0 @@ -begin; - -CREATE or replace FUNCTION t_jrn_def_sequence() RETURNS "trigger" - AS $$ -declare -nCounter integer; - - BEGIN - select count(*) into nCounter - from pg_class where relname='s_jrn_'||NEW.jrn_def_id; - if nCounter = 0 then - execute 'create sequence s_jrn_'||NEW.jrn_def_id; - raise notice 'Creating sequence s_jrn_%',NEW.jrn_def_id; - end if; - - RETURN NEW; - END; -$$ - LANGUAGE plpgsql; - -create or replace function correct_sequence_jrn () returns void -as $$ -declare - nCounter integer; - nJrn_id record; -begin - for nJrn_id in select jrn_Def_id from jrn_def loop - select count(*) into nCounter - from pg_class where relname='s_jrn_'||nJrn_id.jrn_def_id; - if nCounter = 0 then - execute 'create sequence s_jrn_'||nJrn_id.jrn_def_id; - raise notice 'Creating sequence s_jrn_%',nJrn_id.jrn_def_id; - end if; - - - end loop; -end; -$$ - LANGUAGE plpgsql; -select correct_sequence_jrn(); - -drop function correct_sequence_jrn(); - - - -CREATE OR REPLACE FUNCTION tva_delete(int4) - RETURNS void AS -$BODY$ -declare - p_tva_id alias for $1; - nCount integer; -begin - nCount=0; - select count(*) into nCount from quant_sold where qs_vat_code=p_tva_id; - if nCount != 0 then - return; - - end if; - select count(*) into nCount from quant_purchase where qp_vat_code=p_tva_id; - if nCount != 0 then - return; - - end if; - -delete from tva_rate where tva_id=p_tva_id; - return; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -update version set val=35; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade35.sql b/sources/html/admin/sql/patch/upgrade35.sql deleted file mode 100644 index bff598e..0000000 --- a/sources/html/admin/sql/patch/upgrade35.sql +++ /dev/null @@ -1,45 +0,0 @@ -begin; - - - -CREATE or replace FUNCTION t_document_modele_validate() RETURNS "trigger" - AS $$ -declare - lText text; - modified document_modele%ROWTYPE; -begin - modified=NEW; - - modified.md_filename=replace(NEW.md_filename,' ','_'); - return modified; -end; -$$ LANGUAGE plpgsql; - - - -CREATE or replace FUNCTION t_document_validate() RETURNS "trigger" - AS $$ -declare - lText text; - modified document%ROWTYPE; -begin - modified=NEW; - modified.d_filename=replace(NEW.d_filename,' ','_'); - return modified; -end; -$$ LANGUAGE plpgsql; - - -CREATE TRIGGER document_validate - BEFORE INSERT OR UPDATE ON document - FOR EACH ROW - EXECUTE PROCEDURE t_document_validate(); - -CREATE TRIGGER document_modele_validate - BEFORE INSERT OR UPDATE ON document_modele - FOR EACH ROW - EXECUTE PROCEDURE t_document_modele_validate(); - -update operation_analytique set oa_debit=j_debit from jrnx where jrnx.j_id=operation_analytique.j_id ; -update version set val=36; -commit; diff --git a/sources/html/admin/sql/patch/upgrade36.BE.sql b/sources/html/admin/sql/patch/upgrade36.BE.sql deleted file mode 100644 index aae9dbb..0000000 --- a/sources/html/admin/sql/patch/upgrade36.BE.sql +++ /dev/null @@ -1,44 +0,0 @@ -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'); diff --git a/sources/html/admin/sql/patch/upgrade36.FR.sql b/sources/html/admin/sql/patch/upgrade36.FR.sql deleted file mode 100644 index a557b08..0000000 --- a/sources/html/admin/sql/patch/upgrade36.FR.sql +++ /dev/null @@ -1,45 +0,0 @@ --- --- PostgreSQL database dump --- - -SET client_encoding = 'utf8'; -SET standard_conforming_strings = off; -SET check_function_bodies = false; -SET client_min_messages = warning; -SET escape_string_warning = off; - -SET search_path = public, pg_catalog; - --- --- Data for Name: parm_poste; Type: TABLE DATA; Schema: public; Owner: phpcompta --- - -INSERT INTO parm_poste (p_value, p_type) VALUES (1, 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES (12, 'CON'); -INSERT INTO parm_poste (p_value, p_type) VALUES (2, 'ACT'); -INSERT INTO parm_poste (p_value, p_type) VALUES (3, 'ACT'); -INSERT INTO parm_poste (p_value, p_type) VALUES (41, 'ACT'); -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, 'CON'); -INSERT INTO parm_poste (p_value, p_type) VALUES (47, 'CON'); -INSERT INTO parm_poste (p_value, p_type) VALUES (481, 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES (482, 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES (483, 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES (484, 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES (485, 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES (486, 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES (487, 'ACT'); -INSERT INTO parm_poste (p_value, p_type) VALUES (49, 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES (5, 'ACT'); -INSERT INTO parm_poste (p_value, p_type) VALUES (6, 'CHA'); -INSERT INTO parm_poste (p_value, p_type) VALUES (7, 'PAS'); -INSERT INTO parm_poste (p_value, p_type) VALUES (40, 'ACT'); - - --- --- PostgreSQL database dump complete --- - diff --git a/sources/html/admin/sql/patch/upgrade36.sql b/sources/html/admin/sql/patch/upgrade36.sql deleted file mode 100644 index 82e2f3a..0000000 --- a/sources/html/admin/sql/patch/upgrade36.sql +++ /dev/null @@ -1,695 +0,0 @@ -begin; -alter table import_tmp add n_montant numeric(20,4); -update import_tmp set n_montant=to_number(montant,'999999999.99'); -alter table import_tmp drop montant; -alter table import_tmp rename n_montant to montant; --- alter table import_tmp alter montant type numeric(20,4); -alter table import_tmp alter montant set default 0; -alter table import_tmp alter montant set not null; -alter table import_tmp alter code set not null; -alter table import_tmp alter date_exec set not null; -alter table import_tmp alter date_valeur set not null; - -COMMENT ON TABLE import_tmp IS 'Table temporaire pour l''importation des banques en format CSV'; -COMMENT ON COLUMN import_tmp.status IS 'Status w waiting, d delete t transfert'; - - -alter table poste_analytique add ga_id varchar (10); - - -CREATE or replace FUNCTION t_document_validate() RETURNS "trigger" - AS $$ -declare - lText text; - modified document%ROWTYPE; -begin - modified:=NEW; - modified.d_filename:=replace(NEW.d_filename,' ','_'); - return modified; -end; -$$ - LANGUAGE plpgsql; - - -CREATE or replace FUNCTION t_document_type_insert() RETURNS "trigger" - AS $$ -declare -nCounter integer; - BEGIN -select count(*) into nCounter from pg_class where relname='seq_doc_type_'||NEW.dt_id; -if nCounter = 0 then - execute 'create sequence seq_doc_type_'||NEW.dt_id; -end if; - RETURN NEW; - END; -$$ - LANGUAGE plpgsql; - -CREATE or replace FUNCTION t_document_modele_validate() RETURNS "trigger" - AS $$ -declare - lText text; - modified document_modele%ROWTYPE; -begin - modified:=NEW; - - modified.md_filename:=replace(NEW.md_filename,' ','_'); - return modified; -end; -$$ - LANGUAGE plpgsql; - - -CREATE TABLE groupe_analytique -( - ga_id varchar(10) NOT NULL, - pa_id int, - ga_description text, - CONSTRAINT pk_ga_id PRIMARY KEY (ga_id) -) ; - - -CREATE OR REPLACE FUNCTION group_analytic_ins_upd() - RETURNS "trigger" AS -$BODY$ -declare -name text; -begin -name:=upper(NEW.ga_id); -name:=trim(name); -name:=replace(name,' ',''); -NEW.ga_id:=name; -return NEW; -end;$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -CREATE OR REPLACE FUNCTION group_analytique_del() - RETURNS "trigger" AS -$BODY$ -begin -update poste_analytique set ga_id=null -where ga_id=OLD.ga_id; -return OLD; -end;$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -CREATE OR REPLACE FUNCTION poste_analytique_ins_upd() - RETURNS "trigger" AS -$BODY$declare -name text; -rCount record; - -begin -name:=upper(NEW.po_name); -name:=trim(name); -name:=replace(name,' ',''); -NEW.po_name:=name; - -if NEW.ga_id is NULL then -return NEW; -end if; - -if length(trim(NEW.ga_id)) = 0 then - NEW.ga_id:=NULL; - return NEW; -end if; -perform 'select ga_id from groupe_analytique where ga_id='||NEW.ga_id; -if NOT FOUND then - raise exception' Inexistent Group Analytic %',NEW.ga_id; -end if; -return NEW; -end;$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -CREATE OR REPLACE FUNCTION plan_analytic_ins_upd() - RETURNS "trigger" AS -$BODY$ -declare - name text; -begin - name:=upper(NEW.pa_name); - name:=trim(name); - name:=replace(name,' ',''); - NEW.pa_name:=name; -return NEW; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -CREATE TRIGGER t_poste_analytique_ins_upd - BEFORE INSERT OR UPDATE - ON poste_analytique - FOR EACH ROW - EXECUTE PROCEDURE poste_analytique_ins_upd(); - -CREATE TRIGGER t_plan_analytique_ins_upd - BEFORE INSERT OR UPDATE - ON plan_analytique - FOR EACH ROW - EXECUTE PROCEDURE plan_analytic_ins_upd(); - -CREATE TRIGGER t_group_analytic_del - before DELETE - ON groupe_analytique - FOR EACH ROW - EXECUTE PROCEDURE group_analytique_del(); - -CREATE TRIGGER t_group_analytic_ins_upd - BEFORE INSERT OR UPDATE - ON groupe_analytique - FOR EACH ROW - EXECUTE PROCEDURE group_analytic_ins_upd(); - - -drop TRIGGER t_upper_pa_name on plan_analytique; -drop TRIGGER t_upper_po_name on poste_analytique; -drop function upper_pa_name(); -drop function upper_po_name(); - -CREATE TABLE bud_hypothese -( - bh_id int4 NOT NULL, - bh_name text NOT NULL, - bh_saldo numeric(20,4) DEFAULT 0, - bh_description text, - pa_id int4, - CONSTRAINT pk_bud_hypo PRIMARY KEY (bh_id), - CONSTRAINT fk_bud_hypo_pa_id FOREIGN KEY (pa_id) - REFERENCES plan_analytique (pa_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE -) -WITHOUT OIDS; - -create sequence seq_bud_hypothese_bh_id; - -alter table bud_hypothese alter bh_id set default nextval('seq_bud_hypothese_bh_id'); - --- --- Name: bud_card; Type: TABLE; Schema: public; Owner: phpcompta; Tablespace: --- - -CREATE TABLE bud_card ( - bc_id integer NOT NULL, - bc_code character varying(10) NOT NULL, - bc_description text, - bc_price_unit numeric(20,4) DEFAULT 0.0 NOT NULL, - bc_unit character varying(20), - bh_id integer -); --- --- Name: TABLE bud_card; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON TABLE bud_card IS 'card for budget module'; - - --- --- Name: COLUMN bud_card.bh_id; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN bud_card.bh_id IS 'fk to bud_hypothese'; - - --- --- Name: bud_card_bc_id_seq; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE bud_card_bc_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - --- --- Name: bc_id; Type: DEFAULT; Schema: public; Owner: phpcompta --- - -ALTER TABLE bud_card ALTER COLUMN bc_id SET DEFAULT nextval('bud_card_bc_id_seq'::regclass); - - --- --- Name: pk_bud_card_bc_id; Type: CONSTRAINT; Schema: public; Owner: phpcompta; Tablespace: --- - -ALTER TABLE ONLY bud_card - ADD CONSTRAINT pk_bud_card_bc_id PRIMARY KEY (bc_id); - - --- --- Name: uq_bud_card_bc_code; Type: CONSTRAINT; Schema: public; Owner: phpcompta; Tablespace: --- - -ALTER TABLE ONLY bud_card - ADD CONSTRAINT uq_bud_card_bc_code_bh_id UNIQUE (bc_code,bh_id); - -ALTER TABLE bud_card ADD CONSTRAINT fk_bud_hypo_bh_id FOREIGN KEY (bh_id) REFERENCES bud_hypothese (bh_id) - ON UPDATE CASCADE ON DELETE CASCADE; -CREATE INDEX fki_bud_hypo_bh_id ON bud_card(bh_id); -ALTER TABLE bud_card ALTER COLUMN bh_id SET NOT NULL; - - - --- --- Name: bud_detail; Type: TABLE; Schema: public; Owner: phpcompta; Tablespace: --- - -CREATE TABLE bud_detail ( - bd_id integer NOT NULL, - po_id integer, - bc_id integer, - bh_id integer, - pcm_val poste_comptable -); - - - --- --- Name: TABLE bud_detail; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON TABLE bud_detail IS 'Detail for card '; - - --- --- Name: COLUMN bud_detail.bd_id; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN bud_detail.bd_id IS 'primary key'; - - --- --- Name: COLUMN bud_detail.po_id; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN bud_detail.po_id IS 'FK to poste_analytique'; - - --- --- Name: COLUMN bud_detail.bc_id; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN bud_detail.bc_id IS 'fk to bud_card'; - - --- --- Name: COLUMN bud_detail.pcm_val; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN bud_detail.pcm_val IS 'fk to tmp_pcmn'; - - --- --- Name: bud_detail_bd_id_seq; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE bud_detail_bd_id_seq - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - - --- --- Name: bd_id; Type: DEFAULT; Schema: public; Owner: phpcompta --- - -ALTER TABLE bud_detail ALTER COLUMN bd_id SET DEFAULT nextval('bud_detail_bd_id_seq'::regclass); - - --- --- Name: pk_bud_detail; Type: CONSTRAINT; Schema: public; Owner: phpcompta; Tablespace: --- - -ALTER TABLE ONLY bud_detail - ADD CONSTRAINT pk_bud_detail PRIMARY KEY (bd_id); - - --- --- Name: fki_bud_card; Type: INDEX; Schema: public; Owner: phpcompta; Tablespace: --- - -CREATE INDEX fki_bud_card ON bud_detail USING btree (bc_id); - - --- --- Name: fki_tmp_pcmn; Type: INDEX; Schema: public; Owner: phpcompta; Tablespace: --- - -CREATE INDEX fki_tmp_pcmn ON bud_detail USING btree (pcm_val); - - --- --- Name: fk_bud_card; Type: FK CONSTRAINT; Schema: public; Owner: phpcompta --- - -ALTER TABLE ONLY bud_detail - ADD CONSTRAINT fk_bud_card FOREIGN KEY (bc_id) REFERENCES bud_card(bc_id) ON UPDATE CASCADE ON DELETE CASCADE;; - -ALTER TABLE ONLY bud_detail - add constraint fk_bud_hypothese_not_null FOREIGN KEY (bh_id) REFERENCES bud_hypothese(bh_id) ON UPDATE CASCADE ON DELETE CASCADE;; - - --- --- Name: fk_tmp_pcmn; Type: FK CONSTRAINT; Schema: public; Owner: phpcompta --- - -ALTER TABLE ONLY bud_detail - ADD CONSTRAINT fk_tmp_pcmn FOREIGN KEY (pcm_val) REFERENCES tmp_pcmn(pcm_val) ON UPDATE CASCADE ON DELETE CASCADE; --- --- Name: bud_detail_periode; Type: TABLE; Schema: public; Owner: phpcompta; Tablespace: --- - -CREATE TABLE bud_detail_periode ( - bdp_id integer NOT NULL, - bdp_amount numeric(20,4) DEFAULT 0.0, - p_id integer NOT NULL, - bd_id integer -); - - - --- --- Name: TABLE bud_detail_periode; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON TABLE bud_detail_periode IS 'Module budget detail by periode'; - - --- --- Name: COLUMN bud_detail_periode.p_id; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN bud_detail_periode.p_id IS 'fk to parm_periode'; - - --- --- Name: COLUMN bud_detail_periode.bd_id; Type: COMMENT; Schema: public; Owner: phpcompta --- - -COMMENT ON COLUMN bud_detail_periode.bd_id IS 'fk to bud_detail'; - - --- --- Name: bud_detail_periode_bdp_id_seq; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE bud_detail_periode_bdp_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - - --- --- Name: bdp_id; Type: DEFAULT; Schema: public; Owner: phpcompta --- - -ALTER TABLE bud_detail_periode ALTER COLUMN bdp_id SET DEFAULT nextval('bud_detail_periode_bdp_id_seq'::regclass); - - --- --- Name: pk_budget_detail_period; Type: CONSTRAINT; Schema: public; Owner: phpcompta; Tablespace: --- - -ALTER TABLE ONLY bud_detail_periode - ADD CONSTRAINT pk_budget_detail_period PRIMARY KEY (bdp_id); - - --- --- Name: fk_bud_detail_bd_id; Type: FK CONSTRAINT; Schema: public; Owner: phpcompta --- - -ALTER TABLE ONLY bud_detail_periode - ADD CONSTRAINT fk_bud_detail_bd_id FOREIGN KEY (bd_id) REFERENCES bud_detail(bd_id) ON UPDATE CASCADE ON DELETE CASCADE; - - --- --- Name: fk_parm_periode; Type: FK CONSTRAINT; Schema: public; Owner: phpcompta --- - -ALTER TABLE ONLY bud_detail_periode - ADD CONSTRAINT fk_parm_periode FOREIGN KEY (p_id) REFERENCES parm_periode(p_id) ON UPDATE CASCADE ON DELETE CASCADE; - - - -CREATE OR REPLACE FUNCTION bud_detail_ins_upd() - RETURNS "trigger" AS -$BODY$declare -mline bud_detail%ROWTYPE; -begin -mline:=NEW; -if mline.po_id = -1 then - mline.po_id:=NULL; -end if; -return mline; -end;$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - - -CREATE OR REPLACE FUNCTION bud_card_ins_upd() - RETURNS "trigger" AS -$BODY$declare - sCode text; -begin - -sCode:=trim(upper(NEW.bc_code)); -sCode:=replace(sCode,' ','_'); -sCode:=substr(sCode,1,10); -NEW.bc_code:=sCode; -return NEW; -end;$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - --- --- Name: t_bud_card_ins_up; Type: TRIGGER; Schema: public; Owner: phpcompta --- - -CREATE TRIGGER t_bud_card_ins_up - BEFORE INSERT OR UPDATE ON bud_card - FOR EACH ROW - EXECUTE PROCEDURE bud_card_ins_upd(); - - --- --- Name: bud_hypothese_bh_id; Type: FK CONSTRAINT; Schema: public; Owner: phpcompta --- - -ALTER TABLE ONLY bud_card - ADD CONSTRAINT bud_hypothese_bh_id FOREIGN KEY (bh_id) REFERENCES bud_hypothese(bh_id) ON UPDATE CASCADE ON DELETE CASCADE; - - -CREATE TRIGGER t_bud_detail_ins_upd - BEFORE INSERT OR UPDATE - ON bud_detail - FOR EACH ROW - EXECUTE PROCEDURE bud_detail_ins_upd(); - - - -CREATE TABLE jrn_periode -( - jrn_def_id int4 NOT NULL, - p_id int4 NOT NULL, - status text, - CONSTRAINT jrn_periode_pk PRIMARY KEY (jrn_def_id, p_id), - CONSTRAINT jrn_per_jrn_def_id FOREIGN KEY (jrn_def_id) - REFERENCES jrn_def (jrn_def_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE, - CONSTRAINT jrn_periode_p_id FOREIGN KEY (p_id) - REFERENCES parm_periode (p_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE -); - -insert into jrn_periode(p_id,jrn_def_id,status) select p_id,jrn_def_id, - case when p_central='t' then 'CE' - when p_closed='t' then 'CL' - else 'OP' - end -from -parm_periode cross join jrn_def; - -CREATE OR REPLACE FUNCTION jrn_def_add() - RETURNS "trigger" AS -$BODY$begin -execute 'insert into jrn_periode(p_id,jrn_def_id,status) select p_id,'||NEW.jrn_def_id||', - case when p_central=true then ''CE'' - when p_closed=true then ''CL'' - else ''OP'' - end -from -parm_periode '; -return NEW; -end;$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -CREATE TRIGGER t_jrn_def_add_periode - AFTER INSERT - ON jrn_def - FOR EACH ROW - EXECUTE PROCEDURE jrn_def_add(); - -CREATE OR REPLACE FUNCTION jrn_check_periode() - RETURNS "trigger" AS -$BODY$ -declare -bClosed bool; -str_status text; -begin - -select p_closed into bClosed from parm_periode - where p_id=NEW.jr_tech_per; - -if bClosed = true then - raise exception 'Periode fermee'; -end if; - -select status into str_status from jrn_periode - where p_id =NEW.jr_tech_per and jrn_def_id=NEW.jr_def_id; - -if str_status <> 'OP' then - raise exception 'Periode fermee'; -end if; - -return NEW; -end;$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - - -CREATE TRIGGER t_check_jrn - BEFORE INSERT OR DELETE - ON jrn - FOR EACH ROW - EXECUTE PROCEDURE jrn_check_periode(); - -drop TRIGGER tr_jrn_check_balance on jrn; - -CREATE OR REPLACE FUNCTION jrn_def_delete() - RETURNS "trigger" AS -$BODY$ -declare -nb numeric; -begin -select count(*) into nb from jrn where jr_def_id=OLD.jrn_def_id; - -if nb <> 0 then - raise exception 'EFFACEMENT INTERDIT: JOURNAL UTILISE'; -end if; -return OLD; -end;$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - - -CREATE TRIGGER t_jrn_def_delete - BEFORE DELETE - ON jrn_def - FOR EACH ROW - EXECUTE PROCEDURE jrn_def_delete(); - -CREATE OR REPLACE FUNCTION proc_check_balance() - RETURNS "trigger" AS -$BODY$ -declare - diff numeric; - tt integer; -begin - if TG_OP = 'INSERT' or TG_OP='UPDATE' then - tt=NEW.jr_grpt_id; - diff:=check_balance(tt); - if diff != 0 then - raise exception 'balance error %',diff ; - end if; - return NEW; - end if; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -CREATE TRIGGER t_check_balance - AFTER INSERT OR UPDATE - ON jrn - FOR EACH ROW - EXECUTE PROCEDURE proc_check_balance(); - -INSERT INTO "action" (ac_id, ac_description) VALUES (60, 'Module Budget'); -alter table tmp_pcmn add column pcm_type text; -ALTER TABLE tmp_pcmn ALTER COLUMN pcm_type set default NULL; - - -CREATE TABLE parm_poste ( - p_value poste_comptable NOT NULL, - p_type text NOT NULL -); - - --- --- Name: TABLE parm_poste; Type: COMMENT; Schema: public; Owner: postgres --- - -COMMENT ON TABLE parm_poste IS 'Contains data for finding is the type of the account (asset)'; - - --- --- Name: parm_poste_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: --- - -ALTER TABLE ONLY parm_poste - ADD CONSTRAINT parm_poste_pkey PRIMARY KEY (p_value); - - - -CREATE OR REPLACE FUNCTION find_pcm_type(pp_value "numeric") - RETURNS text AS -$BODY$ -declare - str_type text; - str_value text; - n_value numeric; - nLength integer; -begin - str_value:=trim(to_char(pp_value,'99999999999999999999999999999')); - nLength:=length(str_value); - while nLength > 0 loop - n_value:=to_number(str_value,'99999999999999999999999999999'); - select p_type into str_type from parm_poste where p_value=n_value; - if FOUND then - return str_type; - end if; - nLength:=nLength-1; - str_value:=substring(str_value from 1 for nLength); - end loop; -return 'CON'; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -CREATE OR REPLACE FUNCTION tmp_pcmn_ins() - RETURNS "trigger" AS -$BODY$ -declare - r_record tmp_pcmn%ROWTYPE; -begin -r_record=NEW; -if length(trim(r_record.pcm_type))=0 or r_record.pcm_type is NULL then - r_record.pcm_type:=find_pcm_type(NEW.pcm_val); - return r_record; -end if; -return NEW; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -CREATE TRIGGER t_tmp_pcmn_ins - BEFORE INSERT - ON tmp_pcmn - FOR EACH ROW - EXECUTE PROCEDURE tmp_pcmn_ins(); - -update tmp_pcmn set pcm_type=find_pcm_type(pcm_val); -update version set val=37; -commit; diff --git a/sources/html/admin/sql/patch/upgrade37.sql b/sources/html/admin/sql/patch/upgrade37.sql deleted file mode 100644 index bb6dd05..0000000 --- a/sources/html/admin/sql/patch/upgrade37.sql +++ /dev/null @@ -1,43 +0,0 @@ -begin; - -CREATE OR REPLACE FUNCTION jrn_check_periode() - RETURNS "trigger" AS -$BODY$ -declare -bClosed bool; -str_status text; -ljr_tech_per jrn.jr_tech_per%TYPE; -ljr_def_id jrn.jr_def_id%TYPE; -lreturn jrn%ROWTYPE; -begin -if TG_OP='INSERT' then - 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; -end if; - -select p_closed into bClosed from parm_periode - where p_id=ljr_tech_per; - -if bClosed = true then - raise exception 'Periode fermee'; -end if; - -select status into str_status from jrn_periode - where p_id =ljr_tech_per and jrn_def_id=ljr_def_id; - -if str_status <> 'OP' then - raise exception 'Periode fermee'; -end if; - -return lreturn; -end;$BODY$ - LANGUAGE 'plpgsql' VOLATILE; -update version set val=38; -commit; diff --git a/sources/html/admin/sql/patch/upgrade38.sql b/sources/html/admin/sql/patch/upgrade38.sql deleted file mode 100644 index eb39eb6..0000000 --- a/sources/html/admin/sql/patch/upgrade38.sql +++ /dev/null @@ -1,28 +0,0 @@ -begin; -CREATE OR REPLACE FUNCTION find_pcm_type(pp_value "numeric") - RETURNS text AS -$BODY$ -declare - str_type text; - str_value text; - n_value numeric; - nLength integer; -begin - str_value:=trim(to_char(pp_value,'99999999999999999999999999999')); - nLength:=length(str_value); - while nLength > 0 loop - n_value:=to_number(str_value,'99999999999999999999999999999'); - select p_type into str_type from parm_poste where p_value=n_value; - if FOUND then - return str_type; - end if; - nLength:=nLength-1; - str_value:=substring(str_value from 1 for nLength); - end loop; -return 'CON'; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -update version set val=39; -commit; diff --git a/sources/html/admin/sql/patch/upgrade39.sql b/sources/html/admin/sql/patch/upgrade39.sql deleted file mode 100644 index 5d1db75..0000000 --- a/sources/html/admin/sql/patch/upgrade39.sql +++ /dev/null @@ -1,41 +0,0 @@ -begin; -create table info_def ( - id_type text primary key, - id_description text null -); - -comment on table info_def is 'Contains the types of additionnal info we can add to a operation'; -create or replace function info_def_ins_upd() returns trigger -AS -$$ -declare - row_info_def info_def%ROWTYPE; - str_type text; -begin -row_info_def:=NEW; -str_type:=upper(trim(NEW.id_type)); -str_type:=replace(str_type,' ',''); -str_type:=replace(str_type,',',''); -str_type:=replace(str_type,';',''); -if length(str_type) =0 then - raise exception 'id_type cannot be null'; -end if; -row_info_def.id_type:=str_type; -return row_info_def; -end; -$$ language plpgsql; -create trigger info_def_ins_upd_t before insert or update on info_def for each row execute procedure info_def_ins_upd(); - -create table jrn_info ( - ji_id serial primary key, - jr_id integer not null, - id_type text not null, - ji_value text -); -alter table jrn_info add constraint fk_jrn foreign key (jr_id) references jrn(jr_id) on delete cascade on update cascade; -alter table jrn_info add constraint fk_info_def foreign key (id_type) references info_def(id_type) on delete cascade on update cascade; -insert into info_def values ('BON_COMMANDE','Numero de bon de commande') ; -insert into info_def values ('OTHER','Info diverses'); -insert into attr_def values(30,'Numero de client'); -update version set val=40; -commit; diff --git a/sources/html/admin/sql/patch/upgrade4.sql b/sources/html/admin/sql/patch/upgrade4.sql deleted file mode 100644 index 3d76a1c..0000000 --- a/sources/html/admin/sql/patch/upgrade4.sql +++ /dev/null @@ -1,64 +0,0 @@ --- upgrade -comment on table action is 'The different privileges'; -comment on table attr_def is 'The available attributs for the cards'; -comment on table attr_min is 'The minimum attributs for the cards'; -comment on table attr_min is 'The value of attributs for the cards'; -comment on table centralized is 'The centralized journal'; -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 form is 'Forms'; -comment on table form is 'Forms content'; -comment on table jnt_fic_att_value is 'join between the card and the attribut definition'; -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 table jrnx is 'Journal: content one line for each accountancy writing'; -comment on table jrn_action is 'Possible action when we are in journal (menu)'; -comment on table jrn_def is 'Definition of a journal, his properties'; -comment on table jrn_rapt is 'Rapprochement between operation'; -comment on table jrn_type is 'Type of journal (Sell, Buy, Financial...)'; -comment on table parm_money is 'Currency conversion'; -comment on table parm_periode is 'Periode definition'; -comment on table stock_goods is 'About the goods'; -comment on table tmp_pcmn is 'Plan comptable minimum normalisé'; -comment on table tva_rate is 'Rate of vat'; -create sequence s_central; - --- create index x_jr_grpt_id on jrn (jr_grpt_id); --- create index x_j_grpt on jrnx(j_grpt); -create index x_poste on jrnx(j_poste ); -delete from jrn_action where ja_name='Impression' or ja_name = 'Recherche'; -delete from fiche where f_id not in (select f_id from jnt_fic_att_value); -alter table jrn add jr_opid int4; -alter table jrn add jr_c_opid int4; -create SEQUENCE s_central_order; -alter table centralized add c_order int4; - - --- decentralize -delete from centralized; -create sequence s_internal; -select setval('s_centralized',1,false); -update jrnx set j_centralized='f'; -alter table parm_periode add p_central bool; -alter table parm_periode alter p_central set default false; -update parm_periode set p_central ='f'; ---for uploading doc -alter table jrn add jr_pj oid ; -alter table jrn add jr_pj_name text; -alter table jrn add jr_pj_type text; - --- task 3858 -delete from user_sec_act WHERE ua_act_id =14; -delete from action where ac_id=14; -insert into action values (18,'Devise'); -insert into action values (19,'Période'); -insert into action values (20,'Voir la balance des comptes'); - --- task 3374 -insert into jrn_action (ja_id,ja_name,ja_desc,ja_url,ja_action,ja_jrn_type) -values (40,'Soldes','Voir les soldes des comptes en banques', -'user_jrn.php','action=solde','FIN'); - --- always last line -update version set val=5; diff --git a/sources/html/admin/sql/patch/upgrade40.sql b/sources/html/admin/sql/patch/upgrade40.sql deleted file mode 100644 index d0edf6b..0000000 --- a/sources/html/admin/sql/patch/upgrade40.sql +++ /dev/null @@ -1,49 +0,0 @@ -begin; - -insert into parm_code values ('DEP_PRIV',4890,'Depense a charge du gerant'); -insert into attr_def values (31,'Depense à  charge du gérant (partie privée)'); -alter table quant_purchase add qp_dep_priv numeric(20,4) default 0.0; - -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) RETURNS void - AS $$ -declare - fid_client integer; - fid_good integer; -begin - select f_id into fid_client from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(p_client); - select f_id into fid_good from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(p_fiche); - insert into quant_purchase - (qp_internal, - j_id, - qp_fiche, - qp_quantite, - qp_price, - qp_vat, - qp_vat_code, - qp_nd_amount, - qp_nd_tva, - qp_nd_tva_recup, - qp_supplier, - qp_dep_priv) - values - (p_internal, - p_j_id, - fid_good, - p_quant, - p_price, - p_vat, - p_vat_code, - p_nd_amount, - p_nd_tva, - p_nd_tva_recup, - fid_client, - p_dep_priv); - return; -end; - $$ - LANGUAGE plpgsql; - -update version set val=41; -commit; diff --git a/sources/html/admin/sql/patch/upgrade41.sql b/sources/html/admin/sql/patch/upgrade41.sql deleted file mode 100644 index 78d54a4..0000000 --- a/sources/html/admin/sql/patch/upgrade41.sql +++ /dev/null @@ -1,99 +0,0 @@ -begin; - -CREATE TABLE del_action -( - del_id serial NOT NULL, - del_name text NOT NULL, - del_time timestamp, - CONSTRAINT del_action_pkey PRIMARY KEY (del_id) -) ; - - -CREATE TABLE del_jrn -( - jr_id int4, - jr_def_id int4, - jr_montant numeric(20,4), - jr_comment text, - jr_date date, - jr_grpt_id int4, - jr_internal text, - jr_tech_date timestamp, - jr_tech_per int4, - jrn_ech date, - jr_ech date, - jr_rapt text, - jr_valid bool, - jr_opid int4, - jr_c_opid int4, - jr_pj oid, - jr_pj_name text, - jr_pj_type text, - del_jrn_date timestamp -) ; -ALTER TABLE del_jrn - ADD CONSTRAINT jr_id PRIMARY KEY(jr_id); - - -CREATE TABLE del_jrnx -( - j_id int4, - j_date date, - j_montant numeric(20,4), - j_poste poste_comptable, - j_grpt int4, - j_rapt text, - j_jrn_def int4, - j_debit bool, - j_text text, - j_centralized bool, - j_internal text, - j_tech_user text, - j_tech_date timestamp, - j_tech_per int4, - j_qcode text -) ; - -ALTER TABLE del_jrnx - ADD CONSTRAINT j_id PRIMARY KEY(j_id); - -CREATE OR REPLACE FUNCTION jrn_del() - RETURNS "trigger" AS -$BODY$ -declare -row jrn%ROWTYPE; -begin -row:=OLD; -insert into del_jrn select *,now() from jrn where jr_id=row.jr_id; -return row; -end; -$BODY$ -LANGUAGE 'plpgsql' VOLATILE; - -CREATE OR REPLACE FUNCTION jrnx_del() - RETURNS "trigger" AS -$BODY$ -declare -row jrnx%ROWTYPE; -begin -row:=OLD; -insert into del_jrnx select * from jrnx where j_id=row.j_id; -return row; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -CREATE TRIGGER t_jrnx_del - BEFORE DELETE - ON jrnx - FOR EACH ROW - EXECUTE PROCEDURE jrnx_del(); - -CREATE TRIGGER t_jrn_del - BEFORE DELETE - ON jrn - FOR EACH ROW - EXECUTE PROCEDURE jrn_del(); - -update version set val=42; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade42.sql b/sources/html/admin/sql/patch/upgrade42.sql deleted file mode 100644 index babcc60..0000000 --- a/sources/html/admin/sql/patch/upgrade42.sql +++ /dev/null @@ -1,12 +0,0 @@ -begin; - -delete from tva_rate where tva_id in (select tva_id from tva_rate group by tva_id having count(tva_id) > 1); - update quant_sold set qs_vat_code = null where qs_vat_Code not in (select tva_id from tva_rate); - update quant_purchase set qp_vat_code = null where qp_vat_Code not in (select tva_id from tva_rate); - -alter table tva_rate add constraint tva_id_pk primary key (tva_id); -alter table quant_purchase add constraint qp_vat_code_fk foreign key(qp_vat_code) references tva_rate(tva_id); -alter table quant_sold add constraint qs_vat_code_fk foreign key(qs_vat_code) references tva_rate(tva_id); - -update version set val=43; -commit; diff --git a/sources/html/admin/sql/patch/upgrade43.sql b/sources/html/admin/sql/patch/upgrade43.sql deleted file mode 100644 index 6bf6b26..0000000 --- a/sources/html/admin/sql/patch/upgrade43.sql +++ /dev/null @@ -1,4 +0,0 @@ -begin; -delete from bud_detail where bd_id not in (select bd_id from bud_detail_periode); -update version set val=44; -commit; diff --git a/sources/html/admin/sql/patch/upgrade44.sql b/sources/html/admin/sql/patch/upgrade44.sql deleted file mode 100644 index 5529317..0000000 --- a/sources/html/admin/sql/patch/upgrade44.sql +++ /dev/null @@ -1,57 +0,0 @@ -begin; -CREATE OR REPLACE FUNCTION insert_jrnx(p_date "varchar", p_montant "numeric", p_poste int4, p_grpt int4, p_jrn_def int4, p_debit bool, p_tech_user text, p_tech_per int4, p_qcode text) - RETURNS void AS -$BODY$ -declare - sCode varchar; - nCount_qcode integer; -begin - sCode=trim(p_qcode); - - -- if p_qcode is empty try to find one - if length(sCode) = 0 or p_qcode is null then - - select count(*) into nCount_qcode - from vw_poste_qcode where j_poste=p_poste; - -- if we find only one q_code for a accountancy account - -- then retrieve it - if nCount_qcode = 1 then - select j_qcode into sCode - from vw_poste_qcode where j_poste=p_poste; - else - sCode=NULL; - end if; - - end if; - - insert into jrnx - ( - j_date, - j_montant, - j_poste, - j_grpt, - j_jrn_def, - j_debit, - j_tech_user, - j_tech_per, - j_qcode - ) values - ( - to_date(p_date,'DD.MM.YYYY'), - p_montant, - p_poste, - p_grpt, - p_jrn_def, - p_debit, - p_tech_user, - p_tech_per, - sCode - ); - -return; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -update version set val=45; - diff --git a/sources/html/admin/sql/patch/upgrade45.sql b/sources/html/admin/sql/patch/upgrade45.sql deleted file mode 100644 index 696dc2b..0000000 --- a/sources/html/admin/sql/patch/upgrade45.sql +++ /dev/null @@ -1,124 +0,0 @@ -begin; - -CREATE or replace FUNCTION account_insert(p_f_id integer, p_account poste_comptable) RETURNS integer - AS $$ -declare -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nNew tmp_pcmn.pcm_val%type; -bAuto bool; -nFd_id integer; -nCount integer; -begin - - if length(trim(p_account::text)) != 0 then - raise debug 'p_account is not empty'; - select count(*) into nCount from tmp_pcmn where pcm_val=p_account; - raise notice 'found in tmp_pcm %',nCount; - if nCount !=0 then - raise notice 'this account exists in tmp_pcmn '; - perform attribut_insert(p_f_id,5,to_char(p_account,'999999999999999999999999')); - else - -- account doesn't exist, create it - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - 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); - perform attribut_insert(p_f_id,5,to_char(p_account,'999999999999999999999999')); - - end if; - else - raise notice 'p_account is empty'; - select fd_id into nFd_id from fiche where f_id=p_f_id; - bAuto:= account_auto(nFd_id); - if bAuto = true then - raise notice 'account generated automatically'; - nNew:=account_compute(p_f_id); - raise notice 'nNew %', nNew; - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(nNew); - perform account_add (nNew,sName); - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999999999999999')); - - else - -- if there is an account_base then it is the default - select fd_class_base::text into nNew from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if nNew is null or length(trim(nNew)) = 0 then - raise notice 'count is null'; - perform attribut_insert(p_f_id,5,null); - else - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999999999999999')); - end if; - end if; - end if; - -return 0; -end; -$$ - LANGUAGE plpgsql; - -CREATE or replace FUNCTION account_parent(p_account poste_comptable) RETURNS poste_comptable - AS $$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - sParent varchar; - nCount integer; -begin - sParent:=to_char(p_account,'9999999999999999'); - sParent:=trim(sParent::text); - nParent:=0; - while nParent = 0 loop - select count(*) into nCount - from tmp_pcmn - where - pcm_val = to_number(sParent,'9999999999999999'); - if nCount != 0 then - nParent:=to_number(sParent,'9999999999999999'); - end if; - sParent:= substr(sParent,1,length(sParent)-1); - if length(sParent) <= 0 then - raise exception 'Impossible de trouver le compte parent pour %',p_account; - end if; - end loop; - raise notice 'account_parent : Parent is %',nParent; - return nParent; -end; -$$ - LANGUAGE plpgsql; - -CREATE or replace FUNCTION account_update(p_f_id integer, p_account poste_comptable) RETURNS integer - AS $$ -declare -nMax fiche.f_id%type; -nCount integer; -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nJft_id attr_value.jft_id%type; -begin - - if length(trim(p_account::text)) != 0 then - select count(*) into nCount from tmp_pcmn where pcm_val=p_account; - if nCount = 0 then - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - 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; - end if; - select jft_id into njft_id from jnt_fic_att_value where f_id=p_f_id and ad_id=5; - update attr_value set av_text=p_account where jft_id=njft_id; - -return njft_id; -end; -$$ - LANGUAGE plpgsql; -update version set val=47; -commit; diff --git a/sources/html/admin/sql/patch/upgrade46.sql b/sources/html/admin/sql/patch/upgrade46.sql deleted file mode 100644 index 06a16cb..0000000 --- a/sources/html/admin/sql/patch/upgrade46.sql +++ /dev/null @@ -1,3 +0,0 @@ -begin; -update version set val=47; -commit; diff --git a/sources/html/admin/sql/patch/upgrade47.sql b/sources/html/admin/sql/patch/upgrade47.sql deleted file mode 100644 index 837e358..0000000 --- a/sources/html/admin/sql/patch/upgrade47.sql +++ /dev/null @@ -1,58 +0,0 @@ -begin; -drop function insert_jrnx(varchar,numeric,integer,integer,integer,boolean,text,integer,text); - -CREATE or replace FUNCTION insert_jrnx(p_date character varying, p_montant numeric, p_poste poste_comptable, p_grpt integer, p_jrn_def integer, p_debit boolean, p_tech_user text, p_tech_per integer, p_qcode text) RETURNS void - AS $$ -declare - sCode varchar; - nCount_qcode integer; -begin - sCode=trim(p_qcode); - - -- if p_qcode is empty try to find one - if length(sCode) = 0 or p_qcode is null then - - select count(*) into nCount_qcode - from vw_poste_qcode where j_poste=p_poste::text; - -- if we find only one q_code for a accountancy account - -- then retrieve it - if nCount_qcode = 1 then - select j_qcode into sCode - from vw_poste_qcode where j_poste=p_poste; - else - sCode=NULL; - end if; - - end if; - - insert into jrnx - ( - j_date, - j_montant, - j_poste, - j_grpt, - j_jrn_def, - j_debit, - j_tech_user, - j_tech_per, - j_qcode - ) values - ( - to_date(p_date,'DD.MM.YYYY'), - p_montant, - p_poste, - p_grpt, - p_jrn_def, - p_debit, - p_tech_user, - p_tech_per, - sCode - ); - -return; -end; -$$ -LANGUAGE plpgsql; - -update version set val=48; -commit; diff --git a/sources/html/admin/sql/patch/upgrade48.sql b/sources/html/admin/sql/patch/upgrade48.sql deleted file mode 100644 index 039a7bc..0000000 --- a/sources/html/admin/sql/patch/upgrade48.sql +++ /dev/null @@ -1,71 +0,0 @@ -begin; -create sequence s_tva start with 1000; - alter table tva_rate alter tva_id set default nextval('s_tva'); - alter table form drop constraint "$1"; - alter table form add constraint formdef_fk foreign key (fo_fr_id) references formdef(fr_id) on update cascade on delete cascade; -drop function tva_insert(integer,text,numeric,text,text); - -CREATE or replace FUNCTION tva_insert( text, numeric, text, text) -RETURNS integer - AS $_$ -declare -l_tva_id integer; -p_tva_label alias for $1; -p_tva_rate alias for $2; -p_tva_comment alias for $3; -p_tva_poste alias for $4; -debit text; -credit text; -nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit; - if nCount = 0 then return 4; end if; - -end if; -select into l_tva_id nextval('s_tva') ; -insert into tva_rate(tva_id,tva_label,tva_rate,tva_comment,tva_poste) - values (l_tva_id,p_tva_label,p_tva_rate,p_tva_comment,p_tva_poste); -return 0; -end; -$_$ - LANGUAGE plpgsql; - -CREATE TABLE todo_list ( - tl_id integer NOT NULL, - tl_date date NOT NULL, - tl_title text NOT NULL, - tl_desc text, - use_login text NOT NULL -); - - -COMMENT ON TABLE todo_list IS 'Todo list'; - - -CREATE SEQUENCE todo_list_tl_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - - -ALTER TABLE todo_list ALTER COLUMN tl_id SET DEFAULT nextval('todo_list_tl_id_seq'::regclass); - - -ALTER TABLE ONLY todo_list ADD CONSTRAINT todo_list_pkey PRIMARY KEY (tl_id); - -update version set val=49; - -commit; - diff --git a/sources/html/admin/sql/patch/upgrade49.sql b/sources/html/admin/sql/patch/upgrade49.sql deleted file mode 100644 index d3aa7ca..0000000 --- a/sources/html/admin/sql/patch/upgrade49.sql +++ /dev/null @@ -1,23 +0,0 @@ -begin; -alter table jnt_fic_attr add column jnt_order int; -update jnt_fic_attr set jnt_order = 1; -alter table jnt_fic_attr alter jnt_order set not null; -update jnt_fic_attr set jnt_order = 4 where ad_id=5; -update jnt_fic_attr set jnt_order = 120 where ad_id=6; -update jnt_fic_attr set jnt_order = 130 where ad_id=7; -update jnt_fic_attr set jnt_order = 20 where ad_id=9; -update jnt_fic_attr set jnt_order = 30 where ad_id=13; -update jnt_fic_attr set jnt_order = 40 where ad_id=14; -update jnt_fic_attr set jnt_order = 70 where ad_id=16; -update jnt_fic_attr set jnt_order = 80 where ad_id=17; -update jnt_fic_attr set jnt_order = 90 where ad_id=18; -update jnt_fic_attr set jnt_order = 400 where ad_id=23; -update jnt_fic_attr set jnt_order = 60 where ad_id=24; -update jnt_fic_attr set jnt_order = 100 where ad_id=26; -update jnt_fic_attr set jnt_order = 110 where ad_id=27; -update jnt_fic_attr set jnt_order = 50 where ad_id=15; -update jnt_fic_attr set jnt_order = 30 where ad_id=5; -update jnt_fic_attr set jnt_order = 0 where ad_id=1; - -update version set val=50; -commit; diff --git a/sources/html/admin/sql/patch/upgrade5.sql b/sources/html/admin/sql/patch/upgrade5.sql deleted file mode 100644 index 27a3bf0..0000000 --- a/sources/html/admin/sql/patch/upgrade5.sql +++ /dev/null @@ -1,97 +0,0 @@ --- create vw_client view -create view vw_client as -select a.f_id, -a.av_text as name, -b.av_text as tva_num,c.av_text as poste_comptable, -d.av_text as rue, -e.av_text as code_postal, -f.av_text as pays, -g.av_text as telephone, -h.av_text as email - from ( - select * from fiche join fiche_def using (fd_id) - join fiche_def_ref using (frd_id) - join jnt_fic_att_value using (f_id) join attr_value using (jft_id) where ad_id=1 ) a - left join ( - select * from fiche join fiche_def using (fd_id) - join fiche_def_ref using (frd_id) - join jnt_fic_att_value using (f_id) join attr_value using (jft_id) where ad_id=13 ) b using (f_id) - left join ( - select * from fiche join fiche_def using (fd_id) - join fiche_def_ref using (frd_id) - join jnt_fic_att_value using (f_id) - join attr_value using (jft_id) - where ad_id=5 ) c using (f_id) - left join ( - select * from fiche join fiche_def using (fd_id) - join fiche_def_ref using (frd_id) - join jnt_fic_att_value using (f_id) - join attr_value using (jft_id) - where ad_id=14 ) d using (f_id) - left join ( - select * from fiche join fiche_def using (fd_id) - join fiche_def_ref using (frd_id) - join jnt_fic_att_value using (f_id) - join attr_value using (jft_id) - where ad_id=15 ) e using (f_id) - left join ( - select * from fiche join fiche_def using (fd_id) - join fiche_def_ref using (frd_id) - join jnt_fic_att_value using (f_id) - join attr_value using (jft_id) - where ad_id=16 ) f using (f_id) - left join ( - select * from fiche join fiche_def using (fd_id) - join fiche_def_ref using (frd_id) - join jnt_fic_att_value using (f_id) - join attr_value using (jft_id) - where ad_id=17 ) g using (f_id) - left join ( - select * from fiche join fiche_def using (fd_id) - join fiche_def_ref using (frd_id) - join jnt_fic_att_value using (f_id) - join attr_value using (jft_id) - where ad_id=18 ) h using (f_id) -where a.frd_id=9; - --- all the min attribut for card reference - -create view vw_fiche_min - as select frd_id, ad_id, ad_text, frd_text, frd_class_base - from - attr_min join attr_Def using (ad_id) - join fiche_Def_ref using (frd_id); --- definition for card -create view vw_fiche_Def as - SELECT fd_id, - ad_id, - ad_text, - fd_class_base, - fd_label, - fd_create_account, - frd_id - FROM jnt_fic_attr - JOIN attr_def USING (ad_id) - JOIN fiche_def USING (fd_id); - --- comments -comment on view vw_fiche_min is 'minimum attribut for reference card'; -comment on view vw_fiche_def is 'all the attributs for card family'; -comment on view vw_client is 'minimum attribut for the customer (frd_id=9)'; - --- new table : parameter -create table parameter ( - pr_id text primary key, - pr_value text -); - -insert into parameter (pr_id) values ('MY_NAME'); -insert into parameter (pr_id) values ('MY_CP'); -insert into parameter (pr_id) values ('MY_COMMUNE'); -insert into parameter (pr_id) values ('MY_TVA'); -insert into parameter (pr_id) values ('MY_STREET'); -insert into parameter (pr_id) values ('MY_NUMBER'); - - -update version set val=6; - diff --git a/sources/html/admin/sql/patch/upgrade50.sql b/sources/html/admin/sql/patch/upgrade50.sql deleted file mode 100644 index f2af255..0000000 --- a/sources/html/admin/sql/patch/upgrade50.sql +++ /dev/null @@ -1,57 +0,0 @@ -begin; - -CREATE OR REPLACE FUNCTION insert_jrnx(p_date character varying, p_montant numeric, p_poste poste_comptable, p_grpt integer, p_jrn_def integer, p_debit boolean, p_tech_user text, p_tech_per integer, p_qcode text) - RETURNS void AS -$BODY$ -declare - sCode varchar; - nCount_qcode integer; -begin - sCode=trim(p_qcode); - - -- if p_qcode is empty try to find one - if length(sCode) = 0 or p_qcode is null then - - select count(*) into nCount_qcode - from vw_poste_qcode where j_poste=p_poste::text; - -- if we find only one q_code for a accountancy account - -- then retrieve it - if nCount_qcode = 1 then - select j_qcode::text into sCode - from vw_poste_qcode where j_poste=p_poste::text; - else - sCode=NULL; - end if; - - end if; - - insert into jrnx - ( - j_date, - j_montant, - j_poste, - j_grpt, - j_jrn_def, - j_debit, - j_tech_user, - j_tech_per, - j_qcode - ) values - ( - to_date(p_date,'DD.MM.YYYY'), - p_montant, - p_poste, - p_grpt, - p_jrn_def, - p_debit, - p_tech_user, - p_tech_per, - sCode - ); - -return; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; -update version set val=51; -commit; diff --git a/sources/html/admin/sql/patch/upgrade51.sql b/sources/html/admin/sql/patch/upgrade51.sql deleted file mode 100644 index 7bd1820..0000000 --- a/sources/html/admin/sql/patch/upgrade51.sql +++ /dev/null @@ -1,4 +0,0 @@ -begin; -insert into parameter values ('MY_STRICT','N'); -update version set val=52; -commit; diff --git a/sources/html/admin/sql/patch/upgrade52.sql b/sources/html/admin/sql/patch/upgrade52.sql deleted file mode 100644 index 61332e3..0000000 --- a/sources/html/admin/sql/patch/upgrade52.sql +++ /dev/null @@ -1,37 +0,0 @@ -begin; -CREATE TABLE mod_payment ( - mp_id serial, - mp_lib text NOT NULL, - mp_jrn_def_id integer NOT NULL, - mp_type character varying(3) NOT NULL, - mp_fd_id bigint , - mp_qcode text -); -COMMENT ON TABLE mod_payment IS 'Contains the different media of payment and the corresponding ledger'; - -INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (2, 'Caisse', 1, 'VEN', NULL, NULL); -INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (4, 'Caisse', 1, 'ACH', NULL, NULL); -INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (1, 'Paiement électronique', 1, 'VEN', NULL, NULL); -INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (3, 'Par gérant ou administrateur', 2, 'ACH', NULL, NULL); - -ALTER TABLE ONLY mod_payment - ADD CONSTRAINT mod_payment_pkey PRIMARY KEY (mp_id); -ALTER TABLE ONLY mod_payment - ADD CONSTRAINT mod_payment_mp_fd_id_fkey FOREIGN KEY (mp_fd_id) REFERENCES fiche_def(fd_id); -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); -INSERT INTO document_type (dt_id, dt_value) VALUES (10, 'Note de frais'); - -insert into fiche_def_ref (frd_id,frd_text) values (25,'Compte Salarié / Administrateur'); -insert into attr_min values (25,1); -insert into attr_min values(25,4); -insert into attr_min values (25,3); -insert into attr_min values(25,5); -insert into attr_min values (25,15); -insert into attr_min values(25,16); -insert into attr_min values(25,24); -insert into attr_min values(25,23); - - -update version set val=53; -commit; diff --git a/sources/html/admin/sql/patch/upgrade53.sql b/sources/html/admin/sql/patch/upgrade53.sql deleted file mode 100644 index c422c5a..0000000 --- a/sources/html/admin/sql/patch/upgrade53.sql +++ /dev/null @@ -1,52 +0,0 @@ -begin; -CREATE OR REPLACE FUNCTION html_quote(p_string text) - RETURNS text AS -$BODY$ -declare - r text; -begin - r:=p_string; - r:=replace(r,'<','<'); - r:=replace(r,'>','>'); - r:=replace(r,'''','"'); - return r; -end;$BODY$ - LANGUAGE plpgsql; - -COMMENT ON FUNCTION html_quote(text) IS 'remove harmfull HTML char'; - -CREATE OR REPLACE FUNCTION tva_modify(integer, text, numeric, text, text) - RETURNS integer AS -$BODY$ -declare -p_tva_id alias for $1; -p_tva_label alias for $2; -p_tva_rate alias for $3; -p_tva_comment alias for $4; -p_tva_poste alias for $5; -debit text; -credit text; -nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::poste_comptable; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::poste_comptable; - if nCount = 0 then return 4; end if; - -end if; -update tva_rate set tva_label=p_tva_label,tva_rate=p_tva_rate,tva_comment=p_tva_comment,tva_poste=p_tva_poste - where tva_id=p_tva_id; -return 0; -end; -$BODY$ - LANGUAGE plpgsql; -update version set val=54; -commit; diff --git a/sources/html/admin/sql/patch/upgrade54.sql b/sources/html/admin/sql/patch/upgrade54.sql deleted file mode 100644 index ece0035..0000000 --- a/sources/html/admin/sql/patch/upgrade54.sql +++ /dev/null @@ -1,52 +0,0 @@ -begin; -create or replace function fiche_attribut_synchro (p_fd_id fiche_def.fd_id%TYPE) returns void as -$BODY$ -declare - -- this sql gives the f_id and the missing attribute (ad_id) - list_missing cursor for select f_id,fd_id,ad_id,jnt_order from jnt_fic_attr join fiche as A using (fd_id) where fd_id=p_fd_id and ad_id not in (select ad_id from fiche join jnt_fic_att_value using (f_id) where fd_id=jnt_fic_attr.fd_id and A.f_id=f_id); - rec record; - -- value of the last insert - jnt jnt_fic_att_value%ROWTYPE; -begin - open list_missing; - loop - - fetch list_missing into rec; - IF NOT FOUND then - exit; - end if; - -- insert a value into jnt_fic_att_value - insert into jnt_fic_att_value (f_id,ad_id) values (rec.f_id,rec.ad_id) returning * into jnt; - - -- now we insert into attr_value - insert into attr_value values (jnt.jft_id,''); - end loop; - close list_missing; -end; -$BODY$ language plpgsql; - -create or replace function attribute_correct_order () returns void as -$BODY$ -declare - crs_correct cursor for select A.jnt_id,A.jnt_order from jnt_fic_attr as A join jnt_fic_attr as B using (fd_id) where A.jnt_order=B.jnt_order and A.jnt_id > B.jnt_id; - rec record; -begin - open crs_correct; - loop - fetch crs_correct into rec; - if NOT FOUND then - close crs_correct; - return; - end if; - update jnt_fic_attr set jnt_order=jnt_order + 1 where jnt_id = rec.jnt_id; - end loop; - close crs_correct; - perform attribute_correct_order (); -end; -$BODY$ language plpgsql; - -select fiche_attribut_synchro(fd_id) from fiche_def; -select attribute_correct_order(); -update version set val=55; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade55.sql b/sources/html/admin/sql/patch/upgrade55.sql deleted file mode 100644 index 447fe32..0000000 --- a/sources/html/admin/sql/patch/upgrade55.sql +++ /dev/null @@ -1,6 +0,0 @@ -begin; -alter table import_tmp alter bq_account type text; - -update version set val=56; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade56.sql b/sources/html/admin/sql/patch/upgrade56.sql deleted file mode 100644 index 044c41c..0000000 --- a/sources/html/admin/sql/patch/upgrade56.sql +++ /dev/null @@ -1,168 +0,0 @@ -begin; -CREATE OR REPLACE FUNCTION create_missing_sequence() - RETURNS integer AS -$BODY$ -declare -p_sequence text; -nSeq integer; -c1 cursor for select jrn_def_id from jrn_def; -begin - open c1; - loop - fetch c1 into nSeq; - if not FOUND THEN - close c1; - return 0; - end if; - p_sequence:='s_jrn_pj'||nSeq::text; - execute 'create sequence '||p_sequence; - end loop; -close c1; -return 0; - -end; -$BODY$ -LANGUAGE 'plpgsql'; - -select create_missing_sequence(); - - -CREATE OR REPLACE FUNCTION drop_index(p_constraint character varying) - RETURNS void AS -$BODY$ -declare - nCount integer; -begin - select count(*) into nCount from pg_indexes where indexname=p_constraint; - if nCount = 1 then - execute 'drop index '||p_constraint ; - end if; -end; -$BODY$ -LANGUAGE 'plpgsql'; --- on dossier - -insert into parameter (pr_id,pr_value) values ('MY_TVA_USE','Y'); -insert into parameter (pr_id,pr_value) values ('MY_PJ_SUGGEST','Y'); - --- new security -alter table action add ac_module text; -alter table action add ac_code varchar(9); -create unique index uj_login_uj_jrn_id on user_sec_jrn(uj_login,uj_jrn_id); - --- PostgreSQL database dump --- -delete from user_Sec_act; -delete from action; - -COMMENT ON TABLE action IS 'The different privileges'; -select drop_index('x_act'); - -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (100, 'Accès en lecture', 'budget', 'BUDLEC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (110, 'Création hypothèse', 'budget', 'BUDHYP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (120, 'Création de fiche', 'budget', 'BUDFIC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (130, 'Impression', 'budget', 'BUDIMP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (210, 'Ajout de plan analytique', 'compta_anal', 'CAPA'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (220, 'Ajout de poste analytique', 'compta_anal', 'CAPO'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (230, 'Ajout de groupe analytique', 'compta_anal', 'CAGA'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (235, 'Ajout d''operation diverses', 'compta_anal', 'CAOD'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (240, 'Impression', 'compta_anal', 'CAIMP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (300, 'Gestion', 'gestion', 'GESTION'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (305, 'Import en Banque', 'gestion', 'GEBQ'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (307, 'Effacement d''opération', 'gestion', 'GEOP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (310, 'Courrier (lecture & écriture)', 'gestion', 'GECOUR'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (311, 'Fournisseur', 'gestion', 'GESUPPL'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (312, 'Client', 'gestion', 'GECUST'); --- INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (320, 'gestion de stock', 'gestion', 'GESTOCK'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (700, 'Rapport', 'impression', 'IMPRAP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (710, 'Journaux', 'impression', 'IMPJRN'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (720, 'Fiche', 'impression', 'IMPFIC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (730, 'Poste', 'impression', 'IMPPOSTE'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (740, 'Bilan', 'impression', 'IMPBIL'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (750, 'Balance', 'impression', 'IMPBAL'); -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 (1100, 'Mode comptabilité analytique', 'parametre', 'PARCA'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1110, 'Ajout de période', 'parametre', 'PARPER'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1120, 'Catégorie des fiches', 'parametre', 'PARFIC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1130, 'Document', 'parametre', 'PARDOC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1140, 'Modification journaux', 'parametre', 'PARJRN'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1150, 'TVA', 'parametre', 'PARTVA'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1160, 'Moyen de paiement', 'parametre', 'PARMP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1180, 'Clôture ', 'parametre', 'PARCLO'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1185, 'Changement du plan comptable ', 'parametre', 'PARPCMN'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1170, 'Poste Comptable de base', 'parametre', 'PARPOS'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1190, 'Centralisation', 'parametre', 'PARCENT'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1200, 'Écriture d''ouverture', 'parametre', 'PAREO'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1210, 'Mode strict', 'parametre', 'PARSTR'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1220, 'Coordonnées société', 'parametre', 'PARCOORD'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1230, 'Création de rapport', 'parametre', 'PARRAP'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1240, 'Effacement et création d''opération prédéfinie', 'parametre', 'PARPREDE'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1245, 'Sécurité du dossier', 'parametre', 'PARSEC'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1500, 'Stock (lecture)', 'stock', 'STOLE'); -INSERT INTO action (ac_id, ac_description, ac_module, ac_code) VALUES (1510, 'Stock (changement)', 'stock', 'STOWRITE'); - -ALTER TABLE jrn ADD COLUMN jr_pj_number text; -ALTER TABLE del_jrn ADD COLUMN jr_pj_number text; -ALTER TABLE jrn_def ADD COLUMN jrn_def_pj_pref text; - -update jrn_def set jrn_def_pj_pref=jrn_def_type ; - -CREATE OR REPLACE FUNCTION jrn_del() - RETURNS trigger AS -$BODY$ -declare -row jrn%ROWTYPE; -begin -row:=OLD; -insert into del_jrn ( jr_id, - jr_def_id, - jr_montant, - jr_comment, - jr_date, - jr_grpt_id, - jr_internal, - jr_tech_date, - jr_tech_per, - jrn_ech, - jr_ech, - jr_rapt, - jr_valid, - jr_opid, - jr_c_opid, - jr_pj, - jr_pj_name, - jr_pj_type, - jr_pj_number, - del_jrn_date) - select jr_id, - jr_def_id, - jr_montant, - jr_comment, - jr_date, - jr_grpt_id, - jr_internal, - jr_tech_date, - jr_tech_per, - jrn_ech, - jr_ech, - jr_rapt, - jr_valid, - jr_opid, - jr_c_opid, - jr_pj, - jr_pj_name, - jr_pj_type, - jr_pj_number - ,now() from jrn where jr_id=row.jr_id; -return row; -end; -$BODY$ -LANGUAGE 'plpgsql' ; - - - -update version set val=57; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade57.sql b/sources/html/admin/sql/patch/upgrade57.sql deleted file mode 100644 index 58ea477..0000000 --- a/sources/html/admin/sql/patch/upgrade57.sql +++ /dev/null @@ -1,43 +0,0 @@ -begin; -DROP FUNCTION tva_insert (text,numeric,text,text); - -CREATE FUNCTION tva_insert(text, numeric, text, text) RETURNS integer - AS $_$ -declare -l_tva_id integer; -p_tva_label alias for $1; -p_tva_rate alias for $2; -p_tva_comment alias for $3; -p_tva_poste alias for $4; -debit text; -credit text; -nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::poste_comptable; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::poste_comptable; - if nCount = 0 then return 4; end if; - -end if; -select into l_tva_id nextval('s_tva') ; -insert into tva_rate(tva_id,tva_label,tva_rate,tva_comment,tva_poste) - values (l_tva_id,p_tva_label,p_tva_rate,p_tva_comment,p_tva_poste); -return 0; -end; -$_$ -LANGUAGE plpgsql; - - - -update version set val=58; - -commit; - diff --git a/sources/html/admin/sql/patch/upgrade58.sql b/sources/html/admin/sql/patch/upgrade58.sql deleted file mode 100644 index c3dc895..0000000 --- a/sources/html/admin/sql/patch/upgrade58.sql +++ /dev/null @@ -1,7 +0,0 @@ -begin; -INSERT INTO format_csv_banque(name, include_file) VALUES('VMS Keytrade', 'keytrade_be.inc.php'); - -update version set val=59; - -commit; - diff --git a/sources/html/admin/sql/patch/upgrade59.sql b/sources/html/admin/sql/patch/upgrade59.sql deleted file mode 100644 index 1b9be6e..0000000 --- a/sources/html/admin/sql/patch/upgrade59.sql +++ /dev/null @@ -1,414 +0,0 @@ -begin; - -insert into parameter(pr_id,pr_value) values ('MY_CHECK_PERIODE','Y'); -alter table jrn add jr_mt text ; -update jrn set jr_mt= extract (microseconds from jr_tech_date); -create index x_mt on jrn(jr_mt); -DROP FUNCTION insert_quant_purchase(text, numeric, character varying, numeric, numeric,numeric, integer, numeric, numeric, numeric, character varying); -DROP FUNCTION insert_quant_sold(text, character varying, numeric, numeric, numeric, integer, character varying); - -alter table groupe_analytique add constraint fk_pa_id foreign key(pa_id) references plan_analytique(pa_id) on delete cascade; -alter table stock_goods add constraint fk_stock_good_f_id foreign key(f_id) references fiche(f_id) ; - -drop table invoice; - -DROP FUNCTION account_parent(poste_comptable); - -CREATE FUNCTION account_parent(p_account poste_comptable) - RETURNS poste_comptable AS -$BODY$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - sParent varchar; - nCount integer; -begin - sParent:=to_char(p_account,'9999999999999999'); - sParent:=trim(sParent::text); - nParent:=0; - while nParent = 0 loop - select count(*) into nCount - from tmp_pcmn - where - pcm_val = to_number(sParent,'9999999999999999'); - if nCount != 0 then - nParent:=to_number(sParent,'9999999999999999'); - exit; - end if; - sParent:= substr(sParent,1,length(sParent)-1); - if length(sParent) <= 0 then - raise exception 'Impossible de trouver le compte parent pour %',p_account; - end if; - end loop; - raise notice 'account_parent : Parent is %',nParent; - return nParent; -end; -$BODY$ -LANGUAGE 'plpgsql'; - -alter table document drop column d_state; - ---alter table action_gestion set ag_title type text; -ALTER TABLE action_gestion ADD COLUMN ag_hour text default null; -ALTER TABLE action_gestion ADD COLUMN ag_priority integer; -ALTER TABLE action_gestion ALTER COLUMN ag_priority SET DEFAULT 2; -ALTER TABLE action_gestion ADD COLUMN ag_dest text; -ALTER TABLE action_gestion ADD COLUMN ag_owner text; -ALTER TABLE action_gestion ADD COLUMN ag_contact int8; - -CREATE OR REPLACE FUNCTION action_gestion_ins_upd() - RETURNS trigger AS -$BODY$ -begin -NEW.ag_title := substr(trim(NEW.ag_title),1,70); -NEW.ag_hour := substr(trim(NEW.ag_hour),1,5); -return NEW; -end; -$BODY$ -LANGUAGE 'plpgsql' VOLATILE; - -CREATE TRIGGER action_gestion_t_insert_update - BEFORE INSERT OR UPDATE - ON action_gestion - FOR EACH ROW - EXECUTE PROCEDURE action_gestion_ins_upd(); - -COMMENT ON TRIGGER action_gestion_t_insert_update ON action_gestion IS 'Truncate the column ag_title to 70 char'; - -ALTER TABLE action_gestion ADD COLUMN ag_state integer; -update action_gestion set f_id_dest=f_id_exp where f_id_exp != 0; -alter table action_gestion drop column f_id_exp; -UPDATE document_state SET s_value= 'Clôturé' WHERE s_id=1; -UPDATE document_state SET s_value= 'A suivre' WHERE s_id=2; -UPDATE document_state SET s_value= 'A faire' WHERE s_id=3; -UPDATE document_state SET s_value= 'Abandonné' WHERE s_id=4; - - -CREATE TABLE action_detail -( - ad_id serial, - f_id int8, - ad_text text, - ad_pu numeric(20,4) DEFAULT 0, - ad_quant numeric(20,4) DEFAULT 0, - ad_tva_id integer DEFAULT 0, - ad_tva_amount numeric(20,4) DEFAULT 0, - ad_total_amount numeric(20,4) DEFAULT 0, - ag_id integer NOT NULL DEFAULT 0, - CONSTRAINT action_detail_pkey PRIMARY KEY (ad_id), - CONSTRAINT action_detail_ag_id_fkey FOREIGN KEY (ag_id) - REFERENCES action_gestion (ag_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE -); - -COMMENT ON TABLE action_detail IS 'Detail of action_gestion, see class Action_Detail'; --- trim the qcode -CREATE OR REPLACE 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) - RETURNS void AS -$BODY$ -declare - fid_client integer; - fid_good integer; -begin - select f_id into fid_client from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(trim(p_client)); - select f_id into fid_good from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(trim(p_fiche)); - insert into quant_purchase - (qp_internal, - j_id, - qp_fiche, - qp_quantite, - qp_price, - qp_vat, - qp_vat_code, - qp_nd_amount, - qp_nd_tva, - qp_nd_tva_recup, - qp_supplier, - qp_dep_priv) - values - (p_internal, - p_j_id, - fid_good, - p_quant, - p_price, - p_vat, - p_vat_code, - p_nd_amount, - p_nd_tva, - p_nd_tva_recup, - fid_client, - p_dep_priv); - return; -end; - $BODY$ -LANGUAGE 'plpgsql'; - -CREATE OR REPLACE 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) - RETURNS void AS -$BODY$ -declare - fid_client integer; - fid_good integer; -begin - - select f_id into fid_client from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(trim(p_client)); - select f_id into fid_good from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=upper(trim(p_fiche)); - insert into quant_sold - (qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client,qs_valid) - values - (p_internal,p_jid,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client,'Y'); - return; -end; - $BODY$ -LANGUAGE 'plpgsql'; -drop view vw_fiche_attr; - -create view vw_fiche_attr -as SELECT a.f_id, a.fd_id, a.av_text AS vw_name, b.av_text AS vw_sell, c.av_text AS vw_buy, d.av_text AS tva_code, tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label, e.av_text AS vw_addr, f.av_text AS vw_cp, j.av_text AS quick_code, h.av_text as vw_description,fiche_def.frd_id - FROM ( SELECT fiche.f_id, fiche.fd_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 1) a - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 6) b ON a.f_id = b.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 7) c ON a.f_id = c.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 2) d ON a.f_id = d.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 14) e ON a.f_id = e.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 15) f ON a.f_id = f.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 23) j ON a.f_id = j.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 9) h ON a.f_id = h.f_id - LEFT JOIN tva_rate ON d.av_text = tva_rate.tva_id::text - JOIN fiche_def USING (fd_id); - --- ajout n client dans attr_min -insert into attr_min values (2,30); -update attr_def set ad_text='Dpense charge du grant (partie prive)' where ad_id=31; - -CREATE OR REPLACE FUNCTION update_account_item_card() - RETURNS void AS -$BODY$ -declare -cCard cursor for select jft_id,fd_class_base from fiche join fiche_def using (fd_id) -join jnt_fic_att_value using (f_id) -join attr_value using (jft_id) -where -ad_id=5 and -fd_create_account=false -and av_text = ''; -njft_id integer; -sClass_base text; -begin -open cCard; -loop - fetch cCard into njft_id,sClass_base; - if NOT FOUND then - exit; - end if; - update attr_value set av_text=sClass_base where jft_id=njft_id; -end loop; - -end; -$BODY$ -LANGUAGE 'plpgsql'; - -select update_account_item_card(); - -drop function update_account_item_card(); - -delete from action where ac_module='budget'; - -drop table bud_hypothese cascade; -drop table bud_detail_periode cascade; -drop table bud_detail cascade; -drop table bud_card cascade; --- drop sequence bud_card_bc_id_seq; --- drop sequence bud_detail_bd_id_seq --- drop sequence bud_detail_bdp_id_seq; --- drop sequence bud_detail_periode_bdp_id_seq; -comment on column action.ac_code is 'this code will be used in the code with the function User::check_action '; -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 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_cal is ' visible in the calendar if = C'; -comment on column action_gestion.ag_ref_ag_id is ' concerning the action '; -comment on column action_gestion.ag_comment is ' comment of the action'; -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 person who 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 table action_gestion is 'Contains the details for the follow-up of customer, supplier, administration'; --- clean the bud part -delete from document where ag_id=0; - -INSERT INTO action(ac_id, ac_description, ac_module, ac_code) VALUES (313, 'Administration', 'gestion', 'GEADM'); -INSERT INTO action(ac_id, ac_description, ac_module, ac_code) VALUES (1600, 'Gestion des extensions', 'extension', 'EXTENSION'); -INSERT INTO action(ac_id, ac_description, ac_module, ac_code) VALUES (1701, 'Consultation', 'prvision', 'PREVCON'); -INSERT INTO action(ac_id, ac_description, ac_module, ac_code) VALUES (1702, 'Modification et cration', 'prvision', 'PREVMOD'); -update action_gestion set ag_state=2,ag_priority=2,ag_owner='phpcompta'; --- Function: extension_ins_upd() - --- DROP FUNCTION extension_ins_upd(); - -CREATE OR REPLACE FUNCTION extension_ins_upd() - RETURNS trigger AS -$BODY$ -declare - sCode text; -begin -sCode:=trim(upper(NEW.ex_code)); -sCode:=replace(sCode,' ','_'); -sCode:=substr(sCode,1,15); -sCode=upper(sCode); -NEW.ex_code:=sCode; -return NEW; - -end; - -$BODY$ -LANGUAGE 'plpgsql'; --- Table: extension - --- DROP TABLE extension; - -CREATE TABLE extension -( - ex_id serial NOT NULL, - ex_name character varying(30) NOT NULL, - ex_code character varying(15) NOT NULL, - ex_desc character varying(250), - ex_file character varying NOT NULL, - ex_enable "char" NOT NULL DEFAULT 'Y'::"char", - CONSTRAINT pk_extension PRIMARY KEY (ex_id), - CONSTRAINT idx_ex_code UNIQUE (ex_code) -); -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_code IS 'code of the extension '; -COMMENT ON COLUMN extension.ex_name 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 '; - -CREATE TRIGGER trg_extension_ins_upd - BEFORE INSERT OR UPDATE - ON extension - FOR EACH ROW - EXECUTE PROCEDURE extension_ins_upd(); - -CREATE TABLE user_sec_extension -( - use_id serial NOT NULL, - ex_id integer NOT NULL, - use_login text NOT NULL, - use_access character(1) NOT NULL DEFAULT 0, - CONSTRAINT user_sec_extension_pkey PRIMARY KEY (use_id), - CONSTRAINT user_sec_extension_ex_id_key UNIQUE (ex_id, use_login) -); -COMMENT ON TABLE user_sec_extension IS 'Security for extension'; - -CREATE TABLE forecast -( - f_id serial NOT NULL, - f_name text NOT NULL, - CONSTRAINT forecast_pk PRIMARY KEY (f_id) -); - -COMMENT ON TABLE forecast IS 'contains the name of the forecast'; - - -CREATE TABLE forecast_cat -( - fc_id serial NOT NULL, -- primary key - fc_desc text NOT NULL, -- text of the category - f_id bigint, -- Foreign key, it is the parent from the table forecast - fc_order integer NOT NULL DEFAULT 0, -- Order of the category, used when displaid - CONSTRAINT forecast_cat_pk PRIMARY KEY (fc_id), - CONSTRAINT forecast_child FOREIGN KEY (f_id) - REFERENCES forecast (f_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE -); -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'; - -CREATE TABLE forecast_item -( - fi_id serial 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" NOT NULL DEFAULT 'd'::"char", - fi_pid integer, - CONSTRAINT forecast_item_pkey PRIMARY KEY (fi_id), - CONSTRAINT card FOREIGN KEY (fi_card) - REFERENCES fiche (f_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE, - CONSTRAINT fk_forecast FOREIGN KEY (fc_id) - REFERENCES forecast_cat (fc_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE -); -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_amount IS 'Amount'; -COMMENT ON COLUMN forecast_item.fi_debit IS 'possible values are D or C'; -COMMENT ON COLUMN forecast_item.fi_order IS 'Order of showing (not used)'; -COMMENT ON COLUMN forecast_item.fi_pid IS '0 for every month, or the value parm_periode.p_id '; - -update version set val=60; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade6.sql b/sources/html/admin/sql/patch/upgrade6.sql deleted file mode 100644 index be19a83..0000000 --- a/sources/html/admin/sql/patch/upgrade6.sql +++ /dev/null @@ -1,8 +0,0 @@ -begin; ---make sure that p_start < p_end -ALTER TABLE parm_periode ADD CHECK (p_end >= p_start); -insert into tva_rate values (5,'0%',0, 'Pas soumis à la TVA',null); - - -update version set val=7; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade60.sql b/sources/html/admin/sql/patch/upgrade60.sql deleted file mode 100644 index 503bab8..0000000 --- a/sources/html/admin/sql/patch/upgrade60.sql +++ /dev/null @@ -1,40 +0,0 @@ -begin; -alter SEQUENCE document_type_dt_id_seq start 25; - -insert into document_type (dt_id,dt_value) values (20,'Réception commande Fournisseur'); -insert into document_type (dt_id,dt_value) values (21,'Réception commande Client'); -insert into document_type (dt_id,dt_value) values (22,'Réception magazine'); - -CREATE OR REPLACE FUNCTION extension_ins_upd() - RETURNS "trigger" AS -$BODY$ -declare - sCode text; - sFile text; -begin -sCode:=trim(upper(NEW.ex_code)); -sCode:=replace(sCode,' ','_'); -sCode:=substr(sCode,1,15); -sCode=upper(sCode); -NEW.ex_code:=sCode; --- remove forbidden char -sFile:=NEW.ex_file; -sFile:=replace(sFile,';','_'); -sFile:=replace(sFile,'<','_'); -sFile:=replace(sFile,'>','_'); -sFile:=replace(sFile,'..',''); -sFile:=replace(sFile,'&',''); -sFile:=replace(sFile,'|',''); - - - -return NEW; - -end; - -$BODY$ -LANGUAGE 'plpgsql'; - -update version set val=61; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade61.BE.sql b/sources/html/admin/sql/patch/upgrade61.BE.sql deleted file mode 100644 index 8339ae0..0000000 --- a/sources/html/admin/sql/patch/upgrade61.BE.sql +++ /dev/null @@ -1,13 +0,0 @@ - -begin; -insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4515,'Tva Intracomm 0%',451,'PAS'); -insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4516,'Tva Export 0%',451,'PAS'); -insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4115,'Tva Intracomm 0%',411,'ACT'); -insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4116,'Tva Export 0%',411,'ACT'); -insert into tva_rate (tva_id,tva_label,tva_rate,tva_comment,tva_poste) values (5,'INTRA',0,'Tva pour les livraisons / acquisition intra communautaires','4115,4515'); -insert into tva_rate (tva_id,tva_label,tva_rate,tva_comment,tva_poste) values (6,'EXPORT',0,'Tva pour les exportations','4116,4516'); - -update version set val=62; -commit; - - diff --git a/sources/html/admin/sql/patch/upgrade61.FR.sql b/sources/html/admin/sql/patch/upgrade61.FR.sql deleted file mode 100644 index a99bfc6..0000000 --- a/sources/html/admin/sql/patch/upgrade61.FR.sql +++ /dev/null @@ -1,90 +0,0 @@ -begin; --- insert into parm_code(p_code,p_value,p_comment)values('SUPPLIER','400','Poste comptable par défaut pour les fournisseurs'); --- update tva_rate set tva_poste = '445,445' where tva_poste is null or tva_poste='' or tva_poste like '%,0'; -update tva_rate set tva_label='FR_NOR' where tva_id= 101; -update tva_rate set tva_label='FR_RED' where tva_id= 102; -update tva_rate set tva_label='FR_SRED' where tva_id= 103; -update tva_rate set tva_label='FR_ANC' where tva_id= 105; -update tva_rate set tva_label='DOM' where tva_id= 201; -update tva_rate set tva_label='DOM_NPR' where tva_id= 202; -update tva_rate set tva_label='DOM_REDUIT' where tva_id= 203; -update tva_rate set tva_label='DOM_I' where tva_id= 204; -update tva_rate set tva_label='DOM_PRESSE' where tva_id= 205; -update tva_rate set tva_label='DOM_OCTROI' where tva_id= 206; -update tva_rate set tva_label='COR_I' where tva_id= 301; -update tva_rate set tva_label='COR_II' where tva_id= 302; -update tva_rate set tva_label='COR_III' where tva_id= 303; -update tva_rate set tva_label='COR_IV' where tva_id= 304; -update tva_rate set tva_label='INTRA' where tva_id= 401; -update tva_rate set tva_label='DOM_IMMO' where tva_id= 207; -update tva_rate set tva_label='COR_IMMO' where tva_id= 305; -update tva_rate set tva_label='INTRA_IMMMO' where tva_id= 402; -update tva_rate set tva_label='FRANCH' where tva_id= 501; -update tva_rate set tva_label='EXPORT' where tva_id= 502; -update tva_rate set tva_label='AUTRE' where tva_id= 503; -update tva_rate set tva_label='INTRA_LIV' where tva_id= 504; -update tva_rate set tva_label='FR_IMMO' where tva_id= 104; -update tmp_pcmn set pcm_type='ACT' where pcm_val in ('445661','445662','445663'); -update tva_rate set tva_poste='4456601,445701' where tva_id='104' and tva_poste='44562,0'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456601,'TVA 19,6% - France métropolitaine - Taux immobilisations Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445701,'TVA 19,6% - France métropolitaine - Taux immobilisations Collectée ','4457','PAS'); -update tva_rate set tva_poste='4456602,445702' where tva_id='105' and tva_poste='445,445'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456602,'TVA x% - France métropolitaine - Taux anciens Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445702,'TVA x% - France métropolitaine - Taux anciens Collectée ','4457','PAS'); -update tva_rate set tva_poste='4456603,445703' where tva_id='201' and tva_poste='445,445'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456603,'TVA 8,5% - DOM - Taux normal Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445703,'TVA 8,5% - DOM - Taux normal Collectée ','4457','PAS'); -update tva_rate set tva_poste='4456604,445704' where tva_id='202' and tva_poste='445,445'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456604,'TVA 8,5% - DOM - Taux normal NPR Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445704,'TVA 8,5% - DOM - Taux normal NPR Collectée ','4457','PAS'); -update tva_rate set tva_poste='4456605,445705' where tva_id='203' and tva_poste='445,445'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456605,'TVA 2,1% - DOM - Taux réduit Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445705,'TVA 2,1% - DOM - Taux réduit Collectée ','4457','PAS'); -update tva_rate set tva_poste='4456606,445706' where tva_id='204' and tva_poste='445,445'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456606,'TVA 1,75% - DOM - Taux I Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445706,'TVA 1,75% - DOM - Taux I Collectée ','4457','PAS'); -update tva_rate set tva_poste='4456607,445707' where tva_id='205' and tva_poste='445,445'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456607,'TVA 1,05% - DOM - Taux publications de presse Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445707,'TVA 1,05% - DOM - Taux publications de presse Collectée ','4457','PAS'); -update tva_rate set tva_poste='4456608,445708' where tva_id='206' and tva_poste='445,445'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456608,'TVA x% - DOM - Taux octroi de mer Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445708,'TVA x% - DOM - Taux octroi de mer Collectée ','4457','PAS'); -update tva_rate set tva_poste='4456609,445709' where tva_id='207' and tva_poste='445,0'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4456609,'TVA x% - DOM - Taux immobilisations Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (445709,'TVA x% - DOM - Taux immobilisations Collectée ','4457','PAS'); -update tva_rate set tva_poste='44566010,4457010' where tva_id='301' and tva_poste='445,445'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566010,'TVA 13% - Corse - Taux I Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457010,'TVA 13% - Corse - Taux I Collectée ','4457','PAS'); -update tva_rate set tva_poste='44566011,4457011' where tva_id='302' and tva_poste='445,445'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566011,'TVA 8% - Corse - Taux II Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457011,'TVA 8% - Corse - Taux II Collectée ','4457','PAS'); -update tva_rate set tva_poste='44566012,4457012' where tva_id='303' and tva_poste='445,445'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566012,'TVA 2,1% - Corse - Taux III Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457012,'TVA 2,1% - Corse - Taux III Collectée ','4457','PAS'); -update tva_rate set tva_poste='44566013,4457013' where tva_id='304' and tva_poste='445,445'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566013,'TVA 0,9% - Corse - Taux IV Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457013,'TVA 0,9% - Corse - Taux IV Collectée ','4457','PAS'); -update tva_rate set tva_poste='44566014,4457014' where tva_id='305' and tva_poste='445,0'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566014,'TVA x% - Corse - Taux immobilisations Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457014,'TVA x% - Corse - Taux immobilisations Collectée ','4457','PAS'); -update tva_rate set tva_poste='44566015,4457015' where tva_id='401' and tva_poste='445,445'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566015,'TVA x% - Acquisitions intracommunautaires/Pays Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457015,'TVA x% - Acquisitions intracommunautaires/Pays Collectée ','4457','PAS'); -update tva_rate set tva_poste='44566016,4457016' where tva_id='402' and tva_poste='445,0'; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566016,'TVA x% - Acquisitions intracommunautaires immobilisations/Pays Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457016,'TVA x% - Acquisitions intracommunautaires immobilisations/Pays Collectée ','4457','PAS'); -update tva_rate set tva_poste='44566017,4457017' where tva_id='501' and tva_poste=''; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566017,'TVA x% - Non imposable : Achats en franchise Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457017,'TVA x% - Non imposable : Achats en franchise Collectée ','4457','PAS'); -update tva_rate set tva_poste='44566018,4457018' where tva_id='502' and tva_poste=''; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566018,'TVA x% - Non imposable : Exports hors CE/Pays Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457018,'TVA x% - Non imposable : Exports hors CE/Pays Collectée ','4457','PAS'); -update tva_rate set tva_poste='44566019,4457019' where tva_id='503' and tva_poste=''; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566019,'TVA x% - Non imposable : Autres opérations Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457019,'TVA x% - Non imposable : Autres opérations Collectée ','4457','PAS'); -update tva_rate set tva_poste='44566020,4457020' where tva_id='504' and tva_poste=''; -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (44566020,'TVA x% - Non imposable : Livraisons intracommunautaires/Pays Déductible','4456','ACT'); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values (4457020,'TVA x% - Non imposable : Livraisons intracommunautaires/Pays Collectée ','4457','PAS'); - -update version set val=62; -commit; diff --git a/sources/html/admin/sql/patch/upgrade61.sql b/sources/html/admin/sql/patch/upgrade61.sql deleted file mode 100644 index 2ca731b..0000000 --- a/sources/html/admin/sql/patch/upgrade61.sql +++ /dev/null @@ -1,15 +0,0 @@ -begin; --- View: vw_fiche_def - -DROP VIEW vw_fiche_def; - -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 -; -COMMENT ON VIEW vw_fiche_def IS 'all the attributs for card family'; - - -commit; diff --git a/sources/html/admin/sql/patch/upgrade62.sql b/sources/html/admin/sql/patch/upgrade62.sql deleted file mode 100644 index 4b29b7a..0000000 --- a/sources/html/admin/sql/patch/upgrade62.sql +++ /dev/null @@ -1,9 +0,0 @@ -begin; --- View: vw_fiche_def - -create index jnt_fic_att_value_fd_id_idx on jnt_fic_att_value(f_id); -create index jnt_fic_attr_fd_id_idx on jnt_fic_attr(fd_id); - -update version set val=63; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade63.sql b/sources/html/admin/sql/patch/upgrade63.sql deleted file mode 100644 index afaf0b8..0000000 --- a/sources/html/admin/sql/patch/upgrade63.sql +++ /dev/null @@ -1,62 +0,0 @@ -begin; - -DROP FUNCTION insert_jrnx(character varying, numeric, poste_comptable, integer, integer, boolean, text, integer, text); - -CREATE OR REPLACE FUNCTION insert_jrnx(p_date character varying, p_montant numeric, p_poste poste_comptable, 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 AS -$BODY$ -declare - sCode varchar; - nCount_qcode integer; -begin - sCode=trim(p_qcode); - - -- if p_qcode is empty try to find one - if length(sCode) = 0 or p_qcode is null then - select count(*) into nCount_qcode - from vw_poste_qcode where j_poste=p_poste::text; - -- if we find only one q_code for a accountancy account - -- then retrieve it - if nCount_qcode = 1 then - select j_qcode::text into sCode - from vw_poste_qcode where j_poste=p_poste::text; - else - sCode=NULL; - end if; - - end if; - - insert into jrnx - ( - j_date, - j_montant, - j_poste, - j_grpt, - j_jrn_def, - j_debit, - j_text, - j_tech_user, - j_tech_per, - j_qcode - ) values - ( - to_date(p_date,'DD.MM.YYYY'), - p_montant, - p_poste, - p_grpt, - p_jrn_def, - p_debit, - p_comment, - p_tech_user, - p_tech_per, - sCode - ); - -return; -end; -$BODY$ -LANGUAGE plpgsql; - -update version set val=64; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade64.sql b/sources/html/admin/sql/patch/upgrade64.sql deleted file mode 100644 index a580f84..0000000 --- a/sources/html/admin/sql/patch/upgrade64.sql +++ /dev/null @@ -1,67 +0,0 @@ -begin; - -DROP VIEW vw_fiche_attr; - -CREATE OR REPLACE VIEW vw_fiche_attr AS - SELECT a.f_id, a.fd_id, a.av_text AS vw_name, b.av_text AS vw_sell, c.av_text AS vw_buy, d.av_text AS tva_code, tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label, e.av_text AS vw_addr, f.av_text AS vw_cp, j.av_text AS quick_code, h.av_text AS vw_description, i.av_text AS tva_num, fiche_def.frd_id - FROM ( SELECT fiche.f_id, fiche.fd_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 1) a - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 6) b ON a.f_id = b.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 7) c ON a.f_id = c.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 2) d ON a.f_id = d.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 14) e ON a.f_id = e.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 15) f ON a.f_id = f.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 23) j ON a.f_id = j.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 9) h ON a.f_id = h.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 13) i ON a.f_id = i.f_id - LEFT JOIN tva_rate ON d.av_text = tva_rate.tva_id::text - JOIN fiche_def USING (fd_id); - -update version set val=65; - -commit; - diff --git a/sources/html/admin/sql/patch/upgrade65.sql b/sources/html/admin/sql/patch/upgrade65.sql deleted file mode 100644 index b1d1ce2..0000000 --- a/sources/html/admin/sql/patch/upgrade65.sql +++ /dev/null @@ -1,4 +0,0 @@ -begin; -SELECT setval('public.mod_payment_mp_id_seq', 10, true); -update version set val=66; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade66.sql b/sources/html/admin/sql/patch/upgrade66.sql deleted file mode 100644 index 219a1d7..0000000 --- a/sources/html/admin/sql/patch/upgrade66.sql +++ /dev/null @@ -1,134 +0,0 @@ -begin; - -drop function account_insert(p_f_id integer, p_account poste_comptable); - -CREATE OR REPLACE FUNCTION account_insert(p_f_id integer, p_account text) - RETURNS integer AS -$BODY$ -declare -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nNew tmp_pcmn.pcm_val%type; -bAuto bool; -nFd_id integer; -nCount integer; -first text; -second text; -begin - - if 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'; - select count(*) into nCount from tmp_pcmn where pcm_val=p_account; - 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,p_account); - else - -- account doesn't exist, create it - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - - nParent:=account_parent(p_account::poste_comptable); - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::poste_comptable,sName,nParent); - perform attribut_insert(p_f_id,5,p_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 'p_account is empty'; - select fd_id into nFd_id from fiche where f_id=p_f_id; - bAuto:= account_auto(nFd_id); - if bAuto = true then - raise notice 'account generated automatically'; - nNew:=account_compute(p_f_id); - raise notice 'nNew %', nNew; - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(nNew); - perform account_add (nNew,sName); - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999999999999999')); - - else - -- if there is an account_base then it is the default - select fd_class_base::text into nNew from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if nNew is null or length(trim(nNew)) = 0 then - raise notice 'count is null'; - perform attribut_insert(p_f_id,5,null); - else - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999999999999999')); - end if; - end if; - end if; - -return 0; -end; -$BODY$ -LANGUAGE 'plpgsql'; - -drop function account_update(p_f_id integer, p_account poste_comptable); - -CREATE OR REPLACE FUNCTION account_update(p_f_id integer, p_account text) - RETURNS integer AS -$BODY$ -declare -nMax fiche.f_id%type; -nCount integer; -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nJft_id attr_value.jft_id%type; -first text; -second text; -begin - - if length(trim(p_account)) != 0 then - if position (',' in p_account) = 0 then - select count(*) into nCount from tmp_pcmn where pcm_val=p_account; - if nCount = 0 then - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(p_account::poste_comptable); - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::poste_comptable,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; - end if; - end if; - select jft_id into njft_id from jnt_fic_att_value where f_id=p_f_id and ad_id=5; - update attr_value set av_text=p_account where jft_id=njft_id; - -return njft_id; -end; -$BODY$ -LANGUAGE 'plpgsql'; - -update version set val=67; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade67.sql b/sources/html/admin/sql/patch/upgrade67.sql deleted file mode 100644 index 203b1b5..0000000 --- a/sources/html/admin/sql/patch/upgrade67.sql +++ /dev/null @@ -1,177 +0,0 @@ -begin; - -DROP VIEW vw_fiche_def; -DROP VIEW vw_supplier; -DROP VIEW vw_client; - -alter table fiche_def alter fd_class_base type text; -CREATE OR REPLACE 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; - -COMMENT ON VIEW vw_fiche_def IS 'all the attributs for card family'; - -CREATE OR REPLACE VIEW vw_supplier AS - SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email - FROM ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 1) a - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 13) b USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 23) a1 USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 5) c USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 14) d USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 15) e USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 16) f USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 17) g USING (f_id) - LEFT JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 18) h USING (f_id) - WHERE a.frd_id = 8; -CREATE OR REPLACE VIEW vw_client AS - SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email - FROM ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 1) a - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 13) b USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 23) a1 USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 5) c USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 14) d USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 15) e USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 16) f USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 17) g USING (f_id) - LEFT JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 18) h USING (f_id) - WHERE a.frd_id = 9; - - -CREATE OR REPLACE FUNCTION fiche_def_ins_upd() - RETURNS "trigger" AS -$BODY$ -begin - -if position (',' in NEW.fd_class_base) != 0 then - NEW.fd_create_account='f'; - -end if; -return NEW; -end;$BODY$ -LANGUAGE 'plpgsql'; - -CREATE TRIGGER fiche_def_ins_upd - BEFORE INSERT OR UPDATE - ON fiche_def - FOR EACH ROW - EXECUTE PROCEDURE fiche_def_ins_upd(); - -ALTER TABLE stock_goods DROP CONSTRAINT fk_stock_good_f_id; - -ALTER TABLE stock_goods - ADD CONSTRAINT fk_stock_good_f_id FOREIGN KEY (f_id) - REFERENCES fiche (f_id) MATCH SIMPLE - ON UPDATE cascade ON DELETE cascade; - -update version set val=68; -commit; diff --git a/sources/html/admin/sql/patch/upgrade68.sql b/sources/html/admin/sql/patch/upgrade68.sql deleted file mode 100644 index 5f4d72a..0000000 --- a/sources/html/admin/sql/patch/upgrade68.sql +++ /dev/null @@ -1,86 +0,0 @@ -begin; - -CREATE OR REPLACE FUNCTION account_insert(p_f_id integer, p_account text) - RETURNS integer AS -$BODY$ -declare -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nNew tmp_pcmn.pcm_val%type; -bAuto bool; -nFd_id integer; -nCount integer; -first text; -second text; -begin - - if 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'; - select count(*) into nCount from tmp_pcmn where pcm_val=p_account::poste_comptable; - 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,p_account); - else - -- account doesn't exist, create it - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - - nParent:=account_parent(p_account::poste_comptable); - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::poste_comptable,sName,nParent); - perform attribut_insert(p_f_id,5,p_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 'p_account is empty'; - select fd_id into nFd_id from fiche where f_id=p_f_id; - bAuto:= account_auto(nFd_id); - if bAuto = true then - raise notice 'account generated automatically'; - nNew:=account_compute(p_f_id); - raise notice 'nNew %', nNew; - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(nNew); - perform account_add (nNew,sName); - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999999999999999')); - - else - -- if there is an account_base then it is the default - select fd_class_base::text into nNew from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if nNew is null or length(trim(nNew)) = 0 then - raise notice 'count is null'; - perform attribut_insert(p_f_id,5,null); - else - perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999999999999999')); - end if; - end if; - end if; - -return 0; -end; -$BODY$ -LANGUAGE 'plpgsql'; - -update version set val=69; -commit; - diff --git a/sources/html/admin/sql/patch/upgrade69.sql b/sources/html/admin/sql/patch/upgrade69.sql deleted file mode 100644 index 319b634..0000000 --- a/sources/html/admin/sql/patch/upgrade69.sql +++ /dev/null @@ -1,49 +0,0 @@ -begin; - -CREATE OR REPLACE FUNCTION account_update(p_f_id integer, p_account text) - RETURNS integer AS -$BODY$ -declare -nMax fiche.f_id%type; -nCount integer; -nParent tmp_pcmn.pcm_val_parent%type; -sName varchar; -nJft_id attr_value.jft_id%type; -first text; -second text; -begin - - if length(trim(p_account)) != 0 then - if position (',' in p_account) = 0 then - select count(*) into nCount from tmp_pcmn where pcm_val=p_account::poste_comptable; - if nCount = 0 then - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(p_account::poste_comptable); - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::poste_comptable,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; - end if; - end if; - select jft_id into njft_id from jnt_fic_att_value where f_id=p_f_id and ad_id=5; - update attr_value set av_text=p_account where jft_id=njft_id; - -return njft_id; -end; -$BODY$ -LANGUAGE 'plpgsql' ; - -update version set val=70; -commit; diff --git a/sources/html/admin/sql/patch/upgrade7.sql b/sources/html/admin/sql/patch/upgrade7.sql deleted file mode 100644 index 7580a33..0000000 --- a/sources/html/admin/sql/patch/upgrade7.sql +++ /dev/null @@ -1,135 +0,0 @@ -begin; - -insert into tva_rate values (5,'0%',0, 'Pas soumis à la TVA',null); - -update fiche_def_ref set frd_class_base=2400 where frd_id=7; - --- banque n'a pas de gestion stock -delete from jnt_fic_attr where fd_id=1 and ad_id=19; --- client n'a pas de gestion stock -delete from jnt_fic_attr where fd_id=2 and ad_id=19; --- default periode for phpcompta - update user_pref set pref_periode=40 where pref_user='phpcompta'; --- create index ix_j_grp on jrnx(j_grpt); --- create index ix_jr_grp on jrn(jr_grpt_id); -update jrnx set j_tech_per = jr_tech_per from jrn where j_grpt=jr_grpt_id and j_tech_per is null; -alter table jrnx alter j_tech_per set not null; -alter table jrn alter jr_tech_per set not null; -alter table jrn alter jr_montant type numeric(20,4); -alter table jrnx alter j_montant type numeric(20,4); -alter table centralized alter c_montant type numeric(20,4); -alter table parm_money alter pm_rate type numeric(20,4); -drop view vw_fiche_attr; -alter table tva_rate alter tva_rate type numeric(8,4); --- version 8 -create view vw_fiche_attr as SELECT a.f_id, a.fd_id, a.av_text AS vw_name, b.av_text AS vw_sell, c.av_text AS vw_buy, d.av_text AS tva_code, tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label, e.av_text AS vw_addr, f.av_text AS vw_cp, fiche_def.frd_id - FROM ( SELECT fiche.f_id, fiche.fd_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 1) a - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 6) b ON a.f_id = b.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 7) c ON a.f_id = c.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 2) d ON a.f_id = d.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 14) e ON a.f_id = e.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 15) f ON a.f_id = f.f_id - LEFT JOIN tva_rate ON d.av_text = tva_rate.tva_id::text - JOIN fiche_def USING (fd_id); - - -create function check_balance (p_internal text) returns numeric as $$ -declare - amount_jrnx_debit numeric; - amount_jrnx_credit numeric; - amount_jrn numeric; -begin - select sum (j_montant) into amount_jrnx_credit - from jrnx join jrn on (j_grpt=jr_grpt_id) - where - jr_internal=p_internal - and j_debit=false; - - select sum (j_montant) into amount_jrnx_debit - from jrnx join jrn on (j_grpt=jr_grpt_id) - where - jr_internal=p_internal - and j_debit=true; - - select jr_montant into amount_jrn - from jrn - where - jr_internal=p_internal; - - if ( amount_jrnx_debit != amount_jrnx_credit ) - then - return abs(amount_jrnx_debit-amount_jrnx_credit); - end if; - if ( amount_jrn != amount_jrnx_credit) - then - return -1*abs(amount_jrn - amount_jrnx_credit); - end if; - return 0; -end; -$$ language plpgsql; - -create function proc_check_balance () returns TRIGGER as $jrn$ -declare - diff numeric; - tt text; -begin - if TG_OP = 'INSERT' then - tt=NEW.jr_internal; - diff:=check_balance(tt); - if diff != 0 then - raise exception 'Rounded error %',diff ; - end if; - return NEW; - end if; -end; -$jrn$ language plpgsql; -create trigger tr_jrn_check_balance after insert on jrn for each row execute procedure proc_check_balance(); -create table user_local_pref ( - user_id text, - parameter_type text, - parameter_value text -); -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 '; - -alter table user_local_pref add constraint pk_user_local_pref primary key (user_id,parameter_type); - -insert into user_local_pref (user_id,parameter_type,parameter_value) -select pref_user,'PERIODE',pref_periode from user_pref ; - -update version set val=8; - - -commit; diff --git a/sources/html/admin/sql/patch/upgrade70.sql b/sources/html/admin/sql/patch/upgrade70.sql deleted file mode 100644 index b064a26..0000000 --- a/sources/html/admin/sql/patch/upgrade70.sql +++ /dev/null @@ -1,4 +0,0 @@ -begin; -insert into action (ac_id,ac_description,ac_module,ac_code) values (1135,'Ajoute ou modifie des catégories de documents','parametre','PARCATDOC'); -update version set val=71; -commit; diff --git a/sources/html/admin/sql/patch/upgrade71.sql b/sources/html/admin/sql/patch/upgrade71.sql deleted file mode 100644 index 4f3833f..0000000 --- a/sources/html/admin/sql/patch/upgrade71.sql +++ /dev/null @@ -1,8 +0,0 @@ -begin; -alter table document_modele add md_affect varchar(3) default null; -update document_modele set md_affect='ACH' where md_type=10; -update document_modele set md_affect='VEN' where md_type=4; -update document_modele set md_affect='GES' where md_affect is null; -alter table document_modele alter md_affect set not null; -update version set val=72; -commit; diff --git a/sources/html/admin/sql/patch/upgrade72.sql b/sources/html/admin/sql/patch/upgrade72.sql deleted file mode 100644 index c0fc059..0000000 --- a/sources/html/admin/sql/patch/upgrade72.sql +++ /dev/null @@ -1,755 +0,0 @@ -begin; -create schema comptaproc; - - alter function account_add (poste_comptable,character varying) set schema comptaproc; - alter function account_auto (integer) set schema comptaproc; - alter function account_compute (integer) set schema comptaproc; - alter function account_insert (integer,text) set schema comptaproc; - alter function account_parent (poste_comptable) set schema comptaproc; - alter function account_update (integer,text) set schema comptaproc; - alter function action_gestion_ins_upd () set schema comptaproc; - alter function attribut_insert (integer,integer,character varying) set schema comptaproc; - alter function attribute_correct_order () set schema comptaproc; - alter function card_class_base (integer) set schema comptaproc; - alter function check_balance (integer) set schema comptaproc; - alter function correct_sequence (text,text,text) set schema comptaproc; - alter function create_missing_sequence () set schema comptaproc; - alter function drop_index (character varying) set schema comptaproc; - alter function drop_it (character varying) set schema comptaproc; - alter function extension_ins_upd () set schema comptaproc; - alter function fiche_account_parent (integer) set schema comptaproc; - alter function fiche_attribut_synchro (integer) set schema comptaproc; - alter function fiche_def_ins_upd () set schema comptaproc; - alter function find_pcm_type (numeric) set schema comptaproc; - alter function group_analytic_ins_upd () set schema comptaproc; - alter function group_analytique_del () set schema comptaproc; - alter function html_quote (text) set schema comptaproc; - alter function info_def_ins_upd () set schema comptaproc; - alter function insert_jrnx (p_date character varying, p_montant numeric, p_poste poste_comptable, p_grpt integer, p_jrn_def integer, p_debit boolean, p_tech_user text, p_tech_per integer, p_qcode text, p_comment text) set schema comptaproc; - alter 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) set schema comptaproc; - alter 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) set schema comptaproc; - alter function insert_quick_code (integer,text) set schema comptaproc; - alter function jrn_check_periode () set schema comptaproc; - alter function jrn_def_add () set schema comptaproc; - alter function jrn_def_delete () set schema comptaproc; - alter function jrn_del () set schema comptaproc; - alter function jrnx_del () set schema comptaproc; - alter function plan_analytic_ins_upd () set schema comptaproc; - alter function poste_analytique_ins_upd () set schema comptaproc; - alter function proc_check_balance () set schema comptaproc; - alter function t_document_modele_validate () set schema comptaproc; - alter function t_document_type_insert () set schema comptaproc; - alter function t_document_validate () set schema comptaproc; - alter function t_jrn_def_sequence () set schema comptaproc; - alter function tmp_pcmn_ins () set schema comptaproc; - alter function trim_cvs_quote () set schema comptaproc; - alter function trim_space_format_csv_banque () set schema comptaproc; - alter function tva_delete (integer) set schema comptaproc; - alter function tva_insert (text,numeric,text,text) set schema comptaproc; - alter function tva_modify (integer,text,numeric,text,text) set schema comptaproc; - alter function update_quick_code (integer,text) set schema comptaproc; - -set search_path to public,comptaproc; -alter table centralized DROP CONSTRAINT "$2"; -alter table jrnx DROP CONSTRAINT "$1"; - -DROP VIEW vw_client ; -DROP VIEW vw_fiche_attr ; -DROP VIEW vw_fiche_def ; -DROP VIEW vw_fiche_min ; -DROP VIEW vw_poste_qcode ; -DROP VIEW vw_supplier ; - -create domain account_type varchar(40); -alter table tmp_pcmn alter pcm_val_parent type account_type; -alter table tmp_pcmn alter pcm_val type account_type; -alter table centralized alter c_poste type account_type; -alter table del_jrnx alter j_poste type account_type; -alter table fiche_def alter fd_class_base type text; -alter table jrnx alter j_poste type account_type; -alter table parm_poste alter p_value type account_type; - -CREATE OR REPLACE VIEW vw_client AS - SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email - FROM ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 1) a - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 13) b USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 23) a1 USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 5) c USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 14) d USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 15) e USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 16) f USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 17) g USING (f_id) - LEFT JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 18) h USING (f_id) - WHERE a.frd_id = 9; - - -CREATE OR REPLACE VIEW vw_fiche_attr AS - SELECT a.f_id, a.fd_id, a.av_text AS vw_name, b.av_text AS vw_sell, c.av_text AS vw_buy, d.av_text AS tva_code, tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label, e.av_text AS vw_addr, f.av_text AS vw_cp, j.av_text AS quick_code, h.av_text AS vw_description, i.av_text AS tva_num, fiche_def.frd_id - FROM ( SELECT fiche.f_id, fiche.fd_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 1) a - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 6) b ON a.f_id = b.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 7) c ON a.f_id = c.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 2) d ON a.f_id = d.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 14) e ON a.f_id = e.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 15) f ON a.f_id = f.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 23) j ON a.f_id = j.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 9) h ON a.f_id = h.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 13) i ON a.f_id = i.f_id - LEFT JOIN tva_rate ON d.av_text = tva_rate.tva_id::text - JOIN fiche_def USING (fd_id); - -CREATE OR REPLACE 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; - -COMMENT ON VIEW vw_fiche_def IS 'all the attributs for card family'; - - -CREATE OR REPLACE 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 OR REPLACE VIEW vw_poste_qcode AS - SELECT a.f_id, a.av_text AS j_poste, b.av_text AS j_qcode - FROM ( SELECT jnt_fic_att_value.f_id, attr_value.av_text - FROM attr_value - JOIN jnt_fic_att_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 5) a - JOIN ( SELECT jnt_fic_att_value.f_id, attr_value.av_text - FROM attr_value - JOIN jnt_fic_att_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 23) b USING (f_id); - -CREATE OR REPLACE VIEW vw_poste_qcode AS - SELECT a.f_id, a.av_text AS j_poste, b.av_text AS j_qcode - FROM ( SELECT jnt_fic_att_value.f_id, attr_value.av_text - FROM attr_value - JOIN jnt_fic_att_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 5) a - JOIN ( SELECT jnt_fic_att_value.f_id, attr_value.av_text - FROM attr_value - JOIN jnt_fic_att_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 23) b USING (f_id); - -CREATE OR REPLACE VIEW vw_supplier AS - SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email - FROM ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 1) a - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 13) b USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 23) a1 USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 5) c USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 14) d USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 15) e USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 16) f USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 17) g USING (f_id) - LEFT JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 18) h USING (f_id) - WHERE a.frd_id = 8; - -alter table jrnx add CONSTRAINT fk_pcmn_val foreign key (j_poste) references tmp_pcmn (pcm_val); -alter table centralized add CONSTRAINT fk_pcmn_val foreign key (c_poste) references tmp_pcmn (pcm_val); - -drop function comptaproc.account_add (p_id poste_comptable,t character varying) ; -drop function comptaproc.account_parent (a poste_comptable) ; -drop function comptaproc.insert_jrnx (p_date character varying, p_montant numeric, p_poste poste_comptable, p_grpt integer, p_jrn_def integer, p_debit boolean, p_tech_user text, p_tech_per integer, p_qcode text, p_comment text); -drop function comptaproc.account_update(integer,text); -drop function comptaproc.find_pcm_type(numeric); -drop function comptaproc.account_compute(integer); - --- --- Name: account_update(integer, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE OR REPLACE FUNCTION comptaproc.account_update(p_f_id integer, p_account tmp_pcmn.pcm_val_parent%type ) RETURNS integer - AS $$ -declare - nMax fiche.f_id%type; - nCount integer; - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - nJft_id attr_value.jft_id%type; - first text; - second text; -begin - - if length(trim(p_account)) != 0 then - if position (',' in p_account) = 0 then - select count(*) into nCount from tmp_pcmn where pcm_val=p_account; - if nCount = 0 then - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - 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; - 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; - end if; - end if; - select jft_id into njft_id from jnt_fic_att_value where f_id=p_f_id and ad_id=5; - update attr_value set av_text=p_account where jft_id=njft_id; - -return njft_id; -end; -$$ - LANGUAGE plpgsql; - - --- --- Name: insert_jrnx(character varying, numeric, public.account_type, integer, integer, boolean, text, integer, text, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE OR REPLACE FUNCTION comptaproc.insert_jrnx(p_date character varying, p_montant numeric, p_poste tmp_pcmn.pcm_val_parent%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 - AS $$ -declare - sCode varchar; - nCount_qcode integer; -begin - sCode=trim(p_qcode); - - -- if p_qcode is empty try to find one - if length(sCode) = 0 or p_qcode is null then - select count(*) into nCount_qcode - from vw_poste_qcode where j_poste=p_poste; - -- if we find only one q_code for a accountancy account - -- then retrieve it - if nCount_qcode = 1 then - select j_qcode::text into sCode - from vw_poste_qcode where j_poste=p_poste; - else - sCode=NULL; - end if; - - end if; - - insert into jrnx - ( - j_date, - j_montant, - j_poste, - j_grpt, - j_jrn_def, - j_debit, - j_text, - j_tech_user, - j_tech_per, - j_qcode - ) values - ( - to_date(p_date,'DD.MM.YYYY'), - p_montant, - p_poste, - p_grpt, - p_jrn_def, - p_debit, - p_comment, - p_tech_user, - p_tech_per, - sCode - ); - -return; -end; -$$ - LANGUAGE plpgsql; - - --- --- Name: tva_insert(text, numeric, text, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE OR REPLACE FUNCTION comptaproc.tva_insert(text, numeric, text, text) RETURNS integer - AS $_$ -declare - l_tva_id integer; - p_tva_label alias for $1; - p_tva_rate alias for $2; - p_tva_comment alias for $3; - p_tva_poste alias for $4; - debit text; - credit text; - nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::account_type; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::account_type; - if nCount = 0 then return 4; end if; - -end if; -select into l_tva_id nextval('s_tva') ; -insert into tva_rate(tva_id,tva_label,tva_rate,tva_comment,tva_poste) - values (l_tva_id,p_tva_label,p_tva_rate,p_tva_comment,p_tva_poste); -return 0; -end; -$_$ - LANGUAGE plpgsql; - - -CREATE OR REPLACE FUNCTION comptaproc.tva_modify(integer, text, numeric, text, text) RETURNS integer - AS $_$ -declare - p_tva_id alias for $1; - p_tva_label alias for $2; - p_tva_rate alias for $3; - p_tva_comment alias for $4; - p_tva_poste alias for $5; - debit text; - credit text; - nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::account_type; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::account_type; - if nCount = 0 then return 4; end if; - -end if; -update tva_rate set tva_label=p_tva_label,tva_rate=p_tva_rate,tva_comment=p_tva_comment,tva_poste=p_tva_poste - where tva_id=p_tva_id; -return 0; -end; -$_$ - LANGUAGE plpgsql; - --- Function: comptaproc.account_add(account_type, character varying) - --- DROP FUNCTION comptaproc.account_add(account_type, character varying); - -CREATE OR REPLACE FUNCTION comptaproc.account_add(p_id account_type, p_name character varying) - RETURNS void AS -$BODY$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - nCount integer; -begin - select count(*) into nCount from tmp_pcmn where pcm_val=p_id; - 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); - end if; -return; -end ; -$BODY$ -LANGUAGE 'plpgsql'; --- Function: comptaproc.account_compute(integer) - --- DROP FUNCTION comptaproc.account_compute(integer); - -CREATE OR REPLACE FUNCTION comptaproc.account_compute(p_f_id integer) - RETURNS account_type AS -$BODY$ -declare - class_base fiche_def.fd_class_base%type; - maxcode numeric; - sResult account_type; -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; - 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; - return sResult; -end; -$BODY$ - LANGUAGE 'plpgsql' ; --- Function: comptaproc.account_insert(integer, text) - --- DROP FUNCTION comptaproc.account_insert(integer, text); - -CREATE OR REPLACE FUNCTION comptaproc.account_insert(p_f_id integer, p_account text) - RETURNS integer AS -$BODY$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - nNew tmp_pcmn.pcm_val%type; - bAuto bool; - nFd_id integer; - sClass_Base fiche_def.fd_class_base%TYPE; - nCount integer; - first text; - second text; -begin - - if 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'; - select count(*) into nCount from tmp_pcmn where pcm_val=p_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,p_account); - else - -- account doesn't exist, create it - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - - nParent:=account_parent(p_account::account_type); - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::account_type,sName,nParent); - perform attribut_insert(p_f_id,5,p_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 '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'; - nNew:=account_compute(p_f_id); - raise info 'nNew %', nNew; - select av_text into sName from - attr_value join jnt_fic_att_value using (jft_id) - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(nNew); - perform account_add (nNew,sName); - perform attribut_insert(p_f_id,5,nNew); - - else - -- if there is an account_base then it is the default - select fd_class_base::account_type into nNew from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if nNew is null or length(trim(nNew)) = 0 then - raise notice 'count is null'; - perform attribut_insert(p_f_id,5,null); - else - perform attribut_insert(p_f_id,5,nNew); - end if; - end if; - end if; - -return 0; -end; -$BODY$ - LANGUAGE 'plpgsql' ; --- Function: comptaproc.account_parent(account_type) - --- DROP FUNCTION comptaproc.account_parent(account_type); - -CREATE OR REPLACE FUNCTION comptaproc.account_parent(p_account account_type) - RETURNS account_type AS -$BODY$ -declare - sSubParent tmp_pcmn.pcm_val_parent%type; - sResult tmp_pcmn.pcm_val_parent%type; - nCount integer; -begin - if p_account is NULL then - return NULL; - end if; - sSubParent:=p_account; - while true loop - select count(*) into nCount - from tmp_pcmn - where - pcm_val = sSubParent; - if nCount != 0 then - sResult:= sSubParent; - exit; - end if; - sSubParent:= substr(sSubParent,1,length(sSubParent)-1); - if length(sSubParent) <= 0 then - raise exception 'Impossible de trouver le compte parent pour %',p_account; - end if; - raise notice 'sSubParent % % ',sSubParent,length(sSubParent); - end loop; - raise notice 'account_parent : Parent is %',sSubParent; - return sSubParent; -end; -$BODY$ - LANGUAGE 'plpgsql'; --- Function: comptaproc.card_class_base(integer) - --- DROP FUNCTION comptaproc.card_class_base(integer); -DROP FUNCTION comptaproc.card_class_base(p_f_id integer); - -CREATE OR REPLACE FUNCTION comptaproc.card_class_base(p_f_id integer) - RETURNS fiche_def.fd_class_base%TYPE AS -$BODY$ -declare - n_poste fiche_def.fd_class_base%type; -begin - - select fd_class_base into n_poste from fiche_def join fiche using -(fd_id) - where f_id=p_f_id; - if not FOUND then - raise exception 'Invalid fiche card_class_base(%)',p_f_id; - end if; -return n_poste; -end; -$BODY$ - LANGUAGE 'plpgsql' ; --- Function: comptaproc.fiche_account_parent(integer) - --- DROP FUNCTION comptaproc.fiche_account_parent(integer); - -CREATE OR REPLACE FUNCTION comptaproc.fiche_account_parent(p_f_id integer) - RETURNS poste_comptable AS -$BODY$ -declare -ret tmp_pcmn.pcm_val%TYPE; -begin - select fd_class_base into ret from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if not FOUND then - raise exception '% N''existe pas',p_f_id; - end if; - return ret; -end; -$BODY$ - LANGUAGE 'plpgsql' ; -CREATE OR REPLACE FUNCTION comptaproc.find_pcm_type(pp_value account_type) - RETURNS text AS -$BODY$ -declare - str_type parm_poste.p_type%TYPE; - str_value parm_poste.p_type%TYPE; - nLength integer; -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 - return str_type; - end if; - nLength:=nLength-1; - str_value:=substring(str_value::text from 1 for nLength)::account_type; - end loop; -return 'CON'; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; -DROP FUNCTION comptaproc.fiche_account_parent(integer); - -CREATE OR REPLACE FUNCTION comptaproc.fiche_account_parent(p_f_id integer) - RETURNS account_type AS -$BODY$ -declare -ret tmp_pcmn.pcm_val%TYPE; -begin - select fd_class_base into ret from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if not FOUND then - raise exception '% N''existe pas',p_f_id; - end if; - return ret; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -drop domain poste_comptable; - -update version set val=73; -commit; diff --git a/sources/html/admin/sql/patch/upgrade73.sql b/sources/html/admin/sql/patch/upgrade73.sql deleted file mode 100644 index d17cf2d..0000000 --- a/sources/html/admin/sql/patch/upgrade73.sql +++ /dev/null @@ -1,33 +0,0 @@ -begin; -DROP FUNCTION if exists comptaproc.get_action_tree(); - -CREATE OR REPLACE FUNCTION comptaproc.action_get_tree(p_id bigint) - RETURNS setof bigint AS -$BODY$ - -declare - e bigint; - i bigint; -begin - for e in select ag_id from action_gestion where ag_ref_ag_id=p_id - loop - if e = 0 then - return; - end if; - return next e; - for i in select ag_id from action_gestion where ag_ref_ag_id=e - loop - if i = 0 then - return; - end if; - return next i; - end loop; - end loop; - return; - -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -update version set val=74; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade74.sql b/sources/html/admin/sql/patch/upgrade74.sql deleted file mode 100644 index bfcc03a..0000000 --- a/sources/html/admin/sql/patch/upgrade74.sql +++ /dev/null @@ -1,71 +0,0 @@ -begin; - -drop function if exists comptaproc.get_pcm_tree(account_type); - -create or replace function comptaproc.get_pcm_tree(source account_type) returns setof account_type -as -$_$ -declare - i account_type; - e account_type; -begin - for i in select pcm_val from tmp_pcmn where pcm_val_parent=source - loop - return next i; - for e in select get_pcm_tree from get_pcm_tree(i) - loop - return next e; - end loop; - - end loop; - return; -end; -$_$ -language plpgsql; - -drop table if exists letter_deb; -drop table if exists letter_cred; -drop table if exists jnt_letter cascade; -create table jnt_letter( - jl_id serial not null, - jl_amount_deb numeric(20,4), - constraint jnt_letter_pk primary key (jl_id) - ); -create table letter_deb ( - ld_id serial, - j_id bigint not null, - jl_id bigint not null, - constraint letter_deb_pk primary key (ld_id), - constraint letter_deb_fk foreign key (j_id) references jrnx(j_id) on update cascade on delete cascade, - constraint jnt_deb_fk foreign key (jl_id) references jnt_letter(jl_id) on update cascade on delete cascade - ); - -create table letter_cred ( - lc_id serial, - j_id bigint not null, - jl_id bigint not null, - constraint letter_cred_pk primary key (lc_id), - constraint letter_cred_fk foreign key (j_id) references jrnx(j_id) on update cascade on delete cascade, - constraint jnt_cred_fk foreign key (jl_id) references jnt_letter(jl_id) on update cascade on delete cascade - ); - - -create or replace function comptaproc.get_letter_jnt(a bigint) returns bigint -as -$_$ -declare - nResult bigint; -begin - select jl_id into nResult from jnt_letter join letter_deb using (jl_id) where j_id = a; - if NOT FOUND then - select jl_id into nResult from jnt_letter join letter_cred using (jl_id) where j_id = a; - if NOT found then - return null; - end if; - end if; -return nResult; -end; -$_$ language plpgsql; - -update version set val=75; -commit; diff --git a/sources/html/admin/sql/patch/upgrade75.sql b/sources/html/admin/sql/patch/upgrade75.sql deleted file mode 100644 index bb4f580..0000000 --- a/sources/html/admin/sql/patch/upgrade75.sql +++ /dev/null @@ -1,156 +0,0 @@ -begin; - -drop view vw_supplier; -drop view vw_fiche_min; -drop view vw_client; - -alter table fiche_def_ref alter frd_class_base type account_type; - -create view vw_client as - SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email - FROM ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 1) a - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 13) b USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 23) a1 USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 5) c USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 14) d USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 15) e USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 16) f USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 17) g USING (f_id) - LEFT JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 18) h USING (f_id) - WHERE a.frd_id = 9; - - - - - -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_supplier as - SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email - FROM ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 1) a - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 13) b USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 23) a1 USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 5) c USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 14) d USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 15) e USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 16) f USING (f_id) - JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 17) g USING (f_id) - LEFT JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text - FROM fiche - JOIN fiche_def USING (fd_id) - JOIN fiche_def_ref USING (frd_id) - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 18) h USING (f_id) - WHERE a.frd_id = 8; - alter table attr_min add constraint frd_ad_attr_min_pk primary key (frd_id,ad_id); - -update version set val=76; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade76.sql b/sources/html/admin/sql/patch/upgrade76.sql deleted file mode 100644 index 9925949..0000000 --- a/sources/html/admin/sql/patch/upgrade76.sql +++ /dev/null @@ -1,114 +0,0 @@ -begin; -drop table if exists quant_fin; - -CREATE TABLE quant_fin -( - qf_id bigserial NOT NULL, - qf_bank bigint, - jr_id bigint, - qf_other bigint, - qf_amount numeric(20,4) DEFAULT 0, - CONSTRAINT quant_fin_pk PRIMARY KEY (qf_id), - CONSTRAINT fk_card FOREIGN KEY (qf_bank) - REFERENCES fiche (f_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE, - CONSTRAINT fk_card_other FOREIGN KEY (qf_other) - REFERENCES fiche (f_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE, - CONSTRAINT fk_jrn FOREIGN KEY (jr_id) - REFERENCES jrn (jr_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE -); -COMMENT ON TABLE quant_fin IS 'Simple operation for financial'; - -create or replace function comptaproc.fill_quant_fin() returns void as -$_$ -declare - sBank text; - sCassa text; - rec record; - recBank record; - nCount integer; - nAmount numeric; - nBank integer; - nOther integer; -begin - select p_value into sBank from parm_code where p_code='BANQUE'; - select p_value into sCassa from parm_code where p_code='CAISSE'; - - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nBank := 0; nOther:=0; - for recBank in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recBank.j_poste like sBank||'%' then - -- retrieve f_id for bank - select f_id into nBank from vw_poste_qcode where j_qcode=recBank.j_qcode; - if recBank.j_debit = false then - nAmount=recBank.j_montant*(-1); - else - nAmount=recBank.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recBank.j_qcode; - end if; - end loop; - if nBank != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nBank,nOther,nAmount); - end if; - end loop; --- only cash - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') and jr_id not in (select jr_id from quant_fin) - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nBank := 0; nOther:=0; - for recBank in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recBank.j_poste like sCassa||'%' then - -- retrieve f_id for bank - select f_id into nBank from vw_poste_qcode where j_qcode=recBank.j_qcode; - if recBank.j_debit = false then - nAmount=recBank.j_montant*(-1); - else - nAmount=recBank.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recBank.j_qcode; - end if; - end loop; - if nBank != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nBank,nOther,nAmount); - end if; - end loop; - - return; -end; -$_$ -language plpgsql; -select comptaproc.fill_quant_fin(); - -alter table del_jrn drop constraint jr_id; -alter table del_jrn add dj_id serial; -alter table del_jrn add constraint dj_id primary key(dj_id); - -alter table del_jrnx drop constraint j_id; -alter table del_jrnx add djx_id serial; -alter table del_jrnx add constraint djx_id primary key(djx_id); - -update version set val=77; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade77.sql b/sources/html/admin/sql/patch/upgrade77.sql deleted file mode 100644 index d85a80b..0000000 --- a/sources/html/admin/sql/patch/upgrade77.sql +++ /dev/null @@ -1,4 +0,0 @@ -begin; -insert into parameter(pr_id,pr_value) values ('MY_DATE_SUGGEST','Y'); -update version set val=78; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade78.sql b/sources/html/admin/sql/patch/upgrade78.sql deleted file mode 100644 index c7ebbb9..0000000 --- a/sources/html/admin/sql/patch/upgrade78.sql +++ /dev/null @@ -1,31 +0,0 @@ -begin; - -DROP FUNCTION if exists comptaproc.action_get_tree(bigint); - -CREATE OR REPLACE FUNCTION comptaproc.action_get_tree(p_id bigint) - RETURNS setof bigint AS -$BODY$ - -declare - e bigint; - i bigint; -begin - for e in select ag_id from action_gestion where ag_ref_ag_id=p_id - loop - for i in select action_get_tree from comptaproc.action_get_tree(e) - loop - raise notice ' == i %', i; - return next i; - end loop; - raise notice ' = e %', e; - return next e; - end loop; - return; - -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -update version set val=79; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade79.sql b/sources/html/admin/sql/patch/upgrade79.sql deleted file mode 100644 index 825ec74..0000000 --- a/sources/html/admin/sql/patch/upgrade79.sql +++ /dev/null @@ -1,32 +0,0 @@ -begin; - -CREATE OR REPLACE FUNCTION comptaproc.jrnx_letter_del() - RETURNS trigger AS -$BODY$ -declare -row jrnx%ROWTYPE; -begin -row:=OLD; --- remove orphan -delete from jnt_letter - where (jl_id in (select jl_id from letter_deb) and jl_id not in(select jl_id from letter_cred )) - or (jl_id not in (select jl_id from letter_deb ) and jl_id in(select jl_id from letter_cred )); -return row; -end; -$BODY$ - LANGUAGE 'plpgsql'; - -delete from jnt_letter where (jl_id in (select jl_id from letter_deb ) and jl_id not in(select jl_id from letter_cred )) or (jl_id not in (select jl_id from letter_deb ) and jl_id in(select jl_id from letter_cred )); - --- Function: comptaproc.jrnx_del() - -CREATE TRIGGER t_letter_del - AFTER DELETE - ON jrnx - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrnx_letter_del(); -COMMENT ON TRIGGER t_letter_del ON jrnx IS 'Delete the lettering for this row'; - -update version set val=80; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade8.sql b/sources/html/admin/sql/patch/upgrade8.sql deleted file mode 100644 index c78a276..0000000 --- a/sources/html/admin/sql/patch/upgrade8.sql +++ /dev/null @@ -1,112 +0,0 @@ -begin; - -insert into action values (21,'Import et export des écritures d''ouverture'); -create sequence s_quantity; - - -CREATE TABLE quant_sold ( - qs_id integer DEFAULT nextval('s_quantity'::text), - qs_internal text NOT NULL, - qs_fiche integer NOT NULL, - qs_quantite integer NOT NULL, - qs_price numeric(20,4), - qs_vat numeric(20,4), - qs_vat_code integer, - qs_client integer not null -); - -create index idx_qs_internal on quant_sold(qs_internal); - -create table format_csv_banque -( - name text primary key, - include_file text not null -); - -create sequence s_invoice; - -CREATE TABLE invoice ( - iv_id integer DEFAULT nextval('s_invoice'::text) NOT NULL, - iv_name text NOT NULL, - iv_file oid -); -alter TABLE invoice add primary key(iv_id); -create unique index ix_iv_name on invoice (upper(iv_name)); - - - --- drop trigger trim_space on format_csv_banque; --- --- drop function trim_space_format_csv_banque(); - -create function trim_space_format_csv_banque() returns trigger as $trim$ -declare - modified format_csv_banque%ROWTYPE; -begin - modified.name=trim(NEW.NAME); - modified.include_file=trim(new.include_file); - if ( length(modified.name) = 0 ) then - modified.name=null; - end if; - if ( length(modified.include_file) = 0 ) then - modified.include_file=null; - end if; - - return modified; -end; -$trim$ language plpgsql; - -create trigger trim_space before insert or update on format_csv_banque FOR EACH ROW execute procedure trim_space_format_csv_banque(); - -create unique index idx_case on format_csv_banque (upper(name)); -INSERT INTO format_csv_banque VALUES ('Fortis', 'fortis_be.inc.php'); -INSERT INTO format_csv_banque VALUES ('EUB', 'eub_be.inc.php'); -INSERT INTO format_csv_banque VALUES ('ING', 'ing_be.inc.php'); -INSERT INTO format_csv_banque VALUES ('CBC', 'cbc_be.inc.php'); - -CREATE TABLE import_tmp ( - code text not null, - date_exec date not null , - date_valeur date not null, - montant numeric(20,4) not null default 0, - devise text, - compte_ordre text, - detail text, - num_compte text, - poste_comptable text, - ok boolean DEFAULT false, - bq_account integer not null, - jrn integer not null -); -create function trim_cvs_quote() returns trigger as $trim$ -declare - modified import_tmp%ROWTYPE; -begin - modified.code=new.code; - modified.montant=new.montant; - modified.date_exec=new.date_exec; - modified.date_valeur=new.date_valeur; - modified.devise=replace(new.devise,'"',''); - modified.poste_comptable=replace(new.poste_comptable,'"',''); - modified.compte_ordre=replace(NEW.COMPTE_ORDRE,'"',''); - modified.detail=replace(NEW.DETAIL,'"',''); - modified.num_compte=replace(NEW.NUM_COMPTE,'"',''); - modified.bq_account=NEW.bq_account; - modified.jrn=NEW.jrn; - modified.ok=new.ok; - return modified; -end; -$trim$ language plpgsql; - -create trigger trim_quote before insert or update on import_tmp FOR EACH ROW execute procedure trim_cvs_quote(); -alter sequence s_attr_def restart 20; -insert into attr_def(ad_text) values ('Partie fiscalement non déductible'); -insert into attr_def(ad_text) values ('TVA non déductible'); -insert into attr_def(ad_text) values ('TVA non déductible récupérable par l''impôt'); -insert into tmp_pcmn( pcm_val,pcm_lib,pcm_val_parent,pcm_country) select distinct 6190,'TVA récupérable par l''impôt',61,'BE' from tmp_pcmn where pcm_country='BE'; -insert into tmp_pcmn( pcm_val,pcm_lib,pcm_val_parent,pcm_country) select distinct 6740,'Dépense non admise',67,'BE' from tmp_pcmn where pcm_country='BE' and not exists (select pcm_val from tmp_pcmn where pcm_val=6740); --- Change for Stan alter table tmp_pcmn alter pcm_val type text; -update version set val=9; - - -commit; diff --git a/sources/html/admin/sql/patch/upgrade80.sql b/sources/html/admin/sql/patch/upgrade80.sql deleted file mode 100644 index ea56356..0000000 --- a/sources/html/admin/sql/patch/upgrade80.sql +++ /dev/null @@ -1,4 +0,0 @@ -begin; -INSERT INTO format_csv_banque (name, include_file) VALUES ('CBC Online', 'cbc_be_ol.inc.php'); -update version set val=81; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade81.sql b/sources/html/admin/sql/patch/upgrade81.sql deleted file mode 100644 index a7b97b5..0000000 --- a/sources/html/admin/sql/patch/upgrade81.sql +++ /dev/null @@ -1,6 +0,0 @@ -begin; - -ALTER TABLE import_tmp ADD COLUMN it_pj text; - -update version set val=82; -commit; diff --git a/sources/html/admin/sql/patch/upgrade82.sql b/sources/html/admin/sql/patch/upgrade82.sql deleted file mode 100644 index 251d197..0000000 --- a/sources/html/admin/sql/patch/upgrade82.sql +++ /dev/null @@ -1,11 +0,0 @@ -begin; - -CREATE OR REPLACE VIEW vw_fiche_name AS - SELECT jnt_fic_att_value.f_id, attr_value.av_text AS name - FROM jnt_fic_att_value - JOIN attr_value USING (jft_id) - WHERE jnt_fic_att_value.ad_id = 1; - - -update version set val=83; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade83.sql b/sources/html/admin/sql/patch/upgrade83.sql deleted file mode 100644 index b95531f..0000000 --- a/sources/html/admin/sql/patch/upgrade83.sql +++ /dev/null @@ -1,165 +0,0 @@ -begin; -create or replace function comptaproc.fill_quant_fin() returns void as -$_$ -declare - sBank text; - sCassa text; - sCustomer text; - sSupplier text; - rec record; - recBank record; - recSupp_Cust record; - nCount integer; - nAmount numeric; - nBank integer; - nOther integer; - nSupp_Cust integer; -begin - select p_value into sBank from parm_code where p_code='BANQUE'; - select p_value into sCassa from parm_code where p_code='CAISSE'; - select p_value into sSupplier from parm_code where p_code='SUPPLIER'; - select p_value into sCustomer from parm_code where p_code='CUSTOMER'; - - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') - and jr_id not in (select jr_id from quant_fin) - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nBank := 0; nOther:=0; - for recBank in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recBank.j_poste like sBank||'%' then - -- retrieve f_id for bank - select f_id into nBank from vw_poste_qcode where j_qcode=recBank.j_qcode; - if recBank.j_debit = false then - nAmount=recBank.j_montant*(-1); - else - nAmount=recBank.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recBank.j_qcode; - end if; - end loop; - if nBank != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nBank,nOther,nAmount); - end if; - end loop; --- only cash - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') and jr_id not in (select jr_id from quant_fin) - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nBank := 0; nOther:=0; - for recBank in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recBank.j_poste like sCassa||'%' then - -- retrieve f_id for bank - select f_id into nBank from vw_poste_qcode where j_qcode=recBank.j_qcode; - if recBank.j_debit = false then - nAmount=recBank.j_montant*(-1); - else - nAmount=recBank.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recBank.j_qcode; - end if; - end loop; - if nBank != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nBank,nOther,nAmount); - end if; - end loop; - --- if row remains - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') and jr_id not in (select jr_id from quant_fin) - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nSupp_Cust := 0; nOther:=0; - for recSupp_Cust in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recSupp_Cust.j_poste like sSupplier||'%' then - -- retrieve f_id for bank - select f_id into nSupp_Cust from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - if recSupp_Cust.j_debit = true then - nAmount=recSupp_Cust.j_montant*(-1); - else - nAmount=recSupp_Cust.j_montant; - end if; - else if recSupp_Cust.j_poste like sCustomer||'%' then - select f_id into nSupp_Cust from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - if recSupp_Cust.j_debit = false then - nAmount=recSupp_Cust.j_montant*(-1); - else - nAmount=recSupp_Cust.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - - end if; - end if; - end loop; - if nSupp_Cust != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nOther,nSupp_Cust,nAmount); - end if; - end loop; --- if row remains --> VISA (441*) - for rec in select jr_id,jr_grpt_id from jrn - where jr_def_id in (select jrn_def_id from jrn_def where jrn_def_type='FIN') and jr_id not in (select jr_id from quant_fin) - loop - -- there are only 2 lines for bank operations - -- first debit - select count(j_id) into nCount from jrnx where j_grpt=rec.jr_grpt_id; - if nCount > 2 then - raise notice 'Trop de valeur pour jr_grpt_id % count %',rec.jr_grpt_id,nCount; - return; - end if; - nSupp_Cust := 0; nOther:=0; - for recSupp_Cust in select j_id, j_montant,j_debit,j_qcode,j_poste from jrnx where j_grpt=rec.jr_grpt_id - loop - if recSupp_Cust.j_poste like '441%' then - -- retrieve f_id for bank - select f_id into nSupp_Cust from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - if recSupp_Cust.j_debit = false then - nAmount=recSupp_Cust.j_montant*(-1); - else - nAmount=recSupp_Cust.j_montant; - end if; - else - select f_id into nOther from vw_poste_qcode where j_qcode=recSupp_Cust.j_qcode; - - - end if; - end loop; - if nSupp_Cust != 0 and nOther != 0 then - insert into quant_fin (jr_id,qf_bank,qf_other,qf_amount) values (rec.jr_id,nOther,nSupp_Cust,nAmount); - end if; - end loop; - return; -end; -$_$ -language plpgsql; -select comptaproc.fill_quant_fin(); - -update jrnx set j_date=jr_date from jrn where j_grpt=jr_grpt_id; -update jrnx set j_jrn_def=jr_def_id from jrn where j_grpt=jr_grpt_id; - -update version set val=84; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade84.sql b/sources/html/admin/sql/patch/upgrade84.sql deleted file mode 100644 index 48a77a1..0000000 --- a/sources/html/admin/sql/patch/upgrade84.sql +++ /dev/null @@ -1,87 +0,0 @@ -begin; -update jrnx set j_qcode=null where trim(j_qcode)=''; - -CREATE OR REPLACE FUNCTION comptaproc.insert_jrnx(p_date character varying, p_montant numeric, -p_poste 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 AS -$BODY$ -begin - insert into jrnx - ( - j_date, - j_montant, - j_poste, - j_grpt, - j_jrn_def, - j_debit, - j_text, - j_tech_user, - j_tech_per, - j_qcode - ) values - ( - to_date(p_date,'DD.MM.YYYY'), - p_montant, - p_poste, - p_grpt, - p_jrn_def, - p_debit, - p_comment, - p_tech_user, - p_tech_per, - p_qcode - ); - -return; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -CREATE OR REPLACE FUNCTION comptaproc.jrnx_ins() - RETURNS trigger AS -$BODY$ -declare -n_fid bigint; -begin - -if NEW.j_qcode is NULL then - return NEW; -end if; - -NEW.j_qcode=trim(upper(NEW.j_qcode)); - -if length (NEW.j_qcode) = 0 then - NEW.j_qcode=NULL; - else - select f_id into n_fid from fiche join jnt_fic_att_value using (f_id) join attr_value using(jft_id) where ad_id=23 and av_text=NEW.j_qcode; - if NOT FOUND then - raise exception 'La fiche dont le quick code est % n''existe pas',NEW.j_qcode; - end if; -end if; -return NEW; -end; -$BODY$ - LANGUAGE 'plpgsql' ; - - -CREATE TRIGGER t_jrnx_ins - BEFORE INSERT - ON jrnx - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrnx_ins(); -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'; - - - -CREATE TRIGGER t_jrnx_upd - BEFORE UPDATE - ON jrnx - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrnx_ins(); -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'; - - - -update version set val=85; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade85.sql b/sources/html/admin/sql/patch/upgrade85.sql deleted file mode 100644 index 8d04b9f..0000000 --- a/sources/html/admin/sql/patch/upgrade85.sql +++ /dev/null @@ -1,76 +0,0 @@ -begin; - -CREATE OR REPLACE FUNCTION comptaproc.jrnx_ins() - RETURNS trigger AS -$BODY$ -declare -n_fid bigint; -begin - -if NEW.j_qcode is NULL then - return NEW; -end if; - -NEW.j_qcode=trim(upper(NEW.j_qcode)); - -if length (NEW.j_qcode) = 0 then - NEW.j_qcode=NULL; - else - select f_id into n_fid from fiche join jnt_fic_att_value using (f_id) join attr_value using(jft_id) where ad_id=23 and av_text=NEW.j_qcode; - if NOT FOUND then - raise exception 'La fiche dont le quick code est % n''existe pas',NEW.j_qcode; - end if; -end if; -return NEW; -end; -$BODY$ - LANGUAGE 'plpgsql' ; --- update jrn set jr_internal=jrn.jr_internal||jrn.jr_id::text from jrn as B where jrn.jr_internal=B.jr_internal and jrn.jr_id > B.jr_id; --- create unique index ux_jr_internal on jrn(jr_internal); - -delete from quant_purchase where qp_internal not in (select jr_internal from jrn); -alter table quant_purchase ADD CONSTRAINT quant_purchase_qp_internal_fkey FOREIGN KEY (qp_internal) - REFERENCES jrn (jr_internal) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE; - -delete from quant_sold where qs_internal not in (select jr_internal from jrn); - -ALTER TABLE quant_sold - ADD CONSTRAINT quant_sold_qs_internal_fkey FOREIGN KEY (qs_internal) - REFERENCES jrn (jr_internal) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE; - -delete from stock_goods where j_id not in (select j_id from jrnx); - -delete from stock_goods where j_id not in (select j_id from jrnx); - -ALTER TABLE stock_goods - ADD CONSTRAINT stock_goods_j_id_fkey FOREIGN KEY (j_id) - REFERENCES jrnx (j_id) MATCH SIMPLE - ON UPDATE cascade ON DELETE cascade; - -delete from jrn_rapt where jr_id not in (select jr_id from jrn); -delete from jrn_rapt where jra_id not in (select jr_id from jrn); - -delete from jrn_rapt where jr_id not in (select jr_id from jrn); -delete from jrn_rapt where jra_concerned not in (select jr_id from jrn); - -ALTER TABLE jrn_rapt - ADD CONSTRAINT jrn_rapt_jr_id_fkey FOREIGN KEY (jr_id) - REFERENCES jrn (jr_id) MATCH SIMPLE - ON UPDATE cascade ON DELETE cascade; -ALTER TABLE jrn_rapt - ADD CONSTRAINT jrn_rapt_jra_concerned_fkey FOREIGN KEY (jra_concerned) - REFERENCES jrn (jr_id) MATCH SIMPLE - ON UPDATE cascade ON DELETE cascade; - -ALTER TABLE attr_def ADD COLUMN ad_type text; -alter table quant_sold alter qs_internal drop not null; -alter table quant_purchase alter qp_internal drop not null; - -update attr_def set ad_type='text'; -update attr_def set ad_type='numeric' where ad_id in (6,7,8,11,21,22); -update attr_def set ad_type='date' where ad_id in (10); -alter sequence s_attr_def restart with 9001; -update version set val=86; -commit; diff --git a/sources/html/admin/sql/patch/upgrade86.sql b/sources/html/admin/sql/patch/upgrade86.sql deleted file mode 100644 index f91c77d..0000000 --- a/sources/html/admin/sql/patch/upgrade86.sql +++ /dev/null @@ -1,181 +0,0 @@ -begin; -alter table jrnx add f_id bigint; -alter table jrnx alter f_id set default null; -update jrnx set f_id=(select f_id from fiche join jnt_fic_att_value using(f_id) join attr_value using(jft_id) where ad_id=23 and av_text=jrnx.j_qcode); -alter table quant_sold alter qs_internal drop not null; -alter table quant_purchase alter qp_internal drop not null; -alter table attr_Def add ad_size text; -update attr_def set ad_size='8' where ad_type='date'; -update attr_def set ad_size='6' where ad_type='numeric'; -update attr_def set ad_size='22' where ad_size is null; -alter table attr_def alter ad_size set not null; - -ALTER TABLE jrnx ADD CONSTRAINT jrnx_f_id_fkey FOREIGN KEY (f_id) REFERENCES fiche (f_id) MATCH SIMPLE ON UPDATE cascade ON DELETE NO ACTION; -CREATE INDEX fki_jrnx_f_id ON jrnx USING btree (f_id); - -CREATE OR REPLACE FUNCTION correct_quant_purchase() returns void -as -$BODY$ -declare - r_invalid quant_purchase; - s_QuickCode text; - b_j_debit bool; - r_new record; - r_jrnx record; -begin - -for r_invalid in select * from quant_purchase where qp_valid='A' -loop - --- get qcode -select j_qcode into s_QuickCode from vw_poste_qcode where f_id=r_invalid.qp_fiche; -raise notice 'qp_id % Quick code is %',r_invalid.qp_id,s_QuickCode; - --- get deb or cred -select j_debit,j_grpt,j_jrn_def,j_montant into r_jrnx from jrnx where j_id=r_invalid.j_id; -if NOT FOUND then - raise notice 'error not found jrnx %',r_invalid.j_id; - update quant_purchase set qp_valid='Y' where qp_id=r_invalid.qp_id; - continue; -end if; -raise notice 'j_debit % , j_grpt % ,j_jrn_def % qp_price %',r_jrnx.j_debit,r_jrnx.j_grpt,r_jrnx.j_jrn_def ,r_invalid.qp_price; - -select jr_internal,j_id,j_montant into r_new - from jrnx join jrn on (j_grpt=jr_grpt_id) - where - j_jrn_def=r_jrnx.j_jrn_def - and j_id not in (select j_id from quant_purchase) - and j_qcode=s_QuickCode - and j_montant=r_jrnx.j_montant - and j_debit != r_jrnx.j_debit; - -if NOT FOUND then - raise notice 'error not found %', r_invalid.j_id; - update quant_purchase set qp_valid='Y' where qp_id=r_invalid.qp_id; - continue; -end if; -raise notice 'j_id % found amount %',r_new.j_id,r_new.j_montant; - --- insert into quant_purchase -insert into quant_purchase (qp_internal,j_id,qp_fiche,qp_quantite,qp_price,qp_vat,qp_nd_amount,qp_nd_tva_recup,qp_valid,qp_dep_priv,qp_supplier,qp_vat_code) -values (r_new.jr_internal,r_invalid.j_id,r_invalid.qp_fiche,(r_invalid.qp_quantite * (-1)),r_invalid.qp_price * (-1),r_invalid.qp_vat*(-1),r_invalid.qp_nd_amount*(-1),r_invalid.qp_nd_tva_recup*(-1) ,'Y',r_invalid.qp_dep_priv*(-1),r_invalid.qp_supplier,r_invalid.qp_vat_code); - -update quant_purchase set qp_valid='Y' where qp_id=r_invalid.qp_id; -end loop; -return; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -select correct_quant_purchase(); - -CREATE OR REPLACE FUNCTION correct_quant_sale() returns void -as -$BODY$ -declare - r_invalid quant_sold; - s_QuickCode text; - b_j_debit bool; - r_new record; - r_jrnx record; -begin - -for r_invalid in select * from quant_sold where qs_valid='A' -loop - --- get qcode -select j_qcode into s_QuickCode from vw_poste_qcode where f_id=r_invalid.qs_fiche; -raise notice 'qp_id % Quick code is %',r_invalid.qs_id,s_QuickCode; - --- get deb or cred -select j_debit,j_grpt,j_jrn_def,j_montant into r_jrnx from jrnx where j_id=r_invalid.j_id; -if NOT FOUND then - update quant_sold set qs_valid='Y' where qs_id=r_invalid.qs_id; - raise notice 'error not found jrnx %',r_invalid.j_id; - continue; -end if; -raise notice 'j_debit % , j_grpt % ,j_jrn_def % qs_price %',r_jrnx.j_debit,r_jrnx.j_grpt,r_jrnx.j_jrn_def ,r_invalid.qs_price; - -select jr_internal,j_id,j_montant into r_new - from jrnx join jrn on (j_grpt=jr_grpt_id) - where - j_jrn_def=r_jrnx.j_jrn_def - and j_id not in (select j_id from quant_sold) - and j_qcode=s_QuickCode - and j_montant=r_jrnx.j_montant - and j_debit != r_jrnx.j_debit; - -if NOT FOUND then - update quant_sold set qs_valid='Y' where qs_id=r_invalid.qs_id; - raise notice 'error not found %', r_invalid.j_id; - continue; -end if; -raise notice 'j_id % found amount %',r_new.j_id,r_new.j_montant; - --- insert into quant_sold - - insert into quant_sold (qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_valid,qs_client,qs_vat_code) - values (r_new.jr_internal,r_invalid.j_id,r_invalid.qs_fiche,(r_invalid.qs_quantite * (-1)),r_invalid.qs_price * (-1),r_invalid.qs_vat*(-1),'Y',r_invalid.qs_client,r_invalid.qs_vat_code); - update quant_sold set qs_valid='Y' where qs_id=r_invalid.qs_id; -end loop; -return; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -select correct_quant_sale() ; - -ALTER TABLE jrn_def ADD COLUMN jrn_def_bank bigint; -alter table jrn_def add jrn_def_num_op integer; -ALTER TABLE del_jrnx ADD COLUMN f_id bigint; - - -CREATE OR REPLACE FUNCTION comptaproc.jrnx_del() - RETURNS trigger AS -$BODY$ -declare -row jrnx%ROWTYPE; -begin -row:=OLD; - - -insert into del_jrnx( - j_id, j_date, j_montant, j_poste, j_grpt, j_rapt, j_jrn_def, - j_debit, j_text, j_centralized, j_internal, j_tech_user, j_tech_date, - j_tech_per, j_qcode, f_id) SELECT j_id, j_date, j_montant, j_poste, j_grpt, j_rapt, j_jrn_def, - j_debit, j_text, j_centralized, j_internal, j_tech_user, j_tech_date, - j_tech_per, j_qcode, f_id from jrnx where j_id=row.j_id; -return row; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -ALTER TABLE stock_goods ALTER COLUMN f_id DROP NOT NULL; - -CREATE OR REPLACE FUNCTION comptaproc.jnt_fic_attr_ins() - RETURNS trigger AS -$BODY$ -declare - r_record jnt_fic_attr%ROWTYPE; - i_max integer; -begin -r_record=NEW; -perform comptaproc.fiche_attribut_synchro(r_record.fd_id); -select coalesce(max(jnt_order),0) into i_max from jnt_fic_attr where fd_id=r_record.fd_id; -i_max := i_max + 10; -NEW.jnt_order=i_max; -return NEW; -end; -$BODY$ - LANGUAGE 'plpgsql' VOLATILE; - -CREATE TRIGGER t_jnt_fic_attr_ins - BEFORE INSERT - ON jnt_fic_attr - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jnt_fic_attr_ins(); - - -update version set val=87; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade87.sql b/sources/html/admin/sql/patch/upgrade87.sql deleted file mode 100644 index 79368f9..0000000 --- a/sources/html/admin/sql/patch/upgrade87.sql +++ /dev/null @@ -1,15 +0,0 @@ -BEGIN; -select comptaproc.fiche_attribut_synchro(fd_id) from fiche_def; - -DROP TRIGGER t_jnt_fic_attr_ins ON jnt_fic_attr; - -CREATE TRIGGER t_jnt_fic_attr_ins - after INSERT - ON jnt_fic_attr - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jnt_fic_attr_ins(); - -UPDATE VERSION SET VAL=88; - - -COMMIT; diff --git a/sources/html/admin/sql/patch/upgrade88.sql b/sources/html/admin/sql/patch/upgrade88.sql deleted file mode 100644 index 5d9ccd2..0000000 --- a/sources/html/admin/sql/patch/upgrade88.sql +++ /dev/null @@ -1,44 +0,0 @@ -begin; - -update quant_sold set qs_price=abs(qs_price)*(-1), qs_vat=abs(qs_vat)*(-1), qs_quantite=abs(qs_quantite)*(-1) where qs_price < 0 or qs_quantite < 0 or qs_vat < 0; - -update quant_purchase set qp_price=abs(qp_price)*(-1), qp_vat=abs(qp_vat)*(-1), qp_quantite=abs(qp_quantite)*(-1) where qp_price < 0 or qp_quantite < 0 or qp_vat < 0; - - -select comptaproc.fill_quant_fin(); - -create function comptaproc.quant_purchase_ins_upd () returns trigger -as -$$ - begin - if NEW.qp_price < 0 OR NEW.qp_quantite <0 THEN - NEW.qp_price := abs (NEW.qp_price)*(-1); - NEW.qp_quantite := abs (NEW.qp_quantite)*(-1); - end if; -return NEW; -end; -$$ -language plpgsql; - -drop trigger if exists quant_purchase_ins_upd_tr on quant_purchase ; -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 function comptaproc.quant_sold_ins_upd () returns trigger -as -$$ - begin - if NEW.qs_price < 0 OR NEW.qs_quantite <0 THEN - NEW.qs_price := abs (NEW.qs_price)*(-1); - NEW.qs_quantite := abs (NEW.qs_quantite)*(-1); - end if; -return NEW; -end; -$$ -language plpgsql; - -drop trigger if exists quant_sold_ins_upd_tr on quant_sold ; -create trigger quant_sold_ins_upd_tr after insert or update on quant_sold for each row execute procedure comptaproc.quant_sold_ins_upd(); - -update version set val=89; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade89.sql b/sources/html/admin/sql/patch/upgrade89.sql deleted file mode 100644 index 6e0587e..0000000 --- a/sources/html/admin/sql/patch/upgrade89.sql +++ /dev/null @@ -1,105 +0,0 @@ -begin; - -update jrnx set f_id = (select f_id from vw_poste_qcode where vw_poste_qcode.j_qcode=jrnx.j_qcode) where j_qcode is not null; -CREATE OR REPLACE FUNCTION comptaproc.jrnx_ins() - RETURNS trigger AS -$BODY$ -declare -n_fid bigint; -begin - -if NEW.j_qcode is NULL then - return NEW; -end if; - -NEW.j_qcode=trim(upper(NEW.j_qcode)); - -if length (NEW.j_qcode) = 0 then - NEW.j_qcode=NULL; - else - select f_id into n_fid from fiche join jnt_fic_att_value using (f_id) join attr_value using(jft_id) where ad_id=23 and av_text=NEW.j_qcode; - if NOT FOUND then - raise exception 'La fiche dont le quick code est % n''existe pas',NEW.j_qcode; - end if; -end if; -NEW.f_id:=n_fid; -return NEW; -end; -$BODY$ -LANGUAGE plpgsql; - -insert into attr_Def values (32,'Prénom','text',22); -update attr_def set ad_text='Dépense charge du grant (partie privé) ' where ad_id=31; - - --- add the first name - -DROP VIEW vw_fiche_attr; - -CREATE OR REPLACE VIEW vw_fiche_attr AS - SELECT a.f_id, a.fd_id, a.av_text AS vw_name, b.av_text AS vw_sell, c.av_text AS vw_buy, d.av_text AS tva_code, tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label, e.av_text AS vw_addr, f.av_text AS vw_cp, j.av_text AS quick_code, h.av_text AS vw_description, i.av_text AS tva_num, k.av_text AS vw_first_name, fiche_def.frd_id - FROM ( SELECT fiche.f_id, fiche.fd_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 1) a - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 6) b ON a.f_id = b.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 7) c ON a.f_id = c.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 2) d ON a.f_id = d.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 14) e ON a.f_id = e.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 15) f ON a.f_id = f.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 23) j ON a.f_id = j.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 9) h ON a.f_id = h.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 13) i ON a.f_id = i.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 32) k ON a.f_id = k.f_id - LEFT JOIN tva_rate ON d.av_text = tva_rate.tva_id::text - JOIN fiche_def USING (fd_id); -update version set val=90; - -commit; diff --git a/sources/html/admin/sql/patch/upgrade9.sql b/sources/html/admin/sql/patch/upgrade9.sql deleted file mode 100644 index 634e8b2..0000000 --- a/sources/html/admin/sql/patch/upgrade9.sql +++ /dev/null @@ -1,303 +0,0 @@ -begin; --- index needed -create unique index attr_value_jft_id on attr_value (jft_id); --- add quick code -insert into attr_def (ad_id,ad_text) values(23,'Quick Code'); --- update existing card & template -insert into attr_min select frd_id,23 from fiche_def_ref; -insert into jnt_fic_attr select fd_id,23 from fiche_Def; -insert into jnt_fic_att_value(jft_id,f_id,ad_id) select nextval('s_jnt_fic_att_value')+200,f_id,23 from fiche; --- generate a quick code -insert into attr_value select jft_id,'FID'||f_id from jnt_fic_att_value join fiche using(f_id) where ad_id=23; --- add quick code to jrnx -alter table jrnx add j_qcode text; - -update jrnx set j_qcode = B.av_text from - (select f_id,av_text from attr_value join jnt_fic_att_value using (jft_id) - where ad_id=5) as A - join ( select f_id,av_text from attr_value join jnt_fic_att_value using (jft_id) - where ad_id=23) as B using(f_id) where j_poste=a.av_text; - -create or replace function insert_jrnx ( - p_date varchar, - p_montant jrnx.j_montant%TYPE, - p_poste jrnx.j_poste%TYPE, - p_grpt jrnx.j_grpt%type, - p_jrn_def jrnx.j_jrn_def%type, - p_debit jrnx.j_debit%type, - p_tech_user jrnx.j_tech_user%type, - p_tech_per jrnx.j_tech_per%type, - p_qcode jrnx.j_qcode%type -) returns void as $body$ -declare - sCode varchar; - nCount_qcode integer; -begin - sCode=trim(p_qcode); - - -- if p_qcode is empty try to find one - if length(sCode) = 0 or p_qcode is null then - - select count(*) into nCount_qcode - from vw_poste_qcode where j_poste=p_poste; - -- if we find only one q_code for a accountancy account - -- then retrieve it - if nCount_qcode = 1 then - select j_qcode into sCode - from vw_poste_qcode where j_poste=p_poste; - else - sCode=NULL; - end if; - - end if; - if p_montant = 0.0 then - return; - end if; - insert into jrnx - ( - j_date, - j_montant, - j_poste, - j_grpt, - j_jrn_def, - j_debit, - j_tech_user, - j_tech_per, - j_qcode - ) values - ( - to_date(p_date,'DD.MM.YYYY'), - p_montant, - p_poste, - p_grpt, - p_jrn_def, - p_debit, - p_tech_user, - p_tech_per, - sCode - ); - -return; -end; -$body$ - language plpgsql; - - - --- Function: update_quick_code(njft_id int4, tav_text text) - --- DROP FUNCTION update_quick_code(int4, text); - -CREATE OR REPLACE FUNCTION update_quick_code(njft_id int4,tav_text text) - RETURNS int4 AS $BODY$ - declare - ns integer; - nExist integer; - tText text; - old_qcode varchar; - begin - -- get current value - select av_text into old_qcode from attr_value where jft_id=njft_id; - -- av_text didn't change so no update - if tav_text = upper( trim(old_qcode)) then - return 0; - end if; - - tText := trim(upper(tav_text)); - tText := replace(tText,' ',''); - if length ( tText) = 0 or tText is null then - return 0; - end if; - - ns := njft_id; - - loop - -- av_text already used ? - select count(*) into nExist - from jnt_fic_att_value join attr_value using (jft_id) - where - ad_id=23 and av_text=upper(tText); - - if nExist = 0 then - exit; - end if; - if tText = 'FID'||ns then - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - end if; - tText :='FID'||ns; - - end loop; - update attr_value set av_text = tText where jft_id=njft_id; - update jrnx set j_qcode=tText where j_qcode = old_qcode; - return ns; - end; -$BODY$ - LANGUAGE plpgsql VOLATILE; - - - - - --- View: "vw_fiche_def" - -DROP VIEW vw_fiche_def; - -CREATE OR REPLACE VIEW vw_fiche_def AS - SELECT jnt_fic_attr.fd_id, jnt_fic_attr.ad_id, - attr_def.ad_text, - attr_value.av_text, - fiche_def.fd_class_base, - fiche_def.fd_label, fiche_def.fd_create_account, fiche_def.frd_id - FROM jnt_fic_att_value - JOIN attr_value using (jft_id) - join fiche using (f_id) - join jnt_fic_attr using (fd_id) - JOIN attr_def on (attr_def.ad_id=jnt_fic_attr.ad_id) - JOIN fiche_def USING (fd_id); - -COMMENT ON VIEW vw_fiche_def IS 'all the attributs for card family'; - - - -create or replace function insert_quant_sold ( - p_internal quant_sold.qs_internal%type, - p_fiche varchar, - p_quant quant_sold.qs_quantite%type, - p_price quant_sold.qs_price%type, - p_vat quant_sold.qs_vat%type, - p_vat_code quant_sold.qs_vat_code%type, - p_client varchar) returns void as $body$ -declare - fid_client integer; - fid_good integer; -begin - select f_id into fid_client from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=p_client; - - select f_id into fid_good from - attr_value join jnt_fic_att_value using (jft_id) where ad_id=23 and av_text=p_fiche; - - - insert into quant_sold - (qs_internal,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client) - values - (p_internal,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client); - return; -end; -$body$ - LANGUAGE plpgsql VOLATILE; - - - --- Function: insert_quick_code(nf_id int4, tav_text text) - --- DROP FUNCTION insert_quick_code(int4, text); - -CREATE OR REPLACE FUNCTION insert_quick_code(nf_id int4, tav_text text) - RETURNS int4 AS $BODY$ - declare - ns integer; - nExist integer; - tText text; - begin - tText := upper(trim(tav_text)); - tText := replace(tText,' ',''); - - loop - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - if length (tText) = 0 or tText is null then - tText := 'FID'||ns; - end if; - -- av_text already used ? - select count(*) into nExist - from jnt_fic_att_value join attr_value using (jft_id) - where - ad_id=23 and av_text=upper(tText); - - if nExist = 0 then - exit; - end if; - tText:='FID'||ns; - end loop; - -- insert into table jnt_fic_att_value - insert into jnt_fic_att_value values (ns,nf_id,23); - -- insert value into attr_value - insert into attr_value values (ns,upper(tText)); - return ns; - end; -$BODY$ - LANGUAGE plpgsql VOLATILE; - - - - -DROP VIEW vw_fiche_attr; -CREATE view vw_fiche_attr as -SELECT a.f_id, a.fd_id, a.av_text AS vw_name, b.av_text AS vw_sell, c.av_text AS vw_buy, d.av_text AS tva_code, tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label, e.av_text AS vw_addr, f.av_text AS vw_cp, j.av_text as quick_code,fiche_def.frd_id - FROM ( SELECT fiche.f_id, fiche.fd_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 1) a - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 6) b ON a.f_id = b.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 7) c ON a.f_id = c.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 2) d ON a.f_id = d.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 14) e ON a.f_id = e.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 15) f ON a.f_id = f.f_id - LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text - FROM fiche - JOIN jnt_fic_att_value USING (f_id) - JOIN attr_value USING (jft_id) - JOIN attr_def USING (ad_id) - WHERE jnt_fic_att_value.ad_id = 23) j ON a.f_id = j.f_id - LEFT JOIN tva_rate ON d.av_text = tva_rate.tva_id::text - JOIN fiche_def USING (fd_id); - - - -create view vw_poste_qcode - as - select A.f_id,a.av_text as j_poste,b.av_text as j_qcode - from (select f_id,av_text from attr_value join jnt_fic_att_value using (jft_id) - where ad_id=5) as A - join ( select f_id,av_text from attr_value join jnt_fic_att_value using (jft_id) - where ad_id=23) as B using(f_id) -; - - - - - - - - -update version set val=10; -commit; diff --git a/sources/html/admin/sql/patch/upgrade90.sql b/sources/html/admin/sql/patch/upgrade90.sql deleted file mode 100644 index 89a85bb..0000000 --- a/sources/html/admin/sql/patch/upgrade90.sql +++ /dev/null @@ -1,504 +0,0 @@ -begin; - -alter table jnt_fic_att_value add ad_value text; -update jnt_fic_att_value set ad_value=av_text from attr_value where jnt_fic_att_value.jft_id=attr_value.jft_id; -DROP VIEW vw_supplier; -DROP VIEW vw_poste_qcode; -DROP VIEW vw_fiche_attr; -DROP VIEW vw_fiche_name; -DROP VIEW vw_client; -alter table jnt_fic_att_value rename to fiche_detail; - -drop table attr_value; - -CREATE OR REPLACE 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 f_id,ad_value from fiche_Detail - WHERE ad_id = 5) a using(f_id) - left JOIN ( select f_id,ad_value from fiche_detail - WHERE ad_id = 23) b USING (f_id); - - -CREATE OR REPLACE 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 jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 1) a1 USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 13) b USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 23) a USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 5) c USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 14) d USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 15) e USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 16) f USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 17) g USING (f_id) - LEFT JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 18) h USING (f_id) - WHERE fiche_def_ref.frd_id = 9; - -CREATE OR REPLACE VIEW vw_fiche_name AS - SELECT f_id, ad_value AS name - FROM fiche_detail - WHERE ad_id = 1; - - CREATE OR REPLACE 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 jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 1) a1 USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 13) b USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 23) a USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 5) c USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 14) d USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 15) e USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 16) f USING (f_id) - left JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 17) g USING (f_id) - LEFT JOIN ( SELECT jft_id, F_ID, ad_id, ad_value - from fiche_detail - WHERE ad_id = 18) h USING (f_id) - WHERE fiche_def_ref.frd_id = 8; - - -CREATE OR REPLACE 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 - FROM ( SELECT fiche.f_id, fiche.fd_id, ad_value - FROM fiche - left join fiche_detail using (f_id) - WHERE ad_id = 1) a - LEFT JOIN ( - select f_id ,ad_value from fiche_detail - WHERE ad_id = 6) b ON a.f_id = b.f_id - LEFT JOIN ( select f_id,ad_value from fiche_detail - WHERE ad_id = 7) c ON a.f_id = c.f_id - LEFT JOIN ( select f_id,ad_value from fiche_detail - WHERE ad_id = 2) d ON a.f_id = d.f_id - LEFT JOIN ( select f_id,ad_value from fiche_detail - WHERE ad_id = 14) e ON a.f_id = e.f_id - LEFT JOIN ( select f_id,ad_value from fiche_detail - WHERE ad_id = 15) f ON a.f_id = f.f_id - LEFT JOIN ( select f_id,ad_value from fiche_detail - WHERE ad_id = 23) j ON a.f_id = j.f_id - LEFT JOIN ( select f_id,ad_value from fiche_detail - WHERE ad_id = 9) h ON a.f_id = h.f_id - LEFT JOIN ( select f_id,ad_value from fiche_detail - WHERE ad_id = 13) i ON a.f_id = i.f_id - LEFT JOIN ( select f_id,ad_value from fiche_detail - WHERE ad_id = 32) k ON a.f_id = k.f_id - LEFT JOIN tva_rate ON d.ad_value = tva_rate.tva_id::text - JOIN fiche_def USING (fd_id); - - --- --- Name: account_insert(integer, text); Type: FUNCTION; Schema: comptaproc; Owner: dany --- - -CREATE OR REPLACE FUNCTION COMPTAPROC.account_insert(p_f_id integer, p_account text) RETURNS integer - AS $_$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - nNew tmp_pcmn.pcm_val%type; - bAuto bool; - nFd_id integer; - sClass_Base fiche_def.fd_class_base%TYPE; - nCount integer; - first text; - second text; -begin - - if 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'; - select count(*) into nCount from tmp_pcmn where pcm_val=p_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,p_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(p_account::account_type); - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::account_type,sName,nParent); - perform attribut_insert(p_f_id,5,p_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 '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'; - nNew:=account_compute(p_f_id); - raise info 'nNew %', nNew; - select ad_value into sName from - fiche_detail - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(nNew); - perform account_add (nNew,sName); - perform attribut_insert(p_f_id,5,nNew); - - else - -- if there is an account_base then it is the default - select fd_class_base::account_type into nNew from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if nNew is null or length(trim(nNew)) = 0 then - raise notice 'count is null'; - perform attribut_insert(p_f_id,5,null); - else - perform attribut_insert(p_f_id,5,nNew); - end if; - end if; - end if; - -return 0; -end; -$_$ -LANGUAGE plpgsql; --- --- Name: account_update(integer, public.account_type); Type: FUNCTION; Schema: comptaproc; Owner: dany --- - -CREATE OR REPLACE FUNCTION COMPTAPROC.account_update(p_f_id integer, p_account public.account_type) RETURNS integer - AS $$ -declare - nMax fiche.f_id%type; - nCount integer; - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - first text; - second text; -begin - - if length(trim(p_account)) != 0 then - if position (',' in p_account) = 0 then - 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; - 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; - end if; - end if; - - update fiche_detail set ad_value=p_account where f_id=p_f_id and ad_id=5 ; - -return 0; -end; -$$ -LANGUAGE plpgsql; - --- --- Name: attribut_insert(integer, integer, character varying); Type: FUNCTION; Schema: comptaproc; Owner: dany --- - -CREATE OR REPLACE FUNCTION COMPTAPROC.attribut_insert(p_f_id integer, p_ad_id integer, p_value character varying) RETURNS void - AS $$ -begin - insert into fiche_detail (f_id,ad_id, ad_value) values (p_f_id,p_ad_id,p_value); - -return; -end; -$$ -LANGUAGE plpgsql; - --- --- Name: fiche_attribut_synchro(integer); Type: FUNCTION; Schema: comptaproc; Owner: dany --- - -CREATE OR REPLACE FUNCTION COMPTAPROC.fiche_attribut_synchro(p_fd_id integer) RETURNS void - AS $$ -declare - -- this sql gives the f_id and the missing attribute (ad_id) - list_missing cursor for select f_id,fd_id,ad_id,jnt_order from jnt_fic_attr join fiche as A using (fd_id) where fd_id=p_fd_id and ad_id not in (select ad_id from fiche join fiche_detail using (f_id) where fd_id=jnt_fic_attr.fd_id and A.f_id=f_id); - rec record; -begin - open list_missing; - loop - - fetch list_missing into rec; - IF NOT FOUND then - exit; - end if; - - -- now we insert into attr_value - insert into fiche_detail (f_id,ad_id,ad_value) values (rec.f_id,rec.ad_id,null); - end loop; - close list_missing; -end; -$$ -LANGUAGE plpgsql; - --- --- Name: insert_quant_sold(text, numeric, character varying, numeric, numeric, numeric, integer, character varying); Type: FUNCTION; Schema: comptaproc; Owner: dany --- - -CREATE OR REPLACE 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) RETURNS void - AS $$ -declare - fid_client integer; - fid_good integer; -begin - - select f_id into fid_client from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_client)); - select f_id into fid_good from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_fiche)); - insert into quant_sold - (qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client,qs_valid) - values - (p_internal,p_jid,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client,'Y'); - return; -end; - $$ -LANGUAGE plpgsql; - --- --- Name: insert_quant_purchase(text, numeric, character varying, numeric, numeric, numeric, integer, numeric, numeric, numeric, numeric, character varying); Type: FUNCTION; Schema: comptaproc; Owner: dany --- - -CREATE OR REPLACE 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) RETURNS void - AS $$ -declare - fid_client integer; - fid_good integer; -begin - select f_id into fid_client from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_client)); - select f_id into fid_good from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_fiche)); - insert into quant_purchase - (qp_internal, - j_id, - qp_fiche, - qp_quantite, - qp_price, - qp_vat, - qp_vat_code, - qp_nd_amount, - qp_nd_tva, - qp_nd_tva_recup, - qp_supplier, - qp_dep_priv) - values - (p_internal, - p_j_id, - fid_good, - p_quant, - p_price, - p_vat, - p_vat_code, - p_nd_amount, - p_nd_tva, - p_nd_tva_recup, - fid_client, - p_dep_priv); - return; -end; - $$ -LANGUAGE plpgsql; - --- --- Name: insert_quick_code(integer, text); Type: FUNCTION; Schema: comptaproc; Owner: dany --- - -CREATE OR REPLACE FUNCTION COMPTAPROC.insert_quick_code(nf_id integer, tav_text text) RETURNS integer - AS $$ - declare - ns integer; - nExist integer; - tText text; - begin - tText := upper(trim(tav_text)); - tText := replace(tText,' ',''); - - loop - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - if length (tText) = 0 or tText is null then - tText := 'FID'||ns; - 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; - tText:='FID'||ns; - end loop; - - - insert into fiche_detail(jft_id,f_id,ad_id,ad_value) values (ns,nf_id,23,upper(tText)); - return ns; - end; -$$ -LANGUAGE plpgsql; - - --- --- Name: update_quick_code(integer, text); Type: FUNCTION; Schema: comptaproc; Owner: dany --- - -CREATE OR REPLACE FUNCTION COMPTAPROC.update_quick_code(njft_id integer, tav_text text) RETURNS integer - AS $$ - declare - ns integer; - nExist integer; - tText text; - old_qcode varchar; - 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 - return 0; - end if; - - tText := trim(upper(tav_text)); - tText := replace(tText,' ',''); - if length ( tText) = 0 or tText is null then - return 0; - end if; - - ns := njft_id; - - loop - -- 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; - if tText = 'FID'||ns then - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - end if; - tText :='FID'||ns; - - end loop; - update fiche_detail set ad_value = tText where 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); - - - update jrnx set j_qcode=tText where j_qcode = old_qcode; - return ns; - end; -$$ -LANGUAGE plpgsql; - - --- --- Name: jrnx_ins(); Type: FUNCTION; Schema: comptaproc; Owner: dany --- - -CREATE OR REPLACE FUNCTION COMPTAPROC.jrnx_ins() RETURNS trigger - AS $$ -declare -n_fid bigint; -begin - -if NEW.j_qcode is NULL then - return NEW; -end if; - -NEW.j_qcode=trim(upper(NEW.j_qcode)); - -if length (NEW.j_qcode) = 0 then - NEW.j_qcode=NULL; - else - select f_id into n_fid from fiche_detail where ad_id=23 and ad_value=NEW.j_qcode; - if NOT FOUND then - raise exception 'La fiche dont le quick code est % n''existe pas',NEW.j_qcode; - end if; -end if; -NEW.f_id:=n_fid; -return NEW; -end; -$$ -LANGUAGE plpgsql; - -update version set val=91; -commit; diff --git a/sources/html/admin/sql/patch/upgrade91.sql b/sources/html/admin/sql/patch/upgrade91.sql deleted file mode 100644 index c9b5e76..0000000 --- a/sources/html/admin/sql/patch/upgrade91.sql +++ /dev/null @@ -1,213 +0,0 @@ -begin; -CREATE OR REPLACE FUNCTION comptaproc.jrnx_ins() - RETURNS trigger AS -$BODY$ -declare -n_fid bigint; -begin - -NEW.j_tech_per := comptaproc.find_periode(to_char(NEW.j_date,'DD.MM.YYYY')); -if NEW.j_tech_per = -1 then - raise exception 'Période invalide'; -end if; - -if NEW.j_qcode is NULL then - return NEW; -end if; - -NEW.j_qcode=trim(upper(NEW.j_qcode)); - -if length (NEW.j_qcode) = 0 then - NEW.j_qcode=NULL; - else - select f_id into n_fid from fiche_detail where ad_id=23 and ad_value=NEW.j_qcode; - if NOT FOUND then - raise exception 'La fiche dont le quick code est % n''existe pas',NEW.j_qcode; - end if; -end if; -NEW.f_id:=n_fid; -return NEW; -end; -$BODY$ -LANGUAGE plpgsql; - -CREATE OR REPLACE FUNCTION comptaproc.jrn_check_periode() - RETURNS trigger AS -$BODY$ -declare -bClosed bool; -str_status text; -ljr_tech_per jrn.jr_tech_per%TYPE; -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; -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; -end if; - -if TG_OP='DELETE' then - 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'; -end if; - -return lreturn; -end;$BODY$ - LANGUAGE 'plpgsql'; - -create or replace function comptaproc.is_closed (p_periode jrn.jr_tech_per%TYPE,p_jrn_def_id jrn.jr_def_id%TYPE) -returns bool as -$BODY$ -declare -bClosed bool; -str_status text; -begin --- return true is the periode is closed otherwise false -select p_closed into bClosed from parm_periode - where p_id=p_periode; - -if bClosed = true then - return bClosed; -end if; - -select status into str_status from jrn_periode - where p_id =p_periode and jrn_def_id=p_jrn_def_id; - -if str_status <> 'OP' then - return bClosed; -end if; -return false; -end; -$BODY$ -LANGUAGE plpgsql; - - -CREATE OR REPLACE FUNCTION comptaproc.find_periode(p_date text) - RETURNS integer AS -$BODY$ - -declare n_p_id int4; -begin - -select p_id into n_p_id - from parm_periode - where - p_start <= to_date(p_date,'DD.MM.YYYY') - and - p_end >= to_date(p_date,'DD.MM.YYYY'); - -if NOT FOUND then - return -1; -end if; - -return n_p_id; - -end;$BODY$ - LANGUAGE plpgsql; - - -DROP TRIGGER t_check_jrn ON jrn; - -CREATE TRIGGER t_check_jrn - BEFORE INSERT OR DELETE OR update - ON jrn - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.jrn_check_periode(); - - -CREATE TABLE jrn_note -( - n_id serial, - n_text text, - jr_id bigint NOT NULL, - CONSTRAINT jrnx_note_pkey PRIMARY KEY (n_id), CONSTRAINT jrnx_note_j_id_fkey FOREIGN KEY (jr_id) REFERENCES jrn (jr_id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE); - -COMMENT ON TABLE jrn_note IS 'Note about operation'; -ALTER TABLE forecast ADD COLUMN f_start_date bigint; -ALTER TABLE forecast ADD COLUMN f_end_date bigint; -ALTER TABLE forecast - ADD CONSTRAINT forecast_f_end_date_fkey FOREIGN KEY (f_end_date) - REFERENCES parm_periode (p_id) MATCH SIMPLE - ON UPDATE SET NULL ON DELETE SET NULL; -ALTER TABLE forecast - ADD CONSTRAINT forecast_f_start_date_fkey FOREIGN KEY (f_start_date) - REFERENCES parm_periode (p_id) MATCH SIMPLE - ON UPDATE SET NULL ON DELETE SET NULL; -CREATE INDEX fki_f_start_date - ON forecast - USING btree - (f_start_date); -CREATE INDEX fki_f_end_date - ON forecast - USING btree - (f_end_date); - - -CREATE OR REPLACE FUNCTION comptaproc.jrn_add_note(p_jrid bigint, p_note text) - RETURNS void AS -$BODY$ -declare - tmp bigint; -begin - if length(trim(p_note)) = 0 then - delete from jrn_note where jr_id= p_jrid; - return; - end if; - - select n_id into tmp from jrn_note where jr_id = p_jrid; - - if FOUND then - update jrn_note set n_text=trim(p_note) where jr_id = p_jrid; - else - insert into jrn_note (jr_id,n_text) values ( p_jrid, p_note); - - end if; - - return; -end; -$BODY$ LANGUAGE plpgsql ; - - -delete from action_gestion where f_id_dest != 0 and f_id_dest not in (select f_id from fiche); - -CREATE OR REPLACE FUNCTION comptaproc.card_after_delete() - RETURNS trigger AS -$BODY$ - -begin - - delete from action_gestion where f_id_dest = OLD.f_id; - return OLD; - -end; -$BODY$ -LANGUAGE plpgsql ; - -CREATE TRIGGER remove_action_gestion - AFTER DELETE - ON fiche - FOR EACH ROW - EXECUTE PROCEDURE comptaproc.card_after_delete(); - -update version set val=92; -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade92.sql b/sources/html/admin/sql/patch/upgrade92.sql deleted file mode 100644 index 5bfe757..0000000 --- a/sources/html/admin/sql/patch/upgrade92.sql +++ /dev/null @@ -1,14 +0,0 @@ -begin; - -insert into attr_def(ad_id,ad_text,ad_type,ad_size) values (50,'Contrepartie pour TVA récup par impot','poste',22); -insert into attr_def(ad_id,ad_text,ad_type,ad_size) values (51,'Contrepartie pour TVA non Ded.','poste',22); -insert into attr_def(ad_id,ad_text,ad_type,ad_size) values (52,'Contrepartie pour dépense à charge du gérant','poste',22); -insert into attr_def(ad_id,ad_text,ad_type,ad_size) values (53,'Contrepartie pour dépense fiscal. non déd.','poste',22); -update jrn_def set jrn_def_code=substr(jrn_def_code,1,1)||substr(jrn_def_code,length(jrn_def_code)-1,length(jrn_def_code)); - -create unique index qs_j_id on quant_sold(j_id); -create unique index qp_j_id on quant_purchase(j_id); -create unique index qf_jr_id on quant_fin(jr_id); - -update version set val=93; -commit; diff --git a/sources/html/admin/sql/patch/upgrade93.sql b/sources/html/admin/sql/patch/upgrade93.sql deleted file mode 100644 index d50002d..0000000 --- a/sources/html/admin/sql/patch/upgrade93.sql +++ /dev/null @@ -1,126 +0,0 @@ -begin; - -alter table operation_analytique drop column pa_id; -ALTER TABLE operation_analytique ADD CONSTRAINT operation_analytique_oa_amount_check CHECK (oa_amount >= 0::numeric); - -create type anc_table_card_type as (po_id bigint,pa_id bigint,PO_NAME TEXT,po_description text,sum_amount numeric(25,4),f_id bigint,card_account text,name text); - -create or replace function comptaproc.table_analytic_card (p_from text,p_to text) -returns setof anc_table_card_type -as -$BODY$ -declare - ret ANC_table_card_type%ROWTYPE; - sql_from text:=''; - sql_to text:=''; - sWhere text:=''; - sAnd text:=''; - sResult text:=''; -begin -if p_from <> '' and p_from is not null then - sql_from:='oa_date >= to_date('''||p_from::text||''',''DD.MM.YYYY'')'; - sWhere:=' where '; -end if; - -if p_to <> '' and p_to is not null then - sql_to=' oa_date <= to_date('''||p_to::text||''',''DD.MM.YYYY'')'; - sWhere := ' where '; -end if; - -if sql_to <> '' and sql_from <> '' then - sAnd :=' and '; -end if; - -sResult := sWhere || sql_from || sAnd || sql_to; - -for ret in EXECUTE ' SELECT po.po_id, po.pa_id, po.po_name, po.po_description, sum( - CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount - END) AS sum_amount, jrnx.f_id, jrnx.j_qcode, ( SELECT fiche_detail.ad_value - FROM fiche_detail - WHERE fiche_detail.ad_id = 1 AND fiche_detail.f_id = jrnx.f_id) AS name - FROM operation_analytique - JOIN poste_analytique po USING (po_id) - JOIN jrnx USING (j_id)'|| sResult ||' - GROUP BY po.po_id, po.po_name, po.pa_id, jrnx.f_id, jrnx.j_qcode, ( SELECT fiche_detail.ad_value - FROM fiche_detail - WHERE fiche_detail.ad_id = 1 AND fiche_detail.f_id = jrnx.f_id), po.po_description - HAVING sum( -CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount -END) <> 0::numeric;' - - - loop - return next ret; -end loop; -end; -$BODY$ language plpgsql; - - -create type anc_table_account_type as (po_id bigint,pa_id bigint,PO_NAME TEXT,po_description text,sum_amount numeric(25,4),card_account text,name text); - - -create or replace function comptaproc.table_analytic_account (p_from text,p_to text) -returns setof anc_table_account_type -as -$BODY$ -declare - ret ANC_table_account_type%ROWTYPE; - sql_from text:=''; - sql_to text:=''; - sWhere text:=''; - sAnd text:=''; - sResult text:=''; -begin -if p_from <> '' and p_from is not null then - sql_from:='oa_date >= to_date('''||p_from::text||''',''DD.MM.YYYY'')'; - sWhere:=' where '; -end if; - -if p_to <> '' and p_to is not null then - sql_to=' oa_date <= to_date('''||p_to::text||''',''DD.MM.YYYY'')'; - sWhere := ' where '; -end if; - -if sql_to <> '' and sql_from <> '' then - sAnd:=' and '; -end if; - -sResult := sWhere || sql_from || sAnd || sql_to; - -for ret in EXECUTE 'SELECT po.po_id, - po.pa_id, po.po_name, - po.po_description,sum( - CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount - END) AS sum_amount, jrnx.j_poste, tmp_pcmn.pcm_lib AS name - FROM operation_analytique - JOIN poste_analytique po USING (po_id) - JOIN jrnx USING (j_id) - JOIN tmp_pcmn ON jrnx.j_poste::text = tmp_pcmn.pcm_val::text -'|| sResult ||' - GROUP BY po.po_id, po.po_name, po.pa_id, jrnx.j_poste, tmp_pcmn.pcm_lib, po.po_description - HAVING sum( -CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount -END) <> 0::numeric ' - loop - return next ret; -end loop; -end; -$BODY$ language plpgsql; - -update operation_analytique set oa_date=j_date - from jrnx - where operation_analytique.j_id=jrnx.j_id - and operation_analytique.j_id in (select j_id - from jrnx join jrn on (j_grpt=jr_grpt_id) - ); - -update version set val=94; -commit; diff --git a/sources/html/admin/sql/patch/upgrade94.sql b/sources/html/admin/sql/patch/upgrade94.sql deleted file mode 100644 index 713292c..0000000 --- a/sources/html/admin/sql/patch/upgrade94.sql +++ /dev/null @@ -1,93 +0,0 @@ -begin; - --- --- Name: account_insert(integer, text); Type: FUNCTION; Schema: comptaproc; Owner: - --- - -CREATE FUNCTION account_insert(p_f_id integer, p_account text) RETURNS integer - AS $_$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - nNew tmp_pcmn.pcm_val%type; - bAuto bool; - nFd_id integer; - sClass_Base fiche_def.fd_class_base%TYPE; - nCount integer; - first text; - second text; -begin - - 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'; - select count(*) into nCount from tmp_pcmn where pcm_val=p_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,p_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(p_account::account_type); - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::account_type,sName,nParent); - perform attribut_insert(p_f_id,5,p_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 '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'; - nNew:=account_compute(p_f_id); - raise info 'nNew %', nNew; - select ad_value into sName from - fiche_detail - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(nNew); - perform account_add (nNew,sName); - perform attribut_insert(p_f_id,5,nNew); - - else - -- if there is an account_base then it is the default - select fd_class_base::account_type into nNew from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if nNew is null or length(trim(nNew)) = 0 then - raise notice 'count is null'; - perform attribut_insert(p_f_id,5,null); - else - perform attribut_insert(p_f_id,5,nNew); - end if; - end if; - end if; - -return 0; -end; -$_$ -LANGUAGE plpgsql; - -update version set val=95; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade95.sql b/sources/html/admin/sql/patch/upgrade95.sql deleted file mode 100644 index a58278a..0000000 --- a/sources/html/admin/sql/patch/upgrade95.sql +++ /dev/null @@ -1,147 +0,0 @@ -begin; - -delete from fiche_detail where jft_id in ( - select a.jft_id -from fiche_detail as a ,fiche_detail as b -where -a.f_id=b.f_id -and a.ad_id = b.ad_id -and a.jft_id > b.jft_id); - - -create unique index fiche_Detail_f_id_ad_id on fiche_detail (f_id,ad_id); - -CREATE OR REPLACE FUNCTION comptaproc.account_insert(p_f_id integer, p_account text) - RETURNS integer AS -$BODY$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - nNew tmp_pcmn.pcm_val%type; - bAuto bool; - nFd_id integer; - sClass_Base fiche_def.fd_class_base%TYPE; - nCount integer; - first text; - second text; -begin - - 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'; - select count(*) into nCount from tmp_pcmn where pcm_val=p_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,p_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(p_account::account_type); - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::account_type,sName,nParent); - perform attribut_insert(p_f_id,5,p_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 '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'; - nNew:=account_compute(p_f_id); - raise info 'nNew %', nNew; - select ad_value into sName from - fiche_detail - where - ad_id=1 and f_id=p_f_id; - nParent:=account_parent(nNew); - perform account_add (nNew,sName); - perform attribut_insert(p_f_id,5,nNew); - - else - -- if there is an account_base then it is the default - select fd_class_base::account_type into nNew from fiche_def join fiche using (fd_id) where f_id=p_f_id; - if nNew is null or length(trim(nNew)) = 0 then - raise notice 'count is null'; - perform attribut_insert(p_f_id,5,null); - else - perform attribut_insert(p_f_id,5,nNew); - end if; - end if; - end if; - -return 0; -end; -$BODY$ - LANGUAGE plpgsql; - -CREATE OR REPLACE FUNCTION comptaproc.account_update(p_f_id integer, p_account account_type) - RETURNS integer AS -$BODY$ -declare - nMax fiche.f_id%type; - nCount integer; - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - first text; - second text; -begin - - if p_account is not null and length(trim(p_account)) != 0 then - if position (',' in p_account) = 0 then - 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; - 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; - end if; - end if; - - update fiche_detail set ad_value=p_account where f_id=p_f_id and ad_id=5 ; - -return 0; -end; -$BODY$ - LANGUAGE plpgsql; - -update operation_analytique set oa_debit=j_debit from jrnx where jrnx.j_id = operation_analytique.j_id; - -update version set val=96; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade96.sql b/sources/html/admin/sql/patch/upgrade96.sql deleted file mode 100644 index c7d680f..0000000 --- a/sources/html/admin/sql/patch/upgrade96.sql +++ /dev/null @@ -1,7 +0,0 @@ -begin; - -drop function if exists public.account_insert(integer,text); - -update version set val=97; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade97.sql b/sources/html/admin/sql/patch/upgrade97.sql deleted file mode 100644 index f2232ab..0000000 --- a/sources/html/admin/sql/patch/upgrade97.sql +++ /dev/null @@ -1,965 +0,0 @@ -begin; -drop table public.import_tmp; -drop table public.format_csv_banque; -insert into parameter values ('MY_ALPHANUM','N'); -update PARAMETER set pr_value='N' where pr_id='MY_CHECK_PERIODE'; -delete from user_sec_act where ua_act_id not in (800,805,910); -delete from action where ac_id not in (800,805,910); -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'); -create unique index qcode_idx on fiche_detail (ad_value) where ad_id=23; - -CREATE OR REPLACE FUNCTION comptaproc.account_alphanum() - RETURNS boolean AS -$BODY$ -declare - l_auto bool; -begin - l_auto := true; - select pr_value into l_auto from parameter where pr_id='MY_ALPHANUM'; - if l_auto = 'N' or l_auto is null then - l_auto:=false; - end if; - return l_auto; -end; -$BODY$ - LANGUAGE plpgsql; - -CREATE OR REPLACE FUNCTION comptaproc.account_compute(p_f_id integer) - RETURNS account_type AS -$BODY$ -declare - class_base fiche_def.fd_class_base%type; - maxcode numeric; - sResult account_type; - 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 - 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 - -- 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 := class_base||sName; - end if; - return sResult; -end; -$BODY$ -LANGUAGE plpgsql; - -DROP FUNCTION comptaproc.account_insert(integer, text); - -CREATE OR REPLACE FUNCTION comptaproc.account_insert(p_f_id integer, p_account text) - RETURNS text AS -$BODY$ -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; -begin - - 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'; - select count(*) into nCount from tmp_pcmn where pcm_val=p_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,p_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(p_account::account_type); - insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::account_type,sName,nParent); - perform attribut_insert(p_f_id,5,p_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 '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); - - 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; - -return 0; -end; -$BODY$ -LANGUAGE plpgsql; - -CREATE OR REPLACE FUNCTION comptaproc.account_update(p_f_id integer, p_account account_type) - RETURNS integer AS -$BODY$ -declare - nMax fiche.f_id%type; - nCount integer; - nParent tmp_pcmn.pcm_val_parent%type; - sName varchar; - first text; - second text; -begin - - if length(trim(p_account)) != 0 then - -- 2 accounts in card separated by comma - if position (',' in p_account) = 0 then - 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; - 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 - - end if; - else - -- account is null - update fiche_detail set ad_value=null where f_id=p_f_id and ad_id=5 ; - end if; - - update fiche_detail set ad_value=p_account where f_id=p_f_id and ad_id=5 ; - -return 0; -end; -$BODY$ -LANGUAGE plpgsql; - -CREATE OR REPLACE FUNCTION comptaproc.format_account(p_account account_type) - RETURNS account_type AS -$BODY$ - -declare - -sResult account_type; - -begin -sResult := lower(p_account); - -sResult := translate(sResult,'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc'); -sResult := translate(sResult,' $€µ£%.+-/\!(){}(),;_&|"#''^<>*',''); - -return upper(sResult); - -end; -$BODY$ -LANGUAGE plpgsql; - -COMMENT ON FUNCTION comptaproc.format_account(account_type) IS 'format the accounting : -- upper case -- remove space and special char. -'; - -CREATE OR REPLACE FUNCTION comptaproc.tmp_pcmn_alphanum_ins_upd() - RETURNS trigger AS -$BODY$ -declare - r_record tmp_pcmn%ROWTYPE; -begin -r_record := NEW; -r_record.pcm_val:=format_account(NEW.pcm_val); - -return r_record; -end; -$BODY$ -LANGUAGE plpgsql; -CREATE OR REPLACE FUNCTION comptaproc.tmp_pcmn_ins() - RETURNS trigger AS -$BODY$ -declare - r_record tmp_pcmn%ROWTYPE; -begin -r_record := NEW; -if length(trim(r_record.pcm_type))=0 or r_record.pcm_type is NULL then - r_record.pcm_type:=find_pcm_type(NEW.pcm_val); - return r_record; -end if; -return NEW; -end; -$BODY$ -LANGUAGE plpgsql; - -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(); - -DROP FUNCTION comptaproc.account_add(account_type, character varying); - -CREATE OR REPLACE FUNCTION comptaproc.account_add(p_id account_type, p_name character varying) - RETURNS text AS -$BODY$ -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; -end ; -$BODY$ - LANGUAGE plpgsql; - -CREATE TABLE menu_ref ( - me_code text NOT NULL, - me_menu text, - me_file text, - me_url text, - me_description text, - me_parameter text, - me_javascript text, - me_type character varying(2) -); -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 -PR for Printing -SP for special meaning (ex: return to line) -PL for plugin'; - -CREATE TABLE 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 -); - -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'; - -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 -); -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.pm_default IS 'default menu'; -COMMENT ON COLUMN profile_menu.p_type_display IS 'M is a module -E is a menu -S is a select (for plugin)'; - - -CREATE SEQUENCE profile_menu_pm_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE profile_menu_pm_id_seq OWNED BY profile_menu.pm_id; -SELECT pg_catalog.setval('profile_menu_pm_id_seq', 778, true); - -CREATE TABLE profile_menu_type ( - pm_type text NOT NULL, - pm_desc text -); - -CREATE SEQUENCE profile_p_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; - -ALTER SEQUENCE profile_p_id_seq OWNED BY profile.p_id; - -SELECT pg_catalog.setval('profile_p_id_seq', 11, true); - -CREATE TABLE profile_user ( - user_name text NOT NULL, - pu_id integer NOT NULL, - p_id integer -); - -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'; - -CREATE SEQUENCE profile_user_pu_id_seq - START WITH 1 - INCREMENT BY 1 - NO MAXVALUE - NO MINVALUE - CACHE 1; -ALTER SEQUENCE profile_user_pu_id_seq OWNED BY profile_user.pu_id; -SELECT pg_catalog.setval('profile_user_pu_id_seq', 6, true); -CREATE VIEW v_all_menu AS - SELECT pm.me_code, pm.pm_id, pm.me_code_dep, pm.p_order, pm.p_type_display, pu.user_name, pu.pu_id, 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_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)) ORDER BY pm.p_order; -ALTER TABLE profile ALTER COLUMN p_id SET DEFAULT nextval('profile_p_id_seq'::regclass); -ALTER TABLE profile_menu ALTER COLUMN pm_id SET DEFAULT nextval('profile_menu_pm_id_seq'::regclass); -ALTER TABLE profile_user ALTER COLUMN pu_id SET DEFAULT nextval('profile_user_pu_id_seq'::regclass); -INSERT INTO menu_ref VALUES ('ACH', 'Achat', 'compta_ach.inc.php', NULL, 'Nouvel achat ou dépense', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCHOP', 'Historique', 'anc_history.inc.php', NULL, 'Historique des imputations analytiques', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCGL', 'Grand''Livre', 'anc_great_ledger.inc.php', NULL, 'Grand livre d''plan analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCBS', 'Balance simple', 'anc_balance_simple.inc.php', NULL, 'Balance simple des imputations analytiques', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCBC2', 'Balance croisée double', 'anc_balance_double.inc.php', NULL, 'Balance double croisées des imputations analytiques', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCTAB', 'Tableau', 'anc_acc_table.inc.php', NULL, 'Tableau lié à la comptabilité', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCBCC', 'Balance Analytique/comptabilité', 'anc_acc_balance.inc.php', NULL, 'Lien entre comptabilité et Comptabilité analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCGR', 'Groupe', 'anc_group_balance.inc.php', NULL, 'Balance par groupe', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CSV:AncGrandLivre', 'Impression Grand-Livre', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncBalGroup', 'Export Balance groupe analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('OTH:Bilan', 'Export Bilan', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:ledger', 'Export Journaux', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:postedetail', 'Export Poste détail', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:postedetail', 'Export Poste détail', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:fichedetail', 'Export Fiche détail', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('SEARCH', 'Recherche', NULL, NULL, 'Recherche', NULL, 'popup_recherche()', 'ME'); -INSERT INTO menu_ref VALUES ('DIVPARM', 'Divers', NULL, NULL, 'Paramètres divers', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGTVA', 'TVA', 'tva.inc.php', NULL, 'Config. de la tva', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CARD', 'Fiche', 'fiche.inc.php', NULL, 'Fiche', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('STOCK', 'Stock', 'stock.inc.php', NULL, 'Stock', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('MOD', 'Menu et profil', NULL, NULL, 'Menu ', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGPRO', 'Profil', 'profile.inc.php', NULL, 'Configuration profil', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGPAY', 'Moyen de paiement', 'payment_middle.inc.php', NULL, 'Config. des méthodes de paiement', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGACC', 'Poste', 'poste.inc.php', NULL, 'Config. poste comptable de base', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('VEN', 'Vente', 'compta_ven.inc.php', NULL, 'Nouvelle vente ou recette', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGMENU', 'Config. Menu', 'menu.inc.php', NULL, 'Configuration des menus et plugins', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('COMPANY', 'Sociétés', 'company.inc.php', NULL, 'Parametre societe', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PERIODE', 'Période', 'periode.inc.php', NULL, 'Gestion des périodes', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PDF:fichedetail', 'Export Fiche détail', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:fiche_balance', 'Export Fiche balance', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:fiche_balance', 'Export Fiche balance', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:report', 'Export report', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:report', 'Export report', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:fiche', 'Export Fiche', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:fiche', 'Export Fiche', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:glcompte', 'Export Grand Livre', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:glcompte', 'Export Grand Livre', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:sec', 'Export Sécurité', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncList', 'Export Comptabilité analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncBalSimple', 'Export Comptabilité analytique balance simple', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:AncBalSimple', 'Export Comptabilité analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncBalDouble', 'Export Comptabilité analytique balance double', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:AncBalDouble', 'Export Comptabilité analytique balance double', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:balance', 'Export Balance comptable', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('PDF:balance', 'Export Balance comptable', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:histo', 'Export Historique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:ledger', 'Export Journaux', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncTable', 'Export Tableau Analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('CSV:AncAccList', 'Export Historique Compt. Analytique', NULL, NULL, NULL, NULL, NULL, 'PR'); -INSERT INTO menu_ref VALUES ('SUPPL', 'Fournisseur', 'supplier.inc.php', NULL, 'Suivi fournisseur', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('LET', 'Lettrage', NULL, NULL, 'Lettrage', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCODS', 'Opérations diverses', 'anc_od.inc.php', NULL, 'OD analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('VERIFBIL', 'Vérification ', 'verif_bilan.inc.php', NULL, 'Vérification de la comptabilité', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('REPORT', 'Création de rapport', 'report.inc.php', NULL, 'Création de rapport', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('OPEN', 'Ecriture Ouverture', 'opening.inc.php', NULL, 'Ecriture d''ouverture', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ACHIMP', 'Historique achat', 'history_operation.inc.php', NULL, 'Historique achat', 'ledger_type=ACH', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FOLLOW', 'Courrier', 'action.inc.php', NULL, 'Suivi, courrier, devis', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FORECAST', 'Prévision', 'forecast.inc.php', NULL, 'Prévision', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('EXT', 'Extension', 'extension_choice.inc.php', NULL, 'Extensions (plugins)', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGDOC', 'Document', 'document_modele.inc.php', NULL, 'Config. modèle de document', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGLED', 'journaux', 'cfgledger.inc.php', NULL, 'Configuration des journaux', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PREDOP', 'Ecriture prédefinie', 'preod.inc.php', NULL, 'Gestion des opérations prédéfinifies', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ADV', 'Avancé', NULL, NULL, 'Menu avancé', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANC', 'Compta Analytique', NULL, NULL, 'Module comptabilité analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGSEC', 'Sécurité', 'param_sec.inc.php', NULL, 'configuration de la sécurité', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PLANANC', 'Plan Compt. analytique', 'anc_pa.inc.php', NULL, 'Plan analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCGROUP', 'Groupe', 'anc_group.inc.php', NULL, 'Groupe analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ODSIMP', 'Historique opérations diverses', 'history_operation.inc.php', NULL, 'Historique opérations diverses', 'ledger_type=ODS', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('VENMENU', 'Vente / Recette', NULL, NULL, 'Menu ventes et recettes', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PREFERENCE', 'Préférence', 'pref.inc.php', NULL, 'Préférence', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('HIST', 'Historique', 'history_operation.inc.php', NULL, 'Historique', 'ledger_type=ALL', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('MENUFIN', 'Financier', NULL, NULL, 'Menu Financier', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FIMP', 'Historique financier', 'history_operation.inc.php', NULL, 'Historique financier', 'ledger_type=FIN', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('MENUACH', 'Achat', NULL, NULL, 'Menu achat', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('MENUODS', 'Opérations diverses', NULL, NULL, 'Menu opérations diverses', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ODS', 'Opérations Diverses', 'compta_ods.inc.php', NULL, 'Nouvelle opérations diverses', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FREC', 'Rapprochement', 'compta_fin_rec.inc.php', NULL, 'Rapprochement bancaire', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ADM', 'Administration', 'adm.inc.php', NULL, 'Suivi administration, banque', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FIN', 'Nouvel extrait', 'compta_fin.inc.php', NULL, 'Nouvel extrait bancaire', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGATCARD', 'Attribut de fiche', 'card_attr.inc.php', NULL, 'Gestion des modèles de fiches', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('FSALDO', 'Soldes', 'compta_fin_saldo.inc.php', NULL, 'Solde des comptes en banques, caisse...', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('JSSEARCH', 'Recherche', NULL, NULL, 'Recherche', NULL, 'search_reconcile()', 'ME'); -INSERT INTO menu_ref VALUES ('LETACC', 'Lettrage par Poste', 'lettering.account.inc.php', NULL, 'lettrage par poste comptable', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CARDBAL', 'Balance', 'balance_card.inc.php', NULL, 'Balance par catégorie de fiche', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CUST', 'Client', 'client.inc.php', NULL, 'Suivi client', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGCARDCAT', 'Catégorie de fiche', 'fiche_def.inc.php', NULL, 'Gestion catégorie de fiche', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGCATDOC', 'Catégorie de documents', 'cat_document.inc.php', NULL, 'Config. catégorie de documents', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('VENIMP', 'Historique vente', 'history_operation.inc.php', NULL, 'Historique des ventes', 'ledger_type=VEN', NULL, 'ME'); -INSERT INTO menu_ref VALUES ('LETCARD', 'Lettrage par Fiche', 'lettering.card.inc.php', NULL, 'Lettrage par fiche', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('CFGPCMN', 'Plan Comptable', 'param_pcmn.inc.php', NULL, 'Config. du plan comptable', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('LOGOUT', 'Sortie', NULL, 'logout.php', 'Sortie', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('DASHBOARD', 'Tableau de bord', 'dashboard.inc.php', NULL, 'Tableau de bord', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('COMPTA', 'Comptabilité', NULL, NULL, 'Module comptabilité', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('GESTION', 'Gestion', NULL, NULL, 'Module gestion', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PARAM', 'Paramètre', NULL, NULL, 'Module paramètre', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTJRN', 'Historique', 'impress_jrn.inc.php', NULL, 'Impression historique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTREC', 'Rapprochement', 'impress_rec.inc.php', NULL, 'Impression des rapprochements', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTPOSTE', 'Poste', 'impress_poste.inc.php', NULL, 'Impression du détail d''un poste comptable', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTREPORT', 'Rapport', 'impress_rapport.inc.php', NULL, 'Impression de rapport', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTBILAN', 'Bilan', 'impress_bilan.inc.php', NULL, 'Impression de bilan', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTGL', 'Grand Livre', 'impress_gl_comptes.inc.php', NULL, 'Impression du grand livre', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTBAL', 'Balance', 'balance.inc.php', NULL, 'Impression des balances comptables', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINTCARD', 'Catégorie de Fiches', 'impress_fiche.inc.php', NULL, 'Impression catégorie de fiches', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('PRINT', 'Impression', NULL, NULL, 'Menu impression', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ACCESS', 'Accueil', NULL, 'user_login.php', 'Accueil', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('ANCIMP', 'Impression', NULL, NULL, 'Impression compta. analytique', NULL, NULL, 'ME'); -INSERT INTO menu_ref VALUES ('new_line', 'saut de ligne', NULL, NULL, 'Saut de ligne', NULL, NULL, 'SP'); - -INSERT INTO profile VALUES ('Administrateur', 1, 'Profil par défaut pour les adminstrateurs', true, true); -INSERT INTO profile VALUES ('Utilisateur', 2, 'Profil par défaut pour les utilisateurs', true, true); -INSERT INTO profile_menu VALUES (59, 'CFGPAY', 'DIVPARM', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (68, 'CFGATCARD', 'DIVPARM', 1, 9, 'E', 0); -INSERT INTO profile_menu VALUES (61, 'CFGACC', 'DIVPARM', 1, 6, 'E', 0); -INSERT INTO profile_menu VALUES (54, 'COMPANY', 'PARAM', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (651, 'ANCHOP', 'ANCIMP', 1, 10, 'E', 0); -INSERT INTO profile_menu VALUES (173, 'COMPTA', NULL, 1, 40, 'M', 0); -INSERT INTO profile_menu VALUES (55, 'PERIODE', 'PARAM', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (56, 'DIVPARM', 'PARAM', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (652, 'ANCGL', 'ANCIMP', 1, 20, 'E', 0); -INSERT INTO profile_menu VALUES (60, 'CFGTVA', 'DIVPARM', 1, 5, 'E', 0); -INSERT INTO profile_menu VALUES (653, 'ANCBS', 'ANCIMP', 1, 30, 'E', 0); -INSERT INTO profile_menu VALUES (654, 'ANCBC2', 'ANCIMP', 1, 40, 'E', 0); -INSERT INTO profile_menu VALUES (655, 'ANCTAB', 'ANCIMP', 1, 50, 'E', 0); -INSERT INTO profile_menu VALUES (656, 'ANCBCC', 'ANCIMP', 1, 60, 'E', 0); -INSERT INTO profile_menu VALUES (657, 'ANCGR', 'ANCIMP', 1, 70, 'E', 0); -INSERT INTO profile_menu VALUES (658, 'CSV:AncGrandLivre', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (662, 'new_line', NULL, 1, 35, 'M', 0); -INSERT INTO profile_menu VALUES (67, 'CFGCATDOC', 'DIVPARM', 1, 8, 'E', 0); -INSERT INTO profile_menu VALUES (69, 'CFGPCMN', 'PARAM', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (526, 'PRINTGL', 'PRINT', 1, 20, 'E', 0); -INSERT INTO profile_menu VALUES (23, 'LET', 'COMPTA', 1, 8, 'E', 0); -INSERT INTO profile_menu VALUES (523, 'PRINTBAL', 'PRINT', 1, 50, 'E', 0); -INSERT INTO profile_menu VALUES (529, 'PRINTREPORT', 'PRINT', 1, 85, 'E', 0); -INSERT INTO profile_menu VALUES (72, 'PREDOP', 'PARAM', 1, 7, 'E', 0); -INSERT INTO profile_menu VALUES (75, 'PLANANC', 'ANC', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (65, 'CFGCARDCAT', 'DIVPARM', 1, 7, 'E', 0); -INSERT INTO profile_menu VALUES (76, 'ANCODS', 'ANC', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (77, 'ANCGROUP', 'ANC', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (78, 'ANCIMP', 'ANC', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (45, 'PARAM', NULL, 1, 20, 'M', 0); -INSERT INTO profile_menu VALUES (527, 'PRINTJRN', 'PRINT', 1, 10, 'E', 0); -INSERT INTO profile_menu VALUES (530, 'PRINTREC', 'PRINT', 1, 100, 'E', 0); -INSERT INTO profile_menu VALUES (524, 'PRINTBILAN', 'PRINT', 1, 90, 'E', 0); -INSERT INTO profile_menu VALUES (79, 'PREFERENCE', NULL, 1, 15, 'M', 0); -INSERT INTO profile_menu VALUES (37, 'CUST', 'GESTION', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (38, 'SUPPL', 'GESTION', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (39, 'ADM', 'GESTION', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (36, 'CARD', 'GESTION', 1, 6, 'E', 0); -INSERT INTO profile_menu VALUES (40, 'STOCK', 'GESTION', 1, 5, 'E', 0); -INSERT INTO profile_menu VALUES (41, 'FORECAST', 'GESTION', 1, 7, 'E', 0); -INSERT INTO profile_menu VALUES (42, 'FOLLOW', 'GESTION', 1, 8, 'E', 0); -INSERT INTO profile_menu VALUES (29, 'VERIFBIL', 'ADV', 1, 21, 'E', 0); -INSERT INTO profile_menu VALUES (30, 'STOCK', 'ADV', 1, 22, 'E', 0); -INSERT INTO profile_menu VALUES (31, 'PREDOP', 'ADV', 1, 23, 'E', 0); -INSERT INTO profile_menu VALUES (32, 'OPEN', 'ADV', 1, 24, 'E', 0); -INSERT INTO profile_menu VALUES (33, 'REPORT', 'ADV', 1, 25, 'E', 0); -INSERT INTO profile_menu VALUES (5, 'CARD', 'COMPTA', 1, 7, 'E', 0); -INSERT INTO profile_menu VALUES (43, 'HIST', 'COMPTA', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (28, 'ADV', 'COMPTA', 1, 20, 'E', 0); -INSERT INTO profile_menu VALUES (53, 'ACCESS', NULL, 1, 25, 'M', 0); -INSERT INTO profile_menu VALUES (123, 'CSV:histo', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (20, 'LOGOUT', NULL, 1, 30, 'M', 0); -INSERT INTO profile_menu VALUES (35, 'PRINT', 'GESTION', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (124, 'CSV:ledger', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (125, 'PDF:ledger', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (6, 'PRINT', 'COMPTA', 1, 6, 'E', 0); -INSERT INTO profile_menu VALUES (126, 'CSV:postedetail', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (3, 'MENUACH', 'COMPTA', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (86, 'ACHIMP', 'MENUACH', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (34, 'GESTION', NULL, 1, 45, 'M', 0); -INSERT INTO profile_menu VALUES (18, 'MENUODS', 'COMPTA', 1, 5, 'E', 0); -INSERT INTO profile_menu VALUES (88, 'ODS', 'MENUODS', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (89, 'ODSIMP', 'MENUODS', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (2, 'ANC', NULL, 1, 50, 'M', 0); -INSERT INTO profile_menu VALUES (4, 'VENMENU', 'COMPTA', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (90, 'VEN', 'VENMENU', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (91, 'VENIMP', 'VENMENU', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (19, 'FIN', 'MENUFIN', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (73, 'CFGDOC', 'PARAM', 1, 8, 'E', 0); -INSERT INTO profile_menu VALUES (74, 'CFGLED', 'PARAM', 1, 9, 'E', 0); -INSERT INTO profile_menu VALUES (71, 'CFGSEC', 'PARAM', 1, 6, 'E', 0); -INSERT INTO profile_menu VALUES (82, 'EXT', NULL, 1, 55, 'M', 0); -INSERT INTO profile_menu VALUES (95, 'FREC', 'MENUFIN', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (94, 'FSALDO', 'MENUFIN', 1, 3, 'E', 0); -INSERT INTO profile_menu VALUES (27, 'LETACC', 'LET', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (24, 'LETCARD', 'LET', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (167, 'MOD', 'PARAM', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (92, 'MENUFIN', 'COMPTA', 1, 4, 'E', 0); -INSERT INTO profile_menu VALUES (93, 'FIMP', 'MENUFIN', 1, 2, 'E', 0); -INSERT INTO profile_menu VALUES (151, 'SEARCH', NULL, 1, 60, 'M', 0); -INSERT INTO profile_menu VALUES (85, 'ACH', 'MENUACH', 1, 1, 'E', 0); -INSERT INTO profile_menu VALUES (127, 'PDF:postedetail', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (128, 'CSV:fichedetail', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (129, 'PDF:fichedetail', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (130, 'CSV:fiche_balance', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (131, 'PDF:fiche_balance', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (132, 'CSV:report', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (133, 'PDF:report', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (134, 'CSV:fiche', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (135, 'PDF:fiche', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (136, 'CSV:glcompte', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (137, 'PDF:glcompte', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (138, 'PDF:sec', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (139, 'CSV:AncList', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (140, 'CSV:AncBalSimple', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (141, 'PDF:AncBalSimple', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (142, 'CSV:AncBalDouble', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (143, 'PDF:AncBalDouble', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (144, 'CSV:balance', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (145, 'PDF:balance', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (146, 'CSV:AncTable', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (147, 'CSV:AncAccList', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (148, 'CSV:AncBalGroup', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (149, 'OTH:Bilan', NULL, 1, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (528, 'PRINTPOSTE', 'PRINT', 1, 30, 'E', 0); -INSERT INTO profile_menu VALUES (525, 'PRINTCARD', 'PRINT', 1, 40, 'E', 0); -INSERT INTO profile_menu VALUES (1, 'DASHBOARD', NULL, 1, 10, 'M', 1); -INSERT INTO profile_menu VALUES (172, 'CFGPRO', 'MOD', 1, NULL, 'E', 0); -INSERT INTO profile_menu VALUES (171, 'CFGMENU', 'MOD', 1, NULL, 'E', 0); -INSERT INTO profile_menu VALUES (663, 'CFGPAY', 'DIVPARM', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (664, 'CFGATCARD', 'DIVPARM', 2, 9, 'E', 0); -INSERT INTO profile_menu VALUES (665, 'CFGACC', 'DIVPARM', 2, 6, 'E', 0); -INSERT INTO profile_menu VALUES (668, 'ANCHOP', 'ANCIMP', 2, 10, 'E', 0); -INSERT INTO profile_menu VALUES (669, 'COMPTA', NULL, 2, 40, 'M', 0); -INSERT INTO profile_menu VALUES (672, 'ANCGL', 'ANCIMP', 2, 20, 'E', 0); -INSERT INTO profile_menu VALUES (673, 'CFGTVA', 'DIVPARM', 2, 5, 'E', 0); -INSERT INTO profile_menu VALUES (674, 'ANCBS', 'ANCIMP', 2, 30, 'E', 0); -INSERT INTO profile_menu VALUES (675, 'ANCBC2', 'ANCIMP', 2, 40, 'E', 0); -INSERT INTO profile_menu VALUES (676, 'ANCTAB', 'ANCIMP', 2, 50, 'E', 0); -INSERT INTO profile_menu VALUES (677, 'ANCBCC', 'ANCIMP', 2, 60, 'E', 0); -INSERT INTO profile_menu VALUES (678, 'ANCGR', 'ANCIMP', 2, 70, 'E', 0); -INSERT INTO profile_menu VALUES (679, 'CSV:AncGrandLivre', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (680, 'new_line', NULL, 2, 35, 'M', 0); -INSERT INTO profile_menu VALUES (681, 'CFGCATDOC', 'DIVPARM', 2, 8, 'E', 0); -INSERT INTO profile_menu VALUES (683, 'PRINTGL', 'PRINT', 2, 20, 'E', 0); -INSERT INTO profile_menu VALUES (684, 'LET', 'COMPTA', 2, 8, 'E', 0); -INSERT INTO profile_menu VALUES (685, 'PRINTBAL', 'PRINT', 2, 50, 'E', 0); -INSERT INTO profile_menu VALUES (686, 'PRINTREPORT', 'PRINT', 2, 85, 'E', 0); -INSERT INTO profile_menu VALUES (688, 'PLANANC', 'ANC', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (689, 'CFGCARDCAT', 'DIVPARM', 2, 7, 'E', 0); -INSERT INTO profile_menu VALUES (690, 'ANCODS', 'ANC', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (717, 'CSV:ledger', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (718, 'PDF:ledger', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (719, 'PRINT', 'COMPTA', 2, 6, 'E', 0); -INSERT INTO profile_menu VALUES (720, 'CSV:postedetail', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (721, 'MENUACH', 'COMPTA', 2, 3, 'E', 0); -INSERT INTO profile_menu VALUES (722, 'ACHIMP', 'MENUACH', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (723, 'GESTION', NULL, 2, 45, 'M', 0); -INSERT INTO profile_menu VALUES (724, 'MENUODS', 'COMPTA', 2, 5, 'E', 0); -INSERT INTO profile_menu VALUES (725, 'ODS', 'MENUODS', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (726, 'ODSIMP', 'MENUODS', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (727, 'ANC', NULL, 2, 50, 'M', 0); -INSERT INTO profile_menu VALUES (728, 'VENMENU', 'COMPTA', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (729, 'VEN', 'VENMENU', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (730, 'VENIMP', 'VENMENU', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (731, 'FIN', 'MENUFIN', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (735, 'EXT', NULL, 2, 55, 'M', 0); -INSERT INTO profile_menu VALUES (736, 'FREC', 'MENUFIN', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (737, 'FSALDO', 'MENUFIN', 2, 3, 'E', 0); -INSERT INTO profile_menu VALUES (738, 'LETACC', 'LET', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (691, 'ANCGROUP', 'ANC', 2, 3, 'E', 0); -INSERT INTO profile_menu VALUES (692, 'ANCIMP', 'ANC', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (694, 'PRINTJRN', 'PRINT', 2, 10, 'E', 0); -INSERT INTO profile_menu VALUES (695, 'PRINTREC', 'PRINT', 2, 100, 'E', 0); -INSERT INTO profile_menu VALUES (696, 'PRINTBILAN', 'PRINT', 2, 90, 'E', 0); -INSERT INTO profile_menu VALUES (697, 'PREFERENCE', NULL, 2, 15, 'M', 0); -INSERT INTO profile_menu VALUES (698, 'CUST', 'GESTION', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (699, 'SUPPL', 'GESTION', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (700, 'ADM', 'GESTION', 2, 3, 'E', 0); -INSERT INTO profile_menu VALUES (701, 'CARD', 'GESTION', 2, 6, 'E', 0); -INSERT INTO profile_menu VALUES (702, 'STOCK', 'GESTION', 2, 5, 'E', 0); -INSERT INTO profile_menu VALUES (703, 'FORECAST', 'GESTION', 2, 7, 'E', 0); -INSERT INTO profile_menu VALUES (704, 'FOLLOW', 'GESTION', 2, 8, 'E', 0); -INSERT INTO profile_menu VALUES (705, 'VERIFBIL', 'ADV', 2, 21, 'E', 0); -INSERT INTO profile_menu VALUES (706, 'STOCK', 'ADV', 2, 22, 'E', 0); -INSERT INTO profile_menu VALUES (707, 'PREDOP', 'ADV', 2, 23, 'E', 0); -INSERT INTO profile_menu VALUES (708, 'OPEN', 'ADV', 2, 24, 'E', 0); -INSERT INTO profile_menu VALUES (709, 'REPORT', 'ADV', 2, 25, 'E', 0); -INSERT INTO profile_menu VALUES (710, 'CARD', 'COMPTA', 2, 7, 'E', 0); -INSERT INTO profile_menu VALUES (711, 'HIST', 'COMPTA', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (712, 'ADV', 'COMPTA', 2, 20, 'E', 0); -INSERT INTO profile_menu VALUES (713, 'ACCESS', NULL, 2, 25, 'M', 0); -INSERT INTO profile_menu VALUES (714, 'CSV:histo', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (715, 'LOGOUT', NULL, 2, 30, 'M', 0); -INSERT INTO profile_menu VALUES (716, 'PRINT', 'GESTION', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (739, 'LETCARD', 'LET', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (742, 'MENUFIN', 'COMPTA', 2, 4, 'E', 0); -INSERT INTO profile_menu VALUES (743, 'FIMP', 'MENUFIN', 2, 2, 'E', 0); -INSERT INTO profile_menu VALUES (744, 'SEARCH', NULL, 2, 60, 'M', 0); -INSERT INTO profile_menu VALUES (745, 'ACH', 'MENUACH', 2, 1, 'E', 0); -INSERT INTO profile_menu VALUES (746, 'PDF:postedetail', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (747, 'CSV:fichedetail', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (748, 'PDF:fichedetail', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (749, 'CSV:fiche_balance', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (750, 'PDF:fiche_balance', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (751, 'CSV:report', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (752, 'PDF:report', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (753, 'CSV:fiche', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (754, 'PDF:fiche', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (755, 'CSV:glcompte', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (756, 'PDF:glcompte', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (757, 'PDF:sec', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (758, 'CSV:AncList', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (759, 'CSV:AncBalSimple', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (760, 'PDF:AncBalSimple', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (761, 'CSV:AncBalDouble', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (762, 'PDF:AncBalDouble', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (763, 'CSV:balance', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (764, 'PDF:balance', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (765, 'CSV:AncTable', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (766, 'CSV:AncAccList', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (767, 'CSV:AncBalGroup', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (768, 'OTH:Bilan', NULL, 2, NULL, 'P', 0); -INSERT INTO profile_menu VALUES (769, 'PRINTPOSTE', 'PRINT', 2, 30, 'E', 0); -INSERT INTO profile_menu VALUES (770, 'PRINTCARD', 'PRINT', 2, 40, 'E', 0); -INSERT INTO profile_menu VALUES (777, 'CFGPRO', 'MOD', 2, NULL, 'E', 0); -INSERT INTO profile_menu VALUES (778, 'CFGMENU', 'MOD', 2, NULL, 'E', 0); -INSERT INTO profile_menu VALUES (772, 'DASHBOARD', NULL, 2, 10, 'M', 1); -INSERT INTO profile_menu_type VALUES ('P', 'Impression'); -INSERT INTO profile_menu_type VALUES ('S', 'Extension'); -INSERT INTO profile_menu_type VALUES ('E', 'Menu'); -INSERT INTO profile_menu_type VALUES ('M', 'Module'); -INSERT INTO profile_user VALUES ('phpcompta', 1, 1); -ALTER TABLE ONLY menu_ref ADD CONSTRAINT menu_ref_pkey PRIMARY KEY (me_code); -ALTER TABLE ONLY profile_menu ADD CONSTRAINT profile_menu_pkey PRIMARY KEY (pm_id); -ALTER TABLE ONLY profile_menu_type ADD CONSTRAINT profile_menu_type_pkey PRIMARY KEY (pm_type); -ALTER TABLE ONLY profile ADD CONSTRAINT profile_pkey PRIMARY KEY (p_id); -ALTER TABLE ONLY profile_user ADD CONSTRAINT profile_user_pkey PRIMARY KEY (pu_id); -ALTER TABLE ONLY profile_user ADD CONSTRAINT profile_user_user_name_key UNIQUE (user_name, p_id); -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); -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_user ADD CONSTRAINT profile_user_p_id_fkey FOREIGN KEY (p_id) REFERENCES profile(p_id) ON UPDATE CASCADE ON DELETE CASCADE; -create type menu_tree as (code text,description text); - -create or replace function comptaproc.get_profile_menu(login text) -returns setof menu_tree -as -$BODY$ -declare - a menu_tree; - e menu_tree; -begin -for a in select me_code,me_description from v_all_menu where user_name=login - and me_code_dep is null and me_type <> 'PR' and me_type <>'SP' -loop - return next a; - - for e in select * from get_menu_tree(a.code,login) - loop - return next e; - end loop; - - end loop; -return; -end; -$BODY$ language plpgsql; - - - - -CREATE OR REPLACE FUNCTION comptaproc.get_menu_tree(p_code text,login text) - RETURNS SETOF menu_tree AS -$BODY$ -declare - i menu_tree; - e menu_tree; - a text; - x v_all_menu%ROWTYPE; -begin - for x in select * from v_all_menu where me_code_dep=p_code::text and user_name=login::text - loop - if x.me_code_dep is not null then - i.code := x.me_code_dep||'/'||x.me_code; - else - i.code := x.me_code; - end if; - - i.description := x.me_description; - - return next i; - - for e in select * from get_menu_tree(x.me_code,login) - loop - e.code:=x.me_code_dep||'/'||e.code; - return next e; - end loop; - - end loop; - return; -end; -$BODY$ -LANGUAGE plpgsql; - -alter table mod_payment add jrn_def_id bigint; -update mod_payment set jrn_def_id=2 where mp_type='VEN'; -update mod_payment set jrn_def_id=3 where mp_type='ACH'; - -alter table mod_payment drop mp_type; - -delete from mod_payment where jrn_def_id not in (select jrn_def_id from jrn_def); - -alter table mod_payment add constraint mod_payment_jrn_def_id_fk foreign key (jrn_def_id) references jrn_def(jrn_def_id) on delete cascade on update cascade; - -comment on column mod_payment.jrn_def_id is 'Ledger using this payment method'; -alter table tva_rate add tva_both_side integer ; -alter table tva_rate alter tva_both_side set default 0; -update tva_rate set tva_both_side=0; - -drop FUNCTION comptaproc.tva_modify(integer, text, numeric, text, text); -alter table quant_purchase add qp_vat_sided numeric (20,4); -alter table quant_sold add qs_vat_sided numeric (20,4); - -alter table quant_purchase alter qp_vat_sided set default 0.0; -alter table quant_sold alter qs_vat_sided set default 0.0; - -update quant_purchase set qp_vat_sided=0.0; -update quant_sold set qs_vat_sided=0.0; - -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 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'; - -CREATE OR REPLACE FUNCTION comptaproc.tva_modify(integer, text, numeric, text, text,integer) - RETURNS integer -AS $function$ -declare - p_tva_id alias for $1; - p_tva_label alias for $2; - p_tva_rate alias for $3; - p_tva_comment alias for $4; - p_tva_poste alias for $5; - p_tva_both_side alias for $6; - debit text; - credit text; - nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::account_type; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::account_type; - if nCount = 0 then return 4; end if; - -end if; -update tva_rate set tva_label=p_tva_label,tva_rate=p_tva_rate,tva_comment=p_tva_comment,tva_poste=p_tva_poste,tva_both_side=p_tva_both_side - where tva_id=p_tva_id; -return 0; -end; -$function$ -LANGUAGE plpgsql; - -drop FUNCTION comptaproc.tva_insert(text, numeric, text, text); - -CREATE OR REPLACE FUNCTION comptaproc.tva_insert(text, numeric, text, text,integer) - RETURNS integer -AS $function$ -declare - l_tva_id integer; - p_tva_label alias for $1; - p_tva_rate alias for $2; - p_tva_comment alias for $3; - p_tva_poste alias for $4; - p_tva_both_side alias for $5; - debit text; - credit text; - nCount integer; -begin -if length(trim(p_tva_label)) = 0 then - return 3; -end if; - -if length(trim(p_tva_poste)) != 0 then - if position (',' in p_tva_poste) = 0 then return 4; end if; - debit = split_part(p_tva_poste,',',1); - credit = split_part(p_tva_poste,',',2); - select count(*) into nCount from tmp_pcmn where pcm_val=debit::account_type; - if nCount = 0 then return 4; end if; - select count(*) into nCount from tmp_pcmn where pcm_val=credit::account_type; - if nCount = 0 then return 4; end if; - -end if; -select into l_tva_id nextval('s_tva') ; -insert into tva_rate(tva_id,tva_label,tva_rate,tva_comment,tva_poste,tva_both_side) - values (l_tva_id,p_tva_label,p_tva_rate,p_tva_comment,p_tva_poste,p_tva_both_side); -return 0; -end; -$function$ -LANGUAGE plpgsql; - -DROP FUNCTION comptaproc.insert_quant_purchase(text,numeric, character varying,numeric,numeric,numeric,integer,numeric,numeric,numeric,numeric,character varying); - -CREATE OR REPLACE 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) - RETURNS void -AS $function$ -declare - fid_client integer; - fid_good integer; -begin - select f_id into fid_client from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_client)); - select f_id into fid_good from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_fiche)); - insert into quant_purchase - (qp_internal, - j_id, - qp_fiche, - qp_quantite, - qp_price, - qp_vat, - qp_vat_code, - qp_nd_amount, - qp_nd_tva, - qp_nd_tva_recup, - qp_supplier, - qp_dep_priv, - qp_vat_sided) - values - (p_internal, - p_j_id, - fid_good, - p_quant, - p_price, - p_vat, - p_vat_code, - p_nd_amount, - p_nd_tva, - p_nd_tva_recup, - fid_client, - p_dep_priv, - p_tva_sided); - return; -end; - $function$ - LANGUAGE plpgsql; - -DROP FUNCTION comptaproc.insert_quant_sold(text, numeric, character varying, numeric, numeric, numeric, integer, character varying); -CREATE OR REPLACE 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) - RETURNS void -AS $function$ -declare - fid_client integer; - fid_good integer; -begin - - select f_id into fid_client from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_client)); - select f_id into fid_good from - fiche_detail where ad_id=23 and ad_value=upper(trim(p_fiche)); - insert into quant_sold - (qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client,qs_valid,qs_vat_sided) - values - (p_internal,p_jid,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client,'Y',p_tva_sided); - return; -end; - $function$ - LANGUAGE plpgsql; - -insert into menu_ref(me_code,me_menu,me_file,me_description,me_type,me_parameter) select ex_code,ex_name,ex_file,ex_desC,'PL','plugin_code='||ex_code from extension; - -insert into profile_menu (me_code,me_code_dep,p_id,p_type_display) select me_code,'EXT',1,'S' from menu_ref where me_type='PL'; -update jrn set jr_internal=substr(jrn_def_type,1,1)||lpad(upper(to_hex(jr_id+1)),6,'0') from jrn_def where jrn_def_id=jr_def_id; - -update version set val=98; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade98.sql b/sources/html/admin/sql/patch/upgrade98.sql deleted file mode 100644 index bdc9333..0000000 --- a/sources/html/admin/sql/patch/upgrade98.sql +++ /dev/null @@ -1,13 +0,0 @@ -begin; - -update attr_def set ad_type='poste' where ad_id=5; -update attr_def set ad_type='numeric',ad_size=6 where ad_id in (20,31); -update attr_def set ad_size=17 where ad_type='poste'; - -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) select split_part(tva_poste,',',1),tva_comment,substring(split_part(tva_poste,',',1),1,3),'PAS' from tva_rate where split_part(tva_poste,',',1) not in (select pcm_val from tmp_pcmn); -insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) select split_part(tva_poste,',',2),tva_comment,substring(split_part(tva_poste,',',2),1,3),'ACT' from tva_rate where split_part(tva_poste,',',2) not in (select pcm_val from tmp_pcmn); - - -update version set val=99; - -commit; \ No newline at end of file diff --git a/sources/html/admin/sql/patch/upgrade99.sql b/sources/html/admin/sql/patch/upgrade99.sql deleted file mode 100644 index c3cd723..0000000 --- a/sources/html/admin/sql/patch/upgrade99.sql +++ /dev/null @@ -1,45 +0,0 @@ -begin; -CREATE OR REPLACE FUNCTION comptaproc.get_menu_dependency(profile_menu_id int) - RETURNS SETOF int AS -$BODY$ -declare - i int; - x int; - e int; -begin - for x in select pm_id,me_code - from profile_menu - where me_code_dep in (select me_code from profile_menu where pm_id=profile_menu_id) - and p_id = (select p_id from profile_menu where pm_id=profile_menu_id) - loop - return next x; - - for e in select * from comptaproc.get_menu_dependency(x) - loop - return next e; - end loop; - - end loop; - return; -end; -$BODY$ -LANGUAGE plpgsql; - -delete from profile_menu where p_id=2 and me_code_dep='DIVPARM'; -delete from profile_menu where p_id=2 and me_code_dep='MOD'; - -update quant_sold set qs_price=(-1)*qs_price, qs_vat=(-1)*qs_vat where qs_quantite < 0 and qs_price > 0 and qs_vat >= 0; - -update quant_purchase set qp_price=(-1)*qp_price, qp_vat=(-1)*qp_vat, - qp_nd_amount=(-1)*qp_nd_amount, - qp_nd_tva=(-1)*qp_nd_tva, - qp_nd_tva_recup=(-1)*qp_nd_tva_recup, - qp_dep_priv=(-1)*qp_dep_priv -where qp_quantite < 0 and qp_price > 0 and qp_vat >= 0; - -update jrnx set j_text = null from jrn where jr_grpt_id=j_grpt and j_text=jr_comment; -insert into parameter (pr_id,pr_value) values ('MY_UPDLAB','N'); - -update version set val=100; - -commit; \ No newline at end of file diff --git a/sources/html/admin/template_config_form.php b/sources/html/admin/template_config_form.php deleted file mode 100644 index 9e8d1fb..0000000 --- a/sources/html/admin/template_config_form.php +++ /dev/null @@ -1,82 +0,0 @@ - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Répertoire temporaire input(); echo HtmlInput::infobulle(200);?>
    Changement de langue input();echo HtmlInput::infobulle(201)?>
    Chemin complet vers les executable de Postgresql input();echo HtmlInput::infobulle(202)?>
    Utilisateur de la base de donnée input();echo HtmlInput::infobulle(203)?>
    Mot de passe de l'utilisateur input();echo HtmlInput::infobulle(204)?>
    Port de postgresql input();echo HtmlInput::infobulle(205)?>
    Mode Serveur mutualisé input() ?>
    -
    -
    - - Attention : si vous installez sous windows n'utilisez pas le \ mais plutôt le / dans les nom de répertoire (càd les chemins ou path) - -
    - diff --git a/sources/html/admin_repo.php b/sources/html/admin_repo.php deleted file mode 100644 index e2fa577..0000000 --- a/sources/html/admin_repo.php +++ /dev/null @@ -1,95 +0,0 @@ -Check(); - -html_page_start($User->theme); - -if ($User->admin != 1) -{ - html_page_stop(); - return; -} -load_all_script(); -echo '

    '._('Administration Globale').'

    '; -echo '
    '; - -echo MenuAdmin()."
    "; - -define('ALLOWED',true); - - -?> -
    - -
    - diff --git a/sources/html/ajax.php b/sources/html/ajax.php deleted file mode 100644 index cab34f0..0000000 --- a/sources/html/ajax.php +++ /dev/null @@ -1,71 +0,0 @@ -check(true); -set_language(); -/* if a code has been asked */ -if (isset($_REQUEST['plugin_code']) ) -{ - if ( LOGINPUT) - { - $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); - fwrite ($file_loginput,"search($_REQUEST['plugin_code']) != -1) - { - /* security */ - if ( !isset ($_SESSION['g_user']) || $ext->can_request($_SESSION['g_user']) == 0 ) - { - exit(); - } - /* call the ajax script */ - require_once(NOALYSS_PLUGIN.DIRECTORY_SEPARATOR.dirname(trim($ext->getp('me_file'))).DIRECTORY_SEPARATOR.'ajax.php'); - } - else - { - alert(j(_("Cette extension n'existe pas "))); - exit(); - } - -} -?> \ No newline at end of file diff --git a/sources/html/ajax_card.php b/sources/html/ajax_card.php deleted file mode 100644 index c33f2a9..0000000 --- a/sources/html/ajax_card.php +++ /dev/null @@ -1,585 +0,0 @@ -check(true); -$g_user->check_dossier($gDossier,true); -$html=var_export($_REQUEST,true); -if ( LOGINPUT) - { - $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); - fwrite ($file_loginput,"check_action(FICCAT)==0)exit(); - ob_start(); - if( ! isset($_GET['ad_id']) || isNumber($_GET['ad_id']) ==0) - throw new Exception ( _("Parametre ad_id est invalide"),11); - $ad_id= $_GET['ad_id']; - try - { - $cn->start(); - $fa=new Fiche_Attr($cn,$ad_id); - $fa->delete(); - $cn->commit(); - } - catch (Exception $e) - { - $cn->rollback(); - echo $e->getMessage(); - } - $html=ob_get_contents(); - ob_end_clean(); - break; - /* ------------------------------------------------------------ */ - /* Display card detail */ - /* ------------------------------------------------------------ */ - -case 'dc': - $f=new Fiche($cn); - /* add title + close */ - $html=HtmlInput::title_box(_("Détail fiche"), $ctl); - if ( $qcode != '') - { - $f->get_by_qcode($qcode); - $can_modify=$g_user->check_action(FIC); - if ( isset($ro) ) - { - $can_modify=0; - } - if ( $can_modify==1) - $card=$f->Display(false); - else - $card=$f->Display(true); - if ( $card == 'FNT' ) - { - $html.='

    '._('Fiche non trouvée').'

    '; - } - else - { - - if ($can_modify==1) - { - $html.='
    '; - $html.=dossier::hidden(); - $html.=HtmlInput::hidden('f_id',$f->id); - $html.=HtmlInput::hidden('ctl',$ctl); - } - $html.=$card; - $html.='

    '; - if ( $can_modify==1) - { - $html.=HtmlInput::submit('save',_('Sauver')); - } - if ( ! isset ($nohistory))$html.=HtmlInput::history_card_button($f->id,_('Historique')); - $html.='

    '; - if ($can_modify==1) - { - $html.='
    '; - } - } - } - else - { - $html.='

    '._('Aucune fiche demandée').'

    '; - } - break; - /* ------------------------------------------------------------ */ - /* Blank card */ - /* ------------------------------------------------------------ */ -case 'bc': - if ( $g_user->check_action(FICADD)==1 ) - { - $r=HtmlInput::title_box(_("Nouvelle fiche"), $ctl); - /* get cat. name */ - $cat_name=$cn->get_value('select fd_label from fiche_def where fd_id=$1', - array($fd_id)); - $f=new Fiche($cn); - $r.='
    '; - $r.=dossier::hidden(); - $r.=(isset($ref))?HtmlInput::hidden('ref',1):''; - $r.=HtmlInput::hidden('fd_id',$fd_id); - $r.=HtmlInput::hidden('ctl',$ctl); - $r.=$f->blank($fd_id); - $r.='

    '; - $r.=HtmlInput::submit('sc',_('Sauve')); - $r.='

    '; - $r.='
    '; - $html=$r; - } - else - { - $html=alert(_('Action interdite'),true); - } - break; - /* ------------------------------------------------------------ */ - /* Show Type */ - /* Before inserting a new card, the type must be selected */ - /* ------------------------------------------------------------ */ -case 'st': - $sql="select fd_id,fd_label,fd_description from fiche_def"; - /* if we filter thanks the ledger*/ - if ( $ledger != -1 ) - { - /* we want the card for deb or cred or both of this ledger */ - switch( $fil ) - { - case -1: - $l=new Acc_Ledger($cn,$ledger); - $where=' where fd_id in ('.$l->get_all_fiche_def().')'; - break; - case 'cred': - $l=new Acc_Ledger($cn,$ledger); - $prop=$l->get_propertie(); - if ( $prop['jrn_def_fiche_cred']=='')$prop=-1; - $where=' where fd_id in ('.$prop['jrn_def_fiche_cred'].')'; - break; - case 'deb': - $l=new Acc_Ledger($cn,$ledger); - $prop=$l->get_propertie(); - if ( $prop=='')$prop=-1; - $where=' where fd_id in ('.$prop['jrn_def_fiche_deb'].')'; - break; - } - } - else - { - /* we filter thanks a given model of card */ - if ( isset($cat)) - { - $where=sprintf(' where frd_id in ('.sql_string ($cat).')'); - } - else - /* we filter thanks a given list of category of card - */ - if ( isset($fil) && strlen(trim($fil)) > 0 ) - { - $where=sprintf(" where fd_id in (%s)", - sql_string($fil)); - } - } - if ( strpos($where," in ()") != 0) - { - $html=HtmlInput::anchor_close('select_card_div'); - $html.=h2info(_('Choix de la catégorie')); - $html.='

    '; - $html.=_("Aucune catégorie de fiche ne correspond à". - " votre demande, le journal pourrait n'avoir accès à aucune fiche"); - $html.='

    '; - break; - } - $sql.=" ".$where." order by fd_label"; - - $array=$cn->get_array($sql); - $html=HtmlInput::title_box(_("Choix de la catégorie"), $ctl); - - if ( empty($array)) - { - $html.=_("Aucune catégorie de fiche ne correspond à". - " votre demande"); - if ( DEBUG ) $html.=$sql; - } - else - { - $r=''; - $r.='

    '; - $r.=_("Choisissez la catégorie de fiche à laquelle vous aimeriez ajouter une fiche").'

    '; - - $r.='
    '; - - $msg=_('Choisissez une catégorie svp'); - $r.='
    " ; - $r.=''; - $r.=dossier::hidden(); - $r.=(isset($ref))?HtmlInput::hidden('ref',1):''; - $r.=_('Filtrer').' '.HtmlInput::filter_table("cat_card_table", '0,1', 0); - $r.=''; - for ($i=0;$i'; - $r.=''; - $r.=''; - - $r.=""; - } - $r.='
    '; - $r.=''.h($array[$i]['fd_label']).''; - $r.=''; - $r.=''.h($array[$i]['fd_description']).''; - $r.='
    '; - $r.=HtmlInput::hidden('fd_id',0); - $r.='

    '; - $r.=HtmlInput::submit('st','choix'); - $r.=HtmlInput::button('Annuler',_('Annuler')," onclick=\"removeDiv('$ctl')\" "); - $r.='

    '; - $r.='
    '; - $r.='
    '; - $html.=$r; - - } - break; - /*---------------------------------------------------------------------- - * SC save card - * save the new card (insert) - * - ----------------------------------------------------------------------*/ -case 'sc': - $html=HtmlInput::title_box(_("Choix de la catégorie"), $ctl); - if ( $g_user->check_action(FICADD)==1 ) - { - $f=new Fiche($cn); - $f->insert($fd_id,$_POST); - $f->Get(); - $html.='

    '._('Fiche sauvée').'

    '; - $html.=$f->Display(true); - $js=""; - if ( isset( $_POST['ref'])) $js=create_script(' window.location.reload()'); - $html.=$js; - } - else - { - $html.=alert(_('Action interdite'),true); - } - break; - /*---------------------------------------------------------------------- - * Search a card - * - *----------------------------------------------------------------------*/ -case 'fs': - require_once NOALYSS_INCLUDE.'/class_acc_ledger.php'; - $r=HtmlInput::title_box(_("Détail fiche"), 'search_card'); - $r.='
    '; - $q=new IText('query'); - $q->value=(isset($query))?$query:''; - $r.=''; - $r.=_('Fiche contenant').HtmlInput::infobulle(19); - $r.=$q->input(); - $r.=HtmlInput::submit('fs',_('Recherche'),"","smallbutton"); - $r.=''; - $r.=dossier::hidden().HtmlInput::hidden('op','fs'); - $array=array(); - foreach (array('query','inp','jrn','label','typecard','price','tvaid') as $i) - { - if (isset(${$i}) ) - { - $r.=HtmlInput::hidden($i,${$i}); - $sql_array[$i]=${$i}; - } - } - /* what is the type of the ledger */ - $type="GL"; - if (isset($jrn) && $jrn > 1) - { - $ledger=new Acc_Ledger($cn,$jrn); - $type=$ledger->get_type(); - } - $fiche=new Fiche($cn); - /* Build the SQL and show result */ - $sql=$fiche->build_sql($sql_array); - - if ( strpos($sql," in ()") != 0) - { - $html=HtmlInput::anchor_close('search_card'); - $html.='
    '.h2info(_('Recherche de fiche')).'
    '; - $html.='

    '; - $html.=_("Aucune catégorie de fiche ne correspond à". - " votre demande, le journal pourrait n'avoir accès à aucune fiche"); - $html.='

    '; - break; - } - /* We limit the search to MAX_SEARCH_CARD records */ - $sql=$sql.' order by vw_name limit '.MAX_SEARCH_CARD; - $a=$cn->get_array($sql); - for($i=0;$icheck_action(FICCAT)==1 ) - { - - /*---------------------------------------------------------------------- - * Add a category, display first the form - * - *----------------------------------------------------------------------*/ - $ipopup=str_replace('_content','',$ctl); - $msg="";$base=""; - switch($cat) - { - case FICHE_TYPE_CLIENT: - $msg=_(' de clients'); - $base=$cn->get_value("select p_value from parm_code where p_code='CUSTOMER'"); - break; - case FICHE_TYPE_FOURNISSEUR: - $msg=_(' de fournisseurs'); - $base=$cn->get_value("select p_value from parm_code where p_code='SUPPLIER'"); - break; - case FICHE_TYPE_ADM_TAX: - $msg=_(' d\'administration'); - $base=''; - break; - case FICHE_TYPE_CONTACT: - $msg=_(' de contacts'); - $base=''; - break; - case FICHE_TYPE_FIN: - $msg=_(' Banque'); - $base=$cn->get_value("select p_value from parm_code where p_code='BANQUE'"); - break; - case FICHE_TYPE_EMPL: - $msg=_(' Employé ou administrateur'); - $base=''; - break; - - } - - $html=''; - /* show the form */ - - $search=new IPoste("class_base"); - $search->size=40; - $search->value=$base; - $search->label=_("Recherche poste"); - $search->set_attribute('gDossier',dossier::id()); - $search->set_attribute('account',$search->name); - $search->set_attribute('ipopup','ipop_account'); - - $nom_mod=new IText("nom_mod"); - $str_poste=$search->input(); - $submit=HtmlInput::submit('save',_('Sauve')); - ob_start(); - require('template/category_of_card.php'); - $html.=ob_get_contents(); - ob_end_clean(); - - } - else - { - $html=alert(_('Action interdite'),true); - } - break; -case 'scc': - /*---------------------------------------------------------------------- - * Save card Category into the database and return a ok message - * - *----------------------------------------------------------------------*/ - $html=''; - if ( $g_user->check_action(FICCAT) == 1 ) - { - $script=create_script("removeDiv('$ctl')"); - $html.=$script; - if ( strlen(trim($_GET['nom_mod'])) != 0 ) - { - $array=array("FICHE_REF"=>$cat, - "nom_mod"=>$_GET['nom_mod'], - "class_base"=>$_GET['class_base'], - "fd_description"=>$_GET['fd_description']); - if ( isset ($_POST['create'])) $array['create']=1; - $catcard=new Fiche_Def($cn); - if ( $catcard->Add($array) == -1) - $script="alert_box('"._('Catégorie existe déjà')."')"; - else - $script="alert_box('"._('Catégorie sauvée')."')"; - $html.=create_script($script); - } - else - { - $script="alert_box('"._("Le nom ne peut pas être vide")."')"; - $html.=create_script($script); - - $invalid=1; - } - } - else - { - $html=alert(_('Action interdite'),true); - } - break; -case 'upc': - $html=HtmlInput::title_box("Détail fiche", $ctl); - - if ( $g_user->check_action(FICADD)==0 ) - { - $html.=alert(_('Action interdite'),true); - } - else - { - if ($cn->get_value('select count(*) from fiche where f_id=$1',array($_GET['f_id'])) == '0' ) - { - $html.=alert(_('Fiche non valide'),true); - } - - else - { - $html=HtmlInput::title_box(_('Détail fiche (sauvée)'),$ctl); - - $f=new Fiche($cn,$_GET['f_id']); - ob_start(); - $f->update($_GET); - $html.=ob_get_contents(); - ob_end_clean(); - $html.=$f->Display(true); - } - } -} // switch -$xml=escape_xml($html); -if (DEBUG && headers_sent()) { - echo $html;return; -} -header('Content-type: text/xml; charset=UTF-8'); -echo << - -$ctl -$xml - -EOF; diff --git a/sources/html/ajax_history.php b/sources/html/ajax_history.php deleted file mode 100644 index 0e77920..0000000 --- a/sources/html/ajax_history.php +++ /dev/null @@ -1,222 +0,0 @@ -check_dossier(dossier::id(),true) == 'X' ) exit(); - -$from_div = (isset($_REQUEST['ajax'])) ? 1 : $_GET['l']; -if ( LOGINPUT) - { - $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); - fwrite ($file_loginput,"get_exercice(); - if ( $year == 0 ) - { - $html=_("erreur aucune période par défaut, allez dans préférence pour en choisir une"); - } - else - { - $per=new Periode($cn); - $limit_periode=$per->get_limit($year); - $array['from_periode']=$limit_periode[0]->first_day(); - $array['to_periode']=$limit_periode[1]->last_day(); - if (isset($_GET['ex'])) - { - $limit_periode=$per->get_limit($_GET['ex']); - if ( $_GET['ex'] < $year) - $array['from_periode']=$limit_periode[0]->first_day(); - else - $array['to_periode']=$limit_periode[1]->last_day(); - - } - - /* - * Add button to select another year - */ - if ($exercice->count() > 1 ) - { - $default=(isset($_GET['ex']))?$_GET['ex']:$year; - $dossier=dossier::id(); - if ( $div != 'popup') - { - $obj="{div:'$div',f_id:'".$_GET['f_id']."',gDossier:'$dossier',select:this}"; - $is=$exercice->select('p_exercice',$default,' onchange="update_history_card('.$obj.');"'); - $old=_("Autre exercice")." ".$is->input(); - } - else - { - $old=''; - $is=$exercice->select('ex',$default,'onchange = "submit(this)"'); - $old.=_("Autre exercice")." ".$is->input(); - $old.=HtmlInput::hidden('div','popup'); - $old.=HtmlInput::hidden('act',$_GET['act']); - $old.=HtmlInput::hidden('f_id',$_GET['f_id']); - $old.=HtmlInput::hidden('ajax',$_GET['ajax']); - $old.=dossier::hidden(); - $old.=''; - } - } - - ob_start(); - require_once NOALYSS_INCLUDE.'/template/history_top.php'; - $detail_card=HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE),$fiche->getName()); - echo h2( $fiche->getName().'['.$fiche->strAttribut(ATTR_DEF_QUICKCODE).']',' class="title" '); - echo '

    '.$detail_card.'

    '; - - if ( $fiche->HtmlTable($array,0,$from_div)==-1){ - echo h2(_("Aucune opération pour l'exercice courant"),'class="error"'); - } - - echo $old; - - $html=ob_get_contents(); - ob_end_clean(); - } - } -/////////////////////////////////////////////////////////////////////////// -// for an account -/////////////////////////////////////////////////////////////////////////// -if ( isset($_REQUEST['pcm_val'])) - { - $poste=new Acc_Account_Ledger($cn,$_REQUEST['pcm_val']); - $year=$g_user->get_exercice(); - if ( $year == 0 ) - { - $html=_("erreur aucune période par défaut, allez dans préférence pour en choisir une"); - } - else - { - $exercice=new Exercice($cn); - $old=''; - $per=new Periode($cn); - $limit_periode=$per->get_limit($year); - $array['from_periode']=$limit_periode[0]->first_day(); - $array['to_periode']=$limit_periode[1]->last_day(); - if (isset($_GET['ex'])) - { - $limit_periode=$per->get_limit($_GET['ex']); - if ( $_GET['ex'] < $year) - $array['from_periode']=$limit_periode[0]->first_day(); - else - $array['to_periode']=$limit_periode[1]->last_day(); - - } - /* - * Add button to select another year - */ - if ($exercice->count() > 1 ) - { - $default=(isset($_GET['ex']))?$_GET['ex']:$year; - $dossier=dossier::id(); - if ( $div != 'popup') - { - $obj="{div:'$div',pcm_val:'".$_GET['pcm_val']."',gDossier:'$dossier',select:this}"; - $is=$exercice->select('p_exercice',$default,' onchange="update_history_account('.$obj.');"'); - $old=_("Autre exercice")." ".$is->input(); - } - else - { - $old='
    '; - $is=$exercice->select('ex',$default,'onchange = "submit(this)"'); - $old.=_("Autre exercice")." ".$is->input(); - $old.=HtmlInput::hidden('div','popup'); - $old.=HtmlInput::hidden('act',$_GET['act']); - $old.=HtmlInput::hidden('pcm_val',$_GET['pcm_val']); - $old.=HtmlInput::hidden('ajax',$_GET['ajax']); - $old.=dossier::hidden(); - $old.='
    '; - } - - } - - ob_start(); - require_once NOALYSS_INCLUDE.'/template/history_top.php'; - - if ( $poste->HtmlTable($array) == -1) - { - echo h2($poste->id." ".$poste->name,' class="title"'); - echo h2(_("Aucune opération pour l'exercice courant"),'class="error"'); - } - echo $old; - - $html=ob_get_contents(); - ob_end_clean(); - } - } -$xml=escape_xml($html); -if (DEBUG && headers_sent()) { - echo $html;return; -} -header('Content-type: text/xml; charset=UTF-8'); -echo << - -$div -$xml - -EOF; diff --git a/sources/html/ajax_ledger.php b/sources/html/ajax_ledger.php deleted file mode 100644 index 842b676..0000000 --- a/sources/html/ajax_ledger.php +++ /dev/null @@ -1,599 +0,0 @@ -check(); -if ( $g_user->check_dossier(dossier::id(),true)=='X' ) -{ - ob_start(); - require_once NOALYSS_INCLUDE.'/template/ledger_detail_forbidden.php'; - echo HtmlInput::button_close($div); - $html=ob_get_contents(); - ob_end_clean(); - $html=escape_xml($html); - header('Content-type: text/xml; charset=UTF-8'); - echo << - -$div -$html - -EOF; - exit(); -} - - -// check if the user can access the ledger where the operation is (view) and -// if he can modify it -$op=new Acc_Operation($cn); -$op->jr_id=$_REQUEST['jr_id']; -$ledger=$op->get_ledger(); -if ($ledger=="") -{ - - ob_start(); - echo HtmlInput::title_box(_("Information"), $div); - require_once NOALYSS_INCLUDE.'/template/ledger_detail_forbidden.php'; - echo HtmlInput::button_close($div); - $html=ob_get_contents(); - ob_end_clean(); - - $html=escape_xml($html); - if ( ! headers_sent()) { header('Content-type: text/xml; charset=UTF-8');} else { echo "HTML".unescape_xml($html);} - echo << - -$div -$html - -EOF; - exit(); - -} -$access=$g_user->get_ledger_access($ledger); -if ( $access == 'X' ) -{ - ob_start(); - echo HtmlInput::title_box(_("Information"), $div); - require_once NOALYSS_INCLUDE.'/template/ledger_detail_forbidden.php'; - echo HtmlInput::button_close($div); - $html=ob_get_contents(); - ob_end_clean(); - $html=escape_xml($html); - header('Content-type: text/xml; charset=UTF-8'); - echo << - -$div -$html - -EOF; - exit(); -} -$html=var_export($_REQUEST,true); -switch ($action) -{ - /////////////////////////////////////////////////////////////////////////// - // remove op - /////////////////////////////////////////////////////////////////////////// -case 'rmop': - if ( $access=='W' && $g_user->check_action(RMOPER) == 1) - { - ob_start(); - /* get the ledger */ - try - { - $cn->start(); - $oLedger=new Acc_Ledger($cn,$ledger); - $oLedger->jr_id=$_REQUEST['jr_id']; - $oLedger->delete(); - $cn->commit(); - echo _("Opération Effacée"); - } - catch (Exception $e) - { - $e->getMessage(); - $cn->rollback; - } - $html=ob_get_contents(); - ob_end_clean(); - } - else - { - $html= _("Effacement refusé"); - } - break; - ////////////////////////////////////////////////////////////////////// - // DE Detail - ////////////////////////////////////////////////////////////////////// -case 'de': - ob_start(); - - try - { - /* get detail op (D/C) */ - $op->get(); - /* return an obj. ACH / FIN or VEN or null if nothing is found*/ - $obj=$op->get_quant(); - - $oLedger=new Acc_Ledger($cn,$ledger); - if ( $obj==null || $obj->signature == 'ODS' ) - { - /* only the details */ - require_once NOALYSS_INCLUDE.'/template/ledger_detail_misc.php'; - } - elseif ( $obj->signature=='ACH') - { - require_once NOALYSS_INCLUDE.'/template/ledger_detail_ach.php'; - } - elseif ($obj->signature=='FIN') - { - require_once NOALYSS_INCLUDE.'/template/ledger_detail_fin.php'; - } - elseif ( $obj->signature=='VEN') - { - require_once NOALYSS_INCLUDE.'/template/ledger_detail_ven.php'; - } - } - catch (Exception $e) - { - echo HtmlInput::anchor_close($div); - echo '

    '._("Désolé il y a une erreur").'

    '; - } - $html=ob_get_contents(); - ob_end_clean(); - - break; - ///////////////////////////////////////////////////////////////////////////// - // form for the file - ///////////////////////////////////////////////////////////////////////////// -case 'file': - $op->get(); - $obj=$op->get_quant(); /* return an obj. ACH / FIN or VEN or null if nothing is found*/ - - $repo = new Database(); - $theme = $repo->get_value("select the_filestyle from theme where the_name=$1", array($_SESSION['g_theme'])); - html_min_page_start($theme); - - // if there is a receipt document - if ( $obj->det->jr_pj_name=='') - { - if ( ! isset($_REQUEST['ajax']) ) { - echo '
    '; - }else { - echo "
    "; - - } - if ( $access=='W') - { - echo '
    '; - - $sp=new ISpan('file'.$div); - $sp->style="display:none;background-color:red;color:white;font-size:12px"; - $sp->value="Chargement"; - echo $sp->input(); - echo HtmlInput::hidden('act','loadfile'); - echo dossier::hidden(); - echo HtmlInput::hidden('jr_id',$jr_id); - echo HtmlInput::hidden('div',$div); - - echo ''; - echo '
    '; - } - else - { - if (!isset($_REQUEST['ajax'])) - { - echo '
    '; - } - else - { - echo "
    "; - } - - - echo _('Aucun fichier'); - } - echo '
    '; - exit(); - } - else - { - // There is no document attached to this writing - // - if ( ! isset($_REQUEST['ajax']) ) { - echo '
    '; - }else { - echo "
    "; - - } - echo '
    '; - $x=''; - if ($access=='W' && $g_user->check_action (RMRECEIPT) == 1) - { - // Not possible to remove the file thanks a modal dialog box, - // because of the frameset - $x=sprintf(''.SMALLX.'', - $gDossier,$div,$jr_id); - - } - $filename= $obj->det->jr_pj_name; - if ( strlen($obj->det->jr_pj_name) > 20 ) - { - $filename=mb_substr($obj->det->jr_pj_name,0,23); - } - $h=sprintf('%s', - $gDossier,$ledger,$obj->det->jr_grpt_id,h( $filename)); - echo $h; - echo $x; - echo '
    '; - echo ''; - exit(); - } -///////////////////////////////////////////////////////////////////////////// -// load a file -///////////////////////////////////////////////////////////////////////////// -case 'loadfile': - if ( $access == 'W' && isset ($_FILES)) - { - $cn->start(); - // remove the file - $grpt=$cn->get_value('select jr_grpt_id from jrn where jr_id=$1',array($jr_id)); - $cn->save_upload_document($grpt); - $cn->commit(); - // Show a link to the new file - $op->get(); - $obj=$op->get_quant(); /* return an obj. ACH / FIN or VEN or null if nothing is found*/ - - echo ""; - $repo=new Database(); - $theme=$repo->get_value("select the_filestyle from theme where the_name=$1",array($_SESSION['g_theme'])); - echo " "; - echo ""; - if ( ! isset($_REQUEST['ajax']) ) echo ""; else echo ""; - echo "

    "._("Document")."

    "; - echo '
    '; - - // check if the user can remove a document - if ($g_user->check_action (RMRECEIPT) == 1) { - // Not possible to remove the file thanks a modal dialog box, - // because of the frameset - $x=sprintf(''.SMALLX.'', - $gDossier,$div,$jr_id); - echo $x; - } - $filename= $obj->det->jr_pj_name; - $h=sprintf('%s', - $gDossier,$ledger,$obj->det->jr_grpt_id,h($filename)); - echo $h; - echo '
    '; - - } - exit(); -///////////////////////////////////////////////////////////////////////////// -// remove a file -///////////////////////////////////////////////////////////////////////////// -case 'rmf': - if ( $access == 'W' && $g_user->check_action (RMRECEIPT) == 1) - { - echo ""; - $repo=new Database(); - $theme=$repo->get_value("select the_filestyle from theme where the_name=$1",array($_SESSION['g_theme'])); - echo " "; - echo ""; - echo "

    "._("Document")."

    "; - echo '
    '; - echo '
    '; - $sp=new ISpan('file'.$div); - $sp->style="display:none;width:155;height:15;background-color:red;color:white;font-size:10"; - $sp->value=_("Chargement"); - echo $sp->input(); - - echo HtmlInput::hidden('act','loadfile'); - echo dossier::hidden(); - echo HtmlInput::hidden('jr_id',$jr_id); - echo HtmlInput::hidden('div',$div); - - echo ''; - echo '
    '; - $ret=$cn->exec_sql("select jr_pj from jrn where jr_id=$1",array($jr_id)); - if (Database::num_row($ret) != 0) - { - $r=Database::fetch_array($ret,0); - $old_oid=$r['jr_pj']; - if (strlen($old_oid) != 0) - { - // check if this pj is used somewhere else - $c=$cn->count_sql("select * from jrn where jr_pj=".$old_oid); - if ( $c == 1 ) - $cn->lo_unlink($old_oid); - } - $cn->exec_sql("update jrn set jr_pj=null, jr_pj_name=null, ". - "jr_pj_type=null where jr_id=$1",array($jr_id)); - } - } - echo '
    '; - exit(); -///////////////////////////////////////////////////////////////////////////// -// Save operation detail -///////////////////////////////////////////////////////////////////////////// -case 'save': - ob_start(); - try - { - $cn->start(); - if ( $access=="W") - { - if (isset($_POST['p_ech']) ) - { - $ech=$_POST['p_ech']; - if ( trim($ech) != '' && isDate($ech) != null) - { - $cn->exec_sql("update jrn set jr_ech=to_date($1,'DD.MM.YYYY') where jr_id=$2", - array($ech,$jr_id)); - - } - else - { - $cn->exec_sql("update jrn set jr_ech=null where jr_id=$1", - array($jr_id)); - - } - } - - if (isset($_POST['p_date_paid']) ) - { - $ech=$_POST['p_date_paid']; - if ( trim($ech) != '' && isDate($ech) != null) - { - $cn->exec_sql("update jrn set jr_date_paid=to_date($1,'DD.MM.YYYY') where jr_id=$2", - array($ech,$jr_id)); - - } - else - { - $cn->exec_sql("update jrn set jr_date_paid=null where jr_id=$1", - array($jr_id)); - - } - } - - $cn->exec_sql("update jrn set jr_comment=$1,jr_pj_number=$2,jr_date=to_date($4,'DD.MM.YYYY') where jr_id=$3", - array($_POST['lib'],$_POST['npj'],$jr_id,$_POST['p_date'])); - $cn->exec_sql("update jrnx set j_date=to_date($1,'DD.MM.YYYY') where j_grpt in (select jr_grpt_id from jrn where jr_id=$2)", - array($_POST['p_date'],$jr_id)); - $cn->exec_sql('update operation_analytique set oa_date=j_date from jrnx - where - operation_analytique.j_id=jrnx.j_id and - operation_analytique.j_id in (select j_id - from jrnx join jrn on (j_grpt=jr_grpt_id) - where jr_id=$1) - ',array($jr_id)); - $cn->exec_sql("select comptaproc.jrn_add_note($1,$2)", - array($jr_id,$_POST['jrn_note'])); - $rapt=$_POST['rapt']; - - if ( $g_parameter->MY_UPDLAB=='Y' && isset ($_POST['j_id'])) - { - $a_rowid=$_POST["j_id"]; - for ($e=0;$eexec_sql('update jrnx set j_text=$1 where j_id=$2', array(strip_tags($_POST[$id]),$a_rowid[$e])); - } - } - if (trim($rapt) != '') - { - $rec=new Acc_Reconciliation ($cn); - $rec->set_jr_id($jr_id); - - if (strpos($rapt,",") != 0 ) - { - $aRapt=explode(',',$rapt); - /* reconcialition */ - foreach ($aRapt as $rRapt) - { - if ( isNumber($rRapt) == 1 ) - { - // Add a "concerned operation to bound these op.together - $rec->insert($rRapt); - } - } - } - else - if ( isNumber($rapt) == 1 ) - { - $rec->insert($rapt); - } - } - if ( isset($_POST['ipaid'])) - { - $cn->exec_sql("update jrn set jr_rapt='paid' where jr_id=$1",array($jr_id)); - } - else - { - $cn->exec_sql("update jrn set jr_rapt=null where jr_id=$1",array($jr_id)); - } - //////////////////////////////////////////////////// - // CA - ////////////////////////////////////////////////// - $owner = new Own($cn); - if ( $owner->MY_ANALYTIC != "nu" && isset ($_POST['op']) ) - { - // for each item, insert into operation_analytique */ - $opanc=new Anc_Operation($cn); - $opanc->save_update_form($_POST); - } - ////////////////////////////////////////////////////////////////// - //Save other info - ////////////////////////////////////////////////////////////////// - $op->save_info($_POST['OTHER'],'OTHER'); - $op->save_info($_POST['BON_COMMANDE'],'BON_COMMANDE'); - /////////////////////////////////////////////////////////////////// - // Save related - ////////////////////////////////////////////////////////////////// - $related=HtmlInput::default_value_post("related", "0"); - if ($related == "0" ) - throw new Exception('Parameter not send -> related'.__FILE__.__LINE__,10); - $op->insert_related_action($related); - - } - echo _('Opération sauvée'); - $cn->commit(); - } - catch (Exception $e) - { - if ( DEBUG ) echo $e->getMessage(); - alert(_( "Changement impossible: on ne peut pas changer la date dans une période fermée")); - } - $html=ob_get_contents(); - ob_end_clean(); - - break; - //////////////////////////////////////////////////////////////////////////// - // remove a reconciliation - //////////////////////////////////////////////////////////////////////////// -case 'rmr': - if ( $access=='W') - { - $rec=new Acc_Reconciliation($cn); - $rec->set_jr_id($jr_id); - $rec->remove($_GET['jr_id2']); - } - break; - //////////////////////////////////////////////////////////////////////////// - // ask for a date for reversing the operation - //////////////////////////////////////////////////////////////////////////// -case 'ask_extdate': - $date=new IDate('p_date'); - $html.="
    "; - $html.=HtmlInput::hidden('jr_id',$_REQUEST['jr_id']). - HtmlInput::hidden('div',$div). - dossier::hidden(). - HtmlInput::hidden('act','reverseop'); - - $html.='

    '._('entrez une date').'

    '.$date->input(); - $html.=HtmlInput::submit('x','accepter'); - $html.=HtmlInput::button_close($div); - $html.='
    '; - break; - //////////////////////////////////////////////////////////////////////////// - // Reverse an operation - //////////////////////////////////////////////////////////////////////////// -case 'reverseop': - if ( $access=='W') - { - ob_start(); - try - { - $cn->start(); - $oLedger=new Acc_Ledger($cn,$ledger); - $oLedger->jr_id=$_REQUEST['jr_id']; - $oLedger->reverse($_REQUEST['ext_date']); - $cn->commit(); - echo _("Opération extournée"); - } - catch (Exception $e) - { - $e->getMessage(); - $cn->rollback(); - } - } - $html=ob_get_contents(); - ob_end_clean(); - break; -} -$html=escape_xml($html); - if ( ! headers_sent()) { header('Content-type: text/xml; charset=UTF-8');} else { echo "HTML".unescape_xml($html);} - - echo << - -$div -$html - -EOF; diff --git a/sources/html/ajax_misc.php b/sources/html/ajax_misc.php deleted file mode 100644 index f30f470..0000000 --- a/sources/html/ajax_misc.php +++ /dev/null @@ -1,749 +0,0 @@ -0) { - $cn = new Database($gDossier); - $g_parameter=new Own($cn); - $g_user = new User($cn); - $g_user->check(true); - $g_user->check_dossier($gDossier, true); -} -else -{ - // connect to repository - $cn=new Database(); - $g_user = new User($cn); - $g_user->check(true); -} -$html = var_export($_REQUEST, true); - -if ( LOGINPUT) - { - $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); - fwrite ($file_loginput,"check_module('ANCODS') == 0) - exit(); - $cn->exec_sql("delete from operation_analytique where oa_group=$1", array($_GET['oa'])); - break; - case "rm_stock": - if ($g_user->check_module('STOCK') == 0) - exit(); - require_once NOALYSS_INCLUDE.'/constant.security.php'; - $cn->exec_sql('delete from stock_goods where sg_id=$1', array($s_id)); - $html = escape_xml($s_id); - header('Content-type: text/xml; charset=UTF-8'); - printf('{"d_id":"%s"}', $s_id); - exit(); - break; - //-------------------------------------------------- - // get the last date of a ledger - case 'lastdate': - require_once NOALYSS_INCLUDE.'/class_acc_ledger_fin.php'; - $ledger = new Acc_Ledger_Fin($cn, $_GET['p_jrn']); - $html = $ledger->get_last_date(); - $html = escape_xml($html); - header('Content-type: text/xml; charset=UTF-8'); - echo << - -e_date -$html - -EOF; - - break; - case 'bkname': - require_once NOALYSS_INCLUDE.'/class_acc_ledger_fin.php'; - $ledger = new Acc_Ledger_Fin($cn, $_GET['p_jrn']); - $html = $ledger->get_bank_name(); - $html = escape_xml($html); - header('Content-type: text/xml; charset=UTF-8'); - echo << - -bkname -$html - -EOF; - break; - // display new calendar - case 'cal': - require_once NOALYSS_INCLUDE.'/class_calendar.php'; - /* others report */ - $cal = new Calendar(); - $cal->set_periode($per); - $notitle=HtmlInput::default_value_get("notitle", 0); - $html = ""; - $html = $cal->display($_GET['t'],$notitle); - $html = escape_xml($html); - header('Content-type: text/xml; charset=UTF-8'); - echo << - -$html - -EOF; - break; - /* rem a cat of document */ - case 'rem_cat_doc': - require_once NOALYSS_INCLUDE.'/class_document_type.php'; - // if user can not return error message - $message=""; - if ($g_user->check_action(PARCATDOC) == 0) - { - $html = "nok"; - $message=_('Action non autorisée'); - header('Content-type: text/xml; charset=UTF-8'); - echo << - -$html -$message - -EOF; - return; - } - // remove the cat if no action - $count_md = $cn->get_value('select count(*) from document_modele where md_type=$1', array($dt_id)); - $count_a = $cn->get_value('select count(*) from action_gestion where ag_type=$1', array($dt_id)); - - if ($count_md != 0 || $count_a != 0) - { - $message=_('Des actions dépendent de cette catégorie'); - $html = "nok"; - header('Content-type: text/xml; charset=UTF-8'); - echo << - -$html -$message - -EOF; - exit; - } - $cn->exec_sql('delete from document_type where dt_id=$1', array($dt_id)); - $html = $dt_id; - header('Content-type: text/xml; charset=UTF-8'); - echo << - -$html -$message - -EOF; - return; - break; - case 'mod_cat_doc': - require_once NOALYSS_INCLUDE.'/template/document_mod_change.php'; - break; - case 'dsp_tva': - $cn = new Database($gDossier); - $Res = $cn->exec_sql("select * from tva_rate order by tva_rate desc"); - $Max = Database::num_row($Res); - $r = ""; - $r = HtmlInput::anchor_close('tva_select'); - $r.=h2(_('Choisissez la TVA '),'class="title"'); - $r.='
    '; - $r.=_('Filter')." ".HtmlInput::filter_table("tva_select_table",'0,1,2,3' , 1); - $r.= ''; - $r.=th(_('code')); - $r.=th(_('Taux')); - $r.=th(_('Symbole')); - $r.=th(_('Explication')); - - for ($i = 0; $i < $Max; $i++) - { - $row = Database::fetch_array($Res, $i); - if (!isset($compute)) - { - if (!isset($code)) - { - $script = "onclick=\"$('$ctl').value='" . $row['tva_id'] . "';removeDiv('tva_select');\""; - } - else - { - $script = "onclick=\"$('$ctl').value='" . $row['tva_id'] . "';set_value('$code','" . $row['tva_label'] . "');removeDiv('tva_select');\""; - } - } - else - { - if (!isset($code)) - { - $script = "onclick=\"$('$ctl').value='" . $row['tva_id'] . "';removeDiv('tva_select');clean_tva('$compute');compute_ledger('$compute');\""; - } - else - { - $script = "onclick=\"$('$ctl').value='" . $row['tva_id'] . "';set_value('$code','" . $row['tva_label'] . "');removeDiv('tva_select');clean_tva('$compute');compute_ledger('$compute');\""; - } - } - $set = ''; - $class=($i%2 == 0)?' class="odd" ':' class="even" '; - $r.=''; - $r.=td($row['tva_id']); - $r.=td($row['tva_rate']); - $r.=td($row['tva_label']); - $r.=td($row['tva_comment']); - $r.=''; - } - $r.='
    '; - $r.='
    '; - - $html = escape_xml($r); - - header('Content-type: text/xml; charset=UTF-8'); - echo << - -$html -$popup - -EOF; - break; - case 'label_tva': - $cn = new Database($gDossier); - if (isNumber($id) == 0) - $value = _('tva inconnue'); - else - { - $Res = $cn->get_array("select * from tva_rate where tva_id = $1", array($id)); - if (count($Res) == 0) - $value = _('tva inconnue'); - else - $value = $Res[0]['tva_label']; - } - header('Content-type: text/xml; charset=UTF-8'); - echo << - -$code -$value - -EOF; - - break; - /** - * display the lettering - */ - case 'dl': - require_once NOALYSS_INCLUDE.'/class_lettering.php'; - $exercice = $g_user->get_exercice(); - if ($g_user->check_module("LETCARD") == 0 && $g_user->check_module("LETACC") == 0) - exit(); - $periode = new Periode($cn); - list($first_per, $last_per) = $periode->get_limit($exercice); - - $ret = new IButton('return'); - $ret->label = _('Retour'); - $ret->javascript = "$('detail').hide();$('list').show();$('search').show();"; - - // retrieve info for the given j_id (date, amount,side and comment) - $sql = "select j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,J_POSTE,j_qcode,jr_id, - jr_comment,j_montant, j_debit,jr_internal from jrnx join jrn on (j_grpt=jr_grpt_id) - where j_id=$1"; - $arow = $cn->get_array($sql, array($j_id)); - $row = $arow[0]; - $r = ''; - $r.='
    ' . _('Lettrage') . ''; - $r.=_('Poste')." " . $row['j_poste'] . ' ' . $row['j_qcode'] . '
    '; - - $detail = " " . $row['jr_internal'] . ""; - - $r.=_('Date').' : ' . $row['j_date_fmt'] . ' ref :' . $detail . '
    '; - $r.=h($row['jr_comment']) ." ". _("montant")." : " . ($row['j_montant']) . " " . (($row['j_debit'] == 't') ? 'D' : 'C'); - $r.='
    '; - $r.='
    '; - $r.='
    '; - $r.='
    '; - // needed hidden var - $r.=dossier::hidden(); - if (isset($_REQUEST['ac'])) - $r.=HtmlInput::hidden('ac', $_REQUEST['ac']); - if (isset($_REQUEST['sa'])) - $r.=HtmlInput::hidden('sa', $_REQUEST['sa']); - if (isset($_REQUEST['acc'])) - $r.=HtmlInput::hidden('acc', $_REQUEST['acc']); - $r.=HtmlInput::hidden('j_id', $j_id); - $r.=HtmlInput::hidden('op', $op); - $r.=HtmlInput::hidden('ot', $ot); - - $r.=''; - //min amount - $line = td(_('Montant min. ')); - $min = new INum('min_amount'); - $min->value = (isset($min_amount)) ? $min_amount : $row['j_montant']; - $min_amount = (isset($min_amount)) ? $min_amount : $row['j_montant']; - - $line.=td($min->input()); - // max amount - $line.=td(_('Montant max. ')); - $max = new INum('max_amount'); - $max->value = (isset($max_amount)) ? $max_amount : $row['j_montant']; - $max_amount = (isset($max_amount)) ? $max_amount : $row['j_montant']; - $line.=td($max->input()); - $r.=tr($line); - - $date_error=""; - // start date - $start = new IDate('search_start'); - - /* check if date are valid */ - if (isset($search_start) && isDate($search_start) == null) - { - ob_start(); - alert(_('Date malformée')); - $date_error = ob_get_contents(); - ob_end_clean(); - $search_start=$first_per->first_day(); - } - $start->value = (isset($search_start)) ? $search_start : $first_per->first_day(); - - $line = td('Date Debut') . td($start->input()); - // end date - $end = new IDate('search_end'); - /* check if date are valid */ - if (isset($search_end) && isDate($search_end) == null) - { - ob_start(); - alert(_('Date malformée')); - $date_error = ob_get_contents(); - ob_end_clean(); - $search_end=$last_per->last_day(); - } - $end->value = (isset($search_end)) ? $search_end : $last_per->last_day(); - $line.=td(_('Date Fin')) . td($end->input()); - $r.=tr($line); - // Side - $line = td(_('Debit / Credit')); - $iside = new ISelect('side'); - $iside->value = array( - array('label' => _('Debit'), 'value' => 0), - array('label' => _('Credit'), 'value' => 1), - array('label' => _('Les 2'), 'value' => 3) - ); - /** - * - * if $side is not then - * - if jl_id exist and is > 0 show by default all the operation (=3) - * - if jl_id does not exist or is < 0 then show by default the opposite - * side - */ - if (!isset($side)) - { - // find the jl_id of the j_id - $jl_id = $cn->get_value('select comptaproc.get_letter_jnt($1)', array($j_id)); - if ($jl_id == null) - { - // get the other side - $iside->selected = (isset($side)) ? $side : (($row['j_debit'] == 't') ? 1 : 0); - $side = (isset($side)) ? $side : (($row['j_debit'] == 't') ? 1 : 0); - } - else - { - // show everything - $iside->selected = 3; - $side = 3; - } - } - else - { - $iside->selected = $side; - } - - $r.=tr($line . td($iside->input())); - $r.='
    '; - $r.='
    '; - $r.='
    '; - $r.=HtmlInput::submit('search', 'Rechercher'); - $r.='
    '; - $r.='
    '; - $r.='
    '; - - $form = '
    '; - - $form.='
    '; - $form.=dossier::hidden(); - if (isset($_REQUEST['p_action'])) - $form.=HtmlInput::hidden('p_action', $_REQUEST['p_action']); - if (isset($_REQUEST['sa'])) - $form.=HtmlInput::hidden('sa', $_REQUEST['sa']); - if (isset($_REQUEST['acc'])) - $form.=HtmlInput::hidden('acc', $_REQUEST['acc']); - if (isset($_REQUEST['sc'])) - $form.=HtmlInput::hidden('sc', $_REQUEST['sc']); - if (isset($_REQUEST['sb'])) - $form.=HtmlInput::hidden('sb', $_REQUEST['sb']); - if (isset($_REQUEST['f_id'])) - $form.=HtmlInput::hidden('f_id', $_REQUEST['f_id']); - - - // display a list of operation from the other side + box button - if ($ot == 'account') - { - $obj = new Lettering_Account($cn, $row['j_poste']); - if (isset($search_start)) - $obj->start = $search_start; - if (isset($search_end)) - $obj->end = $search_end; - if (isset($max_amount)) - $obj->fil_amount_max = $max_amount; - if (isset($min_amount)) - $obj->fil_amount_min = $min_amount; - if (isset($side)) - $obj->fil_deb = $side; - - $form.=$obj->show_letter($j_id); - } - else if ($ot == 'card') - { - $obj = new Lettering_Card($cn, $row['j_qcode']); - if (isset($search_start)) - $obj->start = $search_start; - if (isset($search_end)) - $obj->end = $search_end; - if (isset($max_amount)) - $obj->fil_amount_max = $max_amount; - if (isset($min_amount)) - $obj->fil_amount_min = $min_amount; - if (isset($side)) - $obj->fil_deb = $side; - $form.=$obj->show_letter($j_id); - } - else - { - $form.=_('Mauvais type objet'); - } - - $form.=HtmlInput::submit('record', _('Sauver')) . $ret->input(); - $form.='
    '; - $form.='
    '; - - $html = $r . $form; - $html.=$date_error; - // echo $html;exit; - $html = escape_xml($html); - - header('Content-type: text/xml; charset=UTF-8'); - echo << - -detail -$html - -EOF; - break; - case 'mod_doc': - require_once NOALYSS_INCLUDE.'/ajax_mod_document.php'; - break; - case 'input_per': - require_once NOALYSS_INCLUDE.'/ajax_mod_periode.php'; - break; - case 'save_per': - require_once NOALYSS_INCLUDE.'/ajax_mod_periode.php'; - break; - case 'mod_predf': - require_once NOALYSS_INCLUDE.'/ajax_mod_predf_op.php'; - break; - case 'save_predf': - require_once NOALYSS_INCLUDE.'/ajax_save_predf_op.php'; - break; - case 'search_op': - require_once NOALYSS_INCLUDE.'/search.inc.php'; - break; - case 'search_action': - require_once NOALYSS_INCLUDE.'/ajax_search_action.php'; - break; - case 'display_profile': - require_once NOALYSS_INCLUDE.'/ajax_get_profile.php'; - break; - case 'det_menu': - require_once NOALYSS_INCLUDE.'/ajax_get_menu_detail.php'; - break; - case 'add_menu': - require_once NOALYSS_INCLUDE.'/ajax_add_menu.php'; - break; - case 'display_submenu': - require_once NOALYSS_INCLUDE.'/ajax_display_submenu.php'; - break; - case 'remove_submenu': - require_once NOALYSS_INCLUDE.'/ajax_remove_submenu.php'; - break; - case 'cardsearch': - require_once NOALYSS_INCLUDE.'/ajax_boxcard_search.php'; - break; - case 'add_plugin': - $me_code = new IText('me_code'); - $me_file = new IText('me_file'); - $me_menu = new IText('me_menu'); - $me_description = new IText("me_description"); - $me_parameter = new IText("me_parameter"); - $new = true; - require_once NOALYSS_INCLUDE.'/ajax_plugin_detail.php'; - break; - case 'mod_plugin': - $m = $cn->get_array("select me_code,me_file,me_menu,me_description,me_parameter - from menu_ref where me_code=$1", array($me_code)); - if (empty($m)) - { - echo HtmlInput::title_box("Ce plugin n'existe pas ", $ctl); - echo "

    Il y a une erreur, ce plugin n'existe pas"; - exit; - } - $me_code = new IText('me_code', $m[0] ['me_code']); - $me_file = new IText('me_file', $m[0] ['me_file']); - $me_menu = new IText('me_menu', $m[0] ['me_menu']); - $me_description = new IText("me_description", $m[0] ['me_description']); - $me_parameter = new IText("me_parameter", $m[0] ['me_parameter']); - $new = false; - require_once NOALYSS_INCLUDE.'/ajax_plugin_detail.php'; - break; - case 'saldo': - require_once NOALYSS_INCLUDE.'/ajax_bank_saldo.php'; - break; - case 'up_predef': - require_once NOALYSS_INCLUDE.'/ajax_update_predef.php'; - break; - case 'upd_receipt': - require_once NOALYSS_INCLUDE.'/ajax_get_receipt.php'; - break; - case 'up_pay_method': - require_once NOALYSS_INCLUDE.'/ajax_update_payment.php'; - break; - case 'openancsearch': - case 'resultancsearch': - require_once NOALYSS_INCLUDE.'/ajax_anc_search.php'; - break; - case 'autoanc': - require_once NOALYSS_INCLUDE.'/ajax_auto_anc_card.php'; - break; - case 'create_menu'; - require_once NOALYSS_INCLUDE.'/ajax_create_menu.php'; - break; - case 'modify_menu'; - require_once NOALYSS_INCLUDE.'/ajax_mod_menu.php'; - break; - case 'mod_stock_repo': - require_once NOALYSS_INCLUDE.'/ajax_mod_stock_repo.php'; - break; - case 'view_mod_stock': - require_once NOALYSS_INCLUDE.'/ajax_view_mod_stock.php'; - break; - case 'fddetail': - require_once NOALYSS_INCLUDE.'/ajax_fiche_def_detail.php'; - break; - case 'vw_action': - require_once NOALYSS_INCLUDE.'/ajax_view_action.php'; - break; - case 'minrow': - require_once NOALYSS_INCLUDE.'/ajax_min_row.php'; - break; - case 'navigator': - require_once NOALYSS_INCLUDE.'/ajax_navigator.php'; - break; - case 'preference': - require_once NOALYSS_INCLUDE.'/ajax_preference.php'; - break; - case 'bookmark': - require_once NOALYSS_INCLUDE.'/ajax_bookmark.php'; - break; - case 'tag_detail': - require_once NOALYSS_INCLUDE.'/ajax_tag_detail.php'; - break; - case 'tag_save': - require_once NOALYSS_INCLUDE.'/ajax_tag_save.php'; - break; - case 'tag_list': - require_once NOALYSS_INCLUDE.'/ajax_tag_list.php'; - break; - case 'tag_add': - require_once NOALYSS_INCLUDE.'/ajax_tag_add_action.php'; - break; - case 'tag_remove': - require_once NOALYSS_INCLUDE.'/ajax_tag_remove_action.php'; - break; - case 'tag_choose': - require_once NOALYSS_INCLUDE.'/ajax_tag_choose.php'; - break; - case 'tag_choose': - require_once NOALYSS_INCLUDE.'/ajax_tag_choose.php'; - break; - case 'search_display_tag': - require_once NOALYSS_INCLUDE.'/ajax_search_display_tag.php'; - break; - case 'search_add_tag': - require_once NOALYSS_INCLUDE.'/ajax_search_add_tag.php'; - break; - case 'search_clear_tag': - require_once NOALYSS_INCLUDE.'/ajax_search_clear_tag.php'; - break; - case 'calendar_zoom': - require_once NOALYSS_INCLUDE.'/ajax_calendar_zoom.php'; - break; - case 'ledger_show': - require_once NOALYSS_INCLUDE.'/ajax_ledger_show.php'; - case 'ledger_description': - $ajrn=$cn->get_array('select jrn_def_name,jrn_def_description from jrn_def where jrn_def_id=$1',array($l)); - if ( count($ajrn)==1) - { - echo '

    '; - echo '

    '.$ajrn[0]['jrn_def_name'].'

    '; - if ( trim($ajrn[0]['jrn_def_description']) != "") { - echo '

    '.$ajrn[0]['jrn_def_description'].'

    '; - } - echo '
    '; - } - exit(); - break; - - case 'anc_key_choice': - /* - * Show the available distribution keys for analytic - */ - require_once NOALYSS_INCLUDE.'/ajax_anc_key_choice.php'; - break; - case 'anc_key_compute': - /* - * Show the activities computed with the selected distribution key - */ - require_once NOALYSS_INCLUDE.'/ajax_anc_key_compute.php'; - break; - case 'account_update': - /** - * update an accounting (from CFGPCMN) - */ - require_once NOALYSS_INCLUDE.'/ajax_account_update.php'; - break; - // From admin, revoke the access to a folder from an - // user - case 'folder_remove': - require_once NOALYSS_INCLUDE.'/ajax_admin.php'; - break; - // From admin, display a list of folder to which the user has - // no access - case 'folder_display': - require_once NOALYSS_INCLUDE.'/ajax_admin.php'; - break; - // From admin, grant the access to a folder to an - // user - case 'folder_add': - require_once NOALYSS_INCLUDE.'/ajax_admin.php'; - break; - - // From admin, display info and propose to drop the folder - case 'folder_drop': - require_once NOALYSS_INCLUDE.'/ajax_admin.php'; - break; - - // From admin, display the information of a folder you can - // modify - case 'folder_modify': - require_once NOALYSS_INCLUDE.'/ajax_admin.php'; - break; - // From admin, display info and propose to drop the template - case 'modele_drop': - require_once NOALYSS_INCLUDE.'/ajax_admin.php'; - break; - - // From admin, display the information of a template you can - // modify - case 'modele_modify': - require_once NOALYSS_INCLUDE.'/ajax_admin.php'; - break; - // From dashboard, display detail about last operation - case 'action_show': - require_once NOALYSS_INCLUDE.'/ajax_gestion.php'; - break; - // From dashboard, display form for a new event - case 'action_add': - require_once NOALYSS_INCLUDE.'/ajax_gestion.php'; - break; - // Save a event given in the short form - case 'action_save': - require_once NOALYSS_INCLUDE.'/ajax_gestion.php'; - break; - default: - var_dump($_GET); -} diff --git a/sources/html/ajax_poste.php b/sources/html/ajax_poste.php deleted file mode 100644 index 13f0e1d..0000000 --- a/sources/html/ajax_poste.php +++ /dev/null @@ -1,206 +0,0 @@ - php jrn - - param c : control for storing the pcm_val -> javascript account - - param l : control for storing the pcm_lib -> javascript label - - param ctl : the node to update (ipopup) - - param q : the acc_query -> javascript query - * - ctl (to return) - * - * - */ -if ( ! defined('ALLOWED')) define ('ALLOWED',1); - -require_once '../include/constant.php'; -require_once NOALYSS_INCLUDE.'/ac_common.php'; -require_once NOALYSS_INCLUDE.'/class_acc_ledger.php'; -require_once NOALYSS_INCLUDE.'/class_database.php'; -require_once NOALYSS_INCLUDE.'/function_javascript.php'; -require_once NOALYSS_INCLUDE.'/class_acc_account_ledger.php'; -mb_internal_encoding("UTF-8"); - -extract($_REQUEST); -$var=array('gDossier','op','ctl'); -$cont=0; -/* check if mandatory parameters are given */ -foreach ($var as $v) -{ - if ( ! isset ($_REQUEST [$v] ) ) - { - echo "$v is not set "; - $cont=1; - } -} -ajax_disconnected($ctl); - -set_language(); - -if ( $cont != 0 ) exit(); -$cn=new Database(dossier::id()); -require_once NOALYSS_INCLUDE.'/class_user.php'; -global $g_user; -$g_user=new User($cn); -$g_user->Check(); -if ($g_user->check_dossier(dossier::id()) == 'X') exit(); -$xml=""; -if ( LOGINPUT) - { - $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); - fwrite ($file_loginput,"size=30; - $it->value=(isset($q))?$q:''; - $str_poste=$it->input(); - $str_submit=HtmlInput::submit('sf',_('Recherche'),"","smallbutton"); - $r=''; - $r=HtmlInput::anchor_close('search_account'); - $r.='
    '.h2(_('Poste Comptable'),' class="title"').'
    '; - - $r.='
    '; - ob_start(); - require_once NOALYSS_INCLUDE.'/template/account_search.php'; - $r.=ob_get_contents(); - ob_end_clean(); - $r.=dossier::hidden(); - $r.=(isset ($c))?HtmlInput::hidden('account',$c):""; - $r.=(isset ($l))?HtmlInput::hidden('label',$l):""; - $r.=(isset ($j))?HtmlInput::hidden('jrn',$j):""; - $r.=(isset ($nover))?HtmlInput::hidden('nover','1'):""; - $r.=(isset ($nosearch))?HtmlInput::hidden('nosearch','1'):""; - $r.=(isset ($bracket))?HtmlInput::hidden('bracket','1'):""; - - - $r.='
    '; - $sql=" - select pcm_val,pcm_lib,array_to_string(array_agg(j_qcode) , ',') as acode - from tmp_pcmn left join vw_poste_qcode on (j_poste=pcm_val) "; - $sep=" where "; - /* build the sql stmt */ - if ( isset($j) && $j > 0 && isNumber($j)) - { - /* create a filter on the ledger */ - $ledger=new Acc_Account_Ledger($cn,0); - $fd_id=$ledger->build_sql_account($j); - if ( $fd_id != '' ) - { - $sql.=" $sep (".$fd_id.')'; - $sep=" and "; - } - } - /* show result */ - if ( isset($q) && strlen(trim($q)) > 0) - { - $q= sql_string($q); - $sql.=sprintf(" $sep ( pcm_val::text like '%s%%' or pcm_lib::text ilike '%%%s%%') ", - $q,$q); - } - $sql.=' group by pcm_val,pcm_lib,pcm_val_parent, pcm_type order by pcm_val::text limit 50'; - if ( isset($q) && strlen(trim($q))> 0 ) - { - $array=$cn->get_array($sql); - } - if ( ! isset($q) ) $array=array(); - if ( isset($q) && strlen(trim($q))==0) $array=array(); - - /* set the javascript */ - for ($i=0;$i - -$ctl -$xml - -EOF; diff --git a/sources/html/ajax_todo_list.php b/sources/html/ajax_todo_list.php deleted file mode 100644 index e71f29d..0000000 --- a/sources/html/ajax_todo_list.php +++ /dev/null @@ -1,291 +0,0 @@ -check(true); -$g_user->check_dossier(Dossier::id(),true); -set_language(); -ajax_disconnected('add_todo_list'); -//////////////////////////////////////////////////////////////////////////////// -// Display the note -//////////////////////////////////////////////////////////////////////////////// -if (isset($_REQUEST['show'])) -{ - $cn=new Database(dossier::id()); - $todo=new Todo_list($cn); - $todo->set_parameter('id',$_REQUEST['id']); - $todo->load(); - $content=$todo->display(); - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0','UTF-8'); - $tl_id=$dom->createElement('tl_id',$todo->get_parameter('id')); - $tl_content=$dom->createElement('tl_content',$content); - - - $root=$dom->createElement("root"); - - $root->appendChild($tl_id); - $root->appendChild($tl_content); - $dom->appendChild($root); - - echo $dom->saveXML(); - exit(); -} -//////////////////////////////////////////////////////////////////////////////// -// Delete the note -//////////////////////////////////////////////////////////////////////////////// -if (isset($_REQUEST['del'])) -{ - $cn=new Database(dossier::id()); - $todo=new Todo_list($cn); - $todo->set_parameter('id',$_REQUEST['id']); - $todo->delete(); - exit(); -} -$ac=HtmlInput::default_value_get('act', 'save'); - -//////////////////////////////////////////////////////////////////////////////// -// Save the modification of a note -//////////////////////////////////////////////////////////////////////////////// -if ($ac == 'save') -{ - - $cn=new Database(dossier::id()); - $todo=new Todo_List($cn); - $id=HtmlInput::default_value_get("id", 0); - $todo->set_parameter("id",$id); - if ($id <> 0 ) { $todo->load(); } - else - { - $todo->set_parameter("owner", $_SESSION['g_user']); - } - - $todo->set_parameter("date", HtmlInput::default_value_get("p_date_todo", "")); - $todo->set_parameter("title", HtmlInput::default_value_get("p_title", "")); - $todo->set_parameter("desc", HtmlInput::default_value_get("p_desc", "")); - $todo->set_is_public(HtmlInput::default_value_get("p_public", "N")); - - if ( $todo->get_parameter('owner') == $_SESSION['g_user'] ) $todo->save(); - $todo->load(); - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0','UTF-8'); - $tl_id=$dom->createElement('tl_id',$todo->get_parameter('id')); - $tl_content=$dom->createElement('row',$todo->display_row('class="odd"','N')); - $root=$dom->createElement("root"); - $todo_class=$todo->get_class(); - $todo_class=($todo_class=="")?' odd ':$todo_class; - $class=$dom->createElement("style",$todo_class); - - $root->appendChild($tl_id); - $root->appendChild($tl_content); - $root->appendChild($class); - $dom->appendChild($root); - - echo $dom->saveXML(); - exit(); -} - -//////////////////////////////////////////////////////////////////////////////// -// Display a list to select the user with who we want to share notes -//////////////////////////////////////////////////////////////////////////////// -if ($ac=='shared_note') -{ - $id=HtmlInput::default_value_get("todo_id", -1); - // If note_id is not correct then give an error - if ($id==-1||isNumber($id)==0) - { - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $tl_id=$dom->createElement('content', _("Erreur : note invalide")); - $dom->appendChild($tl_id); - echo $dom->saveXML(); - return; - } - if ($id==0) - { - ob_start(); - echo HtmlInput::title_box(_('Liste utilisateurs'), "shared_{$id}"); - echo '

    '; - echo _("Vous devez d'abord sauver"); - echo '

    '; - echo '

    '; - echo HtmlInput::submit('close'.$id, 'Ferme'," onclick=\"\$('shared_{$id}').remove();\""); - echo '

    '; - $result=ob_get_clean(); - // - // output the XML - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $tl_id=$dom->createElement('content', escape_xml($result)); - $dom->appendChild($tl_id); - echo $dom->saveXML(); - return; - } - $todo=new Todo_List($cn); - $todo->set_parameter("id", $id); - $todo->load(); - if ($g_user->login!=$todo->get_parameter("owner")) - { - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $tl_id=$dom->createElement('content', _("Cette note n'est pas à vous")); - $dom->appendChild($tl_id); - echo $dom->saveXML(); - return; - } - if ($g_user->check_action(SHARENOTE)== 0) - { - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $tl_id=$dom->createElement('content', _("Accès interdit")); - $dom->appendChild($tl_id); - echo $dom->saveXML(); - return; - } - ob_start(); - echo HtmlInput::title_box(_('Liste utilisateurs'), "shared_".$id); - $todo->display_user(); - echo '

    '; - echo HtmlInput::submit('close'.$id, 'Ferme'," onclick=\"\$('shared_{$id}').remove();\""); - echo '

    '; - $result=ob_get_clean(); - // - // output the XML - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $tl_id=$dom->createElement('content', escape_xml($result)); - $dom->appendChild($tl_id); - echo $dom->saveXML(); - return; -} -//////////////////////////////////////////////////////////////////////////////// -// Share the note with someone or remove it -//////////////////////////////////////////////////////////////////////////////// -if ( $ac=="set_share") -{ - $id=HtmlInput::default_value_get("todo_id", 0); - $p_login=HtmlInput::default_value_get("login",""); - // If note_id is not correct then give an error - if ($id==0||isNumber($id)==0 || trim ($p_login)=="") - { - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $tl_id=$dom->createElement('content', _("Erreur : paramètre invalide")); - $dom->appendChild($tl_id); - echo $dom->saveXML(); - return; - } - $todo=new Todo_List($cn); - $todo->set_parameter("id", $id); - $todo->load(); - if ($g_user->login!=$todo->get_parameter("owner")) - { - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $tl_id=$dom->createElement('content', _("Cette note n'est pas à vous")); - $dom->appendChild($tl_id); - echo $dom->saveXML(); - return; - } - if ($g_user->login!=$todo->get_parameter("owner")) - { - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $tl_id=$dom->createElement('content', _("Cette note n'est pas à vous")); - $dom->appendChild($tl_id); - echo $dom->saveXML(); - return; - } - if ($g_user->check_action(SHARENOTE)== 0) - { - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $tl_id=$dom->createElement('content', _("Accès interdit")); - $dom->appendChild($tl_id); - echo $dom->saveXML(); - return; - } - if ( $todo->is_shared_with($p_login) == 0 ) - { - // Add a share to the user - $todo->add_share($p_login); - - } else { - // remove a share from the user - $todo->remove_share($p_login); - } -} -//////////////////////////////////////////////////////////////////////////////// -// Remove the share of a note which the connected user doesn't own -// -//////////////////////////////////////////////////////////////////////////////// -if ( $ac=="remove_share") -{ - $id=HtmlInput::default_value_get("todo_id", 0); - $p_login=HtmlInput::default_value_get("login",""); - // If note_id is not correct then give an error - if ($id==0||isNumber($id)==0 || trim ($p_login)=="") - { - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $status=$dom->createElement('status', "nok"); - $tl_id=$dom->createElement('content', _("Erreur : paramètre invalide")); - $dom->appendChild($status); - $dom->appendChild($tl_id); - echo $dom->saveXML(); - return; - } - $todo=new Todo_List($cn); - $todo->set_parameter("id", $id); - $todo->load(); - $todo->remove_share($p_login); - - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $status=$dom->createElement('status', "ok"); - $dom->appendChild($status); - echo $dom->saveXML(); - return; -} \ No newline at end of file diff --git a/sources/html/backup.php b/sources/html/backup.php deleted file mode 100644 index 127a5a0..0000000 --- a/sources/html/backup.php +++ /dev/null @@ -1,99 +0,0 @@ -Check(); - - -if ($User->admin != 1) -{ - echo ""; - return; -} -$dossier_number=HtmlInput::default_value_request("d", 0); -if ($dossier_number == 0 - || isNumber($dossier_number) ==0 ) { - die ('Invalid folder number'); -} -/*!\file - * \brief Make and restore backup - */ -if ( isset ($_REQUEST['sa']) ) -{ - if ( defined ('PG_PATH') ) - putenv("PATH=".PG_PATH); - - - if ( ! isset($_REQUEST['t'])) - { - echo "Erreur : paramètre manquant "; - exit(); - } - - $sa=$_REQUEST['sa']; - // backup - if ( $sa=='b') - { - $cmd=escapeshellcmd (PG_DUMP); - if ( defined ("noalyss_user")) - { - putenv("PGPASSWORD=".noalyss_password); - putenv("PGUSER=".noalyss_user); - putenv("PGHOST=".noalyss_psql_host); - putenv("PGPORT=".noalyss_psql_port); - }else if (defined ("phpcompta_user")) - { - putenv("PGPASSWORD=".phpcompta_password); - putenv("PGUSER=".phpcompta_user); - putenv("PGHOST=".phpcompta_psql_host); - putenv("PGPORT=".phpcompta_psql_port); - } else { - die ('Aucune connection'); - } - - if ( $_REQUEST['t'] == 'd' ) - { - $database=domaine."dossier".$dossier_number; - $args= " -Fc -Z9 --no-owner -h ".getenv("PGHOST")." -p ".getenv("PGPORT")." ".$database; - header('Content-type: application/octet'); - header('Content-Disposition:attachment;filename="'.$database.'.bin"',FALSE); - - passthru ($cmd.$args,$a); - - } - - if ( $_REQUEST['t'] == 'm' ) - { - $database=domaine."mod".$dossier_number; - $args= " -Fc -Z9 --no-owner -h ".getenv("PGHOST")." -p ".getenv("PGPORT")." ".$database; - header('Content-type: bin/x-application'); - header('Content-Disposition: attachment;filename="'.$database.'.bin"',FALSE); - $a=passthru ($cmd.$args); - } - } -} - diff --git a/sources/html/calendar-blue.css b/sources/html/calendar-blue.css deleted file mode 100644 index c7bb87f..0000000 --- a/sources/html/calendar-blue.css +++ /dev/null @@ -1,233 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -div.calendar { position: relative; z-index:13; } - -.calendar, .calendar table { - border: 1px solid #556; - font-size: 11px; - color: #000; - cursor: default; - background: #eef; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; /* They are the navigation buttons */ - padding: 2px; /* Make the buttons seem like they're pressing */ - border-radius: 0px; -} - -.calendar .nav { - background: #778 url(menuarrow.gif) no-repeat 100% 100%; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; /* Pressing it will take you to the current date */ - text-align: center; - background: #fff; - color: #000; - padding: 2px; -} - -.calendar thead .headrow { /* Row containing navigation buttons */ - background: #778; - color: #fff; -} - -.calendar thead .daynames { /* Row containing the day names */ - background: #bdf; -} - -.calendar thead .name { /* Cells containing the day names */ - border-bottom: 1px solid #556; - padding: 2px; - text-align: center; - color: #000; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #a66; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - background-color: #aaf; - color: #000; - border: 1px solid #04f; - padding: 1px; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - background-color: #77c; - padding: 2px 0px 0px 2px; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells containing month days dates */ - width: 2em; - color: #456; - text-align: right; - padding: 2px 4px 2px 2px; -} -.calendar tbody .day.othermonth { - font-size: 80%; - color: #bbb; -} -.calendar tbody .day.othermonth.oweekend { - color: #fbb; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #bdf; -} - -.calendar tbody .rowhilite td { - background: #def; -} - -.calendar tbody .rowhilite td.wn { - background: #eef; -} - -.calendar tbody td.hilite { /* Hovered cells */ - background: #def; - padding: 1px 3px 1px 1px; - border: 1px solid #bbb; -} - -.calendar tbody td.active { /* Active (pressed) cells */ - background: #cde; - padding: 2px 2px 0px 2px; -} - -.calendar tbody td.selected { /* Cell showing today date */ - font-weight: bold; - border: 1px solid #000; - padding: 1px 3px 1px 1px; - background: #fff; - color: #000; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #a66; -} - -.calendar tbody td.today { /* Cell showing selected date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The in footer (only one right now) */ - text-align: center; - background: #556; - color: #fff; -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell */ - background: #fff; - color: #445; - border-top: 1px solid #556; - padding: 1px; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - background: #aaf; - border: 1px solid #04f; - color: #000; - padding: 1px; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - background: #77c; - padding: 2px 0px 0px 2px; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.calendar .combo { - position: absolute; - display: none; - top: 0px; - left: 0px; - width: 4em; - cursor: default; - border: 1px solid #655; - background: #def; - color: #000; - font-size: 90%; - z-index: 100; -} - -.calendar .combo .label, -.calendar .combo .label-IEfix { - text-align: center; - padding: 1px; -} - -.calendar .combo .label-IEfix { - width: 4em; -} - -.calendar .combo .hilite { - background: #acf; -} - -.calendar .combo .active { - border-top: 1px solid #46a; - border-bottom: 1px solid #46a; - background: #eef; - font-weight: bold; -} - -.calendar td.time { - border-top: 1px solid #000; - padding: 1px 0px; - text-align: center; - background-color: #f4f0e8; -} - -.calendar td.time .hour, -.calendar td.time .minute, -.calendar td.time .ampm { - padding: 0px 3px 0px 4px; - border: 1px solid #889; - font-weight: bold; - background-color: #fff; -} - -.calendar td.time .ampm { - text-align: center; -} - -.calendar td.time .colon { - padding: 0px 2px 0px 3px; - font-weight: bold; -} - -.calendar td.time span.hilite { - border-color: #000; - background-color: #667; - color: #fff; -} - -.calendar td.time span.active { - border-color: #f00; - background-color: #000; - color: #0f0; -} diff --git a/sources/html/compute.php b/sources/html/compute.php deleted file mode 100644 index 8e5d441..0000000 --- a/sources/html/compute.php +++ /dev/null @@ -1,88 +0,0 @@ -Check(); -// Retrieve the rate of vat, it $t == -1 it means no VAT -if ( $t != -1 && isNumber($t) == 1 ) -{ - $tva_rate=new Acc_Tva($cn); - $tva_rate->set_parameter('id',$t); - /** - *if the tva_rate->load failed we don't compute tva - */ - if ( $tva_rate->load() != 0 ) - { - $tva_rate->set_parameter('rate',0); - } -} - -$total=new Acc_Compute(); -bcscale(4); -$amount=round(bcmul($p,$q),2); -$total->set_parameter('amount',$amount); -if ( $t != -1 && isNumber($t) == 1 ) -{ - $total->set_parameter('amount_vat_rate',$tva_rate->get_parameter('rate')); - $total->compute_vat(); - if ($tva_rate->get_parameter('both_side')== 1) $total->set_parameter('amount_vat', 0); - $tvac=($tva_rate->get_parameter('rate') == 0 || $tva_rate->get_parameter('both_side')== 1) ? $amount : bcadd($total->get_parameter('amount_vat'),$amount); - header("Content-type: text/html; charset: utf8",true); - echo '{"ctl":"'.$n.'","htva":"'.$amount.'","tva":"'.$total->get_parameter('amount_vat').'","tvac":"'.$tvac.'"}'; -} -else -{ - /* there is no vat to compute */ - header("Content-type: text/html; charset: utf8",true); - echo '{"ctl":"'.$n.'","htva":"'.$amount.'","tva":"NA","tvac":"'.$amount.'"}'; -} -?> - diff --git a/sources/html/direct.php b/sources/html/direct.php deleted file mode 100644 index 12f0e80..0000000 --- a/sources/html/direct.php +++ /dev/null @@ -1,44 +0,0 @@ -Check(); -$g_user->check_dossier($_GET['gDossier']); -$res=$cn->exec_sql("select distinct code,description from get_profile_menu($1) where code ~* $2 or description ~* $3 order by code limit 5 ",array($g_user->get_profile(),$_POST['acs'],$_POST['acs'])); -$nb=Database::num_row($res); - echo "
      "; -for ($i = 0;$i< $nb;$i++) -{ - $row=Database::fetch_array($res,$i); - echo "
    • "; - echo $row['code']; - echo ' '.$row['description'].'
    • '; -} - echo "
    "; -if ( $nb == 0 ) { - echo _('Aucune correspondance'); -} -?> diff --git a/sources/html/do.php b/sources/html/do.php deleted file mode 100644 index 6354d60..0000000 --- a/sources/html/do.php +++ /dev/null @@ -1,281 +0,0 @@ -"._('Vous êtes déconnecté').""; - $backurl=$_SERVER['REQUEST_URI']; - $url="index.php?".http_build_query(array('reconnect'=>1,'backurl'=>urlencode($backurl))); - redirect($url); - exit(); - - } -$style_user=HtmlInput::default_value_post("style_user",$_SESSION['g_theme']); - -html_page_start($style_user); -if ( DEBUG ) { - ?> - - - - -exist_table('version')) { - echo '

    '._('Désolé').'

    '; - echo _('Ce dossier est vide'); - echo '

    '; - echo ''._("Retour à l'accueil").''; - echo '

    '; - return; -} - -$g_user = new User($cn); - -$g_parameter=new Own($cn); - -load_all_script(); -/* Check Browser version if < IE6 then unsupported */ -$browser = $_SERVER['HTTP_USER_AGENT']; -if (strpos($browser, 'MSIE 6') != false || - strpos($browser, 'MSIE 5') != false) -{ - - - echo << -
    -
    Close this notice
    -
    -
    Warning!
    -
    -
    Vous utilisez un navigateur dépassé depuis près de 8 ans!
    -
    Pour une meilleure expérience web, prenez le temps de mettre votre navigateur à jour.
    -
    -
    Get Firefox 3.5
    -
    Get Safari 4
    -
    Get Google Chrome
    -
    -
    - -EOF; - exit(); -} -if ($cn->exist_table('version') == false) -{ - echo '

    ' . _("Base de donnée invalide") . '

    '; - $base = dirname($_SERVER['REQUEST_URI']); - echo HtmlInput::button_anchor('Retour', $base . '/user_login.php'); - exit(); -} -if (DBVERSION < dossier::get_version($cn)) -{ - echo '

    ' . _("Attention: la version de base de donnée est supérieure à la version du programme, vous devriez mettre à jour") . '

    '; -} -if (DBVERSION > dossier::get_version($cn)) -{ - echo '

    ' . _("Votre base de données n'est pas à jour") . ' '; - $a = _("cliquez ici pour appliquer le patch"); - $base = dirname($_SERVER['REQUEST_URI']); - if ($base == '/') { $base = ''; } - $base .= '/admin/setup.php'; - echo '' . $a . '

    '; -} - -/* - * Set a correct periode for the user - */ -$periode = $g_user->get_periode(); -$oPeriode = new Periode($cn, $periode); - -if ($oPeriode->load() == -1) -{ - $periode = $cn->get_value('select p_id from parm_periode order by p_start asc limit 1'); - $g_user->set_periode($periode); -} - -$module_selected = -1; - -/* - * Set the user preference - */ -if ( isset ($_POST['set_preference'])) { - //// Save value - extract($_POST); - - if (strlen(trim($pass_1)) != 0 && strlen(trim($pass_2)) != 0) - { - $g_user->save_password($pass_1,$pass_2); - - } - $g_user->set_periode($period); - $g_user->save_global_preference('THEME', $style_user); - $g_user->save_global_preference('LANG', $lang); - $g_user->save_global_preference('PAGESIZE', $p_size); - $g_user->set_mini_report($minirap); - $_SESSION['g_theme']=$style_user; - $_SESSION['g_pagesize']=$p_size; - $_SESSION['g_lang']=$lang; - $g_user->save_email($p_email); -} - -/* - * if an action is requested - */ -if (isset($_REQUEST['ac'])) -{ - // When debugging save all the input in a file - if ( LOGINPUT) - { - $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); - $tmp_ac=explode('/',trim(strtoupper($_REQUEST['ac']))); - $last=count($tmp_ac); - if ($last > 0) $last--; - fwrite ($file_loginput,"get_profile(); - - - $amenu_id=$cn->get_array('select - pm_id_v3,pm_id_v2,pm_id_v1 - from v_menu_profile where code= upper($1) and p_id=$2', - array($AC,$user_profile)); - try { - if ( count($amenu_id) != 1 ) { - // if AC is a simple code and this menu can be accessed - // we should find the first menu which used it and change the - // request AC to it - $pm_id=$cn->get_array('select pm_id from profile_menu ' - . ' where lower(me_code)=lower($1) and p_id=$2', - array($AC,$user_profile)); - if ( count($pm_id) > 0 ) { - show_menu($pm_id[0]['pm_id']); - } else { - throw new Exception(_('Erreur menu'),10); - } - } - - $module_id=$cn->get_value('select case when pm_id_v3 = 0 then (case when pm_id_v2 = 0 then pm_id_v1 else pm_id_v2 end) else pm_id_v3 end - from v_menu_profile where p_id=$1 and upper(code)=upper($2)', - array($user_profile,$AC)); - $g_user->audit(); - // Show module and highligt selected one - show_module($module_id); - show_menu( $amenu_id[0]['pm_id_v3']); - show_menu( $amenu_id[0]['pm_id_v2']); - show_menu($amenu_id[0]['pm_id_v1']); - } catch (Exception $e) { - if ( $e->getCode() == 10 ) { - alert(_('Accès menu impossible')); - } - else { - alert($e->getTraceAsString()); - } - } -} -else -{ - $default = find_default_module(); - $user_profile=$g_user->get_profile(); - - if ( $user_profile == "" ) - throw new Exception (_('Aucun profil utilisateur')); - - $menu_id=$cn->get_value('select - case when pm_id_v3 = 0 then - (case when pm_id_v2 = 0 then pm_id_v1 else pm_id_v2 end) - else pm_id_v3 end - from v_menu_profile where code= upper($1) and p_id=$2', - array($default,$user_profile)); - $_GET['ac']=$default; - $_POST['ac']=$default; - $_REQUEST['ac']=$default; - show_module($menu_id); - $all[0] = $default; - show_menu($menu_id); -} - - diff --git a/sources/html/document/fr_be/bnb.form b/sources/html/document/fr_be/bnb.form deleted file mode 100644 index ba7c6d8..0000000 --- a/sources/html/document/fr_be/bnb.form +++ /dev/null @@ -1,198 +0,0 @@ -# Les postesg*(-1) - $C10=round([10%s],2)*(-1) - $C100=round([100%s],2)*(-1) - $C101=round([101%s],2) - $C11=round([11%s],2)*(-1) - $C12=round([12%s],2)*(-1) - $C13=round([13%s],2)*(-1) - $C130=round([130%s],2)*(-1) - $C131=round([131%s],2)*(-1) - $C1310=round([1310%s],2)*(-1) - $C1311=round([1311%s],2)*(-1) - $C132=round([132%s],2)*(-1) - $C133=round([133%s],2)*(-1) - $C14=round([14%s],2)*(-1) - $C140=round([140%s],2)*(-1) - $C141=round([141%s],2) - $C15=round([15%s],2)*(-1) - $C16=round([16%s],2)*(-1) - $C160=round([160%s],2)*(-1) - $C161=round([161%s],2)*(-1) - $C162=round([162%s],2)*(-1) - $C163=round([163%s],2)*(-1) - $C164=round([164%s],2)*(-1) - $C165=round([165%s],2)*(-1) - $C168=round([168%s],2)*(-1) -$C17=round([17%s],2)*(-1) - $C170=round([170%s],2)*(-1) - $C171=round([171%s],2)*(-1) - $C172=round([172%s],2)*(-1) - $C173=round([173%s],2)*(-1) - $C174=round([174%s],2)*(-1) - $C175=round([175%s],2)*(-1) - $C176=round([176%s],2)*(-1) - $C178=round([178%s],2)*(-1) - $C179=round([179%s],2)*(-1) -$C2=round([2%s],2)*(-1) - $C20=round([20%s],2) - $C21=round([21%s],2) - $C22=round([22%s],2) - $C23=round([23%s],2) - $C24=round([24%s],2) - $C25=round([25%s],2) - $C26=round([26%s],2) - $C27=round([27%s],2) - $C28=round([28%s],2) - $C29=round([29%s],2) - $C290=round([290%s],2) - $C291=round([291%s],2) -$C3=round([3%s],2) - $C30=round([30%s],2) - $C31=round([31%s],2) - $C32=round([32%s],2) - $C33=round([33%s],2) - $C34=round([34%s],2) - $C35=round([35%s],2) - $C36=round([36%s],2) - $C37=round([37%s],2) - $C40=round([40%s],2) - $C41=round([41%s],2) - $C42=round([42%s],2)*(-1) - $C43=round([43%s],2)*(-1) - $C439=round([439%s],2)*(-1) - $C44=round([44%s],2)*(-1) - $C440=round([440%s],2)*(-1) - $C441=round([441%s],2)*(-1) - $C444=round([444%s],2)*(-1) - $C45=round([45%s],2)*(-1) - $C450=round([450%s],2)*(-1) - $C451=round([451%s],2)*(-1) - $C452=round([452%s],2)*(-1) - $C453=round([453%s],2)*(-1) - $C454=round([454%s],2)*(-1) -$C455=round([455%s],2)*(-1) -$C456=round([456%s],2)*(-1) -$C457=round([457%s],2)*(-1) -$C458=round([458%s],2)*(-1) - $C459=round([459%s],2)*(-1) - $C46=round([46%s],2) - $C47=round([47%s],2)*(-1) - $C48=round([48%s],2)*(-1) - $C49=round([49%s],2) - $C490=round([490%s],2) - $C491=round([491%s],2) - $C492=round([492%s],2)*(-1) - $C493=round([493%s],2)*(-1) - $C50=round([50%s],2) - $C51=round([51%s],2) - $C52=round([52%s],2) - $C53=round([53%s],2) - $C54=round([54%s],2) - $C55=round([55%s],2) - $C56=round([56%s],2) - $C57=round([57%s],2) - $C58=round([58%s],2) - $C60=round([60%s],2) - $C61=round([61%s],2) - $C62=round([62%s],2) - $C63=round([63%s],2) -$C630=round([630%s],2) -$C631=round([631%s],2) -$C632=round([632%s],2) -$C633=round([633%s],2) -$C634=round([634%s],2) -$C635=round([635%s],2) -$C636=round([636%s],2) -$C637=round([637%s],2) - - $C649=round([649%s],2)*(-1) - $C64=round([64%s],2) - - $C65=round([65%s],2) - $C66=round([66%s],2) - $C67=round([67%s],2) - $C68=round([68%s],2) - $C680=round([680%s],2) -$C689=round([689%s],2) - $C69=round([69%s],2) - $C690=round([690%s],2) - $C691=round([691%s],2) - $C692=round([692%s],2) - $C6920=round([6920%s],2) - $C6921=round([6921%s],2) - $C693=round([693%s],2) - $C694=round([694%s],2) - $C695=round([695%s],2) - $C696=round([696%s],2) - -$C7=round([7%s],2)*(-1) - $C70=round([70%s],2)*(-1) - $C71=round([71%s],2)*(-1) - $C73=round([73%s],2)*(-1) - $C72=round([72%s],2)*(-1) - $C74=round([74%s],2)*(-1) - $C75=round([75%s],2)*(-1) - $C76=round([76%s],2)*(-1) - $C77=round([77%s],2)*(-1) -$C780=round([780%s],2)*(-1) -$C789=round([789%s],2)*(-1) - $C79=round([79%s],2)*(-1) -$C790=round([790%s],2)*(-1) -$C791=round([791%s],2)*(-1) -$C792=round([792%s],2)*(-1) -$C793=round([793%s],2)*(-1) -$C794=round([794%s],2)*(-1) -# Les formules (*-1) -# -$S1=abs($C2-$C29) -$S2=$C22+$C23+$C24+$C25+$C26+$C27 -$S4=$C30+$C31+$C32+$C33+$C34+$C35+$C36 -$S3=$C29+$C50+$C51+$C52+$C53+$C54+$C55+$C56+$C57+$C58+$C490+$C491+$C41+$C40+$S4 - -$S5=$C40+$C41 -$S6=$C50+$C51+$C52+$C53 -$S7=$C54+$C55+$C56+$C57+$C58 -$S8=$C490+$C491 -$S9=$S1+$S3 -$S10=$C10+$C11+$C12+$C13+$C14+$C15 -$S11=$C160+$C161+$C162+$C163+$C164+$C165 -$S12=$C17+$C42+$C43+$C44+$C45+$C46+$C47+$C48+$C492+$C493 -$S13=$C170+$C171+$C172+$C173+$C174 -$S14=$C172+$C173 -$S15=$C178+$C179 -$S16=$C42+$C43+$C44+$C45+$C46+$C47+$C48 -$S17=$C43-$C439 -$S18=$C440+$C444 -$S19=$C450+$C451+$C452+$C453 -$S20=$C454+$C455+$C456+$C457+$C458+$C459 -$S21=$C47+$C48 -$S22=$C492+$C493 -$S23=$C10+$C11+$C12+$C13+$C14+$C15+$C16+$C17+$C42+$C43+$C44+$C45+$C46+$C47+$C48+$C492+$C493 -$S24=$C60+$C61 -$S25=($C70+$C73+$C74-$C60-$C61>=0)?$C70+$C73+$C74-$C60-$C61:0 -$S26=($C70+$C73+$C74-$C60<0)?$C70+$C73+$C74-$C60-$C61:0 -$S27=$C631+$C632+$C633+$C634 -$S28=$C635+$C636+$C637 -$S29=abs($C64)-$C649 -$F1=$C70+$C73+$C74+$C649-$S29-$C60-$C63-$C61-$C62 -$S30=($F1>=0)?$F1:0 -$S31=($F1<=0)?$F1*(-1):0 -$F3=$F1-$C65+$C75 -$S32=($F3>=0)?$F3:0 -$S33=($F3<0)?$F3*(-1):0 -$F4=$F3-$C66+$C76 -$S34=($F4>=0)?$F4:0 -$S35=($F4<0)?$F4*(-1):0 -$F5=$F4+$C77-$C67 -$S36=($F5>=0)?$F5:0 -$S37=($F5<0)?$F5*(-1):0 -$S38=$C77-$C67 -$F6=$F5-$C689+$C789 -$S39=($F6>=0)?$F6:0 -$S40=($F6<0)?$F6*(-1):0 -$S41=$C791+$C792 -$S42=$C691+$C692 -$S43=$C694+$C695+$C696 -$F7=$F6-$C690+$C790 -$S44=($F7>=0)?$F7:0 -$S45=($F7<0)?$F7*(-1):0 diff --git a/sources/html/document/fr_be/bnb.rtf b/sources/html/document/fr_be/bnb.rtf deleted file mode 100644 index 90b4d53..0000000 --- a/sources/html/document/fr_be/bnb.rtf +++ /dev/null @@ -1,488 +0,0 @@ -{\rtf1\ansi\deff3\adeflang1025 -{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset128 Liberation Serif{\*\falt Times New Roman};}{\f4\froman\fprq0\fcharset128 Nimbus Sans L{\*\falt Arial};}{\f5\froman\fprq0\fcharset128 Times New Roman;}{\f6\fswiss\fprq0\fcharset128 Nimbus Sans L{\*\falt Arial};}{\f7\froman\fprq0\fcharset128 Times{\*\falt Times New Roman};}{\f8\froman\fprq0\fcharset128 Arial;}{\f9\fnil\fprq0\fcharset128 Arial;}{\f10\fnil\fprq0\fcharset128 Times{\*\falt Times New Roman};}{\f11\fnil\fprq0\fcharset128 WenQuanYi Micro Hei;}{\f12\fnil\fprq0\fcharset128 Times New Roman;}{\f13\fnil\fprq0\fcharset128 Lohit Hindi;}{\f14\fnil\fprq0\fcharset128 Arial Unicode MS;}{\f15\fnil\fprq0\fcharset128 AR PL ShanHeiSun Uni;}{\f16\fnil\fprq0\fcharset128 Nimbus Sans L{\*\falt Arial};}} -{\colortbl;\red0\green0\blue0;\red128\green128\blue128;} -{\stylesheet{\s0\snext0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033 Standard;} -{\s15\sbasedon0\snext16\ql\widctlpar\sb240\sa120\keepn\ltrpar\cf0\kerning1\hich\af11\langfe255\dbch\af15\afs28\alang1081\loch\f6\fs28\lang1033 Titre;} -{\s16\sbasedon0\snext16\ql\widctlpar\sb0\sa120\ltrpar\cf0\kerning1\hich\af10\langfe255\dbch\af12\afs24\alang1081\loch\f5\fs24\lang1036 Corps de texte;} -{\s17\sbasedon16\snext17\ql\widctlpar\sb0\sa120\ltrpar\cf0\kerning1\hich\af10\langfe255\dbch\af12\afs24\alang1081\loch\f5\fs24\lang1036 Liste;} -{\s18\sbasedon0\snext18\ql\widctlpar\sb120\sa120\noline\ltrpar\cf0\i\kerning1\hich\af10\langfe255\dbch\af13\afs24\alang1081\ai\loch\f5\fs24\lang1033 L\u233\'3fgende;} -{\s19\sbasedon0\snext19\ql\widctlpar\noline\ltrpar\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033 Index;} -{\s20\sbasedon0\snext20\ql\widctlpar\sb120\sa120\ltrpar\cf0\i\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\ai\loch\f5\fs24\lang1033 caption;} -{\s21\sbasedon0\snext21\ql\widctlpar\sb240\sa120\keepn\ltrpar\cf0\kerning1\hich\af10\langfe255\dbch\af16\afs28\alang1081\loch\f4\fs28\lang1033 WW-Heading;} -{\s22\sbasedon0\snext22\ql\widctlpar\sb120\sa120\ltrpar\cf0\i\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\ai\loch\f7\fs24\lang1033 WW-caption;} -{\s23\sbasedon0\snext23\ql\widctlpar\ltrpar\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033 WW-Index;} -{\s24\sbasedon0\snext24\ql\widctlpar\sb120\sa120\ltrpar\cf0\i\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\ai\loch\f7\fs24\lang1033 WW-caption1;} -{\s25\sbasedon0\snext25\ql\widctlpar\sb120\sa120\ltrpar\cf0\i\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\ai\loch\f5\fs24\lang1033 WW-caption11;} -{\s26\sbasedon0\snext26\ql\widctlpar\sb240\sa120\keepn\ltrpar\cf0\kerning1\hich\af10\langfe255\dbch\af16\afs28\alang1081\loch\f4\fs28\lang1033 WW-Heading1;} -{\s27\sbasedon0\snext27\ql\widctlpar\sb120\sa120\ltrpar\cf0\i\kerning1\hich\af10\langfe255\dbch\af12\afs20\alang1081\ai\loch\f5\fs20\lang1036 WW-caption111;} -{\s28\sbasedon0\snext28\ql\widctlpar\ltrpar\cf0\kerning1\hich\af10\langfe255\dbch\af12\afs24\alang1081\loch\f5\fs24\lang1036 WW-Index1;} -{\s29\sbasedon0\snext29\ql\widctlpar\sb120\sa120\ltrpar\cf0\i\kerning1\hich\af10\langfe255\dbch\af12\afs20\alang1081\ai\loch\f5\fs20\lang1036 WW-caption1111;} -{\s30\sbasedon0\snext30\ql\widctlpar\tqc\tx4320\tqr\tx8640\noline\ltrpar\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033 En-t\u234\'3fte;} -{\s31\sbasedon0\snext31\ql\widctlpar\tqc\tx4320\tqr\tx8640\ltrpar\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033 WW-header;} -{\s32\sbasedon0\snext32\ql\widctlpar\tqc\tx4320\tqr\tx8640\ltrpar\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033 WW-header1;} -}{\info{\creatim\yr2008\mo4\dy1\hr15\min27}{\revtim\yr1601\mo1\dy1\hr0\min0}{\printim\yr1601\mo1\dy1\hr0\min0}{\comment LibreOffice}{\vern3500}}\deftab709 - -{\*\pgdsctbl -{\pgdsc0\pgdscuse195\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1700\headery1134\margbsxn1134{\header\pard\plain \s30\ql\widctlpar\tqc\tx4320\tqr\tx8640\noline\ltrpar\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tqc\tx4320\tqc\tx4818\tqr\tx8640\tqr\tx9637{\cf1\i0\b0\kerning1\hich\af10\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033 -<
    >} -\par }\pgdscnxt0 Standard;}} -\formshade{\*\pgdscno0}\paperh16838\paperw11906\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1700\headery1134\margbsxn1134{\header\pard\plain \s30\ql\widctlpar\tqc\tx4320\tqr\tx8640\noline\ltrpar\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tqc\tx4320\tqc\tx4818\tqr\tx8640\tqr\tx9637{\cf1\i0\b0\kerning1\hich\af10\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033 -<
    >} -\par }\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc -\pgndec\pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\qc\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af10\langfe255\dbch\af9\afs28\alang1025\ab\rtlch \ltrch\loch\fs28\lang1033\loch\f8 -ACTIF} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs20\alang1025\ab\rtlch \ltrch\loch\fs20\lang1033\loch\f8 -\tab ACTIFS IMMOBILISES \tab 20/28 \tab <<$S1>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -I Frais d'\u233\'e9tablissement}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 - \tab 20}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 - \tab <<$C20>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -II Immobilisations incorporelles }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(annexe I, A) \tab 21 \tab <<$C21>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -III Immobilisations corporelles }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(ann I, B) \tab 22/27 \tab <<$S2>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab A Terrains et constructions \tab 22 \tab <<$C22>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab B Installations, machines et outillage \tab 23 \tab <<$C23>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab C Mobilier et mat\u233\'e9riel roulant \tab 24 \tab <<$C24>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab D Location-financement et droits similaires \tab 25 \tab <<$C25>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab E Autres immobilisations corporelles \tab 26 \tab <<$C26>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab F Immobilisations en cours et acomptes vers\u233\'e9s \tab 27 \tab <<$C27>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -IV Immobilisations financi\u232\'e8res }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(ann I, C et II) \tab 28 \tab <<$C28>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs20\alang1025\ab\rtlch \ltrch\loch\fs20\lang1033\loch\f8 -\tab ACTIFS CIRCULANTS \tab 29/58\tab <<$S3>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -V Cr\u233\'e9ances \u224\'e0 plus d'un an \tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -\tab <<$C29>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab A Cr\u233\'e9ances commerciales \tab 290 \tab <<$C290>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab B Autres cr\u233\'e9ances \tab 291\tab <<$C291>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -VI Stocks et commandes en cours d'ex\u233\'e9cution \tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 - \tab <<$C3>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab A Stocks \tab 30/36 \tab <<$S4>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab B Commandes en cours d'ex\u233\'e9cution \tab 37 \tab <<$C37>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -VII Cr\u233\'e9ances \u224\'e0 un an au plus}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 40}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/41 \tab <<$S5>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab A Cr\u233\'e9ances commerciales \tab 40 \tab <<$C40>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab B Autres cr\u233\'e9ances \tab 41 \tab <<$C41>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -VIII Placements de tr\u233\'e9sorerie }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(ann II) \tab 50/53 \tab <<$S6>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -IX Valeurs disponibles }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 55}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/58 \tab <<$S7>> \tab } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -X Comptes de r\u233\'e9gularisation}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 - \tab 490}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/1 \tab <<$S8>>\tab } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -TOTAL DE L'ACTIF \tab 20/58\tab }{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\loch\fs20\lang1033\loch\f8 -<<$S9>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\pagebb\qc\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs28\alang1025\ab\rtlch \ltrch\loch\fs28\lang1033\loch\f8 -PASSIF} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs20\alang1025\ab\rtlch \ltrch\loch\fs20\lang1033\loch\f8 -\tab CAPITAUX PROPRES \tab 10/15 \tab <<$S10>>\tab } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -I Capital (}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -ann III) \tab 10 \tab <<$C10>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab A Capital souscrit \tab 100 \tab <<$C100>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab B Capital non appel\u233\'e9 (-) \tab 101 \tab (<<$C101>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -II Primes d'\u233\'e9mission\tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -11}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab0\rtlch \ltrch\loch\fs18\lang255\loch\f8 - \tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -<<$C11>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -III Plus-values de r\u233\'e9\u233\'e9valuation \tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -12\tab <<$C12>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -IV R\u233\'e9serves \tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -13\tab <<$C13>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab A R\u233\'e9serve l\u233\'e9gale \tab 130 \tab <<$C130>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab B R\u233\'e9serves indisponibles \tab 131 \tab <<$C131>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab \tab 1 Pour actions propres \tab 1310 \tab <<$C1310>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab \tab 2 Autres \tab 1311 \tab <<$C1311>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab C R\u233\'e9serves immunis\u233\'e9es\tab 132 \tab <<$C132>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab D R\u233\'e9serves disponibles \tab 133 \tab <<$C133>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -V B\u233\'e9n\u233\'e9fice report\u233\'e9 \tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -140\tab <<$C140>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Perte report\u233\'e9e }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(-) \tab 141 \tab (<<$C141>>) } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -VI Subsides en capital \tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -15}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab0\rtlch \ltrch\loch\fs18\lang255\loch\f8 - \tab <<$C15>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs20\alang1025\ab\rtlch \ltrch\loch\fs20\lang1033\loch\f8 -\tab PROVISIONS ET IMP\u212\'d4TS DIFFERES \tab 16 \tab <<$C16>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -VII A Provisions pour risques et charges }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(ann IV) \tab 160/5 \tab <<$S11>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -B Imp\u244\'f4ts diff\u233\'e9r\u233\'e9s \tab 168 \tab <<$C168>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs20\alang1025\ab\rtlch \ltrch\loch\fs20\lang1033\loch\f8 -\tab DETTES \tab 17/49 \tab <<$S12>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -VIII Dettes \u224\'e0 plus d'un an }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(ann V)\tab 17 \tab <<$C17>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -A Dettes financi\u232\'e8res \tab 170/4 \tab <<$S13>> \tab } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 1 Etablissements de cr\u233\'e9dit, dettes de locationfinancement et assimil\u233\'e9es \tab 172/3 \tab <<$S14>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 2 Autres emprunts \tab 174/0 \tab <<$C174>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -B Dettes commerciales \tab 175 \tab <<$C175>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -C Acomptes re\u231\'e7us sur commandes \tab 176 \tab <<$C176>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -D Autres dettes \tab 178/9\tab <<$S15>>\tab } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -IX Dettes \u224\'e0 un an au plus }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(ann V) \tab 42/48 \tab <<$S16>>\tab } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab A Dettes \u224\'e0 plus d'un an \u233\'e9ch\u233\'e9ant dans l'ann\u233\'e9e \tab 42 \tab <<$C42>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab B Dettes financi\u232\'e8res \tab 43 \tab <<$C43>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab \tab 1 Etablissements de cr\u233\'e9dit \tab 430/8 \tab <<$S17>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab \tab 2 Autres emprunts \tab 439 \tab <<$C439>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab C Dettes commerciales \tab 44 \tab <<$C44>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab \tab 1 Fournisseurs \tab 440/4 \tab <<$S18>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab \tab 2 Effets \u224\'e0 payer \tab 441 \tab <<$C441>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab D Acomptes re\u231\'e7us sur commandes \tab 46 \tab <<$C46>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab E Dettes fiscales, salariales et sociales \tab 45 \tab <<$C45>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab \tab 1 Imp\u244\'f4ts \tab 450/3 \tab <<$S19>>\tab } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab \tab 2 R\u233\'e9mun\u233\'e9rations et charges sociales \tab 454/9 \tab <<$S20>> } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab F Autres dettes \tab 47/48 \tab <<$S21>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -X Comptes de r\u233\'e9gularisation}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 492}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/3 \tab <<$S22>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -TOTAL DU PASSIF \tab 10/49\tab <<$S23>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\pagebb\qc\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs28\alang1025\ab\rtlch \ltrch\loch\fs28\lang1033\loch\f8 -COMPTE DE RESULTATS} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -I-II Produits et charges d'exploitation} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Chiffre d'affaires }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 - \tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ai0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -70}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ai0\rtlch \ltrch\loch\fs18\lang255\loch\f8 -\tab <<$C}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -70>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{{\*\bkmkstart DDE_LINK}{\*\bkmkend DDE_LINK}\cf1\i\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ai\rtlch \ltrch\loch\fs18\lang255\loch\f8 -Dons et subsides\tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ai0\rtlch \ltrch\loch\fs18\lang255\loch\f8 -73\tab <<$C73>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{{\*\bkmkstart DDE_LINK1}{\*\bkmkend DDE_LINK1}\cf1\i\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ai\rtlch \ltrch\loch\fs18\lang255\loch\f8 -Autrs produits d'exploitation\tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ai0\rtlch \ltrch\loch\fs18\lang255\loch\f8 -74\tab <<$C74>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Approvisionnements, marchandises; \tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -60}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 - \tab (<<$C60>>}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -services et biens divers}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 61 \tab (}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -<<$C61>>}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab \tab \tab 60/61\tab (<<$S24>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -A.B. Marge brute d'exploitation (solde positif) \tab 70/61 \tab <<$S25>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\fs18\lang1033\loch\f8 - }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Marge brute d'exploitation (solde n\u233\'e9gatif) (-) \tab 61/70 \tab (<<$S26>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -C R\u233\'e9mun\u233\'e9rations, charges sociales et pensions\tab 62\tab (<<$C62>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -D Amortissements et r\u233\'e9ductions de valeur sur frais d'\u233\'e9tablissement, } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -sur immobilisations incorporelles et corporelles (-)\tab 630\tab (<<$C630>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -E R\u233\'e9ductions de valeur sur stocks, sur commandes en cours d'ex\u233\'e9cution et } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -sur cr\u233\'e9ances commerciales (dotations -, reprises + ) \tab 631/4\tab <<$S27>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -F Provisions pour risques et charges (dotations -,utilisations et reprises +) \tab 635/7\tab <<$S28>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -G Autres charges d'exploitation (-) \tab 640/8 \tab (<<$S29>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -H Charges d'exploitation port\u233\'e9es \u224\'e0 l'actif au titre de frais de restructuration (+)\tab 649\tab <<$C649>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -III B\u233\'e9n\u233\'e9fice d'exploitation}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ai0\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 - (+)}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 70}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/64\tab <<$S30>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i\b\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Perte d'exploitation}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\ai0\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 - (-) }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 64}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/70 \tab (<<$S31>>)\tab } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -IV-V Produits financiers \tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -75\tab <<$C75>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Charges financi\u232\'e8res }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(-) \tab 65\tab (<<$C65>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -VI B\u233\'e9n\u233\'e9fice courant avant imp\u244\'f4ts}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ai0\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 - (+)}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 70}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/65\tab <<$S32>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Perte courante avant imp\u244\'f4ts}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ai0\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 - (-)}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 65}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/70\tab (<<$S33>>)\tab } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -VII-VIII Produits exceptionnels}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 76}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 - \tab <<$C76>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Charges exceptionnelles }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(-) \tab 66\tab (<<$C66>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i\b\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -IX B\u233\'e9n\u233\'e9fice de l'exercice avant imp\u244\'f4ts }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\ai0\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(+)}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 70}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/66\tab <<$S34>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Perte de l'exercice avant imp\u244\'f4ts }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ai0\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(-)}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 66}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/70\tab (<<$S35>>)\tab } -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -IXbis Pr\u233\'e9l\u232\'e8vements sur les imp\u244\'f4ts diff\u233\'e9r\u233\'e9s }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(+) \tab 780 \tab <<$C780>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Transferts aux imp\u244\'f4ts diff\u233\'e9r\u233\'e9s }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(-) \tab 680 \tab (<<$C680>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -X Imp\u244\'f4ts sur le r\u233\'e9sultat }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(-) (+) \tab 67/77\tab <<$S38>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -XI B\u233\'e9n\u233\'e9fice de l'exercice }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ai0\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(+) }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 70}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/67\tab <<$S36>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Perte de l'exercice }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ai0\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(-) }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 67}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/70\tab (<<$S37>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -XII Pr\u233\'e9l\u232\'e8vements sur les r\u233\'e9serves immunis\u233\'e9es }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(+) \tab 789\tab <<$C789>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Transferts aux r\u233\'e9serves immunis\u233\'e9es }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(-) \tab 689 \tab (<<$C689>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i\b\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -XII B\u233\'e9n\u233\'e9fice de l'exercice \u224\'e0 affecter }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\ai0\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(+)}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 70}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/68\tab <<$S39>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i\b\kerning1\hich\af9\langfe255\dbch\af9\afs20\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Perte de l'exercice \u224\'e0 affecter}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs20\alang1025\ai0\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 - (-) }{\cf1\i\b0\kerning1\hich\af9\langfe255\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs16\lang1033\loch\f8 -\tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -68/70\tab (<<$S40>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\pagebb\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -AFFECTATIONS ET PRELEVEMENTS} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -A B\u233\'e9n\u233\'e9fice \u224\'e0 affecter}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 70}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/69\tab <<$S44>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\fs18\lang1033\loch\f8 - }{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -Perte \u224\'e0 affecter }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(-) \tab 69/70 \tab (<<$S45>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 1 B\u233\'e9n\u233\'e9fice de l'exercice \u224\'e0 affecter \tab 70/68 \tab <<$S39>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab Perte de l'exercice \u224\'e0 affecter (-) \tab 68/70 \tab (<<$S40>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 2 B\u233\'e9n\u233\'e9fice report\u233\'e9 de l' exercice pr\u233\'e9c\u233\'e9dent \tab 790 \tab <<$C790>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab Perte report\u233\'e9e de l' exercice pr\u233\'e9c\u233\'e9dent (-) \tab 690\tab (<<$C690>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -B Pr\u233\'e9l\u232\'e8vements sur les capitaux propres}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 - \tab 791}{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang255\loch\f8 -/2 \tab <<$S41>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -C Affectations aux capitaux propres }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(-) \tab 691/2\tab (<<$S42>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 1 au capital et aux primes d'\u233\'e9mission \tab 691 \tab (<<$C691>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 2 \u224\'e0 la r\u233\'e9serve l\u233\'e9gale \tab 6920 \tab (<<$C6920>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 3 aux autres r\u233\'e9serves \tab 6921 \tab (<<$C6921>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -D 1 B\u233\'e9n\u233\'e9fice \u224\'e0 reporter }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af14\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(-) \tab 693\tab (<<$C693>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\fs18\lang1033\loch\f8 - }{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -2 Perte \u224\'e0 reporter \tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -793\tab <<$C793>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -E Intervention d'associ\u233\'e9s (ou du propri\u233\'e9taire) dans la perte \tab }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\ab0\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -794\tab <<$C794>>} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch\lang1033 - -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -F B\u233\'e9n\u233\'e9fice \u224\'e0 distribuer }{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -(-) \tab 694/6 \tab (<<$S43>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 1 R\u233\'e9mun\u233\'e9ration du capital \tab 694 \tab (<<$C694>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 2 Administrateurs ou g\u233\'e9rants \tab 695 \tab (<<$C695>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725{\cf1\i0\b0\kerning1\hich\af9\langfe255\dbch\af9\afs18\alang1025\rtlch \ltrch\loch\fs18\lang1033\loch\f8 -\tab 3 Autres allocataires \tab 696 \tab (<<$C696>>)} -\par \pard\plain \s0\ql\widctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af10\langfe255\dbch\af14\afs24\alang1081\loch\f5\fs24\lang1033\ql\widctlpar\tx330\tx915\tx6930\tx7725\rtlch \ltrch\loch - -\par } \ No newline at end of file diff --git a/sources/html/document/fr_fr/fr_plan_abrege_perso_bil10000.form b/sources/html/document/fr_fr/fr_plan_abrege_perso_bil10000.form deleted file mode 100644 index 7b4b2f0..0000000 --- a/sources/html/document/fr_fr/fr_plan_abrege_perso_bil10000.form +++ /dev/null @@ -1,180 +0,0 @@ -# Bilan (Systme abrg personnalis) -# version 2007/10/28 13:54 (en compte) - -# Liste des comptes utiliss -$C101=round([101%],2) -$C105=round([105%],2) -$C1061=round([1061%],2) -$C1063=round([1063%],2) -$C1064=round([1064%],2) -$C1068=round([1068%],2) -$C108=round([108%],2) -### REPORT A NOUVEAU -$C11=round([11%],2) -### RESULTAT DE L'EXERCICE -$C12=round([12%],2) -$C145=round([145%],2) -$C146=round([146%],2) -$C147=round([147%],2) -$C148=round([148%],2) -$C15=round([15%],2) -$C16=round([16%],2) -$C201=round([201%],2) -$C206=round([206%],2) -$C207=round([207%],2) -$C208=round([208%],2) -$C21=round([21%],2) -$C23=round([23%],2) -$C27=round([27%],2) -$C280=round([280%],2) -$C281=round([281%],2) -$C290=round([290%],2) -$C291=round([291%],2) -$C297=round([297%],2) -$C31=round([31%],2) -$C33=round([33%],2) -$C34=round([34%],2) -$C35=round([35%],2) -$C37=round([37%],2) -$C391=round([391%],2) -$C393=round([393%],2) -$C394=round([394%],2) -$C395=round([395%],2) -$C397=round([397%],2) -$C400=round([400%],2) -$C409=round([409%],2) -$C410=round([410%],2) -$C419=round([419%],2) -$C421=round([421%],2) -$C428=round([428%],2) -$C43D=round([43%],2) -$C43C=round([43%],2) -$C444D=round([444%],2) -$C444C=round([444%],2) -$C445D=round([445%],2) -$C445C=round([445%],2) -$C447=round([447%],2) -$C455D=round([455%],2) -$C455C=round([455%],2) -$C46=round([46%],2) -$C486=round([486%],2) -$C487=round([486%],2) -$C491=round([491%],2) -$C496=round([496%],2) -$C50=round([50%],2) -$C51D=round([51%],2) -$C53=round([53%],2) -$C54=round([54%],2) -$C58=round([58%],2) -$C590=round([590%],2) - -# --- ACTIF --- -## Actif immobilis -### immobilisations incorporelles -$S10001=$C206+$C207 -$S10002=$C201+$C208 -$S10003=$C280+$C290 -### immobilisations corporelles -$S10004=$C21+$C23 -$S10005=$C281+$C291 -### immobilisations financires -$S10006=$C27 -$S10007=$C297 -## Actif circulant -### Stock et en-cours (autres) -$S10011=$C31+$C33+$C34+$C35 -$S10012=$C391+$C393+$C394+$C395 -### Stock et en-cours (marchandises) -$S10013=$C37 -$S10014=$C397 -### Avances et acomptes verss -$S10015=$C409 -### Crances clients -$S10016=$C410 -$S10017=$C491 -### Crances autres -$S10018=$C428+$C43D+$C444D+$C445D+$C455D+$C46 -$S10019=$C496 -### Valeurs mobilires -$S10020=$C50 -$S10021=$C590 -### Disponibilits -$S10022=$C51D+$C54+$C58 -### Caisse -$S10023=$C53 -### Charges constates d'avance -$S10031=$C486 - -## Total I -$S10111=$S10001+$S10002+$S10004+$S10006 -$S10112=$S10003+$S10005+$S10007 -$S10113=$S10111-$S10112 -## Total I N-1 -$S10114=0 -## Total II -$S10121=$S10011+$S10013+$S10015+$S10016+$S10018+$S10020+$S10022+$S10023 -$S10122=$S10012+$S10014+$S10017+$S10019+$S10021 -$S10123=$S10121-$S10122 -## Total II N-1 -$S10124=0 -## Total III -$S10131=$S10031 -## Total I+II+III -$S10991=$S10111+$S10121+$S10131 -$S10992=$S10112+$S10122 -$S10993=$S10113+$S10123 -## Total I+II+III N-1 -$S10994=0 - - -# --- PASSIF --- -## Capitaux propres -### Capital -$S11001=$C101+$C108 -### Ecarts de rvaluation -$S11002=$C105 -### Rserves -### Rserve lgale -$S11003=$C1061 -### Rserves rglementes -$S11004=$C1064 -### Autres rserves -$S11005=$C1063+$C1068 -### REPORT A NOUVEAU -$S11006=$C11 -# RESULTAT DE L'EXERCICE -$S11007=$C12 -### Provisions rglementes -$S11008=$C145+$C146+$C147+$C148 -## Provisions -$S11011=$C15 -## Dettes -### Emprunts et dettes assimiles -$S11021=$C16 -### Avances et acomptes reus -$S11022=$C419 -### Fournisseurs et comptes rattachs -$S11023=$C400 -### Autres dettes -$S11024=$C421+$C428+$C43C+$C444C+$C445C+$C447+$C455C+$C46 -## Produits constats d'avance -$S11031=$C487 - -## Total I -$S11111=$S11001+$S11002+$S11003+$S11004+$S11005+$S11007+$S11008 -## Total I N-1 -$S11112=0 -## Total II -$S11121=$S11011 -## Total II N-1 -$S11122=0 -## Total III -$S11131=$S11021+$S11022+$S11023+$S11024 -## Total III N-1 -$S11132=0 -## Total IV -$S11141=$S11031 -## Total I+II+III+IV -$S11991=$S11111+$S11121+$S11131+$S11141 -## Total I+II+III+IV N-1 -$S11992=0 diff --git a/sources/html/document/fr_fr/fr_plan_abrege_perso_bil10000.ods b/sources/html/document/fr_fr/fr_plan_abrege_perso_bil10000.ods deleted file mode 100644 index a7f4183..0000000 Binary files a/sources/html/document/fr_fr/fr_plan_abrege_perso_bil10000.ods and /dev/null differ diff --git a/sources/html/document/fr_fr/fr_plan_abrege_perso_cr1000.form b/sources/html/document/fr_fr/fr_plan_abrege_perso_cr1000.form deleted file mode 100644 index 5caa509..0000000 --- a/sources/html/document/fr_fr/fr_plan_abrege_perso_cr1000.form +++ /dev/null @@ -1,142 +0,0 @@ -# Compte de rsultat (Systme abrg personnalis) -# version 2007/10/28 10:08 (en compte) - -# Liste des comptes utiliss -$C60=round([60],2) -$C607=round([607%],2) -$C6031=round([6031%],2) -$C6032=round([6032%],2) -$C6037=round([6037%],2) -$C61=round([61%],2) -$C62=round([62%],2) -$C63=round([63%],2) -$C641=round([641%],2) -$C644=round([644%],2) -$C645=round([645%],2) -$C646=round([646%],2) -$C65=round([65%],2) -$C66=round([66%],2) -$C67=round([67%],2) -$C6811=round([6811%],2) -$C6815=round([6815%],2) -$C6816=round([6816%],2) -$C6817=round([6817%],2) -$C686=round([686%],2) -$C687=round([687%],2) -$C691=round([691%],2) -$C695=round([695%],2) -$C697=round([697%],2) -$C701=round([701%],2) -$C706=round([706%],2) -$C707=round([707%],2) -$C708=round([708%],2) -$C709=round([709%],2) -$C713=round([713%],2) -$C72=round([72%],2) -$C74=round([74%],2) -$C75=round([75%],2) -$C76=round([76%],2) -$C77=round([77%],2) -$C781=round([781%],2) -$C786=round([786%],2) -$C787=round([787%],2) -$C79=round([79%],2) - - -# --- CHARGES --- -## Charges d'exploitation -### Achats marchandises -$S10001=$C607 -### Variation stocks marchandises -$S10002=$C6037 -### Achats approvisionnements sauf 607 -$S10003=$C60 -### Variation stocks approvisionnements -$S10004=$C6031+$C6032 -### Autres charges externes -$S10005=$C61+$C62 -### Impts et taxes assimils -$S10006=$C63 -### Rmunrations du personnel -$S10007=$C641+$C644 -### Charges sociales -$S10008=$C645+$C646 -### Dotation amortissements -$S10009=$C6811 -### Dotation provisions -$S10010=$C6815+$C6816+$C6817 -### Autres charges -$S10011=$C65 -## Charges financires -$S10012=$C66+$C686 -## Charges exceptionnelles -$S10021=$C67+$C687+$C691 -## Impts sur les bnfices -$S10031=$C695+$C697 - -# --- PRODUITS --- -## Produits d'exploitation -### Vente marchandises -$S11001=$C707-$C709 -### Production vendue -$S11002=$C701+$C706+$C708 -### Production stocke -$S11003=$C713 -### Production immobilise -$S11004=$C72 -### Subventions -$S11005=$C74 -###Autres produits -$S11006=$C75+$C781 -## Produits financiers -$S11007=$C76+$C786 -## Produits exceptionnels -$S11021=$C77+$C787+$C79 - -# --- CHARGES --- -## Total I -$S10111=$S10001+$S10002+$S10003+$S10004+$S10005+$S10006+$S10007+$S10008+$S10009+$S10010+$S10011+$S10012 -## Total I N-1 -$S10112=0 -## Total II -$S10121=$S10021 -## Total III -$S10131=$S10031 -## Total I+II+III -$S10141=$S10111+$S10121+$S10131 - -# --- PRODUITS --- -## Total I -$S11111=$S11001+$S11002+$S11003+$S11004+$S11005+$S11006+$S11007 -## Total I N-1 -$S11112=0 -## Total II -$S11121=$S11021 -## Total I+II -$S11131=$S11111+$S11121 - -# --- CHARGES --- -### Bnfice -$F1001=$S11131-$S10141 -$S10151=($F1001>=0)?$F1001:0 -### Bnfice N-1 -$S10152=0 - -# --- PRODUITS --- -### Perte -$F1002=$S10141-$S11131 -$S11141=($F1002>=0)?$F1002:0 -### Perte N-1 -$S11142=0 - -# --- CHARGES --- -## Total -$S10991=$S10141+$S10151 -## Total N-1 -$S10992=0 - -# --- PRODUITS --- -## Total -$S11991=$S11131+$S11141 -## Total N-1 -$S11992=0 diff --git a/sources/html/document/fr_fr/fr_plan_abrege_perso_cr1000.rtf b/sources/html/document/fr_fr/fr_plan_abrege_perso_cr1000.rtf deleted file mode 100644 index 09fc139..0000000 --- a/sources/html/document/fr_fr/fr_plan_abrege_perso_cr1000.rtf +++ /dev/null @@ -1,260 +0,0 @@ -{\rtf1\ansi\deff1\adeflang1025 -{\fonttbl{\f0\froman\fprq2\fcharset0 DejaVu Sans;}{\f1\fswiss\fprq0\fcharset0 Avant Garde Gothic;}{\f2\fswiss\fprq2\fcharset0 FreeSans;}{\f3\fnil\fprq0\fcharset0 Helvetica;}{\f4\fswiss\fprq0\fcharset0 Avant Garde Gothic;}{\f5\froman\fprq2\fcharset0 Times New Roman;}{\f6\fnil\fprq2\fcharset0 DejaVu Sans;}{\f7\fnil\fprq2\fcharset128 \'93\'8c\'95\'97\'96\'be\'92\'a9;}{\f8\fswiss\fprq2\fcharset0 Arial;}{\f9\fswiss\fprq2\fcharset0 Tahoma{\*\falt Lucidasans};}{\f10\fswiss\fprq0\fcharset0 Tahoma{\*\falt Lucidasans};}} -{\colortbl;\red0\green0\blue0;\red128\green128\blue128;} -{\stylesheet{\s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af9\afs24\lang255\ltrch\dbch\af7\langfe1041\hich\f1\fs24\lang1036\loch\f1\fs24\lang1036\snext1 Normal;} -{\s2\sb240\sa120\keepn\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af6\afs28\lang255\ltrch\dbch\af6\langfe1041\hich\f3\fs28\lang1036\loch\f3\fs28\lang1036\sbasedon1\snext3 Heading;} -{\s3\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1041\hich\f1\fs24\lang1036\loch\f1\fs24\lang1036\sbasedon1\snext3 Body Text;} -{\s4\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af10\afs24\lang255\ltrch\dbch\langfe1041\hich\fs24\lang1036\loch\fs24\lang1036\sbasedon3\snext4 List;} -{\s5\sb120\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af10\afs20\lang255\ai\ltrch\dbch\af1\langfe1041\hich\fs20\lang1036\i\loch\fs20\lang1036\i\sbasedon1\snext5 caption;} -{\s6\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af10\afs24\lang255\ltrch\dbch\af1\langfe1041\hich\fs24\lang1036\loch\fs24\lang1036\sbasedon1\snext6 Index;} -{\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1036\hich\f5\fs24\lang1036\loch\f5\fs24\lang1036\sbasedon1\snext7 Normal;} -{\s8\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\afs24\lang255\ltrch\dbch\langfe1041\hich\f1\fs24\lang1036\loch\f1\fs24\lang1036\sbasedon3\snext8 Table Contents;} -{\s9\cf0\qc{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\afs24\lang255\ai\ab\ltrch\dbch\langfe1041\hich\f1\fs24\lang1036\i\b\loch\f1\fs24\lang1036\i\b\sbasedon8\snext9 Table Heading;} -} -{\info{\creatim\yr2007\mo10\dy27\hr2\min49}{\revtim\yr1601\mo1\dy1\hr0\min0}{\printim\yr1601\mo1\dy1\hr0\min0}{\comment StarWriter}{\vern6800}}\deftab709 -{\*\pgdsctbl -{\pgdsc0\pgdscuse195\lndscpsxn\pgwsxn16837\pghsxn11905\marglsxn567\margrsxn567\margtsxn567\margbsxn567\pgdscnxt0 Standard;}} -{\*\pgdscno0}\landscape\paperh11905\paperw16837\margl567\margr567\margt567\margb567\sectd\sbknone\lndscpsxn\pgwsxn16837\pghsxn11905\marglsxn567\margrsxn567\margtsxn567\margbsxn567\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc -\pard\plain \ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Soci\'e9t\'e9 : <
    >} -\par \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch } -\par \pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Compte de r\'e9sultat (Syst\'e8me abr\'e9g\'e9 personnalis\'e9)} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 P\'e9riode du :__/__/____ au : __/__/____} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 version 2007/09/10 21:25 (en compte) } -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1036\hich\f5\fs24\lang1036\loch\f5\fs24\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1036\hich\f5\fs24\lang1036\loch\f5\fs24\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b CHARGES (hors taxes)} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Exercice N} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Exercice N-1} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b PRODUITS (hors taxes)} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Exercice N} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Exercice N-1} -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Charges d'exploitation :} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Produits d'exploitation :} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh204\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Achat de marchandises} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af1\afs16\lang255\ltrch\dbch\af1\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10001>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af1\afs16\lang255\ltrch\dbch\af1\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Vente de marchandises} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S11001>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Variation de stocks (marchandises)} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10002>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 {\*\bkmkstart DDE_LINK}Production vendue (B et S){\*\bkmkend DDE_LINK}} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S11002>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Achats d'approvisionnements} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10003>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Production stock\'e9e} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S11003>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Variation de stocks (approvisionnements)} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10004>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Production immobilis\'e9e} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S11004>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Autres charges externes} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10005>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Subvention d'exploitation} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S11005>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Imp\'f4ts, taxes et versements assimil\'e9s} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10006>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Autres produits} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S11006>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 R\'e9mun\'e9rations du personnel} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10007>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Charges sociales} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10008>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Dotation aux amortissements} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10009>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Dotation aux provisions} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10010>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Autres charges } -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10011>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Charges financi\'e8res} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\loch\f2\fs16\lang2057 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10012>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\loch\f2\fs16\lang2057 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\loch\f2\fs16\lang2057 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\b\loch\f2\fs16\lang2057\b {\rtlch \ltrch\loch\f2\fs16\lang2057\i0\b Produits financiers} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S11007>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\loch\f2\fs16\lang2057 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\b\loch\f2\fs16\lang2057\b {\rtlch \ltrch\loch\f2\fs16\lang2057\i0\b Total (I)} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1036\hich\f5\fs24\lang1036\loch\f5\fs24\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\loch\f2\fs16\lang2057 {\rtlch \ltrch\loch\f2\fs16\lang2057\i0\b0 <<$S10111>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\loch\f2\fs16\lang2057 {\rtlch \ltrch\loch\f2\fs16\lang2057\i0\b0 <<$S10112>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\loch\f2\fs16\lang2057 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\b\loch\f2\fs16\lang2057\b {\rtlch \ltrch\loch\f2\fs16\lang2057\i0\b Total (I)} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\b\loch\f2\fs16\lang2057\b -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S11111>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S11112>>} -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Charges exceptionnelles (II)} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10121>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Produits exceptionnels (II)} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S11121>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Imp\'f4ts sur les b\'e9n\'e9fices (III)} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10131>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Total des charges (I+II+III)} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10141>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\b\loch\f2\fs16\lang1036\b {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b Total des produits (I+II)} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S11131>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Solde cr\'e9diteur : B\'e9n\'e9fice} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10151>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S10152>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch }{\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 Solde d\'e9biteur : Perte} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 (<<$S11141>>)} -\cell\pard\plain \intbl\ltrpar\s7\cf0\qc{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 (<<$S11142>>)} -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1036\hich\f5\fs24\lang1036\loch\f5\fs24\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1036\hich\f5\fs24\lang1036\loch\f5\fs24\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\loch\f2\fs16\lang2057 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\loch\f2\fs16\lang2057 -\cell\row\pard \trowd\trql\trleft-12\trrh264\trpaddft3\trpaddt12\trpaddfl3\trpaddl12\trpaddfb3\trpaddb0\trpaddfr3\trpaddr12\clvertalb\cellx4127\clvertalb\cellx5478\clvertalb\cellx6785\clvertalb\cellx7918\clvertalb\cellx8550\clvertalb\cellx11601\clvertalb\cellx13060\clvertalb\cellx14368\clvertalb\cellx15703 -\pard\intbl\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af8\afs16\lang255\ab\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang2057\b\loch\f2\fs16\lang2057\b {\rtlch \ltrch\loch\f2\fs16\lang2057\i0\b TOTAL GENERAL} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1036\hich\f2\fs16\lang2057\loch\f2\fs16\lang2057 {\rtlch \ltrch\loch\f2\fs16\lang2057\i0\b0 <<$S10991>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1036\hich\f2\fs16\lang2057\loch\f2\fs16\lang2057 {\rtlch \ltrch\loch\f2\fs16\lang2057\i0\b0 <<$S10992>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1036\hich\f5\fs24\lang1036\loch\f5\fs24\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1036\hich\f2\fs16\lang2057\b\loch\f2\fs16\lang2057\b {\rtlch \ltrch\loch\f2\fs16\lang2057\i0\b TOTAL GENERAL} -\cell\pard\plain \intbl\ltrpar\s7\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af1\afs24\lang255\ltrch\dbch\af1\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S11991>>} -\cell\pard\plain \intbl\ltrpar\s7\cf0\qr{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af8\afs16\lang255\ltrch\dbch\af8\langfe1036\hich\f2\fs16\lang1036\loch\f2\fs16\lang1036 {\rtlch \ltrch\loch\f2\fs16\lang1036\i0\b0 <<$S11992>>} -\cell\row\pard \pard\plain \ltrpar\s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\ql\rtlch\af9\afs24\lang255\ltrch\dbch\af7\langfe1041\hich\f1\fs24\lang1036\loch\f1\fs24\lang1036 -\par } \ No newline at end of file diff --git a/sources/html/export.php b/sources/html/export.php deleted file mode 100644 index 14038c3..0000000 --- a/sources/html/export.php +++ /dev/null @@ -1,56 +0,0 @@ -Check(); -$action=$g_user->check_dossier($gDossier); -set_language(); -if ( $action=='X' || ! isset($_GET['act']) || $g_user->check_print($_GET['act'])==0 ) - { - echo alert(_('Accès interdit')); - redirect("do.php?".dossier::get()); - exit(); - } -// get file and execute it -$action=HtmlInput::default_value_get('act', null); -if ($action == null ) -{ - die(_('Appel invalide')); -} - $prfile=$cn->get_value("select me_file from menu_ref where me_code=$1",array($action)); - if ( $prfile == "") { - die (_('Export impossible')); - } - require_once $prfile; - ?> \ No newline at end of file diff --git a/sources/html/extension.raw.php b/sources/html/extension.raw.php deleted file mode 100644 index 7000f14..0000000 --- a/sources/html/extension.raw.php +++ /dev/null @@ -1,60 +0,0 @@ -check(); -$only_plugin=$g_user->check_dossier(dossier::id()); -set_language(); -$ext=new Extension($cn); - -if ( $ext->search($_REQUEST['plugin_code']) != -1 ) - { - /* security */ - if ( !isset ($_SESSION['g_user']) || $ext->can_request($_SESSION['g_user']) == 0 ) - { - exit(); - } - /* call the ajax script */ - require_once(NOALYSS_PLUGIN.DIRECTORY_SEPARATOR.dirname(trim($ext->getp('me_file'))).DIRECTORY_SEPARATOR.'raw.php'); - } -else - { - alert(j(_("Cette extension n'existe pas "))); - exit(); - } -?> diff --git a/sources/html/favicon.ico b/sources/html/favicon.ico deleted file mode 100644 index 3050532..0000000 Binary files a/sources/html/favicon.ico and /dev/null differ diff --git a/sources/html/fid.php b/sources/html/fid.php deleted file mode 100644 index 7284bb2..0000000 --- a/sources/html/fid.php +++ /dev/null @@ -1,155 +0,0 @@ -check(); -$g_user->check_dossier(dossier::id()); -set_language(); -$fLabel=(isset($_REQUEST['l']))?$_REQUEST['l']:'none'; -$fTva_id=(isset($_REQUEST['t']))?$_REQUEST['t']:'none'; -$fPrice_sale=(isset($_REQUEST['p']))?$_REQUEST['p']:'none'; -$fPrice_purchase=(isset($_REQUEST['b']))?$_REQUEST['b']:'none'; - - - -if ( isset($_SESSION['isValid']) && $_SESSION['isValid'] == 1) -{ - $jrn=sql_string($_GET['j']); - $d=sql_string($_GET['d']); - - if ( $jrn == -1 ) - $d='all'; - if ( strpos($d,'sql') == false ) - { - - switch ($d) - { - case 'cred': - $filter_jrn=$cn->make_list("select jrn_def_fiche_cred from jrn_def where jrn_def_id=$1",array($jrn)); - $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; - - break; - case 'deb': - $filter_jrn=$cn->make_list("select jrn_def_fiche_deb from jrn_def where jrn_def_id=$1",array($jrn)); - $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; - break; - case 'all': - $filter_card=""; - break; - case 'filter': - $get_cred='jrn_def_fiche_cred'; - $get_deb='jrn_def_fiche_deb'; - $deb=$cn->get_value("select $get_deb from jrn_def where jrn_def_id=$1",array($jrn)); - $cred=$cn->get_value("select $get_cred from jrn_def where jrn_def_id=$1",array($jrn)); - - $filter_jrn=""; - - if ($deb!=='' && $cred!='') - $filter_jrn =$deb.','.$cred; - elseif($deb != '') - $filter_jrn=$deb; - elseif($cred != '') - $filter_jrn=$cred; - - $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; - break; - case 'all': - $filter_card=''; - break; - - default: - $filter_card="and fd_id in ($d)"; - } - } - else - { - $filter_card=$d; - $filter_card=str_replace('[sql]','',$d); - } - $sql="select vw_name,vw_addr,vw_cp,vw_buy,vw_sell,tva_id - from vw_fiche_attr - where quick_code=upper($1)". $filter_card; - - $array=$cn->get_array($sql, array($_REQUEST['FID'])); - - if ( empty($array)) - { - echo '{"answer":"nok","flabel":"'.$fLabel.'"}'; - exit; - } - - - $name=$array[0]['vw_name']; - $sell=$array[0]['vw_sell'] ; - $buy=$array[0]['vw_buy']; - $tva_id=$array[0]['tva_id']; - - // Check null - $name=($name==null)?" ":str_replace('"','',$name); - $sell=($sell==null)?" ":str_replace('"','',$sell); - $buy=($buy==null)?" ":str_replace('"','',$buy); - $tva_id=($tva_id==null)?" ":str_replace('"','',$tva_id); - /* store the answer in an array and transform it later into a JSON object */ - $tmp=array(); - $tmp[]=array('flabel',$fLabel); - $tmp[]=array('name',$name); - $tmp[]=array('ftva_id',$fTva_id); - $tmp[]=array('tva_id',$tva_id); - $tmp[]=array('fPrice_sale',$fPrice_sale); - $tmp[]=array('sell',$sell); - $tmp[]=array('fPrice_purchase',$fPrice_purchase); - $tmp[]=array('buy',$buy); - $a='{"answer":"ok"'; - for ($o=0;$o < count($tmp);$o++) - { - $a.=sprintf(',"%s":"%s"',$tmp[$o][0],$tmp[$o][1]); - } - $a.='}'; -} -else - $a='{"answer":"unauthorized"}'; -header("Content-type: text/html; charset: utf8",true); -print $a; -?> diff --git a/sources/html/fid_card.php b/sources/html/fid_card.php deleted file mode 100644 index 8af3a64..0000000 --- a/sources/html/fid_card.php +++ /dev/null @@ -1,172 +0,0 @@ -check(); -$g_user->check_dossier(dossier::id()); -set_language(); - -if ( $d == 'all') -{ - $filter_card=''; -} -else if (strpos($d,'sql]')==true) -{ - $filter_card= str_replace('[sql]', " and ", $d); -} else - $filter_card="and fd_id in ($d)"; - -if ( $jrn != -1 ) -{ - switch ($d) - { - case 'cred': - $filter_jrn=$cn->make_list("select jrn_def_fiche_cred from jrn_def where jrn_def_id=$1",array($jrn)); - $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; - break; - case 'deb': - $filter_jrn=$cn->make_list("select jrn_def_fiche_deb from jrn_def where jrn_def_id=$1",array($jrn)); - $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; - break; - case 'filter': - $get_cred='jrn_def_fiche_cred'; - $get_deb='jrn_def_fiche_deb'; - $deb=$cn->get_value("select $get_deb from jrn_def where jrn_def_id=$1",array($jrn)); - $cred=$cn->get_value("select $get_cred from jrn_def where jrn_def_id=$1",array($jrn)); - - $filter_jrn=""; - - if ($deb!=='' && $cred!='') - $filter_jrn =$deb.','.$cred; - elseif($deb != '') - $filter_jrn=$deb; - elseif($cred != '') - $filter_jrn=$cred; - - $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; - - break; - - } -} -else -{ - if (isset($_REQUEST['type'])) - { - if ($_REQUEST['type']=='gl' || $_REQUEST['type']=='') $filter_card=''; - else - { - $get_cred='jrn_def_fiche_cred'; - $get_deb='jrn_def_fiche_deb'; - - $filter_jrn=$cn->make_list("select $get_cred||','||$get_deb as fiche from jrn_def where jrn_def_type=$1",array($_REQUEST['type'])); - $filter_card=($filter_jrn != "")?" and fd_id in ($filter_jrn)":' and false '; - - } - } -} - - -/* create a filter based on j */ -/*$sql_str="select f_id, vw_name,quick_code,vw_description ". - " from vw_fiche_attr where ". - " ( vw_name ilike '%'||$1||'%' or quick_code ilike $2||'%' or vw_description ilike '%'||$3||'%') ". - $filter_card; -*/ - -$sql_str="select distinct f_id from fiche join fiche_detail using (f_id) where ad_id in (9,1,23) and ad_value ilike '%'||$1||'%' ".$filter_card.' limit 12'; - -$sql=$cn->get_array($sql_str ,array($_REQUEST['FID'])); - -if (sizeof($sql) != 0 ) -{ - echo "
      "; - $sql_get=$cn->prepare('get_name',"select ad_value from fiche_detail where f_id = $1 and ad_id=$2"); - - for ($i =0;$i<12 && $i < count($sql) ;$i++) - { - $name=''; - $quick_code=''; - $desc=''; - - $sql_name=$cn->execute('get_name',array($sql[$i]['f_id'],1)); - if ( Database::num_row($sql_name) == 1) $name=Database::fetch_result($sql_name,0,0); - - $sql_name=$cn->execute('get_name',array($sql[$i]['f_id'],9)); - if ( Database::num_row($sql_name) == 1) $desc=Database::fetch_result($sql_name,0,0); - - $sql_name=$cn->execute('get_name',array($sql[$i]['f_id'],23)); - if (Database::num_row($sql_name) == 1) $quick_code=Database::fetch_result($sql_name,0,0); - - - /* Highlight the found pattern with bold format */ - $name=str_ireplace($_REQUEST['FID'],''.$_REQUEST['FID'].'',h($name)); - $qcode=str_ireplace($_REQUEST['FID'],''.$_REQUEST['FID'].'',h($quick_code)); - $desc=str_ireplace($_REQUEST['FID'],''.$_REQUEST['FID'].'',h($desc)); - printf('
    • %s %s %s
    • ', - $quick_code, - $quick_code, - $name, - $desc - ); - } - echo '
    '; - if (count($sql) > 12) - { - printf ('...'._('Résultat limité à 12').' ...'); - } -} -else -{ - echo "
    • "._("Non trouvé")."
    "; -} -?> diff --git a/sources/html/image/OpenSansRegular.eot b/sources/html/image/OpenSansRegular.eot deleted file mode 100644 index 055d92f..0000000 Binary files a/sources/html/image/OpenSansRegular.eot and /dev/null differ diff --git a/sources/html/image/OpenSansRegular.ttf b/sources/html/image/OpenSansRegular.ttf deleted file mode 100644 index face4ab..0000000 Binary files a/sources/html/image/OpenSansRegular.ttf and /dev/null differ diff --git a/sources/html/image/OpenSansRegular.woff b/sources/html/image/OpenSansRegular.woff deleted file mode 100644 index 26fdb31..0000000 Binary files a/sources/html/image/OpenSansRegular.woff and /dev/null differ diff --git a/sources/html/image/bg-submit2.gif b/sources/html/image/bg-submit2.gif deleted file mode 100644 index 74666bc..0000000 Binary files a/sources/html/image/bg-submit2.gif and /dev/null differ diff --git a/sources/html/image/bg-submit3.gif b/sources/html/image/bg-submit3.gif deleted file mode 100644 index 3020e7d..0000000 Binary files a/sources/html/image/bg-submit3.gif and /dev/null differ diff --git a/sources/html/image/bg-submit4.gif b/sources/html/image/bg-submit4.gif deleted file mode 100644 index 9774a3f..0000000 Binary files a/sources/html/image/bg-submit4.gif and /dev/null differ diff --git a/sources/html/image/bg-submit4.png b/sources/html/image/bg-submit4.png deleted file mode 100644 index 34f6c5a..0000000 Binary files a/sources/html/image/bg-submit4.png and /dev/null differ diff --git a/sources/html/image/bg-submit5.png b/sources/html/image/bg-submit5.png deleted file mode 100644 index fc0bb8c..0000000 Binary files a/sources/html/image/bg-submit5.png and /dev/null differ diff --git a/sources/html/image/bgcolor.gif b/sources/html/image/bgcolor.gif deleted file mode 100644 index 55fcf1b..0000000 Binary files a/sources/html/image/bgcolor.gif and /dev/null differ diff --git a/sources/html/image/blackdot.gif b/sources/html/image/blackdot.gif deleted file mode 100644 index f79319f..0000000 Binary files a/sources/html/image/blackdot.gif and /dev/null differ diff --git a/sources/html/image/bold.gif b/sources/html/image/bold.gif deleted file mode 100644 index bdb3259..0000000 Binary files a/sources/html/image/bold.gif and /dev/null differ diff --git a/sources/html/image/centre.gif b/sources/html/image/centre.gif deleted file mode 100644 index f98c86a..0000000 Binary files a/sources/html/image/centre.gif and /dev/null differ diff --git a/sources/html/image/chrome_logo_2x.png b/sources/html/image/chrome_logo_2x.png deleted file mode 100644 index 4d251a3..0000000 Binary files a/sources/html/image/chrome_logo_2x.png and /dev/null differ diff --git a/sources/html/image/copy.gif b/sources/html/image/copy.gif deleted file mode 100644 index faebb18..0000000 Binary files a/sources/html/image/copy.gif and /dev/null differ diff --git a/sources/html/image/cut.gif b/sources/html/image/cut.gif deleted file mode 100644 index ca60a1a..0000000 Binary files a/sources/html/image/cut.gif and /dev/null differ diff --git a/sources/html/image/documents.png b/sources/html/image/documents.png deleted file mode 100644 index 61d9f0f..0000000 Binary files a/sources/html/image/documents.png and /dev/null differ diff --git a/sources/html/image/down.gif b/sources/html/image/down.gif deleted file mode 100644 index c6259b9..0000000 Binary files a/sources/html/image/down.gif and /dev/null differ diff --git a/sources/html/image/email.gif b/sources/html/image/email.gif deleted file mode 100644 index 7e376ea..0000000 Binary files a/sources/html/image/email.gif and /dev/null differ diff --git a/sources/html/image/empty.gif b/sources/html/image/empty.gif deleted file mode 100644 index b3dadb0..0000000 Binary files a/sources/html/image/empty.gif and /dev/null differ diff --git a/sources/html/image/go-next.png b/sources/html/image/go-next.png deleted file mode 100644 index 85549a9..0000000 Binary files a/sources/html/image/go-next.png and /dev/null differ diff --git a/sources/html/image/go-previous.png b/sources/html/image/go-previous.png deleted file mode 100644 index f45084f..0000000 Binary files a/sources/html/image/go-previous.png and /dev/null differ diff --git a/sources/html/image/header-firefox.png b/sources/html/image/header-firefox.png deleted file mode 100644 index ecaf9f7..0000000 Binary files a/sources/html/image/header-firefox.png and /dev/null differ diff --git a/sources/html/image/home.png b/sources/html/image/home.png deleted file mode 100644 index 66f4c3d..0000000 Binary files a/sources/html/image/home.png and /dev/null differ diff --git a/sources/html/image/hr.gif b/sources/html/image/hr.gif deleted file mode 100644 index c98da9d..0000000 Binary files a/sources/html/image/hr.gif and /dev/null differ diff --git a/sources/html/image/hyperlink.gif b/sources/html/image/hyperlink.gif deleted file mode 100644 index 1fb1a4a..0000000 Binary files a/sources/html/image/hyperlink.gif and /dev/null differ diff --git a/sources/html/image/image.gif b/sources/html/image/image.gif deleted file mode 100644 index 8cbba16..0000000 Binary files a/sources/html/image/image.gif and /dev/null differ diff --git a/sources/html/image/indent.gif b/sources/html/image/indent.gif deleted file mode 100644 index 2abb6b2..0000000 Binary files a/sources/html/image/indent.gif and /dev/null differ diff --git a/sources/html/image/insert_table.gif b/sources/html/image/insert_table.gif deleted file mode 100644 index 607ff38..0000000 Binary files a/sources/html/image/insert_table.gif and /dev/null differ diff --git a/sources/html/image/italic.gif b/sources/html/image/italic.gif deleted file mode 100644 index 8b1485b..0000000 Binary files a/sources/html/image/italic.gif and /dev/null differ diff --git a/sources/html/image/justifyfull.gif b/sources/html/image/justifyfull.gif deleted file mode 100644 index b12528b..0000000 Binary files a/sources/html/image/justifyfull.gif and /dev/null differ diff --git a/sources/html/image/left_just.gif b/sources/html/image/left_just.gif deleted file mode 100644 index 505c5d9..0000000 Binary files a/sources/html/image/left_just.gif and /dev/null differ diff --git a/sources/html/image/list.gif b/sources/html/image/list.gif deleted file mode 100644 index b3018d9..0000000 Binary files a/sources/html/image/list.gif and /dev/null differ diff --git a/sources/html/image/load.gif b/sources/html/image/load.gif deleted file mode 100644 index 16278c0..0000000 Binary files a/sources/html/image/load.gif and /dev/null differ diff --git a/sources/html/image/loading.gif b/sources/html/image/loading.gif deleted file mode 100644 index 7962c54..0000000 Binary files a/sources/html/image/loading.gif and /dev/null differ diff --git a/sources/html/image/logo6720.png b/sources/html/image/logo6720.png deleted file mode 100644 index ca014e1..0000000 Binary files a/sources/html/image/logo6720.png and /dev/null differ diff --git a/sources/html/image/logo6820.png b/sources/html/image/logo6820.png deleted file mode 100644 index 5850233..0000000 Binary files a/sources/html/image/logo6820.png and /dev/null differ diff --git a/sources/html/image/logo7.png b/sources/html/image/logo7.png deleted file mode 100644 index ca014e1..0000000 Binary files a/sources/html/image/logo7.png and /dev/null differ diff --git a/sources/html/image/logout.png b/sources/html/image/logout.png deleted file mode 100644 index 598cf76..0000000 Binary files a/sources/html/image/logout.png and /dev/null differ diff --git a/sources/html/image/magnifier13.png b/sources/html/image/magnifier13.png deleted file mode 100644 index 9ea232d..0000000 Binary files a/sources/html/image/magnifier13.png and /dev/null differ diff --git a/sources/html/image/numbered_list.gif b/sources/html/image/numbered_list.gif deleted file mode 100644 index d1a4dbc..0000000 Binary files a/sources/html/image/numbered_list.gif and /dev/null differ diff --git a/sources/html/image/orange_flower.gif b/sources/html/image/orange_flower.gif deleted file mode 100644 index 55c2c06..0000000 Binary files a/sources/html/image/orange_flower.gif and /dev/null differ diff --git a/sources/html/image/outdent.gif b/sources/html/image/outdent.gif deleted file mode 100644 index fa3c1b6..0000000 Binary files a/sources/html/image/outdent.gif and /dev/null differ diff --git a/sources/html/image/param.png b/sources/html/image/param.png deleted file mode 100644 index 6a2f729..0000000 Binary files a/sources/html/image/param.png and /dev/null differ diff --git a/sources/html/image/paste.gif b/sources/html/image/paste.gif deleted file mode 100644 index 9bcc76a..0000000 Binary files a/sources/html/image/paste.gif and /dev/null differ diff --git a/sources/html/image/preference.png b/sources/html/image/preference.png deleted file mode 100644 index 930d4c5..0000000 Binary files a/sources/html/image/preference.png and /dev/null differ diff --git a/sources/html/image/print.png b/sources/html/image/print.png deleted file mode 100644 index 12d2277..0000000 Binary files a/sources/html/image/print.png and /dev/null differ diff --git a/sources/html/image/redo.gif b/sources/html/image/redo.gif deleted file mode 100644 index b51d6b8..0000000 Binary files a/sources/html/image/redo.gif and /dev/null differ diff --git a/sources/html/image/right_just.gif b/sources/html/image/right_just.gif deleted file mode 100644 index a3204d9..0000000 Binary files a/sources/html/image/right_just.gif and /dev/null differ diff --git a/sources/html/image/search.png b/sources/html/image/search.png deleted file mode 100644 index a0f8161..0000000 Binary files a/sources/html/image/search.png and /dev/null differ diff --git a/sources/html/image/select1.gif b/sources/html/image/select1.gif deleted file mode 100644 index 6d7b844..0000000 Binary files a/sources/html/image/select1.gif and /dev/null differ diff --git a/sources/html/image/select2.gif b/sources/html/image/select2.gif deleted file mode 100644 index 104e718..0000000 Binary files a/sources/html/image/select2.gif and /dev/null differ diff --git a/sources/html/image/smiley.gif b/sources/html/image/smiley.gif deleted file mode 100644 index 72dcb4c..0000000 Binary files a/sources/html/image/smiley.gif and /dev/null differ diff --git a/sources/html/image/spellcheck.gif b/sources/html/image/spellcheck.gif deleted file mode 100644 index e6c8d82..0000000 Binary files a/sources/html/image/spellcheck.gif and /dev/null differ diff --git a/sources/html/image/spirale2.gif b/sources/html/image/spirale2.gif deleted file mode 100644 index 01bb6d6..0000000 Binary files a/sources/html/image/spirale2.gif and /dev/null differ diff --git a/sources/html/image/textcolor.gif b/sources/html/image/textcolor.gif deleted file mode 100644 index 413e041..0000000 Binary files a/sources/html/image/textcolor.gif and /dev/null differ diff --git a/sources/html/image/undefined.png b/sources/html/image/undefined.png deleted file mode 100644 index eea4fc7..0000000 Binary files a/sources/html/image/undefined.png and /dev/null differ diff --git a/sources/html/image/underline.gif b/sources/html/image/underline.gif deleted file mode 100644 index db8fb4f..0000000 Binary files a/sources/html/image/underline.gif and /dev/null differ diff --git a/sources/html/image/undo.gif b/sources/html/image/undo.gif deleted file mode 100644 index 555d0db..0000000 Binary files a/sources/html/image/undo.gif and /dev/null differ diff --git a/sources/html/image/up.gif b/sources/html/image/up.gif deleted file mode 100644 index 3c39716..0000000 Binary files a/sources/html/image/up.gif and /dev/null differ diff --git a/sources/html/image/x-office-calendar.png b/sources/html/image/x-office-calendar.png deleted file mode 100644 index ca55f90..0000000 Binary files a/sources/html/image/x-office-calendar.png and /dev/null differ diff --git a/sources/html/index.html b/sources/html/index.html deleted file mode 100644 index 8537cfb..0000000 --- a/sources/html/index.html +++ /dev/null @@ -1 +0,0 @@ - Connecting... diff --git a/sources/html/index.php b/sources/html/index.php deleted file mode 100644 index d651291..0000000 --- a/sources/html/index.php +++ /dev/null @@ -1,332 +0,0 @@ - - * Quelques conventions de codage pour avoir un code plus ou moins - * homogène - *
      - *
    1. Tant que possible réutiliser ce qui existe déjà,
    2. - *
    3. Améliorer ce qui existe déjà et vérifier que cela fonctionne toujours
    4. - *
    5. Documenter avec les tags doxygen votre nouveau code,
    6. - *
    7. Dans le répertoire include: Les noms de fichiers sont *.inc.php pour les fichiers à éxécuter
    8. - *
    9. Dans le répertoire include: Les noms de fichiers sont *.php pour les fichiers contenant des fonctions uniquement
    10. - *
    11. Dans le répertoire include: Les noms de fichier sont - * class_*.php pour les fichiers contenant des classes.
    12. - *
    13. Dans le répertoire include: Les noms de fichier ajax* correspondent aux fichiers appelé par une fonction javascript en ajax, - * normalement le nom de fichier est basé sur le nom de la fonction javascript - * exemple pour la fonction javascript anc_key_choice le fichier correspondant est - * ajax_anc_key_choice.php - *
    14. Dans le répertoire include/template: les fichiers de - * présentation HTML
    15. - *
    16. Utiliser sql/upgrade.sql comme fichier temporaire pour modifier la base de données, en général - * ce fichier deviendra l'un des patch
    17. - *
    18. Faire de la doc
    19. - *
    - * - *

    - * \section conseil Conseils - *

    - * Utiliser cette documentation, elle est générée automatiquement avec Doxygen, - *

      - *
    • Related contient tous les \\todo
    • - *
    • Global -> function pour lire toute la doc sur les fonctions
    • - *
    • Regarder dans dossier1.html et account_repository.html pour la doc des base de données - *
    - * et il ne faut connaître que ces tags - *
      - *
    • \\file en début de fichier
    • - *
    • \\todo ajouter un todo
    • - *
    • \\enum pour commenter une variable
    • - *
    • \\param pour commenter le paramètre d'une fonction
    • - *
    • \\brief Commentaire du fichier, de la fonction ou de la classe
    • - *
    • \\note des notes, des exemples
    • - *
    • \\throw or exception is a function can throw an exception - *
    • \\par to create a new paragraph - *
    • \\return ce que la fonction retourne
    • - *
    • \\code et \\endcode si on veut donner un morceau de code comme documentation
    • - *
    • \\verbatim et \\endverbatim si on veut donner une description d'un tableau, comme documentation
    • - *
    • \\see xxxx Ajoute un lien vers un fichier, une fonction ou une classe
    • - *
    - *---------------------------------------------------------------------- - *\page English - * \section intro_sec Introduction - * - * This parts contains documentation for developpers - * - * \section convention_code Coding convention - *

    - * Some coding conventions to have a homogeneous code - *

      - *
    1. Reuse the existing code ,
    2. - *
    3. Improve and test that the function is still working
    4. - *
    5. Make documentation thanks doxygen tag
    6. - *
    7. In the folder include: filenames ending by *.inc.php will be executer after being included
    8. - *
    9. In the folder include: filenames end by *.php if they contains only function
    10. - *
    11. In the folder include: filenames starting with - * class_*.php if it is related to a class.
    12. - *
    13. In the folder include, files starting with ajax are executed by ajax call, usually, the file name is - * based on the javascript function, example for the javascript function anc_key_choice the corresponding file is - * ajax_anc_key_choice.php - * - *
    14. In the folder include/template: files for the HTML presentation - *
    15. - *
    16. Use sql/upgrade.sql as temporary file to modify the database,this file will be the base for a SQL patch - *
    17. - *
    18. Write documentation
    19. - *
    - * - *

    - * \section advice Advices - *

    - * Use this document, it is generated automatically by doxygen, check the documentation your made, read it first this - * documentation before making changes - *

      - *
    • Related contains all the \\todo
    • - *
    • Global -> all the functions
    • - *
    • check into mod1.html and account_repository.html for the database design - *
    - * You need to know only these tags - *
      - *
    • \\file in the beginning of a file
    • - *
    • \\todo add a todo
    • - *
    • \\enum comment a variable
    • - *
    • \\param about the parameter of a function
    • - *
    • \\brief Documentation of the file, function or class
    • - *
    • \\note note exemple
    • - *
    • \\throw or exception is a function can throw an exception - *
    • \\par to create a new paragraph - *
    • \\return what the function returns
    • - *
    • \\code and \\endcode code snippet given as example
    • - *
    • \\verbatim and \\endverbatim if we want to keep the formatting without transformation
    • - *
    • \\see xxxx create a link to the file, function or object xxxx
    • - *
    - */ - -if ( ! file_exists('..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'config.inc.php')) -{ - header("Location: admin/setup.php",true, 307); - exit(0); -} - -echo ' - - NOALYSS - - - - -'; -$my_domain=""; -require_once '../include/constant.php'; -require_once '../include/config.inc.php'; -require_once NOALYSS_INCLUDE.'/ac_common.php'; - -if ( strlen(domaine) > 0 ) -{ - $my_domain="Domaine : ".domaine; -} - -if (defined("RECOVER") && isset ($_REQUEST['recover']) ) -{ - require_once '../include/recover.php'; -} -// reconnect , create a variable to reconnect properly in login.php -$goto=""; -if (isset ($_REQUEST['reconnect']) && isset ($_REQUEST['backurl'])) { - $goto=''; -} -echo ' - -version 6.9 - '.$my_domain.' - -
    -
    -
    - -
    -
    -NOALYSS -
    -
    -
    - -
    '. - $goto . -''; - -?> -
    - - - - - - - - -'; - - - -if ( $g_captcha == true ) - { - echo ''; - echo ''; - } -echo ' - - - -
    Utilisateur
    Mot de passe
    '; - echo ""; - echo ''; - echo ''; - echo ''; - echo ''; - echo td('CAPTCHA Image','colspan="2" style="width:auto;text-align:center"'); - echo ''; - echo ''; - - echo td(''. - 'Reload Image','colspan="2" style="width:auto;text-align:center"'); - echo ''; - echo '
    '; - echo "Indiquer le code que vous lisez dans l'image"; - echo '
    '; - echo '
    - -
    -
    - -
    - - Mot de passe oublié ? - - - - - -
    -

    Nous conseillons d'utiliser Firefox ou chrome.

    -

    We recommend to use Firefox or Chrome.

    - -
    - - - - - diff --git a/sources/html/js/acc_ledger.js b/sources/html/js/acc_ledger.js deleted file mode 100644 index 4ff1814..0000000 --- a/sources/html/js/acc_ledger.js +++ /dev/null @@ -1,1156 +0,0 @@ -/* - * This file is part of NOALYSS. - * - * NOALYSS is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * NOALYSS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NOALYSS; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder danydb@aevalys.eu - -/*!\file - * \brief javascript script for the ledger in accountancy, - * compute the sum, add a row at the table.. - * - */ -var layer = 1; -/** - * @brief update the list of available predefined operation when we change the ledger. - */ -function update_predef(p_type, p_direct, p_ac) -{ - var jrn = g("p_jrn").value; - var dossier = g("gDossier").value; - var querystring = 'gDossier=' + dossier + '&l=' + jrn + '&t=' + p_type + '&d=' + p_direct + "&op=up_predef&ac=" + p_ac; - g("p_jrn_predef").value = jrn; - var action = new Ajax.Request( - "ajax_misc.php", - { - method: 'get', - parameters: querystring, - onFailure: error_get_predef, - onSuccess: function (req) { - try { - $('info_div').innerHTML = "ok"; - var answer = req.responseXML; - var a = answer.getElementsByTagName('code'); - var html = answer.getElementsByTagName('value'); - if (a.length == 0) - { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - var code_html = getNodeText(html[0]); - code_html = unescape_xml(code_html); - // document.getElementsByName(name_ctl)[0].value = code_html; - $('modele_op_div').innerHTML = code_html; - } catch (e) { - $('info_div').innerHTML = e.getMessage; - } - } - } - ); -} - -/** - * @brief update the list of payment method when we change the ledger. - */ -function update_pay_method() -{ - waiting_box(); - var jrn = g("p_jrn").value; - var dossier = g("gDossier").value; - var querystring = 'gDossier=' + dossier + '&l=' + jrn + "&op=up_pay_method"; - var action = new Ajax.Request( - "ajax_misc.php", - { - method: 'get', - parameters: querystring, - onFailure: error_get_predef, - onSuccess: function (req) { - remove_waiting_box(); - var answer = req.responseText; - $('payment').innerHTML = answer; - } - } - ); -} - -/** - *@brief update ctl id =jrn_name with the value of p_jrn - */ -function update_name() -{ - var jrn_id = $('p_jrn').value; - var dossier = g("gDossier").value; - var querystring = 'gDossier=' + dossier + '&l=' + jrn_id + "&op=ledger_description"; - var action = new Ajax.Request( - "ajax_misc.php", - { - method: 'get', - parameters: querystring, - onFailure: error_get_pj, - onSuccess: function (req) { - $('jrn_name_div').innerHTML = req.responseText; - } - } - ); - -} -/** - * @brief update the field predef - */ -function error_get_predef(request, json) -{ - alert_box("Erreur mise à jour champs non possible"); - -} -/** - * @brief update the list of available predefined operation when we change the ledger. - */ -function update_pj() -{ - var jrn = g("p_jrn").value; - var dossier = g("gDossier").value; - var querystring = 'gDossier=' + dossier + '&l=' + jrn + "&op=upd_receipt"; - var action = new Ajax.Request( - "ajax_misc.php", - { - method: 'get', - parameters: querystring, - onFailure: error_get_pj, - onSuccess: success_get_pj - } - ); -} -/** - *@brief ask the name, quick_code of the bank for the ledger - */ -function update_bank() -{ - var jrn = g('p_jrn').value; - var dossier = g('gDossier').value; - var qs = 'gDossier=' + dossier + '&op=bkname&p_jrn=' + jrn; - var action = new Ajax.Request( - "ajax_misc.php", - { - method: 'get', - parameters: qs, - onFailure: error_get_pj, - onSuccess: success_update_bank - } - ); - -} -/** - * @brief Update the number of rows when changing of ledger - */ -function update_row(ctl) -{ - try - { - var jrn = g('p_jrn').value; - var dossier = g('gDossier').value; - var qs = 'gDossier=' + dossier + '&op=minrow&j=' + jrn + '&ctl=' + ctl; - var action = new Ajax.Request( - "ajax_misc.php", - { - method: 'get', - parameters: qs, - onFailure: null, - onSuccess: function (request, json) - { - try { - var answer = request.responseText.evalJSON(true); - var row = parseFloat(answer.row); - var current_row = parseFloat($('nb_item').value); - if (current_row > row) { - // Too many row - var delta = $('nb_item').value - row; - var idx = $('nb_item').value; - for (var i = 0; i < delta; i++) { - $(ctl).deleteRow(-1); - idx--; - } - $('nb_item').value = row; - } - if (current_row < row) { - // We need to add rows - var delta = row - current_row; - for (var i = 0; i < delta; i++) { - if (ctl == 'fin_item') { - ledger_fin_add_row(); - } - if (ctl == 'sold_item') { - ledger_add_row(); - } - if (ctl == 'quick_item') { - quick_writing_add_row(); - } - } - } - } catch (e) { - alert_box(e.getMessage); - } - } - } - ); - } catch (e) { - alert_box(e.getMessage); - } -} -/** - * @brief Put into the span, the name of the bank, the bank account - * and the quick_code - */ -function success_update_bank(req) -{ - try - { - var answer = req.responseXML; - var a = answer.getElementsByTagName('code'); - var html = answer.getElementsByTagName('value'); - if (a.length == 0) - { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - var name_ctl = a[0].firstChild.nodeValue; - var code_html = getNodeText(html[0]); - code_html = unescape_xml(code_html); - $(name_ctl).innerHTML = code_html; - } - catch (e) - { - alert_box("success_update_bank" + e.message); - } -} -/** - * @brief call ajax, ask what is the last date for the current ledger - */ -function get_last_date() -{ - var jrn = g('p_jrn').value; - var dossier = g('gDossier').value; - var qs = 'gDossier=' + dossier + '&op=lastdate&p_jrn=' + jrn; - var action = new Ajax.Request( - "ajax_misc.php", - { - method: 'get', - parameters: qs, - onFailure: error_get_pj, - onSuccess: success_get_last_date - } - ); -} -/** - * @brief callback ajax, set the ctl with the last date from the ledger - */ -function success_get_last_date(req) -{ - try - { - var answer = req.responseXML; - var a = answer.getElementsByTagName('code'); - var html = answer.getElementsByTagName('value'); - if (a.length == 0) - { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - var name_ctl = a[0].firstChild.nodeValue; - var code_html = getNodeText(html[0]); - code_html = unescape_xml(code_html); - document.getElementsByName(name_ctl)[0].value = code_html; - } - catch (e) - { - alert_box(e.message); - } -} -/** - * @brief update the field predef - */ -function success_get_pj(request, json) -{ - - var answer = request.responseText.evalJSON(true); - obj = g("e_pj"); - obj.value = ''; - if (answer.count == 0) - return; - obj.value = answer.pj; - g("e_pj_suggest").value = answer.pj; -} -/** - * @brief update the field predef - */ -function error_get_pj(request, json) -{ - alert_box("Ajax a echoue"); -} - -/** - * @brief add a line in the form for the ledger fin - */ -function ledger_fin_add_row() -{ - var style = 'class="input_text"'; - var mytable = g("fin_item").tBodies[0]; - var line = mytable.rows.length; - var row = mytable.insertRow(line); - var nb = g("nb_item"); - var rowToCopy = mytable.rows[1]; - var nNumberCell = rowToCopy.cells.length; - for (var e = 0; e < nNumberCell; e++) - { - var newCell = row.insertCell(e); - if (e == 0) { - newCell.id = 'tdchdate' + nb.value; - } - var tt = rowToCopy.cells[e].innerHTML; - var new_tt = tt.replace(/e_other0/g, "e_other" + nb.value); - new_tt = new_tt.replace(/e_other0_comment/g, "e_other" + nb.value + '_comment'); - new_tt = new_tt.replace(/e_other_name0/g, "e_other_name" + nb.value); - new_tt = new_tt.replace(/e_other0_amount/g, "e_other" + nb.value + '_amount'); - new_tt = new_tt.replace(/e_concerned0/g, "e_concerned" + nb.value); - new_tt = new_tt.replace(/e_other0_label/g, "e_other" + nb.value + '_label'); - new_tt = new_tt.replace(/dateop0/g, "dateop" + nb.value); - newCell.innerHTML = new_tt; - new_tt.evalScripts(); - } - g("e_other" + nb.value).value = ""; - g("e_other_name" + nb.value).value = ""; - g("e_other" + nb.value + '_amount').value = "0"; - g("e_other" + nb.value + '_comment').value = ""; - g("e_concerned" + nb.value).value = ""; - - var ch = $('chdate').options[$('chdate').selectedIndex].value; - if (ch == 1) { - $('tdchdate' + nb.value).hide(); - } - nb.value++; -} - -/** - * @brief add a line in the form for the purchase ledger - * @param p_dossier folder id - * @param p_table_name - */ -function ledger_add_row() -{ - try { - style = 'class="input_text"'; - var mytable = g("sold_item").tBodies[0]; - var ofirstRow = mytable.rows[1]; - var line = mytable.rows.length; - var nCell = mytable.rows[1].cells.length; - var row = mytable.insertRow(line); - var nb = g("nb_item"); - for (var e = 0; e < nCell; e++) - { - var newCell = row.insertCell(e); - var tt = ofirstRow.cells[e].innerHTML; - var new_tt = tt.replace(/march0/g, "march" + nb.value); - new_tt = new_tt.replace(/quant0/g, "quant" + nb.value); - new_tt = new_tt.replace(/sold\(0\)/g, "sold(" + nb.value + ")"); - new_tt = new_tt.replace(/compute_ledger\(0\)/g, "compute_ledger(" + nb.value + ")"); - new_tt = new_tt.replace(/clean_tva\(0\)/g, "clean_tva(" + nb.value + ")"); - newCell.innerHTML = new_tt; - new_tt.evalScripts(); - } - - $("e_march" + nb.value + "_label").innerHTML = ''; - $("e_march" + nb.value + "_label").value = ''; - $("e_march" + nb.value + "_price").value = '0'; - $("e_march" + nb.value).value = ""; - $("e_quant" + nb.value).value = "1"; - if ($("e_march" + nb.value + "_tva_amount")) - $("e_march" + nb.value + "_tva_amount").value = 0; - - nb.value++; - - new_tt.evalScripts(); - } catch (e) { - alert_box(e.message); - } -} -/** - * @brief compute the sum of a purchase, update the span tvac, htva and tva - * all the needed data are taken from the document (hidden field : gdossier) - * @param the number of the changed ctrl - */ -function compute_ledger(p_ctl_nb) -{ - var dossier = g("gDossier").value; - var a = -1; - if (document.getElementById("e_march" + p_ctl_nb + '_tva_amount')) - { - a = trim(g("e_march" + p_ctl_nb + '_tva_amount').value); - g("e_march" + p_ctl_nb + '_tva_amount').value = a; - } - if (!document.getElementById("e_march" + p_ctl_nb)) { - return; - } - g("e_march" + p_ctl_nb).value = trim(g("e_march" + p_ctl_nb).value); - var qcode = g("e_march" + p_ctl_nb).value; - - if (qcode.length == 0) - { - clean_ledger(p_ctl_nb); - refresh_ledger(); - return; - } - /* - * if tva_id is empty send a value of -1 - */ - var tva_id = -1; - if (g('e_march' + p_ctl_nb + '_tva_id')) - { - tva_id = g('e_march' + p_ctl_nb + '_tva_id').value; - if (trim(tva_id) == '') - { - tva_id = -1; - } - } - - g('e_march' + p_ctl_nb + '_price').value = trim(g('e_march' + p_ctl_nb + '_price').value); - var price = g('e_march' + p_ctl_nb + '_price').value; - - g('e_quant' + p_ctl_nb).value = trim(g('e_quant' + p_ctl_nb).value); - var quantity = g('e_quant' + p_ctl_nb).value; - var querystring = 'gDossier=' + dossier + '&c=' + qcode + '&t=' + tva_id + '&p=' + price + '&q=' + quantity + '&n=' + p_ctl_nb; - $('sum').hide(); - var action = new Ajax.Request( - "compute.php", - { - method: 'get', - parameters: querystring, - onFailure: error_compute_ledger, - onSuccess: success_compute_ledger - } - ); -} -/** - *@brief refresh the purchase screen, recompute vat, total... - */ -function refresh_ledger() -{ - var tva = 0; - var htva = 0; - var tvac = 0; - - for (var i = 0; i < g("nb_item").value; i++) - { - if (g('tva_march' + i)) - tva += g('tva_march' + i).value * 1; - if (g('htva_march' + i)) - htva += g('htva_march' + i).value * 1; - if (g('tvac_march' + i)) - tvac += g('tvac_march' + i).value * 1; - } - - if (g('tva')) - g('tva').innerHTML = Math.round(tva * 100) / 100; - if (g('htva')) - g('htva').innerHTML = Math.round(htva * 100) / 100; - if (g('tvac')) - g('tvac').innerHTML = Math.round(tvac * 100) / 100; -} -/** - *@brief update the field htva, tva_id and tvac, callback function for compute_sold - * it the field TVA in the answer contains NA it means that VAT is appliable and then do not - * update the VAT field except htva_martc - */ -function success_compute_ledger(request, json) -{ - var answer = request.responseText.evalJSON(true); - var ctl = answer.ctl; - var rtva = answer.tva; - var rhtva = answer.htva; - var rtvac = answer.tvac; - - if (rtva == 'NA') - { - var rhtva = answer.htva * 1; - g('htva_march' + ctl).value = rhtva; - g('tvac_march' + ctl).value = rtvac; - g('sum').show(); - refresh_ledger(); - - return; - } - rtva = answer.tva * 1; - - - - g('sum').show(); - if (g('e_march' + ctl + '_tva_amount').value == "" || g('e_march' + ctl + '_tva_amount').value == 0) - { - g('tva_march' + ctl).value = rtva; - g('e_march' + ctl + '_tva_amount').value = rtva; - } - else - { - g('tva_march' + ctl).value = g('e_march' + ctl + '_tva_amount').value; - } - g('htva_march' + ctl).value = Math.round(parseFloat(rhtva) * 100) / 100; - var tmp1 = Math.round(parseFloat(g('htva_march' + ctl).value) * 100) / 100; - var tmp2 = Math.round(parseFloat(g('tva_march' + ctl).value) * 100) / 100; - g('tvac_march' + ctl).value = Math.round((tmp1 + tmp2) * 100) / 100; - - refresh_ledger(); -} - -/** - * @brief callback error function for compute_sold - */ -function error_compute_ledger(request, json) -{ - alert_box('Ajax does not work'); -} -function compute_all_ledger() -{ - var loop = 0; - for (loop = 0; loop < g("nb_item").value; loop++) - { - compute_ledger(loop); - } - var tva = 0; - var htva = 0; - var tvac = 0; - - for (var i = 0; i < g("nb_item").value; i++) - { - if (g('tva_march')) - tva += g('tva_march' + i).value * 1; - if (g('htva_march' + i)) - htva += g('htva_march' + i).value * 1; - if (g('tvac_march' + i)) - tvac += g('tvac_march' + i).value * 1; - } - - if (g('tva')) - g('tva').innerHTML = Math.round(tva * 100) / 100; - if (g('htva')) - g('htva').innerHTML = Math.round(htva * 100) / 100; - if (g('tvac')) - g('tvac').innerHTML = Math.round(tvac * 100) / 100; - - -} - -function clean_tva(p_ctl) -{ - if (g('e_march' + p_ctl + '_tva_amount')) - g('e_march' + p_ctl + '_tva_amount').value = 0; -} - -function clean_ledger(p_ctl_nb) -{ - if (g("e_march" + p_ctl_nb)) - { - g("e_march" + p_ctl_nb).value = trim(g("e_march" + p_ctl_nb).value); - } - if (g('e_march' + p_ctl_nb + '_price')) - { - g('e_march' + p_ctl_nb + '_price').value = ''; - } - if (g('e_quant' + p_ctl_nb)) - { - g('e_quant' + p_ctl_nb).value = '1'; - } - if (g('tva_march' + p_ctl_nb + '_show')) - { - g('tva_march' + p_ctl_nb + '_show').value = '0'; - } - if (g('tva_march' + p_ctl_nb)) - { - g('tva_march' + p_ctl_nb).value = 0; - } - if (g('htva_march' + p_ctl_nb)) - { - g('htva_march' + p_ctl_nb).value = 0; - } - if (g('tvac_march' + p_ctl_nb)) - { - g('tvac_march' + p_ctl_nb).value = 0; - } - -} -/** - * @brief add a line in the form for the quick_writing - */ -function quick_writing_add_row() -{ - style = 'class="input_text"'; - var mytable = g("quick_item").tBodies[0]; - var nNumberRow = mytable.rows.length; - var oRow = mytable.insertRow(nNumberRow); - var rowToCopy = mytable.rows[1]; - var nNumberCell = rowToCopy.cells.length; - var nb = g("nb_item"); - - var oNewRow = mytable.insertRow(nNumberRow); - for (var e = 0; e < nNumberCell; e++) - { - var newCell = oRow.insertCell(e); - var tt = rowToCopy.cells[e].innerHTML; - new_tt = tt.replace(/qc_0/g, "qc_" + nb.value); - new_tt = new_tt.replace(/amount0/g, "amount" + nb.value); - new_tt = new_tt.replace(/poste0/g, "poste" + nb.value); - new_tt = new_tt.replace(/ck0/g, "ck" + nb.value); - new_tt = new_tt.replace(/ld0/g, "ld" + nb.value); - newCell.innerHTML = new_tt; - new_tt.evalScripts(); - } - $("qc_" + nb.value).value = ""; - $("amount" + nb.value).value = ""; - $("poste" + nb.value).value = ""; - $("ld" + nb.value).value = ""; - - - - nb.value++; - -} -function RefreshMe() -{ - window.location.reload(); -} - - -function go_next_concerned() -{ - var form = document.forms[1]; - - for (var e = 0; e < form.elements.length; e++) - { - var elmt = form.elements[e]; - if (elmt.type == "checkbox") - { - if (elmt.checked == true) - { - return confirm("Si vous changez de page vous perdez les reconciliations, continuez ?"); - } - } - } - return true; -} -function view_history_account(p_value, dossier) -{ - layer++; - id = 'det' + layer; - var popup = {'id': id, 'cssclass': 'inner_box', 'html': loading(), 'drag': true}; - - querystring = 'gDossier=' + dossier + '&act=de&pcm_val=' + p_value + '&div=' + id + "&l=" + layer; - add_div(popup); - - var action = new Ajax.Request( - "ajax_history.php", - { - method: 'get', - parameters: querystring, - onFailure: error_box, - onSuccess: function (req, xml) - { - success_box(req, xml); - g(id).style.top = calcy(140 + (layer * 3)) + "px"; - } - } - ); - -} - -function update_history_account(obj) -{ - try { - var querystring = "l=" + obj.div + "&div=" + obj.div + "&gDossier=" + obj.gDossier + "&pcm_val=" + obj.pcm_val + "&ex=" + obj.select.options[obj.select.selectedIndex].text; - var action = new Ajax.Request( - "ajax_history.php", - { - method: 'get', - parameters: querystring, - onFailure: error_box, - onSuccess: function (req, xml) - { - success_box(req, xml); - g(obj.div).style.top = calcy(140 + (layer * 3)) + "px"; - } - }); - } catch (e) - { - alert_box("update_history_account error " + e.message); - } - - return false; -} -/*!\brief - * \param p_value f_id of the card - */ - -function view_history_card(p_value, dossier) -{ - layer++; - id = 'det' + layer; - var popup = {'id': - id, 'cssclass': 'inner_box' - , 'html': - loading(), 'drag': - true}; - querystring = 'gDossier=' + dossier + '&act=de&f_id=' + p_value + '&div=' + id + "&l=" + layer; - add_div(popup); - var action = new Ajax.Request( - "ajax_history.php", - { - method: 'get', - parameters: querystring, - onFailure: error_box, - onSuccess: function (req, xml) - { - success_box(req, xml); - g(id).style.top = calcy(140 + (layer * 3)) + "px"; - } - } - ); -} - -function update_history_card(obj) -{ - try { - var querystring = "l=" + obj.div + "&div=" + obj.div + "&gDossier=" + obj.gDossier + "&f_id=" + obj.f_id + "&ex=" + obj.select.options[obj.select.selectedIndex].text; - var action = new Ajax.Request( - "ajax_history.php", - { - method: 'get', - parameters: querystring, - onFailure: error_box, - onSuccess: function (req, xml) - { - success_box(req, xml); - g(obj.div).style.top = calcy(140 + (layer * 3)) + "px"; - } - }); - } catch (e) - { - alert_box("update_history_account error " + e.message); - } - - return false; -} -/** - * remove an Operation - *@param p_jr_id is the jrn.jr_id - *@param dossier - *@param the div - */ -function removeOperation(p_jr_id, dossier, div) -{ - waiting_box(); - var qs = "gDossier=" + dossier + "&act=rmop&div=" + div + "&jr_id=" + p_jr_id; - var action = new Ajax.Request( - "ajax_ledger.php", - { - method: 'get', - parameters: qs, - onFailure: error_box, - onSuccess: infodiv - } - ); - -} - -/** - * reverse an Operation - *@param pointer to the FORM - */ -function reverseOperation(obj) -{ - var qs = $(obj).serialize(); - g('ext' + obj.divname).style.display = 'none'; - g('bext' + obj.divname).style.display = 'none'; - waiting_box(); - var action = new Ajax.Request( - "ajax_ledger.php", - { - method: 'get', - parameters: qs, - onFailure: error_box, - onSuccess: infodiv - } - ); - - return false; -} - -/*! - * \brief Show the details of an operation - * \param p_value jrn.jr_id - * \param dossier dossier id - */ -function modifyOperation(p_value, dossier) -{ - layer++; - var id = 'det' + layer; - waiting_box(); - var querystring = 'gDossier=' + dossier + '&act=de&jr_id=' + p_value + '&div=' + id; - - var action = new Ajax.Request( - "ajax_ledger.php", - { - method: 'get', - parameters: querystring, - onFailure: error_box, - onSuccess: function (xml, txt) { - var popup = {'id': id, 'cssclass': 'inner_box' - , 'html': "", 'drag': true}; - remove_waiting_box(); - add_div(popup); - success_box(xml, txt); - $(id).style.position = "absolute"; - $(id).style.top = calcy(100 + (layer * 3)) + "px"; - } - } - ); -} - -/*!\brief - * \param p_value jrn.jr_id - */ - -function viewOperation(p_value, p_dossier) -{ - modifyOperation(p_value, p_dossier) -} -function dropLink(p_dossier, p_div, p_jr_id, p_jr_id2) -{ - var querystring = 'gDossier=' + p_dossier; - querystring += '&div=' + p_div; - querystring += '&jr_id=' + p_jr_id; - querystring += '&act=rmr'; - querystring += '&jr_id2=' + p_jr_id2; - var action = new Ajax.Request('ajax_ledger.php', - { - method: 'get', - parameters: querystring, - onFailure: null, - onSuccess: null - } - ); -} -/** - *@brief this function is called before the querystring is send to the - * fid2.php, add a filter based on the ledger 'p_jrn' - *@param obj is the input field - *@param queryString is the queryString to modify - *@see ICard::input - */ -function filter_card(obj, queryString) -{ - jrn = $('p_jrn').value; - if (jrn == -1) - { - type = $('ledger_type').value; - queryString = queryString + '&type=' + type; - } - else - { - queryString = queryString + '&j=' + jrn; - } - return queryString; -} -/** - *@brief to display the lettering for the operation, call - * ajax function - *@param obj object attribut : gDossier,j_id,obj_type - */ -function dsp_letter(obj) -{ - try - { - var queryString = 'gDossier=' + obj.gDossier + '&j_id=' + obj.j_id + '&op=dl' + '&ot=' + obj.obj_type; - var action = new Ajax.Request( - "ajax_misc.php", - { - method: 'get', - parameters: queryString, - onFailure: error_dsp_letter, - onSuccess: success_dsp_letter - } - ); - g('search').style.display = 'none'; - g('list').style.display = 'none'; - $('detail').innerHTML = loading(); - g('detail').style.display = 'block'; - } - catch (e) - { - alert_box('dsp_letter failed ' + e.message); - } -} - -function success_dsp_letter(req) -{ - try - { - var answer = req.responseXML; - var a = answer.getElementsByTagName('code'); - var html = answer.getElementsByTagName('value'); - if (a.length == 0) - { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - var name_ctl = a[0].firstChild.nodeValue; - var code_html = getNodeText(html[0]); - code_html = unescape_xml(code_html); - $('detail').innerHTML = code_html; - } - catch (e) - { - alert_box(e.message); - } - try - { - code_html.evalScripts(); - } - catch (e) - { - alert_box("Impossible executer script de la reponse\n" + e.message); - } - -} -function error_dsp_letter(req) -{ - alert_box('Erreur AJAX DSP_LETTER'); -} - -function search_letter(obj) -{ - try - { - var str_query = ''; - if (obj.elements['gDossier']) - str_query = 'gDossier=' + obj.elements['gDossier'].value; - if (obj.elements['j_id']) - str_query += '&j_id=' + obj.elements['j_id'].value; - if (obj.elements['ot']) - str_query += '&ot=' + obj.elements['ot'].value; - if (obj.elements['op']) - str_query += '&op=' + obj.elements['op'].value; - if (obj.elements['min_amount']) - str_query += '&min_amount=' + obj.elements['min_amount'].value; - if (obj.elements['max_amount']) - str_query += '&max_amount=' + obj.elements['max_amount'].value; - if (obj.elements['search_start']) - str_query += '&search_start=' + obj.elements['search_start'].value; - if (obj.elements['search_end']) - str_query += '&search_end=' + obj.elements['search_end'].value; - if (obj.elements['side']) - str_query += '&side=' + obj.elements['side'].value; - - - var action = new Ajax.Request( - "ajax_misc.php", - { - method: 'get', - parameters: str_query, - onFailure: error_dsp_letter, - onSuccess: success_dsp_letter - } - ); - $('list').hide(); - $('search').hide(); - $('detail').innerHTML = loading(); - $('detail').show(); - } - catch (e) - { - alert_box('search_letter ' + e.message); - } -} -/** - *@brief save an operation in ajax, it concerns only the - * comment, the pj and the rapt - * the form elements are access by their name - *@param obj form - */ -function op_save(obj) -{ - try { - var queryString = $(obj).serialize(); - queryString += "&gDossier=" + obj.gDossier.value; - var rapt2 = "rapt" + obj.whatdiv.value; - queryString += "&rapt=" + g(rapt2).value; - queryString += '&jr_id=' + obj.jr_id.value; - var jr_id=obj.jr_id.value; - queryString += '&div=' + obj.whatdiv.value; - var divid=obj.whatdiv.value; - queryString += '&act=save'; - waiting_box(); - /* - * Operation detail is in a new window - */ - if (g('inpopup')) - { - var action = new Ajax.Request('ajax_ledger.php', - { - method: 'post', - parameters: queryString, - onFailure: null, - onSuccess: infodiv - } - ); - // window.close(); - } - else - { - /* - *Operation is in a modal box - */ - var action = new Ajax.Request('ajax_ledger.php', - { - method: 'post', - parameters: queryString, - onFailure: null, - onSuccess: function(req,json) { - new Ajax.Request('ajax_ledger.php', { - parameters:{'gDossier':obj.gDossier.value, - 'act':'de', - 'jr_id' : jr_id, - 'div' : divid}, - onSuccess:function(xml) { - try { - var answer=xml.responseXML; - var html = answer.getElementsByTagName('code'); - $(divid).innerHTML=unescape(getNodeText(html[0])); - remove_waiting_box(); - } catch (e) { - alert_box("1038"+e.message) - } - } - }); - - } - }); - } - return false; - } catch (e) - { - alert_box(e.message); - } -} -function get_history_account(ctl, dossier) { - if ($(ctl).value != '') - { - view_history_account($(ctl).value, dossier); - } -} -var previous = []; -function show_reconcile(p_div, p_let) -{ - try - { - if (previous.length != 0) - { - var count_elt = previous.length; - var i = 0; - for (i = 0; i < count_elt; i++) { - previous[i].style.backgroundColor = ''; - previous[i].style.color = ''; - previous[i].style.fontWeight = ""; - } - } - var name = 'tr_' + p_let + '_' + p_div; - var elt = document.getElementsByName(name); - previous = elt; - var count_elt = elt.length; - var i = 0; - for (i = 0; i < count_elt; i++) { - elt[i].style.backgroundColor = '#000066'; - elt[i].style.color = 'white'; - elt[i].style.fontWeight = 'bolder'; - - } - - } catch (e) - { - alert_box(e.message); - } - - -} -/** - * @brief add a line in the form for the purchase ledger - */ -function gestion_add_row() -{ - try { - style = 'class="input_text"'; - var mytable = g("art").tBodies[0]; - var ofirstRow = mytable.rows[1]; - var line = mytable.rows.length; - var nCell = mytable.rows[1].cells.length; - var row = mytable.insertRow(line); - var nb = g("nb_item"); - for (var e = 0; e < nCell; e++) - { - var newCell = row.insertCell(e); - var tt = ofirstRow.cells[e].innerHTML; - var new_tt = tt.replace(/march0/g, "march" + nb.value); - new_tt = new_tt.replace(/quant0/g, "quant" + nb.value); - new_tt = new_tt.replace(/sold\(0\)/g, "sold(" + nb.value + ")"); - new_tt = new_tt.replace(/compute_ledger\(0\)/g, "compute_ledger(" + nb.value + ")"); - new_tt = new_tt.replace(/clean_tva\(0\)/g, "clean_tva(" + nb.value + ")"); - new_tt = new_tt + ''; - new_tt = new_tt + ''; - newCell.innerHTML = new_tt; - if (mytable.rows[1].cells[e].hasClassName("num")) { - newCell.addClassName("num"); - } - new_tt.evalScripts(); - } - - g("e_march" + nb.value + "_label").innerHTML = ' '; - g("e_march" + nb.value + "_label").value = ''; - g("e_march" + nb.value + "_price").value = '0'; - g("e_march" + nb.value).value = ""; - g("e_quant" + nb.value).value = "1"; - g('tvac_march' + nb.value).value = "0"; - if ($("e_march" + nb.value + "_tva_amount")) - g("e_march" + nb.value + "_tva_amount").value = 0; - - nb.value++; - - new_tt.evalScripts(); - } catch (e) { - alert_box(e.message); - } - -} -function document_remove(p_dossier,p_div,p_jrid) -{ - smoke.confirm('Effacer ?', function (e) - { - if (e) { - new Ajax.Request('ajax_ledger.php', - { - parameters:{"p_dossier":p_dossier,"div":p_div,"p_jrid":p_jrid,'act':'rmf'}, - onSuccess : function(x) { - $('receipt'+p_div).innerHTML=x.responseText; - } - }) - } - }); -} \ No newline at end of file diff --git a/sources/html/js/accounting_item.js b/sources/html/js/accounting_item.js deleted file mode 100644 index acbe0ef..0000000 --- a/sources/html/js/accounting_item.js +++ /dev/null @@ -1,377 +0,0 @@ -/* - * This file is part of NOALYSS. - * - * NOALYSS is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * NOALYSS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NOALYSS; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder danydb@aevalys.eu - -/*! \file - * \brief - * containing the javascript for opening a windows to search an account (poste comptable) - */ - -function set_poste_parent(p_ctl,p_value) -{ - var f=g(p_ctl); - f.value+='['+p_value+']'; -} - -function set_jrn_parent(p_ctl,p_value) -{ - var f=g(p_ctl); - if ( f ) - { - if ( trim(f.value)!="") f.value+=' '; - f.value+=p_value; - } -} -/** - *@brief Display a box with accounting detail for update, delete or add, update the - * table account_tbl_id - *@param p_dossier dossier id - *@param p_val value of the accounting, it is used to compute the row id - */ -function pcmn_update(p_dossier, p_val) -{ - var query = {gDossier: p_dossier, value: p_val, op: 'pcmn_update'}; - waiting_box(); - var action = new Ajax.Request('ajax_misc.php', - { - method: 'get', - parameters: query, - onSuccess: function (req) - { - try - { - remove_waiting_box(); - var answer = req.responseXML; - var a = answer.getElementsByTagName('ctl'); - var html = answer.getElementsByTagName('code'); - var status= answer.getElementsByTagName('status'); - - if (a.length == 0) - { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - - var name_ctl = getNodeText(a[0]); - var code_html = getNodeText(html[0]); - var result = getNodeText(status[0]); - $('acc_update').innerHTML=code_html; - $('acc_update').setStyle('top:'+calcy(150)+'px'); - $('acc_update').show(); - } - catch (e) - { - error_message(e.message); - } - try - { - code_html.evalScripts(); - } - catch (e) - { - alert_box("Impossible executer script de la reponse\n" + e.message); - } - - } - } - ); -} -/** - *@brief show the popup for search an accounting item - *@param object this, it must contains some attribute as - * - jrn if set and different to 0, will filter the accounting item for a - * ledger - * - account the tag which will contains the number - * - label the tag which will contains the label - * - bracket if the value must be surrounded by [ ] - * - acc_query for the initial query - *\see ajax_poste.php - */ -function search_poste(obj) -{ - var sx=0; - if ( window.scrollY) - { - sx=window.scrollY+40; - } - else - { - sx=document.body.scrollTop+60; - } - - var div_style="top:"+sx+"px"; - removeDiv('search_account'); - add_div({id:'search_account',cssclass:'inner_box',html:loading(),style:div_style,drag:true}); - - var dossier=$('gDossier').value; - - var queryString="gDossier="+dossier; - - queryString+="&op=sf"; - try - { - if ( obj.jrn) - { - queryString+="&j="+obj.jrn; - } - if ( obj.account) - { - queryString+="&c="+obj.account; - } - if ( obj.label) - { - queryString+="&l="+obj.label; - } - if ( obj.bracket) - { - queryString+="&b="+obj.bracket; - } - if( obj.noquery) - { - queryString+="&nq"; - } - if( obj.no_overwrite) - { - queryString+="&nover"; - } - if( obj.bracket) - { - queryString+="&bracket"; - } - if ( ! obj.noquery) - { - if( obj.acc_query) - { - queryString+="&q="+obj.acc_query; - } - else - { - if ($(obj).account) - { - var e=$(obj).account; - var str_account=$(e).value; - queryString+="&q="+str_account; - } - } - } - - queryString+="&ctl="+'search_account'; - queryString=encodeURI(queryString); - var action=new Ajax.Request ( 'ajax_poste.php', - { - method:'get', - parameters:queryString, - onFailure:errorPoste, - onSuccess:result_poste_search - } - ); - } - catch (e) - { - alert_box(e.getMessage); - } -} -/** - *@brief when you submit the form for searching a accounting item - *@param obj form - *@note the same as search_poste, except it answer to a FORM and not - * to a click event - */ -function search_get_poste(obj) -{ - var dossier=$('gDossier').value; - var queryString="gDossier="+dossier; - - queryString+="&op=sf"; - - if ( obj.elements['jrn'] ) - { - queryString+="&j="+$F('jrn'); - } - if ( obj.elements['account']) - { - queryString+="&c="+$F('account'); - } - if ( obj.elements['label']) - { - queryString+="&l="+$F('label'); - } - if( obj.elements['acc_query']) - { - queryString+="&q="+$F('acc_query'); - } - if (obj.ctl ) - { - queryString+="&ctl="+obj.ctl; - } - if( obj.elements['nosearch']) - { - queryString+="&nq"; - } - if( obj.elements['nover']) - { - queryString+="&nover"; - } - if( obj.elements['bracket']) - { - queryString+="&bracket"; - } - - $('asearch').innerHTML=loading(); - var action=new Ajax.Request ( 'ajax_poste.php', - { - method:'get', - parameters:queryString, - onFailure:errorPoste, - onSuccess:result_poste_search - } - ); -} - -/** - *@brief show the answer of ajax request - *@param answer in XML - */ -function result_poste_search(req) -{ - try - { - var answer=req.responseXML; - var a=answer.getElementsByTagName('ctl'); - if ( a.length == 0 ) - { - var rec=req.responseText; - alert_box ('erreur :'+rec); - } - var html=answer.getElementsByTagName('code'); - - var name_ctl=a[0].firstChild.nodeValue; - var nodeXml=html[0]; - var code_html=getNodeText(nodeXml); - code_html=unescape_xml(code_html); - $('search_account').innerHTML=code_html; - } - catch (e) - { - alert_box(e.message); - } - try - { - code_html.evalScripts(); - } - catch(e) - { - alert_box("Impossible executer script de la reponse\n"+e.message); - } - -} -/** -*@brief error for ajax -*/ -function errorPoste() -{ - alert_box('Ajax failed'); -} -function pausecomp(millis) - { - var date = new Date(); - var curDate = null; - do { curDate = new Date(); } - while(curDate-date < millis); -} -/** - * Update an accounting with the information in the form, called frmo - * param_pcmn.inc.php - * @returns false - */ -function pcmn_save() -{ - try { - waiting_box(); - // initialize variables - var gDossier=0; - var p_action=""; - var p_oldu=-1; - var p_valu=""; - var p_libu=""; - var p_parentu=""; - var form=$('acc_update_frm_id'); - var notfound="not found:"; - var p_typeu=-1; - var acc_delete=0; - // get them - if ( form['gDossier']) { gDossier=form['gDossier'].value;}else { notfound+='gDossier';} - if ( form['p_action']) { p_action=form['p_action'].value;}else { notfound+=', p_action ';} - if ( form['p_oldu']) { p_oldu=form['p_oldu'].value;}else { notfound+=', p_oldu';} - if ( form['p_valu']) { p_valu=form['p_valu'].value;}else { notfound+=', p_valu';} - if ( form['p_libu']) { p_libu=form['p_libu'].value;}else { notfound+=', p_libu ';} - if ( form['p_parentu']) { p_parentu=form['p_parentu'].value;}else { notfound+='p_parentu';} - if ( form['delete_acc']) { - if (form['delete_acc'].checked) { acc_delete=1;} else {acc_delete=0} } - else { - notfound += ', delete_acc'; - } - if ( form['p_typeu']) { p_typeu=form['p_typeu'].value;} else { notfound+=", p_typeu";} - - - if ( notfound != "not found:") throw notfound; - - var queryString={op:'account_update',action:p_action,gDossier:gDossier,p_oldu:p_oldu,p_valu:p_valu,p_libu:p_libu,p_parentu:p_parentu,acc_delete:acc_delete,p_typeu:p_typeu}; - var ajax_action = new Ajax.Request( - "ajax_misc.php", - { - method: 'get', - parameters: queryString, - onFailure: error_box, - onSuccess: function(req, json) { - try - { - remove_waiting_box(); - var name_ctl = 'acc_update_info'; - var answer = req.responseXML; - var html = answer.getElementsByTagName('code'); - var ctl = answer.getElementsByTagName('ctl')[0].textContent; - if (html.length == 0) { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - var code_html = getNodeText(html[0]); // Firefox ne prend que les 4096 car. - code_html = unescape_xml(code_html); - - $(name_ctl).innerHTML = code_html; - if ( ctl == 'ok') { - window.location.reload(); - } - } catch (e) - { - error_message(e.message); - return false; - } - } - } - - ); - - }catch (e) { - return false; - } - return false; -} - \ No newline at end of file diff --git a/sources/html/js/admin.js b/sources/html/js/admin.js deleted file mode 100644 index 7d56493..0000000 --- a/sources/html/js/admin.js +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (C) 2015 Dany De Bontridder - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - * Display the forbidden folders if the request comes from a form - * with an input text (id:database_filter_input) then this text is - * used as a filter - * @param {type} p_user : the user id - * @returns nothing - */ -function folder_display(p_user) -{ - /** - * If form exist and there is something - * - */ - var p_filter = ""; - if ($('database_filter_input')) { - console.log($('database_filter_input').value); - p_filter = $('database_filter_input').value; - } - /* - * Ajax request to display the folder - */ - new Ajax.Request('ajax_misc.php', { - method: "get", - parameters: {"p_user": p_user, "op": "folder_display", "p_filter": p_filter, 'gDossier': 0}, - onSuccess: function (p_xml) { - // table id = database_list - var folder = {}; - var create = false; - if (!$('folder_list_div')) { - folder = create_div({'id': 'folder_list_div', 'cssclass': "inner_box", 'style': 'width:90%,right:5%;top:100px'}); - create = true; - } - folder = $('folder_list_div'); - // Analyze XML answer - var answer = p_xml.responseXML; - var a = answer.getElementsByTagName('status'); - var html = answer.getElementsByTagName('content'); - if (a.length == 0) { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - - var content = getNodeText(html[0]); - // fill up the div - folder.innerHTML = unescape_xml(content); - - // show it - folder.show(); - $('database_filter_input').focus(); - } - }); -} -/** - * Remove the grant for an user to the given database id - * @param {integer} p_user use_id id of the user - * @param {integer} p_dossier id of the database - * @returns nothing - */ -function folder_remove(p_user,p_dossier ) -{ - smoke.confirm ('Confirmer', - function (e) { - if (e ) { - waiting_box(); - new Ajax.Request('ajax_misc.php', { - method: "get", - parameters: {"p_user": p_user, 'p_dossier': p_dossier, "op": "folder_remove", 'gDossier': 0}, - onSuccess: function (p_xml) { - // table id = database_list - new Effect.Opacity('row'+p_dossier, { from: 1.0, to: 0.0, duration: 0.2 }); - remove_waiting_box(); - } - - }); - } else { - return ; - } - }); -} - -/** - * Grant the access to a folder for a given user and add a row in the table - * (id : database_list) - * @param {integer} p_user use_id id of the user - * @param {integer} p_dossier id of the database - * @returns {undefined} - */ -function folder_add(p_user, p_dossier) -{ - waiting_box(); - new Ajax.Request('ajax_misc.php', { - method: "get", - parameters: {"p_user": p_user, 'p_dossier': p_dossier, "op": "folder_add", 'gDossier': 0}, - onSuccess: function (p_xml) { - // table id = database_list - // Analyze XML answer - var answer = p_xml.responseXML; - var a = answer.getElementsByTagName('status'); - var html = answer.getElementsByTagName('content'); - if (a.length == 0) { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - - var content = getNodeText(html[0]); - var nb = $('database_list').rows.length + 1; - var row = new Element('tr', {'id': 'row' + p_dossier}); - if (nb % 2 == 0) { - row.addClassName('odd'); - } else { - row.addClassName('even'); - } - row.innerHTML = unescape_xml(content); - $('database_list').appendChild(row); - $('row_db_'+p_dossier).hide(); - remove_waiting_box(); - } - }); - -} -function display_admin_answer(p_dossier,p_action) -{ - waiting_box(); - new Ajax.Request ("ajax_misc.php",{ - method:"get", - parameters:{"p_dossier":p_dossier,"op":p_action,'gDossier':0}, - onSuccess : function (p_xml) { - try { - var div_display="folder_admin_div"; - var answer = p_xml.responseXML; - var a = answer.getElementsByTagName('status'); - var html = answer.getElementsByTagName('content'); - if (a.length == 0) { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - - var folder; - var create = false; - if (!$(div_display)) { - folder = create_div({'id': div_display, 'cssclass': "inner_box", style: 'width:90%;right:5%;top:100px'}); - create = true; - } - folder=$(div_display); - - var content = getNodeText(html[0]); - folder.innerHTML=unescape_xml(content); - var pos=calcy(250); - $(div_display).setStyle({top:pos+'px'}); - - folder.show(); - remove_waiting_box(); - } catch (e) { - console.log(e.message); - } - } - }); -} -function folder_drop(p_dossier) -{ - display_admin_answer(p_dossier,'folder_drop'); -} - -function folder_modify(p_dossier) -{ - display_admin_answer(p_dossier,'folder_modify'); -} -function modele_modify(p_dossier) -{ - display_admin_answer(p_dossier,'modele_modify'); -} -function modele_drop(p_dossier) -{ - display_admin_answer(p_dossier,'modele_drop'); -} diff --git a/sources/html/js/ajax_fiche.js b/sources/html/js/ajax_fiche.js deleted file mode 100644 index 88503ed..0000000 --- a/sources/html/js/ajax_fiche.js +++ /dev/null @@ -1,252 +0,0 @@ -/* - * This file is part of NOALYSS. - * - * NOALYSS is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * NOALYSS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NOALYSS; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder danydb@aevalys.eu - -/*! \file - * \brief This file permit to use the AJAX function to fill up - * info from fiche - * - */ - -/*!\brief clean the row (the label, price and vat) - * \param p_ctl the calling ctrl - */ -function clean_Fid(p_ctl) -{ - nSell=p_ctl+"_price"; - nTvaAmount=p_ctl+"_tva_amount"; - nBuy=p_ctl+"_price"; - nTva_id=p_ctl+"_tva_id"; - if ( $(nSell) ) - { - $(nSell).value=""; - } - if ( $(nBuy) ) - { - $(nBuy).value=""; - } - if ( $(nTva_id) ) - { - $(nTva_id).value="-1"; - } - if ( $(nTvaAmount)) - { - $(nTvaAmount).value=0; - } -} -function errorFid(request,json) -{ - alert_box('erreur : ajax fiche'); -} -/*!\brief this function fills the data from fid.php, - * \param p_ctl object : field of the input, - * possible object member - * - label field to update with the card's name - * - price field to update with the card's price - * - tvaid field to update with the card's tva_id - * - jrn field to force the ledger - *\see successFid errorFid fid.php - */ -function ajaxFid(p_ctl) -{ - try - { - var gDossier=$('gDossier').value; - var jrn=$(p_ctl).jrn; - $(p_ctl).value=$(p_ctl).value.toUpperCase(); - if ( jrn == undefined ) - { - if ($('p_jrn')!=undefined) - { - jrn=$('p_jrn').value; - } - } - if ( jrn == undefined ) - { - jrn=-1; - } - if ( trim($(p_ctl).value)=="" ) - { - nLabel=$(p_ctl).label; - if ($(nLabel) ) - { - $(nLabel).value=""; - $(nLabel).innerHTML=" "; - clean_Fid(p_ctl); - return; - } - } - var queryString="FID="+trim($(p_ctl).value); - if ( $(p_ctl).label) - { - queryString+='&l='+$(p_ctl).label; - } - if ( $(p_ctl).tvaid) - { - queryString+='&t='+$(p_ctl).tvaid; - } - if ( $(p_ctl).price) - { - queryString+='&p='+$(p_ctl).price; - } - if ( $(p_ctl).purchase) - { - queryString+='&b='+$(p_ctl).purchase; - } - if ( $(p_ctl).typecard) - { - queryString+='&d='+$(p_ctl).typecard; - } - queryString=queryString+"&j="+jrn+'&gDossier='+gDossier; - queryString=queryString+'&ctl='+p_ctl.id; - - var action=new Ajax.Request ( - "fid.php", - { - method:'get', - parameters:queryString, - onFailure:errorFid, - onSuccess:successFid - } - - ); - }catch (e) { - alert_box(e.message); - alert_box(p_ctl); - } - -} -/*!\brief callback function for ajax - * \param request : object request - * \param json : json answer -\verbatim - {"answer":"ok", - "flabel":"none", - "name":"Chambre de commerce", - "ftva_id":"none", - "tva_id":" ", - "fPrice_sale":"none", - "sell":" ", - "fPrice_purchase":"none", - "buy":" "} -\endverbatim - */ -function successFid(request,json) -{ - var answer=request.responseText.evalJSON(true); - var flabel=answer.flabel; - if ( answer.answer=='nok' ) - { - set_value(flabel," Fiche inexistante"); - return; - } - - var ftva_id=answer.ftva_id; - var fsale=answer.fPrice_sale; - var fpurchase=answer.fPrice_purchase; - - if ( ftva_id != 'none') - { - set_value(ftva_id,answer.tva_id); - } - if ( flabel != 'none') - { - set_value(flabel,answer.name); - } - if ( fsale != 'none') - { - set_value(fsale,answer.sell); - } - if ( fpurchase != 'none') - { - set_value(fpurchase,answer.buy); - } - - -} -function ajax_error_saldo(request,json) -{ - alert_box('erreur : ajax solde '); -} -/*!\brief this function get the saldo - * \param p_ctl the ctrl where we take the quick_code - */ -function ajax_saldo(p_ctl) -{ - var gDossier=$('gDossier').value; - var ctl_value=trim($(p_ctl).value); - var jrn=$('p_jrn').value; - queryString="FID="+ctl_value+"&op=saldo"; - queryString=queryString+'&gDossier='+gDossier+'&j='+jrn; - queryString=queryString+'&ctl='+ctl_value; - /* alert_box(queryString); */ - var action=new Ajax.Request ( - "ajax_misc.php", - { - method:'get', - parameters:queryString, - onFailure:ajax_error_saldo, - onSuccess:ajax_success_saldo - } - - ); - -} -/*!\brief callback function for ajax - * \param request : object request - * \param json : json answer */ -function ajax_success_saldo(request,json) -{ - var answer=request.responseText.evalJSON(true); - $('first_sold').value=answer.saldo; - -} -/*!\brief this function get data from ajax_card.php and fill the hidden div with the return html string -* \param p_dossier -* \param f_id fiche.f_id -* \param p_operation what to do : op : history of operation -* \param ctl : id of the div to show -* \param page -*/ -function ajax_card(p_dossier,f_id,p_operation,ctl,page) -{ - $(ctl).show(); - var queryString="gDossier="+p_dossier+"&f_id="+f_id+"&op="+p_operation+"&p="+page+'&ctl='+ctl; - var action = new Ajax.Request( - "ajax_card.php" , { method:'get', parameters:queryString,onFailure:ajax_get_failure,onSuccess:ajax_get_success} - ); -} -/*!\brief callback function for ajax_get when successuf -*/ -function ajax_get_success(request,json) -{ - var answer=request.responseText.evalJSON(false); - $(answer.ctl).show(); - $(answer.ctl).innerHTML=answer.html; -} -/*!\brief callback function for ajax_get when fails -*/ -function ajax_get_failure(request,json) -{ - alert_box("Ajax do not work for ajax_get"); - -} - -//--> diff --git a/sources/html/js/anc_script.js b/sources/html/js/anc_script.js deleted file mode 100644 index 5087109..0000000 --- a/sources/html/js/anc_script.js +++ /dev/null @@ -1,546 +0,0 @@ -/* - * This file is part of NOALYSS. - * - * NOALYSS is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * NOALYSS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NOALYSS; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder danydb@aevalys.eu - -/** - * @file - * @brief javascript for the analytic accountancy - */ - -/*!\brief add a row for the CA - * \param p_table_id - * \param p_amount amount to reach - */ -function add_row(p_table, p_seq) -{ - var mytable = g(p_table).tBodies[0]; - var max =Math.abs( parseFloat(g('amount_t' + p_seq).value)); - if (!mytable) - { - return; - } - var new_value = mytable.rows.length + 1; - - - if (mytable.rows.length > 15) - { - alert_box("Maximum 15 lignes "); - return; - } - var amount = compute_total_table(p_table, p_seq); - if (max < amount) - { - alert_box('Montant incorrect : max = ' + max + " calculé=" + amount); - return; - } - // For the detail view (modify_op) there is several form and then several time the - // element - var rowToCopy = mytable.rows[1]; - var row = mytable.insertRow(mytable.rows.length); - - for (var i = 0; i < rowToCopy.cells.length; i++) - { - var cell = row.insertCell(i); - var txt = rowToCopy.cells[i].innerHTML; -// txt=txt.replace(/row_1/g,"row_"+new_value); - cell.innerHTML = txt; - } - var col = document.getElementsByName("val[" + p_seq + "][]"); - col[col.length - 1].value = max - amount; - anc_refresh_remain(p_table, p_seq); -} -/** - *Compute total of a form from Anc_Operation::display_form_plan - *@param p_table table id - *@param seq sequence of the line - *@see Anc_Operation::display_form_plan - */ -function compute_total_table(p_table, seq) -{ - try { - - var i = 0; - var tot = 0; - var col = document.getElementsByName("val[" + seq + "][]"); - for (i = 0; i < col.length; i++) - { - if ( $(p_table).contains(col[i])) { - tot += parseFloat(col[i].value); - } - } - return tot; - } - catch (e) - { - alert_box(e.message); - } -} -/** - * Refresh remain of account. analytic - *@param p_table table id - *@param p_seq sequence of the line - *@see Anc_Operation::display_form_plan - */ -function anc_refresh_remain(p_table, p_seq) -{ - try - { - var tot_line =Math.abs( parseFloat(g('amount_t' + p_seq).value)); - var tot_table = compute_total_table(p_table, p_seq); - var remain = tot_line - tot_table; - remain = Math.round(remain * 100) / 100; - // var popup_table = p_table.toString(); -// p_table = popup_table.replace("popup", ""); - $('remain' + p_table).innerHTML = remain; - if (remain == 0) - { - $('remain' + p_table).style.color = "green" - } - else - { - $('remain' + p_table).style.color = "red" - } - } catch (a) - { - alert_box(a.message); - } -} -/*! - * \brief Check the amount of the CA - * \param p_style : error or ok, if ok show a ok box if the amount are equal - * - * - * \return true if the amounts are equal - */ -function verify_ca(div) -{ - try - { - - var idx = 0; - var amount_error = 0; - // put a maximum - while (idx < 50) - { - var table = div + 't' + idx; - if (g(table)) - { - var total_amount = 0; - // table is found compute the different val[] - var array_value = document.getElementsByName('val[' + idx + '][]'); - - for (var i = 0; i < array_value.length; i++) - { - if (isNaN(array_value[i].value)) - { - array_value[i].value = 0; - } - - total_amount += parseFloat(array_value[i].value); - } - var amount = Math.abs(parseFloat(g('amount_t' + idx).value)); - var diff = amount - total_amount; - - if (Math.round(diff, 2) != 0.0) - { - g(table).style.backgroundColor = 'red'; - amount_error++; - } - else - { - g(table).style.backgroundColor = 'lightgreen'; - - } - idx++; - } - else - break; - } - if (amount_error != 0) - { - alert_box('Désolé, les montants pour la comptabilité analytique sont incorrects'); - return false; - } - return true; - } - catch (e) - { - alert_box(e.message); - return false; - } -} -/*! - * \brief open a window for searching a CA account, - * \param p_dossier dossier id - * \param p_target ctrl to update - * \param p_source ctrl containing the pa_id - * - * - * \return - */ -function search_ca(p_dossier, p_target, p_source) -{ - var pa_id = g(p_source).value; - waiting_box(); - removeDiv('search_anc'); - var qs = "op=openancsearch&gDossier=" + p_dossier + "&ctl=searchanc"; - qs += "&c2=" + pa_id + "&c1=" + p_target; - - var action = new Ajax.Request('ajax_misc.php', - { - method: 'get', - parameters: qs, - onFailure: null, - onSuccess: function(req) { - try { - remove_waiting_box(); - var pos = fixed_position(250, 150) + ";width:30%;height:50%"; - add_div({ - id: "searchanc", - drag: 1, - cssclass: "inner_box", - style: pos - }); - $('searchanc').innerHTML = req.responseText; - - } catch (e) { - alert_box(e.message); - } - } - } - ); - -} -function search_anc_form(obj) -{ - var qs = "op=resultancsearch&ctl=searchanc&"; - var name = obj.id; - qs += $(name).serialize(false); - waiting_box(); - var action = new Ajax.Request('ajax_misc.php', - { - method: 'get', - parameters: qs, - onFailure: null, - onSuccess: function(req) { - try { - remove_waiting_box(); - $('searchanc').innerHTML = req.responseText; - req.responseText.evalScripts(); - - } catch (e) { - alert_box(e.message); - } - } - } - ); - return false; -} -function caod_checkTotal() -{ - var ie4 = false; - if (document.all) - { - ie4 = true; - }// Ajouter getElementById par document.all[str] - var total_deb = 0.0; - var total_cred = 0.0; - var nb_item = g('nbrow').value; - - for (var i = 0; i < nb_item; i++) - { - var doc_amount = g("pamount" + i); - if (!doc_amount) - { - return; - } - var side = g("pdeb" + i); - if (!side) - { - return; - } - var amount = parseFloat(doc_amount.value); - - if (isNaN(amount) == true) - { - amount = 0.0; - } - if (side.checked == false) - { - total_cred += amount; - } - if (side.checked == true) - { - total_deb += amount; - } - } - - - - var r_total_cred = Math.round(total_cred * 100) / 100; - var r_total_deb = Math.round(total_deb * 100) / 100; - g('totalDeb').innerHTML = r_total_deb; - g('totalCred').innerHTML = r_total_cred; - - if (r_total_deb != r_total_cred) - { - g("totalDiff").style.color = "red"; - g("totalDiff").style.fontWeight = "bold"; - g("totalDiff").innerHTML = "Différence"; - var diff = total_deb - total_cred; - diff = Math.round(diff * 100) / 100; - g("totalDiff").innerHTML = diff; - - } - else - { - g("totalDiff").innerHTML = "0.0"; - } -} - -/** - *@brief remove an operation - *@param p_dossier is the folder - *@param p_oa_group is the group of the analytic operation - */ -function anc_remove_operation(p_dossier, p_oa_group) -{ - smoke.confirm("Etes-vous sur de vouloir effacer cette operation ?\n", - function (a) - { - if ( a) { - var obj = {"oa": - p_oa_group, "gDossier": - p_dossier, "op": "remove_anc"}; - var queryString = encodeJSON(obj); - g(p_oa_group).style.display = 'none'; - var e = new Ajax.Request("ajax_misc.php", - {method: 'get', parameters: queryString}); - - } else - { - return; - } - }); -} -/** - * add a row in misc operation for ANC - * the code must be adapted for that - */ -function anc_add_row(tableid) -{ - var style = 'class="input_text"'; - var mytable = g(tableid).tBodies[0]; - var nNumberRow = mytable.rows.length; - var oRow = mytable.insertRow(nNumberRow); - var rowToCopy = mytable.rows[1]; - var nNumberCell = rowToCopy.cells.length; - var nb = g("nbrow"); - var oNewRow = mytable.insertRow(nNumberRow); - for (var e = 0; e < nNumberCell; e++) - { - var newCell = oRow.insertCell(e); - var tt = rowToCopy.cells[e].innerHTML; - var new_tt = tt.replace(/pop0/g, "pop" + nb.value); - new_tt = new_tt.replace(/pamount0/g, "pamount" + nb.value); - new_tt = new_tt.replace(/pdeb0/g, "pdeb" + nb.value); - newCell.innerHTML = new_tt; - new_tt.evalScripts(); - } - $("pamount" + nb.value).value = "0"; - nb.value++; -} -/** - *@brief this function is called before the querystring is send to the - * fid2.php, add a filter based on the ledger 'p_jrn' - *@param obj is the input field - *@param queryString is the queryString to modify - *@see ICard::input - */ -function filter_anc(obj, queryString) -{ - var pa_id = obj.plan_ctl; - queryString = queryString + "&pa_id=" + pa_id; - return queryString; -} -/** - * @brief compute and display Analytic activity, related to the choosen distribution key - * @param p_dossier is the dossier id - * @param p_table is table id to replace - * @param p_amount is the amount to distribute - * @param p_key_id is the choosen key - * - */ -function anc_key_compute(p_dossier, p_table, p_amount, p_key_id) -{ - waiting_box(); - var op = "op=anc_key_compute"; - var queryString = op + "&gDossier=" + p_dossier + "&t=" + p_table + "&amount=" + p_amount + '&key=' + p_key_id; - try { - var action = new Ajax.Request( - "ajax_misc.php", - { - method: 'get', - parameters: queryString, - onFailure: error_box, - onSuccess: function(req, json) { - try - { - var name_ctl = p_table; - var answer = req.responseXML; - remove_waiting_box(); - var html = answer.getElementsByTagName('code'); - if (html.length == 0) { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - - var code_html = getNodeText(html[0]); // Firefox ne prend que les 4096 car. - code_html = unescape_xml(code_html); - $(name_ctl).innerHTML = code_html; - removeDiv('div_anc_key_choice'); - } catch (e) - { - error_message(e.message); - } - } - } - - ); - } catch (e) { - error_message(e.message); - } -} -/** - * @brief choose the distribution key - * in ajax, a window let you choose what key you want to use - * - * @param p_dossier is the dossier - * @param p_table the table id of the target - * @param p_amount amount to distribute - * @param p_ledger - */ -function anc_key_choice(p_dossier, p_table, p_amount,p_ledger) -{ - waiting_box(); - var op = 'op=anc_key_choice'; - var queryString = op + "&gDossier=" + p_dossier + "&t=" + p_table + "&amount=" + p_amount; - try { - queryString+='&led='+p_ledger; - var action = new Ajax.Request( - "ajax_misc.php", - { - method: 'get', - parameters: queryString, - onFailure: error_box, - onSuccess: function(req, json) { - try - { - var name_ctl = 'div_anc_key_choice'; - var answer = req.responseXML; - remove_waiting_box(); - var html = answer.getElementsByTagName('code'); - if (html.length == 0) { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - - var code_html = getNodeText(html[0]); // Firefox ne prend que les 4096 car. - code_html = unescape_xml(code_html); - var position=fixed_position(50,120); - add_div({id: name_ctl, cssclass: 'inner_box', style: position, drag: 1}); - $(name_ctl).innerHTML = code_html; - } catch (e) - { - error_message(e.message); - } - } - } - - ); - - } catch (e) { - error_message(e.message); - } -} -/** - * Add a row for distribution key. - * This function add a row in the table key distribution - * @param p_table table id - */ -function add_row_key(p_table) -{ - var mytable = g(p_table).tBodies[0]; - if (!mytable) - { - return; - } - var table_length=mytable.rows.length ; - if ( table_length > 15) - { - alert_box("Maximum 15 lignes "); - return; - } - var rowToCopy = mytable.rows[1]; - var row = mytable.insertRow(table_length); - var nb=mytable.rows.length -2; - for (var i = 0; i < rowToCopy.cells.length; i++) - { - var cell = row.insertCell(i); - cell.className=rowToCopy.cells[i].className; - var txt = rowToCopy.cells[i].innerHTML; - if ( i == 0 ) - { - var change=nb+1; - cell.innerHTML =change+''; - } - else - { - if (i == rowToCopy.cells.length -1 ) { - txt=txt.replace(/value="[0-9]*.{1}[0-9]*"/,'value="0"') - } else { - txt=txt.replace(/po_id\[0\]/g,'po_id['+nb+']'); - } - cell.innerHTML = txt; - } - } - $('total_key').innerHTML="?"; -} -function anc_key_compute_table() -{ - var tot=0; - var i=0; - var value=0; - var percent=document.getElementsByName('percent[]'); - for (i=0;i"; - } catch(e) {} - var element = parentElement.firstChild || null; - - // see if browser added wrapping tags - if(element && (element.tagName.toUpperCase() != elementName)) - element = element.getElementsByTagName(elementName)[0]; - - // fallback to createElement approach - if(!element) element = document.createElement(elementName); - - // abort if nothing could be created - if(!element) return; - - // attributes (or text) - if(arguments[1]) - if(this._isStringOrNumber(arguments[1]) || - (arguments[1] instanceof Array) || - arguments[1].tagName) { - this._children(element, arguments[1]); - } else { - var attrs = this._attributes(arguments[1]); - if(attrs.length) { - try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707 - parentElement.innerHTML = "<" +elementName + " " + - attrs + ">"; - } catch(e) {} - element = parentElement.firstChild || null; - // workaround firefox 1.0.X bug - if(!element) { - element = document.createElement(elementName); - for(attr in arguments[1]) - element[attr == 'class' ? 'className' : attr] = arguments[1][attr]; - } - if(element.tagName.toUpperCase() != elementName) - element = parentElement.getElementsByTagName(elementName)[0]; - } - } - - // text, or array of children - if(arguments[2]) - this._children(element, arguments[2]); - - return $(element); - }, - _text: function(text) { - return document.createTextNode(text); - }, - - ATTR_MAP: { - 'className': 'class', - 'htmlFor': 'for' - }, - - _attributes: function(attributes) { - var attrs = []; - for(attribute in attributes) - attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) + - '="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'"') + '"'); - return attrs.join(" "); - }, - _children: function(element, children) { - if(children.tagName) { - element.appendChild(children); - return; - } - if(typeof children=='object') { // array can hold nodes and text - children.flatten().each( function(e) { - if(typeof e=='object') - element.appendChild(e); - else - if(Builder._isStringOrNumber(e)) - element.appendChild(Builder._text(e)); - }); - } else - if(Builder._isStringOrNumber(children)) - element.appendChild(Builder._text(children)); - }, - _isStringOrNumber: function(param) { - return(typeof param=='string' || typeof param=='number'); - }, - build: function(html) { - var element = this.node('div'); - $(element).update(html.strip()); - return element.down(); - }, - dump: function(scope) { - if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope - - var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " + - "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " + - "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+ - "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+ - "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+ - "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/); - - tags.each( function(tag){ - scope[tag] = function() { - return Builder.node.apply(Builder, [tag].concat($A(arguments))); - }; - }); - } -}; \ No newline at end of file diff --git a/sources/html/js/calc.js b/sources/html/js/calc.js deleted file mode 100644 index 37477c5..0000000 --- a/sources/html/js/calc.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - * This file is part of NOALYSS. - * - * NOALYSS is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * NOALYSS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NOALYSS; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder danydb@aevalys.eu - -/*! \file - * \brief This file show a little online calculator, in the caller - * the span id result, listing, the id form calc_line and the - * - * - */ -var p_history=""; -var p_variable=""; -// add input -function cal() -{ - p_variable=this.document.getElementById('inp').value; - if (p_variable.search(/^\s*$/) !=-1) - { - return; - } - try - { - Compute(); - p_variable=p_variable.replace(/ /g,""); - p_variable=p_variable.replace(/\+/g,"+ "); - p_variable=p_variable.replace(/-/g,"- "); - p_variable=p_variable.replace(/\//g,"/ "); - - sub=eval(p_variable); - var result=parseFloat(sub); - result=Math.round(result*100)/100; - } - catch(exception) - { - alert_box("Mauvaise formule\n"+p_variable); - return false; - } - p_history=p_history+'
    '+p_variable; - p_history+="="+result.toString(); - var str_sub="

    Total :"+p_variable+" = "+result.toString()+"

    "; - this.document.getElementById("sub_total").innerHTML=str_sub; - this.document.getElementById("listing").innerHTML=p_history; - this.document.getElementById('inp').value=""; -} -// Clean -// -function Clean() -{ - this.document.getElementById('listing').innerHTML=""; - this.document.getElementById('result').innerHTML=""; - this.document.getElementById('sub_total').innerHTML=""; - this.document.getElementById('inp').value=""; - this.document.getElementById('inp').focus(); - -} - -function Compute() -{ - var tot=0; - var ret=""; - - this.document.getElementById('inp').value=""; - this.document.getElementById('inp').focus(); -} diff --git a/sources/html/js/calendar-setup.js b/sources/html/js/calendar-setup.js deleted file mode 100644 index c269f7d..0000000 --- a/sources/html/js/calendar-setup.js +++ /dev/null @@ -1,200 +0,0 @@ -/* Copyright Mihai Bazon, 2002, 2003 | http://dynarch.com/mishoo/ - * --------------------------------------------------------------------------- - * - * The DHTML Calendar - * - * Details and latest version at: - * http://dynarch.com/mishoo/calendar.epl - * - * This script is distributed under the GNU Lesser General Public License. - * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html - * - * This file defines helper functions for setting up the calendar. They are - * intended to help non-programmers get a working calendar on their site - * quickly. This script should not be seen as part of the calendar. It just - * shows you what one can do with the calendar, while in the same time - * providing a quick and simple method for setting it up. If you need - * exhaustive customization of the calendar creation process feel free to - * modify this code to suit your needs (this is recommended and much better - * than modifying calendar.js itself). - */ - -// $Id$ - -/** - * This function "patches" an input field (or other element) to use a calendar - * widget for date selection. - * - * The "params" is a single object that can have the following properties: - * - * prop. name | description - * ------------------------------------------------------------------------------------------------- - * inputField | the ID of an input field to store the date - * displayArea | the ID of a DIV or other element to show the date - * button | ID of a button or other element that will trigger the calendar - * eventName | event that will trigger the calendar, without the "on" prefix (default: "click") - * ifFormat | date format that will be stored in the input field - * daFormat | the date format that will be used to display the date in displayArea - * singleClick | (true/false) wether the calendar is in single click mode or not (default: true) - * firstDay | numeric: 0 to 6. "0" means display Sunday first, "1" means display Monday first, etc. - * align | alignment (default: "Br"); if you don't know what's this see the calendar documentation - * range | array with 2 elements. Default: [1900, 2999] -- the range of years available - * weekNumbers | (true/false) if it's true (default) the calendar will display week numbers - * flat | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID - * flatCallback | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar) - * disableFunc | function that receives a JS Date object and should return true if that date has to be disabled in the calendar - * onSelect | function that gets called when a date is selected. You don't _have_ to supply this (the default is generally okay) - * onClose | function that gets called when the calendar is closed. [default] - * onUpdate | function that gets called after the date is updated in the input field. Receives a reference to the calendar. - * date | the date that the calendar will be initially displayed to - * showsTime | default: false; if true the calendar will include a time selector - * timeFormat | the time format; can be "12" or "24", default is "12" - * electric | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close - * step | configures the step of the years in drop-down boxes; default: 2 - * position | configures the calendar absolute position; default: null - * cache | if "true" (but default: "false") it will reuse the same calendar object, where possible - * showOthers | if "true" (but default: "false") it will show days from other months too - * - * None of them is required, they all have default values. However, if you - * pass none of "inputField", "displayArea" or "button" you'll get a warning - * saying "nothing to setup". - */ -Calendar.setup = function (params) { - function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; - - param_default("inputField", null); - param_default("displayArea", null); - param_default("button", null); - param_default("eventName", "click"); - param_default("ifFormat", "%Y/%m/%d"); - param_default("daFormat", "%Y/%m/%d"); - param_default("singleClick", true); - param_default("disableFunc", null); - param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined - param_default("dateText", null); - param_default("firstDay", null); - param_default("align", "Br"); - param_default("range", [1900, 2999]); - param_default("weekNumbers", true); - param_default("flat", null); - param_default("flatCallback", null); - param_default("onSelect", null); - param_default("onClose", null); - param_default("onUpdate", null); - param_default("date", null); - param_default("showsTime", false); - param_default("timeFormat", "24"); - param_default("electric", true); - param_default("step", 2); - param_default("position", null); - param_default("cache", false); - param_default("showOthers", false); - param_default("multiple", null); - - var tmp = ["inputField", "displayArea", "button"]; - for (var i in tmp) { - if (typeof params[tmp[i]] == "string") { - params[tmp[i]] = document.getElementById(params[tmp[i]]); - } - } - if (!(params.flat || params.multiple || params.inputField || params.displayArea || params.button)) { - alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); - return false; - } - - function onSelect(cal) { - var p = cal.params; - var update = (cal.dateClicked || p.electric); - if (update && p.inputField) { - p.inputField.value = cal.date.print(p.ifFormat); - if (typeof p.inputField.onchange == "function") - p.inputField.onchange(); - } - if (update && p.displayArea) - p.displayArea.innerHTML = cal.date.print(p.daFormat); - if (update && typeof p.onUpdate == "function") - p.onUpdate(cal); - if (update && p.flat) { - if (typeof p.flatCallback == "function") - p.flatCallback(cal); - } - if (update && p.singleClick && cal.dateClicked) - cal.callCloseHandler(); - }; - - if (params.flat != null) { - if (typeof params.flat == "string") - params.flat = document.getElementById(params.flat); - if (!params.flat) { - alert("Calendar.setup:\n Flat specified but can't find parent."); - return false; - } - var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); - cal.showsOtherMonths = params.showOthers; - cal.showsTime = params.showsTime; - cal.time24 = (params.timeFormat == "24"); - cal.params = params; - cal.weekNumbers = params.weekNumbers; - cal.setRange(params.range[0], params.range[1]); - cal.setDateStatusHandler(params.dateStatusFunc); - cal.getDateText = params.dateText; - if (params.ifFormat) { - cal.setDateFormat(params.ifFormat); - } - if (params.inputField && typeof params.inputField.value == "string") { - cal.parseDate(params.inputField.value); - } - cal.create(params.flat); - cal.show(); - return false; - } - - var triggerEl = params.button || params.displayArea || params.inputField; - triggerEl["on" + params.eventName] = function() { - var dateEl = params.inputField || params.displayArea; - var dateFmt = params.inputField ? params.ifFormat : params.daFormat; - var mustCreate = false; - var cal = window.calendar; - if (dateEl) - params.date = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt); - if (!(cal && params.cache)) { - window.calendar = cal = new Calendar(params.firstDay, - params.date, - params.onSelect || onSelect, - params.onClose || function(cal) { cal.hide(); }); - cal.showsTime = params.showsTime; - cal.time24 = (params.timeFormat == "24"); - cal.weekNumbers = params.weekNumbers; - mustCreate = true; - } else { - if (params.date) - cal.setDate(params.date); - cal.hide(); - } - if (params.multiple) { - cal.multiple = {}; - for (var i = params.multiple.length; --i >= 0;) { - var d = params.multiple[i]; - var ds = d.print("%Y%m%d"); - cal.multiple[ds] = d; - } - } - cal.showsOtherMonths = params.showOthers; - cal.yearStep = params.step; - cal.setRange(params.range[0], params.range[1]); - cal.params = params; - cal.setDateStatusHandler(params.dateStatusFunc); - cal.getDateText = params.dateText; - cal.setDateFormat(dateFmt); - if (mustCreate) - cal.create(); - cal.refresh(); - if (!params.position) - cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); - else - cal.showAt(params.position[0], params.position[1]); - return false; - }; - - return cal; -}; diff --git a/sources/html/js/calendar.js b/sources/html/js/calendar.js deleted file mode 100644 index 223909a..0000000 --- a/sources/html/js/calendar.js +++ /dev/null @@ -1,1810 +0,0 @@ -/* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo - * ----------------------------------------------------------- - * - * The DHTML Calendar, version 1.0 "It is happening again" - * - * Details and latest version at: - * www.dynarch.com/projects/calendar - * - * This script is developed by Dynarch.com. Visit us at www.dynarch.com. - * - * This script is distributed under the GNU Lesser General Public License. - * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html - */ - -// $Id$ - -/** The Calendar object constructor. */ -Calendar = function (firstDayOfWeek, dateStr, onSelected, onClose) { - // member variables - this.activeDiv = null; - this.currentDateEl = null; - this.getDateStatus = null; - this.getDateToolTip = null; - this.getDateText = null; - this.timeout = null; - this.onSelected = onSelected || null; - this.onClose = onClose || null; - this.dragging = false; - this.hidden = false; - this.minYear = 1970; - this.maxYear = 2050; - this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"]; - this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"]; - this.isPopup = true; - this.weekNumbers = true; - this.firstDayOfWeek = typeof firstDayOfWeek == "number" ? firstDayOfWeek : Calendar._FD; // 0 for Sunday, 1 for Monday, etc. - this.showsOtherMonths = false; - this.dateStr = dateStr; - this.ar_days = null; - this.showsTime = false; - this.time24 = true; - this.yearStep = 2; - this.hiliteToday = true; - this.multiple = null; - // HTML elements - this.table = null; - this.element = null; - this.tbody = null; - this.firstdayname = null; - // Combo boxes - this.monthsCombo = null; - this.yearsCombo = null; - this.hilitedMonth = null; - this.activeMonth = null; - this.hilitedYear = null; - this.activeYear = null; - // Information - this.dateClicked = false; - - // one-time initializations - if (typeof Calendar._SDN == "undefined") { - // table of short day names - if (typeof Calendar._SDN_len == "undefined") - Calendar._SDN_len = 3; - var ar = new Array(); - for (var i = 8; i > 0;) { - ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len); - } - Calendar._SDN = ar; - // table of short month names - if (typeof Calendar._SMN_len == "undefined") - Calendar._SMN_len = 3; - ar = new Array(); - for (var i = 12; i > 0;) { - ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len); - } - Calendar._SMN = ar; - } -}; - -// ** constants - -/// "static", needed for event handlers. -Calendar._C = null; - -/// detect a special case of "web browser" -Calendar.is_ie = ( /msie/i.test(navigator.userAgent) && - !/opera/i.test(navigator.userAgent) ); - -Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) ); - -/// detect Opera browser -Calendar.is_opera = /opera/i.test(navigator.userAgent); - -/// detect KHTML-based browsers -Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent); - -// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate -// library, at some point. - -Calendar.getAbsolutePos = function(el) { - var SL = 0, ST = 0; - var is_div = /^div$/i.test(el.tagName); - if (is_div && el.scrollLeft) - SL = el.scrollLeft; - if (is_div && el.scrollTop) - ST = el.scrollTop; - var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST }; - if (el.offsetParent) { - var tmp = this.getAbsolutePos(el.offsetParent); - r.x += tmp.x; - r.y += tmp.y; - } - return r; -}; - -Calendar.isRelated = function (el, evt) { - var related = evt.relatedTarget; - if (!related) { - var type = evt.type; - if (type == "mouseover") { - related = evt.fromElement; - } else if (type == "mouseout") { - related = evt.toElement; - } - } - while (related) { - if (related == el) { - return true; - } - related = related.parentNode; - } - return false; -}; - -Calendar.removeClass = function(el, className) { - if (!(el && el.className)) { - return; - } - var cls = el.className.split(" "); - var ar = new Array(); - for (var i = cls.length; i > 0;) { - if (cls[--i] != className) { - ar[ar.length] = cls[i]; - } - } - el.className = ar.join(" "); -}; - -Calendar.addClass = function(el, className) { - Calendar.removeClass(el, className); - el.className += " " + className; -}; - -// FIXME: the following 2 functions totally suck, are useless and should be replaced immediately. -Calendar.getElement = function(ev) { - var f = Calendar.is_ie ? window.event.srcElement : ev.currentTarget; - while (f.nodeType != 1 || /^div$/i.test(f.tagName)) - f = f.parentNode; - return f; -}; - -Calendar.getTargetElement = function(ev) { - var f = Calendar.is_ie ? window.event.srcElement : ev.target; - while (f.nodeType != 1) - f = f.parentNode; - return f; -}; - -Calendar.stopEvent = function(ev) { - ev || (ev = window.event); - if (Calendar.is_ie) { - ev.cancelBubble = true; - ev.returnValue = false; - } else { - ev.preventDefault(); - ev.stopPropagation(); - } - return false; -}; - -Calendar.addEvent = function(el, evname, func) { - if (el.attachEvent) { // IE - el.attachEvent("on" + evname, func); - } else if (el.addEventListener) { // Gecko / W3C - el.addEventListener(evname, func, true); - } else { - el["on" + evname] = func; - } -}; - -Calendar.removeEvent = function(el, evname, func) { - if (el.detachEvent) { // IE - el.detachEvent("on" + evname, func); - } else if (el.removeEventListener) { // Gecko / W3C - el.removeEventListener(evname, func, true); - } else { - el["on" + evname] = null; - } -}; - -Calendar.createElement = function(type, parent) { - var el = null; - if (document.createElementNS) { - // use the XHTML namespace; IE won't normally get here unless - // _they_ "fix" the DOM2 implementation. - el = document.createElementNS("http://www.w3.org/1999/xhtml", type); - } else { - el = document.createElement(type); - } - if (typeof parent != "undefined") { - parent.appendChild(el); - } - return el; -}; - -// END: UTILITY FUNCTIONS - -// BEGIN: CALENDAR STATIC FUNCTIONS - -/** Internal -- adds a set of events to make some element behave like a button. */ -Calendar._add_evs = function(el) { - with (Calendar) { - addEvent(el, "mouseover", dayMouseOver); - addEvent(el, "mousedown", dayMouseDown); - addEvent(el, "mouseout", dayMouseOut); - if (is_ie) { - addEvent(el, "dblclick", dayMouseDblClick); - el.setAttribute("unselectable", true); - } - } -}; - -Calendar.findMonth = function(el) { - if (typeof el.month != "undefined") { - return el; - } else if (typeof el.parentNode.month != "undefined") { - return el.parentNode; - } - return null; -}; - -Calendar.findYear = function(el) { - if (typeof el.year != "undefined") { - return el; - } else if (typeof el.parentNode.year != "undefined") { - return el.parentNode; - } - return null; -}; - -Calendar.showMonthsCombo = function () { - var cal = Calendar._C; - if (!cal) { - return false; - } - var cal = cal; - var cd = cal.activeDiv; - var mc = cal.monthsCombo; - if (cal.hilitedMonth) { - Calendar.removeClass(cal.hilitedMonth, "hilite"); - } - if (cal.activeMonth) { - Calendar.removeClass(cal.activeMonth, "active"); - } - var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()]; - Calendar.addClass(mon, "active"); - cal.activeMonth = mon; - var s = mc.style; - s.display = "block"; - if (cd.navtype < 0) - s.left = cd.offsetLeft + "px"; - else { - var mcw = mc.offsetWidth; - if (typeof mcw == "undefined") - // Konqueror brain-dead techniques - mcw = 50; - s.left = (cd.offsetLeft + cd.offsetWidth - mcw) + "px"; - } - s.top = (cd.offsetTop + cd.offsetHeight) + "px"; -}; - -Calendar.showYearsCombo = function (fwd) { - var cal = Calendar._C; - if (!cal) { - return false; - } - var cal = cal; - var cd = cal.activeDiv; - var yc = cal.yearsCombo; - if (cal.hilitedYear) { - Calendar.removeClass(cal.hilitedYear, "hilite"); - } - if (cal.activeYear) { - Calendar.removeClass(cal.activeYear, "active"); - } - cal.activeYear = null; - var Y = cal.date.getFullYear() + (fwd ? 1 : -1); - var yr = yc.firstChild; - var show = false; - for (var i = 12; i > 0; --i) { - if (Y >= cal.minYear && Y <= cal.maxYear) { - yr.innerHTML = Y; - yr.year = Y; - yr.style.display = "block"; - show = true; - } else { - yr.style.display = "none"; - } - yr = yr.nextSibling; - Y += fwd ? cal.yearStep : -cal.yearStep; - } - if (show) { - var s = yc.style; - s.display = "block"; - if (cd.navtype < 0) - s.left = cd.offsetLeft + "px"; - else { - var ycw = yc.offsetWidth; - if (typeof ycw == "undefined") - // Konqueror brain-dead techniques - ycw = 50; - s.left = (cd.offsetLeft + cd.offsetWidth - ycw) + "px"; - } - s.top = (cd.offsetTop + cd.offsetHeight) + "px"; - } -}; - -// event handlers - -Calendar.tableMouseUp = function(ev) { - var cal = Calendar._C; - if (!cal) { - return false; - } - if (cal.timeout) { - clearTimeout(cal.timeout); - } - var el = cal.activeDiv; - if (!el) { - return false; - } - var target = Calendar.getTargetElement(ev); - ev || (ev = window.event); - Calendar.removeClass(el, "active"); - if (target == el || target.parentNode == el) { - Calendar.cellClick(el, ev); - } - var mon = Calendar.findMonth(target); - var date = null; - if (mon) { - date = new Date(cal.date); - if (mon.month != date.getMonth()) { - date.setMonth(mon.month); - cal.setDate(date); - cal.dateClicked = false; - cal.callHandler(); - } - } else { - var year = Calendar.findYear(target); - if (year) { - date = new Date(cal.date); - if (year.year != date.getFullYear()) { - date.setFullYear(year.year); - cal.setDate(date); - cal.dateClicked = false; - cal.callHandler(); - } - } - } - with (Calendar) { - removeEvent(document, "mouseup", tableMouseUp); - removeEvent(document, "mouseover", tableMouseOver); - removeEvent(document, "mousemove", tableMouseOver); - cal._hideCombos(); - _C = null; - return stopEvent(ev); - } -}; - -Calendar.tableMouseOver = function (ev) { - var cal = Calendar._C; - if (!cal) { - return; - } - var el = cal.activeDiv; - var target = Calendar.getTargetElement(ev); - if (target == el || target.parentNode == el) { - Calendar.addClass(el, "hilite active"); - Calendar.addClass(el.parentNode, "rowhilite"); - } else { - if (typeof el.navtype == "undefined" || (el.navtype != 50 && (el.navtype == 0 || Math.abs(el.navtype) > 2))) - Calendar.removeClass(el, "active"); - Calendar.removeClass(el, "hilite"); - Calendar.removeClass(el.parentNode, "rowhilite"); - } - ev || (ev = window.event); - if (el.navtype == 50 && target != el) { - var pos = Calendar.getAbsolutePos(el); - var w = el.offsetWidth; - var x = ev.clientX; - var dx; - var decrease = true; - if (x > pos.x + w) { - dx = x - pos.x - w; - decrease = false; - } else - dx = pos.x - x; - - if (dx < 0) dx = 0; - var range = el._range; - var current = el._current; - var count = Math.floor(dx / 10) % range.length; - for (var i = range.length; --i >= 0;) - if (range[i] == current) - break; - while (count-- > 0) - if (decrease) { - if (--i < 0) - i = range.length - 1; - } else if ( ++i >= range.length ) - i = 0; - var newval = range[i]; - el.innerHTML = newval; - - cal.onUpdateTime(); - } - var mon = Calendar.findMonth(target); - if (mon) { - if (mon.month != cal.date.getMonth()) { - if (cal.hilitedMonth) { - Calendar.removeClass(cal.hilitedMonth, "hilite"); - } - Calendar.addClass(mon, "hilite"); - cal.hilitedMonth = mon; - } else if (cal.hilitedMonth) { - Calendar.removeClass(cal.hilitedMonth, "hilite"); - } - } else { - if (cal.hilitedMonth) { - Calendar.removeClass(cal.hilitedMonth, "hilite"); - } - var year = Calendar.findYear(target); - if (year) { - if (year.year != cal.date.getFullYear()) { - if (cal.hilitedYear) { - Calendar.removeClass(cal.hilitedYear, "hilite"); - } - Calendar.addClass(year, "hilite"); - cal.hilitedYear = year; - } else if (cal.hilitedYear) { - Calendar.removeClass(cal.hilitedYear, "hilite"); - } - } else if (cal.hilitedYear) { - Calendar.removeClass(cal.hilitedYear, "hilite"); - } - } - return Calendar.stopEvent(ev); -}; - -Calendar.tableMouseDown = function (ev) { - if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) { - return Calendar.stopEvent(ev); - } -}; - -Calendar.calDragIt = function (ev) { - var cal = Calendar._C; - if (!(cal && cal.dragging)) { - return false; - } - var posX; - var posY; - if (Calendar.is_ie) { - posY = window.event.clientY + document.body.scrollTop; - posX = window.event.clientX + document.body.scrollLeft; - } else { - posX = ev.pageX; - posY = ev.pageY; - } - cal.hideShowCovered(); - var st = cal.element.style; - st.left = (posX - cal.xOffs) + "px"; - st.top = (posY - cal.yOffs) + "px"; - return Calendar.stopEvent(ev); -}; - -Calendar.calDragEnd = function (ev) { - var cal = Calendar._C; - if (!cal) { - return false; - } - cal.dragging = false; - with (Calendar) { - removeEvent(document, "mousemove", calDragIt); - removeEvent(document, "mouseup", calDragEnd); - tableMouseUp(ev); - } - cal.hideShowCovered(); -}; - -Calendar.dayMouseDown = function(ev) { - var el = Calendar.getElement(ev); - if (el.disabled) { - return false; - } - var cal = el.calendar; - cal.activeDiv = el; - Calendar._C = cal; - if (el.navtype != 300) with (Calendar) { - if (el.navtype == 50) { - el._current = el.innerHTML; - addEvent(document, "mousemove", tableMouseOver); - } else - addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver); - addClass(el, "hilite active"); - addEvent(document, "mouseup", tableMouseUp); - } else if (cal.isPopup) { - cal._dragStart(ev); - } - if (el.navtype == -1 || el.navtype == 1) { - if (cal.timeout) clearTimeout(cal.timeout); - cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250); - } else if (el.navtype == -2 || el.navtype == 2) { - if (cal.timeout) clearTimeout(cal.timeout); - cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250); - } else { - cal.timeout = null; - } - return Calendar.stopEvent(ev); -}; - -Calendar.dayMouseDblClick = function(ev) { - Calendar.cellClick(Calendar.getElement(ev), ev || window.event); - if (Calendar.is_ie) { - document.selection.empty(); - } -}; - -Calendar.dayMouseOver = function(ev) { - var el = Calendar.getElement(ev); - if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) { - return false; - } - if (el.ttip) { - if (el.ttip.substr(0, 1) == "_") { - el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1); - } - el.calendar.tooltips.innerHTML = el.ttip; - } - if (el.navtype != 300) { - Calendar.addClass(el, "hilite"); - if (el.caldate) { - Calendar.addClass(el.parentNode, "rowhilite"); - } - } - return Calendar.stopEvent(ev); -}; - -Calendar.dayMouseOut = function(ev) { - with (Calendar) { - var el = getElement(ev); - if (isRelated(el, ev) || _C || el.disabled) - return false; - removeClass(el, "hilite"); - if (el.caldate) - removeClass(el.parentNode, "rowhilite"); - if (el.calendar) - el.calendar.tooltips.innerHTML = _TT["SEL_DATE"]; - return stopEvent(ev); - } -}; - -/** - * A generic "click" handler :) handles all types of buttons defined in this - * calendar. - */ -Calendar.cellClick = function(el, ev) { - var cal = el.calendar; - var closing = false; - var newdate = false; - var date = null; - if (typeof el.navtype == "undefined") { - if (cal.currentDateEl) { - Calendar.removeClass(cal.currentDateEl, "selected"); - Calendar.addClass(el, "selected"); - closing = (cal.currentDateEl == el); - if (!closing) { - cal.currentDateEl = el; - } - } - cal.date.setDateOnly(el.caldate); - date = cal.date; - var other_month = !(cal.dateClicked = !el.otherMonth); - if (!other_month && !cal.currentDateEl) - cal._toggleMultipleDate(new Date(date)); - else - newdate = !el.disabled; - // a date was clicked - if (other_month) - cal._init(cal.firstDayOfWeek, date); - } else { - if (el.navtype == 200) { - Calendar.removeClass(el, "hilite"); - cal.callCloseHandler(); - return; - } - date = new Date(cal.date); - if (el.navtype == 0) - date.setDateOnly(new Date()); // TODAY - // unless "today" was clicked, we assume no date was clicked so - // the selected handler will know not to close the calenar when - // in single-click mode. - // cal.dateClicked = (el.navtype == 0); - cal.dateClicked = false; - var year = date.getFullYear(); - var mon = date.getMonth(); - function setMonth(m) { - var day = date.getDate(); - var max = date.getMonthDays(m); - if (day > max) { - date.setDate(max); - } - date.setMonth(m); - }; - switch (el.navtype) { - case 400: - Calendar.removeClass(el, "hilite"); - var text = Calendar._TT["ABOUT"]; - if (typeof text != "undefined") { - text += cal.showsTime ? Calendar._TT["ABOUT_TIME"] : ""; - } else { - // FIXME: this should be removed as soon as lang files get updated! - text = "Help and about box text is not translated into this language.\n" + - "If you know this language and you feel generous please update\n" + - "the corresponding file in \"lang\" subdir to match calendar-en.js\n" + - "and send it back to to get it into the distribution ;-)\n\n" + - "Thank you!\n" + - "http://dynarch.com/mishoo/calendar.epl\n"; - } - alert(text); - return; - case -2: - if (year > cal.minYear) { - date.setFullYear(year - 1); - } - break; - case -1: - if (mon > 0) { - setMonth(mon - 1); - } else if (year-- > cal.minYear) { - date.setFullYear(year); - setMonth(11); - } - break; - case 1: - if (mon < 11) { - setMonth(mon + 1); - } else if (year < cal.maxYear) { - date.setFullYear(year + 1); - setMonth(0); - } - break; - case 2: - if (year < cal.maxYear) { - date.setFullYear(year + 1); - } - break; - case 100: - cal.setFirstDayOfWeek(el.fdow); - return; - case 50: - var range = el._range; - var current = el.innerHTML; - for (var i = range.length; --i >= 0;) - if (range[i] == current) - break; - if (ev && ev.shiftKey) { - if (--i < 0) - i = range.length - 1; - } else if ( ++i >= range.length ) - i = 0; - var newval = range[i]; - el.innerHTML = newval; - cal.onUpdateTime(); - return; - case 0: - // TODAY will bring us here - if ((typeof cal.getDateStatus == "function") && - cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) { - return false; - } - break; - } - if (!date.equalsTo(cal.date)) { - cal.setDate(date); - newdate = true; - } else if (el.navtype == 0) - newdate = closing = true; - } - if (newdate) { - ev && cal.callHandler(); - } - if (closing) { - Calendar.removeClass(el, "hilite"); - ev && cal.callCloseHandler(); - } -}; - -// END: CALENDAR STATIC FUNCTIONS - -// BEGIN: CALENDAR OBJECT FUNCTIONS - -/** - * This function creates the calendar inside the given parent. If _par is - * null than it creates a popup calendar inside the BODY element. If _par is - * an element, be it BODY, then it creates a non-popup calendar (still - * hidden). Some properties need to be set before calling this function. - */ -Calendar.prototype.create = function (_par) { - var parent = null; - if (! _par) { - // default parent is the document body, in which case we create - // a popup calendar. - parent = document.getElementsByTagName("body")[0]; - this.isPopup = true; - } else { - parent = _par; - this.isPopup = false; - } - this.date = this.dateStr ? new Date(this.dateStr) : new Date(); - - var table = Calendar.createElement("table"); - this.table = table; - table.cellSpacing = 0; - table.cellPadding = 0; - table.calendar = this; - Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown); - - var div = Calendar.createElement("div"); - this.element = div; - div.className = "calendar"; - if (this.isPopup) { - div.style.position = "absolute"; - div.style.display = "none"; - } - div.appendChild(table); - - var thead = Calendar.createElement("thead", table); - var cell = null; - var row = null; - - var cal = this; - var hh = function (text, cs, navtype) { - cell = Calendar.createElement("td", row); - cell.colSpan = cs; - cell.className = "button"; - if (navtype != 0 && Math.abs(navtype) <= 2) - cell.className += " nav"; - Calendar._add_evs(cell); - cell.calendar = cal; - cell.navtype = navtype; - cell.innerHTML = "
    " + text + "
    "; - return cell; - }; - - row = Calendar.createElement("tr", thead); - var title_length = 6; - (this.isPopup) && --title_length; - (this.weekNumbers) && ++title_length; - - hh("?", 1, 400).ttip = Calendar._TT["INFO"]; - this.title = hh("", title_length, 300); - this.title.className = "title"; - if (this.isPopup) { - this.title.ttip = Calendar._TT["DRAG_TO_MOVE"]; - this.title.style.cursor = "move"; - hh("×", 1, 200).ttip = Calendar._TT["CLOSE"]; - } - - row = Calendar.createElement("tr", thead); - row.className = "headrow"; - - this._nav_py = hh("«", 1, -2); - this._nav_py.ttip = Calendar._TT["PREV_YEAR"]; - - this._nav_pm = hh("‹", 1, -1); - this._nav_pm.ttip = Calendar._TT["PREV_MONTH"]; - - this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0); - this._nav_now.ttip = Calendar._TT["GO_TODAY"]; - - this._nav_nm = hh("›", 1, 1); - this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"]; - - this._nav_ny = hh("»", 1, 2); - this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"]; - - // day names - row = Calendar.createElement("tr", thead); - row.className = "daynames"; - if (this.weekNumbers) { - cell = Calendar.createElement("td", row); - cell.className = "name wn"; - cell.innerHTML = Calendar._TT["WK"]; - } - for (var i = 7; i > 0; --i) { - cell = Calendar.createElement("td", row); - if (!i) { - cell.navtype = 100; - cell.calendar = this; - Calendar._add_evs(cell); - } - } - this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild; - this._displayWeekdays(); - - var tbody = Calendar.createElement("tbody", table); - this.tbody = tbody; - - for (i = 6; i > 0; --i) { - row = Calendar.createElement("tr", tbody); - if (this.weekNumbers) { - cell = Calendar.createElement("td", row); - } - for (var j = 7; j > 0; --j) { - cell = Calendar.createElement("td", row); - cell.calendar = this; - Calendar._add_evs(cell); - } - } - - if (this.showsTime) { - row = Calendar.createElement("tr", tbody); - row.className = "time"; - - cell = Calendar.createElement("td", row); - cell.className = "time"; - cell.colSpan = 2; - cell.innerHTML = Calendar._TT["TIME"] || " "; - - cell = Calendar.createElement("td", row); - cell.className = "time"; - cell.colSpan = this.weekNumbers ? 4 : 3; - - (function(){ - function makeTimePart(className, init, range_start, range_end) { - var part = Calendar.createElement("span", cell); - part.className = className; - part.innerHTML = init; - part.calendar = cal; - part.ttip = Calendar._TT["TIME_PART"]; - part.navtype = 50; - part._range = []; - if (typeof range_start != "number") - part._range = range_start; - else { - for (var i = range_start; i <= range_end; ++i) { - var txt; - if (i < 10 && range_end >= 10) txt = '0' + i; - else txt = '' + i; - part._range[part._range.length] = txt; - } - } - Calendar._add_evs(part); - return part; - }; - var hrs = cal.date.getHours(); - var mins = cal.date.getMinutes(); - var t12 = !cal.time24; - var pm = (hrs > 12); - if (t12 && pm) hrs -= 12; - var H = makeTimePart("hour", hrs, t12 ? 1 : 0, t12 ? 12 : 23); - var span = Calendar.createElement("span", cell); - span.innerHTML = ":"; - span.className = "colon"; - var M = makeTimePart("minute", mins, 0, 59); - var AP = null; - cell = Calendar.createElement("td", row); - cell.className = "time"; - cell.colSpan = 2; - if (t12) - AP = makeTimePart("ampm", pm ? "pm" : "am", ["am", "pm"]); - else - cell.innerHTML = " "; - - cal.onSetTime = function() { - var pm, hrs = this.date.getHours(), - mins = this.date.getMinutes(); - if (t12) { - pm = (hrs >= 12); - if (pm) hrs -= 12; - if (hrs == 0) hrs = 12; - AP.innerHTML = pm ? "pm" : "am"; - } - H.innerHTML = (hrs < 10) ? ("0" + hrs) : hrs; - M.innerHTML = (mins < 10) ? ("0" + mins) : mins; - }; - - cal.onUpdateTime = function() { - var date = this.date; - var h = parseInt(H.innerHTML, 10); - if (t12) { - if (/pm/i.test(AP.innerHTML) && h < 12) - h += 12; - else if (/am/i.test(AP.innerHTML) && h == 12) - h = 0; - } - var d = date.getDate(); - var m = date.getMonth(); - var y = date.getFullYear(); - date.setHours(h); - date.setMinutes(parseInt(M.innerHTML, 10)); - date.setFullYear(y); - date.setMonth(m); - date.setDate(d); - this.dateClicked = false; - this.callHandler(); - }; - })(); - } else { - this.onSetTime = this.onUpdateTime = function() {}; - } - - var tfoot = Calendar.createElement("tfoot", table); - - row = Calendar.createElement("tr", tfoot); - row.className = "footrow"; - - cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300); - cell.className = "ttip"; - if (this.isPopup) { - cell.ttip = Calendar._TT["DRAG_TO_MOVE"]; - cell.style.cursor = "move"; - } - this.tooltips = cell; - - div = Calendar.createElement("div", this.element); - this.monthsCombo = div; - div.className = "combo"; - for (i = 0; i < Calendar._MN.length; ++i) { - var mn = Calendar.createElement("div"); - mn.className = Calendar.is_ie ? "label-IEfix" : "label"; - mn.month = i; - mn.innerHTML = Calendar._SMN[i]; - div.appendChild(mn); - } - - div = Calendar.createElement("div", this.element); - this.yearsCombo = div; - div.className = "combo"; - for (i = 12; i > 0; --i) { - var yr = Calendar.createElement("div"); - yr.className = Calendar.is_ie ? "label-IEfix" : "label"; - div.appendChild(yr); - } - - this._init(this.firstDayOfWeek, this.date); - parent.appendChild(this.element); -}; - -/** keyboard navigation, only for popup calendars */ -Calendar._keyEvent = function(ev) { - var cal = window._dynarch_popupCalendar; - if (!cal || cal.multiple) - return false; - (Calendar.is_ie) && (ev = window.event); - var act = (Calendar.is_ie || ev.type == "keypress"), - K = ev.keyCode; - if (ev.ctrlKey) { - switch (K) { - case 37: // KEY left - act && Calendar.cellClick(cal._nav_pm); - break; - case 38: // KEY up - act && Calendar.cellClick(cal._nav_py); - break; - case 39: // KEY right - act && Calendar.cellClick(cal._nav_nm); - break; - case 40: // KEY down - act && Calendar.cellClick(cal._nav_ny); - break; - default: - return false; - } - } else switch (K) { - case 32: // KEY space (now) - Calendar.cellClick(cal._nav_now); - break; - case 27: // KEY esc - act && cal.callCloseHandler(); - break; - case 37: // KEY left - case 38: // KEY up - case 39: // KEY right - case 40: // KEY down - if (act) { - var prev, x, y, ne, el, step; - prev = K == 37 || K == 38; - step = (K == 37 || K == 39) ? 1 : 7; - function setVars() { - el = cal.currentDateEl; - var p = el.pos; - x = p & 15; - y = p >> 4; - ne = cal.ar_days[y][x]; - };setVars(); - function prevMonth() { - var date = new Date(cal.date); - date.setDate(date.getDate() - step); - cal.setDate(date); - }; - function nextMonth() { - var date = new Date(cal.date); - date.setDate(date.getDate() + step); - cal.setDate(date); - }; - while (1) { - switch (K) { - case 37: // KEY left - if (--x >= 0) - ne = cal.ar_days[y][x]; - else { - x = 6; - K = 38; - continue; - } - break; - case 38: // KEY up - if (--y >= 0) - ne = cal.ar_days[y][x]; - else { - prevMonth(); - setVars(); - } - break; - case 39: // KEY right - if (++x < 7) - ne = cal.ar_days[y][x]; - else { - x = 0; - K = 40; - continue; - } - break; - case 40: // KEY down - if (++y < cal.ar_days.length) - ne = cal.ar_days[y][x]; - else { - nextMonth(); - setVars(); - } - break; - } - break; - } - if (ne) { - if (!ne.disabled) - Calendar.cellClick(ne); - else if (prev) - prevMonth(); - else - nextMonth(); - } - } - break; - case 13: // KEY enter - if (act) - Calendar.cellClick(cal.currentDateEl, ev); - break; - default: - return false; - } - return Calendar.stopEvent(ev); -}; - -/** - * (RE)Initializes the calendar to the given date and firstDayOfWeek - */ -Calendar.prototype._init = function (firstDayOfWeek, date) { - var today = new Date(), - TY = today.getFullYear(), - TM = today.getMonth(), - TD = today.getDate(); - this.table.style.visibility = "hidden"; - var year = date.getFullYear(); - if (year < this.minYear) { - year = this.minYear; - date.setFullYear(year); - } else if (year > this.maxYear) { - year = this.maxYear; - date.setFullYear(year); - } - this.firstDayOfWeek = firstDayOfWeek; - this.date = new Date(date); - var month = date.getMonth(); - var mday = date.getDate(); - var no_days = date.getMonthDays(); - - // calendar voodoo for computing the first day that would actually be - // displayed in the calendar, even if it's from the previous month. - // WARNING: this is magic. ;-) - date.setDate(1); - var day1 = (date.getDay() - this.firstDayOfWeek) % 7; - if (day1 < 0) - day1 += 7; - date.setDate(-day1); - date.setDate(date.getDate() + 1); - - var row = this.tbody.firstChild; - var MN = Calendar._SMN[month]; - var ar_days = this.ar_days = new Array(); - var weekend = Calendar._TT["WEEKEND"]; - var dates = this.multiple ? (this.datesCells = {}) : null; - for (var i = 0; i < 6; ++i, row = row.nextSibling) { - var cell = row.firstChild; - if (this.weekNumbers) { - cell.className = "day wn"; - cell.innerHTML = date.getWeekNumber(); - cell = cell.nextSibling; - } - row.className = "daysrow"; - var hasdays = false, iday, dpos = ar_days[i] = []; - for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(iday + 1)) { - iday = date.getDate(); - var wday = date.getDay(); - cell.className = "day"; - cell.pos = i << 4 | j; - dpos[j] = cell; - var current_month = (date.getMonth() == month); - if (!current_month) { - if (this.showsOtherMonths) { - cell.className += " othermonth"; - cell.otherMonth = true; - } else { - cell.className = "emptycell"; - cell.innerHTML = " "; - cell.disabled = true; - continue; - } - } else { - cell.otherMonth = false; - hasdays = true; - } - cell.disabled = false; - cell.innerHTML = this.getDateText ? this.getDateText(date, iday) : iday; - if (dates) - dates[date.print("%Y%m%d")] = cell; - if (this.getDateStatus) { - var status = this.getDateStatus(date, year, month, iday); - if (this.getDateToolTip) { - var toolTip = this.getDateToolTip(date, year, month, iday); - if (toolTip) - cell.title = toolTip; - } - if (status === true) { - cell.className += " disabled"; - cell.disabled = true; - } else { - if (/disabled/i.test(status)) - cell.disabled = true; - cell.className += " " + status; - } - } - if (!cell.disabled) { - cell.caldate = new Date(date); - cell.ttip = "_"; - if (!this.multiple && current_month - && iday == mday && this.hiliteToday) { - cell.className += " selected"; - this.currentDateEl = cell; - } - if (date.getFullYear() == TY && - date.getMonth() == TM && - iday == TD) { - cell.className += " today"; - cell.ttip += Calendar._TT["PART_TODAY"]; - } - if (weekend.indexOf(wday.toString()) != -1) - cell.className += cell.otherMonth ? " oweekend" : " weekend"; - } - } - if (!(hasdays || this.showsOtherMonths)) - row.className = "emptyrow"; - } - this.title.innerHTML = Calendar._MN[month] + ", " + year; - this.onSetTime(); - this.table.style.visibility = "visible"; - this._initMultipleDates(); - // PROFILE - // this.tooltips.innerHTML = "Generated in " + ((new Date()) - today) + " ms"; -}; - -Calendar.prototype._initMultipleDates = function() { - if (this.multiple) { - for (var i in this.multiple) { - var cell = this.datesCells[i]; - var d = this.multiple[i]; - if (!d) - continue; - if (cell) - cell.className += " selected"; - } - } -}; - -Calendar.prototype._toggleMultipleDate = function(date) { - if (this.multiple) { - var ds = date.print("%Y%m%d"); - var cell = this.datesCells[ds]; - if (cell) { - var d = this.multiple[ds]; - if (!d) { - Calendar.addClass(cell, "selected"); - this.multiple[ds] = date; - } else { - Calendar.removeClass(cell, "selected"); - delete this.multiple[ds]; - } - } - } -}; - -Calendar.prototype.setDateToolTipHandler = function (unaryFunction) { - this.getDateToolTip = unaryFunction; -}; - -/** - * Calls _init function above for going to a certain date (but only if the - * date is different than the currently selected one). - */ -Calendar.prototype.setDate = function (date) { - if (!date.equalsTo(this.date)) { - this._init(this.firstDayOfWeek, date); - } -}; - -/** - * Refreshes the calendar. Useful if the "disabledHandler" function is - * dynamic, meaning that the list of disabled date can change at runtime. - * Just * call this function if you think that the list of disabled dates - * should * change. - */ -Calendar.prototype.refresh = function () { - this._init(this.firstDayOfWeek, this.date); -}; - -/** Modifies the "firstDayOfWeek" parameter (pass 0 for Synday, 1 for Monday, etc.). */ -Calendar.prototype.setFirstDayOfWeek = function (firstDayOfWeek) { - this._init(firstDayOfWeek, this.date); - this._displayWeekdays(); -}; - -/** - * Allows customization of what dates are enabled. The "unaryFunction" - * parameter must be a function object that receives the date (as a JS Date - * object) and returns a boolean value. If the returned value is true then - * the passed date will be marked as disabled. - */ -Calendar.prototype.setDateStatusHandler = Calendar.prototype.setDisabledHandler = function (unaryFunction) { - this.getDateStatus = unaryFunction; -}; - -/** Customization of allowed year range for the calendar. */ -Calendar.prototype.setRange = function (a, z) { - this.minYear = a; - this.maxYear = z; -}; - -/** Calls the first user handler (selectedHandler). */ -Calendar.prototype.callHandler = function () { - if (this.onSelected) { - this.onSelected(this, this.date.print(this.dateFormat)); - } -}; - -/** Calls the second user handler (closeHandler). */ -Calendar.prototype.callCloseHandler = function () { - if (this.onClose) { - this.onClose(this); - } - this.hideShowCovered(); -}; - -/** Removes the calendar object from the DOM tree and destroys it. */ -Calendar.prototype.destroy = function () { - var el = this.element.parentNode; - el.removeChild(this.element); - Calendar._C = null; - window._dynarch_popupCalendar = null; -}; - -/** - * Moves the calendar element to a different section in the DOM tree (changes - * its parent). - */ -Calendar.prototype.reparent = function (new_parent) { - var el = this.element; - el.parentNode.removeChild(el); - new_parent.appendChild(el); -}; - -// This gets called when the user presses a mouse button anywhere in the -// document, if the calendar is shown. If the click was outside the open -// calendar this function closes it. -Calendar._checkCalendar = function(ev) { - var calendar = window._dynarch_popupCalendar; - if (!calendar) { - return false; - } - var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev); - for (; el != null && el != calendar.element; el = el.parentNode); - if (el == null) { - // calls closeHandler which should hide the calendar. - window._dynarch_popupCalendar.callCloseHandler(); - return Calendar.stopEvent(ev); - } -}; - -/** Shows the calendar. */ -Calendar.prototype.show = function () { - var rows = this.table.getElementsByTagName("tr"); - for (var i = rows.length; i > 0;) { - var row = rows[--i]; - Calendar.removeClass(row, "rowhilite"); - var cells = row.getElementsByTagName("td"); - for (var j = cells.length; j > 0;) { - var cell = cells[--j]; - Calendar.removeClass(cell, "hilite"); - Calendar.removeClass(cell, "active"); - } - } - this.element.style.display = "block"; - this.hidden = false; - if (this.isPopup) { - window._dynarch_popupCalendar = this; - Calendar.addEvent(document, "keydown", Calendar._keyEvent); - Calendar.addEvent(document, "keypress", Calendar._keyEvent); - Calendar.addEvent(document, "mousedown", Calendar._checkCalendar); - } - this.hideShowCovered(); -}; - -/** - * Hides the calendar. Also removes any "hilite" from the class of any TD - * element. - */ -Calendar.prototype.hide = function () { - if (this.isPopup) { - Calendar.removeEvent(document, "keydown", Calendar._keyEvent); - Calendar.removeEvent(document, "keypress", Calendar._keyEvent); - Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar); - } - this.element.style.display = "none"; - this.hidden = true; - this.hideShowCovered(); -}; - -/** - * Shows the calendar at a given absolute position (beware that, depending on - * the calendar element style -- position property -- this might be relative - * to the parent's containing rectangle). - */ -Calendar.prototype.showAt = function (x, y) { - var s = this.element.style; - s.left = x + "px"; - s.top = y + "px"; - this.show(); -}; - -/** Shows the calendar near a given element. */ -Calendar.prototype.showAtElement = function (el, opts) { - var self = this; - var p = Calendar.getAbsolutePos(el); - if (!opts || typeof opts != "string") { - this.showAt(p.x, p.y + el.offsetHeight); - return true; - } - function fixPosition(box) { - if (box.x < 0) - box.x = 0; - if (box.y < 0) - box.y = 0; - var cp = document.createElement("div"); - var s = cp.style; - s.position = "absolute"; - s.right = s.bottom = s.width = s.height = "0px"; - document.body.appendChild(cp); - var br = Calendar.getAbsolutePos(cp); - document.body.removeChild(cp); - if (Calendar.is_ie) { - br.y += document.body.scrollTop; - br.x += document.body.scrollLeft; - } else { - br.y += window.scrollY; - br.x += window.scrollX; - } - var tmp = box.x + box.width - br.x; - if (tmp > 0) box.x -= tmp; - tmp = box.y + box.height - br.y; - if (tmp > 0) box.y -= tmp; - }; - this.element.style.display = "block"; - Calendar.continuation_for_the_fucking_khtml_browser = function() { - var w = self.element.offsetWidth; - var h = self.element.offsetHeight; - self.element.style.display = "none"; - var valign = opts.substr(0, 1); - var halign = "l"; - if (opts.length > 1) { - halign = opts.substr(1, 1); - } - // vertical alignment - switch (valign) { - case "T": p.y -= h; break; - case "B": p.y += el.offsetHeight; break; - case "C": p.y += (el.offsetHeight - h) / 2; break; - case "t": p.y += el.offsetHeight - h; break; - case "b": break; // already there - } - // horizontal alignment - switch (halign) { - case "L": p.x -= w; break; - case "R": p.x += el.offsetWidth; break; - case "C": p.x += (el.offsetWidth - w) / 2; break; - case "l": p.x += el.offsetWidth - w; break; - case "r": break; // already there - } - p.width = w; - p.height = h + 40; - self.monthsCombo.style.display = "none"; - fixPosition(p); - self.showAt(p.x, p.y); - }; - if (Calendar.is_khtml) - setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10); - else - Calendar.continuation_for_the_fucking_khtml_browser(); -}; - -/** Customizes the date format. */ -Calendar.prototype.setDateFormat = function (str) { - this.dateFormat = str; -}; - -/** Customizes the tooltip date format. */ -Calendar.prototype.setTtDateFormat = function (str) { - this.ttDateFormat = str; -}; - -/** - * Tries to identify the date represented in a string. If successful it also - * calls this.setDate which moves the calendar to the given date. - */ -Calendar.prototype.parseDate = function(str, fmt) { - if (!fmt) - fmt = this.dateFormat; - this.setDate(Date.parseDate(str, fmt)); -}; - -Calendar.prototype.hideShowCovered = function () { - if (!Calendar.is_ie && !Calendar.is_opera) - return; - function getVisib(obj){ - var value = obj.style.visibility; - if (!value) { - if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C - if (!Calendar.is_khtml) - value = document.defaultView. - getComputedStyle(obj, "").getPropertyValue("visibility"); - else - value = ''; - } else if (obj.currentStyle) { // IE - value = obj.currentStyle.visibility; - } else - value = ''; - } - return value; - }; - - var tags = new Array("applet", "iframe", "select"); - var el = this.element; - - var p = Calendar.getAbsolutePos(el); - var EX1 = p.x; - var EX2 = el.offsetWidth + EX1; - var EY1 = p.y; - var EY2 = el.offsetHeight + EY1; - - for (var k = tags.length; k > 0; ) { - var ar = document.getElementsByTagName(tags[--k]); - var cc = null; - - for (var i = ar.length; i > 0;) { - cc = ar[--i]; - - p = Calendar.getAbsolutePos(cc); - var CX1 = p.x; - var CX2 = cc.offsetWidth + CX1; - var CY1 = p.y; - var CY2 = cc.offsetHeight + CY1; - - if (this.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) { - if (!cc.__msh_save_visibility) { - cc.__msh_save_visibility = getVisib(cc); - } - cc.style.visibility = cc.__msh_save_visibility; - } else { - if (!cc.__msh_save_visibility) { - cc.__msh_save_visibility = getVisib(cc); - } - cc.style.visibility = "hidden"; - } - } - } -}; - -/** Internal function; it displays the bar with the names of the weekday. */ -Calendar.prototype._displayWeekdays = function () { - var fdow = this.firstDayOfWeek; - var cell = this.firstdayname; - var weekend = Calendar._TT["WEEKEND"]; - for (var i = 0; i < 7; ++i) { - cell.className = "day name"; - var realday = (i + fdow) % 7; - if (i) { - cell.ttip = Calendar._TT["DAY_FIRST"].replace("%s", Calendar._DN[realday]); - cell.navtype = 100; - cell.calendar = this; - cell.fdow = realday; - Calendar._add_evs(cell); - } - if (weekend.indexOf(realday.toString()) != -1) { - Calendar.addClass(cell, "weekend"); - } - cell.innerHTML = Calendar._SDN[(i + fdow) % 7]; - cell = cell.nextSibling; - } -}; - -/** Internal function. Hides all combo boxes that might be displayed. */ -Calendar.prototype._hideCombos = function () { - this.monthsCombo.style.display = "none"; - this.yearsCombo.style.display = "none"; -}; - -/** Internal function. Starts dragging the element. */ -Calendar.prototype._dragStart = function (ev) { - if (this.dragging) { - return; - } - this.dragging = true; - var posX; - var posY; - if (Calendar.is_ie) { - posY = window.event.clientY + document.body.scrollTop; - posX = window.event.clientX + document.body.scrollLeft; - } else { - posY = ev.clientY + window.scrollY; - posX = ev.clientX + window.scrollX; - } - var st = this.element.style; - this.xOffs = posX - parseInt(st.left); - this.yOffs = posY - parseInt(st.top); - with (Calendar) { - addEvent(document, "mousemove", calDragIt); - addEvent(document, "mouseup", calDragEnd); - } -}; - -// BEGIN: DATE OBJECT PATCHES - -/** Adds the number of days array to the Date object. */ -Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31); - -/** Constants used for time computations */ -Date.SECOND = 1000 /* milliseconds */; -Date.MINUTE = 60 * Date.SECOND; -Date.HOUR = 60 * Date.MINUTE; -Date.DAY = 24 * Date.HOUR; -Date.WEEK = 7 * Date.DAY; - -Date.parseDate = function(str, fmt) { - var today = new Date(); - var y = 0; - var m = -1; - var d = 0; - var a = str.split(/\W+/); - var b = fmt.match(/%./g); - var i = 0, j = 0; - var hr = 0; - var min = 0; - for (i = 0; i < a.length; ++i) { - if (!a[i]) - continue; - switch (b[i]) { - case "%d": - case "%e": - d = parseInt(a[i], 10); - break; - - case "%m": - m = parseInt(a[i], 10) - 1; - break; - - case "%Y": - case "%y": - y = parseInt(a[i], 10); - (y < 100) && (y += (y > 29) ? 1900 : 2000); - break; - - case "%b": - case "%B": - for (j = 0; j < 12; ++j) { - if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; } - } - break; - - case "%H": - case "%I": - case "%k": - case "%l": - hr = parseInt(a[i], 10); - break; - - case "%P": - case "%p": - if (/pm/i.test(a[i]) && hr < 12) - hr += 12; - else if (/am/i.test(a[i]) && hr >= 12) - hr -= 12; - break; - - case "%M": - min = parseInt(a[i], 10); - break; - } - } - if (isNaN(y)) y = today.getFullYear(); - if (isNaN(m)) m = today.getMonth(); - if (isNaN(d)) d = today.getDate(); - if (isNaN(hr)) hr = today.getHours(); - if (isNaN(min)) min = today.getMinutes(); - if (y != 0 && m != -1 && d != 0) - return new Date(y, m, d, hr, min, 0); - y = 0; m = -1; d = 0; - for (i = 0; i < a.length; ++i) { - if (a[i].search(/[a-zA-Z]+/) != -1) { - var t = -1; - for (j = 0; j < 12; ++j) { - if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; } - } - if (t != -1) { - if (m != -1) { - d = m+1; - } - m = t; - } - } else if (parseInt(a[i], 10) <= 12 && m == -1) { - m = a[i]-1; - } else if (parseInt(a[i], 10) > 31 && y == 0) { - y = parseInt(a[i], 10); - (y < 100) && (y += (y > 29) ? 1900 : 2000); - } else if (d == 0) { - d = a[i]; - } - } - if (y == 0) - y = today.getFullYear(); - if (m != -1 && d != 0) - return new Date(y, m, d, hr, min, 0); - return today; -}; - -/** Returns the number of days in the current month */ -Date.prototype.getMonthDays = function(month) { - var year = this.getFullYear(); - if (typeof month == "undefined") { - month = this.getMonth(); - } - if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) { - return 29; - } else { - return Date._MD[month]; - } -}; - -/** Returns the number of day in the year. */ -Date.prototype.getDayOfYear = function() { - var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); - var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0); - var time = now - then; - return Math.floor(time / Date.DAY); -}; - -/** Returns the number of the week in year, as defined in ISO 8601. */ -Date.prototype.getWeekNumber = function() { - var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); - var DoW = d.getDay(); - d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu - var ms = d.valueOf(); // GMT - d.setMonth(0); - d.setDate(4); // Thu in Week 1 - return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1; -}; - -/** Checks date and time equality */ -Date.prototype.equalsTo = function(date) { - return ((this.getFullYear() == date.getFullYear()) && - (this.getMonth() == date.getMonth()) && - (this.getDate() == date.getDate()) && - (this.getHours() == date.getHours()) && - (this.getMinutes() == date.getMinutes())); -}; - -/** Set only the year, month, date parts (keep existing time) */ -Date.prototype.setDateOnly = function(date) { - var tmp = new Date(date); - this.setDate(1); - this.setFullYear(tmp.getFullYear()); - this.setMonth(tmp.getMonth()); - this.setDate(tmp.getDate()); -}; - -/** Prints the date in a string according to the given format. */ -Date.prototype.print = function (str) { - var m = this.getMonth(); - var d = this.getDate(); - var y = this.getFullYear(); - var wn = this.getWeekNumber(); - var w = this.getDay(); - var s = {}; - var hr = this.getHours(); - var pm = (hr >= 12); - var ir = (pm) ? (hr - 12) : hr; - var dy = this.getDayOfYear(); - if (ir == 0) - ir = 12; - var min = this.getMinutes(); - var sec = this.getSeconds(); - s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N] - s["%A"] = Calendar._DN[w]; // full weekday name - s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N] - s["%B"] = Calendar._MN[m]; // full month name - // FIXME: %c : preferred date and time representation for the current locale - s["%C"] = 1 + Math.floor(y / 100); // the century number - s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31) - s["%e"] = d; // the day of the month (range 1 to 31) - // FIXME: %D : american date style: %m/%d/%y - // FIXME: %E, %F, %G, %g, %h (man strftime) - s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format) - s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format) - s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366) - s["%k"] = hr; // hour, range 0 to 23 (24h format) - s["%l"] = ir; // hour, range 1 to 12 (12h format) - s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12 - s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59 - s["%n"] = "\n"; // a newline character - s["%p"] = pm ? "PM" : "AM"; - s["%P"] = pm ? "pm" : "am"; - // FIXME: %r : the time in am/pm notation %I:%M:%S %p - // FIXME: %R : the time in 24-hour notation %H:%M - s["%s"] = Math.floor(this.getTime() / 1000); - s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59 - s["%t"] = "\t"; // a tab character - // FIXME: %T : the time in 24-hour notation (%H:%M:%S) - s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn; - s["%u"] = w + 1; // the day of the week (range 1 to 7, 1 = MON) - s["%w"] = w; // the day of the week (range 0 to 6, 0 = SUN) - // FIXME: %x : preferred date representation for the current locale without the time - // FIXME: %X : preferred time representation for the current locale without the date - s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99) - s["%Y"] = y; // year with the century - s["%%"] = "%"; // a literal '%' character - - var re = /%./g; - if (!Calendar.is_ie5 && !Calendar.is_khtml) - return str.replace(re, function (par) { return s[par] || par; }); - - var a = str.match(re); - for (var i = 0; i < a.length; i++) { - var tmp = s[a[i]]; - if (tmp) { - re = new RegExp(a[i], 'g'); - str = str.replace(re, tmp); - } - } - - return str; -}; - - if ( Date.prototype.__msh_oldSetFullYear == null ) - { - Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear; - } -//Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear; -Date.prototype.setFullYear = function(y) { - var d = new Date(this); - d.__msh_oldSetFullYear(y); - if (d.getMonth() != this.getMonth()) - this.setDate(28); - this.__msh_oldSetFullYear(y); -}; - -// END: DATE OBJECT PATCHES - - -// global object that remembers the calendar -window._dynarch_popupCalendar = null; diff --git a/sources/html/js/card.js b/sources/html/js/card.js deleted file mode 100644 index bc35323..0000000 --- a/sources/html/js/card.js +++ /dev/null @@ -1,910 +0,0 @@ -/* - * This file is part of NOALYSS. - * - * NOALYSS is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * NOALYSS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NOALYSS; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder danydb@aevalys.eu - -/*! \file - * \brief javascript for searching a card - */ - -var card_layer=1; -/** - *@brief search a card an display the result into a inner box - */ -function boxsearch_card(p_dossier) -{ - try - { - waiting_box(); - removeDiv('boxsearch_card_div'); - var queryString="gDossier="+p_dossier+"&op=cardsearch"+"&card="+$(card_search).value; - var action = new Ajax.Request( - "ajax_misc.php" , - { - method:'get', parameters:queryString, - onFailure:ajax_misc_failure, - onSuccess:function(req){ - remove_waiting_box(); - var y=posY+15; - var div_style="left:10%;width:80%;"+";top:"+y+"px"; - add_div({id:'boxsearch_card_div',cssclass:'inner_box',html:loading(),style:div_style,drag:true}); - $('boxsearch_card_div').innerHTML=req.responseText; - sorttable.makeSortable($('tb_fiche')); - } - } - ); - }catch( e) - { - alert_box(e.getMessage); - } -} -/** - *@brief show the ipopup with the form to search a card - * the properties - * - jrn for the ledger - * - fs for the action - * - price for the price of the card (field to update) - * - tvaid for the tvaid of the card (field to update) - * - inp input text to update with the quickcode - * - label field to update with the name - * - ctl the id to fill with the HTML answer (ending with _content) - */ -function search_card(obj) -{ - try - { - var gDossier=$('gDossier').value; - var inp=obj.inp; - var string_to_search=$(inp).value; - var label=obj.label; - var typecard=obj.typecard; - var price=obj.price; - var tvaid=obj.tvaid; - var jrn=obj.jrn; - if ( jrn==undefined) - { - if ( g('p_jrn')) { - jrn=$('p_jrn').value; - } - else { - jrn=-1; - } - } - var query=encodeJSON({'gDossier':gDossier, - 'inp':inp,'label':label,'price':price,'tvaid':tvaid, - 'ctl':'search_card','op':'fs','jrn':jrn, - 'typecard':typecard,'query':string_to_search - }); - if ( $('search_card') ) { - removeDiv('search_card'); - } - - - waiting_box(); - - - var action=new Ajax.Request ( 'ajax_card.php', - { - method:'get', - parameters:query, - onFailure:errorFid, - onSuccess:result_card_search - } - ); - } - catch(e) - { - alert_box('search_card failed'+e.message); - } -} -/** - *@brief Display form for select card to add to action : other_concerned - *action_add_concerned_card - */ -function action_add_concerned_card(obj) -{ - try - { - var dossier = 0; - var inp=""; - var ag_id=0; - - if (obj.dossier) { - dossier = obj.dossier; /* From the button */ - } - if (obj.ag_id) { - ag_id=obj.ag_id; - } - /* from the form */ - if (obj.elements) { - if (obj.elements['gDossier']) - { - dossier = obj.elements['gDossier'].value; - } - - if (obj.elements['query']) { - inp = obj.elements['query'].value; - } - - if (obj.elements['ag_id']) { - ag_id = obj.elements['ag_id'].value; - } - } - if (dossier == 0) { - throw "obj.dossier not found"; - } - if (ag_id == 0) { - throw "obj.ag_id not found"; - } - var query = encodeJSON({ - 'gDossier': dossier, - 'op': 'action_add_concerned_card', - 'query' : inp, - 'ctl' : 'unused', - 'ag_id' : ag_id - }); - - waiting_box(); - - - var action = new Ajax.Request('ajax_card.php', - { - method: 'get', - parameters: query, - onFailure: errorFid, - onSuccess: function (req, txt) - { - try { - remove_waiting_box(); - var answer = req.responseXML; - var a = answer.getElementsByTagName('ctl'); - if (a.length == 0) - { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - var html = answer.getElementsByTagName('code'); - var namectl = a[0].firstChild.nodeValue; - var nodeXml = html[0]; - var code_html = getNodeText(nodeXml); - code_html = unescape_xml(code_html); - - var sx = 0; - if (window.scrollY) - { - sx = window.scrollY + 40; - } - else - { - sx = document.body.scrollTop + 60; - } - var div_style = "top:" + sx + "px;height:80%"; - if ( ! $('search_card')) { add_div({id: 'search_card', cssclass: 'inner_box', html: "", style: div_style, drag: true}); } - $('search_card').innerHTML = code_html; - $('query').focus(); - }catch (e) { - alert_box(e.message); - } - } - } - ); - } - catch (e) - { - alert_box('search_card failed' + e.message); - return false; - } - return false; -} - -/** - *@brief when you submit the form for searching a card - *@param obj form - *@note the same as search_card, except it answer to a FORM and not - * to a click event - */ -function search_get_card(obj) -{ - var dossier=$('gDossier').value; - - var queryString="gDossier="+dossier; - queryString+="&op=fs"; - - if ( obj.elements['inp'] ) - { - queryString+="&inp="+$F('inp'); - } - if ( obj.elements['typecard'] ) - { - queryString+="&typecard="+$F('typecard'); - } - if ( obj.elements['jrn'] ) - { - queryString+="&jrn="+$F('jrn'); - } - if ( obj.elements['label']) - { - queryString+="&label="+$F('label'); - } - if ( obj.elements['price']) - { - queryString+="&price="+$F('price'); - } - if ( obj.elements['tvaid']) - { - queryString+="&tvaid="+$F('tvaid'); - } - if( obj.elements['query']) - { - queryString+="&query="+$F('query'); - } - if (obj.ctl ) - { - queryString+="&ctl="+obj.ctl; - } - $('asearch').innerHTML=loading(); - var action=new Ajax.Request ( 'ajax_card.php', - { - method:'get', - parameters:queryString, - onFailure:errorFid, - onSuccess:result_card_search - } - ); -} -/** - *@brief show the answer of ajax request - *@param answer in XML - */ -function result_card_search(req) -{ - try - { - - remove_waiting_box(); - var answer=req.responseXML; - var a=answer.getElementsByTagName('ctl'); - if ( a.length == 0 ) - { - var rec=req.responseText; - alert_box ('erreur :'+rec); - } - var html=answer.getElementsByTagName('code'); - - var name_ctl=a[0].firstChild.nodeValue; - var nodeXml=html[0]; - var code_html=getNodeText(nodeXml); - code_html=unescape_xml(code_html); - - var sx=0; - if ( window.scrollY) - { - sx=window.scrollY+40; - } - else - { - sx=document.body.scrollTop+60; - } - - var div_style="top:"+sx+"px;height:80%"; - add_div({id:'search_card',cssclass:'inner_box',html:"",style:div_style,drag:true,effect:'blinddown'}); - - $('search_card').innerHTML=code_html; - - if ($('query')) { $('query').focus();} - } - catch (e) - { - alert_box(e.message); - } - try - { - code_html.evalScripts(); - } - catch(e) - { - alert_box("Impossible executer script de la reponse\n"+e.message); - } - -} - - - -/*!\brief Set the value of 2 input fields -* -* Set the quick code in the first ctrl and the label of the quickcode in the second one. This function is a variant of SetData for -* some specific need. This function is called if the caller is searchcardCtrl -* -*\param p_ctrl the input with the name of the quick code -*\param p_quickcode the found quick_code -*\param p_ctrlname the name of the input field with the label -*\param p_label the label of the quickcode -*/ -function setCtrl(p_ctrl,p_quickcode,p_ctrlname,p_label) -{ - var ctrl=g(p_ctrl); - if ( ctrl ) - { - ctrl.value=p_quickcode; - } - var ctrl_name=g(p_ctrlname); - if ( ctrl_name ) - { - ctrl_name.value=p_label; - } -} - - - -/*!\brief clean the row (the label, price and vat) - * \param p_ctl the calling ctrl - */ -function clean_Fid(p_ctl) -{ - nSell=p_ctl+"_price"; - nBuy=p_ctl+"_price"; - nTva_id=p_ctl+"_tva_id"; - if ( $(nSell) ) - { - $(nSell).value=""; - } - if ( $(nBuy) ) - { - $(nBuy).value=""; - } - if ( $(nTva_id) ) - { - $(nTva_id).value="-1"; - } - -} -function errorFid(request,json) -{ - alert_box('erreur : ajax fiche'); -} -function update_value(text,li) -{ - ajaxFid(text); -} -/** - *@brief is called when something change in ICard - *@param the input field - *@see ICard - */ -function fill_data_onchange(ctl) -{ - ajaxFid(ctl); - -} -/** - *@brief is called when something change in ICard - *@param the input field - *@see ICard - */ -function fill_data(text,li) -{ - ajaxFid(text); - -} -/** - *@brief is called when something change in ICard - *@param the input field - *@see ICard - */ -function fill_fin_data_onchange(ctl) -{ - ajaxFid(ctl); - ajax_saldo(ctl.id); -} -/** - *@brief is called when something change in ICard - *@param the input field - *@see ICard - */ -function fill_fin_data(text,li) -{ - ajaxFid(text); - ajax_saldo($(text.id)); -} -/** - *@brief show the ipopup window and display the details of a card, - * to work some attribute must be set - *@parameter obj.qcode is the qcode, obj.nohistory if you don't want to display - * the history button, obj.ro is the popin is readonly - *@note you must the gDossier as hidden in the calling page - * - *@see ajax_card.php - */ -function fill_ipopcard(obj) -{ - - card_layer++; - - var content='card_'+card_layer; - var nTop=170+card_layer; - if ( nTop > 300 ) { - nTop=170; - } - str_top=fixed_position(250,nTop) - var str_style=str_top+";width:45em;height:auto;position:absolute"; - - var popup={'id': content,'cssclass':'inner_box','style':str_style,'html':loading(),'drag':true}; - - add_div(popup); - var dossier=$('gDossier').value; - var qcode=''; - if ( $(obj).qcode != undefined ) - { - qcode=obj.qcode; - } - else - { - qcode=$(obj).value; - } - // ctl=$(obj).id; - - var queryString='gDossier='+dossier; - queryString+='&qcode='+qcode; - queryString+='&ctl='+content; - queryString+='&op=dc'; // dc for detail card - if ( obj.readonly != undefined) { - queryString+='&ro'; - } - - if ( obj.nohistory != undefined) { - queryString+='&nohistory'; - } - - var action=new Ajax.Request ( 'ajax_card.php', - { - method:'get', - parameters:queryString, - onFailure:errorFid, - onSuccess:fill_box - } - ); -} -/** - *@brief - * \param request : object request - * \param json : json answer -\code -\endcode -*/ -function successFill_ipopcard(req,json) -{ - try - { - var answer=req.responseXML; - var a=answer.getElementsByTagName('ctl'); - var html=answer.getElementsByTagName('code'); - - if ( a.length == 0 ) - { - var rec=req.responseText; - alert_box ('erreur :'+rec); - } - var name_ctl=a[0].firstChild.nodeValue; - var code_html=getNodeText(html[0]); - code_html=unescape_xml(code_html); - - $(name_ctl).innerHTML=code_html; - } - catch (e) - { - alert_box(e.message); - } - try - { - code_html.evalScripts(); - } - catch(e) - { - alert_box("Impossible executer script de la reponse\n"+e.message); - } -} -/** - *@brief show the ipopup for selecting a card type, it is a needed step before adding - * a card - *@param input field (obj) it must have the attribute ipopup - * possible attribute : - * - filter is the filter but with a fd_id list, -1 means there is no filter - * - ref if we want to refresh the window after adding a card - * - type type of card (supplier, customer...) - *@see ajax_card.php - */ -function select_card_type(obj) -{ - - var dossier=$('gDossier').value; - - // give a filter, -1 if not - var filter=$(obj).filter; - if ( filter==undefined) - { - filter=-1; - } - var content="select_card_div"; - if ( $(content)){removeDiv(content);} - var sx=0; - if ( window.scrollY) - { - sx=window.scrollY+160; - } - else - { - sx=document.body.scrollTop+160; - } - - var str_style="top:"+sx+"px;height:auto"; - waiting_box(); - var popup={'id': content,'cssclass':'inner_box','style':str_style,'html':"",'drag':true}; - - add_div(popup); - - var queryString='gDossier='+dossier; - queryString+='&ctl='+content; - queryString+='&op=st'; // st for selecting type - if ( $(obj).win_refresh!=undefined) - { - queryString+='&ref'; - } - queryString+='&fil='+filter; - // filter on the ledger, -1 if not - var oledger=$(obj).jrn; - if (oledger==undefined) - { - ledger=-1; - } - else - { - ledger=$(obj).jrn; - } - - queryString+='&ledger='+ledger; - - if ( obj.type_cat) - { - queryString+='&cat='+obj.type_cat; - } - - var action=new Ajax.Request ( 'ajax_card.php', - { - method:'get', - parameters:queryString, - onFailure:errorFid, - onSuccess:function(req) { - - fill_box(req); - $('lk_cat_card_table').focus(); - } - } - ); -} -/** - *@brief Show a blank card - *@param Form object (obj) - * possible attribute : - * - filter is the filter but with a fd_id list, -1 means there is no filter - * - ref : reload the window after adding card - * - content : name of the div - *@example dis_blank_card({gDossier:15,fd_id:12,ref:1}); - *@see ajax_card.php - */ -function dis_blank_card(obj) -{ - // first we have to take the form elt we need - if ( obj.fd_id.value != undefined ) - { var fd_id=$F('fd_id'); } - else {fd_id=obj.fd_id;} - - var ref=""; - if ( obj.elements && obj.elements['ref'] ) - { - ref='&ref'; - } - var content='div_new_card'; - var nTop=calcy(150); - var nLeft=posX; - var str_style="top:"+nTop+"px;right:"+nLeft+"px;height:auto"; - - var popup={'id': content,'cssclass':'inner_box','style':str_style,'html':loading(),'drag':true}; - if ( $(content)) {removeDiv(content);} - add_div(popup); - - if ( obj.gDossier.value != undefined ) { - var dossier=$('gDossier').value;} else { - var dossier=obj.gDossier; - } - - var queryString='gDossier='+dossier; - queryString+='&ctl='+content; - queryString+='&fd_id='+fd_id; - queryString+=ref; - queryString+='&op=bc'; // bc for blank card - - var action=new Ajax.Request ( 'ajax_card.php', - { - method:'get', - parameters:queryString, - onFailure:errorFid, - onSuccess:successFill_ipopcard - } - ); -} -function form_blank_card(obj) -{ - // first we have to take the form elt we need - var fd_id=obj.fd_id; - var content='div_new_card'; - var nTop=posY-40; - var nLeft=posX-20; - var str_style="top:"+nTop+"px;left:"+nLeft+"px;width:60em;height:auto"; - - var popup={'id': content,'cssclass':'inner_box','style':str_style,'html':loading(),'drag':true}; - if ( $(content)) {removeDiv(content);} - add_div(popup); - - - var dossier=$('gDossier').value; - - var queryString='gDossier='+dossier; - queryString+='&ctl='+content; - queryString+='&fd_id='+fd_id; - queryString+='&op=bc'; // bc for blank card - - var action=new Ajax.Request ( 'ajax_card.php', - { - method:'get', - parameters:queryString, - onFailure:errorFid, - onSuccess:successFill_ipopcard - } - ); -} - -/** - *@brief save the data contained into the form 'save_card' - *@param input field (obj) it must have the attribute ipopup - * possible attribute : - *@see ajax_card.php - */ -function save_card(obj) -{ - var content=$(obj).ipopup; - // Data must be taken here - data=$('save_card').serialize(false); - $(content).innerHTML=loading(); - - var dossier=$('gDossier').value; - var queryString='gDossier='+dossier; - queryString+='&ctl='+content; - queryString+=data; - queryString+='&op=sc'; // sc for save card - - var action=new Ajax.Request ( 'ajax_card.php', - { - method:'post', - parameters:queryString, - onFailure:errorFid, - onSuccess:fill_box - } - ); -} -/** - *@brief add a category of card, - *@param obj with the attribute - * - ipopup the ipopup to show - * - type_cat the category of card we want to add - */ -function add_category(obj) -{ - var sx=0; - if ( window.scrollY) - { - sx=window.scrollY+120; - } - else - { - sx=document.body.scrollTop+120; - } - - var div_style="top:"+sx+"px;width:60%;height:80%"; - // show ipopup - var div={id:obj.ipopup, - cssclass:"inner_box",drag:1,style:div_style}; - if ( $(div) ) { - removeDiv(div); - } - add_div(div); - waiting_box(); - var dossier=$('gDossier').value; - var queryString='gDossier='+dossier; - queryString+='&op=ac'; - queryString+='&ctl='+obj.ipopup; - if ( obj.type_cat) - { - queryString+='&cat='+obj.type_cat; - } - var action=new Ajax.Request ( 'ajax_card.php', - { - method:'get', - parameters:queryString, - onFailure:errorFid, - onSuccess:fill_box - } - ); - -} -/** - * @brief save the form and add a new category of card - * @param obj if the form object - */ -function save_card_category(obj) -{ - if ( ! $(obj).ipopup) - { - alert_box('Erreur pas d\' attribut ipopup '+obj.id); - return; - }; - try { - // Data must be taken here - - data=$('newcat').serialize(false); - var dossier=$('gDossier').value; - queryString='ctl='+obj.ipopup+'&'; - queryString+=data; - queryString+='&op=scc'; // sc for save card - - var action=new Ajax.Request ( 'ajax_card.php', - { - method:'get', - parameters:queryString, - onFailure:errorFid, - onSuccess:fill_box - } - ); - } catch(e) - { - alert_box(e.message); - return false; - } - return false; -} -/** - *@brief Remove a definition of an attribut - *@param attr_def.ad_id - *@param gDossier - *@param table_id to rm the row - *@param special this pointer of the row - */ - -function removeCardAttribut(ad_id,gDossier,table_id,row) -{ - var queryString='gDossier='+gDossier; - queryString+='&op=rmfa'; - queryString+='&ctl=debug'; // debug id - queryString+='&ad_id='+ad_id; - var action=new Ajax.Request ( 'ajax_card.php', - { - method:'get', - parameters:queryString, - onFailure:null, - onSuccess:null - } - ); - deleteRowRec(table_id,row); - - -} -/** -* update a card in ajax -*/ -function update_card(obj) -{ -try { - var name=obj.id; - var qs=Form.serialize(name)+'&op=upc'; - var action=new Ajax.Request ( 'ajax_card.php', - { - method:'get', - parameters:qs, - onFailure:errorFid, - onSuccess:successFill_ipopcard - } - ); - } catch (e) { - alert_box(e.message); - return false; - } -} -/*** - * In Follow-up, update, it is possible to add several card as concerned person or company - * this function save it into the database, display the result and remove the search_card div - * @param {type} p_dossier dossier - * @param {type} p_fiche_id fiche.f_id - * @param {type} p_action_id action_gestion.ag_id - * @returns {undefined} nothing - */ -function action_save_concerned(p_dossier, p_fiche_id, p_action_id) { - var query = encodeJSON({'gDossier': p_dossier, 'f_id': p_fiche_id, 'ag_id': p_action_id,'op':'action_save_concerned','ctl':'unused'}); - var a=new Ajax.Request('ajax_card.php', - { - method: 'get', - parameters: query, - onFailure: errorFid, - onSuccess: function (req, txt) - { - try { - remove_waiting_box(); - var answer = req.responseXML; - var a = answer.getElementsByTagName('ctl'); - if (a.length == 0) - { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - var html = answer.getElementsByTagName('code'); - var namectl = a[0].firstChild.nodeValue; - var nodeXml=html[0]; - var code_html = getNodeText(nodeXml); - code_html = unescape_xml(code_html); - removeDiv('search_card'); - $('concerned_card_td').innerHTML = code_html; - } catch (e) { - - } - } - } - ); - } -function action_remove_concerned(p_dossier,p_fiche_id,p_action_id) -{ - var query = encodeJSON({'gDossier': p_dossier, 'f_id': p_fiche_id, 'ag_id': p_action_id,'op':'action_remove_concerned','ctl':'unused'}); - var a=new Ajax.Request('ajax_card.php', - { - method: 'get', - parameters: query, - onFailure: errorFid, - onSuccess: function (req, txt) - { - try { - remove_waiting_box(); - var answer = req.responseXML; - var a = answer.getElementsByTagName('ctl'); - if (a.length == 0) - { - var rec = req.responseText; - alert_box('erreur :' + rec); - } - var html = answer.getElementsByTagName('code'); - var namectl = a[0].firstChild.nodeValue; - var nodeXml=html[0]; - var code_html = getNodeText(nodeXml); - code_html = unescape_xml(code_html); - removeDiv('search_card'); - $('concerned_card_td').innerHTML = code_html; - } catch (e) { - if ( console) { console.log('Erreur ') + e.message;} - } - } - } - ); - } - \ No newline at end of file diff --git a/sources/html/js/compute.js b/sources/html/js/compute.js deleted file mode 100644 index 430d252..0000000 --- a/sources/html/js/compute.js +++ /dev/null @@ -1,99 +0,0 @@ -/* - * This file is part of NOALYSS. - * - * NOALYSS is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * NOALYSS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NOALYSS; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/*!\file - *\brief common function for accountancy module - */ -function checkTotal() -{ - var ie4=false; - if ( document.all ) - { - ie4=true; - }// Ajouter getElementById par document.all[str] - var total_deb=0.0; - var total_cred=0.0; - - - var nb_item_id=document.getElementById('nb_item'); - if ( ! nb_item_id ) - { - return; - } - var nb_item=nb_item_id.value; - - for (var i=0;i '); - this.iefix = $(this.update.id+'_iefix'); - } - if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50); - }, - - fixIEOverlapping: function() { - Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)}); - this.iefix.style.zIndex = 1; - this.update.style.zIndex = 2; - Element.show(this.iefix); - }, - - hide: function() { - this.stopIndicator(); - if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update); - if(this.iefix) Element.hide(this.iefix); - }, - - startIndicator: function() { - if(this.options.indicator) Element.show(this.options.indicator); - }, - - stopIndicator: function() { - if(this.options.indicator) Element.hide(this.options.indicator); - }, - - onKeyPress: function(event) { - if(this.active) - switch(event.keyCode) { - case Event.KEY_TAB: - case Event.KEY_RETURN: - this.selectEntry(); - Event.stop(event); - case Event.KEY_ESC: - this.hide(); - this.active = false; - Event.stop(event); - return; - case Event.KEY_LEFT: - case Event.KEY_RIGHT: - return; - case Event.KEY_UP: - this.markPrevious(); - this.render(); - Event.stop(event); - return; - case Event.KEY_DOWN: - this.markNext(); - this.render(); - Event.stop(event); - return; - } - else - if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN || - (Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return; - - this.changed = true; - this.hasFocus = true; - - if(this.observer) clearTimeout(this.observer); - this.observer = - setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000); - }, - - activate: function() { - this.changed = false; - this.hasFocus = true; - this.getUpdatedChoices(); - }, - - onHover: function(event) { - var element = Event.findElement(event, 'LI'); - if(this.index != element.autocompleteIndex) - { - this.index = element.autocompleteIndex; - this.render(); - } - Event.stop(event); - }, - - onClick: function(event) { - var element = Event.findElement(event, 'LI'); - this.index = element.autocompleteIndex; - this.selectEntry(); - this.hide(); - }, - - onBlur: function(event) { - // needed to make click events working - setTimeout(this.hide.bind(this), 250); - this.hasFocus = false; - this.active = false; - }, - - render: function() { - if(this.entryCount > 0) { - for (var i = 0; i < this.entryCount; i++) - this.index==i ? - Element.addClassName(this.getEntry(i),"selected") : - Element.removeClassName(this.getEntry(i),"selected"); - if(this.hasFocus) { - this.show(); - this.active = true; - } - } else { - this.active = false; - this.hide(); - } - }, - - markPrevious: function() { - if(this.index > 0) this.index--; - else this.index = this.entryCount-1; - this.getEntry(this.index).scrollIntoView(true); - }, - - markNext: function() { - if(this.index < this.entryCount-1) this.index++; - else this.index = 0; - this.getEntry(this.index).scrollIntoView(false); - }, - - getEntry: function(index) { - return this.update.firstChild.childNodes[index]; - }, - - getCurrentEntry: function() { - return this.getEntry(this.index); - }, - - selectEntry: function() { - this.active = false; - this.updateElement(this.getCurrentEntry()); - }, - - updateElement: function(selectedElement) { - if (this.options.updateElement) { - this.options.updateElement(selectedElement); - return; - } - var value = ''; - if (this.options.select) { - var nodes = $(selectedElement).select('.' + this.options.select) || []; - if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select); - } else - value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal'); - - var bounds = this.getTokenBounds(); - if (bounds[0] != -1) { - var newValue = this.element.value.substr(0, bounds[0]); - var whitespace = this.element.value.substr(bounds[0]).match(/^\s+/); - if (whitespace) - newValue += whitespace[0]; - this.element.value = newValue + value + this.element.value.substr(bounds[1]); - } else { - this.element.value = value; - } - this.oldElementValue = this.element.value; - this.element.focus(); - - if (this.options.afterUpdateElement) - this.options.afterUpdateElement(this.element, selectedElement); - }, - - updateChoices: function(choices) { - if(!this.changed && this.hasFocus) { - this.update.innerHTML = choices; - Element.cleanWhitespace(this.update); - Element.cleanWhitespace(this.update.down()); - - if(this.update.firstChild && this.update.down().childNodes) { - this.entryCount = - this.update.down().childNodes.length; - for (var i = 0; i < this.entryCount; i++) { - var entry = this.getEntry(i); - entry.autocompleteIndex = i; - this.addObservers(entry); - } - } else { - this.entryCount = 0; - } - - this.stopIndicator(); - this.index = 0; - - if(this.entryCount==1 && this.options.autoSelect) { - this.selectEntry(); - this.hide(); - } else { - this.render(); - } - } - }, - - addObservers: function(element) { - Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this)); - Event.observe(element, "click", this.onClick.bindAsEventListener(this)); - }, - - onObserverEvent: function() { - this.changed = false; - this.tokenBounds = null; - if(this.getToken().length>=this.options.minChars) { - this.getUpdatedChoices(); - } else { - this.active = false; - this.hide(); - } - this.oldElementValue = this.element.value; - }, - - getToken: function() { - var bounds = this.getTokenBounds(); - return this.element.value.substring(bounds[0], bounds[1]).strip(); - }, - - getTokenBounds: function() { - if (null != this.tokenBounds) return this.tokenBounds; - var value = this.element.value; - if (value.strip().empty()) return [-1, 0]; - var diff = arguments.callee.getFirstDifferencePos(value, this.oldElementValue); - var offset = (diff == this.oldElementValue.length ? 1 : 0); - var prevTokenPos = -1, nextTokenPos = value.length; - var tp; - for (var index = 0, l = this.options.tokens.length; index < l; ++index) { - tp = value.lastIndexOf(this.options.tokens[index], diff + offset - 1); - if (tp > prevTokenPos) prevTokenPos = tp; - tp = value.indexOf(this.options.tokens[index], diff + offset); - if (-1 != tp && tp < nextTokenPos) nextTokenPos = tp; - } - return (this.tokenBounds = [prevTokenPos + 1, nextTokenPos]); - } -}); - -Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos = function(newS, oldS) { - var boundary = Math.min(newS.length, oldS.length); - for (var index = 0; index < boundary; ++index) - if (newS[index] != oldS[index]) - return index; - return boundary; -}; - -Ajax.Autocompleter = Class.create(Autocompleter.Base, { - initialize: function(element, update, url, options) { - this.baseInitialize(element, update, options); - this.options.asynchronous = true; - this.options.onComplete = this.onComplete.bind(this); - this.options.defaultParams = this.options.parameters || null; - this.url = url; - }, - - getUpdatedChoices: function() { - this.startIndicator(); - - var entry = encodeURIComponent(this.options.paramName) + '=' + - encodeURIComponent(this.getToken()); - - this.options.parameters = this.options.callback ? - this.options.callback(this.element, entry) : entry; - - if(this.options.defaultParams) - this.options.parameters += '&' + this.options.defaultParams; - - new Ajax.Request(this.url, this.options); - }, - - onComplete: function(request) { - this.updateChoices(request.responseText); - } -}); - -// The local array autocompleter. Used when you'd prefer to -// inject an array of autocompletion options into the page, rather -// than sending out Ajax queries, which can be quite slow sometimes. -// -// The constructor takes four parameters. The first two are, as usual, -// the id of the monitored textbox, and id of the autocompletion menu. -// The third is the array you want to autocomplete from, and the fourth -// is the options block. -// -// Extra local autocompletion options: -// - choices - How many autocompletion choices to offer -// -// - partialSearch - If false, the autocompleter will match entered -// text only at the beginning of strings in the -// autocomplete array. Defaults to true, which will -// match text at the beginning of any *word* in the -// strings in the autocomplete array. If you want to -// search anywhere in the string, additionally set -// the option fullSearch to true (default: off). -// -// - fullSsearch - Search anywhere in autocomplete array strings. -// -// - partialChars - How many characters to enter before triggering -// a partial match (unlike minChars, which defines -// how many characters are required to do any match -// at all). Defaults to 2. -// -// - ignoreCase - Whether to ignore case when autocompleting. -// Defaults to true. -// -// It's possible to pass in a custom function as the 'selector' -// option, if you prefer to write your own autocompletion logic. -// In that case, the other options above will not apply unless -// you support them. - -Autocompleter.Local = Class.create(Autocompleter.Base, { - initialize: function(element, update, array, options) { - this.baseInitialize(element, update, options); - this.options.array = array; - }, - - getUpdatedChoices: function() { - this.updateChoices(this.options.selector(this)); - }, - - setOptions: function(options) { - this.options = Object.extend({ - choices: 10, - partialSearch: true, - partialChars: 2, - ignoreCase: true, - fullSearch: false, - selector: function(instance) { - var ret = []; // Beginning matches - var partial = []; // Inside matches - var entry = instance.getToken(); - var count = 0; - - for (var i = 0; i < instance.options.array.length && - ret.length < instance.options.choices ; i++) { - - var elem = instance.options.array[i]; - var foundPos = instance.options.ignoreCase ? - elem.toLowerCase().indexOf(entry.toLowerCase()) : - elem.indexOf(entry); - - while (foundPos != -1) { - if (foundPos == 0 && elem.length != entry.length) { - ret.push("
  • " + elem.substr(0, entry.length) + "" + - elem.substr(entry.length) + "
  • "); - break; - } else if (entry.length >= instance.options.partialChars && - instance.options.partialSearch && foundPos != -1) { - if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) { - partial.push("
  • " + elem.substr(0, foundPos) + "" + - elem.substr(foundPos, entry.length) + "" + elem.substr( - foundPos + entry.length) + "
  • "); - break; - } - } - - foundPos = instance.options.ignoreCase ? - elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) : - elem.indexOf(entry, foundPos + 1); - - } - } - if (partial.length) - ret = ret.concat(partial.slice(0, instance.options.choices - ret.length)); - return "
      " + ret.join('') + "
    "; - } - }, options || { }); - } -}); - -// AJAX in-place editor and collection editor -// Full rewrite by Christophe Porteneuve (April 2007). - -// Use this if you notice weird scrolling problems on some browsers, -// the DOM might be a bit confused when this gets called so do this -// waits 1 ms (with setTimeout) until it does the activation -Field.scrollFreeActivate = function(field) { - setTimeout(function() { - Field.activate(field); - }, 1); -}; - -Ajax.InPlaceEditor = Class.create({ - initialize: function(element, url, options) { - this.url = url; - this.element = element = $(element); - this.prepareOptions(); - this._controls = { }; - arguments.callee.dealWithDeprecatedOptions(options); // DEPRECATION LAYER!!! - Object.extend(this.options, options || { }); - if (!this.options.formId && this.element.id) { - this.options.formId = this.element.id + '-inplaceeditor'; - if ($(this.options.formId)) - this.options.formId = ''; - } - if (this.options.externalControl) - this.options.externalControl = $(this.options.externalControl); - if (!this.options.externalControl) - this.options.externalControlOnly = false; - this._originalBackground = this.element.getStyle('background-color') || 'transparent'; - this.element.title = this.options.clickToEditText; - this._boundCancelHandler = this.handleFormCancellation.bind(this); - this._boundComplete = (this.options.onComplete || Prototype.emptyFunction).bind(this); - this._boundFailureHandler = this.handleAJAXFailure.bind(this); - this._boundSubmitHandler = this.handleFormSubmission.bind(this); - this._boundWrapperHandler = this.wrapUp.bind(this); - this.registerListeners(); - }, - checkForEscapeOrReturn: function(e) { - if (!this._editing || e.ctrlKey || e.altKey || e.shiftKey) return; - if (Event.KEY_ESC == e.keyCode) - this.handleFormCancellation(e); - else if (Event.KEY_RETURN == e.keyCode) - this.handleFormSubmission(e); - }, - createControl: function(mode, handler, extraClasses) { - var control = this.options[mode + 'Control']; - var text = this.options[mode + 'Text']; - if ('button' == control) { - var btn = document.createElement('input'); - btn.type = 'submit'; - btn.value = text; - btn.className = 'editor_' + mode + '_button'; - if ('cancel' == mode) - btn.onclick = this._boundCancelHandler; - this._form.appendChild(btn); - this._controls[mode] = btn; - } else if ('link' == control) { - var link = document.createElement('a'); - link.href = '#'; - link.appendChild(document.createTextNode(text)); - link.onclick = 'cancel' == mode ? this._boundCancelHandler : this._boundSubmitHandler; - link.className = 'editor_' + mode + '_link'; - if (extraClasses) - link.className += ' ' + extraClasses; - this._form.appendChild(link); - this._controls[mode] = link; - } - }, - createEditField: function() { - var text = (this.options.loadTextURL ? this.options.loadingText : this.getText()); - var fld; - if (1 >= this.options.rows && !/\r|\n/.test(this.getText())) { - fld = document.createElement('input'); - fld.type = 'text'; - var size = this.options.size || this.options.cols || 0; - if (0 < size) fld.size = size; - } else { - fld = document.createElement('textarea'); - fld.rows = (1 >= this.options.rows ? this.options.autoRows : this.options.rows); - fld.cols = this.options.cols || 40; - } - fld.name = this.options.paramName; - fld.value = text; // No HTML breaks conversion anymore - fld.className = 'editor_field'; - if (this.options.submitOnBlur) - fld.onblur = this._boundSubmitHandler; - this._controls.editor = fld; - if (this.options.loadTextURL) - this.loadExternalText(); - this._form.appendChild(this._controls.editor); - }, - createForm: function() { - var ipe = this; - function addText(mode, condition) { - var text = ipe.options['text' + mode + 'Controls']; - if (!text || condition === false) return; - ipe._form.appendChild(document.createTextNode(text)); - }; - this._form = $(document.createElement('form')); - this._form.id = this.options.formId; - this._form.addClassName(this.options.formClassName); - this._form.onsubmit = this._boundSubmitHandler; - this.createEditField(); - if ('textarea' == this._controls.editor.tagName.toLowerCase()) - this._form.appendChild(document.createElement('br')); - if (this.options.onFormCustomization) - this.options.onFormCustomization(this, this._form); - addText('Before', this.options.okControl || this.options.cancelControl); - this.createControl('ok', this._boundSubmitHandler); - addText('Between', this.options.okControl && this.options.cancelControl); - this.createControl('cancel', this._boundCancelHandler, 'editor_cancel'); - addText('After', this.options.okControl || this.options.cancelControl); - }, - destroy: function() { - if (this._oldInnerHTML) - this.element.innerHTML = this._oldInnerHTML; - this.leaveEditMode(); - this.unregisterListeners(); - }, - enterEditMode: function(e) { - if (this._saving || this._editing) return; - this._editing = true; - this.triggerCallback('onEnterEditMode'); - if (this.options.externalControl) - this.options.externalControl.hide(); - this.element.hide(); - this.createForm(); - this.element.parentNode.insertBefore(this._form, this.element); - if (!this.options.loadTextURL) - this.postProcessEditField(); - if (e) Event.stop(e); - }, - enterHover: function(e) { - if (this.options.hoverClassName) - this.element.addClassName(this.options.hoverClassName); - if (this._saving) return; - this.triggerCallback('onEnterHover'); - }, - getText: function() { - return this.element.innerHTML.unescapeHTML(); - }, - handleAJAXFailure: function(transport) { - this.triggerCallback('onFailure', transport); - if (this._oldInnerHTML) { - this.element.innerHTML = this._oldInnerHTML; - this._oldInnerHTML = null; - } - }, - handleFormCancellation: function(e) { - this.wrapUp(); - if (e) Event.stop(e); - }, - handleFormSubmission: function(e) { - var form = this._form; - var value = $F(this._controls.editor); - this.prepareSubmission(); - var params = this.options.callback(form, value) || ''; - if (Object.isString(params)) - params = params.toQueryParams(); - params.editorId = this.element.id; - if (this.options.htmlResponse) { - var options = Object.extend({ evalScripts: true }, this.options.ajaxOptions); - Object.extend(options, { - parameters: params, - onComplete: this._boundWrapperHandler, - onFailure: this._boundFailureHandler - }); - new Ajax.Updater({ success: this.element }, this.url, options); - } else { - var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); - Object.extend(options, { - parameters: params, - onComplete: this._boundWrapperHandler, - onFailure: this._boundFailureHandler - }); - new Ajax.Request(this.url, options); - } - if (e) Event.stop(e); - }, - leaveEditMode: function() { - this.element.removeClassName(this.options.savingClassName); - this.removeForm(); - this.leaveHover(); - this.element.style.backgroundColor = this._originalBackground; - this.element.show(); - if (this.options.externalControl) - this.options.externalControl.show(); - this._saving = false; - this._editing = false; - this._oldInnerHTML = null; - this.triggerCallback('onLeaveEditMode'); - }, - leaveHover: function(e) { - if (this.options.hoverClassName) - this.element.removeClassName(this.options.hoverClassName); - if (this._saving) return; - this.triggerCallback('onLeaveHover'); - }, - loadExternalText: function() { - this._form.addClassName(this.options.loadingClassName); - this._controls.editor.disabled = true; - var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); - Object.extend(options, { - parameters: 'editorId=' + encodeURIComponent(this.element.id), - onComplete: Prototype.emptyFunction, - onSuccess: function(transport) { - this._form.removeClassName(this.options.loadingClassName); - var text = transport.responseText; - if (this.options.stripLoadedTextTags) - text = text.stripTags(); - this._controls.editor.value = text; - this._controls.editor.disabled = false; - this.postProcessEditField(); - }.bind(this), - onFailure: this._boundFailureHandler - }); - new Ajax.Request(this.options.loadTextURL, options); - }, - postProcessEditField: function() { - var fpc = this.options.fieldPostCreation; - if (fpc) - $(this._controls.editor)['focus' == fpc ? 'focus' : 'activate'](); - }, - prepareOptions: function() { - this.options = Object.clone(Ajax.InPlaceEditor.DefaultOptions); - Object.extend(this.options, Ajax.InPlaceEditor.DefaultCallbacks); - [this._extraDefaultOptions].flatten().compact().each(function(defs) { - Object.extend(this.options, defs); - }.bind(this)); - }, - prepareSubmission: function() { - this._saving = true; - this.removeForm(); - this.leaveHover(); - this.showSaving(); - }, - registerListeners: function() { - this._listeners = { }; - var listener; - $H(Ajax.InPlaceEditor.Listeners).each(function(pair) { - listener = this[pair.value].bind(this); - this._listeners[pair.key] = listener; - if (!this.options.externalControlOnly) - this.element.observe(pair.key, listener); - if (this.options.externalControl) - this.options.externalControl.observe(pair.key, listener); - }.bind(this)); - }, - removeForm: function() { - if (!this._form) return; - this._form.remove(); - this._form = null; - this._controls = { }; - }, - showSaving: function() { - this._oldInnerHTML = this.element.innerHTML; - this.element.innerHTML = this.options.savingText; - this.element.addClassName(this.options.savingClassName); - this.element.style.backgroundColor = this._originalBackground; - this.element.show(); - }, - triggerCallback: function(cbName, arg) { - if ('function' == typeof this.options[cbName]) { - this.options[cbName](this, arg); - } - }, - unregisterListeners: function() { - $H(this._listeners).each(function(pair) { - if (!this.options.externalControlOnly) - this.element.stopObserving(pair.key, pair.value); - if (this.options.externalControl) - this.options.externalControl.stopObserving(pair.key, pair.value); - }.bind(this)); - }, - wrapUp: function(transport) { - this.leaveEditMode(); - // Can't use triggerCallback due to backward compatibility: requires - // binding + direct element - this._boundComplete(transport, this.element); - } -}); - -Object.extend(Ajax.InPlaceEditor.prototype, { - dispose: Ajax.InPlaceEditor.prototype.destroy -}); - -Ajax.InPlaceCollectionEditor = Class.create(Ajax.InPlaceEditor, { - initialize: function($super, element, url, options) { - this._extraDefaultOptions = Ajax.InPlaceCollectionEditor.DefaultOptions; - $super(element, url, options); - }, - - createEditField: function() { - var list = document.createElement('select'); - list.name = this.options.paramName; - list.size = 1; - this._controls.editor = list; - this._collection = this.options.collection || []; - if (this.options.loadCollectionURL) - this.loadCollection(); - else - this.checkForExternalText(); - this._form.appendChild(this._controls.editor); - }, - - loadCollection: function() { - this._form.addClassName(this.options.loadingClassName); - this.showLoadingText(this.options.loadingCollectionText); - var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); - Object.extend(options, { - parameters: 'editorId=' + encodeURIComponent(this.element.id), - onComplete: Prototype.emptyFunction, - onSuccess: function(transport) { - var js = transport.responseText.strip(); - if (!/^\[.*\]$/.test(js)) // TODO: improve sanity check - throw('Server returned an invalid collection representation.'); - this._collection = eval(js); - this.checkForExternalText(); - }.bind(this), - onFailure: this.onFailure - }); - new Ajax.Request(this.options.loadCollectionURL, options); - }, - - showLoadingText: function(text) { - this._controls.editor.disabled = true; - var tempOption = this._controls.editor.firstChild; - if (!tempOption) { - tempOption = document.createElement('option'); - tempOption.value = ''; - this._controls.editor.appendChild(tempOption); - tempOption.selected = true; - } - tempOption.update((text || '').stripScripts().stripTags()); - }, - - checkForExternalText: function() { - this._text = this.getText(); - if (this.options.loadTextURL) - this.loadExternalText(); - else - this.buildOptionList(); - }, - - loadExternalText: function() { - this.showLoadingText(this.options.loadingText); - var options = Object.extend({ method: 'get' }, this.options.ajaxOptions); - Object.extend(options, { - parameters: 'editorId=' + encodeURIComponent(this.element.id), - onComplete: Prototype.emptyFunction, - onSuccess: function(transport) { - this._text = transport.responseText.strip(); - this.buildOptionList(); - }.bind(this), - onFailure: this.onFailure - }); - new Ajax.Request(this.options.loadTextURL, options); - }, - - buildOptionList: function() { - this._form.removeClassName(this.options.loadingClassName); - this._collection = this._collection.map(function(entry) { - return 2 === entry.length ? entry : [entry, entry].flatten(); - }); - var marker = ('value' in this.options) ? this.options.value : this._text; - var textFound = this._collection.any(function(entry) { - return entry[0] == marker; - }.bind(this)); - this._controls.editor.update(''); - var option; - this._collection.each(function(entry, index) { - option = document.createElement('option'); - option.value = entry[0]; - option.selected = textFound ? entry[0] == marker : 0 == index; - option.appendChild(document.createTextNode(entry[1])); - this._controls.editor.appendChild(option); - }.bind(this)); - this._controls.editor.disabled = false; - Field.scrollFreeActivate(this._controls.editor); - } -}); - -//**** DEPRECATION LAYER FOR InPlace[Collection]Editor! **** -//**** This only exists for a while, in order to let **** -//**** users adapt to the new API. Read up on the new **** -//**** API and convert your code to it ASAP! **** - -Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions = function(options) { - if (!options) return; - function fallback(name, expr) { - if (name in options || expr === undefined) return; - options[name] = expr; - }; - fallback('cancelControl', (options.cancelLink ? 'link' : (options.cancelButton ? 'button' : - options.cancelLink == options.cancelButton == false ? false : undefined))); - fallback('okControl', (options.okLink ? 'link' : (options.okButton ? 'button' : - options.okLink == options.okButton == false ? false : undefined))); - fallback('highlightColor', options.highlightcolor); - fallback('highlightEndColor', options.highlightendcolor); -}; - -Object.extend(Ajax.InPlaceEditor, { - DefaultOptions: { - ajaxOptions: { }, - autoRows: 3, // Use when multi-line w/ rows == 1 - cancelControl: 'link', // 'link'|'button'|false - cancelText: 'cancel', - clickToEditText: 'Click to edit', - externalControl: null, // id|elt - externalControlOnly: false, - fieldPostCreation: 'activate', // 'activate'|'focus'|false - formClassName: 'inplaceeditor-form', - formId: null, // id|elt - highlightColor: '#ffff99', - highlightEndColor: '#ffffff', - hoverClassName: '', - htmlResponse: true, - loadingClassName: 'inplaceeditor-loading', - loadingText: 'Loading...', - okControl: 'button', // 'link'|'button'|false - okText: 'ok', - paramName: 'value', - rows: 1, // If 1 and multi-line, uses autoRows - savingClassName: 'inplaceeditor-saving', - savingText: 'Saving...', - size: 0, - stripLoadedTextTags: false, - submitOnBlur: false, - textAfterControls: '', - textBeforeControls: '', - textBetweenControls: '' - }, - DefaultCallbacks: { - callback: function(form) { - return Form.serialize(form); - }, - onComplete: function(transport, element) { - // For backward compatibility, this one is bound to the IPE, and passes - // the element directly. It was too often customized, so we don't break it. - new Effect.Highlight(element, { - startcolor: this.options.highlightColor, keepBackgroundImage: true }); - }, - onEnterEditMode: null, - onEnterHover: function(ipe) { - ipe.element.style.backgroundColor = ipe.options.highlightColor; - if (ipe._effect) - ipe._effect.cancel(); - }, - onFailure: function(transport, ipe) { - alert('Error communication with the server: ' + transport.responseText.stripTags()); - }, - onFormCustomization: null, // Takes the IPE and its generated form, after editor, before controls. - onLeaveEditMode: null, - onLeaveHover: function(ipe) { - ipe._effect = new Effect.Highlight(ipe.element, { - startcolor: ipe.options.highlightColor, endcolor: ipe.options.highlightEndColor, - restorecolor: ipe._originalBackground, keepBackgroundImage: true - }); - } - }, - Listeners: { - click: 'enterEditMode', - keydown: 'checkForEscapeOrReturn', - mouseover: 'enterHover', - mouseout: 'leaveHover' - } -}); - -Ajax.InPlaceCollectionEditor.DefaultOptions = { - loadingCollectionText: 'Loading options...' -}; - -// Delayed observer, like Form.Element.Observer, -// but waits for delay after last key input -// Ideal for live-search fields - -Form.Element.DelayedObserver = Class.create({ - initialize: function(element, delay, callback) { - this.delay = delay || 0.5; - this.element = $(element); - this.callback = callback; - this.timer = null; - this.lastValue = $F(this.element); - Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this)); - }, - delayedListener: function(event) { - if(this.lastValue == $F(this.element)) return; - if(this.timer) clearTimeout(this.timer); - this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000); - this.lastValue = $F(this.element); - }, - onTimerEvent: function() { - this.timer = null; - this.callback(this.element, $F(this.element)); - } -}); \ No newline at end of file diff --git a/sources/html/js/dragdrop.js b/sources/html/js/dragdrop.js deleted file mode 100644 index 9ebfe24..0000000 --- a/sources/html/js/dragdrop.js +++ /dev/null @@ -1,974 +0,0 @@ -// script.aculo.us dragdrop.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010 - -// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// -// script.aculo.us is freely distributable under the terms of an MIT-style license. -// For details, see the script.aculo.us web site: http://script.aculo.us/ - -if(Object.isUndefined(Effect)) - throw("dragdrop.js requires including script.aculo.us' effects.js library"); - -var Droppables = { - drops: [], - - remove: function(element) { - this.drops = this.drops.reject(function(d) { return d.element==$(element) }); - }, - - add: function(element) { - element = $(element); - var options = Object.extend({ - greedy: true, - hoverclass: null, - tree: false - }, arguments[1] || { }); - - // cache containers - if(options.containment) { - options._containers = []; - var containment = options.containment; - if(Object.isArray(containment)) { - containment.each( function(c) { options._containers.push($(c)) }); - } else { - options._containers.push($(containment)); - } - } - - if(options.accept) options.accept = [options.accept].flatten(); - - Element.makePositioned(element); // fix IE - options.element = element; - - this.drops.push(options); - }, - - findDeepestChild: function(drops) { - deepest = drops[0]; - - for (i = 1; i < drops.length; ++i) - if (Element.isParent(drops[i].element, deepest.element)) - deepest = drops[i]; - - return deepest; - }, - - isContained: function(element, drop) { - var containmentNode; - if(drop.tree) { - containmentNode = element.treeNode; - } else { - containmentNode = element.parentNode; - } - return drop._containers.detect(function(c) { return containmentNode == c }); - }, - - isAffected: function(point, element, drop) { - return ( - (drop.element!=element) && - ((!drop._containers) || - this.isContained(element, drop)) && - ((!drop.accept) || - (Element.classNames(element).detect( - function(v) { return drop.accept.include(v) } ) )) && - Position.within(drop.element, point[0], point[1]) ); - }, - - deactivate: function(drop) { - if(drop.hoverclass) - Element.removeClassName(drop.element, drop.hoverclass); - this.last_active = null; - }, - - activate: function(drop) { - if(drop.hoverclass) - Element.addClassName(drop.element, drop.hoverclass); - this.last_active = drop; - }, - - show: function(point, element) { - if(!this.drops.length) return; - var drop, affected = []; - - this.drops.each( function(drop) { - if(Droppables.isAffected(point, element, drop)) - affected.push(drop); - }); - - if(affected.length>0) - drop = Droppables.findDeepestChild(affected); - - if(this.last_active && this.last_active != drop) this.deactivate(this.last_active); - if (drop) { - Position.within(drop.element, point[0], point[1]); - if(drop.onHover) - drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element)); - - if (drop != this.last_active) Droppables.activate(drop); - } - }, - - fire: function(event, element) { - if(!this.last_active) return; - Position.prepare(); - - if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active)) - if (this.last_active.onDrop) { - this.last_active.onDrop(element, this.last_active.element, event); - return true; - } - }, - - reset: function() { - if(this.last_active) - this.deactivate(this.last_active); - } -}; - -var Draggables = { - drags: [], - observers: [], - - register: function(draggable) { - if(this.drags.length == 0) { - this.eventMouseUp = this.endDrag.bindAsEventListener(this); - this.eventMouseMove = this.updateDrag.bindAsEventListener(this); - this.eventKeypress = this.keyPress.bindAsEventListener(this); - - Event.observe(document, "mouseup", this.eventMouseUp); - Event.observe(document, "mousemove", this.eventMouseMove); - Event.observe(document, "keypress", this.eventKeypress); - } - this.drags.push(draggable); - }, - - unregister: function(draggable) { - this.drags = this.drags.reject(function(d) { return d==draggable }); - if(this.drags.length == 0) { - Event.stopObserving(document, "mouseup", this.eventMouseUp); - Event.stopObserving(document, "mousemove", this.eventMouseMove); - Event.stopObserving(document, "keypress", this.eventKeypress); - } - }, - - activate: function(draggable) { - if(draggable.options.delay) { - this._timeout = setTimeout(function() { - Draggables._timeout = null; - window.focus(); - Draggables.activeDraggable = draggable; - }.bind(this), draggable.options.delay); - } else { - window.focus(); // allows keypress events if window isn't currently focused, fails for Safari - this.activeDraggable = draggable; - } - }, - - deactivate: function() { - this.activeDraggable = null; - }, - - updateDrag: function(event) { - if(!this.activeDraggable) return; - var pointer = [Event.pointerX(event), Event.pointerY(event)]; - // Mozilla-based browsers fire successive mousemove events with - // the same coordinates, prevent needless redrawing (moz bug?) - if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return; - this._lastPointer = pointer; - - this.activeDraggable.updateDrag(event, pointer); - }, - - endDrag: function(event) { - if(this._timeout) { - clearTimeout(this._timeout); - this._timeout = null; - } - if(!this.activeDraggable) return; - this._lastPointer = null; - this.activeDraggable.endDrag(event); - this.activeDraggable = null; - }, - - keyPress: function(event) { - if(this.activeDraggable) - this.activeDraggable.keyPress(event); - }, - - addObserver: function(observer) { - this.observers.push(observer); - this._cacheObserverCallbacks(); - }, - - removeObserver: function(element) { // element instead of observer fixes mem leaks - this.observers = this.observers.reject( function(o) { return o.element==element }); - this._cacheObserverCallbacks(); - }, - - notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag' - if(this[eventName+'Count'] > 0) - this.observers.each( function(o) { - if(o[eventName]) o[eventName](eventName, draggable, event); - }); - if(draggable.options[eventName]) draggable.options[eventName](draggable, event); - }, - - _cacheObserverCallbacks: function() { - ['onStart','onEnd','onDrag'].each( function(eventName) { - Draggables[eventName+'Count'] = Draggables.observers.select( - function(o) { return o[eventName]; } - ).length; - }); - } -}; - -/*--------------------------------------------------------------------------*/ - -var Draggable = Class.create({ - initialize: function(element) { - var defaults = { - handle: false, - reverteffect: function(element, top_offset, left_offset) { - var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02; - new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur, - queue: {scope:'_draggable', position:'end'} - }); - }, - endeffect: function(element) { - var toOpacity = Object.isNumber(element._opacity) ? element._opacity : 1.0; - new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity, - queue: {scope:'_draggable', position:'end'}, - afterFinish: function(){ - Draggable._dragging[element] = false - } - }); - }, - zindex: 1000, - revert: false, - quiet: false, - scroll: false, - scrollSensitivity: 20, - scrollSpeed: 15, - snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] } - delay: 0 - }; - - if(!arguments[1] || Object.isUndefined(arguments[1].endeffect)) - Object.extend(defaults, { - starteffect: function(element) { - element._opacity = Element.getOpacity(element); - Draggable._dragging[element] = true; - new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7}); - } - }); - - var options = Object.extend(defaults, arguments[1] || { }); - - this.element = $(element); - - if(options.handle && Object.isString(options.handle)) - this.handle = this.element.down('.'+options.handle, 0); - - if(!this.handle) this.handle = $(options.handle); - if(!this.handle) this.handle = this.element; - - if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) { - options.scroll = $(options.scroll); - this._isScrollChild = Element.childOf(this.element, options.scroll); - } - - Element.makePositioned(this.element); // fix IE - - this.options = options; - this.dragging = false; - - this.eventMouseDown = this.initDrag.bindAsEventListener(this); - Event.observe(this.handle, "mousedown", this.eventMouseDown); - - Draggables.register(this); - }, - - destroy: function() { - Event.stopObserving(this.handle, "mousedown", this.eventMouseDown); - Draggables.unregister(this); - }, - - currentDelta: function() { - return([ - parseInt(Element.getStyle(this.element,'left') || '0'), - parseInt(Element.getStyle(this.element,'top') || '0')]); - }, - - initDrag: function(event) { - if(!Object.isUndefined(Draggable._dragging[this.element]) && - Draggable._dragging[this.element]) return; - if(Event.isLeftClick(event)) { - // abort on form elements, fixes a Firefox issue - var src = Event.element(event); - if((tag_name = src.tagName.toUpperCase()) && ( - tag_name=='INPUT' || - tag_name=='SELECT' || - tag_name=='OPTION' || - tag_name=='BUTTON' || - tag_name=='TEXTAREA')) return; - - var pointer = [Event.pointerX(event), Event.pointerY(event)]; - var pos = this.element.cumulativeOffset(); - this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) }); - - Draggables.activate(this); - Event.stop(event); - } - }, - - startDrag: function(event) { - this.dragging = true; - if(!this.delta) - this.delta = this.currentDelta(); - - if(this.options.zindex) { - this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0); - this.element.style.zIndex = this.options.zindex; - } - - if(this.options.ghosting) { - this._clone = this.element.cloneNode(true); - this._originallyAbsolute = (this.element.getStyle('position') == 'absolute'); - if (!this._originallyAbsolute) - Position.absolutize(this.element); - this.element.parentNode.insertBefore(this._clone, this.element); - } - - if(this.options.scroll) { - if (this.options.scroll == window) { - var where = this._getWindowScroll(this.options.scroll); - this.originalScrollLeft = where.left; - this.originalScrollTop = where.top; - } else { - this.originalScrollLeft = this.options.scroll.scrollLeft; - this.originalScrollTop = this.options.scroll.scrollTop; - } - } - - Draggables.notify('onStart', this, event); - - if(this.options.starteffect) this.options.starteffect(this.element); - }, - - updateDrag: function(event, pointer) { - if(!this.dragging) this.startDrag(event); - - if(!this.options.quiet){ - Position.prepare(); - Droppables.show(pointer, this.element); - } - - Draggables.notify('onDrag', this, event); - - this.draw(pointer); - if(this.options.change) this.options.change(this); - - if(this.options.scroll) { - this.stopScrolling(); - - var p; - if (this.options.scroll == window) { - with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; } - } else { - p = Position.page(this.options.scroll).toArray(); - p[0] += this.options.scroll.scrollLeft + Position.deltaX; - p[1] += this.options.scroll.scrollTop + Position.deltaY; - p.push(p[0]+this.options.scroll.offsetWidth); - p.push(p[1]+this.options.scroll.offsetHeight); - } - var speed = [0,0]; - if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity); - if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity); - if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity); - if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity); - this.startScrolling(speed); - } - - // fix AppleWebKit rendering - if(Prototype.Browser.WebKit) window.scrollBy(0,0); - - Event.stop(event); - }, - - finishDrag: function(event, success) { - this.dragging = false; - - if(this.options.quiet){ - Position.prepare(); - var pointer = [Event.pointerX(event), Event.pointerY(event)]; - Droppables.show(pointer, this.element); - } - - if(this.options.ghosting) { - if (!this._originallyAbsolute) - Position.relativize(this.element); - delete this._originallyAbsolute; - Element.remove(this._clone); - this._clone = null; - } - - var dropped = false; - if(success) { - dropped = Droppables.fire(event, this.element); - if (!dropped) dropped = false; - } - if(dropped && this.options.onDropped) this.options.onDropped(this.element); - Draggables.notify('onEnd', this, event); - - var revert = this.options.revert; - if(revert && Object.isFunction(revert)) revert = revert(this.element); - - var d = this.currentDelta(); - if(revert && this.options.reverteffect) { - if (dropped == 0 || revert != 'failure') - this.options.reverteffect(this.element, - d[1]-this.delta[1], d[0]-this.delta[0]); - } else { - this.delta = d; - } - - if(this.options.zindex) - this.element.style.zIndex = this.originalZ; - - if(this.options.endeffect) - this.options.endeffect(this.element); - - Draggables.deactivate(this); - Droppables.reset(); - }, - - keyPress: function(event) { - if(event.keyCode!=Event.KEY_ESC) return; - this.finishDrag(event, false); - Event.stop(event); - }, - - endDrag: function(event) { - if(!this.dragging) return; - this.stopScrolling(); - this.finishDrag(event, true); - Event.stop(event); - }, - - draw: function(point) { - var pos = this.element.cumulativeOffset(); - if(this.options.ghosting) { - var r = Position.realOffset(this.element); - pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY; - } - - var d = this.currentDelta(); - pos[0] -= d[0]; pos[1] -= d[1]; - - if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) { - pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft; - pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop; - } - - var p = [0,1].map(function(i){ - return (point[i]-pos[i]-this.offset[i]) - }.bind(this)); - - if(this.options.snap) { - if(Object.isFunction(this.options.snap)) { - p = this.options.snap(p[0],p[1],this); - } else { - if(Object.isArray(this.options.snap)) { - p = p.map( function(v, i) { - return (v/this.options.snap[i]).round()*this.options.snap[i] }.bind(this)); - } else { - p = p.map( function(v) { - return (v/this.options.snap).round()*this.options.snap }.bind(this)); - } - }} - - var style = this.element.style; - if((!this.options.constraint) || (this.options.constraint=='horizontal')) - style.left = p[0] + "px"; - if((!this.options.constraint) || (this.options.constraint=='vertical')) - style.top = p[1] + "px"; - - if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering - }, - - stopScrolling: function() { - if(this.scrollInterval) { - clearInterval(this.scrollInterval); - this.scrollInterval = null; - Draggables._lastScrollPointer = null; - } - }, - - startScrolling: function(speed) { - if(!(speed[0] || speed[1])) return; - this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed]; - this.lastScrolled = new Date(); - this.scrollInterval = setInterval(this.scroll.bind(this), 10); - }, - - scroll: function() { - var current = new Date(); - var delta = current - this.lastScrolled; - this.lastScrolled = current; - if(this.options.scroll == window) { - with (this._getWindowScroll(this.options.scroll)) { - if (this.scrollSpeed[0] || this.scrollSpeed[1]) { - var d = delta / 1000; - this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] ); - } - } - } else { - this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000; - this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000; - } - - Position.prepare(); - Droppables.show(Draggables._lastPointer, this.element); - Draggables.notify('onDrag', this); - if (this._isScrollChild) { - Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer); - Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000; - Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000; - if (Draggables._lastScrollPointer[0] < 0) - Draggables._lastScrollPointer[0] = 0; - if (Draggables._lastScrollPointer[1] < 0) - Draggables._lastScrollPointer[1] = 0; - this.draw(Draggables._lastScrollPointer); - } - - if(this.options.change) this.options.change(this); - }, - - _getWindowScroll: function(w) { - var T, L, W, H; - with (w.document) { - if (w.document.documentElement && documentElement.scrollTop) { - T = documentElement.scrollTop; - L = documentElement.scrollLeft; - } else if (w.document.body) { - T = body.scrollTop; - L = body.scrollLeft; - } - if (w.innerWidth) { - W = w.innerWidth; - H = w.innerHeight; - } else if (w.document.documentElement && documentElement.clientWidth) { - W = documentElement.clientWidth; - H = documentElement.clientHeight; - } else { - W = body.offsetWidth; - H = body.offsetHeight; - } - } - return { top: T, left: L, width: W, height: H }; - } -}); - -Draggable._dragging = { }; - -/*--------------------------------------------------------------------------*/ - -var SortableObserver = Class.create({ - initialize: function(element, observer) { - this.element = $(element); - this.observer = observer; - this.lastValue = Sortable.serialize(this.element); - }, - - onStart: function() { - this.lastValue = Sortable.serialize(this.element); - }, - - onEnd: function() { - Sortable.unmark(); - if(this.lastValue != Sortable.serialize(this.element)) - this.observer(this.element) - } -}); - -var Sortable = { - SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/, - - sortables: { }, - - _findRootElement: function(element) { - while (element.tagName.toUpperCase() != "BODY") { - if(element.id && Sortable.sortables[element.id]) return element; - element = element.parentNode; - } - }, - - options: function(element) { - element = Sortable._findRootElement($(element)); - if(!element) return; - return Sortable.sortables[element.id]; - }, - - destroy: function(element){ - element = $(element); - var s = Sortable.sortables[element.id]; - - if(s) { - Draggables.removeObserver(s.element); - s.droppables.each(function(d){ Droppables.remove(d) }); - s.draggables.invoke('destroy'); - - delete Sortable.sortables[s.element.id]; - } - }, - - create: function(element) { - element = $(element); - var options = Object.extend({ - element: element, - tag: 'li', // assumes li children, override with tag: 'tagname' - dropOnEmpty: false, - tree: false, - treeTag: 'ul', - overlap: 'vertical', // one of 'vertical', 'horizontal' - constraint: 'vertical', // one of 'vertical', 'horizontal', false - containment: element, // also takes array of elements (or id's); or false - handle: false, // or a CSS class - only: false, - delay: 0, - hoverclass: null, - ghosting: false, - quiet: false, - scroll: false, - scrollSensitivity: 20, - scrollSpeed: 15, - format: this.SERIALIZE_RULE, - - // these take arrays of elements or ids and can be - // used for better initialization performance - elements: false, - handles: false, - - onChange: Prototype.emptyFunction, - onUpdate: Prototype.emptyFunction - }, arguments[1] || { }); - - // clear any old sortable with same element - this.destroy(element); - - // build options for the draggables - var options_for_draggable = { - revert: true, - quiet: options.quiet, - scroll: options.scroll, - scrollSpeed: options.scrollSpeed, - scrollSensitivity: options.scrollSensitivity, - delay: options.delay, - ghosting: options.ghosting, - constraint: options.constraint, - handle: options.handle }; - - if(options.starteffect) - options_for_draggable.starteffect = options.starteffect; - - if(options.reverteffect) - options_for_draggable.reverteffect = options.reverteffect; - else - if(options.ghosting) options_for_draggable.reverteffect = function(element) { - element.style.top = 0; - element.style.left = 0; - }; - - if(options.endeffect) - options_for_draggable.endeffect = options.endeffect; - - if(options.zindex) - options_for_draggable.zindex = options.zindex; - - // build options for the droppables - var options_for_droppable = { - overlap: options.overlap, - containment: options.containment, - tree: options.tree, - hoverclass: options.hoverclass, - onHover: Sortable.onHover - }; - - var options_for_tree = { - onHover: Sortable.onEmptyHover, - overlap: options.overlap, - containment: options.containment, - hoverclass: options.hoverclass - }; - - // fix for gecko engine - Element.cleanWhitespace(element); - - options.draggables = []; - options.droppables = []; - - // drop on empty handling - if(options.dropOnEmpty || options.tree) { - Droppables.add(element, options_for_tree); - options.droppables.push(element); - } - - (options.elements || this.findElements(element, options) || []).each( function(e,i) { - var handle = options.handles ? $(options.handles[i]) : - (options.handle ? $(e).select('.' + options.handle)[0] : e); - options.draggables.push( - new Draggable(e, Object.extend(options_for_draggable, { handle: handle }))); - Droppables.add(e, options_for_droppable); - if(options.tree) e.treeNode = element; - options.droppables.push(e); - }); - - if(options.tree) { - (Sortable.findTreeElements(element, options) || []).each( function(e) { - Droppables.add(e, options_for_tree); - e.treeNode = element; - options.droppables.push(e); - }); - } - - // keep reference - this.sortables[element.identify()] = options; - - // for onupdate - Draggables.addObserver(new SortableObserver(element, options.onUpdate)); - - }, - - // return all suitable-for-sortable elements in a guaranteed order - findElements: function(element, options) { - return Element.findChildren( - element, options.only, options.tree ? true : false, options.tag); - }, - - findTreeElements: function(element, options) { - return Element.findChildren( - element, options.only, options.tree ? true : false, options.treeTag); - }, - - onHover: function(element, dropon, overlap) { - if(Element.isParent(dropon, element)) return; - - if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) { - return; - } else if(overlap>0.5) { - Sortable.mark(dropon, 'before'); - if(dropon.previousSibling != element) { - var oldParentNode = element.parentNode; - element.style.visibility = "hidden"; // fix gecko rendering - dropon.parentNode.insertBefore(element, dropon); - if(dropon.parentNode!=oldParentNode) - Sortable.options(oldParentNode).onChange(element); - Sortable.options(dropon.parentNode).onChange(element); - } - } else { - Sortable.mark(dropon, 'after'); - var nextElement = dropon.nextSibling || null; - if(nextElement != element) { - var oldParentNode = element.parentNode; - element.style.visibility = "hidden"; // fix gecko rendering - dropon.parentNode.insertBefore(element, nextElement); - if(dropon.parentNode!=oldParentNode) - Sortable.options(oldParentNode).onChange(element); - Sortable.options(dropon.parentNode).onChange(element); - } - } - }, - - onEmptyHover: function(element, dropon, overlap) { - var oldParentNode = element.parentNode; - var droponOptions = Sortable.options(dropon); - - if(!Element.isParent(dropon, element)) { - var index; - - var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only}); - var child = null; - - if(children) { - var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap); - - for (index = 0; index < children.length; index += 1) { - if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) { - offset -= Element.offsetSize (children[index], droponOptions.overlap); - } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) { - child = index + 1 < children.length ? children[index + 1] : null; - break; - } else { - child = children[index]; - break; - } - } - } - - dropon.insertBefore(element, child); - - Sortable.options(oldParentNode).onChange(element); - droponOptions.onChange(element); - } - }, - - unmark: function() { - if(Sortable._marker) Sortable._marker.hide(); - }, - - mark: function(dropon, position) { - // mark on ghosting only - var sortable = Sortable.options(dropon.parentNode); - if(sortable && !sortable.ghosting) return; - - if(!Sortable._marker) { - Sortable._marker = - ($('dropmarker') || Element.extend(document.createElement('DIV'))). - hide().addClassName('dropmarker').setStyle({position:'absolute'}); - document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); - } - var offsets = dropon.cumulativeOffset(); - Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'}); - - if(position=='after') - if(sortable.overlap == 'horizontal') - Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'}); - else - Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'}); - - Sortable._marker.show(); - }, - - _tree: function(element, options, parent) { - var children = Sortable.findElements(element, options) || []; - - for (var i = 0; i < children.length; ++i) { - var match = children[i].id.match(options.format); - - if (!match) continue; - - var child = { - id: encodeURIComponent(match ? match[1] : null), - element: element, - parent: parent, - children: [], - position: parent.children.length, - container: $(children[i]).down(options.treeTag) - }; - - /* Get the element containing the children and recurse over it */ - if (child.container) - this._tree(child.container, options, child); - - parent.children.push (child); - } - - return parent; - }, - - tree: function(element) { - element = $(element); - var sortableOptions = this.options(element); - var options = Object.extend({ - tag: sortableOptions.tag, - treeTag: sortableOptions.treeTag, - only: sortableOptions.only, - name: element.id, - format: sortableOptions.format - }, arguments[1] || { }); - - var root = { - id: null, - parent: null, - children: [], - container: element, - position: 0 - }; - - return Sortable._tree(element, options, root); - }, - - /* Construct a [i] index for a particular node */ - _constructIndex: function(node) { - var index = ''; - do { - if (node.id) index = '[' + node.position + ']' + index; - } while ((node = node.parent) != null); - return index; - }, - - sequence: function(element) { - element = $(element); - var options = Object.extend(this.options(element), arguments[1] || { }); - - return $(this.findElements(element, options) || []).map( function(item) { - return item.id.match(options.format) ? item.id.match(options.format)[1] : ''; - }); - }, - - setSequence: function(element, new_sequence) { - element = $(element); - var options = Object.extend(this.options(element), arguments[2] || { }); - - var nodeMap = { }; - this.findElements(element, options).each( function(n) { - if (n.id.match(options.format)) - nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode]; - n.parentNode.removeChild(n); - }); - - new_sequence.each(function(ident) { - var n = nodeMap[ident]; - if (n) { - n[1].appendChild(n[0]); - delete nodeMap[ident]; - } - }); - }, - - serialize: function(element) { - element = $(element); - var options = Object.extend(Sortable.options(element), arguments[1] || { }); - var name = encodeURIComponent( - (arguments[1] && arguments[1].name) ? arguments[1].name : element.id); - - if (options.tree) { - return Sortable.tree(element, arguments[1]).children.map( function (item) { - return [name + Sortable._constructIndex(item) + "[id]=" + - encodeURIComponent(item.id)].concat(item.children.map(arguments.callee)); - }).flatten().join('&'); - } else { - return Sortable.sequence(element, arguments[1]).map( function(item) { - return name + "[]=" + encodeURIComponent(item); - }).join('&'); - } - } -}; - -// Returns true if child is contained within element -Element.isParent = function(child, element) { - if (!child.parentNode || child == element) return false; - if (child.parentNode == element) return true; - return Element.isParent(child.parentNode, element); -}; - -Element.findChildren = function(element, only, recursive, tagName) { - if(!element.hasChildNodes()) return null; - tagName = tagName.toUpperCase(); - if(only) only = [only].flatten(); - var elements = []; - $A(element.childNodes).each( function(e) { - if(e.tagName && e.tagName.toUpperCase()==tagName && - (!only || (Element.classNames(e).detect(function(v) { return only.include(v) })))) - elements.push(e); - if(recursive) { - var grandchildren = Element.findChildren(e, only, recursive, tagName); - if(grandchildren) elements.push(grandchildren); - } - }); - - return (elements.length>0 ? elements.flatten() : []); -}; - -Element.offsetSize = function (element, type) { - return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')]; -}; \ No newline at end of file diff --git a/sources/html/js/effects.js b/sources/html/js/effects.js deleted file mode 100644 index 860ddc0..0000000 --- a/sources/html/js/effects.js +++ /dev/null @@ -1,1123 +0,0 @@ -// script.aculo.us effects.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010 - -// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// Contributors: -// Justin Palmer (http://encytemedia.com/) -// Mark Pilgrim (http://diveintomark.org/) -// Martin Bialasinki -// -// script.aculo.us is freely distributable under the terms of an MIT-style license. -// For details, see the script.aculo.us web site: http://script.aculo.us/ - -// converts rgb() and #xxx to #xxxxxx format, -// returns self (or first argument) if not convertable -String.prototype.parseColor = function() { - var color = '#'; - if (this.slice(0,4) == 'rgb(') { - var cols = this.slice(4,this.length-1).split(','); - var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3); - } else { - if (this.slice(0,1) == '#') { - if (this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase(); - if (this.length==7) color = this.toLowerCase(); - } - } - return (color.length==7 ? color : (arguments[0] || this)); -}; - -/*--------------------------------------------------------------------------*/ - -Element.collectTextNodes = function(element) { - return $A($(element).childNodes).collect( function(node) { - return (node.nodeType==3 ? node.nodeValue : - (node.hasChildNodes() ? Element.collectTextNodes(node) : '')); - }).flatten().join(''); -}; - -Element.collectTextNodesIgnoreClass = function(element, className) { - return $A($(element).childNodes).collect( function(node) { - return (node.nodeType==3 ? node.nodeValue : - ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? - Element.collectTextNodesIgnoreClass(node, className) : '')); - }).flatten().join(''); -}; - -Element.setContentZoom = function(element, percent) { - element = $(element); - element.setStyle({fontSize: (percent/100) + 'em'}); - if (Prototype.Browser.WebKit) window.scrollBy(0,0); - return element; -}; - -Element.getInlineOpacity = function(element){ - return $(element).style.opacity || ''; -}; - -Element.forceRerendering = function(element) { - try { - element = $(element); - var n = document.createTextNode(' '); - element.appendChild(n); - element.removeChild(n); - } catch(e) { } -}; - -/*--------------------------------------------------------------------------*/ - -var Effect = { - _elementDoesNotExistError: { - name: 'ElementDoesNotExistError', - message: 'The specified DOM element does not exist, but is required for this effect to operate' - }, - Transitions: { - linear: Prototype.K, - sinoidal: function(pos) { - return (-Math.cos(pos*Math.PI)/2) + .5; - }, - reverse: function(pos) { - return 1-pos; - }, - flicker: function(pos) { - var pos = ((-Math.cos(pos*Math.PI)/4) + .75) + Math.random()/4; - return pos > 1 ? 1 : pos; - }, - wobble: function(pos) { - return (-Math.cos(pos*Math.PI*(9*pos))/2) + .5; - }, - pulse: function(pos, pulses) { - return (-Math.cos((pos*((pulses||5)-.5)*2)*Math.PI)/2) + .5; - }, - spring: function(pos) { - return 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6)); - }, - none: function(pos) { - return 0; - }, - full: function(pos) { - return 1; - } - }, - DefaultOptions: { - duration: 1.0, // seconds - fps: 100, // 100= assume 66fps max. - sync: false, // true for combining - from: 0.0, - to: 1.0, - delay: 0.0, - queue: 'parallel' - }, - tagifyText: function(element) { - var tagifyStyle = 'position:relative'; - if (Prototype.Browser.IE) tagifyStyle += ';zoom:1'; - - element = $(element); - $A(element.childNodes).each( function(child) { - if (child.nodeType==3) { - child.nodeValue.toArray().each( function(character) { - element.insertBefore( - new Element('span', {style: tagifyStyle}).update( - character == ' ' ? String.fromCharCode(160) : character), - child); - }); - Element.remove(child); - } - }); - }, - multiple: function(element, effect) { - var elements; - if (((typeof element == 'object') || - Object.isFunction(element)) && - (element.length)) - elements = element; - else - elements = $(element).childNodes; - - var options = Object.extend({ - speed: 0.1, - delay: 0.0 - }, arguments[2] || { }); - var masterDelay = options.delay; - - $A(elements).each( function(element, index) { - new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay })); - }); - }, - PAIRS: { - 'slide': ['SlideDown','SlideUp'], - 'blind': ['BlindDown','BlindUp'], - 'appear': ['Appear','Fade'] - }, - toggle: function(element, effect, options) { - element = $(element); - effect = (effect || 'appear').toLowerCase(); - - return Effect[ Effect.PAIRS[ effect ][ element.visible() ? 1 : 0 ] ](element, Object.extend({ - queue: { position:'end', scope:(element.id || 'global'), limit: 1 } - }, options || {})); - } -}; - -Effect.DefaultOptions.transition = Effect.Transitions.sinoidal; - -/* ------------- core effects ------------- */ - -Effect.ScopedQueue = Class.create(Enumerable, { - initialize: function() { - this.effects = []; - this.interval = null; - }, - _each: function(iterator) { - this.effects._each(iterator); - }, - add: function(effect) { - var timestamp = new Date().getTime(); - - var position = Object.isString(effect.options.queue) ? - effect.options.queue : effect.options.queue.position; - - switch(position) { - case 'front': - // move unstarted effects after this effect - this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) { - e.startOn += effect.finishOn; - e.finishOn += effect.finishOn; - }); - break; - case 'with-last': - timestamp = this.effects.pluck('startOn').max() || timestamp; - break; - case 'end': - // start effect after last queued effect has finished - timestamp = this.effects.pluck('finishOn').max() || timestamp; - break; - } - - effect.startOn += timestamp; - effect.finishOn += timestamp; - - if (!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit)) - this.effects.push(effect); - - if (!this.interval) - this.interval = setInterval(this.loop.bind(this), 15); - }, - remove: function(effect) { - this.effects = this.effects.reject(function(e) { return e==effect }); - if (this.effects.length == 0) { - clearInterval(this.interval); - this.interval = null; - } - }, - loop: function() { - var timePos = new Date().getTime(); - for(var i=0, len=this.effects.length;i= this.startOn) { - if (timePos >= this.finishOn) { - this.render(1.0); - this.cancel(); - this.event('beforeFinish'); - if (this.finish) this.finish(); - this.event('afterFinish'); - return; - } - var pos = (timePos - this.startOn) / this.totalTime, - frame = (pos * this.totalFrames).round(); - if (frame > this.currentFrame) { - this.render(pos); - this.currentFrame = frame; - } - } - }, - cancel: function() { - if (!this.options.sync) - Effect.Queues.get(Object.isString(this.options.queue) ? - 'global' : this.options.queue.scope).remove(this); - this.state = 'finished'; - }, - event: function(eventName) { - if (this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this); - if (this.options[eventName]) this.options[eventName](this); - }, - inspect: function() { - var data = $H(); - for(property in this) - if (!Object.isFunction(this[property])) data.set(property, this[property]); - return '#'; - } -}); - -Effect.Parallel = Class.create(Effect.Base, { - initialize: function(effects) { - this.effects = effects || []; - this.start(arguments[1]); - }, - update: function(position) { - this.effects.invoke('render', position); - }, - finish: function(position) { - this.effects.each( function(effect) { - effect.render(1.0); - effect.cancel(); - effect.event('beforeFinish'); - if (effect.finish) effect.finish(position); - effect.event('afterFinish'); - }); - } -}); - -Effect.Tween = Class.create(Effect.Base, { - initialize: function(object, from, to) { - object = Object.isString(object) ? $(object) : object; - var args = $A(arguments), method = args.last(), - options = args.length == 5 ? args[3] : null; - this.method = Object.isFunction(method) ? method.bind(object) : - Object.isFunction(object[method]) ? object[method].bind(object) : - function(value) { object[method] = value }; - this.start(Object.extend({ from: from, to: to }, options || { })); - }, - update: function(position) { - this.method(position); - } -}); - -Effect.Event = Class.create(Effect.Base, { - initialize: function() { - this.start(Object.extend({ duration: 0 }, arguments[0] || { })); - }, - update: Prototype.emptyFunction -}); - -Effect.Opacity = Class.create(Effect.Base, { - initialize: function(element) { - this.element = $(element); - if (!this.element) throw(Effect._elementDoesNotExistError); - // make this work on IE on elements without 'layout' - if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout)) - this.element.setStyle({zoom: 1}); - var options = Object.extend({ - from: this.element.getOpacity() || 0.0, - to: 1.0 - }, arguments[1] || { }); - this.start(options); - }, - update: function(position) { - this.element.setOpacity(position); - } -}); - -Effect.Move = Class.create(Effect.Base, { - initialize: function(element) { - this.element = $(element); - if (!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ - x: 0, - y: 0, - mode: 'relative' - }, arguments[1] || { }); - this.start(options); - }, - setup: function() { - this.element.makePositioned(); - this.originalLeft = parseFloat(this.element.getStyle('left') || '0'); - this.originalTop = parseFloat(this.element.getStyle('top') || '0'); - if (this.options.mode == 'absolute') { - this.options.x = this.options.x - this.originalLeft; - this.options.y = this.options.y - this.originalTop; - } - }, - update: function(position) { - this.element.setStyle({ - left: (this.options.x * position + this.originalLeft).round() + 'px', - top: (this.options.y * position + this.originalTop).round() + 'px' - }); - } -}); - -// for backwards compatibility -Effect.MoveBy = function(element, toTop, toLeft) { - return new Effect.Move(element, - Object.extend({ x: toLeft, y: toTop }, arguments[3] || { })); -}; - -Effect.Scale = Class.create(Effect.Base, { - initialize: function(element, percent) { - this.element = $(element); - if (!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ - scaleX: true, - scaleY: true, - scaleContent: true, - scaleFromCenter: false, - scaleMode: 'box', // 'box' or 'contents' or { } with provided values - scaleFrom: 100.0, - scaleTo: percent - }, arguments[2] || { }); - this.start(options); - }, - setup: function() { - this.restoreAfterFinish = this.options.restoreAfterFinish || false; - this.elementPositioning = this.element.getStyle('position'); - - this.originalStyle = { }; - ['top','left','width','height','fontSize'].each( function(k) { - this.originalStyle[k] = this.element.style[k]; - }.bind(this)); - - this.originalTop = this.element.offsetTop; - this.originalLeft = this.element.offsetLeft; - - var fontSize = this.element.getStyle('font-size') || '100%'; - ['em','px','%','pt'].each( function(fontSizeType) { - if (fontSize.indexOf(fontSizeType)>0) { - this.fontSize = parseFloat(fontSize); - this.fontSizeType = fontSizeType; - } - }.bind(this)); - - this.factor = (this.options.scaleTo - this.options.scaleFrom)/100; - - this.dims = null; - if (this.options.scaleMode=='box') - this.dims = [this.element.offsetHeight, this.element.offsetWidth]; - if (/^content/.test(this.options.scaleMode)) - this.dims = [this.element.scrollHeight, this.element.scrollWidth]; - if (!this.dims) - this.dims = [this.options.scaleMode.originalHeight, - this.options.scaleMode.originalWidth]; - }, - update: function(position) { - var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); - if (this.options.scaleContent && this.fontSize) - this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType }); - this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale); - }, - finish: function(position) { - if (this.restoreAfterFinish) this.element.setStyle(this.originalStyle); - }, - setDimensions: function(height, width) { - var d = { }; - if (this.options.scaleX) d.width = width.round() + 'px'; - if (this.options.scaleY) d.height = height.round() + 'px'; - if (this.options.scaleFromCenter) { - var topd = (height - this.dims[0])/2; - var leftd = (width - this.dims[1])/2; - if (this.elementPositioning == 'absolute') { - if (this.options.scaleY) d.top = this.originalTop-topd + 'px'; - if (this.options.scaleX) d.left = this.originalLeft-leftd + 'px'; - } else { - if (this.options.scaleY) d.top = -topd + 'px'; - if (this.options.scaleX) d.left = -leftd + 'px'; - } - } - this.element.setStyle(d); - } -}); - -Effect.Highlight = Class.create(Effect.Base, { - initialize: function(element) { - this.element = $(element); - if (!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || { }); - this.start(options); - }, - setup: function() { - // Prevent executing on elements not in the layout flow - if (this.element.getStyle('display')=='none') { this.cancel(); return; } - // Disable background image during the effect - this.oldStyle = { }; - if (!this.options.keepBackgroundImage) { - this.oldStyle.backgroundImage = this.element.getStyle('background-image'); - this.element.setStyle({backgroundImage: 'none'}); - } - if (!this.options.endcolor) - this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff'); - if (!this.options.restorecolor) - this.options.restorecolor = this.element.getStyle('background-color'); - // init color calculations - this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this)); - this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this)); - }, - update: function(position) { - this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){ - return m+((this._base[i]+(this._delta[i]*position)).round().toColorPart()); }.bind(this)) }); - }, - finish: function() { - this.element.setStyle(Object.extend(this.oldStyle, { - backgroundColor: this.options.restorecolor - })); - } -}); - -Effect.ScrollTo = function(element) { - var options = arguments[1] || { }, - scrollOffsets = document.viewport.getScrollOffsets(), - elementOffsets = $(element).cumulativeOffset(); - - if (options.offset) elementOffsets[1] += options.offset; - - return new Effect.Tween(null, - scrollOffsets.top, - elementOffsets[1], - options, - function(p){ scrollTo(scrollOffsets.left, p.round()); } - ); -}; - -/* ------------- combination effects ------------- */ - -Effect.Fade = function(element) { - element = $(element); - var oldOpacity = element.getInlineOpacity(); - var options = Object.extend({ - from: element.getOpacity() || 1.0, - to: 0.0, - afterFinishInternal: function(effect) { - if (effect.options.to!=0) return; - effect.element.hide().setStyle({opacity: oldOpacity}); - } - }, arguments[1] || { }); - return new Effect.Opacity(element,options); -}; - -Effect.Appear = function(element) { - element = $(element); - var options = Object.extend({ - from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0), - to: 1.0, - // force Safari to render floated elements properly - afterFinishInternal: function(effect) { - effect.element.forceRerendering(); - }, - beforeSetup: function(effect) { - effect.element.setOpacity(effect.options.from).show(); - }}, arguments[1] || { }); - return new Effect.Opacity(element,options); -}; - -Effect.Puff = function(element) { - element = $(element); - var oldStyle = { - opacity: element.getInlineOpacity(), - position: element.getStyle('position'), - top: element.style.top, - left: element.style.left, - width: element.style.width, - height: element.style.height - }; - return new Effect.Parallel( - [ new Effect.Scale(element, 200, - { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }), - new Effect.Opacity(element, { sync: true, to: 0.0 } ) ], - Object.extend({ duration: 1.0, - beforeSetupInternal: function(effect) { - Position.absolutize(effect.effects[0].element); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.hide().setStyle(oldStyle); } - }, arguments[1] || { }) - ); -}; - -Effect.BlindUp = function(element) { - element = $(element); - element.makeClipping(); - return new Effect.Scale(element, 0, - Object.extend({ scaleContent: false, - scaleX: false, - restoreAfterFinish: true, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping(); - } - }, arguments[1] || { }) - ); -}; - -Effect.BlindDown = function(element) { - element = $(element); - var elementDimensions = element.getDimensions(); - return new Effect.Scale(element, 100, Object.extend({ - scaleContent: false, - scaleX: false, - scaleFrom: 0, - scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, - restoreAfterFinish: true, - afterSetup: function(effect) { - effect.element.makeClipping().setStyle({height: '0px'}).show(); - }, - afterFinishInternal: function(effect) { - effect.element.undoClipping(); - } - }, arguments[1] || { })); -}; - -Effect.SwitchOff = function(element) { - element = $(element); - var oldOpacity = element.getInlineOpacity(); - return new Effect.Appear(element, Object.extend({ - duration: 0.4, - from: 0, - transition: Effect.Transitions.flicker, - afterFinishInternal: function(effect) { - new Effect.Scale(effect.element, 1, { - duration: 0.3, scaleFromCenter: true, - scaleX: false, scaleContent: false, restoreAfterFinish: true, - beforeSetup: function(effect) { - effect.element.makePositioned().makeClipping(); - }, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity}); - } - }); - } - }, arguments[1] || { })); -}; - -Effect.DropOut = function(element) { - element = $(element); - var oldStyle = { - top: element.getStyle('top'), - left: element.getStyle('left'), - opacity: element.getInlineOpacity() }; - return new Effect.Parallel( - [ new Effect.Move(element, {x: 0, y: 100, sync: true }), - new Effect.Opacity(element, { sync: true, to: 0.0 }) ], - Object.extend( - { duration: 0.5, - beforeSetup: function(effect) { - effect.effects[0].element.makePositioned(); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle); - } - }, arguments[1] || { })); -}; - -Effect.Shake = function(element) { - element = $(element); - var options = Object.extend({ - distance: 20, - duration: 0.5 - }, arguments[1] || {}); - var distance = parseFloat(options.distance); - var split = parseFloat(options.duration) / 10.0; - var oldStyle = { - top: element.getStyle('top'), - left: element.getStyle('left') }; - return new Effect.Move(element, - { x: distance, y: 0, duration: split, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) { - new Effect.Move(effect.element, - { x: -distance, y: 0, duration: split, afterFinishInternal: function(effect) { - effect.element.undoPositioned().setStyle(oldStyle); - }}); }}); }}); }}); }}); }}); -}; - -Effect.SlideDown = function(element) { - element = $(element).cleanWhitespace(); - // SlideDown need to have the content of the element wrapped in a container element with fixed height! - var oldInnerBottom = element.down().getStyle('bottom'); - var elementDimensions = element.getDimensions(); - return new Effect.Scale(element, 100, Object.extend({ - scaleContent: false, - scaleX: false, - scaleFrom: window.opera ? 0 : 1, - scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, - restoreAfterFinish: true, - afterSetup: function(effect) { - effect.element.makePositioned(); - effect.element.down().makePositioned(); - if (window.opera) effect.element.setStyle({top: ''}); - effect.element.makeClipping().setStyle({height: '0px'}).show(); - }, - afterUpdateInternal: function(effect) { - effect.element.down().setStyle({bottom: - (effect.dims[0] - effect.element.clientHeight) + 'px' }); - }, - afterFinishInternal: function(effect) { - effect.element.undoClipping().undoPositioned(); - effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); } - }, arguments[1] || { }) - ); -}; - -Effect.SlideUp = function(element) { - element = $(element).cleanWhitespace(); - var oldInnerBottom = element.down().getStyle('bottom'); - var elementDimensions = element.getDimensions(); - return new Effect.Scale(element, window.opera ? 0 : 1, - Object.extend({ scaleContent: false, - scaleX: false, - scaleMode: 'box', - scaleFrom: 100, - scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width}, - restoreAfterFinish: true, - afterSetup: function(effect) { - effect.element.makePositioned(); - effect.element.down().makePositioned(); - if (window.opera) effect.element.setStyle({top: ''}); - effect.element.makeClipping().show(); - }, - afterUpdateInternal: function(effect) { - effect.element.down().setStyle({bottom: - (effect.dims[0] - effect.element.clientHeight) + 'px' }); - }, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping().undoPositioned(); - effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); - } - }, arguments[1] || { }) - ); -}; - -// Bug in opera makes the TD containing this element expand for a instance after finish -Effect.Squish = function(element) { - return new Effect.Scale(element, window.opera ? 1 : 0, { - restoreAfterFinish: true, - beforeSetup: function(effect) { - effect.element.makeClipping(); - }, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping(); - } - }); -}; - -Effect.Grow = function(element) { - element = $(element); - var options = Object.extend({ - direction: 'center', - moveTransition: Effect.Transitions.sinoidal, - scaleTransition: Effect.Transitions.sinoidal, - opacityTransition: Effect.Transitions.full - }, arguments[1] || { }); - var oldStyle = { - top: element.style.top, - left: element.style.left, - height: element.style.height, - width: element.style.width, - opacity: element.getInlineOpacity() }; - - var dims = element.getDimensions(); - var initialMoveX, initialMoveY; - var moveX, moveY; - - switch (options.direction) { - case 'top-left': - initialMoveX = initialMoveY = moveX = moveY = 0; - break; - case 'top-right': - initialMoveX = dims.width; - initialMoveY = moveY = 0; - moveX = -dims.width; - break; - case 'bottom-left': - initialMoveX = moveX = 0; - initialMoveY = dims.height; - moveY = -dims.height; - break; - case 'bottom-right': - initialMoveX = dims.width; - initialMoveY = dims.height; - moveX = -dims.width; - moveY = -dims.height; - break; - case 'center': - initialMoveX = dims.width / 2; - initialMoveY = dims.height / 2; - moveX = -dims.width / 2; - moveY = -dims.height / 2; - break; - } - - return new Effect.Move(element, { - x: initialMoveX, - y: initialMoveY, - duration: 0.01, - beforeSetup: function(effect) { - effect.element.hide().makeClipping().makePositioned(); - }, - afterFinishInternal: function(effect) { - new Effect.Parallel( - [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }), - new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }), - new Effect.Scale(effect.element, 100, { - scaleMode: { originalHeight: dims.height, originalWidth: dims.width }, - sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true}) - ], Object.extend({ - beforeSetup: function(effect) { - effect.effects[0].element.setStyle({height: '0px'}).show(); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle); - } - }, options) - ); - } - }); -}; - -Effect.Shrink = function(element) { - element = $(element); - var options = Object.extend({ - direction: 'center', - moveTransition: Effect.Transitions.sinoidal, - scaleTransition: Effect.Transitions.sinoidal, - opacityTransition: Effect.Transitions.none - }, arguments[1] || { }); - var oldStyle = { - top: element.style.top, - left: element.style.left, - height: element.style.height, - width: element.style.width, - opacity: element.getInlineOpacity() }; - - var dims = element.getDimensions(); - var moveX, moveY; - - switch (options.direction) { - case 'top-left': - moveX = moveY = 0; - break; - case 'top-right': - moveX = dims.width; - moveY = 0; - break; - case 'bottom-left': - moveX = 0; - moveY = dims.height; - break; - case 'bottom-right': - moveX = dims.width; - moveY = dims.height; - break; - case 'center': - moveX = dims.width / 2; - moveY = dims.height / 2; - break; - } - - return new Effect.Parallel( - [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }), - new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}), - new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }) - ], Object.extend({ - beforeStartInternal: function(effect) { - effect.effects[0].element.makePositioned().makeClipping(); - }, - afterFinishInternal: function(effect) { - effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); } - }, options) - ); -}; - -Effect.Pulsate = function(element) { - element = $(element); - var options = arguments[1] || { }, - oldOpacity = element.getInlineOpacity(), - transition = options.transition || Effect.Transitions.linear, - reverser = function(pos){ - return 1 - transition((-Math.cos((pos*(options.pulses||5)*2)*Math.PI)/2) + .5); - }; - - return new Effect.Opacity(element, - Object.extend(Object.extend({ duration: 2.0, from: 0, - afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); } - }, options), {transition: reverser})); -}; - -Effect.Fold = function(element) { - element = $(element); - var oldStyle = { - top: element.style.top, - left: element.style.left, - width: element.style.width, - height: element.style.height }; - element.makeClipping(); - return new Effect.Scale(element, 5, Object.extend({ - scaleContent: false, - scaleX: false, - afterFinishInternal: function(effect) { - new Effect.Scale(element, 1, { - scaleContent: false, - scaleY: false, - afterFinishInternal: function(effect) { - effect.element.hide().undoClipping().setStyle(oldStyle); - } }); - }}, arguments[1] || { })); -}; - -Effect.Morph = Class.create(Effect.Base, { - initialize: function(element) { - this.element = $(element); - if (!this.element) throw(Effect._elementDoesNotExistError); - var options = Object.extend({ - style: { } - }, arguments[1] || { }); - - if (!Object.isString(options.style)) this.style = $H(options.style); - else { - if (options.style.include(':')) - this.style = options.style.parseStyle(); - else { - this.element.addClassName(options.style); - this.style = $H(this.element.getStyles()); - this.element.removeClassName(options.style); - var css = this.element.getStyles(); - this.style = this.style.reject(function(style) { - return style.value == css[style.key]; - }); - options.afterFinishInternal = function(effect) { - effect.element.addClassName(effect.options.style); - effect.transforms.each(function(transform) { - effect.element.style[transform.style] = ''; - }); - }; - } - } - this.start(options); - }, - - setup: function(){ - function parseColor(color){ - if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff'; - color = color.parseColor(); - return $R(0,2).map(function(i){ - return parseInt( color.slice(i*2+1,i*2+3), 16 ); - }); - } - this.transforms = this.style.map(function(pair){ - var property = pair[0], value = pair[1], unit = null; - - if (value.parseColor('#zzzzzz') != '#zzzzzz') { - value = value.parseColor(); - unit = 'color'; - } else if (property == 'opacity') { - value = parseFloat(value); - if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout)) - this.element.setStyle({zoom: 1}); - } else if (Element.CSS_LENGTH.test(value)) { - var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/); - value = parseFloat(components[1]); - unit = (components.length == 3) ? components[2] : null; - } - - var originalValue = this.element.getStyle(property); - return { - style: property.camelize(), - originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0), - targetValue: unit=='color' ? parseColor(value) : value, - unit: unit - }; - }.bind(this)).reject(function(transform){ - return ( - (transform.originalValue == transform.targetValue) || - ( - transform.unit != 'color' && - (isNaN(transform.originalValue) || isNaN(transform.targetValue)) - ) - ); - }); - }, - update: function(position) { - var style = { }, transform, i = this.transforms.length; - while(i--) - style[(transform = this.transforms[i]).style] = - transform.unit=='color' ? '#'+ - (Math.round(transform.originalValue[0]+ - (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart() + - (Math.round(transform.originalValue[1]+ - (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart() + - (Math.round(transform.originalValue[2]+ - (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart() : - (transform.originalValue + - (transform.targetValue - transform.originalValue) * position).toFixed(3) + - (transform.unit === null ? '' : transform.unit); - this.element.setStyle(style, true); - } -}); - -Effect.Transform = Class.create({ - initialize: function(tracks){ - this.tracks = []; - this.options = arguments[1] || { }; - this.addTracks(tracks); - }, - addTracks: function(tracks){ - tracks.each(function(track){ - track = $H(track); - var data = track.values().first(); - this.tracks.push($H({ - ids: track.keys().first(), - effect: Effect.Morph, - options: { style: data } - })); - }.bind(this)); - return this; - }, - play: function(){ - return new Effect.Parallel( - this.tracks.map(function(track){ - var ids = track.get('ids'), effect = track.get('effect'), options = track.get('options'); - var elements = [$(ids) || $$(ids)].flatten(); - return elements.map(function(e){ return new effect(e, Object.extend({ sync:true }, options)) }); - }).flatten(), - this.options - ); - } -}); - -Element.CSS_PROPERTIES = $w( - 'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' + - 'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' + - 'borderRightColor borderRightStyle borderRightWidth borderSpacing ' + - 'borderTopColor borderTopStyle borderTopWidth bottom clip color ' + - 'fontSize fontWeight height left letterSpacing lineHeight ' + - 'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+ - 'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' + - 'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' + - 'right textIndent top width wordSpacing zIndex'); - -Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/; - -String.__parseStyleElement = document.createElement('div'); -String.prototype.parseStyle = function(){ - var style, styleRules = $H(); - if (Prototype.Browser.WebKit) - style = new Element('div',{style:this}).style; - else { - String.__parseStyleElement.innerHTML = '
    '; - style = String.__parseStyleElement.childNodes[0].style; - } - - Element.CSS_PROPERTIES.each(function(property){ - if (style[property]) styleRules.set(property, style[property]); - }); - - if (Prototype.Browser.IE && this.include('opacity')) - styleRules.set('opacity', this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]); - - return styleRules; -}; - -if (document.defaultView && document.defaultView.getComputedStyle) { - Element.getStyles = function(element) { - var css = document.defaultView.getComputedStyle($(element), null); - return Element.CSS_PROPERTIES.inject({ }, function(styles, property) { - styles[property] = css[property]; - return styles; - }); - }; -} else { - Element.getStyles = function(element) { - element = $(element); - var css = element.currentStyle, styles; - styles = Element.CSS_PROPERTIES.inject({ }, function(results, property) { - results[property] = css[property]; - return results; - }); - if (!styles.opacity) styles.opacity = element.getOpacity(); - return styles; - }; -} - -Effect.Methods = { - morph: function(element, style) { - element = $(element); - new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || { })); - return element; - }, - visualEffect: function(element, effect, options) { - element = $(element); - var s = effect.dasherize().camelize(), klass = s.charAt(0).toUpperCase() + s.substring(1); - new Effect[klass](element, options); - return element; - }, - highlight: function(element, options) { - element = $(element); - new Effect.Highlight(element, options); - return element; - } -}; - -$w('fade appear grow shrink fold blindUp blindDown slideUp slideDown '+ - 'pulsate shake puff squish switchOff dropOut').each( - function(effect) { - Effect.Methods[effect] = function(element, options){ - element = $(element); - Effect[effect.charAt(0).toUpperCase() + effect.substring(1)](element, options); - return element; - }; - } -); - -$w('getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles').each( - function(f) { Effect.Methods[f] = Element[f]; } -); - -Element.addMethods(Effect.Methods); \ No newline at end of file diff --git a/sources/html/js/forecast.js b/sources/html/js/forecast.js deleted file mode 100644 index 8195bd1..0000000 --- a/sources/html/js/forecast.js +++ /dev/null @@ -1,25 +0,0 @@ - -/* - * This file is part of NOALYSS. - * - * NOALYSS is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * NOALYSS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NOALYSS; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder danydb@aevalys.eu - -/*!\file - * \brief - */ diff --git a/sources/html/js/gestion.js b/sources/html/js/gestion.js deleted file mode 100644 index d7c0e5d..0000000 --- a/sources/html/js/gestion.js +++ /dev/null @@ -1,389 +0,0 @@ -/* - * This file is part of NOALYSS. - * - * NOALYSS is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * NOALYSS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NOALYSS; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/* $Revision$ */ - -// Copyright Author Dany De Bontridder danydb@aevalys.eu - -/*!\file - * \brief javascript scripts for the gestion - * - */ - - - -/** - *@brief remove an attached document of an action - *@param dossier - *@param dt_id id of the document (pk document:d_id) -*/ -function remove_document(p_dossier,p_id) -{ - var queryString="gDossier="+p_dossier+"&a=rm&d_id="+p_id; - var action=new Ajax.Request ( - "show_document.php", - { - method:'get', - parameters:queryString, - onFailure:errorRemoveDoc, - onSuccess:successRemoveDoc - } - - ); - -} -/** - *@brief update the description of an attached document of an action - *@param dossier - *@param dt_id id of the document (pk document:d_id) -*/ -function update_document(p_dossier,p_id) -{ - var queryString="gDossier="+p_dossier+"&a=upd_doc&d_id="+p_id; - queryString+="&value="+$('input_desc_txt'+p_id).value; - var action=new Ajax.Request ( - "show_document.php", - { - method:'get', - parameters:queryString, - onFailure:errorRemoveDoc, - onSuccess:function(req){ - $('input_desc'+p_id).hide(); - $('print_desc'+p_id).innerHTML=$('input_desc_txt'+p_id).value+'Modifier'; - $('print_desc'+p_id).show(); - } - } - - ); - return false; -} - -/** - *@brief remove the concerned operation of an action - *@param dossier - *@param p_id id pk action_comment_operation -*/ -function remove_operation(p_dossier,p_id) -{ - var queryString="gDossier="+p_dossier+"&a=rmop&id="+p_id; - var action=new Ajax.Request ( - "show_document.php", - { - method:'get', - parameters:queryString, - onFailure:errorRemoveDoc, - onSuccess:successRemoveOp - } - - ); - -} -function successRemoveOp(request,json) -{ - try{ - var answer=request.responseText.evalJSON(true); - if ( answer.ago_id == -1 ) { alert_box ('Effacement non autorisé');return;} - - var action="acop"+answer.ago_id; - $(action).innerHTML=""; - var doc="op"+answer.ago_id; - $(doc).style.color="red"; - $(doc).href="javascript:alert_box('Commentaire Effacé')"; - $(doc).style.textDecoration="line-through"; - }catch(e){ - alert_box(e.message); - } -} -/** - *@brief remove the concerned operation of an action - *@param dossier - *@param p_id id pk action_comment_operation -*/ -function remove_action(p_dossier,p_id,ag_id) -{ - queryString="gDossier="+p_dossier+"&a=rmaction&id="+p_id+"&ag_id="+ag_id; - var action=new Ajax.Request ( - "show_document.php", - { - method:'get', - parameters:queryString, - onFailure:ajax_misc_failure, - onSuccess:function(request,json) { - try{ - var answer=request.responseText.evalJSON(true); - if ( answer.act_id == -1 ) { alert_box ('Effacement non autorisé');return;} - var action="acact"+answer.act_id; - $(action).innerHTML=""; - var doc="act"+answer.act_id; - $(doc).style.color="red"; - $(doc).href="javascript:alert_box('Action Effacée')"; - $(doc).style.textDecoration="line-through"; - } catch (e){ alert_box(e.message);} - } - } - - ); - -} -/** - *@brief remove comment of an action - *@param dossier - *@param p_id pk action_gestion_comment -*/ -function remove_comment(p_dossier,p_id) -{ - queryString="gDossier="+p_dossier+"&a=rmcomment&id="+p_id; - var action=new Ajax.Request ( - "show_document.php", - { - method:'get', - parameters:queryString, - onFailure:errorRemoveDoc, - onSuccess:successRemoveComment - } - - ); - -} -function successRemoveComment(request,json) -{ - var answer=request.responseText.evalJSON(true); - if ( answer.agc_id == -1 ) { alert_box ('Effacement non autorisé');return;} - var action="accom"+answer.agc_id; - $(action).innerHTML=""; - var doc="com"+answer.agc_id; - $(doc).style.color="red"; - $(doc).href="javascript:alert_box('Commentaire Effacé')"; - $(doc).style.textDecoration="line-through"; - -} -/** - *@brief error if a document if removed - */ -function errorRemoveDoc() -{ - alert_box('Impossible d\'effacer ce document'); -} -/** - *@brief success when removing a document - */ -function successRemoveDoc(request,json) -{ - var answer=request.responseText.evalJSON(true); - if ( answer.d_id == -1 ) { alert_box ('Effacement non autorisé');return;} - var action="ac"+answer.d_id; - $(action).innerHTML=""; - var doc="doc"+answer.d_id; - $(doc).style.color="red"; - $(doc).href="javascript:alert_box('Document Effacé')"; - $(doc).style.textDecoration="line-through"; - $('desc'+answer.d_id).innerHTML=""; - -} -/** -* @brief check the format of the hour -* @param p_ctl is the control where the hour is encoded -*/ -function check_hour(p_ctl) -{ - try - { - var h=document.getElementById(p_ctl); - var re = /^\d{1,2}:\d{2}$/; - if ( trim(h.value) !='' && ! h.value.match(re)) - alert_box("Format de l'heure est HH:MM ") - } - catch (erreur) - { - alert_box('fct : check_hour '+erreur); - } - -} -/** - *@brief remove an attached document of an action - *@param dossier - *@param dt_id id of the document (pk document:d_id) -*/ - -function removeStock(s_id,p_dossier) -{ - smoke.confirm("Confirmez-vous l'effacement de cette entrée dans le stock?", - function (a) { - if (a) - { - queryString="gDossier="+p_dossier+"&op=rm_stock&s_id="+s_id; - var action=new Ajax.Request ( - "ajax_misc.php", - { - method:'get', - parameters:queryString, - onFailure:errorRemoveStock, - onSuccess:successRemoveStock - } - ); - - } - else { - return ; - } - }); -} -/** - *@brief error if a document if removed - */ -function errorRemoveStock() -{ - alert_box('Impossible d\'effacer '); -} -/** - *@brief success when removing a document - */ -function successRemoveStock(request,json) -{ - try - { - var answer=request.responseText.evalJSON(true); - var doc="stock"+answer.d_id; - var href="href"+answer.d_id; - $(href).innerHTML=''; - - $(doc).style.color="red"; - // $(doc).href="javascript:alert_box('Stock Effacé')"; - $(doc).style.textDecoration="line-through"; - } catch (e) -{ - alert_box("success_box"+e.message); - } -} -/** - * @brief display details of the last actions in management - * called from dashboard - * @param p_dossier : dossier id - */ -function action_show(p_dossier) -{ - try { - waiting_box(); - var action = new Ajax.Request('ajax_misc.php', - { - method:'get', - parameters : {gDossier:p_dossier,'op':'action_show'}, - onSuccess : function(p_xml, p_text) { - remove_waiting_box(); - add_div({id: 'action_list_div', style:"top:1%;width:90%;left:5%" , cssclass: 'inner_box'}); - $('action_list_div').innerHTML=p_xml.responseText; - } - }); - } catch (e) - { - alert_box('action_show '+e.message); - } -} -/** - * @brief Display a box for adding a new event - * @param {type} p_dossier - * @returns {undefined} - */ -function action_add(p_dossier) { - try { - if ( $('action_add_div')) { - alert_box('Désolé, événement en cours de création à sauver'); - return; - } - waiting_box(); - var action = new Ajax.Request('ajax_misc.php', - { - method:'get', - parameters : {gDossier:p_dossier,'op':'action_add'}, - onSuccess : function(p_xml, p_text) { - remove_waiting_box(); - add_div({id: 'action_add_div', - style:"top:1%;width:80%;left:10%" , - cssclass: 'inner_box'}); - $('action_add_div').innerHTML=p_xml.responseText; - p_xml.responseText.evalScripts(); - } - }); - } catch (e) - { - alert_box('action_add '+e.message); - } -} -/** - * @brief The new event is entered into the div action_add_div, we try - * to save and receive as answer a XML file with a code of success and possibly - * a message - * If the message is OK then the div is fading out, otherwise the reason of - * failure is shown and the div remains - */ -function action_save_short() -{ - try { - $('action_add_frm_info').innerHTML=""; - $('action_add_frm')['date_event_action_short'].parentNode.className=""; - $('action_add_frm')['title_event'].parentNode.className=""; - $('action_add_frm')['type_event'].parentNode.className=""; - - if ( $('action_add_frm')['date_event_action_short'].value.trim() == '') { - $('action_add_frm')['date_event_action_short'].parentNode.className="notice"; - return false; - } - - if ( $('action_add_frm')['title_event'].value.trim()=="") { - $('action_add_frm')['title_event'].parentNode.className="notice"; - return false; - } - - if ( $('action_add_frm')['type_event'].options[$('action_add_frm')['type_event'].selectedIndex].value == -1 ) - { - $('action_add_frm')['type_event'].parentNode.className="notice"; - return false; - } - var form=$('action_add_frm').serialize(); - waiting_box(); - var action = new Ajax.Request('ajax_misc.php', - { - method: 'get', - parameters: form, - onSuccess: function (p_xml, p_text) { - remove_waiting_box(); - var answer=p_xml.responseXML; - var code_tags=answer.getElementsByTagName('status'); - var code=getNodeText(code_tags[0]); - var message_tags=answer.getElementsByTagName('content'); - var message=getNodeText(message_tags[0]); - - if ( code == 'OK') { - // Successfully saved - $('action_add_frm_info').innerHTML=message; - $('action_add_div').remove(); - - } - else if (code == 'NOK') { - // issue while saving - $('action_add_frm_info').innerHTML=message; - } - - - } - }); - } catch (e) - { - alert_box('action_add ' + e.message); - } - return false; -} \ No newline at end of file diff --git a/sources/html/js/infobulle.js b/sources/html/js/infobulle.js deleted file mode 100644 index 3b9244c..0000000 --- a/sources/html/js/infobulle.js +++ /dev/null @@ -1,98 +0,0 @@ -/* - * This file is part of NOALYSS. - * - * NOALYSS is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * NOALYSS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NOALYSS; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -/*!\file - * \brief create the infobulle, the internalization is not yet implemented - * \code - // Example - echo JS_INFOBULLE; - echo HtmlInput::infobulle(x); - \endcode - */ - -var posX=0,posY=0,offsetX=10,offsetY=10; -document.onmousemove=getPosition; -var content=new Array(); -content[0]="Cherchez en saisissant le quickcode, le poste comptable ou une partie du nom de la fiche ou de l'adresse"; -content[1]="(optionnel) La description est un commentaire libre qui sert à identifier cette opération"; -content[2]="Selectionnez le journal où l'opération doit être sauvée"; -content[3]="Les périodes comptables servent comme un second contrôle pour la date de l'opération. Modifiez dans vos préférence pour avoir une autre période par défaut. Pour ne plus avoir à changer la période aller dans COMPANY, et mettez \"Afficher la période comptable\" à non"; -content[4]="(optionnel) L'échéance est la date limite de paiement"; -content[5]="(optionnel)Le numéro d'extrait permet de retrouver plus facilement l'extrait de banque"; -content[6]="Indiquez ici le prix hors tva si vous êtes affilié à la tva et que vous pouvez la déduire , sinon indiquez ici le total tva incluse et utilisez un taux tva de 0%"; -content[7]="(optionnel) Ces champs servent à contrôler que les montants correspondent à l'extrait"; -content[8]="(optionnel) Ce montant correspond au total tva, si vous le laissez à vide, il sera calculé automatiquement en fonction du taux"; -content[9]="Tapez le numéro de poste ou une partie du poste ou du libellé puis sur recherche, Si vous avez donné un quickcode, le poste comptable ne sera pas utilisé"; -content[10]="ATTENTION changer le poste comptable d'une fiche ne modifiera pas toutes les opérations où cette fiche est utilisée"; -content[11]="ATTENTION si le poste comptable est vide, il sera créé automatiquement"; -content[12]="Document généré uniquement si le mode de paiement est utilisé"; -content[13]="Vous pouvez utiliser le % pour indiquer le poste parent"; -content[14]="Attention, le poste comptable doit exister, il ne sera pas vérifié"; -content[15]="Laissez à 0 pour ne rien changer"; -content[16]="Vous devez donner la date par opération"; -content[17]="Cliquez sur le titre d'une colonne pour trier"; -content[18]="Donnez une partie du nom, prénom, de la description, du poste comptable, du n° de TVA,quick code ... "; -content[19]="Donnez une partie du nom, de la description, du n° de TVA du poste comptable ou du quick code"; -content[20]="Les menus ne peuvent dépendre que dans d'un menu principal ou d'un menu, si cette liste est vide, ajouter des modules ou menu principal sans donner de dépendance"; -content[21]="Donnez un nombre entre 0 & 100"; -content[22]="Donnez une partie du nom du dossier,du nom, du prénom ou du login pour filtrer"; -content[23]="Donnez une partie du nom du dossier ou de la description pour filtrer"; -content[24]="Donnez une partie du poste comptable ou du libellé pour filtrer"; -content[25]="Donnez une partie du libellé, la date, le montant ou le numéro d'opération pour filtrer, cela n'efface pas ce qui a déjà été sélectionné"; -content[26]="Donnez une partie du quickcode, nom, description... pour filtrer"; -content[27]="Attention, SI la fiche a changé de poste comptable, c'est seulement le dernier qui est affiché"; -content[28]="Attention Différence entre TVA calculée et donnée"; -content[29]="Si vous ne donnez pas de nom, ce sera le nom du fichier qui sera utilisé"; -content[30]="Peut contenir une information telle que le message structuré sur le virement"; -content[31]="Peut contenir un numéro de bon de commande"; -content[32]='

    Remarque : choix possibles

    • Détail opérations ne donne pas le même résultat si on regarde tous les journaux ou un journal de type ACH ou VEN
    • Liste opérations ne donne pas le même résultat si on regarde tous les journaux ou un journal de type ACH ou VEN
    • Journaux VEN ou ACH en mode "détail opérations" donne les détails des factures, y compris les montants, TVA et quantité par article
    • Journaux VEN ou ACH en mode "liste opérations" donne pour chaque opération, le total de la TVA, ND, ...
    '; -content[33]='le type vaut :
    • ME pour Menu
    • PR pour les impressions
    • PL pour les plugins
    • SP pour des valeurs spéciales
    '; -content[34]='Cliquez sur le code AD pour ouvrir le menu dans un nouvel onglet'; -content[35]='Cliquez sur le chemin pour ouvrir le menu'; -content[36]='En utilisant les dates d\'échéance ou de paiement, seuls les journaux de type ACH et VEN seront utilisés ,vous excluez d\'office les autres journaux'; -content[37]='Les dates sont en format DD.MM.YYYY'; -content[38]='La numérotation est propre à chaque journal. Laissez à 0 pour ne pas changer le numéro'; -content[39]='Le préfixe des pièces doit être différent pour chaque journal, on peut aussi utiliser l\'année'; -content[40]='Laissez à 0 pour ne pas changer le numéro'; -content[41]='Mettez le pourcentage à zéro pour effacer la ligne'; -content[42]="Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche"; - -function showBulle(p_ctl){ - var d=document.getElementById('bulle'); - d.innerHTML=content[p_ctl]; - d.style.top=posY+offsetY+"px"; - d.style.left=posX+offsetX+"px"; - d.style.visibility="visible"; -} -function getPosition(e) -{ - if (document.all) - { - posX=event.x+document.body.scrollLeft; - posY=event.y+document.body.scrollTop; - } - else - { - posX=e.pageX; - posY=e.pageY; - } -} -function hideBulle(p_ctl) -{ - var d=document.getElementById('bulle'); - d.style.visibility="hidden"; -} diff --git a/sources/html/js/jcalendar.js b/sources/html/js/jcalendar.js deleted file mode 100644 index defe0df..0000000 --- a/sources/html/js/jcalendar.js +++ /dev/null @@ -1,3 +0,0 @@ -function test() { - alert("GO"); -} \ No newline at end of file diff --git a/sources/html/js/lang/calendar-af.js b/sources/html/js/lang/calendar-af.js deleted file mode 100644 index aeda581..0000000 --- a/sources/html/js/lang/calendar-af.js +++ /dev/null @@ -1,39 +0,0 @@ -// ** I18N Afrikaans -Calendar._DN = new Array -("Sondag", - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrydag", - "Saterdag", - "Sondag"); -Calendar._MN = new Array -("Januarie", - "Februarie", - "Maart", - "April", - "Mei", - "Junie", - "Julie", - "Augustus", - "September", - "Oktober", - "November", - "Desember"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Verander eerste dag van die week"; -Calendar._TT["PREV_YEAR"] = "Vorige jaar (hou vir keuselys)"; -Calendar._TT["PREV_MONTH"] = "Vorige maand (hou vir keuselys)"; -Calendar._TT["GO_TODAY"] = "Gaan na vandag"; -Calendar._TT["NEXT_MONTH"] = "Volgende maand (hou vir keuselys)"; -Calendar._TT["NEXT_YEAR"] = "Volgende jaar (hou vir keuselys)"; -Calendar._TT["SEL_DATE"] = "Kies datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te skuif"; -Calendar._TT["PART_TODAY"] = " (vandag)"; -Calendar._TT["MON_FIRST"] = "Vertoon Maandag eerste"; -Calendar._TT["SUN_FIRST"] = "Display Sunday first"; -Calendar._TT["CLOSE"] = "Close"; -Calendar._TT["TODAY"] = "Today"; diff --git a/sources/html/js/lang/calendar-al.js b/sources/html/js/lang/calendar-al.js deleted file mode 100644 index d028e37..0000000 --- a/sources/html/js/lang/calendar-al.js +++ /dev/null @@ -1,100 +0,0 @@ -// Calendar ALBANIAN language -//author Rigels Gordani rige@hotmail.com - -// ditet -Calendar._DN = new Array -("E Diele", -"E Hene", -"E Marte", -"E Merkure", -"E Enjte", -"E Premte", -"E Shtune", -"E Diele"); - -//ditet shkurt -Calendar._SDN = new Array -("Die", -"Hen", -"Mar", -"Mer", -"Enj", -"Pre", -"Sht", -"Die"); - -// muajt -Calendar._MN = new Array -("Janar", -"Shkurt", -"Mars", -"Prill", -"Maj", -"Qeshor", -"Korrik", -"Gusht", -"Shtator", -"Tetor", -"Nentor", -"Dhjetor"); - -// muajte shkurt -Calendar._SMN = new Array -("Jan", -"Shk", -"Mar", -"Pri", -"Maj", -"Qes", -"Kor", -"Gus", -"Sht", -"Tet", -"Nen", -"Dhj"); - -// ndihmesa -Calendar._TT = {}; -Calendar._TT["INFO"] = "Per kalendarin"; - -Calendar._TT["ABOUT"] = -"Zgjedhes i ores/dates ne DHTML \n" + -"\n\n" +"Zgjedhja e Dates:\n" + -"- Perdor butonat \xab, \xbb per te zgjedhur vitin\n" + -"- Perdor butonat" + String.fromCharCode(0x2039) + ", " + -String.fromCharCode(0x203a) + -" per te zgjedhur muajin\n" + -"- Mbani shtypur butonin e mousit per nje zgjedje me te shpejte."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Zgjedhja e kohes:\n" + -"- Kliko tek ndonje nga pjeset e ores per ta rritur ate\n" + -"- ose kliko me Shift per ta zvogeluar ate\n" + -"- ose cliko dhe terhiq per zgjedhje me te shpejte."; - -Calendar._TT["PREV_YEAR"] = "Viti i shkuar (prit per menune)"; -Calendar._TT["PREV_MONTH"] = "Muaji i shkuar (prit per menune)"; -Calendar._TT["GO_TODAY"] = "Sot"; -Calendar._TT["NEXT_MONTH"] = "Muaji i ardhshem (prit per menune)"; -Calendar._TT["NEXT_YEAR"] = "Viti i ardhshem (prit per menune)"; -Calendar._TT["SEL_DATE"] = "Zgjidh daten"; -Calendar._TT["DRAG_TO_MOVE"] = "Terhiqe per te levizur"; -Calendar._TT["PART_TODAY"] = " (sot)"; - -// "%s" eshte dita e pare e javes -// %s do te zevendesohet me emrin e dite -Calendar._TT["DAY_FIRST"] = "Trego te %s te paren"; - - -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Mbyll"; -Calendar._TT["TODAY"] = "Sot"; -Calendar._TT["TIME_PART"] = "Kliko me (Shift-)ose terhiqe per te ndryshuar vleren"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "Java"; -Calendar._TT["TIME"] = "Koha:"; - diff --git a/sources/html/js/lang/calendar-bg.js b/sources/html/js/lang/calendar-bg.js deleted file mode 100644 index 4f4fd86..0000000 --- a/sources/html/js/lang/calendar-bg.js +++ /dev/null @@ -1,124 +0,0 @@ -// ** I18N - -// Calendar BG language -// Author: Mihai Bazon, -// Translator: Valentin Sheiretsky, -// Encoding: Windows-1251 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("", - "", - "", - "", - "", - "", - "", - ""); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("", - "", - "", - "", - "", - "", - "", - ""); - -// full month names -Calendar._MN = new Array -("", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - ""); - -// short month names -Calendar._SMN = new Array -("", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - ""); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = " "; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Date selection:\n" + -"- Use the \xab, \xbb buttons to select year\n" + -"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + -"- Hold mouse button on any of the above buttons for faster selection."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Time selection:\n" + -"- Click on any of the time parts to increase it\n" + -"- or Shift-click to decrease it\n" + -"- or click and drag for faster selection."; - -Calendar._TT["PREV_YEAR"] = " ( )"; -Calendar._TT["PREV_MONTH"] = " ( )"; -Calendar._TT["GO_TODAY"] = " "; -Calendar._TT["NEXT_MONTH"] = " ( )"; -Calendar._TT["NEXT_YEAR"] = " ( )"; -Calendar._TT["SEL_DATE"] = " "; -Calendar._TT["DRAG_TO_MOVE"] = ""; -Calendar._TT["PART_TODAY"] = " ()"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "%s "; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = ""; -Calendar._TT["TODAY"] = ""; -Calendar._TT["TIME_PART"] = "(Shift-)Click drag "; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A - %e %B %Y"; - -Calendar._TT["WK"] = ""; -Calendar._TT["TIME"] = ":"; diff --git a/sources/html/js/lang/calendar-big5-utf8.js b/sources/html/js/lang/calendar-big5-utf8.js deleted file mode 100644 index 14e0d5d..0000000 --- a/sources/html/js/lang/calendar-big5-utf8.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar big5-utf8 language -// Author: Gary Fu, -// Encoding: utf8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("星期日", - "星期一", - "星期二", - "星期三", - "星期四", - "星期五", - "星期六", - "星期日"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("日", - "一", - "二", - "三", - "四", - "五", - "六", - "日"); - -// full month names -Calendar._MN = new Array -("一月", - "二月", - "三月", - "四月", - "五月", - "六月", - "七月", - "八月", - "九月", - "十月", - "十一月", - "十二月"); - -// short month names -Calendar._SMN = new Array -("一月", - "二月", - "三月", - "四月", - "五月", - "六月", - "七月", - "八月", - "九月", - "十月", - "十一月", - "十二月"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "關於"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"日期選擇方法:\n" + -"- 使用 \xab, \xbb 按鈕可選擇年份\n" + -"- 使用 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 按鈕可選擇月份\n" + -"- 按住上面的按鈕可以加快選取"; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"時間選擇方法:\n" + -"- 點擊任何的時間部份可增加其值\n" + -"- 同時按Shift鍵再點擊可減少其值\n" + -"- 點擊並拖曳可加快改變的值"; - -Calendar._TT["PREV_YEAR"] = "上一年 (按住選單)"; -Calendar._TT["PREV_MONTH"] = "下一年 (按住選單)"; -Calendar._TT["GO_TODAY"] = "到今日"; -Calendar._TT["NEXT_MONTH"] = "上一月 (按住選單)"; -Calendar._TT["NEXT_YEAR"] = "下一月 (按住選單)"; -Calendar._TT["SEL_DATE"] = "選擇日期"; -Calendar._TT["DRAG_TO_MOVE"] = "拖曳"; -Calendar._TT["PART_TODAY"] = " (今日)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "將 %s 顯示在前"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "關閉"; -Calendar._TT["TODAY"] = "今日"; -Calendar._TT["TIME_PART"] = "點擊or拖曳可改變時間(同時按Shift為減)"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "週"; -Calendar._TT["TIME"] = "Time:"; diff --git a/sources/html/js/lang/calendar-big5.js b/sources/html/js/lang/calendar-big5.js deleted file mode 100644 index a589358..0000000 --- a/sources/html/js/lang/calendar-big5.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar big5 language -// Author: Gary Fu, -// Encoding: big5 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("P", - "P@", - "PG", - "PT", - "P|", - "P", - "P", - "P"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("", - "@", - "G", - "T", - "|", - "", - "", - ""); - -// full month names -Calendar._MN = new Array -("@", - "G", - "T", - "|", - "", - "", - "C", - "K", - "E", - "Q", - "Q@", - "QG"); - -// short month names -Calendar._SMN = new Array -("@", - "G", - "T", - "|", - "", - "", - "C", - "K", - "E", - "Q", - "Q@", - "QG"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = ""; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"ܤk:\n" + -"- ϥ \xab, \xbb siܦ~\n" + -"- ϥ " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " siܤ\n" + -"- WsiH[ֿ"; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"ɶܤk:\n" + -"- I󪺮ɶiW[\n" + -"- PɫShiftAIi֨\n" + -"- Ié즲i[֧ܪ"; - -Calendar._TT["PREV_YEAR"] = "W@~ ()"; -Calendar._TT["PREV_MONTH"] = "U@~ ()"; -Calendar._TT["GO_TODAY"] = "줵"; -Calendar._TT["NEXT_MONTH"] = "W@ ()"; -Calendar._TT["NEXT_YEAR"] = "U@ ()"; -Calendar._TT["SEL_DATE"] = "ܤ"; -Calendar._TT["DRAG_TO_MOVE"] = "즲"; -Calendar._TT["PART_TODAY"] = " ()"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "N %s ܦbe"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = ""; -Calendar._TT["TODAY"] = ""; -Calendar._TT["TIME_PART"] = "Ior즲iܮɶ(PɫShift)"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "g"; -Calendar._TT["TIME"] = "Time:"; diff --git a/sources/html/js/lang/calendar-br.js b/sources/html/js/lang/calendar-br.js deleted file mode 100644 index bfb0747..0000000 --- a/sources/html/js/lang/calendar-br.js +++ /dev/null @@ -1,108 +0,0 @@ -// ** I18N - -// Calendar pt-BR language -// Author: Fernando Dourado, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sabádo", - "Domingo"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -// [No changes using default values] - -// full month names -Calendar._MN = new Array -("Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro"); - -// short month names -// [No changes using default values] - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Sobre o calendário"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Translate to portuguese Brazil (pt-BR) by Fernando Dourado (fernando.dourado@ig.com.br)\n" + -"Tradução para o português Brasil (pt-BR) por Fernando Dourado (fernando.dourado@ig.com.br)" + -"\n\n" + -"Selecionar data:\n" + -"- Use as teclas \xab, \xbb para selecionar o ano\n" + -"- Use as teclas " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para selecionar o mês\n" + -"- Clique e segure com o mouse em qualquer botão para selecionar rapidamente."; - -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selecionar hora:\n" + -"- Clique em qualquer uma das partes da hora para aumentar\n" + -"- ou Shift-clique para diminuir\n" + -"- ou clique e arraste para selecionar rapidamente."; - -Calendar._TT["PREV_YEAR"] = "Ano anterior (clique e segure para menu)"; -Calendar._TT["PREV_MONTH"] = "Mês anterior (clique e segure para menu)"; -Calendar._TT["GO_TODAY"] = "Ir para a data atual"; -Calendar._TT["NEXT_MONTH"] = "Próximo mês (clique e segure para menu)"; -Calendar._TT["NEXT_YEAR"] = "Próximo ano (clique e segure para menu)"; -Calendar._TT["SEL_DATE"] = "Selecione uma data"; -Calendar._TT["DRAG_TO_MOVE"] = "Clique e segure para mover"; -Calendar._TT["PART_TODAY"] = " (hoje)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Exibir %s primeiro"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Fechar"; -Calendar._TT["TODAY"] = "Hoje"; -Calendar._TT["TIME_PART"] = "(Shift-)Clique ou arraste para mudar o valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%d de %B de %Y"; - -Calendar._TT["WK"] = "sem"; -Calendar._TT["TIME"] = "Hora:"; - diff --git a/sources/html/js/lang/calendar-ca.js b/sources/html/js/lang/calendar-ca.js deleted file mode 100644 index a2121bc..0000000 --- a/sources/html/js/lang/calendar-ca.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar CA language -// Author: Mihai Bazon, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Diumenge", - "Dilluns", - "Dimarts", - "Dimecres", - "Dijous", - "Divendres", - "Dissabte", - "Diumenge"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Diu", - "Dil", - "Dmt", - "Dmc", - "Dij", - "Div", - "Dis", - "Diu"); - -// full month names -Calendar._MN = new Array -("Gener", - "Febrer", - "Mar", - "Abril", - "Maig", - "Juny", - "Juliol", - "Agost", - "Setembre", - "Octubre", - "Novembre", - "Desembre"); - -// short month names -Calendar._SMN = new Array -("Gen", - "Feb", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Oct", - "Nov", - "Des"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Sobre el calendari"; - -Calendar._TT["ABOUT"] = -"DHTML Selector de Data/Hora\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Sel.lecci de Dates:\n" + -"- Fes servir els botons \xab, \xbb per sel.leccionar l'any\n" + -"- Fes servir els botons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per se.lecciconar el mes\n" + -"- Mant el ratol apretat en qualsevol dels anteriors per sel.lecci rpida."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Time selection:\n" + -"- claca en qualsevol de les parts de la hora per augmentar-les\n" + -"- o Shift-click per decrementar-la\n" + -"- or click and arrastra per sel.lecci rpida."; - -Calendar._TT["PREV_YEAR"] = "Any anterior (Mantenir per menu)"; -Calendar._TT["PREV_MONTH"] = "Mes anterior (Mantenir per menu)"; -Calendar._TT["GO_TODAY"] = "Anar a avui"; -Calendar._TT["NEXT_MONTH"] = "Mes segent (Mantenir per menu)"; -Calendar._TT["NEXT_YEAR"] = "Any segent (Mantenir per menu)"; -Calendar._TT["SEL_DATE"] = "Sel.leccionar data"; -Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar per moure"; -Calendar._TT["PART_TODAY"] = " (avui)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Mostra %s primer"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Tanca"; -Calendar._TT["TODAY"] = "Avui"; -Calendar._TT["TIME_PART"] = "(Shift-)Click a arrastra per canviar el valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "st"; -Calendar._TT["TIME"] = "Hora:"; diff --git a/sources/html/js/lang/calendar-cs-utf8.js b/sources/html/js/lang/calendar-cs-utf8.js deleted file mode 100644 index f6bbbeb..0000000 --- a/sources/html/js/lang/calendar-cs-utf8.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - calendar-cs-win.js - language: Czech - encoding: windows-1250 - author: Lubos Jerabek (xnet@seznam.cz) - Jan Uhlir (espinosa@centrum.cz) -*/ - -// ** I18N -Calendar._DN = new Array('Neděle','Pondělí','Úterý','Středa','Čtvrtek','Pátek','Sobota','Neděle'); -Calendar._SDN = new Array('Ne','Po','Út','St','Čt','Pá','So','Ne'); -Calendar._MN = new Array('Leden','Únor','Březen','Duben','Květen','Červen','Červenec','Srpen','Září','Říjen','Listopad','Prosinec'); -Calendar._SMN = new Array('Led','Úno','Bře','Dub','Kvě','Črv','Čvc','Srp','Zář','Říj','Lis','Pro'); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O komponentě kalendář"; -Calendar._TT["TOGGLE"] = "Změna prvního dne v týdnu"; -Calendar._TT["PREV_YEAR"] = "Předchozí rok (přidrž pro menu)"; -Calendar._TT["PREV_MONTH"] = "Předchozí měsíc (přidrž pro menu)"; -Calendar._TT["GO_TODAY"] = "Dnešní datum"; -Calendar._TT["NEXT_MONTH"] = "Další měsíc (přidrž pro menu)"; -Calendar._TT["NEXT_YEAR"] = "Další rok (přidrž pro menu)"; -Calendar._TT["SEL_DATE"] = "Vyber datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Chyť a táhni, pro přesun"; -Calendar._TT["PART_TODAY"] = " (dnes)"; -Calendar._TT["MON_FIRST"] = "Ukaž jako první Pondělí"; -//Calendar._TT["SUN_FIRST"] = "Ukaž jako první Neděli"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Výběr datumu:\n" + -"- Use the \xab, \xbb buttons to select year\n" + -"- Použijte tlačítka " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " k výběru měsíce\n" + -"- Podržte tlačítko myši na jakémkoliv z těch tlačítek pro rychlejší výběr."; - -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Výběr času:\n" + -"- Klikněte na jakoukoliv z částí výběru času pro zvýšení.\n" + -"- nebo Shift-click pro snížení\n" + -"- nebo klikněte a táhněte pro rychlejší výběr."; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Zobraz %s první"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Zavřít"; -Calendar._TT["TODAY"] = "Dnes"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikni nebo táhni pro změnu hodnoty"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Čas:"; diff --git a/sources/html/js/lang/calendar-cs-win.js b/sources/html/js/lang/calendar-cs-win.js deleted file mode 100644 index 140dff3..0000000 --- a/sources/html/js/lang/calendar-cs-win.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - calendar-cs-win.js - language: Czech - encoding: windows-1250 - author: Lubos Jerabek (xnet@seznam.cz) - Jan Uhlir (espinosa@centrum.cz) -*/ - -// ** I18N -Calendar._DN = new Array('Nedle','Pondl','ter','Steda','tvrtek','Ptek','Sobota','Nedle'); -Calendar._SDN = new Array('Ne','Po','t','St','t','P','So','Ne'); -Calendar._MN = new Array('Leden','nor','Bezen','Duben','Kvten','erven','ervenec','Srpen','Z','jen','Listopad','Prosinec'); -Calendar._SMN = new Array('Led','no','Be','Dub','Kv','rv','vc','Srp','Z','j','Lis','Pro'); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O komponent kalend"; -Calendar._TT["TOGGLE"] = "Zmna prvnho dne v tdnu"; -Calendar._TT["PREV_YEAR"] = "Pedchoz rok (pidr pro menu)"; -Calendar._TT["PREV_MONTH"] = "Pedchoz msc (pidr pro menu)"; -Calendar._TT["GO_TODAY"] = "Dnen datum"; -Calendar._TT["NEXT_MONTH"] = "Dal msc (pidr pro menu)"; -Calendar._TT["NEXT_YEAR"] = "Dal rok (pidr pro menu)"; -Calendar._TT["SEL_DATE"] = "Vyber datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Chy a thni, pro pesun"; -Calendar._TT["PART_TODAY"] = " (dnes)"; -Calendar._TT["MON_FIRST"] = "Uka jako prvn Pondl"; -//Calendar._TT["SUN_FIRST"] = "Uka jako prvn Nedli"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Vbr datumu:\n" + -"- Use the \xab, \xbb buttons to select year\n" + -"- Pouijte tlatka " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " k vbru msce\n" + -"- Podrte tlatko myi na jakmkoliv z tch tlatek pro rychlej vbr."; - -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Vbr asu:\n" + -"- Kliknte na jakoukoliv z st vbru asu pro zven.\n" + -"- nebo Shift-click pro snen\n" + -"- nebo kliknte a thnte pro rychlej vbr."; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Zobraz %s prvn"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Zavt"; -Calendar._TT["TODAY"] = "Dnes"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikni nebo thni pro zmnu hodnoty"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "as:"; diff --git a/sources/html/js/lang/calendar-da.js b/sources/html/js/lang/calendar-da.js deleted file mode 100644 index a99b598..0000000 --- a/sources/html/js/lang/calendar-da.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar DA language -// Author: Michael Thingmand Henriksen, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Søndag", -"Mandag", -"Tirsdag", -"Onsdag", -"Torsdag", -"Fredag", -"Lørdag", -"Søndag"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Søn", -"Man", -"Tir", -"Ons", -"Tor", -"Fre", -"Lør", -"Søn"); - -// full month names -Calendar._MN = new Array -("Januar", -"Februar", -"Marts", -"April", -"Maj", -"Juni", -"Juli", -"August", -"September", -"Oktober", -"November", -"December"); - -// short month names -Calendar._SMN = new Array -("Jan", -"Feb", -"Mar", -"Apr", -"Maj", -"Jun", -"Jul", -"Aug", -"Sep", -"Okt", -"Nov", -"Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Om Kalenderen"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For den seneste version besøg: http://www.dynarch.com/projects/calendar/\n"; + -"Distribueret under GNU LGPL. Se http://gnu.org/licenses/lgpl.html for detajler." + -"\n\n" + -"Valg af dato:\n" + -"- Brug \xab, \xbb knapperne for at vælge år\n" + -"- Brug " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knapperne for at vælge måned\n" + -"- Hold knappen på musen nede på knapperne ovenfor for hurtigere valg."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Valg af tid:\n" + -"- Klik på en vilkårlig del for større værdi\n" + -"- eller Shift-klik for for mindre værdi\n" + -"- eller klik og træk for hurtigere valg."; - -Calendar._TT["PREV_YEAR"] = "Ét år tilbage (hold for menu)"; -Calendar._TT["PREV_MONTH"] = "Én måned tilbage (hold for menu)"; -Calendar._TT["GO_TODAY"] = "Gå til i dag"; -Calendar._TT["NEXT_MONTH"] = "Én måned frem (hold for menu)"; -Calendar._TT["NEXT_YEAR"] = "Ét år frem (hold for menu)"; -Calendar._TT["SEL_DATE"] = "Vælg dag"; -Calendar._TT["DRAG_TO_MOVE"] = "Træk vinduet"; -Calendar._TT["PART_TODAY"] = " (i dag)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Vis %s først"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Luk"; -Calendar._TT["TODAY"] = "I dag"; -Calendar._TT["TIME_PART"] = "(Shift-)klik eller træk for at ændre værdi"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "Uge"; -Calendar._TT["TIME"] = "Tid:"; diff --git a/sources/html/js/lang/calendar-de.js b/sources/html/js/lang/calendar-de.js deleted file mode 100644 index 4bc1137..0000000 --- a/sources/html/js/lang/calendar-de.js +++ /dev/null @@ -1,124 +0,0 @@ -// ** I18N - -// Calendar DE language -// Author: Jack (tR), -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Sonntag", - "Montag", - "Dienstag", - "Mittwoch", - "Donnerstag", - "Freitag", - "Samstag", - "Sonntag"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("So", - "Mo", - "Di", - "Mi", - "Do", - "Fr", - "Sa", - "So"); - -// full month names -Calendar._MN = new Array -("Januar", - "Februar", - "M\u00e4rz", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Dezember"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "M\u00e4r", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Okt", - "Nov", - "Dez"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "\u00DCber dieses Kalendarmodul"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Datum ausw\u00e4hlen:\n" + -"- Benutzen Sie die \xab, \xbb Buttons um das Jahr zu w\u00e4hlen\n" + -"- Benutzen Sie die " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " Buttons um den Monat zu w\u00e4hlen\n" + -"- F\u00fcr eine Schnellauswahl halten Sie die Maustaste \u00fcber diesen Buttons fest."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Zeit ausw\u00e4hlen:\n" + -"- Klicken Sie auf die Teile der Uhrzeit, um diese zu erh\u00F6hen\n" + -"- oder klicken Sie mit festgehaltener Shift-Taste um diese zu verringern\n" + -"- oder klicken und festhalten f\u00fcr Schnellauswahl."; - -Calendar._TT["TOGGLE"] = "Ersten Tag der Woche w\u00e4hlen"; -Calendar._TT["PREV_YEAR"] = "Voriges Jahr (Festhalten f\u00fcr Schnellauswahl)"; -Calendar._TT["PREV_MONTH"] = "Voriger Monat (Festhalten f\u00fcr Schnellauswahl)"; -Calendar._TT["GO_TODAY"] = "Heute ausw\u00e4hlen"; -Calendar._TT["NEXT_MONTH"] = "N\u00e4chst. Monat (Festhalten f\u00fcr Schnellauswahl)"; -Calendar._TT["NEXT_YEAR"] = "N\u00e4chst. Jahr (Festhalten f\u00fcr Schnellauswahl)"; -Calendar._TT["SEL_DATE"] = "Datum ausw\u00e4hlen"; -Calendar._TT["DRAG_TO_MOVE"] = "Zum Bewegen festhalten"; -Calendar._TT["PART_TODAY"] = " (Heute)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Woche beginnt mit %s "; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Schlie\u00dfen"; -Calendar._TT["TODAY"] = "Heute"; -Calendar._TT["TIME_PART"] = "(Shift-)Klick oder Festhalten und Ziehen um den Wert zu \u00e4ndern"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Zeit:"; diff --git a/sources/html/js/lang/calendar-du.js b/sources/html/js/lang/calendar-du.js deleted file mode 100644 index 2200448..0000000 --- a/sources/html/js/lang/calendar-du.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Zondag", - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrijdag", - "Zaterdag", - "Zondag"); -Calendar._MN = new Array -("Januari", - "Februari", - "Maart", - "April", - "Mei", - "Juni", - "Juli", - "Augustus", - "September", - "Oktober", - "November", - "December"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Toggle startdag van de week"; -Calendar._TT["PREV_YEAR"] = "Vorig jaar (indrukken voor menu)"; -Calendar._TT["PREV_MONTH"] = "Vorige month (indrukken voor menu)"; -Calendar._TT["GO_TODAY"] = "Naar Vandaag"; -Calendar._TT["NEXT_MONTH"] = "Volgende Maand (indrukken voor menu)"; -Calendar._TT["NEXT_YEAR"] = "Volgend jaar (indrukken voor menu)"; -Calendar._TT["SEL_DATE"] = "Selecteer datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te verplaatsen"; -Calendar._TT["PART_TODAY"] = " (vandaag)"; -Calendar._TT["MON_FIRST"] = "Toon Maandag eerst"; -Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst"; -Calendar._TT["CLOSE"] = "Sluiten"; -Calendar._TT["TODAY"] = "Vandaag"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; - -Calendar._TT["WK"] = "wk"; diff --git a/sources/html/js/lang/calendar-el.js b/sources/html/js/lang/calendar-el.js deleted file mode 100644 index fee5575..0000000 --- a/sources/html/js/lang/calendar-el.js +++ /dev/null @@ -1,89 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Κυριακή", - "Δευτέρα", - "Τρίτη", - "Τετάρτη", - "Πέμπτη", - "Παρασκευή", - "Σάββατο", - "Κυριακή"); - -Calendar._SDN = new Array -("Κυ", - "Δε", - "Tρ", - "Τε", - "Πε", - "Πα", - "Σα", - "Κυ"); - -Calendar._MN = new Array -("Ιανουάριος", - "Φεβρουάριος", - "Μάρτιος", - "Απρίλιος", - "Μάϊος", - "Ιούνιος", - "Ιούλιος", - "Αύγουστος", - "Σεπτέμβριος", - "Οκτώβριος", - "Νοέμβριος", - "Δεκέμβριος"); - -Calendar._SMN = new Array -("Ιαν", - "Φεβ", - "Μαρ", - "Απρ", - "Μαι", - "Ιουν", - "Ιουλ", - "Αυγ", - "Σεπ", - "Οκτ", - "Νοε", - "Δεκ"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Για το ημερολόγιο"; - -Calendar._TT["ABOUT"] = -"Επιλογέας ημερομηνίας/ώρας σε DHTML\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Για τελευταία έκδοση: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Επιλογή ημερομηνίας:\n" + -"- Χρησιμοποιείστε τα κουμπιά \xab, \xbb για επιλογή έτους\n" + -"- Χρησιμοποιείστε τα κουμπιά " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " για επιλογή μήνα\n" + -"- Κρατήστε κουμπί ποντικού πατημένο στα παραπάνω κουμπιά για πιο γρήγορη επιλογή."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Επιλογή ώρας:\n" + -"- Κάντε κλικ σε ένα από τα μέρη της ώρας για αύξηση\n" + -"- ή Shift-κλικ για μείωση\n" + -"- ή κλικ και μετακίνηση για πιο γρήγορη επιλογή."; -Calendar._TT["TOGGLE"] = "Μπάρα πρώτης ημέρας της εβδομάδας"; -Calendar._TT["PREV_YEAR"] = "Προηγ. έτος (κρατήστε για το μενού)"; -Calendar._TT["PREV_MONTH"] = "Προηγ. μήνας (κρατήστε για το μενού)"; -Calendar._TT["GO_TODAY"] = "Σήμερα"; -Calendar._TT["NEXT_MONTH"] = "Επόμενος μήνας (κρατήστε για το μενού)"; -Calendar._TT["NEXT_YEAR"] = "Επόμενο έτος (κρατήστε για το μενού)"; -Calendar._TT["SEL_DATE"] = "Επιλέξτε ημερομηνία"; -Calendar._TT["DRAG_TO_MOVE"] = "Σύρτε για να μετακινήσετε"; -Calendar._TT["PART_TODAY"] = " (σήμερα)"; -Calendar._TT["MON_FIRST"] = "Εμφάνιση Δευτέρας πρώτα"; -Calendar._TT["SUN_FIRST"] = "Εμφάνιση Κυριακής πρώτα"; -Calendar._TT["CLOSE"] = "Κλείσιμο"; -Calendar._TT["TODAY"] = "Σήμερα"; -Calendar._TT["TIME_PART"] = "(Shift-)κλικ ή μετακίνηση για αλλαγή"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "D, d M"; - -Calendar._TT["WK"] = "εβδ"; - diff --git a/sources/html/js/lang/calendar-en.js b/sources/html/js/lang/calendar-en.js deleted file mode 100644 index 0dbde79..0000000 --- a/sources/html/js/lang/calendar-en.js +++ /dev/null @@ -1,127 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - "Sunday"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat", - "Sun"); - -// First day of the week. "0" means display Sunday first, "1" means display -// Monday first, etc. -Calendar._FD = 0; - -// full month names -Calendar._MN = new Array -("January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "About the calendar"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Date selection:\n" + -"- Use the \xab, \xbb buttons to select year\n" + -"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + -"- Hold mouse button on any of the above buttons for faster selection."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Time selection:\n" + -"- Click on any of the time parts to increase it\n" + -"- or Shift-click to decrease it\n" + -"- or click and drag for faster selection."; - -Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)"; -Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)"; -Calendar._TT["GO_TODAY"] = "Go Today"; -Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)"; -Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)"; -Calendar._TT["SEL_DATE"] = "Select date"; -Calendar._TT["DRAG_TO_MOVE"] = "Drag to move"; -Calendar._TT["PART_TODAY"] = " (today)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Display %s first"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Close"; -Calendar._TT["TODAY"] = "Today"; -Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Time:"; diff --git a/sources/html/js/lang/calendar-es.js b/sources/html/js/lang/calendar-es.js deleted file mode 100644 index 19c1b30..0000000 --- a/sources/html/js/lang/calendar-es.js +++ /dev/null @@ -1,129 +0,0 @@ -// ** I18N - -// Calendar ES (spanish) language -// Author: Mihai Bazon, -// Updater: Servilio Afre Puentes -// Updated: 2004-06-03 -// Encoding: utf-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domingo", - "Lunes", - "Martes", - "Mircoles", - "Jueves", - "Viernes", - "Sbado", - "Domingo"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Dom", - "Lun", - "Mar", - "Mi", - "Jue", - "Vie", - "Sb", - "Dom"); - -// First day of the week. "0" means display Sunday first, "1" means display -// Monday first, etc. -Calendar._FD = 1; - -// full month names -Calendar._MN = new Array -("Enero", - "Febrero", - "Marzo", - "Abril", - "Mayo", - "Junio", - "Julio", - "Agosto", - "Septiembre", - "Octubre", - "Noviembre", - "Diciembre"); - -// short month names -Calendar._SMN = new Array -("Ene", - "Feb", - "Mar", - "Abr", - "May", - "Jun", - "Jul", - "Ago", - "Sep", - "Oct", - "Nov", - "Dic"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Acerca del calendario"; - -Calendar._TT["ABOUT"] = -"Selector DHTML de Fecha/Hora\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Para conseguir la ltima versin visite: http://www.dynarch.com/projects/calendar/\n" + -"Distribuido bajo licencia GNU LGPL. Visite http://gnu.org/licenses/lgpl.html para ms detalles." + -"\n\n" + -"Seleccin de fecha:\n" + -"- Use los botones \xab, \xbb para seleccionar el ao\n" + -"- Use los botones " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" + -"- Mantenga pulsado el ratn en cualquiera de estos botones para una seleccin rpida."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Seleccin de hora:\n" + -"- Pulse en cualquiera de las partes de la hora para incrementarla\n" + -"- o pulse las maysculas mientras hace clic para decrementarla\n" + -"- o haga clic y arrastre el ratn para una seleccin ms rpida."; - -Calendar._TT["PREV_YEAR"] = "Ao anterior (mantener para men)"; -Calendar._TT["PREV_MONTH"] = "Mes anterior (mantener para men)"; -Calendar._TT["GO_TODAY"] = "Ir a hoy"; -Calendar._TT["NEXT_MONTH"] = "Mes siguiente (mantener para men)"; -Calendar._TT["NEXT_YEAR"] = "Ao siguiente (mantener para men)"; -Calendar._TT["SEL_DATE"] = "Seleccionar fecha"; -Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar para mover"; -Calendar._TT["PART_TODAY"] = " (hoy)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Hacer %s primer da de la semana"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Cerrar"; -Calendar._TT["TODAY"] = "Hoy"; -Calendar._TT["TIME_PART"] = "(Mayscula-)Clic o arrastre para cambiar valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y"; - -Calendar._TT["WK"] = "sem"; -Calendar._TT["TIME"] = "Hora:"; diff --git a/sources/html/js/lang/calendar-fi.js b/sources/html/js/lang/calendar-fi.js deleted file mode 100644 index 328eabb..0000000 --- a/sources/html/js/lang/calendar-fi.js +++ /dev/null @@ -1,98 +0,0 @@ -// ** I18N - -// Calendar FI language (Finnish, Suomi) -// Author: Jarno Käyhkö, -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// full day names -Calendar._DN = new Array -("Sunnuntai", - "Maanantai", - "Tiistai", - "Keskiviikko", - "Torstai", - "Perjantai", - "Lauantai", - "Sunnuntai"); - -// short day names -Calendar._SDN = new Array -("Su", - "Ma", - "Ti", - "Ke", - "To", - "Pe", - "La", - "Su"); - -// full month names -Calendar._MN = new Array -("Tammikuu", - "Helmikuu", - "Maaliskuu", - "Huhtikuu", - "Toukokuu", - "Kesäkuu", - "Heinäkuu", - "Elokuu", - "Syyskuu", - "Lokakuu", - "Marraskuu", - "Joulukuu"); - -// short month names -Calendar._SMN = new Array -("Tam", - "Hel", - "Maa", - "Huh", - "Tou", - "Kes", - "Hei", - "Elo", - "Syy", - "Lok", - "Mar", - "Jou"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Tietoja kalenterista"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Uusin versio osoitteessa: http://www.dynarch.com/projects/calendar/\n" + -"Julkaistu GNU LGPL lisenssin alaisuudessa. Lisätietoja osoitteessa http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"Päivämäärä valinta:\n" + -"- Käytä \xab, \xbb painikkeita valitaksesi vuosi\n" + -"- Käytä " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " painikkeita valitaksesi kuukausi\n" + -"- Pitämällä hiiren painiketta minkä tahansa yllä olevan painikkeen kohdalla, saat näkyviin valikon nopeampaan siirtymiseen."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Ajan valinta:\n" + -"- Klikkaa kellonajan numeroita lisätäksesi aikaa\n" + -"- tai pitämällä Shift-näppäintä pohjassa saat aikaa taaksepäin\n" + -"- tai klikkaa ja pidä hiiren painike pohjassa sekä liikuta hiirtä muuttaaksesi aikaa nopeasti eteen- ja taaksepäin."; - -Calendar._TT["PREV_YEAR"] = "Edell. vuosi (paina hetki, näet valikon)"; -Calendar._TT["PREV_MONTH"] = "Edell. kuukausi (paina hetki, näet valikon)"; -Calendar._TT["GO_TODAY"] = "Siirry tähän päivään"; -Calendar._TT["NEXT_MONTH"] = "Seur. kuukausi (paina hetki, näet valikon)"; -Calendar._TT["NEXT_YEAR"] = "Seur. vuosi (paina hetki, näet valikon)"; -Calendar._TT["SEL_DATE"] = "Valitse päivämäärä"; -Calendar._TT["DRAG_TO_MOVE"] = "Siirrä kalenterin paikkaa"; -Calendar._TT["PART_TODAY"] = " (tänään)"; -Calendar._TT["MON_FIRST"] = "Näytä maanantai ensimmäisenä"; -Calendar._TT["SUN_FIRST"] = "Näytä sunnuntai ensimmäisenä"; -Calendar._TT["CLOSE"] = "Sulje"; -Calendar._TT["TODAY"] = "Tänään"; -Calendar._TT["TIME_PART"] = "(Shift-) Klikkaa tai liikuta muuttaaksesi aikaa"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%d.%m.%Y"; - -Calendar._TT["WK"] = "Vko"; diff --git a/sources/html/js/lang/calendar-fr.js b/sources/html/js/lang/calendar-fr.js deleted file mode 100644 index 2a9e0b2..0000000 --- a/sources/html/js/lang/calendar-fr.js +++ /dev/null @@ -1,125 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// Translator: David Duret, from previous french version - -// full day names -Calendar._DN = new Array -("Dimanche", - "Lundi", - "Mardi", - "Mercredi", - "Jeudi", - "Vendredi", - "Samedi", - "Dimanche"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Dim", - "Lun", - "Mar", - "Mar", - "Jeu", - "Ven", - "Sam", - "Dim"); - -// full month names -Calendar._MN = new Array -("Janvier", - "Fvrier", - "Mars", - "Avril", - "Mai", - "Juin", - "Juillet", - "Aot", - "Septembre", - "Octobre", - "Novembre", - "Dcembre"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Fev", - "Mar", - "Avr", - "Mai", - "Juin", - "Juil", - "Aout", - "Sep", - "Oct", - "Nov", - "Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "A propos du calendrier"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Heure Selecteur\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Pour la derniere version visitez : http://www.dynarch.com/projects/calendar/\n" + -"Distribu par GNU LGPL. Voir http://gnu.org/licenses/lgpl.html pour les details." + -"\n\n" + -"Selection de la date :\n" + -"- Utiliser les bouttons \xab, \xbb pour selectionner l\'annee\n" + -"- Utiliser les bouttons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pour selectionner les mois\n" + -"- Garder la souris sur n'importe quels boutons pour une selection plus rapide"; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selection de l\'heure :\n" + -"- Cliquer sur heures ou minutes pour incrementer\n" + -"- ou Maj-clic pour decrementer\n" + -"- ou clic et glisser-deplacer pour une selection plus rapide"; - -Calendar._TT["PREV_YEAR"] = "Anne prc. (maintenir pour menu)"; -Calendar._TT["PREV_MONTH"] = "Mois prc. (maintenir pour menu)"; -Calendar._TT["GO_TODAY"] = "Atteindre la date du jour"; -Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour menu)"; -Calendar._TT["NEXT_YEAR"] = "Anne suiv. (maintenir pour menu)"; -Calendar._TT["SEL_DATE"] = "Slectionner une date"; -Calendar._TT["DRAG_TO_MOVE"] = "Dplacer"; -Calendar._TT["PART_TODAY"] = " (Aujourd'hui)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Afficher %s en premier"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Fermer"; -Calendar._TT["TODAY"] = "Aujourd'hui"; -Calendar._TT["TIME_PART"] = "(Maj-)Clic ou glisser pour modifier la valeur"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "Sem."; -Calendar._TT["TIME"] = "Heure :"; diff --git a/sources/html/js/lang/calendar-he-utf8.js b/sources/html/js/lang/calendar-he-utf8.js deleted file mode 100644 index b15005f..0000000 --- a/sources/html/js/lang/calendar-he-utf8.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Idan Sofer, -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("ראשון", - "שני", - "שלישי", - "רביעי", - "חמישי", - "שישי", - "שבת", - "ראשון"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("א", - "ב", - "ג", - "ד", - "ה", - "ו", - "ש", - "א"); - -// full month names -Calendar._MN = new Array -("ינואר", - "פברואר", - "מרץ", - "אפריל", - "מאי", - "יוני", - "יולי", - "אוגוסט", - "ספטמבר", - "אוקטובר", - "נובמבר", - "דצמבר"); - -// short month names -Calendar._SMN = new Array -("ינא", - "פבר", - "מרץ", - "אפר", - "מאי", - "יונ", - "יול", - "אוג", - "ספט", - "אוק", - "נוב", - "דצמ"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "אודות השנתון"; - -Calendar._TT["ABOUT"] = -"בחרן תאריך/שעה DHTML\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"הגירסא האחרונה זמינה ב: http://www.dynarch.com/projects/calendar/\n" + -"מופץ תחת זיכיון ה GNU LGPL. עיין ב http://gnu.org/licenses/lgpl.html לפרטים נוספים." + -"\n\n" + -"בחירת תאריך:\n" + -"- השתמש בכפתורים \xab, \xbb לבחירת שנה\n" + -"- השתמש בכפתורים " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " לבחירת חודש\n" + -"- החזק העכבר לחוץ מעל הכפתורים המוזכרים לעיל לבחירה מהירה יותר."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"בחירת זמן:\n" + -"- לחץ על כל אחד מחלקי הזמן כדי להוסיף\n" + -"- או shift בשילוב עם לחיצה כדי להחסיר\n" + -"- או לחץ וגרור לפעולה מהירה יותר."; - -Calendar._TT["PREV_YEAR"] = "שנה קודמת - החזק לקבלת תפריט"; -Calendar._TT["PREV_MONTH"] = "חודש קודם - החזק לקבלת תפריט"; -Calendar._TT["GO_TODAY"] = "עבור להיום"; -Calendar._TT["NEXT_MONTH"] = "חודש הבא - החזק לתפריט"; -Calendar._TT["NEXT_YEAR"] = "שנה הבאה - החזק לתפריט"; -Calendar._TT["SEL_DATE"] = "בחר תאריך"; -Calendar._TT["DRAG_TO_MOVE"] = "גרור להזזה"; -Calendar._TT["PART_TODAY"] = " )היום("; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "הצג %s קודם"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "6"; - -Calendar._TT["CLOSE"] = "סגור"; -Calendar._TT["TODAY"] = "היום"; -Calendar._TT["TIME_PART"] = "(שיפט-)לחץ וגרור כדי לשנות ערך"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "שעה::"; diff --git a/sources/html/js/lang/calendar-hr-utf8.js b/sources/html/js/lang/calendar-hr-utf8.js deleted file mode 100644 index baf01b1..0000000 --- a/sources/html/js/lang/calendar-hr-utf8.js +++ /dev/null @@ -1,49 +0,0 @@ -/* Croatian language file for the DHTML Calendar version 0.9.2 -* Author Krunoslav Zubrinic , June 2003. -* Feel free to use this script under the terms of the GNU Lesser General -* Public License, as long as you do not remove or alter this notice. -*/ -Calendar._DN = new Array -("Nedjelja", - "Ponedjeljak", - "Utorak", - "Srijeda", - "Četvrtak", - "Petak", - "Subota", - "Nedjelja"); -Calendar._MN = new Array -("Siječanj", - "Veljača", - "Ožujak", - "Travanj", - "Svibanj", - "Lipanj", - "Srpanj", - "Kolovoz", - "Rujan", - "Listopad", - "Studeni", - "Prosinac"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Promjeni dan s kojim počinje tjedan"; -Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)"; -Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)"; -Calendar._TT["GO_TODAY"] = "Idi na tekući dan"; -Calendar._TT["NEXT_MONTH"] = "Slijedeći mjesec (dugi pritisak za meni)"; -Calendar._TT["NEXT_YEAR"] = "Slijedeća godina (dugi pritisak za meni)"; -Calendar._TT["SEL_DATE"] = "Izaberite datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije"; -Calendar._TT["PART_TODAY"] = " (today)"; -Calendar._TT["MON_FIRST"] = "Prikaži ponedjeljak kao prvi dan"; -Calendar._TT["SUN_FIRST"] = "Prikaži nedjelju kao prvi dan"; -Calendar._TT["CLOSE"] = "Zatvori"; -Calendar._TT["TODAY"] = "Danas"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "DD, dd.mm.y"; - -Calendar._TT["WK"] = "Tje"; \ No newline at end of file diff --git a/sources/html/js/lang/calendar-hr.js b/sources/html/js/lang/calendar-hr.js deleted file mode 100644 index be9a021..0000000 Binary files a/sources/html/js/lang/calendar-hr.js and /dev/null differ diff --git a/sources/html/js/lang/calendar-hu.js b/sources/html/js/lang/calendar-hu.js deleted file mode 100644 index f5bf057..0000000 --- a/sources/html/js/lang/calendar-hu.js +++ /dev/null @@ -1,124 +0,0 @@ -// ** I18N - -// Calendar HU language -// Author: ??? -// Modifier: KARASZI Istvan, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Vasrnap", - "Htf", - "Kedd", - "Szerda", - "Cstrtk", - "Pntek", - "Szombat", - "Vasrnap"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("v", - "h", - "k", - "sze", - "cs", - "p", - "szo", - "v"); - -// full month names -Calendar._MN = new Array -("janur", - "februr", - "mrcius", - "prilis", - "mjus", - "jnius", - "jlius", - "augusztus", - "szeptember", - "oktber", - "november", - "december"); - -// short month names -Calendar._SMN = new Array -("jan", - "feb", - "mr", - "pr", - "mj", - "jn", - "jl", - "aug", - "sze", - "okt", - "nov", - "dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "A kalendriumrl"; - -Calendar._TT["ABOUT"] = -"DHTML dtum/id kivlaszt\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"a legfrissebb verzi megtallhat: http://www.dynarch.com/projects/calendar/\n" + -"GNU LGPL alatt terjesztve. Lsd a http://gnu.org/licenses/lgpl.html oldalt a rszletekhez." + -"\n\n" + -"Dtum vlaszts:\n" + -"- hasznlja a \xab, \xbb gombokat az v kivlasztshoz\n" + -"- hasznlja a " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gombokat a hnap kivlasztshoz\n" + -"- tartsa lenyomva az egrgombot a gyors vlasztshoz."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Id vlaszts:\n" + -"- kattintva nvelheti az idt\n" + -"- shift-tel kattintva cskkentheti\n" + -"- lenyomva tartva s hzva gyorsabban kivlaszthatja."; - -Calendar._TT["PREV_YEAR"] = "Elz v (tartsa nyomva a menhz)"; -Calendar._TT["PREV_MONTH"] = "Elz hnap (tartsa nyomva a menhz)"; -Calendar._TT["GO_TODAY"] = "Mai napra ugrs"; -Calendar._TT["NEXT_MONTH"] = "Kv. hnap (tartsa nyomva a menhz)"; -Calendar._TT["NEXT_YEAR"] = "Kv. v (tartsa nyomva a menhz)"; -Calendar._TT["SEL_DATE"] = "Vlasszon dtumot"; -Calendar._TT["DRAG_TO_MOVE"] = "Hzza a mozgatshoz"; -Calendar._TT["PART_TODAY"] = " (ma)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "%s legyen a ht els napja"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Bezr"; -Calendar._TT["TODAY"] = "Ma"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikk vagy hzs az rtk vltoztatshoz"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%b %e, %a"; - -Calendar._TT["WK"] = "ht"; -Calendar._TT["TIME"] = "id:"; diff --git a/sources/html/js/lang/calendar-it.js b/sources/html/js/lang/calendar-it.js deleted file mode 100644 index 7f84cde..0000000 --- a/sources/html/js/lang/calendar-it.js +++ /dev/null @@ -1,124 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Translator: Fabio Di Bernardini, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domenica", - "Lunedì", - "Martedì", - "Mercoledì", - "Giovedì", - "Venerdì", - "Sabato", - "Domenica"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Dom", - "Lun", - "Mar", - "Mer", - "Gio", - "Ven", - "Sab", - "Dom"); - -// full month names -Calendar._MN = new Array -("Gennaio", - "Febbraio", - "Marzo", - "Aprile", - "Maggio", - "Giugno", - "Luglio", - "Augosto", - "Settembre", - "Ottobre", - "Novembre", - "Dicembre"); - -// short month names -Calendar._SMN = new Array -("Gen", - "Feb", - "Mar", - "Apr", - "Mag", - "Giu", - "Lug", - "Ago", - "Set", - "Ott", - "Nov", - "Dic"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Informazioni sul calendario"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Per gli aggiornamenti: http://www.dynarch.com/projects/calendar/\n" + -"Distribuito sotto licenza GNU LGPL. Vedi http://gnu.org/licenses/lgpl.html per i dettagli." + -"\n\n" + -"Selezione data:\n" + -"- Usa \xab, \xbb per selezionare l'anno\n" + -"- Usa " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per i mesi\n" + -"- Tieni premuto a lungo il mouse per accedere alle funzioni di selezione veloce."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selezione orario:\n" + -"- Clicca sul numero per incrementarlo\n" + -"- o Shift+click per decrementarlo\n" + -"- o click e sinistra o destra per variarlo."; - -Calendar._TT["PREV_YEAR"] = "Anno prec.(clicca a lungo per il menù)"; -Calendar._TT["PREV_MONTH"] = "Mese prec. (clicca a lungo per il menù)"; -Calendar._TT["GO_TODAY"] = "Oggi"; -Calendar._TT["NEXT_MONTH"] = "Pross. mese (clicca a lungo per il menù)"; -Calendar._TT["NEXT_YEAR"] = "Pross. anno (clicca a lungo per il menù)"; -Calendar._TT["SEL_DATE"] = "Seleziona data"; -Calendar._TT["DRAG_TO_MOVE"] = "Trascina per spostarlo"; -Calendar._TT["PART_TODAY"] = " (oggi)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Mostra prima %s"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Chiudi"; -Calendar._TT["TODAY"] = "Oggi"; -Calendar._TT["TIME_PART"] = "(Shift-)Click o trascina per cambiare il valore"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a:%b:%e"; - -Calendar._TT["WK"] = "set"; -Calendar._TT["TIME"] = "Ora:"; diff --git a/sources/html/js/lang/calendar-jp.js b/sources/html/js/lang/calendar-jp.js deleted file mode 100644 index 3bca7eb..0000000 --- a/sources/html/js/lang/calendar-jp.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("", - "", - "", - "", - "", - "", - "y", - ""); -Calendar._MN = new Array -("1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "T̍ŏ̗j؂ւ"; -Calendar._TT["PREV_YEAR"] = "ON"; -Calendar._TT["PREV_MONTH"] = "O"; -Calendar._TT["GO_TODAY"] = ""; -Calendar._TT["NEXT_MONTH"] = ""; -Calendar._TT["NEXT_YEAR"] = "N"; -Calendar._TT["SEL_DATE"] = "tI"; -Calendar._TT["DRAG_TO_MOVE"] = "EBhËړ"; -Calendar._TT["PART_TODAY"] = " ()"; -Calendar._TT["MON_FIRST"] = "j擪"; -Calendar._TT["SUN_FIRST"] = "j擪"; -Calendar._TT["CLOSE"] = "‚"; -Calendar._TT["TODAY"] = ""; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "%m %d (%a)"; - -Calendar._TT["WK"] = "T"; diff --git a/sources/html/js/lang/calendar-ko-utf8.js b/sources/html/js/lang/calendar-ko-utf8.js deleted file mode 100644 index 035dd74..0000000 --- a/sources/html/js/lang/calendar-ko-utf8.js +++ /dev/null @@ -1,120 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Translation: Yourim Yi -// Encoding: EUC-KR -// lang : ko -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names - -Calendar._DN = new Array -("일요일", - "월요일", - "화요일", - "수요일", - "목요일", - "금요일", - "토요일", - "일요일"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("일", - "월", - "화", - "수", - "목", - "금", - "토", - "일"); - -// full month names -Calendar._MN = new Array -("1월", - "2월", - "3월", - "4월", - "5월", - "6월", - "7월", - "8월", - "9월", - "10월", - "11월", - "12월"); - -// short month names -Calendar._SMN = new Array -("1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "calendar 에 대해서"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"\n"+ -"최신 버전을 받으시려면 http://www.dynarch.com/projects/calendar/ 에 방문하세요\n" + -"\n"+ -"GNU LGPL 라이센스로 배포됩니다. \n"+ -"라이센스에 대한 자세한 내용은 http://gnu.org/licenses/lgpl.html 을 읽으세요." + -"\n\n" + -"날짜 선택:\n" + -"- 연도를 선택하려면 \xab, \xbb 버튼을 사용합니다\n" + -"- 달을 선택하려면 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 버튼을 누르세요\n" + -"- 계속 누르고 있으면 위 값들을 빠르게 선택하실 수 있습니다."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"시간 선택:\n" + -"- 마우스로 누르면 시간이 증가합니다\n" + -"- Shift 키와 함께 누르면 감소합니다\n" + -"- 누른 상태에서 마우스를 움직이면 좀 더 빠르게 값이 변합니다.\n"; - -Calendar._TT["PREV_YEAR"] = "지난 해 (길게 누르면 목록)"; -Calendar._TT["PREV_MONTH"] = "지난 달 (길게 누르면 목록)"; -Calendar._TT["GO_TODAY"] = "오늘 날짜로"; -Calendar._TT["NEXT_MONTH"] = "다음 달 (길게 누르면 목록)"; -Calendar._TT["NEXT_YEAR"] = "다음 해 (길게 누르면 목록)"; -Calendar._TT["SEL_DATE"] = "날짜를 선택하세요"; -Calendar._TT["DRAG_TO_MOVE"] = "마우스 드래그로 이동 하세요"; -Calendar._TT["PART_TODAY"] = " (오늘)"; -Calendar._TT["MON_FIRST"] = "월요일을 한 주의 시작 요일로"; -Calendar._TT["SUN_FIRST"] = "일요일을 한 주의 시작 요일로"; -Calendar._TT["CLOSE"] = "닫기"; -Calendar._TT["TODAY"] = "오늘"; -Calendar._TT["TIME_PART"] = "(Shift-)클릭 또는 드래그 하세요"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]"; - -Calendar._TT["WK"] = "주"; diff --git a/sources/html/js/lang/calendar-ko.js b/sources/html/js/lang/calendar-ko.js deleted file mode 100644 index 8cddf58..0000000 --- a/sources/html/js/lang/calendar-ko.js +++ /dev/null @@ -1,120 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Translation: Yourim Yi -// Encoding: EUC-KR -// lang : ko -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names - -Calendar._DN = new Array -("Ͽ", - "", - "ȭ", - "", - "", - "ݿ", - "", - "Ͽ"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("", - "", - "ȭ", - "", - "", - "", - "", - ""); - -// full month names -Calendar._MN = new Array -("1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12"); - -// short month names -Calendar._SMN = new Array -("1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "calendar ؼ"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"\n"+ -"ֽ ÷ http://www.dynarch.com/projects/calendar/ 湮ϼ\n" + -"\n"+ -"GNU LGPL ̼ ˴ϴ. \n"+ -"̼ ڼ http://gnu.org/licenses/lgpl.html ." + -"\n\n" + -"¥ :\n" + -"- Ϸ \xab, \xbb ư մϴ\n" + -"- Ϸ " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ư \n" + -"- Ͻ ֽϴ."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"ð :\n" + -"- 콺 ð մϴ\n" + -"- Shift Ű Բ մϴ\n" + -"- ¿ 콺 ̸ մϴ.\n"; - -Calendar._TT["PREV_YEAR"] = " ( )"; -Calendar._TT["PREV_MONTH"] = " ( )"; -Calendar._TT["GO_TODAY"] = " ¥"; -Calendar._TT["NEXT_MONTH"] = " ( )"; -Calendar._TT["NEXT_YEAR"] = " ( )"; -Calendar._TT["SEL_DATE"] = "¥ ϼ"; -Calendar._TT["DRAG_TO_MOVE"] = "콺 巡׷ ̵ ϼ"; -Calendar._TT["PART_TODAY"] = " ()"; -Calendar._TT["MON_FIRST"] = " Ϸ"; -Calendar._TT["SUN_FIRST"] = "Ͽ Ϸ"; -Calendar._TT["CLOSE"] = "ݱ"; -Calendar._TT["TODAY"] = ""; -Calendar._TT["TIME_PART"] = "(Shift-)Ŭ Ǵ 巡 ϼ"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]"; - -Calendar._TT["WK"] = ""; diff --git a/sources/html/js/lang/calendar-lt-utf8.js b/sources/html/js/lang/calendar-lt-utf8.js deleted file mode 100644 index d39653b..0000000 --- a/sources/html/js/lang/calendar-lt-utf8.js +++ /dev/null @@ -1,114 +0,0 @@ -// ** I18N - -// Calendar LT language -// Author: Martynas Majeris, -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Sekmadienis", - "Pirmadienis", - "Antradienis", - "Trečiadienis", - "Ketvirtadienis", - "Pentadienis", - "Šeštadienis", - "Sekmadienis"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Sek", - "Pir", - "Ant", - "Tre", - "Ket", - "Pen", - "Šeš", - "Sek"); - -// full month names -Calendar._MN = new Array -("Sausis", - "Vasaris", - "Kovas", - "Balandis", - "Gegužė", - "Birželis", - "Liepa", - "Rugpjūtis", - "Rugsėjis", - "Spalis", - "Lapkritis", - "Gruodis"); - -// short month names -Calendar._SMN = new Array -("Sau", - "Vas", - "Kov", - "Bal", - "Geg", - "Bir", - "Lie", - "Rgp", - "Rgs", - "Spa", - "Lap", - "Gru"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Apie kalendorių"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Naujausią versiją rasite: http://www.dynarch.com/projects/calendar/\n" + -"Platinamas pagal GNU LGPL licenciją. Aplankykite http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"Datos pasirinkimas:\n" + -"- Metų pasirinkimas: \xab, \xbb\n" + -"- Mėnesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" + -"- Nuspauskite ir laikykite pelės klavišą greitesniam pasirinkimui."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Laiko pasirinkimas:\n" + -"- Spustelkite ant valandų arba minučių - skaičius padidės vienetu.\n" + -"- Jei spausite kartu su Shift, skaičius sumažės.\n" + -"- Greitam pasirinkimui spustelkite ir pajudinkite pelę."; - -Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)"; -Calendar._TT["PREV_MONTH"] = "Ankstesnis mėnuo (laikykite, jei norite meniu)"; -Calendar._TT["GO_TODAY"] = "Pasirinkti šiandieną"; -Calendar._TT["NEXT_MONTH"] = "Kitas mėnuo (laikykite, jei norite meniu)"; -Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)"; -Calendar._TT["SEL_DATE"] = "Pasirinkite datą"; -Calendar._TT["DRAG_TO_MOVE"] = "Tempkite"; -Calendar._TT["PART_TODAY"] = " (šiandien)"; -Calendar._TT["MON_FIRST"] = "Pirma savaitės diena - pirmadienis"; -Calendar._TT["SUN_FIRST"] = "Pirma savaitės diena - sekmadienis"; -Calendar._TT["CLOSE"] = "Uždaryti"; -Calendar._TT["TODAY"] = "Šiandien"; -Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d"; - -Calendar._TT["WK"] = "sav"; diff --git a/sources/html/js/lang/calendar-lt.js b/sources/html/js/lang/calendar-lt.js deleted file mode 100644 index 43b93d6..0000000 --- a/sources/html/js/lang/calendar-lt.js +++ /dev/null @@ -1,114 +0,0 @@ -// ** I18N - -// Calendar LT language -// Author: Martynas Majeris, -// Encoding: Windows-1257 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Sekmadienis", - "Pirmadienis", - "Antradienis", - "Treiadienis", - "Ketvirtadienis", - "Pentadienis", - "etadienis", - "Sekmadienis"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Sek", - "Pir", - "Ant", - "Tre", - "Ket", - "Pen", - "e", - "Sek"); - -// full month names -Calendar._MN = new Array -("Sausis", - "Vasaris", - "Kovas", - "Balandis", - "Gegu", - "Birelis", - "Liepa", - "Rugpjtis", - "Rugsjis", - "Spalis", - "Lapkritis", - "Gruodis"); - -// short month names -Calendar._SMN = new Array -("Sau", - "Vas", - "Kov", - "Bal", - "Geg", - "Bir", - "Lie", - "Rgp", - "Rgs", - "Spa", - "Lap", - "Gru"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Apie kalendori"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Naujausi versij rasite: http://www.dynarch.com/projects/calendar/\n" + -"Platinamas pagal GNU LGPL licencij. Aplankykite http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"Datos pasirinkimas:\n" + -"- Met pasirinkimas: \xab, \xbb\n" + -"- Mnesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" + -"- Nuspauskite ir laikykite pels klavi greitesniam pasirinkimui."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Laiko pasirinkimas:\n" + -"- Spustelkite ant valand arba minui - skaius padids vienetu.\n" + -"- Jei spausite kartu su Shift, skaiius sumas.\n" + -"- Greitam pasirinkimui spustelkite ir pajudinkite pel."; - -Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)"; -Calendar._TT["PREV_MONTH"] = "Ankstesnis mnuo (laikykite, jei norite meniu)"; -Calendar._TT["GO_TODAY"] = "Pasirinkti iandien"; -Calendar._TT["NEXT_MONTH"] = "Kitas mnuo (laikykite, jei norite meniu)"; -Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)"; -Calendar._TT["SEL_DATE"] = "Pasirinkite dat"; -Calendar._TT["DRAG_TO_MOVE"] = "Tempkite"; -Calendar._TT["PART_TODAY"] = " (iandien)"; -Calendar._TT["MON_FIRST"] = "Pirma savaits diena - pirmadienis"; -Calendar._TT["SUN_FIRST"] = "Pirma savaits diena - sekmadienis"; -Calendar._TT["CLOSE"] = "Udaryti"; -Calendar._TT["TODAY"] = "iandien"; -Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d"; - -Calendar._TT["WK"] = "sav"; diff --git a/sources/html/js/lang/calendar-lv.js b/sources/html/js/lang/calendar-lv.js deleted file mode 100644 index 407699d..0000000 --- a/sources/html/js/lang/calendar-lv.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar LV language -// Author: Juris Valdovskis, -// Encoding: cp1257 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Svtdiena", - "Pirmdiena", - "Otrdiena", - "Trediena", - "Ceturdiena", - "Piektdiena", - "Sestdiena", - "Svtdiena"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Sv", - "Pr", - "Ot", - "Tr", - "Ce", - "Pk", - "Se", - "Sv"); - -// full month names -Calendar._MN = new Array -("Janvris", - "Februris", - "Marts", - "Aprlis", - "Maijs", - "Jnijs", - "Jlijs", - "Augusts", - "Septembris", - "Oktobris", - "Novembris", - "Decembris"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "Mai", - "Jn", - "Jl", - "Aug", - "Sep", - "Okt", - "Nov", - "Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Par kalendru"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Datuma izvle:\n" + -"- Izmanto \xab, \xbb pogas, lai izvltos gadu\n" + -"- Izmanto " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "pogas, lai izvltos mnesi\n" + -"- Turi nospiestu peles pogu uz jebkuru no augstk mintajm pogm, lai patrintu izvli."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Laika izvle:\n" + -"- Uzklikini uz jebkuru no laika dam, lai palielintu to\n" + -"- vai Shift-klikis, lai samazintu to\n" + -"- vai noklikini un velc uz attiecgo virzienu lai maintu trk."; - -Calendar._TT["PREV_YEAR"] = "Iepr. gads (turi izvlnei)"; -Calendar._TT["PREV_MONTH"] = "Iepr. mnesis (turi izvlnei)"; -Calendar._TT["GO_TODAY"] = "odien"; -Calendar._TT["NEXT_MONTH"] = "Nkoais mnesis (turi izvlnei)"; -Calendar._TT["NEXT_YEAR"] = "Nkoais gads (turi izvlnei)"; -Calendar._TT["SEL_DATE"] = "Izvlies datumu"; -Calendar._TT["DRAG_TO_MOVE"] = "Velc, lai prvietotu"; -Calendar._TT["PART_TODAY"] = " (odien)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Attlot %s k pirmo"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "1,7"; - -Calendar._TT["CLOSE"] = "Aizvrt"; -Calendar._TT["TODAY"] = "odien"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikis vai prvieto, lai maintu"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Laiks:"; diff --git a/sources/html/js/lang/calendar-nl.js b/sources/html/js/lang/calendar-nl.js deleted file mode 100644 index a1dea94..0000000 --- a/sources/html/js/lang/calendar-nl.js +++ /dev/null @@ -1,73 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Zondag", - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrijdag", - "Zaterdag", - "Zondag"); - -Calendar._SDN_len = 2; - -Calendar._MN = new Array -("Januari", - "Februari", - "Maart", - "April", - "Mei", - "Juni", - "Juli", - "Augustus", - "September", - "Oktober", - "November", - "December"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Info"; - -Calendar._TT["ABOUT"] = -"DHTML Datum/Tijd Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + -"Ga voor de meest recente versie naar: http://www.dynarch.com/projects/calendar/\n" + -"Verspreid onder de GNU LGPL. Zie http://gnu.org/licenses/lgpl.html voor details." + -"\n\n" + -"Datum selectie:\n" + -"- Gebruik de \xab \xbb knoppen om een jaar te selecteren\n" + -"- Gebruik de " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knoppen om een maand te selecteren\n" + -"- Houd de muis ingedrukt op de genoemde knoppen voor een snellere selectie."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Tijd selectie:\n" + -"- Klik op een willekeurig onderdeel van het tijd gedeelte om het te verhogen\n" + -"- of Shift-klik om het te verlagen\n" + -"- of klik en sleep voor een snellere selectie."; - -//Calendar._TT["TOGGLE"] = "Selecteer de eerste week-dag"; -Calendar._TT["PREV_YEAR"] = "Vorig jaar (ingedrukt voor menu)"; -Calendar._TT["PREV_MONTH"] = "Vorige maand (ingedrukt voor menu)"; -Calendar._TT["GO_TODAY"] = "Ga naar Vandaag"; -Calendar._TT["NEXT_MONTH"] = "Volgende maand (ingedrukt voor menu)"; -Calendar._TT["NEXT_YEAR"] = "Volgend jaar (ingedrukt voor menu)"; -Calendar._TT["SEL_DATE"] = "Selecteer datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Klik en sleep om te verplaatsen"; -Calendar._TT["PART_TODAY"] = " (vandaag)"; -//Calendar._TT["MON_FIRST"] = "Toon Maandag eerst"; -//Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst"; - -Calendar._TT["DAY_FIRST"] = "Toon %s eerst"; - -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Sluiten"; -Calendar._TT["TODAY"] = "(vandaag)"; -Calendar._TT["TIME_PART"] = "(Shift-)Klik of sleep om de waarde te veranderen"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b %Y"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Tijd:"; \ No newline at end of file diff --git a/sources/html/js/lang/calendar-no.js b/sources/html/js/lang/calendar-no.js deleted file mode 100644 index d9297d1..0000000 --- a/sources/html/js/lang/calendar-no.js +++ /dev/null @@ -1,114 +0,0 @@ -// ** I18N - -// Calendar NO language -// Author: Daniel Holmen, -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Søndag", - "Mandag", - "Tirsdag", - "Onsdag", - "Torsdag", - "Fredag", - "Lørdag", - "Søndag"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Søn", - "Man", - "Tir", - "Ons", - "Tor", - "Fre", - "Lør", - "Søn"); - -// full month names -Calendar._MN = new Array -("Januar", - "Februar", - "Mars", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Desember"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "Mai", - "Jun", - "Jul", - "Aug", - "Sep", - "Okt", - "Nov", - "Des"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Om kalenderen"; - -Calendar._TT["ABOUT"] = -"DHTML Dato-/Tidsvelger\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For nyeste versjon, gå til: http://www.dynarch.com/projects/calendar/\n" + -"Distribuert under GNU LGPL. Se http://gnu.org/licenses/lgpl.html for detaljer." + -"\n\n" + -"Datovalg:\n" + -"- Bruk knappene \xab og \xbb for å velge år\n" + -"- Bruk knappene " + String.fromCharCode(0x2039) + " og " + String.fromCharCode(0x203a) + " for å velge måned\n" + -"- Hold inne musknappen eller knappene over for raskere valg."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Tidsvalg:\n" + -"- Klikk på en av tidsdelene for å øke den\n" + -"- eller Shift-klikk for å senke verdien\n" + -"- eller klikk-og-dra for raskere valg.."; - -Calendar._TT["PREV_YEAR"] = "Forrige. år (hold for meny)"; -Calendar._TT["PREV_MONTH"] = "Forrige. måned (hold for meny)"; -Calendar._TT["GO_TODAY"] = "Gå til idag"; -Calendar._TT["NEXT_MONTH"] = "Neste måned (hold for meny)"; -Calendar._TT["NEXT_YEAR"] = "Neste år (hold for meny)"; -Calendar._TT["SEL_DATE"] = "Velg dato"; -Calendar._TT["DRAG_TO_MOVE"] = "Dra for å flytte"; -Calendar._TT["PART_TODAY"] = " (idag)"; -Calendar._TT["MON_FIRST"] = "Vis mandag først"; -Calendar._TT["SUN_FIRST"] = "Vis søndag først"; -Calendar._TT["CLOSE"] = "Lukk"; -Calendar._TT["TODAY"] = "Idag"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikk eller dra for å endre verdi"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "uke"; \ No newline at end of file diff --git a/sources/html/js/lang/calendar-pl-utf8.js b/sources/html/js/lang/calendar-pl-utf8.js deleted file mode 100644 index 6b8ca67..0000000 --- a/sources/html/js/lang/calendar-pl-utf8.js +++ /dev/null @@ -1,93 +0,0 @@ -// ** I18N - -// Calendar PL language -// Author: Dariusz Pietrzak, -// Author: Janusz Piwowarski, -// Encoding: utf-8 -// Distributed under the same terms as the calendar itself. - -Calendar._DN = new Array -("Niedziela", - "Poniedziałek", - "Wtorek", - "Środa", - "Czwartek", - "Piątek", - "Sobota", - "Niedziela"); -Calendar._SDN = new Array -("Nie", - "Pn", - "Wt", - "Śr", - "Cz", - "Pt", - "So", - "Nie"); -Calendar._MN = new Array -("Styczeń", - "Luty", - "Marzec", - "Kwiecień", - "Maj", - "Czerwiec", - "Lipiec", - "Sierpień", - "Wrzesień", - "Październik", - "Listopad", - "Grudzień"); -Calendar._SMN = new Array -("Sty", - "Lut", - "Mar", - "Kwi", - "Maj", - "Cze", - "Lip", - "Sie", - "Wrz", - "Paź", - "Lis", - "Gru"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O kalendarzu"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Aby pobrać najnowszą wersję, odwiedź: http://www.dynarch.com/projects/calendar/\n" + -"Dostępny na licencji GNU LGPL. Zobacz szczegóły na http://gnu.org/licenses/lgpl.html." + -"\n\n" + -"Wybór daty:\n" + -"- Użyj przycisków \xab, \xbb by wybrać rok\n" + -"- Użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " by wybrać miesiąc\n" + -"- Przytrzymaj klawisz myszy nad jednym z powyższych przycisków dla szybszego wyboru."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Wybór czasu:\n" + -"- Kliknij na jednym z pól czasu by zwiększyć jego wartość\n" + -"- lub kliknij trzymając Shift by zmiejszyć jego wartość\n" + -"- lub kliknij i przeciągnij dla szybszego wyboru."; - -//Calendar._TT["TOGGLE"] = "Zmień pierwszy dzień tygodnia"; -Calendar._TT["PREV_YEAR"] = "Poprzedni rok (przytrzymaj dla menu)"; -Calendar._TT["PREV_MONTH"] = "Poprzedni miesiąc (przytrzymaj dla menu)"; -Calendar._TT["GO_TODAY"] = "Idź do dzisiaj"; -Calendar._TT["NEXT_MONTH"] = "Następny miesiąc (przytrzymaj dla menu)"; -Calendar._TT["NEXT_YEAR"] = "Następny rok (przytrzymaj dla menu)"; -Calendar._TT["SEL_DATE"] = "Wybierz datę"; -Calendar._TT["DRAG_TO_MOVE"] = "Przeciągnij by przesunąć"; -Calendar._TT["PART_TODAY"] = " (dzisiaj)"; -Calendar._TT["MON_FIRST"] = "Wyświetl poniedziałek jako pierwszy"; -Calendar._TT["SUN_FIRST"] = "Wyświetl niedzielę jako pierwszą"; -Calendar._TT["CLOSE"] = "Zamknij"; -Calendar._TT["TODAY"] = "Dzisiaj"; -Calendar._TT["TIME_PART"] = "(Shift-)Kliknij lub przeciągnij by zmienić wartość"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%e %B, %A"; - -Calendar._TT["WK"] = "ty"; diff --git a/sources/html/js/lang/calendar-pl.js b/sources/html/js/lang/calendar-pl.js deleted file mode 100644 index 76e0551..0000000 --- a/sources/html/js/lang/calendar-pl.js +++ /dev/null @@ -1,56 +0,0 @@ -// ** I18N -// Calendar PL language -// Author: Artur Filipiak, -// January, 2004 -// Encoding: UTF-8 -Calendar._DN = new Array -("Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota", "Niedziela"); - -Calendar._SDN = new Array -("N", "Pn", "Wt", "Śr", "Cz", "Pt", "So", "N"); - -Calendar._MN = new Array -("Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"); - -Calendar._SMN = new Array -("Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O kalendarzu"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Wybór daty:\n" + -"- aby wybrać rok użyj przycisków \xab, \xbb\n" + -"- aby wybrać miesiąc użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" + -"- aby przyspieszyć wybór przytrzymaj wciśnięty przycisk myszy nad ww. przyciskami."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Wybór czasu:\n" + -"- aby zwiększyć wartość kliknij na dowolnym elemencie selekcji czasu\n" + -"- aby zmniejszyć wartość użyj dodatkowo klawisza Shift\n" + -"- możesz również poruszać myszkę w lewo i prawo wraz z wciśniętym lewym klawiszem."; - -Calendar._TT["PREV_YEAR"] = "Poprz. rok (przytrzymaj dla menu)"; -Calendar._TT["PREV_MONTH"] = "Poprz. miesiąc (przytrzymaj dla menu)"; -Calendar._TT["GO_TODAY"] = "Pokaż dziś"; -Calendar._TT["NEXT_MONTH"] = "Nast. miesiąc (przytrzymaj dla menu)"; -Calendar._TT["NEXT_YEAR"] = "Nast. rok (przytrzymaj dla menu)"; -Calendar._TT["SEL_DATE"] = "Wybierz datę"; -Calendar._TT["DRAG_TO_MOVE"] = "Przesuń okienko"; -Calendar._TT["PART_TODAY"] = " (dziś)"; -Calendar._TT["MON_FIRST"] = "Pokaż Poniedziałek jako pierwszy"; -Calendar._TT["SUN_FIRST"] = "Pokaż Niedzielę jako pierwszą"; -Calendar._TT["CLOSE"] = "Zamknij"; -Calendar._TT["TODAY"] = "Dziś"; -Calendar._TT["TIME_PART"] = "(Shift-)klik | drag, aby zmienić wartość"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y.%m.%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; \ No newline at end of file diff --git a/sources/html/js/lang/calendar-pt.js b/sources/html/js/lang/calendar-pt.js deleted file mode 100644 index deee8a1..0000000 --- a/sources/html/js/lang/calendar-pt.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar pt_BR language -// Author: Adalberto Machado, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domingo", - "Segunda", - "Terca", - "Quarta", - "Quinta", - "Sexta", - "Sabado", - "Domingo"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Dom", - "Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sab", - "Dom"); - -// full month names -Calendar._MN = new Array -("Janeiro", - "Fevereiro", - "Marco", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Fev", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Out", - "Nov", - "Dez"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Sobre o calendario"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Ultima versao visite: http://www.dynarch.com/projects/calendar/\n" + -"Distribuido sobre GNU LGPL. Veja http://gnu.org/licenses/lgpl.html para detalhes." + -"\n\n" + -"Selecao de data:\n" + -"- Use os botoes \xab, \xbb para selecionar o ano\n" + -"- Use os botoes " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para selecionar o mes\n" + -"- Segure o botao do mouse em qualquer um desses botoes para selecao rapida."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selecao de hora:\n" + -"- Clique em qualquer parte da hora para incrementar\n" + -"- ou Shift-click para decrementar\n" + -"- ou clique e segure para selecao rapida."; - -Calendar._TT["PREV_YEAR"] = "Ant. ano (segure para menu)"; -Calendar._TT["PREV_MONTH"] = "Ant. mes (segure para menu)"; -Calendar._TT["GO_TODAY"] = "Hoje"; -Calendar._TT["NEXT_MONTH"] = "Prox. mes (segure para menu)"; -Calendar._TT["NEXT_YEAR"] = "Prox. ano (segure para menu)"; -Calendar._TT["SEL_DATE"] = "Selecione a data"; -Calendar._TT["DRAG_TO_MOVE"] = "Arraste para mover"; -Calendar._TT["PART_TODAY"] = " (hoje)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Mostre %s primeiro"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Fechar"; -Calendar._TT["TODAY"] = "Hoje"; -Calendar._TT["TIME_PART"] = "(Shift-)Click ou arraste para mudar valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b"; - -Calendar._TT["WK"] = "sm"; -Calendar._TT["TIME"] = "Hora:"; diff --git a/sources/html/js/lang/calendar-ro.js b/sources/html/js/lang/calendar-ro.js deleted file mode 100644 index 116e358..0000000 --- a/sources/html/js/lang/calendar-ro.js +++ /dev/null @@ -1,66 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Duminică", - "Luni", - "Marţi", - "Miercuri", - "Joi", - "Vineri", - "Sâmbătă", - "Duminică"); -Calendar._SDN_len = 2; -Calendar._MN = new Array -("Ianuarie", - "Februarie", - "Martie", - "Aprilie", - "Mai", - "Iunie", - "Iulie", - "August", - "Septembrie", - "Octombrie", - "Noiembrie", - "Decembrie"); - -// tooltips -Calendar._TT = {}; - -Calendar._TT["INFO"] = "Despre calendar"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Pentru ultima versiune vizitaţi: http://www.dynarch.com/projects/calendar/\n" + -"Distribuit sub GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Selecţia datei:\n" + -"- Folosiţi butoanele \xab, \xbb pentru a selecta anul\n" + -"- Folosiţi butoanele " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pentru a selecta luna\n" + -"- Tineţi butonul mouse-ului apăsat pentru selecţie mai rapidă."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selecţia orei:\n" + -"- Click pe ora sau minut pentru a mări valoarea cu 1\n" + -"- Sau Shift-Click pentru a micşora valoarea cu 1\n" + -"- Sau Click şi drag pentru a selecta mai repede."; - -Calendar._TT["PREV_YEAR"] = "Anul precedent (lung pt menu)"; -Calendar._TT["PREV_MONTH"] = "Luna precedentă (lung pt menu)"; -Calendar._TT["GO_TODAY"] = "Data de azi"; -Calendar._TT["NEXT_MONTH"] = "Luna următoare (lung pt menu)"; -Calendar._TT["NEXT_YEAR"] = "Anul următor (lung pt menu)"; -Calendar._TT["SEL_DATE"] = "Selectează data"; -Calendar._TT["DRAG_TO_MOVE"] = "Trage pentru a mişca"; -Calendar._TT["PART_TODAY"] = " (astăzi)"; -Calendar._TT["DAY_FIRST"] = "Afişează %s prima zi"; -Calendar._TT["WEEKEND"] = "0,6"; -Calendar._TT["CLOSE"] = "Închide"; -Calendar._TT["TODAY"] = "Astăzi"; -Calendar._TT["TIME_PART"] = "(Shift-)Click sau drag pentru a selecta"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %d %B"; - -Calendar._TT["WK"] = "spt"; -Calendar._TT["TIME"] = "Ora:"; diff --git a/sources/html/js/lang/calendar-ru.js b/sources/html/js/lang/calendar-ru.js deleted file mode 100644 index 9f75a6a..0000000 --- a/sources/html/js/lang/calendar-ru.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar RU language -// Translation: Sly Golovanov, http://golovanov.net, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("воскресенье", - "понедельник", - "вторник", - "среда", - "четверг", - "пятница", - "суббота", - "воскресенье"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("вск", - "пон", - "втр", - "срд", - "чет", - "пят", - "суб", - "вск"); - -// full month names -Calendar._MN = new Array -("январь", - "февраль", - "март", - "апрель", - "май", - "июнь", - "июль", - "август", - "сентябрь", - "октябрь", - "ноябрь", - "декабрь"); - -// short month names -Calendar._SMN = new Array -("янв", - "фев", - "мар", - "апр", - "май", - "июн", - "июл", - "авг", - "сен", - "окт", - "ноя", - "дек"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "О календаре..."; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Как выбрать дату:\n" + -"- При помощи кнопок \xab, \xbb можно выбрать год\n" + -"- При помощи кнопок " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " можно выбрать месяц\n" + -"- Подержите эти кнопки нажатыми, чтобы появилось меню быстрого выбора."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Как выбрать время:\n" + -"- При клике на часах или минутах они увеличиваются\n" + -"- при клике с нажатой клавишей Shift они уменьшаются\n" + -"- если нажать и двигать мышкой влево/вправо, они будут меняться быстрее."; - -Calendar._TT["PREV_YEAR"] = "На год назад (удерживать для меню)"; -Calendar._TT["PREV_MONTH"] = "На месяц назад (удерживать для меню)"; -Calendar._TT["GO_TODAY"] = "Сегодня"; -Calendar._TT["NEXT_MONTH"] = "На месяц вперед (удерживать для меню)"; -Calendar._TT["NEXT_YEAR"] = "На год вперед (удерживать для меню)"; -Calendar._TT["SEL_DATE"] = "Выберите дату"; -Calendar._TT["DRAG_TO_MOVE"] = "Перетаскивайте мышкой"; -Calendar._TT["PART_TODAY"] = " (сегодня)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Первый день недели будет %s"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Закрыть"; -Calendar._TT["TODAY"] = "Сегодня"; -Calendar._TT["TIME_PART"] = "(Shift-)клик или нажать и двигать"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a"; - -Calendar._TT["WK"] = "нед"; -Calendar._TT["TIME"] = "Время:"; diff --git a/sources/html/js/lang/calendar-ru_win_.js b/sources/html/js/lang/calendar-ru_win_.js deleted file mode 100644 index de455af..0000000 --- a/sources/html/js/lang/calendar-ru_win_.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar RU language -// Translation: Sly Golovanov, http://golovanov.net, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("", - "", - "", - "", - "", - "", - "", - ""); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("", - "", - "", - "", - "", - "", - "", - ""); - -// full month names -Calendar._MN = new Array -("", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - ""); - -// short month names -Calendar._SMN = new Array -("", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - ""); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = " ..."; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -" :\n" + -"- \xab, \xbb \n" + -"- " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " \n" + -"- , ."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -" :\n" + -"- \n" + -"- Shift \n" + -"- /, ."; - -Calendar._TT["PREV_YEAR"] = " ( )"; -Calendar._TT["PREV_MONTH"] = " ( )"; -Calendar._TT["GO_TODAY"] = ""; -Calendar._TT["NEXT_MONTH"] = " ( )"; -Calendar._TT["NEXT_YEAR"] = " ( )"; -Calendar._TT["SEL_DATE"] = " "; -Calendar._TT["DRAG_TO_MOVE"] = " "; -Calendar._TT["PART_TODAY"] = " ()"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = " %s"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = ""; -Calendar._TT["TODAY"] = ""; -Calendar._TT["TIME_PART"] = "(Shift-) "; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a"; - -Calendar._TT["WK"] = ""; -Calendar._TT["TIME"] = ":"; diff --git a/sources/html/js/lang/calendar-si.js b/sources/html/js/lang/calendar-si.js deleted file mode 100644 index 100c522..0000000 --- a/sources/html/js/lang/calendar-si.js +++ /dev/null @@ -1,94 +0,0 @@ -/* Slovenian language file for the DHTML Calendar version 0.9.2 -* Author David Milost , January 2004. -* Feel free to use this script under the terms of the GNU Lesser General -* Public License, as long as you do not remove or alter this notice. -*/ - // full day names -Calendar._DN = new Array -("Nedelja", - "Ponedeljek", - "Torek", - "Sreda", - "Četrtek", - "Petek", - "Sobota", - "Nedelja"); - // short day names - Calendar._SDN = new Array -("Ned", - "Pon", - "Tor", - "Sre", - "Čet", - "Pet", - "Sob", - "Ned"); -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "Maj", - "Jun", - "Jul", - "Avg", - "Sep", - "Okt", - "Nov", - "Dec"); - // full month names -Calendar._MN = new Array -("Januar", - "Februar", - "Marec", - "April", - "Maj", - "Junij", - "Julij", - "Avgust", - "September", - "Oktober", - "November", - "December"); - -// tooltips -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O koledarju"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Za zadnjo verzijo pojdine na naslov: http://www.dynarch.com/projects/calendar/\n" + -"Distribuirano pod GNU LGPL. Poglejte http://gnu.org/licenses/lgpl.html za podrobnosti." + -"\n\n" + -"Izbor datuma:\n" + -"- Uporabite \xab, \xbb gumbe za izbor leta\n" + -"- Uporabite " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gumbe za izbor meseca\n" + -"- Zadržite klik na kateremkoli od zgornjih gumbov za hiter izbor."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Izbor ćasa:\n" + -"- Kliknite na katerikoli del ćasa za poveć. le-tega\n" + -"- ali Shift-click za zmanj. le-tega\n" + -"- ali kliknite in povlecite za hiter izbor."; - -Calendar._TT["TOGGLE"] = "Spremeni dan s katerim se prićne teden"; -Calendar._TT["PREV_YEAR"] = "Predhodnje leto (dolg klik za meni)"; -Calendar._TT["PREV_MONTH"] = "Predhodnji mesec (dolg klik za meni)"; -Calendar._TT["GO_TODAY"] = "Pojdi na tekoći dan"; -Calendar._TT["NEXT_MONTH"] = "Naslednji mesec (dolg klik za meni)"; -Calendar._TT["NEXT_YEAR"] = "Naslednje leto (dolg klik za meni)"; -Calendar._TT["SEL_DATE"] = "Izberite datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Pritisni in povleci za spremembo pozicije"; -Calendar._TT["PART_TODAY"] = " (danes)"; -Calendar._TT["MON_FIRST"] = "Prikaži ponedeljek kot prvi dan"; -Calendar._TT["SUN_FIRST"] = "Prikaži nedeljo kot prvi dan"; -Calendar._TT["CLOSE"] = "Zapri"; -Calendar._TT["TODAY"] = "Danes"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "Ted"; \ No newline at end of file diff --git a/sources/html/js/lang/calendar-sk.js b/sources/html/js/lang/calendar-sk.js deleted file mode 100644 index 4fe6a3c..0000000 --- a/sources/html/js/lang/calendar-sk.js +++ /dev/null @@ -1,99 +0,0 @@ -// ** I18N - -// Calendar SK language -// Author: Peter Valach (pvalach@gmx.net) -// Encoding: utf-8 -// Last update: 2003/10/29 -// Distributed under the same terms as the calendar itself. - -// full day names -Calendar._DN = new Array -("NedeÄľa", - "Pondelok", - "Utorok", - "Streda", - "Ĺ tvrtok", - "Piatok", - "Sobota", - "NedeÄľa"); - -// short day names -Calendar._SDN = new Array -("Ned", - "Pon", - "Uto", - "Str", - "Ĺ tv", - "Pia", - "Sob", - "Ned"); - -// full month names -Calendar._MN = new Array -("Január", - "Február", - "Marec", - "AprĂ­l", - "Máj", - "JĂşn", - "JĂşl", - "August", - "September", - "OktĂłber", - "November", - "December"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "Máj", - "JĂşn", - "JĂşl", - "Aug", - "Sep", - "Okt", - "Nov", - "Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O kalendári"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + -"PoslednĂş verziu nájdete na: http://www.dynarch.com/projects/calendar/\n" + -"DistribuovanĂ© pod GNU LGPL. ViÄŹ http://gnu.org/licenses/lgpl.html pre detaily." + -"\n\n" + -"VĂ˝ber dátumu:\n" + -"- PouĹľite tlaÄŤidlá \xab, \xbb pre vĂ˝ber roku\n" + -"- PouĹľite tlaÄŤidlá " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pre vĂ˝ber mesiaca\n" + -"- Ak ktorĂ©koÄľvek z tĂ˝chto tlaÄŤidiel podržíte dlhšie, zobrazĂ­ sa rĂ˝chly vĂ˝ber."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"VĂ˝ber ÄŤasu:\n" + -"- Kliknutie na niektorĂş poloĹľku ÄŤasu ju zvýši\n" + -"- Shift-klik ju znĂ­Ĺľi\n" + -"- Ak podržíte tlaÄŤĂ­tko stlaÄŤenĂ©, posĂşvanĂ­m menĂ­te hodnotu."; - -Calendar._TT["PREV_YEAR"] = "PredošlĂ˝ rok (podrĹľte pre menu)"; -Calendar._TT["PREV_MONTH"] = "PredošlĂ˝ mesiac (podrĹľte pre menu)"; -Calendar._TT["GO_TODAY"] = "PrejsĹĄ na dnešok"; -Calendar._TT["NEXT_MONTH"] = "Nasl. mesiac (podrĹľte pre menu)"; -Calendar._TT["NEXT_YEAR"] = "Nasl. rok (podrĹľte pre menu)"; -Calendar._TT["SEL_DATE"] = "ZvoÄľte dátum"; -Calendar._TT["DRAG_TO_MOVE"] = "PodrĹľanĂ­m tlaÄŤĂ­tka zmenĂ­te polohu"; -Calendar._TT["PART_TODAY"] = " (dnes)"; -Calendar._TT["MON_FIRST"] = "ZobraziĹĄ pondelok ako prvĂ˝"; -Calendar._TT["SUN_FIRST"] = "ZobraziĹĄ nedeÄľu ako prvĂş"; -Calendar._TT["CLOSE"] = "ZavrieĹĄ"; -Calendar._TT["TODAY"] = "Dnes"; -Calendar._TT["TIME_PART"] = "(Shift-)klik/ĹĄahanie zmenĂ­ hodnotu"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "$d. %m. %Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %e. %b"; - -Calendar._TT["WK"] = "týž"; diff --git a/sources/html/js/lang/calendar-sp.js b/sources/html/js/lang/calendar-sp.js deleted file mode 100644 index 239d1b3..0000000 --- a/sources/html/js/lang/calendar-sp.js +++ /dev/null @@ -1,110 +0,0 @@ -// ** I18N - -// Calendar SP language -// Author: Rafael Velasco -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domingo", - "Lunes", - "Martes", - "Miercoles", - "Jueves", - "Viernes", - "Sabado", - "Domingo"); - -Calendar._SDN = new Array -("Dom", - "Lun", - "Mar", - "Mie", - "Jue", - "Vie", - "Sab", - "Dom"); - -// full month names -Calendar._MN = new Array -("Enero", - "Febrero", - "Marzo", - "Abril", - "Mayo", - "Junio", - "Julio", - "Agosto", - "Septiembre", - "Octubre", - "Noviembre", - "Diciembre"); - -// short month names -Calendar._SMN = new Array -("Ene", - "Feb", - "Mar", - "Abr", - "May", - "Jun", - "Jul", - "Ago", - "Sep", - "Oct", - "Nov", - "Dic"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Informacin del Calendario"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Nuevas versiones en: http://www.dynarch.com/projects/calendar/\n" + -"Distribuida bajo licencia GNU LGPL. Para detalles vea http://gnu.org/licenses/lgpl.html ." + -"\n\n" + -"Seleccin de Fechas:\n" + -"- Use \xab, \xbb para seleccionar el ao\n" + -"- Use " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" + -"- Mantenga presionado el botn del ratn en cualquiera de las opciones superiores para un acceso rapido ."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Seleccin del Reloj:\n" + -"- Seleccione la hora para cambiar el reloj\n" + -"- o presione Shift-click para disminuirlo\n" + -"- o presione click y arrastre del ratn para una seleccin rapida."; - -Calendar._TT["PREV_YEAR"] = "Ao anterior (Presione para menu)"; -Calendar._TT["PREV_MONTH"] = "Mes Anterior (Presione para menu)"; -Calendar._TT["GO_TODAY"] = "Ir a Hoy"; -Calendar._TT["NEXT_MONTH"] = "Mes Siguiente (Presione para menu)"; -Calendar._TT["NEXT_YEAR"] = "Ao Siguiente (Presione para menu)"; -Calendar._TT["SEL_DATE"] = "Seleccione fecha"; -Calendar._TT["DRAG_TO_MOVE"] = "Arrastre y mueva"; -Calendar._TT["PART_TODAY"] = " (Hoy)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Mostrar %s primero"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Cerrar"; -Calendar._TT["TODAY"] = "Hoy"; -Calendar._TT["TIME_PART"] = "(Shift-)Click o arrastra para cambar el valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%dd-%mm-%yy"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y"; - -Calendar._TT["WK"] = "Sm"; -Calendar._TT["TIME"] = "Hora:"; diff --git a/sources/html/js/lang/calendar-sv.js b/sources/html/js/lang/calendar-sv.js deleted file mode 100644 index db1f4b8..0000000 --- a/sources/html/js/lang/calendar-sv.js +++ /dev/null @@ -1,93 +0,0 @@ -// ** I18N - -// Calendar SV language (Swedish, svenska) -// Author: Mihai Bazon, -// Translation team: -// Translator: Leonard Norrgrd -// Last translator: Leonard Norrgrd -// Encoding: iso-latin-1 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("sndag", - "mndag", - "tisdag", - "onsdag", - "torsdag", - "fredag", - "lrdag", - "sndag"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. -Calendar._SDN_len = 2; -Calendar._SMN_len = 3; - -// full month names -Calendar._MN = new Array -("januari", - "februari", - "mars", - "april", - "maj", - "juni", - "juli", - "augusti", - "september", - "oktober", - "november", - "december"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Om kalendern"; - -Calendar._TT["ABOUT"] = -"DHTML Datum/tid-vljare\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Fr senaste version g till: http://www.dynarch.com/projects/calendar/\n" + -"Distribueras under GNU LGPL. Se http://gnu.org/licenses/lgpl.html fr detaljer." + -"\n\n" + -"Val av datum:\n" + -"- Anvnd knapparna \xab, \xbb fr att vlja r\n" + -"- Anvnd knapparna " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " fr att vlja mnad\n" + -"- Hll musknappen nedtryckt p ngon av ovanstende knappar fr snabbare val."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Val av tid:\n" + -"- Klicka p en del av tiden fr att ka den delen\n" + -"- eller skift-klicka fr att minska den\n" + -"- eller klicka och drag fr snabbare val."; - -Calendar._TT["PREV_YEAR"] = "Fregende r (hll fr menu)"; -Calendar._TT["PREV_MONTH"] = "Fregende mnad (hll fr menu)"; -Calendar._TT["GO_TODAY"] = "G till dagens datum"; -Calendar._TT["NEXT_MONTH"] = "Fljande mnad (hll fr menu)"; -Calendar._TT["NEXT_YEAR"] = "Fljande r (hll fr menu)"; -Calendar._TT["SEL_DATE"] = "Vlj datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Drag fr att flytta"; -Calendar._TT["PART_TODAY"] = " (idag)"; -Calendar._TT["MON_FIRST"] = "Visa mndag frst"; -Calendar._TT["SUN_FIRST"] = "Visa sndag frst"; -Calendar._TT["CLOSE"] = "Stng"; -Calendar._TT["TODAY"] = "Idag"; -Calendar._TT["TIME_PART"] = "(Skift-)klicka eller drag fr att ndra tid"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A %d %b %Y"; - -Calendar._TT["WK"] = "vecka"; diff --git a/sources/html/js/lang/calendar-tr.js b/sources/html/js/lang/calendar-tr.js deleted file mode 100644 index f2c906c..0000000 --- a/sources/html/js/lang/calendar-tr.js +++ /dev/null @@ -1,58 +0,0 @@ -////////////////////////////////////////////////////////////////////////////////////////////// -// Turkish Translation by Nuri AKMAN -// Location: Ankara/TURKEY -// e-mail : nuriakman@hotmail.com -// Date : April, 9 2003 -// -// Note: if Turkish Characters does not shown on you screen -// please include falowing line your html code: -// -// -// -////////////////////////////////////////////////////////////////////////////////////////////// - -// ** I18N -Calendar._DN = new Array -("Pazar", - "Pazartesi", - "Sal", - "aramba", - "Perembe", - "Cuma", - "Cumartesi", - "Pazar"); -Calendar._MN = new Array -("Ocak", - "ubat", - "Mart", - "Nisan", - "Mays", - "Haziran", - "Temmuz", - "Austos", - "Eyll", - "Ekim", - "Kasm", - "Aralk"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Haftann ilk gnn kaydr"; -Calendar._TT["PREV_YEAR"] = "nceki Yl (Men iin basl tutunuz)"; -Calendar._TT["PREV_MONTH"] = "nceki Ay (Men iin basl tutunuz)"; -Calendar._TT["GO_TODAY"] = "Bugn'e git"; -Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Men iin basl tutunuz)"; -Calendar._TT["NEXT_YEAR"] = "Sonraki Yl (Men iin basl tutunuz)"; -Calendar._TT["SEL_DATE"] = "Tarih seiniz"; -Calendar._TT["DRAG_TO_MOVE"] = "Tamak iin srkleyiniz"; -Calendar._TT["PART_TODAY"] = " (bugn)"; -Calendar._TT["MON_FIRST"] = "Takvim Pazartesi gnnden balasn"; -Calendar._TT["SUN_FIRST"] = "Takvim Pazar gnnden balasn"; -Calendar._TT["CLOSE"] = "Kapat"; -Calendar._TT["TODAY"] = "Bugn"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "d MM y, DD"; - -Calendar._TT["WK"] = "Hafta"; diff --git a/sources/html/js/lang/calendar-zh.js b/sources/html/js/lang/calendar-zh.js deleted file mode 100644 index 4a0feb6..0000000 --- a/sources/html/js/lang/calendar-zh.js +++ /dev/null @@ -1,119 +0,0 @@ -// ** I18N - -// Calendar ZH language -// Author: muziq, -// Encoding: GB2312 or GBK -// Distributed under the same terms as the calendar itself. - -// full day names -Calendar._DN = new Array -("", - "һ", - "ڶ", - "", - "", - "", - "", - ""); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("", - "һ", - "", - "", - "", - "", - "", - ""); - -// full month names -Calendar._MN = new Array -("һ", - "", - "", - "", - "", - "", - "", - "", - "", - "ʮ", - "ʮһ", - "ʮ"); - -// short month names -Calendar._SMN = new Array -("һ", - "", - "", - "", - "", - "", - "", - "", - "", - "ʮ", - "ʮһ", - "ʮ"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = ""; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"ѡ:\n" + -"- \xab, \xbb ťѡ\n" + -"- " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ťѡ·\n" + -"- ϰťɴӲ˵пѡݻ·"; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"ѡʱ:\n" + -"- Сʱӿʹֵһ\n" + -"- סShiftСʱӿʹֵһ\n" + -"- ϶ɽпѡ"; - -Calendar._TT["PREV_YEAR"] = "һ (ס˵)"; -Calendar._TT["PREV_MONTH"] = "һ (ס˵)"; -Calendar._TT["GO_TODAY"] = "ת"; -Calendar._TT["NEXT_MONTH"] = "һ (ס˵)"; -Calendar._TT["NEXT_YEAR"] = "һ (ס˵)"; -Calendar._TT["SEL_DATE"] = "ѡ"; -Calendar._TT["DRAG_TO_MOVE"] = "϶"; -Calendar._TT["PART_TODAY"] = " ()"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "ʾ%s"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "ر"; -Calendar._TT["TODAY"] = ""; -Calendar._TT["TIME_PART"] = "(Shift-)϶ıֵ"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %b %e"; - -Calendar._TT["WK"] = ""; -Calendar._TT["TIME"] = "ʱ:"; diff --git a/sources/html/js/lang/cn_utf8.js b/sources/html/js/lang/cn_utf8.js deleted file mode 100644 index de61b46..0000000 --- a/sources/html/js/lang/cn_utf8.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Encoding: any -// Translator : Niko -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("\u5468\u65e5",//\u5468\u65e5 - "\u5468\u4e00",//\u5468\u4e00 - "\u5468\u4e8c",//\u5468\u4e8c - "\u5468\u4e09",//\u5468\u4e09 - "\u5468\u56db",//\u5468\u56db - "\u5468\u4e94",//\u5468\u4e94 - "\u5468\u516d",//\u5468\u516d - "\u5468\u65e5");//\u5468\u65e5 - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("\u5468\u65e5", - "\u5468\u4e00", - "\u5468\u4e8c", - "\u5468\u4e09", - "\u5468\u56db", - "\u5468\u4e94", - "\u5468\u516d", - "\u5468\u65e5"); - -// full month names -Calendar._MN = new Array -("\u4e00\u6708", - "\u4e8c\u6708", - "\u4e09\u6708", - "\u56db\u6708", - "\u4e94\u6708", - "\u516d\u6708", - "\u4e03\u6708", - "\u516b\u6708", - "\u4e5d\u6708", - "\u5341\u6708", - "\u5341\u4e00\u6708", - "\u5341\u4e8c\u6708"); - -// short month names -Calendar._SMN = new Array -("\u4e00\u6708", - "\u4e8c\u6708", - "\u4e09\u6708", - "\u56db\u6708", - "\u4e94\u6708", - "\u516d\u6708", - "\u4e03\u6708", - "\u516b\u6708", - "\u4e5d\u6708", - "\u5341\u6708", - "\u5341\u4e00\u6708", - "\u5341\u4e8c\u6708"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "\u5173\u4e8e"; - -Calendar._TT["ABOUT"] = -" DHTML \u65e5\u8d77/\u65f6\u95f4\u9009\u62e9\u63a7\u4ef6\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: \u6700\u65b0\u7248\u672c\u8bf7\u767b\u9646http://www.dynarch.com/projects/calendar/\u5bdf\u770b\n" + -"\u9075\u5faaGNU LGPL. \u7ec6\u8282\u53c2\u9605 http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"\u65e5\u671f\u9009\u62e9:\n" + -"- \u70b9\u51fb\xab(\xbb)\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e00\u5e74\u5ea6.\n" + -"- \u70b9\u51fb" + String.fromCharCode(0x2039) + "(" + String.fromCharCode(0x203a) + ")\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e2a\u6708\u4efd.\n" + -"- \u957f\u65f6\u95f4\u6309\u7740\u6309\u94ae\u5c06\u51fa\u73b0\u66f4\u591a\u9009\u62e9\u9879."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"\u65f6\u95f4\u9009\u62e9:\n" + -"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u589e\u52a0\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\n" + -"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u6309\u4f4fShift\u952e\u540e\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u51cf\u5c11\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)."; - -Calendar._TT["PREV_YEAR"] = "\u4e0a\u4e00\u5e74"; -Calendar._TT["PREV_MONTH"] = "\u4e0a\u4e2a\u6708"; -Calendar._TT["GO_TODAY"] = "\u5230\u4eca\u5929"; -Calendar._TT["NEXT_MONTH"] = "\u4e0b\u4e2a\u6708"; -Calendar._TT["NEXT_YEAR"] = "\u4e0b\u4e00\u5e74"; -Calendar._TT["SEL_DATE"] = "\u9009\u62e9\u65e5\u671f"; -Calendar._TT["DRAG_TO_MOVE"] = "\u62d6\u52a8"; -Calendar._TT["PART_TODAY"] = " (\u4eca\u5929)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "%s\u4e3a\u8fd9\u5468\u7684\u7b2c\u4e00\u5929"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "\u5173\u95ed"; -Calendar._TT["TODAY"] = "\u4eca\u5929"; -Calendar._TT["TIME_PART"] = "(\u6309\u7740Shift\u952e)\u5355\u51fb\u6216\u62d6\u52a8\u6539\u53d8\u503c"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e\u65e5"; - -Calendar._TT["WK"] = "\u5468"; -Calendar._TT["TIME"] = "\u65f6\u95f4:"; diff --git a/sources/html/js/modele_document.js b/sources/html/js/modele_document.js deleted file mode 100644 index 31b9b28..0000000 --- a/sources/html/js/modele_document.js +++ /dev/null @@ -1,89 +0,0 @@ -/* - * This file is part of NOALYSS. - * - * NOALYSS is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * NOALYSS is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NOALYSS; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/*!\brief - * \param p_value jrn.jr_id - */ -function modifyModeleDocument(p_value,dossier) -{ - layer++; - id='det'+layer; - var pos_y=posY+offsetY-20; - var pos_x=posX+offsetX+40; - var style="position:absolute;top:"+pos_y+"px;left:10%;width:80%"; - var popup={'id':'mod_doc', - 'cssclass':'inner_box', - 'html': loading(), - 'drag':false, - 'style':style - }; - - querystring='gDossier='+dossier+'&op=mod_doc&id='+p_value+'&div=mod_doc'; - if ( ! $('mod_doc')) - { - add_div(popup); - } - - var action=new Ajax.Request( - "ajax_misc.php", - { - method:'get', - parameters:querystring, - onFailure:error_box, - onSuccess:modify_document_success_box - } - ); -} -/** - *@brief receive answer from ajax and just display it into the IBox - * XML must contains at least 2 fields : code is the ID of the IBOX and - * html which is the contain - */ -function modify_document_success_box(req,json) -{ - try - { - $('mod_doc').show(); - var answer=req.responseXML; - var a=answer.getElementsByTagName('ctl'); - var html=answer.getElementsByTagName('code'); - if ( a.length == 0 ) - { - var rec=req.responseText; - alert_box ('erreur :'+rec); - } - var name_ctl=a[0].firstChild.nodeValue; - var code_html=getNodeText(html[0]); - - code_html=unescape_xml(code_html); - g(name_ctl).innerHTML=code_html; - g(name_ctl).style.height='auto'; - } - catch (e) - { - alert_box("success_box"+e.message); - } - try - { - code_html.evalScripts(); - } - catch(e) - { - alert_box("answer_box Impossible executer script de la reponse\n"+e.message); - } -} diff --git a/sources/html/js/nicEdit.js b/sources/html/js/nicEdit.js deleted file mode 100644 index 00a2e09..0000000 --- a/sources/html/js/nicEdit.js +++ /dev/null @@ -1,112 +0,0 @@ -/* NicEdit - Micro Inline WYSIWYG - * Copyright 2007-2008 Brian Kirchoff - * - * NicEdit is distributed under the terms of the MIT license - * For more information visit http://nicedit.com/ - * Do not remove this copyright message - */ -var bkExtend=function(){var A=arguments;if(A.length==1){A=[this,A[0]]}for(var B in A[1]){A[0][B]=A[1][B]}return A[0]};function bkClass(){}bkClass.prototype.construct=function(){};bkClass.extend=function(C){var A=function(){if(arguments[0]!==bkClass){return this.construct.apply(this,arguments)}};var B=new this(bkClass);bkExtend(B,C);A.prototype=B;A.extend=this.extend;return A};var bkElement=bkClass.extend({construct:function(B,A){if(typeof (B)=="string"){B=(A||document).createElement(B)}B=$BK(B);return B},appendTo:function(A){A.appendChild(this);return this},appendBefore:function(A){A.parentNode.insertBefore(this,A);return this},addEvent:function(B,A){bkLib.addEvent(this,B,A);return this},setContent:function(A){this.innerHTML=A;return this},pos:function(){var C=curtop=0;var B=obj=this;if(obj.offsetParent){do{C+=obj.offsetLeft;curtop+=obj.offsetTop}while(obj=obj.offsetParent)}var A=(!window.opera)?parseInt(this.getStyle("border-width")||this.style.border)||0:0;return[C+A,curtop+A+this.offsetHeight]},noSelect:function(){bkLib.noSelect(this);return this},parentTag:function(A){var B=this;do{if(B&&B.nodeName&&B.nodeName.toUpperCase()==A){return B}B=B.parentNode}while(B);return false},hasClass:function(A){return this.className.match(new RegExp("(\\s|^)nicEdit-"+A+"(\\s|$)"))},addClass:function(A){if(!this.hasClass(A)){this.className+=" nicEdit-"+A}return this},removeClass:function(A){if(this.hasClass(A)){this.className=this.className.replace(new RegExp("(\\s|^)nicEdit-"+A+"(\\s|$)")," ")}return this},setStyle:function(A){var B=this.style;for(var C in A){switch(C){case"float":B.cssFloat=B.styleFloat=A[C];break;case"opacity":B.opacity=A[C];B.filter="alpha(opacity="+Math.round(A[C]*100)+")";break;case"className":this.className=A[C];break;default:B[C]=A[C]}}return this},getStyle:function(A,C){var B=(!C)?document.defaultView:C;if(this.nodeType==1){return(B&&B.getComputedStyle)?B.getComputedStyle(this,null).getPropertyValue(A):this.currentStyle[bkLib.camelize(A)]}},remove:function(){this.parentNode.removeChild(this);return this},setAttributes:function(A){for(var B in A){this[B]=A[B]}return this}});var bkLib={isMSIE:(navigator.appVersion.indexOf("MSIE")!=-1),addEvent:function(C,B,A){(C.addEventListener)?C.addEventListener(B,A,false):C.attachEvent("on"+B,A)},toArray:function(C){var B=C.length,A=new Array(B);while(B--){A[B]=C[B]}return A},noSelect:function(B){if(B.setAttribute&&B.nodeName.toLowerCase()!="input"&&B.nodeName.toLowerCase()!="textarea"){B.setAttribute("unselectable","on")}for(var A=0;A.nicEdit-main p { margin: 0; } to your HTML - Add class="sortable" to any table you'd like to make sortable - Click on the headers to sort - - Thanks to many, many people for contributions and suggestions. - Licenced as X11: http://www.kryogenix.org/code/browser/licence.html - This basically means: do what you want with it. - -@note -Documentation http://www.kryogenix.org/code/browser/sorttable/ - -Show the default order -example: - -.... ▴ - -....  ▾ - -Sort on date - // format YYYYMMDD - -force as numeric (normally useless): -Part number - -To avoid the sort on the last row, use tfoot - -*/ - - -var stIsIE = /*@cc_on!@*/false; - -sorttable = { - init: function() { - // quit if this function has already been called - if (arguments.callee.done) return; - // flag this function so we don't do the same thing twice - arguments.callee.done = true; - // kill the timer - if (_timer) clearInterval(_timer); - - if (!document.createElement || !document.getElementsByTagName) return; - - sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; - - forEach(document.getElementsByTagName('table'), function(table) { - if (table.className.search(/\bsortable\b/) != -1) { - sorttable.makeSortable(table); - } - }); - - }, - - makeSortable: function(table) { - if (table.getElementsByTagName('thead').length == 0) { - // table doesn't have a tHead. Since it should have, create one and - // put the first table row in it. - the = document.createElement('thead'); - the.appendChild(table.rows[0]); - table.insertBefore(the,table.firstChild); - } - // Safari doesn't support table.tHead, sigh - if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; - - if (table.tHead.rows.length != 1) return; // can't cope with two header rows - - // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as - // "total" rows, for example). This is B&R, since what you're supposed - // to do is put them in a tfoot. So, if there are sortbottom rows, - // for backwards compatibility, move them to tfoot (creating it if needed). - sortbottomrows = []; - for (var i=0; i5' : ' ▴'; - this.appendChild(sortrevind); - return; - } - if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { - // if we're already sorted by this column in reverse, just - // re-reverse the table, which is quicker - sorttable.reverse(this.sorttable_tbody); - this.className = this.className.replace('sorttable_sorted_reverse', - 'sorttable_sorted'); - this.removeChild(document.getElementById('sorttable_sortrevind')); - sortfwdind = document.createElement('span'); - sortfwdind.id = "sorttable_sortfwdind"; - sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; - this.appendChild(sortfwdind); - return; - } - - // remove sorttable_sorted classes - theadrow = this.parentNode; - forEach(theadrow.childNodes, function(cell) { - if (cell.nodeType == 1) { // an element - cell.className = cell.className.replace('sorttable_sorted_reverse',''); - cell.className = cell.className.replace('sorttable_sorted',''); - } - }); - sortfwdind = document.getElementById('sorttable_sortfwdind'); - if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } - sortrevind = document.getElementById('sorttable_sortrevind'); - if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } - - this.className += ' sorttable_sorted'; - sortfwdind = document.createElement('span'); - sortfwdind.id = "sorttable_sortfwdind"; - sortfwdind.innerHTML = stIsIE ? ' 6' : ' ▾'; - this.appendChild(sortfwdind); - - // build an array to sort. This is a Schwartzian transform thing, - // i.e., we "decorate" each row with the actual sort key, - // sort based on the sort keys, and then put the rows back in order - // which is a lot faster because you only do getInnerText once per row - var row_array = []; - var col = this.sorttable_columnindex; - var rows = this.sorttable_tbody.rows; - for (var j=0; j 12) { - // definitely dd/mm - return sorttable.sort_ddmm; - } else if (second > 12) { - return sorttable.sort_mmdd; - } else { - // looks like a date, but we can't tell which, so assume - // that it's dd/mm (English imperialism!) and keep looking - sortfn = sorttable.sort_ddmm; - } - } - } - } - return sortfn; - }, - - getInnerText: function(node) { - // gets the text we want to use for sorting for a cell. - // strips leading and trailing whitespace. - // this is *not* a generic getInnerText function; it's special to sorttable. - // for example, you can override the cell text with a customkey attribute. - // it also gets .value for fields. - - if (!node) return ""; - - hasInputs = (typeof node.getElementsByTagName == 'function') && - node.getElementsByTagName('input').length; - - if (node.getAttribute("sorttable_customkey") != null) { - return node.getAttribute("sorttable_customkey"); - } - else if (typeof node.textContent != 'undefined' && !hasInputs) { - return node.textContent.replace(/^\s+|\s+$/g, ''); - } - else if (typeof node.innerText != 'undefined' && !hasInputs) { - return node.innerText.replace(/^\s+|\s+$/g, ''); - } - else if (typeof node.text != 'undefined' && !hasInputs) { - return node.text.replace(/^\s+|\s+$/g, ''); - } - else { - switch (node.nodeType) { - case 3: - if (node.nodeName.toLowerCase() == 'input') { - return node.value.replace(/^\s+|\s+$/g, ''); - } - case 4: - return node.nodeValue.replace(/^\s+|\s+$/g, ''); - break; - case 1: - case 11: - var innerText = ''; - for (var i = 0; i < node.childNodes.length; i++) { - innerText += sorttable.getInnerText(node.childNodes[i]); - } - return innerText.replace(/^\s+|\s+$/g, ''); - break; - default: - return ''; - } - } - }, - - reverse: function(tbody) { - // reverse the rows in a tbody - newrows = []; - for (var i=0; i=0; i--) { - tbody.appendChild(newrows[i]); - } - delete newrows; - }, - - /* sort functions - each sort function takes two parameters, a and b - you are comparing a[0] and b[0] */ - sort_numeric: function(a,b) { - var aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); - if (isNaN(aa)) aa = 0; - var bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); - if (isNaN(bb)) bb = 0; - return aa-bb; - }, - sort_alpha: function(a,b) { - if (a[0]==b[0]) return 0; - if (a[0] 0 ) { - var q = list[i]; list[i] = list[i+1]; list[i+1] = q; - swap = true; - } - } // for - t--; - - if (!swap) break; - - for(var i = t; i > b; --i) { - if ( comp_func(list[i], list[i-1]) < 0 ) { - var q = list[i]; list[i] = list[i-1]; list[i-1] = q; - swap = true; - } - } // for - b++; - - } // while(swap) - } -} - -/* ****************************************************************** - Supporting functions: bundled here to avoid depending on a library - ****************************************************************** */ - -// Dean Edwards/Matthias Miller/John Resig - -/* for Mozilla/Opera9 */ -if (document.addEventListener) { - document.addEventListener("DOMContentLoaded", sorttable.init, false); -} - -/* for Internet Explorer */ -/*@cc_on @*/ -/*@if (@_win32) - document.write(" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - diff --git a/sources/html/popup.php b/sources/html/popup.php deleted file mode 100644 index 727efb7..0000000 --- a/sources/html/popup.php +++ /dev/null @@ -1,89 +0,0 @@ -'; -global $g_user; -if ( basename($_GET['ajax']) == 'ajax_history.php' ) - { - $href=dossier::get(); - $cn=new Database(dossier::id()); - /* current year */ - $g_user=new User($cn); - $exercice=$g_user->get_exercice(); - - /* get date limit */ - $periode=new Periode($cn); - $limit=$periode->get_limit($exercice); - - $from_periode='from_periode='.format_date($limit[0]->p_start); - $to_periode='to_periode='.format_date($limit[1]->p_end); - if (isset($_GET['ex'])) - { - if ( $exercice > $_GET['ex']) - { - $limit_periode=$periode->get_limit($_GET['ex']); - $from_periode='from_periode='.format_date($limit_periode[0]->p_start); - } - else - { - $limit_periode=$periode->get_limit($_GET['ex']); - $to_periode='to_periode='.format_date($limit_periode[1]->p_end); - - } - } - - if (isset($_GET['pcm_val']) ) - { - $href_csv="export.php?".$href.'&poste_id='.$_GET['pcm_val'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode."&act=CSV:postedetail"; - $href_pdf="export.php?".$href.'&poste_id='.$_GET['pcm_val'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode."&act=PDF:postedetail";; - } - else - { - $href_csv="export.php?".$href.'&f_id='.$_GET['f_id'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode."&act=CSV:fichedetail"; - $href_pdf="export.php?".$href.'&f_id='.$_GET['f_id'].'&ople=0&type=poste&'.$from_periode.'&'.$to_periode."&act=PDF:fichedetail"; - } - echo HtmlInput::print_window(); - echo ''._("Export CSV").''; - echo ''._("Export PDF").''; - } - else { - echo HtmlInput::print_window(); - } -echo '
    '; -echo HtmlInput::hidden('inpopup',1); -load_all_script(); - -$str=$_SERVER['QUERY_STRING']."&div=popup"; -$script=" - var obj={id:'popup',fixed:1,cssclass:'content',style:'width:auto',html:loading(),qs:'$str',js_success:'success_box',js_error:null,callback:'".$_GET['ajax']."'}; - show_box(obj); - "; -echo create_script($script); -?> diff --git a/sources/html/recherche.php b/sources/html/recherche.php deleted file mode 100644 index cd59fa2..0000000 --- a/sources/html/recherche.php +++ /dev/null @@ -1,117 +0,0 @@ -Check(); -$act=$g_user->check_dossier($gDossier); -// AC CODE = SEARCH -if ($act =='P') -{ - redirect("extension.php?".dossier::get(),0); - exit(); -} -if ( $act=='X') - { - alert(_('Accès interdit')); - exit(); - } -// display a search box - -$ledger=new Acc_Ledger($cn,0); -$ledger->type='ALL'; -$search_box=$ledger->search_form('ALL',1); -echo '
    '; - -echo '
    '; -echo $search_box; -echo HtmlInput::submit("viewsearch",_("Recherche")); -?> - - -'; - -//----------------------------------------------------- -// Display search result -//----------------------------------------------------- -if ( isset ($_GET['viewsearch'])) -{ - - // Navigation bar - $step=$_SESSION['g_pagesize']; - $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; - if (count ($_GET) == 0) - $array=null; - else - $array=$_GET; - $array['p_action']='ALL'; - list($sql,$where)=$ledger->build_search_sql($array); - // Count nb of line - $max_line=$cn->count_sql($sql); - - list($count,$a)=$ledger->list_operation($sql,$offset,0); - $bar=navigation_bar($offset,$max_line,$step,$page); - - echo $bar; - echo $a; - echo $bar; - /* - * Export to csv - */ - $r=HtmlInput::get_to_hidden(array('l','date_start','date_end','desc','amount_min','amount_max','qcode','accounting','unpaid','gDossier','ledger_type')); - if (isset($_GET['r_jrn'])) { - foreach ($_GET['r_jrn'] as $k=>$v) - $r.=HtmlInput::hidden('r_jrn['.$k.']',$v); - } - echo ''; - echo $r; - echo HtmlInput::hidden('act','CSV:histo'); - echo HtmlInput::submit('viewsearch',_('Export vers CSV')); - echo HtmlInput::hidden('p_action','ALL'); - ?> - - -'; -} -echo '
    '; -?> diff --git a/sources/html/securimage/AHGBold.ttf b/sources/html/securimage/AHGBold.ttf deleted file mode 100644 index 764b23d..0000000 Binary files a/sources/html/securimage/AHGBold.ttf and /dev/null differ diff --git a/sources/html/securimage/LICENSE.txt b/sources/html/securimage/LICENSE.txt deleted file mode 100644 index 9a749e6..0000000 --- a/sources/html/securimage/LICENSE.txt +++ /dev/null @@ -1,458 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS diff --git a/sources/html/securimage/README.FONT.txt b/sources/html/securimage/README.FONT.txt deleted file mode 100644 index d4770de..0000000 --- a/sources/html/securimage/README.FONT.txt +++ /dev/null @@ -1,12 +0,0 @@ -AHGBold.ttf is used by Securimage under the following license: - -Alte Haas Grotesk is a typeface that look like an helvetica printed in an old Muller-Brockmann Book. - -These fonts are freeware and can be distributed as long as they are -together with this text file. - -I would appreciate very much to see what you have done with it anyway. - -yann le coroller -www.yannlecoroller.com -yann@lecoroller.com \ No newline at end of file diff --git a/sources/html/securimage/README.txt b/sources/html/securimage/README.txt deleted file mode 100644 index b608018..0000000 --- a/sources/html/securimage/README.txt +++ /dev/null @@ -1,88 +0,0 @@ -NAME: - - Securimage - A PHP class for creating and managing form CAPTCHA images - -VERSION: 2.0 BETA - -AUTHOR: - - Drew Phillips - -DOWNLOAD: - - The latest version can always be - found at http://www.phpcaptcha.org - -DOCUMENTATION: - - Online documentation of the class, methods, and variables can - be found at http://www.phpcaptcha.org/Securimage_Docs/ - -REQUIREMENTS: - PHP 4.3.0 - GD 2.0 - FreeType (recommended, required for TTF support) - -SYNOPSIS: - - require_once 'securimage.php'; - - $image = new Securimage(); - - $image->show(); - - // Code Validation - - $image = new Securimage(); - if ($image->check($_POST['code']) == true) { - echo "Correct!"; - } else { - echo "Sorry, wrong code."; - } - -DESCRIPTION: - - What is Securimage? - - Securimage is a PHP class that is used to generate and validate CAPTCHA images. - The classes uses an existing PHP session or creates its own if none is found to store the - CAPTCHA code. Variables within the class are used to control the style and display of the image. - The class supports TTF fonts and effects for strengthening the security of the image. - If TTF support is not available, GD fonts can be used as well, but certain options such as - transparent text and angled letters cannot be used. - - -COPYRIGHT: - Copyright (c) 2009 Drew Phillips. All rights reserved. - This software is released under the GNU Lesser General Public License. - - ----------------------------------------------------------------------------- - Flash code created for Securimage by Douglas Walsh (www.douglaswalsh.net) - Many thanks for releasing this to the project! - - ------------------------------------------------------------------------------ - Portions of Securimage contain code from Han-Kwang Nienhuys' PHP captcha - - Han-Kwang Nienhuys' PHP captcha - Copyright June 2007 - - This copyright message and attribution must be preserved upon - modification. Redistribution under other licenses is expressly allowed. - Other licenses include GPL 2 or higher, BSD, and non-free licenses. - The original, unrestricted version can be obtained from - http://www.lagom.nl/linux/hkcaptcha/ - - ------------------------------------------------------------------------------- - AHGBold.ttf (AlteHaasGroteskBold.ttf) font was created by Yann Le Coroller and is distributed as freeware - - Alte Haas Grotesk is a typeface that look like an helvetica printed in an old Muller-Brockmann Book. - - These fonts are freeware and can be distributed as long as they are - together with this text file. - - I would appreciate very much to see what you have done with it anyway. - - yann le coroller - www.yannlecoroller.com - yann@lecoroller.com - diff --git a/sources/html/securimage/backgrounds/bg3.jpg b/sources/html/securimage/backgrounds/bg3.jpg deleted file mode 100644 index a2d62d6..0000000 Binary files a/sources/html/securimage/backgrounds/bg3.jpg and /dev/null differ diff --git a/sources/html/securimage/backgrounds/bg4.jpg b/sources/html/securimage/backgrounds/bg4.jpg deleted file mode 100644 index 37a22f8..0000000 Binary files a/sources/html/securimage/backgrounds/bg4.jpg and /dev/null differ diff --git a/sources/html/securimage/backgrounds/bg5.jpg b/sources/html/securimage/backgrounds/bg5.jpg deleted file mode 100644 index 0a04181..0000000 Binary files a/sources/html/securimage/backgrounds/bg5.jpg and /dev/null differ diff --git a/sources/html/securimage/backgrounds/bg6.png b/sources/html/securimage/backgrounds/bg6.png deleted file mode 100644 index 22f9d67..0000000 Binary files a/sources/html/securimage/backgrounds/bg6.png and /dev/null differ diff --git a/sources/html/securimage/backgrounds/bg7.jpg b/sources/html/securimage/backgrounds/bg7.jpg deleted file mode 100644 index f7535e2..0000000 Binary files a/sources/html/securimage/backgrounds/bg7.jpg and /dev/null differ diff --git a/sources/html/securimage/database/.htaccess b/sources/html/securimage/database/.htaccess deleted file mode 100644 index 8d2f256..0000000 --- a/sources/html/securimage/database/.htaccess +++ /dev/null @@ -1 +0,0 @@ -deny from all diff --git a/sources/html/securimage/database/index.html b/sources/html/securimage/database/index.html deleted file mode 100644 index 8d1c8b6..0000000 --- a/sources/html/securimage/database/index.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/sources/html/securimage/database/securimage.sqlite b/sources/html/securimage/database/securimage.sqlite deleted file mode 100644 index 10e233d..0000000 Binary files a/sources/html/securimage/database/securimage.sqlite and /dev/null differ diff --git a/sources/html/securimage/example_form.php b/sources/html/securimage/example_form.php deleted file mode 100644 index 952a24b..0000000 --- a/sources/html/securimage/example_form.php +++ /dev/null @@ -1,71 +0,0 @@ - - * File: securimage.php
    - * URL: www.phpcaptcha.org - */ - - -session_start(); // Start the session where the code will be stored. - -?> - - - Securimage Test Form - - - - - - -Username:
    -
    -Password:
    -

    - -
    - - - - - - - - - - - - -
    - - - Reload Image -
    -
    -Code:
    - - -

    - - - - -check($_POST['code']); - - if($valid == true) { - echo "
    Thanks, you entered the correct code.
    Click here to go back.
    "; - } else { - echo "
    Sorry, the code you entered was invalid. Go back to try again.
    "; - } -} - -?> - - - diff --git a/sources/html/securimage/gdfonts/automatic.gdf b/sources/html/securimage/gdfonts/automatic.gdf deleted file mode 100644 index 3eee706..0000000 Binary files a/sources/html/securimage/gdfonts/automatic.gdf and /dev/null differ diff --git a/sources/html/securimage/images/audio_icon.gif b/sources/html/securimage/images/audio_icon.gif deleted file mode 100644 index beafd51..0000000 Binary files a/sources/html/securimage/images/audio_icon.gif and /dev/null differ diff --git a/sources/html/securimage/images/refresh.gif b/sources/html/securimage/images/refresh.gif deleted file mode 100644 index a10b247..0000000 Binary files a/sources/html/securimage/images/refresh.gif and /dev/null differ diff --git a/sources/html/securimage/securimage.php b/sources/html/securimage/securimage.php deleted file mode 100644 index ebabab0..0000000 --- a/sources/html/securimage/securimage.php +++ /dev/null @@ -1,1584 +0,0 @@ - - * File: securimage.php
    - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version.

    - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details.

    - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

    - * - * Any modifications to the library should be indicated clearly in the source code - * to inform users that the changes are not a part of the original software.

    - * - * If you found this script useful, please take a quick moment to rate it.
    - * http://www.hotscripts.com/rate/49400.html Thanks. - * - * @link http://www.phpcaptcha.org Securimage PHP CAPTCHA - * @link http://www.phpcaptcha.org/latest.zip Download Latest Version - * @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation - * @copyright 2009 Drew Phillips - * @author Drew Phillips - * @version 2.0.1 BETA (December 6th, 2009) - * @package Securimage - * - */ - -/** - ChangeLog - - 2.0.1 - - Add support for browsers with cookies disabled (requires php5, sqlite) maps users to md5 hashed ip addresses and md5 hashed codes for security - - Add fallback to gd fonts if ttf support is not enabled or font file not found (Mike Challis http://www.642weather.com/weather/scripts.php) - - Check for previous definition of image type constants (Mike Challis) - - Fix mime type settings for audio output - - Fixed color allocation issues with multiple colors and background images, consolidate allocation to one function - - Ability to let codes expire after a given length of time - - Allow HTML color codes to be passed to Securimage_Color (suggested by Mike Challis) - - 2.0.0 - - Add mathematical distortion to characters (using code from HKCaptcha) - - Improved session support - - Added Securimage_Color class for easier color definitions - - Add distortion to audio output to prevent binary comparison attack (proposed by Sven "SavageTiger" Hagemann [insecurity.nl]) - - Flash button to stream mp3 audio (Douglas Walsh www.douglaswalsh.net) - - Audio output is mp3 format by default - - Change font to AlteHaasGrotesk by yann le coroller - - Some code cleanup - - 1.0.4 (unreleased) - - Ability to output audible codes in mp3 format to stream from flash - - 1.0.3.1 - - Error reading from wordlist in some cases caused words to be cut off 1 letter short - - 1.0.3 - - Removed shadow_text from code which could cause an undefined property error due to removal from previous version - - 1.0.2 - - Audible CAPTCHA Code wav files - - Create codes from a word list instead of random strings - - 1.0 - - Added the ability to use a selected character set, rather than a-z0-9 only. - - Added the multi-color text option to use different colors for each letter. - - Switched to automatic session handling instead of using files for code storage - - Added GD Font support if ttf support is not available. Can use internal GD fonts or load new ones. - - Added the ability to set line thickness - - Added option for drawing arced lines over letters - - Added ability to choose image type for output - - */ - -/** - * Output images in JPEG format - */ -if (!defined('SI_IMAGE_JPEG')) - define('SI_IMAGE_JPEG', 1); -/** - * Output images in PNG format - */ -if (!defined('SI_IMAGE_PNG')) - define('SI_IMAGE_PNG', 2); -/** - * Output images in GIF format (not recommended) - * Must have GD >= 2.0.28! - */ -if (!defined('SI_IMAGE_GIF')) - define('SI_IMAGE_GIF', 3); - -/** - * Securimage CAPTCHA Class. - * - * @package Securimage - * @subpackage classes - * - */ -class Securimage { - - /** - * The desired width of the CAPTCHA image. - * - * @var int - */ - var $image_width; - - /** - * The desired width of the CAPTCHA image. - * - * @var int - */ - var $image_height; - - /** - * The image format for output.
    - * Valid options: SI_IMAGE_PNG, SI_IMAGE_JPG, SI_IMAGE_GIF - * - * @var int - */ - var $image_type; - - /** - * The length of the code to generate. - * - * @var int - */ - var $code_length; - - /** - * The character set for individual characters in the image.
    - * Letters are converted to uppercase.
    - * The font must support the letters or there may be problematic substitutions. - * - * @var string - */ - var $charset; - - /** - * Create codes using this word list - * - * @var string The path to the word list to use for creating CAPTCHA codes - */ - var $wordlist_file; - - /** - * Use wordlist of not - * - * @var bool true to use wordlist file, false to use random code - */ - var $use_wordlist = false; - - /** - * Note: Use of GD fonts is not recommended as many distortion features are not available
    - * The GD font to use.
    - * Internal gd fonts can be loaded by their number.
    - * Alternatively, a file path can be given and the font will be loaded from file. - * - * @var mixed - */ - var $gd_font_file; - - /** - * The approximate size of the font in pixels.
    - * This does not control the size of the font because that is determined by the GD font itself.
    - * This is used to aid the calculations of positioning used by this class.
    - * - * @var int - */ - var $gd_font_size; - - /** - * Use a gd font instead of TTF - * - * @var bool true for gd font, false for TTF - */ - var $use_gd_font; - - // Note: These font options below do not apply if you set $use_gd_font to true with the exception of $text_color - - /** - * The path to the TTF font file to load. - * - * @var string - */ - var $ttf_file; - - /** - * How much to distort image, higher = more distortion.
    - * Distortion is only available when using TTF fonts.
    - * - * @var float - */ - var $perturbation; - - /** - * The minimum angle in degrees, with 0 degrees being left-to-right reading text.
    - * Higher values represent a counter-clockwise rotation.
    - * For example, a value of 90 would result in bottom-to-top reading text.
    - * This value along with maximum angle distance do not need to be very high with perturbation - * - * @var int - */ - var $text_angle_minimum; - - /** - * The minimum angle in degrees, with 0 degrees being left-to-right reading text.
    - * Higher values represent a counter-clockwise rotation.
    - * For example, a value of 90 would result in bottom-to-top reading text. - * - * @var int - */ - var $text_angle_maximum; - - /** - * The X-Position on the image where letter drawing will begin.
    - * This value is in pixels from the left side of the image. - * - * @var int - * @deprecated 2.0 - */ - var $text_x_start; - - /** - * The background color for the image as a Securimage_Color.
    - * - * @var Securimage_Color - */ - var $image_bg_color; - - /** - * Scan this directory for gif, jpg, and png files to use as background images.
    - * A random image file will be picked each time.
    - * Change from null to the full path to your directory.
    - * i.e. var $background_directory = $_SERVER['DOCUMENT_ROOT'] . '/securimage/backgrounds'; - * Make sure not to pass a background image to the show function, otherwise this directive is ignored. - * - * @var string - */ - var $background_directory = null; //'./backgrounds'; - - /** - * The text color to use for drawing characters as a Securimage_Color.
    - * This value is ignored if $use_multi_text is set to true.
    - * Make sure this contrasts well with the background color or image.
    - * - * @see Securimage::$use_multi_text - * @var Securimage_Color - */ - var $text_color; - - /** - * Set to true to use multiple colors for each character. - * - * @see Securimage::$multi_text_color - * @var boolean - */ - var $use_multi_text; - - /** - * Array of Securimage_Colors which will be randomly selected for each letter.
    - * - * @var array - */ - var $multi_text_color; - - /** - * Set to true to make the characters appear transparent. - * - * @see Securimage::$text_transparency_percentage - * @var boolean - */ - var $use_transparent_text; - - /** - * The percentage of transparency, 0 to 100.
    - * A value of 0 is completely opaque, 100 is completely transparent (invisble) - * - * @see Securimage::$use_transparent_text - * @var int - */ - var $text_transparency_percentage; - - - // Line options - /** - * Draw vertical and horizontal lines on the image. - * - * @see Securimage::$line_color - * @see Securimage::$draw_lines_over_text - * @var boolean - */ - var $num_lines; - - /** - * Color of lines drawn over text - * - * @var string - */ - var $line_color; - - /** - * Draw the lines over the text.
    - * If fales lines will be drawn before putting the text on the image. - * - * @var boolean - */ - var $draw_lines_over_text; - - /** - * Text to write at the bottom corner of captcha image - * - * @since 2.0 - * @var string Signature text - */ - var $image_signature; - - /** - * Color to use for writing signature text - * - * @since 2.0 - * @var Securimage_Color - */ - var $signature_color; - - /** - * Full path to the WAV files to use to make the audio files, include trailing /.
    - * Name Files [A-Z0-9].wav - * - * @since 1.0.1 - * @var string - */ - var $audio_path; - - /** - * Type of audio file to generate (mp3 or wav) - * - * @var string - */ - var $audio_format; - - /** - * The session name to use if not the default. Blank for none - * - * @see http://php.net/session_name - * @since 2.0 - * @var string - */ - var $session_name = ''; - - /** - * The amount of time in seconds that a code remains valid.
    - * Any code older than this number will be considered invalid even if entered correctly.
    - * Any non-numeric or value less than 1 disables this functionality. - * - * @var int - */ - var $expiry_time; - - /** - * Path to the file to use for storing codes for users.
    - * THIS FILE MUST ABSOLUTELY NOT BE ACCESSIBLE FROM A WEB BROWSER!!
    - * Put this file in a directory below the web root or one that is restricted (i.e. an apache .htaccess file with deny from all)
    - * If you cannot meet those requirements your forms may not be completely protected.
    - * You could obscure the database file name but this is also not recommended. - * - * @var string - */ - var $sqlite_database; - - /** - * Use an SQLite database for storing codes as a backup to sessions.
    - * Note: Sessions will still be used - */ - var $use_sqlite_db; - - - //END USER CONFIGURATION - //There should be no need to edit below unless you really know what you are doing. - - /** - * The gd image resource. - * - * @access private - * @var resource - */ - var $im; - - /** - * Temporary image for rendering - * - * @access private - * @var resource - */ - var $tmpimg; - - /** - * Internal scale factor for anti-alias @hkcaptcha - * - * @access private - * @since 2.0 - * @var int - */ - var $iscale; // internal scale factor for anti-alias @hkcaptcha - - /** - * The background image resource - * - * @access private - * @var resource - */ - var $bgimg; - - /** - * The code generated by the script - * - * @access private - * @var string - */ - var $code; - - /** - * The code that was entered by the user - * - * @access private - * @var string - */ - var $code_entered; - - /** - * Whether or not the correct code was entered - * - * @access private - * @var boolean - */ - var $correct_code; - - /** - * Handle to SQLite database - * - * @access private - * @var resource - */ - var $sqlite_handle; - - /** - * Color resource for image line color - * - * @access private - * @var int - */ - var $gdlinecolor; - - /** - * Array of colors for multi colored codes - * - * @access private - * @var array - */ - var $gdmulticolor; - - /** - * Color resource for image font color - * - * @access private - * @var int - */ - var $gdtextcolor; - - /** - * Color resource for image signature color - * - * @access private - * @var int - */ - var $gdsignaturecolor; - - /** - * Color resource for image background color - * - * @access private - * @var int - */ - var $gdbgcolor; - - - /** - * Class constructor.
    - * Because the class uses sessions, this will attempt to start a session if there is no previous one.
    - * If you do not start a session before calling the class, the constructor must be called before any - * output is sent to the browser. - * - * - * $securimage = new Securimage(); - * - * - */ - function Securimage() - { - // Initialize session or attach to existing - if ( session_id() == '' ) { // no session has been started yet, which is needed for validation - if (trim($this->session_name) != '') { - session_name($this->session_name); // set session name if provided - } - session_start(); - } - - // Set Default Values - $this->image_width = 230; - $this->image_height = 80; - $this->image_type = SI_IMAGE_PNG; - - $this->code_length = 6; - $this->charset = 'ABCDEFGHKLMNPRSTUVWYZabcdefghklmnprstuvwyz23456789'; - $this->wordlist_file = './words/words.txt'; - $this->use_wordlist = false; - - $this->gd_font_file = 'gdfonts/automatic.gdf'; - $this->use_gd_font = false; - $this->gd_font_size = 24; - $this->text_x_start = 15; - - $this->ttf_file = './AHGBold.ttf'; - - $this->perturbation = 0.75; - $this->iscale = 5; - $this->text_angle_minimum = 0; - $this->text_angle_maximum = 0; - - $this->image_bg_color = new Securimage_Color(0xff, 0xff, 0xff); - $this->text_color = new Securimage_Color(0x3d, 0x3d, 0x3d); - $this->multi_text_color = array(new Securimage_Color(0x0, 0x20, 0xCC), - new Securimage_Color(0x0, 0x30, 0xEE), - new Securimage_color(0x0, 0x40, 0xCC), - new Securimage_Color(0x0, 0x50, 0xEE), - new Securimage_Color(0x0, 0x60, 0xCC)); - $this->use_multi_text = false; - - $this->use_transparent_text = false; - $this->text_transparency_percentage = 30; - - $this->num_lines = 10; - $this->line_color = new Securimage_Color(0x3d, 0x3d, 0x3d); - $this->draw_lines_over_text = true; - - $this->image_signature = ''; - $this->signature_color = new Securimage_Color(0x20, 0x50, 0xCC); - $this->signature_font = './AHGBold.ttf'; - - $this->audio_path = './audio/'; - $this->audio_format = 'mp3'; - $this->session_name = ''; - $this->expiry_time = 900; - - $this->sqlite_database = 'database/securimage.sqlite'; - $this->use_sqlite_db = false; - - $this->sqlite_handle = false; - } - - /** - * Generate a code and output the image to the browser. - * - * - * show('bg.jpg'); - * ?> - * - * - * @param string $background_image The path to an image to use as the background for the CAPTCHA - */ - function show($background_image = "") - { - if($background_image != "" && is_readable($background_image)) { - $this->bgimg = $background_image; - } - - $this->doImage(); - } - - /** - * Validate the code entered by the user. - * - * - * $code = $_POST['code']; - * if ($securimage->check($code) == false) { - * die("Sorry, the code entered did not match."); - * } else { - * $valid = true; - * } - * - * @param string $code The code the user entered - * @return boolean true if the code was correct, false if not - */ - function check($code) - { - $this->code_entered = $code; - $this->validate(); - return $this->correct_code; - } - - /** - * Output audio file with HTTP headers to browser - * - * - * $sound = new Securimage(); - * $sound->audio_format = 'mp3'; - * $sound->outputAudioFile(); - * - * - * @since 2.0 - */ - function outputAudioFile() - { - if (strtolower($this->audio_format) == 'wav') { - header('Content-type: audio/x-wav'); - $ext = 'wav'; - } else { - header('Content-type: audio/mpeg'); // default to mp3 - $ext = 'mp3'; - } - - header("Content-Disposition: attachment; filename=\"securimage_audio.{$ext}\""); - header('Cache-Control: no-store, no-cache, must-revalidate'); - header('Expires: Sun, 1 Jan 2000 12:00:00 GMT'); - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . 'GMT'); - - $audio = $this->getAudibleCode($ext); - - header('Content-Length: ' . strlen($audio)); - - echo $audio; - exit; - } - - /** - * Generate and output the image - * - * @access private - * - */ - function doImage() - { - if ($this->use_gd_font == true) { - $this->iscale = 1; - } - if($this->use_transparent_text == true || $this->bgimg != "") { - $this->im = imagecreatetruecolor($this->image_width, $this->image_height); - $this->tmpimg = imagecreatetruecolor($this->image_width * $this->iscale, $this->image_height * $this->iscale); - - } else { //no transparency - $this->im = imagecreate($this->image_width, $this->image_height); - $this->tmpimg = imagecreate($this->image_width * $this->iscale, $this->image_height * $this->iscale); - } - - $this->allocateColors(); - imagepalettecopy($this->tmpimg, $this->im); - - $this->setBackground(); - - $this->createCode(); - - if (!$this->draw_lines_over_text && $this->num_lines > 0) $this->drawLines(); - - $this->drawWord(); - if ($this->use_gd_font == false && is_readable($this->ttf_file)) $this->distortedCopy(); - - if ($this->draw_lines_over_text && $this->num_lines > 0) $this->drawLines(); - - if (trim($this->image_signature) != '') $this->addSignature(); - - $this->output(); - - } - - /** - * Allocate all colors that will be used in the CAPTCHA image - * - * @since 2.0.1 - * @access private - */ - function allocateColors() - { - // allocate bg color first for imagecreate - $this->gdbgcolor = imagecolorallocate($this->im, $this->image_bg_color->r, $this->image_bg_color->g, $this->image_bg_color->b); - - $alpha = intval($this->text_transparency_percentage / 100 * 127); - - if ($this->use_transparent_text == true) { - $this->gdtextcolor = imagecolorallocatealpha($this->im, $this->text_color->r, $this->text_color->g, $this->text_color->b, $alpha); - $this->gdlinecolor = imagecolorallocatealpha($this->im, $this->line_color->r, $this->line_color->g, $this->line_color->b, $alpha); - } else { - $this->gdtextcolor = imagecolorallocate($this->im, $this->text_color->r, $this->text_color->g, $this->text_color->b); - $this->gdlinecolor = imagecolorallocate($this->im, $this->line_color->r, $this->line_color->g, $this->line_color->b); - } - - $this->gdsignaturecolor = imagecolorallocate($this->im, $this->signature_color->r, $this->signature_color->g, $this->signature_color->b); - - if ($this->use_multi_text == true) { - $this->gdmulticolor = array(); - - foreach($this->multi_text_color as $color) { - if ($this->use_transparent_text == true) { - $this->gdmulticolor[] = imagecolorallocatealpha($this->im, $color->r, $color->g, $color->b, $alpha); - } else { - $this->gdmulticolor[] = imagecolorallocate($this->im, $color->r, $color->g, $color->b); - } - } - } - } - - /** - * Set the background of the CAPTCHA image - * - * @access private - * - */ - function setBackground() - { - imagefilledrectangle($this->im, 0, 0, $this->image_width * $this->iscale, $this->image_height * $this->iscale, $this->gdbgcolor); - imagefilledrectangle($this->tmpimg, 0, 0, $this->image_width * $this->iscale, $this->image_height * $this->iscale, $this->gdbgcolor); - - if ($this->bgimg == '') { - if ($this->background_directory != null && is_dir($this->background_directory) && is_readable($this->background_directory)) { - $img = $this->getBackgroundFromDirectory(); - if ($img != false) { - $this->bgimg = $img; - } - } - } - - $dat = @getimagesize($this->bgimg); - if($dat == false) { - return; - } - - switch($dat[2]) { - case 1: $newim = @imagecreatefromgif($this->bgimg); break; - case 2: $newim = @imagecreatefromjpeg($this->bgimg); break; - case 3: $newim = @imagecreatefrompng($this->bgimg); break; - case 15: $newim = @imagecreatefromwbmp($this->bgimg); break; - case 16: $newim = @imagecreatefromxbm($this->bgimg); break; - default: return; - } - - if(!$newim) return; - - imagecopyresized($this->im, $newim, 0, 0, 0, 0, $this->image_width, $this->image_height, imagesx($newim), imagesy($newim)); - } - - /** - * Return the full path to a random gif, jpg, or png from the background directory. - * - * @access private - * @see Securimage::$background_directory - * @return mixed false if none found, string $path if found - */ - function getBackgroundFromDirectory() - { - $images = array(); - - if ($dh = opendir($this->background_directory)) { - while (($file = readdir($dh)) !== false) { - if (preg_match('/(jpg|gif|png)$/i', $file)) $images[] = $file; - } - - closedir($dh); - - if (sizeof($images) > 0) { - return rtrim($this->background_directory, '/') . '/' . $images[rand(0, sizeof($images)-1)]; - } - } - - return false; - } - - /** - * Draw random curvy lines over the image
    - * Modified code from HKCaptcha - * - * @since 2.0 - * @access private - * - */ - function drawLines() - { - for ($line = 0; $line < $this->num_lines; ++$line) { - $x = $this->image_width * (1 + $line) / ($this->num_lines + 1); - $x += (0.5 - $this->frand()) * $this->image_width / $this->num_lines; - $y = rand($this->image_height * 0.1, $this->image_height * 0.9); - - $theta = ($this->frand()-0.5) * M_PI * 0.7; - $w = $this->image_width; - $len = rand($w * 0.4, $w * 0.7); - $lwid = rand(0, 2); - - $k = $this->frand() * 0.6 + 0.2; - $k = $k * $k * 0.5; - $phi = $this->frand() * 6.28; - $step = 0.5; - $dx = $step * cos($theta); - $dy = $step * sin($theta); - $n = $len / $step; - $amp = 1.5 * $this->frand() / ($k + 5.0 / $len); - $x0 = $x - 0.5 * $len * cos($theta); - $y0 = $y - 0.5 * $len * sin($theta); - - $ldx = round(-$dy * $lwid); - $ldy = round($dx * $lwid); - - for ($i = 0; $i < $n; ++$i) { - $x = $x0 + $i * $dx + $amp * $dy * sin($k * $i * $step + $phi); - $y = $y0 + $i * $dy - $amp * $dx * sin($k * $i * $step + $phi); - imagefilledrectangle($this->im, $x, $y, $x + $lwid, $y + $lwid, $this->gdlinecolor); - } - } - } - - /** - * Draw the CAPTCHA code over the image - * - * @access private - * - */ - function drawWord() - { - $width2 = $this->image_width * $this->iscale; - $height2 = $this->image_height * $this->iscale; - - if ($this->use_gd_font == true || !is_readable($this->ttf_file)) { - if (!is_int($this->gd_font_file)) { //is a file name - $font = @imageloadfont($this->gd_font_file); - if ($font == false) { - trigger_error("Failed to load GD Font file {$this->gd_font_file} ", E_USER_WARNING); - return; - } - } else { //gd font identifier - $font = $this->gd_font_file; - } - - imagestring($this->im, $font, $this->text_x_start, ($this->image_height / 2) - ($this->gd_font_size / 2), $this->code, $this->gdtextcolor); - } else { //ttf font - $font_size = $height2 * .35; - $bb = imagettfbbox($font_size, 0, $this->ttf_file, $this->code); - $tx = $bb[4] - $bb[0]; - $ty = $bb[5] - $bb[1]; - $x = floor($width2 / 2 - $tx / 2 - $bb[0]); - $y = round($height2 / 2 - $ty / 2 - $bb[1]); - - $strlen = strlen($this->code); - if (!is_array($this->multi_text_color)) $this->use_multi_text = false; - - - if ($this->use_multi_text == false && $this->text_angle_minimum == 0 && $this->text_angle_maximum == 0) { // no angled or multi-color characters - imagettftext($this->tmpimg, $font_size, 0, $x, $y, $this->gdtextcolor, $this->ttf_file, $this->code); - } else { - for($i = 0; $i < $strlen; ++$i) { - $angle = rand($this->text_angle_minimum, $this->text_angle_maximum); - $y = rand($y - 5, $y + 5); - if ($this->use_multi_text == true) { - $font_color = $this->gdmulticolor[rand(0, sizeof($this->gdmulticolor) - 1)]; - } else { - $font_color = $this->gdtextcolor; - } - - $ch = $this->code{$i}; - - imagettftext($this->tmpimg, $font_size, $angle, $x, $y, $font_color, $this->ttf_file, $ch); - - // estimate character widths to increment $x without creating spaces that are too large or too small - // these are best estimates to align text but may vary between fonts - // for optimal character widths, do not use multiple text colors or character angles and the complete string will be written by imagettftext - if (strpos('abcdeghknopqsuvxyz', $ch) !== false) { - $min_x = $font_size - ($this->iscale * 6); - $max_x = $font_size - ($this->iscale * 6); - } else if (strpos('ilI1', $ch) !== false) { - $min_x = $font_size / 5; - $max_x = $font_size / 3; - } else if (strpos('fjrt', $ch) !== false) { - $min_x = $font_size - ($this->iscale * 12); - $max_x = $font_size - ($this->iscale * 12); - } else if ($ch == 'wm') { - $min_x = $font_size; - $max_x = $font_size + ($this->iscale * 3); - } else { // numbers, capitals or unicode - $min_x = $font_size + ($this->iscale * 2); - $max_x = $font_size + ($this->iscale * 5); - } - - $x += rand($min_x, $max_x); - } //for loop - } // angled or multi-color - } //else ttf font - //$this->im = $this->tmpimg; - //$this->output(); - } //function - - /** - * Warp text from temporary image onto final image.
    - * Modified for securimage - * - * @access private - * @since 2.0 - * @author Han-Kwang Nienhuys modified - * @copyright Han-Kwang Neinhuys - * - */ - function distortedCopy() - { - $numpoles = 3; // distortion factor - - // make array of poles AKA attractor points - for ($i = 0; $i < $numpoles; ++$i) { - $px[$i] = rand($this->image_width * 0.3, $this->image_width * 0.7); - $py[$i] = rand($this->image_height * 0.3, $this->image_height * 0.7); - $rad[$i] = rand($this->image_width * 0.4, $this->image_width * 0.7); - $tmp = -$this->frand() * 0.15 - 0.15; - $amp[$i] = $this->perturbation * $tmp; - } - - $bgCol = imagecolorat($this->tmpimg, 0, 0); - $width2 = $this->iscale * $this->image_width; - $height2 = $this->iscale * $this->image_height; - - imagepalettecopy($this->im, $this->tmpimg); // copy palette to final image so text colors come across - - // loop over $img pixels, take pixels from $tmpimg with distortion field - for ($ix = 0; $ix < $this->image_width; ++$ix) { - for ($iy = 0; $iy < $this->image_height; ++$iy) { - $x = $ix; - $y = $iy; - - for ($i = 0; $i < $numpoles; ++$i) { - $dx = $ix - $px[$i]; - $dy = $iy - $py[$i]; - if ($dx == 0 && $dy == 0) continue; - - $r = sqrt($dx * $dx + $dy * $dy); - if ($r > $rad[$i]) continue; - - $rscale = $amp[$i] * sin(3.14 * $r / $rad[$i]); - $x += $dx * $rscale; - $y += $dy * $rscale; - } - - $c = $bgCol; - $x *= $this->iscale; - $y *= $this->iscale; - - if ($x >= 0 && $x < $width2 && $y >= 0 && $y < $height2) { - $c = imagecolorat($this->tmpimg, $x, $y); - } - - if ($c != $bgCol) { // only copy pixels of letters to preserve any background image - imagesetpixel($this->im, $ix, $iy, $c); - } - } - } - } - - /** - * Create a code and save to the session - * - * @access private - * @since 1.0.1 - * - */ - function createCode() - { - $this->code = false; - - if ($this->use_wordlist && is_readable($this->wordlist_file)) { - $this->code = $this->readCodeFromFile(); - } - - if ($this->code == false) { - $this->code = $this->generateCode($this->code_length); - } - - $this->saveData(); - } - - /** - * Generate a code - * - * @access private - * @param int $len The code length - * @return string - */ - function generateCode($len) - { - $code = ''; - - for($i = 1, $cslen = strlen($this->charset); $i <= $len; ++$i) { - $code .= $this->charset{rand(0, $cslen - 1)}; - } - return $code; - } - - /** - * Reads a word list file to get a code - * - * @access private - * @since 1.0.2 - * @return mixed false on failure, a word on success - */ - function readCodeFromFile() - { - $fp = @fopen($this->wordlist_file, 'rb'); - if (!$fp) return false; - - $fsize = filesize($this->wordlist_file); - if ($fsize < 32) return false; // too small of a list to be effective - - if ($fsize < 128) { - $max = $fsize; // still pretty small but changes the range of seeking - } else { - $max = 128; - } - - fseek($fp, rand(0, $fsize - $max), SEEK_SET); - $data = fread($fp, 128); // read a random 128 bytes from file - fclose($fp); - $data = preg_replace("/\r?\n/", "\n", $data); - - $start = strpos($data, "\n", rand(0, 100)) + 1; // random start position - $end = strpos($data, "\n", $start); // find end of word - - return strtolower(substr($data, $start, $end - $start)); // return substring in 128 bytes - } - - /** - * Output image to the browser - * - * @access private - * - */ - function output() - { - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); - header("Cache-Control: no-store, no-cache, must-revalidate"); - header("Cache-Control: post-check=0, pre-check=0", false); - header("Pragma: no-cache"); - - switch($this->image_type) - { - case SI_IMAGE_JPEG: - header("Content-Type: image/jpeg"); - imagejpeg($this->im, null, 90); - break; - - case SI_IMAGE_GIF: - header("Content-Type: image/gif"); - imagegif($this->im); - break; - - default: - header("Content-Type: image/png"); - imagepng($this->im); - break; - } - - imagedestroy($this->im); - exit; - } - - /** - * Get WAV or MP3 file data of the spoken code.
    - * This is appropriate for output to the browser as audio/x-wav or audio/mpeg - * - * @since 1.0.1 - * @return string WAV or MP3 data - * - */ - function getAudibleCode($format = 'wav') - { - $letters = array(); - $code = $this->getCode(); - - if ($code == '') { - $this->createCode(); - $code = $this->getCode(); - } - - for($i = 0; $i < strlen($code); ++$i) { - $letters[] = $code{$i}; - } - - if ($format == 'mp3') { - return $this->generateMP3($letters); - } else { - return $this->generateWAV($letters); - } - } - - /** - * Set the path to the audio directory.
    - * - * @since 1.0.4 - * @return bool true if the directory exists and is readble, false if not - */ - function setAudioPath($audio_directory) - { - if (is_dir($audio_directory) && is_readable($audio_directory)) { - $this->audio_path = $audio_directory; - return true; - } else { - return false; - } - } - - /** - * Save the code in the session - * - * @access private - * - */ - function saveData() - { - $_SESSION['securimage_code_value'] = strtolower($this->code); - $_SESSION['securimage_code_ctime'] = time(); - - $this->saveCodeToDatabase(); - } - - /** - * Validate the code to the user code - * - * @access private - * - */ - function validate() - { - // retrieve code from session, if no code exists check sqlite database if supported. - - if (isset($_SESSION['securimage_code_value']) && trim($_SESSION['securimage_code_value']) != '') { - if ($this->isCodeExpired($_SESSION['securimage_code_ctime']) == false) { - $code = $_SESSION['securimage_code_value']; - } - } else if ($this->use_sqlite_db == true && function_exists('sqlite_open')) { // no code in session - may mean user has cookies turned off - $this->openDatabase(); - $code = $this->getCodeFromDatabase(); - } else { - // session code invalid or non-existant and code not found in sqlite db or sqlite is not available - $code = ''; - } - - $code = trim(strtolower($code)); - $code_entered = trim(strtolower($this->code_entered)); - $this->correct_code = false; - - if ($code != '') { - if ($code == $code_entered) { - $this->correct_code = true; - $_SESSION['securimage_code_value'] = ''; - $_SESSION['securimage_code_ctime'] = ''; - $this->clearCodeFromDatabase(); - } - } - } - - /** - * Get the captcha code - * - * @since 1.0.1 - * @return string - */ - function getCode() - { - if (isset($_SESSION['securimage_code_value']) && !empty($_SESSION['securimage_code_value'])) { - return strtolower($_SESSION['securimage_code_value']); - } else { - if ($this->sqlite_handle == false) $this->openDatabase(); - - return $this->getCodeFromDatabase(); // attempt to get from database, returns empty string if sqlite is not available or disabled - } - } - - /** - * Check if the user entered code was correct - * - * @access private - * @return boolean - */ - function checkCode() - { - return $this->correct_code; - } - - /** - * Generate a wav file by concatenating individual files - * - * @since 1.0.1 - * @access private - * @param array $letters Array of letters to build a file from - * @return string WAV file data - */ - function generateWAV($letters) - { - $data_len = 0; - $files = array(); - $out_data = ''; - - foreach ($letters as $letter) { - $filename = $this->audio_path . strtoupper($letter) . '.wav'; - - $fp = fopen($filename, 'rb'); - - $file = array(); - - $data = fread($fp, filesize($filename)); // read file in - - $header = substr($data, 0, 36); - $body = substr($data, 44); - - - $data = unpack('NChunkID/VChunkSize/NFormat/NSubChunk1ID/VSubChunk1Size/vAudioFormat/vNumChannels/VSampleRate/VByteRate/vBlockAlign/vBitsPerSample', $header); - - $file['sub_chunk1_id'] = $data['SubChunk1ID']; - $file['bits_per_sample'] = $data['BitsPerSample']; - $file['channels'] = $data['NumChannels']; - $file['format'] = $data['AudioFormat']; - $file['sample_rate'] = $data['SampleRate']; - $file['size'] = $data['ChunkSize'] + 8; - $file['data'] = $body; - - if ( ($p = strpos($file['data'], 'LIST')) !== false) { - // If the LIST data is not at the end of the file, this will probably break your sound file - $info = substr($file['data'], $p + 4, 8); - $data = unpack('Vlength/Vjunk', $info); - $file['data'] = substr($file['data'], 0, $p); - $file['size'] = $file['size'] - (strlen($file['data']) - $p); - } - - $files[] = $file; - $data = null; - $header = null; - $body = null; - - $data_len += strlen($file['data']); - - fclose($fp); - } - - $out_data = ''; - for($i = 0; $i < sizeof($files); ++$i) { - if ($i == 0) { // output header - $out_data .= pack('C4VC8', ord('R'), ord('I'), ord('F'), ord('F'), $data_len + 36, ord('W'), ord('A'), ord('V'), ord('E'), ord('f'), ord('m'), ord('t'), ord(' ')); - - $out_data .= pack('VvvVVvv', - 16, - $files[$i]['format'], - $files[$i]['channels'], - $files[$i]['sample_rate'], - $files[$i]['sample_rate'] * (($files[$i]['bits_per_sample'] * $files[$i]['channels']) / 8), - ($files[$i]['bits_per_sample'] * $files[$i]['channels']) / 8, - $files[$i]['bits_per_sample'] ); - - $out_data .= pack('C4', ord('d'), ord('a'), ord('t'), ord('a')); - - $out_data .= pack('V', $data_len); - } - - $out_data .= $files[$i]['data']; - } - - $this->scrambleAudioData($out_data, 'wav'); - return $out_data; - } - - /** - * Randomly modify the audio data to scramble sound and prevent binary recognition.
    - * Take care not to "break" the audio file by leaving the header data intact. - * - * @since 2.0 - * @access private - * @param $data Sound data in mp3 of wav format - */ - function scrambleAudioData(&$data, $format) - { - if ($format == 'wav') { - $start = strpos($data, 'data') + 4; // look for "data" indicator - if ($start === false) $start = 44; // if not found assume 44 byte header - } else { // mp3 - $start = 4; // 4 byte (32 bit) frame header - } - - $start += rand(1, 64); // randomize starting offset - $datalen = strlen($data) - $start - 256; // leave last 256 bytes unchanged - - for ($i = $start; $i < $datalen; $i += 64) { - $ch = ord($data{$i}); - if ($ch < 9 || $ch > 119) continue; - - $data{$i} = chr($ch + rand(-8, 8)); - } - } - - /** - * Generate an mp3 file by concatenating individual files - * @since 1.0.4 - * @access private - * @param array $letters Array of letters to build a file from - * @return string MP3 file data - */ - function generateMP3($letters) - { - $data_len = 0; - $files = array(); - $out_data = ''; - - foreach ($letters as $letter) { - $filename = $this->audio_path . strtoupper($letter) . '.mp3'; - - $fp = fopen($filename, 'rb'); - $data = fread($fp, filesize($filename)); // read file in - - $this->scrambleAudioData($data, 'mp3'); - $out_data .= $data; - - fclose($fp); - } - - - return $out_data; - } - - /** - * Generate random number less than 1 - * @since 2.0 - * @access private - * @return float - */ - function frand() - { - return 0.0001*rand(0,9999); - } - - /** - * Print signature text on image - * - * @since 2.0 - * @access private - * - */ - function addSignature() - { - if ($this->use_gd_font) { - imagestring($this->im, 5, $this->image_width - (strlen($this->image_signature) * 10), $this->image_height - 20, $this->image_signature, $this->gdsignaturecolor); - } else { - - $bbox = imagettfbbox(10, 0, $this->signature_font, $this->image_signature); - $textlen = $bbox[2] - $bbox[0]; - $x = $this->image_width - $textlen - 5; - $y = $this->image_height - 3; - - imagettftext($this->im, 10, 0, $x, $y, $this->gdsignaturecolor, $this->signature_font, $this->image_signature); - } - } - - /** - * Get hashed IP address of remote user - * - * @access private - * @since 2.0.1 - * @return string - */ - function getIPHash() - { - return strtolower(md5($_SERVER['REMOTE_ADDR'])); - } - - /** - * Open SQLite database - * - * @access private - * @since 2.0.1 - * @return bool true if database was opened successfully - */ - function openDatabase() - { - $this->sqlite_handle = false; - - if ($this->use_sqlite_db && function_exists('sqlite_open')) { - $this->sqlite_handle = sqlite_open($this->sqlite_database, 0666, $error); - - if ($this->sqlite_handle !== false) { - $res = sqlite_query($this->sqlite_handle, "PRAGMA table_info(codes)"); - if (sqlite_num_rows($res) == 0) { - sqlite_query($this->sqlite_handle, "CREATE TABLE codes (iphash VARCHAR(32) PRIMARY KEY, code VARCHAR(32) NOT NULL, created INTEGER)"); - } - } - - return $this->sqlite_handle != false; - } - - return $this->sqlite_handle; - } - - /** - * Save captcha code to sqlite database - * - * @access private - * @since 2.0.1 - * @return bool true if code was saved, false if not - */ - function saveCodeToDatabase() - { - $success = false; - - $this->openDatabase(); - - if ($this->use_sqlite_db && $this->sqlite_handle !== false) { - $ip = $this->getIPHash(); - $time = time(); - $code = $_SESSION['securimage_code_value']; // hash code for security - if cookies are disabled the session still exists at this point - $success = sqlite_query($this->sqlite_handle, "INSERT OR REPLACE INTO codes(iphash, code, created) VALUES('$ip', '$code', $time)"); - } - - return $success !== false; - } - - /** - * Get stored captcha code from sqlite database based on ip address hash - * - * @access private - * @since 2.0.1 - * @return string captcha code - */ - function getCodeFromDatabase() - { - $code = ''; - - if ($this->use_sqlite_db && $this->sqlite_handle !== false) { - $ip = $this->getIPHash(); - - $res = sqlite_query($this->sqlite_handle, "SELECT * FROM codes WHERE iphash = '$ip'"); - if ($res && sqlite_num_rows($res) > 0) { - $res = sqlite_fetch_array($res); - - if ($this->isCodeExpired($res['created']) == false) { - $code = $res['code']; - } - } - } - - return $code; - } - - /** - * Delete a code from the database by ip address hash - * - * @access private - * @since 2.0.1 - */ - function clearCodeFromDatabase() - { - if ($this->sqlite_handle !== false) { - $ip = $this->getIPHash(); - - sqlite_query($this->sqlite_handle, "DELETE FROM codes WHERE iphash = '$ip'"); - } - } - - /** - * Purge codes over a day old from database - * - * @access private - * @since 2.0.1 - */ - function purgeOldCodesFromDatabase() - { - if ($this->use_sqlite_db && $this->sqlite_handle !== false) { - $now = time(); - $limit = (!is_numeric($this->expiry_time) || $this->expiry_time < 1) ? 86400 : $this->expiry_time; - - sqlite_query($this->sqlite_handle, "DELETE FROM codes WHERE $now - created > $limit"); - } - } - - /** - * Check a code to see if it is expired based on creation time - * - * @access private - * @since 2.0.1 - * @param $creation_time unix timestamp of code creation time - * @return bool true if code has expired, false if not - */ - function isCodeExpired($creation_time) - { - $expired = true; - - if (!is_numeric($this->expiry_time) || $this->expiry_time < 1) { - $expired = false; - } else if (time() - $creation_time < $this->expiry_time) { - $expired = false; - } - - return $expired; - } - -} /* class Securimage */ - - -/** - * Color object for Securimage CAPTCHA - * - * @since 2.0 - * @package Securimage - * @subpackage classes - * - */ -class Securimage_Color { - /** - * Red component: 0-255 - * - * @var int - */ - var $r; - /** - * Green component: 0-255 - * - * @var int - */ - var $g; - /** - * Blue component: 0-255 - * - * @var int - */ - var $b; - - /** - * Create a new Securimage_Color object.
    - * Specify the red, green, and blue components using their HTML hex code equivalent.
    - * Example: The code for the HTML color #4A203C is:
    - * $color = new Securimage_Color(0x4A, 0x20, 0x3C); - * - * @param $red Red component 0-255 - * @param $green Green component 0-255 - * @param $blue Blue component 0-255 - */ - function Securimage_Color($red, $green = null, $blue = null) - { - if ($green == null && $blue == null && preg_match('/^#[a-f0-9]{3,6}$/i', $red)) { - $col = substr($red, 1); - if (strlen($col) == 3) { - $red = str_repeat(substr($col, 0, 1), 2); - $green = str_repeat(substr($col, 1, 1), 2); - $blue = str_repeat(substr($col, 2, 1), 2); - } else { - $red = substr($col, 0, 2); - $green = substr($col, 2, 2); - $blue = substr($col, 4, 2); - } - - $red = hexdec($red); - $green = hexdec($green); - $blue = hexdec($blue); - } else { - if ($red < 0) $red = 0; - if ($red > 255) $red = 255; - if ($green < 0) $green = 0; - if ($green > 255) $green = 255; - if ($blue < 0) $blue = 0; - if ($blue > 255) $blue = 255; - } - - $this->r = $red; - $this->g = $green; - $this->b = $blue; - } -} diff --git a/sources/html/securimage/securimage_play.php b/sources/html/securimage/securimage_play.php deleted file mode 100644 index 1f369bc..0000000 --- a/sources/html/securimage/securimage_play.php +++ /dev/null @@ -1,43 +0,0 @@ - - * File: securimage_play.php
    - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version.

    - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details.

    - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

    - * - * Any modifications to the library should be indicated clearly in the source code - * to inform users that the changes are not a part of the original software.

    - * - * If you found this script useful, please take a quick moment to rate it.
    - * http://www.hotscripts.com/rate/49400.html Thanks. - * - * @link http://www.phpcaptcha.org Securimage PHP CAPTCHA - * @link http://www.phpcaptcha.org/latest.zip Download Latest Version - * @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation - * @copyright 2009 Drew Phillips - * @author drew010 - * @version 2.0.1 BETA (December 6th, 2009) - * @package Securimage - * - */ - -include 'securimage.php'; - -$img = new Securimage(); -$img->audio_format = (isset($_GET['format']) && in_array(strtolower($_GET['format']), array('mp3', 'wav')) ? strtolower($_GET['format']) : 'mp3'); -//$img->setAudioPath('/path/to/securimage/audio/'); - -$img->outputAudioFile(); diff --git a/sources/html/securimage/securimage_play.swf b/sources/html/securimage/securimage_play.swf deleted file mode 100644 index d1718b7..0000000 Binary files a/sources/html/securimage/securimage_play.swf and /dev/null differ diff --git a/sources/html/securimage/securimage_show.php b/sources/html/securimage/securimage_show.php deleted file mode 100644 index 00230a0..0000000 --- a/sources/html/securimage/securimage_show.php +++ /dev/null @@ -1,57 +0,0 @@ - - * File: securimage_show.php
    - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version.

    - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details.

    - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

    - * - * Any modifications to the library should be indicated clearly in the source code - * to inform users that the changes are not a part of the original software.

    - * - * If you found this script useful, please take a quick moment to rate it.
    - * http://www.hotscripts.com/rate/49400.html Thanks. - * - * @link http://www.phpcaptcha.org Securimage PHP CAPTCHA - * @link http://www.phpcaptcha.org/latest.zip Download Latest Version - * @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation - * @copyright 2009 Drew Phillips - * @author drew010 - * @version 2.0.1 BETA (December 6th, 2009) - * @package Securimage - * - */ - -include 'securimage.php'; - -$img = new securimage(); - -// Change some settings - -$img->image_width = 205; -$img->image_height = 50; -$img->perturbation = 0.35; // 1.0 = high distortion, higher numbers = more distortion -$img->image_bg_color = new Securimage_Color("#000000"); -//$img->text_color = new Securimage_Color("#EAEAEA"); -$img->text_transparency_percentage = 45; // 100 = completely transparent -$img->num_lines = 0; -$img->line_color = new Securimage_Color("#0033ff"); -$img->signature_color = new Securimage_Color(rand(0, 64), rand(64, 128), rand(128, 255)); -$img->image_type = SI_IMAGE_JPEG; -$img->background_directory="./backgrounds"; -$img->bgimg="./backgrounds/bg4.jpg"; -$img->use_multi_text=true; - -$img->show(); // alternate use: $img->show('/path/to/background_image.jpg'); diff --git a/sources/html/securimage/securimage_show_example.php b/sources/html/securimage/securimage_show_example.php deleted file mode 100644 index 1d34753..0000000 --- a/sources/html/securimage/securimage_show_example.php +++ /dev/null @@ -1,64 +0,0 @@ - - * File: securimage_show_example.php
    - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version.

    - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details.

    - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

    - * - * Any modifications to the library should be indicated clearly in the source code - * to inform users that the changes are not a part of the original software.

    - * - * If you found this script useful, please take a quick moment to rate it.
    - * http://www.hotscripts.com/rate/49400.html Thanks. - * - * @link http://www.phpcaptcha.org Securimage PHP CAPTCHA - * @link http://www.phpcaptcha.org/latest.zip Download Latest Version - * @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation - * @copyright 2009 Drew Phillips - * @author Drew Phillips - * @version 2.0.1 BETA (December 6th, 2009) - * @package Securimage - * - */ - -include 'securimage.php'; - -$img = new securimage(); - -//Change some settings -$img->image_width = 250; -$img->image_height = 80; -$img->perturbation = 0.85; -$img->image_bg_color = new Securimage_Color("#f6f6f6"); -$img->multi_text_color = array(new Securimage_Color("#3399ff"), - new Securimage_Color("#3300cc"), - new Securimage_Color("#3333cc"), - new Securimage_Color("#6666ff"), - new Securimage_Color("#99cccc") - ); -$img->use_multi_text = true; -$img->text_angle_minimum = -5; -$img->text_angle_maximum = 5; -$img->use_transparent_text = true; -$img->text_transparency_percentage = 30; // 100 = completely transparent -$img->num_lines = 7; -$img->line_color = new Securimage_Color("#eaeaea"); -$img->image_signature = 'phpcaptcha.org'; -$img->signature_color = new Securimage_Color(rand(0, 64), rand(64, 128), rand(128, 255)); -$img->use_wordlist = true; - -$img->show('backgrounds/bg3.jpg'); // alternate use: $img->show('/path/to/background_image.jpg'); - diff --git a/sources/html/securimage/securimage_show_example2.php b/sources/html/securimage/securimage_show_example2.php deleted file mode 100644 index 941379b..0000000 --- a/sources/html/securimage/securimage_show_example2.php +++ /dev/null @@ -1,55 +0,0 @@ - - * File: securimage_show_example2.php
    - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or any later version.

    - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details.

    - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

    - * - * Any modifications to the library should be indicated clearly in the source code - * to inform users that the changes are not a part of the original software.

    - * - * If you found this script useful, please take a quick moment to rate it.
    - * http://www.hotscripts.com/rate/49400.html Thanks. - * - * @link http://www.phpcaptcha.org Securimage PHP CAPTCHA - * @link http://www.phpcaptcha.org/latest.zip Download Latest Version - * @link http://www.phpcaptcha.org/Securimage_Docs/ Online Documentation - * @copyright 2009 Drew Phillips - * @author Drew Phillips - * @version 2.0.1 BETA (December 6th, 2009) - * @package Securimage - * - */ - -include 'securimage.php'; - -$img = new securimage(); - -//Change some settings -$img->image_width = 280; -$img->image_height = 100; -$img->perturbation = 0.9; -$img->code_length = rand(5,6); -$img->image_bg_color = new Securimage_Color("#ffffff"); -$img->use_transparent_text = true; -$img->text_transparency_percentage = 75; // 100 = completely transparent -$img->num_lines = 15; -$img->image_signature = ''; -$img->text_color = new Securimage_Color("#000000"); -$img->line_color = new Securimage_Color("#cccccc"); - -$img->show(''); // alternate use: $img->show('/path/to/background_image.jpg'); - diff --git a/sources/html/securimage/words/words.txt b/sources/html/securimage/words/words.txt deleted file mode 100644 index eaeb84a..0000000 --- a/sources/html/securimage/words/words.txt +++ /dev/null @@ -1,15621 +0,0 @@ -aahing -aaliis -aarrgh -abacas -abacus -abakas -abamps -abased -abaser -abases -abasia -abated -abater -abates -abatis -abator -abayas -abbacy -abbess -abbeys -abbots -abduce -abduct -abeles -abelia -abhors -abided -abider -abides -abject -abjure -ablate -ablaut -ablaze -ablest -ablins -abloom -ablush -abmhos -aboard -aboded -abodes -abohms -abolla -abomas -aboral -aborts -abound -aboves -abrade -abroad -abrupt -abseil -absent -absorb -absurd -abulia -abulic -abvolt -abwatt -abying -abysms -acacia -acajou -acarid -acarus -accede -accent -accept -access -accord -accost -accrue -accuse -acedia -acetal -acetic -acetin -acetum -acetyl -achene -achier -aching -acidic -acidly -acinar -acinic -acinus -ackees -acnode -acorns -acquit -across -acting -actins -action -active -actors -actual -acuate -acuity -aculei -acumen -acuter -acutes -adages -adagio -adapts -addend -adders -addict -adding -addled -addles -adduce -adduct -adeems -adenyl -adepts -adhere -adieus -adieux -adipic -adjoin -adjure -adjust -admass -admire -admits -admixt -adnate -adnexa -adnoun -adobes -adobos -adonis -adopts -adored -adorer -adores -adorns -adrift -adroit -adsorb -adults -advect -advent -adverb -advert -advice -advise -adytum -adzing -adzuki -aecial -aecium -aedile -aedine -aeneus -aeonic -aerate -aerial -aeried -aerier -aeries -aerify -aerily -aerobe -aerugo -aether -afeard -affair -affect -affine -affirm -afflux -afford -affray -afghan -afield -aflame -afloat -afraid -afreet -afresh -afrits -afters -aftosa -agamas -agamic -agamid -agapae -agapai -agapes -agaric -agates -agaves -agedly -ageing -ageism -ageist -agency -agenda -agenes -agents -aggada -aggers -aggies -aggros -aghast -agings -agisms -agists -agitas -aglare -agleam -aglets -agnail -agnate -agnize -agonal -agones -agonic -agorae -agoras -agorot -agouti -agouty -agrafe -agreed -agrees -agrias -aguish -ahchoo -ahimsa -aholds -ahorse -aiders -aidful -aiding -aidman -aidmen -aiglet -aigret -aikido -ailing -aimers -aimful -aiming -aiolis -airbag -airbus -airers -airest -airier -airily -airing -airman -airmen -airted -airths -airway -aisled -aisles -aivers -ajivas -ajowan -ajugas -akelas -akenes -akimbo -alamos -alands -alanin -alants -alanyl -alarms -alarum -alaska -alated -alates -albata -albedo -albeit -albino -albite -albums -alcade -alcaic -alcids -alcove -alders -aldols -aldose -aldrin -alegar -alephs -alerts -alevin -alexia -alexin -alfaki -algins -algoid -algors -algums -alibis -alible -alidad -aliens -alight -aligns -alined -aliner -alines -aliped -aliyah -aliyas -aliyos -aliyot -alkali -alkane -alkene -alkies -alkine -alkoxy -alkyds -alkyls -alkyne -allays -allees -allege -allele -alleys -allied -allies -allium -allods -allots -allows -alloys -allude -allure -allyls -almahs -almehs -almner -almond -almost -almuce -almude -almuds -almugs -alnico -alodia -alohas -aloins -alpaca -alphas -alphyl -alpine -alsike -altars -alters -althea -aludel -alulae -alular -alumin -alumna -alumni -alvine -always -amadou -amarna -amatol -amazed -amazes -amazon -ambage -ambari -ambary -ambeer -ambers -ambery -ambits -ambled -ambler -ambles -ambush -amebae -ameban -amebas -amebic -ameers -amends -aments -amerce -amices -amicus -amides -amidic -amidin -amidol -amidst -amigas -amigos -amines -aminic -ammine -ammino -ammono -amnion -amnios -amoeba -amoles -amoral -amount -amours -ampere -amping -ampler -ampule -ampuls -amrita -amtrac -amucks -amulet -amused -amuser -amuses -amusia -amylic -amylum -anabas -anadem -analog -ananke -anarch -anatto -anchor -anchos -ancone -andros -anears -aneled -aneles -anemia -anemic -anenst -anergy -angary -angels -angers -angina -angled -angler -angles -anglos -angora -angsts -anilin -animal -animas -animes -animis -animus -anions -anises -anisic -ankled -ankles -anklet -ankush -anlace -anlage -annals -anneal -annexe -annona -annoys -annual -annuli -annuls -anodal -anodes -anodic -anoint -anoles -anomic -anomie -anonym -anopia -anorak -anoxia -anoxic -ansate -answer -anteed -anthem -anther -antiar -antick -antics -anting -antler -antral -antres -antrum -anural -anuran -anuria -anuric -anuses -anvils -anyhow -anyone -anyons -anyway -aorist -aortae -aortal -aortas -aortic -aoudad -apache -apathy -apercu -apexes -aphids -aphtha -apiary -apical -apices -apiece -aplite -aplomb -apneal -apneas -apneic -apnoea -apodal -apogee -apollo -apolog -aporia -appall -appals -appeal -appear -appels -append -apples -applet -appose -aprons -aptest -arabic -arable -arames -aramid -arbors -arbour -arbute -arcade -arcana -arcane -arched -archer -arches -archil -archly -archon -arcing -arcked -arctic -ardebs -ardent -ardors -ardour -arecas -arenas -arenes -areola -areole -arepas -aretes -argala -argali -argals -argent -argils -argled -argles -argols -argons -argosy -argots -argued -arguer -argues -argufy -argyle -argyll -arhats -ariary -arider -aridly -ariels -aright -ariled -ariose -ariosi -arioso -arisen -arises -arista -aristo -arkose -armada -armers -armets -armful -armies -arming -armlet -armors -armory -armour -armpit -armure -arnica -aroids -aroint -aromas -around -arouse -aroynt -arpens -arpent -arrack -arrant -arrays -arrear -arrest -arriba -arrive -arroba -arrows -arrowy -arroyo -arseno -arshin -arsine -arsino -arsons -artels -artery -artful -artier -artily -artist -asanas -asarum -ascend -ascent -ascots -asdics -ashcan -ashier -ashing -ashlar -ashler -ashman -ashmen -ashore -ashram -asides -askant -askers -asking -aslant -asleep -aslope -aslosh -aspect -aspens -aspers -aspics -aspire -aspish -asrama -assail -assais -assays -assent -assert -assess -assets -assign -assist -assize -assoil -assort -assume -assure -astern -asters -asthma -astony -astral -astray -astute -aswarm -aswirl -aswoon -asylum -atabal -ataman -atavic -ataxia -ataxic -atelic -atlatl -atmans -atolls -atomic -atonal -atoned -atoner -atones -atonia -atonic -atopic -atrial -atrium -attach -attack -attain -attars -attend -attent -attest -attics -attire -attorn -attrit -attune -atwain -atween -atypic -aubade -auburn -aucuba -audads -audial -audile -auding -audios -audits -augend -augers -aughts -augite -augurs -augury -august -auklet -aulder -auntie -auntly -aurate -aureus -aurist -aurora -aurous -aurums -auspex -ausubo -auteur -author -autism -autist -autoed -autumn -auxins -avails -avatar -avaunt -avenge -avenue -averse -averts -avians -aviary -aviate -avidin -avidly -avions -avisos -avocet -avoids -avoset -avouch -avowal -avowed -avower -avulse -awaits -awaked -awaken -awakes -awards -aweary -aweigh -aweing -awhile -awhirl -awless -awmous -awning -awoken -axeman -axemen -axenic -axilla -axioms -axions -axised -axises -axites -axlike -axonal -axones -axonic -axseed -azalea -azides -azines -azlons -azoles -azonal -azonic -azoted -azotes -azoths -azotic -azukis -azures -azygos -baaing -baalim -baases -babble -babels -babied -babier -babies -babkas -babool -baboon -baboos -babuls -baccae -bached -baches -backed -backer -backup -bacons -bacula -badass -badder -baddie -badged -badger -badges -badman -badmen -baffed -baffle -bagels -bagful -bagged -bagger -baggie -bagman -bagmen -bagnio -baguet -bagwig -bailed -bailee -bailer -bailey -bailie -bailor -bairns -baited -baiter -baizas -baizes -bakers -bakery -baking -balata -balboa -balded -balder -baldly -baleen -balers -baling -balked -balker -ballad -balled -baller -ballet -ballon -ballot -ballsy -balsam -balsas -bamboo -bammed -banana -bancos -bandas -banded -bander -bandit -bandog -banged -banger -bangle -banian -baning -banish -banjax -banjos -banked -banker -bankit -banned -banner -bannet -bantam -banter -banyan -banzai -baobab -barbal -barbed -barbel -barber -barbes -barbet -barbie -barbut -barcas -barded -bardes -bardic -barege -barely -barest -barfed -barfly -barged -bargee -barges -barhop -baring -barite -barium -barked -barker -barley -barlow -barman -barmen -barmie -barned -barney -barong -barons -barony -barque -barred -barrel -barren -barres -barret -barrio -barrow -barter -baryes -baryon -baryta -baryte -basalt -basely -basest -bashaw -bashed -basher -bashes -basics -basify -basils -basing -basins -basion -basked -basket -basque -basted -baster -bastes -batboy -bateau -bathed -bather -bathes -bathos -batiks -bating -batman -batmen -batons -batted -batten -batter -battik -battle -battue -baubee -bauble -baulks -baulky -bawbee -bawdry -bawled -bawler -bawtie -bayamo -bayard -baying -bayman -baymen -bayous -bazaar -bazars -bazoos -beachy -beacon -beaded -beader -beadle -beagle -beaked -beaker -beamed -beaned -beanie -beanos -beards -bearer -beaten -beater -beauts -beauty -bebops -becalm -became -becaps -becked -becket -beckon -beclog -become -bedamn -bedaub -bedbug -bedded -bedder -bedeck -bedell -bedels -bedews -bedims -bedlam -bedpan -bedrid -bedrug -bedsit -beduin -bedumb -beebee -beechy -beefed -beeped -beeper -beetle -beeves -beezer -befall -befell -befits -beflag -beflea -befogs -befool -before -befoul -befret -begall -begaze -begets -beggar -begged -begins -begird -begirt -beglad -begone -begrim -begulf -begums -behalf -behave -behead -beheld -behest -behind -behold -behoof -behove -behowl -beiges -beigne -beings -bekiss -beknot -belady -belaud -belays -beldam -beleap -belfry -belgas -belied -belief -belier -belies -belike -belive -belled -belles -bellow -belong -belons -belows -belted -belter -beluga -bemata -bemean -bemire -bemist -bemixt -bemoan -bemock -bemuse -bename -benday -bended -bendee -bender -bendys -benign -bennes -bennet -bennis -bentos -benumb -benzal -benzin -benzol -benzyl -berake -berate -bereft -berets -berime -berlin -bermed -bermes -bertha -berths -beryls -beseem -besets -beside -besmut -besnow -besoms -besots -bested -bestir -bestow -bestud -betake -betels -bethel -betide -betime -betise -betons -betony -betook -betray -bettas -betted -better -bettor -bevels -bevies -bevors -bewail -beware -beweep -bewept -bewigs -beworm -bewrap -bewray -beylic -beylik -beyond -bezant -bezazz -bezels -bezils -bezoar -bhakta -bhakti -bhangs -bharal -bhoots -bialis -bialys -biased -biases -biaxal -bibbed -bibber -bibles -bicarb -biceps -bicker -bicorn -bicron -bidden -bidder -biders -bidets -biding -bields -biface -biffed -biffin -biflex -bifold -biform -bigamy -bigeye -bigger -biggie -biggin -bights -bigots -bigwig -bijous -bijoux -bikers -bikies -biking -bikini -bilboa -bilbos -bilged -bilges -bilked -bilker -billed -biller -billet -billie -billon -billow -bimahs -bimbos -binary -binate -binder -bindis -bindle -biners -binged -binger -binges -bingos -binits -binned -binocs -biogas -biogen -biomes -bionic -bionts -biopic -biopsy -biotas -biotic -biotin -bipack -bipeds -bipods -birded -birder -birdie -bireme -birkie -birled -birler -birles -birred -birses -births -bisect -bishop -bisons -bisque -bister -bistre -bistro -bitchy -biters -biting -bitmap -bitted -bitten -bitter -bizone -bizzes -blabby -blacks -bladed -blader -blades -blaffs -blains -blamed -blamer -blames -blanch -blanks -blared -blares -blasts -blasty -blawed -blazed -blazer -blazes -blazon -bleach -bleaks -blears -bleary -bleats -blebby -bleeds -bleeps -blench -blende -blends -blenny -blight -blimey -blimps -blinds -blinis -blinks -blintz -blites -blithe -bloats -blocks -blocky -blokes -blonde -blonds -bloods -bloody -blooey -blooie -blooms -bloomy -bloops -blotch -blotto -blotty -blouse -blousy -blowby -blowed -blower -blowsy -blowup -blowzy -bludge -bluely -bluest -bluesy -bluets -blueys -bluffs -bluing -bluish -blumed -blumes -blunge -blunts -blurbs -blurry -blurts -blypes -boards -boarts -boasts -boated -boatel -boater -bobbed -bobber -bobbin -bobble -bobcat -bocces -boccia -boccie -boccis -boches -bodega -bodice -bodied -bodies -bodily -boding -bodkin -boffed -boffin -boffos -bogans -bogart -bogeys -bogged -boggle -bogies -bogles -boheas -bohunk -boiled -boiler -boings -boinks -boites -bolder -boldly -bolero -bolete -boleti -bolide -bolled -bollix -bollox -bolshy -bolson -bolted -bolter -bombax -bombed -bomber -bombes -bombyx -bonaci -bonbon -bonded -bonder -bonduc -boners -bonged -bongos -bonier -boning -bonita -bonito -bonked -bonnes -bonnet -bonnie -bonobo -bonsai -bonzer -bonzes -boobed -boobie -booboo -boocoo -boodle -booger -boogey -boogie -boohoo -booing -boojum -booked -booker -bookie -bookoo -boomed -boomer -boosts -booted -bootee -booths -bootie -boozed -boozer -boozes -bopeep -bopped -bopper -borage -borals -borane -borate -bordel -border -boreal -boreas -boreen -borers -boride -boring -borked -borons -borrow -borsch -borsht -borzoi -boshes -bosker -bosket -bosoms -bosomy -bosons -bosque -bossed -bosses -boston -bosuns -botany -botchy -botels -botfly -bother -bottle -bottom -boubou -boucle -boudin -bouffe -boughs -bought -bougie -boules -boulle -bounce -bouncy -bounds -bounty -bourgs -bourne -bourns -bourse -boused -bouses -bouton -bovids -bovine -bowers -bowery -bowfin -bowing -bowled -bowleg -bowler -bowman -bowmen -bowpot -bowsed -bowses -bowwow -bowyer -boxcar -boxers -boxful -boxier -boxily -boxing -boyard -boyars -boyish -boylas -braced -bracer -braces -brachs -bracts -braggy -brahma -braids -brails -brains -brainy -braise -braize -braked -brakes -branch -brands -brandy -branks -branny -brants -brashy -brasil -brassy -bratty -bravas -braved -braver -braves -bravos -brawer -brawls -brawly -brawns -brawny -brayed -brayer -brazas -brazed -brazen -brazer -brazes -brazil -breach -breads -bready -breaks -breams -breath -bredes -breech -breeds -breeks -breeze -breezy -bregma -brents -breves -brevet -brewed -brewer -brewis -briard -briars -briary -bribed -bribee -briber -bribes -bricks -bricky -bridal -brides -bridge -bridle -briefs -briers -briery -bright -brillo -brills -brined -briner -brines -brings -brinks -briony -brises -brisks -briths -britts -broach -broads -broche -brocks -brogan -brogue -broils -broken -broker -brolly -bromal -bromes -bromic -bromid -bromin -bromos -bronco -broncs -bronze -bronzy -brooch -broods -broody -brooks -brooms -broomy -broses -broths -brothy -browed -browns -browny -browse -brucin -brughs -bruins -bruise -bruits -brulot -brumal -brumby -brumes -brunch -brunet -brunts -brushy -brutal -bruted -brutes -bruxed -bruxes -bryony -bubale -bubals -bubbas -bubble -bubbly -bubkes -buboed -buboes -buccal -bucked -bucker -bucket -buckle -buckos -buckra -budded -budder -buddha -buddle -budged -budger -budges -budget -budgie -buffed -buffer -buffet -buffos -bugeye -bugged -bugger -bugled -bugler -bugles -bugout -bugsha -builds -bulbar -bulbed -bulbel -bulbil -bulbul -bulged -bulger -bulges -bulgur -bulked -bullae -bulled -bullet -bumble -bumkin -bummed -bummer -bumped -bumper -bumphs -bunchy -buncos -bundle -bundts -bunged -bungee -bungle -bunion -bunked -bunker -bunkos -bunkum -bunted -bunter -bunyas -buoyed -bupkes -bupkus -buppie -buqsha -burans -burble -burbly -burbot -burden -burdie -bureau -burets -burgee -burger -burghs -burgle -burgoo -burial -buried -burier -buries -burins -burkas -burked -burker -burkes -burlap -burled -burler -burley -burned -burner -burnet -burnie -burped -burqas -burred -burrer -burros -burrow -bursae -bursal -bursar -bursas -burses -bursts -burton -busbar -busboy -bushed -bushel -busher -bushes -bushwa -busied -busier -busies -busily -busing -busked -busker -buskin -busman -busmen -bussed -busses -busted -buster -bustic -bustle -butane -butene -buteos -butled -butler -butles -butted -butter -buttes -button -bututs -butyls -buyers -buying -buyoff -buyout -buzuki -buzzed -buzzer -buzzes -bwanas -byelaw -bygone -bylaws -byline -byname -bypass -bypast -bypath -byplay -byrled -byrnie -byroad -byssal -byssus -bytalk -byways -byword -bywork -byzant -cabala -cabals -cabana -cabbed -cabbie -cabers -cabins -cabled -cabler -cables -cablet -cabman -cabmen -cabobs -cacaos -cached -caches -cachet -cachou -cackle -cactus -caddie -caddis -cadent -cadets -cadged -cadger -cadges -cadmic -cadres -caecal -caecum -caeoma -caesar -caftan -cagers -cagier -cagily -caging -cahier -cahoot -cahows -caiman -caique -cairds -cairns -cairny -cajole -cakier -caking -calami -calash -calcar -calces -calcic -calesa -calico -califs -caliph -calked -calker -calkin -callan -callas -called -callee -caller -callet -callow -callus -calmed -calmer -calmly -calory -calpac -calque -calved -calves -calxes -camail -camber -cambia -camels -cameos -camera -camion -camisa -camise -camlet -cammie -camped -camper -campos -campus -canals -canape -canard -canary -cancan -cancel -cancer -cancha -candid -candle -candor -caners -canful -cangue -canids -canine -caning -canker -cannas -canned -cannel -canner -cannie -cannon -cannot -canoed -canoer -canoes -canola -canons -canopy -cansos -cantal -canted -canter -canthi -cantic -cantle -canton -cantor -cantos -cantus -canula -canvas -canyon -capers -capful -capias -capita -caplet -caplin -capons -capote -capped -capper -capric -capris -capsid -captan -captor -carack -carafe -carate -carats -carbon -carbos -carboy -carcel -carded -carder -cardia -cardio -cardon -careen -career -carers -caress -carets -carful -cargos -carhop -caribe -caried -caries -carina -caring -carked -carles -carlin -carman -carmen -carnal -carnet -carney -carnie -carobs -caroch -caroli -carols -caroms -carpal -carped -carpel -carper -carpet -carpus -carrel -carrom -carrot -carses -carted -cartel -carter -cartes -carton -cartop -carved -carvel -carven -carver -carves -casaba -casava -casbah -casefy -caseic -casein -casern -cashaw -cashed -cashes -cashew -cashoo -casing -casini -casino -casita -casked -casket -casque -caster -castes -castle -castor -casual -catalo -catchy -catena -caters -catgut -cation -catkin -catlin -catnap -catnip -catsup -catted -cattie -cattle -caucus -caudad -caudal -caudex -caudle -caught -caulds -caules -caulis -caulks -causal -caused -causer -causes -causey -caveat -cavern -cavers -caviar -cavies -cavils -caving -cavity -cavort -cawing -cayman -cayuse -ceased -ceases -cebids -ceboid -cecity -cedarn -cedars -cedary -ceders -ceding -cedula -ceibas -ceiled -ceiler -ceilis -celebs -celery -celiac -cellae -cellar -celled -cellos -celoms -cement -cenote -censed -censer -censes -censor -census -centai -cental -centas -center -centos -centra -centre -centum -ceorls -cerate -cercal -cercis -cercus -cereal -cereus -cerias -cering -ceriph -cerise -cerite -cerium -cermet -cerous -certes -ceruse -cervid -cervix -cesium -cessed -cesses -cestas -cestoi -cestos -cestus -cesura -cetane -chabuk -chacma -chadar -chador -chadri -chaeta -chafed -chafer -chafes -chaffs -chaffy -chaine -chains -chairs -chaise -chakra -chalah -chaleh -chalet -chalks -chalky -challa -chally -chalot -chammy -champs -champy -chance -chancy -change -changs -chants -chanty -chapel -chapes -charas -chards -chared -chares -charge -charka -charks -charms -charro -charrs -charry -charts -chased -chaser -chases -chasms -chasmy -chasse -chaste -chatty -chaunt -chawed -chawer -chazan -cheapo -cheaps -cheats -chebec -checks -cheder -cheeks -cheeky -cheeps -cheero -cheers -cheery -cheese -cheesy -chefed -chegoe -chelae -chelas -chemic -chemos -cheque -cherry -cherts -cherty -cherub -chests -chesty -chetah -cheths -chevre -chewed -chewer -chiasm -chiaus -chicas -chicer -chichi -chicks -chicle -chicly -chicos -chided -chider -chides -chiefs -chield -chiels -chigoe -childe -chiles -chilis -chilli -chills -chilly -chimar -chimbs -chimed -chimer -chimes -chimla -chimps -chinas -chinch -chined -chines -chinks -chinky -chinos -chints -chintz -chippy -chiral -chirks -chirms -chiros -chirps -chirpy -chirre -chirrs -chirus -chisel -chital -chitin -chiton -chitty -chives -chivvy -choana -chocks -choice -choirs -choked -choker -chokes -chokey -cholas -choler -cholla -cholos -chomps -chooks -choose -choosy -chopin -choppy -choral -chords -chorea -chored -chores -choric -chorus -chosen -choses -chotts -chough -chouse -choush -chowed -chowse -chrism -chroma -chrome -chromo -chromy -chubby -chucks -chucky -chufas -chuffs -chuffy -chukar -chukka -chummy -chumps -chunks -chunky -chuppa -church -churls -churns -churro -churrs -chuted -chutes -chyles -chymes -chymic -cibols -cicada -cicala -cicale -cicely -cicero -ciders -cigars -cilice -cilium -cinder -cinema -cineol -cinque -cipher -circle -circus -cirque -cirrus -ciscos -cisted -cistus -citers -cither -citied -cities -citify -citing -citola -citole -citral -citric -citrin -citron -citrus -civets -civics -civies -civism -clachs -clacks -clades -claims -clammy -clamor -clamps -clangs -clanks -clanky -claque -claret -claros -clasps -claspt -classy -clasts -clause -claver -claves -clavus -clawed -clawer -claxon -clayed -clayey -cleans -clears -cleats -cleave -cleeks -clefts -clench -cleome -cleped -clepes -clergy -cleric -clerid -clerks -clever -clevis -clewed -cliche -clicks -client -cliffs -cliffy -clifts -climax -climbs -climes -clinal -clinch -clines -clings -clingy -clinic -clinks -clique -cliquy -clitic -clivia -cloaca -cloaks -cloche -clocks -cloddy -cloggy -clomps -clonal -cloned -cloner -clones -clonic -clonks -clonus -cloots -cloque -closed -closer -closes -closet -clothe -cloths -clotty -clouds -cloudy -clough -clours -clouts -cloven -clover -cloves -clowns -cloyed -clozes -clubby -clucks -cluing -clumps -clumpy -clumsy -clunks -clunky -clutch -clypei -cnidae -coacts -coalas -coaled -coaler -coapts -coarse -coasts -coated -coatee -coater -coatis -coaxal -coaxed -coaxer -coaxes -cobalt -cobber -cobble -cobias -cobles -cobnut -cobras -cobweb -cocain -coccal -coccic -coccid -coccus -coccyx -cochin -cocoas -cocoon -codded -codder -coddle -codecs -codeia -codens -coders -codify -coding -codlin -codons -coedit -coelom -coempt -coerce -coeval -coffee -coffer -coffin -coffle -cogent -cogged -cogito -cognac -cogons -cogway -cohead -coheir -cohere -cohogs -cohort -cohosh -cohost -cohune -coifed -coiffe -coigne -coigns -coiled -coiler -coined -coiner -coital -coitus -cojoin -coking -colbys -colder -coldly -colead -coleus -colics -colies -colins -collar -collet -collie -collop -colobi -cologs -colone -coloni -colons -colony -colors -colour -colter -colugo -column -colure -colzas -comade -comake -comate -combat -combed -comber -combes -combos -comedo -comedy -comely -comers -cometh -comets -comfit -comics -coming -comity -commas -commie -commit -commix -common -comose -comous -compas -comped -compel -comply -compos -compts -comtes -concha -concho -conchs -conchy -concur -condor -condos -coneys -confab -confer -confit -congas -congee -conger -conges -congii -congos -congou -conics -conies -conine -coning -conins -conium -conked -conker -conned -conner -conoid -consol -consul -contes -contos -contra -convex -convey -convoy -coocoo -cooeed -cooees -cooers -cooeys -cooing -cooked -cooker -cookey -cookie -cooled -cooler -coolie -coolly -coolth -coombe -coombs -cooped -cooper -coopts -cooter -cootie -copalm -copals -copays -copeck -copens -copers -copied -copier -copies -coping -coplot -copout -copped -copper -coppra -coprah -copras -copses -copter -copula -coquet -corals -corban -corbel -corbie -corded -corder -cordon -corers -corgis -coring -corium -corked -corker -cormel -cornea -corned -cornel -corner -cornet -cornua -cornus -corody -corona -corpse -corpus -corral -corrie -corsac -corses -corset -cortex -cortin -corvee -corves -corvet -corvid -corymb -coryza -cosecs -cosets -coseys -coshed -cosher -coshes -cosied -cosier -cosies -cosign -cosily -cosine -cosmic -cosmid -cosmos -cosset -costae -costal -costar -costed -coster -costly -cotans -coteau -coting -cottae -cottar -cottas -cotter -cotton -cotype -cougar -coughs -coulee -coulis -counts -county -couped -coupes -couple -coupon -course -courts -cousin -couter -couths -covary -covens -covers -covert -covets -coveys -coving -covins -cowage -coward -cowboy -cowers -cowier -cowing -cowled -cowman -cowmen -cowpat -cowpea -cowpie -cowpox -cowrie -coxing -coydog -coyest -coying -coyish -coyote -coypou -coypus -cozens -cozeys -cozied -cozier -cozies -cozily -cozzes -craals -crabby -cracks -cracky -cradle -crafts -crafty -craggy -crakes -crambe -crambo -cramps -crampy -cranch -craned -cranes -crania -cranks -cranky -cranny -crapes -crappy -crases -crasis -cratch -crated -crater -crates -craton -cravat -craved -craven -craver -craves -crawls -crawly -crayon -crazed -crazes -creaks -creaky -creams -creamy -crease -creasy -create -creche -credal -credit -credos -creeds -creeks -creels -creeps -creepy -creese -creesh -cremes -crenel -creole -creped -crepes -crepey -crepon -cresol -cressy -crests -cresyl -cretic -cretin -crewed -crewel -cricks -criers -crikey -crimes -crimps -crimpy -cringe -crinum -cripes -crises -crisic -crisis -crisps -crispy -crissa -crista -critic -croaks -croaky -crocks -crocus -crofts -crojik -crones -crooks -croons -crores -crosse -crotch -croton -crouch -croupe -croups -croupy -crouse -croute -crowds -crowdy -crowed -crower -crowns -crozer -crozes -cruces -crucks -cruddy -cruder -crudes -cruets -cruise -crumbs -crumby -crummy -crumps -crunch -cruors -crural -cruses -cruset -crusts -crusty -crutch -cruxes -crwths -crying -crypto -crypts -cuatro -cubage -cubebs -cubers -cubics -cubing -cubism -cubist -cubiti -cubits -cuboid -cuckoo -cuddie -cuddle -cuddly -cudgel -cueing -cuesta -cuffed -cuisse -culets -cullay -culled -culler -cullet -cullis -culmed -culpae -cultch -cultic -cultus -culver -cumber -cumbia -cumins -cummer -cummin -cumuli -cundum -cuneal -cunner -cupels -cupful -cupids -cupola -cuppas -cupped -cupper -cupric -cuprum -cupula -cupule -curacy -curagh -curara -curare -curari -curate -curbed -curber -curded -curdle -curers -curets -curfew -curiae -curial -curies -curing -curios -curite -curium -curled -curler -curlew -curran -curred -currie -cursed -curser -curses -cursor -curtal -curter -curtly -curtsy -curule -curved -curves -curvet -curvey -cuscus -cusecs -cushat -cushaw -cuspal -cusped -cuspid -cuspis -cussed -cusser -cusses -cussos -custom -custos -cutely -cutest -cutesy -cuteys -cuties -cutins -cutlas -cutler -cutlet -cutoff -cutout -cutter -cuttle -cutups -cuvees -cyanic -cyanid -cyanin -cyborg -cycads -cycled -cycler -cycles -cyclic -cyclin -cyclos -cyders -cyeses -cyesis -cygnet -cymars -cymbal -cymene -cymlin -cymoid -cymols -cymose -cymous -cynics -cypher -cypres -cyprus -cystic -cytons -dabbed -dabber -dabble -dachas -dacite -dacker -dacoit -dacron -dactyl -daddle -dadgum -dadoed -dadoes -daedal -daemon -daffed -dafter -daftly -daggas -dagger -daggle -dagoba -dagoes -dahlia -dahoon -daiker -daikon -daimen -daimio -daimon -daimyo -dainty -daises -dakoit -dalasi -daledh -daleth -dalles -dalton -damage -damans -damars -damask -dammar -dammed -dammer -dammit -damned -damner -damped -dampen -damper -damply -damsel -damson -danced -dancer -dances -dander -dandle -danged -danger -dangle -dangly -danios -danish -danker -dankly -daphne -dapped -dapper -dapple -darbar -darers -darics -daring -darked -darken -darker -darkey -darkie -darkle -darkly -darned -darnel -darner -darted -darter -dartle -dashed -dasher -dashes -dashis -dassie -datary -datcha -daters -dating -dative -dattos -datums -datura -daubed -dauber -daubes -daubry -daunts -dauted -dautie -davens -davies -davits -dawdle -dawing -dawned -dawted -dawtie -daybed -dayfly -daylit -dazing -dazzle -deacon -deaden -deader -deadly -deafen -deafer -deafly -deairs -dealer -deaned -dearer -dearie -dearly -dearth -deasil -deaths -deathy -deaved -deaves -debags -debark -debars -debase -debate -debeak -debits -debone -debris -debtor -debugs -debunk -debuts -debyes -decade -decafs -decals -decamp -decane -decant -decare -decays -deceit -decent -decern -decide -decile -decked -deckel -decker -deckle -declaw -decoct -decode -decors -decoys -decree -decury -dedans -deduce -deduct -deeded -deejay -deemed -deepen -deeper -deeply -deewan -deface -defame -defang -defats -defeat -defect -defend -defers -deffer -defied -defier -defies -defile -define -deflea -defoam -defogs -deform -defrag -defray -defter -deftly -defuel -defund -defuse -defuze -degage -degame -degami -degerm -degree -degums -degust -dehorn -dehort -deiced -deicer -deices -deific -deigns -deisms -deists -deixis -deject -dekare -deking -dekkos -delate -delays -delead -delete -delfts -delict -delime -delish -delist -deltas -deltic -delude -deluge -deluxe -delved -delver -delves -demand -demark -demast -demean -dement -demies -demise -demits -demobs -demode -demoed -demons -demote -demure -demurs -denari -denars -denary -dengue -denial -denied -denier -denies -denims -denned -denote -denser -dental -dented -dentil -dentin -denude -deodar -depart -depend -deperm -depict -deploy -depone -deport -depose -depots -depths -depute -deputy -derail -derate -derats -derays -deride -derive -dermal -dermas -dermic -dermis -derris -desalt -desand -descry -desert -design -desire -desist -desman -desmid -desorb -desoxy -despot -detach -detail -detain -detect -detent -deters -detest -detick -detour -deuced -deuces -devein -devels -devest -device -devils -devise -devoid -devoir -devons -devote -devour -devout -dewans -dewars -dewier -dewily -dewing -dewlap -dewool -deworm -dexies -dexter -dextro -dezinc -dharma -dharna -dhobis -dholes -dhooly -dhoora -dhooti -dhotis -dhurna -dhutis -diacid -diadem -dialed -dialer -dialog -diamin -diaper -diapir -diatom -diazin -dibbed -dibber -dibble -dibbuk -dicast -dicers -dicier -dicing -dicked -dicker -dickey -dickie -dicots -dictum -didact -diddle -diddly -didies -didoes -dieing -dienes -dieoff -diesel -dieses -diesis -dieted -dieter -differ -digamy -digest -digged -digger -dights -digits -diglot -dikdik -dikers -diking -diktat -dilate -dildoe -dildos -dilled -dilute -dimers -dimity -dimmed -dimmer -dimout -dimple -dimply -dimwit -dinars -dindle -dinero -diners -dinged -dinger -dinges -dingey -dinghy -dingle -dingus -dining -dinked -dinkey -dinkly -dinkum -dinned -dinner -dinted -diobol -diodes -dioecy -dioxan -dioxid -dioxin -diplex -diploe -dipnet -dipody -dipole -dipped -dipper -dipsas -dipsos -diquat -dirams -dirdum -direct -direly -direst -dirges -dirham -dirked -dirled -dirndl -disarm -disbar -disbud -disced -discos -discus -diseur -dished -dishes -disked -dismal -dismay -dismes -disown -dispel -dissed -disses -distal -distil -disuse -dither -dittos -ditzes -diuron -divans -divers -divert -divest -divide -divine -diving -divots -diwans -dixits -dizens -djebel -djinni -djinns -djinny -doable -doated -dobber -dobbin -dobies -doblas -doblon -dobras -dobros -dobson -docent -docile -docked -docker -docket -doctor -dodder -dodged -dodgem -dodger -dodges -dodoes -doffed -doffer -dogdom -dogear -dogeys -dogged -dogger -doggie -dogies -dogleg -dogmas -dognap -doiled -doings -doited -doling -dollar -dolled -dollop -dolman -dolmas -dolmen -dolors -dolour -domain -domine -doming -domino -donate -donees -dongas -dongle -donjon -donkey -donnas -donned -donnee -donors -donsie -donuts -donzel -doobie -doodad -doodle -doodoo -doofus -doolee -doolie -doomed -doowop -doozer -doozie -dopant -dopers -dopier -dopily -doping -dorado -dorbug -dories -dormer -dormie -dormin -dorper -dorsad -dorsal -dorsel -dorser -dorsum -dosage -dosers -dosing -dossal -dossed -dossel -dosser -dosses -dossil -dotage -dotard -doters -dotier -doting -dotted -dottel -dotter -dottle -double -doubly -doubts -douche -doughs -dought -doughy -doulas -doumas -dourah -douras -dourer -dourly -doused -douser -douses -dovens -dovish -dowels -dowers -dowery -dowing -downed -downer -dowsed -dowser -dowses -doxies -doyens -doyley -dozens -dozers -dozier -dozily -dozing -drably -drachm -draffs -draffy -drafts -drafty -dragee -draggy -dragon -drails -drains -drakes -dramas -drawee -drawer -drawls -drawly -drayed -dreads -dreams -dreamt -dreamy -drears -dreary -drecks -drecky -dredge -dreggy -dreich -dreidl -dreigh -drench -dressy -driegh -driers -driest -drifts -drifty -drills -drinks -drippy -drivel -driven -driver -drives -drogue -droids -droits -drolls -drolly -dromon -droned -droner -drones -drongo -drools -drooly -droops -droopy -dropsy -drosky -drossy -drouks -drouth -droved -drover -droves -drownd -drowns -drowse -drowsy -drudge -druggy -druids -drumly -drunks -drupes -druses -dryads -dryers -dryest -drying -dryish -drylot -dually -dubbed -dubber -dubbin -ducats -ducked -ducker -duckie -ductal -ducted -duddie -dudeen -duding -dudish -dueled -dueler -duelli -duello -duende -duenna -dueted -duffel -duffer -duffle -dugong -dugout -duiker -duking -dulcet -dulias -dulled -duller -dulses -dumbed -dumber -dumbly -dumbos -dumdum -dumped -dumper -dunams -dunces -dunged -dunite -dunked -dunker -dunlin -dunned -dunner -dunted -duolog -duomos -dupers -dupery -duping -duplex -dupped -durbar -duress -durian -during -durion -durned -durocs -durras -durrie -durums -dusked -dusted -duster -dustup -duties -duvets -dwarfs -dweebs -dweeby -dwells -dwined -dwines -dyable -dyadic -dybbuk -dyeing -dyings -dyking -dynamo -dynast -dynein -dynels -dynode -dyvour -eagers -eagled -eagles -eaglet -eagres -earbud -earful -earing -earlap -earned -earner -earths -earthy -earwax -earwig -easels -easier -easies -easily -easing -easter -eaters -eatery -eating -ebbets -ebbing -ebooks -ecarte -ecesic -ecesis -echard -eching -echini -echoed -echoer -echoes -echoey -echoic -eclair -eclats -ectype -eczema -eddied -eddies -eddoes -edemas -edenic -edgers -edgier -edgily -edging -edible -edicts -ediles -edited -editor -educed -educes -educts -eelier -eerier -eerily -efface -effect -effete -effigy -efflux -effort -effuse -egesta -egests -eggars -eggcup -eggers -egging -eggnog -egises -egoism -egoist -egress -egrets -eiders -eidola -eighth -eights -eighty -eikons -either -ejecta -ejects -ekuele -elains -elands -elapid -elapse -elated -elater -elates -elbows -elders -eldest -elects -elegit -elemis -eleven -elevon -elfins -elfish -elicit -elided -elides -elints -elites -elixir -elmier -elodea -eloign -eloins -eloped -eloper -elopes -eluant -eluate -eluded -eluder -eludes -eluent -eluted -elutes -eluvia -elvers -elvish -elytra -emails -embalm -embank -embark -embars -embays -embeds -embers -emblem -embody -emboli -emboly -embosk -emboss -embows -embrue -embryo -emceed -emcees -emdash -emeers -emends -emerge -emerod -emeses -emesis -emetic -emetin -emeute -emigre -emmers -emmets -emodin -emoted -emoter -emotes -empale -empery -empire -employ -emydes -enable -enacts -enamel -enamor -enates -enatic -encage -encamp -encase -encash -encina -encode -encore -encyst -endash -endear -enders -ending -endite -endive -endows -endrin -endued -endues -endure -enduro -energy -enface -enfold -engage -engild -engine -engird -engirt -englut -engram -engulf -enhalo -enigma -enisle -enjoin -enjoys -enlace -enlist -enmesh -enmity -ennead -ennuis -ennuye -enokis -enolic -enosis -enough -enrage -enrapt -enrich -enrobe -enroll -enrols -enroot -enserf -ensign -ensile -ensoul -ensued -ensues -ensure -entail -entera -enters -entice -entire -entity -entoil -entomb -entrap -entree -enured -enures -envied -envier -envies -enviro -envois -envoys -enwind -enwomb -enwrap -enzyme -enzyms -eocene -eolian -eolith -eonian -eonism -eosine -eosins -epacts -eparch -ephahs -ephebe -ephebi -ephods -ephori -ephors -epical -epigon -epilog -epimer -epizoa -epochs -epodes -eponym -epopee -eposes -equals -equate -equids -equine -equips -equity -erased -eraser -erases -erbium -erects -erenow -ergate -ergots -ericas -eringo -ermine -eroded -erodes -eroses -erotic -errand -errant -errata -erring -errors -ersatz -eructs -erugos -erupts -ervils -eryngo -escape -escarp -escars -eschar -eschew -escort -escots -escrow -escudo -eskars -eskers -espial -espied -espies -esprit -essays -essoin -estate -esteem -esters -estops -estral -estray -estrin -estrum -estrus -etalon -etamin -etapes -etched -etcher -etches -eterne -ethane -ethene -ethers -ethics -ethion -ethnic -ethnos -ethoxy -ethyls -ethyne -etoile -etudes -etwees -etymon -euchre -eulogy -eunuch -eupnea -eureka -euripi -euroky -eutaxy -evaded -evader -evades -evened -evener -evenly -events -everts -evicts -eviler -evilly -evince -evited -evites -evoked -evoker -evokes -evolve -evulse -evzone -exacta -exacts -exalts -examen -exarch -exceed -excels -except -excess -excide -excise -excite -excuse -exedra -exempt -exequy -exerts -exeunt -exhale -exhort -exhume -exiled -exiler -exiles -exilic -exines -exists -exited -exodoi -exodos -exodus -exogen -exonic -exonym -exotic -expand -expats -expect -expels -expend -expert -expire -expiry -export -expose -exsect -exsert -extant -extend -extent -extern -extoll -extols -extort -extras -exuded -exudes -exults -exurbs -exuvia -eyases -eyebar -eyecup -eyeful -eyeing -eyelet -eyelid -eyries -fabber -fabled -fabler -fables -fabric -facade -facers -facete -facets -faceup -facial -facile -facing -factor -facula -fadein -faders -fading -faenas -faerie -failed -faille -fainer -faints -faired -fairer -fairly -faiths -fajita -fakeer -fakers -fakery -faking -fakirs -falces -falcon -fallal -fallen -faller -fallow -falser -falsie -falter -family -famine -faming -famish -famous -famuli -fandom -fanega -fanfic -fangas -fanged -fanion -fanjet -fanned -fanner -fanons -fantod -fantom -fanums -faqirs -faquir -farads -farced -farcer -farces -farcie -farded -fardel -farers -farfal -farfel -farina -faring -farles -farmed -farmer -farrow -farted -fasces -fascia -fashed -fashes -fasted -fasten -faster -father -fathom -fating -fatwas -faucal -fauces -faucet -faulds -faults -faulty -faunae -faunal -faunas -fauves -favela -favism -favors -favour -fawned -fawner -faxing -faying -fazing -fealty -feared -fearer -feased -feases -feasts -feater -featly -feazed -feazes -feckly -fecund -fedora -feeble -feebly -feeder -feeing -feeler -feezed -feezes -feigns -feijoa -feints -feirie -feists -feisty -felids -feline -fellah -fellas -felled -feller -felloe -fellow -felons -felony -felsic -felted -female -femmes -femora -femurs -fenced -fencer -fences -fended -fender -fennec -fennel -feoffs -ferals -ferbam -feriae -ferial -ferias -ferine -ferity -ferlie -fermis -ferrel -ferret -ferric -ferrum -ferula -ferule -fervid -fervor -fescue -fessed -fesses -festal -fester -fetial -fetich -feting -fetish -fetors -fetted -fetter -fettle -feuars -feudal -feuded -feuing -fevers -fewest -feyest -fezzed -fezzes -fiacre -fiance -fiasco -fibbed -fibber -fibers -fibres -fibril -fibrin -fibula -fiches -fichus -ficins -fickle -fickly -ficoes -fiddle -fiddly -fidged -fidges -fidget -fields -fiends -fierce -fiesta -fifers -fifing -fifths -figged -fights -figure -filers -filets -filial -filing -filled -filler -filles -fillet -fillip -fillos -filmed -filmer -filmic -filmis -filose -filter -filths -filthy -fimble -finale -finals -fincas -finder -finely -finery -finest -finger -finial -fining -finish -finite -finito -finked -finned -fiords -fipple -fiques -firers -firing -firkin -firman -firmed -firmer -firmly -firsts -firths -fiscal -fished -fisher -fishes -fisted -fistic -fitchy -fitful -fitted -fitter -fivers -fixate -fixers -fixing -fixity -fixure -fizgig -fizzed -fizzer -fizzes -fizzle -fjelds -fjords -flabby -flacks -flacon -flaggy -flagon -flails -flairs -flaked -flaker -flakes -flakey -flambe -flamed -flamen -flamer -flames -flanes -flange -flanks -flappy -flared -flares -flashy -flasks -flatly -flatus -flaunt -flauta -flavin -flavor -flawed -flaxen -flaxes -flayed -flayer -fleams -fleche -flecks -flecky -fledge -fledgy -fleece -fleech -fleecy -fleers -fleets -flench -flense -fleshy -fletch -fleury -flexed -flexes -flexor -fleyed -flicks -fliers -fliest -flight -flimsy -flinch -flings -flints -flinty -flippy -flirts -flirty -flitch -flited -flites -floats -floaty -flocci -flocks -flocky -flongs -floods -flooey -flooie -floors -floosy -floozy -floppy -florae -floral -floras -floret -florid -florin -flossy -flotas -flours -floury -flouts -flowed -flower -fluent -fluffs -fluffy -fluids -fluish -fluked -flukes -flukey -flumed -flumes -flumps -flunks -flunky -fluors -flurry -fluted -fluter -flutes -flutey -fluxed -fluxes -fluyts -flyboy -flybys -flyers -flying -flyman -flymen -flyoff -flysch -flyted -flytes -flyway -foaled -foamed -foamer -fobbed -fodder -fodgel -foehns -foeman -foemen -foetal -foetid -foetor -foetus -fogbow -fogdog -fogeys -fogged -fogger -fogies -foible -foiled -foined -foison -foists -folate -folded -folder -foldup -foleys -foliar -folios -folium -folkie -folksy -folles -follis -follow -foment -fomite -fonded -fonder -fondle -fondly -fondue -fondus -fontal -foodie -fooled -footed -footer -footie -footle -footsy -foozle -fopped -forage -forams -forays -forbad -forbid -forbye -forced -forcer -forces -forded -fordid -foreby -foredo -forego -forest -forgat -forged -forger -forges -forget -forgot -forint -forked -forker -formal -format -formed -formee -former -formes -formic -formol -formyl -fornix -forrit -fortes -fortis -forums -forwhy -fossae -fossas -fosses -fossil -foster -fought -fouled -fouler -foully -founds -founts -fourth -foveae -foveal -foveas -fowled -fowler -foxier -foxily -foxing -foyers -fozier -fracas -fracti -fraena -frails -fraise -framed -framer -frames -francs -franks -frappe -frater -frauds -frayed -frazil -freaks -freaky -freely -freers -freest -freeze -french -frenum -frenzy -freres -fresco -fretty -friars -friary -fridge -friend -friers -frieze -friges -fright -frigid -frijol -frills -frilly -fringe -fringy -frisee -frises -frisks -frisky -frites -friths -fritts -frivol -frized -frizer -frizes -frizzy -frocks -froggy -frolic -fronds -fronts -frosts -frosty -froths -frothy -frouzy -frowns -frowst -frowsy -frowzy -frozen -frugal -fruits -fruity -frumps -frumpy -frusta -fryers -frying -frypan -fubbed -fucoid -fucose -fucous -fuddle -fudged -fudges -fueled -fueler -fugato -fugged -fugios -fugled -fugles -fugued -fugues -fuhrer -fulcra -fulfil -fulgid -fulham -fullam -fulled -fuller -fulmar -fumble -fumers -fumets -fumier -fuming -fumuli -funded -funder -fundic -fundus -funest -fungal -fungic -fungus -funked -funker -funkia -funned -funnel -funner -furane -furans -furfur -furies -furled -furler -furore -furors -furred -furrow -furzes -fusain -fusees -fusels -fusile -fusils -fusing -fusion -fussed -fusser -fusses -fustic -fusuma -futile -futons -future -futzed -futzes -fuzees -fuzils -fuzing -fuzzed -fuzzes -fylfot -fynbos -fyttes -gabbed -gabber -gabble -gabbro -gabies -gabion -gabled -gables -gaboon -gadded -gadder -gaddis -gadfly -gadget -gadids -gadoid -gaeing -gaffed -gaffer -gaffes -gagaku -gagers -gagged -gagger -gaggle -gaging -gagman -gagmen -gaiety -gaijin -gained -gainer -gainly -gainst -gaited -gaiter -galago -galahs -galaxy -galeae -galeas -galena -galere -galiot -galled -gallet -galley -gallic -gallon -gallop -gallus -galoot -galops -galore -galosh -galyac -galyak -gamays -gambas -gambes -gambia -gambir -gambit -gamble -gambol -gamely -gamers -gamest -gamete -gamier -gamily -gamine -gaming -gamins -gammas -gammed -gammer -gammon -gamuts -gander -ganefs -ganevs -ganged -ganger -gangly -gangue -ganjah -ganjas -gannet -ganofs -ganoid -gantry -gaoled -gaoler -gapers -gaping -gapped -garage -garbed -garble -garcon -gardai -garden -garget -gargle -garish -garlic -garner -garnet -garote -garred -garret -garron -garter -garths -garvey -gasbag -gascon -gashed -gasher -gashes -gasify -gasket -gaskin -gaslit -gasman -gasmen -gasped -gasper -gassed -gasser -gasses -gasted -gaster -gateau -gaters -gather -gating -gators -gauche -gaucho -gauged -gauger -gauges -gaults -gaumed -gauzes -gavage -gavels -gavial -gavots -gawked -gawker -gawped -gawper -gawsie -gayals -gaydar -gayest -gayety -gazabo -gazars -gazebo -gazers -gazing -gazoos -gazump -geared -gecked -geckos -geegaw -geeing -geeked -geests -geezer -geisha -gelada -gelant -gelate -gelati -gelato -gelcap -gelded -gelder -gelees -gelled -gemmae -gemmed -gemote -gemots -gender -genera -genets -geneva -genial -genies -genips -genius -genoas -genome -genoms -genres -genros -gentes -gentil -gentle -gently -gentoo -gentry -geodes -geodic -geoids -gerahs -gerbil -gerent -german -germen -gerund -gestes -gestic -getter -getups -gewgaw -geyser -gharri -gharry -ghauts -ghazis -gherao -ghetto -ghibli -ghosts -ghosty -ghouls -ghylls -giants -giaour -gibbed -gibber -gibbet -gibbon -gibers -gibing -giblet -gibson -giddap -gieing -gifted -giftee -gigged -giggle -giggly -giglet -giglot -gigolo -gigots -gigues -gilded -gilder -gilled -giller -gillie -gimbal -gimels -gimlet -gimmal -gimmes -gimmie -gimped -gingal -ginger -gingko -ginkgo -ginned -ginner -gipons -gipped -gipper -girded -girder -girdle -girlie -girned -girons -girted -girths -gismos -gitano -gitted -gittin -givens -givers -giving -gizmos -glaces -glacis -glades -gladly -glaire -glairs -glairy -glaive -glamor -glance -glands -glared -glares -glassy -glazed -glazer -glazes -gleams -gleamy -gleans -glebae -glebes -gledes -gleeds -gleeks -gleets -gleety -glegly -gleyed -glibly -glided -glider -glides -gliffs -glimed -glimes -glints -glinty -glioma -glitch -glitzy -gloams -gloats -global -globby -globed -globes -globin -gloggs -glomus -glooms -gloomy -gloppy -gloria -glossa -glossy -glosts -glouts -gloved -glover -gloves -glowed -glower -glozed -glozes -glucan -gluers -gluier -gluily -gluing -glumes -glumly -glumpy -glunch -gluons -glutei -gluten -glutes -glycan -glycin -glycol -glycyl -glyphs -gnarls -gnarly -gnarrs -gnatty -gnawed -gnawer -gneiss -gnomes -gnomic -gnomon -gnoses -gnosis -goaded -goaled -goalie -goanna -goatee -gobang -gobans -gobbed -gobbet -gobble -gobies -goblet -goblin -goboes -gobony -goddam -godded -godets -godown -godson -godwit -gofers -goffer -goggle -goggly -goglet -goings -goiter -goitre -golden -golder -golems -golfed -golfer -golosh -gombos -gomers -gomuti -gonefs -goners -gonged -goniff -gonifs -gonion -gonium -gonofs -gonoph -goodby -goodie -goodly -goofed -googly -googol -gooier -gooney -goonie -gooral -goosed -gooses -goosey -gopher -gorals -gorged -gorger -gorges -gorget -gorgon -gorhen -gorier -gorily -goring -gormed -gorses -gospel -gossan -gossip -gotcha -gothic -gotten -gouged -gouger -gouges -gourde -gourds -govern -gowans -gowany -gowned -goyish -graals -grabby -graben -graced -graces -graded -grader -grades -gradin -gradus -grafts -graham -grails -grains -grainy -gramas -gramma -gramme -grampa -gramps -grands -grange -granny -grants -granum -grapes -grapey -graphs -grappa -grasps -grassy -grated -grater -grates -gratin -gratis -graved -gravel -graven -graver -graves -gravid -grayed -grayer -grayly -grazed -grazer -grazes -grease -greasy -greats -greave -grebes -greeds -greedy -greens -greeny -greets -gregos -greige -gremmy -greyed -greyer -greyly -grided -grides -griefs -grieve -griffe -griffs -grifts -grigri -grille -grills -grilse -grimed -grimes -grimly -grinch -grinds -gringa -gringo -griots -griped -griper -gripes -gripey -grippe -grippy -grisly -grison -grists -griths -gritty -grivet -groans -groats -grocer -groggy -groins -grooms -groove -groovy -groped -groper -gropes -grosze -groszy -grotto -grotty -grouch -ground -groups -grouse -grouts -grouty -groved -grovel -groves -grower -growls -growly -growth -groyne -grubby -grudge -gruels -gruffs -gruffy -grugru -grumes -grumps -grumpy -grunge -grungy -grunts -grutch -guacos -guaiac -guanay -guanin -guanos -guards -guavas -guenon -guests -guffaw -guggle -guglet -guided -guider -guides -guidon -guilds -guiled -guiles -guilts -guilty -guimpe -guinea -guiros -guised -guises -guitar -gulags -gulden -gulfed -gulled -gullet -gulley -gulped -gulper -gumbos -gummas -gummed -gummer -gundog -gunite -gunman -gunmen -gunned -gunnel -gunnen -gunner -gunsel -gurged -gurges -gurgle -gurnet -gurney -gushed -gusher -gushes -gusset -gussie -gusted -guttae -gutted -gutter -guttle -guying -guyots -guzzle -gweduc -gybing -gyozas -gypped -gypper -gypsum -gyrase -gyrate -gyrene -gyring -gyrons -gyrose -gyttja -gyving -habile -habits -haboob -haceks -hacked -hackee -hacker -hackie -hackle -hackly -hading -hadith -hadjee -hadjes -hadjis -hadron -haeing -haemal -haemic -haemin -haeres -haffet -haffit -hafted -hafter -hagbut -hagdon -hagged -haggis -haggle -haikus -hailed -hailer -haints -hairdo -haired -hajjes -hajjis -hakeem -hakims -halala -halals -halers -haleru -halest -halide -halids -haling -halite -hallah -hallal -hallel -halloa -halloo -hallos -hallot -hallow -hallux -halmas -haloed -haloes -haloid -halons -halted -halter -halutz -halvah -halvas -halved -halves -hamada -hamals -hamate -hamaul -hamlet -hammal -hammam -hammed -hammer -hamper -hamuli -hamzah -hamzas -hances -handax -handed -hander -handle -hangar -hanged -hanger -hangul -hangup -haniwa -hanked -hanker -hankie -hansas -hansel -hanses -hansom -hanted -hantle -haoles -happed -happen -hapten -haptic -harbor -harden -harder -hardly -hareem -harems -haring -harked -harken -harlot -harmed -harmer -harmin -harped -harper -harpin -harrow -hartal -hashed -hashes -haslet -hasped -hassel -hassle -hasted -hasten -hastes -hatbox -haters -hatful -hating -hatpin -hatred -hatted -hatter -haughs -hauled -hauler -haulms -haulmy -haunch -haunts -hausen -havens -havers -having -havior -havocs -hawala -hawing -hawked -hawker -hawkey -hawkie -hawser -hawses -hayers -haying -haymow -hazans -hazard -hazels -hazers -hazier -hazily -hazing -hazmat -hazzan -headed -header -healed -healer -health -heaped -heaper -hearer -hearse -hearth -hearts -hearty -heated -heater -heaths -heathy -heaume -heaved -heaven -heaver -heaves -heckle -hectic -hector -heddle -heders -hedged -hedger -hedges -heeded -heeder -heehaw -heeled -heeler -heezed -heezes -hefted -hefter -hegari -hegira -heifer -height -heiled -heinie -heired -heishi -heists -hejira -heliac -helios -helium -helled -heller -hellos -helmed -helmet -helots -helped -helper -helved -helves -hemins -hemmed -hemmer -hemoid -hempen -hempie -henbit -henges -henley -hennas -henrys -hented -hepcat -hepper -heptad -herald -herbal -herbed -herded -herder -herdic -hereat -hereby -herein -hereof -hereon -heresy -hereto -heriot -hermae -hermai -hermit -hernia -heroes -heroic -heroin -herons -herpes -hetero -hetman -heuchs -heughs -hewers -hewing -hexade -hexads -hexane -hexers -hexing -hexone -hexose -hexyls -heyday -heydey -hiatal -hiatus -hiccup -hickey -hickie -hidden -hiders -hiding -hieing -hiemal -higgle -higher -highly -highth -hights -hijabs -hijack -hijrah -hijras -hikers -hiking -hilled -hiller -hilloa -hillos -hilted -hinder -hinged -hinger -hinges -hinted -hinter -hipped -hipper -hippie -hippos -hirees -hirers -hiring -hirple -hirsel -hirsle -hispid -hissed -hisser -hisses -histed -hither -hitman -hitmen -hitter -hiving -hoagie -hoards -hoarse -hoaxed -hoaxer -hoaxes -hobbed -hobber -hobbit -hobble -hobnob -hoboed -hoboes -hocked -hocker -hockey -hodads -hodden -hoddin -hoeing -hogans -hogged -hogger -hogget -hognut -hogtie -hoicks -hoiden -hoised -hoises -hoists -hokier -hokily -hoking -hokums -holard -holden -holder -holdup -holier -holies -holily -holing -holism -holist -holked -hollas -holler -holloa -holloo -hollos -hollow -holmic -holpen -homage -hombre -homely -homers -homeys -homier -homies -homily -homing -hominy -hommos -honans -honcho -hondas -hondle -honers -honest -honeys -honied -honing -honked -honker -honkey -honkie -honors -honour -hooded -hoodie -hoodoo -hooeys -hoofed -hoofer -hookah -hookas -hooked -hooker -hookey -hookup -hoolie -hooped -hooper -hoopla -hoopoe -hoopoo -hoorah -hooray -hootch -hooted -hooter -hooved -hoover -hooves -hopers -hoping -hopped -hopper -hopple -horahs -horary -horded -hordes -horned -hornet -horrid -horror -horsed -horses -horsey -horste -horsts -hosels -hosers -hoseys -hosier -hosing -hostas -hosted -hostel -hostly -hotbed -hotbox -hotdog -hotels -hotrod -hotted -hotter -hottie -houdah -hounds -houris -hourly -housed -housel -houser -houses -hovels -hovers -howdah -howdie -howffs -howked -howled -howler -howlet -hoyden -hoyles -hryvna -hubbly -hubbub -hubcap -hubris -huckle -huddle -huffed -hugely -hugest -hugged -hugger -huipil -hulked -hulled -huller -hulloa -hulloo -hullos -humane -humans -humate -humble -humbly -humbug -humeri -hummed -hummer -hummus -humors -humour -humped -humper -humphs -humvee -hunger -hungry -hunker -hunkey -hunkie -hunted -hunter -huppah -hurdle -hurled -hurler -hurley -hurrah -hurray -hursts -hurter -hurtle -hushed -hushes -husked -husker -hussar -hustle -hutted -hutzpa -huzzah -huzzas -hyaena -hyalin -hybrid -hybris -hydrae -hydras -hydria -hydric -hydrid -hydros -hyenas -hyenic -hyetal -hymens -hymnal -hymned -hyoids -hypers -hyphae -hyphal -hyphen -hyping -hypnic -hypoed -hysons -hyssop -iambic -iambus -iatric -ibexes -ibices -ibidem -ibises -icebox -icecap -iceman -icemen -ichors -icicle -iciest -icings -ickers -ickier -ickily -icones -iconic -ideals -ideate -idiocy -idioms -idiots -idlers -idlest -idling -idylls -iffier -igging -igloos -ignify -ignite -ignore -iguana -ihrams -ilexes -iliads -illest -illite -illude -illume -imaged -imager -images -imagos -imaret -imaums -imbalm -imbark -imbeds -imbibe -imbody -imbrue -imbued -imbues -imides -imidic -imines -immane -immesh -immies -immune -immure -impact -impair -impala -impale -impark -impart -impawn -impede -impels -impend -imphee -imping -impish -impled -impone -import -impose -impost -improv -impugn -impure -impute -inaner -inanes -inarch -inarms -inborn -inbred -incage -incant -incase -incent -incept -incest -inched -incher -inches -incise -incite -inclip -incogs -income -incony -incubi -incult -incurs -incuse -indaba -indeed -indene -indent -indict -indies -indign -indigo -indite -indium -indole -indols -indoor -indows -indris -induce -induct -indued -indues -indult -inerts -infall -infamy -infant -infare -infect -infers -infest -infill -infirm -inflow -influx -infold -inform -infuse -ingate -ingest -ingles -ingots -ingulf -inhale -inhaul -inhere -inhume -inions -inject -injure -injury -inkers -inkier -inking -inkjet -inkles -inkpot -inlace -inlaid -inland -inlays -inlets -inlier -inmate -inmesh -inmost -innage -innate -inners -inning -inpour -inputs -inroad -inruns -inrush -insane -inseam -insect -insert -insets -inside -insist -insole -insoul -inspan -instal -instar -instep -instil -insult -insure -intact -intake -intend -intent -intern -inters -intima -intime -intine -intomb -intone -intort -intown -intron -intros -intuit -inturn -inulin -inured -inures -inurns -invade -invars -invent -invert -invest -invite -invoke -inwall -inward -inwind -inwove -inwrap -iodate -iodide -iodids -iodine -iodins -iodise -iodism -iodize -iodous -iolite -ionics -ionise -ionium -ionize -ionone -ipecac -irades -irater -ireful -irenic -irides -iridic -irised -irises -iritic -iritis -irking -irokos -ironed -ironer -irones -ironic -irreal -irrupt -isatin -ischia -island -islets -isling -isobar -isogon -isohel -isolog -isomer -isopod -isseis -issued -issuer -issues -isthmi -istles -italic -itched -itches -itemed -iterum -itself -ixodid -ixoras -ixtles -izzard -jabbed -jabber -jabiru -jabots -jacals -jacana -jackal -jacked -jacker -jacket -jading -jadish -jaeger -jagers -jagged -jagger -jagras -jaguar -jailed -jailer -jailor -jalaps -jalops -jalopy -jambed -jambes -jammed -jammer -jangle -jangly -japans -japers -japery -japing -jarful -jargon -jarina -jarrah -jarred -jarvey -jasmin -jasper -jassid -jauked -jaunce -jaunts -jaunty -jauped -jawans -jawing -jaygee -jayvee -jazzbo -jazzed -jazzer -jazzes -jeaned -jebels -jeeing -jeeped -jeered -jeerer -jehads -jejuna -jejune -jelled -jellos -jennet -jerboa -jereed -jerids -jerked -jerker -jerkin -jerrid -jersey -jessed -jesses -jested -jester -jesuit -jetlag -jetons -jetsam -jetsom -jetted -jetton -jetway -jewels -jewing -jezail -jibbed -jibber -jibers -jibing -jicama -jigged -jigger -jiggle -jiggly -jigsaw -jihads -jilted -jilter -jiminy -jimmie -jimper -jimply -jingal -jingko -jingle -jingly -jinked -jinker -jinnee -jinnis -jinxed -jinxes -jitney -jitter -jivers -jivier -jiving -jnanas -jobbed -jobber -jockey -jockos -jocose -jocund -jogged -jogger -joggle -johnny -joined -joiner -joints -joists -jojoba -jokers -jokier -jokily -joking -jolted -jolter -jorams -jordan -jorums -joseph -joshed -josher -joshes -josses -jostle -jotted -jotter -jouals -jouked -joules -jounce -jouncy -journo -jousts -jovial -jowars -jowing -jowled -joyful -joying -joyous -joypop -jubbah -jubhah -jubile -judder -judged -judger -judges -judoka -jugate -jugful -jugged -juggle -jugula -jugums -juiced -juicer -juices -jujube -juking -juleps -jumbal -jumble -jumbos -jumped -jumper -juncos -jungle -jungly -junior -junked -junker -junket -junkie -juntas -juntos -jupons -jurant -jurats -jurels -juried -juries -jurist -jurors -justed -juster -justle -justly -jutted -kababs -kabaka -kabala -kabars -kabaya -kabiki -kabobs -kabuki -kaffir -kafirs -kaftan -kahuna -kaiaks -kainit -kaiser -kakapo -kalams -kalian -kalifs -kaliph -kalium -kalmia -kalong -kalpac -kalpak -kalpas -kamala -kamiks -kamsin -kanaka -kanban -kanjis -kantar -kanzus -kaolin -kaonic -kapoks -kappas -kaputt -karate -karats -karmas -karmic -karoos -kaross -karroo -karsts -kasbah -kashas -kasher -kation -kauris -kavass -kayaks -kayles -kayoed -kayoes -kazoos -kebabs -kebars -kebbie -keblah -kebobs -kecked -keckle -keddah -kedged -kedges -keeked -keeled -keened -keener -keenly -keeper -keeves -kefirs -kegged -kegger -kegler -keleps -kelims -keloid -kelped -kelpie -kelson -kelter -kelvin -kenafs -kendos -kenned -kennel -kentes -kepped -keppen -kerbed -kerfed -kermes -kermis -kerned -kernel -kernes -kerria -kersey -ketene -ketols -ketone -ketose -kettle -kevels -kevils -kewpie -keying -keypad -keypal -keyset -keyway -khadis -khakis -khalif -khaphs -khazen -khedah -khedas -kheths -khoums -kiangs -kiaugh -kibbeh -kibbes -kibbis -kibble -kibeis -kibitz -kiblah -kiblas -kibosh -kicked -kicker -kickup -kidded -kidder -kiddie -kiddos -kidnap -kidney -kidvid -kilims -killed -killer -killie -kilned -kilted -kilter -kiltie -kimchi -kimono -kinara -kinase -kinder -kindle -kindly -kinema -kinged -kingly -kinins -kinked -kiosks -kipped -kippen -kipper -kirned -kirsch -kirtle -kishka -kishke -kismat -kismet -kissed -kisser -kisses -kitbag -kiters -kithed -kithes -kiting -kitsch -kitted -kittel -kitten -kittle -klatch -klaxon -klepht -klepto -klicks -klongs -kloofs -kludge -kludgy -kluged -kluges -klutzy -knacks -knarry -knaurs -knaves -knawel -knawes -kneads -kneels -knells -knifed -knifer -knifes -knight -knives -knobby -knocks -knolls -knolly -knosps -knotty -knouts -knower -knowns -knubby -knurls -knurly -koalas -kobold -koines -kolhoz -kolkoz -kombus -konked -koodoo -kookie -kopeck -kopeks -kopjes -koppas -koppie -korats -kormas -koruna -koruny -kosher -kotows -koumis -koumys -kouroi -kouros -kousso -kowtow -kraals -krafts -kraits -kraken -krater -krauts -kreeps -krewes -krills -krises -kronen -kroner -kronor -kronur -krooni -kroons -krubis -krubut -kuchen -kudzus -kugels -kukris -kulaki -kulaks -kultur -kumiss -kummel -kurgan -kurtas -kussos -kuvasz -kvases -kvells -kvetch -kwacha -kwanza -kyacks -kybosh -kyries -kythed -kythes -laager -labara -labels -labial -labile -labium -labors -labour -labret -labrum -lacers -laches -lacier -lacily -lacing -lacked -lacker -lackey -lactam -lactic -lacuna -lacune -ladder -laddie -ladens -laders -ladies -lading -ladino -ladled -ladler -ladles -ladron -lagans -lagend -lagers -lagged -lagger -lagoon -laguna -lagune -lahars -laical -laichs -laighs -lairds -laired -lakers -lakier -laking -lallan -lalled -lambda -lambed -lamber -lambie -lamedh -lameds -lamely -lament -lamest -lamiae -lamias -lamina -laming -lammed -lampad -lampas -lamped -lanais -lanate -lanced -lancer -lances -lancet -landau -landed -lander -lanely -langue -langur -lanker -lankly -lanner -lanose -lanugo -laogai -lapdog -lapels -lapful -lapins -lapped -lapper -lappet -lapsed -lapser -lapses -lapsus -laptop -larded -larder -lardon -larees -larger -larges -largos -lariat -larine -larked -larker -larrup -larums -larvae -larval -larvas -larynx -lascar -lasers -lashed -lasher -lashes -lasing -lasses -lassie -lassis -lassos -lasted -laster -lastly -lateen -lately -latens -latent -latest -lathed -lather -lathes -lathis -latigo -latina -latino -latish -latkes -latria -latten -latter -lattes -lattin -lauans -lauded -lauder -laughs -launce -launch -laurae -lauras -laurel -lavabo -lavage -lavash -laveer -lavers -laving -lavish -lawful -lawine -lawing -lawman -lawmen -lawyer -laxest -laxity -layers -laying -layins -layman -laymen -layoff -layout -layups -lazars -lazied -lazier -lazies -lazily -lazing -lazuli -leachy -leaded -leaden -leader -leafed -league -leaked -leaker -leally -lealty -leaned -leaner -leanly -leaped -leaper -learns -learnt -leased -leaser -leases -leasts -leaved -leaven -leaver -leaves -lebens -leched -lecher -leches -lechwe -lectin -lector -ledger -ledges -leered -leeway -lefter -legacy -legals -legate -legato -legend -legers -legged -leggin -legion -legist -legits -legman -legmen -legong -legume -lehuas -lekked -lekvar -lemans -lemmas -lemons -lemony -lemurs -lender -length -lenite -lenity -lensed -lenses -lenten -lentic -lentil -lentos -leones -lepers -leptin -lepton -lesbos -lesion -lessee -lessen -lesser -lesson -lessor -lethal -lethes -letted -letter -letups -leucin -leudes -leukon -levant -leveed -levees -levels -levers -levied -levier -levies -levins -levity -lewder -lewdly -lexeme -lexica -lezzes -lezzie -liable -liaise -lianas -lianes -liangs -liards -libber -libels -libers -libido -liblab -librae -libras -lichee -lichen -liches -lichis -lichts -licked -licker -lictor -lidars -lidded -lieder -liefer -liefly -lieges -lienal -lierne -liever -lifers -lifted -lifter -ligand -ligans -ligase -ligate -ligers -lights -lignan -lignin -ligula -ligule -ligure -likely -likens -likers -likest -liking -likuta -lilacs -lilied -lilies -lilted -limans -limbas -limbed -limber -limbic -limbos -limbus -limens -limeys -limier -limina -liming -limits -limmer -limned -limner -limnic -limpas -limped -limper -limpet -limpid -limply -limpsy -limuli -linacs -linage -linden -lineal -linear -linens -lineny -liners -lineup -lingam -lingas -linger -lingua -linier -lining -linins -linked -linker -linkup -linnet -linsey -linted -lintel -linter -lintol -linums -lipase -lipide -lipids -lipins -lipoid -lipoma -lipped -lippen -lipper -liquid -liquor -liroth -lisles -lisped -lisper -lissom -listed -listee -listel -listen -lister -litany -litchi -liters -lither -lithia -lithic -lithos -litmus -litres -litten -litter -little -lively -livens -livers -livery -livest -livier -living -livres -livyer -lizard -llamas -llanos -loaded -loader -loafed -loafer -loamed -loaned -loaner -loathe -loaves -lobate -lobbed -lobber -lobule -locale -locals -locate -lochan -lochia -locked -locker -locket -lockup -locoed -locoes -locule -loculi -locums -locust -lodens -lodged -lodger -lodges -lofted -lofter -logans -logged -logger -loggia -loggie -logics -logier -logily -logins -logion -logjam -logons -logway -loided -loiter -lolled -loller -lollop -lomein -loment -lonely -loners -longan -longed -longer -longes -longly -looeys -loofah -loofas -looies -looing -looked -looker -lookup -loomed -looney -loonie -looped -looper -loosed -loosen -looser -looses -looted -looter -lopers -loping -lopped -lopper -loquat -lorans -lorded -lordly -loreal -lorica -lories -losels -losers -losing -losses -lotahs -lotion -lotted -lotter -lottes -lottos -louche -louden -louder -loudly -loughs -louies -loumas -lounge -loungy -louped -loupen -loupes -loured -loused -louses -louted -louver -louvre -lovage -lovats -lovely -lovers -loving -lowboy -lowers -lowery -lowest -lowing -lowish -loxing -lubber -lubing -lubric -lucent -lucern -lucite -lucked -luckie -lucres -luetic -luffas -luffed -lugers -lugged -lugger -luggie -luging -lulled -luller -lumbar -lumber -lumens -lumina -lummox -lumped -lumpen -lumper -lunacy -lunars -lunate -lunets -lungan -lunged -lungee -lunger -lunges -lungis -lungyi -lunier -lunies -lunker -lunted -lunula -lunule -lupine -lupins -lupous -lurdan -lurers -luring -lurked -lurker -lushed -lusher -lushes -lushly -lusted -luster -lustra -lustre -luteal -lutein -luteum -luting -lutist -lutzes -luxate -luxury -lyases -lycees -lyceum -lychee -lyches -lycras -lyings -lymphs -lynxes -lyrate -lyrics -lyrism -lyrist -lysate -lysine -lysing -lysins -lyssas -lyttae -lyttas -macaco -macaws -macers -maches -machos -macing -mackle -macled -macles -macons -macron -macros -macula -macule -madame -madams -madcap -madded -madden -madder -madman -madmen -madras -madres -madtom -maduro -maenad -maffia -mafias -maftir -maggot -magian -magics -magilp -maglev -magmas -magnet -magnum -magots -magpie -maguey -mahoes -mahout -mahzor -maiden -maigre -maihem -mailed -mailer -mailes -maills -maimed -maimer -mainly -maists -maizes -majors -makars -makers -makeup -making -makuta -malady -malars -malate -malfed -malgre -malice -malign -maline -malkin -malled -mallee -mallei -mallet -mallow -maloti -malted -maltha -maltol -mambas -mambos -mameys -mamies -mamluk -mammae -mammal -mammas -mammee -mammer -mammet -mammey -mammie -mammon -mamzer -manage -manana -manats -manche -manege -manful -mangas -mangel -manger -manges -mangey -mangle -mangos -maniac -manias -manics -manila -manioc -manito -manitu -mannan -mannas -manned -manner -manors -manque -manses -mantas -mantel -mantes -mantic -mantid -mantis -mantle -mantra -mantua -manual -manure -maples -mapped -mapper -maquis -maraca -maraud -marble -marbly -marcel -margay -marges -margin -marina -marine -marish -markas -marked -marker -market -markka -markup -marled -marlin -marmot -maroon -marque -marram -marred -marrer -marron -marrow -marses -marshy -marted -marten -martin -martyr -marvel -masala -mascon -mascot -masers -mashed -masher -mashes -mashie -masjid -masked -maskeg -masker -masons -masque -massif -masted -master -mastic -mastix -maters -mateys -matier -mating -matins -matres -matrix -matron -matsah -matted -matter -mattes -mattin -mature -matzah -matzas -matzoh -matzos -matzot -mauger -maugre -mauled -mauler -maumet -maunds -maundy -mauves -mavens -mavies -mavins -mawing -maxima -maxims -maxing -maxixe -maybes -mayday -mayest -mayfly -mayhap -mayhem -maying -mayors -maypop -mayvin -mazard -mazers -mazier -mazily -mazing -mazuma -mbiras -meadow -meager -meagre -mealie -meaner -meanie -meanly -measle -measly -meatal -meated -meatus -meccas -medaka -medals -meddle -medfly -mediad -mediae -medial -median -medias -medick -medico -medics -medina -medium -medius -medlar -medley -medusa -meeker -meekly -meeter -meetly -megara -megilp -megohm -megrim -mehndi -meikle -meinie -melded -melder -melees -melena -melled -mellow -melody -meloid -melons -melted -melter -melton -member -memoir -memory -menace -menads -menage -mended -mender -menhir -menial -meninx -mensae -mensal -mensas -mensch -mensed -menses -mental -mentee -mentor -mentum -menudo -meoued -meowed -mercer -merces -merdes -merely -merest -merged -mergee -merger -merges -merino -merits -merles -merlin -merlon -merlot -merman -mermen -mescal -meshed -meshes -mesial -mesian -mesnes -mesons -messan -messed -messes -mestee -metage -metals -metate -meteor -metepa -meters -method -methyl -metier -meting -metols -metope -metred -metres -metric -metros -mettle -metump -mewing -mewled -mewler -mezcal -mezuza -mezzos -miaous -miaows -miasma -miasms -miauls -micell -miched -miches -mickey -mickle -micron -micros -midair -midcap -midday -midden -middle -midges -midget -midgut -midleg -midrib -midsts -midway -miffed -miggle -mights -mighty -mignon -mihrab -mikado -miking -mikron -mikvah -mikveh -mikvos -mikvot -miladi -milady -milage -milded -milden -milder -mildew -mildly -milers -milieu -milium -milked -milker -milled -miller -milles -millet -milneb -milord -milpas -milted -milter -mimbar -mimeos -mimers -mimics -miming -mimosa -minced -mincer -minces -minded -minder -miners -mingle -minify -minima -minims -mining -minion -minish -minium -minkes -minnow -minors -minted -minter -minuet -minute -minxes -minyan -mioses -miosis -miotic -mirage -mirier -miring -mirins -mirker -mirror -mirths -mirzas -misact -misadd -misaim -misate -miscue -miscut -misdid -miseat -misers -misery -misfed -misfit -mishap -miskal -mislay -misled -mislie -mislit -mismet -mispen -missal -missay -missed -missel -misses -misset -missis -missus -misted -mister -misuse -miters -mither -mitier -mitral -mitred -mitres -mitten -mixers -mixing -mixups -mizens -mizuna -mizzen -mizzle -mizzly -moaned -moaner -moated -mobbed -mobber -mobcap -mobile -mobled -mochas -mocked -mocker -mockup -modals -models -modems -modern -modest -modica -modify -modish -module -moduli -modulo -mogged -moggie -moghul -moguls -mohair -mohawk -mohels -mohurs -moiety -moiled -moiler -moirai -moires -mojoes -molars -molded -molder -molies -moline -mollah -mollie -moloch -molted -molten -molter -moment -mommas -momser -momzer -monads -mondes -mondos -moneys -monger -mongoe -mongol -mongos -mongst -monied -monies -monish -monism -monist -monkey -monody -montes -months -mooing -moolah -moolas -mooley -mooned -mooner -moored -mooted -mooter -mopeds -mopers -mopery -mopier -moping -mopish -mopoke -mopped -mopper -moppet -morale -morals -morays -morbid -moreen -morels -morgan -morgen -morgue -morion -morons -morose -morpho -morphs -morris -morros -morrow -morsel -mortal -mortar -morula -mosaic -moseys -moshav -moshed -mosher -moshes -mosque -mossed -mosser -mosses -mostly -motels -motets -mother -motifs -motile -motion -motive -motley -motmot -motors -mottes -mottle -mottos -moujik -moulds -mouldy -moulin -moults -mounds -mounts -mourns -moused -mouser -mouses -mousey -mousse -mouths -mouthy -mouton -movers -movies -moving -mowers -mowing -moxies -muches -muchly -mucins -mucked -mucker -muckle -mucluc -mucoid -mucors -mucosa -mucose -mucous -mudbug -mudcap -mudcat -mudded -mudder -muddle -muddly -mudhen -mudras -muesli -muffed -muffin -muffle -muftis -mugful -muggar -mugged -muggee -mugger -muggur -mughal -mujiks -mukluk -muktuk -mulcts -muleta -muleys -muling -mulish -mullah -mullas -mulled -mullen -muller -mullet -mulley -mumble -mumbly -mummed -mummer -mumped -mumper -mungos -muntin -muonic -murals -murder -murein -murids -murine -muring -murker -murkly -murmur -murphy -murras -murres -murrey -murrha -muscae -muscat -muscid -muscle -muscly -musers -museum -mushed -musher -mushes -musick -musics -musing -musjid -muskeg -musket -muskie -muskit -muskox -muslin -mussed -mussel -musses -musted -mustee -muster -musths -mutant -mutase -mutate -mutely -mutest -mutine -muting -mutiny -mutism -mutons -mutter -mutton -mutual -mutuel -mutule -muumuu -muzhik -muzjik -muzzle -myases -myasis -mycele -myelin -mylars -mynahs -myomas -myopes -myopia -myopic -myoses -myosin -myosis -myotic -myriad -myrica -myrrhs -myrtle -myself -mysids -mysost -mystic -mythic -mythoi -mythos -myxoid -myxoma -nabbed -nabber -nabobs -nachas -naches -nachos -nacred -nacres -nadirs -naevus -naffed -nagana -nagged -nagger -naiads -nailed -nailer -nairas -nairus -naiver -naives -nakfas -naleds -namely -namers -naming -nances -nandin -nanism -nankin -nannie -napalm -napery -napkin -nappas -napped -napper -nappes -nappie -narcos -narial -narine -narked -narrow -narwal -nasals -nasial -nasion -nastic -natant -nation -native -natron -natter -nature -naught -nausea -nautch -navaid -navars -navels -navies -nawabs -naysay -nazify -nearby -neared -nearer -nearly -neaten -neater -neatly -nebula -nebule -nebuly -necked -necker -nectar -needed -needer -needle -negate -neighs -nekton -nellie -nelson -neocon -neoned -nepeta -nephew -nereid -nereis -neroli -nerols -nerved -nerves -nesses -nested -nester -nestle -nestor -nether -netops -netted -netter -nettle -nettly -neumes -neumic -neural -neuron -neuter -nevoid -newbie -newels -newest -newies -newish -newsie -newton -niacin -nibbed -nibble -nicads -nicely -nicest -nicety -niched -niches -nicked -nickel -nicker -nickle -nicols -nidate -nidget -nidify -niding -nieces -nielli -niello -nieves -niffer -nigger -niggle -niggly -nighed -nigher -nights -nighty -nihils -nilgai -nilgau -nilled -nimble -nimbly -nimbus -nimmed -nimrod -ninety -ninjas -ninons -ninths -niobic -nipped -nipper -nipple -niseis -niters -nitery -nitons -nitres -nitric -nitrid -nitril -nitros -nitwit -nixies -nixing -nizams -nobble -nobler -nobles -nobody -nocent -nocked -nodded -nodder -noddle -nodose -nodous -nodule -noesis -noetic -nogged -noggin -noised -noises -nomads -nomina -nomism -nonage -nonart -nonces -noncom -nonego -nonets -nonfan -nonfat -nongay -nonman -nonmen -nonpar -nontax -nonuse -nonwar -nonyls -noodge -noodle -noogie -nookie -noosed -nooser -nooses -nopals -nordic -norias -norite -normal -normed -norths -noshed -nosher -noshes -nosier -nosily -nosing -nostoc -notary -notate -noters -nother -notice -notify -noting -notion -nougat -nought -nounal -nouses -novels -novena -novice -noways -nowise -noyade -nozzle -nuance -nubbin -nubble -nubbly -nubias -nubile -nubuck -nuchae -nuchal -nuclei -nudely -nudest -nudged -nudger -nudges -nudies -nudism -nudist -nudity -nudnik -nugget -nuking -nullah -nulled -numbat -numbed -number -numbly -numina -nuncio -nuncle -nurled -nursed -nurser -nurses -nutant -nutate -nutlet -nutmeg -nutria -nuzzle -nyalas -oafish -oakier -oakums -oaring -oaters -obeahs -obelia -obelus -obento -obeyed -obeyer -obiism -object -objets -oblast -oblate -oblige -oblong -oboist -oboles -obolus -obsess -obtain -obtect -obtest -obtund -obtuse -obvert -occult -occupy -occurs -oceans -ocelli -ocelot -ochers -ochery -ochone -ochrea -ochred -ochres -ocicat -ockers -ocreae -octads -octane -octans -octant -octave -octavo -octets -octopi -octroi -octyls -ocular -oculus -oddest -oddish -oddity -odeons -odeums -odious -odists -odiums -odored -odours -odyles -oedema -oeuvre -offals -offcut -offend -offers -office -offing -offish -offkey -offset -oftest -ogdoad -oghams -ogival -ogives -oglers -ogling -ogress -ogrish -ogrism -ohmage -oidium -oilcan -oilcup -oilers -oilier -oilily -oiling -oilman -oilmen -oilway -oinked -okapis -okayed -oldest -oldies -oldish -oleate -olefin -oleine -oleins -oleums -olingo -olives -omasum -ombers -ombres -omegas -omelet -omened -omenta -onager -onagri -onions -oniony -onlays -online -onload -onrush -onsets -onside -onuses -onward -onyxes -oocyst -oocyte -oodles -oogamy -oogeny -oohing -oolite -oolith -oology -oolong -oomiac -oomiak -oompah -oomphs -oorali -ootids -oozier -oozily -oozing -opaque -opened -opener -openly -operas -operon -ophite -opiate -opined -opines -opioid -opiums -oppose -oppugn -opsins -optics -optima -optime -opting -option -opuses -orache -oracle -orally -orange -orangs -orangy -orated -orates -orator -orbier -orbing -orbits -orcein -orchid -orchil -orchis -orcins -ordain -ordeal -orders -ordure -oreads -oreide -orfray -organs -orgone -oribis -oriels -orient -origan -origin -oriole -orisha -orison -orlons -orlops -ormers -ormolu -ornate -ornery -oroide -orphan -orphic -orpine -orpins -orrery -orrice -oryxes -oscine -oscula -oscule -osetra -osiers -osmics -osmium -osmole -osmols -osmose -osmous -osmund -osprey -ossein -ossify -osteal -ostium -ostler -ostomy -otalgy -others -otiose -otitic -otitis -ottars -ottava -otters -ouched -ouches -oughts -ounces -ouphes -ourang -ourari -ourebi -ousels -ousted -ouster -outact -outadd -outage -outask -outate -outbeg -outbid -outbox -outbuy -outbye -outcry -outdid -outeat -outers -outfit -outfly -outfox -outgas -outgun -outhit -outing -outjut -outlaw -outlay -outled -outlet -outlie -outman -output -outran -outrig -outrow -outrun -outsat -outsaw -outsay -outsee -outset -outsin -outsit -outvie -outwar -outwit -ouzels -ovally -overdo -overed -overly -ovibos -ovines -ovisac -ovoids -ovolos -ovonic -ovular -ovules -owlets -owlish -owners -owning -oxalic -oxalis -oxbows -oxcart -oxeyes -oxford -oxides -oxidic -oximes -oxlike -oxlips -oxtail -oxters -oxygen -oyezes -oyster -ozalid -ozones -ozonic -pablum -pacers -pachas -pacier -pacify -pacing -packed -packer -packet -packly -padauk -padded -padder -paddle -padles -padnag -padouk -padres -paeans -paella -paeons -paesan -pagans -pagers -paging -pagoda -pagods -paiked -painch -pained -paints -painty -paired -paisan -paisas -pajama -pakeha -pakora -palace -palais -palapa -palate -paleae -paleal -palely -palest -palets -palier -paling -palish -palled -pallet -pallia -pallid -pallor -palmar -palmed -palmer -palpal -palped -palpus -palter -paltry -pampas -pamper -panada -panama -pandas -pander -pandit -panels -panfry -panful -pangas -panged -pangen -panics -panier -panini -panino -panned -panner -pannes -panted -pantie -pantos -pantry -panzer -papacy -papain -papaws -papaya -papers -papery -papism -papist -pappus -papula -papule -papyri -parade -paramo -parang -paraph -parcel -pardah -pardee -pardie -pardon -parent -pareos -parers -pareus -pareve -parged -parges -parget -pargos -pariah -parian -paries -paring -parish -parity -parkas -parked -parker -parlay -parled -parles -parley -parlor -parody -parole -parols -parous -parral -parred -parrel -parrot -parsec -parsed -parser -parses -parson -partan -parted -partly -parton -parura -parure -parvis -parvos -pascal -paseos -pashas -pashed -pashes -pastas -pasted -pastel -paster -pastes -pastie -pastil -pastis -pastor -pastry -pataca -patchy -patens -patent -paters -pathos -patina -patine -patins -patios -patois -patrol -patron -patted -pattee -patten -patter -pattie -patzer -paulin -paunch -pauper -pausal -paused -pauser -pauses -pavane -pavans -paveed -pavers -paving -pavins -pavior -pavise -pawers -pawing -pawned -pawnee -pawner -pawnor -pawpaw -paxwax -payday -payees -payers -paying -paynim -payoff -payola -payors -payout -pazazz -peaced -peaces -peachy -peages -peahen -peaked -pealed -peanut -pearls -pearly -peasen -peases -peavey -pebble -pebbly -pecans -pechan -peched -pecked -pecker -pecten -pectic -pectin -pedalo -pedals -pedant -pedate -peddle -pedlar -pedler -pedros -peeing -peeked -peeled -peeler -peened -peered -peerie -pegged -peined -peised -peises -pekans -pekins -pekoes -pelage -pelite -pellet -pelmet -pelota -pelted -pelter -peltry -pelves -pelvic -pelvis -penang -pencel -pencil -pended -pengos -penial -penile -penman -penmen -pennae -penned -penner -pennia -pennis -pennon -pensee -pensil -pentad -pentyl -penult -penury -peones -people -pepino -peplos -peplum -peplus -pepped -pepper -pepsin -peptic -peptid -perdie -perdue -perdus -pereia -pereon -perils -period -perish -periti -perked -permed -permit -pernio -pernod -peroxy -perron -perses -person -perter -pertly -peruke -peruse -pesade -peseta -pesewa -pester -pestle -pestos -petals -petard -peters -petite -petnap -petrel -petrol -petsai -petted -petter -pettle -pewees -pewits -pewter -peyote -peyotl -phages -pharos -phased -phases -phasic -phasis -phatic -phenix -phenol -phenom -phenyl -phials -phizes -phlegm -phloem -phobia -phobic -phoebe -phonal -phoned -phones -phoney -phonic -phonon -phonos -phooey -photic -photog -photon -photos -phrase -phreak -phylae -phylar -phylic -phyllo -phylon -phylum -physed -physes -physic -physis -phytin -phytol -phyton -piaffe -pianic -pianos -piazza -piazze -pibals -picara -picaro -pickax -picked -picker -picket -pickle -pickup -picnic -picots -picric -piculs -piddle -piddly -pidgin -pieced -piecer -pieces -pieing -pierce -pietas -piffle -pigeon -pigged -piggie -piggin -piglet -pignus -pignut -pigout -pigpen -pigsty -pikake -pikers -piking -pilaff -pilafs -pilaus -pilaws -pileum -pileup -pileus -pilfer -piling -pillar -pilled -pillow -pilose -pilots -pilous -pilule -pimped -pimple -pimply -pinang -pinata -pincer -pinder -pineal -pinene -pinery -pineta -pinged -pinger -pingos -pinier -pining -pinion -pinite -pinked -pinken -pinker -pinkey -pinkie -pinkly -pinkos -pinnae -pinnal -pinnas -pinned -pinner -pinole -pinons -pinots -pintas -pintle -pintos -pinups -pinyin -pinyon -piolet -pionic -pipage -pipals -pipers -pipets -pipier -piping -pipits -pipkin -pipped -pippin -piqued -piques -piquet -piracy -pirana -pirate -piraya -pirogi -piscos -pistil -pistol -piston -pistou -pitaya -pitchy -pithed -pitied -pitier -pities -pitman -pitmen -pitons -pitsaw -pittas -pitted -pivots -pixels -pixies -pizazz -pizzas -pizzaz -pizzle -placed -placer -places -placet -placid -placks -plagal -plages -plague -plaguy -plaice -plaids -plains -plaint -plaits -planar -planch -planed -planer -planes -planet -planks -plants -plaque -plashy -plasma -plasms -platan -plated -platen -plater -plates -platys -playas -played -player -plazas -pleach -pleads -please -pleats -plebes -pledge -pleiad -plench -plenty -plenum -pleons -pleura -plexal -plexes -plexor -plexus -pliant -plicae -plical -pliers -plight -plinks -plinth -plisky -plisse -ploidy -plonks -plotty -plough -plover -plowed -plower -ployed -plucks -plucky -plumbs -plumed -plumes -plummy -plumps -plunge -plunks -plunky -plural -pluses -plushy -plutei -pluton -plyers -plying -pneuma -poachy -poboys -pocked -pocket -podded -podite -podium -podsol -podzol -poetic -poetry -pogeys -pogies -pogrom -poilus -poinds -pointe -points -pointy -poised -poiser -poises -poisha -poison -pokers -pokeys -pokier -pokies -pokily -poking -polars -polder -poleax -poleis -polers -poleyn -police -policy -polies -poling -polios -polish -polite -polity -polkas -polled -pollee -pollen -poller -pollex -polyol -polypi -polyps -pomace -pomade -pomelo -pommee -pommel -pommie -pompom -pompon -ponced -ponces -poncho -ponded -ponder -ponent -ponged -pongee -pongid -ponied -ponies -pontes -pontil -ponton -poodle -poohed -pooing -pooled -pooler -pooped -poorer -pooris -poorly -pooves -popery -popgun -popish -poplar -poplin -poppas -popped -popper -poppet -popple -popsie -poring -porism -porked -porker -pornos -porose -porous -portal -ported -porter -portly -posada -posers -poseur -posher -poshly -posies -posing -posits -posole -posses -posset -possum -postal -posted -poster -postie -postin -postop -potage -potash -potato -potboy -poteen -potent -potful -pother -pothos -potion -potman -potmen -potpie -potsie -potted -potter -pottle -pottos -potzer -pouchy -poufed -pouffe -pouffs -pouffy -poults -pounce -pounds -poured -pourer -pouted -pouter -powder -powers -powter -powwow -poxier -poxing -poyous -pozole -praams -prahus -praise -prajna -prance -prangs -pranks -prases -prated -prater -prates -prawns -praxes -praxis -prayed -prayer -preach -preact -preamp -prearm -prebid -prebuy -precis -precut -predry -preens -prefab -prefer -prefix -prelaw -prelim -preman -premed -premen -premie -premix -preops -prepay -preppy -preset -presto -prests -pretax -pretor -pretty -prevue -prewar -prexes -preyed -preyer -prezes -priapi -priced -pricer -prices -pricey -prided -prides -priers -priest -prills -primal -primas -primed -primer -primes -primly -primos -primps -primus -prince -prinks -prints -prions -priors -priory -prised -prises -prisms -prison -prissy -privet -prized -prizer -prizes -probed -prober -probes -probit -proems -profit -progun -projet -prolan -proleg -proles -prolix -prolog -promos -prompt -prongs -pronto -proofs -propel -proper -propyl -prosed -proser -proses -prosit -prosos -protea -protei -proton -protyl -proved -proven -prover -proves -prowar -prower -prowls -prudes -pruned -pruner -prunes -prunus -prutah -prutot -pryers -prying -psalms -pseudo -pseuds -pshaws -psocid -psyche -psycho -psychs -psylla -psyops -psywar -pterin -ptisan -ptooey -ptoses -ptosis -ptotic -public -pucker -puddle -puddly -pueblo -puffed -puffer -puffin -pugged -puggry -pugree -puisne -pujahs -puking -pulers -puling -pulled -puller -pullet -pulley -pullup -pulpal -pulped -pulper -pulpit -pulque -pulsar -pulsed -pulser -pulses -pumelo -pumice -pummel -pumped -pumper -punchy -pundit -pungle -punier -punily -punish -punjis -punkah -punkas -punker -punkey -punkie -punkin -punned -punner -punnet -punted -punter -puntos -pupate -pupils -pupped -puppet -purana -purdah -purdas -pureed -purees -purely -purest -purfle -purged -purger -purges -purify -purine -purins -purism -purist -purity -purled -purlin -purple -purply -purred -pursed -purser -purses -pursue -purvey -pushed -pusher -pushes -pushup -pusley -pusses -pussly -putlog -putoff -putons -putout -putrid -putsch -putted -puttee -putter -puttie -putzed -putzes -puzzle -pyemia -pyemic -pyjama -pyknic -pylons -pylori -pyoses -pyosis -pyrans -pyrene -pyrite -pyrola -pyrone -pyrope -pyrrol -python -pyuria -pyxies -qabala -qanats -qindar -qintar -qiviut -quacks -quacky -quaere -quaffs -quagga -quaggy -quahog -quaich -quaigh -quails -quaint -quaked -quaker -quakes -qualia -qualms -qualmy -quango -quanta -quants -quarks -quarry -quarte -quarto -quarts -quartz -quasar -quatre -quaver -qubits -qubyte -queans -queasy -queazy -queens -queers -quelea -quells -quench -querns -quests -queued -queuer -queues -quezal -quiche -quicks -quiets -quiffs -quills -quilts -quince -quinic -quinin -quinoa -quinol -quinsy -quinta -quinte -quints -quippu -quippy -quipus -quired -quires -quirks -quirky -quirts -quitch -quiver -quohog -quoins -quoits -quokka -quolls -quorum -quotas -quoted -quoter -quotes -quotha -qurush -qwerty -rabato -rabats -rabbet -rabbin -rabbis -rabbit -rabble -rabies -raceme -racers -rachet -rachis -racier -racily -racing -racked -racker -racket -rackle -racons -racoon -radars -radded -raddle -radial -radian -radios -radish -radium -radius -radome -radons -radula -raffia -raffle -rafted -rafter -ragbag -ragees -ragged -raggee -raggle -raging -raglan -ragman -ragmen -ragout -ragtag -ragtop -raided -raider -railed -railer -rained -raised -raiser -raises -raisin -raitas -rajahs -rakees -rakers -raking -rakish -rallye -ralphs -ramada -ramate -rambla -ramble -ramees -ramets -ramies -ramify -ramjet -rammed -rammer -ramona -ramose -ramous -ramped -ramrod -ramson -ramtil -rances -rancho -rancid -rancor -randan -random -ranees -ranged -ranger -ranges -ranids -ranked -ranker -rankle -rankly -ransom -ranted -ranter -ranula -rarefy -rarely -rarest -rarify -raring -rarity -rascal -rasers -rasher -rashes -rashly -rasing -rasped -rasper -rassle -raster -rasure -ratals -ratans -ratany -ratbag -ratels -raters -rather -ratify -ratine -rating -ration -ratios -ratite -ratlin -ratoon -rattan -ratted -ratten -ratter -rattle -rattly -ratton -raunch -ravage -ravels -ravens -ravers -ravine -raving -ravins -ravish -rawest -rawins -rawish -raxing -rayahs -raying -rayons -razeed -razees -razers -razing -razors -razzed -razzes -reacts -readds -reader -reagin -realer -reales -realia -really -realms -realty -reamed -reamer -reaped -reaper -reared -rearer -rearms -reason -reatas -reaved -reaver -reaves -reavow -rebait -rebars -rebate -rebato -rebbes -rebeck -rebecs -rebels -rebids -rebill -rebind -rebody -reboil -rebook -reboot -rebops -rebore -reborn -rebozo -rebred -rebuff -rebuke -rebury -rebuts -rebuys -recall -recane -recant -recaps -recast -recces -recede -recent -recept -recess -rechew -recipe -recite -recits -recked -reckon -reclad -recoal -recoat -recock -recode -recoil -recoin -recomb -recons -recook -recopy -record -recork -recoup -rectal -rector -rectos -rectum -rectus -recurs -recuse -recuts -redact -redans -redate -redbay -redbud -redbug -redcap -redded -redden -redder -reddle -redear -redeem -redefy -redeny -redeye -redfin -rediae -redial -redias -reding -redips -redipt -redleg -redock -redoes -redone -redons -redout -redowa -redraw -redrew -redtop -redubs -reduce -redyed -redyes -reearn -reecho -reechy -reeded -reedit -reefed -reefer -reeked -reeker -reeled -reeler -reemit -reests -reeved -reeves -reface -refall -refect -refeed -refeel -refell -refels -refelt -refers -reffed -refile -refill -refilm -refind -refine -refire -refits -reflag -reflet -reflew -reflex -reflow -reflux -refold -reform -refuel -refuge -refund -refuse -refute -regain -regale -regard -regave -regear -regent -reggae -regild -regilt -regime -regina -region -regius -regive -reglet -reglow -reglue -regnal -regnum -regret -regrew -regrow -reguli -rehabs -rehang -rehash -rehear -reheat -reheel -rehems -rehire -rehung -reigns -reined -reinks -reived -reiver -reives -reject -rejigs -rejoin -rekeys -reknit -reknot -relace -relaid -reland -relate -relays -relend -relent -relets -releve -relics -relict -relied -relief -relier -relies -reline -relink -relish -relist -relive -reload -reloan -relock -relook -reluct -relume -remade -remail -remain -remake -remand -remans -remaps -remark -remate -remedy -remeet -remelt -remend -remind -remint -remise -remiss -remits -remixt -remold -remora -remote -remove -remuda -renail -rename -rended -render -renege -renest -renews -renigs -renins -rennet -rennin -renown -rental -rented -renter -rentes -renvoi -reoils -reopen -repack -repaid -repair -repand -repark -repass -repast -repave -repays -repeal -repeat -repegs -repels -repent -reperk -repine -repins -replan -replay -repled -replot -replow -repoll -report -repose -repots -repour -repped -repros -repugn -repump -repute -requin -rerack -reread -rerent -rerigs -rerise -reroll -reroof -rerose -reruns -resaid -resail -resale -resawn -resaws -resays -rescue -reseal -reseat -reseau -resect -reseda -reseed -reseek -reseen -resees -resell -resend -resent -resets -resewn -resews -reshes -reship -reshod -reshoe -reshot -reshow -reside -resids -resift -resign -resile -resins -resiny -resist -resite -resits -resize -resoak -resods -resold -resole -resorb -resort -resown -resows -respot -rested -rester -result -resume -retack -retags -retail -retain -retake -retape -reteam -retear -retell -retems -retene -retest -retial -retied -reties -retile -retime -retina -retine -retint -retire -retold -retook -retool -retore -retorn -retort -retral -retrim -retros -retted -retune -return -retuse -retype -reused -reuses -revamp -reveal -revels -reverb -revere -revers -revert -revery -revest -revets -review -revile -revise -revive -revoke -revolt -revote -revues -revved -rewake -reward -rewarm -rewash -rewear -reweds -reweld -rewets -rewind -rewins -rewire -rewoke -reword -rewore -rework -reworn -rewove -rewrap -rexine -rezero -rezone -rhaphe -rhebok -rhemes -rhesus -rhetor -rheums -rheumy -rhinal -rhinos -rhodic -rhombi -rhombs -rhotic -rhumba -rhumbs -rhuses -rhymed -rhymer -rhymes -rhythm -rhyton -rialto -riatas -ribald -riband -ribbed -ribber -ribbon -ribier -riblet -ribose -ricers -richen -richer -riches -richly -ricing -ricins -ricked -rickey -ricrac -rictal -rictus -ridded -ridden -ridder -riddle -rident -riders -ridged -ridgel -ridges -ridgil -riding -ridley -riever -rifely -rifest -riffed -riffle -rifled -rifler -rifles -riflip -rifted -rigged -rigger -righto -rights -righty -rigors -rigour -riling -rilled -rilles -rillet -rimers -rimier -riming -rimmed -rimmer -rimose -rimous -rimple -rinded -ringed -ringer -rinsed -rinser -rinses -riojas -rioted -rioter -ripely -ripens -ripest -riping -ripoff -ripost -ripped -ripper -ripple -ripply -riprap -ripsaw -risers -rishis -rising -risked -risker -risque -ristra -ritard -ritter -ritual -ritzes -rivage -rivals -rivers -rivets -riving -riyals -roadeo -roadie -roamed -roamer -roared -roarer -roasts -robalo -roband -robbed -robber -robbin -robing -robins -robles -robots -robust -rochet -rocked -rocker -rocket -rococo -rodded -rodent -rodeos -rodman -rodmen -rogers -rogued -rogues -roiled -rolfed -rolfer -rolled -roller -romaji -romano -romans -romeos -romped -romper -rondel -rondos -ronion -ronnel -ronyon -roofed -roofer -roofie -rooked -rookie -roomed -roomer -roomie -roosed -rooser -rooses -roosts -rooted -rooter -rootle -ropers -ropery -ropier -ropily -roping -roques -roquet -rosary -roscoe -rosery -rosets -roshis -rosier -rosily -rosing -rosins -rosiny -roster -rostra -rotary -rotate -rotche -rotgut -rotors -rotted -rotten -rotter -rottes -rotund -rouble -rouche -rouens -rouged -rouges -roughs -roughy -rounds -rouped -roupet -roused -rouser -rouses -rousts -routed -router -routes -rouths -rovers -roving -rowans -rowels -rowens -rowers -rowing -rowths -royals -rozzer -ruanas -rubace -rubati -rubato -rubbed -rubber -rubble -rubbly -rubels -rubied -rubier -rubies -rubigo -rubles -ruboff -rubout -rubric -ruched -ruches -rucked -ruckle -ruckus -rudder -ruddle -rudely -rudery -rudest -rueful -ruffed -ruffes -ruffle -ruffly -rufous -rugate -rugged -rugger -rugola -rugosa -rugose -rugous -ruined -ruiner -rulers -rulier -ruling -rumaki -rumbas -rumble -rumbly -rumens -rumina -rummer -rumors -rumour -rumple -rumply -rumpus -rundle -runkle -runlet -runnel -runner -runoff -runout -runway -rupees -rupiah -rurban -rushed -rushee -rusher -rushes -rusine -russet -rusted -rustic -rustle -rutile -rutins -rutted -ryking -ryokan -sabals -sabbat -sabbed -sabers -sabine -sabins -sabirs -sables -sabots -sabras -sabred -sabres -sacbut -sachem -sachet -sacked -sacker -sacque -sacral -sacred -sacrum -sadden -sadder -saddhu -saddle -sadhes -sadhus -sadism -sadist -safari -safely -safest -safety -safrol -sagbut -sagely -sagest -saggar -sagged -sagger -sagier -sahibs -saices -saigas -sailed -sailer -sailor -saimin -sained -saints -saithe -saiyid -sajous -sakers -salaam -salads -salals -salami -salary -saleps -salify -salina -saline -saliva -sallet -sallow -salmis -salmon -salols -salons -saloon -saloop -salpae -salpas -salpid -salsas -salted -salter -saltie -saluki -salute -salved -salver -salves -salvia -salvor -salvos -samara -sambal -sambar -sambas -sambos -sambur -samech -samekh -sameks -samiel -samite -samlet -samosa -sampan -sample -samshu -sancta -sandal -sanded -sander -sandhi -sanely -sanest -sangar -sangas -sanger -sanghs -sanies -saning -sanity -sanjak -sannop -sannup -sansar -sansei -santir -santol -santos -santur -sapors -sapota -sapote -sapour -sapped -sapper -sarans -sarape -sardar -sarees -sarges -sargos -sarins -sarode -sarods -sarong -sarsar -sarsen -sartor -sashay -sashed -sashes -sasins -sassed -sasses -satang -satara -satays -sateen -sating -satins -satiny -satire -satori -satrap -satyrs -sauced -saucer -sauces -sauchs -sauger -saughs -saughy -saults -saunas -saurel -sauted -sautes -savage -savant -savate -savers -savine -saving -savins -savior -savors -savory -savour -savoys -sawers -sawfly -sawing -sawlog -sawney -sawyer -saxony -sayeds -sayers -sayest -sayids -saying -sayyid -scabby -scalar -scalds -scaled -scaler -scales -scalls -scalps -scampi -scamps -scants -scanty -scaped -scapes -scarab -scarce -scared -scarer -scares -scarey -scarfs -scarph -scarps -scarry -scarts -scathe -scatts -scatty -scaups -scaurs -scenas -scends -scenes -scenic -scents -schavs -schema -scheme -schism -schist -schizo -schizy -schlep -schlub -schmoe -schmos -schnoz -school -schorl -schrik -schrod -schtik -schuit -schuln -schuls -schuss -schwas -scilla -scions -sclaff -sclera -scoffs -scolds -scolex -sconce -scones -scooch -scoops -scoots -scoped -scopes -scorch -scored -scorer -scores -scoria -scorns -scotch -scoter -scotia -scours -scouse -scouth -scouts -scowed -scowls -scrags -scrams -scrape -scraps -scrawl -screak -scream -screed -screen -screes -screws -screwy -scribe -scried -scries -scrimp -scrims -scrips -script -scrive -scrods -scroll -scroop -scrota -scrubs -scruff -scrums -scubas -scuffs -sculch -sculks -sculls -sculps -sculpt -scummy -scurfs -scurfy -scurry -scurvy -scutch -scutes -scutum -scuzzy -scyphi -scythe -seabag -seabed -seadog -sealed -sealer -seaman -seamed -seamen -seamer -seance -search -seared -searer -season -seated -seater -seawan -seaway -sebums -secant -seccos -secede -secern -second -secpar -secret -sector -secund -secure -sedans -sedate -seders -sedges -sedile -seduce -sedums -seeded -seeder -seeing -seeker -seeled -seemed -seemer -seemly -seeped -seesaw -seethe -seggar -segnos -segued -segues -seiche -seidel -seined -seiner -seines -seised -seiser -seises -seisin -seisms -seisor -seitan -seized -seizer -seizes -seizin -seizor -sejant -selahs -seldom -select -selfed -selkie -seller -selles -selsyn -selvas -selves -sememe -semple -sempre -senary -senate -sendal -sended -sender -sendup -seneca -senega -senhor -senile -senior -seniti -sennas -sennet -sennit -senora -senors -senryu -sensed -sensei -senses -sensor -sensum -sentry -sepals -sepias -sepoys -sepses -sepsis -septal -septet -septic -septum -sequel -sequin -seracs -serail -serais -serape -seraph -serdab -serein -serene -serest -serged -serger -serges -serial -series -serifs -serine -sering -serins -sermon -serosa -serous -serows -serums -serval -served -server -serves -servos -sesame -sestet -setoff -setons -setose -setous -setout -settee -setter -settle -setups -sevens -severe -severs -sewage -sewans -sewars -sewers -sewing -shabby -shacko -shacks -shaded -shader -shades -shadow -shaduf -shafts -shaggy -shaird -shairn -shaken -shaker -shakes -shakos -shaled -shales -shaley -shalom -shaman -shamas -shamed -shames -shammy -shamos -shamoy -shamus -shandy -shanks -shanny -shanti -shanty -shaped -shapen -shaper -shapes -shards -shared -sharer -shares -sharia -sharif -sharks -sharns -sharny -sharps -sharpy -shaugh -shauls -shaved -shaven -shaver -shaves -shavie -shawed -shawls -shawms -shazam -sheafs -sheals -shears -sheath -sheave -sheens -sheeny -sheers -sheesh -sheets -sheeve -sheikh -sheiks -sheila -shekel -shells -shelly -shelta -shelty -shelve -shelvy -shends -sheols -sheqel -sherds -sherif -sherpa -sherry -sheuch -sheugh -shewed -shewer -shibah -shield -shiels -shiers -shiest -shifts -shifty -shikar -shiksa -shikse -shills -shimmy -shindy -shined -shiner -shines -shinny -shires -shirks -shirrs -shirts -shirty -shists -shivah -shivas -shiver -shives -shlepp -shleps -shlock -shlubs -shlump -shmear -shmoes -shmuck -shnaps -shnook -shoals -shoaly -shoats -shocks -shoddy -shoers -shofar -shogis -shogun -shojis -sholom -shooed -shooks -shools -shoots -shoppe -shoran -shored -shores -shorls -shorts -shorty -shotes -shotts -should -shouts -shoved -shovel -shover -shoves -showed -shower -shoyus -shrank -shreds -shrewd -shrews -shriek -shrift -shrike -shrill -shrimp -shrine -shrink -shrive -shroff -shroud -shrove -shrubs -shrugs -shrunk -shtetl -shtick -shtiks -shucks -shunts -shuted -shutes -shyers -shyest -shying -sialic -sialid -sibyls -siccan -sicced -sicked -sickee -sicken -sicker -sickie -sickle -sickly -sickos -siddur -siding -sidled -sidler -sidles -sieged -sieges -sienna -sierra -siesta -sieurs -sieved -sieves -sifaka -sifted -sifter -sighed -sigher -sights -sigils -sigloi -siglos -siglum -sigmas -signal -signed -signee -signer -signet -signor -silage -silane -sileni -silent -silica -silked -silken -silkie -siller -siloed -silted -silvae -silvan -silvas -silver -silvex -simars -simian -simile -simlin -simmer -simnel -simony -simoom -simoon -simper -simple -simply -sinews -sinewy -sinful -singed -singer -singes -single -singly -sinker -sinned -sinner -sinter -siphon -siping -sipped -sipper -sippet -sirdar -sirees -sirens -siring -sirrah -sirras -sirree -sirups -sirupy -sisals -siskin -sisses -sister -sistra -sitars -sitcom -siting -sitten -sitter -situps -sivers -sixmos -sixtes -sixths -sizars -sizers -sizier -sizing -sizzle -skalds -skated -skater -skates -skatol -skeane -skeans -skeens -skeets -skeigh -skeins -skells -skelms -skelps -skenes -skerry -sketch -skewed -skewer -skibob -skiddy -skidoo -skiers -skiffs -skiing -skills -skimos -skimps -skimpy -skinks -skinny -skirls -skirrs -skirts -skited -skites -skived -skiver -skives -skivvy -sklent -skoals -skorts -skulks -skulls -skunks -skunky -skybox -skycap -skying -skylit -skyman -skymen -skyway -slacks -slaggy -slaked -slaker -slakes -slalom -slangs -slangy -slants -slanty -slatch -slated -slater -slates -slatey -slaved -slaver -slaves -slavey -slayed -slayer -sleave -sleaze -sleazo -sleazy -sledge -sleeks -sleeky -sleeps -sleepy -sleets -sleety -sleeve -sleigh -sleuth -slewed -sliced -slicer -slices -slicks -slider -slides -sliest -slieve -slight -slimed -slimes -slimly -slimsy -slings -slinks -slinky -sliped -slipes -slippy -slipup -slitty -sliver -slobby -slogan -sloids -slojds -sloops -sloped -sloper -slopes -sloppy -sloshy -sloths -slouch -slough -sloven -slowed -slower -slowly -sloyds -sludge -sludgy -sluffs -sluice -sluicy -sluing -slummy -slumps -slurbs -slurps -slurry -slushy -slyest -slypes -smacks -smalls -smalti -smalto -smalts -smarms -smarmy -smarts -smarty -smazes -smears -smeary -smeeks -smegma -smells -smelly -smelts -smerks -smidge -smilax -smiled -smiler -smiles -smiley -smirch -smirks -smirky -smiter -smites -smiths -smithy -smocks -smoggy -smoked -smoker -smokes -smokey -smolts -smooch -smoosh -smooth -smudge -smudgy -smugly -smutch -smutty -snacks -snafus -snaggy -snails -snaked -snakes -snakey -snappy -snared -snarer -snares -snarfs -snarks -snarky -snarls -snarly -snatch -snathe -snaths -snawed -snazzy -sneaks -sneaky -sneaps -snecks -sneers -sneery -sneesh -sneeze -sneezy -snells -snicks -snider -sniffs -sniffy -sniped -sniper -snipes -snippy -snitch -snivel -snobby -snoods -snooks -snools -snoops -snoopy -snoots -snooty -snooze -snoozy -snored -snorer -snores -snorts -snotty -snouts -snouty -snowed -snubby -snuffs -snuffy -snugly -soaked -soaker -soaped -soaper -soared -soarer -soaves -sobbed -sobber -sobeit -sobers -sobful -socage -soccer -social -socked -socket -socles -socman -socmen -sodded -sodden -sodium -soever -sofars -soffit -softas -soften -softer -softie -softly -sogged -soigne -soiled -soiree -sokols -solace -soland -solano -solans -solate -soldan -solder -solely -solemn -soleus -solgel -solidi -solids -soling -solion -soloed -solons -solums -solute -solved -solver -solves -somans -somata -somber -sombre -somite -somoni -sonant -sonars -sonata -sonder -sondes -sonics -sonnet -sonsie -sooner -sooted -soothe -sooths -sopite -sopors -sopped -sorbed -sorbet -sorbic -sordid -sordor -sorels -sorely -sorest -sorgho -sorgos -soring -sorned -sorner -sorrel -sorrow -sorted -sorter -sortie -sotols -sotted -souari -soucar -soudan -soughs -sought -souled -sounds -souped -source -soured -sourer -sourly -soused -souses -souter -souths -soviet -sovran -sowans -sowars -sowcar -sowens -sowers -sowing -sozine -sozins -spaced -spacer -spaces -spacey -spaded -spader -spades -spadix -spahee -spahis -spails -spaits -spales -spalls -spanks -spared -sparer -spares -sparge -sparid -sparks -sparky -sparry -sparse -spasms -spates -spathe -spavie -spavin -spawns -spayed -speaks -speans -spears -specie -specks -speech -speedo -speeds -speedy -speels -speers -speils -speirs -speise -speiss -spells -spelts -speltz -spence -spends -spendy -spense -spewed -spewer -sphene -sphere -sphery -sphinx -sphynx -spicae -spicas -spiced -spicer -spices -spicey -spicks -spider -spiels -spiers -spiffs -spiffy -spigot -spiked -spiker -spikes -spikey -spiled -spiles -spills -spilth -spinal -spined -spinel -spines -spinet -spinny -spinor -spinto -spiral -spirea -spired -spirem -spires -spirit -spirts -spital -spited -spites -spivvy -splake -splash -splats -splays -spleen -splent -splice -spliff -spline -splint -splits -splore -splosh -spodes -spoils -spoilt -spoked -spoken -spokes -sponge -spongy -spoofs -spoofy -spooks -spooky -spools -spoons -spoony -spoors -sporal -spored -spores -sports -sporty -spotty -spouse -spouts -sprags -sprain -sprang -sprats -sprawl -sprays -spread -sprees -sprent -sprier -sprigs -spring -sprint -sprite -sprits -spritz -sprout -spruce -sprucy -sprues -sprugs -sprung -spryer -spryly -spuing -spumed -spumes -spunks -spunky -spurge -spurns -spurry -spying -squabs -squads -squall -squama -square -squark -squash -squats -squawk -squaws -squeak -squeal -squegs -squibs -squids -squill -squint -squire -squirm -squirt -squish -squush -sradha -stable -stably -stacks -stacte -stades -stadia -staffs -staged -stager -stages -stagey -staggy -staigs -stains -stairs -staked -stakes -stalag -staled -staler -stales -stalks -stalky -stalls -stamen -stamps -stance -stanch -stands -staned -stanes -stangs -stanks -stanol -stanza -stapes -staphs -staple -starch -stared -starer -stares -starry -starts -starve -stases -stasis -statal -stated -stater -states -static -statin -stator -statue -status -staved -staves -stayed -stayer -steads -steady -steaks -steals -steams -steamy -steeds -steeks -steels -steely -steeps -steers -steeve -steins -stelae -stelai -stelar -steles -stelic -stella -stemma -stemmy -stench -stenos -stents -steppe -stereo -steres -steric -sterna -sterns -sterol -stewed -stichs -sticks -sticky -stiffs -stifle -stigma -stiles -stills -stilly -stilts -stimes -stingo -stings -stingy -stinko -stinks -stinky -stints -stiped -stipel -stipes -stirks -stirps -stitch -stithy -stiver -stoats -stocks -stocky -stodge -stodgy -stogey -stogie -stoics -stoked -stoker -stokes -stoled -stolen -stoles -stolid -stolon -stomal -stomas -stomps -stoned -stoner -stones -stoney -stooge -stooks -stools -stoops -stoped -stoper -stopes -storax -stored -storer -stores -storey -storks -storms -stormy -stotin -stotts -stound -stoups -stoure -stours -stoury -stouts -stover -stoves -stowed -stowps -strafe -strain -strait -strake -strand -strang -straps -strass -strata -strath -strati -straws -strawy -strays -streak -stream -streek -streel -street -streps -stress -strewn -strews -striae -strick -strict -stride -strife -strike -string -stripe -strips -stript -stripy -strive -strobe -strode -stroke -stroll -stroma -strong -strook -strops -stroud -strove -strown -strows -stroys -struck -struma -strums -strung -strunt -struts -stubby -stucco -studio -studly -stuffs -stuffy -stulls -stumps -stumpy -stunts -stupas -stupes -stupor -sturdy -sturts -stying -stylar -styled -styler -styles -stylet -stylus -stymie -styrax -suable -suably -suaver -subahs -subbed -subdeb -subdue -subers -subfix -subgum -subito -sublet -sublot -submit -subnet -suborn -subpar -subsea -subset -subtle -subtly -suburb -subway -succah -succor -sucres -sudary -sudden -sudors -sudsed -sudser -sudses -sueded -suedes -suffer -suffix -sugars -sugary -sughed -suints -suited -suiter -suites -suitor -sukkah -sukkot -sulcal -sulcus -suldan -sulfas -sulfid -sulfur -sulked -sulker -sullen -sulpha -sultan -sultry -sumach -sumacs -summae -summas -summed -summer -summit -summon -sunbow -sundae -sunder -sundew -sundog -sundry -sunken -sunket -sunlit -sunnah -sunnas -sunned -sunray -sunset -suntan -sunups -superb -supers -supine -supped -supper -supple -supply -surahs -surely -surest -surety -surfed -surfer -surged -surger -surges -surimi -surras -surrey -surtax -survey -sushis -suslik -sussed -susses -sutler -sutras -suttas -suttee -suture -svaraj -svelte -swabby -swaged -swager -swages -swails -swains -swales -swamis -swamps -swampy -swanks -swanky -swanny -swaraj -swards -swarfs -swarms -swarth -swarty -swatch -swathe -swaths -swayed -swayer -swears -sweats -sweaty -swedes -sweeny -sweeps -sweepy -sweets -swells -swerve -sweven -swifts -swills -swimmy -swinge -swings -swingy -swinks -swiped -swipes -swiple -swirls -swirly -swishy -switch -swithe -swived -swivel -swives -swivet -swoons -swoony -swoops -swoopy -swoosh -swords -swound -swouns -syboes -sycees -sylphs -sylphy -sylvae -sylvan -sylvas -sylvin -symbol -synced -synchs -syncom -syndet -syndic -syngas -synods -syntax -synths -synura -sypher -syphon -syrens -syrinx -syrups -syrupy -sysops -system -syzygy -tabard -tabbed -tabbis -tabers -tablas -tabled -tables -tablet -taboos -tabors -tabour -tabued -tabuli -tabuns -taches -tacked -tacker -tacket -tackey -tackle -tactic -taenia -taffia -tafias -tagged -tagger -tagrag -tahini -tahsil -taigas -tailed -tailer -taille -tailor -taints -taipan -takahe -takers -takeup -taking -takins -talars -talced -talcky -talcum -talent -talers -talion -talked -talker -talkie -taller -tallis -tallit -tallol -tallow -talons -taluka -taluks -tamale -tamals -tamari -tambac -tambak -tambur -tamein -tamely -tamers -tamest -taming -tammie -tampan -tamped -tamper -tampon -tandem -tanged -tangle -tangly -tangos -tanist -tankas -tanked -tanker -tanned -tanner -tannic -tannin -tannoy -tanrec -tantra -tanuki -tapalo -tapers -tapeta -taping -tapirs -tapped -tapper -tappet -tarama -targes -target -tariff -taring -tarmac -tarnal -tarocs -taroks -tarots -tarpan -tarpon -tarred -tarres -tarsal -tarsia -tarsus -tartan -tartar -tarted -tarter -tartly -tarzan -tasked -tassel -tasses -tasset -tassie -tasted -taster -tastes -tatami -tatars -taters -tatsoi -tatted -tatter -tattie -tattle -tattoo -taught -taunts -tauons -taupes -tauted -tauten -tauter -tautly -tautog -tavern -tawdry -tawers -tawing -tawney -tawpie -tawsed -tawses -taxeme -taxers -taxied -taxies -taxing -taxite -taxman -taxmen -taxols -taxons -tazzas -teabox -teacup -teamed -teapot -teapoy -teared -tearer -teased -teasel -teaser -teases -teated -teazel -teazle -teched -techie -techno -tectal -tectum -tedded -tedder -tedium -teeing -teemed -teemer -teener -teensy -teepee -teeter -teethe -teflon -tegmen -teguas -teiids -teinds -tekkie -telcos -teledu -telega -telfer -telial -telium -teller -tellys -telnet -telome -telson -temped -tempeh -temper -temple -tempos -tempts -tenace -tenail -tenant -tended -tender -tendon -tendus -tenets -teniae -tenias -tenner -tennis -tenons -tenors -tenour -tenpin -tenrec -tensed -tenser -tenses -tensor -tented -tenter -tenths -tentie -tenues -tenuis -tenure -tenuti -tenuto -teopan -tepals -tepees -tepefy -tephra -tepoys -terais -teraph -terbia -terbic -tercel -terces -tercet -teredo -terete -tergal -tergum -termed -termer -termly -termor -ternes -terrae -terras -terret -territ -terror -terser -teslas -testae -tested -testee -tester -testes -testis -teston -tetany -tetchy -tether -tetrad -tetras -tetris -tetryl -tetter -tewing -thacks -thairm -thaler -thalli -thanes -thanks -tharms -thatch -thawed -thawer -thebes -thecae -thecal -thefts -thegns -theine -theins -theirs -theism -theist -themed -themes -thenal -thenar -thence -theory -theres -therme -therms -theses -thesis -thesps -thetas -thetic -thicks -thieve -thighs -thills -things -thinks -thinly -thiols -thiram -thirds -thirls -thirst -thirty -tholed -tholes -tholoi -tholos -thongs -thorax -thoria -thoric -thorns -thorny -thoron -thorpe -thorps -thoued -though -thrall -thrash -thrave -thrawn -thraws -thread -threap -threat -threep -threes -thresh -thrice -thrift -thrill -thrips -thrive -throat -throbs -throes -throne -throng -throve -thrown -throws -thrums -thrush -thrust -thujas -thulia -thumbs -thumps -thunks -thurls -thusly -thuyas -thwack -thwart -thymes -thymey -thymic -thymol -thymus -thyrse -thyrsi -tiaras -tibiae -tibial -tibias -ticals -ticced -ticked -ticker -ticket -tickle -tictac -tictoc -tidbit -tiddly -tidied -tidier -tidies -tidily -tiding -tieing -tiepin -tierce -tiered -tiffed -tiffin -tigers -tights -tiglon -tigons -tikkas -tilaks -tildes -tilers -tiling -tilled -tiller -tilted -tilter -tilths -timbal -timber -timbre -timely -timers -timing -tincal -tincts -tinder -tineal -tineas -tineid -tinful -tinged -tinges -tingle -tingly -tinier -tinily -tining -tinker -tinkle -tinkly -tinman -tinmen -tinned -tinner -tinpot -tinsel -tinted -tinter -tipcat -tipoff -tipped -tipper -tippet -tipple -tiptoe -tiptop -tirade -tiring -tirled -tisane -tissue -titans -tmeses -tmesis -toasts -toasty -tobies -tocher -tocsin -todays -toddle -todies -toecap -toeing -toffee -togaed -togate -togged -toggle -togues -toiled -toiler -toiles -toited -tokays -tokens -tokers -toking -tolane -tolans -tolars -toledo -toling -tolled -toller -toluic -toluid -toluol -toluyl -tolyls -tomans -tomato -tombac -tombak -tombal -tombed -tomboy -tomcat -tomcod -tommed -tomtit -tondos -toneme -toners -tongas -tonged -tonger -tongue -tonics -tonier -toning -tonish -tonlet -tonner -tonnes -tonsil -tooled -tooler -toonie -tooted -tooter -tooths -toothy -tootle -tootsy -topees -topers -topful -tophes -tophus -topics -toping -topped -topper -topple -toques -toquet -torahs -torchy -torero -torics -tories -toroid -torose -toroth -torous -torpid -torpor -torque -torrid -torses -torsks -torsos -tortas -torten -tortes -torula -toshes -tossed -tosser -tosses -tossup -totals -totems -toters -tother -toting -totted -totter -toucan -touche -touchy -toughs -toughy -toupee -toured -tourer -toused -touses -tousle -touted -touter -touzle -towage -toward -towels -towers -towery -towhee -towies -towing -townee -townie -toxics -toxine -toxins -toxoid -toyers -toying -toyish -toyons -traced -tracer -traces -tracks -tracts -traded -trader -trades -tragic -tragus -traiks -trails -trains -traits -tramel -tramps -trampy -trance -tranks -tranny -tranqs -trapan -trapes -trashy -trauma -travel -traves -trawls -treads -treats -treaty -treble -trebly -treens -trefah -tremor -trench -trends -trendy -trepan -trepid -tressy -trevet -triacs -triads -triage -trials -tribal -tribes -triced -tricep -trices -tricks -tricky -tricot -triene -triens -triers -trifid -trifle -trigly -trigon -trigos -trijet -trikes -trilby -trills -trimer -trimly -trinal -trined -trines -triode -triols -triose -tripes -triple -triply -tripod -tripos -trippy -triste -triter -triton -triune -trivet -trivia -troaks -trocar -troche -trocks -trogon -troika -troked -trokes -trolls -trolly -trompe -tromps -tronas -trones -troops -tropes -trophy -tropic -tropin -troths -trotyl -trough -troupe -trouts -trouty -trover -troves -trowed -trowel -trowth -truant -truced -truces -trucks -trudge -truest -truffe -truing -truism -trulls -trumps -trunks -trusts -trusty -truths -trying -tryout -tryste -trysts -tsades -tsadis -tsetse -tsking -tsktsk -tsores -tsoris -tsuris -tubate -tubbed -tubber -tubers -tubful -tubing -tubist -tubule -tuchun -tucked -tucker -tucket -tuffet -tufoli -tufted -tufter -tugged -tugger -tugrik -tuille -tuladi -tulips -tulles -tumble -tumefy -tumors -tumour -tumped -tumuli -tumult -tundra -tuners -tuneup -tunica -tunics -tuning -tunned -tunnel -tupelo -tupiks -tupped -tuques -turaco -turban -turbid -turbit -turbos -turbot -tureen -turfed -turgid -turgor -turion -turkey -turned -turner -turnip -turnon -turnup -turret -turtle -turves -tusche -tushed -tushes -tushie -tusked -tusker -tussah -tussal -tussar -tusseh -tusser -tusses -tussis -tussle -tussor -tussur -tutees -tutors -tutted -tuttis -tutued -tuxedo -tuyere -tuyers -twains -twangs -twangy -twanky -tweaks -tweaky -tweeds -tweedy -tweens -tweeny -tweets -tweeze -twelve -twenty -twerps -twibil -twiers -twiggy -twilit -twills -twined -twiner -twines -twinge -twirls -twirly -twirps -twists -twisty -twitch -twofer -twyers -tycoon -tymbal -tympan -tyning -typhon -typhus -typier -typify -typing -typist -tyrant -tyring -tythed -tythes -tzetze -tzuris -uakari -ubiety -ubique -udders -uglier -uglies -uglify -uglily -ugsome -uhlans -ukases -ulamas -ulcers -ulemas -ullage -ulster -ultima -ultimo -ultras -umamis -umbels -umbers -umbles -umbrae -umbral -umbras -umiack -umiacs -umiaks -umiaqs -umlaut -umping -umpire -unable -unaged -unakin -unarms -unawed -unaxed -unbale -unbans -unbars -unbear -unbelt -unbend -unbent -unbind -unbolt -unborn -unbred -unbusy -uncage -uncake -uncaps -uncase -uncast -unchic -unciae -uncial -uncini -unclad -uncles -unclip -unclog -uncoil -uncool -uncork -uncuff -uncurb -uncurl -uncute -undead -undies -undine -undock -undoer -undoes -undone -undraw -undrew -unduly -undyed -unease -uneasy -uneven -unfair -unfelt -unfits -unfixt -unfold -unfond -unfree -unfurl -ungird -ungirt -unglue -ungual -ungues -unguis -ungula -unhair -unhand -unhang -unhats -unhelm -unhewn -unholy -unhood -unhook -unhung -unhurt -unhusk -unific -unions -unipod -unique -unisex -unison -united -uniter -unites -unjams -unjust -unkend -unkent -unkept -unkind -unkink -unknit -unknot -unlace -unlade -unlaid -unlash -unlays -unlead -unless -unlike -unlink -unlive -unload -unlock -unmade -unmake -unmans -unmask -unmeet -unmesh -unmews -unmixt -unmold -unmoor -unmown -unnail -unopen -unpack -unpaid -unpegs -unpens -unpent -unpick -unpile -unpins -unplug -unpure -unread -unreal -unreel -unrent -unrest -unrigs -unripe -unrips -unrobe -unroll -unroof -unroot -unrove -unruly -unsafe -unsaid -unsawn -unsays -unseal -unseam -unseat -unseen -unsell -unsent -unsets -unsewn -unsews -unsexy -unshed -unship -unshod -unshut -unsnag -unsnap -unsold -unsown -unspun -unstep -unstop -unsung -unsunk -unsure -untack -untame -untidy -untied -unties -untold -untorn -untrim -untrod -untrue -untuck -untune -unused -unveil -unvext -unwary -unwell -unwept -unwind -unwise -unwish -unwits -unworn -unwove -unwrap -unyoke -unzips -upases -upbear -upbeat -upbind -upboil -upbore -upbows -upcast -upcoil -upcurl -updart -update -updive -updove -upends -upflow -upfold -upgaze -upgird -upgirt -upgrew -upgrow -upheap -upheld -uphill -uphold -uphove -uphroe -upkeep -upland -upleap -uplift -uplink -upload -upmost -uppers -uppile -upping -uppish -uppity -upprop -uprate -uprear -uprise -uproar -uproot -uprose -uprush -upsend -upsent -upsets -upshot -upside -upsize -upsoar -upstep -upstir -uptake -uptalk -uptear -uptick -uptilt -uptime -uptore -uptorn -uptoss -uptown -upturn -upwaft -upward -upwell -upwind -uracil -uraeus -urania -uranic -uranyl -urares -uraris -urases -urates -uratic -urbane -urbias -urchin -urease -uredia -uredos -ureide -uremia -uremic -ureter -uretic -urgent -urgers -urging -urials -urinal -urines -uropod -urping -ursids -ursine -urtext -uruses -usable -usably -usages -usance -useful -ushers -usneas -usques -usuals -usurer -usurps -uterus -utmost -utopia -utters -uveous -uvulae -uvular -uvulas -vacant -vacate -vacuum -vadose -vagary -vagile -vagrom -vaguer -vahine -vailed -vainer -vainly -vakeel -vakils -valets -valgus -valine -valise -valkyr -valley -valors -valour -valses -valued -valuer -values -valuta -valval -valvar -valved -valves -vamose -vamped -vamper -vandal -vandas -vanish -vanity -vanman -vanmen -vanned -vanner -vapors -vapory -vapour -varias -varied -varier -varies -varlet -varnas -varoom -varved -varves -vassal -vaster -vastly -vatful -vatted -vaults -vaulty -vaunts -vaunty -vaward -vealed -vealer -vector -veejay -veenas -veepee -veered -vegans -vegete -vegged -veggie -vegies -veiled -veiler -veinal -veined -veiner -velars -velate -velcro -veldts -vellum -veloce -velour -velure -velvet -vended -vendee -vender -vendor -vendue -veneer -venene -venery -venged -venges -venial -venine -venins -venire -venoms -venose -venous -vented -venter -venues -venule -verbal -verbid -verdin -verged -verger -verges -verier -verify -verily -verism -verist -verite -verity -vermes -vermin -vermis -vernal -vernix -versal -versed -verser -verses -verset -versos -verste -versts -versus -vertex -vertus -verves -vervet -vesica -vesper -vespid -vessel -vestal -vestas -vested -vestee -vestry -vetoed -vetoer -vetoes -vetted -vetter -vexers -vexils -vexing -viable -viably -vialed -viands -viatic -viator -vibist -vibrio -vicars -vicing -victim -victor -vicuna -videos -viewed -viewer -vigias -vigils -vigors -vigour -viking -vilely -vilest -vilify -villae -villas -villus -vimina -vinals -vincas -vineal -vinery -vinier -vinify -vining -vinous -vinyls -violas -violet -violin -vipers -virago -vireos -virgas -virgin -virile -virion -viroid -virtue -virtus -visaed -visage -visard -viscid -viscus -viseed -vising -vision -visits -visive -visors -vistas -visual -vitals -vitric -vittae -vittle -vivace -vivary -vivers -vivify -vixens -vizard -vizier -vizirs -vizors -vizsla -vocabs -vocals -vodkas -vodoun -vodous -voduns -vogued -voguer -vogues -voiced -voicer -voices -voided -voider -voiles -volant -volery -voling -volley -volost -voltes -volume -volute -volvas -volvox -vomers -vomica -voodoo -vortex -votary -voters -voting -votive -voudon -vowels -vowers -vowing -voyage -voyeur -vrooms -vrouws -vulgar -vulgus -vulvae -vulval -vulvar -vulvas -wabble -wabbly -wacker -wackes -wackos -wadded -wadder -waddie -waddle -waddly -waders -wadies -wading -wadmal -wadmel -wadmol -wadset -waeful -wafers -wafery -waffed -waffie -waffle -waffly -wafted -wafter -wagers -wagged -wagger -waggle -waggly -waggon -waging -wagons -wahine -wahoos -waifed -wailed -wailer -waired -waists -waited -waiter -waived -waiver -waives -wakame -wakens -wakers -wakiki -waking -walers -walies -waling -walked -walker -walkup -wallah -wallas -walled -wallet -wallie -wallop -wallow -walnut -walrus -wamble -wambly -wammus -wampum -wampus -wander -wandle -wangan -wangle -wangun -wanier -waning -wanion -wanned -wanner -wanted -wanter -wanton -wapiti -wapped -warble -warded -warden -warder -warier -warily -waring -warked -warmed -warmer -warmly -warmth -warmup -warned -warner -warped -warper -warred -warren -warsaw -warsle -warted -wasabi -washed -washer -washes -washup -wasted -waster -wastes -wastry -watape -wataps -waters -watery -watter -wattle -waucht -waught -wauked -wauled -wavers -wavery -waveys -wavier -wavies -wavily -waving -wawled -waxers -waxier -waxily -waxing -waylay -wazoos -weaken -weaker -weakly -weakon -wealds -wealth -weaned -weaner -weapon -wearer -weasel -weason -weaved -weaver -weaves -webbed -webcam -webers -webfed -weblog -wechts -wedded -wedder -wedeln -wedels -wedged -wedges -wedgie -weeded -weeder -weekly -weened -weenie -weensy -weeper -weepie -weeted -weever -weevil -weewee -weighs -weight -weiner -weirdo -weirds -weirdy -welded -welder -weldor -welkin -welled -wellie -welted -welter -wended -weskit -wester -wether -wetted -wetter -whacko -whacks -whacky -whaled -whaler -whales -whammo -whammy -whangs -wharfs -wharve -whaups -wheals -wheats -wheels -wheens -wheeps -wheeze -wheezy -whelks -whelky -whelms -whelps -whenas -whence -wheres -wherry -wherve -wheyey -whidah -whiffs -whiled -whiles -whilom -whilst -whimsy -whined -whiner -whines -whiney -whinge -whinny -whippy -whirls -whirly -whirrs -whirry -whisht -whisks -whisky -whists -whited -whiten -whiter -whites -whitey -whizzy -wholes -wholly -whomps -whomso -whoofs -whoops -whoosh -whored -whores -whorls -whorts -whosis -whumps -whydah -wiccan -wiccas -wiches -wicked -wicker -wicket -wicopy -widder -widdie -widdle -widely -widens -widest -widget -widish -widows -widths -wields -wieldy -wiener -wienie -wifely -wifeys -wifing -wigans -wigeon -wigged -wiggle -wiggly -wights -wiglet -wigwag -wigwam -wikiup -wilded -wilder -wildly -wilful -wilier -wilily -wiling -willed -willer -willet -willie -willow -wilted -wimble -wimmin -wimped -wimple -winced -wincer -winces -wincey -winded -winder -windle -window -windup -winery -winged -winger -winier -wining -winish -winked -winker -winkle -winned -winner -winnow -winoes -winter -wintle -wintry -winzes -wipers -wiping -wirers -wirier -wirily -wiring -wisdom -wisely -wisent -wisest -wished -wisher -wishes -wising -wisped -wissed -wisses -wisted -witans -witchy -withal -withed -wither -withes -within -witing -witney -witted -wittol -wivern -wivers -wiving -wizard -wizens -wizzen -wizzes -woaded -woalds -wobble -wobbly -wodges -woeful -wolfed -wolfer -wolver -wolves -womans -wombat -wombed -womera -wonder -wonned -wonner -wonted -wonton -wooded -wooden -woodie -woodsy -wooers -woofed -woofer -wooing -wooled -woolen -wooler -woolie -woolly -worded -worked -worker -workup -worlds -wormed -wormer -wormil -worrit -worsen -worser -worses -worset -worsts -worths -worthy -wotted -wounds -wovens -wowing -wowser -wracks -wraith -wrangs -wrasse -wraths -wrathy -wreaks -wreath -wrecks -wrench -wrests -wretch -wricks -wriest -wright -wrings -wrists -wristy -writer -writes -writhe -wrongs -wryest -wrying -wursts -wurzel -wusses -wuther -wyches -wyling -wyting -wyvern -xebecs -xenial -xenias -xenons -xylans -xylems -xylene -xyloid -xylols -xylose -xylyls -xyster -xystoi -xystos -xystus -yabber -yabbie -yachts -yacked -yaffed -yagers -yahoos -yairds -yakked -yakker -yakuza -yamens -yammer -yamuns -yanked -yanqui -yantra -yapock -yapoks -yapons -yapped -yapper -yarded -yarder -yarely -yarest -yarned -yarner -yarrow -yasmak -yatter -yauped -yauper -yaupon -yautia -yawing -yawled -yawned -yawner -yawped -yawper -yclept -yeaned -yearly -yearns -yeasts -yeasty -yecchs -yeelin -yelled -yeller -yellow -yelped -yelper -yenned -yentas -yentes -yeoman -yeomen -yerbas -yerked -yessed -yesses -yester -yeuked -yields -yipped -yippee -yippie -yirred -yirths -yobbos -yocked -yodels -yodled -yodler -yodles -yogees -yogini -yogins -yogurt -yoicks -yokels -yoking -yolked -yonder -yonker -youngs -youpon -youths -yowies -yowing -yowled -yowler -yttria -yttric -yuccas -yucked -yukked -yulans -yupons -yuppie -yutzes -zaddik -zaffar -zaffer -zaffir -zaffre -zaftig -zagged -zaikai -zaires -zamias -zanana -zander -zanier -zanies -zanily -zanzas -zapped -zapper -zareba -zariba -zayins -zazens -zealot -zeatin -zebeck -zebecs -zebras -zechin -zenana -zenith -zephyr -zeroed -zeroes -zeroth -zested -zester -zeugma -zibeth -zibets -zigged -zigzag -zillah -zinced -zincic -zincky -zinebs -zinged -zinger -zinnia -zipped -zipper -zirams -zircon -zither -zizith -zizzle -zlotys -zoaria -zocalo -zodiac -zoecia -zoftig -zombie -zombis -zonary -zonate -zoners -zoning -zonked -zonula -zonule -zooids -zooier -zoomed -zoonal -zooned -zorils -zoster -zouave -zounds -zoysia -zydeco -zygoid -zygoma -zygose -zygote -zymase \ No newline at end of file diff --git a/sources/html/show_document.php b/sources/html/show_document.php deleted file mode 100644 index 67ac28b..0000000 --- a/sources/html/show_document.php +++ /dev/null @@ -1,114 +0,0 @@ -Check(); -$g_user->check_dossier($gDossier); -set_language(); -/* Show the document */ -if ($action == 'sh') -{ - if ($g_user->check_action(VIEWDOC) == 1) - { - // retrieve the document - $doc = new Document($cn, $_REQUEST['d_id']); - $doc->Send(); - } -} -/* remove the document */ -if ($action == 'rm') -{ - $json='{"d_id":"-1"}'; - if ($g_user->check_action(RMDOC) == 1) - { - $doc = new Document($cn, $_REQUEST['d_id']); - $doc->remove(); - $json = sprintf('{"d_id":"%s"}', $_REQUEST['d_id']); - } - header("Content-type: text/html; charset: utf8", true); - print $json; -} -/* update the description of the document */ -if ( $action == "upd_doc") -{ - if ($g_user->check_action(VIEWDOC) == 1) - { - $doc = new Document($cn, $_REQUEST['d_id']); - $doc->get(); - if ( $g_user->can_write_action($doc->ag_id)) - // retrieve the document - $doc->update_description(strip_tags ($_REQUEST['value'])); - } - -} -/* remove the operation from action_gestion_operation */ -if ($action == 'rmop') -{ - $json = '{"ago_id":"-1"}'; - $dt_id = $cn->get_value("select ag_id from action_gestion_operation where ago_id=$1",array( $_REQUEST['id'])); - if ($g_user->check_action(RMDOC) == 1 && $g_user->can_write_action($dt_id) == true) - { - $cn->exec_sql("delete from action_gestion_operation where ago_id=$1", array($_REQUEST['id'])); - $json = sprintf('{"ago_id":"%s"}', $_REQUEST['id']); - } - header("Content-type: text/html; charset: utf8", true); - print $json; -} -/* remove the comment from action_gestion_operation */ -if ($action == 'rmcomment') -{ - $json = '{"agc_id":"-1"}'; - $dt_id = $cn->get_value("select ag_id from action_gestion_comment where agc_id=$1", array($_REQUEST['id'])); - if ($g_user->check_action(RMDOC) == 1 && $g_user->can_write_action($dt_id) == true) - { - $cn->exec_sql("delete from action_gestion_comment where agc_id=$1", array($_REQUEST['id'])); - $json = sprintf('{"agc_id":"%s"}', $_REQUEST['id']); - } - header("Content-type: text/html; charset: utf8", true); - print $json; -} -/* remove the action from action_gestion_operation */ -if ($action == 'rmaction') -{ - $json = '{"act_id":"-1"}'; - if ($g_user->check_action(RMDOC) == 1 && $g_user->can_write_action($_REQUEST['id']) == true && $g_user->can_write_action($_REQUEST['ag_id']) == true) - { - $cn->exec_sql("delete from action_gestion_related where aga_least=$1 and aga_greatest=$2", array($_REQUEST['id'], $_REQUEST['ag_id'])); - $cn->exec_sql("delete from action_gestion_related where aga_least=$2 and aga_greatest=$1", array($_REQUEST['id'], $_REQUEST['ag_id'])); - $json = sprintf('{"act_id":"%s"}', $_REQUEST['id']); - } - header("Content-type: text/html; charset: utf8", true); - print $json; -} diff --git a/sources/html/show_document_modele.php b/sources/html/show_document_modele.php deleted file mode 100644 index c641cb6..0000000 --- a/sources/html/show_document_modele.php +++ /dev/null @@ -1,70 +0,0 @@ -Check(); -set_language(); -if ( $g_user->check_module("CFGDOC") == 0 ) exit(); -// retrieve the document -$r=$cn->exec_sql("select md_id,md_lob,md_filename,md_mimetype - from document_modele where md_id=$1",array($_REQUEST['md_id'])); -if ( Database::num_row($r) == 0 ) -{ - echo_error("Invalid Document"); - exit; -} -$row=Database::fetch_array($r,0); - - -$cn->start(); - -$tmp=tempnam($_ENV['TMP'],'document_'); -$cn->lo_export($row['md_lob'],$tmp); -ini_set('zlib.output_compression','Off'); -header("Pragma: public"); -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); -header("Cache-Control: must-revalidate"); -header('Content-type: '.$row['md_mimetype']); -header('Content-Disposition: attachment;filename="'.$row['md_filename'].'"',FALSE); -header("Accept-Ranges: bytes"); -$file=fopen($tmp,'r'); -while ( !feof ($file) ) - echo fread($file,8192); - -fclose($file); - -unlink ($tmp); - -$cn->commit(); diff --git a/sources/html/show_pj.php b/sources/html/show_pj.php deleted file mode 100644 index 7563e82..0000000 --- a/sources/html/show_pj.php +++ /dev/null @@ -1,107 +0,0 @@ -Check(); -$g_user->check_dossier($gDossier); -if ( isNumber($jr_grpt_id) != 1 ) die (_('Données invalides')); - -// retrieve the jrn -$r=$cn->exec_sql("select jr_def_id from jrn where jr_grpt_id=$jr_grpt_id"); -if ( Database::num_row($r) == 0 ) -{ - echo_error("Invalid operation id jr_grpt_id=$jr_grpt_id"); - exit; -} -$a=Database::fetch_array($r,0); -$jrn=$a['jr_def_id']; - -if ($g_user->check_jrn($jrn) == 'X' ) -{ - /* Cannot Access */ - NoAccess(); - exit -1; -} - -$cn->start(); -$ret=$cn->exec_sql("select jr_pj,jr_pj_name,jr_pj_type from jrn where jr_grpt_id=$jr_grpt_id"); -if ( Database::num_row ($ret) == 0 ) - return; -$row=Database::fetch_array($ret,0); -if ( $row['jr_pj']==null ) -{ - ini_set('zlib.output_compression','Off'); - header("Pragma: public"); - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Cache-Control: must-revalidate"); - header('Content-type: '.'text/plain'); - header('Content-Disposition: attachment;filename=vide.txt',FALSE); - header("Accept-Ranges: bytes"); - echo "******************"; - echo _("Fichier effacé"); - echo "******************"; - exit(); -} -$tmp=tempnam($_ENV['TMP'],'document_'); - -$cn->lo_export($row['jr_pj'],$tmp); - -ini_set('zlib.output_compression','Off'); -header("Pragma: public"); -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); -header("Cache-Control: must-revalidate"); -header('Content-type: '.$row['jr_pj_type']); -header('Content-Disposition: attachment;filename="'.$row['jr_pj_name'].'"',FALSE); -header("Accept-Ranges: bytes"); -$file=fopen($tmp,'r'); -while ( !feof ($file) ) - echo fread($file,8192); - -fclose($file); - -unlink ($tmp); - -$cn->commit(); diff --git a/sources/html/style-classic.css b/sources/html/style-classic.css deleted file mode 100644 index ef0af6e..0000000 --- a/sources/html/style-classic.css +++ /dev/null @@ -1,2105 +0,0 @@ - /* */ -#add_todo_list , div.add_todo_list { - border:1px solid #0000FF; - background-color:#DDE6FF; - padding:0.07%; - position:absolute; - text-align:left; - z-index:1; - width:480px; - width:30rem; - height:auto; -} -div.welcome { - -} -div.gest_name { - float:left; - margin-left:150px; - margin-top:15px; -} -h2.gest_name { - border-right: 2px solid #403a8d; - border-bottom:2px solid #403a8d; - border-top:1px solid #b4bbc2; - border-left: 1px solid #b4bbc2; - padding: 5px; - width: 80%; - font-size:140%; - margin-left: 10%; -} -body.op_detail_frame,div.op_detail_frame { - background-color:#e4e7ed; - height:100%; width:100%; --moz-box-shadow: 10px 10px 5px #888; --webkit-box-shadow: 10px 10px 5px #888; -box-shadow: 10px 10px 5px #888; - - -} -div.inner_box { - background-color: #DCE1EF; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - padding:2px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left:10%; - border:1px solid #00008B; --moz-box-shadow: 10px 10px 5px #888; --webkit-box-shadow: 10px 10px 5px #888; -box-shadow: 10px 10px 5px #888; -font-size:14.4px; -font-size:0.90rem; -} -div.inner_box { - width: 85%; - } -@media only screen and (min-width: 1281px) { -div.inner_box { - width: 85%; - border-radius: 9px; - padding: 5px; - } -} -div.op_detail_title { - background-color:#888; - /* width:500;*/ - - -} - -div#div_cat{ - position:absolute; - border:1px solid #000000; - top:15%;left:100px; - visibility:hidden; - z-index:2; - width:50em; - background-color:#EDF3FF; - -} - -div.divinfo -{ - color:#FF0000; - text-align:right; - display:block; - width:480px; - width:30rem; - height:13px; - font-weight:bold; -} - -div#search_form -{ - position:absolute; - border:1px solid #000000; - top:15%;left:100px; - margin-left:25%; - z-index:2; - width:50%; - display:none; - background-color:#e4e7ed; - -moz-box-shadow: 10px 10px 5px #888; - -webkit-box-shadow: 10px 10px 5px #888; - box-shadow: 10px 10px 5px #888; -} -@media only screen and (max-width: 995px) { - div#search_form { - width:90%; - margin-left:5%; - left:0px; - } -} - -table.sortable td, table.table_large td, table.result td -{ - padding-left:5px; - padding-right:5px; -} -table.info_op -{ - width:100%; -} -table.info_op tr -{ - background:#FFFFFF; -} -h2#jrn_name -{ - color:#0000FF; - margin-right:30%; - float: right; -} -tr.footer{ - font-style: italic; - font-weight: bold; - -} -span.remain { - font-weight: bold; - color:#000000; -} - div#jrn_name_div - { - float: right; - margin-right:150px; - - - } - #predef_form { - margin-left:35%; - width:60%; - position:absolute; - z-index:2 - } -@media only screen and (min-width: 955px) { - div#jrn_name_div - { - float: right; - margin-right:150px; - - - } - #predef_form { - margin-left:35%; - width:60%; - position:absolute; - z-index:2 - } -} -@media only screen and (max-width: 955px) { - div#jrn_name_div - { - } - #predef_form { - } -} -#direct -{ - display:inline; - float:left; -} -#calc -{ - display:inline; - float:left; -} -div#wait_box -{ - background-color:#DDE6FF; - font-family: arial,verdana,helvetica,arial,sans-serif; - width: 300px; - padding:0px; - margin:0px; - overflow:hidden; - z-index:10; - position:absolute; - left:30%; - top:30%; - border:1px solid #00008B; - width: 260px; -} -#wait_box h2 -{ - /* color:#000000; */ - text-align:center; - /* width: 50%; */ -} -#navi_tb { -width: 95%; -margin-left: 2%; -border-spacing: 0em 0.50em; -border-collapse: separate; -} -div#div_jrnsearch_op{ - - border:1px solid #000000; - width:800px; - width:50rem; - background-color:#EDF3FF; - z-index: 5; - -} -ul { - padding-left: 110px; -} -a.line,div.content a.line -{ - text-decoration:underline; - display:inline; - /* color: #0000FF; */ -} -a.line:hover,div_content a.line -{ - text-decoration:underline; - display:inline; - color: #FFFFFF; - background-color:#336699; -} -#close_div -{ - color:white; - text-decoration:none; - margin-left: 2px; - margin-right:6px; - margin-top:0px; - font-size:14px; - font-size:1rem; - cursor: pointer; - border:0px; -} -#close_div:hover -{ - background-color: #F93; -} -#popmeout -{ - background-color:#FFFFFF; - color:#0000FF; - text-decoration:none; - border:1px solid #0000FF; - margin-left: 2px; - margin-right:18px; - font-size:12px; - font-size: 0.75rem; -} -#popmeout:hover -{ - background-color: #F93; -} -table.table_large tr.odd ,table.table_large tr.even { - - height:32px; -} -#calc1 -{ - position:absolute; - display:block; - top:30px; - left:150px; - width:300px; - border:1px solid #000000; - background-color:#aec3e8; - padding: 20px 20px; -} -span.invoice -{ - font-style: italic; - display:block; - margin: 20px; - font-weight: bold; -} -a.nav,div.content a.nav,div.redcontent a.nav { - display:inline; - text-decoration:none; -} -a.nav:hover,div.content a.nav:hover,div.redcontent a.nav:hover { - display:inline; - text-decoration:none; - background-color:#00008B; - color:#FFFFFF; -} -#dossier { - display:inline; - float:left; - width:100%; - top:0px; - text-align: center; - font-variant:small-caps; - font-weight: bolder; - } -@media only screen and (min-width: 955px) { -#dossier { - display:inline; - float:left; - width:100%; - top:0px; - text-align: center; - font-variant:small-caps; - font-weight: bolder; - } -} -@media only screen and (max-width: 955px) { -#dossier { - display:inline; - float:left; - width:100%; - top:0px; - text-align: left; - font-variant:small-caps; - font-weight: bolder; - } -} - -div.foldercontent { - font-size:14px; - font-size:0.95rem; - width: 95%; - margin-left: 2.5%; -} - -h1.title { - color: #0000FF; - font-style: italic; - text-align:center; - text-transform: uppercase; -} -h2.title { - background-color:#606c88; - color:#FFFFFF; - text-align:center; - padding:0.14%; - border:1px solid #00008B; - background: #606c88 !important; /* Old browsers */ - background: -moz-linear-gradient(top, #606c88 0%, #3f4c6b 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#606c88), color-stop(100%,#3f4c6b)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* IE10+ */ - background: linear-gradient(to bottom, #606c88 0%,#3f4c6b 100%); /* W3C */ -} -h3.title { - color: #0000FF; - margin-left: 30px; -} -h4.title { - color: #0000FF; - margin-left: 45px; - text-decoration: underline; -} -h5.title { - color: #0000FF; - margin-left: 45px; - text-decoration: none; - font-style: italic; -} -div.myfieldset -{ - margin-top: 5px; - margin-left:5px; - margin-right: 5px; - border:#EDF3FF 2px groove; - border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - -} -#info_div { - display:none; - background-color: #FCFFCC; - color:#000000; - z-index: 15; - position: absolute; - top:0px; - left:45%; -} -div.menu2 a.mtitle{ - font-size:13.6px; - font-size:0.80rem; -} -div.menu3 { - font-size:13.6px; - font-size:0.80rem; - -} -#go_submit_id { - -} -.decale { - margin-left:30px; -} -#folder { - border: 1px solid #0000ff; - border-collapse: separate; - border-radius: 10px; - border-spacing: 0px; - box-shadow: 10px 10px 5px #888888; - padding: 5px; - width: 100%; -} -#folder tr { - height: 30px; -} -/*#folder tr.odd,#folder tr.even { - font-size : 1.2em; -}*/ -textarea.itextarea{ - border:solid #0000FF 1px; - width:90%; - margin-left:5%; - height:120px; -} - -div#notice { - position:absolute; - right:5%; - top:200px; - background-color:#FCFFCC; - border: 1px solid #000000; -} -div.name { - position:absolute; - top:0px; - left:0px; - display:block; - } -div#modele_op_div{ - display: none; - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left: 10%; - border:1px solid #00008B; - width: 80%; -} -@media only screen and (min-width: 955px) { - div.name { - position:absolute; - top:0px; - left:0px; - } - div#modele_op_div{ - display: none; - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left: 4%; - border:1px solid #00008B; - min-width: 75%; - box-shadow: 10px 10px 5px #888888; -} -} -@media only screen and (max-width: 955px) { - div.name { - position:absolute; - top:0px; - left:0px; - display:none; - } - div#modele_op_div{ - display: none; - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left: 10%; - border:1px solid #00008B; - width: 85%; - box-shadow: 10px 10px 5px #888888; -} -} - -div#box_search_card { - position:absolute; - right:15.625%; - top:115px; -} -div.bxbutton -{ - float:right; - height:10px; - display:block; - margin-top:0.48%; - margin-right:0.48%; -} -div.inner_box tr.odd { - background: #E0EBFF; -} -#modele_op_tab tr.odd { - background: #EDF3FF; -} -div#bookmark_div { - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - padding:2px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - border:1px solid #00008B; - top:32px; - top:2rem; - left:30%; - width:40%; -} -div#preference_div { - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - border:1px solid #00008B; - top:32px; - top:2rem; - left:20%; - width:50%; -} -#error_div{ - position:absolute; - border:1px solid #000000; - background-color:#DDE6FF; - padding-bottom: 2px; - padding-top: 2px; - padding-left: 2px; - padding-right: 2px; - color:#FF0000; - top:40%;left:25%; - visibility:hidden; - width:640px; - width:40rem; - z-index:20; -} -#error_div h2 { - background: #FF0000; -} -div#error_content_div { - color:#FF0000; - font-weight: bold; - text-align: center; -} -td.workday ol { - margin:0px; - padding:0px; - list-style-type:none; - text-align:left; -} -input.inum { - text-align:right; - border:1px solid #0000FF; - margin:2px -} -div.box { - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - margin-top:10px; - margin-left:3px; - margin-right:3px; - padding:2px; - overflow:hidden; - border:1px solid #00008B; - width:32%; - height:364px; - float:left; - font-size:14px; - font-size:0.90rem; -} -@media only screen and (max-width: 1426px) { - div.box { - width: 48%; - height: 380px; -} -} -@media only screen and (max-width: 955px) { - div.box { - width: 95%; - height: 380px; - } -} -div.box table{ - border-spacing:0px; - font-size: 96%; -} -div.box tr.odd { - background-color: #F2F6FD; - -} -div.box tr.even { - background-color:#e4e7ed; - -} -#jrn_name_div h2{ - font-size:38.4px; - font-size: 2.4rem; -} -#search_account { - width: 70%; -} -fieldset { - border-width: 1px; -} -#tva_select table { - border-spacing: 0px; -} -#mod_predf_op { - width: 80%; - overflow: auto; -} -/**************************************************************************** - * Tabs - ****************************************************************************/ -ul.tabs { - padding-top: 15px; - display:block; - border-bottom: 1px solid #879ed4; - padding-left: 2px; - list-style: none; - margin-left:2px; -} -ul.tabs a { - display:inline; -} -li.tabs_selected { - display:inline; - background: #C2E3FC; /* Old browsers */ - background: -moz-linear-gradient(top, #C2E3FC 0%, #6393c1 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#C2E3FC), color-stop(100%,#6393c1)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #C2E3FC 0%,#6393c1 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #C2E3FC 0%,#6393c1 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #C2E3FC 0%,#6393c1 100%); /* IE10+ */ - background: linear-gradient(to bottom, #C2E3FC 0%,#6393c1 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#C2E3FC', endColorstr='#6393c1',GradientType=0 ); /* IE6-9 */ - color:whitesmoke; - margin-left: 2px; - border-top-left-radius: 10px; - border-top-right-radius: 10px; - border:1px #879ed4 solid; - font-weight: bold; - -} -li.tabs { - display:inline; - background-color: inherit; - color:inherit;margin-left: 0px; - padding: 0px; - border-top-left-radius: 10px; - border-top-right-radius: 10px; - border:1px #879ed4 solid; - -} -li.tabs:hover { - display:inline; - background-color: lightblue; - color:wheat;margin-left: 2px; - padding: 0px; - border-top-left-radius: 10px; - border-top-right-radius: 10px; - border:1px #879ed4 solid; - white-space: nowrap; - -} -@media only screen and (min-width: 1280px) { - li.tabs { - display:inline; - background-color: inherit; - color:inherit;margin-left: 2px; - padding: 15px 7px 0px 10px; - border-top-left-radius: 10px; - border-top-right-radius: 10px; - border:1px #879ed4 solid; - -} - li.tabs:hover { - display:inline; - background-color: lightblue; - color:wheat;margin-left: 2px; - padding: 10px 10px 0px 10px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - border:1px #879ed4 solid; - } - li.tabs_selected { - padding: 12px 15px 15px 15px; - } -} -ul.tabs a { - text-decoration: none; - color:inherit; - display:inline; - white-space: nowrap; - -} -ul.tabs a:hover { - text-decoration: none; - color:white; - display:inline; - background-color: lightblue; -} -/* - * ???? - */ -.previous_year -{ - text-align:right; - color:black; -} -/***************************************************************************** - * autocomplete style - *****************************************************************************/ - -div.autocomplete_fixed { - background-color:#FFFFFF; - border:1px solid #888; - margin:0px; - padding:0px; - text-align:left; -} -div.autocomplete_fixed em { - color:#0000FF; - font-weight:bold; -} -div.autocomplete_fixed ul { - list-style-type:none; - background-color:#FFFFFF; - border:1px solid blue; - width:300px; - margin:0px; - padding:0px; - } -div.tag { - -} -@media only screen and (max-width: 1280px) { - div.autocomplete_fixed ul { - list-style-type:none; - background-color:#FFFFFF; - border:1px solid blue; - width:300px; - margin:0px; - padding:0px; - } - div.tag { - - } - -} -@media only screen and (min-width: 1281px) { - div.autocomplete_fixed ul { - list-style-type:none; - background-color:#FFFFFF; - border:1px solid blue; - width:500px; - margin:0px; - padding:0px; - } - div.tag { - width: 50%; - } - - -} -div.autocomplete_fixed ul li.selected { - background-color: #DDE6FF; - border-bottom: 1px solid black; -} - -div.autocomplete_fixed ul li { - list-style-type:none; - display:block; - margin:0px; - padding:0px; - cursor:pointer; -} -#popup { - font-size:0.9rem; -} -hr { - width:95%; - margin-left:2.5%; - background:#5d90cd; - height:5px; - -} -/****************************************************************************** - * Hightlight row in a table - ******************************************************************************/ -tr.highlight{ - font-weight: bolder; - font-size:14px; - background-color: navy; - color:white !important; - border-width: 2px; - border-style: solid; - border-color: blue; -} -tr.highlight a{ - color:white !important; - -} -*|*:link { - color: inherit; -} -/******************************************************************************* - * Inner_box on a smaller screen - *******************************************************************************/ -@media only screen and (min-width: 1280px) { - div.inner_box { - width: 95%; - left:2%; - margin-bottom: 2%; - } -} -/***************************************************************************** - * Table of one column to present menu - * as in CFGLED, FORECAST, REPORT - *****************************************************************************/ -table.vert_mtitle { - text-align:center; - /* border:5px solid #99B1DF; */ - border-radius:5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - - width:80%; - margin-left: 10%; - border-collapse: separate; - border-spacing: 10px; - - -} -table.vert_mtitle td.first { - background-color: #DCE1EF; -} -table.vert_mtitle td { - border : 1px solid #99B1DF; - background-color:#EDEDED; - border-top-radius:20px; -} -table.vert_mtitle td a{ - padding : 20px; - font-weight: bold; -} -table.vert_mtitle td:hover { - border : 1px solid #99B1DF; - background-color: #336699; - color:white; -} -table.vert_mtitle td:hover a{ - color:white; - -} - -/******************************************************************************* - * Tiny button example : -X for remove action, remove link... - *******************************************************************************/ -div.content a.tinybutton,a.tinybutton{ - color: blue; - font-weight: bold; - text-decoration: none; - font-family: arial,verdana,sans-serif,helvetica; - /* background-image: url("image/bg-submit2.gif"); - background-repeat: repeat-x; - background-position: left; */ - font-size: 8px; - font-size: 0.7rem; - padding-bottom: 0px; - padding-top: 0px; - padding-right: 0px; - padding-left: 0px; - margin-top: 3px; - cursor: pointer; - margin: 1px 2px 1px 2px; - border-width: 1px; - border-style: solid; - border-color: blue; - border-radius: 2px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - - display : inline; -} -input[type="button"].tinybutton { - color: blue; - font-weight: bold; - text-decoration: none; - font-family: arial,verdana,sans-serif,helvetica; - font-size: 8px; - font-size: 0.7rem; - padding-bottom: 0px; - padding-top: 0px; - padding-right: 0px; - padding-left: 0px; - margin-top: 3px; - cursor: pointer; - margin: 1px 2px 1px 2px; - border-width: 1px; - border-style: solid; - border-color: blue; - border-radius: 2px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - - display : inline; -} -/******************************************************************************* - Image Search -*******************************************************************************/ -.image_search { - cursor:pointer; - width:16px; - height:16px; - vertical-align: top; - background-image: url("image/bg-submit2.gif"); - background-repeat: repeat-x; - background-position: left; - - padding : 3px; - -} -/**************************************************************************** - * Aligned button - ****************************************************************************/ -ul.aligned-block { - padding:5px; - display : block; -} -ul.aligned-block li { - display:table-cell; - padding : 10px; - list-style: none; -} -/****************************************************************************** - * Total in confirmation VEN / ACH - ******************************************************************************/ -#total_div_id { - float: right; - margin-right: 150px; - background: snow; - margin-top: 50px; -} -/*************************************************************************** - * column in the dashboard - ***************************************************************************/ - -td.cut { - max-width: 25%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -td.box { - border-left: #9999ff solid 1px; -} - -/**************************************************************************** -* Smoke appearance of modal box - ****************************************************************************/ -.smoke-base { - position: fixed; - top: 0px; - left: 0px; - bottom: 0px; - right: 0px; - visibility: hidden; - opacity: 0; - background: rgba(0,0,0,.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#90000000,endColorstr=#900000000); -} - -.smoke-base.smoke-visible { - opacity: 1; - visibility: visible; -} - -.smokebg { - position: fixed; - top: 0px; - left: 0px; - bottom: 0px; - right: 0px; -} - -.smoke-base .dialog { - position: absolute; - top: 25%; - width: 40%; - left: 50%; - margin-left: -20%; -} - -.dialog-prompt { - margin-top: 15px; - text-align: center; -} - -.dialog-buttons { - margin: 20px 0px 5px 0px -} - -.smoke { - text-align: center; - background-color: #DCE1EF; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - - padding:2px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left:10%; - border:1px solid #00008B; --moz-box-shadow: 10px 10px 5px #888; --webkit-box-shadow: 10px 10px 5px #888; -box-shadow: 10px 10px 5px #888; -font-size:14.4px; -font-size:0.90rem; -width: 85%; -} -.dialog-buttons button:hover{ - color:beige; - font-weight: bold; -} -.dialog-buttons button { - color:#FFFFFF; - font-weight: normal; - text-decoration:none; - background: #606c88; /* Old browsers */ - background: -moz-linear-gradient(top, #606c88 0%, #3f4c6b 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#606c88), color-stop(100%,#3f4c6b)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* IE10+ */ - background: linear-gradient(to bottom, #606c88 0%,#3f4c6b 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#606c88', endColorstr='#3f4c6b',GradientType=0 ); /* IE6-9 */ - border-color: #605D5D; - border-width:0px; - padding:4px; - margin:3px; - cursor:pointer; - margin:1px 2px 1px 2px; - border-radius: 5px; - moz-border-radius:5px; - width:7em; - width:7rem; -} - -.dialog-prompt input { - margin: 0; - border: 0; - font-family: sans-serif; - outline: none; - font-family: Menlo, 'Andale Mono', monospace; - border: 1px solid #aaa; - width: 75%; - display: inline-block; - background-color: transparent; - font-size: 16px; - padding: 8px; -} - -.smoke-base .dialog-inner { - padding: 15px; - - color:#202020; -} - -button.cancel { - background-color: rgba(0,0,0,.40); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#444444,endColorstr=#444444); -} - -.queue{ - display:none; -} diff --git a/sources/html/style-light.css b/sources/html/style-light.css deleted file mode 100644 index d93a92f..0000000 --- a/sources/html/style-light.css +++ /dev/null @@ -1,2092 +0,0 @@ - /* */ -#add_todo_list , div.add_todo_list { - border:1px solid #0000FF; - background-color:#DDE6FF; - padding:0.07%; - position:absolute; - text-align:left; - z-index:1; - width:480px; - width:30rem; - height:auto; -} -div.welcome { - -} -div.gest_name { - float:left; - margin-left:150px; - margin-top:15px; -} -h2.gest_name { - border-right: 2px solid #403a8d; - border-bottom:2px solid #403a8d; - border-top:1px solid #b4bbc2; - border-left: 1px solid #b4bbc2; - padding: 5px; - width: 80%; - font-size:140%; - margin-left: 10%; -} -body.op_detail_frame,div.op_detail_frame { - background-color:#e4e7ed; - height:100%; width:100%; --moz-box-shadow: 10px 10px 5px #888; --webkit-box-shadow: 10px 10px 5px #888; -box-shadow: 10px 10px 5px #888; - - -} -div.inner_box { - background-color: #DCE1EF; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - padding:2px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left:10%; - border:1px solid #00008B; --moz-box-shadow: 10px 10px 5px #888; --webkit-box-shadow: 10px 10px 5px #888; -box-shadow: 10px 10px 5px #888; -font-size:14.4px; -font-size:0.90rem; -} -div.inner_box { - width: 85%; - } -@media only screen and (min-width: 1281px) { -div.inner_box { - width: 85%; - border-radius: 9px; - padding: 5px; - } -} -div.op_detail_title { - background-color:#888; - /* width:500;*/ - - -} - -div#div_cat{ - position:absolute; - border:1px solid #000000; - top:15%;left:100px; - visibility:hidden; - z-index:2; - width:50em; - background-color:#EDF3FF; - -} - -div.divinfo -{ - color:#FF0000; - text-align:right; - display:block; - width:480px; - width:30rem; - height:13px; - font-weight:bold; -} - -div#search_form -{ - position:absolute; - border:1px solid #000000; - top:15%;left:100px; - margin-left:25%; - z-index:2; - width:50%; - display:none; - background-color:#e4e7ed; - -moz-box-shadow: 10px 10px 5px #888; - -webkit-box-shadow: 10px 10px 5px #888; - box-shadow: 10px 10px 5px #888; -} -@media only screen and (max-width: 995px) { - div#search_form { - width:90%; - margin-left:5%; - left:0px; - } -} - -table.sortable td, table.table_large td, table.result td -{ - padding-left:5px; - padding-right:5px; -} -table.info_op -{ - width:100%; -} -table.info_op tr -{ - background:#FFFFFF; -} -h2#jrn_name -{ - color:#0000FF; - margin-right:30%; - float: right; -} -tr.footer{ - font-style: italic; - font-weight: bold; - -} -span.remain { - font-weight: bold; - color:#000000; -} - div#jrn_name_div - { - float: right; - margin-right:150px; - - - } - #predef_form { - margin-left:35%; - width:60%; - position:absolute; - z-index:2 - } -@media only screen and (min-width: 955px) { - div#jrn_name_div - { - float: right; - margin-right:150px; - - - } - #predef_form { - margin-left:35%; - width:60%; - position:absolute; - z-index:2 - } -} -@media only screen and (max-width: 955px) { - div#jrn_name_div - { - } - #predef_form { - } -} -#direct -{ - display:inline; - float:left; -} -#calc -{ - display:inline; - float:left; -} -div#wait_box -{ - background-color:#DDE6FF; - font-family: arial,verdana,helvetica,arial,sans-serif; - width: 300px; - padding:0px; - margin:0px; - overflow:hidden; - z-index:10; - position:absolute; - left:30%; - top:30%; - border:1px solid #00008B; - width: 260px; -} -#wait_box h2 -{ - /* color:#000000; */ - text-align:center; - /* width: 50%; */ -} -#navi_tb { -width: 95%; -margin-left: 2%; -border-spacing: 0em 0.50em; -border-collapse: separate; -} -div#div_jrnsearch_op{ - - border:1px solid #000000; - width:800px; - width:50rem; - background-color:#EDF3FF; - z-index: 5; - -} -ul { - padding-left: 110px; -} -a.line,div.content a.line -{ - text-decoration:underline; - display:inline; - /* color: #0000FF; */ -} -a.line:hover,div_content a.line -{ - text-decoration:underline; - display:inline; - color: #FFFFFF; - background-color:#336699; -} -#close_div -{ - color:white; - text-decoration:none; - margin-left: 2px; - margin-right:6px; - margin-top:0px; - font-size:14px; - font-size:1rem; - cursor: pointer; - border:0px; -} -#close_div:hover -{ - background-color: #F93; -} -#popmeout -{ - background-color:#FFFFFF; - color:#0000FF; - text-decoration:none; - border:1px solid #0000FF; - margin-left: 2px; - margin-right:18px; - font-size:12px; - font-size: 0.75rem; -} -#popmeout:hover -{ - background-color: #F93; -} -table.table_large tr.odd ,table.table_large tr.even { - - height:32px; -} -#calc1 -{ - position:absolute; - display:block; - top:30px; - left:150px; - width:300px; - border:1px solid #000000; - background-color:#aec3e8; - padding: 20px 20px; -} -span.invoice -{ - font-style: italic; - display:block; - margin: 20px; - font-weight: bold; -} -a.nav,div.content a.nav,div.redcontent a.nav { - display:inline; - text-decoration:none; -} -a.nav:hover,div.content a.nav:hover,div.redcontent a.nav:hover { - display:inline; - text-decoration:none; - background-color:#00008B; - color:#FFFFFF; -} -#dossier { - display:inline; - float:left; - width:100%; - top:0px; - text-align: center; - font-variant:small-caps; - font-weight: bolder; - } -@media only screen and (min-width: 955px) { -#dossier { - display:inline; - float:left; - width:100%; - top:0px; - text-align: center; - font-variant:small-caps; - font-weight: bolder; - } -} -@media only screen and (max-width: 955px) { -#dossier { - display:inline; - float:left; - width:100%; - top:0px; - text-align: left; - font-variant:small-caps; - font-weight: bolder; - } -} - -div.foldercontent { - font-size:14px; - font-size:0.95rem; - width: 95%; - margin-left: 2.5%; -} - -h1.title { - color: #0000FF; - font-style: italic; - text-align:center; - text-transform: uppercase; -} -h2.title { - background-color: #879ED4; - color:#FFFFFF; - text-align:center; - padding:0.14%; - border:1px solid #00008B; - -} -h3.title { - color: #0000FF; - margin-left: 30px; -} -h4.title { - color: #0000FF; - margin-left: 45px; - text-decoration: underline; -} -h5.title { - color: #0000FF; - margin-left: 45px; - text-decoration: none; - font-style: italic; -} -div.myfieldset -{ - margin-top: 5px; - margin-left:5px; - margin-right: 5px; - border:#EDF3FF 2px groove; - border-radius: 4px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - -} -#info_div { - display:none; - background-color: #FCFFCC; - color:#000000; - z-index: 15; - position: absolute; - top:0px; - left:45%; -} -div.menu2 a.mtitle{ - font-size:13.6px; - font-size:0.80rem; -} -div.menu3 { - font-size:13.6px; - font-size:0.80rem; - -} -#go_submit_id { - -} -.decale { - margin-left:30px; -} -#folder { - border: 1px solid #0000ff; - border-collapse: separate; - border-radius: 10px; - border-spacing: 0px; - box-shadow: 10px 10px 5px #888888; - padding: 5px; - width: 100%; -} -#folder tr { - height: 30px; -} -/*#folder tr.odd,#folder tr.even { - font-size : 1.2em; -}*/ -textarea.itextarea{ - border:solid #0000FF 1px; - width:90%; - margin-left:5%; - height:120px; -} - -div#notice { - position:absolute; - right:5%; - top:200px; - background-color:#FCFFCC; - border: 1px solid #000000; -} -div.name { - position:absolute; - top:0px; - left:0px; - display:block; - } -div#modele_op_div{ - display: none; - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left: 10%; - border:1px solid #00008B; - width: 80%; -} -@media only screen and (min-width: 1015px) { - div.name { - position:absolute; - top:0px; - left:0px; - } - div#modele_op_div{ - display: none; - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left: 4%; - border:1px solid #00008B; - min-width: 75%; - box-shadow: 10px 10px 5px #888888; -} -} -@media only screen and (max-width: 955px) { - div.name { - position:absolute; - top:0px; - left:0px; - display:none; - } - div#modele_op_div{ - display: none; - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left: 10%; - border:1px solid #00008B; - width: 85%; - box-shadow: 10px 10px 5px #888888; -} -} - -div#box_search_card { - position:absolute; - right:15.625%; - top:115px; -} -div.bxbutton -{ - float:right; - height:10px; - display:block; - margin-top:0.48%; - margin-right:0.48%; -} -div.inner_box tr.odd { - background: #E0EBFF; -} -#modele_op_tab tr.odd { - background: #EDF3FF; -} -div#bookmark_div { - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - padding:2px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - border:1px solid #00008B; - top:32px; - top:2rem; - left:30%; - width:40%; -} -div#preference_div { - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - border:1px solid #00008B; - top:32px; - top:2rem; - left:20%; - width:50%; -} -#error_div{ - position:absolute; - border:1px solid #000000; - background-color:#DDE6FF; - padding-bottom: 2px; - padding-top: 2px; - padding-left: 2px; - padding-right: 2px; - color:#FF0000; - top:40%;left:25%; - visibility:hidden; - width:640px; - width:40rem; - z-index:20; -} -#error_div h2 { - background: #FF0000; -} -div#error_content_div { - color:#FF0000; - font-weight: bold; - text-align: center; -} -td.workday ol { - margin:0px; - padding:0px; - list-style-type:none; - text-align:left; -} -input.inum { - text-align:right; - border:1px solid #0000FF; - margin:2px -} -div.box { - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - margin-top:10px; - margin-left:3px; - margin-right:3px; - padding:2px; - overflow:hidden; - border:1px solid #00008B; - width:32%; - height:364px; - float:left; - font-size:14px; - font-size:0.90rem; -} -@media only screen and (max-width: 1426px) { - div.box { - width: 48%; - height: 380px; -} -} -@media only screen and (max-width: 955px) { - div.box { - width: 95%; - height: 380px; - } -} -div.box table{ - border-spacing:0px; - font-size: 95%; -} -div.box tr.odd { - background-color: #F2F6FD; - -} -div.box tr.even { - background-color:#e4e7ed; - -} -#jrn_name_div h2{ - font-size:38.4px; - font-size: 2.4rem; -} -#search_account { - width: 70%; -} -fieldset { - border-width: 1px; -} -#tva_select table { - border-spacing: 0px; -} -#mod_predf_op { - width: 80%; - overflow: auto; -} -/**************************************************************************** - * Tabs - ****************************************************************************/ -ul.tabs { - padding-top: 15px; - display:block; - border-bottom: 1px solid #879ed4; - padding-left: 2px; - list-style: none; -} -ul.tabs a { - display:inline; -} -li.tabs_selected { - display:inline; - background: #C2E3FC; /* Old browsers */ - background: -moz-linear-gradient(top, #C2E3FC 0%, #6393c1 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#C2E3FC), color-stop(100%,#6393c1)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #C2E3FC 0%,#6393c1 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #C2E3FC 0%,#6393c1 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #C2E3FC 0%,#6393c1 100%); /* IE10+ */ - background: linear-gradient(to bottom, #C2E3FC 0%,#6393c1 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#C2E3FC', endColorstr='#6393c1',GradientType=0 ); /* IE6-9 */ - color:whitesmoke; - margin-left: 1px; - border-top-left-radius: 0px; - border-top-right-radius: 0px; - border:1px #879ed4 solid; - font-weight: bold; - -} -li.tabs { - display:inline; - background-color: inherit; - color:inherit;margin-left: 1px; - padding: 0px; - border-top-left-radius: 0px; - border-top-right-radius: 0px; - border:1px #879ed4 solid; - -} -li.tabs:hover { - display:inline; - background-color: lightblue; - color:wheat;margin-left: 1px; - padding: 0px; - border-top-left-radius: 0px; - border-top-right-radius: 0px; - border:1px #879ed4 solid; - white-space: nowrap; - -} -@media only screen and (min-width: 1280px) { - li.tabs { - display:inline; - background-color: inherit; - color:inherit;margin-left: 2px; - padding: 15px 7px 0px 10px; - border-top-left-radius: 10px; - border-top-right-radius: 10px; - border:1px #879ed4 solid; - -} - li.tabs:hover { - display:inline; - background-color: lightblue; - color:wheat; - margin-left: 2px; - padding: 10px 7px 0px 10px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - border:1px #879ed4 solid; - } - li.tabs_selected { - padding: 12px 15px 15px 15px; - } -} -ul.tabs a { - text-decoration: none; - color:inherit; - display:inline; - white-space: nowrap; - -} -ul.tabs a:hover { - text-decoration: none; - color:white; - display:inline; - background-color: lightblue; -} -/* - * ???? - */ -.previous_year -{ - text-align:right; - color:black; -} -/***************************************************************************** - * autocomplete style - *****************************************************************************/ - -div.autocomplete_fixed { - background-color:#FFFFFF; - border:1px solid #888; - margin:0px; - padding:0px; - text-align:left; -} -div.autocomplete_fixed em { - color:#0000FF; - font-weight:bold; -} -div.autocomplete_fixed ul { - list-style-type:none; - background-color:#FFFFFF; - border:1px solid blue; - width:300px; - margin:0px; - padding:0px; - } -div.tag { - -} -@media only screen and (max-width: 1280px) { - div.autocomplete_fixed ul { - list-style-type:none; - background-color:#FFFFFF; - border:1px solid blue; - width:300px; - margin:0px; - padding:0px; - } - div.tag { - - } - -} -@media only screen and (min-width: 1281px) { - div.autocomplete_fixed ul { - list-style-type:none; - background-color:#FFFFFF; - border:1px solid blue; - width:500px; - margin:0px; - padding:0px; - } - div.tag { - width: 50%; - } - - -} -div.autocomplete_fixed ul li.selected { - background-color: #DDE6FF; - border-bottom: 1px solid black; -} - -div.autocomplete_fixed ul li { - list-style-type:none; - display:block; - margin:0px; - padding:0px; - cursor:pointer; -} -#popup { - font-size:0.9rem; -} -hr { - width:95%; - margin-left:2.5%; - background:blue; - height:2px; - -} -/****************************************************************************** - * Hightlight row in a table - ******************************************************************************/ -tr.highlight{ - font-weight: bolder; - font-size:14px; - background-color: #334975 !important; - color:white !important; - border-width: 2px; - border-style: solid; - border-color: blue; -} -tr.highlight a{ - color:white !important; - -} -*|*:link { - color: inherit; -} -/******************************************************************************* - * Inner_box on a smaller screen - *******************************************************************************/ -@media only screen and (min-width: 1280px) { - div.inner_box { - width: 95%; - left:2%; - margin-bottom: 2%; - } -} -/***************************************************************************** - * Table of one column to present menu - * as in CFGLED, FORECAST, REPORT - *****************************************************************************/ -table.vert_mtitle { - text-align:center; - /* border:5px solid #99B1DF; */ - border-radius:5px; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - - width:80%; - margin-left: 10%; - border-collapse: separate; - border-spacing: 10px; - - -} -table.vert_mtitle td.first { - background-color: #DCE1EF; -} -table.vert_mtitle td { - border : 1px solid #99B1DF; - background-color:#EDEDED; - border-top-radius:20px; -} -table.vert_mtitle td a{ - padding : 20px; - font-weight: bold; -} -table.vert_mtitle td:hover { - border : 1px solid #99B1DF; - background-color: #336699; - color:white; -} -table.vert_mtitle td:hover a{ - color:white; - -} - -/******************************************************************************* - * Tiny button example : -X for remove action, remove link... - *******************************************************************************/ -div.content a.tinybutton,a.tinybutton{ - color: blue; - font-weight: bold; - text-decoration: none; - font-family: arial,verdana,sans-serif,helvetica; - /* background-image: url("image/bg-submit2.gif"); - background-repeat: repeat-x; - background-position: left; */ - font-size: 8px; - font-size: 0.7rem; - padding-bottom: 0px; - padding-top: 0px; - padding-right: 0px; - padding-left: 0px; - margin-top: 3px; - cursor: pointer; - margin: 1px 2px 1px 2px; - border-width: 1px; - border-style: solid; - border-color: blue; - border-radius: 2px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - - display : inline; -} -input[type="button"].tinybutton { - color: blue; - font-weight: bold; - text-decoration: none; - font-family: arial,verdana,sans-serif,helvetica; - font-size: 8px; - font-size: 0.7rem; - padding-bottom: 0px; - padding-top: 0px; - padding-right: 0px; - padding-left: 0px; - margin-top: 3px; - cursor: pointer; - margin: 1px 2px 1px 2px; - border-width: 1px; - border-style: solid; - border-color: blue; - border-radius: 2px; - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - - display : inline; -} -/******************************************************************************* - Image Search -*******************************************************************************/ -.image_search { - cursor:pointer; - width:16px; - height:16px; - vertical-align: top; - background-image: url("image/bg-submit2.gif"); - background-repeat: repeat-x; - background-position: left; - - padding : 3px; - -} -/**************************************************************************** - * Aligned button - ****************************************************************************/ -ul.aligned-block { - padding:5px; - display : block; -} -ul.aligned-block li { - display:table-cell; - padding : 10px; - list-style: none; -} -/****************************************************************************** - * Total in confirmation VEN / ACH - ******************************************************************************/ -#total_div_id { - float: right; - margin-right: 150px; - background: snow; - margin-top: 50px; -} -/*************************************************************************** - * column in the dashboard - ***************************************************************************/ - -td.cut { - max-width: 25%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -td.box { - border-left: #9999ff solid 1px; -} - -/**************************************************************************** -* Smoke appearance of modal box - ****************************************************************************/ -.smoke-base { - position: fixed; - top: 0px; - left: 0px; - bottom: 0px; - right: 0px; - visibility: hidden; - opacity: 0; - background: rgba(0,0,0,.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#90000000,endColorstr=#900000000); -} - -.smoke-base.smoke-visible { - opacity: 1; - visibility: visible; -} - -.smokebg { - position: fixed; - top: 0px; - left: 0px; - bottom: 0px; - right: 0px; -} - -.smoke-base .dialog { - position: absolute; - top: 25%; - width: 40%; - left: 50%; - margin-left: -20%; -} - -.dialog-prompt { - margin-top: 15px; - text-align: center; -} - -.dialog-buttons { - margin: 20px 0px 5px 0px -} - -.smoke { - text-align: center; - background-color: #DCE1EF; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - - padding:2px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left:10%; - border:1px solid #00008B; --moz-box-shadow: 10px 10px 5px #888; --webkit-box-shadow: 10px 10px 5px #888; -box-shadow: 10px 10px 5px #888; -font-size:14.4px; -font-size:0.90rem; -width: 85%; -} -.dialog-buttons button:hover{ - color:beige; - font-weight: bold; -} -.dialog-buttons button { - color:#FFFFFF; - font-weight: normal; - text-decoration:none; - background: #606c88; /* Old browsers */ - background: -moz-linear-gradient(top, #606c88 0%, #3f4c6b 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#606c88), color-stop(100%,#3f4c6b)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* IE10+ */ - background: linear-gradient(to bottom, #606c88 0%,#3f4c6b 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#606c88', endColorstr='#3f4c6b',GradientType=0 ); /* IE6-9 */ - border-color: #605D5D; - border-width:0px; - padding:4px; - margin:3px; - cursor:pointer; - margin:1px 2px 1px 2px; - border-radius: 5px; - moz-border-radius:5px; - width:7em; - width:7rem; -} - -.dialog-prompt input { - margin: 0; - border: 0; - font-family: sans-serif; - outline: none; - font-family: Menlo, 'Andale Mono', monospace; - border: 1px solid #aaa; - width: 75%; - display: inline-block; - background-color: transparent; - font-size: 16px; - padding: 8px; -} - -.smoke-base .dialog-inner { - padding: 15px; - - color:#202020; -} - -button.cancel { - background-color: rgba(0,0,0,.40); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#444444,endColorstr=#444444); -} - -.queue{ - display:none; -} diff --git a/sources/html/style-mandarine.css b/sources/html/style-mandarine.css deleted file mode 100644 index 05a609d..0000000 --- a/sources/html/style-mandarine.css +++ /dev/null @@ -1,2086 +0,0 @@ - /* */ -#add_todo_list { - border:1px solid #FF7F50; - display:none; - background-color:#FFCC99; - padding:0.07%; - position:absolute; - text-align:left; - z-index:1; - width: 480px; - width:30rem; - height:auto; -} -div.welcome { - -} -div.gest_name { - float:left; - margin-left:150px; - margin-top:15px; -} -h2.gest_name { - border-left: 5px solid #403a8d; - border-bottom:1px solid #b4bbc2; - border-top:1px solid #b4bbc2; - border-right:1px solid #b4bbc2; - padding: 5px; - width: 40%; -} -body.op_detail_frame,div.op_detail_frame { - background-color: #FFF1ED; - height:100%; width:100%; --moz-box-shadow: 10px 10px 5px #888; --webkit-box-shadow: 10px 10px 5px #888; -box-shadow: 10px 10px 5px #888; - - -} -div.inner_box { - background-color: #FAF3EC; - font-family: "Liberation Sans", FreeSans, sans-serif,Arial, Helvetica; - padding:2px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left:10%; - border:1px solid #6D3F2E; --moz-box-shadow: 10px 10px 5px #888; --webkit-box-shadow: 10px 10px 5px #888; -box-shadow: 10px 10px 5px #888; -font-size:14.4px; -font-size:0.90rem; - width: 95%; -} -@media only screen and (min-width: 1281px) { -div.inner_box { - width: 85%; - } -} -@media only screen and (max-width: 1280px) { -div.inner_box { - width: 95%; - left:2%; - margin-bottom: 2%; - } -} -div.op_detail_title { - background-color:#888; - /* width:500;*/ - - -} - -div#div_cat{ - position:absolute; - border:1px solid #000000; - top:15%;left:100; - visibility:hidden; - z-index:2; - width:50em; - background-color:#FFFFCC; - -} - -div.divinfo -{ - color:#FF0000; - text-align:right; - display:block; - width: 480px; - width:30rem; - height:13px; - font-weight:bold; -} - -div#search_form -{ - position:absolute; - border:1px solid #000000; - top:15%;left:100px; - margin-left:25%; - z-index:2; - width:50%; - display:none; - background-color:#FFF1ED; - -moz-box-shadow: 10px 10px 5px #888; - -webkit-box-shadow: 10px 10px 5px #888; - box-shadow: 10px 10px 5px #888; -} -@media only screen and (max-width: 995px) { - div#search_form { - width:90%; - margin-left:5%; - left:0px; - } -} - -table.sortable td, table.table_large td, table.result td -{ - padding-left:5px; - padding-right:5px; -} -table.info_op -{ - width:100%; -} -table.info_op tr -{ - background:#FFFFFF; -} -h2#jrn_name -{ - color:#FF7F50; - margin-right:30%; - float: right; -} -tr.footer{ - font-style: italic; - font-weight: bold; - -} -span.remain { - font-weight: bold; - color:#000000; -} -div#jrn_name_div -{ - float: right; - margin-right:150px; - - -} -#predef_form { - margin-left:20%; - width:60%; - position: absolute; -} - -@media only screen and (min-width: 955px) { - div#jrn_name_div - { - float: right; - margin-right:150px; - - - } - #predef_form { - margin-left:20%; - width:60%; - position: absolute; - } -} -@media only screen and (max-width: 955px) { - div#jrn_name_div - { - } - #predef_form { - } -} -#direct -{ - display:inline; - float:left; -} -#calc -{ - display:inline; - float:left; -} -div#wait_box -{ - background-color:#FFCC99; - font-family: arial,verdana,helvetica,arial,sans-serif; - width: 300px; - padding:0px; - margin:0px; - overflow:hidden; - z-index:10; - - position:absolute; - left:30%; - top:30%; - - - border:1px solid #6D3F2E; - - width: 260px; - widt: 260px; -} -#wait_box h2 -{ - /* color:#000000; */ - text-align:center; - /* width: 50%; */ -} -div#div_jrnsearch_op{ - - border:1px solid #000000; - width: 800px; - width:50rem; - background-color:#FFFFCC; - z-index: 5; - -} -ul { - padding-left: 110px; -} -a.line,div.content a.line -{ - text-decoration:underline; - display:inline; - cursor: pointer; - - /* color: #FF7F50; */ -} -a.line:hover,div_content a.line -{ - text-decoration:underline; - display:inline; - color: #FFFFFF; - background-color:#336699; -} -#close_div -{ - color:white; - text-decoration:none; - margin-left: 2px; - margin-right:2px; - margin-top:3px; - font-size:12px; - font-size:0.90rem; - cursor: pointer; - cursor: pointer; - border:0px; - font-size:20px; -} -#close_div:hover -{ - background-color: #F93; -} -#popmeout -{ - background-color:#FFFFFF; - color:#FF7F50; - text-decoration:none; - border:1px solid #FF7F50; - margin-left: 2px; - margin-right:18px; - font-size:12px; - font-size: 0.75rem; - cursor: pointer; - -} -#popmeout:hover -{ - background-color: #F93; -} -table.table_large tr.odd ,table.table_large tr.even { - - height:32px; -} -#calc1 -{ - position:absolute; - display:block; - top:30px; - left:150px; - width:300px; - border:1px solid #000000; - background-color:#FFCC99; - padding: 20px 20px; -} -span.invoice -{ - font-style: italic; - display:block; - margin: 20px; - font-weight: bold; -} -a.nav,div.content a.nav,div.redcontent a.nav { - display:inline; - text-decoration:none; - cursor: pointer; - -} -a.nav:hover,div.content a.nav:hover,div.redcontent a.nav:hover { - display:inline; - text-decoration:none; - background-color:#6D3F2E; - color:#FFFFFF; -} -#dossier { - display:inline; - float:left; - width:100%; - top:0px; - text-align: center; - font-variant:small-caps; - font-weight: bolder; - } -@media only screen and (min-width: 955px) { -#dossier { - display:inline; - float:left; - width:100%; - top:0px; - text-align: center; - font-variant:small-caps; - font-weight: bolder; - } -} -@media only screen and (max-width: 955px) { -#dossier { - display:inline; - float:left; - width:100%; - top:0px; - text-align: left; - font-variant:small-caps; - font-weight: bolder; - } -} - -div.foldercontent { - font-size:14px; - font-size:0.95rem; - width: 80%; - margin-left: 10%; -} - -h1.title { - color: #FF7F50; - font-style: italic; - text-align:center; - text-transform: uppercase; -} -h2.title { -/* - background: -moz-linear-gradient(top, rgba(242,130,91,0.94) 0%, rgba(229,91,43,0.98) 62%, rgba(240,113,70,0.99) 73%, rgba(240,113,70,1) 100%); FF3.6+ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(242,130,91,0.94)), color-stop(62%,rgba(229,91,43,0.98)), color-stop(73%,rgba(240,113,70,0.99)), color-stop(100%,rgba(240,113,70,1))); Chrome,Safari4+ - background: -webkit-linear-gradient(top, rgba(242,130,91,0.94) 0%,rgba(229,91,43,0.98) 62%,rgba(240,113,70,0.99) 73%,rgba(240,113,70,1) 100%); Chrome10+,Safari5.1+ - background: -o-linear-gradient(top, rgba(242,130,91,0.94) 0%,rgba(229,91,43,0.98) 62%,rgba(240,113,70,0.99) 73%,rgba(240,113,70,1) 100%); Opera 11.10+ - background: -ms-linear-gradient(top, rgba(242,130,91,0.94) 0%,rgba(229,91,43,0.98) 62%,rgba(240,113,70,0.99) 73%,rgba(240,113,70,1) 100%); IE10+ - background: linear-gradient(to bottom, rgba(242,130,91,0.94) 0%,rgba(229,91,43,0.98) 62%,rgba(240,113,70,0.99) 73%,rgba(240,113,70,1) 100%); W3C - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f0f2825b', endColorstr='#f07146',GradientType=0 ); IE6-9 */ -/* Other test */ -/*background: #feccb1; Old browsers -background: -moz-linear-gradient(top, #feccb1 0%, #f17432 50%, #ea5507 51%, #fb955e 100%); FF3.6+ -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#feccb1), color-stop(50%,#f17432), color-stop(51%,#ea5507), color-stop(100%,#fb955e)); Chrome,Safari4+ -background: -webkit-linear-gradient(top, #feccb1 0%,#f17432 50%,#ea5507 51%,#fb955e 100%); Chrome10+,Safari5.1+ -background: -o-linear-gradient(top, #feccb1 0%,#f17432 50%,#ea5507 51%,#fb955e 100%); Opera 11.10+ -background: -ms-linear-gradient(top, #feccb1 0%,#f17432 50%,#ea5507 51%,#fb955e 100%); IE10+ -background: linear-gradient(to bottom, #feccb1 0%,#f17432 50%,#ea5507 51%,#fb955e 100%); W3C -filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#feccb1', endColorstr='#fb955e',GradientType=0 ); IE6-9 */ - background: rgb(255,100,86); /* Old browsers */ -background: -moz-linear-gradient(top, rgba(255,100,86,1) 11%, rgba(207,4,4,1) 67%); /* FF3.6+ */ -background: -webkit-gradient(linear, left top, left bottom, color-stop(11%,rgba(255,100,86,1)), color-stop(67%,rgba(207,4,4,1))); /* Chrome,Safari4+ */ -background: -webkit-linear-gradient(top, rgba(255,100,86,1) 11%,rgba(207,4,4,1) 67%); /* Chrome10+,Safari5.1+ */ -background: -o-linear-gradient(top, rgba(255,100,86,1) 11%,rgba(207,4,4,1) 67%); /* Opera 11.10+ */ -background: -ms-linear-gradient(top, rgba(255,100,86,1) 11%,rgba(207,4,4,1) 67%); /* IE10+ */ -background: linear-gradient(to bottom, rgba(255,100,86,1) 11%,rgba(207,4,4,1) 67%); /* W3C */ -filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff6456', endColorstr='#cf0404',GradientType=0 ); /* IE6-9 */ - color:#FFFFFF; - text-align:center; - padding:0.24%; - border:1px solid #6D3F2E; - -} -h3.title { - color: #FF7F50; - margin-left: 30px; -} -h4.title { - color: #FF7F50; - margin-left: 45px; - text-decoration: underline; -} -h5.title { - color: #FF7F50; - margin-left: 45px; - text-decoration: none; - font-style: italic; -} -div.myfieldset -{ - margin-top: 5px; - margin-left:5px; - margin-right: 5px; - border:#FFFFCC 2px groove; - border-radius: 4px; -} -#info_div { - display:none; - background-color: #FCFFCC; - color:#000000; - z-index: 15; - position: absolute; - top:0px; - left:45%; -} -div.menu3 { - font-size:13.6px; - font-size:0.85rem; - -} -#go_submit_id { - -} -.decale { - margin-left:30px; -} -#folder { - border-width:1px; - border-collapse: separate; - margin-left: 5%; - width: 90%; - border-radius: 9px; - border-style:solid; - padding : 5px; - border-color: #DF3F3F; -} -#folder tr { - height: 33px; -} -/*#folder tr.odd,#folder tr.even { - font-size : 1.2em; -}*/ -textarea.itextarea{ - border:solid #FF7F50 1px; - width:90%; - margin-left:5%; - height:120px; - color:rgb(165, 42, 42); -} - -div#notice { - position:absolute; - right:5%; - top:200px; - background-color:#FCFFCC; - border: 1px solid #000000; -} -div.name { - position:absolute; - top:0px; - left:0px; - display:block; -} -div#modele_op_div{ - display: none; - background-color:#FFF1ED; - font-family: "Liberation Sans", FreeSans, sans-serif,Arial, Helvetica; - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left: 10%; - border:1px solid #6D3F2E; - width: 80%; -} -@media only screen and (min-width: 955px) { - div.name { - position:absolute; - top:0px; - left:0px; - display: block; - } - div#modele_op_div{ - display: none; - background-color:#FFF1ED; - font-family: "Liberation Sans", FreeSans, sans-serif,Arial, Helvetica; - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left: 17.5%; - border:1px solid #6D3F2E; - width: 75%; -} -} -@media only screen and (max-width: 955px) { - div.name { - position:absolute; - top:0px; - left:0px; - display:none; - } - div#modele_op_div{ - display: none; - background-color:#FFF1ED; - font-family: "Liberation Sans", FreeSans, sans-serif,Arial, Helvetica; - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left: 10%; - border:1px solid #6D3F2E; - width: 80%; -} -} - -div#box_search_card { - position:absolute; - right:15.625%; - top:115px; -} -div.bxbutton -{ - float:right; - height:10px; - display:block; - margin-right:0.48%; - margin-top:3px; -} -div.inner_box tr.odd { -} -#modele_op_tab tr.odd { - background: #FFFFCC; -} -div#bookmark_div { - background-color:#FFF1ED; - font-family: "Liberation Sans", FreeSans, sans-serif,Arial, Helvetica; - padding:2px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - border:1px solid #6D3F2E; - top:32px; - top:2rem; - left:30%; - width:40%; -} -div#preference_div { - background-color:#FFF1ED; - font-family: "Liberation Sans", FreeSans, sans-serif,Arial, Helvetica; - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - border:1px solid #6D3F2E; - top:32px; - top:2rem; - left:20%; - width:50%; -} -#error_div{ - position:absolute; - border:1px solid #000000; - background-color:#FFCC99; - padding-bottom: 2px; - padding-top: 2px; - padding-left: 2px; - padding-right: 2px; - color:#FF0000; - top:40%;left:25%; - visibility:hidden; - width: 640px; - width:40rem; - z-index:20; -} -#error_div h2 { - background: #FF0000; -} -div#error_content_div { - color:#FF0000; - font-weight: bold; - text-align: center; -} -td.workday ol { - margin:0px; - padding:0px; - list-style-type:none; - text-align:left; -} -input.inum { - text-align:right; - border:1px solid #FF7F50; - margin:2px -} -div.box { - background-color:#FFF1ED; - font-family: "Liberation Sans", FreeSans, sans-serif,Arial, Helvetica; - margin-top:10px; - margin-left:3px; - margin-right:3px; - padding:2px; - overflow:hidden; - border:1px solid #6D3F2E; - width:30%; - height:350px; - float:left; - font-size:14px; - font-size:0.90rem; -} -@media only screen and (max-width: 1426px) { - div.box { - width: 48%; - height: 380px; - } -} -@media only screen and (max-width: 955px) { - div.box { - width: 95%; - - height: 380px; -} -} -div.box table{ - border-spacing:0px; -} -div.box tr.odd { - background-color: #FFF1ED; - -} -div.box tr.even { - background-color:#FFF1ED; - -} -#jrn_name_div h2{ - font-size:38.4px; - font-size: 2.4rem; -} -#search_account { - width: 70%; -} -fieldset { - border-width: 1px; -} -#tva_select table { - border-spacing: 0px; -} -a { - color: brown; -/* text-decoration: underline; */ - cursor: pointer; -} -#mod_predf_op { - width: 80%; - overflow: auto; - overflow-style: panner; -} -hr { - color : orangered; - background-color : orangered; - width : 75%; - border-width:2px; - border-style:solid; - margin-left: 12.5% -} - -/**************************************************************************** - * Aligned button - ****************************************************************************/ -ul.aligned-block { - padding:5px; - display : block; -} -ul.aligned-block li { - display:table-cell; - padding : 10px; - list-style: none; -} -/**************************************************************************** - * Tabs - ****************************************************************************/ -ul.tabs { - padding-top: 15px; - display:block; - border-bottom: 1px solid red; - padding-left: 2px -} -ul.tabs a { - display:inline; -} -li.tabs_selected { - display:inline; - background: #F9C5B6; /* Old browsers */ - border-top-left-radius: 10px; - border-top-right-radius: 10px; - margin-left: 5px; - padding: 20px 15px 0px 15px; - border:1px red solid; -} - -li.tabs,li.tabs:hover{ - display:inline; - margin-left: 5px; - border-top-right-radius: 10px; - padding: 15px 15px 0px 15px; - border:1px red solid; - color:rgb(165, 42, 42); -} -li.tabs { - background-color: inherit; - -} -li.tabs:hover { - background-color: pink; - color:wheat; - border:1px orange solid; - -} -ul.tabs a { - text-decoration: none; - color:inherit; - display:inline; - white-space: nowrap; - -} -ul.tabs a:hover { - text-decoration: none; - color:red; - display:inline; - background-color: pink; - white-space: nowrap; -} -@media only screen and (max-width: 1426px) { - li.tabs_selected { - padding: 8px 10px 10px 10px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - } - li.tabs , li.tabs:hover { - padding: 10px 10px 0px 10px; - } -} -@media only screen and (max-width: 955px) { - li.tabs_selected { - padding: 1px 1px 1px 1px; - border-top-left-radius: 0px; - border-top-right-radius: 0px; - } - li.tabs , li.tabs:hover { - padding: 1px 1px 1px 1px; - } -} -/***************************************************************************** - * Second row of menu - *****************************************************************************/ -div.menu2 a.mtitle{ - font-size:13.6px; - font-size:0.85rem; - padding-left: 2%; - padding-right: 2%; -} - -div.menu2 table.mtitle td.mtitle { - border:0px; - background:inherit; - color:white; - /* width: 10rem; */ - border-spacing: 12px; - border-bottom: 2px #E95353 solid; - border-radius: 0px; - -} -div.menu2 table.mtitle td.mtitle a.mtitle { - color:red; - padding-left: 2%; - padding-right: 2%; - cursor:pointer; -} -/***************************************************************************** - * Table of one column to present menu - * as in CFGLED, FORECAST, REPORT - *****************************************************************************/ -table.vert_mtitle { - text-align:center; - /* border:5px solid #99B1DF; */ - border-radius:5px; - width:80%; - margin-left: 10%; - border-collapse: separate; - border-spacing: 10px; - - -} -table.vert_mtitle td.first { - background-color: #FFBC93; - color:#DF3F3F; -} -table.vert_mtitle td.first a { - background-color: #FFBC93; - color:#DF3F3F; -} -table.vert_mtitle td { - border : 1px solid #99B1DF; - background-color:#FFD4BA; - border-top-radius:20px; -} -table.vert_mtitle td a{ - padding : 20px; - font-weight: bold; -} -table.vert_mtitle td:hover { - border : 1px solid #99B1DF; - background-color: #336699; - color:white; -} -table.vert_mtitle td:hover a{ - color:white; - -} -/******************************************************************************* - * Tiny button example : -X for remove action, remove link... - *******************************************************************************/ -div.content a.tinybutton{ - color: red; - font-weight: bold; - text-decoration: none; - font-family: arial,verdana,sans-serif,helvetica; - font-size: 8px; - font-size: 0.7rem; - padding-bottom: 0px; - padding-top: 0px; - padding-right: 0px; - padding-left: 0px; - margin-top: 3px; - cursor: pointer; - margin: 1px 2px 1px 2px; - border-width: 1px; - border-style: solid; - border-color: blue; - border-radius: 2px; - display : inline; -} -input[type="button"].tinybutton { - color: red; - font-weight: blue; - text-decoration: none; - font-family: arial,verdana,sans-serif,helvetica; - font-size: 8px; - font-size: 0.7rem; - padding-bottom: 0px; - padding-top: 0px; - padding-right: 0px; - padding-left: 0px; - margin-top: 3px; - cursor: pointer; - margin: 1px 2px 1px 2px; - border-width: 1px; - border-style: solid; - border-color: red; - border-radius: 2px; - display : inline; - background-color:white; -} -/******************************************************************************* - Image Search -*******************************************************************************/ -.image_search { - cursor:pointer; - width:16px; - height:16px; - vertical-align: top; - border-radius: 2px; - - border-width: 1px; - border-color: #6D3F2E; - background: #feccb1; /* Old browsers */ -background: -moz-linear-gradient(top, #feccb1 0%, #f17432 50%, #ea5507 51%, #fb955e 100%); /* FF3.6+ */ -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#feccb1), color-stop(50%,#f17432), color-stop(51%,#ea5507), color-stop(100%,#fb955e)); /* Chrome,Safari4+ */ -background: -webkit-linear-gradient(top, #feccb1 0%,#f17432 50%,#ea5507 51%,#fb955e 100%); /* Chrome10+,Safari5.1+ */ -background: -o-linear-gradient(top, #feccb1 0%,#f17432 50%,#ea5507 51%,#fb955e 100%); /* Opera 11.10+ */ -background: -ms-linear-gradient(top, #feccb1 0%,#f17432 50%,#ea5507 51%,#fb955e 100%); /* IE10+ */ -background: linear-gradient(to bottom, #feccb1 0%,#f17432 50%,#ea5507 51%,#fb955e 100%); /* W3C */ -filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#feccb1', endColorstr='#fb955e',GradientType=0 ); /* IE6-9 */ - - padding : 3px; - -} -/****************************************************************************** - * Hightlight row in a table - ******************************************************************************/ -tr.highlight{ - font-weight: bolder; - font-size:14px; - background-color: lightgrey ! important; - color:orangered !important; - border-width: 0px; - border-style: solid; - border-color: inherit; - -} -tr.highlight a{ - color:white !important; - background-color:grey !important; - -} -//--- Top menu and menu2 -div.topmenu a.mtitle , div.menu2 a.mtitle{ - font-size:13.6px; - font-size:0.85rem; - color:red; -} -div.topmenu a.mtitle:hover,div.menu2 a.mtitle:hover{ - color:red; - background-color: transparent; -} -div.topmenu td.selectedcell a.mtitle, div.menu2 a.mtitle{ - font-size:13.6px; - font-size:0.85rem; -} -*|*:link { - color: inherit; -} -/****************************************************************************** - * Total in confirmation VEN / ACH - ******************************************************************************/ -#total_div_id { - float: right; - margin-right: 150px; - background: snow; - margin-top: 50px; -} -/******************************************************************************* - * For TODO List - *******************************************************************************/ -#add_todo_list , div.add_todo_list { - border:1px solid #0000FF; - background-color:#FFCCCC; - padding:0.07%; - position:absolute; - text-align:left; - z-index:1; - width:480px; - width:30rem; - height:auto; -} -/*************************************************************************** - * column in the dashboard - ***************************************************************************/ -td.cut { - max-width: 25%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -td.box { - border-left : #C76626 solid 1px; -} - -/**************************************************************************** -* Smoke appearance of modal box - ****************************************************************************/ -.smoke-base { - position: fixed; - top: 0px; - left: 0px; - bottom: 0px; - right: 0px; - visibility: hidden; - opacity: 0; - background: rgba(0,0,0,.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#90000000,endColorstr=#900000000); -} - -.smoke-base.smoke-visible { - opacity: 1; - visibility: visible; -} - -.smokebg { - position: fixed; - top: 0px; - left: 0px; - bottom: 0px; - right: 0px; -} - -.smoke-base .dialog { - position: absolute; - top: 25%; - width: 40%; - left: 50%; - margin-left: -20%; -} - -.dialog-prompt { - margin-top: 15px; - text-align: center; -} - -.dialog-buttons { - margin: 20px 0px 5px 0px -} - -.smoke { - text-align: center; - background-color:#FFF1ED ; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - - padding:2px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left:10%; - border:1px solid #white; --moz-box-shadow: 10px 10px 5px #888; --webkit-box-shadow: 10px 10px 5px #888; -box-shadow: 10px 10px 5px #888; -font-size:14.4px; -font-size:0.90rem; -width: 85%; -} -.dialog-buttons button:hover{ - color:beige; - font-weight: bold; -} -.dialog-buttons button { - color:#FFFFFF; - font-weight: normal; - text-decoration:none; - - border-color: #6D3F2E; - background: #feccb1; /* Old browsers */ -background: -moz-linear-gradient(top, #feccb1 0%, #f17432 50%, #ea5507 51%, #fb955e 100%); /* FF3.6+ */ -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#feccb1), color-stop(50%,#f17432), color-stop(51%,#ea5507), color-stop(100%,#fb955e)); /* Chrome,Safari4+ */ -background: -webkit-linear-gradient(top, #feccb1 0%,#f17432 50%,#ea5507 51%,#fb955e 100%); /* Chrome10+,Safari5.1+ */ -background: -o-linear-gradient(top, #feccb1 0%,#f17432 50%,#ea5507 51%,#fb955e 100%); /* Opera 11.10+ */ -background: -ms-linear-gradient(top, #feccb1 0%,#f17432 50%,#ea5507 51%,#fb955e 100%); /* IE10+ */ -background: linear-gradient(to bottom, #feccb1 0%,#f17432 50%,#ea5507 51%,#fb955e 100%); /* W3C */ -filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#feccb1', endColorstr='#fb955e',GradientType=0 ); /* IE6-9 */ - border-color: #605D5D; - border-width:0px; - padding:4px; - margin:3px; - cursor:pointer; - margin:1px 2px 1px 2px; - border-radius: 5px; - moz-border-radius:5px; - width:7em; - width:7rem; -} - -.dialog-prompt input { - margin: 0; - border: 0; - font-family: sans-serif; - outline: none; - font-family: Menlo, 'Andale Mono', monospace; - border: 1px solid #aaa; - width: 75%; - display: inline-block; - background-color: transparent; - font-size: 16px; - padding: 8px; -} - -.smoke-base .dialog-inner { - padding: 15px; - - color:#202020; -} - -button.cancel { - background-color: rgba(0,0,0,.50); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#2000,endColorstr=#444444); -} - -.queue{ - display:none; -} - -/***************************************************************************** - * autocomplete style - *****************************************************************************/ - -div.autocomplete_fixed { - background-color:#FFFFFF; - border:1px solid #C76626; - margin:0px; - padding:0px; - text-align:left; -} -div.autocomplete_fixed em { - color: #C76626; - font-weight:bold; -} -div.autocomplete_fixed ul { - list-style-type:none; - background-color:#FFFFFF; - border:1px solid blue; - width:300px; - margin:0px; - padding:0px; - } -div.tag { - -} -@media only screen and (max-width: 1280px) { - div.autocomplete_fixed ul { - list-style-type:none; - background-color:#FFFFFF; - border:1px solid blue; - width:300px; - margin:0px; - padding:0px; - } - div.tag { - - } - -} -@media only screen and (min-width: 1281px) { - div.autocomplete_fixed ul { - list-style-type:none; - background-color:#FFFFFF; - border:#EF5F2B 1px solid; - width:500px; - margin:0px; - padding:0px; - } - div.tag { - width: 50%; - } - - -} -div.autocomplete_fixed ul li.selected { - background-color: #feccb1; - border-bottom: #000000 1px solid ; -} - -div.autocomplete_fixed ul li { - list-style-type:none; - display:block; - margin:0px; - padding:0px; - cursor:pointer; -} \ No newline at end of file diff --git a/sources/html/style-mobile.css b/sources/html/style-mobile.css deleted file mode 100644 index 008a3a8..0000000 --- a/sources/html/style-mobile.css +++ /dev/null @@ -1,2036 +0,0 @@ - /* */ -#add_todo_list,div.add_todo_list { - border:1px solid #605D5D; - background-color:#DDE6FF; - padding:0.07%; - position:absolute; - text-align:left; - z-index:1; - width: 480px; - width:30rem; - height:auto; -} -div.welcome { - -} -div.gest_name { - float:left; - margin-left:150px; - margin-top:15px; -} -h2.gest_name { - border-left: 5px solid #403a8d; - border-bottom:1px solid #b4bbc2; - border-top:1px solid #b4bbc2; - border-right:1px solid #b4bbc2; - padding: 5px; - width: 40%; -} -body.op_detail_frame,div.op_detail_frame { - background-color:#e4e7ed; - height:100%; width:100%; --moz-box-shadow: 10px 10px 5px #888; --webkit-box-shadow: 10px 10px 5px #888; -box-shadow: 10px 10px 5px #888; - - -} -div.inner_box { - background-color: #DCE1EF; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - - padding:2px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left:10%; - border:1px solid #00008B; --moz-box-shadow: 10px 10px 5px #888; --webkit-box-shadow: 10px 10px 5px #888; -box-shadow: 10px 10px 5px #888; -font-size:14.4px; -font-size:0.90rem; -width: 85%; -} - -@media only screen and (min-width: 1281px) { -div.inner_box { - width: 85%; - } -} - -@media only screen and (max-width: 1280px) { -div.inner_box { - width: 95%; - left:2%; - margin-bottom: 2%; - } -} -div.op_detail_title { - background-color:#888; - /* width:500;*/ - - -} - -div#div_cat{ - position:absolute; - border:1px solid #000000; - top:15%;left:100; - visibility:hidden; - z-index:2; - width:50em; - background-color:#EDF3FF; - -} - -div.divinfo -{ - color:#FF0000; - text-align:right; - display:block; - width:480px; - width:30rem; - height:13px; - font-weight:bold; -} - -div#search_form -{ - position:absolute; - border:1px solid #000000; - top:15%;left:100px; - z-index:2; - width:50%; - display:none; - background-color:#e4e7ed; - -moz-box-shadow: 10px 10px 5px #888; - -webkit-box-shadow: 10px 10px 5px #888; - box-shadow: 10px 10px 5px #888; - width:90%; -} -@media only screen and (max-width: 995px) { - div#search_form { - width:90%; - margin-left:5%; - left:0px; - } -} - -table.sortable td, table.table_large td, table.result td -{ - padding-left:5px; - padding-right:5px; -} -table.info_op -{ - width:100%; -} -table.info_op tr -{ - background:#FFFFFF; -} -h2#jrn_name -{ - color:#605D5D; - margin-right:30%; - float: right; -} -tr.footer{ - font-style: italic; - font-weight: bold; - -} -span.remain { - font-weight: bold; - color:#000000; -} - div#jrn_name_div - { - float: right; - margin-right:150px; - - - } - #predef_form { - margin-left:20%; - width:60%; - position:absolute; - z-index:2 - } -@media only screen and (min-width: 955px) { - div#jrn_name_div - { - float: right; - margin-right:150px; - - - } - #predef_form { - margin-left:20%; - width:60%; - position:absolute; - z-index:2 - } -} -@media only screen and (max-width: 955px) { - div#jrn_name_div - { - } - #predef_form { - } -} -#direct -{ - display:inline; - float:left; -} -#calc -{ - display:inline; - float:left; -} -div#wait_box -{ - background-color:#DDE6FF; - font-family: arial,verdana,helvetica,arial,sans-serif; - width: 300px; - padding:0px; - margin:0px; - overflow:hidden; - z-index:10; - - position:absolute; - left:30%; - top:30%; - - - border:1px solid #00008B; - - width: 260px; - widt: 260px; -} -#wait_box h2 -{ - /* color:#000000; */ - text-align:center; - /* width: 50%; */ -} -div#div_jrnsearch_op{ - - border:1px solid #000000; - width:800px; - width:50rem; - background-color:#EDF3FF; - z-index: 5; - -} -ul { - padding-left: 110px; -} -a.line,div.content a.line -{ - text-decoration:underline; - display:inline; - /* color: #605D5D; */ -} -a.line:hover,div_content a.line -{ - text-decoration:underline; - display:inline; - color: #FFFFFF; - background-color:#336699; -} -#close_div -{ - color:white; - text-decoration:none; - border:0px; - margin-left: 2px; - margin-right:2px; - margin-top:2px; - font-size:12px; - font-size: 1.2rem; -} -#close_div:hover -{ - background-color: #F93; -} -#popmeout -{ - background-color:#FFFFFF; - color:#605D5D; - text-decoration:none; - border:1px solid #605D5D; - margin-left: 2px; - margin-right:18px; - font-size:12px; - font-size: 0.75rem; -} -#popmeout:hover -{ - background-color: #F93; -} -table.table_large tr.odd ,table.table_large tr.even { - - height:32px; -} -#calc1 -{ - position:absolute; - display:block; - top:30px; - left:150px; - width:300px; - border:1px solid #000000; - background-color:#aec3e8; - padding: 20px 20px; -} -span.invoice -{ - font-style: italic; - display:block; - margin: 20px; - font-weight: bold; -} -a.nav,div.content a.nav,div.redcontent a.nav { - display:inline; - text-decoration:none; -} -a.nav:hover,div.content a.nav:hover,div.redcontent a.nav:hover { - display:inline; - text-decoration:none; - background-color:#00008B; - color:#FFFFFF; -} -#dossier { - display:inline; - float:left; - width:100%; - top:0px; - text-align: center; - font-variant:small-caps; - font-weight: bolder; - text-transform: full-width; - text-transform: fullwidth; - font-size: 150%; -} -@media only screen and (min-width: 955px) { -#dossier { - display:inline; - float:left; - width:100%; - top:0px; - text-align: center; - font-variant:small-caps; - font-weight: bolder; - text-transform: full-width; - text-transform: fullwidth; - - font-size: 150%; -} -} -@media only screen and (max-width: 955px) { -#dossier { - display:inline; - float:left; - width:100%; - top:0px; - text-align: left; - font-variant:small-caps; - font-weight: bolder; - text-transform: full-width; - } -} - -div.foldercontent { - font-size:14px; - font-size:0.95rem; - width: 80%; - margin-left: 10%; -} - -h1.title { - color: #605D5D; - font-style: italic; - text-align:center; - text-transform: uppercase; -} -h2.title { - -// background: rgb(149,149,149); /* Old browsers */ -// background: -moz-linear-gradient(top, rgba(149,149,149,1) 0%, rgba(13,13,13,1) 46%, rgba(1,1,1,1) 50%, rgba(10,10,10,1) 53%, rgba(78,78,78,1) 76%, rgba(56,56,56,1) 87%, rgba(27,27,27,1) 100%); /* FF3.6+ */ -// background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(149,149,149,1)), color-stop(46%,rgba(13,13,13,1)), color-stop(50%,rgba(1,1,1,1)), color-stop(53%,rgba(10,10,10,1)), color-stop(76%,rgba(78,78,78,1)), color-stop(87%,rgba(56,56,56,1)), color-stop(100%,rgba(27,27,27,1))); /* Chrome,Safari4+ */ -// background: -webkit-linear-gradient(top, rgba(149,149,149,1) 0%,rgba(13,13,13,1) 46%,rgba(1,1,1,1) 50%,rgba(10,10,10,1) 53%,rgba(78,78,78,1) 76%,rgba(56,56,56,1) 87%,rgba(27,27,27,1) 100%); /* Chrome10+,Safari5.1+ */ -// background: -o-linear-gradient(top, rgba(149,149,149,1) 0%,rgba(13,13,13,1) 46%,rgba(1,1,1,1) 50%,rgba(10,10,10,1) 53%,rgba(78,78,78,1) 76%,rgba(56,56,56,1) 87%,rgba(27,27,27,1) 100%); /* Opera 11.10+ */ -// background: -ms-linear-gradient(top, rgba(149,149,149,1) 0%,rgba(13,13,13,1) 46%,rgba(1,1,1,1) 50%,rgba(10,10,10,1) 53%,rgba(78,78,78,1) 76%,rgba(56,56,56,1) 87%,rgba(27,27,27,1) 100%); /* IE10+ */ -///background: linear-gradient(to bottom, rgba(149,149,149,1) 0%,rgba(13,13,13,1) 46%,rgba(1,1,1,1) 50%,rgba(10,10,10,1) 53%,rgba(78,78,78,1) 76%,rgba(56,56,56,1) 87%,rgba(27,27,27,1) 100%); /* W3C */ - background: #606c88; /* Old browsers */ - background: -moz-linear-gradient(top, #606c88 0%, #3f4c6b 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#606c88), color-stop(100%,#3f4c6b)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* IE10+ */ - background: linear-gradient(to bottom, #606c88 0%,#3f4c6b 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#606c88', endColorstr='#3f4c6b',GradientType=0 ); /* IE6-9 */ -//filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#959595', endColorstr='#1b1b1b',GradientType=0 ); /* IE6-9 */ - color:#FFFFFF; - text-align:center; - padding:0.24%; - border:1px solid #00008B; - -} -h3.title { - color: #605D5D; - margin-left: 30px; -} -h4.title { - color: #605D5D; - margin-left: 45px; - text-decoration: underline; -} -h5.title { - color: #605D5D; - margin-left: 45px; - text-decoration: none; - font-style: italic; -} -div.myfieldset -{ - margin-top: 5px; - margin-left:5px; - margin-right: 5px; - border:#EDF3FF 2px groove; - border-radius: 4px; -} -#info_div { - display:none; - background-color: #FCFFCC; - color:#000000; - z-index: 15; - position: absolute; - top:0px; - left:45%; -} -div.menu2 a.mtitle{ - font-size:13.60px; - font-size:0.85rem; - /* color:brown; */ -} -div.menu3 { - font-size:13.60px; - font-size:0.85rem; - -} -#go_submit_id { - -} -.decale { - margin-left:30px; -} -#folder { - border-width:1px; - border-collapse: separate; - margin-left: 5%; - width: 90%; - border-radius: 9px; - border-style:solid; - padding : 5px; - - } - #folder tr { - height: 30px; - } -/*#folder tr.odd,#folder tr.even { - font-size : 1.2em; -}*/ -textarea.itextarea{ - border:solid #605D5D 1px; - width:90%; - margin-left:5%; - height:120px; -} - -div#notice { - position:absolute; - right:5%; - top:200px; - background-color:#FCFFCC; - border: 1px solid #000000; -} - div.name { - position:absolute; - top:0px; - left:0px; - } - div#modele_op_div{ - display: none; - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left: 17.5%; - border:1px solid #00008B; - width: 75%; -} -@media only screen and (min-width: 955px) { - div.name { - position:absolute; - top:0px; - left:0px; - } - div#modele_op_div{ - display: none; - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left: 17.5%; - border:1px solid #00008B; - width: 75%; -} -} -@media only screen and (max-width: 955px) { - div.name { - position:absolute; - top:0px; - left:0px; - display:none; - } - div#modele_op_div{ - display: none; - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left: 10%; - border:1px solid #00008B; - width: 80%; -} -} - -div#box_search_card { - position:absolute; - right:15.625%; - top:115px; -} -div.bxbutton -{ - float:right; - height:10px; - display:block; - margin-top:0.48%; - margin-right:0.48%; -} -div.inner_box tr.odd { - background: #E5E5E5; -} -#modele_op_tab tr.odd { - background: #EDF3FF; -} -div#bookmark_div { - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - - padding:2px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - border:1px solid #00008B; - top:32px; - top:2rem; - left:30%; - width:40%; -} -div#preference_div { - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - - padding:0px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - border:1px solid #00008B; - top:32px; - top:2rem; - left:20%; - width:50%; -} -#error_div{ - position:absolute; - border:1px solid #000000; - background-color:#DDE6FF; - padding-bottom: 2px; - padding-top: 2px; - padding-left: 2px; - padding-right: 2px; - color:#FF0000; - top:40%;left:25%; - visibility:hidden; - width: 640px; - width:40rem; - z-index:20; -} -#error_div h2 { - background: #FF0000; -} -div#error_content_div { - color:#FF0000; - font-weight: bold; - text-align: center; -} -td.workday ol { - margin:0px; - padding:0px; - list-style-type:none; - text-align:left; -} -input.inum { - text-align:right; - border:1px solid #605D5D; - margin:2px -} -/************************************************************************** -Box dashboard on 3 columns -**************************************************************************/ -div.box { - background-color:#e4e7ed; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - - margin-top:10px; - margin-left:3px; - margin-right:3px; - padding:2px; - overflow:hidden; - border:1px solid #00008B; - width:30%; - height:350px; - float:left; - font-size:14px; - font-size:0.90rem; -} -@media only screen and (max-width: 1426px) { -/* Dashboard on 2 cols */ - div.box { - width: 48%; - height: 380px; - } -} -@media only screen and (max-width: 955px) { -/* Dashboard on 1 cols */ - div.box { - width: 95%; - - height: 380px; -} -} -div.box table{ - border-spacing:0px; -} -div.box tr.odd { - background-color: #F2F6FD; - -} -div.box tr.even { - background-color:#e4e7ed; - -} -#jrn_name_div h2{ - font-size:38.4px; - font-size: 2.4rem; -} -#search_account { - width: 70%; -} -fieldset { - border-width: 1px; -} -#tva_select table { - border-spacing: 0px; -} -#mod_predf_op { - width: 80%; - overflow: auto; - overflow-style: panner; -} -/**************************************************************************** - * Tabs - ****************************************************************************/ -ul.tabs { - padding-top: 15px; - display:block; - border-bottom: 1px solid #879ed4; - padding-left: 2px -} -ul.tabs a { - display:inline; -} -li.tabs_selected { - display:inline; - background: rgb(206,220,231); /* Old browsers */ -background: -moz-linear-gradient(top, rgba(206,220,231,1) 0%, rgba(89,106,114,1) 100%); /* FF3.6+ */ -background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(206,220,231,1)), color-stop(100%,rgba(89,106,114,1))); /* Chrome,Safari4+ */ -background: -webkit-linear-gradient(top, rgba(206,220,231,1) 0%,rgba(89,106,114,1) 100%); /* Chrome10+,Safari5.1+ */ -background: -o-linear-gradient(top, rgba(206,220,231,1) 0%,rgba(89,106,114,1) 100%); /* Opera 11.10+ */ -background: -ms-linear-gradient(top, rgba(206,220,231,1) 0%,rgba(89,106,114,1) 100%); /* IE10+ */ -background: linear-gradient(to bottom, rgba(206,220,231,1) 0%,rgba(89,106,114,1) 100%); /* W3C */ -filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cedce7', endColorstr='#596a72',GradientType=0 ); /* IE6-9 */ - color:whitesmoke; - margin-left: 2px; - padding: 12px 15px 15px 15px; - border-top-left-radius: 10px; - border-top-right-radius: 10px; - border:1px #879ed4 solid; - font-weight: bold; - -} -li.tabs { - display:inline; - background-color: inherit; - color:inherit; - margin-left: 2px; - padding: 15px 15px 0px 15px; - border-top-left-radius: 10px; - border-top-right-radius: 10px; - border:1px grey solid; - -} -li.tabs:hover { - display:inline; - background-color: grey; - color:wheat;margin-left: 2px; - padding: 15px 15px 0px 15px; - border-top-left-radius: 10px; - border-top-right-radius: 10px; - border:1px grey solid; - -} -ul.tabs a { - text-decoration: none; - color:inherit; - display:inline; - white-space: nowrap; - -} -ul.tabs a:hover { - text-decoration: none; - color:white; - display:inline; - background-color: lightblue; - white-space: nowrap; -} -@media only screen and (max-width: 1426px) { - li.tabs_selected { - padding: 8px 10px 10px 10px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - } - li.tabs , li.tabs:hover { - padding: 10px 10px 0px 10px; - } -} -/***************************************************************************** - * Table of one column to present menu - * as in CFGLED, FORECAST, REPORT - *****************************************************************************/ -table.vert_mtitle { - text-align:center; - /* border:5px solid #99B1DF; */ - border-radius:5px; - width:80%; - margin-left: 10%; - border-collapse: separate; - border-spacing: 10px; - - -} -table.vert_mtitle td.first { - background-color: #DCE1EF; -} -table.vert_mtitle td { - border : 1px solid #99B1DF; - background-color:#EDEDED; - border-top-radius:20px; -} -table.vert_mtitle td a{ - padding : 20px; - font-weight: bold; -} -table.vert_mtitle td:hover { - border : 1px solid #99B1DF; - background-color: #336699; - color:white; -} -table.vert_mtitle td:hover a{ - color:white; - -} - -/******************************************************************************* - * Tiny button example : -X for remove action, remove link... - *******************************************************************************/ -div.content a.tinybutton,input[type="button"].tinybutton { - color: red; - font-weight: bold; - text-decoration: none; - font-family: arial,verdana,sans-serif,helvetica; - /* background-image: url("image/bg-submit2.gif"); - background-repeat: repeat-x; - background-position: left; */ - font-size: 8px; - font-size: 0.7rem; - padding-bottom: 0px; - padding-top: 0px; - padding-right: 0px; - padding-left: 0px; - margin-top: 3px; - cursor: pointer; - margin: 1px 2px 1px 2px; - border-width: 1px; - border-style: solid; - border-color: orangered; - border-radius: 2px; - display : inline; -} -/*div.content td.mtitle a.mtitle { - color:darkslategrey; - // font-variant: small-caps; - background-color: inherit; -}*/ -/******************************************************************************* - Image Search -*******************************************************************************/ -.image_search { - cursor:pointer; - width:16px; - height:16px; - padding:1px; - border:#000000 1px solid; - vertical-align: top; - background: grey; -} - -/**************************************************************************** - * Aligned button - ****************************************************************************/ -ul.aligned-block { - padding:5px; - display : block; -} -ul.aligned-block li { - display:table-cell; - padding : 10px; - list-style: none; -} -/****************************************************************************** - * Total in confirmation VEN / ACH - ******************************************************************************/ -#total_div_id { - float: right; - margin-right: 150px; - background: snow; - margin-top: 50px; -} -// Selected cell in the module -td.toolselected {background-color: #909BA7; } -/*************************************************************************** - * column in the dashboard - ***************************************************************************/ -td.cut { - max-width: 25%; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -td.box { - border-left : #C76626 solid 1px; -} -/**************************************************************************** -* Smoke appearance of modal box - ****************************************************************************/ -.smoke-base { - position: fixed; - top: 0px; - left: 0px; - bottom: 0px; - right: 0px; - visibility: hidden; - opacity: 0; - background: rgba(0,0,0,.3); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#90000000,endColorstr=#900000000); -} - -.smoke-base.smoke-visible { - opacity: 1; - visibility: visible; -} - -.smokebg { - position: fixed; - top: 0px; - left: 0px; - bottom: 0px; - right: 0px; -} - -.smoke-base .dialog { - position: absolute; - top: 25%; - width: 40%; - left: 50%; - margin-left: -20%; -} - -.dialog-prompt { - margin-top: 15px; - text-align: center; -} - -.dialog-buttons { - margin: 20px 0px 5px 0px -} - -.smoke { - text-align: center; - background-color: #DCE1EF; - font-family: Arial, Helvetica, "Liberation Sans", FreeSans, sans-serif; - font-family: 'openSansRegular'; - - padding:2px; - margin:0px; - overflow:hidden; - z-index:3; - position:absolute; - left:10%; - border:1px solid #00008B; --moz-box-shadow: 10px 10px 5px #888; --webkit-box-shadow: 10px 10px 5px #888; -box-shadow: 10px 10px 5px #888; -font-size:14.4px; -font-size:0.90rem; -width: 85%; -} -.dialog-buttons button:hover{ - color:beige; - font-weight: bold; -} -.dialog-buttons button { - color:#FFFFFF; - font-weight: normal; - text-decoration:none; - background: #606c88; /* Old browsers */ - background: -moz-linear-gradient(top, #606c88 0%, #3f4c6b 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#606c88), color-stop(100%,#3f4c6b)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #606c88 0%,#3f4c6b 100%); /* IE10+ */ - background: linear-gradient(to bottom, #606c88 0%,#3f4c6b 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#606c88', endColorstr='#3f4c6b',GradientType=0 ); /* IE6-9 */ - border-color: #605D5D; - border-width:0px; - padding:4px; - margin:3px; - cursor:pointer; - margin:1px 2px 1px 2px; - border-radius: 5px; - moz-border-radius:5px; - width:7em; - width:7rem; -} - -.dialog-prompt input { - margin: 0; - border: 0; - font-family: sans-serif; - outline: none; - font-family: Menlo, 'Andale Mono', monospace; - border: 1px solid #aaa; - width: 75%; - display: inline-block; - background-color: transparent; - font-size: 16px; - padding: 8px; -} - -.smoke-base .dialog-inner { - padding: 15px; - - color:#202020; -} - -button.cancel { - background-color: rgba(0,0,0,.40); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#444444,endColorstr=#444444); -} - -.queue{ - display:none; -} diff --git a/sources/html/style-print.css b/sources/html/style-print.css deleted file mode 100644 index 729ec56..0000000 --- a/sources/html/style-print.css +++ /dev/null @@ -1,296 +0,0 @@ -body { - font-size:10pt; - font-family:sans-serif; - margin-left: 5mm; - margin-right: 5mm; - } -input, select ,.input_text{ - font-size:10pt; - border:1px solid #FFFFFF; - } -form { - display:none; - } -.print { - font-size:10pt; - display: block; - } -.noprint { - display:none; - } - -.button, .smallbutton{ - display:none; - } -div.recherche_form { - display:none; - } -table.result { - font-size:10pt; - font-family:sans-serif; - width:100% - } - -table.result th { - font-size:105%; - font-family:sans-serif; -} -h3,h4 { - font-size:110%; - text-decoration: underline; - font-family:sans-serif; -} - -h2 { - font-size:110%; - font-weight:bold; - font-family:sans-serif; -} -div.info { - display:none; -} -.content { - font-size:10pt; -} -h1.content,h1,h2.info,legend { - font-size:120%; - font-weight:bold; - font-family:sans-serif; -} -h3.info { - display:none; -} - -h2.info2 { - display:none; -} - - -h2.error { - display:none; -} - -h1.title { - display:none; -} -div.mtitle { - display:none; - -} - -div.tmenu { - display:none; -} -div.u_tmenu { - - display:none; -} -div.lmenu { - display:none; -} -div.lextmenu { - display:none; -} -div.searchmenu { - display:none; -} -div.credit{ - display:none; -} -div.debit{ - display:none; -} -div.recherche{ - font-size:10pt; - font-family:sans-serif; -} -div.redcontent{ - font-size:10pt; - font-family:sans-serif; - -} -div.redcontent{ - font-size:10pt; - font-family:sans-serif; -} -div.ccontent{ - font-size:10pt; - font-family:sans-serif; -} -div.rmenu { - display:none; -} - -table.mtitle { - display: none; -} -td.mshort { - display:none; -} -td.mlltitle { - display:none; -} -td.mltitle { - display:none; -} -td.mtitle { - display:none; -} -span.mtitle2 { - display:none; -} -span.mtitle { - display:none; -} -span.odd { - display:none; - } -span.even { - display:none; - } - -tr.odd { - font-size:10pt; - font-family:sans-serif; -} -tr { - font-size:10pt; - font-family:sans-serif; - } -tr.even { - - font-size:10pt; - font-family:sans-serif; -} -td.odd{ - font-size:10pt; - font-family:sans-serif; -} -td.even{ - font-size:10pt; - font-family:sans-serif; -} -td.cell{ - display:none; -} -td.selectedcell{ - display:none; -} - -a.mtitle { - display:none; -} - -a.mtitle:hover { - display:none; -} -a.cell { - display:none; -} - -a.cell:hover { - display:none; - } - -a.mtitle2 { - display:none; - } - -a.mtitle2:hover { - display:none; - } - -a.one:link { - display:none; -} -a.one:visited { - display:none; - } -a.one:active { - display:none; - } - -a.one:hover { - display:none; - } - -a.two:link { - display:none; -} -a.two:visited { - display:none; - } -a.two:active { - display:none; - } - -a.two:hover { - display:none; - } - -th.doc { - display:none; -} - - -table.doc { - display:none; -} -a.detail -{ -font-size:10pt; -font-family:sans-serif; -} - -a.detail:hover -{ - display:none; -} -.popup_border_title { - display:none; -} -.ipop_card_fond { - display:none; -} -.num { - text-align:right; - font-size:10pt; -} -h1.title { - font-size:120%; - font-style: italic; -} -h2.title { - font-size:110%; - font-style: italic; - margin-left: 3em; -} -h3.title { - font-size:110%; - margin-left: 3em; -} -h4.title { - color: blue; - font-size:110%; - margin-left: 3em; - text-decoration: underline; -} -h5.title { - color: blue; - font-size:110%; - margin-left: 3em; - text-decoration: none; - font-style: italic; -} -/* */ -div.myfieldset -{ - margin-top: 3em; - margin-left:3em; - margin-right: 3em; - border:lightgrey 2px groove; -} -#info_div ,div#error_div ,div#close_div{ - display:none; -} -p#breakhere {page-break-before: always} diff --git a/sources/html/style-test.css b/sources/html/style-test.css deleted file mode 100644 index 478a8ec..0000000 --- a/sources/html/style-test.css +++ /dev/null @@ -1,74 +0,0 @@ -span.tmenu { - padding-left:20px; - padding-right:20px; - border:solid 1px blue; - background-color: #6699dd ; -} -.topmenu { - background:url('/FR/wcompta/image/bg1.jpg'); - color:white; - text-align:center; - - } -.menuitem { - width:150px; -} -a.tmenu:link { - background-color: #6699dd ; - color:white; - } -a.tmenu:visited { -// background-color:black ; - color:#683af2; - color:white; - } -a.tmenu:active{ - background-color:#6699dd ; - color:#683af2; - color:white; - } -a.tmenu:hover{ - background-color:#6699dd ; - color:#d1ffb9; - } -div.dtitle { - width:150px; - color:#6699dd; - background:#cccccc; - text-align:center; - font-size:20px; -} -div.dcontent { - color:black; - background-color:white; - margin: 5% 5%; - -} -div.ddownload { - color:white; - background-color:#6699dd ; -} -div.content { - margin-left:10%; - margin-right:10%; - padding:2%; -} -H2 { - font-size:16pt; - color:blue; - background-color:white; -} -table.sortable td,table.result td -{ - padding-left:5px; - padding-right:5px; -} -#info_div { - display:none; - background-color: yellow; - color:red; - z-index: 15; - position: absolute; - top:0; - left:0; -} diff --git a/sources/html/test.php b/sources/html/test.php deleted file mode 100644 index 2dc2fb5..0000000 --- a/sources/html/test.php +++ /dev/null @@ -1,187 +0,0 @@ -Test NOALYSS"; - /* - * cherche pour fichier a include, s'il y en a alors les affiche - * avec une description - */ - - - echo ''; - $get='test.php?'.http_build_query(array('script'=>"all", 'gDossier'=>$gDossierLogInput, 'description'=>"Tous les scripts")); - echo ''; - echo ''; - echo ''; - echo ''; - - for ($e=0; $e<$cnt_scenario; $e++) - { - - $get='test.php?'.http_build_query(array('script'=>$scenario[$e]['file'], 'gDossier'=>$gDossierLogInput, 'description'=>$scenario[$e]['desc'])); - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - - } - echo '
    '; - echo ''; - echo "Tous "; - echo ''; - echo 'Tous les scripts
    '; - echo $e; - echo ''; - echo ''; - echo $scenario[$e]['file']; - echo ''; - echo ''.$scenario[$e]['desc'].'
    '; -} -else if ($script=='all') -{ - $nb=HtmlInput::default_value_get('nb_script', 0); - - $start_mem=memory_get_usage(); - $start_time=microtime(true); - $script=str_replace('../', '', $script); - - echo '

    '.$nb." ".$scenario[$nb]['file']."

    "; - echo '

    description = '.$scenario[$nb]["desc"].'

    '; - include '../scenario/'.$scenario[$nb]['file']; - echo '
    '; - echo '
    '; - $end_mem=memory_get_usage(); - $end_time=microtime(true); - - echo "

    start mem : ".$start_mem; - echo '

    '; - echo "

    end mem : ".$end_mem; - echo '

    '; - echo "

    Diff = ".($end_mem-$start_mem)." bytes "; - echo "

    Diff = ".(round(($end_mem-$start_mem)/1024, 2))." kbytes "; - echo "

    Diff = ".(round(($end_mem-$start_mem)/1024/1024, 2))." Mbytes "; - echo '

    '; - echo "

    Execution script ".$script." time = ".(round(($end_time-$start_time), 4))." secondes

    "; - $nb++; - if ( $nb == $maxscan ) { - echo "Dernier test"; - } else { - $get='test.php?'.http_build_query(array('script'=>"all", 'gDossier'=>$gDossierLogInput, 'nb_script'=>$nb)); - echo ''; - echo $scenario[$nb]['file']; - } -} -else -{ - $start_mem=memory_get_usage(); - $start_time=microtime(true); - $script=str_replace('../', '', $script); - $description=HtmlInput::default_value_get("description", "aucune description"); - echo '

    '.$script."

    "; - echo '

    description = '.$description.'

    '; - include '../scenario/'.$script; - - $end_mem=memory_get_usage(); - $end_time=microtime(true); - - echo "

    start mem : ".$start_mem; - echo '

    '; - echo "

    end mem : ".$end_mem; - echo '

    '; - echo "

    Diff = ".($end_mem-$start_mem)." bytes "; - echo "

    Diff = ".(round(($end_mem-$start_mem)/1024, 2))." kbytes "; - echo "

    Diff = ".(round(($end_mem-$start_mem)/1024/1024, 2))." Mbytes "; - echo '

    '; - echo "

    Execution script ".$script." time = ".(round(($end_time-$start_time), 4))." secondes

    "; -} \ No newline at end of file diff --git a/sources/html/tmp/.htaccess b/sources/html/tmp/.htaccess deleted file mode 100644 index ff2beb8..0000000 --- a/sources/html/tmp/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -order deny,allow -deny from all diff --git a/sources/html/user_login.php b/sources/html/user_login.php deleted file mode 100644 index af9808f..0000000 --- a/sources/html/user_login.php +++ /dev/null @@ -1,187 +0,0 @@ -Check(); -/* Check Browser version if < IE6 then unsupported */ -$browser=$_SERVER['HTTP_USER_AGENT']; -if ( strpos($browser,'MSIE 6')!=false || - strpos($browser,'MSIE 5')!=false ) -{ - $nav=_('Vous utilisez un navigateur dépassé depuis près de 8 ans!'); - $nav2=_("Pour une meilleure expérience web, prenez le temps de mettre votre navigateur à jour"); - echo << -
    -
    Close this notice
    -
    -
    Warning!
    -
    -
    $nav
    -
    $nav2.
    -
    -
    Get Firefox 3.5
    -
    Get Safari 4
    -
    Get Google Chrome
    -
    -
    - -EOF; - exit(); -} -$ac=new Database(); - -/* check if repo valid */ -if ( $ac->exist_table('version') == false) -{ - echo '

    '._("Base de donnée invalide").'

    '; - $base=dirname($_SERVER['REQUEST_URI']); - exit(); -} - -/* check repo version */ -$version = $ac->get_value('select val from version'); -if ( $version < DBVERSIONREPO ) -{ - echo '

    '._("Votre base de données n'est pas à jour").' '; - $a=_("cliquez ici pour appliquer le patch"); - $base = dirname($_SERVER['REQUEST_URI']); - if ($base == '/') { $base = ''; } - $base .= '/admin/setup.php'; - echo ''.$a.'

    '; - -} -if ( $User->Admin() == 1) -{ - if (SITE_UPDATE !="") { - $update=@file_get_contents(SITE_UPDATE); - if ($update > $version_noalyss ) { - echo '
    '; - echo '

    '; - echo "Mise à jour disponible de NOALYSS version actuelle : $update votre version $version_noalyss"; - echo '

    '; - echo '

    '. - _('Fermer'). - "

    "; - echo '
    '; - } - } -} - -include_once("user_menu.php"); -$priv=($User->admin==1)?_("Administrateur"):_("Utilisateur"); -load_all_script(); -if ( isset ($_POST['set_preference'])) { - //// Save value - extract($_POST); - - if (strlen(trim($pass_1)) != 0 && strlen(trim($pass_2)) != 0) - { - $User->save_password($pass_1,$pass_2); - - } - $User->save_global_preference('THEME', $style_user); - $User->save_global_preference('LANG', $lang); - $_SESSION['g_theme']=$style_user; - $_SESSION['g_lang']=$lang; - $User->load(); - $User->save_email($p_email); -} -echo '
    '; -/** - * - * If the user is NOT admin and can access only ONE folder, - * so it will be directly redirected to this folder or to the plugins of this - * folder if he's an "plugin user" - */ - -if ( $User->admin == 0 ) -{ - // how many folder ? - $folder=$User->get_available_folder(); - if ( $folder != null && count($folder) == 1 ) - { - - if ( $User->check_dossier($folder[0]['dos_id']) == 'P') - { - redirect('extension.php?gDossier='.$folder[0]['dos_id']); - exit(); - } - else - { - redirect('do.php?gDossier='.$folder[0]['dos_id']); - exit(); - } - } - -} - -$result=""; -$result.=""; -$result.=''; -if ( $User->Admin() == 1 ) -{ - $result.=""; -} -$result.=''; -$result.=''; -$result.=""; -$result.="
    Administration '; -$result.=''._('Préférence').''; -$result.= ''._('Deconnexion').'
    "; - -echo '
    '.$result.'
    '; -echo '
    '; -?> -
    - - - - -show_dossier(""); -echo $res; -?> -

    - -

    -
    - diff --git a/sources/include/ac_common.php b/sources/include/ac_common.php deleted file mode 100644 index 3b46a62..0000000 --- a/sources/include/ac_common.php +++ /dev/null @@ -1,1254 +0,0 @@ -' . $p_string . ''; -} - -function hi($p_string) -{ - return '' . htmlspecialchars($p_string) . ''; -} - -function hb($p_string) -{ - return '' . htmlspecialchars($p_string) . ''; -} - -function th($p_string, $p_extra='',$raw='') -{ - return '' . htmlspecialchars($p_string).$raw . ''; -} - -function h2info($p_string) -{ - return '

    ' . htmlspecialchars($p_string) . '

    '; -} - -function h2($p_string, $p_class="",$raw="") -{ - return '

    ' . $raw.htmlspecialchars($p_string) . '

    '; -} -function h1($p_string, $p_class="") -{ - return '

    ' . htmlspecialchars($p_string) . '

    '; -} -/** - * \brief surround the string with td - * \param $p_string string to surround by TD - * \param $p_extra extra info (class, style, javascript...) - * \return string surrounded by td - */ - -function td($p_string='', $p_extra='') -{ - return '' . $p_string . ''; -} - -function tr($p_string, $p_extra='') -{ - return '' . $p_string . ''; -} - -/** - * @brief escape correctly php string to javascript - */ -function j($p_string) -{ - $a = preg_replace("/\r?\n/", "\\n", addslashes($p_string)); - $a = str_replace("'", '\'', $a); - return $a; -} - -/** - * format the number for the CSV export - * @param $p_number number - */ -function nb($p_number) -{ - $r = sprintf('%.2f', $p_number); - $r = str_replace('.', ',', $r); - - return $r; -} - -/** - * format the number with a sep. for the thousand - * @param $p_number number - */ -function nbm($p_number) -{ - - if (trim($p_number) == '') - return ''; - if ($p_number == 0) - return "0,00"; - - $a = doubleval($p_number); - $r = number_format($a, 2, ",", "."); - if (trim($r) == '') - { - var_dump($r); - var_dump($p_number); - var_dump($a); - exit(); - } - - return $r; -} - -/** - * \brief log error into the /tmp/noalyss_error.log it doesn't work on windows - * - * \param p_log message - * \param p_line line number - * \param p_message is the message - * - * \return nothing - * - */ - -function echo_error($p_log, $p_line="", $p_message="") -{ - echo "ERREUR :" . $p_log . " " . $p_line . " " . $p_message; - $fdebug = fopen($_ENV['TMP'] . DIRECTORY_SEPARATOR . "noalyss_error.log", "a+"); - if ($fdebug != null) - { - fwrite($fdebug, date("Ymd H:i:s") . $p_log . " " . $p_line . " " . $p_message . "\n"); - fclose($fdebug); - } -} - -/** - * \brief Compare 2 dates - * \param p_date - * \param p_date_oth - * - * \return - * - == 0 les dates sont identiques - * - > 0 date1 > date2 - * - < 0 date1 < date2 - */ - -function cmpDate($p_date, $p_date_oth) -{ - date_default_timezone_set('Europe/Brussels'); - - $l_date = isDate($p_date); - $l2_date = isDate($p_date_oth); - if ($l_date == null || $l2_date == null) - { - throw new Exception("erreur date [$p_date] [$p_date_oth]"); - } - $l_adate = explode(".", $l_date); - $l2_adate = explode(".", $l2_date); - $l_mkdate = mktime(0, 0, 0, $l_adate[1], $l_adate[0], $l_adate[2]); - $l2_mkdate = mktime(0, 0, 0, $l2_adate[1], $l2_adate[0], $l2_adate[2]); - // si $p_date > $p_date_oth return > 0 - return $l_mkdate - $l2_mkdate; -} - -/***! - * @brief check if the argument is a number - * - * \param $p_int number to test - * - * \return - * - 1 it's a number - * - 0 it is not - */ -function isNumber(&$p_int) -{ - if (strlen(trim($p_int)) == 0) - return 0; - if (is_numeric($p_int) === true) - return 1; - else - return 0; -} - -/*** - * \brief Verifie qu'une date est bien formaté - * en d.m.y et est valable - * \param $p_date - * - * \return - * - null si la date est invalide ou malformaté - * - $p_date si tout est bon - * - */ - -function isDate($p_date) -{ - if (strlen(trim($p_date)) == 0) - return null; - if (preg_match("/^[0-9]{1,2}\.[0-9]{1,2}\.20[0-9]{2}$/", $p_date) == 0) - { - - return null; - } - else - { - $l_date = explode(".", $p_date); - - if (sizeof($l_date) != 3) - return null; - - if ($l_date[2] > COMPTA_MAX_YEAR || $l_date[2] < COMPTA_MIN_YEAR) - { - return null; - } - - if (checkdate($l_date[1], $l_date[0], $l_date[2]) == false) - { - return null; - } - } - return $p_date; -} - -/** - * \brief Default page header for each page - * - * \param p_theme default theme - * \param $p_script - * \param $p_script2 another js script - * Must be called only once - * \return none - */ - -function html_page_start($p_theme="", $p_script="", $p_script2="") -{ - // check not called twiced - static $already_call=0; - if ( $already_call==1)return; - $already_call=1; - - $cn = new Database(); - if ($p_theme != "") - { - $Res = $cn->exec_sql("select the_filestyle from theme - where the_name='" . $p_theme . "'"); - if (Database::num_row($Res) == 0) - $style = "style-classic.css"; - else - { - $s = Database::fetch_array($Res, 0); - $style = $s['the_filestyle']; - } - } - else - { - $style = "style-classic.css"; - } // end if - $title="NOALYSS"; - - if ( isset ($_REQUEST['ac'])) { - if (strpos($_REQUEST['ac'],'/') <> 0) - { - $m= explode('/',$_REQUEST['ac']); - $title=$m[count($m)-1]." ".$title; - } - else - $title=$_REQUEST['ac']." ".$title; - } - $is_msie=is_msie(); - - if ($is_msie == 0 ) - { - echo ''; - printf("\n"); - echo ''; - printf("\n"); - } - else { - echo ''; - printf("\n"); - } - echo ""; - - if ($p_script2 != "") - $p_script2 = ''; - $style=trim($style); - echo ""; - if ( $is_msie == 1 )echo ' '; - echo " - $title - - - - " . - $p_script2 . " - "; - echo ' - - - - '; - echo load_all_script(); - echo ' '; - - echo ""; - echo '
    '; - echo '
    '. - HtmlInput::title_box(_("Erreur"), 'error_div','hide'). - '
    '. - '
    '. - '

    '. - HtmlInput::button_action('Valider','$(\'error_div\').style.visibility=\'hidden\';$(\'error_content_div\').innerHTML=\'\';'). - '

    '. - '
    '; -// language - if (isset($_SESSION['g_lang'])) - { - set_language(); - } - -} - -/** - * \brief Minimal page header for each page, used for small popup window - * - * \param p_theme default theme - * \param $p_script - * \param $p_script2 another js script - * - * \return none - */ - -function html_min_page_start($p_theme="", $p_script="", $p_script2="") -{ - - $cn = new Database(); - if ($p_theme != "") - { - $Res = $cn->exec_sql("select the_filestyle from theme - where the_name='" . $p_theme . "'"); - if (Database::num_row($Res) == 0) - $style = "style-classic.css"; - else - { - $s = Database::fetch_array($Res, 0); - $style = $s['the_filestyle']; - } - } - else - { - $style = "style-classic.css"; - } // end if - echo ''; - echo ""; - - - if ($p_script2 != "") - $p_script2 = ''; - - echo " - NOALYSS - - - " . - $p_script2 . " - - - "; - echo ' - '; - - echo ""; - /* If we are on the user_login page */ - if (basename($_SERVER['PHP_SELF']) == 'user_login.php') - { - return; - } -} - -/** - * \brief end tag - * - */ - -function html_page_stop() -{ - echo ""; - echo ""; -} - -/** - * \brief Echo no access and stop - * - * \return nothing - */ - -function NoAccess($js=1) -{ - if ($js == 1) - { - echo ""; - } - else - { - echo '
    '; - echo '

    ' . _(' Cette action ne vous est pas autorisée Contactez votre responsable') . '

    '; - echo '
    '; - } - exit - 1; -} -/** - * replaced by sql_string - * @deprecated - */ -function FormatString($p_string) -{ - return sql_string($p_string); -} -/** - * \brief Fix the problem with the quote char for the database - * - * \param $p_string - * \return a string which won't let strange char for the database - */ - -function sql_string($p_string) -{ - $p_string = trim($p_string); - if (strlen($p_string) == 0) - return null; - $p_string = str_replace("'", "''", $p_string); - $p_string = str_replace('\\', '\\\\', $p_string); - return $p_string; -} - -/** - /* \brief store the string which print - * the content of p_array in a table - * used to display the menu - * \param $p_array array like ( 0=>HREF reference, 1=>visible item (name),2=>Help(opt), - * 3=>selected (opt) 4=>javascript (normally a onclick event) (opt) - * \param $p_dir direction of the menu (H Horizontal V vertical) - * \param $class CSS for TD tag - * \param $class_ref CSS for the A tag - * \param $default selected item - * \param $p_extra extra code for the table tag (CSS or javascript) - * - /* \return : string */ - -function ShowItem($p_array, $p_dir='V', $class="mtitle", $class_ref="mtitle", $default="", $p_extra="") -{ - - $ret = ""; - // direction Vertical - if ($p_dir == 'V') - { - foreach ($p_array as $all => $href) - { - $javascript = (isset($href[4])) ? $href[4] : ""; - $title = ""; - $set = "XX"; - if (isset($href[2])) - $title = $href[2]; - if (isset($href[3])) - $set = $href[3]; - - if ($set == $default) - $ret.=''; - else - $ret.=''; - } - } - //direction Horizontal - else if ($p_dir == 'H') - { - - $ret.=""; - foreach ($p_array as $all => $href) - { - $title = ""; - $javascript = (isset($href[4])) ? $href[4] : ""; - - $set = "A"; - if (isset($href[2])) - $title = $href[2]; - - if (isset($href[3])) - $set = $href[3]; - - if ($default === $href[0] || $set === $default) - { - $ret.=''; - } - else - { - $ret.=''; - } - } - $ret.=""; - } - $ret.="
    ' . $href[1] . '
    ' . $href[1] . '
    ' . $href[1] . '' . $href[1] . '
    "; - return $ret; -} - -/** - * \brief warns - * - * \param p_string error message - * gen : - * - none - * \return: - * - none - */ - -function echo_warning($p_string) -{ - echo '

    ' . $p_string . "

    "; -} - -/** - * \brief Show the periode which found thanks its id - * - * - * \param $p_cn database connection - * \param p_id - * \param pos Start or end - * - * \return: string - */ - -function getPeriodeName($p_cn, $p_id, $pos='p_start') -{ - if ($pos != 'p_start' and - $pos != 'p_end') - echo_error('ac_common.php' . "-" . __LINE__ . ' UNDEFINED PERIODE'); - $ret = $p_cn->get_value("select to_char($pos,'Mon YYYY') as t from parm_periode where p_id=$p_id"); - return $ret; -} - -/** - * \brief Return the period corresponding to the - * date - * - * \param p_cn database connection - * \param p_date the month + year 'MM.YYYY' - * - * \return: - * parm_periode.p_id - */ - -function getPeriodeFromMonth($p_cn, $p_date) -{ - $R = $p_cn->get_value("select p_id from parm_periode where - to_char(p_start,'DD.MM.YYYY') = '01.$p_date'"); - if ($R == "") - return -1; - return $R; -} - -/**\brief Decode the html for the widegt richtext and remove newline - * \param $p_html string to decode - * \return the html code without new line - */ - -function Decode($p_html) -{ - $p_html = str_replace('%0D', '', $p_html); - $p_html = str_replace('%0A', '', $p_html); - $p_html = urldecode($p_html); - return $p_html; -} - -/**\brief Create the condition to filter on the j_tech_per - * thanks a from and to date. - * \param $p_cn database conx - * \param $p_from start date (date) - * \param $p_to end date (date) - * \param $p_form if the p_from and p_to are date or p_id - * \param $p_field column name - * \return a string containg the query - */ - -function sql_filter_per($p_cn, $p_from, $p_to, $p_form='p_id', $p_field='jr_tech_per') -{ - - if ($p_form != 'p_id' && - $p_form != 'date') - { - echo_error(__FILE__, __LINE__, 'Mauvais parametres '); - exit(-1); - } - if ($p_form == 'p_id') - { - // retrieve the date - $pPeriode = new Periode($p_cn); - $a_start = $pPeriode->get_date_limit($p_from); - $a_end = $pPeriode->get_date_limit($p_to); - if ($a_start == null || $a_end == null) - throw new Exception(__FILE__ . __LINE__ . sprintf(_('Attention periode - non trouvee periode p_from= %s p_to_periode = %s'), $p_from , - $p_to)); - - - $p_from = $a_start['p_start']; - $p_to = $a_end['p_end']; - } - if ($p_from == $p_to) - $periode = " $p_field = (select p_id from parm_periode " . - " where " . - " p_start = to_date('$p_from','DD.MM.YYYY')) "; - else - $periode = "$p_field in (select p_id from parm_periode " . - " where p_start >= to_date('$p_from','DD.MM.YYYY') and p_end <= to_date('$p_to','DD.MM.YYYY')) "; - return $periode; -} - -/**\brief alert in javascript - * \param $p_msg is the message - * \param $buffer if false, echo directly and execute the javascript, if $buffer is true, the alert javascript - * is in the return string - * \return string with alert javascript if $buffer is true - */ - -function alert($p_msg, $buffer=false) -{ - $r = ''; - - if ($buffer) - return $r; - echo $r; -} - -/** - * @brief set the lang thanks the _SESSION['g_lang'] var. - */ -function set_language() -{ - // desactivate local check - if ( defined("LOCALE") && LOCALE==0 ) return; - if ( ! isset ($_SESSION['g_lang'])) return; - $dir = ""; - // set differently the language depending of the operating system - if (what_os() == 1) - { - $dir = setlocale(LC_MESSAGES, $_SESSION['g_lang']); - if ($dir == "") - { - $g_lang = 'fr_FR.utf8'; - $dir = setlocale(LC_MESSAGES, $g_lang); - // echo '' . $_SESSION['g_lang'] . ' domaine non supporté'; - } - bindtextdomain('messages', './lang'); - textdomain('messages'); - bind_textdomain_codeset('messages', 'UTF8'); - - return; - } - // for windows - putenv('LANG=' . $_SESSION['g_lang']); - $dir = setlocale(LC_ALL, $_SESSION['g_lang']); - bindtextdomain('messages', '.\\lang'); - textdomain('messages'); - bind_textdomain_codeset('messages', 'UTF8'); -} - -/** - * @brief try to determine on what os you are running the pĥpcompte - * server - * @return - * 0 it is a windows - * 1 it is a Unix like - */ -function what_os() -{ - $inc_path = get_include_path(); - - if (strpos($inc_path, ";") != 0) - { - $os = 0; /* $os is 0 for windoz */ - } - else - { - $os = 1; /* $os is 1 for unix */ - } - return $os; -} - -/** - * @brief shrink the date, make a date shorter for the printing - * @param $p_date format DD.MM.YYYY - * @return date in the format DDMMYY (size = 13 mm in arial 8) - */ -function shrink_date($p_date) -{ - $date = str_replace('.', '', $p_date); - $str_date = substr($date, 0, 4) . substr($date, 6, 2); - return $str_date; -} -/** - * @brief shrink the date, make a date shorter for the printing - * @param $p_date format DD.MM.YYYY - * @return date in the format DDMMYY (size = 13 mm in arial 8) - */ -function smaller_date($p_date) -{ - $str_date = substr($p_date, 0, 6) . substr($p_date, 8, 2); - return $str_date; -} - -/** - * @brief format the date, when taken from the database the format - * is MM-DD-YYYY - * @param $p_date format - * @param - * @return date in the format DD.MM.YYYY - */ -function format_date($p_date, $p_from_format = 'YYYY-MM-DD',$p_to_format='DD.MM.YYYY') -{ - if ($p_from_format == 'YYYY-MM-DD') - { - $date = explode('-', $p_date); - if (count($date) != 3) - return $p_date; - } - if ($p_from_format == 'DD.MM.YYYY') - { - $temp_date = explode('.', $p_date); - if (count($temp_date) != 3) - return $p_date; - $date[0] = $temp_date[2]; // 0 is year - $date[1] = $temp_date[1]; // 1 for month - $date[2] = $temp_date[0]; // 2 for day - } - - switch ($p_to_format) - { - case 'DD.MM.YYYY': - $str_date = $date[2] . '.' . $date[1] . '.' . $date[0]; - break; - case 'YYYY-MM-DD': - $str_date = $date[0] . '-' . $date[1] . '-' . $date[2]; - break; - case 'YYYYMMDD': - $str_date = $date[0] . $date[1] . $date[2]; - break; - case 'YYYY/MM/DD': - $str_date = $date[0] . '/' . $date[1] . '/' . $date[2]; - break; - - } - return $str_date; -} - - - -/** - * Should a dialog box when you are disconnected from an ajax call - * propose to reload or to connect in another tab - */ -function ajax_disconnected($div) -{ - /** - * if $_SESSION['g_user'] is not set : echo a warning - */ - if (!isset($_SESSION['g_user'])) - { - $script = 'var a=$("' . $div . '");a.style.height="70%";a.style.width="60%";'; - $script.='a.style.top=posY-20+offsetY;a.style.left=posX+offsetX;'; - $script = create_script($script); - $html = $script; - $html.=HtmlInput::anchor_close($div); - $html.='
    '; - $html.=h2(_('Données non disponibles'), 'class="title" style="width:auto"'); - $html.=h2(_('Veuillez vous reconnecter soit dans une autre fenêtre soit ' - . ' en cliquant sur le lien'), 'class="error"'); - // Reload button - $reload=new IButton("reload"); - $reload->value=_("Se reconnecter pour revenir ici"); - $reload->class="button"; - $reload->javascript='window.location.reload()'; - // Link to log in another tab - $html.='

    '; - $html.=''. - _('Cliquez ici pour vous reconnecter dans une autre page'). - ''; - $html.=$reload->input(); - $html.='

    '; - $html = escape_xml($html); - header('Content-type: text/xml; charset=UTF-8'); - echo << - -$div -$html - -EOF; - exit(); - } -} - -/** - *Show the modules - * @param int $selected module selected profile_menu.pm_id - */ -function show_module($selected) -{ - global $g_user; - $cn = Dossier::connect(); - $amodule = $cn->get_array("select - me_code,me_menu,me_url,me_javascript,p_order,me_type,me_description - from v_all_menu - where - p_id=$1 - and p_type_display='M' - order by p_order", array($g_user->get_profile())); - - if ($selected != -1) - { - $selected_module=$cn->get_value('select me_code from profile_menu where' - . ' pm_id = $1 ', array($selected)); - require_once NOALYSS_INCLUDE.'/template/module.php'; - $file = $cn->get_array("select me_file,me_parameter,me_javascript,me_type,me_description from v_all_menu - where pm_id=$1 and p_id=$2", array($selected,$g_user->get_profile())); - if ( count($file ) == 0 ) - { - echo '
    '; - echo '
    '; - echo '
    '; - echo_warning(_("Module inexistant")."[ $selected ] "); - echo '
    '; - exit(); - } - if ($file[0]['me_file'] != '') - { - if ($file[0]['me_parameter'] != "") - { - // if there are paramter put them in superglobal - $array=compute_variable($file[0]['me_parameter']); - put_global($array); - } - - // if file is not a plugin, include the file, otherwise - // include the plugin launcher - if ($file[0]['me_type'] != 'PL') - { - require_once $file[0]['me_file']; - } - else - { - // nothing : direct call to plugin - } - } - if ( $file[0]['me_javascript'] != '') - { - create_script($file[0]['me_javascript']); - } - } -} -/** - * Find the default module or the first one - * @global $g_user $g_user - * @return default module (string) - */ -function find_default_module() -{ - global $g_user; - $cn = Dossier::connect(); - - $default_module = $cn->get_array("select me_code - from profile_menu join profile_user using (p_id) - where - p_type_display='M' and - user_name=$1 and pm_default=1", array($g_user->login)); - - /* - * Try to find the smallest order for module - */ - if (empty($default_module)) - { - $default_module = $cn->get_array("select me_code - from profile_menu join profile_user using (p_id) - where - p_type_display='M' and - user_name=$1 order by p_order limit 1", array($g_user->login)); - - // if no default try to find the default menu - if ( empty ($default_module)) - { - $default_module = $cn->get_array("select me_code - from profile_menu join profile_user using (p_id) - where - p_type_display='E' and - user_name=$1 and pm_default=1 ", array($g_user->login)); - /* - * Try to find a default menu by order - */ - if (empty ($default_module)) - { - $default_module = $cn->get_array("select me_code - from profile_menu join profile_user using (p_id) - where - user_name=$1 and p_order=(select min(p_order) from profile_menu join profile_user using (p_id) - where user_name=$2) limit 1", array($g_user->login, $g_user->login)); - } - - /* - * if nothing found, there is no profile for this user => exit - */ - if (empty ($default_module)) - { - /* - * If administrateur, then we insert a default profile (1) - * for him - */ - if ( $g_user->admin == 1 ) - { - $cn->exec_sql('insert into profile_user(user_name,p_id) values ($1,1) ',array($g_user->login)); - return find_default_module(); - } - echo_warning(_("Utilisateur n'a pas de profil, votre administrateur doit en configurer un dans CFGSEC")); - exit(); - } - } - return $default_module[0]['me_code']; - } - - if (count($default_module) > 1) - { - // return the first module found - return $default_module[0]['me_code']; - } - elseif (count($default_module) == 1) - { - return $default_module[0]['me_code']; - } -} - -/** - * show the module - * @global $g_user - * @param $module the $_REQUEST['ac'] exploded into an array - * @param $idx the index of the array : the AD code is splitted into an array thanks the slash - */ -function show_menu($module) -{ - if ($module == 0)return; - static $level=0; - global $g_user; - - $cn = Dossier::connect(); - /** - * Show the submenus - */ - $amenu = $cn->get_array(" - select - pm_id, - me_code, - pm_id_dep, - me_file, - me_javascript, - me_url, - me_menu, - me_description, - me_description_etendue - from profile_menu - join menu_ref using (me_code) - where pm_id_dep=$1 and p_id=$2 - order by p_order", array($module, $g_user->get_profile())); - - // There are submenuS, so show them - if (!empty($amenu) && count($amenu) > 1) - { - $a_style_menu=array('topmenu','menu2','menu3'); - if ( $level > count($a_style_menu)) - $style_menu='menu3'; - else { - $style_menu=$a_style_menu[$level]; - } - require 'template/menu.php'; - } // there is only one submenu so we include the code or javascript - // or we show the submenu - elseif (count($amenu) == 1) - { - if ( trim($amenu[0]['me_url']) != "" || - trim ($amenu[0]['me_file']) != "" || - trim ($amenu[0]['me_javascript']) != "" ) - { - echo '
    '; - echo h2info(_($amenu[0]['me_menu'])); - echo '
    '; - $module = $amenu[0]['pm_id']; - } else { - $url=$_REQUEST['ac'].'/'.$amenu[0]['me_code']; - echo ''; - echo _($amenu[0]['me_menu']); - echo ''; - $level++; - return; - } - } - - // There is no submenu or only one - if (empty($amenu) || count($amenu) == 1) - { - $file = $cn->get_array("select me_file,me_parameter,me_javascript,me_type - from menu_ref - join profile_menu using (me_code) - join profile_user using (p_id) - where - pm_id=$1 and - user_name=$2 and - (me_file is not null or trim(me_file) <>'' or - me_javascript is not null or trim (me_javascript) <> '')", array($module,$g_user->login)); - - if (count($file)==0) - { - return; - } - - if ($file[0]['me_file'] != "") - { - if ($file[0]['me_parameter'] !== "") - { - // if there are paramter put them in superglobal - $array=compute_variable($file[0]['me_parameter']); - put_global($array); - } - if ( DEBUG ) echo $file[0]['me_file']," param : ",$file[0]['me_parameter'] ; - /* - * Log the file we input to put in the folder test-noalyss for replaying it - */ - if (LOGINPUT) { - $file_loginput=fopen($_ENV['TMP'].'/scenario-'.$_SERVER['REQUEST_TIME'].'.php','a+'); - fwrite($file_loginput, "include '".$file[0]['me_file']."';"); - fwrite($file_loginput,"\n"); - fclose($file_loginput); - } - // if file is not a plugin, include the file, otherwise - // include the plugin launcher - if ( $file[0]['me_type'] != 'PL') - require_once $file[0]['me_file']; - else - require 'extension_get.inc.php'; - - exit(); - } - if ( $file[0]['me_javascript'] != '') - { - $js= str_replace('', dossier::id(), $file[0]['me_javascript']); - echo create_script($js); - } - } - $level++; -} -/** - * Put in superglobal (get,post,request) the value contained in - * the parameter field (me_parameter) - * @param $array [key] [value] - */ -function put_global($array) -{ - for ($i=0;$i - -$p_code -$html - -EOF; -} -/** - * @brief Display a box with the contains - * @param type $p_array Data to display - * @param type $p_title Title of the box - * @param type $p_div id of the box - */ -function display_dashboard_operation($p_array,$p_title,$p_div) -{ - ?> - -get_type(); - - switch ($type) - { - case 'VEN': - $obj=new Acc_Ledger_Sold($p_cn, $ledger_id); - break; - case 'ACH': - $obj=new Acc_Ledger_Purchase($p_cn, $ledger_id); - break; - case 'FIN': - $obj= new Acc_Ledger_Fin($p_cn, $ledger_id); - break; - case 'ODS': - $obj=$ledger; - break; - - default: - throw new Exception('Ledger type not found'); - } - return $obj; -} -/** - * Check if we use IE 8 or 9 - * @return int 1 for IE8-9;0 otherwise - */ -function is_msie() -{ - if ( strpos ($_SERVER['HTTP_USER_AGENT'],'MSIE 8.0') != 0 || - strpos ($_SERVER['HTTP_USER_AGENT'],'MSIE 9.0') != 0 ) - $is_msie=1; - else - $is_msie=0; - return $is_msie; -} -?> \ No newline at end of file diff --git a/sources/include/action.common.inc.php b/sources/include/action.common.inc.php deleted file mode 100644 index de913ee..0000000 --- a/sources/include/action.common.inc.php +++ /dev/null @@ -1,330 +0,0 @@ -fromArray($_POST); - if ($act->ag_id == 0) - { - $act->save(); - $ag_id = $act->ag_id; - } - else - { - $act->Update(); - } - $act->generate_document($_POST['doc_mod'], $_POST); - $sub_action = 'detail'; -} -/* for delete */ -if (isset($_POST['delete']) && $_POST['delete'] == "1") - $sub_action = 'delete'; -if ($sub_action == "") - $sub_action = "list"; - -// if correction is asked go to directly to add_action -if (isset($_POST['corr'])) -{ - $ag_comment = urldecode($_POST['ag_comment']); - $sub_action = "add_action"; -} -// if this page is called from another menu (customer, supplier,...) -// a button back is added -//---------------------------------------------------------------------- -// Update the detail -// Add a new action related to this one or update -//---------------------------------------------------------------------- -if ($sub_action == "update") -{ - // Update the modification - if (isset($_POST['save'])) - { - $act2 = new Follow_Up($cn); - $act2->fromArray($_POST); - if ($g_user->can_write_action($act2->ag_id) == false ) - { - echo '
    '; - echo '

    '._('Cette action ne vous est pas autorisée Contactez votre responsable').'

    '; - echo '
    '; - return; - } - $sub_action = "detail"; - put_global(array(array('key' => "sa", "value" => "detail"))); - try { - $act2->verify() ; - $act2->Update() ; - } - catch (Exception $e) - { - echo ''; - echo _("Erreur")." ".$e->getMessage(); - echo ''; - $sub_action="detail"; - $correction = 1; - $act = clone $act2; - $act->get(); - $act->fromArray($_POST); - $error_id=$e->getCode(); - } - } - //---------------------------------------------------------------------- - // Add a related action - //---------------------------------------------------------------------- - if (isset($_POST['add_action_here'])) - { - $act = new Follow_Up($cn); - - - //---------------------------------------- - // puis comme ajout normal (copier / coller ) - $act->fromArray($_POST); - $act->ag_id = 0; - $act->d_id = 0; - $act->action = $_POST['ag_id']; - - echo '
    '; - - // Add hidden tag - echo '
    '; - - $act->ag_comment = ""; - if (isset($_REQUEST['qcode_dest'])) - $act->qcode_dest = $_REQUEST['qcode_dest']; - echo $act->Display('NEW', false, $base, $retour); - - echo ''; - echo ''; - echo ''; - echo '

    '; - echo $supl_hidden; - echo '
    '; - echo '
    '; - } -} -//-------------------------------------------------------------------------------- -// Show the detail of an action -// permit the update -if ($sub_action == 'detail') -{ - echo '
    '; - if ( $correction == 0 ) - { - $act = new Follow_Up($cn); - $act->ag_id = $ag_id; - echo $act->get(); - } - - if ($g_user->can_write_action($ag_id) == true) - { - echo '
    '; - echo $supl_hidden; - echo HtmlInput::hidden('ac', $_REQUEST['ac']); - echo dossier::hidden(); - echo $act->Display('UPD', false, $base, $retour); - echo ''; - echo ''; - echo HtmlInput::submit("save", "Sauve",' onclick="$(\'delete\').value=0"'); - echo HtmlInput::submit("add_action_here", _("Ajoute un événement à celui-ci"),' onclick="$(\'delete\').value=0"'); - echo HtmlInput::submit("delete_bt", _("Efface cet événement "), ' onclick="$(\'delete\').value=1;return confirm_box(\'action_common_frm\',\''. _("Vous confirmez l\'effacement") . '\')" '); - echo $retour; - echo '
    '; - } - else if ($g_user->can_read_action($ag_id) == true || $act->ag_dest == -1) - { - echo $act->Display('READ', false, $base, $retour); - } - else - { - echo h2info(_("Ce document n'est pas accessible")); - return; - } - - - echo '
    '; -} -//------------------------------------------------------------------------------- -// Delete an action -if ($sub_action == 'delete') -{ - // confirmed - $cn->start(); - $act = new Follow_Up($cn); - $act->ag_id = $_REQUEST['ag_id']; - $act->get(); - if ($g_user->can_write_action($_REQUEST['ag_id'])==true) $act->remove(); - $sub_action = "list"; - $cn->commit(); - Follow_Up::show_action_list($cn, $base); - if (isset($act->ag_ref)) - echo hb(_('Action ') . $act->ag_ref . _(' effacée')); - return; -} - -//-------------------------------------------------------------------------------- -// Show a list of the action -if ($sub_action == "list") -{ - // Add a button to export to Csv - echo '
    '; - echo HtmlInput::request_to_hidden(array("closed_action","remind_date_end","remind_date","sag_ref", "remind_date","only_internal", "state", "gDossier", "qcode", "start_date", "end_date", "ag_id", "ag_dest_query", - "tdoc", "action_query","date_start","date_end","hsstate","searchtag")); - echo HtmlInput::hidden("act", "CSV:ActionGestion"); - echo HtmlInput::submit("follow_up_csv", "Export CSV",'','smallbutton'); - echo "
    "; - Follow_Up::show_action_list($cn, $base); -} -//-------------------------------------------------------------------------------- -// Save Follow_Up -// Stage 2 : Save a NEW action + Files and generate eventually a document -//-------------------------------------------------------------------------------- -if ($sub_action == "save_action_st2") -{ - $act = new Follow_Up($cn); - $act->fromArray($_POST); - try { - $act->d_id = 0; - $act->md_id = (isset($_POST['gen_doc'])) ? $_POST['gen_doc'] : 0; - - $act->verify(); - - // insert into action_gestion - echo $act->save(); - $url = "?$base&sa=detail&ag_id=" . $act->ag_id . '&' . dossier::get(); - echo '

    ' . hb(_('Evènement Sauvée').' : ' . $act->ag_ref) . '

    '; - - Follow_Up::show_action_list($cn,$base); - $url = "?$base&sa=detail&ag_id=" . $act->ag_id . '&' . dossier::get(); - echo '

    ' . hb(_('Evènement Sauvée').' : ' . $act->ag_ref) . '

    '; - } catch (Exception $e) - { - echo ''; - echo _("Erreur")." ".$e->getMessage(); - echo ''; - $sub_action="add_action"; - $error_id=$e->getCode(); - } -} -//-------------------------------------------------------------------------------- -// Add an action -if ($sub_action == "add_action") -{ - $act = new Follow_Up($cn); - $act->fromArray($_POST); - $act->ag_id = 0; - $act->d_id = 0; - echo '
    '; - // Add hidden tag - echo '
    '; - echo $supl_hidden; - echo dossier::hidden(); - - - $act->ag_comment = (isset($_POST['ag_comment'])) ? Decode($_POST['ag_comment']) : ""; - if (isset($_REQUEST['qcode'])) - $act->qcode_dest = $_REQUEST['qcode']; - echo $act->Display('NEW', false, $base, $retour); - - echo ''; - echo ''; - echo ''; - echo ''; - echo '
    '; - - echo '
    '; - -} -if ( $error_id != 0 ){ - $error[10]='dt_id'; - $error[20]='ag_timestamp'; - $error[30]='ag_remind_date'; - $div=$error[$error_id]; - $js=<<$('$div').style.borderColor="red"; - $('info_div').innerHTML='erreur'; - - -EOF; - echo $js; - } -?> - diff --git a/sources/include/action.inc.php b/sources/include/action.inc.php deleted file mode 100644 index ff2ea68..0000000 --- a/sources/include/action.inc.php +++ /dev/null @@ -1,60 +0,0 @@ -"; - -?> diff --git a/sources/include/adm.inc.php b/sources/include/adm.inc.php deleted file mode 100644 index 6e32b3b..0000000 --- a/sources/include/adm.inc.php +++ /dev/null @@ -1,161 +0,0 @@ -check_action(FICADD) == 0 ) - { - alert(_('Vous ne pouvez pas enlever de fiche')); - return; - } - - $f_id=$_REQUEST['f_id']; - - $fiche=new Admin($cn,$f_id); - $fiche->remove(); - $low_action="list"; - } - -} - -//----------------------------------------------------- -// list of customer -//----------------------------------------------------- -if ( $low_action == "list" ) -{ - - ?> -
    -
    -
    - ' . "Exercice " . $g_user->get_exercice() . ''; - echo dossier::hidden(); - $a=(isset($_GET['query']))?$_GET['query']:""; - printf (_('Recherche').' ', - $a); - echo HtmlInput::request_to_hidden(array('ac')); - $choice_cat=HtmlInput::default_value_request("choice_cat", 1); - if ( $choice_cat == 1 ) - { - $sel_card=new ISelect('cat'); - $sel_card->value=$cn->make_array('select fd_id, fd_label from fiche_def '. - ' where frd_id=$1 '. - ' order by fd_label ',1,array(FICHE_TYPE_ADM_TAX)); - $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1; - $sel_card->javascript=' onchange="submit(this);"'; - echo _('Catégorie :').$sel_card->input(); - } else - { - $cat=HtmlInput::default_value_request('cat', ''); - echo HtmlInput::hidden("cat",$cat); - echo HtmlInput::hidden('choice_cat', 0); - } - echo Dossier::hidden(); - - ?> - - -
    -
    - '; - echo $adm->Summary($search,'adm',$sql); - - - echo '
    '; - echo '
    '; - echo '
    '; - if ($g_user->check_action(FICADD)==1) - { - /* Add button */ - $f_add_button=new IButton('add_card'); - $f_add_button->label=_('Créer une nouvelle fiche'); - $f_add_button->set_attribute('ipopup','ipop_newcard'); - $f_add_button->set_attribute('win_refresh','yes'); - - $f_add_button->set_attribute('type_cat',FICHE_TYPE_ADM_TAX); - $f_add_button->javascript=" select_card_type(this);"; - echo $f_add_button->input(); - - $f_cat_button=new IButton('add_cat'); - $f_cat_button->set_attribute('ipopup','ipop_cat'); - $f_cat_button->set_attribute('type_cat',FICHE_TYPE_ADM_TAX); - $f_cat_button->label=_('Ajout d\'une catégorie'); - $f_cat_button->javascript='add_category(this)'; - echo $f_cat_button->input(); - } - echo '
    '; - echo '
    '; - - -} -/*---------------------------------------------------------------------- - * Detail for a card, Suivi, Contact, Operation,... * - * cc stands for customer card - *----------------------------------------------------------------------*/ -if ( $low_action == 'detail') -{ - /* Menu */ - require_once NOALYSS_INCLUDE.'/category_card.inc.php'; -return; -} - - - -html_page_stop(); -?> diff --git a/sources/include/ajax_account_update.php b/sources/include/ajax_account_update.php deleted file mode 100644 index e0d0ba4..0000000 --- a/sources/include/ajax_account_update.php +++ /dev/null @@ -1,213 +0,0 @@ - - -if (!defined('ALLOWED')) die('Appel direct ne sont pas permis'); - -/** - * @file - * @brief delete insert or update data from account_update (need right CFGPCMN) - * called from ajax_misc.php - * @param array - * @code - * 'op' => string 'account_update' (length=14) - 'gDossier' => string '44' (length=2) - 'action' => string 'update' (length=6) - 'p_oldu' => string '4124' (length=4) - 'p_valu' => string '4124' (length=4) - 'p_libu' => string 'Impôt belge sur le résultat' (length=29) - 'p_parentu' => string '412' (length=3) - 'acc_delete' => string '0' (length=1) - 'p_typeu' => string '0' (length=1) - * @endcode - */ -if ($g_user->check_module('CFGPCMN') == 0) - exit(); - -$var=array('action', 'p_oldu', 'p_valu', 'p_libu', 'p_parentu', 'acc_delete', 'p_typeu'); -for ($i=0; $iset_parameter('libelle', $p_lib); - $acc->set_parameter('value', $p_val); - $acc->set_parameter('parent', $p_parent); - $acc->set_parameter('type', $p_type); - $acc->check(); - } - catch (Exception $e) - { - $message=_("Valeurs invalides, pas de changement")." \n ". - $e->getMessage(); - $ctl='nok'; - } - if (strlen($p_val)!=0&&strlen($p_lib)!=0&&strlen($old_line)!=0) - { - if (strlen($p_val)==1) - { - $p_parent=0; - } - else - { - if (strlen($p_parent)==0) - { - $p_parent=substr($p_val, 0, strlen($p_val)-1); - } - } - /* Parent existe */ - $Ret=$cn->exec_sql("select pcm_val from tmp_pcmn where pcm_val=$1", array($p_parent)); - if (($p_parent!=0&&Database::num_row($Ret)==0)||$p_parent==$old_line) - { - $message=_("Ne peut pas modifier; aucun poste parent"); - $ctl='nok'; - } - else - { - try - { - $acc->update($old_line); - } - catch (Exception $e) - { - $message=$e->getMessage(); - $ctl='nok'; - } - } - } - else - { - $message=_('Update Valeurs invalides'); - $ctl='nok'; - } -} -//----------------------------------------------------- -/* Ajout d'une ligne */ -if ($action=="new") -{ - $p_val=trim($p_valu); - $p_parent=trim($p_parentu); - - if (isset($p_valu)&&isset($p_libu)) - { - $p_val=trim($p_valu); - - if (strlen($p_valu)!=0&&strlen($p_libu)!=0) - { - if (strlen($p_valu)==1) - { - $p_parentu=0; - } - else - { - if (strlen(trim($p_parentu))==0&& - (string) $p_parentu!=(string) (int) $p_parentu) - { - $p_parentu=substr($p_val, 0, strlen($p_valu)-1); - } - } - /* Parent existe */ - $Ret=$cn->exec_sql("select pcm_val from tmp_pcmn where pcm_val=$1", array($p_parentu)); - if ($p_parent!=0&&Database::num_row($Ret)==0) - { - $message=_(" Ne peut pas modifier; aucun poste parent"); - $ctl='nok'; - } - else - { - // Check if the account already exists - - $Count=$cn->get_value("select count(*) from tmp_pcmn where pcm_val=$1", array($p_val)); - if ($Count!=0) - { - // Alert message account already exists - $message=_("Ce poste existe déjà "); - $ctl='nok'; - } - else - { - $Ret=$cn->exec_sql("insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent,pcm_type) values ($1,$2,$3,$4)", array($p_val, $p_libu, $p_parent, $p_typeu)); - } - } - } - else - { - $message=_("Valeurs invalides "); - $ctl='nok'; - } - } -} - -//----------------------------------------------------- -// Action == remove a line -if ($action=="update"&&$acc_delete==1) -{ - /* Ligne a enfant */ - $R=$cn->exec_sql("select pcm_val from tmp_pcmn where pcm_val_parent=$1", array($p_valu)); - if (Database::num_row($R)!=0) - { - $message=_("Ne peut pas effacer le poste: d'autres postes en dépendent"); - $ctl='nok'; - } - else - { - /* Vérifier que le poste n'est pas utilisé qq part dans les journaux */ - $Res=$cn->exec_sql("select * from jrnx where j_poste=$1", array($p_valu)); - if (Database::num_row($Res)!=0) - { - $message=_("Ne peut pas effacer le poste: il est utilisé dans les journaux"); - $ctl='nok'; - } - else - { - $Del=$cn->exec_sql("delete from tmp_pcmn where pcm_val=$1", array($p_valu)); - } // if Database::num_row - } // if Database::num_row -} //$action == del -$message=escape_xml($message); - if ( ! headers_sent()) { header('Content-type: text/xml; charset=UTF-8');} else { echo "HTML".unescape_xml($html);} - - echo << - -$ctl -$message - -EOF; -?> diff --git a/sources/include/ajax_action_remove_concerned.php b/sources/include/ajax_action_remove_concerned.php deleted file mode 100644 index e6da625..0000000 --- a/sources/include/ajax_action_remove_concerned.php +++ /dev/null @@ -1,45 +0,0 @@ -remove_linked_card($f_id); -echo $follow->display_linked(); -HtmlInput::button_action_add_concerned_card( $follow->ag_id); - -$response = ob_get_clean(); - -$html = escape_xml($response); -header('Content-type: text/xml; charset=UTF-8'); -echo << - -unused -$html - -EOF; -?> \ No newline at end of file diff --git a/sources/include/ajax_action_save_concerned.php b/sources/include/ajax_action_save_concerned.php deleted file mode 100644 index b8b780e..0000000 --- a/sources/include/ajax_action_save_concerned.php +++ /dev/null @@ -1,47 +0,0 @@ -insert_linked_card($f_id); -/** - * Display all the linked card - */ - -ob_start(); -$follow->display_linked(); -echo HtmlInput::button_action_add_concerned_card( $ag_id); -$response = ob_get_clean(); -$html = escape_xml($response); -header('Content-type: text/xml; charset=UTF-8'); -echo << - -unused -$html - -EOF; -?> \ No newline at end of file diff --git a/sources/include/ajax_add_concerned_card.php b/sources/include/ajax_add_concerned_card.php deleted file mode 100644 index da09c71..0000000 --- a/sources/include/ajax_add_concerned_card.php +++ /dev/null @@ -1,83 +0,0 @@ -'; -$q=new IText('query'); -$q->value=(isset($query))?$query:''; -$r.=''; -$r.=_('Fiche contenant').HtmlInput::infobulle(19); -$r.=$q->input(); -$r.=HtmlInput::submit('fs', _('Recherche'), "", "smallbutton"); -$r.=''; -$r.=dossier::hidden().HtmlInput::hidden('op', 'add_concerned_card'); -$r.=HtmlInput::request_to_hidden(array('ag_id')); -$r.=''; -$query=HtmlInput::default_value_get("query", ""); -$sql_array['query']=$query; -$sql_array['typecard']='all'; - -$fiche=new Fiche($cn); -/* Build the SQL and show result */ -$sql=$fiche->build_sql($sql_array); - - -/* We limit the search to MAX_SEARCH_CARD records */ -$sql=$sql.' order by vw_name limit '.MAX_SEARCH_CARD; -$a=$cn->get_array($sql); -for ($i=0; $i - -unused -$html - -EOF; -?> \ No newline at end of file diff --git a/sources/include/ajax_add_menu.php b/sources/include/ajax_add_menu.php deleted file mode 100644 index e6ff190..0000000 --- a/sources/include/ajax_add_menu.php +++ /dev/null @@ -1,212 +0,0 @@ -check_module('CFGPRO')==0) - die(); - -$type=HtmlInput::default_value_get('type', 'XX'); -$p_level=HtmlInput::default_value_get('p_level', 0); -$dep=HtmlInput::default_value_get('dep', 0); -if ($type=='XX') -{ - throw new Exception('invalid call'); - return; -} -// if type == menu the -if ($type=='me') -{ - if ( isNumber($p_level)==0 ) throw new Exception('invalid call'); - - if ($p_level==0) - { - // There is no dependency - // Menu which can be added - $ame_code=$cn->make_array(" -select me_code,me_code||' '||coalesce(me_menu,'')||' '||coalesce(me_description,'') - ||'('|| case when me_type='SP' then 'Special' - when me_type='PL' then 'Plugin' - when me_type='ME' and me_file is null and me_javascript is null and me_url is null then 'Module - Menu principal' - when me_type='ME' then 'Menu' - else - me_type - end||')' - from - menu_ref - where - me_type<>'PR' - order by 1 - "); - } - elseif ($p_level==1) - { - // dependency is in dep - // Menu which can be added - $ame_code=$cn->make_array(" -select me_code,me_code||' '||coalesce(me_menu,'')||' '||coalesce(me_description,'') - ||'('|| case when me_type='SP' then 'Special' - when me_type='PL' then 'Plugin' - when me_type='ME' and me_file is null and me_javascript is null and me_url is null then 'Module - Menu principal' - when me_type='ME' then 'Menu' - else - me_type - end||')' - from - menu_ref - where - me_type<>'PR' - order by 1 - "); - } - elseif ($p_level==2) - { - // menu can *NOT* have submenu - // Menu which can be added - $ame_code=$cn->make_array(" -select me_code,me_code||' '||coalesce(me_menu,'')||' '||coalesce(me_description,'') - ||'('|| case when me_type='SP' then 'Special' - when me_type='PL' then 'Plugin' - when me_type='ME' and me_file is null and me_javascript is null and me_url is null then 'Module - Menu principal' - when me_type='ME' then 'Menu' - else - me_type - end||')' - from - menu_ref - where - me_type<>'PR' and - ( - coalesce(me_file,'') <> '' or - coalesce(me_url,'') <> '' or - coalesce(me_javascript,'') <> '' - ) - order by 1 - "); - } - else - { - throw new Exception('LEVEL ERROR'); - } - - - $p_order=new INum("p_order", "10"); - - $me_code=new ISelect('me_code'); - $me_code->value=$ame_code; - - - $pm_default=new ICheckBox('pm_default'); - echo HtmlInput::title_box(_("Nouveau"), $ctl); - ?> - -

    - =MAX_FOLDER_TO_SHOW)?MAX_FOLDER_TO_SHOW:$nb_dossier; - echo _('Dossiers trouvés').':'.$nb_dossier." "._('Dossiers affichés').$max; - ?> -

    - createElement('content', $xml); - $xml_status=$dom->createElement('status', $status); - $root=$dom->createElement("root"); - $root->appendChild($xml_content); - $root->appendChild($xml_status); - $dom->appendChild($root); - echo $dom->saveXML(); - exit(); -} -// For the operation 'modele_drop','modele_modify','folder_modify','folder_drop' -// the p_dossier parameter is mandatory -if (in_array($op, array('modele_drop', 'modele_modify', 'folder_modify', 'folder_drop'))) -{ - $dossier=HtmlInput::default_value_get('p_dossier', 0); - $content=_('Erreur paramètre'); - $status="NOK"; - // check if we receive a valid parameter - if ($dossier==0||isNumber($dossier)==0) - { - //---------------------------------------------------------------- - // Answer in XML - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $xml=escape_xml($content); - $xml_content=$dom->createElement('content', $xml); - $xml_status=$dom->createElement('status', $status); - $root=$dom->createElement("root"); - $root->appendChild($xml_content); - $root->appendChild($xml_status); - $dom->appendChild($root); - echo $dom->saveXML(); - exit(); - } - // Modify the description or the name of folder - if ($op=='folder_modify') - { - $dos=new Dossier($dossier); - ob_start(); - $dos->load(); - echo HtmlInput::title_box(_('Modification'), 'folder_admin_div'); - $wText=new IText(); - echo '
    '; - echo HtmlInput::hidden('action', 'dossier_mgt'); - echo HtmlInput::hidden('d', $dos->get_parameter("id")); - echo _('Nom').' : '; - echo $wText->input('name', $dos->get_parameter('name')); - echo '
    '; - $wDesc=new ITextArea(); - $wDesc->heigh=5; - echo _('Description').' :
    '; - echo $wDesc->input('desc', $dos->get_parameter('desc')); - echo '
    '; - echo HtmlInput::submit('upd', _('Modifie')); - echo '
    '; - $content=ob_get_clean(); - $status='OK'; - } - else if ($op=='folder_drop') - { - // ask to confirm the removal a folder - $dos=new Dossier($dossier); - ob_start(); - echo HtmlInput::title_box(_('Efface'), 'folder_admin_div'); - $dos->load(); - echo '
    '; - echo HtmlInput::hidden('action', 'dossier_mgt'); - echo HtmlInput::hidden('d', $dossier); - echo HtmlInput::hidden('sa', 'remove'); - echo '

    '._('Etes vous sûr et certain de vouloir effacer ').$dos->dos_name.' ???

    '; - $confirm=new ICheckBox(); - $confirm->name="p_confirm"; - echo '

    '; - echo _('Cochez la case si vous êtes sûr de vouloir effacer ce dossier'); - echo $confirm->input(); - echo '

    '; - echo '

    '; - echo HtmlInput::submit('remove', _('Effacer')); - echo '

    '; - echo '
    '; - $content=ob_get_clean(); - $status='OK'; - } - else if ($op=='modele_drop') - { - // ask to confirm the removal a folder - $cn=new Database(); - $name=$cn->get_value('select mod_name from modeledef where mod_id=$1', array($dossier)); - ob_start(); - echo HtmlInput::title_box(_('Efface'), 'folder_admin_div'); - echo '
    '; - echo HtmlInput::hidden('m', $dossier); - echo HtmlInput::hidden('sa', 'remove'); - echo HtmlInput::hidden('action', 'modele_mgt'); - echo '

    '._('Etes vous sure et certain de vouloir effacer ').$name.' ?

    '; - $confirm=new ICheckBox(); - $confirm->name="p_confirm"; - echo '

    '; - echo _('Cochez la case si vous êtes sûr de vouloir effacer ce modèle'); - echo $confirm->input(); - echo '

    '; - echo '

    '; - echo HtmlInput::submit('remove', 'Effacer'); - echo '

    '; - echo '
    '; - $content=ob_get_clean(); - $status='OK'; - } - else if ($op=='modele_modify') - { - // Modify the description or the name of a template - $cn=new Database(); - ob_start(); - echo HtmlInput::title_box(_('Modification'), 'folder_admin_div'); - echo '
    '; - $name=$cn->get_value( - "select mod_name from modeledef where ". - " mod_id=$1", array($dossier)); - - $desc=$cn->get_value( - "select mod_desc from modeledef where ". - " mod_id=$1", array($dossier)); - $wText=new IText(); - echo 'Nom : '.$wText->input('name', $name); - $wDesc=new ITextArea(); - $wDesc->heigh=5; - echo '
    Description :
    '; - echo $wDesc->input('desc', $desc); - echo HtmlInput::hidden('m', $dossier); - echo HtmlInput::hidden('action', 'modele_mgt'); - echo '
    '; - echo HtmlInput::submit('upd', 'Modifie'); - echo '
    '; - $content=ob_get_clean(); - $status='OK'; - } - //---------------------------------------------------------------- - // Answer in XML - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $xml=escape_xml($content); - $xml_content=$dom->createElement('content', $xml); - $xml_status=$dom->createElement('status', $status); - $root=$dom->createElement("root"); - $root->appendChild($xml_content); - $root->appendChild($xml_status); - $dom->appendChild($root); - echo $dom->saveXML(); - exit(); -} -?> \ No newline at end of file diff --git a/sources/include/ajax_anc_key_choice.php b/sources/include/ajax_anc_key_choice.php deleted file mode 100644 index d2d38ee..0000000 --- a/sources/include/ajax_anc_key_choice.php +++ /dev/null @@ -1,53 +0,0 @@ - - - -$html - -EOF; -?> \ No newline at end of file diff --git a/sources/include/ajax_anc_key_compute.php b/sources/include/ajax_anc_key_compute.php deleted file mode 100644 index 499ad16..0000000 --- a/sources/include/ajax_anc_key_compute.php +++ /dev/null @@ -1,61 +0,0 @@ -fill_table($target,$amount); - -//// -$response = ob_get_clean(); -$html = escape_xml($response); -header('Content-type: text/xml; charset=UTF-8'); -echo << - - -$html - -EOF; -?> \ No newline at end of file diff --git a/sources/include/ajax_anc_search.php b/sources/include/ajax_anc_search.php deleted file mode 100644 index 7c313c0..0000000 --- a/sources/include/ajax_anc_search.php +++ /dev/null @@ -1,98 +0,0 @@ -'; -echo ''._('Recherche').':'; - -$texte=new IText('plabel'); -$texte->value=HtmlInput::default_value('plabel',"", $_GET); -echo $texte->input(); -echo ''; -echo dossier::hidden(); -$hid=new IHidden(); -echo $hid->input("c1",$_REQUEST['c1']); -echo $hid->input("c2",$_REQUEST['c2']); -echo $hid->input("go"); -echo HtmlInput::submit("go",_("Recherche")); -echo ''; -//------------- FORM ---------------------------------- -if ( isset($_REQUEST['go'])) -{ - $cn=Dossier::connect(); - $plan=new Anc_Plan($cn,$_REQUEST['c2']); - $plan->pa_id=$_REQUEST['c2']; - if ( $plan->exist()==false) - exit(_("Ce plan n'existe pas")); - - $sql="select po_name , po_description from poste_analytique ". - "where pa_id=$1 and ". - " (po_name ~* $2 or po_description ~* $3) order by po_name"; - $array=$cn->get_array($sql,array($_REQUEST['c2'],$_REQUEST['plabel'],$_REQUEST['plabel'])); - - if (empty($array) == true) - { - echo _("Aucun poste trouvé"); - return; - } - $button=new IButton(); - $button->name=_("Choix"); - $button->label=_("Choix"); - - echo ''; - foreach ($array as $line) - { - $button->javascript=sprintf("$('%s').value='%s';removeDiv('%s')", - $_REQUEST['c1'], - $line['po_name'],$ctl); - echo ''. - ''. - ''; - } - echo '
    '. - $button->input(). - ''. - h($line['po_name']). - ''. - h($line['po_description']). - '
    '; -} diff --git a/sources/include/ajax_auto_anc_card.php b/sources/include/ajax_auto_anc_card.php deleted file mode 100644 index 4d17610..0000000 --- a/sources/include/ajax_auto_anc_card.php +++ /dev/null @@ -1,31 +0,0 @@ -exec_sql("select po_name,po_description from poste_analytique where pa_id=$1 ~* and (po_description ~* $2 or po_name ~* $3 order by po_id limit 12", - array($_REQUEST['pa_id'],$_POST['anccard'],$_POST['anccard'])); -} -else -{ - $res=$cn->exec_sql("select po_name,po_description from poste_analytique where po_description ~* $1 or po_name ~* $2 order by po_id limit 12 ", - array($_POST['anccard'],$_POST['anccard'])); -} -$nb=Database::num_row($res); - echo "
      "; -for ($i = 0;$i< $nb;$i++) -{ - $row=Database::fetch_array($res,$i); - echo "
    • "; - echo $row['po_name']; - echo ' '.$row['po_description'].'
    • '; -} - echo "
    "; -?> \ No newline at end of file diff --git a/sources/include/ajax_bank_saldo.php b/sources/include/ajax_bank_saldo.php deleted file mode 100644 index 56a3e84..0000000 --- a/sources/include/ajax_bank_saldo.php +++ /dev/null @@ -1,75 +0,0 @@ -check_jrn($_GET['j'])=='X' ) return '{"saldo":"0"}'; -/* make a filter on the exercice */ - -$filter_year=" j_tech_per in (select p_id from parm_periode ". - "where p_exercice='".$g_user->get_exercice()."')"; - - -$id=$cn->get_value('select jrn_def_bank from jrn_def where jrn_def_id=$1',array($_GET['j'])); -$acc=new Fiche($cn,$id); - -$res=$acc->get_bk_balance($filter_year." and ( trim(jr_pj_number) != '' and jr_pj_number is not null)" ); - - -if ( empty($res) ) return '{"saldo":"0"}'; -$solde=$res['solde']; -if ( $res['debit'] < $res['credit'] ) $solde=$solde*(-1); - -//header("Content-type: text/html; charset: utf8",true); -echo '{"saldo":"'.$solde.'"}'; - - - -?> - diff --git a/sources/include/ajax_bookmark.php b/sources/include/ajax_bookmark.php deleted file mode 100644 index 854e42c..0000000 --- a/sources/include/ajax_bookmark.php +++ /dev/null @@ -1,117 +0,0 @@ -get_value("select count(*) from bookmark" - . " where b_action=$1 and login=$2", - array($_GET['ac'],$g_user->login) - ); - // Add bookmark only if absent - if ( $count == 0 ){ - $cn->exec_sql("insert into bookmark(b_action,login) values($1,$2)", - array($_GET['ac'],$g_user->login)); - } else { - $js="error_message('"._("Ce favori a déjà été ajouté")."');"; - echo create_script($js); - } -} -// remove bookmark -if (isset($_GET['bookmark_delete']) && isset ($_GET['book'])){ - $a_book=$_GET['book']; - for ($e=0;$eexec_sql("delete from bookmark where b_id=$1 and login=$2", - array($a_book[$e],$g_user->login)); - } -} - -$bookmark_sql="select distinct b_id,b_action,b_order,me_code,me_description, javascript" - . " from bookmark " - . "join v_menu_description_favori on (code=b_action or b_action=me_code)" - . "where " - . "login=$1 order by me_code"; -$a_bookmark=$cn->get_array($bookmark_sql,array($g_user->login)); -$url="do.php?gDossier=".Dossier::id()."&ac="; -?> -
    -
    - - - - - - - - - - - -
    - value=$a_bookmark[$i]['b_id']; - echo $ch->input(); - ?> - - - - - - -
    - 0) : - echo HtmlInput::submit("bookmark_delete",_("Supprimez favoris sélectionnés"),"","smallbutton"); -endif; - ?> -
    -
    - -

    - -

    - - -
    \ No newline at end of file diff --git a/sources/include/ajax_boxcard_search.php b/sources/include/ajax_boxcard_search.php deleted file mode 100644 index 2073911..0000000 --- a/sources/include/ajax_boxcard_search.php +++ /dev/null @@ -1,103 +0,0 @@ -get_array($sql,array($_GET['card'])); -echo HtmlInput::title_box(_("Résultat recherche"), "boxsearch_card_div"); -$max=(count($array)>MAX_CARD_SEARCH)?MAX_CARD_SEARCH:count($array); -?> -MAX_CARD_SEARCH ): ?> -

    - - - : - - - - - - - - - - - -

    - - - - - - - - - - - - - - -
    - - - Nom -  ▾ - - - - - - - - -
    - - -   - - - - - - - - - - - - -
    - diff --git a/sources/include/ajax_calendar_zoom.php b/sources/include/ajax_calendar_zoom.php deleted file mode 100644 index 5458235..0000000 --- a/sources/include/ajax_calendar_zoom.php +++ /dev/null @@ -1,46 +0,0 @@ -get_preference(); -} -$cal->set_periode($in); -echo $cal->zoom($distype,$notitle); -$response= ob_get_clean(); - -$html=escape_xml($response); -header('Content-type: text/xml; charset=UTF-8'); -echo << - - -$html - -EOF; -exit(); - - -?> diff --git a/sources/include/ajax_create_menu.php b/sources/include/ajax_create_menu.php deleted file mode 100644 index 6f5726d..0000000 --- a/sources/include/ajax_create_menu.php +++ /dev/null @@ -1,15 +0,0 @@ -'; -echo HtmlInput::hidden('create_menu', 1); -require_once 'template/menu_detail.php'; -echo HtmlInput::submit('create_menubt',_('Sauver')); -echo HtmlInput::button_close('divmenu'); -echo ''; -?> diff --git a/sources/include/ajax_display_submenu.php b/sources/include/ajax_display_submenu.php deleted file mode 100644 index d8271f1..0000000 --- a/sources/include/ajax_display_submenu.php +++ /dev/null @@ -1,98 +0,0 @@ -check_module('CFGPRO') == 0 ) die(); - -// Check parameter -$module=HtmlInput::default_value_get("dep", ""); -$p_level=HtmlInput::default_value_get("p_level", 0); -$p_id=HtmlInput::default_value_get('p_profile',-1); - -if ($module == "" - || $p_id == -1 - || isNumber($p_id) == 0 - || isNumber($p_level) == 0 - ) -{ - echo _('Paramètre invalide'); - return; -} - -require_once NOALYSS_INCLUDE.'/class_profile_menu.php'; -$p_level++; -$profile=new Profile_Menu($cn); -$profile->p_id=$p_id; -$profile->display_module_menu($module,$p_level); - -//////////////////////////////////////////////////////////////////////////////// -// EXAMPLE -//////////////////////////////////////////////////////////////////////////////// -/* -if ($ac == 'save') // operation -{ - - $cn=new Database(dossier::id()); - $todo=new Todo_List($cn); - $id=HtmlInput::default_value_get("id", 0); // get variable - $todo->set_parameter("id",$id); - if ($id <> 0 ) { $todo->load(); } - else - { - $todo->set_parameter("owner", $_SESSION['g_user']); - } - - $todo->set_parameter("date", HtmlInput::default_value_get("p_date_todo", "")); - $todo->set_parameter("title", HtmlInput::default_value_get("p_title", "")); - $todo->set_parameter("desc", HtmlInput::default_value_get("p_desc", "")); - $todo->set_is_public(HtmlInput::default_value_get("p_public", "N")); - - if ( $todo->get_parameter('owner') == $_SESSION['g_user'] ) $todo->save(); - $todo->load(); - //---------------------------------------------------------------- - // Answer in XML - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0','UTF-8'); - $tl_id=$dom->createElement('tl_id',$todo->get_parameter('id')); - $tl_content=$dom->createElement('row',$todo->display_row('class="odd"','N')); - $root=$dom->createElement("root"); - $todo_class=$todo->get_class(); - $todo_class=($todo_class=="")?' odd ':$todo_class; - $class=$dom->createElement("style",$todo_class); - - $root->appendChild($tl_id); - $root->appendChild($tl_content); - $root->appendChild($class); - $dom->appendChild($root); - - echo $dom->saveXML(); - exit(); -} - */ -?> \ No newline at end of file diff --git a/sources/include/ajax_fiche_def_detail.php b/sources/include/ajax_fiche_def_detail.php deleted file mode 100644 index effdb49..0000000 --- a/sources/include/ajax_fiche_def_detail.php +++ /dev/null @@ -1,47 +0,0 @@ -can_request(FICCAT,0); - -$fd=new Fiche_Def($cn,$_GET['id']); -if ( $_GET['id'] > 0 ) -{ - - echo $fd->input_detail(); - echo HtmlInput::button("retour_b", _("Retour à la liste"), "onclick=\"$('detail_category_div').hide();$('list_cat_div').show()\""); -} -else -{ - $fd->input_new(); - -} -?> diff --git a/sources/include/ajax_gestion.php b/sources/include/ajax_gestion.php deleted file mode 100644 index d59c681..0000000 --- a/sources/include/ajax_gestion.php +++ /dev/null @@ -1,129 +0,0 @@ -get_last(25); - $len_array=count($array); - require_once NOALYSS_INCLUDE.'/template/action_show.php'; - return; -} -if ($op=='action_add') -{ - require_once NOALYSS_INCLUDE.'/class_follow_up.php'; - $gestion=new Follow_Up($cn); - $gestion->display_short(); - return; -} -if ($op=='action_save') -{ - require_once NOALYSS_INCLUDE.'/class_follow_up.php'; - - /** - * save info from the get - */ - $date_event=HtmlInput::default_value_get("date_event", -1); - $dest=HtmlInput::default_value_get("dest", ""); - $event_group=HtmlInput::default_value_get("event_group", 0); - $event_priority=HtmlInput::default_value_get("event_priority", 0); - $title=HtmlInput::default_value_get("title_event", NULL); - $summary=HtmlInput::default_value_get("summary", ""); - $type_event=HtmlInput::default_value_get('type_event', -1); - /* - * Check if data are valid - */ - try - { - if ($date_event==-1||isDate($date_event)==0) - throw new Exception(_('Date invalide')); - if (trim($dest)=="") - $dest_id=NULL; - else - { - $fiche=new Fiche($cn); - $fiche->get_by_qcode($dest); - $dest_id=$fiche->id; - if ($dest_id==0) - throw new Exception(_('Destinataire invalide')); - } - if ($type_event==-1) - throw new Exception(_('Type invalide')); - if (trim($title)=="") - throw new Exception(_('Aucun titre')); - } - catch (Exception $ex) - { - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $xml_content=$dom->createElement('content', $ex->getMessage()); - $xml_status=$dom->createElement('status', "NOK"); - $root=$dom->createElement("root"); - $root->appendChild($xml_content); - $root->appendChild($xml_status); - $dom->appendChild($root); - echo $dom->saveXML(); - return; - } - /* - * Save data - */ - $gestion=new Follow_Up($cn); - $gestion->ag_priority=$event_priority; - $gestion->ag_title=$title; - $gestion->ag_dest=$event_group; - $gestion->ag_type=$type_event; - $gestion->f_id_dest=$dest_id; - $gestion->ag_state=3; - $gestion->dt_id=$type_event; - $gestion->ag_comment=h($summary); - $gestion->ag_timestamp=$date_event; - $gestion->ag_remind_date=$date_event; - $content=_('Sauvé'); - $status='OK'; - try { - $gestion->save_short(); - } catch (Exception $ex) - { - $content=$ex->getMessage(); - $status='NOK'; - } - header('Content-type: text/xml; charset=UTF-8'); - $dom=new DOMDocument('1.0', 'UTF-8'); - $xml_content=$dom->createElement('content', _("Sauvé")); - $xml_status=$dom->createElement('status', "OK"); - $root=$dom->createElement("root"); - $root->appendChild($xml_content); - $root->appendChild($xml_status); - $dom->appendChild($root); - echo $dom->saveXML(); - return; -} \ No newline at end of file diff --git a/sources/include/ajax_get_menu_detail.php b/sources/include/ajax_get_menu_detail.php deleted file mode 100644 index ff015a8..0000000 --- a/sources/include/ajax_get_menu_detail.php +++ /dev/null @@ -1,81 +0,0 @@ -get_value("select p_id from profile_menu where pm_id=$1",array($pm_id)); -$a_value=$cn->make_array("select me_code,me_code||' '||me_menu||' '||coalesce(me_description,'') from menu_ref",0); - -$array=$cn->get_array("select p_id,pm_id,me_code,me_code_dep,p_order,p_type_display,pm_default - from profile_menu - where pm_id=$1",array($pm_id)); -if ( empty($array)) { - alert("Code invalide"); - exit(); -} - - -echo HtmlInput::title_box($array[0]['me_code'],'divdm'.$pm_id); - -$me_code=new ISelect('me_code'); -$me_code->value=$a_value; -$me_code->selected=$array[0]['me_code']; - -$p_order=new Inum('p_order',$array[0]['p_order']); -$pm_default=new ICheckBox('pm_default','1'); -$pm_default->set_check($array[0]['pm_default']); - -?> -
    ?')"> - - - - - - - - - - - - - - - - - - - -
    input()?>
    input()?>
    input()?>
    -'; - - -?> diff --git a/sources/include/ajax_get_profile.php b/sources/include/ajax_get_profile.php deleted file mode 100644 index 8dcab3b..0000000 --- a/sources/include/ajax_get_profile.php +++ /dev/null @@ -1,137 +0,0 @@ -check_module('CFGPRO') == 0 ) die(); - -require_once NOALYSS_INCLUDE.'/class_profile_sql.php'; -require_once NOALYSS_INCLUDE.'/class_profile_menu.php'; -require_once NOALYSS_INCLUDE.'/class_html_input.php'; -$p_id=HtmlInput::default_value_request('p_id', -1); -$profile=new Profile_sql($cn,$p_id); -$gDossier=Dossier::id(); -$add_impression=HtmlInput::button("add", _("Ajout Menu"),"onclick=\"add_menu({dossier:$gDossier,p_id:$p_id,type:'pr'})\""); -$call_tab=HtmlInput::default_value_post('tab', 'none'); -$a_tab=array('profile_gen_div'=>'tabs','profile_menu_div'=>'tabs','profile_print_div'=>'tabs','profile_gestion_div'=>'tabs','profile_repo_div'=>'tabs'); -$a_tab[$call_tab]='tabs_selected'; -?> -

    Profil p_name?>

    - - 0 ) : ?> -
      - -
    • -
    • -
    • -
    • -
    •   -
    - - -p_id); -$name=new IText("p_name",$profile->p_name); -$desc=new IText("p_desc",$profile->p_desc); -$with_calc=new ICheckBox("with_calc","t"); -$with_calc->set_check($profile->with_calc); - -$with_direct_form=new ICheckBox("with_direct_form","t"); -$with_direct_form->set_check($profile->with_direct_form); - -// If $p_id == -1 it is a new profile -if ( $p_id > 0 ) -{ - echo '
    '; -} -?> - - diff --git a/sources/include/ajax_get_receipt.php b/sources/include/ajax_get_receipt.php deleted file mode 100644 index 472c9fa..0000000 --- a/sources/include/ajax_get_receipt.php +++ /dev/null @@ -1,65 +0,0 @@ -get_propertie(); -$pj_seq=$Ledger->guess_pj(); -$string='{"pj":"'.$pj_seq.'"}'; - -header("Content-type: text/json; charset: utf8",true); -echo $string; - - -?> - diff --git a/sources/include/ajax_ledger_show.php b/sources/include/ajax_ledger_show.php deleted file mode 100644 index db9534c..0000000 --- a/sources/include/ajax_ledger_show.php +++ /dev/null @@ -1,35 +0,0 @@ - - -$ctl -$html - -EOF; -exit(); -?> \ No newline at end of file diff --git a/sources/include/ajax_min_row.php b/sources/include/ajax_min_row.php deleted file mode 100644 index c454ccc..0000000 --- a/sources/include/ajax_min_row.php +++ /dev/null @@ -1,48 +0,0 @@ -check_jrn($_GET['j'])=='X' ) { echo '{"row":"0"}';exit();} - -$row=$cn->get_value('select jrn_deb_max_line from jrn_def where jrn_def_id=$1',array($_GET['j'])); - -echo '{"row":"'.$row.'"}'; - -?> diff --git a/sources/include/ajax_mod_document.php b/sources/include/ajax_mod_document.php deleted file mode 100644 index 157d25b..0000000 --- a/sources/include/ajax_mod_document.php +++ /dev/null @@ -1,52 +0,0 @@ -load(); -ob_start(); -require(NOALYSS_INCLUDE.'/template/modele_document.php'); - -$html=ob_get_contents(); -ob_end_clean(); -$html=escape_xml($html); -header('Content-type: text/xml; charset=UTF-8'); - -echo << - -mod_doc -$html - -EOF; -exit(); diff --git a/sources/include/ajax_mod_menu.php b/sources/include/ajax_mod_menu.php deleted file mode 100644 index 7d32b3f..0000000 --- a/sources/include/ajax_mod_menu.php +++ /dev/null @@ -1,17 +0,0 @@ -me_code.' '.h($m->me_menu); -echo '
    '; -echo HtmlInput::hidden('modify_menu', 1); - -require_once NOALYSS_INCLUDE.'/template/menu_detail.php'; - -echo HtmlInput::submit('modify_menutb',_('Sauver')); -echo HtmlInput::button_close('divmenu'); -echo '
    '; -?> diff --git a/sources/include/ajax_mod_periode.php b/sources/include/ajax_mod_periode.php deleted file mode 100644 index f28cd13..0000000 --- a/sources/include/ajax_mod_periode.php +++ /dev/null @@ -1,104 +0,0 @@ -load(); - $limit = $per->get_date_limit($_GET['p_id']); - - $p_start = new IDate('p_start'); - $p_start->value = $limit['p_start']; - $p_end = new IDate('p_end'); - $p_end->value = $limit['p_end']; - $p_exercice = new INum('p_exercice'); - $p_exercice->value = $per->p_exercice; - - $html = ''; - $html.=HtmlInput::anchor_close('mod_periode'); - $html.=h2info(_('Modification période')); - $html.='

    '._('Modifier les dates de début et fin de période').'

    '; - $html.='

    '._('Cela pourrait avoir un impact sur les opérations déjà existantes').'

    '; - $html.='
    '; - $html.=dossier::hidden(); - $html.=''; - - $html.=tr(td(_(' Début période : ')) . td($p_start->input())); - $html.=tr(td(_(' Fin période : ')) . td($p_end->input())); - $html.=tr(td(_(' Exercice : ')) . td($p_exercice->input())); - $html.='
    '; - $html.=HtmlInput::submit('sauver', _('sauver')); - $html.=HtmlInput::button('close', _('fermer'), 'onclick="removeDiv(\'mod_periode\')"'); - $html.=HtmlInput::hidden('p_id', $_GET['p_id']); - $html.='
    '; - break; - case 'save_per': - $per = new Periode($cn, $_POST['p_id']); - $per->load(); - if (isDate($_POST['p_start']) == null || - isDate($_POST['p_end'] == null) || - isNumber($_POST['p_exercice']) == 0 || - $_POST['p_exercice'] > 2099 || - $_POST['p_exercice'] < 2000) - { - $html = ''; - $html.=HtmlInput::anchor_close('mod_periode'); - $html.='

    '._('Modifier les dates de début et fin de période').'

    '; - $html.="
    "._('Erreur date invalide')."
    "; - - $html.=HtmlInput::button('close', _('fermer'), 'onclick="removeDiv(\'mod_periode\')"'); - } - else - { - $sql = "update parm_periode set p_start=to_date($1,'DD.MM.YYYY'),p_end=to_date($2,'DD.MM.YYYY'),p_exercice=$3 where p_id=$4"; - try - { - $cn->exec_sql($sql, array($_POST['p_start'], $_POST['p_end'], $_POST['p_exercice'], $_POST['p_id'])); - $html = '

    Modifier les dates de début et fin de période

    '; - $html.='

    Sauvé

    '; - - $html.=HtmlInput::button('close', _('Fermer'), 'onclick=" refresh_window();"'); - } - catch (Exception $e) - { - $html = alert($e->getTrace(), true); - } - } - break; -} - -$html = escape_xml($html); -header('Content-type: text/xml; charset=UTF-8'); -echo ''; -echo ''; -echo '' . $html . ''; -echo ''; diff --git a/sources/include/ajax_mod_predf_op.php b/sources/include/ajax_mod_predf_op.php deleted file mode 100644 index 1e5ea89..0000000 --- a/sources/include/ajax_mod_predf_op.php +++ /dev/null @@ -1,76 +0,0 @@ -load(); -echo HtmlInput::anchor_close('mod_predf_op'); -echo h2(_('Modification du nom'),' class="title"'); - -echo ' -
    '; -$name = new IText('opd_name'); -$name->value = $op->od_name; -$name->size = 60; -echo "Nom =" . $name->input(); -$opd_description=new ITextarea('od_description'); -$opd_description->style=' class="itextarea" style="width:30em;height:4em;vertical-align:top"'; -$opd_description->value=$op->od_description; -echo '

    '; -echo _("Description (max 50 car.)"); -echo $opd_description->input(); -echo '

    '; -echo dossier::hidden() . HtmlInput::hidden('od_id', $_GET['id']); -echo "
    "; -////////////////////////////////////////////////////////////////////////////// -// Detail operation -////////////////////////////////////////////////////////////////////////////// -echo $op->display(); - - -echo HtmlInput::submit('save', _('Sauve')); -echo HtmlInput::button('close', _('Annuler'), 'onclick="removeDiv(\'mod_predf_op\')"'); -echo '
    '; - - -$html1 = ob_get_contents(); -ob_end_clean(); -$html = escape_xml($html1); -if (headers_sent() ) - { - echo $html1; - } -else { - header('Content-type: text/xml; charset=UTF-8'); -} -echo << - -mod_predf_op -$html - -EOF; diff --git a/sources/include/ajax_mod_stock_repo.php b/sources/include/ajax_mod_stock_repo.php deleted file mode 100644 index e808e7d..0000000 --- a/sources/include/ajax_mod_stock_repo.php +++ /dev/null @@ -1,80 +0,0 @@ - - -
    - - - - - - - - - - - - - - - - - - - - - - - -
    - - - r_name); echo $name->input();?> -
    - - - r_adress); echo $name->input();?> -
    - - - r_city); echo $name->input();?> -
    - - - r_country); echo $name->input();?> -
    - - - r_phone); echo $name->input();?> -
    - -
    \ No newline at end of file diff --git a/sources/include/ajax_navigator.php b/sources/include/ajax_navigator.php deleted file mode 100644 index f3bc5c3..0000000 --- a/sources/include/ajax_navigator.php +++ /dev/null @@ -1,116 +0,0 @@ -get_array($sql,array($_SESSION['g_user'])); - -?> -
    -

    - -

    -

    - Filtre : -

    - - - - - - - - - - - - - - - - - - -
    - \ No newline at end of file diff --git a/sources/include/ajax_pcmn_update.php b/sources/include/ajax_pcmn_update.php deleted file mode 100644 index de4d80d..0000000 --- a/sources/include/ajax_pcmn_update.php +++ /dev/null @@ -1,95 +0,0 @@ -check_module('CFGPCMN') == 0 ) -{ - $html=h2(_('Action interdite'),' class="notice"'); - $html = escape_xml($response); - - header('Content-type: text/xml; charset=UTF-8'); -echo << - -pcmn_update -$html -NOTALLOWED - -EOF; - return; -} - -ob_start(); -$pcmn_val=HtmlInput::default_value_get('value', "-1"); - -// if empty -if ( $pcmn_val != "-1" ) -{ - // not set - -} -$action='new'; -$val=new IText('p_valu'); -$parent=new IText('p_parentu'); -$lib=new IText('p_libu'); -$lib->css_size="100%"; -$type=new ISelect('p_typeu'); -$type->value=Acc_Account::$type; - -if ( $pcmn_val != "") -{ - $action='update'; - /* - * Not empty, show the default value - */ - $account = new Acc_Account($cn); - $account->set_parameter('value',$pcmn_val); - $account->load(); - - $val->value=$account->get_parameter('value'); - $parent->value=$account->get_parameter('parent'); - $lib->value=$account->get_parameter('libelle'); - $type->selected=$account->get_parameter('type'); - -} - -require 'template/pcmn_update.php'; -$response = ob_get_clean(); -$html = escape_xml($response); -if ( headers_sent() ) { - echo $response; - echo $html; -} else { - header('Content-type: text/xml; charset=UTF-8'); - echo << - - -$html -ok - -EOF; - } \ No newline at end of file diff --git a/sources/include/ajax_plugin_detail.php b/sources/include/ajax_plugin_detail.php deleted file mode 100644 index bc9a0bd..0000000 --- a/sources/include/ajax_plugin_detail.php +++ /dev/null @@ -1,64 +0,0 @@ -value; -echo HtmlInput::title_box($msg, $ctl); -?> -
    ')"> - - - - - - - - - - - - - - - - - -
    input();?>
    input();?>
    input();?>
    input();?>
    - "._("Voulez-vous effacer ce plugin ?")." ".$delete->input()."

    "; - echo HtmlInput::hidden('mod_plugin',1); - echo HtmlInput::submit("mod_plugin_sbt",_("Modifier ce plugin")); - - } - ?> -
    \ No newline at end of file diff --git a/sources/include/ajax_preference.php b/sources/include/ajax_preference.php deleted file mode 100644 index 0b4c894..0000000 --- a/sources/include/ajax_preference.php +++ /dev/null @@ -1,195 +0,0 @@ -'; -echo '

    '; -echo _("Si vous validez, la page sera rechargée et vous pourriez perdre ce que vous faisiez"); -echo '

    '; -//---------------------------------------------------------------------- -// -global $g_user; - -$g_user=new User($cn); -$inside_dossier = false; - -if (isset($_REQUEST['gDossier']) && $_REQUEST['gDossier']<>0) -{ - $g_user->load_global_pref(); - $msg = ""; - $cn = new Database($_REQUEST['gDossier']); - $g_user->cn = $cn; - $inside_dossier = true; - $local_pref=$g_user->get_preference(); -} -////////////////////////////////////////////////////////////////////////// -// Theme -////////////////////////////////////////////////////////////////////////// - - $repo = new Database(); -// charge tous les styles - $res = $repo->exec_sql("select the_name from theme - order by the_name"); - $style = new ISelect('style_user'); - $style->value = $repo->make_array("select the_name,the_name - from theme - order by the_name"); - $style->selected =$_SESSION['g_theme']; -?> - -
    - -
    -
    - - - - - - - - - - - - - - - get_periode(); - if ($l_user_per == "") - $l_user_per = $cn->get_value("select min(p_id) from parm_periode where p_closed='f'"); - -// if periode is closed then warns the users - $period = new Periode($cn, $l_user_per); - - $period->p_id = $l_user_per; - $period->jrn_def_id = 0; - if ($period->is_closed($l_user_per) == 1) - { - $msg = _('Attention cette période est fermée, vous ne pourrez rien modifier dans le module comptable'); - $msg = '

    ' . $msg . '

    '; - } - - $period = new IPeriod("period"); - $period->user = $g_user; - $period->cn = $cn; - $period->filter_year = false; - $period->value = $l_user_per; - $period->type = ALL; - $l_form_per = $period->input(); - ?> - - - - - - - - -
    - - - -
    - Mot de passe : - - -
    - - - input();?> -
    - -
    - - -
    -
    - '; - echo '' . _('Options pour la page d\'accueil') . ''; - echo _('Mini-Rapport : '); - $rapport = new Acc_Report($cn); - $aRapport = $rapport->make_array(); - $aRapport[] = array("value" => 0, "label" => _('Aucun mini rapport')); - $wRapport = new ISelect(); - $wRapport->name = "minirap"; - $wRapport->selected = $g_user->get_mini_report(); - $wRapport->value = $aRapport; - echo $wRapport->input(); - echo '' . _('Le mini rapport est un rapport qui s\'affiche sur votre page d\'accueil') . ''; - echo ''; - } - - echo '
    '; - echo '' . _('Langue') . ''; - echo _('Selectionnez votre langue'); - $aLang = array(array(_('Français'), 'fr_FR.utf8'), - array(_('Anglais'), 'en_US.utf8'), - array(_('Néerlandais'), 'nl_NL.utf8'), - ); - echo ''; - echo '
    '; - - echo '

    '; - echo HtmlInput::button_close('preference_div'); - echo HtmlInput::submit("set_preference", _("Valider")); - echo '

    '; - echo '
    '; - - echo "
    "; - ?> diff --git a/sources/include/ajax_remove_submenu.php b/sources/include/ajax_remove_submenu.php deleted file mode 100644 index 913f997..0000000 --- a/sources/include/ajax_remove_submenu.php +++ /dev/null @@ -1,30 +0,0 @@ -check_module('CFGPRO')==0) - die(); -$p_profile_menu_id=HtmlInput::default_value_get('p_profile_menu_id', 0); -$cn->exec_sql('delete from profile_menu where pm_id = $1 or pm_id_dep=$1',array($p_profile_menu_id)) -?> \ No newline at end of file diff --git a/sources/include/ajax_save_predf_op.php b/sources/include/ajax_save_predf_op.php deleted file mode 100644 index 83a7479..0000000 --- a/sources/include/ajax_save_predf_op.php +++ /dev/null @@ -1,58 +0,0 @@ -check_module('PREDOP') == 0) exit(); -$name=HtmlInput::default_value_post("opd_name", ""); -if ( trim($name) != '') - { - $od_id=HtmlInput::default_value_post("od_id", -1); - - if ( $od_id == -1 ||isNumber($od_id) == 0) return; - - $cn->exec_sql('delete from op_predef where od_id=$1', - array($od_id)); - - $cn->exec_sql("delete from op_predef_detail where od_id=$1",array($od_id)); - - $jrn_type=HtmlInput::default_value_post("jrn_type", null); - switch ($jrn_type) { - case 'ACH': - $operation=new Pre_op_ach($cn); - break; - case 'VEN': - $operation=new Pre_op_ven($cn); - break; - case 'ODS': - $operation=new Pre_Op_Advanced($cn); - break; - default : - throw new Exception(_('Type de journal invalide')); - } - $operation->get_post(); - $operation->save(); - $cn->commit(); - } -?> \ No newline at end of file diff --git a/sources/include/ajax_search_action.php b/sources/include/ajax_search_action.php deleted file mode 100755 index aae5edf..0000000 --- a/sources/include/ajax_search_action.php +++ /dev/null @@ -1,34 +0,0 @@ - diff --git a/sources/include/ajax_search_add_tag.php b/sources/include/ajax_search_add_tag.php deleted file mode 100644 index f40c9e1..0000000 --- a/sources/include/ajax_search_add_tag.php +++ /dev/null @@ -1,45 +0,0 @@ -update_search_cell($_GET['pref']); - -$response= ob_get_clean(); -$html=escape_xml($response); -header('Content-type: text/xml; charset=UTF-8'); -echo << - - -$html - -EOF; -exit(); - - -?> - diff --git a/sources/include/ajax_search_clear_tag.php b/sources/include/ajax_search_clear_tag.php deleted file mode 100644 index fb8508a..0000000 --- a/sources/include/ajax_search_clear_tag.php +++ /dev/null @@ -1,38 +0,0 @@ - - - -$html - -EOF; -exit(); - - -?> diff --git a/sources/include/ajax_search_display_tag.php b/sources/include/ajax_search_display_tag.php deleted file mode 100644 index 90270be..0000000 --- a/sources/include/ajax_search_display_tag.php +++ /dev/null @@ -1,40 +0,0 @@ -select_search($_GET['pref']); - -$response= ob_get_clean(); -$html=escape_xml($response); -header('Content-type: text/xml; charset=UTF-8'); -echo << - - -$html - -EOF; -exit(); - - -?> diff --git a/sources/include/ajax_tag_add_action.php b/sources/include/ajax_tag_add_action.php deleted file mode 100644 index f067f68..0000000 --- a/sources/include/ajax_tag_add_action.php +++ /dev/null @@ -1,44 +0,0 @@ -ag_id=$_REQUEST['ag_id']; -if ( $g_user->can_write_action($fl->ag_id) == TRUE ) - $fl->tag_add($_REQUEST['t_id']); - -ob_start(); - -$fl->tag_cell(); - -$response= ob_get_clean(); -$html=escape_xml($response); -header('Content-type: text/xml; charset=UTF-8'); -echo << - - -$html - -EOF; -exit(); - - -?> diff --git a/sources/include/ajax_tag_detail.php b/sources/include/ajax_tag_detail.php deleted file mode 100644 index 1226260..0000000 --- a/sources/include/ajax_tag_detail.php +++ /dev/null @@ -1,51 +0,0 @@ -data->t_id=$_GET['tag']; -$tag->data->load(); -echo HtmlInput::title_box(_("Détail du dossier ou tag"), "tag_div"); - -?> - -
    - - - - data; - require_once 'template/tag_detail.php'; - echo HtmlInput::submit("save_tag_sb", "Valider"); - ?> -
    - - - -$html - -EOF; - exit(); - ?> \ No newline at end of file diff --git a/sources/include/ajax_tag_list.php b/sources/include/ajax_tag_list.php deleted file mode 100644 index f8dc506..0000000 --- a/sources/include/ajax_tag_list.php +++ /dev/null @@ -1,45 +0,0 @@ -select(); - -//------------------- Propose to add a tag - -$js=sprintf("onclick=\"show_tag('%s','%s','%s','j')\"",Dossier::id(),'','-1'); -echo HtmlInput::button("tag_add", _("Ajout d'un tag"), $js); - -$response= ob_get_clean(); -$html=escape_xml($response); -header('Content-type: text/xml; charset=UTF-8'); -echo << - - -$html - -EOF; -exit(); - - -?> diff --git a/sources/include/ajax_tag_remove_action.php b/sources/include/ajax_tag_remove_action.php deleted file mode 100644 index 1451865..0000000 --- a/sources/include/ajax_tag_remove_action.php +++ /dev/null @@ -1,44 +0,0 @@ -ag_id=$_REQUEST['ag_id']; - -if ( $g_user->can_write_action($fl->ag_id) == TRUE ) $fl->tag_remove($_REQUEST['t_id']); - -ob_start(); - -$fl->tag_cell(); - -$response= ob_get_clean(); -$html=escape_xml($response); -header('Content-type: text/xml; charset=UTF-8'); -echo << - - -$html - -EOF; -exit(); - - -?> diff --git a/sources/include/ajax_tag_save.php b/sources/include/ajax_tag_save.php deleted file mode 100644 index 9194a18..0000000 --- a/sources/include/ajax_tag_save.php +++ /dev/null @@ -1,11 +0,0 @@ -save($_GET); - -?> diff --git a/sources/include/ajax_tag_select_search.php b/sources/include/ajax_tag_select_search.php deleted file mode 100644 index d364ec0..0000000 --- a/sources/include/ajax_tag_select_search.php +++ /dev/null @@ -1,40 +0,0 @@ -select_search(); - -$response= ob_get_clean(); -$html=escape_xml($response); -header('Content-type: text/xml; charset=UTF-8'); -echo << - - -$html - -EOF; -exit(); - - -?> diff --git a/sources/include/ajax_update_payment.php b/sources/include/ajax_update_payment.php deleted file mode 100644 index f12a61a..0000000 --- a/sources/include/ajax_update_payment.php +++ /dev/null @@ -1,32 +0,0 @@ -input_paid(1); -?> diff --git a/sources/include/ajax_update_predef.php b/sources/include/ajax_update_predef.php deleted file mode 100644 index 80eaf20..0000000 --- a/sources/include/ajax_update_predef.php +++ /dev/null @@ -1,69 +0,0 @@ -set('ledger',$l); -$op->set('ledger_type',$t); -$op->set('direct',$d); -$url=http_build_query(array('action'=>'use_opd','p_jrn_predef'=>$l,'ac'=>$_GET['ac'],'gDossier'=>dossier::id())); -$html=""; - -$html.=HtmlInput::title_box(_("Modèle d'opérations"), 'modele_op_div', 'hide'); -$html.=$op->show_button('do.php?'.$url); - -$html=escape_xml($html); -header('Content-type: text/xml; charset=UTF-8'); -echo << - - -$html - -EOF; - -?> - diff --git a/sources/include/ajax_view_action.php b/sources/include/ajax_view_action.php deleted file mode 100644 index 38a1f79..0000000 --- a/sources/include/ajax_view_action.php +++ /dev/null @@ -1,75 +0,0 @@ -ag_id = $ag_id; -$act->get(); -$code='nok'; -if ($g_user->can_write_action($ag_id) == true || $g_user->can_read_action($ag_id) == true || $act->ag_dest == -1) -{ - $menu=new Default_Menu(); - echo $act->Display('READ', false, "ajax", ""); - //$action=HtmlInput::array_to_string(array("gDossier","ag_id"), $_GET)."&ac=FOLLOW&sa=detail"; - $action= "do.php?".http_build_query(array("gDossier"=>Dossier::id(),"ag_id"=>$ag_id,"ac"=>$menu->get('code_follow'),"sa"=>"detail")); - $code='ok'; - if ( $_GET['mod']== 1) : - $forbidden=_("Accès interdit : vous n'avez pas accès à cette information, contactez votre responsable"); - ?> - - -
    -

    ; -
    - - -$code -$html - -EOF; -exit(); - -?> \ No newline at end of file diff --git a/sources/include/ajax_view_mod_stock.php b/sources/include/ajax_view_mod_stock.php deleted file mode 100644 index d6426c7..0000000 --- a/sources/include/ajax_view_mod_stock.php +++ /dev/null @@ -1,58 +0,0 @@ -get_array("select * from stock_goods where c_id=$1",array($_GET['c_id'])); -echo HtmlInput::title_box(_("Détail changement"),$_GET['ctl']); -$p_array=array(); -$p_array['p_date']=$cn->get_value("select to_char(c_date,'DD.MM.YYYY') from stock_change where c_id=$1",array($_GET['c_id'])); -$p_array['p_motif']=$cn->get_value("select c_comment from stock_change where c_id=$1",array($_GET['c_id'])); -$p_array['p_depot']=$cn->get_value("select r_id from stock_change where c_id=$1",array($_GET['c_id'])); -for ($i=0;$iinput($p_array,true); -?> -
    - -

    - label= _("Cochez pour confirmer effacement"); - echo $ck->input();?> -

    - - - -
    diff --git a/sources/include/anc_acc_balance.inc.php b/sources/include/anc_acc_balance.inc.php deleted file mode 100644 index efa03f8..0000000 --- a/sources/include/anc_acc_balance.inc.php +++ /dev/null @@ -1,21 +0,0 @@ -'; -$tab = new Anc_Acc_List($cn); -$tab->get_request(); -echo '
    '; -echo $tab->display_form(); -echo '

    ' . HtmlInput::submit('Recherche', _('Recherche')) . '

    '; - -echo '
    '; -if (isset($_GET['result'])) -{ - echo $tab->show_button(); - $tab->display_html(); -} -echo ''; -?> diff --git a/sources/include/anc_acc_table.inc.php b/sources/include/anc_acc_table.inc.php deleted file mode 100644 index 357c2dd..0000000 --- a/sources/include/anc_acc_table.inc.php +++ /dev/null @@ -1,19 +0,0 @@ -get_request(); -echo '
    '; -echo $tab->display_form(); -echo '

    ' . HtmlInput::submit('Recherche', _('Recherche')) . '

    '; - -echo '
    '; -if (isset($_GET['result'])) -{ - echo $tab->show_button(""); - $tab->display_html(); -} -?> diff --git a/sources/include/anc_balance_double.inc.php b/sources/include/anc_balance_double.inc.php deleted file mode 100644 index b8baab3..0000000 --- a/sources/include/anc_balance_double.inc.php +++ /dev/null @@ -1,28 +0,0 @@ -get_request(); -echo '
    '; -echo $bc->display_form(); -echo '
    '; -if (isset($_GET['result'])) -{ - $result=$bc->display_html(); - if ($bc->has_data > 0) - { - echo $bc->show_button(); - echo $result; - } - else - { - echo '

    '; - echo _('Aucune donnée trouvée'); - echo '

    '; - } - -} -?> diff --git a/sources/include/anc_balance_simple.inc.php b/sources/include/anc_balance_simple.inc.php deleted file mode 100644 index fdab93c..0000000 --- a/sources/include/anc_balance_simple.inc.php +++ /dev/null @@ -1,27 +0,0 @@ -get_request(); -echo '
    '; -echo $bs->display_form(); -echo '
    '; -if (isset($_GET['result'])) -{ - $result= $bs->display_html(); - if ( $bs->has_data > 0) - { - echo $bs->show_button(); - echo $result; - } - else - { - echo '

    '; - echo _('Aucune donnée trouvée'); - echo '

    '; - } -} -?> diff --git a/sources/include/anc_great_ledger.inc.php b/sources/include/anc_great_ledger.inc.php deleted file mode 100644 index fc7c51a..0000000 --- a/sources/include/anc_great_ledger.inc.php +++ /dev/null @@ -1,52 +0,0 @@ -'; - -require_once NOALYSS_INCLUDE.'/class_anc_grandlivre.php'; - -$grandLivre=new Anc_Grandlivre($cn); - -$grandLivre->get_request(); - -/* - * Form - */ -echo '
    '; -echo $grandLivre->display_form(); -echo '

    ' . HtmlInput::submit('Recherche', _('Rechercher')) . '

    '; -echo HtmlInput::request_to_hidden(array('sa','ac','gDossier')); -echo '
    '; - -$result=HtmlInput::default_value_request('result',null); - -if ($result != null) -{ - $result=$grandLivre->display_html(); - if ($grandLivre->has_data != 0 ) - { - echo ''; - echo _('Tout sélectionner')." ".ICheckBox::toggle_checkbox('export_pdf_bt1','export_anc_receipt_pdf'); - echo ''; - echo $grandLivre->show_button(); - echo '
    '; - - echo $grandLivre->button_export_pdf(); - echo $grandLivre->display_html(); - echo $grandLivre->button_export_pdf(); - echo HtmlInput::get_to_hidden(array('ac','gDossier','sa')); - echo '
    '; - echo $grandLivre->show_button(); - } - else - { - echo '

    '; - echo _('Aucune donnée trouvée'); - echo '

    '; - } - -} -echo ''; -?> diff --git a/sources/include/anc_group.inc.php b/sources/include/anc_group.inc.php deleted file mode 100644 index fdda9f3..0000000 --- a/sources/include/anc_group.inc.php +++ /dev/null @@ -1,90 +0,0 @@ -ga_id=$m; - $obj->remove(); - } - } -} - -//---------------------------------------------------------------------- -// INSERT -if ( isset($_POST['add'])) -{ - $obj=new Anc_Group($cn); - $obj->get_from_array($_POST); - echo $obj->insert(); -} -$array=$r->myList(); - -echo '
    '; -echo '
    '; -echo dossier::hidden(); -echo ''; -echo ''; -foreach ($array as $idx=>$m) -{ - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; -} -$w=new IText("ga_id"); -$wDesc=new IText("ga_description"); -$val_pa_id=$cn->make_array("select pa_id,pa_name from plan_analytique"); -$wPa_id=new ISelect("pa_id"); -$wPa_id->value=$val_pa_id; - -echo ""; -echo ""; -echo ""; -; - -echo '
    '._("Code")." "._("Plan")." "._("Description").'
    '.h($m->ga_id).''.h($m->pa_name).''.h($m->ga_description).' Effacer '.'
    ".$w->input()."".$wPa_id->input("pa_id")."".$wDesc->input("ga_description"). -HtmlInput::submit('add',_('Ajouter')). -"
    '; - -echo "
    "; -echo HtmlInput::submit('remove',_('Effacer')); - -echo '
    '; diff --git a/sources/include/anc_group_balance.inc.php b/sources/include/anc_group_balance.inc.php deleted file mode 100644 index 532c897..0000000 --- a/sources/include/anc_group_balance.inc.php +++ /dev/null @@ -1,20 +0,0 @@ -get_request(); -echo ''; -echo $gr->display_form(); -echo '

    ' . HtmlInput::submit('Recherche', _('Recherche')) . '

    '; -echo ''; -if (isset($_GET['result'])) -{ - echo $gr->show_button(); - - echo $gr->display_html(); -} -?> diff --git a/sources/include/anc_history.inc.php b/sources/include/anc_history.inc.php deleted file mode 100644 index 7efb2a6..0000000 --- a/sources/include/anc_history.inc.php +++ /dev/null @@ -1,36 +0,0 @@ -get_request(); - -echo $list->display_form(); -//---- result -if (isset($_GET['result'])) -{ - echo '
    '; - - //-------------------------------- - // export Buttons - //--------------------------------- - $result=$list->display_html(); - if ( $list->has_data > 0) - { - echo $list->show_button(); - echo $result; - } - else - { - echo '

    '; - echo _('Aucune donnée trouvée'); - echo '

    '; - } - echo '
    '; -} -echo ''; -?> diff --git a/sources/include/anc_key.inc.php b/sources/include/anc_key.inc.php deleted file mode 100644 index b9d5a22..0000000 --- a/sources/include/anc_key.inc.php +++ /dev/null @@ -1,72 +0,0 @@ -save($_POST); - Anc_Key::display_list(); - Anc_Key::key_add(); - - break; - } - catch (Exception $e) - { - echo span($e->getMessage(),' class="notice"'); - } - } - $key->input(); - break; - case 'delete_key': - $id=HtmlInput::default_value_request("key", "0"); - $key=new Anc_Key($id); - $key->delete(); - Anc_Key::display_list(); - Anc_Key::key_add(); -} -?> diff --git a/sources/include/anc_od.inc.php b/sources/include/anc_od.inc.php deleted file mode 100644 index 54d3339..0000000 --- a/sources/include/anc_od.inc.php +++ /dev/null @@ -1,161 +0,0 @@ -get_list(); -if ( ! $m ) -{ - - echo '

    '._('Aucun plan analytique défini').'

    '; - return; -} - - - -//---------------------------------------------------------------------- -// show the left menu -//---------------------------------------------------------------------- -echo ' - -'; - - -//---------------------------------------------------------------------- -// the pa_id is set -// -//---------------------------------------------------------------------- -if ( isset($_GET['see'])) -{ - - // Show the list for the period - // and exit - //----------------------------- - $a=new Anc_Operation($cn); - - echo ' -
    -
    - '; - - echo dossier::hidden(); - $hid=new IHidden(); - - $hid->name="ac"; - $hid->value=$_REQUEST['ac']; - echo $hid->input(); - - $hid->name="see"; - $hid->value=""; - echo $hid->input(); - - $w=new ISelect(); - $w->name="p_periode"; -// filter on the current year - $filter_year=" where p_exercice='".$g_user->get_exercice()."'"; - - $periode_start=$cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end",1); - $g_user=new User($cn); - $current=(isset($_GET['p_periode']))?$_GET['p_periode']:$g_user->get_periode(); - $w->value=$periode_start; - $w->selected=$current; - echo _('Filtrer par période').":".$w->input().HtmlInput::submit('gl_submit','Valider').'
    '; - echo '
    '; - - echo '
    '; - echo $a->html_table($current); - echo '
    '; - return; -} -if ( isset($_POST['save'])) -{ - // record the operation and exit - // and exit - //----------------------------- - echo '
    '. - _('Opération sauvée'); - $a=new Anc_Group_Operation($cn); - - $a->get_from_array($_POST); - - $a->save(); - echo $a->show(); - echo '
    '; - return; -} - -if ( isset($_GET['new'])) -{ - //show the form for entering a new Anc_Operation - //------------------------------------------ - $a=new Anc_Group_Operation($cn); - - $wSubmit=new IHidden("p_action","ca_od"); - $wSubmit->table=0; - echo '
    '; - echo '
    '; - echo dossier::hidden(); - echo $wSubmit->input(); - echo $a->form(); - echo HtmlInput::submit("save",_("Sauver")); - echo '
    '; - echo '
    '; - echo _('Débit').' = '; - echo _('Crédit').' = '; - echo _('Difference').' = -
    - '; - - echo '
    '; - return; -} - -?> -
    diff --git a/sources/include/anc_pa.inc.php b/sources/include/anc_pa.inc.php deleted file mode 100644 index 23e6798..0000000 --- a/sources/include/anc_pa.inc.php +++ /dev/null @@ -1,317 +0,0 @@ -isAppend() == true) - { - $ret.= '
    '; - $ret.=HtmlInput::title_box(_('Nouveau plan'),'','none'); - $ret.= '
    '; - $ret.=dossier::hidden(); - $ret.= $new->form(); - $ret.= HtmlInput::hidden("sa","pa_write"); - $ret.=HtmlInput::submit("submit",_("Enregistre")); - $ret.= '
    '; - $ret.= '
    '; - } - else - { - $ret.= '
    '. - '

    '. - _("Maximum de plan analytique est atteint"). - "

    "; - } - $sa="anc_menu"; - } - // Add - if ( $sa == "pa_write") - { - $new=new Anc_Plan($cn); - - - if ( $new->isAppend() == false) - { - $ret.= '

    '. - _("Maximum de plan analytique est atteint"). - "

    "; - } - else - { - $new=new Anc_Plan($cn); - $new->name=$_POST['pa_name']; - $new->description=$_POST['pa_description']; - $new->add(); - } - $sa="anc_menu"; - } - - // Update the PA - if ( $sa == "pa_update" ) - { - $new=new Anc_Plan($cn,$_GET['pa_id']); - $new->name=$_POST['pa_name']; - $new->description=$_POST['pa_description']; - $new->update(); - $ret='
    '; - $ret.='

    '._('Mis à jour').'

    '; - $ret.="
    "; - $sa="anc_menu"; - } - // show the form for add a poste - if ( $sa=='po_add') - { - $po=new Anc_Account($cn); - $po->pa_id=$_REQUEST['pa_id']; - $wSa=HtmlInput::hidden("sa","po_write"); - $ret.='
    '; - $ret.=h2(_("Ajout d'un poste analytique")); - $ret.='
    '; - $ret.=dossier::hidden(); - $ret.=$po->form(); - $ret.=$wSa; - $ret.=HtmlInput::submit("add",_("Ajout")); - $ret.="
    "; - $ret.="
    "; - - } - // record the poste - if ( $sa=="po_write") - { - // var_dump($_POST); - $po=new Anc_Account($cn); - $po->get_from_array($_POST); - $po->add(); - $sa="pa_detail"; - - - } - /* delete pa */ - if ( $sa == "pa_delete") - { - $delete=new Anc_Plan($cn,$_GET['pa_id']); - $delete->delete(); - $sa="anc_menu"; - } - /* po detail - *---> in ajax : montre detail d'un poste analytique - * - */ - if ( $sa=="po_detail") - { - $ret.=h2(_('Modification')); - $po=new Anc_Account($cn,$_GET['po_id']); - $po->get_by_id(); - $ret.='
    '; - $ret.='
    '; - $ret.=dossier::hidden(); - - $ret.=$po->form(); - $ret.=HtmlInput::hidden('sa','po_update'); - $ret.=HtmlInput::submit('Correction','Correction'); - $ret.=sprintf('id, - $_REQUEST['pa_id'] - ); - - $ret.='
    '; - $ret.='
    '; - $sa=""; - } - /** - * mise à jour po - */ - if ( $sa=="po_update") - { - $po=new Anc_Account($cn); - $po->get_from_array($_POST); - $po->update(); - $sa="pa_detail"; - } - /** - * Efface po - */ - if ( $sa=="po_delete") - { - $po=new Anc_Account($cn,$_REQUEST['po_id']); - $po->delete(); - $sa="pa_detail"; - } - // show the detail - if ( $sa == "pa_detail" ) - { - $new=new Anc_Plan($cn,$_GET['pa_id']); - $wSa=HtmlInput::hidden("sa","pa_update"); - - $new->get(); - - $ret.= '
    '; - $ret.= '

    '._("Mise à jour").'

    '; - $ret.= '
    '; - $ret.=dossier::hidden(); - - $ret.= $new->form(); - $ret.= $wSa; - $ret.=HtmlInput::submit("submit",_("Enregistre")); - $ret.=HtmlInput::button_anchor(_('Efface'), - '', - 'remove_analytic_plan', - 'onclick="return confirm_box(\'remove_analytic_plan\',\'Effacer ?\',function () {window.location=\'do.php?ac='.$_REQUEST['ac'].'&pa_id='.$_GET['pa_id'].'&sa=pa_delete&'.$str_dossier.'\';})"', - 'smallbutton'); - $ret.= '
    '; - /** - * Detail now - */ - $count=0; - - $new=new Anc_Plan($cn,$_REQUEST['pa_id']); - $new->get(); - $array=$new->get_poste_analytique(" order by po_name"); - $ret.='
    '; - $ret.=''; - $ret.=""; - $ret.=""; - $ret.=""; - $class=""; - foreach ($array as $obj) - { - $count++; - if ( $count %2 == 0 ) - $class="even"; - else - $class="odd"; - - $ret.=""; - $ret.="" - ; - $ret.=""; - $ret.=""; - $ret.=""; - $ret.=""; - $ret.=""; - - } - $ret.="
    "._("Nom")." "; - $ret.=""._("Montant")." "; - $ret.=""._("Description")." "; - $ret.=""._("Groupe").""._("Plan A")." "; - $ret.="
    ". - ''. - h($obj->name). - ''; - "".$obj->amount."".h($obj->description)."".$obj->ga_id."".h($new->name)."
    "; - // ---> montre form pour ajouter po - $ret.=HtmlInput::button_anchor(_('Ajout'),"?ac=".$_REQUEST['ac']."&sa=po_add&pa_id=".$_GET['pa_id']."&".$str_dossier,'','','smallbutton'); - $href=http_build_query(array('ac'=>$_REQUEST['ac'],'gDossier'=>$_REQUEST['gDossier'])); - $ret.= ''._('Retour').''; - $ret.= '
    '; - - } -} -else { - $sa="anc_menu"; -} - -//--------------------------------------------------------------------------- -// Show lmenu -// -//--------------------------------------------------------------------------- -if ($sa=='anc_menu') -{ - - $obj=new Anc_Plan($cn); - $list=$obj->get_list(); - - - - - if (empty($list)) - { - echo '
    '; - echo ''; - echo ''; - echo '
    '; - echo ''._("Ajout d'un plan comptable").''; - echo '
    '; - - echo '
    '; - if (!isset($_REQUEST['sa'])) - echo '
    '. - _("Aucun plan analytique n'est défini"). - '
    '; - } - else - { - echo '
    '; - - echo ''; - if ($obj->isAppend()==true) - { - echo ''; - } - foreach ($list as $line) - { - echo ''; - echo '"; - echo "\n"; - } - echo '
    '; - echo ''._("Ajout d'un plan comptable").''; - echo '
    '. - ''. - h($line['name']); - - echo $line['description'].""; - echo "
    '; - - - echo '
    '; - } -} -//--------------------------------------------------------------------------- -// show the content part -// -// -//--------------------------------------------------------------------------- - -echo $ret; diff --git a/sources/include/audit_log.php b/sources/include/audit_log.php deleted file mode 100644 index a9a93f0..0000000 --- a/sources/include/audit_log.php +++ /dev/null @@ -1,86 +0,0 @@ - -
    -Liste limitée aux 100 dernières connexions -exec_sql("select ac_user,ac_ip,to_char(ac_date,'DD.MM.YYYY HH24:MI') as fmt_date,ac_state,ac_module from audit_connect order by ac_date desc limit 100 "); -?> - - - - - - - - - - count(); - for ($i=0;$i < $max ;$i++): - $r=$cn->fetch($i); -?> - - - - - - - - - -'; - break; - case 'SUCCESS'; - echo ' - - - - - diff --git a/sources/include/balance.inc.php b/sources/include/balance.inc.php deleted file mode 100644 index 0480987..0000000 --- a/sources/include/balance.inc.php +++ /dev/null @@ -1,397 +0,0 @@ -get_exercice(); - - -echo '
    '; -/* - * Let you change the exercice - */ -echo '
    '._('Exercice').'';; -echo '
    '; -echo _('Choisissez un autre exercice')." : "; -$ex=new Exercice($cn); -$wex=$ex->select('exercice',$exercice,' onchange="submit(this)"'); -echo $wex->input(); -echo dossier::hidden(); -echo HtmlInput::get_to_hidden(array('ac','type')); -echo ''; -echo '
    '; - - -// Show the form for period -echo '
    '; -echo HtmlInput::get_to_hidden(array('ac')); -echo HtmlInput::hidden('type','bal'); -echo HtmlInput::get_to_hidden(array('exercice')); -echo dossier::hidden(); - - - -// filter on the current year -$from=HtmlInput::default_value_get("from_periode", ""); -$input_from=new IPeriod("from_periode",$from,$exercice); -$input_from->show_end_date=false; -$input_from->type=ALL; -$input_from->cn=$cn; -$input_from->filter_year=true; -$input_from->user=$g_user; - -echo _('Depuis').' :'.$input_from->input(); -// filter on the current year -$to=HtmlInput::default_value_get("to_periode", ""); -$input_to=new IPeriod("to_periode",$to,$exercice); -$input_to->show_start_date=false; -$input_to->filter_year=true; -$input_to->type=ALL; -$input_to->cn=$cn; -$input_to->user=$g_user; -echo " "._('jusque').' :'.$input_to->input(); -echo '
    '; -echo HtmlInput::button_action(_('Avancé'), " if (\$('balance_advanced_div').style.display=='none') { \$('balance_advanced_div').show();} else { \$('balance_advanced_div').hide();}"); -//------------------------------------------------- -echo ''; -echo HtmlInput::submit("view",_("Visualisation")); -echo ''; -echo '
    '; -//----------------------------------------------------- -// Form -//----------------------------------------------------- -// Show the export button -if ( isset ($_GET['view'] ) ) -{ - - $hid=new IHidden(); - - - echo "
    - - - - - - - -'; - break; - default: - echo ''; - } -?> - -
    "; - echo ''; - echo '"; - - echo '"; - echo ''; - echo ""; - - echo "
    '. - dossier::hidden(). - HtmlInput::submit('bt_pdf',"Export PDF"). - HtmlInput::hidden("ac",$_REQUEST['ac']). - HtmlInput::hidden("act","PDF:balance"). - - HtmlInput::hidden("from_periode",$_GET['from_periode']). - HtmlInput::hidden("to_periode",$_GET['to_periode']); - echo HtmlInput::hidden('p_filter',$_GET['p_filter']); - for ($e=0;$e
    '. - HtmlInput::submit('bt_csv',"Export CSV"). - dossier::hidden(). - HtmlInput::hidden("act","CSV:balance"). - HtmlInput::hidden("from_periode",$_GET['from_periode']). - HtmlInput::hidden("to_periode",$_GET['to_periode']); - echo HtmlInput::get_to_hidden(array('ac')); - echo HtmlInput::hidden('p_filter',$_GET['p_filter']); - for ($e=0;$e'; - echo HtmlInput::print_window(); - echo '
    "; -} - - -//----------------------------------------------------- -// Display result -//----------------------------------------------------- -if ( isset($_GET['view'] ) ) -{ - $bal=new Acc_Balance($cn); - if ( $_GET['p_filter']==1) - { - for ($e=0;$ejrn[]=$selected[$e]; - } - if ( $_GET['p_filter'] == 0 ) - { - $bal->jrn=null; - } - if ( $_GET['p_filter'] == 2 && isset ($_GET['r_cat'])) - { - $bal->filter_cat($_GET['r_cat']); - } - $bal->from_poste=$_GET['from_poste']; - $bal->to_poste=$_GET['to_poste']; - if ( isset($_GET['unsold'])) $bal->unsold=true; - $previous=(isset($_GET['previous_exc']))?1:0; - - $row=$bal->get_row($_GET['from_periode'], - $_GET['to_periode'], - $previous); - $previous= (isset ($row[0]['sum_cred_previous']))?1:0; - - $periode=new Periode($cn); - $a=$periode->get_date_limit($_GET['from_periode']); - $b=$periode->get_date_limit($_GET['to_periode']); - echo "

    période du ".$a['p_start']." au ".$b['p_end']."

    "; - echo ''; - echo _('Filtre').HtmlInput::infobulle(24); - echo HtmlInput::filter_table("t_balance", "0,1","1"); - echo ''; - echo ''; - echo ''; - echo ''; - if ( $previous == 1 ){ - echo ''; - echo ''; - echo ''; - echo ''; - if ( isset($_GET['lvl1']) || isset($_GET['lvl2']) || isset($_GET['lvl3'])) - echo ''; - - } - echo ''; - echo ''; - echo ''; - echo ''; - if ( isset($_GET['lvl1']) || isset($_GET['lvl2']) || isset($_GET['lvl3'])) - echo ''; - $i=0; - if ( $previous == 1) { - $a_sum=array('sum_cred','sum_deb','solde_deb','solde_cred','sum_cred_previous','sum_deb_previous','solde_deb_previous','solde_cred_previous'); - } - else { - $a_sum=array('sum_cred','sum_deb','solde_deb','solde_cred') ; - } - foreach($a_sum as $a) - { - $lvl1[$a]=0; - $lvl2[$a]=0; - $lvl3[$a]=0; - } - $lvl1_old=''; - $lvl2_old=''; - $lvl3_old=''; - - bcscale(2); - foreach ($row as $r) - { - $i++; - if ( $i%2 == 0 ) - $tr="even"; - else - $tr="odd"; - $view_history= sprintf('%s', - $r['poste'], $gDossier, $r['poste']); - - /* - * level x - */ - foreach (array(3,2,1) as $ind) - { - if ( ! isset($_GET['lvl'.$ind]))continue; - if (${'lvl'.$ind.'_old'} == '') ${'lvl'.$ind.'_old'}=mb_substr($r['poste'],0,$ind); - if ( ${'lvl'.$ind.'_old'} != mb_substr($r['poste'],0,$ind)) - { - - echo ''; - echo td(${'lvl'.$ind.'_old'},'style="font-weight:bold;"'); - echo td(${'lvl'.$ind.'_old'}." "._("Total niveau")." ".$ind,'style="font-weight:bold;"'); - if ($previous==1) { - echo td(nbm(${'lvl'.$ind}['sum_deb_previous']),'class="previous_year" style="font-weight:bold;"'); - echo td(nbm(${'lvl'.$ind}['sum_cred_previous']),' class="previous_year" style="font-weight:bold;" '); - echo td(nbm(${'lvl'.$ind}['solde_deb_previous']),'class="previous_year" style="font-weight:bold;"'); - echo td(nbm(${'lvl'.$ind}['solde_cred_previous']),'class="previous_year" style="font-weight:bold;"'); - $delta_previous=bcsub(${'lvl'.$ind}['solde_cred_previous'],${'lvl'.$ind}['solde_deb_previous']); - $side_previous=($delta_previous > 0 ) ? "C":"D"; - echo td(nbm(abs($delta_previous))." $side_previous",'class="previous_year" style="text-align:right;font-weight:bold;" '); - - } - echo td(nbm(${'lvl'.$ind}['sum_deb']),'style="text-align:right;font-weight:bold;" '); - echo td(nbm(${'lvl'.$ind}['sum_cred']),'style="text-align:right;font-weight:bold;"'); - echo td(nbm(${'lvl'.$ind}['solde_deb']),'style="text-align:right;font-weight:bold;"'); - echo td(nbm(${'lvl'.$ind}['solde_cred']),'style="text-align:right;font-weight:bold;"'); - $delta=bcsub(${'lvl'.$ind}['solde_cred'],${'lvl'.$ind}['solde_deb']); - $side=($delta > 0 ) ? "C":"D"; - echo td(nbm(abs($delta))." $side",'style="text-align:right;font-weight:bold;" '); - - echo ''; - ${'lvl'.$ind.'_old'}=mb_substr($r['poste'],0,$ind); - foreach($a_sum as $a) - { - ${'lvl'.$ind}[$a]=0; - } - } - } - - foreach($a_sum as $a) - { - $lvl1[$a]=bcadd($lvl1[$a],$r[$a]); - $lvl2[$a]=bcadd($lvl2[$a],$r[$a]); - $lvl3[$a]=bcadd($lvl3[$a],$r[$a]); - } - echo ''; - echo td($view_history); - echo td(h($r['label'])); - if ($previous == 1 ) { - echo td(nbm($r['sum_deb_previous']),' class="previous_year"'); - echo td(nbm($r['sum_cred_previous']),' class="previous_year" '); - echo td(nbm($r['solde_deb_previous']),' class="previous_year"'); - echo td(nbm($r['solde_cred_previous']),'class="previous_year" '); - if ( isset($_GET['lvl1']) || isset($_GET['lvl2']) || isset($_GET['lvl3'])) echo ''; - } - echo td(nbm($r['sum_deb']),'style="text-align:right;"'); - echo td(nbm($r['sum_cred']),'style="text-align:right;"'); - echo td(nbm($r['solde_deb']),'style="text-align:right;"'); - echo td(nbm($r['solde_cred']),'style="text-align:right;"'); - if ( isset($_GET['lvl1']) || isset($_GET['lvl2']) || isset($_GET['lvl3'])) echo ''; - echo ''; - - } - echo '
    Poste ComptableLibelléDébit N-1Crédit N-1Solde Débiteur N-1Solde Créditeur N-1Solde N-1DébitCréditSolde Débiteur Solde CréditeurSolde
    '; - -}// end submit -echo "
    "; -?> diff --git a/sources/include/balance_age.inc.php b/sources/include/balance_age.inc.php deleted file mode 100644 index ba5a4da..0000000 --- a/sources/include/balance_age.inc.php +++ /dev/null @@ -1,79 +0,0 @@ - - -if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); - -/** - * @file - * @brief - * @param type $name Descriptionara - */ -$date_start=HtmlInput::default_value_get('p_date_start', '01.01.'.$g_user->get_exercice()); -$w_date_start=new IDate('p_date_start',$date_start); -$w_select=new ISelect('p_type'); -$w_select->value=array( - array('value'=>'C','label'=>_('Client')), - array('value'=>'F','label'=>_('Fournisseur')) -); -$w_select->selected=HtmlInput::default_value_get('p_type','C'); - -$w_lettre=new ISelect('p_let'); -$w_lettre->value=array( - array('value'=>'let','label'=>_('lettrées et non lettrées')), - array('value'=>'unlet','label'=>_('non lettrées')) -); -$w_lettre->selected=HtmlInput::default_value_get('p_let','unlet'); - -?> - - - input(),$w_lettre->input())?> - input()?> - - - - -
    - -
    -display_sale($date,$let); - else: - $balance->display_purchase($date,$let); - endif; - -?> \ No newline at end of file diff --git a/sources/include/balance_card.inc.php b/sources/include/balance_card.inc.php deleted file mode 100644 index 9cf7642..0000000 --- a/sources/include/balance_card.inc.php +++ /dev/null @@ -1,76 +0,0 @@ -'; -$exercice=new Exercice($cn); -$old=''; -$fiche=new Fiche($cn,$_GET['f_id']); -$year=$g_user->get_exercice(); -if ( $year == 0 ) - { - $html=_("erreur aucune période par défaut, allez dans préférence pour en choisir une"); - } -else - { - $per=new Periode($cn); - $limit_periode=$per->get_limit($year); - $array['from_periode']=$limit_periode[0]->first_day(); - $array['to_periode']=$limit_periode[1]->last_day(); - if (isset($_GET['ex'])) - { - $limit_periode=$per->get_limit($_GET['ex']); - $array['from_periode']=$limit_periode[0]->first_day(); - } - - /* - * Add button to select another year - */ - if ($exercice->count() > 1 ) - { - $default=(isset($_GET['ex']))?$_GET['ex']:$year; - $dossier=dossier::id(); - - $old='
    '; - $is=$exercice->select('ex',$default,'onchange = "submit(this)"'); - $old.="Autre exercice ".$is->input(); - $old.=HtmlInput::hidden('f_id',$_GET['f_id']); - $old.=HtmlInput::hidden('ac',$_GET['ac']); - $old.=HtmlInput::hidden('sb',$_GET['sb']); - $old.=HtmlInput::hidden('sc',$_GET['sc']); - $old.=dossier::hidden(); - $old.='
    '; - } - - if ( $fiche->HtmlTable($array,0,0)==-1){ - echo h2(_("Aucune opération pour l'exercice courant"),'class="error"'); - } - echo $old; - - } - -echo '
    '; diff --git a/sources/include/balance_card_ageing.inc.php b/sources/include/balance_card_ageing.inc.php deleted file mode 100644 index 60fe728..0000000 --- a/sources/include/balance_card_ageing.inc.php +++ /dev/null @@ -1,58 +0,0 @@ - - -if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); - -/** - * @file - * @brief - * @param type $name Descriptionara - */ -require_once NOALYSS_INCLUDE.'/class_exercice.php'; -require_once NOALYSS_INCLUDE.'/class_balance_age.php'; -$let=( isset ($_GET['p_let']))?'let':'unlet'; - -$export_csv = '
    '; -$export_csv .=HtmlInput::request_to_hidden(array('gDossier','ac',)); -$export_csv.=HtmlInput::hidden('p_date_start', '01.01.2000'); -$export_csv .= HtmlInput::hidden('act','CSV:balance_age'); -$export_csv .= HtmlInput::hidden('p_let',$let); -$export_csv .= HtmlInput::hidden('p_type','U'); -$export_csv .= HtmlInput::hidden('fiche',$_GET['f_id']); -$export_csv .= HtmlInput::submit('csv',_('Export CSV')); -$export_csv.='
    '; -?> -
    - - - -
    -'; -echo $export_csv; -$fiche=new Fiche($cn,$_GET['f_id']); -$bal=new Balance_Age($cn); -$bal->display_card('01.01.2000', $fiche->id, $let); -echo $export_csv; - -echo '
    '; - -?> diff --git a/sources/include/bank.inc.php b/sources/include/bank.inc.php deleted file mode 100644 index 6d7ff1c..0000000 --- a/sources/include/bank.inc.php +++ /dev/null @@ -1,158 +0,0 @@ -check_action(FICADD) == 0 ) - { - alert(_('Vous ne pouvez pas enlever de fiche')); - return; - } - - $f_id=$_REQUEST['f_id']; - - $fiche=new Bank($cn,$f_id); - $fiche->remove(); - $low_action="list"; - -} - -//----------------------------------------------------- -// list of supplier -//----------------------------------------------------- -if ( $low_action == "list" ) -{ - - ?> -
    -
    -
    - ' ._( "Exercice")." " . $g_user->get_exercice() . ''; - $a=(isset($_GET['query']))?$_GET['query']:""; - printf (_('Recherche').' ', - $a); - $choice_cat=HtmlInput::default_value_request("choice_cat", 1); - - if ( $choice_cat == 1 ) - { - $sel_card=new ISelect('cat'); - $sel_card->value=$cn->make_array('select fd_id, fd_label from fiche_def '. - ' where frd_id=$1'. - ' order by fd_label ',1,array(FICHE_TYPE_FIN)); - $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1; - $sel_card->javascript=' onchange="submit(this);"'; - echo _('Catégorie :').$sel_card->input(); - } - else - { - $cat=HtmlInput::default_value_request('cat', ''); - echo HtmlInput::hidden("cat", $cat); - echo HtmlInput::hidden('choice_cat', 0); - } - $nooperation=new ICheckBox('noop'); - $nooperation->selected=(isset($_GET['noop']))?true:false; - echo _('Inclure les banques sans opération :').$nooperation->input(); - - ?> - - -
    -
    - '; - echo $supplier->Summary($search,'bank',$sql,$noop); - - - echo '
    '; - echo '
    '; - echo '
    '; - if ($g_user->check_action(FICADD)==1) - { - /* Add button */ - $f_add_button=new IButton('add_card'); - $f_add_button->label=_('Créer une nouvelle fiche'); - $f_add_button->set_attribute('win_refresh','yes'); - - $f_add_button->set_attribute('type_cat',FICHE_TYPE_FIN); - $f_add_button->javascript=" select_card_type(this);"; - echo $f_add_button->input(); - - $f_cat_button=new IButton('add_cat'); - $f_cat_button->set_attribute('type_cat',FICHE_TYPE_FIN); - $f_cat_button->set_attribute('ipopup','ipop_cat'); - $f_cat_button->label=_('Ajout d\'une catégorie'); - $f_cat_button->javascript='add_category(this)'; - echo $f_cat_button->input(); - } - - echo '
    '; - echo '
    '; - - -} -/*---------------------------------------------------------------------- - * Detail for a card, Suivi, Contact, Operation,... * - * cc stands for supplier card - *----------------------------------------------------------------------*/ -if ( $low_action == 'detail') -{ - /* Menu */ - require_once('category_card.inc.php'); - return; -} - - - -html_page_stop(); -?> diff --git a/sources/include/calendar.inc.php b/sources/include/calendar.inc.php deleted file mode 100644 index 74db9a8..0000000 --- a/sources/include/calendar.inc.php +++ /dev/null @@ -1,19 +0,0 @@ -default_periode=(isset ($_GET['in']))?$_GET['in']:$g_user->get_periode(); - -?> -
    - -display('long',1); ?> -
    \ No newline at end of file diff --git a/sources/include/card_attr.inc.php b/sources/include/card_attr.inc.php deleted file mode 100644 index 151150f..0000000 --- a/sources/include/card_attr.inc.php +++ /dev/null @@ -1,164 +0,0 @@ -start(); - for ($e=0;$eset_parameter('id',$ad_id[$e]); - $fa->set_parameter('desc',$ad_text[$e]); - $fa->set_parameter('type',$ad_type[$e]); - $fa->set_parameter('size',$ad_size[$e]); - $fa->set_parameter('extra',$ad_extra[$e]); - if ( trim($ad_text[$e])!='' && trim($ad_type[$e])!='') - $fa->save(); - } - $cn->commit(); - } - catch (Exception $e) - { - alert($e->getMessage()); - $cn->rollback(); - } - -} -/* show list of existing */ -$gDossier=dossier::id(); -$array=$fa->seek(); - -$select_type=new ISelect('type[]'); -$select_type->table=0; -$desc=new IText('desc[]'); -$desc->size=50; -$size=new INum('size[]'); -$size->size=5; -$extra=new IText('extra[]'); - -$select_type->value=array( - array('value'=>'text','label'=>_('Texte')), - array('value'=>'numeric','label'=>_('Nombre')), - array('value'=>'date','label'=>_('Date')), - array('value'=>'zone','label'=>_('Zone de texte')), - array('value'=>'poste','label'=>_('Poste Comptable')), - array('value'=>'card','label'=>_('Fiche')), - array('value'=>'select','label'=>_('Selection')) - ); - -echo '
    '; -echo '
    '; - -echo HtmlInput::hidden('sa','fat'); -echo HtmlInput::hidden('p_action','divers'); -echo ''; -echo ''; -echo th(_("id")); -echo th(_("Description")); -echo th(_("Type")); -echo th(_("Taille")); -echo th(_("Paramètre")); -echo ''; -for ($e=0;$eget_parameter('id')).$row->get_parameter('id')); - $select_type->selected=$row->get_parameter('type'); - $desc->value=$row->get_parameter('desc'); - $size->value=$row->get_parameter('size'); - $extra->value=$row->get_parameter('extra'); - $remove=new IButton('rmfa'.$e); - $remove->label=_('Effacer'); - if ( $row->get_parameter('id')>= 9000) - { - $select_type->readOnly=false; - $desc->readOnly=false; - $size->readOnly=false; - $extra->readOnly=false; - - $desc->style=' class="input_text" '; - $r.=td($desc->input()); - $r.=td($select_type->input()); - $r.=td($size->input()); - $r.=td($extra->input()); - - $remove->javascript=sprintf('confirm_box(\'tb_rmfa\',\'Vous confirmez ?\',function() { removeCardAttribut(%d,%d,\'tb_rmfa\',$(\'rmfa%d\') );})', - $row->get_parameter('id'),$gDossier,$e); - $msg=''._("Attention : effacera les données qui y sont liées").' '; - $r.=td($remove->input().$msg); - } - else - { - $select_type->readOnly=true; - $desc->readOnly=true; - $size->readOnly=true; - $extra->readOnly=true; - - $r.=td($desc->input().HtmlInput::hidden('type[]','')); - $r.=td($select_type->input()); - $r.=td($size->input()); - $r.=td($extra->input()); - $r.=td(""); - } - - - - - echo tr($r); - -} -$desc->readOnly=false; -$select_type->readOnly=false; -$size->readOnly=false; -$extra->readOnly=false; -$desc->value=''; -$select_type->selected=-1; -$r=td(HtmlInput::hidden('ad_id[]','0')); -$r.=td($desc->input()); -$r.=td($select_type->input()); -$r.=td($size->input()); -$r.=td($extra->input()); -echo tr($r); - -echo '
    '; -echo HtmlInput::submit('save',_('Sauver')); -echo '
    '; -echo '
    '; diff --git a/sources/include/cat_document.inc.php b/sources/include/cat_document.inc.php deleted file mode 100644 index 43d2cf2..0000000 --- a/sources/include/cat_document.inc.php +++ /dev/null @@ -1,60 +0,0 @@ -insert($_POST['cat'],$_POST['prefix']); -} -if ( isset($_POST['save'])) { - $catDoc=new Document_Type($cn,$_POST['dt_id']); - $catDoc->get(); - $catDoc->dt_value=trim($_POST['dt_name']); - $catDoc->dt_prefix=trim($_POST['dt_prefix']); - if ( $catDoc->dt_value=="") { - alert(_("Le nom ne peut pas être vide")); - } else { - $catDoc->update(); - } - if ($_POST['seq'] != 0 && isNumber($_POST['seq'])==1){ - $catDoc->set_number($_POST['seq']); - } -} -$aList=Document_Type::get_list($cn); -$addCat=new IText('cat'); -$addPrefix=new IText('prefix'); -$str_addCat=$addCat->input(); -$str_addPrefix=$addPrefix->input(); -$str_submit=HtmlInput::submit('add',_('Ajout')); -echo '
    '; -require_once NOALYSS_INCLUDE.'/template/list_category_document.php'; - -echo '
    '; -?> diff --git a/sources/include/category_card.inc.php b/sources/include/category_card.inc.php deleted file mode 100644 index 845d3c6..0000000 --- a/sources/include/category_card.inc.php +++ /dev/null @@ -1,169 +0,0 @@ -'; -echo $f->get_gestion_title(); -$menu = array( - array('href'=>$root."&sc=dc",'label'=>_('Fiche'),'alt'=>_('Détail de la fiche')), - array('href'=>$root.'&sc=sv','label'=>_('Suivi'),'alt'=>_('Suivi Fournisseur, client, banque, devis, bon de commande, courrier')), - array('href'=>$root.'&sc=cn','label'=>_('Contact'),'alt'=>_('Liste de contacts')), - array('href'=>$root.'&sc=op','label'=>_('Opérations'),'alt'=>_('Toutes les opérations')), - array('href'=>$root.'&sc=bal','label'=>_('Balance'),'alt'=>_('Balance du tiers')), - array('href'=>$root.'&sc=balag','label'=>_('Balance âgée'),'alt'=>_('Balance âgée du tiers')), - array('href'=>$root.'&sc=let','label'=>_('Lettrage'),'alt'=>_('Opérations & Lettrages')) - ); -echo ''; -echo ''; -echo '
    '; - -echo '
    '; -//--------------------------------------------------------------------------- -// Show Detail of a card and category -//--------------------------------------------------------------------------- -if ( $ss_action == 'dc' ) -{ - require_once NOALYSS_INCLUDE.'/category_detail.inc.php'; -} -//--------------------------------------------------------------------------- -// Follow up : mail, bons de commande, livraison, rendez-vous... -//--------------------------------------------------------------------------- -if ( $ss_action == 'sv' ) -{ - require_once NOALYSS_INCLUDE.'/category_followup.inc.php'; -} -/*---------------------------------------------------------------------- - * Operation all the operation of this customer - * - * ----------------------------------------------------------------------*/ -if ( $ss_action == 'op') -{ - require_once NOALYSS_INCLUDE.'/category_operation.inc.php'; -} -/*------------------------------------------------------------------------- - * Balance of the card - *-------------------------------------------------------------------------*/ -if ( $ss_action=='bal') - { - require_once NOALYSS_INCLUDE.'/balance_card.inc.php'; - } -/*------------------------------------------------------------------------- - * Ageing Balance of the card - *-------------------------------------------------------------------------*/ -if ( $ss_action=='balag') - { - require_once NOALYSS_INCLUDE.'/balance_card_ageing.inc.php'; - } -/*---------------------------------------------------------------------- - * All the contact - * - *----------------------------------------------------------------------*/ -if ( $ss_action == 'cn') -{ - echo '
    '; - - echo dossier::hidden(); - $f = new Fiche($cn, $_REQUEST['f_id']); - $contact=new Contact($cn); - $contact->company=$f->get_quick_code(); - echo $contact->summary(""); - - $sql=' select fd_id from fiche_def where frd_id='.FICHE_TYPE_CONTACT; - $filter=$cn->make_list($sql); - if ( empty ($filter)) - { - echo ''; - $url="do.php?".http_build_query(array('gDossier'=>Dossier::id(),'ac'=>'CFGCARD')); - echo ''; - echo _("Vous devez aller dans fiche et créer une catégorie pour les contacts"); - echo ''; - echo ''; - return; - } - /* Add button */ - $f_add_button=new IButton('add_card'); - $f_add_button->label=_('Créer une nouvelle fiche'); - - $f_add_button->set_attribute('filter',$filter); - $f_add_button->javascript=" select_card_type(this);"; - - echo $f_add_button->input(); - echo '
    '; -} -/*---------------------------------------------------------------------------- - * Lettering - *----------------------------------------------------------------------------*/ -if ( $def==7 ) -{ - require_once NOALYSS_INCLUDE.'/lettering.gestion.inc.php'; -} -echo '
    '; \ No newline at end of file diff --git a/sources/include/category_detail.inc.php b/sources/include/category_detail.inc.php deleted file mode 100644 index 95e68b9..0000000 --- a/sources/include/category_detail.inc.php +++ /dev/null @@ -1,76 +0,0 @@ -Save(); - -} - -echo '
    '; -$f_id=$_REQUEST['f_id']; -echo '
    '; -if ( isset($_POST['mod'])) echo hb(_('Information sauvée')); - -$supplier=new Fiche($cn,$f_id); -$p_readonly=($g_user->check_action(FICADD)==0)?true:false; -if ( ! $p_readonly) echo '
    '; -echo dossier::hidden(); -echo HtmlInput::hidden('sb','detail'); -echo HtmlInput::hidden('dc','cc'); -echo $supplier->Display($p_readonly); -$w=new IHidden(); -$w->name="p_action"; -$w->value="supplier"; -echo $w->input(); -$w->name="f_id"; -$w->value=$f_id; -echo $w->input(); -echo HtmlInput::hidden('action_fiche',''); -if ( ! $p_readonly) -{ - echo HtmlInput::submit('mod',_('Sauver les modifications'),' onclick="$(\'action_fiche\').value=\'mod\';"'); - echo HtmlInput::reset(_("Annuler")); - echo HtmlInput::submit('delete_card',_('Effacer cette fiche'),'onclick="$(\'action_fiche\').value=\'delete_card\';return confirm_box(\'catergory_detail_frm\',\''.('Confirmer effacement ?').'\');"'); - echo '
    '; -} -echo '
    '; - - diff --git a/sources/include/category_followup.inc.php b/sources/include/category_followup.inc.php deleted file mode 100644 index d4b0a7f..0000000 --- a/sources/include/category_followup.inc.php +++ /dev/null @@ -1,51 +0,0 @@ -get_quick_code(); -$_REQUEST['qcode'] = $fiche->get_quick_code(); - -echo '
    '; -require_once NOALYSS_INCLUDE.'/action.common.inc.php'; -echo '
    '; diff --git a/sources/include/category_operation.inc.php b/sources/include/category_operation.inc.php deleted file mode 100644 index 1fb5b06..0000000 --- a/sources/include/category_operation.inc.php +++ /dev/null @@ -1,41 +0,0 @@ -get_quick_code(); -$_GET['qcode']=$qcode; -$_REQUEST['qcode']=$qcode; -$var_array=compute_variable('ledger_type=ALL'); -put_global($var_array); - -require_once NOALYSS_INCLUDE.'/history_operation.inc.php'; - diff --git a/sources/include/cfgfiche.inc.php b/sources/include/cfgfiche.inc.php deleted file mode 100644 index 17620fa..0000000 --- a/sources/include/cfgfiche.inc.php +++ /dev/null @@ -1,150 +0,0 @@ -InsertAttribut($_REQUEST['ad_id']); - echo $fiche_def->input_detail(); - echo $retour; - return; -} -/*******************************************************************************************/ -// Remove an attribut -/*******************************************************************************************/ -if ( $action == 'remove_line' ) -{ - $fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']); - $fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']); - $fiche_def->RemoveAttribut($_REQUEST['chk_remove']); - echo $fiche_def->input_detail(); - echo $retour; - return; -} -/*******************************************************************************************/ -// Try to remove a category -/*******************************************************************************************/ -if ( $action == 'remove_cat' ) -{ - $post_id=HtmlInput::default_value_post('fd_id', 0); - if ($post_id == 0 || $post_id >= 500000) - { - alert(_('Impossible d\'enlever cette catégorie')); - } else { - $fd_id=new Fiche_Def($cn,$post_id); - $remains=$fd_id->remove(); - if ( $remains != 0 ) { - /* some card are not removed because it is used */ - alert(_('Impossible d\'enlever cette catégorie, certaines fiches sont encore utilisées'."\n". - 'Les fiches non utilisées ont cependant été effacées')); - } - } -} -/*******************************************************************************************/ -// Change some basis info -/*******************************************************************************************/ -if ( isset ($_POST['change_name'])) -{ - if (isset ($_REQUEST['label']) ) - { - $fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']); - $fiche_def->SaveLabel($_REQUEST['label']); - if ( isset($_REQUEST['create'])) - { - $fiche_def->set_autocreate(true); - } - else - { - $fiche_def->set_autocreate(false); - } - $fiche_def->save_class_base($_REQUEST['class_base']); - $fiche_def->save_description($_REQUEST['fd_description']); - - } - echo $fiche_def->input_detail(); - echo $retour; - return; -} -/*******************************************************************************************/ -// Save order of the attributes -/*******************************************************************************************/ -if ( $action == 'save_line' ) -{ - $fiche_def=new Fiche_Def($cn,$_REQUEST['fd_id']); - $fiche_def->save_order($_POST); - echo $fiche_def->input_detail(); - echo $retour; - return; -} -/*******************************************************************************************/ -// Save a new category of card -/*******************************************************************************************/ -if ( isset($_POST['add_modele'])) -{ - $single=new Tool_Uos("dup"); - if ($single->get_count()==0) - { - $single->save(); - $fiche_def=new Fiche_Def($cn); - /** - * Check if we have all needed information - */ - if ( $fiche_def->Add($_POST) == 0 ) - { - echo $fiche_def->input_detail(); - echo $retour; - return; - } - else - { - $fiche_def->input_new(); - echo $retour; - return; - } - } - else - { - alert(_('Doublon')); - } -} -$fiche_def=new Fiche_def($cn); - -$fiche_def->Display(); -$dossier=Dossier::id(); -?> diff --git a/sources/include/cfgledger.inc.php b/sources/include/cfgledger.inc.php deleted file mode 100644 index b0b1bea..0000000 --- a/sources/include/cfgledger.inc.php +++ /dev/null @@ -1,161 +0,0 @@ -id=$_POST['p_jrn']; - if ( $ledger->load() == -1) throw new Exception (_('Journal inexistant')); - $ledger->verify_ledger($_POST); - $ledger->update($_POST); - $show_menu=1; - } catch (Exception $e) - { - alert($e->getMessage()); - } -} - -////////////////////////////////////////////////////////////////////////// -// Perform request action : delete -////////////////////////////////////////////////////////////////////////// -if ($action_frm == 'delete' ) -{ - $ledger->jrn_def_id=$_POST['p_jrn']; - $ledger->id=$_POST['p_jrn']; - $ledger->load(); - $name=$ledger->get_name(); - try { - $ledger->delete_ledger(); - $sa=""; - echo '
    '; - echo '

    '.h($name). " est effacé"."

    "; - echo '
    '; - $show_menu=1; - } - catch (Exception $e) - { - alert ($e->getMessage()); - } - -} - -////////////////////////////////////////////////////////////////////////// -// Perform request action : add -////////////////////////////////////////////////////////////////////////// -if (isset($_POST['add'])) -{ - try - { - $ledger->verify_ledger($_POST); - $ledger->save_new($_POST); - $sa="detail"; - $_REQUEST['p_jrn']=$ledger->jrn_def_id; - $show_menu=1; - } - catch (Exception $e) - { - alert($e->getMessage()); - } -} - - - - - -////////////////////////////////////////////////////////////////////////// -//Display detail of ledger -////////////////////////////////////////////////////////////////////////// - -switch ($sa) -{ - case 'detail': /* detail of a ledger */ - try - { - $ledger->id=$_REQUEST['p_jrn']; - echo '
    '; - echo '
    '; - echo $ledger->display_ledger(); - echo HtmlInput::hidden('action_frm',''); - echo ' - - '; - $href=http_build_query(array('ac'=>$_REQUEST['ac'],'gDossier'=>$_REQUEST['gDossier'])); - echo ''._('Retour').''; - echo '
    '; - echo "
    "; - $show_menu=0; - } - catch (Exception $e) - { - alert($e->getMessage()); - } - break; - case 'add': /* Add a new ledger */ - echo '
    '; - echo '
    '; - $ledger->input_new(); - echo HtmlInput::submit('add',_('Sauver')); - echo ''; - echo '
    '; - echo "
    "; - $show_menu=0; -} - -////////////////////////////////////////////////////////////////////////// -// Display list of ledgers -////////////////////////////////////////////////////////////////////////// -if ( $show_menu == 1 ) { - echo '
    '; - echo $ledger->listing(); - echo '
    '; -} - - -html_page_stop(); - - - -?> diff --git a/sources/include/cfgplugin.inc.php b/sources/include/cfgplugin.inc.php deleted file mode 100644 index b440dd3..0000000 --- a/sources/include/cfgplugin.inc.php +++ /dev/null @@ -1,166 +0,0 @@ - - -if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); -require_once NOALYSS_INCLUDE.'/class_extension.php'; - -/** - * @file - * @brief Automatic installation of plugins and activation - */ -global $cn; - -/****************************************************************************** - * Scan the plugin folder and file in each subfolder a property file and - * store them into an array a_plugin - ****************************************************************************** - */ -$dirscan=scandir(NOALYSS_PLUGIN); -$nb_dirscan=count($dirscan); -$a_plugin=array(); -for ($e=0;$e<$nb_dirscan;$e++) { - if ($dirscan[$e] != '.' && $dirscan[$e]!='..' && is_dir(NOALYSS_PLUGIN.'/'.$dirscan[$e])) { - $dir_plugin=$dirscan[$e]; - if (file_exists(NOALYSS_PLUGIN.'/'.$dir_plugin.'/plugin.xml')) { - - $extension=Extension::read_definition(NOALYSS_PLUGIN.'/'.$dir_plugin.'/plugin.xml'); - for ($i=0;$iget_array('select p_id,p_name from profile where p_id > 0 order by p_name'); -$nb_profile=count($a_profile); -/****************************************************************************** - * save - ******************************************************************************/ -if ( isset ($_POST['save_plugin'])){ - // retrieve array of plugin - $plugin=HtmlInput::default_value_post('plugin', array()); - // for each extension - for ($i=0;$i<$nb_plugin;$i++) { - - $code=$a_plugin[$i]->me_code; - // for each profile - for ($e=0;$e<$nb_profile;$e++) - { - $profile=$a_profile[$e]['p_id']; - if ( isset ($plugin[$code][$profile])) { - // insert or update into db - $count = $cn->get_value("select count(*) from menu_ref where me_code=$1", array($code)); - if ( $count == 0 ) { - $a_plugin[$i]->insert(); - } - try - { - $a_plugin[$i]->insert_profile_menu($profile,'EXT'); - } - catch (Exception $exc) - { - $profile_name=$cn->get_value('select profile.p_name from profile where p_id=$1' - ,array($profile)); - echo '

    '; - echo "code $code"," profile $profile_name ",$exc->getMessage(); - echo '

    '; - } - - } else { - // delete - $a_plugin[$i]->remove_from_profile_menu ($profile); - } - } - } -} -/****************************************************************************** - * Display the Plugin and for each profile were it is installed or not - ******************************************************************************/ - - -?> -
    - -
    - - - - - - - - - get_array("select distinct - p_id,p_name, - (select count(*) from profile_menu as a where a.p_id=b.p_id and me_code=$1 )+ - (select count(*) from menu_ref as c join profile_menu as d on (d.me_code=c.me_code) where d.p_id=b.p_id and me_file=$2 ) as cnt - from profile as b - where p_id > 0 - order by p_name",array($a_plugin[$e]->me_code,$a_plugin[$e]->me_file)); - - $class=($e%2==0)?'odd':'even'; - ?> - - - - - - - - - -
    - me_code); ?> - - me_menu); ?> - - me_description); ?> - - me_file); ?> - - - - - me_code.']['.$a_profile[$w]['p_id'].']'); - if ($a_profile[$w]['cnt']>0) $a->selected=true; - echo $a->input(); - echo $a_profile[$w]['p_name']; - ?> - - -
    - -
    -
    - diff --git a/sources/include/cfgtags.inc.php b/sources/include/cfgtags.inc.php deleted file mode 100644 index 2a4743e..0000000 --- a/sources/include/cfgtags.inc.php +++ /dev/null @@ -1,59 +0,0 @@ -check(); - $tag->save($_POST); - $uos->save(); - } catch (Exception $e) - { - alert("déjà sauvé"); - } - } else { - $tag->remove($_POST); - } -} -?> -
    -

    - -

    - show_list(); - $js=sprintf("onclick=\"show_tag('%s','%s','%s','p')\"",Dossier::id(),$_REQUEST['ac'],'-1'); - echo HtmlInput::button("tag_add", "Ajout d'un tag", $js); - ?> \ No newline at end of file diff --git a/sources/include/class_acc_account.php b/sources/include/class_acc_account.php deleted file mode 100644 index 960dd26..0000000 --- a/sources/include/class_acc_account.php +++ /dev/null @@ -1,233 +0,0 @@ -'pcm_val', - 'type'=>'pcm_type', - 'parent'=>'pcm_val_parent', - 'libelle'=>'pcm_lib'); - private $pcm_val; - private $pcm_type; - private $pcm_parent; - private $pcm_lib; - static public $type=array( - array('label'=>'Actif','value'=>'ACT'), - array('label'=>'Passif','value'=>'PAS'), - array('label'=>'Actif c. inverse','value'=>'ACTINV'), - array('label'=>'Passif c.inverse','value'=>'PASINV'), - array('label'=>'Produit','value'=>'PRO'), - array('label'=>'Produit Inverse','value'=>'PROINV'), - array('label'=>'Charge','value'=>'CHA'), - array('label'=>'Charge Inverse','value'=>'CHAINV'), - array('label'=>'Non defini','value'=>'CON') - ); - - function __construct ($p_cn,$p_id=0) - { - $this->db=$p_cn; - $this->pcm_val=$p_id; - } - public function get_parameter($p_string) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - return $this->$idx; - } - else - throw new Exception (__FILE__.":".__LINE__._('Erreur attribut inexistant')); - } - - function set_parameter($p_string,$p_value) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - if ($this->check($idx,$p_value) == true ) $this->$idx=$p_value; - } - else - throw new Exception (__FILE__.":".__LINE__._('Erreur attribut inexistant')); - - - } - /*!\brief Return the name of a account - * it doesn't change any data member - * \return string with the pcm_lib - */ - function get_lib() - { - $ret=$this->db->exec_sql( - "select pcm_lib from tmp_pcmn where - pcm_val=$1",array($this->pcm_val)); - if ( Database::num_row($ret) != 0) - { - $r=Database::fetch_array($ret); - $this->pcm_lib=$r['pcm_lib']; - } - else - { - $this->pcm_lib=_("Poste inconnu"); - } - return $this->pcm_lib; - } - /*!\brief Check that the value are valid - *\return true if all value are valid otherwise false - */ - function check ($p_member='',$p_value='') - { - // if there is no argument we check all the member - if ($p_member == '' && $p_value== '' ) - { - foreach (self::$variable as $l=>$k) - { - $this->check($k,$this->$k); - } - } - else - { - // otherwise we check only the value - if ( strcmp ($p_member,'pcm_val') == 0 ) - { - return true; - } - else if ( strcmp ($p_member,'pcm_val_parent') == 0 ) - { - return true; - } - else if ( strcmp ($p_member,'pcm_lib') == 0 ) - { - return true; - } - else if ( strcmp ($p_member,'pcm_type') == 0 ) - { - foreach (self::$type as $l=>$k) - { - if ( strcmp ($k['value'],$p_value) == 0 ) return true; - - } - throw new Exception(_('type de compte incorrect ').$p_value); - } - throw new Exception (_('Donnee member inconnue ').$p_member); - } - - } - /*!\brief Get all the value for this object from the database - * the data member are set - * \return false if this account doesn't exist otherwise true - */ - function load() - { - $ret=$this->db->exec_sql("select pcm_lib,pcm_val_parent,pcm_type from - tmp_pcmn where pcm_val=$1",array($this->pcm_val)); - $r=Database::fetch_all($ret); - - if ( ! $r ) return false; - $this->pcm_lib=$r[0]['pcm_lib']; - $this->pcm_val_parent=$r[0]['pcm_val_parent']; - $this->pcm_type=$r[0]['pcm_type']; - return true; - - } - function form($p_table=true) - { - $wType=new ISelect(); - $wType->name='p_type'; - $wType->value=self::$type; - - if ( ! $p_table ) - { - $ret=' - - - - - - - - - - '; - - $ret.=$wType->input().''; - return $ret; - } - else - { - $ret=''; - $ret.=sprintf ('',$this->pcm_val); - $ret.=""; - $ret.=sprintf('',h($this->pcm_lib)); - $ret.= ""; - $ret.=sprintf ('',$this->pcm_val_parent); - $ret.=''; - $wType->selected=$this->pcm_type; - $ret.=""; - $ret.= ''; - $ret.="
    '._('Numéro de classe').'
    '._('Libellé').'
    '._('Classe Parent').'
    Type de poste '.$wType->input().'
    "; - $ret.=dossier::hidden(); - - return $ret; - } - } - function count($p_value) - { - $sql="select count(*) from tmp_pcmn where pcm_val=$1"; - return $this->db->get_value($sql,array($p_value)); - } - /*!\brief for developper only during test */ - static function test_me() - { - $cn=new Database(dossier::id()); - - } - /** - *@brief update an accounting, but you can update pcm_val only if - * this accounting has never been used before */ - function update($p_old) - { - if (strcmp(trim($p_old), trim($this->pcm_val)) !=0 ) - { - $count=$this->db->get_value('select count(*) from jrnx where j_poste=$1', - array($p_old) - ); - if ($count != 0) - throw new Exception(_('Impossible de changer la valeur: poste déjà utilisé')); - } - $this->pcm_lib=mb_substr($this->pcm_lib,0,150); - $this->check(); - $sql="update tmp_pcmn set pcm_val=$1, pcm_lib=$2,pcm_val_parent=$3,pcm_type=$4 where pcm_val=$5"; - $Ret=$this->db->exec_sql($sql,array($this->pcm_val, - $this->pcm_lib, - $this->pcm_val_parent, - $this->pcm_type, - $p_old)); - } -} diff --git a/sources/include/class_acc_account_ledger.php b/sources/include/class_acc_account_ledger.php deleted file mode 100644 index ebf8f2b..0000000 --- a/sources/include/class_acc_account_ledger.php +++ /dev/null @@ -1,657 +0,0 @@ -db=$p_cn; - $this->id=$p_id; - } - /** - *@brief get the row thanks the resource - *@return double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal) - * (tot_deb,tot_credit) - */ - private function get_row_sql($Res) - { - $array=array(); - $tot_cred=0.0; - $tot_deb=0.0; - $Max=Database::num_row($Res); - if ( $Max == 0 ) return null; - for ($i=0;$i<$Max;$i++) - { - $array[]=Database::fetch_array($Res,$i); - if ($array[$i]['j_debit']=='t') - { - $tot_deb+=$array[$i]['deb_montant'] ; - } - else - { - $tot_cred+=$array[$i]['cred_montant'] ; - } - } - $this->row=$array; - $this->tot_deb=$tot_deb; - $this->tot_cred=$tot_cred; - return array($array,$tot_deb,$tot_cred); - - } - /*! - * \brief Get data for accounting entry between 2 periode - * - * \param $p_from periode from - * \param $p_to end periode - * \return double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal) - * (tot_deb,tot_credit - * - */ - function get_row($p_from,$p_to) - { - $periode=sql_filter_per($this->db,$p_from,$p_to,'p_id','jr_tech_per'); - - $Res=$this->db->exec_sql("select distinct j_id,jr_id,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,j_date,". - "case when j_debit='t' then j_montant else 0 end as deb_montant,". - "case when j_debit='f' then j_montant else 0 end as cred_montant,". - " jr_comment as description,jrn_def_name as jrn_name,". - "j_debit, jr_internal,jr_pj_number ". - " from jrnx left join jrn_def on jrn_def_id=j_jrn_def ". - " left join jrn on jr_grpt_id=j_grpt". - " where j_poste=".$this->id." and ".$periode. - " order by j_date"); - return $this->get_row_sql($Res); - } - /*! - * \brief Get data for accounting entry between 2 date - * - * \param $p_from date from - * \param $p_to end date - *\param $let 0 means all rows, 1 only lettered, 2 only unlettered - * \param $solded 0 means all account, 1 means only accounts with a saldo <> 0 - *\note the data are filtered by the access of the current user - * \return double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal) - * (tot_deb,tot_credit - * - */ - function get_row_date($p_from,$p_to,$let=0,$solded=0) - { - global $g_user; - $filter_sql=$g_user->get_ledger_sql('ALL',3); - $sql_let=''; - switch ($let) - { - case 0: - break; - case 1: - $sql_let=' and j_id in (select j_id from letter_cred union select j_id from letter_deb)'; - break; - case '2': - $sql_let=' and j_id not in (select j_id from letter_cred union select j_id from letter_deb) '; - break; - } - if ( $solded == 1) - { - $filter=str_replace('jrn_def_id','jr_def_id',$filter_sql); - $bal_sql="select sum(amount_deb) as s_deb,sum(amount_cred) as s_cred, j_poste - from (select case when j_debit='t' then j_montant else 0 end as amount_deb, - case when j_debit='f' then j_montant else 0 end as amount_cred, - j_poste - from jrnx join jrn on (j_grpt = jr_grpt_id) - where - j_poste=$1 and - $filter and - ( to_date($2,'DD.MM.YYYY') <= j_date and - to_date($3,'DD.MM.YYYY') >= j_date )) as signed_amount - group by j_poste - "; - $r=$this->db->get_array($bal_sql,array($this->id,$p_from,$p_to)); - if ( $this->db->count() == 0 ) return array(); - if ($r[0]['s_deb']==$r[0]['s_cred']) return array(); - } - $Res=$this->db->exec_sql("select jr_id,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,j_date,". - "case when j_debit='t' then j_montant else 0 end as deb_montant,". - "case when j_debit='f' then j_montant else 0 end as cred_montant,". - " case when j_text is null or j_text = '' then jr_comment - else jr_comment||' '||j_text end - as description,jrn_def_name as jrn_name,". - "j_debit, jr_internal,jr_pj_number, - coalesce(comptaproc.get_letter_jnt(j_id),-1) as letter ". - ",pcm_lib ". - ",jr_tech_per,p_exercice,jrn_def_name,jrn_def_code". - " from jrnx left join jrn_def on (jrn_def_id=j_jrn_def )". - " left join jrn on (jr_grpt_id=j_grpt)". - " left join tmp_pcmn on (j_poste=pcm_val)". - " left join parm_periode on (p_id=jr_tech_per) ". - " where j_poste=$1 and ". - " ( to_date($2,'DD.MM.YYYY') <= j_date and ". - " to_date($3,'DD.MM.YYYY') >= j_date )". - " and $filter_sql $sql_let ". - " order by j_date,substring(jr_pj_number,'[0-9]+$') asc",array($this->id,$p_from,$p_to)); - return $this->get_row_sql($Res); - } - - - /*!\brief Return the name of a account - * it doesn't change any data member - * \return string with the pcm_lib - */ - function get_name() - { - $ret=$this->db->exec_sql( - "select pcm_lib from tmp_pcmn where - pcm_val=$1",array($this->id)); - if ( Database::num_row($ret) != 0) - { - $r=Database::fetch_array($ret); - $this->name=$r['pcm_lib']; - } - else - { - $this->name="Poste inconnu"; - } - return $this->name; - } - /*!\brief check if the poste exist in the tmp_pcmn - *\return the number of line (normally 1 or 0) - */ - function do_exist() - { - $sql="select pcm_val from tmp_pcmn where pcm_val= $1"; - $ret=$this->db->exec_sql($sql,array($this->id)); - return Database::num_row($ret) ; - } - /*!\brief Get all the value for this object from the database - * the data member are set - * \return false if this account doesn't exist otherwise true - */ - function load() - { - $ret=$this->db->exec_sql("select pcm_lib,pcm_val_parent from - tmp_pcmn where pcm_val=$1",array($this->id)); - $r=Database::fetch_all($ret); - - if ( ! $r ) return false; - $this->label=$r[0]['pcm_lib']; - $this->parent=$r[0]['pcm_val_parent']; - return true; - - } - /*!\brief Get all the value for this object from the database - * the data member are set - * \return false if this account doesn't exist otherwise true - */ - function get() - { - echo "OBSOLETE Acc_Account_Ledger->get(), a remplacer par Acc_Account_Ledger->load()"; - return $this->load(); - } - - /*! - * \brief give the balance of an account - * - * \return - * balance of the account - * - */ - function get_solde($p_cond=" true ") - { - $Res=$this->db->exec_sql("select sum(deb) as sum_deb, sum(cred) as sum_cred from - ( select j_poste, - case when j_debit='t' then j_montant else 0 end as deb, - case when j_debit='f' then j_montant else 0 end as cred - from jrnx join tmp_pcmn on j_poste=pcm_val - where - j_poste::text like ('$this->id'::text) and - $p_cond - ) as m "); - $Max=Database::num_row($Res); - if ($Max==0) return 0; - $r=Database::fetch_array($Res,0); - - return abs($r['sum_deb']-$r['sum_cred']); - } - /*! - * \brief give the balance of an account - * \return - * balance of the account - * - */ - function get_solde_detail($p_cond="") - { - - if ( $p_cond != "") $p_cond=" and ".$p_cond; - $sql="select sum(deb) as sum_deb, sum(cred) as sum_cred from - ( select j_poste, - case when j_debit='t' then j_montant else 0 end as deb, - case when j_debit='f' then j_montant else 0 end as cred - from jrnx - where - j_poste::text like ('$this->id'::text) - $p_cond - ) as m "; - - $Res=$this->db->exec_sql($sql); - $Max=Database::num_row($Res); - - if ($Max==0) - { - return array('debit'=>0, - 'credit'=>0, - 'solde'=>0) ; - } - $r=Database::fetch_array($Res,0); -// if p_start is < p_end the query returns null to avoid any problem -// we set it to 0 - if ($r['sum_deb']=='') - $r['sum_deb']=0.0; - if ($r['sum_cred']=='') - $r['sum_cred']=0.0; - - return array('debit'=>$r['sum_deb'], - 'credit'=>$r['sum_cred'], - 'solde'=>abs(bcsub($r['sum_deb'],$r['sum_cred']))); - } - /*! - * \brief isTva tell is a poste is used for VAT - * \param none - * - * - * \return 1 is Yes otherwise 0 - */ - function isTVA() - { - // Load TVA array - $a_TVA=$this->db->get_array('select tva_poste - from tva_rate'); - foreach ( $a_TVA as $line_tva) - { - if ( $line_tva['tva_poste'] == '' ) - continue; - list($tva_deb,$tva_cred)=explode(',',$line_tva['tva_poste']); - if ( $this->id == $tva_deb || - $this->id == $tva_cred ) - { - return 1; - } - } - return 0; - - } - /*! - * \brief HtmlTable, display a HTML of a poste for the asked period - * \param $p_array array for filter - * \param $let lettering of operation 0 - * \return -1 if nothing is found otherwise 0 - */ - function HtmlTable($p_array=null,$let=0 , $from_div=0) - { - if ( $p_array==null)$p_array=$_REQUEST; - $this->get_name(); - list($array,$tot_deb,$tot_cred)=$this->get_row_date( $p_array['from_periode'], - $p_array['to_periode'],$let - ); - - if ( count($this->row ) == 0 ) - return -1; - - $rep=""; - - echo '

    '.$this->id." ".$this->name.'

    '; - if ( $from_div == 0) - echo ""; - else - echo "
    "; - echo ''; - echo "". - "". - "". - "". - "". - "". - "". - th('Prog.','style="text-align:right"'). - th('Let.','style="text-align:right"'); - "" - ; - $progress=0;$sum_deb=0;$sum_cred=0; - bcscale(2); - $old_exercice=""; - $idx=0; - foreach ( $this->row as $op ) - { - $vw_operation = sprintf('%s', $op['jr_id'], dossier::id(), $op['jr_internal']); - $let = ''; - $html_let = ""; - if ($op['letter'] != -1) - { - $let = strtoupper(base_convert($op['letter'], 10, 36)); - $html_let = HtmlInput::show_reconcile($from_div, $let); - } - $tmp_diff=bcsub($op['deb_montant'],$op['cred_montant']); - - /* - * reset prog. balance to zero if we change of exercice - */ - if ( $old_exercice != $op['p_exercice']) - { - if ( $old_exercice != '') - { - $progress=bcsub($sum_deb,$sum_cred); - $side=" ".$this->get_amount_side($progress); - echo "". - "". - td(''). - "". - "". - "". - "". - td(nbm(abs($progress)).$side,'style="text-align:right"'). - td(''). - ""; - $sum_cred=0; - $sum_deb=0; - $progress=0; - - } - } - $progress=bcadd($progress,$tmp_diff); - $side=" ".$this->get_amount_side($progress); - $sum_cred=bcadd($sum_cred,$op['cred_montant']); - $sum_deb=bcadd($sum_deb,$op['deb_montant']); - if ($idx%2 == 0) $class='class="odd"'; else $class=' class="even"'; - $idx++; - - echo "" . - "". - td(h($op['jr_pj_number'])). - "". - "". - "". - "". - td(nbm(abs($progress)).$side,'style="text-align:right"'). - - td($html_let, ' style="color:red;text-align:right"') . - ""; - $old_exercice=$op['p_exercice']; - } - echo ''; - $solde_type=($sum_deb>$sum_cred)?"solde débiteur":"solde créditeur"; - $diff=bcsub($sum_deb,$sum_cred); - $side=" ".$this->get_amount_side($diff); - echo "". - "". - "". - "". - "". - "". - "". - - ""; - echo "". - "". - ""; - echo ''; - echo ''; - - echo "
    Date n° de pièce Code interne Description Débit Crédit
    $old_exerciceTotaux".nbm($sum_deb)."".nbm($sum_cred)."
    ".smaller_date(format_date($op['j_date']))."".$vw_operation."".h($op['description'])."".nbm($op['deb_montant'])."".nbm($op['cred_montant'])."
    Totaux".nbm($sum_deb)."".nbm($sum_cred)."".nbm(abs($diff)).$side."
    $solde_type".nbm(abs($diff))."
    "; - - return; - } - /** - * return the letter C if amount is > 0, D if < 0 or = - * @param type $p_amount - * @return string - */ - function get_amount_side($p_amount) - { - if ($p_amount == 0) - return "="; - if ($p_amount < 0) - return "C"; - if ($p_amount > 0) - return "D"; - } - /*! - * \brief Display HTML Table Header (button) - * - * \return none - */ - static function HtmlTableHeader($actiontarget="poste") - { - switch($actiontarget) - { - case 'poste': - $action_csv='CSV:postedetail'; - $action_pdf='PDF:postedetail'; - break; - case 'gl_comptes': - $action_csv='CSV:glcompte'; - $action_pdf='PDF:glcompte'; - break; - default: - throw new Exception(" Fonction HtmlTableHeader argument actiontarget invalid"); - } - $hid=new IHidden(); - - echo ""; - echo ''; - $str_ople=(isset($_REQUEST['ople']))?HtmlInput::hidden('ople',$_REQUEST['ople']):''; - if ($actiontarget=='poste') - { - echo '"; - } - - - echo '"; - - echo '"; - echo ""; - echo ''; - echo ''; - echo "
    '. - dossier::hidden(). - HtmlInput::submit('bt_other',"Autre poste"). - $hid->input("type","poste").$hid->input('ac',$_REQUEST['ac'])."
    '. - dossier::hidden(). - HtmlInput::submit('bt_pdf',"Export PDF"). - HtmlInput::hidden('act',$action_pdf). - $hid->input("type","poste").$str_ople. - $hid->input('p_action','impress'). - $hid->input("from_periode",$_REQUEST['from_periode']). - $hid->input("to_periode",$_REQUEST['to_periode']) - ; - - if ( isset($_REQUEST['letter'] )) echo HtmlInput::hidden('letter','2'); - if ( isset($_REQUEST['solded'] )) echo HtmlInput::hidden('solded','1'); - - if (isset($_REQUEST['from_poste'])) - echo HtmlInput::hidden('from_poste',$_REQUEST['from_poste']); - - if (isset($_REQUEST['to_poste'])) - echo HtmlInput::hidden('to_poste',$_REQUEST['to_poste']); - - if (isset($_REQUEST['poste_id'])) - echo HtmlInput::hidden("poste_id",$_REQUEST['poste_id']); - - if (isset($_REQUEST['poste_fille'])) - echo $hid->input('poste_fille','on'); - if (isset($_REQUEST['oper_detail'])) - echo $hid->input('oper_detail','on'); - - echo "
    '. - dossier::hidden(). - HtmlInput::submit('bt_csv',"Export CSV"). - HtmlInput::hidden('act',$action_csv). - $hid->input("type","poste").$str_ople. - $hid->input('p_action','impress'). - $hid->input("from_periode",$_REQUEST['from_periode']). - $hid->input("to_periode",$_REQUEST['to_periode']); - - if (isset($_REQUEST['from_poste'])) - echo HtmlInput::hidden('from_poste',$_REQUEST['from_poste']); - - if (isset($_REQUEST['to_poste'])) - echo HtmlInput::hidden('to_poste',$_REQUEST['to_poste']); - - if (isset($_REQUEST['poste_id'])) - echo HtmlInput::hidden("poste_id",$_REQUEST['poste_id']); - - if ( isset($_REQUEST['letter'] )) echo HtmlInput::hidden('letter','2'); - if ( isset($_REQUEST['solded'] )) echo HtmlInput::hidden('solded','1'); - - if (isset($_REQUEST['poste_fille'])) - echo $hid->input('poste_fille','on'); - if (isset($_REQUEST['oper_detail'])) - echo $hid->input('oper_detail','on'); - if (isset($_REQUEST['poste_id'])) echo $hid->input("poste_id",$_REQUEST['poste_id']); - - echo "
    '; - echo HtmlInput::print_window(); - echo '
    "; - - - } - /*! - * \brief verify that the poste belong to a ledger - * - * \return 0 ok, -1 no - */ - function belong_ledger($p_jrn) - { - $filter=$this->db->get_value("select jrn_def_class_cred from jrn_def where jrn_def_id=$p_jrn"); - if ( trim ($filter) == '') - return 0; - - $valid_cred=explode(" ",$filter); - $sql="select count(*) as poste from tmp_pcmn where "; - // Creation query - $or=""; - $SqlFilter=""; - foreach ( $valid_cred as $item_cred) - { - if ( strlen (trim($item_cred))) - { - if ( strstr($item_cred,"*") == true ) - { - $item_cred=strtr($item_cred,"*","%"); - $SqlItem="$or pcm_val::text like '".sql_string($item_cred)."'"; - $or=" or "; - } - else - { - $SqlItem="$or pcm_val::text = '".sql_string($item_cred)."' "; - $or=" or "; - } - $SqlFilter=$SqlFilter.$SqlItem; - } - }//foreach - $sql.=$SqlFilter." and pcm_val::text='".sql_string($this->id)."'"; - $max=$this->db->get_value($sql); - if ($max > 0 ) - return 0; - else - return -1; - } - /*!\brief With the id of the ledger, get the col jrn_def_class_deb - *\param $p_jrn jrn_id - *\return array of value, or an empty array if nothing is found - *\note - *\see - */ - function get_account_ledger($p_jrn) - { - $l=new Acc_Ledger($this->db,$p_jrn); - $row=$l->get_propertie(); - if ( strlen(trim($row['jrn_def_class_deb'])) == 0 ) return array(); - $valid_account=explode(" ",$row['jrn_def_class_deb']); - return $valid_account; - } - /*!\brief build a sql statement thanks a array found with get_account_ledger - * - *\param $p_jrn jrn_id - *\return an emty string if nothing is found or a valid SQL statement like - \code - pcm_val like ... or pcm_val like ... - \endcode - *\note - *\see get_account_ledger - */ - function build_sql_account($p_jrn) - { - $array=$this->get_account_ledger($p_jrn); - if ( empty($array) ) return ""; - $sql=""; - foreach ( $array as $item_cred) - { - if ( strlen (trim($item_cred))>0 ) - { - if ( strstr($item_cred,"*") == true ) - { - $item_cred=strtr($item_cred,"*","%"); - $sql_tmp=" pcm_val::text like '$item_cred' or"; - } - else - { - $sql_tmp=" pcm_val::text = '$item_cred' or"; - } - $sql.=$sql_tmp; - } - }//foreach - /* remove the last or */ - $sql=substr($sql,0,strlen($sql)-2); - return $sql; - } - /** - * Find the id of the cards which are using the current account - * - * @return an array of f_id - */ - function find_card() - { - $sql="select f_id from fiche_detail where ad_id=$1 and ad_value=$2"; - $account=$this->db->get_array($sql,array(ATTR_DEF_ACCOUNT,$this->id)); - return $account; - } - static function test_me() - { - $cn=new Database(dossier::id()); - $a=new Acc_Account_Ledger($cn,550); - echo ' Journal 4 '.$a->belong_ledger(4); - return $a->belong_ledger(4);; - - } -} diff --git a/sources/include/class_acc_balance.php b/sources/include/class_acc_balance.php deleted file mode 100644 index 654bdd2..0000000 --- a/sources/include/class_acc_balance.php +++ /dev/null @@ -1,284 +0,0 @@ -get_ledger */ - var $from_poste; /*!< from_poste filter on the post */ - var $to_poste; /*!< to_poste filter on the post*/ - var $unsold; /**= 0) */ - function Acc_Balance($p_cn) - { - $this->db=$p_cn; - $this->jrn=null; - $from_poste=""; - $to_poste=""; - $unsold=false; - } - - - /*! - * \brief retrieve all the row from the ledger in the range of a periode - * \param $p_from_periode start periode (p_id) - * \param $p_to_periode end periode (p_id) - * \param $p_previous_exc previous exercice 1= yes default =0 - * - * \return a double array - * array of - * - $a['poste'] - * - $a['label'] - * - $a['sum_deb'] - * - $a['sum_cred'] - * - $a['solde_deb'] - * - $a['solde_cred'] - */ - function get_row($p_from_periode,$p_to_periode,$p_previous_exc=0) - { - global $g_user; - // filter on requested periode - $per_sql=sql_filter_per($this->db,$p_from_periode,$p_to_periode,'p_id','j_tech_per'); - - - $and=""; - $jrn=""; - $from_poste=""; - $to_poste=""; - /* if several ledgers are asked then we filter here */ - if ($this->jrn!== null) - { - /** - *@file - *@bug the get_ledger here is not valid and useless we just need a list of the - * asked ledgers - */ - - $jrn=" j_jrn_def in ("; - $comma=''; - for ($e=0;$ejrn);$e++) - { - $jrn.=$comma.$this->jrn[$e]; - $comma=','; - } - $jrn.=')'; - $and=" and "; - } - - if ( strlen(trim($this->from_poste)) != 0 && $this->from_poste!=-1 ) - { - $from_poste=" $and j_poste::text >= '".$this->from_poste."'"; - $and=" and "; - } - if ( strlen(trim($this->to_poste)) != 0 && $this->to_poste!=-1 ) - { - $to_poste=" $and j_poste::text <= '".$this->to_poste."'"; - $and=" and "; - } - $filter_sql=$g_user->get_ledger_sql('ALL',3); - - switch ($p_previous_exc) - { - case 0: - // build query - $sql="select j_poste as poste,sum(deb) as sum_deb, sum(cred) as sum_cred from - ( select j_poste, - case when j_debit='t' then j_montant else 0 end as deb, - case when j_debit='f' then j_montant else 0 end as cred - from jrnx join tmp_pcmn on (j_poste=pcm_val) - left join parm_periode on (j_tech_per = p_id) - join jrn_def on (j_jrn_def=jrn_def_id) - where - $jrn $from_poste $to_poste - $and $filter_sql - and - $per_sql ) as m group by 1 order by 1"; - break; - case 1: - /* - * retrieve balance previous exercice - */ - $periode=new Periode($this->db); - $previous_exc=$periode->get_exercice($p_from_periode)-1; - try { - list($previous_start,$previous_end)=$periode->get_limit($previous_exc); - - $per_sql_previous=sql_filter_per($this->db,$previous_start->p_id,$previous_end->p_id,'p_id','j_tech_per'); - $sql=" - with m as - ( select j_poste,sum(deb) as sdeb,sum(cred) as scred - from - (select j_poste, - case when j_debit='t' then j_montant else 0 end as deb, - case when j_debit='f' then j_montant else 0 end as cred - from jrnx - join tmp_pcmn on (j_poste=pcm_val) - left join parm_periode on (j_tech_per = p_id) - join jrn_def on (j_jrn_def=jrn_def_id) - where - $jrn $from_poste $to_poste - $and $filter_sql and $per_sql - ) as sub_m group by j_poste order by j_poste ) , - p as ( select j_poste,sum(deb) as sdeb,sum(cred) as scred - from - (select j_poste, - case when j_debit='t' then j_montant else 0 end as deb, - case when j_debit='f' then j_montant else 0 end as cred - from jrnx join tmp_pcmn on (j_poste=pcm_val) - left join parm_periode on (j_tech_per = p_id) - join jrn_def on (j_jrn_def=jrn_def_id) - where - $jrn $from_poste $to_poste - $and $filter_sql and $per_sql_previous) as sub_p group by j_poste order by j_poste) - select coalesce(m.j_poste,p.j_poste) as poste - ,coalesce(m.sdeb,0) as sum_deb - , coalesce(m.scred,0) as sum_cred - ,coalesce(p.sdeb,0) as sum_deb_previous - , coalesce(p.scred,0) as sum_cred_previous from m full join p on (p.j_poste=m.j_poste) - order by poste"; - - } catch (Exception $exc) { - $p_previous_exc=0; - /* - * no previous exercice - */ - $sql="select upper(j_poste::text) as poste,sum(deb) as sum_deb, sum(cred) as sum_cred from - ( select j_poste, - case when j_debit='t' then j_montant else 0 end as deb, - case when j_debit='f' then j_montant else 0 end as cred - from jrnx join tmp_pcmn on (j_poste=pcm_val) - left join parm_periode on (j_tech_per = p_id) - join jrn_def on (j_jrn_def=jrn_def_id) - where - $jrn $from_poste $to_poste - $and $filter_sql - and - $per_sql ) as m group by poste order by poste"; - } - break; - - } - $cn=clone $this->db; - $Res=$this->db->exec_sql($sql); - $tot_cred= 0.0; - $tot_deb= 0.0; - $tot_deb_saldo=0.0; - $tot_cred_saldo=0.0; - $tot_cred_previous= 0.0; - $tot_deb_previous= 0.0; - $tot_deb_saldo_previous=0.0; - $tot_cred_saldo_previous=0.0; - $M=$this->db->size(); - - // Load the array - for ($i=0; $i <$M;$i++) - { - $r=$this->db->fetch($i); - $poste=new Acc_Account($cn,$r['poste']); - - $a['poste']=$r['poste']; - $a['label']=mb_substr($poste->get_lib(),0,40); - $a['sum_deb']=round($r['sum_deb'],2); - $a['sum_cred']=round($r['sum_cred'],2); - $a['solde_deb']=round(( $a['sum_deb'] >= $a['sum_cred'] )? $a['sum_deb']- $a['sum_cred']:0,2); - $a['solde_cred']=round(( $a['sum_deb'] <= $a['sum_cred'] )?$a['sum_cred']-$a['sum_deb']:0,2); - if ($p_previous_exc==1) - { - $a['sum_deb_previous']=round($r['sum_deb_previous'],2); - $a['sum_cred_previous']=round($r['sum_cred_previous'],2); - $a['solde_deb_previous']=round(( $a['sum_deb_previous'] >= $a['sum_cred_previous'] )? $a['sum_deb_previous']- $a['sum_cred_previous']:0,2); - $a['solde_cred_previous']=round(( $a['sum_deb_previous'] <= $a['sum_cred_previous'] )?$a['sum_cred_previous']-$a['sum_deb_previous']:0,2); - $tot_cred_previous+= $a['sum_cred_previous']; - $tot_deb_previous+= $a['sum_deb_previous']; - $tot_deb_saldo_previous+= $a['solde_deb_previous']; - $tot_cred_saldo_previous+= $a['solde_cred_previous']; - } - if ($p_previous_exc==0 && $this->unsold==true && $a['solde_cred']==0 && $a['solde_deb']==0) continue; - if ($p_previous_exc==1 && $this->unsold==true && $a['solde_cred']==0 && $a['solde_deb']==0 && $a['solde_cred_previous']==0 && $a['solde_deb_previous']==0) continue; - $array[$i]=$a; - $tot_cred+= $a['sum_cred']; - $tot_deb+= $a['sum_deb']; - $tot_deb_saldo+= $a['solde_deb']; - $tot_cred_saldo+= $a['solde_cred']; - - - }//for i - // Add the saldo - $i+=1; - $a['poste']=""; - $a['label']="Totaux "; - $a['sum_deb']=$tot_deb; - $a['sum_cred']=$tot_cred; - $a['solde_deb']=$tot_deb_saldo; - $a['solde_cred']=$tot_cred_saldo; - if ($p_previous_exc==1) { - $a['sum_deb_previous']=$tot_deb_previous; - $a['sum_cred_previous']=$tot_cred_previous; - $a['solde_deb_previous']=$tot_deb_saldo_previous; - $a['solde_cred_previous']=$tot_cred_saldo_previous; - } - $array[$i]=$a; - $this->row=$array; - return $array; - - } - /** - * set the $this->jrn to the cat - * @todo Cette function semble ne pas fonctionner correctement - */ - function filter_cat($p_array) - { - if ( empty($p_array) ) - { - $this->jrn=null; - return; - } - /* get the list of jrn of the cat. */ - - $array=Acc_Ledger::array_cat(); - $jrn=array(); - for ($e=0;$edb->get_array('select jrn_def_id from jrn_def where jrn_def_type=$1',array($array[$e]['cat'])); - for ( $f=0;$f < count($t_a);$f++) $this->jrn[]=$t_a[$f]['jrn_def_id']; - } - } - - } - static function test_me () - { - require 'class_user.php'; - global $g_user; - $cn=new Database(dossier::id()); - $g_user=new User($cn); - $a=new Acc_Balance($cn); - $a->get_row(163, 175, 1); - var_dump($a); - } -} diff --git a/sources/include/class_acc_bilan.php b/sources/include/class_acc_bilan.php deleted file mode 100644 index 18bff4c..0000000 --- a/sources/include/class_acc_bilan.php +++ /dev/null @@ -1,729 +0,0 @@ -db=$p_cn; - } - /*! - * \brief return a string with the form for selecting the periode and - * the type of bilan - * \param $p_filter_year filter on a year - * - * \return a string - */ - function display_form($p_filter_year="") - { - $r=""; - $r.=dossier::hidden(); - $r.= ''; - - $r.=''; -// filter on the current year - $w=new ISelect(); - $w->table=1; - - $periode_start=$this->db->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $p_filter_year order by p_start,p_end"); - - $periode_end=$this->db->make_array("select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $p_filter_year order by p_end,p_start"); - - $w->label=_("Depuis"); - $w->value=$this->from; - $w->selected=$this->from; - $r.= td($w->input('from_periode',$periode_start)); - $w->label=_(" jusque "); - $w->value=$this->to; - $w->selected=$this->to; - $r.= td($w->input('to_periode',$periode_end)); - $r.= ""; - $r.=""; - $mod=new ISelect(); - $mod->table=1; - $mod->value=$this->db->make_array("select b_id, b_name from bilan order by b_name"); - $mod->label=_("Choix du bilan"); - $r.=td($mod->input('b_id')); - $r.=""; - $r.= '
    '; - return $r; - } - /** - * @brief check and warn if an accound has the wrong saldo - * @param $p_message legend of the fieldset - * @param $p_type type of the Acccount ACT actif, ACTINV... - * @param $p_type the saldo must debit or credit - */ - private function warning($p_message,$p_type,$p_deb) - { - $sql="select pcm_val,pcm_lib from tmp_pcmn where pcm_type='$p_type'"; - $res=$this->db->exec_sql($sql); - if ( Database::num_row($res) ==0 ) - return; - $count=0; - $nRow=Database::num_row($res); - - $ret=""; - $obj=new Acc_Account_Ledger($this->db,0); - for ($i=0;$i<$nRow;$i++) - { - - $line=Database::fetch_array($res,$i); - /* set the periode filter */ - $sql=sql_filter_per($this->db,$this->from,$this->to,'p_id','j_tech_per'); - $obj->id=$line['pcm_val']; - - $solde=$obj->get_solde_detail($sql); - $solde_signed=bcsub($solde['debit'],$solde['credit']); - - if ( - ($solde_signed < 0 && $p_deb == 'D' ) || - ($solde_signed > 0 && $p_deb == 'C' ) - ) - { - $ret.= '
  • '.HtmlInput::history_account($line['pcm_val'],'Anomalie pour le compte '.$line['pcm_val'].' '.h($line['pcm_lib']). - " D: ".$solde['debit']. - " C: ".$solde['credit']." diff ".$solde['solde']); - $count++; - } - - } - - echo '
    '; - echo ''.$p_message.''; - if ( $count <> 0 ) - { - echo '
      '.$ret.'
    '; - echo ''._("Nbres anomalies").' : '.$count.''; - } - else - echo _("Pas d'anomalie détectée"); - echo '
    '; - - - } - /*!\brief verify that the saldo is good for the type of account */ - function verify() - { - bcscale(2); - echo '

    '._("Comptes normaux").'

    '; - $this->warning(_('Actif avec un solde crediteur'),'ACT','D'); - $this->warning(_('Passif avec un solde debiteur'),'PAS','C'); - $this->warning(_('Compte de resultat : Charge avec un solde crediteur'),'CHA','D'); - $this->warning(_('Compte de resultat : produit avec un solde debiteur'),'PRO','C'); - echo '
    '; - echo '

    '._("Comptes inverses").'

    '; - $this->warning(_('Compte inverse : actif avec un solde debiteur'),'ACTINV','C'); - $this->warning(_('Compte inverse : passif avec un solde crediteur'),'PASINV','D'); - $this->warning(_('Compte inverse : Charge avec un solde debiteur'),'CHAINV','C'); - $this->warning(_('Compte inverse : produit avec un solde crediteur'),'PROINV','D'); - echo ''; - /* set the periode filter */ - $sql_periode=sql_filter_per($this->db,$this->from,$this->to,'p_id','j_tech_per'); - /* debit Actif */ - $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". - " where j_debit='t' and (pcm_type='ACT' or pcm_type='ACTINV')"; - $sql.="and $sql_periode"; - $debit_actif=$this->db->get_value($sql); - - /* Credit Actif */ - $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". - " where j_debit='f' and (pcm_type='ACT' or pcm_type='ACTINV')"; - - $sql.="and $sql_periode"; - - $credit_actif=$this->db->get_value($sql); - $total_actif=abs(bcsub($debit_actif,$credit_actif)); - echo ''; - echo tr(td(_('Total actif')).td($total_actif,'style="text-align:right"')); - - /* debit passif */ - $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". - " where j_debit='t' and (pcm_type='PAS' or pcm_type='PASINV') "; - $sql.="and $sql_periode"; - - $debit_passif=$this->db->get_value($sql); - - /* Credit Actif */ - $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". - " where j_debit='f' and (pcm_type='PAS' or pcm_type='PASINV') "; - $sql.="and $sql_periode"; - $credit_passif=$this->db->get_value($sql); - $total_passif=abs(bcsub($debit_passif,$credit_passif)); - - /* diff actif / passif */ - echo tr(td(_('Total passif')).td($total_passif,'style="text-align:right"')); - if ( $total_actif != $total_passif ) - { - $diff=bcsub($total_actif,$total_passif); - echo tr(td(' Difference Actif - Passif ').td($diff,'style="text-align:right"'),'style="font-weight:bolder"'); - } - - /* debit charge */ - $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". - " where j_debit='t' and (pcm_type='CHA' or pcm_type='CHAINV')"; - $sql.="and $sql_periode"; - $debit_charge=$this->db->get_value($sql); - - /* Credit charge */ - $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". - " where j_debit='f' and (pcm_type='CHA' or pcm_type='CHAINV')"; - $sql.="and $sql_periode"; - $credit_charge=$this->db->get_value($sql); - $total_charge=abs(bcsub($debit_charge,$credit_charge)); - echo tr(td(_('Total charge ')).td($total_charge,'style="text-align:right"')); - - - /* debit prod */ - $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". - " where j_debit='t' and (pcm_type='PRO' or pcm_type='PROINV')"; - $sql.="and $sql_periode"; - $debit_pro=$this->db->get_value($sql); - - /* Credit prod */ - $sql="select sum(j_montant) from jrnx join tmp_pcmn on (j_poste=pcm_val)". - " where j_debit='f' and (pcm_type='PRO' or pcm_type='PROINV')"; - $sql.="and $sql_periode"; - $credit_pro=$this->db->get_value($sql); - $total_pro=abs(bcsub($debit_pro,$credit_pro)); - echo tr(td(_('Total produit')).td($total_pro,'style="text-align:right"')); - - $diff=bcsub($total_pro,$total_charge); - - echo tr( td(_("Difference Produit - Charge"),'style="padding-right:20px"').td($diff,'style="text-align:right"'),'style="font-weight:bolder"'); - echo '
    '; - } - /*! - * \brief get data from the $_GET - * - */ - function get_request_get() - { - $this->b_id=(isset($_GET['b_id']))?$_GET['b_id']:""; - $this->from=( isset ($_GET['from_periode']))?$_GET['from_periode']:-1; - $this->to=( isset ($_GET['to_periode']))?$_GET['to_periode']:-1; - } - /*!\brief load from the database the document data */ - function load() - { - try - { - if ( $this->b_id=="") - throw new Exception(_("le formulaire id n'est pas donnee")); - - $sql="select b_name,b_file_template,b_file_form,lower(b_type) as b_type from bilan where". - " b_id = ".$this->b_id; - $res=$this->db->exec_sql($sql); - - if ( Database::num_row($res)==0) - throw new Exception (_('Aucun enregistrement trouve')); - $array=Database::fetch_array($res,0); - foreach ($array as $name=>$value) - $this->$name=$value; - - } - catch(Exception $Ex) - { - echo $Ex->getMessage(); - throw $Ex; - } - } - /*!\brief open the file of the form */ - /*\return an handle to this file */ - function file_open_form() - { - $form=fopen($this->b_file_form,'r'); - if ( $form == false) - { - echo 'Cannot Open'; - throw new Exception(_('Echec ouverture fichier '.$this->b_file_form)); - } - return $form; - } - /*!\brief open the file with the template */ - /*\return an handle to this file */ - function file_open_template() - { - $templ=fopen($this->b_file_template,'r'); - if ( $templ == false) - { - echo 'Cannot Open'; - throw new Exception(_('Echec ouverture fichier '.$this->b_file_template)); - } - return $templ; - - } - /*! - * \brief Compute all the formula - * \param $p_handle the handle to the file - * \param - * \param - * - * - * \return - */ - function compute_formula($p_handle) - { - while (! feof ($p_handle)) - { - $buffer=trim(fgets($p_handle)); - // $a=(Impress::check_formula($buffer) == true)?"$buffer ok
    ":''.'Pas ok '.$buffer."
    "; - // echo $a; - // blank line are skipped - if (strlen(trim($buffer))==0) - continue; - // skip comment - if ( strpos($buffer,'#') === true ) - continue; - // buffer contains a formula A$=.... - // We need to eval it - $a=Impress::parse_formula($this->db,"$buffer",$buffer,$this->from,$this->to,false); - $b=str_replace("$","\$this->",$a); - if ( eval("$b;") === false ) - echo_debug(__FILE__,__LINE__,"Code failed with $b"); - - - }// end read form line per line - } - /*!\brief generate the ods document - * \param the handle to the template file - * \return the xml - *@note - * Sur une seule ligne il y a plusieurs données, donc il y a plusieurs boucles, pour les autres documents - * cela devrait être fait aussi, actuellement ces documents, n'acceptent qu'une formule par ligne. - *@note - * Pas de header dans les entêtes car n'est pas compris dans le document qu'on utilise - */ - function generate_odt() - { - // create a temp directory in /tmp to unpack file and to parse it - $dirname=tempnam($_ENV['TMP'],'bilan_'); - - - unlink($dirname); - mkdir ($dirname); - chdir($dirname); - - $file_base=dirname($_SERVER['SCRIPT_FILENAME']).DIRECTORY_SEPARATOR.$this->b_file_template; - $work_file=basename($file_base); - if ( copy ($file_base,$work_file) == false ) - { - echo _("erreur Ouverture fichier"); - throw new Exception(_('Echec ouverture fichier '.$file_base)); - } - ob_start(); - /* unzip the document */ - $zip = new Zip_Extended; - if ($zip->open($work_file) === TRUE) - { - $zip->extractTo($dirname.DIRECTORY_SEPARATOR); - $zip->close(); - } else - { - echo __FILE__.":".__LINE__."cannot unzip model ".$filename; - } - - ob_end_clean(); - unlink($work_file); - // remove the zip file - $p_file=fopen('content.xml','r'); - - if ( $p_file == false) - { - throw new Exception(_('Echec ouverture fichier '.$p_file)); - } - - $r=""; - $regex="/<<\\$[A-Z]*[0-9]*>>/"; - $lt="<"; - $gt=">"; - $header_txt=header_txt($this->db); - - while ( !feof($p_file) ) - { - $line_rtf=fgets($p_file); - - /* - * replace the header tag, doesn't work if inside header - */ - $line_rtf=preg_replace('/<<header>>/',$header_txt,$line_rtf); - - - // the line contains the magic << - $tmp=""; - - - while (preg_match_all($regex,$line_rtf,$f2) > 0 ) - { - // the f2 array contains all the magic << in the line - foreach ($f2 as $f2_array) - { - foreach ($f2_array as $f2_str) - { - $to_remove=$f2_str; - $f2_value=str_replace("<","",$f2_str); - $f2_value=str_replace(">","",$f2_value); - $f2_value=str_replace("$","",$f2_value); - - - - // check for missing variables and labels (N vars) - if( ! isset($this->$f2_value)) - { - - $a = "!!".$f2_value."!!"; - if( substr($f2_value, 0, 1) == "N" ) - { - $ret = $this->db->get_array("SELECT pcm_lib AS acct_name FROM tmp_pcmn WHERE pcm_val::text LIKE ". - " substr($1, 2)||'%' ORDER BY pcm_val ASC LIMIT 1",array($f2_value)); - if($ret[0]['acct_name']) - { - $a = $ret[0]['acct_name']; - $a=str_replace('<','<',$a); - $a=str_replace('>','>',$a); - } - } - } - else - { - $a=$this->$f2_value; - } - if ( $a=='-0' ) $a=0; - - /* allow numeric cel in ODT for the formatting and formula */ - if ( is_numeric($a) ) - { - $searched='office:value-type="string">'.$f2_str; - $replaced='office:value-type="float" office:value="'.$a.'">'.$f2_str; - $line_rtf=str_replace($searched, $replaced, $line_rtf); - } - - - $line_rtf=str_replace($f2_str,$a,$line_rtf); - - }// foreach end - } // foreach - } // preg_match_all - $r.=$line_rtf; - - }// odt file is read - - return $r; - - } - - /*! - * \brief generate the plain file (rtf,txt, or html) - * \param the handle to the template file - */ - function generate_plain($p_file) - { - $r=""; - if ( $this->b_type=='html') - { - $lt='<'; - $gt='>'; - $pattern='/<<header>>/'; - } - else - { - $lt='<'; - $gt='>'; - $pattern='/<
    >/'; - } - - $header_txt=header_txt($this->db); - - while ( !feof($p_file) ) - { - $line_rtf=fgets($p_file); - - $line_rtf=preg_replace($pattern,$header_txt,$line_rtf); - - - // the line contains the magic << - if (preg_match_all("/".$lt.$lt."\\$[a-zA-Z]*[0-9]*".$gt.$gt."/",$line_rtf,$f2) > 0) - { - // DEBUG - // echo $r.'
    '; - // the f2 array contains all the magic << in the line - foreach ($f2 as $f2_str) - { - // DEBUG - // echo "single_f2 = $f2_str
    "; - // replace single_f2 by its value - $f2_value=str_replace($lt,"",$f2_str); - $f2_value=str_replace($gt,"",$f2_value); - $f2_value=str_replace("$","",$f2_value); - $f2_value=$f2_value[0]; - - // check for missing variables and labels (N vars) - if( ! isset($this->$f2_value)) - { - $a = "!!".$f2_value."!!"; - if( substr($f2_value, 0, 1) == "N" ) - { - $ret = $this->db->get_array("SELECT pcm_lib AS acct_name FROM tmp_pcmn WHERE ". - " pcm_val::text LIKE substr($1, 2)||'%' ORDER BY pcm_val ASC LIMIT 1", - array($f2_value)); - if($ret[0]['acct_name']) - { - /* for rtf we have the string to put it in latin1 */ - $a = utf8_decode($ret[0]['acct_name']); - } - } - } - else - { - // DEBUG - //echo "f2_value=$f2_value"; - // $a=${"$f2_value"}; - $a=$this->$f2_value; - } - // DEBUG echo " a = $a"; - if ( $a=='-0' ) $a=0; - $line_rtf=str_replace($f2_str,$a,$line_rtf); - - }// foreach end - } - $r.=$line_rtf; - - }// rtf file is read - // DEBUG - // fwrite($out,$r); - - return $r; - - - - - } - /*!\brief generate the document and send it to the browser - */ - function generate() - { - // Load the data - $this->load(); - // Open the files - $form=$this->file_open_form(); - - // Compute all the formula and add the value to this - $this->compute_formula($form); - fclose($form); - // open the form - $templ=$this->file_open_template(); - switch ($this->b_type) - { - case 'rtf': - $result=$this->generate_plain($templ); - $this->send($result); - break; - case 'txt': - $result=$this->generate_plain($templ); - $this->send($result); - case 'html': - $result=$this->generate_plain($templ); - $this->send($result); - - break; - case 'odt': - case 'ods': - $result=$this->generate_odt($templ); - $this->send($result); - break; - - } - fclose($templ); - } - /*!\brief send the result of generate plain to the browser - * \param $p_result is the string returned by generate_... - */ - function send($p_result) - { - switch ($this->b_type) - { - case 'rtf': - // A rtf file is generated - header('Content-type: application/rtf'); - header('Content-Disposition: attachment; filename="'.$this->b_name.'.rtf"'); - echo $p_result; - break; - - case 'txt': - // A txt file is generated - header('Content-type: application/txt'); - header('Content-Disposition: attachment; filename="'.$this->b_name.'.txt"'); - - echo $p_result; - break; - case 'html': - // A txt file is generated - header('Content-type: application/html'); - header('Content-Disposition: attachment; filename="'.$this->b_name.'.html"'); - - echo $p_result; - break; - case 'odt': - case 'ods': - header("Pragma: public"); - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Cache-Control: must-revalidate"); - if ( $this->b_type == 'odt' ) - { - header('Content-type: application/vnd.oasis.opendocument.text'); - header('Content-Disposition: attachment;filename="'.$this->b_name.'.odt"',FALSE); - } - if ( $this->b_type == 'ods' ) - { - header('Content-type: application/vnd.oasis.opendocument.spreadsheet'); - header('Content-Disposition: attachment;filename="'.$this->b_name.'.ods"',FALSE); - } - - header("Accept-Ranges: bytes"); - ob_start(); - // save the file in a temp folder - // create a temp directory in /tmp to unpack file and to parse it - $dirname=tempnam($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'tmp','bilan_'); - - - unlink($dirname); - mkdir ($dirname); - chdir($dirname); - // create a temp directory in /tmp to unpack file and to parse it - $file_base=dirname($_SERVER['SCRIPT_FILENAME']).DIRECTORY_SEPARATOR.$this->b_file_template; - $work_file=basename($file_base); - if ( copy ($file_base,$work_file) == false ) - { - throw new Exception ( _("Ouverture fichier impossible")); - } - /* - * unzip the document - */ - ob_start(); - $zip = new Zip_Extended; - if ($zip->open($work_file) === TRUE) - { - $zip->extractTo($dirname.DIRECTORY_SEPARATOR); - $zip->close(); - } - else - { - echo __FILE__.":".__LINE__."cannot unzip model ".$filename; - } - - // Remove the file we do not need anymore - unlink ($work_file); - - - // replace the file - $p_file=fopen($dirname.DIRECTORY_SEPARATOR.'content.xml','wb'); - if ( $p_file == false ) - { - throw new Exception ( _("erreur Ouverture fichier").' content.xml'); - - } - $a=fwrite($p_file,$p_result); - if ( $a==false) - { - throw new Exception ( _("erreur écriture fichier").' content.xml'); - } - // repack - $zip = new Zip_Extended; - $res = $zip->open($this->b_name.".".$this->b_type, ZipArchive::CREATE); - if($res !== TRUE) - { - throw new Exception (__FILE__.":".__LINE__."cannot recreate zip"); - } - $zip->add_recurse_folder($dirname.DIRECTORY_SEPARATOR); - $zip->close(); - - ob_end_clean(); - fclose($p_file); - $fdoc=fopen($dirname.DIRECTORY_SEPARATOR.$this->b_name.'.'.$this->b_type,'r'); - if ( $fdoc == false ) - { - throw new Exception (_("erreur Ouverture fichier")); - } - $buffer=fread ($fdoc,filesize($dirname.DIRECTORY_SEPARATOR.$this->b_name.'.'.$this->b_type)); - echo $buffer; - - break; - // and send - } - - } - static function test_me() - { - - if ( isset($_GET['result'])) - { - ob_start(); - $cn=new Database(dossier::id()); - $a=new Acc_Bilan($cn); - $a->get_request_get(); - - $a->load(); - $form=$a->file_open_form(); - $a->compute_formula($form); - fclose($form); - // open the form - $templ=$a->file_open_template(); - $r=$a->generate_odt($templ); - fclose($templ); - ob_end_clean(); - - $a->send($r); - } - else - { - $cn=new Database(dossier::id()); - $a=new Acc_Bilan($cn); - $a->get_request_get(); - - echo '
    '; - echo $a->display_form(); - echo HtmlInput::hidden('test_select',$_GET['test_select']).dossier::hidden(); - echo HtmlInput::submit('result','Sauve'); - echo '
    '; - } - } -} - diff --git a/sources/include/class_acc_compute.php b/sources/include/class_acc_compute.php deleted file mode 100644 index a2282a2..0000000 --- a/sources/include/class_acc_compute.php +++ /dev/null @@ -1,350 +0,0 @@ -'amount', - 'amount_vat'=>'amount_vat', - 'amount_vat_rate'=>'amount_vat_rate', - 'nd_vat'=>'nd_vat', - 'nd_vat_rate'=>'nd_vat_rate', - 'nd_ded_vat'=>'nd_ded_vat', - 'nd_ded_vat_rate'=>'nd_ded_vat_rate', - 'amount_nd'=>'amount_nd', - 'amount_nd_rate'=>'amount_nd_rate', - 'nd_vat_rate'=>'nd_vat_rate', - 'amount_perso'=>'amount_perso', - 'amount_perso_rate'=>'amount_perso_rate' ); - - */ - - -class Acc_Compute -{ - private static $variable=array( 'amount'=>'amount', - 'amount_vat'=>'amount_vat', - 'amount_vat_rate'=>'amount_vat_rate', - 'nd_vat'=>'nd_vat', - 'nd_vat_rate'=>'nd_vat_rate', - 'nd_ded_vat'=>'nd_ded_vat', - 'nd_ded_vat_rate'=>'nd_ded_vat_rate', - 'amount_nd'=>'amount_nd', - 'amount_nd_rate'=>'amount_nd_rate', - 'nd_vat_rate'=>'nd_vat_rate', - 'amount_perso'=>'amount_perso', - 'amount_perso_rate'=>'amount_perso_rate' - ); - - private $order; // check that the compute - // function are called in the - // good order - - var $check; // activate the check of the - // order, valid value are - // false or true - function __construct () - { - bcscale(4); - foreach (self::$variable as $key=>$value) $this->$key=0; - $this->order=0; - $this->check=true; - } - - public function get_parameter($p_string) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - return $this->$idx; - } - else - throw new Exception (__FILE__.":".__LINE__._('Erreur attribut inexistant')); - } - public function set_parameter($p_string,$p_value) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - $this->$idx=$p_value; - } - else - throw new Exception (__FILE__.":".__LINE__._('Erreur attribut inexistant')); - - - } - public function get_info() - { - return var_export(self::$variable,true); - } - - function compute_vat() - { - if ( $this->check && $this->order != 0 ) throw new Exception ('ORDER NOT RESPECTED'); - $this->amount_vat=bcmul($this->amount,$this->amount_vat_rate); - $this->amount_vat=round($this->amount_vat,2); - $this->order=1; - } - /*!\brief Compute the no deductible part of the amount, it reduce - *also the vat - */ - function compute_nd() - { - if ( $this->check && $this->order > 2 ) throw new Exception ('ORDER NOT RESPECTED'); - - $this->amount_nd=bcmul($this->amount,$this->amount_nd_rate); - $this->amount_nd=bcdiv($this->amount_nd,100); - $this->amount_nd=round($this->amount_nd,2); - // the nd part for the vat - $nd_vat=bcmul($this->amount_vat,$this->amount_nd_rate); - $nd_vat=bcdiv($nd_vat,100); - $nd_vat=round($nd_vat,2); - - } - function compute_nd_vat() - { - if ( $this->check && $this->order > 3 ) throw new Exception ('ORDER NOT RESPECTED'); - $this->order=4; - - if ($this->amount_vat == 0 ) $this->compute_vat(); - $this->nd_vat=bcmul($this->amount_vat,$this->nd_vat_rate); - $this->nd_vat=bcdiv($this->nd_vat,100); - $this->nd_vat=round($this->nd_vat,2); - } - - function compute_ndded_vat() - { - if ( $this->check && $this->order > 4 ) throw new Exception ('ORDER NOT RESPECTED'); - $this->order=5; - - if ($this->amount_vat == 0 ) $this->compute_vat(); - $this->nd_ded_vat=bcmul($this->amount_vat,$this->nd_ded_vat_rate); - $this->nd_ded_vat=bcdiv($this->nd_ded_vat,100); - $this->nd_ded_vat=round($this->nd_ded_vat,2); - } - - function compute_perso() - { - if ( $this->check && $this->order != 1 ) throw new Exception ('ORDER NOT RESPECTED'); - $this->order=2; - if ( $this->amount == 0 ) return; - $this->amount_perso=bcmul($this->amount,$this->amount_perso_rate); - $this->amount_perso=bcdiv($this->amount_perso,100); - $this->amount_perso=round($this->amount_perso,2); - - - - } - function correct() - { - $this->amount=bcsub($this->amount,$this->amount_perso); - // correct the others amount - $this->amount=bcsub($this->amount,$this->amount_nd); - $this->amount_vat=bcsub($this->amount_vat,$this->nd_ded_vat); - $this->amount_vat=round($this->amount_vat,2); - $this->amount_vat=bcsub($this->amount_vat,$this->nd_vat); - $this->amount_vat=round($this->amount_vat,2); - - } - - /**! - * \brief verify that all the amount are positive or null - * otherwise throw a exception and the sum of amount + vat must - * equal to the sum of all the amount of the current object - * so you have to copy the object before computing anything and pass - * it as parameter - * \param compare with a object copied before computing, if null - * there is no comparison - */ - function verify($p_obj=null) - { - foreach (self::$variable as $key=>$value) - if ( $this->$value < 0 ) - throw new Exception (_("Montant invalide")); - - if ( $p_obj != null ) - { - $sum=0; - foreach ( array( 'amount','amount_vat','amount_nd','nd_vat','amount_perso','nd_ded_vat') as $value) - $sum=bcadd($sum,$this->$value); - if ( $p_obj->amount_vat == 0 ) $p_obj->compute_vat(); - $cmp=bcadd($p_obj->amount,$p_obj->amount_vat); - $diff=bcsub($sum,$cmp); - if ( $diff != 0.0 ) - throw new Exception (_("ECHEC VERIFICATION : valeur totale = $sum valeur attendue = $cmp diff = $diff")); - } - } - function display() - { - foreach (self::$variable as $key=>$value) - { - echo 'key '.$key.' Description '.$value.' value is '.$this->$key.'
    '; - } - } - public static function test_me () - { - $a=new Acc_Compute(); - echo $a->get_info(); - echo '
    '; - - // Compute some operation to see if the computed amount are - // correct - - //Test VAT - $a->set_parameter('amount',1.23); - $a->set_parameter('amount_vat_rate',0.21); - - echo '

    Test VAT

    '; - echo '

    Data

    '; - $a->display(); - - echo '

    Result

    '; - $a->compute_vat(); - $a->display(); - $a->verify(); - // Test VAT + perso - $a=new Acc_Compute(); - $a->set_parameter('amount',1.23); - $a->set_parameter('amount_vat_rate',0.21); - $a->set_parameter('amount_perso_rate',0.5); - echo '

    Test VAT + Perso

    '; - echo '

    Data

    '; - $a->display(); - $b=clone $a; - $a->compute_vat(); - $a->compute_perso(); - $a->correct(); - echo '

    Result

    '; - $a->display(); - $a->verify($b); - // TEST VAT + ND - // Test VAT + perso - $a=new Acc_Compute(); - $a->set_parameter('amount',1.23); - $a->set_parameter('amount_vat_rate',0.21); - $a->set_parameter('nd_vat_rate',0.5); - $b=clone $a; - echo '

    Test VAT + ND VAT

    '; - echo '

    Data

    '; - $a->display(); - $a->compute_vat(); - $a->compute_nd_vat(); - $a->correct(); - echo '

    Result

    '; - $a->display(); - $a->verify($b); - // TEST VAT + ND - // Test VAT + perso - $a=new Acc_Compute(); - $a->set_parameter('amount',1.23); - $a->set_parameter('amount_vat_rate',0.21); - $a->set_parameter('nd_vat_rate',0.5); - $a->set_parameter('amount_perso_rate',0.5); - - $b=clone $a; - echo '

    Test VAT + ND VAT + perso

    '; - echo '

    Data

    '; - $a->display(); - $a->compute_vat(); - $a->compute_perso(); - $a->compute_nd_vat(); - $a->correct(); - echo '

    Result

    '; - $a->display(); - $a->verify($b); - // TEST VAT + ND - $a=new Acc_Compute(); - $a->set_parameter('amount',1.23); - $a->set_parameter('amount_vat_rate',0.21); - $a->set_parameter('amount_nd_rate',0.5); - - $b=clone $a; - echo '

    Test VAT + ND

    '; - echo '

    Data

    '; - $a->display(); - $a->compute_vat(); - $a->compute_nd(); - - $a->compute_perso(); - $a->compute_nd_vat(); - $a->correct(); - echo '

    Result

    '; - $a->display(); - $a->verify($b); - // TEST VAT + ND - // + Perso - $a=new Acc_Compute(); - $a->set_parameter('amount',1.23); - $a->set_parameter('amount_vat_rate',0.21); - $a->set_parameter('amount_nd_rate',0.5); - $a->set_parameter('amount_perso_rate',0.2857); - $b=clone $a; - echo '

    Test VAT + ND + Perso

    '; - echo '

    Data

    '; - $a->display(); - $a->compute_vat(); - $a->compute_nd(); - - $a->compute_perso(); - $a->compute_nd_vat(); - $a->correct(); - echo '

    Result

    '; - $a->display(); - $a->verify($b); -// TEST VAT + ND - // + Perso - $a=new Acc_Compute(); - $a->set_parameter('amount',1.23); - $a->set_parameter('amount_vat_rate',0.21); - $a->set_parameter('nd_ded_vat_rate',0.5); - - $b=clone $a; - echo '

    Test VAT + TVA ND DED

    '; - echo '

    Data

    '; - $a->display(); - $a->compute_vat(); - $a->compute_nd(); - - $a->compute_perso(); - $a->compute_nd_vat(); - $a->compute_ndded_vat(); - $a->correct(); - echo '

    Result

    '; - $a->display(); - $a->verify($b); - - - } -} diff --git a/sources/include/class_acc_ledger.php b/sources/include/class_acc_ledger.php deleted file mode 100644 index 5326cf7..0000000 --- a/sources/include/class_acc_ledger.php +++ /dev/null @@ -1,3958 +0,0 @@ -id = $p_id; - $this->name = &$this->jrn_def_name; - $this->jrn_def_id = &$this->id; - $this->db = $p_cn; - $this->row = null; - $this->nb = MAX_ARTICLE; - } - - function get_last_pj() - { - if ($this->db->exist_sequence("s_jrn_pj" . $this->id)) - { - $ret = $this->db->get_array("select last_value,is_called from s_jrn_pj" . $this->id); - $last = $ret[0]['last_value']; - /** - * \note With PSQL sequence , the last_value column is 1 when before AND after the first call, to make the difference between them - * I have to check whether the sequence has been already called or not */ - if ($ret[0]['is_called'] == 'f') - $last--; - return $last; - } - else - $this->db->create_sequence("s_jrn_pj" . $this->id); - return 0; - } - - /** - * @brief Return the type of a ledger (ACH,VEN,ODS or FIN) or GL - * - */ - - function get_type() - { - if ($this->id == 0) - { - $this->name = _(" Tous les journaux"); - $this->type = "GL"; - return "GL"; - } - - $Res = $this->db->exec_sql("select jrn_def_type from " . - " jrn_def where jrn_def_id=" . - $this->id); - $Max = Database::num_row($Res); - if ($Max == 0) - return null; - $ret = Database::fetch_array($Res, 0); - $this->type = $ret['jrn_def_type']; - return $ret['jrn_def_type']; - } - - /** - * let you delete a operation - * @note by cascade it will delete also in - * - jrnx - * - stock - * - quant_purchase - * - quant_fin - * - quant_sold - * - operation_analytique - * - letter - * - reconciliation - * @bug the attached document is not deleted - * @bug Normally it should be named delete_operation, cause the id is the ledger_id - * (jrn_def_id) and not the operation id - */ - function delete() - { - if ($this->id == 0) - return; - $grpt_id = $this->db->get_value('select jr_grpt_id from jrn where jr_id=$1', array($this->jr_id)); - if ($this->db->count() == 0) - return; - $this->db->exec_sql('delete from jrnx where j_grpt=$1', array($grpt_id)); - $this->db->exec_sql('delete from jrn where jr_id=$1', array($this->jr_id)); - } - - /** - * Display warning contained in an array - * @return string with error message - */ - function display_warning($pa_msg, $p_warning) - { - $str = '

    ' . $p_warning; - $str.="

      "; - for ($i = 0; $i < count($pa_msg); $i++) - { - $str.="
    1. " . $pa_msg[$i] . "
    2. "; - } - $str.='
    '; - $str.='

    '; - return $str; - } - - /** - * reverse the operation by creating the opposite one, - * the result is to avoid it - * it must be done in - * - jrn - * - jrnx - * - quant_fin - * - quant_sold - * - quant_purchase - * - stock - * - ANC - * @param $p_date is the date of the reversed op - * @exception if date is invalid or other prob - * @note automatically create a reconciliation between operation - * You must set the ledger_id $this->jrn_def_id - * This function should be in operation or call an acc_operation object - * - */ - function reverse($p_date) - { - global $g_user; - try - { - $this->db->start(); - if (!isset($this->jr_id) || $this->jr_id == '') - throw new Exception(_("this->jr_id is not set ou opération inconnue")); - - /* check if the date is valid */ - if (isDate($p_date) == null) - throw new Exception(_('Date invalide') . $p_date); - - // if the operation is in a closed or centralized period - // the operation is voided thanks the opposite operation - $grp_new = $this->db->get_next_seq('s_grpt'); - $seq = $this->db->get_next_seq("s_jrn"); - $p_internal = $this->compute_internal_code($seq); - $this->jr_grpt_id = $this->db->get_value('select jr_grpt_id from jrn where jr_id=$1', array($this->jr_id)); - if ($this->db->count() == 0) - throw new Exception(_("Cette opération n'existe pas")); - $this->jr_internal = $this->db->get_value('select jr_internal from jrn where jr_id=$1', array($this->jr_id)); - if ($this->db->count() == 0 || trim($this->jr_internal) == '') - throw new Exception(_("Cette opération n'existe pas")); - - /* find the periode thanks the date */ - $per = new Periode($this->db); - $per->jrn_def_id = $this->id; - $per->find_periode($p_date); - - if ($per->is_open() == 0) - throw new Exception(_('PERIODE FERMEE')); - - - - - - // Mark the operation invalid into the ledger - // to avoid to nullify twice the same op. - $sql = "update jrn set jr_comment='extourne : '||jr_comment where jr_id=$1"; - $Res = $this->db->exec_sql($sql, array($this->jr_id)); - - // Check return code - if ($Res == false) - throw new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]"); - - ////////////////////////////////////////////////// - // Reverse in jrnx* tables - ////////////////////////////////////////////////// - $a_jid = $this->db->get_array("select j_id,j_debit from jrnx where j_grpt=$1", array($this->jr_grpt_id)); - for ($l = 0; $l < count($a_jid); $l++) - { - $row = $a_jid[$l]['j_id']; - // Make also the change into jrnx - $sql = "insert into jrnx ( - j_date,j_montant,j_poste,j_grpt, - j_jrn_def,j_debit,j_text,j_internal,j_tech_user,j_tech_per,j_qcode - ) select to_date($1,'DD.MM.YYYY'),j_montant,j_poste,$2, - j_jrn_def,not (j_debit),j_text,$3,$4,$5, - j_qcode - from - jrnx - where j_id=$6 returning j_id"; - $Res = $this->db->exec_sql($sql, array($p_date, $grp_new, $p_internal, $g_user->id, $per->p_id, $row)); - // Check return code - if ($Res == false) - throw (new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]")); - $aj_id = $this->db->fetch(0); - $j_id = $aj_id['j_id']; - - /* automatic lettering */ - $let = new Lettering($this->db); - $let->insert_couple($j_id, $row); - - // reverse in QUANT_SOLD - $Res = $this->db->exec_sql("INSERT INTO quant_sold( - qs_internal, qs_fiche, qs_quantite, qs_price, qs_vat, - qs_vat_code, qs_client, qs_valid, j_id) - SELECT $1, qs_fiche, qs_quantite*(-1), qs_price*(-1), qs_vat*(-1), - qs_vat_code, qs_client, qs_valid, $2 - FROM quant_sold where j_id=$3", array($p_internal, $j_id, $row)); - - if ($Res == false) - throw new Exception(__FILE__ . __LINE__ . "sql a echoue [ $sql ]"); - $Res = $this->db->exec_sql("INSERT INTO quant_purchase( - qp_internal, j_id, qp_fiche, qp_quantite, qp_price, qp_vat, - qp_vat_code, qp_nd_amount, qp_nd_tva, qp_nd_tva_recup, qp_supplier, - qp_valid, qp_dep_priv) - SELECT $1, $2, qp_fiche, qp_quantite*(-1), qp_price*(-1), qp_vat*(-1), - qp_vat_code, qp_nd_amount*(-1), qp_nd_tva*(-1), qp_nd_tva_recup*(-1), qp_supplier, - qp_valid, qp_dep_priv*(-1) - FROM quant_purchase where j_id=$3", array($p_internal, $j_id, $row)); - - if ($Res == false) - throw new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]"); - } - $sql = "insert into jrn ( - jr_id, - jr_def_id, - jr_montant, - jr_comment, - jr_date, - jr_grpt_id, - jr_internal - ,jr_tech_per, jr_valid - ) - select $1,jr_def_id,jr_montant,jr_comment, - to_date($2,'DD.MM.YYYY'),$3,$4, - $5, true - from - jrn - where jr_id=$6"; - $Res = $this->db->exec_sql($sql, array($seq, $p_date, $grp_new, $p_internal, $per->p_id, $this->jr_id)); - // Check return code - if ($Res == false) - throw (new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]")); - // reverse in QUANT_FIN table - $Res = $this->db->exec_sql(" INSERT INTO quant_fin( - qf_bank, qf_other, qf_amount,jr_id) - SELECT qf_bank, qf_other, qf_amount*(-1),$1 - FROM quant_fin where jr_id=$2", array($seq, $this->jr_id)); - if ($Res == false) - throw (new Exception(__FILE__ . __LINE__ . "SQL ERROR[ $sql ]")); - - // Add a "concerned operation to bound these op.together - // - $rec = new Acc_Reconciliation($this->db); - $rec->set_jr_id($seq); - $rec->insert($this->jr_id); - - // Check return code - if ($Res == false) - { - throw (new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]")); - } - - - - // the table stock must updated - // also in the stock table - $sql = "delete from stock_goods where sg_id = any ( select sg_id - from stock_goods natural join jrnx where j_grpt=" . $this->jr_grpt_id . ")"; - $Res = $this->db->exec_sql($sql); - if ($Res == false) - throw (new Exception(__FILE__ . __LINE__ . "SQL ERROR [ $sql ]")); - $this->db->commit(); - } - catch (Exception $e) - { - $this->db->rollback(); - throw $e; - } - } - - /** - * @brief Return the name of a ledger - * - */ - - function get_name() - { - if ($this->id == 0) - { - $this->name = _("Grand Livre"); - return $this->name; - } - - $Res = $this->db->exec_sql("select jrn_def_name from " . - " jrn_def where jrn_def_id=$1", array($this->id)); - $Max = Database::num_row($Res); - if ($Max == 0) - return null; - $ret = Database::fetch_array($Res, 0); - $this->name = $ret['jrn_def_name']; - return $ret['jrn_def_name']; - } - - /** \function get_row - * @brief Get The data - * - * - * @paramp_from from periode - * @paramp_to to periode - * @paramp_limit starting line - * @paramp_offset number of lines - * \return Array with the asked data - * - */ - - function get_row($p_from, $p_to, $p_limit = -1, $p_offset = -1) - { - global $g_user; - $periode = sql_filter_per($this->db, $p_from, $p_to, 'p_id', 'jr_tech_per'); - - $cond_limite = ($p_limit != -1) ? " limit " . $p_limit . " offset " . $p_offset : ""; - // retrieve the type - $this->get_type(); - // Grand livre == 0 - if ($this->id != 0) - { - $Res = $this->db->exec_sql("select jr_id,j_id,j_id as int_j_id,to_char(j_date,'DD.MM.YYYY') as j_date, - jr_internal, - case j_debit when 't' then j_montant::text else ' ' end as deb_montant, - case j_debit when 'f' then j_montant::text else ' ' end as cred_montant, - j_debit as debit,j_poste as poste,jr_montant , " . - "case when j_text='' or j_text is null then pcm_lib else j_text end as description,j_grpt as grp, - jr_comment||' ('||jr_internal||')' as jr_comment, - jr_pj_number, - j_qcode, - jr_rapt as oc, j_tech_per as periode - from jrnx left join jrn on " . - "jr_grpt_id=j_grpt " . - " left join tmp_pcmn on pcm_val=j_poste " . - " where j_jrn_def=" . $this->id . - " and " . $periode . " order by j_date::date asc,substring(jr_pj_number,'[0-9]+$')::numeric asc,j_grpt,j_debit desc " . - $cond_limite); - } - else - { - $Res = $this->db->exec_sql("select jr_id,j_id,j_id as int_j_id,to_char(j_date,'DD.MM.YYYY') as j_date, - jr_internal, - case j_debit when 't' then j_montant::text else ' ' end as deb_montant, - case j_debit when 'f' then j_montant::text else ' ' end as cred_montant, - j_debit as debit,j_poste as poste," . - "case when j_text='' or j_text is null then pcm_lib else j_text end as description,j_grpt as grp, - jr_comment||' ('||jr_internal||')' as jr_comment, - jr_pj_number, - jr_montant, - j_qcode, - jr_rapt as oc, j_tech_per as periode from jrnx left join jrn on " . - "jr_grpt_id=j_grpt left join tmp_pcmn on pcm_val=j_poste - join jrn_def on (jr_def_id=jrn_def_id) - where " . - $g_user->get_ledger_sql() . " and " . - " " . $periode . " order by j_date::date,substring(jr_pj_number,'[0-9]+$') asc,j_grpt,j_debit desc " . - $cond_limite); - } - - - $array = array(); - $Max = Database::num_row($Res); - if ($Max == 0) - return null; - $case = ""; - $tot_deb = 0; - $tot_cred = 0; - $row = Database::fetch_all($Res); - for ($i = 0; $i < $Max; $i++) - { - $fiche = new Fiche($this->db); - $line = $row[$i]; - $mont_deb = ($line['deb_montant'] != 0) ? sprintf("% 8.2f", $line['deb_montant']) : ""; - $mont_cred = ($line['cred_montant'] != 0) ? sprintf("% 8.2f", $line['cred_montant']) : ""; - $jr_montant = ($line['jr_montant'] != 0) ? sprintf("% 8.2f", $line['jr_montant']) : ""; - $tot_deb+=$line['deb_montant']; - $tot_cred+=$line['cred_montant']; - $tot_op = $line['jr_montant']; - - /* Check first if there is a quickcode */ - if (strlen(trim($line['description'])) == 0 && strlen(trim($line['j_qcode'])) != 0) - { - if ($fiche->get_by_qcode($line['j_qcode'], false) == 0) - { - $line['description'] = $fiche->strAttribut(ATTR_DEF_NAME); - } - } - if ($case != $line['grp']) - { - $case = $line['grp']; - // for financial, we show if the amount is or not in negative - if ($this->type == 'FIN') - { - $amount = $this->db->get_value('select qf_amount from quant_fin where jr_id=$1', array($line['jr_id'])); - /* if nothing is found */ - if ($this->db->count() == 0) - $tot_op = $jr_montant; - else if ($amount < 0) - { - $tot_op = $amount; - } - } - $array[] = array( - 'jr_id' => $line['jr_id'], - 'int_j_id' => $line['int_j_id'], - 'j_id' => $line['j_id'], - 'j_date' => $line['j_date'], - 'internal' => $line['jr_internal'], - 'deb_montant' => '', - 'cred_montant' => ' ', - 'description' => '' . h($line['jr_comment']) . ' [' . $tot_op . '] ', - 'poste' => $line['oc'], - 'qcode' => $line['j_qcode'], - 'periode' => $line['periode'], - 'jr_pj_number' => $line ['jr_pj_number']); - - $array[] = array( - 'jr_id' => '', - 'int_j_id' => $line['int_j_id'], - 'j_id' => '', - 'j_date' => '', - 'internal' => '', - 'deb_montant' => $mont_deb, - 'cred_montant' => $mont_cred, - 'description' => $line['description'], - 'poste' => $line['poste'], - 'qcode' => $line['j_qcode'], - 'periode' => $line['periode'], - 'jr_pj_number' => '' - ); - } - else - { - $array[] = array( - 'jr_id' => $line['jr_id'], - 'int_j_id' => $line['int_j_id'], - 'j_id' => '', - 'j_date' => '', - 'internal' => '', - 'deb_montant' => $mont_deb, - 'cred_montant' => $mont_cred, - 'description' => $line['description'], - 'poste' => $line['poste'], - 'qcode' => $line['j_qcode'], - 'periode' => $line['periode'], - 'jr_pj_number' => ''); - } - } - $this->row = $array; - $a = array($array, $tot_deb, $tot_cred); - return $a; - } - - /** @brief Get simplified row from ledger - * - * @param p_from periode - * @param p_to periode - * @param p_limit starting line - * @param p_offset number of lines - * @param trunc if data must be truncated (pdf export) - * - * \return an Array with the asked data - */ - - function get_rowSimple($p_from, $p_to, $trunc = 0, $p_limit = -1, $p_offset = -1) - { - global $g_user; - // Grand-livre : id= 0 - //--- - $jrn = ($this->id == 0 ) ? "and " . $g_user->get_ledger_sql() : "and jrn_def_id = " . $this->id; - - $periode = sql_filter_per($this->db, $p_from, $p_to, 'p_id', 'jr_tech_per'); - - $cond_limite = ($p_limit != -1) ? " limit " . $p_limit . " offset " . $p_offset : ""; - //--- - $sql = " - SELECT jrn.jr_id as jr_id , - jrn.jr_id as num , - jrn.jr_def_id as jr_def_id, - jrn.jr_montant as montant, - substr(jrn.jr_comment,1,35) as comment, - to_char(jrn.jr_date,'DD-MM-YYYY') as date, - to_char(jrn.jr_date_paid,'DD-MM-YYYY') as date_paid, - jr_pj_number, - jr_internal, - jrn.jr_grpt_id as grpt_id, - jrn.jr_pj_name as pj, - jrn_def_type, - jrn.jr_tech_per - FROM jrn join jrn_def on (jrn_def_id=jr_def_id) - WHERE $periode $jrn order by jr_date,substring(jrn.jr_pj_number,'[0-9]+$')::numeric asc $cond_limite"; - - $Res = $this->db->exec_sql($sql); - $Max = Database::num_row($Res); - if ($Max == 0) - { - return null; - } - $type = $this->get_type(); - // for type ACH and Ven we take more info - if ($type == 'ACH' || $type == 'VEN') - { - $a_ParmCode = $this->db->get_array('select p_code,p_value from parm_code'); - $a_TVA = $this->db->get_array('select tva_id,tva_label,tva_poste - from tva_rate where tva_rate != 0 order by tva_rate,tva_label,tva_id '); - for ($i = 0; $i < $Max; $i++) - { - $array[$i] = Database::fetch_array($Res, $i); - $p = $this->get_detail($array[$i], $type, $trunc, $a_TVA, $a_ParmCode); - if ($array[$i]['dep_priv'] != 0.0) - { - $array[$i]['comment'].="(priv. " . $array[$i]['dep_priv'] . ")"; - } - } - } - else - { - $array = Database::fetch_all($Res); - } - - return $array; - } - -// end function get_rowSimple - - /** - * @brief guess what the next pj should be - */ - - function guess_pj() - { - $prop = $this->get_propertie(); - $pj_pref = $prop["jrn_def_pj_pref"]; - $pj_seq = $this->get_last_pj() + 1; - return $pj_pref . $pj_seq; - } - - /** - * @brief Show all the operation - * @param$sql is the sql stmt, normally created by build_search_sql - * @param$offset the offset - * @param$p_paid if we want to see info about payment - @code - // Example - // Build the sql - list($sql,$where)=$Ledger->build_search_sql($_GET); - // Count nb of line - $max_line=$this->db->count_sql($sql); - - $step=$_SESSION['g_pagesize']; - $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; - // create the nav. bar - $bar=navigation_bar($offset,$max_line,$step,$page); - // show a part - list($count,$html)= $Ledger->list_operation($sql,$offset,0); - echo $html; - // show nav bar - echo $bar; - - @endcode - * @see build_search_sql - * @see display_search_form - * @see search_form - - * @return HTML string - */ - - public function list_operation_to_reconcile($sql,$p_target) - { - global $g_parameter, $g_user; - $gDossier = dossier::id(); - $limit = " LIMIT ".MAX_RECONCILE; - // Sort - // Count - $count = $this->db->count_sql($sql); - // Add the limit - $sql.=" order by jr_date asc " . $limit; - - // Execute SQL stmt - $Res = $this->db->exec_sql($sql); - - //starting from here we can refactor, so that instead of returning the generated HTML, - //this function returns a tree structure. - - $r = ""; - - - $Max = Database::num_row($Res); - - if ($Max == 0) - return array(0, _("Aucun enregistrement trouvé")); - $r.=HtmlInput::hidden("target", $p_target); - $r.=''; - - - $r.=""; - $r.=""; - $r.=""; - - if ($this->type == 'ALL') - { - $r.=th(_('Journal')); - } - - $r.=''; - $r.=''; - $r.=th(_('Notes'), ' '); - $r.=''; - $r.=""; - $r.=""; - // Total Amount - $tot = 0.0; - $gDossier = dossier::id(); - $str_dossier = Dossier::id(); - for ($i = 0; $i < $Max; $i++) - { - - - $row = Database::fetch_array($Res, $i); - - if ($i % 2 == 0) - $tr = ''; - else - $tr = ''; - $r.=$tr; - // Radiobox - // - - $r.=''; - //internal code - // button modify - $r.=""; - if ($this->type == 'ALL') - $r.=td($row['jrn_def_name']); - // date - $r.=""; - - // pj - $r.=""; - - // Tiers - $other = ($row['quick_code'] != '') ? '[' . $row['quick_code'] . '] ' . $row['name'] . ' ' . $row['first_name'] : ''; - $r.=td($other); - // comment - $r.=""; - $r.=td(h($row['n_text']), ' style="font-size:0.87em"'); - // Amount - // If the ledger is financial : - // the credit must be negative and written in red - $positive = 0; - - // Check ledger type : - if ($row['jrn_def_type'] == 'FIN') - { - $positive = $this->db->get_value("select qf_amount from quant_fin where jr_id=$1", array($row['jr_id'])); - if ($this->db->count() != 0) - $positive = ($positive < 0) ? 1 : 0; - } - $r.=""; - - - - // Rapprochement - $rec = new Acc_Reconciliation($this->db); - $rec->set_jr_id($row['jr_id']); - $a = $rec->get(); - $r.=""; - - if ($row['jr_valid'] == 'f') - { - $r.=""; - } - // end row - $r.=""; - } - $r.='
    "._("Selection").""._("Internal")."'._("Date").''._("Pièce").''; - $r.=th(_('tiers')); - $r.=''._("Description").''._("Montant").'" . _('Concerne') . "
    "; - // If url contains - // - - $href = basename($_SERVER['PHP_SELF']); - - - $r.=sprintf('%s ', $row['jr_id'], $gDossier, $row['jr_internal']); - $r.=""; - $r.=$row['str_jr_date']; - $r.=""; - $r.=$row['jr_pj_number']; - $r.=""; - $tmp_jr_comment = h($row['jr_comment']); - $r.=$tmp_jr_comment; - $r.=""; - - $r.=( $positive != 0 ) ? " - " . nbm($row['jr_montant']) . "" : nbm($row['jr_montant']); - $r.=""; - if ($a != null) - { - - foreach ($a as $key => $element) - { - $operation = new Acc_Operation($this->db); - $operation->jr_id = $element; - $l_amount = $this->db->get_value("select jr_montant from jrn " . - " where jr_id=$element"); - $r.= " " . $operation->get_internal() . "[" . nbm($l_amount) . "]"; - }//for - }// if ( $a != null ) { - $r.=""._("Opération annulée")."
    '; - return array($count, $r); - } - - /** - * @brief Show all the operation - * @param$sql is the sql stmt, normally created by build_search_sql - * @param$offset the offset - * @param$p_paid if we want to see info about payment - \code - // Example - // Build the sql - list($sql,$where)=$Ledger->build_search_sql($_GET); - // Count nb of line - $max_line=$cn->count_sql($sql); - - $step=$_SESSION['g_pagesize']; - $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; - // create the nav. bar - $bar=navigation_bar($offset,$max_line,$step,$page); - // show a part - list($count,$html)= $Ledger->list_operation($sql,$offset,0); - echo $html; - // show nav bar - echo $bar; - - \endcode - * \see build_search_sql - * \see display_search_form - * \see search_form - - * \return HTML string - */ - - public function list_operation($sql, $offset, $p_paid = 0) - { - global $g_parameter, $g_user; - bcscale(2); - $table = new Sort_Table(); - $gDossier = dossier::id(); - $amount_paid = 0.0; - $amount_unpaid = 0.0; - $limit = ($_SESSION['g_pagesize'] != -1) ? " LIMIT " . $_SESSION['g_pagesize'] : ""; - $offset = ($_SESSION['g_pagesize'] != -1) ? " OFFSET " . Database::escape_string($offset) : ""; - $order = " order by jr_date_order asc,jr_internal asc"; - // Sort - $url = "?" . CleanUrl(); - $str_dossier = dossier::get(); - $table->add(_("Date"), $url, 'order by jr_date asc,substring(jr_pj_number,\'[0-9]+$\')::numeric asc', 'order by jr_date desc,substring(jr_pj_number,\'[0-9]+$\')::numeric desc', "da", "dd"); - $table->add(_('Echeance'), $url, " order by jr_ech asc", " order by jr_ech desc", 'ea', 'ed'); - $table->add(_('Paiement'), $url, " order by jr_date_paid asc", " order by jr_date_paid desc", 'eap', 'edp'); - $table->add(_('Pièce'), $url, ' order by substring(jr_pj_number,\'[0-9]+$\')::numeric asc ', ' order by substring(jr_pj_number,\'[0-9]+$\')::numeric desc ', "pja", "pjd"); - $table->add(_('Tiers'), $url, " order by name asc", " order by name desc", 'na', 'nd'); - $table->add(_('Montant'), $url, " order by jr_montant asc", " order by jr_montant desc", "ma", "md"); - $table->add(_("Description"), $url, "order by jr_comment asc", "order by jr_comment desc", "ca", "cd"); - - $ord = (!isset($_GET['ord'])) ? 'da' : $_GET['ord']; - $order = $table->get_sql_order($ord); - - // Count - $count = $this->db->count_sql($sql); - // Add the limit - $sql.=$order . $limit . $offset; - // Execute SQL stmt - $Res = $this->db->exec_sql($sql); - - //starting from here we can refactor, so that instead of returning the generated HTML, - //this function returns a tree structure. - - $r = ""; - - - $Max = Database::num_row($Res); - - if ($Max == 0) - return array(0, _("Aucun enregistrement trouvé")); - - $r.=''; - - - $r.=""; - $r.=""; - if ($this->type == 'ALL') - { - $r.=th('Journal'); - } - $r.=''; - if ($p_paid != 0 ) $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=th('Notes', ' style="width:15%"'); - $r.=''; - // if $p_paid is not equal to 0 then we have a paid column - if ($p_paid != 0) - { - $r.=""; - } - $r.=""; - $r.=""; - $r.=""; - // Total Amount - $tot = 0.0; - $gDossier = dossier::id(); - for ($i = 0; $i < $Max; $i++) - { - - - $row = Database::fetch_array($Res, $i); - - if ($i % 2 == 0) - $tr = ''; - else - $tr = ''; - $r.=$tr; - //internal code - // button modify - $r.=""; - if ($this->type == 'ALL') - $r.=td($row['jrn_def_name']); - // date - $r.=""; - // echeance - if ($p_paid != 0 ) - { - $r.=""; - $r.=""; - } - - // pj - $r.=""; - - // Tiers - $other = ($row['quick_code'] != '') ? '[' . $row['quick_code'] . '] ' . $row['name'] . ' ' . $row['first_name'] : ''; - $r.=td($other); - // comment - $r.=""; - $r.=td(h($row['n_text']), ' style="font-size:0.87em%"'); - // Amount - // If the ledger is financial : - // the credit must be negative and written in red - $positive = 0; - - // Check ledger type : - if ($row['jrn_def_type'] == 'FIN') - { - $positive = $this->db->get_value("select qf_amount from quant_fin where jr_id=$1", array($row['jr_id'])); - if ($this->db->count() != 0) - $positive = ($positive < 0) ? 1 : 0; - } - $r.=""; - - - // Show the paid column if p_paid is not null - if ($p_paid != 0) - { - $w = new ICheckBox(); - $w->name = "rd_paid" . $row['jr_id']; - $w->selected = ($row['jr_rapt'] == 'paid') ? true : false; - // if p_paid == 2 then readonly - $w->readonly = ( $p_paid == 2) ? true : false; - $h = new IHidden(); - $h->name = "set_jr_id" . $row['jr_id']; - $r.=''; - if ($row['jr_rapt'] == 'paid') - $amount_paid=bcadd($amount_paid,$t_amount); - else - $amount_unpaid=bcadd($amount_unpaid,$t_amount); - } - - // Rapprochement - $rec = new Acc_Reconciliation($this->db); - $rec->set_jr_id($row['jr_id']); - $a = $rec->get(); - $r.=""; - - if ($row['jr_valid'] == 'f') - { - $r.=""; - } - else - { - - } // else - //document - if ($row['jr_pj_name'] != "") - { - $r.=''; - } - else - $r.=""; - - // end row - $r.=""; - } - $amount_paid = round($amount_paid, 4); - $amount_unpaid = round($amount_unpaid, 4); - $tot = round($tot, 4); - $r.=""; - $r.=''; - $r.='"; - $r.=""; - if ($p_paid != 0) - { - $r.=""; - $r.=''; - $r.='"; - $r.=""; - $r.=""; - $r.=''; - $r.='"; - $r.=""; - } - $r.="
    "._("n° interne")."' . $table->get_header(0) . '' . $table->get_header(1) . ''; - if ($p_paid != 0 ) $r.='' . $table->get_header(2) . '' . $table->get_header(3) . '' . $table->get_header(4) . '' . $table->get_header(6) . '' . $table->get_header(5) . ' " . _('Payé') . "" . _('Concerne') . "" . _('Document') . "
    "; - // If url contains - // - - $href = basename($_SERVER['PHP_SELF']); - - - $r.=sprintf('%s ', $row['jr_id'], $gDossier, $row['jr_internal']); - $r.=""; - $r.=$row['str_jr_date']; - $r.=""; - $r.=$row['str_jr_ech']; - $r.=""; - $r.=$row['str_jr_date_paid']; - $r.=""; - $r.=$row['jr_pj_number']; - $r.=""; - $tmp_jr_comment = h($row['jr_comment']); - $r.=$tmp_jr_comment; - $r.=""; - $t_amount=$row['jr_montant']; - if ($row['total_invoice'] != null && $row['total_invoice'] != $row['jr_montant']) - $t_amount=$row['total_invoice']; - $tot = ($positive != 0) ? bcsub($tot , $t_amount ): bcadd($tot , $t_amount); - //STAN $positive always == 0 - if ($row [ 'jrn_def_type']=='FIN') - { - $r.=( $positive != 0 ) ? " - " . nbm($t_amount) . "" : nbm($t_amount); - } - else - { - $r.=( $t_amount < 0 ) ? " " . nbm($t_amount) . "" : nbm($t_amount); - } - $r.="' . $w->input() . $h->input() . '"; - if ($a != null) - { - - foreach ($a as $key => $element) - { - $operation = new Acc_Operation($this->db); - $operation->jr_id = $element; - $l_amount = $this->db->get_value("select jr_montant from jrn " . - " where jr_id=$element"); - $r.= " " . $operation->get_internal() . "[" . nbm($l_amount) . "]"; - }//for - }// if ( $a != null ) { - $r.=""._("Opération annulée")."'.HtmlInput::show_receipt_document($row['jr_id']).'
    Total' . nbm($tot) . "
    '._("Payé").'' . nbm($amount_paid) . "
    '._("Non payé").'' . nbm($amount_unpaid) . "
    "; - - return array($count, $r); - } - - /** - * @brief get_detail gives the detail of row - * this array must contains at least the field - *
      - *
    • montant
    • - *
    • grpt_id - *
    - * the following field will be added - *
      - *
    • HTVA - *
    • TVAC - *
    • TVA array with - *
        - *
      • field 0 idx - *
      • array containing tva_id,tva_label and tva_amount - *
      - *
    - * - * @paramp_array the structure is set in get_rowSimple, this array is - * modified, - * @param $trunc if the data must be truncated, usefull for pdf export - * @paramp_jrn_type is the type of the ledger (ACH or VEN) - * @param $a_TVA TVA Array (default null) - * @param $a_ParmCode Array (default null) - * \return p_array - */ - - function get_detail(&$p_array, $p_jrn_type, $trunc = 0, $a_TVA = null, $a_ParmCode = null) - { - bcscale(2); - - if ($a_TVA == null) - { - //Load TVA array - $a_TVA = $this->db->get_array('select tva_id,tva_label,tva_poste - from tva_rate where tva_rate != 0 order by tva_rate,tva_label,tva_id'); - } - if ($a_ParmCode == null) - { - //Load Parm_code - $a_ParmCode = $this->db->get_array('select p_code,p_value from parm_code'); - } - // init - $p_array['client'] = ""; - $p_array['TVAC'] = 0; - $p_array['TVA'] = array(); - $p_array['AMOUNT_TVA'] = 0.0; - $p_array['dep_priv'] = 0; - $p_array['dna'] = 0; - $p_array['tva_dna'] = 0; - $p_array['tva_np'] = 0; - $dep_priv = 0.0; - - // - // Retrieve data from jrnx - $sql = "select j_id,j_poste,j_montant, j_debit,j_qcode from jrnx where " . - " j_grpt=" . $p_array['grpt_id']; - $Res2 = $this->db->exec_sql($sql); - $data_jrnx = Database::fetch_all($Res2); - $c = 0; - - // Parse data from jrnx and fill diff. field - foreach ($data_jrnx as $code) - { - $idx_tva = 0; - $poste = new Acc_Account_Ledger($this->db, $code['j_poste']); - - // if card retrieve name if the account is not a VAT account - if (strlen(trim($code['j_qcode'])) != 0 && $poste->isTva() == 0) - { - $fiche = new Fiche($this->db); - $fiche->get_by_qcode(trim($code['j_qcode']), false); - $fiche_def_id = $fiche->get_fiche_def_ref_id(); - // Customer or supplier - if ($fiche_def_id == FICHE_TYPE_CLIENT || - $fiche_def_id == FICHE_TYPE_FOURNISSEUR - ||$fiche_def_id == FICHE_TYPE_ADM_TAX) - { - $p_array['TVAC'] = $code['j_montant']; - - $p_array['client'] = ($trunc == 0) ? $fiche->getName() : mb_substr($fiche->getName(), 0, 20); - $p_array['reversed'] = false; - if ($fiche_def_id == FICHE_TYPE_CLIENT && $code['j_debit'] == 'f') - { - $p_array['reversed'] = true; - $p_array['TVAC']*=-1; - } - if ($fiche_def_id == FICHE_TYPE_ADM_TAX && $code['j_debit'] == 'f') - { - $p_array['reversed'] = true; - $p_array['TVAC']*=-1; - } - if ($fiche_def_id == FICHE_TYPE_FOURNISSEUR && $code['j_debit'] == 't') - { - $p_array['reversed'] = true; - $p_array['TVAC']*=-1; - } - } - else - { - // if we use the ledger ven / ach for others card than supplier and customer - if ($fiche_def_id != FICHE_TYPE_VENTE && - $fiche_def_id != FICHE_TYPE_ACH_MAR && - $fiche_def_id != FICHE_TYPE_ACH_SER && - $fiche_def_id != FICHE_TYPE_ACH_MAT - ) - { - $p_array['TVAC'] = $code['j_montant']; - - $p_array['client'] = ($trunc == 0) ? $fiche->getName() : mb_substr($fiche->getName(), 0, 20); - $p_array['reversed'] = false; - if ($p_jrn_type == 'ACH' && $code['j_debit'] == 't') - { - $p_array['reversed'] = true; - $p_array['TVAC']*=-1; - } - if ($p_jrn_type == 'VEN' && $code['j_debit'] == 'f') - { - $p_array['reversed'] = true; - $p_array['TVAC']*=-1; - } - } - } - } - // if TVA, load amount, tva id and rate in array - foreach ($a_TVA as $line_tva) - { - list($tva_deb, $tva_cred) = explode(',', $line_tva['tva_poste']); - if ($code['j_poste'] == $tva_deb || - $code['j_poste'] == $tva_cred) - { - - // For the reversed operation - if ($p_jrn_type == 'ACH' && $code['j_debit'] == 'f') - { - $code['j_montant'] = -1 * $code['j_montant']; - } - if ($p_jrn_type == 'VEN' && $code['j_debit'] == 't') - { - $code['j_montant'] = -1 * $code['j_montant']; - } - - $p_array['AMOUNT_TVA']+=$code['j_montant']; - - $p_array['TVA'][$c] = array($idx_tva, array($line_tva['tva_id'], $line_tva['tva_label'], $code['j_montant'])); - $c++; - - $idx_tva++; - } - } - - // isDNA - // If operation is reversed then amount are negatif - /* if ND */ - if ($p_array['jrn_def_type'] == 'ACH') - { - $purchase = new Gestion_Purchase($this->db); - $purchase->search_by_jid($code['j_id']); - $purchase->load(); - $dep_priv+=$purchase->qp_dep_priv; - $p_array['dep_priv'] = $dep_priv; - $p_array['dna']=bcadd($p_array['dna'],$purchase->qp_nd_amount); - $p_array['tva_dna']=bcadd($p_array['tva_dna'],bcadd($purchase->qp_nd_tva,$purchase->qp_nd_tva_recup)); - $p_array['tva_np']=bcadd($purchase->qp_vat_sided,$p_array['tva_np']); - } - if ($p_array['jrn_def_type'] == 'VEN') { - $sold=new gestion_sold($this->db); - $sold->search_by_jid($code['j_id']); - $sold->load(); - $p_array['tva_np']=bcadd($sold->qs_vat_sided,$p_array['tva_np']); - } - - - } - $p_array['TVAC'] = sprintf('% 10.2f', $p_array['TVAC'] ); - $p_array['HTVA'] = sprintf('% 10.2f', $p_array['TVAC'] - $p_array['AMOUNT_TVA']-$p_array['tva_dna']); - $r = ""; - $a_tva_amount = array(); - // inline TVA (used for the PDF) - foreach ($p_array['TVA'] as $linetva) - { - foreach ($a_TVA as $tva) - { - if ($tva['tva_id'] == $linetva[1][0]) - { - $a = $tva['tva_id']; - $a_tva_amount[$a] = $linetva[1][2]; - } - } - } - foreach ($a_TVA as $line_tva) - { - $a = $line_tva['tva_id']; - if (isset($a_tva_amount[$a])) - { - $tmp = sprintf("% 10.2f", $a_tva_amount[$a]); - $r.="$tmp"; - } - else - $r.=sprintf("% 10.2f", 0); - } - $p_array['TVA_INLINE'] = $r; - - return $p_array; - } - -// retrieve data from jrnx - /** - * @brief Get the properties of a journal - * - * \return an array containing properties - * - */ - - function get_propertie() - { - if ($this->id == 0) - return; - - $Res = $this->db->exec_sql("select jrn_Def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_def_type, - jrn_deb_max_line,jrn_cred_max_line,jrn_def_ech,jrn_def_ech_lib,jrn_def_code, - jrn_def_fiche_deb,jrn_def_fiche_cred,jrn_def_pj_pref - from jrn_Def - where jrn_def_id=$1", array($this->id)); - $Count = Database::num_row($Res); - if ($Count == 0) - { - echo '

    ' . _('Parametres journaux non trouves') . '

  • '; - return null; - } - return Database::fetch_array($Res, 0); - } - - /** \function GetDefLine - * @brief Get the number of lines of a journal - * @param$p_cred deb or cred - * - * \return an integer - */ - - function GetDefLine() - { - $sql_cred = 'jrn_deb_max_line'; - $sql = "select jrn_deb_max_line as value from jrn_def where jrn_def_id=$1"; - $r = $this->db->exec_sql($sql, array($this->id)); - $Res = Database::fetch_all($r); - if (sizeof($Res) == 0) - return 1; - return $Res[0]['value']; - } - - /** - * @brief get the saldo of a ledger for a specific period - * @param$p_from start period - * @param$p_to end period - */ - - function get_solde($p_from, $p_to) - { - $ledger = ""; - if ($this->id != 0) - { - $ledger = " and j_jrn_def = " . $this->id; - } - - $periode = sql_filter_per($this->db, $p_from, $p_to, 'p_id', 'j_tech_per'); - $sql = 'select j_montant as montant,j_debit as deb from jrnx where ' - . $periode . $ledger; - - $ret = $this->db->exec_sql($sql); - $array = Database::fetch_all($ret); - $deb = 0.0; - $cred = 0.0; - foreach ($array as $line) - { - - if ($line['deb'] == 't') - $deb+=$line['montant']; - else - $cred+=$line['montant']; - } - $response = array($deb, $cred); - return $response; - } - - /** - * @brief Show a select list of the ledgers you can access in - * writing, reading or simply accessing. - * @param$p_type = ALL or the type of the ledger (ACH,VEN,FIN,ODS) - * @param$p_access =3 for READ and WRITE, 2 for write and 1 for readonly - * \return object HtmlInput select - */ - - function select_ledger($p_type = "ALL", $p_access = 3) - { - global $g_user; - $array = $g_user->get_ledger($p_type, $p_access); - - if ($array == null) - return null; - $idx = 0; - $ret = array(); - - foreach ($array as $value) - { - $ret[$idx]['value'] = $value['jrn_def_id']; - $ret[$idx]['label'] = h($value['jrn_def_name']); - $idx++; - } - - $select = new ISelect(); - $select->name = 'p_jrn'; - $select->value = $ret; - $select->selected = $this->id; - return $select; - } - - /** - * @brief retrieve the jrn_def_fiche and return them into a array - * index deb, cred - * \param - * \param - * \param - * - * - * \return return an array ('deb'=> ,'cred'=>) - */ - - function get_fiche_def() - { - $sql = "select jrn_def_fiche_deb as deb,jrn_def_fiche_cred as cred " . - " from jrn_def where " . - " jrn_def_id = $1 "; - - $r = $this->db->exec_sql($sql, array($this->id)); - - $res = Database::fetch_all($r); - if (empty($res)) - return null; - - return $res[0]; - } - - /** - * @brief retrieve the jrn_def_class_deb and return it - * - * - * \return return an string - */ - - function get_class_def() - { - $sql = "select jrn_def_class_deb " . - " from jrn_def where " . - " jrn_def_id = $1"; - - $r = $this->db->exec_sql($sql, array($this->id)); - - $res = Database::fetch_all($r); - - if (empty($res)) - return null; - - return $res[0]; - } - - /** - * @brief show the result of the array to confirm - * before inserting - * @param$p_array array from the form - * \return string - */ - - function confirm($p_array, $p_readonly = false) - { - global $g_parameter; - $msg = array(); - if (!$p_readonly) - $msg = $this->verify($p_array); - $this->id = $p_array['p_jrn']; - if (empty($p_array)) - return 'Aucun résultat'; - $anc = null; - extract($p_array); - $lPeriode = new Periode($this->db); - if ($this->check_periode() == true) - { - $lPeriode->p_id = $period; - } - else - { - $lPeriode->find_periode($e_date); - } - $total_deb = 0; - $total_cred = 0; - bcscale(2); - - $ret = ""; - if (!empty($msg)) - { - $ret.=$this->display_warning($msg, _("Attention : il vaut mieux utiliser les fiches que les postes comptables")); - } - $ret.=""; - $ret.=""; - /* display periode */ - $date_limit = $lPeriode->get_date_limit(); - $ret.=' ' . td(_('Période Comptable')) . td($date_limit['p_start'] . '-' . $date_limit['p_end']) . ''; - $ret.=""; - $ret.=""; - $ret.='
    " . _('Date') . " : $e_date
    " . _('Libellé') . " " . h($desc) . "
    " . _('PJ Num') . " " . h($e_pj) . "
    '; - $ret.=""; - $ret.=""; - $ret.=""; - $ret.=""; - $ret.=""; - $ret.=""; - /* if we use the AC */ - if ($g_parameter->MY_ANALYTIC != 'nu') - { - $anc = new Anc_Plan($this->db); - $a_anc = $anc->get_list(); - $x = count($a_anc); - /* set the width of the col */ - $ret.=''; - - /* add hidden variables pa[] to hold the value of pa_id */ - $ret.=Anc_Plan::hidden($a_anc); - } - $ret.=""; - - $ret.=HtmlInput::hidden('e_date', $e_date); - $ret.=HtmlInput::hidden('desc', $desc); - $ret.=HtmlInput::hidden('period', $lPeriode->p_id); - $ret.=HtmlInput::hidden('e_pj', $e_pj); - $ret.=HtmlInput::hidden('e_pj_suggest', $e_pj_suggest); - $mt = microtime(true); - $ret.=HtmlInput::hidden('mt', $mt); - // For predefined operation - $ret.=HtmlInput::hidden('e_comm', $desc); - $ret.=HtmlInput::hidden('jrn_type', $this->get_type()); - $ret.=HtmlInput::hidden('p_jrn', $this->id); - $ret.=HtmlInput::hidden('nb_item', $nb_item); - if ($this->with_concerned == true) - { - $ret.=HtmlInput::hidden('jrn_concerned', $jrn_concerned); - } - $ret.=dossier::hidden(); - $count = 0; - for ($i = 0; $i < $nb_item; $i++) - { - if ($p_readonly == true) - { - if (!isset(${'qc_' . $i})) - ${'qc_' . $i} = ''; - if (!isset(${'poste' . $i})) - ${'poste' . $i} = ''; - if (!isset(${'amount' . $i})) - ${'amount' . $i} = ''; - } - $class=($i%2==0)?' class="even" ':' class="odd" '; - $ret.=" "; - if (trim(${'qc_' . $i}) != "") - { - $oqc = new Fiche($this->db); - $oqc->get_by_qcode(${'qc_' . $i}, false); - $strPoste = $oqc->strAttribut(ATTR_DEF_ACCOUNT); - $ret.="'; - } - - if (trim(${'qc_' . $i}) == "" && trim(${'poste' . $i}) != "") - { - $oposte = new Acc_Account_Ledger($this->db, ${'poste' . $i}); - $strPoste = $oposte->id; - $ret.="'; - } - - if (trim(${'qc_' . $i}) == "" && trim(${'poste' . $i}) == "") - continue; - $ret.=""; - if (isset(${"ck$i"})) - { - $ret.="" . td(""); - $total_deb = bcadd($total_deb, ${'amount' . $i}); - } - else - { - $ret.=td("") . ""; - $total_cred = bcadd($total_cred, ${"amount" . $i}); - } - /*$ret.="";*/ - // CA - - if ($g_parameter->MY_ANALYTIC != 'nu') // use of AA - { - if (preg_match("/^[6,7]+/", $strPoste) == 1) - { - // show form - $op = new Anc_Operation($this->db); - $null = ($g_parameter->MY_ANALYTIC == 'op') ? 1 : 0; - $p_array['pa_id'] = $a_anc; - /* op is the operation it contains either a sequence or a jrnx.j_id */ - $ret.=HtmlInput::hidden('op[]=', $i); - - $ret.=''; - $count++; - } - } - - - - $ret.=""; - } - $ret.=tr(td('') . td(_('Totaux')) . td($total_deb, 'class="num"') . td($total_cred, 'class="num"'), 'class="highlight"'); - $ret.="
    " . _('Quick Code ou '); - $ret.=_("Poste") . " " . _("Libellé") . " " . _("Débit") . "" . _("Crédit") . "' . _('Compt. Analytique') . '
    " . - ${'qc_' . $i} . ' - ' . - $oqc->strAttribut(ATTR_DEF_NAME) . HtmlInput::hidden('qc_' . $i, ${'qc_' . $i}) . - '" . h(${"poste" . $i} . " - " . - $oposte->get_name()) . HtmlInput::hidden('poste' . $i, ${'poste' . $i}) . - '" . h(${"ld" . $i}) . HtmlInput::hidden('ld' . $i, ${'ld' . $i}) ; - $ret .=(isset(${"ck$i"})) ? HtmlInput::hidden('ck' . $i, ${'ck' . $i}) : ""; - $ret .= "" . nbm(${"amount" . $i}) . HtmlInput::hidden('amount' . $i, ${'amount' . $i}) . "" . nbm(${"amount" . $i}) . HtmlInput::hidden('amount' . $i, ${'amount' . $i}) . ""; - $ret.=(isset(${"ck$i"})) ? HtmlInput::hidden('ck' . $i, ${'ck' . $i}) : ""; - $ret.="'; - $read = ($p_readonly == true) ? 0 : 1; - $ret.=$op->display_form_plan($p_array, $null, $read, $count, round(${'amount' . $i}, 2)); - $ret.='
    "; - if ($g_parameter->MY_ANALYTIC != 'nu' && $p_readonly == false) - $ret.=''; - return $ret; - } - function get_min_row() - { - $row=$this->db->get_value("select jrn_deb_max_line from jrn_def where jrn_def_id=$1",array($this->id)); - return $row; - } - /** - * @brief Show the form to encode your operation - * @param$p_array if you correct or use a predef operation (default = null) - * @param$p_readonly 1 for readonly 0 for writable (default 0) - *@exception if ledger not found - * \return a string containing the form - */ - - function input($p_array = null, $p_readonly = 0) - { - global $g_parameter, $g_user; - $this->nb=$this->get_min_row(); - if ($p_readonly == 1) - return $this->confirm($p_array); - - if ($p_array != null) - extract($p_array); - $add_js = ""; - if ($g_parameter->MY_PJ_SUGGEST == 'Y') - { - $add_js = "update_pj();"; - } - if ($g_parameter->MY_DATE_SUGGEST=='Y') - { - $add_js.='get_last_date();'; - } - $add_js.='update_row("quick_item");'; - $ret = ""; - if ($g_user->check_action(FICADD) == 1) - { - /* Add button */ - $f_add_button = new IButton('add_card'); - $f_add_button->label = _('Créer une nouvelle fiche'); - $f_add_button->set_attribute('ipopup', 'ipop_newcard'); - $f_add_button->set_attribute('jrn', $this->id); - $f_add_button->javascript = " this.jrn=\$('p_jrn').value;select_card_type(this);"; - $f_add_button->input(); - } - $wLedger = $this->select_ledger('ODS', 2); - if ($wLedger == null) - throw new Exception(_('Pas de journal disponible')); - $wLedger->javascript = "onChange='update_name();update_predef(\"ods\",\"t\",\"".$_REQUEST['ac']."\");$add_js'"; - $label = " Journal " . HtmlInput::infobulle(2); - - $ret.=$label . $wLedger->input(); - - - // Load the javascript - // - $ret.=""; - $ret.= ''; - /* insert periode if needed */ - // Periode - //-- - if ($this->check_periode() == true) - { - $l_user_per = $g_user->get_periode(); - $def = (isset($periode)) ? $periode : $l_user_per; - - $period = new IPeriod("period"); - $period->user = $g_user; - $period->cn = $this->db; - $period->value = $def; - $period->type = OPEN; - try - { - $l_form_per = $period->input(); - } - catch (Exception $e) - { - if ($e->getCode() == 1) - { - echo _("Aucune période ouverte"); - exit(); - } - } - $label = HtmlInput::infobulle(3); - $f_periode = _("Période comptable") . " $label " . $l_form_per; - $ret.=td($f_periode); - } - $wPJ = new IText('e_pj'); - $wPJ->readonly = false; - $wPJ->size = 10; - - /* suggest PJ ? */ - $default_pj = ''; - if ($g_parameter->MY_PJ_SUGGEST == 'Y') - { - $default_pj = $this->guess_pj(); - } - $wPJ->value = (isset($e_pj)) ? $e_pj : $default_pj; - $ret.= ''; - $ret.=''; - $ret.=''; - $ret.= ''; - - $ret.= ''; - $ret.=''; - $ret.=''; - - $ret.= '
    '; - $wDate = new IDate('e_date'); - $wDate->readonly = $p_readonly; - $e_date = (isset($e_date) && trim($e_date) != '') ? $e_date : ''; - $wDate->value = $e_date; - - $ret.=_("Date") . ' : ' . $wDate->input(); - $ret.= '
    ' . _('Pièce') . ' : ' . $wPJ->input(); - $ret.=HtmlInput::hidden('e_pj_suggest', $default_pj); - $ret.= '
    '; - $ret.=_('Libellé'); - $wDescription = new IText('desc'); - $wDescription->readonly = $p_readonly; - $wDescription->size = "50"; - $wDescription->value = (isset($desc)) ? $desc : ''; - - $ret.=$wDescription->input(); - $ret.= '
    '; - $nb_row = (isset($nb_item) ) ? $nb_item : $this->nb; - - $ret.=HtmlInput::hidden('nb_item', $nb_row); - $ret.=dossier::hidden(); - - $ret.=dossier::hidden(); - - $ret.=HtmlInput::hidden('jrn_type', $this->get_type()); - $info = HtmlInput::infobulle(0); - $info_poste = HtmlInput::infobulle(9); - if ($g_user->check_action(FICADD) == 1) - $ret.=$f_add_button->input(); - $ret.=''; - $ret.='' . - '' . - '' . - '' . - '' . - '' . - ''; - - - for ($i = 0; $i < $nb_row; $i++) - { - // Quick Code - $quick_code = new ICard('qc_' . $i); - $quick_code->set_dblclick("fill_ipopcard(this);"); - $quick_code->set_attribute('ipopup', 'ipopcard'); - - // name of the field to update with the name of the card - $quick_code->set_attribute('label', "ld" . $i); - - // name of the field to update with the name of the card - $quick_code->set_attribute('typecard', 'filter'); - - // Add the callback function to filter the card on the jrn - $quick_code->set_callback('filter_card'); - $quick_code->set_function('fill_data'); - $quick_code->javascript = sprintf(' onchange="fill_data_onchange(\'%s\');" ', $quick_code->name); - - $quick_code->value = (isset(${'qc_' . $i})) ? ${'qc_' . $i} : ""; - $quick_code->readonly = $p_readonly; - - $label = ''; - if ($quick_code->value != '') - { - $Fiche = new Fiche($this->db); - $Fiche->get_by_qcode($quick_code->value); - $label = $Fiche->strAttribut(ATTR_DEF_NAME); - } - - - // Account - $poste = new IPoste(); - $poste->name = 'poste' . $i; - $poste->set_attribute('jrn', $this->id); - $poste->set_attribute('ipopup', 'ipop_account'); - $poste->set_attribute('label', 'ld' . $i); - $poste->set_attribute('account', 'poste' . $i); - $poste->set_attribute('dossier', Dossier::id()); - - $poste->value = (isset(${'poste' . $i})) ? ${"poste" . $i} : '' - ; - $poste->dbl_click_history(); - - $poste->readonly = $p_readonly; - - if ($poste->value != '') - { - $Poste = new Acc_Account($this->db); - $Poste->set_parameter('value', $poste->value); - $label = $Poste->get_lib(); - } - - // Description of the line - $line_desc = new IText(); - $line_desc->name = 'ld' . $i; - $line_desc->size = 30; - $line_desc->value = (isset(${"ld" . $i})) ? ${"ld" . $i} : - $label; - - // Amount - $amount = new INum(); - $amount->size = 10; - $amount->name = 'amount' . $i; - $amount->value = (isset(${'amount' . $i})) ? ${"amount" . $i} : '' - ; - $amount->readonly = $p_readonly; - $amount->javascript = ' onChange="format_number(this);checkTotalDirect()"'; - // D/C - $deb = new ICheckBox(); - $deb->name = 'ck' . $i; - $deb->selected = (isset(${'ck' . $i})) ? true : false; - $deb->readonly = $p_readonly; - $deb->javascript = ' onChange="checkTotalDirect()"'; - - $ret.=''; - $ret.=''; - $ret.=''; - $ret.=''; - $ret.=''; - $ret.=''; - $ret.=''; - // If readonly == 1 then show CA - } - $ret.='
    Quickcode' . $info . '' . _('Poste') . $info_poste . '' . _('Libellé') . '' . _('Montant') . '' . _('Débit') . '
    ' . $quick_code->input() . $quick_code->search() . '' . $poste->input() . - '' . - '' . $line_desc->input() . '' . $amount->input() . '' . $deb->input() . '
    '; - if (isset($this->with_concerned) && $this->with_concerned == true) - { - $oRapt = new Acc_Reconciliation($this->db); - $w = $oRapt->widget(); - $w->name = 'jrn_concerned'; - $w->value = (isset($jrn_concerned)) ? $jrn_concerned : ""; - $ret.="Réconciliation/rapprochements : " . $w->input(); - } - $ret.= create_script("$('".$wDate->id."').focus()"); - return $ret; - } - - /** - * @brief - * check if the current ledger is closed - * \return 1 for yes, otherwise 0 - * \see Periode::is_closed - */ - - function is_closed($p_periode) - { - $per = new Periode($this->db); - $per->set_jrn($this->id); - $per->set_periode($p_periode); - $ret = $per->is_closed(); - return $ret; - } - - /** - * @brief verify that the operation can be saved - * @param$p_array array of data same layout that the $_POST from show_form - * - * - * \throw the getcode value is 1 incorrect balance, 2 date - * invalid, 3 invalid amount, 4 the card is not in the range of - * permitted card, 5 not in the user's period, 6 closed period - * - */ - - function verify($p_array) - { - if (is_array($p_array ) == false || empty($p_array)) - throw new Exception ("Array empty"); - /* - * Check needed value - */ - check_parameter($p_array,'p_jrn,e_date'); - - extract($p_array); - global $g_user; - $tot_cred = 0; - $tot_deb = 0; - $msg = array(); - - /* check if we can write into this ledger */ - if ($g_user->check_jrn($p_jrn) != 'W') - throw new Exception(_('Accès interdit'), 20); - - /* check for a double reload */ - if (isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1', array($mt)) != 0) - throw new Exception('Double Encodage', 5); - - // Check the periode and the date - if (isDate($e_date) == null) - { - throw new Exception('Date invalide', 2); - } - $periode = new Periode($this->db); - /* find the periode if we have enabled the check_periode */ - if ($this->check_periode() == false) - { - $periode->find_periode($e_date); - } - else - { - $periode->p_id = $period; - list ($min, $max) = $periode->get_date_limit(); - if (cmpDate($e_date, $min) < 0 || - cmpDate($e_date, $max) > 0) - throw new Exception(_('Date et periode ne correspondent pas'), 6); - } - - - - // Periode ferme - if ($this->is_closed($periode->p_id) == 1) - { - throw new Exception('Periode fermee', 6); - } - /* check if we are using the strict mode */ - if ($this->check_strict() == true) - { - /* if we use the strict mode, we get the date of the last - operation */ - $last_date = $this->get_last_date(); - if ($last_date != null && cmpDate($e_date, $last_date) < 0) - throw new Exception(_('Vous utilisez le mode strict la dernière operation est la date du ') - . $last_date . ' ' . _('vous ne pouvez pas encoder à une date antérieure'), 15); - } - - for ($i = 0; $i < $nb_item; $i++) - { - $err = 0; - - // Check the balance - if (!isset(${'amount' . $i})) - continue; - - $amount = round(${'amount' . $i}, 2); - $tot_deb+=(isset(${'ck' . $i})) ? $amount : 0; - $tot_cred+=(!isset(${'ck' . $i})) ? $amount : 0; - - // Check if the card is permitted - if (isset(${'qc_' . $i}) && trim(${'qc_' . $i}) != "") - { - $f = new Fiche($this->db); - $f->quick_code = ${'qc_' . $i}; - if ($f->belong_ledger($p_jrn) < 0) - throw new Exception("La fiche quick_code = " . - $f->quick_code . " n'est pas dans ce journal", 4); - if (strlen(trim(${'qc_' . $i})) != 0 && isNumber(${'amount' . $i}) == 0) - throw new Exception('Montant invalide', 3); - - $strPoste = $f->strAttribut(ATTR_DEF_ACCOUNT); - if ($strPoste == '') - throw new Exception(sprintf(_("La fiche %s n'a pas de poste comptable"), ${"qc_" . $i})); - - $p = new Acc_Account_Ledger($this->db, $strPoste); - if ($p->do_exist() == 0) - throw new Exception(_('Poste Inexistant pour la fiche [' . ${'qc_' . $i} . ']'), 4); - } - - // Check if the account is permitted - if (isset(${'poste' . $i}) && strlen(trim(${'poste' . $i})) != 0) - { - $p = new Acc_Account_Ledger($this->db, ${'poste' . $i}); - if ($p->belong_ledger($p_jrn) < 0) - throw new Exception(_("Le poste") . " " . $p->id . " " . _("n'est pas dans ce journal"), 5); - if (strlen(trim(${'poste' . $i})) != 0 && isNumber(${'amount' . $i}) == 0) - throw new Exception(_('Poste invalide [' . ${'poste' . $i} . ']'), 3); - if ($p->do_exist() == 0) - throw new Exception(_('Poste Inexistant [' . ${'poste' . $i} . ']'), 4); - $card_id = $p->find_card(); - if (!empty($card_id)) - { - $str_msg = " Le poste " . $p->id . " appartient à " . count($card_id) . " fiche(s) dont :"; - $max = (count($card_id) > MAX_COMPTE_CARD) ? MAX_COMPTE_CARD : count($card_id); - for ($x = 0; $x < $max; $x++) - { - $card = new Fiche($this->db, $card_id[$x]['f_id']); - $str_msg.=HtmlInput::card_detail($card->strAttribut(ATTR_DEF_QUICKCODE), $card->strAttribut(ATTR_DEF_NAME), 'style="color:red;display:inline;text-decoration:underline"'); - $str_msg.=" "; - } - $msg[] = $str_msg; - } - } - } - $tot_deb = round($tot_deb, 4); - $tot_cred = round($tot_cred, 4); - if ($tot_deb != $tot_cred) - { - throw new Exception(_("Balance incorrecte ") . " debit = $tot_deb credit=$tot_cred ", 1); - } - - return $msg; - } - - /** - * @brief compute the internal code of the saved operation and set the $this->jr_internal to - * the computed value - * - * @param$p_grpt id in jr_grpt_ - * - * \return string internal_code - * - - * - */ - - function compute_internal_code($p_grpt) - { - if ($this->id == 0) - return; - $num = $this->db->get_next_seq('s_internal'); - $atype = $this->get_propertie(); - $type = substr($atype['jrn_def_code'], 0, 1); - $internal_code = sprintf("%s%06X", $type, $num); - $this->jr_internal = $internal_code; - return $internal_code; - } - - /** - * @brief save the operation into the jrnx,jrn, , - * CA and pre_def - * @param$p_array - * - * \return array with [0] = false if failed otherwise true, [1] error - * code - */ - - function save($p_array = null) - { - if ($p_array == null) - throw new Exception('save cannot use a empty array'); - global $g_parameter; - extract($p_array); - try - { - $msg = $this->verify($p_array); - if (!empty($msg)) - { - echo $this->display_warning($msg, _("Attention : il vaut mieux utiliser les fiches que les postes comptables ")); - } - $this->db->start(); - - $seq = $this->db->get_next_seq('s_grpt'); - $internal = $this->compute_internal_code($seq); - - $group = $this->db->get_next_seq("s_oa_group"); - $tot_amount = 0; - $tot_deb = 0; - $tot_cred = 0; - $oPeriode = new Periode($this->db); - $check_periode = $this->check_periode(); - if ($check_periode == false) - { - $oPeriode->find_periode($e_date); - } - else - { - $oPeriode->id = $period; - } - - $count = 0; - for ($i = 0; $i < $nb_item; $i++) - { - if (!isset(${'qc_' . $i}) && !isset(${'poste' . $i})) - continue; - $acc_op = new Acc_Operation($this->db); - $quick_code = ""; - // First we save the jrnx - if (isset(${'qc_' . $i})) - { - $qc = new Fiche($this->db); - $qc->get_by_qcode(${'qc_' . $i}, false); - $sposte = $qc->strAttribut(ATTR_DEF_ACCOUNT); - /* if there are 2 accounts take following the deb or cred */ - if (strpos($sposte, ',') != 0) - { - $array = explode(",", $sposte); - $poste = (isset(${'ck' . $i})) ? $array[0] : $array[1]; - } - else - { - $poste = $sposte; - if ($poste == '') - throw new Exception(sprintf(_("La fiche %s n'a pas de poste comptable"), ${"qc_" . $i})); - } - $quick_code = ${'qc_' . $i}; - } - else - { - $poste = ${'poste' . $i}; - } - - $acc_op->date = $e_date; - // compute the periode is do not check it - if ($check_periode == false) - $acc_op->periode = $oPeriode->p_id; - $acc_op->desc = null; - if (strlen(trim(${'ld' . $i})) != 0) - $acc_op->desc = ${'ld' . $i}; - $acc_op->amount = round(${'amount' . $i}, 2); - $acc_op->grpt = $seq; - $acc_op->poste = $poste; - $acc_op->jrn = $this->id; - $acc_op->type = (isset(${'ck' . $i})) ? 'd' : 'c'; - $acc_op->qcode = $quick_code; - $j_id = $acc_op->insert_jrnx(); - $tot_amount+=round($acc_op->amount, 2); - $tot_deb+=($acc_op->type == 'd') ? $acc_op->amount : 0; - $tot_cred+=($acc_op->type == 'c') ? $acc_op->amount : 0; - if ($g_parameter->MY_ANALYTIC != "nu") - { - if (preg_match("/^[6,7]+/", $poste) == 1) - { - - // for each item, insert into operation_analytique */ - $op = new Anc_Operation($this->db); - $op->oa_group = $group; - $op->j_id = $j_id; - $op->oa_date = $e_date; - $op->oa_debit = ($acc_op->type == 'd' ) ? 't' : 'f'; - $op->oa_description = $desc; - $op->save_form_plan($p_array, $count, $j_id); - $count++; - } - } - }// loop for each item - $acc_end = new Acc_Operation($this->db); - $acc_end->amount = $tot_deb; - if ($check_periode == false) - $acc_end->periode = $oPeriode->p_id; - $acc_end->date = $e_date; - $acc_end->desc = $desc; - $acc_end->grpt = $seq; - $acc_end->jrn = $this->id; - $acc_end->mt = $mt; - $jr_id = $acc_end->insert_jrn(); - $this->jr_id = $jr_id; - if ($jr_id == false) - throw new Exception(_('Balance incorrecte')); - $acc_end->pj = $e_pj; - - /* if e_suggest != e_pj then do not increment sequence */ - if (strcmp($e_pj, $e_pj_suggest) == 0 && strlen(trim($e_pj)) != 0) - { - $this->inc_seq_pj(); - } - - $this->pj = $acc_end->set_pj(); - - $this->db->exec_sql("update jrn set jr_internal='" . $internal . "' where " . - " jr_grpt_id = " . $seq); - $this->internal = $internal; - // Save now the predef op - //------------------------ - if (isset ($opd_name) && trim($opd_name) != "" ){ - $opd = new Pre_Op_Advanced($this->db); - $opd->get_post(); - $opd->save(); - } - - if (isset($this->with_concerned) && $this->with_concerned == true) - { - $orap = new acc_reconciliation($this->db); - $orap->jr_id = $jr_id; - - $orap->insert($jrn_concerned); - } - /** - * Save the file is any - */ - if (isset($_FILES["pj"])) - { - $this->db->save_upload_document($seq); - } - - } - catch (Exception $a) - { - throw $a; - } - catch (Exception $e) - { - $this->db->rollback(); - echo _('OPERATION ANNULEE '); - echo '
    '; - echo __FILE__ . __LINE__ . $e->getMessage(); - exit(); - } - $this->db->commit(); - return true; - } - - /** - * @brief get all the data from request and build the object - */ - - function get_request() - { - $this->id = $_REQUEST['p_jrn']; - } - - /** - * @brief retrieve the next number for this type of ledger - * @paramp_cn connx - * @paramp_type ledger type - * - * \return the number - * - * - */ - - static function next_number($p_cn, $p_type) - { - - $Ret = $p_cn->count_sql("select * from jrn_def where jrn_def_type='" . $p_type . "'"); - return $Ret + 1; - } - - /** - * @brief get the first ledger - * @paramthe type - * \return the j_id - */ - - public function get_first($p_type, $p_access = 3) - { - global $g_user; - $all = $g_user->get_ledger($p_type, $p_access); - return $all[0]; - } - - /** - * @brief Update the paiment in the list of operation - * @param$p_array is normally $_GET - */ - - function update_paid($p_array) - { - // reset all the paid flag because the checkbox is post only - // when checked - foreach ($p_array as $name => $paid) - { - list($ad) = sscanf($name, "set_jr_id%d"); - if ($ad == null) - continue; - $sql = "update jrn set jr_rapt='' where jr_id=$ad"; - $Res = $this->db->exec_sql($sql); - } - // set a paid flag for the checked box - foreach ($p_array as $name => $paid) - { - list ($id) = sscanf($name, "rd_paid%d"); - if ($id == null) - continue; - - $sql = "update jrn set jr_rapt='paid' where jr_id=$id"; - $Res = $this->db->exec_sql($sql); - } - } - - function update_internal_code($p_internal) - { - if (!isset($this->grpt_id)) - throw new Exception(('ERREUR ' . __FILE__ . ":" . __LINE__)); - $Res = $this->db->exec_sql("update jrn set jr_internal='" . $p_internal . "' where " . - " jr_grpt_id = " . $this->grpt_id); - } - /** - * Return an array of default card for the ledger type given - * - * @param $p_ledger_type VEN ACH ODS or FIN - * @param $p_side D for Debit or C for credit or NA No Applicable - */ - function get_default_card($p_ledger_type,$p_side) - { - $array=array(); - $fiche_def_ref=new Fiche_Def_Ref($this->db); - // ----- for FINANCIAL ---- - if ($p_ledger_type =='FIN') - { - $array=$fiche_def_ref->get_by_modele(FICHE_TYPE_CLIENT); - $array=array_merge ( $array , $fiche_def_ref->get_by_modele(FICHE_TYPE_FOURNISSEUR)); - $array=array_merge ( $array , $fiche_def_ref->get_by_modele(FICHE_TYPE_FIN)); - $array=array_merge ( $array , $fiche_def_ref->get_by_modele(FICHE_TYPE_ADM_TAX)); - $array=array_merge ( $array , $fiche_def_ref->get_by_modele(FICHE_TYPE_EMPL)); - - } - // --- for miscellaneous ---- - if ($p_ledger_type == 'ODS') - { - $result=$this->db->get_array('select fd_id from fiche_def'); - for ($i = 0;$iget_by_modele(FICHE_TYPE_CLIENT); - break; - case 'ACH': - $array=$fiche_def_ref->get_by_modele(FICHE_TYPE_ACH_SER); - $array=array_merge ($array, $fiche_def_ref->get_by_modele(FICHE_TYPE_ACH_MAR)); - $array=array_merge ($array,$fiche_def_ref->get_by_modele(FICHE_TYPE_ACH_MAT)); - break; - default : - throw new Exception(_('get_default_card p_ledger_side is invalide ['.$p_ledger_type.']')); - - } - } elseif ($p_side == 'C') - { - switch($p_ledger_type) - { - case 'VEN': - $array=$fiche_def_ref->get_by_modele(FICHE_TYPE_VENTE); - break; - case 'ACH': - $array= array_merge($array, $fiche_def_ref->get_by_modele(FICHE_TYPE_ADM_TAX)); - $array= array_merge($array, $fiche_def_ref->get_by_modele(FICHE_TYPE_FOURNISSEUR)); - break; - default : - throw new Exception(_('get_default_card p_ledger_side is invalide ['.$p_ledger_type.']')); - - } - } - return $array; - /* - $return=array(); - $return = array_values($array); - for ($i = 0;$idb->exec_sql($sql, array($this->id)); - - $res = Database::fetch_all($r); - if (empty($res)) - return null; - $card = ""; - $comma = ''; - foreach ($res as $item) - { - if (strlen(trim($item['deb'])) != 0) - { - $card.=$comma . $item['deb']; - $comma = ','; - } - if (strlen(trim($item['cred'])) != '') - { - $card.=$comma . $item['cred']; - $comma = ','; - } - } - - return $card; - } - - /** - * @brief get the saldo of an exercice, used for the opening of a folder - * @param$p_exercice is the exercice we want - * \return an array - * index = - * - solde (debit > 0 ; credit < 0) - * - j_poste - * - j_qcode - */ - - function get_saldo_exercice($p_exercice) - { - $sql = "select sum(a.montant) as solde, j_poste, j_qcode - from - (select j_id, case when j_debit='t' then j_montant - else j_montant * (-1) end as montant - from jrnx) as a - join jrnx using (j_id) - join parm_periode on (j_tech_per = p_id ) - where - p_exercice=$1 - and j_poste::text not like '7%' - and j_poste::text not like '6%' - group by j_poste,j_qcode - having (sum(a.montant) != 0 )"; - $res = $this->db->get_array($sql, array($p_exercice)); - return $res; - } - - /** - * @brief Check if a Dossier is using the strict mode or not - * \return true if we are using the strict_mode - */ - - function check_strict() - { - global $g_parameter; - if ($g_parameter->MY_STRICT == 'Y') - return true; - if ($g_parameter->MY_STRICT == 'N') - return false; - throw new Exception("Valeur invalid " . __FILE__ . ':' . __LINE__); - } - - /** - * @brief Check if a Dossier is using the check on the periode, if true than the user has to enter the date - * and the periode, it is a security check - * \return true if we are using the double encoding (date+periode) - */ - - function check_periode() - { - global $g_parameter; - if ($g_parameter->MY_CHECK_PERIODE == 'Y') - return true; - if ($g_parameter->MY_CHECK_PERIODE == 'N') - return false; - throw new Exception("Valeur invalid " . __FILE__ . ':' . __LINE__); - } - - /** - * @brief get the date of the last operation - */ - - function get_last_date() - { - if ($this->id == 0) - throw new Exception(__FILE__ . ":" . __LINE__ . "Journal incorrect "); - $sql = "select to_char(max(jr_date),'DD.MM.YYYY') from jrn where jr_def_id=$1"; - $date = $this->db->get_value($sql, array($this->id)); - return $date; - } - - /** - * @brief retrieve the jr_id thanks the internal code, do not change - * anything to the current object - * @paramthe internal code - * \return the jr_id or 0 if not found - */ - - function get_id($p_internal) - { - $sql = 'select jr_id from jrn where jr_internal=$1'; - $value = $this->db->get_value($sql, array($p_internal)); - if ($value == '') - $value = 0; - return $value; - } - - /** - * @brief create the invoice and saved it as attachment to the - * operation, - * @param$internal is the internal code - * @param$p_array is normally the $_POST - * \return a string - */ - - function create_document($internal, $p_array) - { - extract($p_array); - $doc = new Document($this->db); - $doc->f_id = $e_client; - $doc->md_id = $gen_doc; - $doc->ag_id = 0; - $p_array['e_pj']=$this->pj; - $filename=""; - $doc->Generate($p_array,$p_array['e_pj']); - // Move the document to the jrn - $doc->MoveDocumentPj($internal); - // Update the comment with invoice number, if the comment is empty - if (!isset($e_comm) || strlen(trim($e_comm)) == 0) - { - $sql = "update jrn set jr_comment=' document " . $doc->d_number . "' where jr_internal='$internal'"; - $this->db->exec_sql($sql); - } - return h($doc->d_name . ' (' . $doc->d_filename . ')'); - } - - /** - * @brief check if the payment method is valid - * @param$e_mp is the value and $e_mp_qcode is the quickcode - * \return nothing throw an Exception - */ - - public function check_payment($e_mp, $e_mp_qcode) - { - /* Check if the "paid by" is empty, */ - if ($e_mp != 0) - { - /* the paid by is not empty then check if valid */ - $empl = new Fiche($this->db); - $empl->get_by_qcode($e_mp_qcode); - if ($empl->empty_attribute(ATTR_DEF_ACCOUNT) == true) - { - throw new Exception(_("Celui qui paie n' a pas de poste comptable"), 20); - } - /* get the account and explode if necessary */ - $sposte = $empl->strAttribut(ATTR_DEF_ACCOUNT); - // if 2 accounts, take only the debit one for customer - if (strpos($sposte, ',') != 0) - { - $array = explode(',', $sposte); - $poste_val = $array[0]; - } - else - { - $poste_val = $sposte; - } - $poste = new Acc_Account_Ledger($this->db, $poste_val); - if ($poste->load() == false) - { - throw new Exception(sprintf(_("Pour la fiche %s le poste comptable [%s] n'existe pas"),$empl->quick_code,$poste->id ), 9); - } - } - } - - /** - * @brief increment the sequence for the pj */ - - function inc_seq_pj() - { - $sql = "select nextval('s_jrn_pj" . $this->id . "')"; - $this->db->exec_sql($sql); - } - - /** - * @brief return a HTML string with the form for the search - * @param $p_type if the type of ledger possible values=ALL,VEN,ACH,ODS,FIN - * @param $all_type_ledger - * values : - * - 1 means all the ledger of this type - * - 0 No have the "Tous les journaux" availables - * @param $div is the div (for reconciliation) - * @return a HTML String without the tag FORM or DIV - * - * @see build_search_sql - * @see display_search_form - * @see list_operation - */ - - function search_form($p_type, $all_type_ledger = 1, $div = "") - { - global $g_user; - $r=""; - $bledger_param= json_encode(array( - 'dossier'=>$_REQUEST['gDossier'], - 'type'=>$p_type, - 'all_type'=>$all_type_ledger, - 'div'=>$div - )); - - $bledger_param= str_replace('"', "'", $bledger_param); - $bledger=new ISmallButton('l'); - $bledger->label=_("choix des journaux"); - $bledger->javascript=" show_ledger_choice($bledger_param)"; - $f_ledger=$bledger->input(); - $hid_jrn=""; - if ( isset ($_REQUEST[$div.'nb_jrn']) ){ - for ($i=0;$i < $_REQUEST[$div.'nb_jrn'];$i++) { - if ( isset ($_REQUEST[$div."r_jrn"][$i])) - $hid_jrn.=HtmlInput::hidden($div.'r_jrn['.$i.']',$_REQUEST[$div."r_jrn"][$i]); - } - $hid_jrn.=HtmlInput::hidden($div.'nb_jrn',$_REQUEST[$div.'nb_jrn']); - } else { - $hid_jrn=HtmlInput::hidden($div.'nb_jrn',0); - } - /* Compute date for exercice */ - $period = $g_user->get_periode(); - $per = new Periode($this->db, $period); - $exercice = $per->get_exercice(); - list($per_start, $per_end) = $per->get_limit($exercice); - $date_end = $per_end->last_day(); - $date_start=$per_start->first_day(); - - /* widget for date_start */ - $f_date_start = new IDate('date_start'); - /* all periode or only the selected one */ - if (isset($_REQUEST['date_start'])) - { - $f_date_start->value = $_REQUEST['date_start']; - } - else - { - $f_date_start->value=$date_start; - } - - /* widget for date_end */ - $f_date_end = new IDate('date_end'); - /* all date or only the selected one */ - if (isset($_REQUEST['date_end'])) - { - $f_date_end->value = $_REQUEST['date_end']; - } - else - { - $f_date_end->value = $date_end; - } - /* widget for date term */ - $f_date_paid_start=new IDate('date_paid_start'); - $f_date_paid_end=new IDate('date_paid_end'); - - $f_date_paid_start->value=(isset($_REQUEST['date_paid_start']))?$_REQUEST['date_paid_start']:''; - $f_date_paid_end->value=(isset($_REQUEST['date_paid_end']))?$_REQUEST['date_paid_end']:''; - - /* widget for desc */ - $f_descript = new IText('desc'); - $f_descript->size = 40; - if (isset($_REQUEST['desc'])) - { - $f_descript->value = $_REQUEST['desc']; - } - - /* widget for amount */ - $f_amount_min = new INum('amount_min'); - $f_amount_min->value = (isset($_REQUEST['amount_min'])) ? abs($_REQUEST['amount_min']) : 0; - $f_amount_max = new INum('amount_max'); - $f_amount_max->value = (isset($_REQUEST['amount_max'])) ? abs($_REQUEST['amount_max']) : 0; - - /* input quick code */ - $f_qcode = new ICard('qcode' . $div); - - $f_qcode->set_attribute('typecard', 'all'); - /* $f_qcode->set_attribute('p_jrn','0'); - - $f_qcode->set_callback('filter_card'); - */ - $f_qcode->set_dblclick("fill_ipopcard(this);"); - // Add the callback function to filter the card on the jrn - //$f_qcode->set_callback('filter_card'); - $f_qcode->set_function('fill_data'); - $f_qcode->javascript = sprintf(' onchange="fill_data_onchange(%s);" ', $f_qcode->name); - $f_qcode->value = (isset($_REQUEST['qcode' . $div])) ? $_REQUEST['qcode' . $div] : ''; - - /* $f_txt_qcode=new IText('qcode'); - $f_txt_qcode->value=(isset($_REQUEST['qcode']))?$_REQUEST['qcode']:''; - */ - - /* input poste comptable */ - $f_accounting = new IPoste('accounting'); - $f_accounting->value = (isset($_REQUEST['accounting'])) ? $_REQUEST['accounting'] : ''; - if ($this->id == -1) - $jrn = 0; - else - $jrn = $this->id; - $f_accounting->set_attribute('jrn', $jrn); - $f_accounting->set_attribute('ipopup', 'ipop_account'); - $f_accounting->set_attribute('label', 'ld'); - $f_accounting->set_attribute('account', 'accounting'); - $info = HtmlInput::infobulle(13); - - $f_paid = new ICheckbox('unpaid'); - $f_paid->selected = (isset($_REQUEST['unpaid'])) ? true : false; - - $r.=dossier::hidden(); - $r.=HtmlInput::hidden('ledger_type', $this->type); - $r.=HtmlInput::hidden('ac', $_REQUEST['ac']); - ob_start(); - require_once NOALYSS_INCLUDE.'/template/ledger_search.php'; - $r.=ob_get_contents(); - ob_end_clean(); - return $r; - } - - /** - * @brief this function will create a sql stmt to use to create the list for - * the ledger, - * @param$p_array is usually the $_GET, - * @param$p_order the order of the row - * @param$p_where is the sql condition if not null then the $p_array will not be used - * \note the p_action will be used to filter the ledger but gl means ALL - * struct array $p_array - \verbatim - ( - [gDossier] => 13 - [p_jrn] => -1 - [date_start] => - [date_end] => - [amount_min] => 0 - [amount_max] => 0 - [desc] => - [search] => Rechercher - [p_action] => ven - [sa] => l - ) - \endverbatim - * \return an array with a valid sql statement, an the where clause => array[sql] array[where] - * \see list_operation - * \see display_search_form - * \see search_form - */ - - public function build_search_sql($p_array, $p_order = "", $p_where = "") - { - $sql = "select jr_id , - jr_montant, - substr(jr_comment,1,60) as jr_comment, - to_char(jr_ech,'DD.MM.YY') as str_jr_ech, - to_char(jr_date,'DD.MM.YY') as str_jr_date, - jr_date as jr_date_order, - jr_grpt_id, - jr_rapt, - jr_internal, - jrn_def_id, - jrn_def_name, - jrn_def_ech, - jrn_def_type, - jr_valid, - jr_tech_per, - jr_pj_name, - p_closed, - jr_pj_number, - n_text, - case - when jrn_def_type='VEN' then - (select ad_value from fiche_detail where ad_id=1 - and f_id=(select max(qs_client) from quant_sold join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id)) - when jrn_def_type = 'ACH' then - (select ad_value from fiche_detail where ad_id=1 - and f_id=(select max(qp_supplier) from quant_purchase join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id)) - when jrn_def_type = 'FIN' then - (select ad_value from fiche_detail where ad_id=1 - and f_id=(select qf_other from quant_fin where quant_fin.jr_id=x.jr_id)) - end as name, - case - when jrn_def_type='VEN' then (select ad_value from fiche_detail where ad_id=32 and f_id=(select max(qs_client) from quant_sold join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id)) - when jrn_def_type = 'ACH' then (select ad_value from fiche_detail where ad_id=32 and f_id=(select max(qp_supplier) from quant_purchase join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id)) - when jrn_def_type = 'FIN' then (select ad_value from fiche_detail where ad_id=32 and f_id=(select qf_other from quant_fin where quant_fin.jr_id=x.jr_id)) - end as first_name, - case - when jrn_def_type='VEN' then (select ad_value from fiche_detail where ad_id=23 and f_id=(select max(qs_client) from quant_sold join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id)) - when jrn_def_type = 'ACH' then (select ad_value from fiche_detail where ad_id=23 and f_id=(select max(qp_supplier) from quant_purchase join jrnx using (j_id) join jrn as e on (e.jr_grpt_id=j_grpt) where e.jr_id=x.jr_id)) - when jrn_def_type = 'FIN' then (select ad_value from fiche_detail where ad_id=23 and f_id=(select qf_other from quant_fin where quant_fin.jr_id=x.jr_id)) - end as quick_code, - case - when jrn_def_type='VEN' then - (select sum(qs_price)+sum(vat) from - (select qs_internal,qs_price,case when qs_vat_sided<>0 then 0 else qs_vat end as vat from quant_sold where qs_internal=X.jr_internal) as ven_invoice - ) - when jrn_def_type = 'ACH' then - ( - select sum(qp_price)+sum(vat)+sum(qp_nd_tva)+sum(qp_nd_tva_recup) - from - (select qp_internal,qp_price,qp_nd_tva,qp_nd_tva_recup,qp_vat-qp_vat_sided as vat from quant_purchase where qp_internal=X.jr_internal) as invoice_purchase - ) - else null - end as total_invoice, - jr_date_paid, - to_char(jr_date_paid,'DD.MM.YY') as str_jr_date_paid - from - jrn as X left join jrn_note using(jr_id) - join jrn_def on jrn_def_id=jr_def_id - join parm_periode on p_id=jr_tech_per"; - - if (!empty($p_array)) - extract($p_array); - - if (isset($op) ) - $r_jrn = (isset(${$op."r_jrn"})) ? ${$op."r_jrn"} : -1; - else - { - $r_jrn = (isset($r_jrn)) ? $r_jrn : -1; - - } - - /* if no variable are set then give them a default - * value */ - if ($p_array == null || empty($p_array) || !isset($amount_min)) - { - $amount_min = 0; - $amount_max = 0; - - $desc = ''; - $qcode = (isset($qcode)) ? $qcode : ""; - if (isset($qcodesearch_op)) - $qcode = $qcodesearch_op; - $accounting = (isset($accounting)) ? $accounting : ""; - $periode = new Periode($this->db); - $g_user = new User($this->db); - $p_id = $g_user->get_periode(); - if ($p_id != null) - { - list($date_start, $date_end) = $periode->get_date_limit($p_id); - } - } - - /* if p_jrn : 0 if means all ledgers, if -1 means all ledger of this - * type otherwise only one ledger */ - $fil_ledger = ''; - $fil_amount = ''; - $fil_date = ''; - $fil_desc = ''; - $fil_sec = ''; - $fil_qcode = ''; - $fil_account = ''; - $fil_paid = ''; - $fil_date_paid=''; - - $and = ''; - $g_user = new User($this->db); - $p_action = $ledger_type; - if ($p_action == '') - $p_action = 'ALL'; - if ($r_jrn == -1) - { - - /* from compta.php the p_action is quick_writing instead of ODS */ - if ($p_action == 'quick_writing') - $p_action = 'ODS'; - - - $fil_ledger = $g_user->get_ledger_sql($p_action, 3); - $and = ' and '; - } - else - { - - if ($p_action == 'quick_writing') - $p_action = 'ODS'; - - $aLedger = $g_user->get_ledger($p_action, 3); - $fil_ledger = ''; - $sp = ''; - for ($i = 0; $i < count($r_jrn); $i++) - { - if (isset($r_jrn[$i]) ) - { - $a=$r_jrn[$i]; - $fil_ledger.=$sp . $a; - $sp = ','; - } - } - $fil_ledger = ' jrn_def_id in (' . $fil_ledger . ')'; - $and = ' and '; - - /* no ledger selected */ - if ($sp == '') - { - $fil_ledger = ''; - $and = ''; - } - } - - /* format the number */ - $amount_min = abs(toNumber($amount_min)); - $amount_max = abs(toNumber($amount_max)); - if ($amount_min > 0 && isNumber($amount_min)) - { - $fil_amount = $and . ' jr_montant >=' . $amount_min; - $and = ' and '; - } - if ($amount_max > 0 && isNumber($amount_max)) - { - $fil_amount.=$and . ' jr_montant <=' . $amount_max; - $and = ' and '; - } - /* -------------------------------------------------------------------------- * - * if both amount are the same then we need to search into the detail - * and we reset the fil_amount - * -------------------------------------------------------------------------- */ - if (isNumber($amount_min) && - isNumber($amount_max) && - $amount_min > 0 && - bccomp($amount_min, $amount_max, 2) == 0) - { - $fil_amount = $and . ' ( '; - - // Look in detail - $fil_amount .= 'jr_grpt_id in ( select distinct j_grpt from jrnx where j_montant = ' . $amount_min . ') '; - - //and the total operation - $fil_amount .= ' or '; - $fil_amount .= ' jr_montant = '.$amount_min; - - $fil_amount .= ')'; - $and = " and "; - } - // date - if (isset($date_start) && isDate($date_start) != null) - { - $fil_date = $and . " jr_date >= to_date('" . $date_start . "','DD.MM.YYYY')"; - $and = " and "; - } - if (isset($date_end) && isDate($date_end) != null) - { - $fil_date.=$and . " jr_date <= to_date('" . $date_end . "','DD.MM.YYYY')"; - $and = " and "; - } - // date paiement - if (isset($date_paid_start) && isDate($date_paid_start) != null) - { - $fil_date_paid = $and . " jr_date_paid >= to_date('" . $date_paid_start . "','DD.MM.YYYY')"; - $and = " and "; - } - if (isset($date_paid_end) && isDate($date_paid_end) != null) - { - $fil_date_paid.=$and . " jr_date_paid <= to_date('" . $date_paid_end . "','DD.MM.YYYY')"; - $and = " and "; - } - // comment - if (isset($desc) && $desc != null) - { - $desc = sql_string($desc); - $fil_desc = $and . " ( upper(jr_comment) like upper('%" . $desc . "%') or upper(jr_pj_number) like upper('%" . $desc . "%') " . - " or upper(jr_internal) like upper('%" . $desc . "%') - or jr_grpt_id in (select j_grpt from jrnx where j_text ~* '" . $desc . "') - or jr_id in (select jr_id from jrn_info where ji_value is not null and ji_value ~* '$desc') - )"; - $and = " and "; - } - // Poste - if (isset($accounting) && $accounting != null) - { - $fil_account = $and . " jr_grpt_id in (select j_grpt - from jrnx where j_poste::text like '" . sql_string($accounting) . "%' ) "; - $and = " and "; - } - // Quick Code - if (isset($qcodesearch_op)) - $qcode = $qcodesearch_op; - if (isset($qcode) && $qcode != null) - { - $fil_qcode = $and . " jr_grpt_id in ( select j_grpt from - jrnx where trim(j_qcode) = upper(trim('" . sql_string($qcode) . "')))"; - $and = " and "; - } - - // Only the unpaid - if (isset($unpaid)) - { - $fil_paid = $and . SQL_LIST_UNPAID_INVOICE; - $and = " and "; - } - - $g_user = new User(new Database()); - $g_user->Check(); - $g_user->check_dossier(dossier::id()); - - if ($g_user->admin == 0 && $g_user->is_local_admin() == 0) - { - $fil_sec = $and . " jr_def_id in ( select uj_jrn_id " . - " from user_sec_jrn where " . - " uj_login='" . $_SESSION['g_user'] . "'" . - " and uj_priv in ('R','W'))"; - } - $where = $fil_ledger . $fil_amount . $fil_date . $fil_desc . $fil_sec . $fil_amount . $fil_qcode . $fil_paid . $fil_account.$fil_date_paid; - $sql.=" where " . $where; - return array($sql, $where); - } - - /** - * @brief return a html string with the search_form - * \return a HTML string with the FORM - * \see build_search_sql - * \see search_form - * \see list_operation - */ - - function display_search_form() - { - $r = ''; - $type = $this->type; - - if ($type == "") - $type = 'ALL'; - $r.=''; - $button = new IButton('tfs'); - $button->label = _("Filtrer"); - $button->javascript = "toggleHideShow('search_form','tfs');"; - - $r.=$button->input(); - return $r; - } - - /** - * @brief return the last p_limit operation into an array - * @param$p_limit is the max of operation to return - * \return $p_array of Follow_Up object - */ - - function get_last($p_limit) - { - global $g_user; - $filter_ledger = $g_user->get_ledger_sql('ALL', 3); - $filter_ledger = str_replace('jrn_def_id', 'jr_def_id', $filter_ledger); - $sql = " - select jr_id,jr_pj_number,jr_date,to_char(jr_date,'DD.MM.YYYY') as jr_date_fmt,jr_montant, jr_comment,jr_internal,jrn_def_code - from jrn - join jrn_def on (jrn_def_id=jr_def_id) - where $filter_ledger - order by jr_date desc , substring(jr_pj_number,'[0-9]+$')::numeric desc limit $p_limit"; - $array = $this->db->get_array($sql); - return $array; - } - - /** - * @brief retreive the jr_grpt_id from a ledger - * @param $p_what the column to seek - * possible values are - * - internal - * @param $p_value the value of the col. - */ - function search_group($p_what, $p_value) - { - switch ($p_what) - { - case 'internal': - return $this->db->get_value('select jr_grpt_id from jrn where jr_internal=$1', array($p_value)); - } - } - - /** - * @brief retrieve operation from jrn - * @param $p_from periode (id) - * @param $p_to periode (id) - * @return an array - */ - function get_operation($p_from, $p_to) - { - global $g_user; - $jrn = ($this->id == 0) ? 'and ' . $g_user->get_ledger_sql() : ' and jr_def_id = ' . $this->id; - $sql = "select jr_id as id ,jr_internal as internal, " . - "jr_pj_number as pj,jr_grpt_id," . - " to_char(jr_date,'DDMMYY') as date_fmt, " . - " jr_comment as comment, jr_montant as montant ," . - " jr_grpt_id,jr_def_id" . - " from jrn join jrn_def on (jr_def_id=jrn_def_id) where " . - " jr_date >= (select p_start from parm_periode where p_id = $1) - and jr_date <= (select p_end from parm_periode where p_id = $2)" . - ' ' . $jrn . ' order by jr_date,substring(jr_pj_number,\'[0-9]+$\')::numeric asc'; - $ret = $this->db->get_array($sql, array($p_from, $p_to)); - return $ret; - } - - /** - * @brief return the used VAT code with a rate > 0 - * @return an array of tva_id,tva_label,tva_poste - */ - public function existing_vat() - { - if ($this->type == 'ACH') - { - $array = $this->db->get_array("select tva_id,tva_label,tva_poste from tva_rate where tva_rate != 0.0000 " . - " and exists (select qp_vat_code from quant_purchase - where qp_vat_code=tva_id and exists (select j_id from jrnx where j_jrn_def = $1)) order by tva_id", array($this->id)); - } - if ($this->type == 'VEN') - { - $array = $this->db->get_array("select tva_id,tva_label,tva_poste from tva_rate where tva_rate != 0.0000 " . - " and exists (select qs_vat_code from quant_sold - where qs_vat_code=tva_id and exists (select j_id from jrnx where j_jrn_def = $1)) order by tva_id", array($this->id)); - } - return $array; - } - - /** - * @brief get the amount of vat for a given jr_grpt_id from the table - * quant_purchase - * @param the jr_grpt_id - * @return array price=htva, [1] = vat, - * @note - * @see - @code - array - 'price' => string '91.3500' (length=7) - 'vat' => string '0.0000' (length=6) - 'priv' => string '0.0000' (length=6) - 'tva_nd_recup' => string '0.0000' (length=6) - - @endcode - */ - function get_other_amount($p_jr_id) - { - if ($this->type == 'ACH') - { - $array = $this->db->get_array('select sum(qp_price) as price,sum(qp_vat) as vat ' . - ',sum(coalesce(qp_nd_amount,0)+coalesce(qp_dep_priv,0)) as priv' . - ',sum(coalesce(qp_nd_tva_recup,0)+coalesce(qp_nd_tva,0)) as tva_nd' . - ',sum(qp_vat_sided) as tva_np' . - ' from quant_purchase join jrnx using(j_id) - where j_grpt=$1 ', array($p_jr_id)); - $ret = $array[0]; - } - if ($this->type == 'VEN') - { - $array = $this->db->get_array('select sum(qs_price) as price,sum(qs_vat) as vat ' . - ',0 as priv' . - ',0 as tva_nd' . - ',sum(qs_vat_sided) as tva_np' . - ' from quant_sold join jrnx using(j_id) - where j_grpt=$1 ', array($p_jr_id)); - $ret = $array[0]; - } - return $ret; - } - - /** - * @brief get the amount of vat for a given jr_grpt_id from the table - * quant_purchase - * @param the jr_grpt_id - * @return array of sum_vat, tva_label - * @note - * @see - @code - - @endcode - */ - function vat_operation($p_jr_id) - { - if ($this->type == 'ACH') - { - $array = $this->db->get_array('select coalesce(sum(qp_vat),0) as sum_vat,tva_id - from quant_purchase as p right join tva_rate on (qp_vat_code=tva_id) join jrnx using(j_id) - where tva_rate !=0.0 and j_grpt=$1 group by tva_id', array($p_jr_id)); - } - if ($this->type == 'VEN') - { - $array = $this->db->get_array('select coalesce(sum(qs_vat),0) as sum_vat,tva_id - from quant_sold as p right join tva_rate on (qs_vat_code=tva_id) join jrnx using(j_id) - where tva_rate !=0.0 and j_grpt=$1 group by tva_id', array($p_jr_id)); - } - return $array; - } - - /** - * @brief retrieve amount of previous periode - * @param $p_to frmo the start of the exercise until $p_to - * @return $array with vat, price,other_amount - * @note - * @see - @code - array - 'price' => string '446.1900' (length=8) - 'vat' => string '21.7600' (length=7) - 'priv' => string '0.0000' (length=6) - 'tva_nd_recup' => string '0.0000' (length=6) - 'tva' => - array - 0 => - array - 'sum_vat' => string '13.7200' (length=7) - 'tva_id' => string '1' (length=1) - 1 => - array - 'sum_vat' => string '8.0400' (length=6) - 'tva_id' => string '3' (length=1) - 2 => - array - 'sum_vat' => string '0.0000' (length=6) - 'tva_id' => string '4' (length=1) - - @endcode - */ - function previous_amount($p_to) - { - /* get the first periode of exercise */ - $periode = new Periode($this->db, $p_to); - $exercise = $periode->get_exercice(); - list ($min, $max) = $periode->get_limit($exercise); - // transform min into date - $min_date=$min->first_day(); - // transform $p_to into date - $periode_max=new Periode($this->db,$p_to); - $max_date=$periode_max->first_day(); - bcscale(2); - // min periode - if ($this->type == 'ACH') - { - /* get all amount exclude vat */ - $sql = "select coalesce(sum(qp_price),0) as price" . - " ,coalesce(sum(qp_vat),0) as vat " . - ',coalesce(sum(qp_dep_priv),0) as priv' . - ',coalesce(sum(qp_vat_sided),0) as reversed' . - ',coalesce(sum(qp_nd_tva_recup),0)+coalesce(sum(qp_nd_tva),0) as tva_nd' . - ',coalesce(sum(qp_vat_sided),0) as tva_np' . - ' from quant_purchase join jrnx using(j_id) ' . - " where j_date >= to_date($1,'DD.MM.YYYY') and j_date < to_date($2,'DD.MM.YYYY') ". - ' and j_jrn_def = $3'; - $array = $this->db->get_array($sql, array($min_date, $max_date,$this->id)); - - $ret = $array[0]; - /* retrieve all vat code */ - $array = $this->db->get_array("select coalesce(sum(qp_vat),0) as sum_vat,tva_id - from quant_purchase as p right join tva_rate on (qp_vat_code=tva_id) join jrnx using(j_id) - where tva_rate !=0 and j_date >= to_date($1,'DD.MM.YYYY') and j_date < to_date($2,'DD.MM.YYYY') - and j_jrn_def = $3 - group by tva_id", - array($min_date, $max_date,$this->id)); - $ret['tva'] = $array; - } - if ($this->type == 'VEN') - { - /* get all amount exclude vat */ - $sql = "select coalesce(sum(qs_price),0) as price" . - " ,coalesce(sum(qs_vat),0) as vat " . - ',0 as priv' . - ',0 as tva_nd' . - ',coalesce(sum(qs_vat_sided),0) as tva_np' . - ' from quant_sold join jrnx using(j_id) ' . - " where j_date >= to_date($1,'DD.MM.YYYY') and j_date < to_date($2,'DD.MM.YYYY') ". - ' and j_jrn_def = $3'; - $array = $this->db->get_array($sql, array($min_date, $max_date,$this->id)); - $ret = $array[0]; - /* retrieve all vat code */ - $array = $this->db->get_array("select coalesce(sum(qs_vat),0) as sum_vat,tva_id - from quant_sold as p right join tva_rate on (qs_vat_code=tva_id) join jrnx using(j_id) - where tva_rate !=0 and - j_date >= to_date($1,'DD.MM.YYYY') and j_date < to_date($2,'DD.MM.YYYY') - and j_jrn_def = $3 - group by tva_id", array($min_date, $max_date,$this->id)); - $ret['tva'] = $array; - } - if ($this->type=="FIN") - { - - /* find the quick code of this ledger */ - $ledger=new Acc_Ledger_Fin($this->db,$this->id); - $qcode=$ledger->get_bank(); - $bank_card=new Fiche($this->db,$qcode); - - /*add the amount from Opening Writing */ - $cond=sprintf(" j_jrn_def <> %d and j_date >= to_date('%s','DD.MM.YYYY') and j_date < to_date('%s','DD.MM.YYYY') ",$this->id,$min_date,$max_date); - $saldo = $bank_card->get_bk_balance ($cond); - $ret['amount']=bcsub($saldo['debit'],$saldo['credit']); - } - return $ret; - } - - //////////////////////////////////////////////////////////////////////////////// - // TEST MODULE - //////////////////////////////////////////////////////////////////////////////// - /** - * @brief this function is intended to test this class - */ - static function test_me($pCase = '') - { - if ($pCase == '') - { - echo Acc_Reconciliation::$javascript; - html_page_start(); - $cn = new Database(dossier::id()); - $_SESSION['g_user'] = 'phpcompta'; - $_SESSION['g_pass'] = 'phpcompta'; - - $id = (isset($_REQUEST['p_jrn'])) ? $_REQUEST['p_jrn'] : -1; - $a = new Acc_Ledger($cn, $id); - $a->with_concerned = true; - // Vide - echo '
    '; - echo $a->select_ledger()->input(); - echo HtmlInput::submit('go', 'Test it'); - echo '
    '; - if (isset($_POST['go'])) - { - echo "Ok "; - echo '
    '; - echo $a->show_form(); - echo HtmlInput::submit('post_id', 'Try me'); - echo '
    '; - // Show the predef operation - // Don't forget the p_jrn - echo '
    '; - echo dossier::hidden(); - echo ''; - $op = new Pre_operation($cn); - $op->p_jrn = $id; - $op->od_direct = 't'; - if ($op->count() != 0) - { - echo HtmlInput::submit('use_opd', 'Utilisez une opération prédéfinie',"","smallbutton"); - echo $op->show_button(); - } - echo '
    '; - exit('test_me'); - } - - if (isset($_POST['post_id'])) - { - - echo '
    '; - echo $a->show_form($_POST, 1); - echo HtmlInput::button('add', 'Ajout d\'une ligne', 'onClick="quick_writing_add_row()"'); - echo HtmlInput::submit('save_it', _("Sauver")); - echo '
    '; - exit('test_me'); - } - if (isset($_POST['save_it'])) - { - print 'saving'; - $array = $_POST; - $array['save_opd'] = 1; - try - { - $a->save($array); - } - catch (Exception $e) - { - alert($e->getMessage()); - echo '
    '; - - echo $a->show_form($_POST); - echo HtmlInput::submit('post_id', 'Try me'); - echo '
    '; - } - return; - } - // The GET at the end because automatically repost when you don't - // specify the url in the METHOD field - if (isset($_GET['use_opd'])) - { - $op = new Pre_op_advanced($cn); - $op->set_od_id($_REQUEST['pre_def']); - //$op->p_jrn=$id; - - $p_post = $op->compute_array(); - - echo '
    '; - - echo $a->show_form($p_post); - echo HtmlInput::submit('post_id', 'Use predefined operation'); - echo '
    '; - return; - } - }// if case = '' - /////////////////////////////////////////////////////////////////////////// - // search - if ($pCase == 'search') - { - html_page_start(); - $cn = new Database(dossier::id()); - $ledger = new Acc_Ledger($cn, 0); - $_SESSION['g_user'] = 'phpcompta'; - $_SESSION['g_pass'] = 'phpcompta'; - echo $ledger->search_form('ALL'); - } - /////////////////////////////////////////////////////////////////////////// - // reverse - // Give yourself the var and check in your tables - /////////////////////////////////////////////////////////////////////////// - if ($pCase == 'reverse') - { - $cn = new Database(dossier::id()); - $jr_internal = 'OD-01-272'; - try - { - $cn->start(); - $jrn_def_id = $cn->get_value('select jr_def_id from jrn where jr_internal=$1', array($jr_internal)); - $ledger = new Acc_Ledger($cn, $jrn_def_id); - $ledger->jr_id = $cn->get_value('select jr_id from jrn where jr_internal=$1', array($jr_internal)); - - echo "Ouvrez le fichier " . __FILE__ . " à la ligne " . __LINE__ . " pour changer jr_internal et vérifier le résultat de l'extourne"; - - $ledger->reverse('01.07.2010'); - } - catch (Exception $e) - { - $cn->rollback(); - var_dump($e); - } - $cn->commit(); - } - } - - /** - * create an array of the existing cat, to be used in a checkbox form - * - */ - static function array_cat() - { - $r = array( - array('cat' => 'VEN', 'name' => _("Journaux de vente")), - array('cat' => 'ACH', 'name' => _("Journaux d'achat")), - array('cat' => 'FIN', 'name' => _("Journaux Financier")), - array('cat' => 'ODS', 'name' => _("Journaux d'Opérations diverses")) - ); - return $r; - } - - /** - * Retrieve the third : supplier for purchase, customer for sale, bank for fin, - * @param $p_jrn_type type of the ledger FIN, VEN ACH or ODS - */ - function get_tiers($p_jrn_type, $jr_id) - { - if ($p_jrn_type == 'ODS') - return ' '; - $tiers = ''; - switch ($p_jrn_type) - { - case 'VEN': - $tiers = $this->db->get_value('select max(qs_client) from quant_sold join jrnx using (j_id) join jrn on (jr_grpt_id=j_grpt) where jrn.jr_id=$1', array($jr_id)); - break; - case 'ACH': - $tiers = $this->db->get_value('select max(qp_supplier) from quant_purchase join jrnx using (j_id) join jrn on (jr_grpt_id=j_grpt) where jrn.jr_id=$1', array($jr_id)); - - break; - case 'FIN': - $tiers = $this->db->get_value('select qf_other from quant_fin where jr_id=$1', array($jr_id)); - break; - } - if ($this->db->count() == 0) - return ''; - $name = $this->db->get_value('select ad_value from fiche_detail where ad_id=1 and f_id=$1', array($tiers)); - $first_name = $this->db->get_value('select ad_value from fiche_detail where ad_id=32 and f_id=$1', array($tiers)); - return $name . ' ' . $first_name; - } - - /** - * @brief listing of all ledgers - * @return HTML string - */ - function listing() - { - $str_dossier = dossier::get(); - $base_url = "?" . dossier::get() . "&ac=" . $_REQUEST['ac']; - - $r = ""; - $r.=_('Filtre')." ".HtmlInput::filter_table("cfgledger_table_id", "0", "1"); - $r.=''; - $r.=''; - $ret = $this->db->exec_sql("select distinct jrn_def_id,jrn_def_name, - jrn_def_class_deb,jrn_def_class_cred,jrn_def_type - from jrn_def order by jrn_def_name"); - $Max = Database::num_row($ret); - - - for ($i = 0; $i < $Max; $i++) - { - $l_line = Database::fetch_array($ret, $i); - $url = $base_url . "&sa=detail&p_jrn=" . $l_line['jrn_def_id']; - $r.=sprintf('', $url, h($l_line['jrn_def_name']).' ('.$l_line['jrn_def_type'].')'); - } - $r.= "
    ' . _('Ajout journal') . '
    %s
    "; - return $r; - } - - /** - * display detail of a ledger - * - */ - function display_ledger() - { - if ($this->load() == -1) - { - throw new Exception(_("Journal n'existe pas"), -1); - } - $type = $this->jrn_def_type; - $name = $this->jrn_def_name; - $code = $this->jrn_def_code; - $str_add_button=""; - /* widget for searching an account */ - $wSearch = new IPoste(); - $wSearch->set_attribute('ipopup', 'ipop_account'); - $wSearch->set_attribute('account', 'p_jrn_class_deb'); - $wSearch->set_attribute('no_overwrite', '1'); - $wSearch->set_attribute('noquery', '1'); - $wSearch->table = 3; - $wSearch->name = "p_jrn_class_deb"; - $wSearch->size = 20; - $wSearch->value = $this->jrn_def_class_deb; - $search = $wSearch->input(); - - $wPjPref = new IText(); - $wPjPref->name = 'jrn_def_pj_pref'; - $wPjPref->value = $this->jrn_def_pj_pref; - $pj_pref = $wPjPref->input(); - - $wPjSeq = new INum(); - $wPjSeq->value = 0; - $wPjSeq->name = 'jrn_def_pj_seq'; - $pj_seq = $wPjSeq->input(); - $last_seq = $this->get_last_pj(); - $name = $this->jrn_def_name; - - $hidden = HtmlInput::hidden('p_jrn', $this->id); - $hidden.= HtmlInput::hidden('sa', 'detail'); - $hidden.= dossier::hidden(); - $hidden.=HtmlInput::hidden('p_jrn_deb_max_line', 10); - $hidden.=HtmlInput::hidden('p_ech_lib', 'echeance'); - $hidden.=HtmlInput::hidden('p_jrn_type', $type); - - $min_row = new INum("min_row",$this->jrn_deb_max_line); - $min_row->prec=0; - - $description=new ITextarea('p_description'); - $description->style='class="itextarea" style="margin:0px;"'; - $description->value=$this->jrn_def_description; - $str_description=$description->input(); - - /* Load the card */ - $card = $this->get_fiche_def(); - $rdeb = explode(',', $card['deb']); - $rcred = explode(',', $card['cred']); - /* Numbering (only FIN) */ - $num_op = new ICheckBox('numb_operation'); - if ($this->jrn_def_num_op == 1) - $num_op->selected = true; - /* bank card */ - $qcode_bank = ''; - if ($type == 'FIN') - { - $f_id = $this->jrn_def_bank; - if (isNumber($f_id) == 1) - { - $fBank = new Fiche($this->db, $f_id); - $qcode_bank = $fBank->get_quick_code(); - } - } - $new = 0; - $cn = $this->db; - echo $hidden; - require_once NOALYSS_INCLUDE.'/template/param_jrn.php'; - } - - /** - * Verify before update - * - * @param type $array - * 'p_jrn' => string '3' (length=1) - 'sa' => string 'detail' (length=6) - 'gDossier' => string '82' (length=2) - 'p_jrn_deb_max_line' => string '10' (length=2) - 'p_ech_lib' => string 'echeance' (length=8) - 'p_jrn_type' => string 'ACH' (length=3) - 'p_jrn_name' => string 'Achat' (length=5) - 'jrn_def_pj_pref' => string 'ACH' (length=3) - 'jrn_def_pj_seq' => string '0' (length=1) - 'FICHECRED' => - array - 0 => string '4' (length=1) - 'FICHEDEB' => - array - 0 => string '7' (length=1) - 1 => string '5' (length=1) - 2 => string '13' (length=2) - 'update' => string 'Sauve' (length=5 - * @exception is throw is test are not valid - */ - function verify_ledger($array) - { - extract($array); - try - { - if (isNumber($p_jrn) == 0) - throw new Exception("Id invalide"); - if (isNumber($p_jrn_deb_max_line) == 0) - throw new Exception(_("Nombre de ligne incorrect")); - if (trim($p_jrn_name) == "") - throw new Exception("Nom de journal invalide"); - if ($this->db->get_value("select count(*) from jrn_def where jrn_def_name=$1 and jrn_Def_id<>$2", array($p_jrn_name, $p_jrn)) > 0) - throw new Exception(_("Un journal avec ce nom existe déjà")); - if ($p_jrn_type == 'FIN') - { - $a = new Fiche($this->db); - $result = $a->get_by_qcode(trim(strtoupper($_POST['bank'])), false); - if ($result == 1) - throw new Exception(_("Aucun compte en banque n'est donné")); - } - if ($p_jrn_type == "-1") { - throw new Exception(_('Choix du type de journal est obligatoire')); - } - } - catch (Exception $e) - { - throw $e; - } - } - - /** - * update a ledger - * @param type $array normally post - * @see verify_ledger - */ - function update($array = '') - { - if ($array == null) - throw new Exception('save cannot use a empty array'); - - extract($array); - $this->jrn_def_id = $p_jrn; - $this->jrn_def_name = $p_jrn_name; - $this->jrn_def_ech_lib = $p_ech_lib; - $this->jrn_def_max_line_deb = ($p_jrn_deb_max_line<1)?1:$p_jrn_deb_max_line; - $this->jrn_def_type = $p_jrn_type; - $this->jrn_def_pj_pref = $jrn_def_pj_pref; - $this->jrn_def_fiche_deb = (isset($FICHEDEB)) ? join($FICHEDEB, ',') : ""; - $this->jrn_deb_max_line=($min_row<1)?1:$min_row; - $this->jrn_def_description=$p_description; - switch ($this->jrn_def_type) - { - case 'ACH': - case 'VEN': - $this->jrn_def_fiche_cred = (isset($FICHECRED)) ? join($FICHECRED, ',') : ''; - break; - case 'ODS': - $this->jrn_def_class_deb = $p_jrn_class_deb; - $this->jrn_def_fiche_cred=null; - break; - case 'FIN': - $a = new Fiche($this->db); - $result = $a->get_by_qcode(trim(strtoupper($_POST['bank'])), false); - $bank = $a->id; - $this->jrn_def_bank = $bank; - if ($result == -1) - throw new Exception(_("Aucun compte en banque n'est donné")); - $this->jrn_def_num_op = (isset($numb_operation)) ? 1 : 0; - break; - } - - parent::update(); - //Reset sequence if needed - if ($jrn_def_pj_seq != 0) - { - $Res = $this->db->alter_seq("s_jrn_pj" . $p_jrn, $jrn_def_pj_seq); - } - } - - function input_paid() - { - $r = ''; - $r.='
    '; - $r.='

    ' . _('Payé par') . '

    '; - $mp = new Acc_Payment($this->db); - $mp->set_parameter('ledger_source', $this->id); - $r.=$mp->select(); - $r.='
    '; - return $r; - } - - /** - * display screen to enter a new ledger - */ - function input_new() - { - $retry=HtmlInput::default_value_post("sa", ""); -// if ( $retry == "add") { - $default_type=HtmlInput::default_value_post("p_jrn_type", -1); - $previous_jrn_def_pj_pref=HtmlInput::default_value_post("jrn_def_pj_pref",""); - $previous_p_description=HtmlInput::default_value_post("p_description",""); - $previous_p_jrn_name=HtmlInput::default_value_post('p_jrn_name',''); - $previous_p_jrn_type = HtmlInput::default_value_post("p_jrn_type",""); -// } - global $g_user; - $f_add_button=new ISmallButton('add_card'); - $f_add_button->label=_('Créer une nouvelle fiche'); - $f_add_button->tabindex=-1; - $f_add_button->set_attribute('jrn',-1); - $f_add_button->javascript=" this.jrn=-1;select_card_type({type_cat:4});"; - - $str_add_button=""; - if ($g_user->check_action(FICADD)==1) - { - $str_add_button=$f_add_button->input(); - } - $wSearch = new IPoste(); - $wSearch->table = 3; - $wSearch->set_attribute('ipopup', 'ipop_account'); - $wSearch->set_attribute('account', 'p_jrn_class_deb'); - $wSearch->set_attribute('no_overwrite', '1'); - $wSearch->set_attribute('noquery', '1'); - - $wSearch->name = "p_jrn_class_deb"; - $wSearch->size = 20; - - $search = $wSearch->input(); - // default for ACH - $default_deb_purchase = $this->get_default_card('ACH', 'D'); - $default_cred_purchase = $this->get_default_card('ACH', 'C'); - - // default for VEN - $default_deb_sale = $this->get_default_card('VEN', 'D'); - $default_cred_sale = $this->get_default_card('VEN', 'C'); - - // default for FIN - $default_fin = $this->get_default_card("FIN", ""); - - //default ods - $default_ods = $this->get_default_card("ODS", ""); - - /* construct all the hidden */ - $hidden = HtmlInput::hidden('p_jrn', -1); - $hidden.= HtmlInput::hidden('p_action', 'jrn'); - $hidden.= HtmlInput::hidden('sa', 'add'); - $hidden.= dossier::hidden(); - $hidden.=HtmlInput::hidden('p_jrn_deb_max_line', 10); - $hidden.=HtmlInput::hidden('p_ech_lib', 'echeance'); - - /* properties of the ledger */ - $name = $previous_p_jrn_name; - $code = ""; - $wType = new ISelect(); - $a_jrn= $this->db->make_array("select '-1',' -- "._("choix du type de journal")." -- ' union select jrn_type_id,jrn_desc from jrn_type"); - $wType->selected='-1'; - $wType->value =$a_jrn; - $wType->name = "p_jrn_type"; - $wType->id= "p_jrn_type_select_id"; - $wType->javascript=' onchange="show_ledger_div()"'; - $wType->selected=$default_type; - $type = $wType->input(); - $rcred = $rdeb = array(); - $wPjPref = new IText(); - $wPjPref->name = 'jrn_def_pj_pref'; - $wPjPref->value=$previous_jrn_def_pj_pref; - $pj_pref = $wPjPref->input(); - $pj_seq = ''; - $last_seq = 0; - $new = 1; - $description=new ITextarea('p_description'); - $description->style='class="itextarea" style="margin:0px;"'; - $description->value=$previous_p_description; - $str_description=$description->input(); - /* bank card */ - $qcode_bank = ''; - /* Numbering (only FIN) */ - $num_op = new ICheckBox('numb_operation'); - echo dossier::hidden(); - echo HtmlInput::hidden('ac', $_REQUEST['ac']); - echo $hidden; - - $cn = $this->db; - $min_row = new INum("min_row",MAX_ARTICLE); - $min_row->prec=0; - require_once NOALYSS_INCLUDE.'/template/param_jrn.php'; - } - - /** - * Insert a new ledger - * @param type $array normally $_POST - * @see verify_ledger - */ - function save_new($array) - { - $this->load(); - extract($array); - $this->jrn_def_id = -1; - $this->jrn_def_name = $p_jrn_name; - $this->jrn_def_ech_lib = $p_ech_lib; - $this->jrn_def_max_line_deb = $p_jrn_deb_max_line; - $this->jrn_def_type = $p_jrn_type; - $this->jrn_def_pj_pref = $jrn_def_pj_pref; - $this->jrn_def_fiche_deb = (isset($FICHEDEB)) ? join($FICHEDEB, ',') : ""; - $this->jrn_deb_max_line=$min_row; - $this->jrn_def_code = sprintf("%s%02d", trim(substr($this->jrn_def_type, 0, 1)), Acc_Ledger::next_number($this->db, $this->jrn_def_type)); - $this->jrn_def_description=$p_description; - switch ($this->jrn_def_type) - { - case 'ACH': - case 'VEN': - $this->jrn_def_fiche_cred = (isset($FICHECRED)) ? join($FICHECRED, ',') : ''; - - break; - case 'ODS': - $this->jrn_def_class_deb = $p_jrn_class_deb; - $this->jrn_def_fiche_cred = null; - break; - case 'FIN': - $a = new Fiche($this->db); - $result = $a->get_by_qcode(trim(strtoupper($_POST['bank'])), false); - $bank = $a->id; - $this->jrn_def_bank = $bank; - if ($result == -1) - throw new Exception(_("Aucun compte en banque n'est donné")); - $this->jrn_def_num_op = (isset($numb_operation)) ? 1 : 0; - break; - } - - parent::insert(); - } - - /** - * delete a ledger IF is not already used - * @exeption : cannot delete - */ - function delete_ledger() - { - try - { - if ($this->db->get_value("select count(jr_id) from jrn where jr_def_id=$1", array($this->jrn_def_id)) > 0) - throw new Exception(_("Impossible d'effacer un journal qui contient des opérations")); - parent::delete(); - } - catch (Exception $e) - { - throw $e; - } - } - /** - * Get operation from the ledger type before, after or with the - * given date . The array is filtered by the ledgers granted to the - * user - * @global type $g_user - * @param $p_date Date (d.m.Y) - * @param $p_ledger_type VEN ACH - * @param type $sql_op < > or = - * @return array from jrn (jr_id, jr_internal, jr_date, jr_comment,jr_pj_number,jr_montant) - * @throws Exception - */ - function get_operation_date($p_date,$p_ledger_type,$sql_op) - { - global $g_user; - switch ($p_ledger_type) - { - case 'ACH': - $filter=$g_user->get_ledger_sql('ACH',3); - break; - case 'VEN': - $filter=$g_user->get_ledger_sql('VEN',3); - break; - default: - throw new Exception ('Ledger_type invalid : '.$p_ledger_type); - } - - - $sql = "select jr_id, jr_internal, jr_date, jr_comment,jr_pj_number,jr_montant - from jrn - join jrn_def on (jrn_def_id=jr_def_id) - where - jr_ech is not null - and jr_ech $sql_op to_date($1,'DD.MM.YYYY') - and coalesce (jr_rapt,'xx') <> 'paid' - and $filter - "; - $array=$this->db->get_array($sql,array($p_date)); - return $array; - } - /** - * @brief get info from supplier to pay today - */ - function get_supplier_now() - { - $array=$this->get_operation_date(Date('d.m.Y'), 'ACH', '='); - return $array; - } - /** - * @brief get info from supplier not yet paid - */ - function get_supplier_late() - { - $array=$this->get_operation_date(Date('d.m.Y'), 'ACH', '<'); - return $array; - } - /** - * @brief get info from customer to pay today - */ - function get_customer_now() - { - $array=$this->get_operation_date(Date('d.m.Y'), 'VEN', '='); - return $array; - } - /** - * @brief get info from customer not yet paid - */ - function get_customer_late() - { - $array=$this->get_operation_date(Date('d.m.Y'), 'VEN', '<'); - return $array; - } - function convert_from_follow($p_ag_id) - { - global $g_user; - if (isNumber($p_ag_id)==0) return null; - if (! $g_user->can_read_action($p_ag_id)) die (_('Action non accessible')); - $array=array(); - - // retrieve info from action_gestion - $tiers_id=$this->db->get_value('select f_id_dest from action_gestion where ag_id=$1',array($p_ag_id)); - if ( $this->db->size() !=0 ) - $qcode=$this->db->get_value('select j_qcode from vw_poste_qcode where f_id=$1',array($tiers_id)); - else - $qcode=""; - - $comment=$this->db->get_value('select ag_title from action_gestion where ag_id=$1',array($p_ag_id)); - $array['e_client']=$qcode; - $array['e_comm']=$comment; - - // retrieve info from action_detail - $a_item=$this->db->get_array('select f_id,ad_text,ad_pu,ad_quant,ad_tva_id,ad_tva_amount,j_qcode - from - action_detail - left join vw_poste_qcode using(f_id) - where - ag_id=$1',array($p_ag_id)); - - $array['nb_item']=($this->nb > count($a_item))?$this->nb:count($a_item); - for ($i=0;$idb->get_value('select pcm_lib from tmp_pcmn where pcm_val=$1',array($p_value)); - return $lib; - } - /** - * Let you select the repository before confirming a sale or a purchase. - * Returns an empty string if the company doesn't use stock - * @brief Let you select the repository before confirming a sale or a purchase. - * @global type $g_parameter check if company is using stock - * @param type $p_readonly - * @param type $p_repo - * @return string - */ - public function select_depot($p_readonly, $p_repo) - { - global $g_parameter; - $r=($p_readonly==false)?'
    ':'
    '; - // Show the available repository - if ($g_parameter->MY_STOCK=='Y') - { - $sel=HtmlInput::select_stock($this->db, 'repo', 'W'); - $sel->readOnly=$p_readonly; - if ($p_readonly==true) - $sel->selected=$p_repo; - $r.="

    "._('Dans le dépôt')." : "; - $r.=$sel->input(); - $r.='

    '; - } else - { - $r.=''.'Stock non utilisé'.''; - } - $r.='
    '; - return $r; - - } - /** - * Create a button to encode a new operation into the same ledger - * @return string - */ - function button_new_operation() - { - $url=http_build_query(array('ac'=>$_REQUEST['ac'],'gDossier'=>$_REQUEST['gDossier'],'p_jrn'=>$_REQUEST['p_jrn'])); - $button = HtmlInput::button_anchor(_("Nouvelle opération"), 'do.php?'.$url); - return '

    '.$button.'

    '; - } - -} -?> \ No newline at end of file diff --git a/sources/include/class_acc_ledger_fin.php b/sources/include/class_acc_ledger_fin.php deleted file mode 100644 index 61e40c5..0000000 --- a/sources/include/class_acc_ledger_fin.php +++ /dev/null @@ -1,1143 +0,0 @@ -type = 'FIN'; - } - - /** - * Verify that the data are correct before inserting or confirming - * @brief verify the data - * @param an array (usually $_POST) - * @return String - * @throw Exception on error occurs - */ - - public function verify($p_array) - { - global $g_user; - if (is_array($p_array ) == false || empty($p_array)) - throw new Exception ("Array empty"); - /* - * Check needed value - */ - check_parameter($p_array,'p_jrn'); - - - extract($p_array); - /* check for a double reload */ - if (isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1', array($mt)) != 0) - throw new Exception(_('Double Encodage'), 5); - - /* check if we can write into this ledger */ - if ($g_user->check_jrn($p_jrn) != 'W') - throw new Exception(_('Accès interdit'), 20); - - /* check if there is a bank account linked to the ledger */ - $bank_id = $this->get_bank(); - - if ($this->db->count() == 0) - throw new Exception("Ce journal n'a pas de compte en banque, allez dans paramètre->journal pour régler cela"); - /* check if the accounting of the bank is correct */ - $fBank = new Fiche($this->db, $bank_id); - $bank_accounting = $fBank->strAttribut(ATTR_DEF_ACCOUNT); - if (trim($bank_accounting) == '') - throw new Exception('Le poste comptable du compte en banque de ce journal est invalide'); - - /* check if the account exists */ - $poste = new Acc_Account_Ledger($this->db, $bank_accounting); - if ($poste->load() == false) - throw new Exception('Le poste comptable du compte en banque de ce journal est invalide'); - if ($chdate != 1 && $chdate != 2) throw new Exception ('Le choix de date est invalide'); - if ( $chdate == 1 ) - { - /* check if the date is valid */ - if (isDate($e_date) == null) - { - throw new Exception('Date invalide', 2); - } - $oPeriode = new Periode($this->db); - if ($this->check_periode() == false) - { - $periode = $oPeriode->find_periode($e_date); - } - else - { - $oPeriode->p_id = $periode; - list ($min, $max) = $oPeriode->get_date_limit(); - if (cmpDate($e_date, $min) < 0 || - cmpDate($e_date, $max) > 0) - throw new Exception(_('Date et periode ne correspondent pas'), 6); - } - - /* check if the periode is closed */ - if ($this->is_closed($periode) == 1) - { - throw new Exception(_('Periode fermee'), 6); - } - - /* check if we are using the strict mode */ - if ($this->check_strict() == true) - { - /* if we use the strict mode, we get the date of the last - operation */ - $last_date = $this->get_last_date(); - if ($last_date != null && cmpDate($e_date, $last_date) < 0) - throw new Exception(_('Vous utilisez le mode strict la dernière operation est à la date du ') - . $last_date . _(' vous ne pouvez pas encoder à une date antérieure'), 15); - } - } - - $acc_pay = new Acc_Operation($this->db); - - $nb = 0; - $tot_amount = 0; - //---------------------------------------- - // foreach item - //---------------------------------------- - for ($i = 0; $i < $nb_item; $i++) - { - if (strlen(trim(${'e_other' . $i})) == 0) - continue; - /* check if amount are numeric and */ - if (isNumber(${'e_other' . $i . '_amount'}) == 0) - throw new Exception('La fiche ' . ${'e_other' . $i} . 'a un montant invalide [' . ${'e_other' . $i . '_amount'} . ']', 6); - - /* compute the total */ - $tot_amount+=round(${'e_other' . $i . '_amount'}, 2); - /* check if all card has a ATTR_DEF_ACCOUNT */ - $fiche = new Fiche($this->db); - $fiche->get_by_qcode(${'e_other' . $i}); - if ($fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) - throw new Exception('La fiche ' . ${'e_other' . $i} . 'n\'a pas de poste comptable', 8); - - $sposte = $fiche->strAttribut(ATTR_DEF_ACCOUNT); - // if 2 accounts, take only the debit one for customer - if (strpos($sposte, ',') != 0) - { - $array = explode(',', $sposte); - $poste_val = $array[1]; - } - else - { - $poste_val = $sposte; - } - /* The account exists */ - $poste = new Acc_Account_Ledger($this->db, $poste_val); - if ($poste->load() == false) - { - throw new Exception('Pour la fiche ' . ${'e_other' . $i} . ' le poste comptable [' . $poste->id . 'n\'existe pas', 9); - } - /* Check if the card belong to the ledger */ - $fiche = new Fiche($this->db); - $fiche->get_by_qcode(${'e_other' . $i}); - if ($fiche->belong_ledger($p_jrn, 'deb') != 1) - throw new Exception('La fiche ' . ${'e_other' . $i} . 'n\'est pas accessible à ce journal', 10); - if ($chdate == 2) - { - {/* check if the date is valid */ - if (isDate(${'dateop' . $i}) == null) - { - throw new Exception('Date invalide', 2); - } - $oPeriode = new Periode($this->db); - if ($this->check_periode() == false) - { - $periode = $oPeriode->find_periode(${'dateop' . $i}); - } - else - { - $oPeriode->p_id = $periode; - list ($min, $max) = $oPeriode->get_date_limit(); - if (cmpDate(${'dateop' . $i}, $min) < 0 || - cmpDate(${'dateop' . $i}, $max) > 0) - throw new Exception(_('Date et periode ne correspondent pas'), 6); - } - - /* check if the periode is closed */ - if ($this->is_closed($periode) == 1) - { - throw new Exception(_('Periode fermee'), 6); - } - - /* check if we are using the strict mode */ - if ($this->check_strict() == true) - { - /* if we use the strict mode, we get the date of the last - operation */ - $last_date = $this->get_last_date(); - if ($last_date != null && cmpDate(${'dateop' . $i}, $last_date) < 0) - throw new Exception(_('Vous utilisez le mode strict la dernière operation est à la date du ') - . $last_date . _(' vous ne pouvez pas encoder à une date antérieure'), 15); - } - } - } - $nb++; - } - if ($nb == 0) - throw new Exception('Il n\'y a aucune opération', 12); - - /* Check if the last_saldo and first_saldo are correct */ - if (strlen(trim($last_sold)) != 0 && isNumber($last_sold) && - strlen(trim($first_sold)) != 0 && isNumber($first_sold)) - { - $diff = $last_sold - $first_sold; - $diff = round($diff, 2) - round($tot_amount, 2); - if ($first_sold != 0 && $last_sold != 0) - { - if ($diff != 0) - throw new Exception('Le montant de l\'extrait est incorrect' . - $tot_amount . ' extrait ' . $diff, 13); - } - } - } - - /**\brief - * \param $p_array contains the value usually it is $_POST - * \return string with html code - * \note the form tag are not set here - */ - - function input($p_array = null, $notused = 0) - { - global $g_parameter, $g_user; - if ($p_array != null) - extract($p_array); - - $pview_only = false; - - $min_article=$this->get_min_row(); - - $f_add_button = new IButton('add_card'); - $f_add_button->label = _('Créer une nouvelle fiche'); - $f_add_button->set_attribute('ipopup', 'ipop_newcard'); - $f_add_button->set_attribute('jrn', $this->id); - $f_add_button->javascript = " this.jrn=\$('p_jrn').value;select_card_type(this);"; - $str_add_button = ($g_user->check_action(FICADD) == 1) ? $f_add_button->input() : ""; - - // The first day of the periode - $pPeriode = new Periode($this->db); - list ($l_date_start, $l_date_end) = $pPeriode->get_date_limit($g_user->get_periode()); - if ($g_parameter->MY_DATE_SUGGEST == 'Y') - $op_date = (!isset($e_date) ) ? $l_date_start : $e_date; - else - $op_date = (!isset($e_date) ) ? '' : $e_date; - - $r = ""; - - $r.=dossier::hidden(); - $f_legend = 'Banque, caisse'; - // Date - //-- - $Date = new IDate("e_date", $op_date); - $Date->setReadOnly($pview_only); - $f_date = $Date->input(); - $f_period = ''; - if ($this->check_periode() == true) - { - // Periode - //-- - $l_user_per = (isset($periode)) ? $periode : $g_user->get_periode(); - $period = new IPeriod(); - $period->cn = $this->db; - $period->type = OPEN; - $period->value = $l_user_per; - $period->user = $g_user; - $period->name = 'periode'; - try - { - $l_form_per = $period->input(); - } - catch (Exception $e) - { - if ($e->getCode() == 1) - { - throw new Exception(_("Aucune période ouverte")); - - } - } - $label = HtmlInput::infobulle(3); - $f_period = "Période comptable $label" . $l_form_per; - } - - // Ledger (p_jrn) - //-- - $onchange="update_bank();ajax_saldo('first_sold');update_name();update_row('fin_item');"; - - if ($g_parameter->MY_DATE_SUGGEST == 'Y') - $onchange .= 'get_last_date();'; - if ($g_parameter->MY_PJ_SUGGEST=='Y') - $onchange .= 'update_pj();'; - - $add_js = 'onchange="'.$onchange.'"'; - $wLedger = $this->select_ledger('FIN', 2); - if ($wLedger == null) - throw new Exception(_('Pas de journal disponible')); - - $wLedger->javascript = $add_js; - - $label = " Journal " . HtmlInput::infobulle(2); - $f_jrn = $label . $wLedger->input(); - - - // retrieve bank name, code and account from the jrn_def.jrn_def_bank - - $f_bank = '' . $this->get_bank_name() . ''; - if ($this->bank_id == "") - { - echo h2("Journal de banque non configuré " . $this->get_name(), ' class="error"'); - echo ' vous devez donner à ce journal un compte en banque (fiche), modifiez dans CFGLED'; - alert("Journal de banque non configuré " . $this->get_name()); - } - - $f_legend_detail = 'Opérations financières'; - //-------------------------------------------------- - // Saldo begin end - //------------------------------------------------- - // Extrait - $default_pj = ''; - if ($g_parameter->MY_PJ_SUGGEST == 'Y') - { - $default_pj = $this->guess_pj(); - } - $wPJ = new IText('e_pj'); - $wPJ->readonly = false; - $wPJ->size = 10; - $wPJ->value = (isset($e_pj)) ? $e_pj : $default_pj; - - $f_extrait = $wPJ->input() . HtmlInput::hidden('e_pj_suggest', $default_pj); - $label = HtmlInput::infobulle(7); - - $first_sold = (isset($first_sold)) ? $first_sold : ""; - $wFirst = new INum('first_sold', $first_sold); - - $last_sold = isset($last_sold) ? $last_sold : ""; - $wLast = new INum('last_sold', $last_sold); - - - $max = (isset($nb_item)) ? $nb_item : $min_article; - - $r.= HtmlInput::hidden('nb_item', $max); - //-------------------------------------------------- - // financial operation - //------------------------------------------------- - - $array = array(); - // Parse each " tiers" - for ($i = 0; $i < $max; $i++) - { - $tiers = (isset(${"e_other" . $i})) ? ${"e_other" . $i} : ""; - - $tiers_amount = (isset(${"e_other$i" . "_amount"})) ? round(${"e_other$i" . "_amount"}, 2) : 0; - - $tiers_comment = (isset(${"e_other$i" . "_comment"})) ? ${"e_other$i" . "_comment"} : ""; - - $operation_date=new IDate("dateop".$i); - $operation_date->value=(isset(${'dateop'.$i}))?${'dateop'.$i}:""; - $array[$i]['dateop']=$operation_date->input(); - ${"e_other$i" . "_amount"} = (isset(${"e_other$i" . "_amount"})) ? ${"e_other$i" . "_amount"} : 0; - - $W1 = new ICard(); - $W1->label = ""; - $W1->name = "e_other" . $i; - $W1->id = "e_other" . $i; - $W1->value = $tiers; - $W1->extra = 'deb'; // credits - $W1->typecard = 'deb'; - $W1->style=' style = "vertical-align:65%"'; - $W1->set_dblclick("fill_ipopcard(this);"); - $W1->set_attribute('ipopup', 'ipopcard'); - - // name of the field to update with the name of the card - $W1->set_attribute('label', 'e_other_name' . $i); - // name of the field to update with the name of the card - $W1->set_attribute('typecard', 'filter'); - // Add the callback function to filter the card on the jrn - $W1->set_callback('filter_card'); - $W1->set_function('fill_data'); - $W1->javascript = sprintf(' onchange="fill_data_onchange(\'%s\');" ', $W1->name); - $W1->readonly = $pview_only; - $array[$i]['qcode'] = $W1->input(); - $array[$i]['search'] = $W1->search(); - - // Card name - // - $card_name = ""; - if ($tiers != "") - { - $fiche = new Fiche($this->db); - $fiche->get_by_qcode($tiers); - $card_name = $this->db->get_value("Select ad_value from fiche_detail where ad_id=$1 and f_id=$2", array(ATTR_DEF_NAME, $fiche->id)); - } - - $wcard_name = new IText("e_other_name" . $i, $card_name); - $wcard_name->id=$wcard_name->name; - $wcard_name->readOnly = true; - $array[$i]['cname'] = $wcard_name->input(); - - // Comment - $wComment = new IText("e_other$i" . "_comment", $tiers_comment); - - $wComment->size = 35; - $wComment->setReadOnly($pview_only); - $array[$i]['comment'] = $wComment->input(); - // amount - $wAmount = new INum("e_other$i" . "_amount", $tiers_amount); - - $wAmount->size = 7; - $wAmount->setReadOnly($pview_only); - $array[$i]['amount'] = $wAmount->input(); - // concerned - ${"e_concerned" . $i} = (isset(${"e_concerned" . $i})) ? ${"e_concerned" . $i} : "" - ; - $wConcerned = new IConcerned("e_concerned" . $i, ${"e_concerned" . $i}); - $wConcerned->tiers="e_other" . $i; - $wConcerned->setReadOnly($pview_only); - $wConcerned->amount_id = "e_other" . $i . "_amount"; - - $wConcerned->paid = 'paid'; - $array[$i]['concerned'] = $wConcerned->input(); - } - - ob_start(); - require_once NOALYSS_INCLUDE.'/template/form_ledger_fin.php'; - $r.=ob_get_contents(); - ob_end_clean(); - $r.= create_script("$('".$Date->id."').focus()"); - - return $r; - } - - /**\brief show the summary before inserting into the database, it - * calls the function for adding a attachment. The function verify - * should be called before - * \param $p_array an array usually is $_POST - * \return string with code html - */ - - public function confirm($p_array, $p_nothing = 0) - { - global $g_parameter,$g_user; - $r = ""; - bcscale(2); - extract($p_array); - $pPeriode = new Periode($this->db); - if ($this->check_periode() == true) - { - $pPeriode->p_id = $periode; - } - else - { - if (isDate($e_date) != null) { - $pPeriode->find_periode($e_date); - } else { - $pPeriode->p_id=$g_user->get_periode(); - } - } - - list ($l_date_start, $l_date_end) = $pPeriode->get_date_limit(); - $exercice = $pPeriode->get_exercice(); - $r.=''; - $r.='
    Banque, caisse '; - $r.= '
    '; - $r.='

    ' . $this->get_name() . '

    '; - $r.= '
    '; - $r.=''; - // Date - //-- - $r.=""; - if ( $chdate == 1 ) $r.='"; - $r.=""; - // Ledger (p_jrn) - //-- - $r.=''; - $r.=''; - $this->id = $p_jrn; - $r.=''; - $r.=''; - - //retrieve bank name - $bk_id = $this->get_bank(); - - $fBank = new Fiche($this->db, $bk_id); - $e_bank_account_label = $this->get_bank_name(); - - $filter_year = " j_tech_per in (select p_id from parm_periode where p_exercice='" . $exercice . "')"; - - $acc_account = new Acc_Account_Ledger($this->db, $fBank->strAttribut(ATTR_DEF_ACCOUNT)); - $asolde= $acc_account->get_solde_detail($filter_year); - $deb=$asolde['debit']; - $cred=$asolde['credit']; - $solde= bcsub($deb, $cred); - $new_solde=$solde; - - $r.="
    Date : ' . $e_date; - // Periode - //-- - $r.=""; - $r.="Période comptable "; - $r.=$l_date_start . ' - ' . $l_date_end; - $r.="
    Journal '; - $r.=h($this->get_name()); - $r.='
    Banque "; - $r.=$e_bank_account_label; - - $r.="
    "; - - $r.='
    '; - - $r.='

    Extrait de compte

    '; - //-------------------------------------------------- - // Saldo begin end - //------------------------------------------------- - $r.=''; - $r.=''; - // Extrait - //-- - $r.=tr('' . td(h($e_pj))); - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.='
    Numéro d\'extrait
    Solde début extrait ' . nbm($first_sold) . '
    Solde fin extrait ' . nbm($last_sold) . '
    '; - - $r.='

    Opérations financières

    '; - //-------------------------------------------------- - // financial operation - //------------------------------------------------- - $r.=''; - $r.=""; - if ($chdate==2) $r.=''; - $r.=""; - $r.=""; - $r.=""; - $r.=''; - - /* if we use the AC */ - if ($g_parameter->MY_ANALYTIC != 'nu') - { - $anc = new Anc_Plan($this->db); - $a_anc = $anc->get_list(); - $x = count($a_anc); - /* set the width of the col */ - $r.=''; - - /* add hidden variables pa[] to hold the value of pa_id */ - $r.=Anc_Plan::hidden($a_anc); - } - $r.=""; - // Parse each " tiers" - $tot_amount = 0; - //-------------------------------------------------- - // For each items - //-------------------------------------------------- - for ($i = 0; $i < $nb_item; $i++) - { - - $tiers = (isset(${"e_other" . $i})) ? ${"e_other" . $i} : "" - ; - - if (strlen(trim($tiers)) == 0) - continue; - $tiers_label = ""; - $tiers_amount = round(${"e_other$i" . "_amount"}, 2); - $tot_amount = bcadd($tot_amount, $tiers_amount); - $tiers_comment = h(${"e_other$i" . "_comment"}); - // If $tiers has a value - $fTiers = new Fiche($this->db); - $fTiers->get_by_qcode($tiers); - - $tiers_label = $fTiers->strAttribut(ATTR_DEF_NAME); - - $r.=""; - if ($chdate==2) $r.=td(${"dateop".$i}); - $r.=""; - // label - $r.=''; - // Comment - $r.=''; - // amount - $r.=''; - // concerned - $r.=''; - // encode the pa - if ($g_parameter->MY_ANALYTIC != 'nu' && preg_match("/^[6,7]/", $fTiers->strAttribut(ATTR_DEF_ACCOUNT)) == 1) // use of AA - { - // show form - $anc_op = new Anc_Operation($this->db); - $null = ($g_parameter->MY_ANALYTIC == 'op') ? 1 : 0; - $r.=''; - } - - $r.=''; - } - $r.="
    DateNomCommentaireMontant Op. Concernée(s)' . _('Compt. Analytique') . '
    " . ${'e_other' . $i} . "'; - $r.=$fTiers->strAttribut(ATTR_DEF_NAME); - $r.='' . $tiers_comment . '' . nbm($tiers_amount) . ''; - if (${"e_concerned" . $i} != '') - { - $jr_internal = $this->db->get_array("select jr_internal from jrn where jr_id in (" . ${"e_concerned" . $i} . ")"); - $comma=""; - for ($x = 0; $x < count($jr_internal); $x++) - { - $r.=$comma.HtmlInput::detail_op(${"e_concerned" . $i}, $jr_internal[$x]['jr_internal']); - $comma=" , "; - } - } - $r.=''; - $p_mode = 1; - $p_array['pa_id'] = $a_anc; - /* op is the operation it contains either a sequence or a jrnx.j_id */ - $r.=HtmlInput::hidden('op[]=', $i); - $r.=$anc_op->display_form_plan($p_array, $null, $p_mode, $i, $tiers_amount); - $r.='
    "; - - // saldo - $r.='
    Ancien solde = ' . $solde; - $new_solde+=$tot_amount; - $r.='
    Nouveau solde = ' . $new_solde; - $r.='
    Difference =' . $tot_amount; - // check for upload piece - $file = new IFile(); - - $r.="
    Ajoutez une pièce justificative "; - $r.=$file->input("pj", ""); - - $r.='
    '; - //-------------------------------------------------- - // Hidden variables - //-------------------------------------------------- - $r.=dossier::hidden(); - $r.=HtmlInput::hidden('p_jrn', $this->id); - $r.=HtmlInput::hidden('nb_item', $nb_item); - $r.=HtmlInput::hidden('last_sold', $last_sold); - $r.=HtmlInput::hidden('first_sold', $first_sold); - $r.=HtmlInput::hidden('e_pj', $e_pj); - $r.=HtmlInput::hidden('e_pj_suggest', $e_pj_suggest); - $r.=HtmlInput::hidden('e_date', $e_date); - $mt = microtime(true); - $r.=HtmlInput::hidden('mt', $mt); - - if (isset($periode)) - $r.=HtmlInput::hidden('periode', $periode); - $r.=dossier::hidden(); - $r.=HtmlInput::hidden('sa', 'n','chdate'); - for ($i = 0; $i < $nb_item; $i++) - { - $tiers = (isset(${"e_other" . $i})) ? ${"e_other" . $i} : "" ; - $r.=HtmlInput::hidden('e_other' . $i, $tiers); - $r.=HtmlInput::hidden('e_other' . $i, $tiers); - $r.=HtmlInput::hidden('e_other' . $i . '_comment', ${'e_other' . $i . '_comment'}); - $r.=HtmlInput::hidden('e_other' . $i . '_amount', ${'e_other' . $i . '_amount'}); - $r.=HtmlInput::hidden('e_concerned' . $i, ${'e_concerned' . $i}); - $r.=HtmlInput::hidden('dateop' . $i, ${'dateop' . $i}); - $r.=HtmlInput::hidden('chdate' , $chdate); - } - - return $r; - } - - /**\brief save the data into the database, included the attachment, - * and the reconciliations - * \param $p_array usually $_POST - * \return string with HTML code - */ - - public function insert($p_array = null) - { - global $g_parameter; - bcscale(2); - $internal_code = ""; - $oid = 0; - extract($p_array); - $ret = ''; - // Debit = banque - $bank_id = $this->get_bank(); - $fBank = new Fiche($this->db, $bank_id); - $e_bank_account = $fBank->strAttribut(ATTR_DEF_QUICKCODE); - // Get the saldo - $pPeriode = new Periode($this->db); - $sposte = $fBank->strAttribut(ATTR_DEF_ACCOUNT); - // if 2 accounts, take only the debit one for customer - if (strpos($sposte, ',') != 0) - { - $array = explode(',', $sposte); - $poste_val = $array[0]; - } - else - { - $poste_val = $sposte; - } - - $acc_account = new Acc_Account_Ledger($this->db, $poste_val); - - // If date = deposit date - if ($chdate == 1 ) - { - if ($this->check_periode() == true) - { - $pPeriode->p_id = $periode; - } - else - { - $pPeriode->find_periode($e_date); - } - $exercice = $pPeriode->get_exercice(); - $filter_year = " j_tech_per in (select p_id from parm_periode where p_exercice='" . $exercice . "')"; - $asolde= $acc_account->get_solde_detail($filter_year); - $deb=$asolde['debit']; - $cred=$asolde['credit']; - $solde= bcsub($deb, $cred); - $new_solde=$solde; - } - - - - - - try - { - $this->db->start(); - $amount = 0.0; - $idx_operation = 0; - $ret = ''; - $ret.=tr(th('Date').th('n° interne') . th('Quick Code') . th('Nom') . th('Libellé') . th('Montant', ' style="text-align:right"')); - // Credit = goods - $get_solde=true; - for ($i = 0; $i < $nb_item; $i++) - { - // insert it into the database - // and quit the loop ? - if (strlen(trim(${"e_other$i"})) == 0) - continue; - - if ( $chdate == 2 ) $e_date=${'dateop'.$i}; - // if date is date of operation - if ($chdate == 2 && $get_solde ) - { - $get_solde=false; - if ($this->check_periode() == true) - { - $pPeriode->p_id = $periode; - } - else - { - $pPeriode->find_periode($e_date); - } - $exercice = $pPeriode->get_exercice(); - $filter_year = " j_tech_per in (select p_id from parm_periode where p_exercice='" . $exercice . "')"; - $solde = $acc_account->get_solde($filter_year); - $new_solde = $solde; - } - $fPoste = new Fiche($this->db); - $fPoste->get_by_qcode(${"e_other$i"}); - - // round it - ${"e_other$i" . "_amount"} = round(${"e_other$i" . "_amount"}, 2); - - - - $amount+=${"e_other$i" . "_amount"}; - // Record a line for the bank - // Compute the j_grpt - $seq = $this->db->get_next_seq('s_grpt'); - - $acc_operation = new Acc_Operation($this->db); - $acc_operation->date = $e_date; - $sposte = $fPoste->strAttribut(ATTR_DEF_ACCOUNT); - // if 2 accounts - if (strpos($sposte, ',') != 0) - { - $array = explode(',', $sposte); - if (${"e_other$i" . "_amount"} < 0) - $poste_val = $array[1]; - else - $poste_val = $array[0]; - } - else - { - $poste_val = $sposte; - } - - - $acc_operation->poste = $poste_val; - $acc_operation->amount = ${"e_other$i" . "_amount"} * (-1); - $acc_operation->grpt = $seq; - $acc_operation->jrn = $p_jrn; - $acc_operation->type = 'd'; - - if (isset($periode)) - $tperiode = $periode; - else - { - $per = new Periode($this->db); - $tperiode = $per->find_periode($e_date); - } - $acc_operation->periode = $tperiode; - $acc_operation->qcode = ${"e_other" . $i}; - $j_id = $acc_operation->insert_jrnx(); - - $acc_operation = new Acc_Operation($this->db); - $acc_operation->date = $e_date; - $sposte = $fBank->strAttribut(ATTR_DEF_ACCOUNT); - - // if 2 accounts - if (strpos($sposte, ',') != 0) - { - $array = explode(',', $sposte); - if (${"e_other$i" . "_amount"} < 0) - $poste_val = $array[1]; - else - $poste_val = $array[0]; - } - else - { - $poste_val = $sposte; - } - - $acc_operation->poste = $poste_val; - $acc_operation->amount = ${"e_other$i" . "_amount"}; - $acc_operation->grpt = $seq; - $acc_operation->jrn = $p_jrn; - $acc_operation->type = 'd'; - $acc_operation->periode = $tperiode; - $acc_operation->qcode = $e_bank_account; - $acc_operation->insert_jrnx(); - - - if (sql_string(${"e_other$i" . "_comment"}) == null) - { - // if comment is blank set a default one - $comment = " compte : " . $fBank->strAttribut(ATTR_DEF_NAME) . ' a ' . - $fPoste->strAttribut(ATTR_DEF_NAME); - } - else - { - $comment = ${'e_other' . $i . '_comment'}; - } - - - $acc_operation = new Acc_Operation($this->db); - $acc_operation->jrn = $p_jrn; - $acc_operation->amount = abs(${"e_other$i" . "_amount"}); - $acc_operation->date = $e_date; - $acc_operation->desc = $comment; - $acc_operation->grpt = $seq; - $acc_operation->periode = $tperiode; - $acc_operation->mt = $mt; - $idx_operation++; - $acc_operation->pj = ''; - - if (trim($e_pj) != '' && $this->numb_operation() == true) - $acc_operation->pj = $e_pj . str_pad($idx_operation, 3, 0, STR_PAD_LEFT); - - if (trim($e_pj) != '' && $this->numb_operation() == false) - $acc_operation->pj = $e_pj; - - $jr_id = $acc_operation->insert_jrn(); - // $acc_operation->set_pj(); - $this->db->exec_sql('update jrn set jr_pj_number=$1 where jr_id=$2', array($acc_operation->pj, $jr_id)); - $internal = $this->compute_internal_code($seq); - - - if (trim(${"e_concerned" . $i}) != "") - { - if (strpos(${"e_concerned" . $i}, ',') != 0) - { - $aRapt = explode(',', ${"e_concerned" . $i}); - foreach ($aRapt as $rRapt) - { - // Add a "concerned operation to bound these op.together - // - $rec = new Acc_Reconciliation($this->db); - $rec->set_jr_id($jr_id); - - if (isNumber($rRapt) == 1) - { - $rec->insert($rRapt); - } - } - } - else - if (isNumber(${"e_concerned" . $i}) == 1) - { - $rec = new Acc_Reconciliation($this->db); - $rec->set_jr_id($jr_id); - $rec->insert(${"e_concerned$i"}); - } - } - - // Set Internal code - $this->grpt_id = $seq; - /** - * save also into quant_fin - */ - $this->insert_quant_fin($fBank->id, $jr_id, $fPoste->id, ${"e_other$i" . "_amount"}); - - if ($g_parameter->MY_ANALYTIC != "nu") - { - // for each item, insert into operation_analytique */ - $op = new Anc_Operation($this->db); - $op->oa_group = $this->db->get_next_seq("s_oa_group"); /* for analytic */ - $op->j_id = $j_id; - $op->oa_date = $e_date; - $op->oa_debit = 'f'; - $op->oa_description = sql_string($comment); - $op->save_form_plan($_POST, $i, $j_id); - } - - - $this->update_internal_code($internal); - - $js_detail = HtmlInput::detail_op($jr_id, $internal); - // Compute display - $row = td($e_date).td($js_detail) . td(${"e_other$i"}) . td($fPoste->strAttribut(ATTR_DEF_NAME)) . td(${"e_other" . $i . "_comment"}) . td(nbm(${"e_other$i" . "_amount"}), 'class="num"'); - $class=($i%2==0)?' class="even" ':' class="odd" '; - $ret.=tr($row,$class); - - - if ($i == 0) - { - // first record we upload the files and - // keep variable to update other row of jrn - if (isset($_FILES)) - $oid = $this->db->save_upload_document($seq); - } - else - { - if ($oid != 0) - { - $this->db->exec_sql("update jrn set jr_pj=$1 , jr_pj_name=$2, - jr_pj_type=$3 where jr_grpt_id=$4", - array($oid,$_FILES['pj']['name'] ,$_FILES['pj']['type'],$seq)); - } - } - } // for nbitem - // increment pj - if (strlen(trim($e_pj)) != 0) - { - $this->inc_seq_pj(); - } - $ret.='
    '; - } - catch (Exception $e) - { - $r = '' . - 'Erreur dans l\'enregistrement ' . - __FILE__ . ':' . __LINE__ . ' ' . - $e->getMessage(); - $this->db->rollback(); - throw new Exception($r); - } - $this->db->commit(); - $r = ""; - $r.="
    Ancien solde " . nbm($solde); - $new_solde = bcadd($new_solde, $amount); - $r.="
    Nouveau solde " . nbm($new_solde); - $ret.=$r; - return $ret; - } - - /**\brief display operation of a FIN ledger - * \return html code into a string - */ - - function show_ledger() - { - global $g_user; - echo dossier::hidden(); - $hid = new IHidden(); - - $hid->name = "p_action"; - $hid->value = "bank"; - echo $hid->input(); - - - $hid->name = "sa"; - $hid->value = "l"; - echo $hid->input(); - - - $w = new ISelect(); - // filter on the current year - $filter_year = " where p_exercice='" . $g_user->get_exercice() . "'"; - - $periode_start = $this->db->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end", 1); - // User is already set User=new User($this->db); - $current = (isset($_GET['p_periode'])) ? $_GET['p_periode'] : -1; - $w->selected = $current; - - echo '
    '; - echo 'Période ' . $w->input("p_periode", $periode_start); - $wLedger = $this->select_ledger('fin', 3); - - if ($wLedger == null) - throw new Exception(_('Pas de journal disponible')); - - if (count($wLedger->value) > 1) - { - $aValue = $wLedger->value; - $wLedger->value[0] = array('value' => -1, 'label' => _('Tous les journaux financiers')); - $idx = 1; - foreach ($aValue as $a) - { - $wLedger->value[$idx] = $a; - $idx++; - } - } - - - - echo 'Journal ' . $wLedger->input(); - $w = new ICard(); - $w->noadd = 'no'; - $w->jrn = $this->id; - $qcode = (isset($_GET['qcode'])) ? $_GET['qcode'] : ""; - echo dossier::hidden(); - echo HtmlInput::hidden('p_action', 'bank'); - echo HtmlInput::hidden('sa', 'l'); - $w->name = 'qcode'; - $w->value = $qcode; - $w->label = ''; - $this->type = 'FIN'; - $all = $this->get_all_fiche_def(); - $w->extra = $all; - $w->extra2 = 'QuickCode'; - $sp = new ISpan(); - echo $sp->input("qcode_label", "", $qcode); - echo $w->input(); - - echo HtmlInput::submit('gl_submit', _('Rechercher')); - echo '
    '; - - // Show list of sell - // Date - date of payment - Customer - amount - if ($current != -1) - { - $filter_per = " and jr_tech_per=" . $current; - } - else - { - $filter_per = " and jr_tech_per in (select p_id from parm_periode where p_exercice::integer=" . - $g_user->get_exercice() . ")"; - } - /* security */ - if ($this->id != -1) - $available_ledger = " and jr_def_id= " . $this->id . " and " . $g_user->get_ledger_sql(); - else - $available_ledger = " and " . $g_user->get_ledger_sql(); - // Show list of sell - // Date - date of payment - Customer - amount - $sql = SQL_LIST_ALL_INVOICE . $filter_per . " and jr_def_type='FIN'" . - " $available_ledger"; - $step = $_SESSION['g_pagesize']; - $page = (isset($_GET['offset'])) ? $_GET['page'] : 1; - $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0; - - $l = ""; - - // check if qcode contains something - if ($qcode != "") - { - // add a condition to filter on the quick code - $l = " and jr_grpt_id in (select j_grpt from jrnx where j_qcode=upper('$qcode')) "; - } - - list($max_line, $list) = ListJrn($this->db, "where jrn_def_type='FIN' $filter_per $l $available_ledger " - , null, $offset, 0); - $bar = navigation_bar($offset, $max_line, $step, $page); - - echo "
    $bar"; - echo $list; - echo "$bar
    "; - } - - /** - * return a string with the bank account, name and quick_code - */ - function get_bank_name() - { - $this->bank_id = $this->db->get_value('select jrn_def_bank from jrn_def where jrn_def_id=$1', array($this->id)); - $fBank = new Fiche($this->db, $this->bank_id); - $e_bank_account = " : " . $fBank->strAttribut(ATTR_DEF_BQ_NO); - $e_bank_name = " : " . $fBank->strAttribut(ATTR_DEF_NAME); - $e_bank_qcode = ": " . $fBank->strAttribut(ATTR_DEF_QUICKCODE); - return $e_bank_qcode . $e_bank_name . $e_bank_account; - } - - /** - * return the fiche_id of the bank - */ - function get_bank() - { - $bank_id = $this->db->get_value('select jrn_def_bank from jrn_def where jrn_def_id=$1', array($this->id)); - return $bank_id; - } - - /** - * return true is we numbere each operation - */ - function numb_operation() - { - $a = $this->db->get_value('select jrn_def_num_op from jrn_def where jrn_def_id=$1', array($this->id)); - if ($a == 1) - return true; - return false; - } - - /** - * insert into the quant_fin table - * @param $bank_id is the f_id of the bank - * @param $jr_id is the jrn.jr_id of the operation - * @param $other is the f_id of the benefit - * @param $amount is the amount - */ - function insert_quant_fin($p_bankid, $p_jrid, $p_otherid, $p_amount) - { - $sql = "INSERT INTO quant_fin(qf_bank, jr_id, qf_other, qf_amount) - VALUES ($1, $2, $3, $4);"; - - $this->db->exec_sql($sql, array($p_bankid, $p_jrid, $p_otherid, round($p_amount, 2))); - } - -} diff --git a/sources/include/class_acc_ledger_info.php b/sources/include/class_acc_ledger_info.php deleted file mode 100644 index 398ff94..0000000 --- a/sources/include/class_acc_ledger_info.php +++ /dev/null @@ -1,216 +0,0 @@ -cn=$p_cn; - $this->ji_id=$p_ji_id; - } - function insert() - { - if ( ! isset ($this->jr_id) || - ! isset ($this->ji_value) || - ! isset ($this->id_type ) ) - { - echo 'Appel incorrecte '.__FILE__.__LINE__; - var_dump($this); - throw new Exception(_('appel incorrect')); - } - try - { - $sql=$this->cn->exec_sql('insert into jrn_info(jr_id,id_type,ji_value) values ($1,$2,$3)'. - ' returning ji_id ', - array ($this->jr_id,$this->id_type,$this->ji_value) - ); - $this->ji_id=Database::fetch_result($sql,0,0); - } - catch (Exception $e) - { - echo "Echec sauvegarde info additionnelles"; - throw $e; - } - } - function update() - { - if ( ! isset ($this->jr_id) || - ! isset ($this->ji_value) || - ! isset ($this->jr_id ) ) - { - echo 'Appel incorrecte '.__FILE__.__LINE__; - var_dump($this); - throw new Exception('appel incorrect'); - } - try - { - $sql=$this->exec_sql('update jrn_info set jr_id=$1 ,id_type=$2,ji_value=$3 where ji_id=$4)'. - array ($this->jr_id,$this->id_type,$this->ji_value,$this->ji_id) - ); - } - catch (Exception $e) - { - $this->cn->rollback(); - echo "Echec sauvegarde info additionnelles"; - throw $e; - } - } - function load() - { - $sql="select jr_id,id_type,ji_value from jrn_info where ji_id=".$this->ji_id; - $r=$this->cn->exec_sql($sql); - if (Database::num_row ($r) > 0 ) - { - $this->from_array(Database::fetch_array($r,0)); - return 0; - } - else - { - return 1; - } - - } - function from_array($p_array) - { - foreach ($p_array as $col=>$value) - { - $this->$col=$value; - } - } - function set_id($p_ji_id) - { - $this->$ji_id=$p_ji_id; - } - function set_jrn_id($p_id) - { - $this->jr_id=$p_id; - } - function set_type($p_id) - { - $this->id_type=$p_id; - } - function set_value($p_id) - { - $this->ji_value=$p_id; - } - /*!\brief load all the jrn_info thanks the jr_id - * \return an array of object - */ - function load_all() - { - if ( ! isset ($this->jr_id) ) - { - echo "jr_id is not set ".__FILE__.__LINE__; - throw new Exception('Error : jr_id not set'); - } - - $sql="select ji_id from jrn_info where jr_id=".$this->jr_id; - $r=$this->cn->exec_sql($sql); - if (Database::num_row($r) == 0 ) - return array(); - $array=Database::fetch_all($r); - $ret=array(); - foreach ($array as $row) - { - $o=new Acc_Ledger_Info($this->cn,$row['ji_id']); - $o->load(); - $ret[]=clone $o; - } - return $ret; - - } - function count() - { - $sql="select ji_id from jrn_info where jr_id=".$this->jr_id; - return $this->cn->count_sql($sql); - } - function search_id_internal($p_internal) - { - $sql="select jr_id from jrn where jr_internal='$p_internal'"; - $r=$this->cn->exec_sql($sql); - if (Database::num_row($r) > 0 ) - { - $this->jr_id=Database::fetch_result($r,0,0); - return $this->jr_id; - } - else - { - $this->jr_id=-1; - return $this->jr_id; - } - } - /** - *@brief save all extra information in once, called by compta_ven and compta_ach - *@param $p_jr_id is the jrn.jr_id concerned, - *@param $p_array is the array with the data usually it is $_POST - *@note will change this->jr_id - *@see compta_ven.inc.php compta_ach.inc.php - */ - function save_extra($p_jr_id,$p_array) - { - $this->jr_id=$p_jr_id; - if (strlen(trim($p_array['bon_comm'] )) != 0 ) - { - $this->set_type('BON_COMMANDE'); - $this->set_value($p_array['bon_comm']); - $this->insert(); - } - if (strlen(trim($p_array['other_info'] )) != 0 ) - { - $this->set_type('OTHER'); - $this->set_value($p_array['other_info']); - $this->insert(); - } - } - static function test_me() - { - echo "Dossier = ".Dossier::id(); - $cn=new Database(Dossier::id()); - $a=new Acc_Ledger_Info($cn); - $a->jr_id=3; - $a->id_type='BON_COMMANDE'; - $a->ji_value='BON'; - var_dump($a); - $a->insert(); - - $a->set_jrn_id(7); - $a->set_type('OTHER'); - $a->set_value('Autre test'); - $a->insert(); - } -} diff --git a/sources/include/class_acc_ledger_purchase.php b/sources/include/class_acc_ledger_purchase.php deleted file mode 100644 index 2036366..0000000 --- a/sources/include/class_acc_ledger_purchase.php +++ /dev/null @@ -1,1790 +0,0 @@ -type='ACH'; - parent::__construct($p_cn,$p_init); - } - /*!\brief verify that the data are correct before inserting or confirming - *\param an array (usually $_POST) - *\return String - *\throw Exception if an error occurs - */ - public function verify($p_array) - { - global $g_parameter,$g_user; - - if (is_array($p_array ) == false || empty($p_array)) - throw new Exception ("Array empty"); - /* - * Check needed value - */ - check_parameter($p_array,'p_jrn,e_date,e_client'); - - extract ($p_array); - /* check if we can write into this ledger */ - if ( $g_user->check_jrn($p_jrn) != 'W' ) - throw new Exception (_('Accès interdit'),20); - - - /* check for a double reload */ - if ( isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1',array($mt)) != 0 ) - throw new Exception (_('Double Encodage'),5); - - /* check if there is a customer */ - if ( strlen(trim($e_client)) == 0 ) - throw new Exception(_('Vous n\'avez pas donné de fournisseur'),11); - - /* check if the date is valid */ - if ( isDate($e_date) == null ) - { - throw new Exception(_('Date invalide'), 2); - } - $oPeriode=new Periode($this->db); - if ( $this->check_periode() == false) - { - $tperiode=$oPeriode->find_periode($e_date); - } - else - { - $tperiode=$period; - $oPeriode->p_id=$tperiode; - /* check that the datum is in the choosen periode */ - list ($min,$max)=$oPeriode->get_date_limit($tperiode); - if ( cmpDate($e_date,$min) < 0 || - cmpDate($e_date,$max) > 0) - throw new Exception(_('Date et periode ne correspondent pas'),6); - } - /* check if the periode is closed */ - if ( $this->is_closed($tperiode)==1 ) - { - throw new Exception(_('Periode fermee'),6); - } - - /* check if we are using the strict mode */ - if( $this->check_strict() == true) - { - /* if we use the strict mode, we get the date of the last - operation */ - $last_date=$this->get_last_date(); - if ( $last_date != null && cmpDate($e_date,$last_date) < 0 ) - throw new Exception(_('Vous utilisez le mode strict la dernière operation est à la date du ') - .$last_date._(' vous ne pouvez pas encoder à une '. - ' date antérieure dans ce journal'),13); - - } - - /* check the account */ - $fiche=new Fiche($this->db); - $fiche->get_by_qcode($e_client); - - if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) - throw new Exception(_('La fiche ').$e_client._('n\'a pas de poste comptable'),8); - - /* get the account and explode if necessary */ - $sposte=$fiche->strAttribut(ATTR_DEF_ACCOUNT); - // if 2 accounts, take only the credit one for supplier - if ( strpos($sposte,',') != 0 ) - { - $array=explode(',',$sposte); - $poste_val=$array[1]; - } - else - { - $poste_val=$sposte; - } - - /* The account exists */ - $poste=new Acc_Account_Ledger($this->db,$poste_val); - if ( $poste->load() == false ) - { - throw new Exception(_('Pour la fiche ').$e_client._(' le poste comptable [').$poste->id.'] '._('n\'existe pas'),9); - } - /* Check if the card belong to the ledger */ - $fiche=new Fiche ($this->db); - $fiche->get_by_qcode($e_client,'cred'); - if ( $fiche->belong_ledger($p_jrn) !=1 ) - throw new Exception(_('La fiche ').$e_client._('n\'est pas accessible à ce journal'),10); - - $nb=0; - //------------------------------------------------------ - // The "Paid By" check - //------------------------------------------------------ - if ($e_mp != 0 ) $this->check_payment($e_mp,${"e_mp_qcode_".$e_mp}); - - - //---------------------------------------- - // foreach item - //---------------------------------------- - for ($i=0;$i< $nb_item;$i++) - { - if ( strlen(trim(${'e_march'.$i}))== 0) continue; - /* check if amount are numeric and */ - if ( isNumber(${'e_march'.$i.'_price'}) == 0 ) - throw new Exception(_('La fiche ').${'e_march'.$i}._('a un montant invalide').' ['.${'e_march'.$i}.']',6); - if ( isNumber(${'e_quant'.$i}) == 0 ) - throw new Exception(_('La fiche ').${'e_march'.$i}._('a une quantité invalide').' ['.${'e_quant'.$i}.']',7); - - // Check if the given tva id is valid - if ( $g_parameter->MY_TVA_USE=='Y') - { - if (${'e_march'.$i.'_tva_id'} == 0 ) - throw new Exception(_('La fiche ').${'e_march'.$i}._('a un code tva invalide').' ['.${'e_march'.$i.'_tva_id'}.']',13); - $tva_rate=new Acc_Tva($this->db); - $tva_rate->set_parameter('id',${'e_march'.$i.'_tva_id'}); - - if ( $tva_rate->load() != 0 ) - throw new Exception(_('La fiche ').${'e_march'.$i}._('a un code tva invalide').' ['.${'e_march'.$i.'_tva_id'}.']',13); - /* - * check if the accounting for VAT are valid - */ - $a_poste=explode(',',$tva_rate->tva_poste); - - if ( - $this->db->get_value('select count(*) from tmp_pcmn where pcm_val=$1',array($a_poste[0])) == 0 || - $this->db->get_value('select count(*) from tmp_pcmn where pcm_val=$1',array($a_poste[1])) == 0 ) - throw new Exception(_(" La TVA ".$tva_rate->tva_label." utilise des postes comptables inexistants")); - - } - /* check if all card has a ATTR_DEF_ACCOUNT*/ - $fiche=new Fiche($this->db); - $fiche->get_by_qcode(${'e_march'.$i}); - if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) - throw new Exception(_('La fiche ').${'e_march'.$i}._('n\'a pas de poste comptable'),8); - - /* get the account and explode if necessary */ - $sposte=$fiche->strAttribut(ATTR_DEF_ACCOUNT); - // if 2 accounts, take only the debit - if ( strpos($sposte,',') != 0 ) - { - $array=explode(',',$sposte); - $poste_val=$array[0]; - } - else - { - $poste_val=$sposte; - } - - /* The account exists */ - $poste=new Acc_Account_Ledger($this->db,$poste_val); - if ( $poste->load() == false ) - { - throw new Exception(_('Pour la fiche ').${'e_march'.$i}._(' le poste comptable').' ['.$poste->id._('n\'existe pas'),9); - } - /* Check if the card belong to the ledger */ - $fiche=new Fiche ($this->db); - $fiche->get_by_qcode(${'e_march'.$i}); - if ( $fiche->belong_ledger($p_jrn,'deb') !=1 ) - throw new Exception(_('La fiche ').${'e_march'.$i}._('n\'est pas accessible à ce journal'),10); - /** - * we have to check also if the different accountings exist - "ATTR_DEF_DEP_PRIV" - "ATTR_DEF_DEPENSE_NON_DEDUCTIBLE" - "ATTR_DEF_TVA_NON_DEDUCTIBLE" - "ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP" - */ - foreach (array( - array(ATTR_DEF_DEPENSE_NON_DEDUCTIBLE,'DNA',ATTR_DEF_ACCOUNT_ND), - array(ATTR_DEF_DEP_PRIV,'DEP_PRIV',ATTR_DEF_ACCOUNT_ND_PERSO), - array(ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP,'TVA_DED_IMPOT',ATTR_DEF_ACCOUNT_ND_TVA), - array(ATTR_DEF_TVA_NON_DEDUCTIBLE,'TVA_DNA',ATTR_DEF_ACCOUNT_ND_TVA_ND)) as $key) - { - if ( ! $fiche->empty_attribute($key[0]) && $fiche->empty_attribute($key[2])) - { - $a=new Acc_Parm_Code($this->db,$key[1]); - if ( $this->db->count_sql('select pcm_val from tmp_pcmn where pcm_val=$1',array($a->p_value))==0) - throw new Exception ($key[1]._("ce code n'a pas de poste comptable, créez ce poste : [".$a->p_value."]")); - } - if ( ! $fiche->empty_attribute($key[0]) && ! $fiche->empty_attribute($key[2])) - { - $nd_str=$fiche->strAttribut($key[2]); - if ( $nd_str != '') - { - $poste_nd=new Acc_Account_Ledger($this->db,$nd_str); - if ( $poste_nd->load() == false) - { - $nd_msg=sprintf(_("Pour la fiche %s, le compte contrepartie %s n'existe pas"), - $fiche->getName(),$poste_nd->id); - $nd_msg=h($nd_msg); - throw new Exception ($nd_msg); - } - } - } - } - $nb++; - } - - if ( $nb == 0 ) - throw new Exception(_('Il n\'y a aucune marchandise'),12); - - } - /** - * Compute the ND amount thanks the attribute of the concerned card. The object - * $p_nd_amount will changed - * - * @param Acc_Compute $p_nd_amount object with ND amount - * @param Fiche $p_fiche Concerned Card (purchase items) - * @param type $p_tva_bot 0 TVA on one side, 1 TVA on both side - */ - private function compute_no_deductible(Acc_Compute $p_nd_amount, Fiche $p_fiche) - { - if (!$p_fiche->empty_attribute(ATTR_DEF_DEPENSE_NON_DEDUCTIBLE)) - { - $p_nd_amount->amount_nd_rate = $p_fiche->strAttribut(ATTR_DEF_DEPENSE_NON_DEDUCTIBLE); - $p_nd_amount->compute_nd(); - } - if (!$p_fiche->empty_attribute(ATTR_DEF_TVA_NON_DEDUCTIBLE) ) - { - $p_nd_amount->nd_vat_rate = $p_fiche->strAttribut(ATTR_DEF_TVA_NON_DEDUCTIBLE); - $p_nd_amount->compute_nd_vat(); - } - if (!$p_fiche->empty_attribute(ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP) ) - { - $p_nd_amount->nd_ded_vat_rate = $p_fiche->strAttribut(ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP); - $p_nd_amount->compute_ndded_vat(); - } - - if (!$p_fiche->empty_attribute(ATTR_DEF_DEP_PRIV)) - { - $p_nd_amount->amount_perso_rate = $p_fiche->strAttribut(ATTR_DEF_DEP_PRIV); - $p_nd_amount->compute_perso(); - } - - } - - /** - * Insert into JRNX the No Deductible amount and into Analytic Accountancy for the ND VAT - * @param Acc_Compute $p_nd_amount content ND amount - * @param Fiche $p_fiche Card of the Service - * @param type $p_tva_both 0 if TVA is normal or 1 if on both side - * @param type $p_tot_debit total debit - * @param $p_acc_operation Acc_Operation for inserting into jrnx - * @param $p_group group for AC - * @param $idx row number - * - * @see Acc_Ledger_Purchase::insert - */ - private function insert_no_deductible(Acc_Compute $p_nd_amount, Fiche $p_fiche, $p_tva_both,&$p_tot_debit,Acc_Operation $p_acc_operation,$p_group,$idx) - { - global $g_parameter; - if ($p_acc_operation->jrnx_id == 0) { - throw new Exception(__FILE__.__LINE__.'invalid acc_operation.j_id'); - } - $source_j_id=$p_acc_operation->jrnx_id ; - /* - * Save all the no deductible - * ATTR_DEF_ACCOUNT_ND_TVA,ATTR_DEF_ACCOUNT_ND_TVA_ND,ATTR_DEF_ACCOUNT_ND_PERSO,ATTR_DEF_ACCOUNT_ND - */ - if ($p_nd_amount->amount_nd_rate != 0) - { - $dna_default = new Acc_Parm_Code($this->db, 'DNA'); - - /* save op. */ - if (!$p_fiche->empty_attribute(ATTR_DEF_ACCOUNT_ND)) - { - $dna = $p_fiche->strAttribut(ATTR_DEF_ACCOUNT_ND); - } else - { - $dna = $dna_default->p_value; - } - $dna = ($dna == '') ? $dna_default->p_value : $dna; - - $p_acc_operation->type = 'd'; - $p_acc_operation->amount = $p_nd_amount->amount_nd; - $p_acc_operation->poste = $dna; - $p_acc_operation->qcode = ''; - $p_acc_operation->desc=$this->find_label($dna)." ND ".$p_fiche->strAttribut(ATTR_DEF_QUICKCODE); - if ($p_nd_amount->amount_nd > 0) - $p_tot_debit = bcadd($p_tot_debit, $p_nd_amount->amount_nd ); - $j_id = $p_acc_operation->insert_jrnx(); - } - /* - * ATTR_DEF_ACCOUNT_ND_PERSO - */ - if ($p_nd_amount->amount_perso != 0) - { - $dna_default = new Acc_Parm_Code($this->db, 'DEP_PRIV'); - - /* save op. */ - $p_acc_operation->type = 'd'; - if (!$p_fiche->empty_attribute(ATTR_DEF_ACCOUNT_ND_PERSO)) - { - $dna = $p_fiche->strAttribut(ATTR_DEF_ACCOUNT_ND_PERSO); - } else - { - $dna = $dna_default->p_value; - } - $dna = ($dna == '') ? $dna_default->p_value : $dna; - - $p_acc_operation->amount = $p_nd_amount->amount_perso ; - $p_acc_operation->poste = $dna; - $p_acc_operation->qcode = ''; - $p_acc_operation->desc=$this->find_label($dna)." ND_PRIV ".$p_fiche->strAttribut(ATTR_DEF_QUICKCODE); - if ($p_nd_amount->amount_perso> 0) - $p_tot_debit = bcadd($p_tot_debit, $p_nd_amount->amount_perso); - $j_id = $p_acc_operation->insert_jrnx(); - } - if ($p_nd_amount->nd_vat != 0) - { - $dna_default = new Acc_Parm_Code($this->db, 'TVA_DNA'); - - /* save op. */ - $p_acc_operation->type = 'd'; - $p_acc_operation->qcode = ''; - if (!$p_fiche->empty_attribute(ATTR_DEF_ACCOUNT_ND_TVA_ND) ) - { - $dna = $p_fiche->strAttribut(ATTR_DEF_ACCOUNT_ND_TVA_ND); - } else - { - $dna = $dna_default->p_value; - } - $dna = ($dna == '') ? $dna_default->p_value : $dna; - - $p_acc_operation->amount = $p_nd_amount->nd_vat; - $p_acc_operation->poste = $dna; - $p_acc_operation->desc=$this->find_label($dna)." ND_TVA ".$p_fiche->strAttribut(ATTR_DEF_QUICKCODE); - $j_id = $p_acc_operation->insert_jrnx(); - if ( $g_parameter->MY_ANALYTIC != "nu" ) - { - $op=new Anc_Operation($this->db); - $op->oa_group=$p_group; - $op->j_id=$j_id; - $op->oa_date=$p_acc_operation->date; - - $op->oa_debit='t'; - $op->oa_description=sql_string('ND_TVA'); - $op->oa_jrnx_id_source=$source_j_id; - $op->save_form_plan_vat_nd($_POST,$idx,$j_id,$p_nd_amount->nd_vat,$p_acc_operation->jrnx_id); - } - if ($p_nd_amount->nd_vat> 0) - $p_tot_debit = bcadd($p_tot_debit, $p_nd_amount->nd_vat); - - } - if ($p_nd_amount->nd_ded_vat != 0) - { - $dna_default = new Acc_Parm_Code($this->db, 'TVA_DED_IMPOT'); - /* save op. */ - if (!$p_fiche->empty_attribute(ATTR_DEF_ACCOUNT_ND_TVA) ) - { - $dna = $p_fiche->strAttribut(ATTR_DEF_ACCOUNT_ND_TVA); - } else - { - $dna = $dna_default->p_value; - } - $dna = ($dna == '') ? $dna_default->value : $dna; - - - - $p_acc_operation->type = 'd'; - $p_acc_operation->qcode = ''; - $p_acc_operation->amount = $p_nd_amount->nd_ded_vat; - $p_acc_operation->poste = $dna; - $p_acc_operation->desc=$this->find_label($dna)." DED_TVA ".$p_fiche->strAttribut(ATTR_DEF_QUICKCODE); - if ($p_nd_amount->nd_ded_vat > 0) - $p_tot_debit = bcadd($p_tot_debit, $p_nd_amount->nd_ded_vat); - $j_id = $p_acc_operation->insert_jrnx(); - if ( $g_parameter->MY_ANALYTIC != "nu" ) - { - $op=new Anc_Operation($this->db); - $op->oa_group=$p_group; - $op->j_id=$j_id; - $op->oa_date=$p_acc_operation->date; - - $op->oa_debit='t'; - $op->oa_description=sql_string('DED_TVA '); - $op->oa_jrnx_id_source=$source_j_id; - $op->save_form_plan_vat_nd($_POST,$idx,$j_id,$p_nd_amount->nd_ded_vat); - } - } - } - - /*!\brief insert into the database, it calls first the verify function - * change the value of this->jr_id and this->jr_internal. - * It generates the document and save the middle of payment, if 'gen_invoice is set - * and e_mp - *\param $p_array is usually $_POST or a predefined operation - \code - Array - ( - - [e_client] =>BELGACOM - [nb_item] =>9 - [p_jrn] =>3 - [period] =>117 - [e_comm] =>Frais de téléphone - [e_date] =>01.09.2009 - [e_ech] => - [jrn_type] =>ACH - [e_pj] =>ACH53 - [e_pj_suggest] =>ACH53 - [mt] =>1265318941.39 - [e_mp] =>0 - [e_march0] =>TEL - [e_march0_price] =>63.6700 - [e_march0_tva_id] =>1 - [e_march0_tva_amount] =>13.3700 - [e_quant0] =>1.000 - ... - [bon_comm] => - [other_info] => - [record] =>Enregistrement - ) - \endcode - *\return string - *\note throw an Exception - */ - public function insert($p_array=null) - { - global $g_parameter; - extract ($p_array); - $this->verify($p_array) ; - - $group=$this->db->get_next_seq("s_oa_group"); /* for analytic */ - $seq=$this->db->get_next_seq('s_grpt'); - $this->id=$p_jrn; - - $internal=$this->compute_internal_code($seq); - $this->internal=$internal; - - $cust=new Fiche($this->db); - $cust->get_by_qcode($e_client); - $sposte=$cust->strAttribut(ATTR_DEF_ACCOUNT); - // if 2 accounts, take only the credit Supplier - if ( strpos($sposte,',') != 0 ) - { - $array=explode(',',$sposte); - $poste=$array[1]; - } - else - { - $poste=$sposte; - } - - $oPeriode=new Periode($this->db); - $check_periode=$this->check_periode(); - - if ( $check_periode == true ) - $tperiode=$period; - else - $tperiode=$oPeriode->find_periode($e_date); - - bcscale(4); - try - { - $tot_amount=0; - $tot_tva=0; - $tot_debit=0; - $this->db->start(); - $tot_nd=0; - $tot_perso=0; - $tot_tva_nd=0; - $tot_tva_ndded=0; - $tot_tva_reversed=0; - $tva=array(); - /* Save all the items without vat and no deductible vat and expense*/ - for ($i=0;$i< $nb_item;$i++) - { - $n_both=0; - if ( strlen(trim(${'e_march'.$i})) == 0 ) continue; - - /* First we save all the items without vat */ - $fiche=new Fiche($this->db); - $fiche->get_by_qcode(${"e_march".$i}); - $tva_both=0; - /* tva */ - if ($g_parameter->MY_TVA_USE=='Y') - { - $idx_tva=${'e_march'.$i.'_tva_id'}; - $oTva=new Acc_Tva($this->db); - $oTva->set_parameter('id',$idx_tva); - $oTva->load(); - $tva_both=$oTva->get_parameter("both_side"); - } - /* -- Create acc_operation -- */ - $acc_operation=new Acc_Operation($this->db); - $acc_operation->date=$e_date; - $acc_operation->grpt=$seq; - $acc_operation->jrn=$p_jrn; - $acc_operation->type='d'; - $acc_operation->periode=$tperiode; - $acc_operation->qcode=""; - - - /* We have to compute all the amount thanks Acc_Compute */ - $amount=round(bcmul(${'e_march'.$i.'_price'},${'e_quant'.$i}),2); - - $acc_amount=new Acc_Compute(); - $acc_amount->check=false; - $acc_amount->set_parameter('amount',$amount); - - // Compute VAT or take the given one - if ( $g_parameter->MY_TVA_USE=='Y') - { - $acc_amount->set_parameter('amount_vat_rate',$oTva->get_parameter('rate')); - if ( strlen(trim(${'e_march'.$i.'_tva_amount'})) ==0 || ${'e_march'.$i.'_tva_amount'} == 0) - { - $acc_amount->compute_vat(); - - } - else - { - $acc_amount->amount_vat= ${'e_march'.$i.'_tva_amount'}; - - } - $tot_tva=bcadd($tot_tva,$acc_amount->amount_vat); - } - - - /* compute ND */ - $save_amount_vat=$acc_amount->amount_vat; - $this->compute_no_deductible($acc_amount, $fiche); - $acc_amount->correct(); - // TVA which avoid - $acc_amount->amount_unpaid=($tva_both == 1 ) ? $save_amount_vat :0 ; - $tot_tva_reversed=bcadd($tot_tva_reversed,$acc_amount->amount_unpaid); - - - - $tot_amount=round(bcadd($tot_amount,$amount),2); - - /* get the account and explode if necessary */ - $sposte=$fiche->strAttribut(ATTR_DEF_ACCOUNT); - // if 2 accounts, take only the debit one for customer - if ( strpos($sposte,',') != 0 ) - { - $array=explode(',',$sposte); - $poste_val=$array[0]; - } - else - { - $poste_val=$sposte; - } - if ( $g_parameter->MY_UPDLAB=='Y') - $acc_operation->desc=strip_tags(${"e_march".$i."_label"}); - else - $acc_operation->desc=null; - $acc_operation->poste=$poste_val; - $acc_operation->amount=$acc_amount->amount; - $acc_operation->qcode=${"e_march".$i}; - if( $acc_amount->amount > 0 ) $tot_debit=bcadd($tot_debit,$acc_amount->amount); - $j_id=$acc_operation->insert_jrnx(); - - /* insert ND */ - $this->insert_no_deductible($acc_amount, $fiche, $tva_both, $tot_debit,$acc_operation,$group,$i); - - - /* Compute sum vat */ - if ( $g_parameter->MY_TVA_USE=='Y') - { - $tva_item=$acc_amount->amount_vat; - - if (isset($tva[$idx_tva] ) ) - $tva[$idx_tva]=bcadd($tva[$idx_tva],$tva_item); - else - $tva[$idx_tva]=$tva_item; - - } - /* Save the stock */ - /* if the quantity is < 0 then the stock increase (return of - * material) - */ - $nNeg=(${"e_quant" . $i}< 0) ? -1 : 1; - - // always save quantity but in withStock we can find - // what card need a stock management - if ( $g_parameter->MY_STOCK='Y'&& isset ($repo)) - { - $dir=(${'e_quant'.$i} < 0 ) ? 'c':'d'; - Stock_Goods::insert_goods($this->db,array('j_id'=>$j_id,'goods'=>${'e_march'.$i},'quant'=>$nNeg*${'e_quant'.$i},'dir'=>$dir,'repo'=>$repo)) ; - } - - if ( $g_parameter->MY_ANALYTIC != "nu" ) - { - // for each item, insert into operation_analytique */ - $op=new Anc_Operation($this->db); - $op->oa_group=$group; - $op->j_id=$j_id; - $op->oa_date=$e_date; - $op->oa_debit='t'; - $op->oa_description=sql_string($e_comm); - $op->save_form_plan($_POST,$i,$j_id); - } - // insert into quant_purchase - //----- - if ( $g_parameter->MY_TVA_USE=='Y') - { - - $r=$this->db->exec_sql("select insert_quant_purchase ". - "(null". - ",".$j_id. /* 2 */ - ",'".${"e_march".$i}."'". /* 3 */ - ",".${"e_quant".$i}.",". /* 4 */ - round($amount,2). /* 5 */ - ",".$acc_amount->amount_vat. /* 6 */ - ",".$oTva->get_parameter('id'). /* 7 */ - ",".$acc_amount->amount_nd. /* 8 */ - ",".$acc_amount->nd_vat. /* 9 */ - ",".$acc_amount->nd_ded_vat. /* 10 */ - ",".$acc_amount->amount_perso. /* 11 */ - ",'".$e_client."',". $acc_amount->amount_unpaid.")"); /* 12 */ - - } - else - { - $r=$this->db->exec_sql("select insert_quant_purchase ". - "(null". - ",".$j_id. - ",'".${"e_march".$i}."'". - ",".${"e_quant".$i}.",". - round($amount,2). - ",0". - ",null". - ",".$acc_amount->amount_nd. - ",0". - ",".$acc_amount->nd_ded_vat. - ",".$acc_amount->amount_perso. - ",'".$e_client."',".$acc_amount->amount_unpaid.")"); - - - } - - } // end loop : save all items - /* save total customer */ - $cust_amount=round(bcadd($tot_amount,$tot_tva),2); - $acc_operation=new Acc_Operation($this->db); - $acc_operation->date=$e_date; - $acc_operation->poste=$poste; - $acc_operation->amount=$cust_amount-$tot_tva_reversed; - $acc_operation->grpt=$seq; - $acc_operation->jrn=$p_jrn; - $acc_operation->type='c'; - $acc_operation->periode=$tperiode; - $acc_operation->qcode=${"e_client"}; - if ( $cust_amount < 0 ) - $tot_debit=bcadd($tot_debit,abs($cust_amount)); - $let_client=$acc_operation->insert_jrnx(); - - - if ( $g_parameter->MY_TVA_USE=='Y') - { - /* save all vat - * $i contains the tva_id and value contains the vat amount - */ - foreach ($tva as $i => $value) - { - $oTva=new Acc_Tva($this->db); - $oTva->set_parameter('id',$i); - $oTva->load(); - - $poste_vat=$oTva->get_side('d'); - - $cust_amount=bcadd($tot_amount,$tot_tva); - $acc_operation=new Acc_Operation($this->db); - $acc_operation->date=$e_date; - $acc_operation->poste=$poste_vat; - $acc_operation->amount=$value; - $acc_operation->grpt=$seq; - $acc_operation->jrn=$p_jrn; - $acc_operation->type='d'; - $acc_operation->periode=$tperiode; - if ( $value > 0 ) $tot_debit=bcadd($tot_debit,abs($value)); - $acc_operation->insert_jrnx(); - // if TVA is on both side, we deduce it immediately - if ( $oTva->get_parameter("both_side")==1) - { - $poste_vat=$oTva->get_side('c'); - $cust_amount=bcadd($tot_amount,$tot_tva); - $cust_amount=bcsub($tot_amount,$tot_tva_reversed); - $acc_operation=new Acc_Operation($this->db); - $acc_operation->date=$e_date; - $acc_operation->poste=$poste_vat; - $acc_operation->amount=$tot_tva_reversed; - $acc_operation->grpt=$seq; - $acc_operation->jrn=$p_jrn; - $acc_operation->type='c'; - $acc_operation->periode=$tperiode; - $acc_operation->insert_jrnx(); - if ( $value < 0 ) $tot_debit=bcadd($tot_debit,abs($value)); - } - - } - } - /* insert into jrn */ - $acc_operation=new Acc_Operation($this->db); - $acc_operation->date=$e_date; - $acc_operation->echeance=$e_ech; - $acc_operation->amount=abs(round($tot_debit,2)); - $acc_operation->desc=$e_comm; - $acc_operation->grpt=$seq; - $acc_operation->jrn=$p_jrn; - $acc_operation->periode=$tperiode; - $acc_operation->pj=$e_pj; - $acc_operation->mt=$mt; - $this->jr_id=$acc_operation->insert_jrn(); - $this->pj=$acc_operation->set_pj(); - - // Set Internal code - $this->grpt_id=$seq; - $this->update_internal_code($internal); - /* update quant_purchase */ - $this->db->exec_sql('update quant_purchase set qp_internal = $1 where j_id in (select j_id from jrnx where j_grpt=$2)', - array($internal,$seq)); - - /**= e_pj then do not increment sequence */ - if ( strcmp($e_pj,$e_pj_suggest) == 0 && strlen(trim($e_pj)) != 0 ) - { - $this->inc_seq_pj(); - } - - /* Save the attachment */ - if ( isset ($_FILES)) - { - if ( sizeof($_FILES) != 0 ) - $this->db->save_upload_document($seq); - } - $str_file=""; - /* Generate an document and save it into the database (Note de frais only) - */ - if ( isset($_POST['gen_invoice']) ) - { - $ref_doc= $this->create_document($internal,$p_array); - $this->doc=''.$ref_doc.''; - } - - //---------------------------------------- - // Save the payer - //---------------------------------------- - if ( $e_mp != 0 ) - { - /* mp */ - $mp=new Acc_Payment($this->db,$e_mp); - $mp->load(); - - /* fiche */ - if ($mp->get_parameter('qcode') == '') - $fqcode=${'e_mp_qcode_'.$e_mp}; - else - $fqcode=$mp->get_parameter('qcode'); - - $acfiche = new Fiche($this->db); - $acfiche->get_by_qcode($fqcode); - - /* jrnx */ - $acseq=$this->db->get_next_seq('s_grpt'); - $acjrn=new Acc_Ledger($this->db,$mp->get_parameter('ledger_target')); - $acinternal=$acjrn->compute_internal_code($acseq); - - /* Insert paid by */ - $acc_pay=new Acc_Operation($this->db); - $acc_pay->date=$e_date; - - /* get the account and explode if necessary */ - $sposte=$acfiche->strAttribut(ATTR_DEF_ACCOUNT); - // if 2 accounts, take only the debit one for customer - if ( strpos($sposte,',') != 0 ) - { - $array=explode(',',$sposte); - $poste_val=$array[1]; - } - else - { - $poste_val=$sposte; - } - - $famount=bcsub($cust_amount,$acompte); - $acc_pay->poste=$poste_val; - $acc_pay->qcode=$fqcode; - $acc_pay->amount=abs(round($famount,2)); - $acc_pay->desc=''; - $acc_pay->grpt=$acseq; - $acc_pay->jrn=$mp->get_parameter('ledger_target'); - $acc_pay->periode=$tperiode; - $acc_pay->type=($famount>=0)?'c':'d'; - $acc_pay->insert_jrnx(); - - /* Insert supplier */ - $acc_pay=new Acc_Operation($this->db); - $acc_pay->date=$e_date; - $acc_pay->poste=$poste; - $acc_pay->qcode=$e_client; - $acc_pay->amount=abs(round($famount,2)); - $acc_pay->desc=''; - $acc_pay->grpt=$acseq; - $acc_pay->jrn=$mp->get_parameter('ledger_target'); - $acc_pay->periode=$tperiode; - $acc_pay->type=($famount>=0)?'d':'c'; - $let_other=$acc_pay->insert_jrnx(); - - /* insert into jrn */ - $acc_pay->mt=$mt; - $acc_pay->desc=(!isset($e_comm_paiement) || strlen(trim($e_comm_paiement)) == 0) ?$e_comm:$e_comm_paiement; - $mp_jr_id=$acc_pay->insert_jrn(); - $acjrn->grpt_id=$acseq; - $acjrn->update_internal_code($acinternal); - - $r1=$this->get_id($internal); - $r2=$this->get_id($acinternal); - - /* - * add lettering - */ - $oletter=new Lettering($this->db); - $oletter->insert_couple($let_client,$let_other); - - /* set the flag paid */ - $Res=$this->db->exec_sql("update jrn set jr_rapt='paid' where jr_id=$1",array($r1)); - - /* Reconcialiation */ - $rec=new Acc_Reconciliation($this->db); - $rec->set_jr_id($r1); - $rec->insert($r2); - /* - * save also into quant_fin - */ - - /* get ledger property */ - $ledger=new Acc_Ledger_Fin($this->db,$acc_pay->jrn); - $prop=$ledger->get_propertie(); - - /* if ledger is FIN then insert into quant_fin */ - if ( $prop['jrn_def_type'] == 'FIN' ) - { - $ledger->insert_quant_fin($acfiche->id,$mp_jr_id,$cust->id,bcmul($famount,-1)); - } - - - } - }//end try - catch (Exception $e) - { - echo ''. - 'Erreur dans l\'enregistrement '. - __FILE__.':'.__LINE__.' '. - $e->getMessage().$e->getTraceAsString(); - - $this->db->rollback(); - throw new Exception($e); - } - $this->db->commit(); - return $internal; - } - - /*!\brief display the form for entering data for invoice - *\param $p_array is null or you can put the predef operation or the $_POST - \code - array - 'sa' => string 'n' (length=1) - 'p_action' => string 'ach' (length=3) - 'gDossier' => string '28' (length=2) - 'e_client' => string 'ASEKURA' (length=7) - 'nb_item' => string '9' (length=1) - 'p_jrn' => string '3' (length=1) - 'period' => string '126' (length=3) - 'e_comm' => string 'descriptio' (length=10) - 'e_date' => string '01.05.2010' (length=10) - 'e_ech' => string '' (length=0) - 'jrn_type' => string 'ACH' (length=3) - 'e_pj' => string 'ACH37' (length=5) - 'e_pj_suggest' => string 'ACH37' (length=5) - 'mt' => string '1273759434.5701' (length=15) - 'e_mp' => string '0' (length=1) - 'e_march0' => string 'DOC' (length=3) - 'e_march0_price' => string '2000' (length=4) - 'e_march0_tva_id' => string '3' (length=1) - 'e_march0_tva_amount' => string '120' (length=3) - 'e_quant0' => string '1' (length=1) - 'gen_invoice' => string 'on' (length=2) - 'gen_doc' => string '7' (length=1) - 'bon_comm' => string '' (length=0) - 'other_info' => string '' (length=0) - 'correct' => string 'Corriger' (length=8) - \endcode - *\return HTML string - */ - public function input($p_array=null,$p_readonly=0) - { - global $g_parameter,$g_user; - if ( $p_array != null ) extract($p_array); - - $flag_tva=$g_parameter->MY_TVA_USE; - /* Add button */ - $f_add_button=new IButton('add_card'); - $f_add_button->label=_('Créer une nouvelle fiche'); - $f_add_button->tabindex=-1; - $f_add_button->set_attribute('jrn',$this->id); - $f_add_button->javascript=" this.jrn=\$('p_jrn').value;select_card_type(this);"; - - $str_add_button=""; - if ($g_user->check_action(FICADD)==1) - { - $str_add_button=$f_add_button->input(); - } - // The first day of the periode - $oPeriode=new Periode($this->db); - list ($l_date_start,$l_date_end)=$oPeriode->get_date_limit($g_user->get_periode()); - if ( $g_parameter->MY_DATE_SUGGEST=='Y' ) - $op_date=( ! isset($e_date) ) ?$l_date_start:$e_date; - else - $op_date=( ! isset($e_date) ) ?'':$e_date; - - $e_ech=(isset($e_ech))?$e_ech:""; - $e_comm=(isset($e_comm))?$e_comm:""; - - $r=""; - $r.=dossier::hidden(); - $f_legend_detail=_("Détail articles achetés"); - - // Date - //-- - $Date=new IDate(); - $Date->setReadOnly(false); - $Date->table=1; - $Date->tabindex=1; - $f_date=$Date->input("e_date",$op_date); - // Payment limit - //-- - $Echeance=new IDate(); - $Echeance->setReadOnly(false); - $Echeance->tabindex=2; - $label=HtmlInput::infobulle(4); - $f_echeance=$Echeance->input('e_ech',$e_ech,'Echéance'.$label); - $f_periode=""; - if ($this->check_periode() == true) - { - // Periode - //-- - $l_user_per=$g_user->get_periode(); - $def=(isset($periode))?$periode:$l_user_per; - - $period=new IPeriod("period"); - $period->user=$g_user; - $period->cn=$this->db; - $period->value=$def; - $period->type=OPEN; - try - { - $l_form_per=$period->input(); - } - catch (Exception $e) - { - if ($e->getCode() == 1 ) - { - throw new Exception( _("Aucune période ouverte")); - } - } - - $r.=""; - $label=HtmlInput::infobulle(3); - $f_periode=_("Période comptable")." $label ".$l_form_per; - } - // Ledger (p_jrn) - //-- - /* if we suggest the next pj, then we need a javascript */ - $add_js=""; - if ( $g_parameter->MY_PJ_SUGGEST=='Y') - { - $add_js="update_pj();"; - } - if ($g_parameter->MY_DATE_SUGGEST == 'Y') - { - $add_js.='get_last_date();'; - } - $add_js.='update_name();'; - $add_js.='update_pay_method();'; - $add_js.='update_row("sold_item");'; - - $wLedger=$this->select_ledger('ACH',2); - if ($wLedger == null) throw new Exception(_('Pas de journal disponible')); - $wLedger->javascript="onChange='update_predef(\"ach\",\"f\",\"".$_REQUEST['ac']."\");$add_js'"; - $wLedger->table=1; - $f_jrn=$wLedger->input(); - - // Comment - //-- - $Commentaire=new IText(); - $Commentaire->table=0; - $Commentaire->setReadOnly(false); - $Commentaire->size=60; - $Commentaire->tabindex=3; - $label=HtmlInput::infobulle(1) ; - $f_desc=$Commentaire->input("e_comm",h($e_comm)); - - // PJ - //-- - /* suggest PJ ? */ - $default_pj=''; - if ( $g_parameter->MY_PJ_SUGGEST=='Y') - { - $default_pj=$this->guess_pj(); - } - - $pj=new IText(); - $pj->value=(isset($e_pj))?$e_pj:$default_pj; - - - $pj->table=0; - $pj->name="e_pj"; - $pj->size=10; - $pj->readonly=false; - - $f_pj=$pj->input().HtmlInput::hidden('e_pj_suggest',$default_pj); - - // Display the customer - //-- - $fiche='cred'; - - // Save old value and set a new one - //-- - $e_client=( isset ($e_client) )?$e_client:""; - $e_client_label=" ";//str_pad("",100,"."); - - - // retrieve e_client_label - //-- - - if ( strlen(trim($e_client)) != 0) - { - $fClient=new Fiche($this->db); - $fClient->get_by_qcode($e_client); - $e_client_label=$fClient->strAttribut(ATTR_DEF_NAME).' '. - ' Adresse : '.$fClient->strAttribut(ATTR_DEF_ADRESS).' '. - $fClient->strAttribut(ATTR_DEF_CP).' '. - $fClient->strAttribut(ATTR_DEF_CITY).' '; - - - } - - $W1=new ICard(); - $W1->label=_("Fournisseur ").HtmlInput::infobulle(0) ; - $W1->name="e_client"; - $W1->tabindex=3; - $W1->value=$e_client; - $W1->table=0; - $W1->set_dblclick("fill_ipopcard(this);"); - $W1->set_attribute('ipopup','ipopcard'); - - // name of the field to update with the name of the card - $W1->set_attribute('label','e_client_label'); - // name of the field to update with the name of the card - $W1->set_attribute('typecard','cred'); - - // Add the callback function to filter the card on the jrn - $W1->set_callback('filter_card'); - $W1->set_function('fill_data'); - $W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', - $W1->name); - $f_client_qcode=$W1->input(); - $client_label=new ISpan(); - $client_label->table=0; - $f_client=$client_label->input("e_client_label",$e_client_label); - $f_client_bt=$W1->search(); - - - // Record the current number of article - - $e_comment=(isset($e_comment))?$e_comment:""; - $p_article= ( isset ($nb_item))?$nb_item:$this->get_min_row(); - $max=($p_article < $this->get_min_row())?$this->get_min_row():$p_article; - - $Hid=new IHidden(); - $r.=$Hid->input("nb_item",$p_article); - - // For each article - //-- - for ($i=0;$i< $max ;$i++) - { - // Code id, price & vat code - //-- - $march=(isset(${"e_march$i"}))?${"e_march$i"}:"" ; - $march_price=(isset(${"e_march".$i."_price"}))?${"e_march".$i."_price"}:"" - ; - /* use vat */ - if ( $g_parameter->MY_TVA_USE=='Y') - { - $march_tva_id=(isset(${"e_march$i"."_tva_id"}))?${"e_march$i"."_tva_id"}:""; - $march_tva_amount=(isset(${"e_march$i"."_tva_amount"}))?${"e_march$i"."_tva_amount"}:""; - } - - - - $march_label=(isset(${"e_march".$i."_label"}))?${"e_march".$i."_label"}:""; - // retrieve the tva label and name - //-- - if ( strlen(trim($march))!=0 && strlen(trim($march_label))==0 ) - { - $fMarch=new Fiche($this->db); - $fMarch->get_by_qcode($march); - $march_label=$fMarch->strAttribut(ATTR_DEF_NAME); - /* vat use */ - if ( ! isset($march_tva_id) && $g_parameter->MY_TVA_USE=='Y' ) - $march_tva_id=$fMarch->strAttribut(ATTR_DEF_TVA); - } - // Show input - //-- - $W1=new ICard(); - $W1->label=""; - $W1->name="e_march".$i; - $W1->value=$march; - $W1->table=1; - $W1->set_dblclick("fill_ipopcard(this);"); - $W1->set_attribute('ipopup','ipopcard'); - - $W1->set_attribute('typecard','deb'); - - // name of the field to update with the name of the card - $W1->set_attribute('label','e_march'.$i.'_label'); - // name of the field with the price - $W1->set_attribute('purchase','e_march'.$i.'_price'); /* autocomplete */ - $W1->set_attribute('price','e_march'.$i.'_price'); /* via search */ - - // name of the field with the TVA_ID - $W1->set_attribute('tvaid','e_march'.$i.'_tva_id'); - // Add the callback function to filter the card on the jrn - $W1->set_callback('filter_card'); - $W1->set_function('fill_data'); - $W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', - $W1->name); - $W1->readonly=false; - $array[$i]['quick_code']=$W1->input(); - $array[$i]['bt']=$W1->search(); - - $array[$i]['hidden']=''; - // For computing we need some hidden field for holding the value - if ( $g_parameter->MY_TVA_USE=='Y') - { - $array[$i]['hidden'].=HtmlInput::hidden('tva_march'.$i,0); - } - - if ( $g_parameter->MY_TVA_USE=='Y') - $tvac=new INum('tvac_march'.$i); - else - $tvac=new IHidden('tvac_march'.$i); - - $tvac->readOnly=1; - $tvac->value=0; - $array[$i]['tvac']=$tvac->input(); - - $htva=new INum('htva_march'.$i); - $htva->readOnly=1; - - $htva->value=0; - $array[$i]['htva']=$htva->input(); - - if ( $g_parameter->MY_UPDLAB == 'Y') - { - $Span=new IText("e_march".$i."_label"); - $Span->css_size="100%"; - } else - { - $Span=new ISpan("e_march".$i."_label"); - } - $Span->value=$march_label; - $Span->setReadOnly(false); - // card's name, price - //-- - $array[$i]['denom']=$Span->input("e_march".$i."_label",$march_label); - // price - $Price=new INum(); - $Price->setReadOnly(false); - $Price->size=9; - $Price->javascript="onBlur='format_number(this);clean_tva($i);compute_ledger($i)'"; - $array[$i]['pu']=$Price->input("e_march".$i."_price",$march_price); - if ( $g_parameter->MY_TVA_USE=='Y') - { - - // vat label - //-- - $Tva=new ITva_Popup($this->db); - $Tva->js="onblur=\"format_number(this);onChange=clean_tva($i);compute_ledger($i)\""; - $Tva->in_table=true; - $Tva->set_attribute('compute',$i); - $Tva->value=$march_tva_id; - $array[$i]['tva']=$Tva->input("e_march$i"."_tva_id"); - - // Tva_amount - - // price - $Tva_amount=new INum(); - $Tva_amount->setReadOnly(false); - $Tva_amount->size=9; - $Tva_amount->javascript="onBlur='format_number(this);compute_ledger($i)'"; - $array[$i]['amount_tva']=$Tva_amount->input("e_march".$i."_tva_amount",$march_tva_amount); - } - // quantity - //-- - $quant=(isset(${"e_quant$i"}))?${"e_quant$i"}:"1" - ; - $Quantity=new INum(); - $Quantity->setReadOnly(false); - $Quantity->size=9; - $Quantity->javascript="onChange=format_number(this);clean_tva($i);compute_ledger($i)"; - $array[$i]['quantity']=$Quantity->input("e_quant".$i,$quant); - - } - $f_type=_('Fournisseur'); - - ob_start(); - require_once NOALYSS_INCLUDE.'/template/form_ledger_detail.php'; - $r.=ob_get_contents(); - ob_end_clean(); - - // Set correctly the REQUEST param for jrn_type - $r.= HtmlInput::hidden('jrn_type','ACH'); - $r.= HtmlInput::button('add_item',_('Ajout article'), ' onClick="ledger_add_row()"'); - - - - /* if we suggest the pj n# the run the script */ - if ( $g_parameter->MY_PJ_SUGGEST=='Y') - { - $r.=''; - } - // set focus on date - $r.= create_script("$('".$Date->id."').focus()"); - return $r; - } - - /*!@brief show the summary of the operation and propose to save it - *@param array contains normally $_POST. It proposes also to save - * the Analytic accountancy - * @param $p_summary true to confirm false, show only the result in RO - *@return string - */ - function confirm($p_array,$p_summary=false) - { - global $g_parameter; - extract ($p_array); - - // we don't need to verify if we need only a feedback - if ( ! $p_summary ) - $this->verify($p_array) ; - - $anc=null; - // to show a select list for the analytic - // if analytic is op (optionnel) there is a blank line - - bcscale(4); - $client=new Fiche($this->db); - $client->get_by_qcode($e_client,true); - - $client_name=h($client->getName(). - ' '.$client->strAttribut(ATTR_DEF_ADRESS).' '. - $client->strAttribut(ATTR_DEF_CP).' '. - $client->strAttribut(ATTR_DEF_CITY)); - $lPeriode=new Periode($this->db); - if ($this->check_periode() == true) - { - $lPeriode->p_id=$period; - } - else - { - $lPeriode->find_periode($e_date); - } - $date_limit=$lPeriode->get_date_limit(); - $r=""; - $r.=''; - if ( $p_summary ) { - $jr_id=$this->db->get_value('select jr_id from jrn where jr_internal=$1',array($this->internal)); - $r.=""; - $r.=''; - $r.=''; - $r.=""; - } - $r.=''; - if ( ! $p_summary) { - $r.=''; - } else { - - if ( strcmp($this->pj,$e_pj) != 0 ) - { - $r.=''; - } else { - $r.=''; - } - } - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - - - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - - $r.=''; - $r.=''; - $r.=''; - $r.='
    '; - $r.=_('Détail opération '); - $r.=''; - $r.=sprintf ('%s', - $jr_id,dossier::id(),$this->internal); - $r.='
    ' . _('Numéro Pièce') .''. hb($e_pj) . '' . _('Numéro Pièce') .''. hb($this->pj) . - ' '._('Attention numéro pièce existante, elle a du être adaptée').'' . _('Numéro Pièce') .''. hb($this->pj) . '
    ' . _('Date') . ' ' . hb($e_date) . '
    ' . _('Echeance') . ' ' . hb($e_ech) . '
    ' . _('Période Comptable') . ' ' .hb( $date_limit['p_start'] . '-' . $date_limit['p_end']) . '
    ' . _('Journal') . ' ' . hb($this->get_name()) . '
    ' . _('Libellé') . ' ' . hb($e_comm) . '
    ' . _('Fournisseur') . ' ' . hb($e_client . ':' . $client_name) . '
    '; - $r.='

    ' . _('Détail articles achetés') . '

    '; - $r.='

    '; - $r.=''; - $r.=''; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - - - if ($g_parameter->MY_TVA_USE == 'Y') { - $r.=""; - $r.=''; - $r.=''; - $r.=''; - } else { - $r.=''; - } - - /* if we use the AC */ - if ($g_parameter->MY_ANALYTIC!='nu') - { - $anc=new Anc_Plan($this->db); - $a_anc=$anc->get_list(); - $x=count($a_anc); - /* set the width of the col */ - $r.=''; - - /* add hidden variables pa[] to hold the value of pa_id */ - $r.=Anc_Plan::hidden($a_anc); - } - - $r.=''; - $tot_amount=0.0; - $tot_tva=0.0; - //-- - // For each item - //-- - for ($i = 0; $i < $nb_item;$i++) - { - $tot_row=0; - if ( strlen(trim(${"e_march".$i})) == 0 ) continue; - - /* retrieve information for card */ - $fiche=new Fiche($this->db); - $fiche->get_by_qcode(${"e_march".$i}); - if ( $g_parameter->MY_UPDLAB=='Y') - $fiche_name=h(${"e_march".$i."_label"}); - else - $fiche_name=$fiche->strAttribut (ATTR_DEF_NAME); - $amount=bcmul(${"e_march".$i."_price"},${'e_quant'.$i}); - if ( $g_parameter->MY_TVA_USE=='Y') - { - $idx_tva=${"e_march".$i."_tva_id"}; - $oTva=new Acc_Tva($this->db); - $oTva->set_parameter('id',$idx_tva); - $oTva->load(); - $op=new Acc_Compute(); - - $op->set_parameter("amount",$amount); - $op->set_parameter('amount_vat_rate',$oTva->get_parameter('rate')); - $op->compute_vat(); - $tva_computed=$op->get_parameter('amount_vat'); - //----- if tva_amount is not given we compute the vat ---- - if ( strlen (trim (${'e_march'.$i.'_tva_amount'})) == 0) - { - $tva_item=$op->get_parameter('amount_vat'); - } - else - $tva_item=round(${'e_march'.$i.'_tva_amount'},2); - - if (isset($tva[$idx_tva] ) ) - $tva[$idx_tva]=bcadd($tva_item,$tva[$idx_tva]); - else - $tva[$idx_tva]=$tva_item; - - - - } - $tot_amount=round(bcadd($tot_amount,$amount),2); - $tot_row=round(bcadd($tot_row,$amount),2); - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $both_side=0; - if ($g_parameter->MY_TVA_USE == 'Y') - { - $r.=''; - /* warning if tva_computed and given are not the - same */ - $css_void_tva=($both_side == 1)?'style="text-decoration:line-through"':''; - if ( bcsub($tva_item,$tva_computed) != 0 && ! ($tva_item == 0 && $both_side == 1)) - { - - $r.=''; - $r.=''; - } - $r.=''; - // encode the pa - if ( $g_parameter->MY_ANALYTIC!='nu') // use of AA - { - // show form - $anc_op=new Anc_Operation($this->db); - $null=($g_parameter->MY_ANALYTIC=='op')?1:0; - $r.=''; - } - - - $r.=''; - - } - // Add the sum - $decalage=($g_parameter->MY_TVA_USE == 'Y')?'':''; - $tot = round(bcadd($tot_amount, $tot_tva), 2); - $tot_tva=nbm($tot_tva); - $tot=nbm($tot); - $str_tot=_('Totaux'); - $tot_amount=nbm($tot_amount); - $r.=<< - {$decalage} - - - - -EOF; - - $r.='
    " . _('Code') . "" . _('Dénomination') . "" . _('prix') . "" . _('quantité') . "" . _('tva') . " ' . _('Montant TVA') . '' . _('Montant HTVA') . '' . _('Montant TVAC') . '' . _('Montant') . ''._('Compt. Analytique').'
    '; - $r.=${"e_march".$i}; - $r.=''; - $r.=$fiche_name; - $r.=''; - $r.=nbm(${"e_march".$i."_price"}); - $r.=''; - $r.=nbm(${"e_quant".$i}); - $r.=''; - $r.=$oTva->get_parameter('label'); - $both_side=$oTva->get_parameter("both_side"); - if ( $both_side == 0) { - $tot_row=bcadd($tot_row,$tva_item); - $tot_tva=round(bcadd($tva_item,$tot_tva),2); - } - $r.=''; - $r.=HtmlInput::infobulle(28); - $r.='' - .nbm($tva_item).''; - } - else{ - $r.=''; - $r.=nbm($tva_item); - } - $r.=' '; - $r.=nbm(round($amount,2)); - $r.=''; - $r.=nbm(round($tot_row,2)); - $r.=''; - $p_mode=($p_summary==false)?1:0; - $p_array['pa_id']=$a_anc; - /* op is the operation it contains either a sequence or a jrnx.j_id */ - $r.=HtmlInput::hidden('op[]=',$i); - $r.=$anc_op->display_form_plan($p_array,$null,$p_mode,$i,$amount); - $r.='
    - {$str_tot} - - {$tot_tva} - - {$tot_amount} - - {$tot} -
    '; - $r.='

    '; - if ( $g_parameter->MY_ANALYTIC!='nu' && !$p_summary) // use of AA - $r.=''; - - $r.=(! $p_summary )?'
    ':'
    '; - $r.='

    Totaux

    '; - /* use VAT */ - if ($g_parameter->MY_TVA_USE == 'Y') { - $r.=''; - $r.=''; - $r.=td(hb($tot_amount ),'class="num"'); - foreach ($tva as $i => $value) { - $oTva->set_parameter('id', $i); - $oTva->load(); - - $r.=''; - $r.=td(hb(nbm($tva[$i])),'class="num"'); - } - $r.=''.td(_('Total TVA')).td(hb($tot_tva),'class="num"'); - $r.=''.td(_('Total TVAC')).td(hb($tot),'class="num"'); - $r.='
    Total HTVA
    TVA ' . $oTva->get_parameter('label').'
    '; - } else { - $r.='
    Total '.hb($tot); - } - $r.='
    '; - /* Add hidden */ - $r.=HtmlInput::hidden('e_client',$e_client); - $r.=HtmlInput::hidden('nb_item',$nb_item); - $r.=HtmlInput::hidden('p_jrn',$p_jrn); - if ( isset($period)) - $r.=HtmlInput::hidden('period',$period); - $r.=HtmlInput::hidden('e_comm',$e_comm); - $r.=HtmlInput::hidden('e_date',$e_date); - $r.=HtmlInput::hidden('e_ech',$e_ech); - $r.=HtmlInput::hidden('jrn_type',$jrn_type); - $r.=HtmlInput::hidden('e_pj',$e_pj); - $r.=HtmlInput::hidden('e_pj_suggest',$e_pj_suggest); - $mt=microtime(true); - $r.=HtmlInput::hidden('mt',$mt); - - $e_mp=(isset($e_mp))?$e_mp:0; - $r.=HtmlInput::hidden('e_mp',$e_mp); - /* Paid by */ - /* if the paymethod is not 0 and if a quick code is given */ - - - for ($i=0;$i < $nb_item;$i++) - { - $r.=HtmlInput::hidden("e_march".$i,${"e_march".$i}); - if (isset (${"e_march".$i."_label"})) $r.=HtmlInput::hidden("e_march".$i."_label",${"e_march".$i."_label"}); - $r.=HtmlInput::hidden("e_march".$i."_price",${"e_march".$i."_price"}); - if ( $g_parameter->MY_TVA_USE=='Y' ) - { - $r.=HtmlInput::hidden("e_march".$i."_tva_id",${"e_march".$i."_tva_id"}); - $r.=HtmlInput::hidden('e_march'.$i.'_tva_amount', ${'e_march'.$i.'_tva_amount'}); - } - $r.=HtmlInput::hidden("e_quant".$i,${"e_quant".$i}); - - } - - /** - * - */ - if ( $e_mp!=0 && strlen (trim (${'e_mp_qcode_'.$e_mp})) != 0 ) - { - $r.=HtmlInput::hidden('e_mp_qcode_'.$e_mp,${'e_mp_qcode_'.$e_mp}); - $r.=HtmlInput::hidden('acompte',$acompte); - $r.=HtmlInput::hidden('e_comm_paiement',$e_comm_paiement); - /* needed for generating a invoice */ - $r.=HtmlInput::hidden('qcode_benef', ${'e_mp_qcode_' . $e_mp}); - $fname = new Fiche($this->db); - $fname->get_by_qcode(${'e_mp_qcode_' . $e_mp}); - $r.='

    ' . _("Payé par")." " . ${'e_mp_qcode_' . $e_mp} . - " " . $fname->getName() . '

    ' . '

    ' . _('Déduction acompte ') . h($acompte) . '

    ' . - _('Libellé :') . h($e_comm_paiement) ; - $r.='
    '; - $r.='
    '; - } - // check for upload piece - - return $r; - } - - /*!\brief the function extra info allows to - * - add a attachment - * - generate an invoice - * - insert extra info - *\return html string - */ - public function extra_info() - { - $r=""; - $r = '
    '; - $r.='

    '; - // check for upload piece - $file=new IFile(); - $file->table=0; - $r.=_("Ajoutez une pièce justificative "); - $r.=$file->input("pj",""); - - if ( $this->db->count_sql("select md_id,md_name from document_modele where md_affect='ACH'") > 0 ) - { - - $r.=_('ou générer un document').' '; - // We propose to generate the fee note - $doc_gen=new ISelect(); - $doc_gen->name="gen_doc"; - $doc_gen->value=$this->db->make_array( - "select md_id,md_name ". - " from document_modele where md_affect='ACH'"); - $r.=$doc_gen->input().'
    '; - } - $r.='
    '; - $obj=new IText(); - $r.=_('Numero de bon de commande : ').$obj->input('bon_comm').'
    '; - $r.=_('Autre information : ').$obj->input('other_info').'
    '; - $r.='

    '; - $r.='
    '; - return $r; - } - - - /** - * @brief update the payment - * @todo to remove, obsolete - * @deprecated - */ - function show_unpaid_deprecated() - { - // Show list of unpaid sell - // Date - date of payment - Customer - amount - // Nav. bar - $step=$_SESSION['g_pagesize']; - $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; - - - $sql=SQL_LIST_UNPAID_INVOICE_DATE_LIMIT." and jr_def_id=".$this->id ; - list($max_line,$list)=$this->list_operation($sql,null,$offset,1); - $sql=SQL_LIST_UNPAID_INVOICE." and jr_def_id=".$this->id ; - list($max_line2,$list2)=$this->list_operation($sql,null,$offset,1); - - // Get the max line - $m=($max_line2>$max_line)?$max_line2:$max_line; - $bar2=navigation_bar($offset,$m,$step,$page); - - echo $bar2; - echo '

    '._('Echeance dépassée').'

    '; - echo $list; - echo '

    '._('Non Payée').'

    '; - echo $list2; - echo $bar2; - // Add hidden parameter - $hid=new IHidden(); - - echo '
    '; - - if ( $m != 0 ) - echo HtmlInput::submit('paid',_('Mise à jour paiement')); - - - } - /** - * Retrieve data from the view v_detail_purchase - * @global $g_user connected user - * @param $p_from jrn.jr_tech_per from - * @param type $p_end jrn.jr_tech_per to - * @return type - */ - function get_detail_purchase($p_from,$p_end) - { - global $g_user; - // Journal valide - if ( $this->id == 0 ) die (__FILE__.":".__LINE__." Journal invalide"); - - // Securite - if ( $g_user->get_ledger_access($this->id) == 'X' ) return null; - - // get the data from the view - $sql = "select * - from v_detail_purchase - where - jr_def_id = $1 - and jr_date >= (select p_start from parm_periode where p_id = $2) - and jr_date <= (select p_end from parm_periode where p_id = $3) " - .' order by jr_date,substring(jr_pj_number,\'[0-9]+$\')::numeric asc '; - $ret = $this->db->exec_sql($sql, array($this->id,$p_from, $p_end)); - return $ret; - } - /** - * @brief compute an array with the heading cells for the - * details, used for the export in CSV - * @return array - */ - static function heading_detail_purchase() - { - $array['jr_id'] = _('Numéro opération'); - $array['jr_date'] = _('Date'); - $array['jr_date_paid'] = _('Date paiement'); - $array['jr_ech'] = _('Date échéance'); - $array['jr_tech_per'] = _('Période'); - $array['jr_comment'] = _('Libellé'); - $array['jr_pj_number'] = _('Pièce'); - $array['jr_internal'] = _('Interne'); - $array['jr_def_id'] = _('Code journal'); - $array['j_poste'] = _('Poste'); - $array['j_text'] = _('Commentaire'); - $array['j_qcode'] = _('Code Item'); - $array['item_card'] = _('N° fiche'); - $array['item_name'] = _('Nom fiche'); - $array['qp_supplier'] = _('N° fiche fournisseur'); - $array['tiers_name'] = _('Nom fournisseur'); - $array['quick_code'] = _('Code fournisseur'); - $array['tva_label'] = _('Nom TVA'); - $array['tva_comment'] = _('Commentaire TVA'); - $array['tva_both_side'] = _('TVA annulée'); - $array['vat_sided'] = _('TVA Non Payé'); - $array['vat_code'] = _('Code TVA'); - $array['vat'] = _('Montant TVA'); - $array['price'] = _('Total HTVA'); - $array['quantity'] = _('quantité'); - $array['price_per_unit'] = _('PU'); - $array['non_ded_amount'] = _('Montant ND'); - $array['non_ded_tva'] = _('Montant TVA ND'); - $array['non_ded_tva_recup'] = _('TVA récup.'); - $array['htva'] = _('HTVA Opération'); - $array['tot_vat'] = _('TVA Opération'); - $array['tot_tva_np'] = _('TVA NP opération'); - return $array; - } - -} - - - - - diff --git a/sources/include/class_acc_ledger_sold.php b/sources/include/class_acc_ledger_sold.php deleted file mode 100644 index 0e8d45e..0000000 --- a/sources/include/class_acc_ledger_sold.php +++ /dev/null @@ -1,1374 +0,0 @@ -type = 'VEN'; - } - - /* !\brief verify that the data are correct before inserting or confirming - * \param an array (usually $_POST) - * \return String - * \throw Exception if an error occurs - */ - - public function verify($p_array) { - global $g_parameter, $g_user; - - if (is_array($p_array ) == false || empty($p_array)) - throw new Exception ("Array empty"); - - extract($p_array); - - /* - * Check needed value - */ - check_parameter($p_array,'p_jrn,e_date,e_client'); - - /* check for a double reload */ - if (isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1', array($mt)) != 0) - throw new Exception(_('Double Encodage'), 5); - - /* check if we can write into this ledger */ - if ($g_user->check_jrn($p_jrn) != 'W') - throw new Exception(_('Accès interdit'), 20); - - /* check if there is a customer */ - if (strlen(trim($e_client)) == 0) - throw new Exception(_('Vous n\'avez pas donné de client'), 11); - - /* check if the date is valid */ - if (isDate($e_date) == null) { - throw new Exception(_('Date invalide'), 2); - } - - $oPeriode = new Periode($this->db); - if ($this->check_periode() == true) { - $tperiode = $period; - /* check that the datum is in the choosen periode */ - $oPeriode->p_id = $period; - list ($min, $max) = $oPeriode->get_date_limit(); - - if (cmpDate($e_date, $min) < 0 || - cmpDate($e_date, $max) > 0) - throw new Exception(_('Date et periode ne correspondent pas'), 6); - } - else { - $per = new Periode($this->db); - $tperiode = $per->find_periode($e_date); - } - - /* check if the periode is closed */ - if ($this->is_closed($tperiode) == 1) { - throw new Exception(_('Periode fermee'), 6); - } - /* check if we are using the strict mode */ - if ($this->check_strict() == true) { - /* if we use the strict mode, we get the date of the last - operation */ - $last_date = $this->get_last_date(); - if ($last_date != null && cmpDate($e_date, $last_date) < 0) - throw new Exception(_('Vous utilisez le mode strict la dernière operation est date du ') - . $last_date . _(' vous ne pouvez pas encoder à une date antérieure'), 13); - } - - - $fiche = new Fiche($this->db); - $fiche->get_by_qcode($e_client); - if ($fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) - throw new Exception(_('La fiche ') . $e_client . _('n\'a pas de poste comptable'), 8); - - /* get the account and explode if necessary */ - $sposte = $fiche->strAttribut(ATTR_DEF_ACCOUNT); - // if 2 accounts, take only the debit one for customer - if (strpos($sposte, ',') != 0) { - $array = explode(',', $sposte); - $poste_val = $array[0]; - } else { - $poste_val = $sposte; - } - /* The account exists */ - - $poste = new Acc_Account_Ledger($this->db, $poste_val); - - if ($poste->load() == false) { - throw new Exception(_('Pour la fiche ') . $e_client . _(' le poste comptable [') . $poste->id . _('] n\'existe pas'), 9); - } - - /* Check if the card belong to the ledger */ - $fiche = new Fiche($this->db); - $fiche->get_by_qcode($e_client, 'deb'); - if ($fiche->belong_ledger($p_jrn) != 1) - throw new Exception(_('La fiche ') . $e_client . _('n\'est pas accessible à ce journal'), 10); - - $nb = 0; - - //---------------------------------------- - // foreach item - //---------------------------------------- - for ($i = 0; $i < $nb_item; $i++) { - if (strlen(trim(${'e_march' . $i})) == 0) - continue; - /* check if amount are numeric and */ - if (isNumber(${'e_march' . $i . '_price'}) == 0) - throw new Exception(_('La fiche ') . ${'e_march' . $i} . _('a un montant invalide [') . ${'e_march' . $i} . ']', 6); - if (isNumber(${'e_quant' . $i}) == 0) - throw new Exception(_('La fiche ') . ${'e_march' . $i} . _('a une quantité invalide [') . ${'e_quant' . $i} . ']', 7); - /* check if all card has a ATTR_DEF_ACCOUNT */ - $fiche = new Fiche($this->db); - $fiche->get_by_qcode(${'e_march' . $i}); - if ($fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) - throw new Exception(_('La fiche ') . ${'e_march' . $i} . _('n\'a pas de poste comptable'), 8); - - // Check if the given tva id is valid - if ($g_parameter->MY_TVA_USE == 'Y') { - if (isNumber(${'e_march' . $i . '_tva_id'}) == 0) - throw new Exception(_('La fiche ') . ${'e_march' . $i} . _('a un code tva invalide') . ' [' . ${'e_march' . $i . '_tva_id'} . ']', 13); - $tva_rate = new Acc_Tva($this->db); - $tva_rate->set_parameter('id', ${'e_march' . $i . '_tva_id'}); - if ($tva_rate->load() != 0) - throw new Exception(_('La fiche ') . ${'e_march' . $i} . _('a un code tva invalide') . ' [' . ${'e_march' . $i . '_tva_id'} . ']', 13); - - /* - * check if the accounting for VAT are valid - */ - $a_poste = explode(',', $tva_rate->tva_poste); - - if ( - $this->db->get_value('select count(*) from tmp_pcmn where pcm_val=$1', array($a_poste[0])) == 0 || - $this->db->get_value('select count(*) from tmp_pcmn where pcm_val=$1', array($a_poste[1])) == 0) - throw new Exception(_(" La TVA " . $tva_rate->tva_label . " utilise des postes comptables inexistants")); - } - // if 2 accounts, take only the credit one - /* The account exists */ - $sposte = $fiche->strAttribut(ATTR_DEF_ACCOUNT); - - if (strpos($sposte, ',') != 0) { - $array = explode(',', $sposte); - $poste_val = $array[1]; - } else { - $poste_val = $sposte; - } - $poste = new Acc_Account_Ledger($this->db, $poste_val); - if ($poste->load() == false) { - throw new Exception(_('Pour la fiche ') . ${'e_march' . $i} . _(' le poste comptable [') . $poste->id . _('n\'existe pas'), 9); - } - /* Check if the card belong to the ledger */ - $fiche = new Fiche($this->db); - $fiche->get_by_qcode(${'e_march' . $i}); - if ($fiche->belong_ledger($p_jrn, 'cred') != 1) - throw new Exception(_('La fiche ') . ${'e_march' . $i} . _('n\'est pas accessible à ce journal'), 10); - $nb++; - } - if ($nb == 0) - throw new Exception(_('Il n\'y a aucune marchandise'), 12); - //------------------------------------------------------ - // The "Paid By" check - //------------------------------------------------------ - - if ($e_mp != 0) { - $this->check_payment($e_mp, ${"e_mp_qcode_" . $e_mp}); - } - } - - /* !\brief insert into the database, it calls first the verify function, - * change the value of this->jr_id and this->jr_internal - * * It generates the document if gen_invoice is set and save the middle of payment if any ($e_mp) - * - * \param $p_array is usually $_POST or a predefined operation - * \return string - * \note throw an Exception - */ - - public function insert($p_array = null) { - global $g_parameter; - extract($p_array); - $this->verify($p_array); - - $group = $this->db->get_next_seq("s_oa_group"); /* for analytic */ - $seq = $this->db->get_next_seq('s_grpt'); - $this->id = $p_jrn; - $internal = $this->compute_internal_code($seq); - $this->internal = $internal; - - $oPeriode = new Periode($this->db); - $check_periode = $this->check_periode(); - - if ($check_periode == true) - $tperiode = $period; - else - $tperiode = $oPeriode->find_periode($e_date); - - $cust = new Fiche($this->db); - $cust->get_by_qcode($e_client); - $sposte = $cust->strAttribut(ATTR_DEF_ACCOUNT); - - // if 2 accounts, take only the debit one for the customer - // - if (strpos($sposte, ',') != 0) { - $array = explode(',', $sposte); - $poste = $array[0]; - } else { - $poste = $sposte; - } - - bcscale(4); - try { - $tot_amount = 0; - $tot_tva = 0; - $tot_debit = 0; - $this->db->start(); - $tva = array(); - /* Save all the items without vat */ - for ($i = 0; $i < $nb_item; $i++) { - $n_both = 0; - if (strlen(trim(${'e_march' . $i})) == 0) - continue; - - /* First we save all the items without vat */ - $fiche = new Fiche($this->db); - $fiche->get_by_qcode(${"e_march" . $i}); - $amount = bcmul(${'e_march' . $i . '_price'}, ${'e_quant' . $i}); - $tot_amount = round(bcadd($tot_amount, $amount),2); - $acc_operation = new Acc_Operation($this->db); - $acc_operation->date = $e_date; - $sposte = $fiche->strAttribut(ATTR_DEF_ACCOUNT); - - // if 2 accounts, take only the credit one - if (strpos($sposte, ',') != 0) { - $array = explode(',', $sposte); - $poste_val = $array[1]; - } else { - $poste_val = $sposte; - } - - $acc_operation->poste = $poste_val; - $acc_operation->amount = $amount; - $acc_operation->grpt = $seq; - $acc_operation->jrn = $p_jrn; - $acc_operation->type = 'c'; - $acc_operation->periode = $tperiode; - if ($g_parameter->MY_UPDLAB == 'Y') - $acc_operation->desc = strip_tags(${"e_march" . $i . "_label"}); - else - $acc_operation->desc = null; - - $acc_operation->qcode = ${"e_march" . $i}; - if ($amount < 0) - $tot_debit = bcadd($tot_debit, abs($amount)); - - $j_id = $acc_operation->insert_jrnx(); - - if ($g_parameter->MY_TVA_USE == 'Y') { - /* Compute sum vat */ - $oTva = new Acc_Tva($this->db); - $idx_tva = ${'e_march' . $i . '_tva_id'}; - $tva_item = ${'e_march' . $i . '_tva_amount'}; - $oTva->set_parameter("id", $idx_tva); - $oTva->load(); - /* if empty then we need to compute it */ - if (trim($tva_item) == '' || ${'e_march'.$i.'_tva_amount'} == 0) { - /* retrieve tva */ - $l = new Acc_Tva($this->db, $idx_tva); - $l->load(); - $tva_item = bcmul($amount, $l->get_parameter('rate')); - } - if (isset($tva[$idx_tva])) - $tva[$idx_tva]+=$tva_item; - else - $tva[$idx_tva] = $tva_item; - if ($oTva->get_parameter("both_side") == 0) { - $tot_tva = round(bcadd($tva_item, $tot_tva), 2); - } else { - $n_both = $tva_item; - if ($n_both < 0) - $tot_debit = bcadd($tot_debit, abs($n_both)); - } - } - - /* Save the stock */ - /* if the quantity is < 0 then the stock increase (return of - * material) - */ - $nNeg = (${"e_quant" . $i} < 0) ? -1 : 1; - - // always save quantity but in withStock we can find - // what card need a stock management - if ($g_parameter->MY_STOCK = 'Y' && isset($repo)) - { - $dir=(${'e_quant'.$i} < 0 ) ? 'd':'c'; - Stock_Goods::insert_goods($this->db, array('j_id' => $j_id, 'goods' => ${'e_march' . $i}, 'quant' => $nNeg * ${'e_quant' . $i}, 'dir' => $dir, 'repo' => $repo)); - } - - - if ($g_parameter->MY_ANALYTIC != "nu") { - // for each item, insert into operation_analytique */ - $op = new Anc_Operation($this->db); - $op->oa_group = $group; - $op->j_id = $j_id; - $op->oa_date = $e_date; - $op->oa_debit = 'f'; - $op->oa_description = sql_string($e_comm); - $op->save_form_plan($_POST, $i, $j_id); - } - if ($g_parameter->MY_TVA_USE == 'Y') { - /* save into quant_sold */ - $r = $this->db->exec_sql("select insert_quant_sold ($1,$2,$3,$4,$5,$6,$7,$8,$9)", array(null, /* 1 */ - $j_id, /* 2 */ - ${'e_march' . $i}, /* 3 */ - ${'e_quant' . $i}, /* 4 */ - round($amount, 2), /* 5 */ - $tva_item, /* 6 */ - $idx_tva, /* 7 */ - $e_client, /* 8 */ - $n_both)); - } else { - $r = $this->db->exec_sql("select insert_quant_sold ($1,$2,$3,$4,$5,$6,$7,$8,$9) ", array(null, /* 1 */ - $j_id, /* 2 */ - ${'e_march' . $i}, /* 3 */ - ${'e_quant' . $i}, /* 4 */ - $amount, // 5 - 0, - null, - $e_client, - 0)); - } // if ( $g_parameter->MY_TVA_USE=='Y') { - }// end loop : save all items - - /* save total customer */ - $cust_amount = bcadd($tot_amount, $tot_tva); - $acc_operation = new Acc_Operation($this->db); - $acc_operation->date = $e_date; - $acc_operation->poste = $poste; - $acc_operation->amount = $cust_amount; - $acc_operation->grpt = $seq; - $acc_operation->jrn = $p_jrn; - $acc_operation->type = 'd'; - $acc_operation->periode = $tperiode; - $acc_operation->qcode = ${"e_client"}; - if ($cust_amount > 0) - $tot_debit = bcadd($tot_debit, $cust_amount); - $let_tiers = $acc_operation->insert_jrnx(); - - - /** save all vat - * $i contains the tva_id and value contains the vat amount - * if if ($g_parameter->MY_TVA_USE == 'Y' ) - */ - if ($g_parameter->MY_TVA_USE == 'Y') { - foreach ($tva as $i => $value) { - $oTva = new Acc_Tva($this->db); - $oTva->set_parameter('id', $i); - $oTva->load(); - - $poste_vat = $oTva->get_side('c'); - - $cust_amount = bcadd($tot_amount, $tot_tva); - $acc_operation = new Acc_Operation($this->db); - $acc_operation->date = $e_date; - $acc_operation->poste = $poste_vat; - $acc_operation->amount = $value; - $acc_operation->grpt = $seq; - $acc_operation->jrn = $p_jrn; - $acc_operation->type = 'c'; - $acc_operation->periode = $tperiode; - if ($value < 0) - $tot_debit = bcadd($tot_debit, abs($value)); - $acc_operation->insert_jrnx(); - - // if TVA is on both side, we deduce it immediately - if ($oTva->get_parameter("both_side") == 1) { - $poste_vat = $oTva->get_side('d'); - $cust_amount = bcadd($tot_amount, $tot_tva); - $acc_operation = new Acc_Operation($this->db); - $acc_operation->date = $e_date; - $acc_operation->poste = $poste_vat; - $acc_operation->amount = $value; - $acc_operation->grpt = $seq; - $acc_operation->jrn = $p_jrn; - $acc_operation->type = 'd'; - $acc_operation->periode = $tperiode; - $acc_operation->insert_jrnx(); - $tot_debit = bcadd($tot_debit, $value); - $n_both = $value; - } - } - } // if ($g_parameter->MY_TVA_USE=='Y') - /* insert into jrn */ - $acc_operation = new Acc_Operation($this->db); - $acc_operation->date = $e_date; - $acc_operation->echeance = $e_ech; - $acc_operation->amount = abs(round($tot_debit, 2)); - $acc_operation->desc = $e_comm; - $acc_operation->grpt = $seq; - $acc_operation->jrn = $p_jrn; - $acc_operation->periode = $tperiode; - $acc_operation->pj = $e_pj; - $acc_operation->mt = $mt; - - $this->jr_id = $acc_operation->insert_jrn(); - - $this->pj = $acc_operation->set_pj(); - - /* * = e_pj then do not increment sequence */ - /* and e_pj is not null */ - if (strcmp($e_pj, $e_pj_suggest) == 0 && strlen(trim($e_pj)) != 0) { - $this->inc_seq_pj(); - } - - $this->db->exec_sql("update jrn set jr_internal='" . $internal . "' where " . - " jr_grpt_id = " . $seq); - - /* update quant_sold */ - $this->db->exec_sql('update quant_sold set qs_internal = $1 where j_id in (select j_id from jrnx where j_grpt=$2)', array($internal, $seq)); - - /* Save the attachment or generate doc */ - if (isset($_FILES['pj'])) { - if (strlen(trim($_FILES['pj']['name'])) != 0) - $this->db->save_upload_document($seq); - else - /* Generate an invoice and save it into the database */ - if (isset($_POST['gen_invoice'])) { - $file = $this->create_document($internal, $p_array); - $this->doc='' . $file . ''; - } - } - //---------------------------------------- - // Save the payer - //---------------------------------------- - if ($e_mp != 0) { - /* mp */ - $mp = new Acc_Payment($this->db, $e_mp); - $mp->load(); - - /* fiche */ - $fqcode = ${'e_mp_qcode_' . $e_mp}; - $acfiche = new Fiche($this->db); - $acfiche->get_by_qcode($fqcode); - - /* jrnx */ - $acseq = $this->db->get_next_seq('s_grpt'); - $acjrn = new Acc_Ledger($this->db, $mp->get_parameter('ledger_target')); - $acinternal = $acjrn->compute_internal_code($acseq); - - /* Insert paid by */ - $acc_pay = new Acc_Operation($this->db); - $acc_pay->date = $e_date; - /* get the account and explode if necessary */ - $sposte = $acfiche->strAttribut(ATTR_DEF_ACCOUNT); - // if 2 accounts, take only the debit one for customer - if (strpos($sposte, ',') != 0) { - $array = explode(',', $sposte); - $poste_val = $array[0]; - } else { - $poste_val = $sposte; - } - $famount = bcsub($cust_amount, $acompte); - $acc_pay->poste = $poste_val; - $acc_pay->qcode = $fqcode; - $acc_pay->amount = abs(round($famount, 2)); - $acc_pay->desc = null; - - $acc_pay->grpt = $acseq; - $acc_pay->jrn = $mp->get_parameter('ledger_target'); - $acc_pay->periode = $tperiode; - $acc_pay->type = ($famount >= 0) ? 'd' : 'c'; - $acc_pay->insert_jrnx(); - - /* Insert supplier */ - $acc_pay = new Acc_Operation($this->db); - $acc_pay->date = $e_date; - $acc_pay->poste = $poste; - $acc_pay->qcode = $e_client; - $acc_pay->amount = abs(round($famount, 2)); - $acc_pay->desc = null; - $acc_pay->grpt = $acseq; - $acc_pay->jrn = $mp->get_parameter('ledger_target'); - $acc_pay->periode = $tperiode; - $acc_pay->type = ($famount >= 0) ? 'c' : 'd'; - $let_other = $acc_pay->insert_jrnx(); - - /* insert into jrn */ - $acc_pay->mt = $mt; - $acjrn->grpt_id = $acseq; - $acc_pay->desc = (!isset($e_comm_paiement) || strlen(trim($e_comm_paiement)) == 0) ? $e_comm : $e_comm_paiement; - $mp_jr_id = $acc_pay->insert_jrn(); - $acjrn->update_internal_code($acinternal); - - $r1 = $this->get_id($internal); - $r2 = $this->get_id($acinternal); - - /* - * add lettering - */ - $oletter = new Lettering($this->db); - $oletter->insert_couple($let_tiers, $let_other); - - - /* set the flag paid */ - $Res = $this->db->exec_sql("update jrn set jr_rapt='paid' where jr_id=$1", array($r1)); - - /* Reconcialiation */ - $rec = new Acc_Reconciliation($this->db); - $rec->set_jr_id($r1); - $rec->insert($r2); - - - /* - * save also into quant_fin - */ - - /* get ledger property */ - $ledger = new Acc_Ledger_Fin($this->db, $acc_pay->jrn); - $prop = $ledger->get_propertie(); - - /* if ledger is FIN then insert into quant_fin */ - if ($prop['jrn_def_type'] == 'FIN') { - $ledger->insert_quant_fin($acfiche->id, $mp_jr_id, $cust->id, bcmul($famount, 1)); - } - } - } catch (Exception $e) { - echo '' . - 'Erreur dans l\'enregistrement ' . - __FILE__ . ':' . __LINE__ . ' ' . - $e->getMessage(); - echo $e->getTrace(); - - $this->db->rollback(); - throw new Exception ($e); - } - $this->db->commit(); - - return $internal; - } - - /* ! - * @brief show the summary of the operation and propose to save it - * @param array contains normally $_POST. It proposes also to save - * the Analytic accountancy - * @param $p_summary false for the feedback, true to show the summary - * @return string - * - */ - - function confirm($p_array, $p_summary = false) { - global $g_parameter; - extract($p_array); - - // don't need to verify for a summary - if (!$p_summary) - $this->verify($p_array); - $anc = null; - // to show a select list for the analytic & VAT USE - // if analytic is op (optionnel) there is a blank line - - bcscale(4); - $client = new Fiche($this->db); - $client->get_by_qcode($e_client, true); - - $client_name = $client->getName() . - ' ' . $client->strAttribut(ATTR_DEF_ADRESS) . ' ' . - $client->strAttribut(ATTR_DEF_CP) . ' ' . - $client->strAttribut(ATTR_DEF_CITY); - $lPeriode = new Periode($this->db); - if ($this->check_periode() == true) { - $lPeriode->p_id = $period; - } else { - $lPeriode->find_periode($e_date); - } - $date_limit = $lPeriode->get_date_limit(); - $r = ""; - - $r.=''; - if ( $p_summary ) { - $jr_id=$this->db->get_value('select jr_id from jrn where jr_internal=$1',array($this->internal)); - $r.=""; - $r.=''; - $r.=''; - $r.=""; - } - $r.=''; - if ( ! $p_summary) { - $r.=''; - } else { - - if ( strcmp($this->pj,$e_pj) != 0 ) - { - $r.=''; - } else { - $r.=''; - } - } - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - - $r.=''; - $r.=''; - $r.=''; - $r.='
    '; - $r.=_('Détail opération '); - $r.=''; - $r.=sprintf ('%s', - $jr_id,dossier::id(),$this->internal); - $r.='
    ' . _('Numéro Pièce') .''. hb($e_pj) . '' . _('Numéro Pièce') .''. hb($this->pj) . - ' '._('Attention numéro pièce existante, elle a du être adaptée').'' . _('Numéro Pièce') .''. hb($this->pj) . '
    ' . _('Date') . ' ' . hb($e_date) . '
    ' . _('Echeance') . ' ' . hb($e_ech) . '
    ' . _('Période Comptable') . ' ' .hb( $date_limit['p_start'] . '-' . $date_limit['p_end']) . '
    ' . _('Journal') . ' ' . hb($this->get_name()) . '
    ' . _('Libellé') . ' ' . hb($e_comm) . '
    ' . _('Client') . ' ' . hb($e_client . ':' . $client_name) . '
    '; - $r.='

    ' . _('Détail articles vendus') . '

    '; - $r.='

    '; - $r.=''; - $r.=''; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - - - if ($g_parameter->MY_TVA_USE == 'Y') { - $r.=""; - $r.=''; - $r.=''; - $r.=''; - } else { - $r.=''; - } - /* if we use the AC */ - if ($g_parameter->MY_ANALYTIC != 'nu') { - $anc = new Anc_Plan($this->db); - $a_anc = $anc->get_list(); - $x = count($a_anc); - /* set the width of the col */ - $r.=''; - - /* add hidden variables pa[] to hold the value of pa_id */ - $r.=Anc_Plan::hidden($a_anc); - } - $r.=''; - $tot_amount = 0.0; - $tot_tva = 0.0; - for ($i = 0; $i < $nb_item; $i++) { - if (strlen(trim(${"e_march" . $i})) == 0) - continue; - - /* retrieve information for card */ - $fiche = new Fiche($this->db); - $fiche->get_by_qcode(${"e_march" . $i}); - if ($g_parameter->MY_UPDLAB == 'Y') - $fiche_name = h(${"e_march" . $i . "_label"}); - else - $fiche_name = $fiche->strAttribut(ATTR_DEF_NAME); - if ($g_parameter->MY_TVA_USE == 'Y') { - $oTva = new Acc_Tva($this->db); - $idx_tva = ${"e_march" . $i . "_tva_id"}; - - $oTva->set_parameter('id', $idx_tva); - $oTva->load(); - } - $op = new Acc_Compute(); - $amount = bcmul(${"e_march" . $i . "_price"}, ${'e_quant' . $i}); - $op->set_parameter("amount", $amount); - if ($g_parameter->MY_TVA_USE == 'Y') { - $op->set_parameter('amount_vat_rate', $oTva->get_parameter('rate')); - $op->compute_vat(); - $tva_computed = $op->get_parameter('amount_vat'); - $tva_item = ${"e_march" . $i . "_tva_amount"}; - if (isset($tva[$idx_tva])) - $tva[$idx_tva]+=$tva_item; - else - $tva[$idx_tva] = $tva_item; - $tot_tva = round(bcadd($tva_item, $tot_tva), 2); - } - $tot_amount = round(bcadd($tot_amount, $amount), 2); - - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $both_side=0; - if ($g_parameter->MY_TVA_USE == 'Y') { - $r.=''; - $both_side=$oTva->get_parameter("both_side"); - /* warning if tva_computed and given are not the - same */ - if (bcsub($tva_item, $tva_computed) != 0 && ! ($tva_item == 0 && $both_side == 1)) { - $r.=''; - $r.=''; - $tot_row = bcadd($tva_item, $amount); - $r.=td(nbm($tot_row), 'class="num"'); - } else { - $r.=''; - } - // encode the pa - if ($g_parameter->MY_ANALYTIC != 'nu') { // use of AA - // show form - $anc_op = new Anc_Operation($this->db); - $null = ($g_parameter->MY_ANALYTIC == 'op') ? 1 : 0; - $r.=''; - } - - - $r.=''; - } // end loop item - // - // Add the sum - $decalage=($g_parameter->MY_TVA_USE == 'Y')?'':''; - $tot = round(bcadd($tot_amount, $tot_tva), 2); - $tot_tva=nbm($tot_tva); - $tot=nbm($tot); - $str_tot=_('Totaux'); - $tot_amount=nbm($tot_amount); - $r.=<< - {$decalage} - - - - -EOF; - - $r.='
    " . _('Code') . "" . _('Dénomination') . "" . _('prix') . "" . _('quantité') . "" . _('tva') . " ' . _('Montant TVA') . '' . _('Montant HTVA') . '' . _('Montant TVAC') . '' . _('Montant') . '' . _('Compt. Analytique') . '
    '; - $r.=${"e_march" . $i}; - $r.=''; - $r.=$fiche_name; - $r.=''; - $r.=nbm(${"e_march" . $i . "_price"}); - $r.=''; - $r.=nbm(${"e_quant" . $i}); - $r.=''; - $r.=$oTva->get_parameter('label'); - $r.=''; - $r.=HtmlInput::infobulle(28); - $r.='' - . nbm($tva_item) . ''; - } else { - $r.=''; - $r.=nbm($tva_item); - } - $r.=''; - $r.=nbm($amount); - $r.=''; - $r.=nbm($amount); - $r.=''; - $p_mode = ($p_summary == false) ? 1 : 0; - $p_array['pa_id'] = $a_anc; - /* op is the operation it contains either a sequence or a jrnx.j_id */ - $r.=HtmlInput::hidden('op[]=', $i); - $r.=$anc_op->display_form_plan($p_array, $null, $p_mode, $i, $amount); - $r.='
    - {$str_tot} - - {$tot_tva} - - {$tot_amount} - - {$tot} -
    '; - $r.='

    '; - if ($g_parameter->MY_ANALYTIC != 'nu' && ! $p_summary) // use of AA - $r.=''; - $r.=(! $p_summary )?'
    ':'
    '; - $r.='

    Totaux

    '; - - /* use VAT */ - if ($g_parameter->MY_TVA_USE == 'Y') { - $r.=''; - $r.=''; - $r.=td(hb($tot_amount ),'class="num"'); - foreach ($tva as $i => $value) { - $oTva->set_parameter('id', $i); - $oTva->load(); - - $r.=''; - $r.=td(hb(nbm($tva[$i])),'class="num"'); - } - $r.=''.td(_('Total TVA')).td(hb($tot_tva),'class="num"'); - $r.=''.td(_('Total TVAC')).td(hb($tot),'class="num"'); - $r.='
    Total HTVA
    TVA ' . $oTva->get_parameter('label').'
    '; - } else { - $r.='
    Total '.hb($tot); - } - $r.='
    '; - /* Add hidden */ - $r.=HtmlInput::hidden('e_client', $e_client); - $r.=HtmlInput::hidden('nb_item', $nb_item); - $r.=HtmlInput::hidden('p_jrn', $p_jrn); - $mt = microtime(true); - $r.=HtmlInput::hidden('mt', $mt); - - if (isset($period)) - $r.=HtmlInput::hidden('period', $period); - /* \todo comment les types hidden gérent ils des contenus avec des quotes, double quote ou < > ??? */ - $r.=HtmlInput::hidden('e_comm', $e_comm); - $r.=HtmlInput::hidden('e_date', $e_date); - $r.=HtmlInput::hidden('e_ech', $e_ech); - $r.=HtmlInput::hidden('e_pj', $e_pj); - $r.=HtmlInput::hidden('e_pj_suggest', $e_pj_suggest); - - $e_mp = (isset($e_mp)) ? $e_mp : 0; - $r.=HtmlInput::hidden('e_mp', $e_mp); - - if ( isset($repo) ) { - // Show the available repository - $r.= $this->select_depot($p_summary,$repo); - } - - /* if the paymethod is not 0 and if a quick code is given */ - if ($e_mp != 0 && strlen(trim(${'e_mp_qcode_' . $e_mp})) != 0) { - $r.=HtmlInput::hidden('e_mp_qcode_' . $e_mp, ${'e_mp_qcode_' . $e_mp}); - $r.=HtmlInput::hidden('acompte', $acompte); - $r.=HtmlInput::hidden('e_comm_paiement', $e_comm_paiement); - /* needed for generating a invoice */ - $r.=HtmlInput::hidden('qcode_benef', ${'e_mp_qcode_' . $e_mp}); - - $fname = new Fiche($this->db); - $fname->get_by_qcode(${'e_mp_qcode_' . $e_mp}); - $r.='

    ' . "Payé par " . ${'e_mp_qcode_' . $e_mp} . - " " . $fname->getName() . '

    ' . '

    ' . _('Déduction acompte ') . h($acompte) . '

    ' . - _('Libellé :') . h($e_comm_paiement) ; - $r.='
    '; - } - - $r.=HtmlInput::hidden('jrn_type', $jrn_type); - for ($i = 0; $i < $nb_item; $i++) { - $r.=HtmlInput::hidden("e_march" . $i, ${"e_march" . $i}); - if (isset(${"e_march" . $i . "_label"})) - $r.=HtmlInput::hidden("e_march" . $i . "_label", ${"e_march" . $i . "_label"}); - $r.=HtmlInput::hidden("e_march" . $i . "_price", ${"e_march" . $i . "_price"}); - if ($g_parameter->MY_TVA_USE == 'Y') { - $r.=HtmlInput::hidden("e_march" . $i . "_tva_id", ${"e_march" . $i . "_tva_id"}); - $r.=HtmlInput::hidden("e_march" . $i . "_tva_amount", ${"e_march" . $i . "_tva_amount"}); - } - $r.=HtmlInput::hidden("e_quant" . $i, ${"e_quant" . $i}); - } - return $r; - } - - /* !\brief the function extra info allows to - * - add a attachment - * - generate an invoice - * - insert extra info - * \return string - */ - - public function extra_info() { - $r = '
    '; - // check for upload piece - $file = new IFile(); - $file->table = 0; - $r.='

    '; - $r.=_("Ajoutez une pièce justificative "); - $r.=$file->input("pj", ""); - - if ($this->db->count_sql("select md_id,md_name from document_modele where md_affect='VEN'") > 0) { - - - $r.=_('ou générer une facture') . ' '; - // We propose to generate the invoice and some template - $doc_gen = new ISelect(); - $doc_gen->name = "gen_doc"; - $doc_gen->value = $this->db->make_array( - "select md_id,md_name " . - " from document_modele where md_affect='VEN'"); - $r.=$doc_gen->input() . '
    '; - } - $r.='
    '; - $obj = new IText(); - $r.=_('Numero de bon de commande : ') . $obj->input('bon_comm') . '
    '; - $r.=_('Autre information : ') . $obj->input('other_info') . '
    '; - $r.='

    '; - $r.='
    '; - return $r; - } - - /** - * @brief update the payment - * @deprecated - * - */ - - function show_unpaid() { - // Show list of unpaid sell - // Date - date of payment - Customer - amount - // Nav. bar - $step = $_SESSION['g_pagesize']; - $page = (isset($_GET['offset'])) ? $_GET['page'] : 1; - $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0; - - - $sql = SQL_LIST_UNPAID_INVOICE_DATE_LIMIT . " and jr_def_id=" . $this->id; - list($max_line, $list) = ListJrn($this->db, $sql, null, $offset, 1); - $sql = SQL_LIST_UNPAID_INVOICE . " and jr_def_id=" . $this->id; - list($max_line2, $list2) = ListJrn($this->db, $sql, null, $offset, 1); - - // Get the max line - $m = ($max_line2 > $max_line) ? $max_line2 : $max_line; - $bar2 = navigation_bar($offset, $m, $step, $page); - - echo $bar2; - echo '

    ' . _('Echeance dépassée') . '

    '; - echo $list; - echo '

    ' . _('Non Payée') . '

    '; - echo $list2; - echo $bar2; - // Add hidden parameter - $hid = new IHidden(); - - echo '
    '; - - if ($m != 0) - echo HtmlInput::submit('paid', _('Mise à jour paiement')); - } - - /* !\brief display the form for entering data for invoice, - * \param $p_array is null or you can put the predef operation or the $_POST - * - * \return HTML string - */ - - function input($p_array = null, $p_readonly = 0) { - global $g_parameter, $g_user; - if ($p_array != null) - extract($p_array); - - $flag_tva = $g_parameter->MY_TVA_USE; - /* Add button */ - $f_add_button = new IButton('add_card'); - $f_add_button->tabindex = -1; - $f_add_button->label = _('Créer une nouvelle fiche'); - $f_add_button->set_attribute('ipopup', 'ipop_newcard'); - $f_add_button->set_attribute('jrn', $this->id); - $f_add_button->javascript = "this.jrn=\$('p_jrn').value; select_card_type(this);"; - - $f_add_button2 = new IButton('add_card2'); - $f_add_button2->tabindex = -1; - $f_add_button2->label = _('Créer une nouvelle fiche'); - $f_add_button2->set_attribute('ipopup', 'ipop_newcard'); - $f_add_button2->set_attribute('filter', $this->get_all_fiche_def()); - // $f_add_button2->set_attribute('jrn',$this->id); - $f_add_button2->javascript = " this.jrn=\$('p_jrn').value;select_card_type(this);"; - - $str_add_button = ""; - $str_add_button2 = ""; - if ($g_user->check_action(FICADD) == 1) { - $str_add_button = $f_add_button->input(); - $str_add_button2 = $f_add_button2->input(); - } - // The first day of the periode - $oPeriode = new Periode($this->db); - list ($l_date_start, $l_date_end) = $oPeriode->get_date_limit($g_user->get_periode()); - if ($g_parameter->MY_DATE_SUGGEST == 'Y') - $op_date = (!isset($e_date) ) ? $l_date_start : $e_date; - else - $op_date = (!isset($e_date) ) ? '' : $e_date; - - - $e_ech = (isset($e_ech)) ? $e_ech : ""; - $e_comm = (isset($e_comm)) ? $e_comm : ""; - - $r = ''; - $r.=dossier::hidden(); - $f_legend = _('Client'); - - $Echeance = new IDate(); - $Echeance->setReadOnly(false); - - $Echeance->tabindex = 2; - $label = HtmlInput::infobulle(4); - $f_echeance = $Echeance->input('e_ech', $e_ech, _('Echéance') . $label); - $Date = new IDate(); - $Date->setReadOnly(false); - - $f_date = $Date->input("e_date", $op_date); - - $f_periode = ''; - // Periode - //-- - if ($this->check_periode() == true) { - $l_user_per = $g_user->get_periode(); - $def = (isset($periode)) ? $periode : $l_user_per; - - $period = new IPeriod("period"); - $period->user = $g_user; - $period->cn = $this->db; - $period->value = $def; - $period->type = OPEN; - try { - $l_form_per = $period->input(); - } catch (Exception $e) { - if ($e->getCode() == 1) { - throw new Exception( _("Aucune période ouverte") ); - } - } - $label = HtmlInput::infobulle(3); - $f_periode = '' . _("Période comptable") . " $label " . $l_form_per . ''; - } - /* if we suggest the next pj, then we need a javascript */ - $add_js = ""; - if ($g_parameter->MY_PJ_SUGGEST == 'Y') { - $add_js = "update_pj();"; - } - if ($g_parameter->MY_DATE_SUGGEST == 'Y') { - $add_js.='get_last_date();'; - } - $add_js.='update_name();'; - $add_js.='update_pay_method();'; - $add_js.='update_row("sold_item");'; - - $wLedger = $this->select_ledger('VEN', 2); - if ($wLedger == null) - throw new Exception(_('Pas de journal disponible')); - $wLedger->table = 1; - $wLedger->javascript = "onChange='update_predef(\"ven\",\"f\",\"".$_REQUEST['ac']."\");$add_js'"; - $wLedger->label = " Journal " . HtmlInput::infobulle(2); - - $f_jrn = $wLedger->input(); - - $Commentaire = new IText(); - $Commentaire->table = 0; - $Commentaire->setReadOnly(false); - $Commentaire->size = 60; - $Commentaire->tabindex = 3; - - $label = HtmlInput::infobulle(1); - - $f_desc = $Commentaire->input("e_comm", h($e_comm)) ; - // PJ - //-- - /* suggest PJ ? */ - $default_pj = ''; - if ($g_parameter->MY_PJ_SUGGEST == 'Y') { - $default_pj = $this->guess_pj(); - } - - $pj = new IText(); - - $pj->table = 0; - $pj->name = "e_pj"; - $pj->size = 10; - $pj->value = (isset($e_pj)) ? $e_pj : $default_pj; - $f_pj = $pj->input() . HtmlInput::hidden('e_pj_suggest', $default_pj); - // Display the customer - //-- - $fiche = 'deb'; - - // Save old value and set a new one - //-- - $e_client = ( isset($e_client) ) ? $e_client : ""; - $e_client_label = " "; //str_pad("",100,"."); - // retrieve e_client_label - //-- - - if (strlen(trim($e_client)) != 0) { - $fClient = new Fiche($this->db); - $fClient->get_by_qcode($e_client); - $e_client_label = $fClient->strAttribut(ATTR_DEF_NAME) . ' ' . - ' Adresse : ' . $fClient->strAttribut(ATTR_DEF_ADRESS) . ' ' . - $fClient->strAttribut(ATTR_DEF_CP) . ' ' . - $fClient->strAttribut(ATTR_DEF_CITY) . ' '; - } - - $W1 = new ICard(); - $W1->label = "Client " . HtmlInput::infobulle(0); - $W1->name = "e_client"; - $W1->tabindex = 3; - $W1->value = $e_client; - $W1->table = 0; - $W1->set_dblclick("fill_ipopcard(this);"); - $W1->set_attribute('ipopup', 'ipopcard'); - - // name of the field to update with the name of the card - $W1->set_attribute('label', 'e_client_label'); - // name of the field to update with the name of the card - $W1->set_attribute('typecard', 'deb'); - - // Add the callback function to filter the card on the jrn - $W1->set_callback('filter_card'); - $W1->set_function('fill_data'); - $W1->javascript = sprintf(' onchange="fill_data_onchange(\'%s\');" ', $W1->name); - $f_client_qcode = $W1->input(); - $client_label = new ISpan(); - $client_label->table = 0; - $f_client = $client_label->input("e_client_label", $e_client_label); - $f_client_bt = $W1->search(); - - - // Record the current number of article - $Hid = new IHidden(); - $p_article = ( isset($nb_item)) ? $nb_item : $this->get_min_row(); - $r.=$Hid->input("nb_item", $p_article); - $max = ($p_article < $this->get_min_row()) ? $this->get_min_row() : $p_article; - - - $f_legend_detail = _("Détail articles vendus"); - - // For each article - //-- - for ($i = 0; $i < $max; $i++) { - // Code id, price & vat code - //-- - $march = (isset(${"e_march$i"})) ? ${"e_march$i"} : ""; - $march_price = (isset(${"e_march" . $i . "_price"})) ? ${"e_march" . $i . "_price"} : "" ; - if ($flag_tva == 'Y') { - $march_tva_id = (isset(${"e_march$i" . "_tva_id"})) ? ${"e_march$i" . "_tva_id"} : ""; - $march_tva_amount = (isset(${"e_march$i" . "_tva_amount"})) ? ${"e_march$i" . "_tva_amount"} : ""; - } - $march_label = (isset(${"e_march" . $i . "_label"})) ? ${"e_march" . $i . "_label"} : ""; - - // retrieve the tva label and name - //-- - if (strlen(trim($march)) != 0 && strlen(trim($march_label)) == 0) { - $fMarch = new Fiche($this->db); - $fMarch->get_by_qcode($march); - $march_label = $fMarch->strAttribut(ATTR_DEF_NAME); - if ($flag_tva == 'Y') { - if (!(isset(${"e_march$i" . "_tva_id"}))) - $march_tva_id = $fMarch->strAttribut(ATTR_DEF_TVA); - } - } - // Show input - //-- - $W1 = new ICard(); - $W1->label = ""; - $W1->name = "e_march" . $i; - $W1->value = $march; - $W1->table = 1; - $W1->set_attribute('typecard', 'cred'); - $W1->set_dblclick("fill_ipopcard(this);"); - $W1->set_attribute('ipopup', 'ipopcard'); - - // name of the field to update with the name of the card - $W1->set_attribute('label', 'e_march' . $i . '_label'); - // name of the field with the price - $W1->set_attribute('price', 'e_march' . $i . '_price'); - // name of the field with the TVA_ID - $W1->set_attribute('tvaid', 'e_march' . $i . '_tva_id'); - // Add the callback function to filter the card on the jrn - $W1->set_callback('filter_card'); - $W1->set_function('fill_data'); - $W1->javascript = sprintf(' onchange="fill_data_onchange(\'%s\');" ', $W1->name); - - $W1->readonly = false; - - $array[$i]['quick_code'] = $W1->input(); - $array[$i]['bt'] = $W1->search(); - // For computing we need some hidden field for holding the value - $array[$i]['hidden'] = ''; - if ($flag_tva == 'Y') - $array[$i]['hidden'].=HtmlInput::hidden('tva_march' . $i, 0); - - $htva = new INum('htva_march' . $i); - $htva->readOnly = 1; - $htva->value = 0; - $array[$i]['htva'] = $htva->input(); - - if ($g_parameter->MY_TVA_USE == 'Y') - $tvac = new INum('tvac_march' . $i); - else - $tvac = new IHidden('tvac_march' . $i); - - $tvac->readOnly = 1; - $tvac->value = 0; - $array[$i]['tvac'] = $tvac->input(); - - if ($g_parameter->MY_UPDLAB == 'Y') { - $Span = new IText("e_march" . $i . "_label"); - - $Span->css_size = "100%"; - } else { - $Span = new ISpan("e_march" . $i . "_label"); - } - $Span->value = $march_label; - $Span->setReadOnly(false); - // card's name, price - //-- - $array[$i]['denom'] = $Span->input("e_march" . $i . "_label", $march_label); - // price - $Price = new INum(); - $Price->setReadOnly(false); - $Price->size = 9; - $Price->javascript = "onBlur='format_number(this);clean_tva($i);compute_ledger($i)'"; - $array[$i]['pu'] = $Price->input("e_march" . $i . "_price", $march_price); - $array[$i]['tva'] = ''; - $array[$i]['amount_tva'] = ''; - // if tva is not needed then no tva field - if ($flag_tva == 'Y') { - // vat label - //-- - $Tva = new ITva_Popup($this->db); - $Tva->in_table = true; - $Tva->set_attribute('compute', $i); - - $Tva->js = 'onblur="format_number(this);clean_tva(' . $i . ');compute_ledger(' . $i . ')"'; - $Tva->value = $march_tva_id; - $array[$i]['tva'] = $Tva->input("e_march$i" . "_tva_id"); - // vat amount - //-- - $wTva_amount = new INum(); - $wTva_amount->readOnly = false; - $wTva_amount->size = 6; - $wTva_amount->javascript = "onBlur='format_number(this);compute_ledger($i)'"; - $array[$i]['amount_tva'] = $wTva_amount->input("e_march" . $i . "_tva_amount", $march_tva_amount); - } - // quantity - //-- - $quant = (isset(${"e_quant$i"})) ? ${"e_quant$i"} : "1" - ; - $Quantity = new INum(); - $Quantity->setReadOnly(false); - $Quantity->size = 8; - $Quantity->javascript = "onChange='format_number(this);clean_tva($i);compute_ledger($i)'"; - $array[$i]['quantity'] = $Quantity->input("e_quant" . $i, $quant); - }// foreach article - $f_type = _('Client'); - - - ob_start(); - require_once NOALYSS_INCLUDE.'/template/form_ledger_detail.php'; - $r.=ob_get_contents(); - ob_end_clean(); - - - - // Set correctly the REQUEST param for jrn_type - $r.=HtmlInput::hidden('jrn_type', 'VEN'); - - $r.=HtmlInput::button('add_item', _('Ajout article'), ' onClick="ledger_add_row()"'); - $r.= create_script("$('" . $Date->id . "').focus()"); - return $r; - } - /** - * Retrieve data from the view v_detail_sale - * @global $g_user connected user - * @param $p_from jrn.jr_tech_per from - * @param type $p_end jrn.jr_tech_per to - * @return type - */ - function get_detail_sale($p_from,$p_end) - { - global $g_user; - // Journal valide - if ( $this->id == 0 ) die (__FILE__.":".__LINE__." Journal invalide"); - - // Securite - if ( $g_user->get_ledger_access($this->id) == 'X' ) return null; - - // get the data from the view - $sql = "select * - from v_detail_sale - where - jr_def_id = $1 - and jr_date >= (select p_start from parm_periode where p_id = $2) - and jr_date <= (select p_end from parm_periode where p_id = $3) " - .' order by jr_date,substring(jr_pj_number,\'[0-9]+$\')::numeric asc '; - $ret = $this->db->exec_sql($sql, array($this->id,$p_from, $p_end)); - return $ret; - } - /** - * @brief compute an array with the heading cells for the - * details, used for the export in CSV - * @return array - */ - static function heading_detail_sale() - { - $array['jr_id'] = _('Numéro opération'); - $array['jr_date'] = _('Date'); - $array['jr_date_paid'] = _('Date paiement'); - $array['jr_ech'] = _('Date échéance'); - $array['jr_tech_per'] = _('Période'); - $array['jr_comment'] = _('Libellé'); - $array['jr_pj_number'] = _('Pièce'); - $array['jr_internal'] = _('Interne'); - $array['jr_def_id'] = _('Code journal'); - $array['j_poste'] = _('Poste'); - $array['j_text'] = _('Commentaire'); - $array['j_qcode'] = _('Code Item'); - $array['item_card'] = _('N° fiche'); - $array['item_name'] = _('Nom fiche'); - $array['qs_client'] = _('N° fiche fournisseur'); - $array['tiers_name'] = _('Nom fournisseur'); - $array['quick_code'] = _('Code fournisseur'); - $array['tva_label'] = _('Nom TVA'); - $array['tva_comment'] = _('Commentaire TVA'); - $array['tva_both_side'] = _('TVA annulée'); - $array['vat_sided'] = _('TVA Non Payé'); - $array['vat_code'] = _('Code TVA'); - $array['vat'] = _('Montant TVA'); - $array['price'] = _('Total HTVA'); - $array['quantity'] = _('quantité'); - $array['price_per_unit'] = _('PU'); - $array['htva'] = _('HTVA Opération'); - $array['tot_vat'] = _('TVA Opération'); - return $array; - } - /* !\brief test function - */ - - static function test_me($p_string = '') { - $cn = new Database(dossier::id()); - $a = new Acc_Ledger_Sold($cn, 2); - echo $a->input(); - } - - } - diff --git a/sources/include/class_acc_operation.php b/sources/include/class_acc_operation.php deleted file mode 100644 index 1de6fc4..0000000 --- a/sources/include/class_acc_operation.php +++ /dev/null @@ -1,716 +0,0 @@ -db=$p_cn; - $this->qcode=""; - $this->user=$_SESSION['g_user']; - $this->periode=$g_user->get_periode(); - $this->jr_id=0; - } - /** - *@brief retrieve the grpt_id from jrn for a jr_id - *@return jrn.jr_grpt_id or an empty string if not found - */ - function seek_group() - { - $ret=$this->db->get_value('select jr_grpt_id from jrn where jr_id=$1', - array($this->jr_id)); - return $ret; - } - /** - *@brief Insert into the table Jrn - *The needed data are : - * - this->date - * - this->amount - * - this->poste - * - this->grpt - * - this->jrn - * - this->type ( debit or credit) - * - this->user - * - this->periode - * - this->qcode - * - this->desc optional - *@note if the amount is less than 0 then side changes, for example debit becomes - *a credit and vice versa - *@return jrnx.j_id - */ - - function insert_jrnx() - { - if ( $this->poste == "") { return false; throw new Exception (__FILE__.':'.__LINE__.' Poste comptable vide');} - /* for negative amount the operation is reversed */ - if ( $this->amount < 0 ) - { - $this->type=($this->type=='d')?'c':'d'; - } - $this->amount=abs($this->amount); - $debit=($this->type=='c')?'false':'true'; - $this->desc=(isset($this->desc))?$this->desc:''; - $Res=$this->db->exec_sql("select insert_jrnx - ($1::text,abs($2)::numeric,$3::account_type,$4::integer,$5::integer,$6::bool,$7::text,$8::integer,upper($9),$10::text)", - array( - $this->date, //$1 - round($this->amount,2), //$2 - $this->poste, //$3 - $this->grpt, //$4 - $this->jrn, //$5 - $debit, //$6 - $this->user, //$7 - $this->periode, //$8 - $this->qcode, // $9 - $this->desc)); //$10 - if ( $Res===false) return $Res; - $this->jrnx_id=$this->db->get_current_seq('s_jrn_op'); - return $this->jrnx_id; - - } - /*!\brief set the pj of a operation in jrn. the jr_id must be set - *\note if the jr_id it fails - */ - function set_pj() - { - if ( strlen(trim($this->pj)) == 0 ) - { - $sql="update jrn set jr_pj_number=$1 where jr_id=$2"; - $this->db->exec_sql($sql,array(null,$this->jr_id)); - return ''; - } - /* is pj uniq ? */ - if ( $this->db->count_sql("select jr_id from jrn where jr_pj_number=$1 and jr_def_id=$2", - array($this->pj,$this->jrn) - ) == 0 ) - { - $sql="update jrn set jr_pj_number=$1 where jr_id=$2"; - $this->db->exec_sql($sql,array($this->pj,$this->jr_id)); - } - else - { - /* get pref */ - $pref=$this->db->get_value("select jrn_def_pj_pref from jrn_def where jrn_def_id=$1", - array($this->jrn)); - /* try another seq */ - $flag=0; - $limit=100; - while ( $flag == 0 ) - { - /* limit the search to $limit */ - if ( $limit < 1 ) - { - $this->pj=''; - $flag=2; - break; - } - - $seq=$this->db->get_next_seq('s_jrn_pj'.$this->jrn); - $this->pj=$pref.$seq; - - /* check if the new pj numb exist */ - $c=$this->db->count_sql("select jr_id from jrn where jr_pj_number=$1 and jr_def_id=$2", - array($this->pj,$this->jrn) - ); - if ( $c == 0 ) - { - $flag=1; - break; - } - $limit--; - } - /* a pj numb is found */ - if ( $flag == 1 ) - { - $sql="update jrn set jr_pj_number=$1 where jr_id=$2"; - $this->db->exec_sql($sql,array($this->pj,$this->jr_id)); - } - } - return $this->pj; - } - - /*! - *\brief Insert into the table Jrn, the amount is computed from jrnx thanks the - * group id ($p_grpt) - * - * \return sequence of jr_id - * - */ - - function insert_jrn() - { - $p_comment=$this->desc; - - $diff=$this->db->get_value("select check_balance ($1)",array($this->grpt)); - if ( $diff != 0 ) - { - - echo "Erreur : balance incorrecte :diff = $diff"; - return false; - } - - $echeance=( isset( $this->echeance) && strlen(trim($this->echeance)) != 0)?$this->echeance:null; - if ( ! isset($this->mt) ) - { - $this->mt=microtime(true); - } - // if amount == -1then the triggers will throw an error - // - $Res=$this->db->exec_sql("insert into jrn (jr_def_id,jr_montant,jr_comment,". - "jr_date,jr_ech,jr_grpt_id,jr_tech_per,jr_mt) values (". - "$1,$2,$3,". - "to_date($4,'DD.MM.YYYY'),to_date($5,'DD.MM.YYYY'),$6,$7,$8)", - array ($this->jrn, $this->amount,$p_comment, - $this->date,$echeance,$this->grpt,$this->periode,$this->mt) - ); - if ( $Res == false) return false; - $this->jr_id=$this->db->get_current_seq('s_jrn'); - return $this->jr_id; - } - /*! - * \brief Return the internal value, the property jr_id must be set before - * - * \return null si aucune valeur de trouv - * - */ - function get_internal() - { - if ( ! isset($this->jr_id) ) - throw new Exception('jr_id is not set',1); - $Res=$this->db->exec_sql("select jr_internal from jrn where jr_id=".$this->jr_id); - if ( Database::num_row($Res) == 0 ) return null; - $l_line=Database::fetch_array($Res); - $this->jr_internal= $l_line['jr_internal']; - return $this->jr_internal; - } - /*!\brief search an operation thankx it internal code - * \param internal code - * \return 0 ok -1 nok - */ - function seek_internal($p_internal) - { - $res=$this->db->exec_sql('select jr_id from jrn where jr_internal=$1', - array($p_internal)); - if ( Database::num_row($Res) == 0 ) return -1; - $this->jr_id=Database::fetch_result($Res,0,0); - return 0; - } - /*!\brief retrieve data from jrnx - *\note the data are filtered by the access of the current user - * \return an array - */ - function get_jrnx_detail() - { - global $g_user; - $filter_sql=$g_user->get_ledger_sql('ALL',3); - $filter_sql=str_replace('jrn_def_id','jr_def_id',$filter_sql); - if ( $this->jr_id==0 ) return; - $sql=" select jr_date,j_qcode,j_poste,j_montant,jr_internal,case when j_debit = 'f' then 'C' else 'D' end as debit,jr_comment as description, - vw_name,pcm_lib,j_debit,coalesce(comptaproc.get_letter_jnt(j_id),-1) as letter,jr_def_id ". - " from jrnx join jrn on (jr_grpt_id=j_grpt) - join tmp_pcmn on (j_poste=pcm_val) - left join vw_fiche_attr on (j_qcode=quick_code) - where - jr_id=$1 and $filter_sql order by j_debit desc"; - $res=$this->db->exec_sql($sql,array($this->jr_id)); - if ( Database::num_row ($res) == 0 ) return array(); - $all=Database::fetch_all($res); - return $all; - } - /*!\brief add a comment to the line (jrnx.j_text) */ - function update_comment($p_text) - { - $sql="update jrnx set j_text=$1 where j_id=$2"; - $this->db->exec_sql($sql,array($p_text,$this->jrnx_id)); - } - /*!\brief add a comment to the operation (jrn.jr_text) */ - function operation_update_comment($p_text) - { - $sql="update jrn set jr_comment=$1 where jr_id=$2"; - $this->db->exec_sql($sql,array($p_text,$this->jr_id)); - } - /*!\brief add a limit of payment to the operation (jrn.jr_ech) */ - function operation_update_date_limit($p_text) - { - if ( isDate($p_text) == null ) - { - $p_text=null; - } - $sql="update jrn set jr_ech=to_date($1,'DD.MM.YYYY') where jr_id=$2"; - $this->db->exec_sql($sql,array($p_text,$this->jr_id)); - } - /*!\brief return the jrn_def_id from jrn */ - function get_ledger() - { - $sql="select jr_def_id from jrn where jr_id=$1"; - $row=$this->db->get_value($sql,array($this->jr_id)); - return $row; - } - /*!\brief display_jrnx_detail : get the data from get_jrnx_data and - return a string with HTML code - * \param table(=0 no code for table,1 code for table,2 code for CSV) - - */ - function display_jrnx_detail($p_table) - { - $show=$this->get_jrnx_detail(); - - $r=''; - $r_notable=''; - $csv=""; - foreach ($show as $l) - { - $border=""; - if ( $l['j_poste'] == $this->poste || ($l['j_qcode']==$this->qcode && trim($this->qcode) != '')) - $border=' class="highlight"'; - $r.=''; - $r.=''; - $a=$l['j_qcode']; - - $r_notable.=$a; - $r.=$a; - $csv.='"'.$a.'";'; - $r.=''; - - $r.=''; - $a=$l['j_poste']; - $r_notable.=$a; - $r.=$a; - $csv.='"'.$a.'";'; - $r.=''; - - $r.=''; - // $a=($l['vw_name']=="")?$l['j_qcode']:$l['pcm_lib']; - $a=(strlen(trim($l['j_qcode']))==0)?$l['pcm_lib']:$l['vw_name']; - $r_notable.=$a; - $r.=h($a); - $csv.='"'.$a.'";'; - $r.=''; - - $r.=''; - $a=$l['j_montant']; - $r_notable.=$a; - $r.=$a; - $csv.=$a.';'; - $r.=''; - - $r.=''; - $a=$l['debit']; - $r_notable.=$a; - $r.=$a; - $csv.='"'.$a.'"'; - - $csv.="\r\n"; - $r.=''; - $r.=''; - $a=($l['letter']!=-1)?$l['letter']:''; - $r_notable.=$a; - $r.=$a; - $csv.='"'.$a.'"'; - - $csv.="\r\n"; - $r.=''; - - - $r.=''; - } - switch ($p_table) - { - case 1: - return $r; - break; - case 0: - return $r_notable; - break; - case 2: - return $csv; - } - return "ERROR PARAMETRE"; - } - /*! - * @brief Get data from jrnx where p_grpt=jrnx(j_grpt) - * - * @param connection - * @return array of 3 elements - * - First Element is an array - @verbatim - Array - ( - [op_date] => 01.12.2009 - [class_cred0] => 7000008 - [mont_cred0] => 8880.0000 - [op_cred0] => 754 - [text_cred0] => - [jr_internal] => 23VEN-01-302 - [comment] => - [ech] => - [jr_id] => 302 - [jr_def_id] => 2 - [class_deb0] => 4000005 - [mont_deb0] => 10744.8000 - [text_deb0] => - [op_deb0] => 755 - [class_cred1] => 4511 - [mont_cred1] => 1864.8000 - [op_cred1] => 756 - [text_cred1] => - ) - @endverbatim - * - Second : number of line with debit - * - Third : number of line with credit - */ - function get_data ($p_grpt) - { - $Res=$this->db->exec_sql("select - to_char(j_date,'DD.MM.YYYY') as j_date, - j_text, - j_debit, - j_poste, - coalesce(j_qcode,'-') as qcode, - j_montant, - j_id, - jr_comment, - to_char(jr_ech,'DD.MM.YYYY') as jr_ech, - to_char(jr_date,'DD.MM.YYYY') as jr_date, - jr_id,jr_internal,jr_def_id,jr_pj - from jrnx inner join jrn on j_grpt=jr_grpt_id where j_grpt=$1",array($p_grpt)); - $MaxLine=Database::num_row($Res); - if ( $MaxLine == 0 ) return null; - $deb=0; - $cred=0; - for ( $i=0; $i < $MaxLine; $i++) - { - - $l_line=Database::fetch_array($Res,$i); - $l_array['op_date']=$l_line['j_date']; - if ( $l_line['j_debit'] == 't' ) - { - $l_class=sprintf("class_deb%d",$deb); - $l_montant=sprintf("mont_deb%d",$deb); - $l_text=sprintf("text_deb%d",$deb); - $l_qcode=sprintf("qcode_deb%d",$deb); - $l_array[$l_class]=$l_line['j_poste']; - $l_array[$l_montant]=$l_line['j_montant']; - $l_array[$l_text]=$l_line['j_text']; - $l_array[$l_qcode]=$l_line['qcode']; - $l_id=sprintf("op_deb%d",$deb); - $l_array[$l_id]=$l_line['j_id']; - $deb++; - } - if ( $l_line['j_debit'] == 'f' ) - { - $l_class=sprintf("class_cred%d",$cred); - $l_montant=sprintf("mont_cred%d",$cred); - $l_array[$l_class]=$l_line['j_poste']; - $l_array[$l_montant]=$l_line['j_montant']; - $l_id=sprintf("op_cred%d",$cred); - $l_array[$l_id]=$l_line['j_id']; - $l_text=sprintf("text_cred%d",$cred); - $l_array[$l_text]=$l_line['j_text']; - $l_qcode=sprintf("qcode_cred%d",$cred); - $l_array[$l_qcode]=$l_line['qcode']; - $cred++; - } - $l_array['jr_internal']=$l_line['jr_internal']; - $l_array['comment']=$l_line['jr_comment']; - $l_array['ech']=$l_line['jr_ech']; - $l_array['jr_id']=$l_line['jr_id']; - $l_array['jr_def_id']=$l_line['jr_def_id']; - } - return array($l_array,$deb,$cred); - } - /** - *@brief retrieve data from jrnx and jrn - *@return return an object - *@note - *@see - @code - - @endcode - */ - function get() - { - $ret=new Acc_Misc($this->db,$this->jr_id); - $ret->get(); - return $ret; - } - /** - *@brief retrieve data from the table QUANT_* - *@return return an object or null if there is no - * data from the QUANT table - *@see Acc_Sold Acc_Purchase Acc_Fin Acc_Detail Acc_Misc - */ - function get_quant() - { - $ledger_id=$this->get_ledger(); - if ( $ledger_id=='') throw new Exception(_('Journal non trouvé')); - $oledger=new Acc_Ledger($this->db,$ledger_id); - - // retrieve info from jrn_info - - - switch($oledger->get_type()) - { - case 'VEN': - $ret=new Acc_Sold($this->db,$this->jr_id); - break; - case 'ACH': - $ret=new Acc_Purchase($this->db,$this->jr_id); - break; - case 'FIN': - $ret=new Acc_Fin($this->db,$this->jr_id); - break; - default: - $ret=new Acc_Misc($this->db,$this->jr_id); - break; - } - $ret->get(); - if ( empty($ret->det->array)) - { - $ret=new Acc_Misc($this->db,$this->jr_id); - $ret->get(); - } - $ret->get_info(); - return $ret; - } - /** - * @brief retrieve info from the jrn_info, create 2 new arrays - * obj->info->command and obj->info->other - * the columns are the idx - */ - function get_info() - { - $this->info=new stdClass(); - // other info - $array=$this->db->get_value("select ji_value from jrn_info where - jr_id=$1 and id_type=$2",array($this->jr_id,'OTHER')); - $this->info->other= $array; - - // Bon de commande - $array=$this->db->get_value("select ji_value from jrn_info where - jr_id=$1 and id_type=$2",array($this->jr_id,'BON_COMMANDE')); - $this->info->command= $array; - - } - /** - * Save into jrn_info - * @param $p_info msg to save - * @param $p_type is OTHER or BON_COMMAND - */ - function save_info($p_info,$p_type) - { - if ( ! in_array($p_type,array('OTHER','BON_COMMANDE'))) return; - if (trim($p_info)=="") { - $this->db->exec_sql('delete from jrn_info where jr_id=$1 and id_type=$2',array($this->jr_id,$p_type)); - return; - } - $exist=$this->db->get_value('select count(ji_id) from jrn_info where jr_id=$1 and id_type=$2',array($this->jr_id,$p_type)); - if ( $exist == "0" ) { - //insert into jrn_info - $this->db->exec_sql('insert into jrn_info(jr_id,id_type,ji_value) values ($1,$2,$3)', - array($this->jr_id,$p_type,$p_info)); - } elseif ( $exist == 1) { - //update - $this->db->exec_sql('update jrn_info set ji_value=$3 where jr_id=$1 and id_type=$2', - array($this->jr_id,$p_type,$p_info)); - } - } - - function insert_related_action($p_string) - { - if ($p_string == "") return; - $a_action=explode(',',$p_string); - for ($i=0;$idb,$a_action[$i]); - $action->operation=$this->jr_id; - $action->insert_operation(); - } - } - static function test_me() - { - $_SESSION['g_user']='phpcompta'; - $_SESSION['g_pass']='dany'; - global $g_user; - $cn=new Database(dossier::id()); - $g_user=new User($cn); - $a=new Acc_Operation($cn); - $a->jr_id=1444; - $b=$a->get_quant(); - var_dump($b); - } -} -///////////////////////////////////////////////////////////////////////////// -class Acc_Detail extends Acc_Operation -{ - function __construct($p_cn,$p_jrid=0) - { - parent::__construct($p_cn); - $this->jr_id=$p_jrid; - $this->det=new stdClass(); - } - /** - *@brief retrieve some common data from jrn as - * the datum, the comment,payment limit... - */ - function get() - { - $sql="SELECT jr_id, jr_def_id, jr_montant, jr_comment, jr_date, jr_grpt_id, - jr_internal, jr_tech_date, jr_tech_per, jrn_ech, jr_ech, jr_rapt,jr_ech, - jr_valid, jr_opid, jr_c_opid, jr_pj, jr_pj_name, jr_pj_type, - jr_pj_number, jr_mt,jr_rapt,jr_date_paid - FROM jrn where jr_id=$1"; - $array=$this->db->get_array($sql,array($this->jr_id)); - if ( count($array) == 0 ) throw new Exception('Aucune ligne trouvée'); - foreach ($array[0] as $key=>$val) - { - $this->det->$key=$val; - } - $sql="select n_text from jrn_note where jr_id=$1"; - $this->det->note=$this->db->get_value($sql,array($this->jr_id)); - $this->det->note=strip_tags($this->det->note); - } -} -///////////////////////////////////////////////////////////////////////////// -/** - *@brief this class manage data from the JRNX and JRN - * table - *@note Data member are the column of the table - */ -class Acc_Misc extends Acc_Detail -{ - var $signature; /*!< signature of the obj ODS */ - var $array; /*!< an array containing the data from JRNX */ - function __construct($p_cn,$p_jrid=0) - { - parent::__construct($p_cn,$p_jrid); - $this->signature='ODS'; - $this->det=new stdClass(); - } - function get() - { - parent::get(); - $sql="SELECT j_id, j_date, j_montant, j_poste, j_grpt, j_rapt, j_jrn_def, - j_debit, j_text, j_centralized, j_internal, j_tech_user, j_tech_date, - j_tech_per, j_qcode - FROM jrnx where j_grpt = $1 order by j_debit desc,j_poste"; - $this->det->array=$this->db->get_array($sql,array($this->det->jr_grpt_id)); - } -} -///////////////////////////////////////////////////////////////////////////// -/** - *@brief this class manage data from the QUANT_SOLD - * table - *@note Data member are the column of the table - */ -class Acc_Sold extends Acc_Detail -{ - function __construct($p_cn,$p_jrid=0) - { - parent::__construct($p_cn,$p_jrid); - $this->signature='VEN'; - $this->det=new stdClass(); - } - function get() - { - parent::get(); - $sql="SELECT qs_id, qs_internal, qs_fiche, qs_quantite, qs_price, qs_vat, - qs_vat_code, qs_client, qs_valid, j_id,j_text,qs_vat_sided - FROM quant_sold join jrnx using(j_id) where j_grpt=$1"; - $this->det->array=$this->db->get_array($sql,array($this->det->jr_grpt_id)); - } - -} -///////////////////////////////////////////////////////////////////////////// -/** - *@brief this class manage data from the QUANT_PURCHASE - * table - *@note Data member are the column of the table - - */ -class Acc_Purchase extends Acc_Detail -{ - function __construct($p_cn,$p_jrid=0) - { - parent::__construct($p_cn,$p_jrid); - $this->signature='ACH'; - } - - function get() - { - parent::get(); - $sql="SELECT qp_id, qp_internal, j_id, qp_fiche, qp_quantite, qp_price, qp_vat, - qp_vat_code, qp_nd_amount, qp_nd_tva, qp_nd_tva_recup, qp_supplier, - qp_valid, qp_dep_priv,j_text,qp_vat_sided - FROM quant_purchase join jrnx using(j_id) where j_grpt=$1"; - $this->det->array=$this->db->get_array($sql,array($this->det->jr_grpt_id)); - } -} -///////////////////////////////////////////////////////////////////////////// -/** - *@brief this class manage data from the QUANT_FIN - * table - *@note Data member are the column of the table - */ -class Acc_Fin extends Acc_Detail -{ - function __construct($p_cn,$p_jrid=0) - { - parent::__construct($p_cn,$p_jrid); - $this->signature='FIN'; - } - - function get() - { - parent::get(); - $sql="SELECT qf_id, qf_bank, jr_id, qf_other, qf_amount - FROM quant_fin where jr_id = $1"; - $this->det->array=$this->db->get_array($sql,array($this->jr_id)); - } -} diff --git a/sources/include/class_acc_parm_code.php b/sources/include/class_acc_parm_code.php deleted file mode 100644 index 21a4459..0000000 --- a/sources/include/class_acc_parm_code.php +++ /dev/null @@ -1,182 +0,0 @@ -db=$p_cn; - $this->p_code=$p_id; - if ( $p_id != -1 ) - $this->load(); - } - /*! - ************************************************** - * \brief - * Load all parmCode - * return an array of Acc_Parm_Code object - * - * \return array - */ - - function load_all() - { - $sql="select * from parm_code order by p_code"; - $Res=$this->db->exec_sql($sql); - $r= Database::fetch_all($Res); - $idx=0; - $array=array(); - - if ( $r === false ) return null; - foreach ($r as $row ) - { - $o=new Acc_Parm_Code($this->db,$row['p_code']); - $array[$idx]=$o; - $idx++; - } - - return $array; - } - /*! - ************************************************** - * \brief update a parm_object into the database - * p_code is _not_ updatable - * \return - * nothing - */ - function save() - { - // if p_code=="" nothing to save - if ( $this->p_code== -1) return; - // check if the account exists - $acc=new Acc_Account_Ledger($this->db,$this->p_value); - if ( $acc->load() == false ) - { - alert(_("Ce compte n'existe pas")); - } - else - { - $this->p_comment=sql_string($this->p_comment); - $this->p_value=sql_string($this->p_value); - $this->p_code=sql_string($this->p_code); - $sql="update parm_code set ". - "p_comment='".$this->p_comment."' ". - ",p_value='".$this->p_value."' ". - "where p_code='".$this->p_code."'"; - $Res=$this->db->exec_sql($sql); - } - } - /*! - ************************************************** - * \brief Display an object, with the tag - * - * \return - * string - */ - function display() - { - $r=""; - $r.= ''.$this->p_code.''; - $r.= ''.h($this->p_comment).''; - $r.= ''.$this->p_value.''; - - return $r; - } - /*! - ************************************************** - * \brief Display a form to enter info about - * a parm_code object with the tag - * - * \return string - */ - function form() - { - $comment=new IText(); - $comment->name='p_comment'; - $comment->value=$this->p_comment; - $comment->size=45; - $value=new IPoste(); - $value->name='p_value'; - $value->value=$this->p_value; - $value->size=7; - $value->set_attribute('ipopup','ipop_account'); - $value->set_attribute('account','p_value'); - $poste=new IText(); - $poste->setReadOnly(true); - $poste->size=strlen($this->p_code)+1; - $poste->name='p_code'; - $poste->value=$this->p_code; - $r=""; - $r.=''; - $r.=' Code '; - $r.= ''.$poste->input().''; - $r.=''; - $r.=''; - $r.=' Commentaire '; - $r.= ''.$comment->input().''; - $r.=''; - $r.=''; - $r.=' Poste comptable '; - $r.= ''.$value->input(); - $r.=''; - $r.=''; - $r.=Dossier::hidden(); - return $r; - - } - - /*! - ************************************************** - * \brief - * Complete a parm_code object thanks the p_code - * - * \return array - */ - - function load() - { - if ( $this->p_code == -1 ) return "p_code non initialisé"; - $sql='select * from parm_code where p_code=$1 '; - - $Res=$this->db->exec_sql($sql,array($this->p_code)); - - if ( Database::num_row($Res) == 0 ) return 'INCONNU'; - $row= Database::fetch_array($Res,0); - $this->p_value=$row['p_value']; - $this->p_comment=$row['p_comment']; - - } - -} diff --git a/sources/include/class_acc_payment.php b/sources/include/class_acc_payment.php deleted file mode 100644 index 1cb9b60..0000000 --- a/sources/include/class_acc_payment.php +++ /dev/null @@ -1,406 +0,0 @@ - id ( Primary key ) - - mp_lib ==> lib (label) - - mp_jrn_def_id ==> ledger (Number of the ledger where to save) - - mp_fd_id ==> fiche_def (fiche class to use) - - mp_qcode ==> qcode (quick_code of the card) - * - */ -class Acc_Payment -{ - - private static $variable=array("id"=>"mp_id", - "lib"=>"mp_lib", - "qcode"=>"mp_qcode", - "ledger_target"=>"mp_jrn_def_id", - "ledger_source"=>"jrn_def_id", - "fiche_def"=>"mp_fd_id"); - - - private $mp_lib; - private $mp_qcode; - private $mp_jrn_def_if; - private $jrn_def_id; - private $mp_fd_id; - - function __construct ($p_cn,$p_init=0) - { - $this->cn=$p_cn; - $this->mp_id=$p_init; - } - public function get_parameter($p_string) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - return $this->$idx; - } - else - { - throw new Exception("Attribut inexistant $p_string"); - } - } - public function set_parameter($p_string,$p_value) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - $this->$idx=$p_value; - } - else - throw new Exception("Attribut inexistant $p_string"); - - - } - public function get_info() - { - return var_export(self::$variable,true); - } - public function verify() - { - // Verify that the elt we want to add is correct - } - public function save() - { - /* please adapt */ - if ( $this->get_parameter("id") == 0 ) - $this->insert(); - else - $this->update(); - } - - public function insert() - { - if ( $this->verify() != 0 ) return; - $sql='INSERT INTO mod_payment( - mp_lib, mp_jrn_def_id, mp_fd_id, mp_qcode,jrn_def_id) - VALUES ($1, $2, $3, upper($4),$5) returning mp_id'; - $this->mp_id=$this->cn->exec_sql($sql,array( - $this->mp_lib, - $this->mp_jrn_def_id, - $this->mp_fd_id, - $this->mp_qcode, - $this->jrn_def_id)); - } - - public function update() - { - if ( $this->verify() != 0 ) return; - - $sql="update mod_payment set mp_lib=$1,mp_qcode=$2,mp_jrn_def_id=$3,mp_fd_id=$4,jrn_def_id=$5 ". - " where mp_id = $6"; - $res=$this->cn->exec_sql( - $sql, - array($this->mp_lib, - $this->mp_qcode, - $this->mp_jrn_def_id, - $this->mp_fd_id, - $this->jrn_def_id, - $this->mp_id) - ); - if ( strlen (trim($this->mp_jrn_def_id))==0) - $this->cn->exec_sql( - 'update mod_payment '. - 'set mp_jrn_def_id = null where mp_id=$1', - array($this->mp_id)); - if ( strlen (trim($this->jrn_def_id))==0) - $this->cn->exec_sql( - 'update mod_payment '. - 'set mp_jrn_def_id = null where mp_id=$1', - array($this->mp_id)); - if ( strlen (trim($this->mp_qcode))==0) - $this->cn->exec_sql( - 'update mod_payment '. - 'set mp_qcode = null where mp_id=$1', - array($this->mp_id)); - if ( strlen (trim($this->mp_fd_id))==0) - $this->cn->exec_sql( - 'update mod_payment '. - 'set mp_fd_id = null where mp_id=$1', - array($this->mp_id)); - - } - - public function load() - { - $sql='select mp_id,mp_lib,mp_fd_id,mp_jrn_def_id,mp_qcode,jrn_def_id from mod_payment '. - ' where mp_id = $1'; - $res=$this->cn->exec_sql( - $sql, - array($this->mp_id) - ); - - if ( Database::num_row($res) == 0 ) return; - $row=Database::fetch_array($res,0); - foreach ($row as $idx=>$value) - { - $this->$idx=$value; - } - - } - /** - *@brief remove a middle of payment - */ - public function delete() - { - $sql="delete from mod_payment where mp_id=$1"; - $this->cn->exec_sql($sql,array($this->mp_id)); - } - /*!\brief retrieve all the data for all ledgers - *\param non - *\return an array of row - */ - public function get_all() - { - $sql='select mp_id,mp_lib '. - ' from mod_payment order by mp_lib'; - $array=$this->cn->get_array($sql); - $ret=array(); - if ( !empty($array) ) - { - foreach ($array as $row) - { - $t=new Acc_Payment($this->cn,$row['mp_id']); - $t->load(); - $ret[]=$t; - } - } - return $ret; - } - /*!\brief retrieve all the data for a ledger but filter on the - *valid record (jrn and fd not null - *\param non - *\return an array of row - */ - public function get_valide() - { - $sql='select mp_id '. - ' from mod_payment '. - ' where jrn_def_id=$1 and mp_jrn_def_id is not null and '. - ' (mp_fd_id is not null or mp_qcode is not null)'; - $array=$this->cn->get_array($sql,array($this->jrn_def_id)); - $ret=array(); - if ( !empty($array) ) - { - foreach ($array as $row) - { - $t=new Acc_Payment($this->cn,$row['mp_id']); - $t->load(); - $ret[]=$t; - } - } - return $ret; - } - /*!\brief return a string with a form (into a table) - *\param none - *\return a html string - */ - public function form() - { - //label - $lib=new IText('mp_lib'); - $lib->value=$this->mp_lib; - $f_lib=$lib->input(); - - - $ledger_source=new ISelect('jrn_def_id'); - $ledger_source->value=$this->cn->make_array("select jrn_def_id,jrn_Def_name from - jrn_def where jrn_def_type in ('ACH','VEN') order by jrn_def_name"); - $ledger_source->selected=$this->jrn_def_id; - $f_source=$ledger_source->input(); - - // type of card - $tcard=new ISelect('mp_fd_id'); - $tcard->value=$this->cn->make_array('select fd_id,fd_label from fiche_def join fiche_def_ref '. - ' using (frd_id) where frd_id in (25,4) order by fd_label'); - $tcard->selected=$this->mp_fd_id; - - $f_type_fiche=$tcard->input(); - $ledger_record=new ISelect('mp_jrn_def_id'); - $ledger_record->value=$this->cn->make_array("select jrn_def_id,jrn_Def_name from - jrn_def where jrn_def_type in ('ODS','FIN')"); - $ledger_record->selected=$this->mp_jrn_def_id; - $f_ledger_record=$ledger_record->input(); - - // the card - $qcode=new ICard(); - $qcode->noadd=true; - $qcode->name='mp_qcode'; - $list=$this->cn->make_list('select fd_id from fiche_def where frd_id in (25,4)'); - $qcode->typecard=$list; - $qcode->dblclick='fill_ipopcard(this);'; - $qcode->value=$this->mp_qcode; - - $f_qcode=$qcode->input(); - - $msg="Modification de ".$this->mp_lib; - ob_start(); - require_once NOALYSS_INCLUDE.'/template/new_mod_payment.php'; - $r=ob_get_contents(); - ob_end_clean(); - return $r; - - } - /*!\brief show several lines with radio button to select the payment - *method we want to use, the $_POST['e_mp'] will be set - *\param none - *\return html string - */ - public function select() - { - $r=''; - $array=$this->get_valide(); - $r.=HtmlInput::hidden('gDossier',dossier::id()); - - if ( empty($array)==false ) { - $acompte=new INum('acompte'); - $acompte->value=0; - $r.=_(" Acompte à déduire"); - $r.=$acompte->input(); - $r.='

    '; - $e_comm_paiement=new IText('e_comm_paiement'); - $e_comm_paiement->table = 0; - $e_comm_paiement->setReadOnly(false); - $e_comm_paiement->size = 60; - $e_comm_paiement->tabindex = 3; - $r.=_(" Libellé du paiement"); - $r.=$e_comm_paiement->input(); - $r.='

    '; - } - - $r.='
      '; - $r.='
    1. '._('Paiement encodé plus tard'); - if ( empty($array ) == false ) - { - foreach ($array as $row) - { - $f=''; - /* if the qcode is null the propose a search button to select - the card */ - if ( $row->mp_qcode==NULL) - { - $a=new ICard(); - $a->jrn=$row->mp_jrn_def_id; - $a->set_attribute('typecard',$row->mp_fd_id); - $a->name='e_mp_qcode_'.$row->mp_id; - $a->set_dblclick("fill_ipopcard(this);"); - $a->set_callback('filter_card'); - $a->set_function('fill_data'); - $a->set_attribute('ipopup','ipopcard'); - $a->set_attribute('label',$a->name.'_label'); - - $s=new ISpan(); - $s->name=$a->name.'_label'; - $f=_(" paiement par ").$a->input().$s->input(); - } - else - { - /* if the qcode is not null then add a hidden variable with - the qcode */ - - $fiche=new Fiche($this->cn); - $fiche->get_by_qcode($row->mp_qcode); - $f=HtmlInput::hidden('e_mp_qcode_'.$row->mp_id,$row->mp_qcode); - - // $f.=$fiche->strAttribut(ATTR_DEF_NAME); - } - $r.='
    2. '; - $r.=$row->mp_lib.' '.$f; - - } - } - $r.='
    '; - return $r; - } - - /*!\brief convert an array into an Acc_Payment object - *\param array to convert - */ - public function from_array($p_array) - { - $idx=array('mp_id','mp_lib','mp_fd_id','mp_jrn_def_id','mp_qcode','jrn_def_id'); - foreach ($idx as $l) - if (isset($p_array[$l])) $this->$l=$p_array[$l]; - } - /** - *@brief return an html with a form to add a new middle of payment - */ - public function blank() - { - //label - $lib=new IText('mp_lib'); - $f_lib=$lib->input(); - - $ledger_source=new ISelect('jrn_def_id'); - $ledger_source->value=$this->cn->make_array("select jrn_def_id,jrn_Def_name from - jrn_def where jrn_def_type in ('ACH','VEN') order by jrn_def_name"); - $f_source=$ledger_source->input(); - - // type of card - $tcard=new ISelect('mp_fd_id'); - $tcard->value=$this->cn->make_array('select fd_id,fd_label from fiche_def join fiche_def_ref '. - ' using (frd_id) where frd_id in (25,4) order by fd_label'); - $f_type_fiche=$tcard->input(); - $ledger_record=new ISelect('mp_jrn_def_id'); - $ledger_record->value=$this->cn->make_array("select jrn_def_id,jrn_Def_name from - jrn_def where jrn_def_type in ('ODS','FIN')"); - $f_ledger_record=$ledger_record->input(); - - // the card - $qcode=new ICard(); - $qcode->noadd=true; - $qcode->name='mp_qcode'; - $list=$this->cn->make_list('select fd_id from fiche_def where frd_id in (25,4)'); - $qcode->typecard=$list; - $qcode->dblclick='fill_ipopcard(this);'; - - $f_qcode=$qcode->input(); - $msg="Ajout d'un nouveau moyen de paiement"; - ob_start(); - require_once NOALYSS_INCLUDE.'/template/new_mod_payment.php'; - $r=ob_get_contents(); - ob_end_clean(); - return $r; - } - /*!\brief test function - */ - static function test_me() - { - - } - -} - - diff --git a/sources/include/class_acc_reconciliation.php b/sources/include/class_acc_reconciliation.php deleted file mode 100644 index 5127181..0000000 --- a/sources/include/class_acc_reconciliation.php +++ /dev/null @@ -1,532 +0,0 @@ -db=$cn; - $this->jr_id=0; - } - - function set_jr_id($jr_id) - { - $this->jr_id=$jr_id; - } - /*! \brief return a widget of type js_concerned - */ - function widget() - { - $wConcerned=new IConcerned(); - $wConcerned->extra=0; // with 0 javascript search from e_amount... field (see javascript) - - return $wConcerned; - - } - /*! - *\brief Insert into jrn_rapt the concerned operations - * - * \param $jr_id2 (jrn.jr_id) => jrn_rapt.jra_concerned or a string - * like "jr_id2,jr_id3,jr_id4..." - * - * \return none - * - */ - function insert($jr_id2) - { - if ( trim($jr_id2) == "" ) - return; - if ( strpos($jr_id2,',') !== 0 ) - { - $aRapt=explode(',',$jr_id2); - foreach ($aRapt as $rRapt) - { - if ( isNumber($rRapt) == 1 ) - { - $this->insert_rapt($rRapt); - } - } - } - else - if ( isNumber($jr_id2) == 1 ) - { - $this->insert_rapt($jr_id2); - } - } - - /*! - *\brief Insert into jrn_rapt the concerned operations - * should not be called directly, use insert instead - * - * \param $jr_id2 (jrn.jr_id) => jrn_rapt.jra_concerned - * - * \return none - * - */ - function insert_rapt($jr_id2) - { - if ( isNumber($this->jr_id) == 0 || isNumber($jr_id2) == 0 ) - { - return false; - } - if ( $this->jr_id==$jr_id2) - return true; - - if ( $this->db->count_sql("select jr_id from jrn where jr_id=".$this->jr_id)==0 ) - return false; - if ( $this->db->count_sql("select jr_id from jrn where jr_id=".$jr_id2)==0 ) - return false; - - // verify if exists - if ( $this->db->count_sql( - "select jra_id from jrn_rapt where jra_concerned=".$this->jr_id. - " and jr_id=$jr_id2 - union - select jra_id from jrn_rapt where jr_id=".$this->jr_id. - " and jra_concerned=$jr_id2 ") - ==0) - { - // Ok we can insert - $Res=$this->db->exec_sql("insert into jrn_rapt(jr_id,jra_concerned) values ". - "(".$this->jr_id.",$jr_id2)"); - // try to letter automatically same account from both operation - $this->auto_letter($jr_id2); - - // update date of paiement ----------------------------------------------------------------------- - $source_type=$this->db->get_value("select substr(jr_internal,1,1) from jrn where jr_id=$1",array($this->jr_id)); - $dest_type=$this->db->get_value("select substr(jr_internal,1,1) from jrn where jr_id=$1",array($jr_id2)); - if (($source_type =='A' || $source_type=='V') && ($dest_type != 'A' && $dest_type != 'V')) - { - // set the date on source - $date=$this->db->get_value('select jr_date from jrn where jr_id=$1',array($jr_id2)); - if ( trim ($date) == '') $date=null; - $this->db->exec_sql('update jrn set jr_date_paid=$1 where jr_id=$2 and jr_date_paid is null ',array($date,$this->jr_id)); - } - if (($source_type !='A' && $source_type !='V') && ($dest_type == 'A' || $dest_type == 'V')) - { - // set the date on dest - $date=$this->db->get_value('select jr_date from jrn where jr_id=$1',array($this->jr_id)); - if (trim($date) == '') $date=null; - $this->db->exec_sql('update jrn set jr_date_paid=$1 where jr_id=$2 and jr_date_paid is null ',array($date,$jr_id2)); - } - } - return true; - } - /** - * @brief try to letter same card between $p_jrid and $this->jr_id - * @param jrn.jr_id $p_jrid the operation to reconcile - */ - function auto_letter($p_jrid) - { - // Try to find same card from both operation - $sql="select j1.f_id as fiche ,coalesce(j1.j_id,-1) as jrnx_id1,coalesce(j2.j_id,-1) as jrnx_id2, -j1.j_poste as poste - from jrnx as j1 - join jrn as jr1 on (j1.j_grpt=jr1.jr_grpt_id) - join jrnx as j2 on (coalesce(j1.f_id,-1)=coalesce(j2.f_id,-1) and j1.j_poste=j2.j_poste) - join jrn as jr2 on (j2.j_grpt=jr2.jr_grpt_id) - where - jr1.jr_id=$1 - and - jr2.jr_id= $2"; - $result=$this->db->get_array($sql,array($this->jr_id,$p_jrid)); - if ( count($result) == 0) - { - return; - } - for ($i=0;$idb); - $letter->insert_couple($result[$i]['jrnx_id1'],$result[$i]['jrnx_id2']); - } - else - { - $letter = new Lettering_Account($this->db); - $letter->insert_couple($result[$i]['jrnx_id1'],$result[$i]['jrnx_id2']); - } - } - - } - - /*! - *\brief Insert into jrn_rapt the concerned operations - * - * \param $this->jr_id (jrn.jr_id) => jrn_rapt.jr_id - * \param $jr_id2 (jrn.jr_id) => jrn_rapt.jra_concerned - * - * \return none - */ - function remove($jr_id2) - { - if ( isNumber($this->jr_id) == 0 or - isNumber($jr_id2) == 0 ) - { - return; - } - // verify if exists - if ( $this->db->count_sql("select jra_id from jrn_rapt where ". - " jra_concerned=".$this->jr_id." and jr_id=$jr_id2 - union - select jra_id from jrn_rapt where jra_concerned=$jr_id2 ". - " and jr_id=".$this->jr_id) !=0) - { - /** - * remove also lettering between both operation - */ - $sql = " delete from - jnt_letter - where jl_id in ( select jl_id from jnt_letter - join letter_cred as lc using(jl_id) - join letter_deb as ld using (jl_id) - where - lc.j_id in (select j_id - from jrnx join jrn on (j_grpt=jr_grpt_id) - where jr_id in ($1,$2)) - or - ld.j_id in (select j_id - from jrnx join jrn on (j_grpt=jr_grpt_id) - where jr_id in ($1,$2)) - - - - )"; - $this->db->exec_sql($sql, array($jr_id2, $this->jr_id)); - // Ok we can delete - $Res=$this->db->exec_sql("delete from jrn_rapt where ". - "(jra_concerned=$jr_id2 and jr_id=".$this->jr_id.") or - (jra_concerned=".$this->jr_id." and jr_id=$jr_id2) "); - } - } - - /*! - *\brief Return an array of the concerned operation - * - * - *\param database connection - * \return array if something is found or null - */ - function get ( ) - { - $sql=" select jr_id as cn from jrn_rapt where jra_concerned=".$this->jr_id. - " union ". - " select jra_concerned as cn from jrn_rapt where jr_id=".$this->jr_id; - $Res=$this->db->exec_sql($sql); - - // If nothing is found return null - $n=Database::num_row($Res); - - if ($n ==0 ) return null; - - // put everything in an array - for ($i=0;$i<$n;$i++) - { - $l=Database::fetch_array($Res,$i); - $r[$i]=$l['cn']; - } - return $r; - } - function fill_info() - { - $sql="select jr_id,jr_date,jr_comment,jr_internal,jr_montant,jr_pj_number,jr_def_id,jrn_def_name,jrn_def_type - from jrn join jrn_def on (jrn_def_id=jr_def_id) - where jr_id=$1"; - $a=$this->db->get_array($sql,array($this->jr_id)); - return $a[0]; - } - /** - *@brief return array of not-reconciled operation - * Prepare and put in memory the SQL detail_quant - */ - function get_not_reconciled() - { - $filter_date=$this->filter_date(); - /* create ledger filter */ - $sql_jrn=$this->ledger_filter(); - - $array=$this->db->get_array("select distinct jr_id,jr_date from jrn where $filter_date and $sql_jrn and jr_id not in (select jr_id from jrn_rapt union select jra_concerned from jrn_rapt) order by jr_date"); - $ret=array(); - for ($i=0;$ijr_id=$array[$i]['jr_id']; - $ret[$i]['first']=$this->fill_info(); - } - $this->db->prepare('detail_quant','select * from v_quant_detail where jr_id=$1'); - return $ret; - } - /** - *Create a sql condition to filter by security and by asked ledger - * based on $this->a_jrn - *@return a valid sql stmt to include - *@see get_not_reconciled get_reconciled - */ - function ledger_filter () - { - global $g_user; - /* get the available ledgers for current user */ - $sql=$g_user->get_ledger_sql('ALL',3); - $sql=str_replace('jrn_def_id','jr_def_id',$sql); - $r=''; - /* filter by this->r_jrn */ - if ($this->a_jrn != null ) - { - $sep=''; - $r='and jr_def_id in ('; - foreach( $this->a_jrn as $key=>$value) - { - $r.=$sep.$value; - $sep=','; - } - $r.=')'; - } - return $sql.' '.$r; - } - /** - *@brief return array of reconciled operation - * Prepare and put in memory the SQL detail_quant - *@return - *@note - *@see - @code - - @endcode - */ - function get_reconciled() - { - $filter_date=$this->filter_date(); - - - /* create ledger filter */ - $sql_jrn=$this->ledger_filter(); - - $array=$this->db->get_array("select distinct jr_id,jr_date from jrn where $filter_date and $sql_jrn and jr_id in (select jr_id from jrn_rapt union select jra_concerned from jrn_rapt) order by jr_date"); - $ret=array(); - for ($i=0;$ijr_id=$array[$i]['jr_id']; - $ret[$i]['first']=$this->fill_info(); - $atmp=$this->get(); - for ( $e=0;$ejr_id=$atmp[$e]; - $ret[$i]['depend'][$e]=$this->fill_info(); - } - } - $this->db->prepare('detail_quant','select * from v_quant_detail where jr_id=$1'); - return $ret; - } - /** - *@brief - * Prepare and put in memory the SQL detail_quant - *@param - *@return - *@note - *@see - @code - - @endcode - */ - function get_reconciled_amount($p_equal=false) - { - $array=$this->get_reconciled(); - $ret=array(); - bcscale(2); - for ($i=0;$i ... and jr_date < .... - *@note use the data member start_day and end_day - *@see get_reconciled get_not_reconciled - */ - function filter_date() - { - global $g_user; - list($start,$end)=$g_user->get_limit_current_exercice(); - - if (isDate($this->start_day) ==null) - { - $this->start_day=$start; - } - if ( isDate($this->end_day) == null) - { - $this->end_day=$end; - } - $sql=" (jr_date >= to_date('".$this->start_day."','DD.MM.YYYY') - and jr_date <= to_date('".$this->end_day."','DD.MM.YYYY'))"; - return $sql; - - } - function show_detail($p_ret) - { - if (Database::num_row($p_ret)> 0) - { - echo ''; - echo ''; - echo ''; - include 'template/impress_reconciliation_detail.php'; - echo ''; - echo ''; - } - } - /** - * Export to CSV - * @param type $p_choice - * - * @note must be set before calling - * - $this->a_jrn array of ledger - * - $this->start_day start date - * - $this->end_day end date - * @see Acc_Reconciliation::get_data - */ - function export_csv($p_choice) - { - $array = $this->get_data($p_choice); - for ($i = 0; $i < count($array); $i++) - { - // --------------------------------------- - // first index has 2 arrays : first & depend[] - // --------------------------------------- - - $first = $array[$i]['first']; - $a_depend = array(); - if (isset($array[$i]['depend'])) - { - $a_depend = $array[$i]['depend']; - //----- HEADER ---- - if ($i == 0) - { - printf('"n°";"Date";"internal";"libellé";"n° pièce";"nom journal";"type journal";"montant"'); - printf(';"<->";"Date";"internal";"libellé";"n° pièce";"nom journal";"type journal";"montant"' . "\n\r"); - } - } - else - { - //----- HEADER ---- - if ($i == 0) - { - printf('"n°";"Date";"internal";"libellé";"n° pièce";"nom journal";"type journal";"montant"' . "\n\r"); - } - } - // -------------------------- - // Print First - // -------------------------- - printf('%d;"%s";"%s";"%s";"%s";"%s";"%s";%f',$i, $first['jr_date'], $first['jr_internal'], $first['jr_comment'], $first['jr_pj_number'], $first['jrn_def_name'], $first['jrn_def_type'], $first['jr_montant']); - if (count($a_depend) > 0) - { - // -------------------------------------- - // Print first depending operation - // -------------------------------------- - $depend = $a_depend[0]; - printf(';"<->";"%s";"%s";"%s";"%s";"%s";"%s";%f' . "\n\r", $depend['jr_date'], $depend['jr_internal'], $depend['jr_comment'], $depend['jr_pj_number'], $depend['jrn_def_name'], $depend['jrn_def_type'], $depend['jr_montant']); - - // -------------------------------------- - // print other depending operation if any - // -------------------------------------- - for ($e = 1; $e < count($a_depend); $e++) - { - $depend = $a_depend[$e]; - printf(';;;;;;;"<->";'); - printf('"%s";"%s";"%s";"%s";"%s";"%s";%f' . "\n\r", $depend['jr_date'], $depend['jr_internal'], $depend['jr_comment'], $depend['jr_pj_number'], $depend['jrn_def_name'], $depend['jrn_def_type'], $depend['jr_montant']); - } - } - else - { - printf("\n\r"); - } - } - } - - /** - * - * @param type $p_choice - * - 0 : operation reconcilied - * - 1 : reconcilied with different amount - * - 2 : reconcilied with same amount - * - 3 : not reconcilied - * @return $array - */ - function get_data($p_choice) - { - switch ($p_choice) - { - case 0: - $array = $this->get_reconciled(); - break; - case 1: - $array = $this->get_reconciled_amount(false); - break; - case 2: - $array = $this->get_reconciled_amount(true); - break; - case 3: - $array = $this->get_not_reconciled(); - break; - default: - echo "Choix invalid"; - throw new Exception("invalide"); - } - return $array; - } - - static function test_me() - { - $cn=new Database(dossier::id()); - $rap=new Acc_Reconciliation($cn); - var_dump($rap->get_reconciled_amount('',false)); - } - -} diff --git a/sources/include/class_acc_report.php b/sources/include/class_acc_report.php deleted file mode 100644 index b992d01..0000000 --- a/sources/include/class_acc_report.php +++ /dev/null @@ -1,456 +0,0 @@ -db=$p_cn; - $this->id=$p_id; - $this->name='Nouveau'; - $this->aAcc_Report_row=null; - } - /*!\brief Return the report's name - */ - function get_name() - { - $ret=$this->db->exec_sql("select fr_label from formdef where fr_id=".$this->id); - if (Database::num_row($ret) == 0) return $this->name; - $a=Database::fetch_array($ret,0); - $this->name=$a['fr_label']; - return $this->name; - } - /*!\brief return all the row and parse formula - * from a report - * \param $p_start start periode - * \param $p_end end periode - * \param $p_type_date type of the date : periode or calendar - */ - function get_row($p_start,$p_end,$p_type_date) - { - - $Res=$this->db->exec_sql("select fo_id , - fo_fr_id, - fo_pos, - fo_label, - fo_formula, - fr_label from form - inner join formdef on fr_id=fo_fr_id - where fr_id =".$this->id. - "order by fo_pos"); - $Max=Database::num_row($Res); - if ($Max==0) - { - $this->row=0; - return null; - } - $col=array(); - for ($i=0;$i<$Max;$i++) - { - $l_line=Database::fetch_array($Res,$i); - $col[]=Impress::parse_formula($this->db, - $l_line['fo_label'], - $l_line['fo_formula'], - $p_start, - $p_end, - true, - $p_type_date - ); - - } //for ($i - $this->row=$col; - return $col; - } - /*! - * \brief Display a form for encoding a new report or update one - * - * \param $p_line number of line - * - */ - function form($p_line=0) - { - - $r=""; - if ($p_line == 0 ) $p_line=count($this->aAcc_Report_row); - $r.= dossier::hidden(); - $r.= HtmlInput::hidden('line',$p_line); - $r.= HtmlInput::hidden('fr_id',$this->id); - $wForm=new IText(); - $r.="Nom du rapport : "; - $r.=$wForm->input('form_nom',$this->name); - - $r.= ''; - $r.= ""; - $r.= ""; - $r.= ""; - $r.= ""; - - $r.= ''; - $wName=new IText(); - $wName->size=40; - $wPos=new IText(); - $wPos->size=3; - $wForm=new IText(); - $wForm->size=35; - for ( $i =0 ; $i < $p_line;$i++) - { - - $r.= ""; - - $r.= "'; - - - $r.= "'; - - $r.=''; - - - $r.= ""; - } - - $r.= "
    Position Texte Formule
    "; - $wPos->value=( isset($this->aAcc_Report_row[$i]->fo_pos))?$this->aAcc_Report_row[$i]->fo_pos:$i+1; - $r.=$wPos->input("pos".$i); - $r.= '"; - $wName->value=( isset($this->aAcc_Report_row[$i]->fo_label))?$this->aAcc_Report_row[$i]->fo_label:""; - $r.=$wName->input("text".$i); - $r.= ''; - $search=new IPoste("form".$i); - $search->size=50; - $search->value=( isset($this->aAcc_Report_row[$i]->fo_formula))?$this->aAcc_Report_row[$i]->fo_formula:""; - $search->label=_("Recherche poste"); - $search->set_attribute('gDossier',dossier::id()); - $search->set_attribute('bracket',1); - $search->set_attribute('no_overwrite',1); - $search->set_attribute('noquery',1); - $search->set_attribute('account',$search->name); - $search->set_attribute('ipopup','ipop_card'); - - $r.=$search->input(); - $r.='
    "; - $wButton=new IButton(); - $wButton->javascript=" rapport_add_row('".dossier::id()."')"; - $wButton->label="Ajout d'une ligne"; - $r.=$wButton->input(); - return $r; - - } - /*!\brief save into form and form_def - */ - function save() - { - - if ( strlen(trim($this->name)) == 0 ) - return; - if ( $this->id == 0 ) - $this->insert(); - else - $this->update(); - - } - function insert() - { - try - { - $this->db->start(); - $ret_sql=$this->db->exec_sql( - "insert into formdef (fr_label) values($1) returning fr_id", - array($this->name) - ); - $this->id=Database::fetch_result($ret_sql,0,0); - $ix=1; - foreach ( $this->aAcc_Report_row as $row) - { - if ( strlen(trim($row->get_parameter("name"))) != 0 && - strlen(trim($row->get_parameter("formula"))) != 0 ) - { - $ix=($row->get_parameter("position")!="")?$row->get_parameter("position"):$ix; - $row->set_parameter("position",$ix); - $ret_sql=$this->db->exec_sql( - "insert into form (fo_fr_id,fo_pos,fo_label,fo_formula)". - " values($1,$2,$3,$4)", - array($this->id, - $row->fo_pos, - $row->fo_label, - $row->fo_formula) - ); - } - } - - } - catch (Exception $e) - { - $this->db->rollback(); - echo $e->getMessage(); - } - $this->db->commit(); - - } - function update() - { - try - { - $this->db->start(); - $ret_sql=$this->db->exec_sql( - "update formdef set fr_label=$1 where fr_id=$2", - array($this->name,$this->id)); - $ret_sql=$this->db->exec_sql( - "delete from form where fo_fr_id=$1", - array($this->id)); - $ix=0; - - foreach ( $this->aAcc_Report_row as $row) - { - if ( strlen(trim($row->get_parameter("name"))) != 0 && - strlen(trim($row->get_parameter("formula"))) != 0 ) - { - $ix=($row->get_parameter("position")!="")?$row->get_parameter("position"):$ix; - $row->set_parameter("position",$ix); - $ret_sql=$this->db->exec_sql( - "insert into form (fo_fr_id,fo_pos,fo_label,fo_formula)". - " values($1,$2,$3,$4)", - array($this->id, - $row->fo_pos, - $row->fo_label, - $row->fo_formula) - ); - } - } - - - } - catch (Exception $e) - { - $this->db->rollback(); - echo $e->getMessage(); - } - $this->db->commit(); - } - /*!\brief fill a form thanks an array, usually it is $_POST - *\param $p_array keys = fr_id, form_nom,textXX, formXX, posXX where - XX is an number - */ - function from_array($p_array) - { - $this->id=(isset($p_array['fr_id']))?$p_array['fr_id']:0; - $this->name=(isset($p_array['form_nom']))?$p_array['form_nom']:""; - $ix=0; - - $rr=new Acc_Report_Row(); - $rr->set_parameter("form_id",$this->id); - $rr->set_parameter('database',$this->db); - - $this->aAcc_Report_row=$rr->from_array($p_array); - - - } - /*!\brief the fr_id MUST be set before calling - */ - - - function load() - { - $sql=$this->db->exec_sql( - "select fr_label from formdef where fr_id=$1", - array($this->id)); - if ( Database::num_row($sql) == 0 ) return; - $this->name=Database::fetch_result($sql,0,0); - $sql=$this->db->exec_sql( - "select fo_id,fo_pos,fo_label,fo_formula ". - " from form ". - " where fo_fr_id=$1 order by fo_pos", - array($this->id)); - $f=Database::fetch_all($sql); - $array=array(); - if ( ! empty($f) ) - { - foreach ($f as $r) - { - $obj=new Acc_Report_Row(); - $obj->set_parameter("name",$r['fo_label']); - $obj->set_parameter("id",$r['fo_id']); - $obj->set_parameter("position",$r['fo_pos']); - $obj->set_parameter("formula",$r['fo_formula']); - $obj->set_parameter('database',$this->db); - $obj->set_parameter('form_id',$this->id); - $array[]=clone $obj; - } - } - $this->aAcc_Report_row=$array; - - } - function delete() - { - $ret=$this->db->exec_sql( - "delete from formdef where fr_id=$1", - array($this->id) - ); - } - /*!\brief get a list from formdef of all defined form - * - *\return array of object rapport - * - */ - function get_list() - { - $sql="select fr_id,fr_label from formdef order by fr_label"; - $ret=$this->db->exec_sql($sql); - if ( Database::num_row($ret) == 0 ) return array(); - $array=Database::fetch_all($ret); - $obj=array(); - foreach ($array as $row) - { - $tmp=new Acc_Report($this->db); - $tmp->id=$row['fr_id']; - $tmp->name=$row['fr_label']; - $obj[]=clone $tmp; - } - return $obj; - } - /*!\brief To make a SELECT button with the needed value, it is used - *by the SELECT widget - *\return string with html code - */ - function make_array() - { - $sql=$this->db->make_array("select fr_id,fr_label from formdef order by fr_label"); - return $sql; - } - - - /*!\brief write to a file the definition of a report - * \param p_file is the file name (default php://output) - */ - function export_csv($p_file) - { - $this->load(); - - fputcsv($p_file,array($this->name)); - - foreach ($this->aAcc_Report_row as $row) - { - fputcsv($p_file,array($row->get_parameter("name"), - $row->get_parameter('position'), - $row->get_parameter('formula')) - ); - } - - } - /*!\brief upload a definition of a report and insert it into the - * database - */ - function upload() - { - if ( empty ($_FILES) ) return; - if ( strlen(trim($_FILES['report']['tmp_name'])) == 0 ) - { - alert("Nom de fichier est vide"); - return; - } - $file_report=tempnam('tmp','file_report'); - if ( move_uploaded_file($_FILES['report']['tmp_name'],$file_report)) - { - // File is uploaded now we can try to parse it - $file=fopen($file_report,'r'); - $data=fgetcsv($file); - if ( empty($data) ) return; - $this->name=$data[0]; - $array=array(); - while($data=fgetcsv($file)) - { - $obj=new Acc_Report_Row(); - $obj->set_parameter("name",$data[0]); - $obj->set_parameter("id",0); - $obj->set_parameter("position",$data[1]); - $obj->set_parameter("formula",$data[2]); - $obj->set_parameter('database',$this->db); - $obj->set_parameter('form_id',0); - $array[]=clone $obj; - } - $this->aAcc_Report_row=$array; - $this->insert(); - } - } - /** - *@brief check if a report exist - *@param $p_id, optional, if given check the report with this fr_id - *@return return true if the report exist otherwise false - */ - function exist($p_id=0) - { - $c=$this->id; - if ( $p_id != 0 ) $c=$p_id; - $ret=$this->db->exec_sql("select fr_label from formdef where fr_id=$1",array($c)); - if (Database::num_row($ret) == 0) return false; - return true; - } - static function test_me() - { - $cn=new Database(dossier::id()); - $a=new Acc_Report($cn); - print_r($a->get_list()); - $array=array("text0"=>"test1", - "form0"=>"7%", - "text1"=>"test2", - "form1"=>"6%", - "fr_id"=>110, - "form_nom"=>"Tableau" - ); - $a->from_array($array); - print_r($a); - echo '
    '; - echo $a->form(10); - - echo HtmlInput::submit('update','Enregistre'); - /* Add a line should be a javascript see comptanalytic */ - // $r.= ''; - echo HtmlInput::submit('del_form','Efface ce rapport'); - echo HtmlInput::hidden('test_select',$_REQUEST['test_select']); - echo "
    "; - if ( isset ($_POST['update'])) - { - $b=new Acc_Report($cn); - $b->from_array($_POST); - echo '
    '; - print_r($b); - } - } -} - -?> diff --git a/sources/include/class_acc_report_row.php b/sources/include/class_acc_report_row.php deleted file mode 100644 index 1f4a377..0000000 --- a/sources/include/class_acc_report_row.php +++ /dev/null @@ -1,122 +0,0 @@ -"fo_label", - "formula"=>"fo_formula", - "id"=>"fo_id", - "position"=>"fo_pos", - "form_id"=>"fo_fr_id", - "database"=>"db" - ); - function __construct ($p_name=null,$p_formula=null) - { - $this->set_parameter("id",0); - - $this->set_parameter("name",$p_name); - $this->set_parameter("formula",$p_formula); - } - public function get_parameter($p_string) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - return $this->$idx; - } - else - throw new Exception("Attribut inexistant $p_string"); - } - public function set_parameter($p_string,$p_value) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - $this->$idx=$p_value; - } - else - throw new Exception("Attribut inexistant $p_string"); - - - } - public function get_info() - { - return var_export(self::$variable,true); - } - /*!\brief Convert an array into an array of row_rapport object - * the fo_id is 0, position = 0, the fo_frd_id (form_id) is - * the one of the current object, the db is also the current one - *\param $p_array contains the value - *\return an array of Acc_Report_Row object - */ - public function from_array($p_array) - { - extract ($p_array); - $ret=array(); - $ix=0; - $found=0; - foreach ( $p_array as $r) - { - - if ( isset(${'form'.$ix}) && isset ( ${'text'.$ix} )) - { - $obj=new Acc_Report_Row( ${'text'.$ix},${'form'.$ix}); - - if ( isset(${'pos'.$ix}) && isNumber(${'pos'.$ix})==1 ) - $obj->set_parameter("position",${'pos'.$ix}); - else - { - $obj->set_parameter("position",$found); - $found++; - } - - $obj->fo_id=0; - $obj->fo_fr_id=$this->fo_fr_id; - $obj->db=$this->db; - - $ret[]=clone $obj; - } - $ix++; - - } - return $ret; - } - static function test_me() - { - $cn=new Database(dossier::id()); - $a=new Acc_Report_Row(); - $array=array("text0"=>"test1", - "form0"=>"7%", - "text1"=>"test2", - "form1"=>"6%" - ); - $a->db=$cn; - $b=$a->from_array($array); - print_r($b); - echo $a->get_info(); - } -} diff --git a/sources/include/class_acc_tva.php b/sources/include/class_acc_tva.php deleted file mode 100644 index 7ce28ea..0000000 --- a/sources/include/class_acc_tva.php +++ /dev/null @@ -1,202 +0,0 @@ -"tva_id", - "label"=>"tva_label", - "rate"=>"tva_rate", - "comment"=>"tva_comment", - "account"=>"tva_poste"); - -*/ -class Acc_Tva -{ - private $cn; /*!< $cn database connection */ - private static $variable=array("id"=>"tva_id", - "label"=>"tva_label", - "rate"=>"tva_rate", - "comment"=>"tva_comment", - "account"=>"tva_poste", - "both_side"=>'tva_both_side'); - - function __construct ($p_init,$p_tva_id=0) - { - $this->cn=$p_init; - $this->tva_id=$p_tva_id; - $this->poste=""; - } - public function get_parameter($p_string) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - return $this->$idx; - } - - echo (__FILE__.":".__LINE__.'Erreur attribut inexistant'); - } - public function set_parameter($p_string,$p_value) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - $this->$idx=$p_value; - } - else - throw new Exception("Attribut inexistant $p_string"); - - - } - public function get_info() - { - return var_export(self::$variable,true); - } - - public function verify() - { - // Verify that the elt we want to add is correct - } - public function save() - { - - if ( $this->tva_id == 0 ) - $this->insert(); - else - $this->update(); - } - - public function insert() - { - if ( $this->verify() != 0 ) return; - $sql="select tva_insert($1,$2,$3,$4,$5)"; - - $res=$this->cn->exec_sql( - $sql, - array($this->tva_label, - $this->tva_rate, - $this->tva_comment, - $this->tva_poste, - $this->tva_both_side) - ); - $this->tva_id=$this->cn->get_current_seq('s_tva'); - $err=Database::fetch_result($res); - } - - public function update() - { - if ( $this->verify() != 0 ) return; - $sql="update tva_rate set tva_label=$1,tva_rate=$2,tva_comment=$3,tva_poste=$4,tva_both_side=$5 ". - " where tva_id = $6"; - $res=$this->cn->exec_sql( - $sql, - array($this->tva_label, - $this->tva_rate, - $this->tva_comment, - $this->tva_poste, - $this->tva_both_side, - $this->tva_id) - ); - - } - /** - *Load the VAT, - *@note if the label is not found then we get an message error, so the best is probably - *to initialize the VAT object with default value - */ - public function load() - { - $sql="select tva_id,tva_label,tva_rate, tva_comment,tva_poste,tva_both_side from tva_rate where tva_id=$1"; - $res=$this->cn->exec_sql( - $sql, - array($this->tva_id) - ); - - if ( $this->cn->size() == 0 ) return -1; - - $row=Database::fetch_array($res,0); - foreach ($row as $idx=>$value) - { - $this->$idx=$value; - } - return 0; - } - /*!\brief get the account of the side (debit or credit) - *\param $p_side is d or C - *\return the account to use - *\note call first load if tva_poste is empty - */ - public function get_side($p_side) - { - if ( strlen($this->tva_poste) == 0 ) $this->load(); - list($deb,$cred)=explode(",",$this->tva_poste); - switch ($p_side) - { - case 'd': - return $deb; - break; - case 'c': - return $cred; - break; - default: - throw (new Exception (__FILE__.':'.__LINE__." param est d ou c, on a recu [ $p_side ]")); - } - } - public function delete() - { - $sql="delete from tva_rate where tva_id=$1"; - $res=$this->cn->exec_sql($sql,array($this->tva_id)); - } - /*!\brief - * Test function - */ - static function test_me() - { - $cn=new Database(dossier::id()); - $a=new Acc_Tva($cn); - echo $a->get_info(); - $a->set_parameter("id",1); - $a->load(); - $a->set_parameter("id",0); - $a->set_parameter("rate","0.2222"); - $a->set_parameter("label","test"); - $a->save(); - $a->load(); - print_r($a); - - $a->set_parameter("comment","un cht'it test"); - $a->save(); - $a->load(); - print_r($a); - - $a->delete(); - } - -} - -/* test::test_me(); */ diff --git a/sources/include/class_admin.php b/sources/include/class_admin.php deleted file mode 100644 index 0b0835f..0000000 --- a/sources/include/class_admin.php +++ /dev/null @@ -1,58 +0,0 @@ -fiche_def_ref=FICHE_TYPE_ADM_TAX; - parent::__construct($p_cn,$p_id) ; - } - - - -} - -?> diff --git a/sources/include/class_anc_acc_link.php b/sources/include/class_anc_acc_link.php deleted file mode 100644 index fa802ff..0000000 --- a/sources/include/class_anc_acc_link.php +++ /dev/null @@ -1,61 +0,0 @@ -cn=$p_cn; - } - - /** - *@brief get the parameters - */ - function get_request() - { - parent::get_request(); - $this->card_poste=HtmlInput::default_value('card_poste',1,$_GET); - } - function set_sql_filter() - { - $sql=""; - $and=" and "; - if ( $this->from != "" ) - { - $sql.="$and oa_date >= to_date('".$this->from."','DD.MM.YYYY')"; - } - if ( $this->to != "" ) - { - $sql.=" $and oa_date <= to_date('".$this->to."','DD.MM.YYYY')"; - } - - return $sql; - - } - - -} - diff --git a/sources/include/class_anc_acc_list.php b/sources/include/class_anc_acc_list.php deleted file mode 100644 index 3b7c6a0..0000000 --- a/sources/include/class_anc_acc_list.php +++ /dev/null @@ -1,545 +0,0 @@ -value=array( - array('value'=>1,'label'=>'Par fiche /Activité'), - array('value'=>2,'label'=>'Par poste comptable/Activité'), - array('value'=>3,'label'=>'Par activité/Fiche'), - array('value'=>4,'label'=>'Par activité/Poste Comptable') - - ); - - $icard->selected=$this->card_poste; - $r.=$icard->input(); - $r.=HtmlInput::request_to_hidden(array('ac')); - return $r; - } - /** - * load the data - * does not return anything but give a value to this->aheader and this->arow - */ - function load_anc_account() - { - $date=$this->set_sql_filter(); - $date=($date != '')?" $date":''; - $sql_from_poste=($this->from_poste!='')?" and po.po_name >= upper('".Database::escape_string($this->from_poste)."')":''; - $sql_to_poste=($this->to_poste!='')?" and po.po_name <= upper('".Database::escape_string($this->to_poste)."')":''; - $this->arow=$this->db->get_array(" - SELECT po.po_id, po.pa_id, po.po_name, po.po_description, sum( - CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount - END) AS sum_amount, jrnx.j_poste, tmp_pcmn.pcm_lib AS name - FROM operation_analytique - JOIN poste_analytique po USING (po_id) - JOIN jrnx USING (j_id) - JOIN tmp_pcmn ON jrnx.j_poste::text = tmp_pcmn.pcm_val::text ". -" where - pa_id=$1 ".$date.$sql_from_poste.$sql_to_poste." - - GROUP BY po.po_id, po.po_name, po.pa_id, jrnx.j_poste, tmp_pcmn.pcm_lib, po.po_description - HAVING sum( -CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount -END) <> 0::numeric order by po_id,j_poste",array($this->pa_id)); - - } - /** - * load the data - * does not return anything but give a value to this->aheader and this->arow - */ - function load_anc_card() - { - $date=$this->set_sql_filter(); - $date=($date != '')?" $date":''; - $sql_from_poste=($this->from_poste!='')?" and po.po_name >= upper('".Database::escape_string($this->from_poste)."')":''; - $sql_to_poste=($this->to_poste!='')?" and po.po_name <= upper('".Database::escape_string($this->to_poste)."')":''; - $this->arow=$this->db->get_array(" SELECT po.po_id, po.pa_id, po.po_name, po.po_description, sum( - CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount - END) AS sum_amount, jrnx.f_id, jrnx.j_qcode, ( SELECT fiche_detail.ad_value - FROM fiche_detail - WHERE fiche_detail.ad_id = 1 AND fiche_detail.f_id = jrnx.f_id) AS name - FROM operation_analytique - JOIN poste_analytique po USING (po_id) - JOIN jrnx USING (j_id) ". - " where pa_id=$1 ".$date.$sql_from_poste.$sql_to_poste - ." - GROUP BY po.po_id, po.po_name, po.pa_id, jrnx.f_id, jrnx.j_qcode, ( SELECT fiche_detail.ad_value - FROM fiche_detail - WHERE fiche_detail.ad_id = 1 AND fiche_detail.f_id = jrnx.f_id), po.po_description - HAVING sum( -CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount -END) <> 0::numeric order by po_name,name",array($this->pa_id)); - - } - - /** - * load the data - * does not return anything but give a value to this->aheader and this->arow - */ - function load_poste() - { - $date=$this->set_sql_filter(); - $date=($date != '')?" $date":''; - $sql_from_poste=($this->from_poste!='')?" and po.po_name >= upper('".Database::escape_string($this->from_poste)."')":''; - $sql_to_poste=($this->to_poste!='')?" and po.po_name <= upper('".Database::escape_string($this->to_poste)."')":''; - $this->arow=$this->db->get_array("SELECT po.po_id, po.pa_id, po.po_name, po.po_description, sum( - CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount - END) AS sum_amount, jrnx.j_poste, tmp_pcmn.pcm_lib AS name - FROM operation_analytique - JOIN poste_analytique po USING (po_id) - JOIN jrnx USING (j_id) - JOIN tmp_pcmn ON jrnx.j_poste::text = tmp_pcmn.pcm_val::text ". -" where - pa_id=$1 ".$date.$sql_from_poste.$sql_to_poste." - - GROUP BY po.po_id, po.po_name, po.pa_id, jrnx.j_poste, tmp_pcmn.pcm_lib, po.po_description - HAVING sum( -CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount -END) <> 0::numeric order by j_poste,po_name",array($this->pa_id)); - - } - - /** - * load the data - * does not return anything but give a value to this->aheader and this->arow - */ - function load_card() - { - $date=$this->set_sql_filter(); - $date=($date != '')?" $date":''; - $sql_from_poste=($this->from_poste!='')?" and po.po_name >= upper('".Database::escape_string($this->from_poste)."')":''; - $sql_to_poste=($this->to_poste!='')?" and po.po_name <= upper('".Database::escape_string($this->to_poste)."')":''; - - $this->arow=$this->db->get_array(" SELECT po.po_id, po.pa_id, po.po_name, po.po_description, sum( - CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount - END) AS sum_amount, jrnx.f_id, jrnx.j_qcode, ( SELECT fiche_detail.ad_value - FROM fiche_detail - WHERE fiche_detail.ad_id = 1 AND fiche_detail.f_id = jrnx.f_id) AS name - FROM operation_analytique - JOIN poste_analytique po USING (po_id) - JOIN jrnx USING (j_id) ". - " where pa_id=$1 ".$date.$sql_from_poste.$sql_to_poste - ." - GROUP BY po.po_id, po.po_name, po.pa_id, jrnx.f_id, jrnx.j_qcode, ( SELECT fiche_detail.ad_value - FROM fiche_detail - WHERE fiche_detail.ad_id = 1 AND fiche_detail.f_id = jrnx.f_id), po.po_description - HAVING sum( -CASE - WHEN operation_analytique.oa_debit = true THEN operation_analytique.oa_amount * (-1)::numeric - ELSE operation_analytique.oa_amount -END) <> 0::numeric order by name,po_name",array($this->pa_id)); - } - /** - *@brief display the button export CSV - *@param $p_hidden is a string containing hidden items - *@return html string - */ - function show_button($p_hidden="") - { - $r=""; - $r.= '
    '; - $r.= HtmlInput::hidden("act","CSV:AncAccList"); - $r.= HtmlInput::hidden("to",$this->to); - $r.= HtmlInput::hidden("from",$this->from); - $r.= HtmlInput::hidden("pa_id",$this->pa_id); - $r.= HtmlInput::hidden("from_poste",$this->from_poste); - $r.= HtmlInput::hidden("to_poste",$this->to_poste); - $r.= HtmlInput::hidden("card_poste",$this->card_poste); - - $r.= $p_hidden; - $r.= dossier::hidden(); - $r.=HtmlInput::submit('bt_csv',"Export en CSV"); - $r.= '
    '; - return $r; - } - function display_html() - { - bcscale(2); - if ( $this->check() != 0) - { - alert('Désolé mais une des dates données n\'est pas valide'); - return; - } - //--------------------------------------------------------------------------- - // Card - Acc - //--------------------------------------------------------------------------- - - if ( $this->card_poste=='1') - { - $this->load_card(); - - /* - * Show all the result - */ - $tot_card=0;$prev=''; - echo ''; - $tot_glob=0; - for ($i=0;$iarow);$i++) - { - if ( $i == 0 ) - { - $prev=$this->arow[$i]['f_id']; - echo ''; - } - $style= ( $i % 2 == 0)?' class="odd" ':' class="even" '; - if ( $i != 0 && $prev != $this->arow[$i]['f_id']) - { - echo td('Total'); - echo td(nbm($tot_card),' class="num"'); - echo ''; - echo ''; - $tot_card=0; - $prev = $this->arow[$i]['f_id']; - } - - echo ''; - $amount=$this->arow[$i]['sum_amount']; - if ($amount==null)$amount=0; - - $tot_card=bcadd($tot_card,$amount); - $tot_glob=bcadd($tot_glob,$amount); - echo td($this->arow[$i]['po_name']." ". - $this->arow[$i]['po_description'],'style="padding-left:10"'); - echo td(nbm($amount),' class="num" '); - echo ''; - - } - echo ''; - echo td('Total'); - echo td(nbm($tot_card),' class="num"'); - echo ''; - - echo '
    '.HtmlInput::history_card ($this->arow[$i]['f_id'],$this->arow[$i]['j_qcode'].' '.$this->arow[$i]['name'],' display:inline').'
    '.HtmlInput::history_card($this->arow[$i]['f_id'],$this->arow[$i]['j_qcode'].' '.$this->arow[$i]['name'],' display:inline ').'
    '; - echo '

    Résultat global '.nbm($tot_glob).'

    '; - } - //--------------------------------------------------------------------------- - // Accountancy - Analytic - //--------------------------------------------------------------------------- - - if ( $this->card_poste=='2') - { - $this->load_poste(); - /* - * Show all the result - */ - $tot_card=0;$prev=''; - echo ''; - $tot_glob=0; - for ($i=0;$iarow);$i++) - { - if ( $i == 0 ) - { - $prev=$this->arow[$i]['j_poste']; - echo ''; - } - $style= ( $i % 2 == 0)?' class="odd" ':' class="even" '; - if ( $i != 0 && $prev != $this->arow[$i]['j_poste']) - { - echo td('Total'); - echo td(nbm($tot_card),' class="num"'); - echo ''; - echo ''; - $tot_card=0; - $prev = $this->arow[$i]['j_poste']; - } - - echo ''; - $amount=$this->arow[$i]['sum_amount']; - if ($amount==null)$amount=0; - - $tot_card=bcadd($tot_card,$amount); - $tot_glob=bcadd($tot_glob,$amount); - - - echo td($this->arow[$i]['po_name']." ". - $this->arow[$i]['po_description'],'style="padding-left:10"'); - echo td(nbm($amount),' class="num" '); - echo ''; - - } - echo ''; - echo td('Total'); - echo td(nbm($tot_card),' class="num"'); - echo ''; - - echo '
    '.HtmlInput::history_account ($this->arow[$i]['j_poste'],$this->arow[$i]['j_poste'].' '.$this->arow[$i]['name'],' display:inline').'
    '.HtmlInput::history_account($this->arow[$i]['j_poste'],$this->arow[$i]['j_poste'].' '.$this->arow[$i]['name'],' display:inline ').'
    '; - echo td(nbm($tot_card),' class="num"'); - } - //--------------------------------------------------------------------------- - // Acc after card - //--------------------------------------------------------------------------- - if ( $this->card_poste=='3') - { - $this->load_anc_card(); - /* - * Show all the result - */ - $tot_card=0;$prev=''; - echo ''; - $tot_glob=0; - for ($i=0;$iarow);$i++) - { - if ( $i == 0 ) - { - $prev=$this->arow[$i]['po_id']; - echo ''; - - } - $style= ( $i % 2 == 0)?' class="odd" ':' class="even" '; - if ( $i != 0 && $prev != $this->arow[$i]['po_id']) - { - echo td('Total'); - echo td(nbm($tot_card),' class="num"'); - echo ''; - echo ''; - - $tot_card=0; - $prev = $this->arow[$i]['po_id']; - } - - echo ''; - $amount=$this->arow[$i]['sum_amount']; - if ($amount==null)$amount=0; - - $tot_card=bcadd($tot_card,$amount); - $tot_glob=bcadd($tot_glob,$amount); - echo ''; - - echo td(nbm($amount),' class="num" '); - echo ''; - - } - echo ''; - echo td('Total'); - echo td(nbm($tot_card),' class="num"'); - echo ''; - - echo '
    '.$this->arow[$i]['po_name']." ".$this->arow[$i]['po_description'].'
    '.$this->arow[$i]['po_name']." ".$this->arow[$i]['po_description'].'
    '.HtmlInput::history_card ($this->arow[$i]['f_id'],$this->arow[$i]['j_qcode'].' '.$this->arow[$i]['name'],' display:inline').'
    '; - echo td(nbm($tot_card),' class="num"'); - } - //--------------------------------------------------------------------------- - // Analytic - Accountancy - //--------------------------------------------------------------------------- - - - if ( $this->card_poste=='4') - { - $this->load_anc_account(); - - /* - * Show all the result - */ - $tot_card=0;$prev=''; - echo ''; - $tot_glob=0; - for ($i=0;$iarow);$i++) - { - if ( $i == 0 ) - { - $prev=$this->arow[$i]['po_id']; - echo ''; - } - $style= ( $i % 2 == 0)?' class="odd" ':' class="even" '; - if ( $i != 0 && $prev != $this->arow[$i]['po_id']) - { - echo td('Total'); - echo td(nbm($tot_card),' class="num"'); - echo ''; - - $tot_card=0; - $prev = $this->arow[$i]['po_id']; - echo ''; - - } - - echo ''; - $amount=$this->arow[$i]['sum_amount']; - if ($amount==null)$amount=0; - - $tot_card=bcadd($tot_card,$amount); - $tot_glob=bcadd($tot_glob,$amount); - echo ''; - echo td(nbm($amount),' class="num" '); - echo ''; - - } - echo ''; - echo td('Total'); - echo td(nbm($tot_card),' class="num"'); - echo ''; - - echo '
    '.$this->arow[$i]['po_name']." ".$this->arow[$i]['po_description'].'
    '.$this->arow[$i]['po_name']." ".$this->arow[$i]['po_description'].'
    '.HtmlInput::history_account ($this->arow[$i]['j_poste'],$this->arow[$i]['j_poste'].' '.$this->arow[$i]['name'],' display:inline').'
    '; - echo '

    Résultat global '.nbm($tot_glob).'

    '; - } - - } - function export_csv() - { - bcscale(2); - if ( $this->check () != 0 ) {throw new Exception (_("date invalide"));} - //--------------------------------------------------------------------------- - // Card - Acc - //--------------------------------------------------------------------------- - - if ( $this->card_poste=='1') - { - $this->load_card(); - - /* - * Show all the result - */ - $prev=''; - - - for ($i=0;$iarow);$i++) - { - printf('"%s";" %s"', $this->arow[$i]['j_qcode'],$this->arow[$i]['name']); - - $amount=$this->arow[$i]['sum_amount']; - if ($amount==null)$amount=0; - - printf(';"%s";" %s";', - $this->arow[$i]['po_name'], - $this->arow[$i]['po_description']); - printf("%s",nb($amount)); - printf("\r\n"); - } - } - //--------------------------------------------------------------------------- - // Accountancy - Analytic - //--------------------------------------------------------------------------- - - if ( $this->card_poste=='2') - { - $this->load_poste(); - /* - * Show all the result - */ - for ($i=0;$iarow);$i++) - { - printf('"%s";" %s"', $this->arow[$i]['j_poste'],$this->arow[$i]['name']); - - $amount=$this->arow[$i]['sum_amount']; - if ($amount==null)$amount=0; - - printf(';"%s";" %s";', - $this->arow[$i]['po_name'], - $this->arow[$i]['po_description']); - printf("%s",nb($amount)); - printf("\r\n"); - - - } - - } - //--------------------------------------------------------------------------- - // Acc after card - //--------------------------------------------------------------------------- - if ( $this->card_poste=='3') - { - $this->load_anc_card(); - /* - * Show all the result - */ - for ($i=0;$iarow);$i++) - { - printf('"%s";" %s";', $this->arow[$i]['po_name'],$this->arow[$i]['po_description']); - - $amount=$this->arow[$i]['sum_amount']; - if ($amount==null)$amount=0; - - printf('"%s";"%s";', - $this->arow[$i]['j_qcode'], - $this->arow[$i]['name']); - printf("%s",nb($amount)); - printf("\r\n"); - - - } - } - //--------------------------------------------------------------------------- - // Analytic - Accountancy - //--------------------------------------------------------------------------- - - - if ( $this->card_poste=='4') - { - $this->load_anc_account(); - - /* - * Show all the result - */ - for ($i=0;$iarow);$i++) - { - printf('"%s";"%s";', $this->arow[$i]['po_name'],$this->arow[$i]['po_description']); - - $amount=$this->arow[$i]['sum_amount']; - if ($amount==null)$amount=0; - - printf('"%s";"%s";', - $this->arow[$i]['j_poste'], - $this->arow[$i]['name']); - printf("%s",nb($amount)); - printf("\r\n"); - - - } - } - - - - - } - -} \ No newline at end of file diff --git a/sources/include/class_anc_account.php b/sources/include/class_anc_account.php deleted file mode 100644 index 1d9da5f..0000000 --- a/sources/include/class_anc_account.php +++ /dev/null @@ -1,349 +0,0 @@ -db=$p_db; - $this->id=$p_id; - $this->ga_id=null; - } - /*! \brief retrieve data from the database and - * fill the object - * \param $p_where the where clause - */ - private function fetch_from_db($p_where) - { - $sql="select po_id, - po_name , - pa_id, - po_amount, - po_description, - ga_id - from poste_analytique - where ". - $p_where; - - $ret=$this->db->exec_sql($sql); - if ( Database::num_row($ret) == 0 )return null; - $line=Database::fetch_array($ret); - - $this->id=$line['po_id']; - $this->name=$line['po_name']; - $this->pa_id=$line['pa_id']; - $this->amount=$line['po_amount']; - $this->description=$line['po_description']; - $this->ga_id=$line['ga_id']; - - - } - function get_by_id() - { - $this->fetch_from_db("po_id=".$this->id); - } - /*! - * \brief retrieve data thanks the name - * \param $p_name name of the analytic account - * - */ - function get_by_name($p_name) - { - $p_name=sql_string($p_name); - if ( $p_name == null ) - $p_name=$this->name; - - $this->fetch_from_db("po_name='".$p_name."'"); - echo "id = ".$this->id; - } - function add() - { - $this->format_data(); - if ( strlen($this->name) == 0) - return; - if ( $this->ga_id == null || strlen(trim($this->ga_id)) == 0 ) - $ga_id=NULL; - else - $ga_id=$this->ga_id; - $sql="insert into poste_analytique ( - po_name , - pa_id, - po_amount, - po_description, - ga_id - ) values ($1,$2,$3,$4,$5)"; - - try - { - $this->db->exec_sql($sql,array($this->name,$this->pa_id,$this->amount,$this->description,$ga_id)); - - } - catch (Exception $e) - { - if ( DEBUG ) print_r($e); - echo "

    Doublon : l'enregistrement n'est pas sauve

    "; - } - - } - static function make_array_name($cn,$pa_id) - { - $a=$cn->make_array("select po_name,po_name from poste_analytique ". - " where ". - " pa_id = $1 order by po_name ",0,array($pa_id)); - return $a; - } - function update() - { - $this->format_data(); - if ( strlen($this->name) == 0) - return; - $sql="update poste_analytique ". - " set po_name=$1". - " ,pa_id=$2". - " ,po_amount=$3". - " ,po_description=$4". - " ,ga_id=$5". - " where po_id=$6"; - try - { - $this->db->exec_sql($sql,array($this->name,$this->pa_id,$this->amount, - $this->description,$this->ga_id,$this->id)); - } - catch (Exception $e) - { - echo "

    Doublon : l'enregistrement n'est pas sauve

    "; - } - - } - private function format_data() - { - - $this->name=$this->name; - $this->pa_id=$this->pa_id; - $this->amount=$this->amount; - if (strlen($this->amount) == 0 ) - $this->amount=0.0; - if ( isNumber($this->amount) ==0 ) - $this->amount=0; - - $this->description=$this->description; - } - function delete() - { - $sql="delete from poste_analytique where po_id=".$this->id; - $this->db->exec_sql($sql); - } - /*! - * \brief return an array of object Poste_Analytique - * - */ - function get_list() - { - $sql="select po_id, - po_name , - pa_id, - po_amount, - po_description, - ga_id - from poste_analytique ". - " order by po_name"; - - $ex=$this->db->exec_sql($sql); - $ret=Database::fetch_all($ex); - if ( $ret == null ) - return null; - - $array=array(); - foreach ($ret as $line) - { - $object=new Anc_Account($this->db); - - $object->id=$line['po_id']; - $object->name=$line['po_name']; - $object->pa_id=$line['pa_id']; - $object->amount=$line['po_amount']; - $object->description=$line['po_description']; - $object->ga_id=$line['ga_id']; - $array[]=clone $object; - } - - return $array; - } - function display_list() - { - $array=$this->get_list(); - if ( empty($array) ) - { - echo "Vide"; - return; - } - foreach ($array as $line) - { - echo $line->id." / ".$line->name." / ".$line->description."/". - $line->amount." / ".$line->pa_id."/".$line->ga_id."
    "; - } - } - function debug() - { - echo "id ".$this->id."
    "; - echo "name ".$this->name."
    "; - echo "pa_id ".$this->pa_id."
    "; - echo "amount ".$this->amount."
    "; - echo "description ".$this->description."
    "; - echo "ga_id ".$this->ga_id."
    "; - } - function form() - { - $r=''; - $wName=new IText("po_name",$this->name); - $wAmount=new INum("po_amount",$this->amount); - $wDescription=new IText("po_description",$this->description); - $aGroup_analytic=$this->db->make_array("select ga_id,ga_id from groupe_analytique where pa_id=".$this->pa_id,1); - if ( count($aGroup_analytic) > 1 ) - { - $wGa_id=new ISelect("ga_id"); - $wGa_id->value=$aGroup_analytic; - $wGa_id->selected=$this->ga_id; - $wGa_id->table=1; - } - else - { - $wGa_id=new ISpan(); - } - $pa=new Anc_Plan($this->db,$this->pa_id); - $pa->get(); - $wPaName=new IText("",$pa->name); - $wPaName->table=1; - $wPaName->readOnly=true; - - $wName->table=1; - $wAmount->table=1; - $wDescription->table=1; - $r.=HtmlInput::hidden("pa_id",$this->pa_id); - $r.=HtmlInput::hidden("po_id",$this->id); - - $r.=""; - - $r.=""; - $r.=td(_('Nom')); - $r.=$wName->input(); - $r.=""; - - $r.=""; - $r.=td(_('Montant')); - $r.=$wAmount->input(); - $r.=""; - - - $r.=""; - $r.=td(_('Description')); - $r.=$wDescription->input(); - $r.=""; - - $r.=""; - $r.=td(_('Plan Analytique')); - $r.=$wPaName->input(); - $r.=""; - - $r.=""; - $r.=td(_('Groupe')); - $r.=$wGa_id->input(); - $r.=""; - - $r.="
    "; - return $r; - - } - function get_from_array($p_array) - { - $this->name=(isset ($p_array['po_name']))?$p_array['po_name']:""; - $this->description=(isset ($p_array['po_description']))?$p_array['po_description']:""; - $this->pa_id=(isset ($p_array['pa_id']))?$p_array['pa_id']:""; - $this->amount=(isset ($p_array['po_amount']))?$p_array['po_amount']:0; - $this->id=(isset ($p_array['po_id']))?$p_array['po_id']:-1; - // $this->ga_id=(isset($p_array['ga_id']) && $p_array['ga_id'] == "-1" )?null:2; - $this->ga_id=(isset($p_array['ga_id']) && $p_array['ga_id'] != "-1" )?$p_array['ga_id']:null; - } - static function test_me() - { - $cn=new Database(dossier::id()); - $pa_id=$cn->get_value("select max(pa_id) from plan_analytique"); - $o=new Anc_Account($cn); - echo "

    Poste_Analytique

    "; - echo "

    get_list

    "; - $ee=$o->get_list(); - print_r($ee); - //var_dump($ee); - - echo "

    Add some

    "; - $o->pa_id=$pa_id; - $o->name="test1"; - $o->add(); - - - $o->name="test2"; - $o->add(); - - $o->name="test3"; - $o->add(); - - $o->name="test4"; - $o->add(); - - $o->name="test5"; - $o->add(); - - echo "

    remove test1

    "; - $o->get_by_name("test1"); - $o->delete(); - $o->display_list(); - - $o->get_by_name("test4"); - echo "
    ".$o->id."
    "; - $o->name="Test Four"; - $o->update(); - $o->display_list(); - $o->delete(); - $o->display_list(); - } -} -?> diff --git a/sources/include/class_anc_balance_double.php b/sources/include/class_anc_balance_double.php deleted file mode 100644 index 5574903..0000000 --- a/sources/include/class_anc_balance_double.php +++ /dev/null @@ -1,579 +0,0 @@ -load(); - $odd=0; - if ( is_array($array) == false ) - { - return $array; - - } - $old=""; - $tot_deb=0; - $tot_cred=0; - - foreach ( $array as $row) - { - $odd++; - - $r.=($odd%2==0)?'':''; - - if ( $old == $row['a_po_name'] ) - { - $r.=''; - } - else - { - - if ( $tot_deb != 0 || $tot_cred !=0 ) - { - $r.="".td(''); - $r.="Total ".td(nbm($tot_deb),' class="num"').td(nbm($tot_cred),' class="num"'); - $s=abs($tot_deb-$tot_cred); - $d=($tot_deb>$tot_cred)?'debit':'credit'; - $r.="".nbm($s)."$d"; - $r.=""; - } - $tot_deb=0; - $tot_cred=0; - - // new - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $r.=''; - $r.=td($row['a_po_name'].' '.$row['a_po_description']); - $old=$row['a_po_name']; - $r.= ''; - $r.= ''; - $r.=td(''); - } - $tot_deb+=$row['a_d']; - $tot_cred+=$row['a_c']; - - $r.=td($row['b_po_name']." ".$row['b_po_description']); - - $r.=td(nbm($row['a_d']),' class="num"'); - $r.=td(nbm($row['a_c']),' class="num"'); - $r.=td(nbm($row['a_solde']),' class="num"'); - $r.=sprintf("",$row['a_debit']); - $r.=""; - } /* end loop */ - - if ( $tot_deb != 0 || $tot_cred !=0 ) - { - $r.="".td(''); - $r.=""; - $s=abs($tot_deb-$tot_cred); - $d=($tot_deb>$tot_cred)?'debit':'credit'; - $r.=td(nbm($s),' class="num"').""; - $r.=""; - } - - $r.="
    Poste comptable AnalytiquePoste comptable AnalytiqueDébitCréditSoldeD/C
    %s
    Total ".nbm($tot_deb)." ".nbm($tot_cred)."$d
    "; - $r.=h2info('Résumé'); - $r.=''; - $r.=''; - $r.=th('Po'). - th('Nom'). - th('Débit',' style="text-align:right"'). - th('Crédit','style="text-align:right" '). - th('Solde',' style="text-align:right"'); - - $sum=$this->show_sum($array); - $tot_cred=0;$tot_deb=0; - foreach ($sum as $row) - { - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $diff=bcsub($row['debit'],$row['credit']); - $tot_cred=bcadd($tot_cred,$row['credit']); - $tot_deb=bcadd($tot_deb,$row['debit']); - - $r.=td(nbm($diff),' class="num" '); - - $r.=''; - $r.=''; - } - $r.=td(''); - $r.=td('total'); - $r.=td(nbm($tot_deb),'class="num"'); - $r.=td(nbm($tot_cred),'class="num"'); - $solde=bcsub($tot_deb,$tot_cred); - $sign=($tot_cred<$tot_deb)?" - ":" + "; - $r.=td($sign.nbm($solde),'class="num" style="border:solid 1px blue;font-weight:bold"'); - $r.=''; - $r.='
    '.$row['poste'].''.$row['desc'].''.nbm($row['debit']).''.nbm($row['credit']).''.$row['dc'].'
    '; - - return $r; - } - /*! - * \brief Display the result in pdf - * - * \return none - */ - function display_pdf() - { - $array=$this->load(); - if (empty($array))return; - $pdf=new PDF($this->db); - $pdf->Setdossierinfo(dossier::name()); - $pdf->setTitle("Balance analytique",true); - $pdf->SetAuthor('NOALYSS'); - $pdf->AliasNbPages(); - $pdf->AddPage(); - - $pa=new Anc_Plan($this->db,$this->pa_id); - $pa->get(); - $pb=new Anc_Plan($this->db,$this->pa_id2); - $pb->get(); - $pdf->SetFont('DejaVu','B',9); - $pdf->Cell(0,7,sprintf("Balance croise plan %s %s ", - $pa->name, - $pb->name),1,0,'C'); - $filtre_date=""; - $filtre_pa=""; - $filtre_pb=""; - - if ( $this->from !="" ||$this->to !="") - $filtre_date=sprintf("Filtre date %s %s", - $this->from, - $this->to); - if ( $this->from_poste !="" ||$this->to_poste !="") - $filtre_pa=sprintf("Filtre poste plan1 %s %s", - ($this->from_poste!="")?"de ".$this->from_poste:" ", - ($this->to_poste!="")?"jusque ".$this->to_poste:""); - - if ( $this->from_poste2 !="" ||$this->to_poste2 !="") - $filtre_pb=sprintf("Filtre poste plan2 %s %s", - ($this->from_poste2!="")?"de ".$this->from_poste2:" ", - ($this->to_poste2!="")?"jusque ".$this->to_poste2:""); - - $pdf->SetFont('DejaVu','',8); - $pdf->Cell(50,7,$filtre_date); - $pdf->Cell(50,7,$filtre_pa); - $pdf->Cell(50,7,$filtre_pb); - $pdf->Ln(); - - $pdf->SetFont('DejaVu','',6); - $pdf->Cell(20,7,'id','B'); - $pdf->Cell(100,7,'Poste Comptable','B'); - $pdf->Cell(20,7,'Débit','B',0,'L'); - $pdf->Cell(20,7,'Crédit','B',0,'L'); - $pdf->Cell(20,7,'Solde','B',0,'L'); - $pdf->Cell(20,7,'D/C','B',0,'L'); - $pdf->Ln(); - - for ($i=0;$iCell(20,6,$row['a_po_name'],0,0,'L'); - $pdf->Cell(40,6,mb_substr($row['a_po_description'],0,31),0,0,'L'); - $pdf->Cell(20,6,$row['b_po_name'],0,0,'L'); - $pdf->Cell(40,6,mb_substr($row['b_po_description'],0,31),0,0,'L'); - $pdf->Cell(20,6,$row['a_d'],0,0,'R'); - $pdf->Cell(20,6,$row['a_c'],0,0,'R'); - $pdf->Cell(20,6,$row['a_solde'],0,0,'R'); - $pdf->Cell(20,6,$row['a_debit'],0,0,'C'); - $pdf->Ln(); - } - - $sum=$this->show_sum($array); - $pdf->SetFont('DejaVu','B',8); - $pdf->Cell(70,6,'Somme',1,0,'C'); - $pdf->Ln(5); - $pdf->SetFont('DejaVu','',6); - - $pdf->Cell(20,7,'Poste'); - $pdf->Cell(60,7,'Description','B'); - $pdf->Cell(20,7,'Débit','B',0,'L'); - $pdf->Cell(20,7,'Crédit','B',0,'L'); - $pdf->Cell(20,7,'Solde','B',0,'L'); - $pdf->Cell(20,7,'D/C','B',0,'L'); - $pdf->Ln(); - - for ($i=0;$iCell(20,6,$row['poste'],0,0,'L'); - $pdf->Cell(60,6,$row['desc'],0,0,'L'); - $pdf->Cell(20,6,sprintf('%.2f',$row['debit']),0,0,'R'); - $pdf->Cell(20,6,sprintf('%.2f',$row['credit']),0,0,'R'); - $pdf->Cell(20,6,sprintf('%.2f',$row['solde']),0,0,'R'); - $pdf->Cell(20,6,$row['dc'],0,0,'R'); - $pdf->Ln(); - } - $fDate=date('dmy-Hi'); - $pdf->output('crossbalance-'.$fDate.'.pdf','D'); - } - - - /*! - * \brief Compute the csv export - * \return string with the csv - */ - function display_csv() - { - $r=""; - - $r.='"Poste comptable Analytique";'; - $r.='"Poste comptable Analytique";'; - $r.='"Debit";'; - $r.='"Credit";'; - $r.='"Solde";'; - $r.='"D/C"'; - - $r.="\r\n"; - - $array=$this->load(); - if ( is_array($array) == false ) - { - return $array; - - } - foreach ( $array as $row) - { - - $r.=sprintf('"%s";',$row['a_po_name']); - $r.=sprintf('"%s";',$row['b_po_name']); - $r.=sprintf("%s;",nb($row['a_d'])); - $r.=sprintf("%s;",nb($row['a_c'])); - $r.=sprintf("%s;",nb($row['a_solde'])); - $r.=sprintf('"%s"',$row['a_debit']); - $r.="\r\n"; - } - - return $r; - - } - /*! - * \brief Compute the form to display - * \param $p_hidden hidden tag to be included (gDossier,...) - * - * - * \return string containing the data - */ - function display_form($p_string='') - { - $r=parent::display_form($p_string); - // show the second plan - $r.=''; - $plan=new Anc_Plan($this->db); - $plan_id=new ISelect("pa_id2"); - $plan_id->value=$this->db->make_array("select pa_id, pa_name from plan_analytique order by pa_name"); - $plan_id->selected=$this->pa_id2; - $r.= "Plan Analytique :".$plan_id->input(); - $r.=HtmlInput::request_to_hidden(array('ac')); - $poste=new IText(); - $poste->size=10; - $r.="Entre le poste ".$poste->input("from_poste2",$this->from_poste2); - $choose=new IButton(); - $choose->name="Choix Poste"; - $choose->label=_("Recherche"); - $choose->javascript="onClick=search_ca(".dossier::id().",'from_poste2','pa_id2')"; - $r.=$choose->input(); - - $r.=" et le poste ".$poste->input("to_poste2",$this->to_poste2); - $choose->javascript="onClick=search_ca(".dossier::id().",'to_poste2','pa_id2')"; - $r.=$choose->input(); - $r.=''. - _('Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche'). - ''; - - $r.=''; - $r.=HtmlInput::submit('Affiche', _('Rechercher')); - return $r; - } - /*! - * \brief Show the button to export in PDF or CSV - * \param $p_string hidden data to include in the form - * - * - * \return string with the button - */ - function show_button($p_string="") - { - $r=""; - $r.= '
    '; - $r.= $p_string; - $r.= HtmlInput::hidden("to",$this->to); - $r.= HtmlInput::hidden("act","PDF:AncBalDouble"); - $r.= HtmlInput::hidden("from",$this->from); - $r.= HtmlInput::hidden("pa_id",$this->pa_id); - $r.= HtmlInput::hidden("from_poste",$this->from_poste); - $r.= HtmlInput::hidden("to_poste",$this->to_poste); - $r.= HtmlInput::hidden("pa_id2",$this->pa_id2); - $r.= HtmlInput::hidden("from_poste2",$this->from_poste2); - $r.= HtmlInput::hidden("to_poste2",$this->to_poste2); - $r.=dossier::hidden(); - $r.=HtmlInput::submit('bt_pdf',"Export en PDF"); - $r.= '
    '; - - $r.= '
    '; - $r.= HtmlInput::hidden("to",$this->to); - $r.= HtmlInput::hidden("act","CSV:AncBalDouble"); - $r.= HtmlInput::hidden("from",$this->from); - $r.= HtmlInput::hidden("pa_id",$this->pa_id); - $r.= HtmlInput::hidden("from_poste",$this->from_poste); - $r.= HtmlInput::hidden("to_poste",$this->to_poste); - $r.= HtmlInput::hidden("pa_id2",$this->pa_id2); - $r.= HtmlInput::hidden("from_poste2",$this->from_poste2); - $r.= HtmlInput::hidden("to_poste2",$this->to_poste2); - $r.= $p_string; - $r.= dossier::hidden(); - $r.=HtmlInput::submit('bt_csv',"Export en CSV"); - $r.= '
    '; - return $r; - - } - /*! - * \brief complete the object with the data in $_REQUEST - */ - function get_request() - { - parent::get_request(); - $this->from_poste2=(isset($_REQUEST['from_poste2']))?$_REQUEST['from_poste2']:""; - $this->to_poste2=(isset($_REQUEST['to_poste2']))?$_REQUEST['to_poste2']:""; - $this->pa_id2=(isset($_REQUEST['pa_id2']))?$_REQUEST['pa_id2']:""; - - } - /*! - * \brief load the data from the database - * - * \return array - */ - function load() - { - $filter_poste=""; - $and=""; - if ( $this->from_poste != "" ) - { - $filter_poste.=" $and upper(pa.po_name)>= upper('".Database::escape_string($this->from_poste)."')"; - $and=" and "; - - } - if ( $this->to_poste != "" ) - { - $filter_poste.=" $and upper(pa.po_name)<= upper('".Database::escape_string($this->to_poste)."')"; - $and=" and "; - } - - if ( $this->from_poste2 != "" ) - { - $filter_poste.=" $and upper(pb.po_name)>= upper('".Database::escape_string($this->from_poste2)."')"; - $and=" and "; - } - if ( $this->to_poste2 != "" ) - { - $filter_poste.=" $and upper(pb.po_name)<= upper('".Database::escape_string($this->to_poste2)."')"; - $and=" and "; - } - if ( $filter_poste != "") - $filter_poste=" where ".$filter_poste; - - $sql=" - select a_po_id , - pa.po_name as a_po_name, - pa.po_description as a_po_description, - pb.po_description as b_po_description, - - b_po_id, - pb.po_name as b_po_name, - sum(a_oa_amount_c) as a_c, - sum(a_oa_amount_d) as a_d - from (select - a.j_id, - a.po_id as a_po_id, - b.po_id as b_po_id, - case when a.oa_debit='t' then a.oa_amount else 0 end as a_oa_amount_d, - case when a.oa_debit='f' then a.oa_amount else 0 end as a_oa_amount_c - from - operation_analytique as a join operation_analytique as b on (a.j_id=b.j_id and a.oa_row=b.oa_row) - join poste_analytique as poa on (a.po_id=poa.po_id) - join poste_analytique as pob on (b.po_id=pob.po_id) - where poa.pa_id=". - $this->pa_id." - and pob.pa_id=".$this->pa_id2." ".$this->set_sql_filter()." - ) as m join poste_analytique as pa on ( a_po_id=pa.po_id) - join poste_analytique as pb on (b_po_id=pb.po_id) - - $filter_poste - - group by a_po_id,b_po_id,pa.po_name,pa.po_description,pb.po_name,pb.po_description - order by 2; - "; - - - $res=$this->db->exec_sql($sql); - $this->has_data=Database::num_row($res); - if ( Database::num_row($res) == 0 ) - return null; - $a=array(); - $count=0; - $array=Database::fetch_all($res); - foreach ($array as $row) - { - $a[$count]['a_po_id']=$row['a_po_id']; - $a[$count]['a_d']=$row['a_d']; - $a[$count]['a_c']=$row['a_c']; - $a[$count]['b_po_id']=$row['b_po_id']; - - $a[$count]['a_po_name']=$row['a_po_name']; - $a[$count]['a_po_description']=$row['a_po_description']; - $a[$count]['b_po_name']=$row['b_po_name']; - $a[$count]['b_po_description']=$row['b_po_description']; - $a[$count]['a_solde']=abs($row['a_d']-$row['a_c']); - $a[$count]['a_debit']=($row['a_d']>$row['a_c'])?"debit":"credit"; - - $count++; - } - return $a; - - - } - - - /*! - * \brief add extra lines with sum of each account - * \param $p_array array returned by load() - */ - function show_sum ($p_array) - { - $tot_deb=0; - $tot_cred=0; - $old=""; - $first=true; - $array=array(); - foreach ( $p_array as $row) - { - - if ( $old != $row['a_po_name'] && $first==false ) - - { - $s=abs($tot_deb-$tot_cred); - $d=($tot_deb>$tot_cred)?'debit':'credit'; - $array[]=array('poste'=>$old,'desc'=>$old_desc - ,'debit'=>$tot_deb,'credit'=>$tot_cred, - 'solde'=>$s,'dc'=>$d); - - $tot_deb=0; - $tot_cred=0; - - $old=$row['a_po_name']; - $old_desc=$row['a_po_description']; - } - - if ( $first ) - { - $first=false; - $old=$row['a_po_name']; - $old_desc=$row['a_po_description']; - } - - $tot_deb+=$row['a_d']; - $tot_cred+=$row['a_c']; - - - } - $s=abs($tot_deb-$tot_cred); - $d=($tot_deb>$tot_cred)?'debit':'credit'; - $array[]=array('poste'=>$old,'desc'=>$old_desc - ,'debit'=>$tot_deb,'credit'=>$tot_cred, - - 'solde'=>$s,'dc'=>$d); - - - return $array; - - } - /*! - * \brief for testing and debuggind the class - * it must never be called from production system, it is - * intended only for developpers - * \param - * \param - * \param - * - * - * \return none - */ - static function test_me() - { - $a=new Database(dossier::id()); - - $bal=new Anc_Balance_Double($a); - $bal->get_request(); - - echo '
    '; - - echo $bal->display_form(); - echo '
    '; - if ( isset($_GET['result'])) - { - echo $bal->show_button("",""); - echo "

    HTML

    "; - echo $bal->display_html(); - echo "

    CSV

    "; - echo $bal->display_csv(); - - } - } -} diff --git a/sources/include/class_anc_balance_simple.php b/sources/include/class_anc_balance_simple.php deleted file mode 100644 index 9dd563d..0000000 --- a/sources/include/class_anc_balance_simple.php +++ /dev/null @@ -1,311 +0,0 @@ -set_sql_filter(); - // sum debit - - $sql="select m.po_id,sum(deb) as sum_deb,sum(cred) as sum_cred,"; - $sql.=" po_name||' '||coalesce(po_description,'') as po_name"; - $sql.=" from "; - $sql.=" (select po_id,case when oa_debit='t' then oa_amount else 0 end as deb,"; - $sql.="case when oa_debit='f' then oa_amount else 0 end as cred "; - $sql.=" from operation_analytique join poste_analytique using(po_id)"; - $sql.=(empty($filter) == false)?" where ".$filter:""; - $sql.=" ) as m join poste_analytique using (po_id)"; - $sql.=" where pa_id=".$this->pa_id; - $sql.=" group by po_id,po_name,po_description"; - $sql.=" order by po_id"; - $res=$this->db->exec_sql($sql); - - if ( Database::num_row($res) == 0 ) { - $this->has_data=0; - return null; - } - $a=array(); - $count=0; - $array=Database::fetch_all($res); - foreach ($array as $row) - { - $a[$count]['po_id']=$row['po_id']; - $a[$count]['sum_deb']=$row['sum_deb']; - $a[$count]['sum_cred']=$row['sum_cred']; - $a[$count]['po_name']=$row['po_name']; - $a[$count]['solde']=abs($row['sum_deb']-$row['sum_cred']); - $a[$count]['debit']=($row['sum_deb']>$row['sum_cred'])?"debit":"credit"; - $count++; - } - $this->has_data=$count; - return $a; - - - } - /*! - * \brief Set the filter (account_date) - * - * \return return the string to add to load - */ - - - function set_sql_filter() - { - $sql=""; - $and=""; - if ( $this->from != "" ) - { - $sql.=" oa_date >= to_date('".$this->from."','DD.MM.YYYY')"; - $and=" and "; - } - if ( $this->to != "" ) - { - $sql.=" $and oa_date <= to_date('".$this->to."','DD.MM.YYYY')"; - $and=" and "; - } - if ( $this->from_poste != "" ) - { - $sql.=" $and upper(po_name)>= upper('".$this->from_poste."')"; - $and=" and "; - } - if ( $this->to_poste != "" ) - { - $sql.=" $and upper(po_name)<= upper('".$this->to_poste."')"; - $and=" and "; - } - return $sql; - - } - /*! - * \brief compute the html display - * - * - * \return string - */ - function display_html() - { - $r=""; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - - $array=$this->load(); - $odd=0; - if ( is_array($array) == false ) - { - return $array; - - } - foreach ( $array as $row) - { - $odd++; - - $r.=($odd%2==0)?'':''; - // the name and po_id - // $r.=sprintf("",$row['po_id']); - $r.=sprintf("",h($row['po_name'])); - $r.=td(nbm($row['sum_deb']),' class="num"'); - $r.=td(nbm($row['sum_cred']),' class="num"'); - $r.=td(nbm($row['solde']),' class="num"'); - $deb=($row['sum_deb'] > $row['sum_cred'])?"D":"C"; - $deb=($row['solde'] == 0 )?'':$deb; - $r.=sprintf("",$deb); - $r.=""; - } - $r.="
    Poste comptable AnalytiqueDébitCréditSoldeD/C
    %s%s%s
    "; - return $r; - } - /*! - * \brief Compute the form to display - * \param $p_hidden hidden tag to be included (gDossier,...) - * - * - * \return string containing the data - */ - function display_form($p_string="") - { - $r=parent::display_form($p_string); - - $r.= HtmlInput::submit('Affiche', _('Rechercher')); - - return $r; - } - - /*! - * \brief Display the result in pdf - * - * \return none - */ - function display_pdf() - { - $array=$this->load(); - $pdf=new PDFBalance_Simple($this->db); - $pdf->set_info($this->from_poste,$this->to_poste,$this->from,$this->to); - $pdf->AliasNbPages(); - $pdf->AddPage(); - $pdf->setTitle("Balance analytique",true); - - $pdf->SetFont('DejaVu','',6); - for ($i=0;$iCell(20,6,$row['po_id'],0,0,'L'); - $pdf->Cell(90,6,$row['po_name'],0,0,'L'); - $pdf->Cell(20,6,sprintf('%s',nbm($row['sum_deb'])),0,0,'R'); - $pdf->Cell(20,6,sprintf('%s',nbm($row['sum_cred'])),0,0,'R'); - $pdf->Cell(20,6,sprintf('%s',nbm($row['solde'])),0,0,'R'); - $pdf->Cell(20,6,$row['debit'],0,0,'R'); - $pdf->Ln(); - } - $fDate=date('dmy-Hi'); - $pdf->output('simple-balance-'.$fDate.'.pdf','D'); - - } - /*! - * \brief Compute the csv export - * \return string with the csv - */ - function display_csv() - { - $array=$this->load(); - if ( is_array($array) == false ) - { - return $array; - - } - $r=""; - foreach ( $array as $row) - { - // the name and po_id - $solde=($row['sum_cred']>$row['sum_deb'])?'C':'D'; - $solde=($row['sum_cred']==$row['sum_deb'])?'':$solde; - $r.=sprintf("'%s';",$row['po_id']); - $r.=sprintf("'%s';",$row['po_name']); - $r.=sprintf("%s;",nb($row['sum_deb'])); - $r.=sprintf("%s;",nb($row['sum_cred'])); - $r.=sprintf("%s;",nb($row['solde'])); - $r.=sprintf("'%s'",$row['debit']); - $r.="\r\n"; - } - return $r; - - } - /*! - * \brief Show the button to export in PDF or CSV - * \param $url_csv url of the csv - * \param $url_pdf url of the pdf - * \param $p_string hidden data to include in the form - * - * - * \return string with the button - */ - function show_button($p_string="") - { - $r=""; - $r.= '
    '; - $r.= $p_string; - $r.= dossier::hidden(); - $r.= HtmlInput::hidden("to",$this->to); - $r.= HtmlInput::hidden("act","PDF:AncBalSimple"); - - $r.= HtmlInput::hidden("from",$this->from); - $r.= HtmlInput::hidden("pa_id",$this->pa_id); - $r.= HtmlInput::hidden("from_poste",$this->from_poste); - $r.= HtmlInput::hidden("to_poste",$this->to_poste); - $r.=HtmlInput::submit('bt_pdf',"Export en PDF"); - $r.= '
    '; - - $r.= '
    '; - $r.= HtmlInput::hidden("act","CSV:AncBalSimple"); - $r.= HtmlInput::hidden("to",$this->to); - $r.= HtmlInput::hidden("from",$this->from); - $r.= HtmlInput::hidden("pa_id",$this->pa_id); - $r.= HtmlInput::hidden("from_poste",$this->from_poste); - $r.= HtmlInput::hidden("to_poste",$this->to_poste); - $r.= $p_string; - $r.= dossier::hidden(); - $r.=HtmlInput::submit('bt_csv',"Export en CSV"); - $r.= '
    '; - return $r; - } - - /*! - * \brief for testing and debuggind the class - * it must never be called from production system, it is - * intended only for developpers - * \param - * \param - * \param - * - * - * \return none - */ - static function test_me () - { - // call the page with ?gDossier=14 - $a=new Database(dossier::id()); - - $bal=new Anc_Balance_Simple($a); - $bal->get_request(); - - echo '
    '; - - echo $bal->display_form(); - echo '
    '; - if ( isset($_GET['result'])) - { - echo $bal->show_button("",""); - echo "

    HTML

    "; - echo $bal->display_html(); - echo "

    CSV

    "; - echo $bal->display_csv(); - /* echo "

    pdf

    "; */ - /* echo $bal->display_pdf(); */ - - } - - } -} diff --git a/sources/include/class_anc_grandlivre.php b/sources/include/class_anc_grandlivre.php deleted file mode 100644 index 452da71..0000000 --- a/sources/include/class_anc_grandlivre.php +++ /dev/null @@ -1,309 +0,0 @@ -from != "" ) - { - $sql.="$and oa_date >= to_date('".$this->from."','DD.MM.YYYY')"; - } - if ( $this->to != "" ) - { - $sql.=" $and oa_date <= to_date('".$this->to."','DD.MM.YYYY')"; - } - - return $sql; - - } - /*! - * \brief load the data from the database - * - * \return array - */ - function load() - { - $filter_date=$this->set_sql_filter(); - $cond_poste=''; - if ($this->from_poste != "" ) - $cond_poste=" and upper(po_name) >= upper('".$this->from_poste."')"; - if ($this->to_poste != "" ) - $cond_poste.=" and upper(po_name) <= upper('".$this->to_poste."')"; - $pa_id_cond=""; - if ( isset ( $this->pa_id) && $this->pa_id !='') - $pa_id_cond= "pa_id=".$this->pa_id." and"; - $array=$this->db->get_array(" select oa_id, - po_name, - oa_description, - po_description, - oa_debit, - to_char(oa_date,'DD.MM.YYYY') as oa_date, - oa_amount, - oa_group, - j_id , - jr_internal, - jr_id, - jr_comment, - j_poste, - jrnx.f_id, - ( select ad_value from fiche_Detail where f_id=jrnx.f_id and ad_id=23) as qcode, - jr_pj_number - from operation_analytique as B join poste_analytique using(po_id) - left join jrnx using (j_id) - left join jrn on (j_grpt=jr_grpt_id) - where $pa_id_cond oa_amount <> 0.0 $cond_poste $filter_date - order by po_name,oa_date::date,qcode,j_poste"); - $this->has_data=count($array); - return $array; - } - - function load_csv() - { - $filter_date=$this->set_sql_filter(); - $cond_poste=''; - if ($this->from_poste != "" ) - $cond_poste=" and upper(po_name) >= upper('".$this->from_poste."')"; - if ($this->to_poste != "" ) - $cond_poste.=" and upper(po_name) <= upper('".$this->to_poste."')"; - $pa_id_cond=""; - if ( isset ( $this->pa_id) && $this->pa_id !='') - $pa_id_cond= "pa_id=".$this->pa_id." and"; - $array=$this->db->get_array(" select - po_name, - to_char(oa_date,'DD.MM.YYYY') as oa_date, - j_poste, - ( select ad_value from fiche_Detail where f_id=jrnx.f_id and ad_id=23) as qcode, - jr_comment, - jr_pj_number, - jr_internal, - oa_row, - case when oa_debit='t' then 'D' else 'C' end, - oa_amount - from operation_analytique as B join poste_analytique using(po_id) - left join jrnx using (j_id) - left join jrn on (j_grpt=jr_grpt_id) - where $pa_id_cond oa_amount <> 0.0 $cond_poste $filter_date - order by po_name,oa_date::date,qcode,j_poste"); - - - return $array; - } - /* ! - * \brief Show the button to export in PDF all the receipt - * - * \param $p_string extra hidden value - * \return string with the button - */ - - function button_export_pdf($p_string = "") - { - if (CONVERT_GIF_PDF <> 'NOT' && PDFTK <> 'NOT') - { - $r = ""; - $r.= HtmlInput::hidden("to", $this->to); - $r.= HtmlInput::hidden("from", $this->from); - $r.= HtmlInput::hidden("pa_id", $this->pa_id); - $r.= HtmlInput::hidden("from_poste", $this->from_poste); - $r.= HtmlInput::hidden("to_poste", $this->to_poste); - $r.= HtmlInput::hidden("act","PDF:AncReceipt"); - - $r.= $p_string; - $r.= dossier::hidden(); - $r.=HtmlInput::submit('bt_receipt_anal_pdf', _("Export des pièces en PDF")); - } - else - { - - $r = ""; - $msg = _("Les extensions pour convertir en pdf ne sont pas installées"); - $r = HtmlInput::button("bt_receipt_anal", _('Export des pièces en PDF'), sprintf('onclick="alert(\'%s\')"',$msg)); - } - return $r; - } - /*! - * \brief compute the html display - * - * - * \return string - */ - - function display_html() - { - $r = ""; - //---Html - $array = $this->load(); - if (is_array($array) == false || empty($array)) - { - return 0; - } - $r.= ''; - $ix = 0; - $prev = 'xx'; - $idx = 0; - $tot_deb = $tot_cred = 0; - - bcscale(2); - foreach ($array as $row) - { - if ($prev != $row['po_name']) - { - if ($ix > 0) - { - $r.=''; - $tot_solde = bcsub($tot_cred, $tot_deb); - $sign = " ".($tot_solde > 0) ? 'C' : 'D'; - $r.=td('') . td('') . td(''); - $r.=td('') . td('') . td('') . td('') . td('') . td(nbm($tot_deb), ' class="num"') . td(nbm($tot_cred), ' class="num"') . td(nbm($tot_solde) . $sign, ' class="num notice"'); - } - $r.='' . ''; - $r.= '' . - '' . - '' . - '' . - '' . - '' . - '' . - '' . - '' . - '' . - '' . - '' . - ''; - - $tot_deb = $tot_cred = 0; - $prev = $row['po_name']; - $ix++; - } - $class = ($idx % 2 == 0) ? 'even' : 'odd'; - $idx++; - $r.=''; - $detail = ($row['jr_id'] != null) ? HtmlInput::detail_op($row['jr_id'], $row['jr_internal']) : ''; - $post_detail = ($row['j_poste'] != null) ? HtmlInput::history_account($row['j_poste'], $row['j_poste']) : ''; - $card_detail = ($row['f_id'] != null) ? HtmlInput::history_card($row['f_id'], $row['qcode']) : ''; - $amount_deb = ($row['oa_debit'] == 't') ? $row['oa_amount'] : 0; - $amount_cred = ($row['oa_debit'] == 'f') ? $row['oa_amount'] : 0; - $tot_deb = bcadd($tot_deb, $amount_deb); - $tot_cred = bcadd($tot_cred, $amount_cred); - $tot_solde=bcsub($tot_cred,$tot_deb); - - /* - * Checked button - */ - $str_ck = ""; - $str_document = ""; - if ($row['jr_id'] != null) - { - /* - * Get receipt info - */ - $str_document = HtmlInput::show_receipt_document($row['jr_id']); - if ($str_document != "") - { - $ck = new ICheckBox('ck[]', $row['jr_id']); - $str_ck = $ck->input(); - } - } - - $r.= - '' . - '' . - td($post_detail) . - td($card_detail) . - td($row['jr_comment']) . - '' . - td($row['jr_pj_number']) . - '' . - '' . - ''. - ''; - $r.= ''; - } - $r.=''; - $tot_solde = bcsub($tot_cred, $tot_deb); - $sign = ($tot_solde > 0) ? 'C' : 'D'; - $r.=td('') . td('') . td(''); - $r.=td('') . td('') . td('') . td('') . td('') . td(nbm($tot_deb), ' class="num"') . td(nbm($tot_cred), ' class="num"') . td(nbm($tot_solde) . $sign, ' class="num notice"'); - - $r.= '
    ' . '

    ' . h($row['po_name'] . ' ' . $row['po_description']) . '

    ' . '' . _('Date') . '' . _('Poste') . '' . _('Quick_code') . '' . _('Libellé') . '' . '' . _('Pièce') . '' . _('Interne') . '' . _('Débit') . '' . _('Crédit') . '' . _('Prog.') . '
    ' . $str_ck . '' . $row['oa_date'] . '' . $str_document . '' . $detail . '' . nbm($amount_deb) . '' . nbm($amount_cred). '' . nbm($tot_solde). '
    '; - return $r; - } - /*! - * \brief Show the button to export in PDF or CSV - * \param $url_csv url of the csv - * \param $url_pdf url of the pdf - * \param $p_string hidden data to include in the form - * - * - * \return string with the button - */ - function show_button($p_string="") - { - $r=""; - $r.= '
    '; - $r.= HtmlInput::hidden("act","CSV:AncGrandLivre"); - $r.= HtmlInput::hidden("to",$this->to); - $r.= HtmlInput::hidden("from",$this->from); - $r.= HtmlInput::hidden("pa_id",$this->pa_id); - $r.= HtmlInput::hidden("from_poste",$this->from_poste); - $r.= HtmlInput::hidden("to_poste",$this->to_poste); - $r.= $p_string; - $r.= dossier::hidden(); - $r.=HtmlInput::submit('bt_csv',"Export en CSV"); - $r.= '
    '; - return $r; - } - function display_csv() - { - $r=""; - //---Html - $array=$this->load_csv(); - if ( is_array($array) == false ) - { - return $array; - - } - - $ix=0;$prev='xx'; - $tot_deb=$tot_cred=0; - $aheader=array(); - $aheader[]=array("title"=>'Imp. Analytique','type'=>'string'); - $aheader[]=array("title"=>'Date','type'=>'string'); - $aheader[]=array("title"=>'Poste','type'=>'string'); - $aheader[]=array("title"=>'Quick_Code','type'=>'string'); - $aheader[]=array("title"=>'libelle','type'=>'string'); - $aheader[]=array("title"=>'Pièce','type'=>'string'); - $aheader[]=array("title"=>'Num.interne','type'=>'string'); - $aheader[]=array("title"=>'row','type'=>'num'); - $aheader[]=array("title"=>'Debit','type'=>'string'); - $aheader[]=array("title"=>'Credit','type'=>'num'); - Impress::array_to_csv($array, $aheader); - } -} diff --git a/sources/include/class_anc_group.php b/sources/include/class_anc_group.php deleted file mode 100644 index daff410..0000000 --- a/sources/include/class_anc_group.php +++ /dev/null @@ -1,260 +0,0 @@ -db=$p_cn; - $this->ga_id=null; - $this->ga_description=null; - $this->pa_id=null; - } - /*! - * \brief insert into the database an object - * \return message with error otherwise an empty string - */ - - function insert() - { - if (strlen ($this->ga_id) > 10 ) return ''. - _('Taille de la code trop long maximum 10 caractères').''; - $sql=" insert into groupe_analytique (ga_id,ga_description,pa_id) values ('%s','%s',%d)"; - $sql=sprintf($sql,Database::escape_string($this->ga_id), - Database::escape_string($this->ga_description), - $this->pa_id); - try - { - $this->db->exec_sql($sql); - } - catch (Exception $a) - { - return 'Doublon !!'; - } - return ""; - } - /*! - * \brief remove from the database - */ - - function remove() - { - $this->ga_id=str_replace(' ','',$this->ga_id); - $this->ga_id=strtoupper($this->ga_id); - $sql=" delete from groupe_analytique where ga_id='".Database::escape_string($this->ga_id)."'"; - - $this->db->exec_sql($sql); - } - - /*! - * \brief load from the database and make an object - */ - function load() - { - $sql="select ga_id, ga_description,pa_id from groupe_analytique where". - " ga_id = ".$this->ga_id; - $res=$this->db->exec_sql($sql); - $array=Database::fetch_all($res); - if ( ! empty($array) ) - { - $this->ga_id=$array['ga_id']; - $this->ga_description=$array['ga_description']; - $this->pa_id=$array['pa_id']; - } - } - - /*! - * \brief fill the object thanks an array - * \param array - */ - function get_from_array($p_array) - { - $this->ga_id=$p_array['ga_id']; - $this->pa_id=$p_array['pa_id']; - $this->ga_description=$p_array['ga_description']; - } - function myList() - { - $sql=" select ga_id,groupe_analytique.pa_id,pa_name,ga_description ". - " from groupe_analytique ". - " join plan_analytique using (pa_id)"; - $r=$this->db->exec_sql($sql); - $array=Database::fetch_all($r); - $res=array(); - if ( ! empty($array)) - { - foreach ($array as $m ) - { - $obj= new Anc_Group($this->db); - $obj->get_from_array($m); - $obj->pa_name=$m['pa_name']; - $res[]=clone $obj; - } - } - return $res; - } - - function set_sql_filter() - { - $sql=""; - $and="and "; - if ( $this->from != "" ) - { - $sql.=" $and oa_date >= to_date('".$this->from."','DD.MM.YYYY')"; - $and=" and "; - } - if ( $this->to != "" ) - { - $sql.=" $and oa_date <= to_date('".$this->to."','DD.MM.YYYY')"; - $and=" and "; - } - if ( $this->from_poste != "" ) - { - $sql.=" $and upper(po_name)>= upper('".$this->from_poste."')"; - $and=" and "; - } - if ( $this->to_poste != "" ) - { - $sql.=" $and upper(po_name)<= upper('".$this->to_poste."')"; - $and=" and "; - } - return $sql; - - } - - function get_result() - { - $filter_date=$this->set_sql_filter(); - - $sql="with m as (select po_id, - po_name, - ga_id, - case when oa_debit = 't' then oa_amount - else 0 - end as amount_deb, - case when oa_debit = 'f' then oa_amount - else 0 - end as amount_cred, - oa_date - from operation_analytique -join poste_analytique using (po_id) -where pa_id=$1 $filter_date ) -select sum(amount_cred) as sum_cred, sum(amount_deb)as sum_deb,po_name,ga_id,ga_description -from m left join groupe_analytique using (ga_id) -group by ga_id,po_name,ga_description -order by ga_description,po_name"; - $ret=$this->db->get_array($sql,array($this->pa_id)); - - return $ret; - } - - function display_html() - { - if ( $this->check() != 0) - { - alert('Désolé mais une des dates données n\'est pas valide'); - return; - } - - $array=$this->get_result(); - if ( empty ($array) ) return ""; - require_once NOALYSS_INCLUDE.'/template/anc_balance_group.php'; - - - } - /** - *@brief display the button export CSV - *@param $p_hidden is a string containing hidden items - *@return html string - */ - function show_button($p_hidden="") - { - $r=""; - $r.= '
    '; - $r.= HtmlInput::hidden("act","CSV:AncBalGroup"); - $r.= HtmlInput::hidden("to",$this->to); - $r.= HtmlInput::hidden("from",$this->from); - $r.= HtmlInput::hidden("pa_id",$this->pa_id); - $r.= HtmlInput::hidden("from_poste",$this->from_poste); - $r.= HtmlInput::hidden("to_poste",$this->to_poste); - $r.= $p_hidden; - $r.= dossier::hidden(); - $r.=HtmlInput::submit('bt_csv',"Export en CSV"); - $r.= '
    '; - return $r; - } - function export_csv() - { - $array=$this->get_result(); - printf('"groupe";"activité";"débit";"credit";"solde"'); - printf("\r\n"); - bcscale(2); - for ($i=0;$imyList(); - print_r($r); - echo '
    '; - print_r($o); - $o->ga_id="DD' dd dDD"; - $o->ga_description="Test 1"; - $o->remove(); - // $o->insert(); - $o->ga_id="DD"; - $o->ga_description="Test 1"; - $o->remove(); - - $r=$o->myList(); - print_r($r); - } -} diff --git a/sources/include/class_anc_group_operation.php b/sources/include/class_anc_group_operation.php deleted file mode 100644 index 502a9cc..0000000 --- a/sources/include/class_anc_group_operation.php +++ /dev/null @@ -1,278 +0,0 @@ -db=$p_cn; - $this->id=$p_id; - $this->date=date("d.m.Y"); - $this->nMaxRow=10; - } - /*!\brief add several rows */ - function add() - { - - $amount=0; - try - { - $this->db->start(); - foreach ($this->a_operation as $row) - { - $add=round($row->oa_amount,2); - $add=($row->oa_debit=='t')?$add:$add*(-1); - $amount+=round($add,2); - $row->add(); - } - if ( $amount != 0 ) throw new Exception (_('Operation non equilibrée')); - } - catch (Exception $e) - { - echo $e->getTrace(); - $this->db->rollback(); - throw new Exception($e); - } - $this->db->commit(); - } - /*!\brief show a form for the operation (several rows) - * \return the string containing the form but without the form tag - * - */ - function form($p_readonly=0) - { - $wDate=new IDate("pdate",$this->date); - $wDate->table=1; - $wDate->size=10; - $wDate->readonly=$p_readonly; - - $wDescription=new IText("pdesc"); - $wDescription->table=0; - $wDescription->size=80; - $wDescription->readonly=$p_readonly; - // Show an existing operation - // - if ( isset ($this->a_operation[0])) - { - $wDate->value=$this->a_operation[0]->oa_date; - $wDescription->value=$this->a_operation[0]->oa_description; - } - - $ret=""; - - $ret.=''; - - $ret.="".$wDate->input().""; - $ret.=''. - '"; - $Plan=new Anc_Plan($this->db); - $aPlan=$Plan->get_list(); - $max=(count($this->a_operation)<$this->nMaxRow)?$this->nMaxRow:count($this->a_operation); - $ret.='
    Description'. - $wDescription->input()."
    '; - /* show 10 rows */ - $ret.=""; - foreach ($aPlan as $d) - { - $idx=$d['id']; - /* array of possible value for the select */ - $aPoste[$idx]=$this->db->make_array("select po_id as value,". - " po_name||':'||coalesce(po_description,'-') as label ". - " from poste_analytique ". - " where pa_id = ".$idx. - " order by po_name "); - - $ret.=""; - } - $ret.="". - "". - "". - ""; - - for ($i = 0;$i < $max;$i++) - { - $ret.=""; - - foreach ($aPlan as $d) - { - $idx=$d['id']; - // init variable - $wSelect=new ISelect("pop".$i."plan".$idx); - $wSelect->value=$aPoste[$idx]; - $wSelect->size=12; - - $wSelect->readOnly=$p_readonly; - if ( isset($this->a_operation[$i])) - { - $wSelect->selected=$this->a_operation[$i]->po_id; - } - $ret.=td($wSelect->input()); - } - $wAmount=new INum("pamount$i",0.0); - $wAmount->size=12; - $wAmount->table=1; - $wAmount->javascript=" onChange=format_number(this);caod_checkTotal()"; - $wAmount->readOnly=$p_readonly; - - $wDebit=new ICheckBox("pdeb$i"); - $wDebit->readOnly=$p_readonly; - $wDebit->javascript=" onChange=caod_checkTotal()"; - if ( isset ($this->a_operation[$i])) - { - $wSelect->selected=$this->a_operation[$i]->po_id; - $wAmount->value=$this->a_operation[$i]->oa_amount; - $wDebit->value=$this->a_operation[$i]->oa_debit; - if ( $wDebit->value=='t') - { - $wDebit->selected=true; - } - - } - - // build the table - - $ret.=""; - $ret.=$wAmount->input(); - $ret.=td($wDebit->input()); - - $ret.=""; - } - $ret.="
    Poste MontantDébit
    "; - if ( $p_readonly==false) - { - $add_row=new IButton('Ajouter'); - $add_row->label=_('Ajouter une ligne'); - $add_row->javascript='anc_add_row(\'ago\');'; - $ret.=HtmlInput::hidden('nbrow',$max); - - $ret.=$add_row->input(); - } - return $ret; - } - /*!\brief fill row from $_POST data - * - */ - function get_from_array($p_array) - { - $Plan=new Anc_Plan($this->db); - $aPlan=$Plan->get_list(); - - - for ( $i = 0;$i <$p_array['nbrow'];$i++) - { - foreach ($aPlan as $d) - { - $idx=$d['id']; - $p=new Anc_Operation($this->db); - $p->oa_amount=$p_array["pamount$i"]; - - $p->oa_description=$p_array["pdesc"]; - $p->oa_date=$p_array['pdate']; - $p->j_id=0; - $p->oa_debit=(isset ($p_array["pdeb$i"]))?'t':'f'; - $p->oa_group=0; - - $p->po_id=$p_array["pop$i"."plan".$idx]; - $p->pa_id=$idx; - $this->a_operation[]=clone $p; - } - } - } - /*!\brief save the group of operation but only if the amount is - balanced */ - function save() - { - $this->db->start(); - try - { - $oa_group=$this->db->get_next_seq('s_oa_group'); - for ($i=0;$ia_operation);$i++) - { - $this->a_operation[$i]->oa_group=$oa_group; - $this->a_operation[$i]->add(); - } - } - catch (Exception $ex) - { - echo ''. - 'Erreur dans l\'enregistrement '. - __FILE__.':'.__LINE__.' '. - $ex->getMessage(); - $p_cn->rollback(); - throw new Exception("Erreur ".$ex->getMessage()); - - } - $this->db->commit(); - } - /*!\brief show the form */ - function show() - { - return $this->form(1); - } - static function test_me() - { - $dossier=dossier::id(); - $cn=new Database($dossier); - - if ( isset($_POST['go'])) - { - $b=new Anc_Group_Operation($cn); - $b->get_from_array($_POST); - return; - } - - $a=new Anc_Group_Operation($cn); - echo '
    '; - echo $a->form(); - echo dossier::hidden(); - echo ''; - echo '
    '; - - } - -} diff --git a/sources/include/class_anc_key.php b/sources/include/class_anc_key.php deleted file mode 100644 index 587178a..0000000 --- a/sources/include/class_anc_key.php +++ /dev/null @@ -1,354 +0,0 @@ -get_value (' select count(*) - from key_distribution_ledger - join key_distribution using (kd_id) - where - jrn_def_id=$1', array($p_jrn)); - return $count; - } - function __construct($p_id=-1) - { - global $cn; - $this->key=new Anc_Key_SQL($cn, $p_id); - $this->a_ledger=null; - $this->a_activity=null; - $this->a_row=null; - } - - /** - * @brief display list of available keys - * @param $p_amount amount to distribute - * @param $p_target target to update - * @param $p_ledger is the jrn_def_id - */ - static function display_choice($p_amount, $p_target,$p_ledger) - { - global $cn; - $a_key=$cn->get_array(' select kd_id, - kd_name, - kd_description - from - key_distribution - join key_distribution_ledger using (kd_id) - where - jrn_def_id=$1', - array( - $p_ledger - )); - if (empty($a_key)) - { - echo _('Aucune clef disponible'); - echo _('Allez dans ANCKEY pour en ajouter pour ce journal'); - } - include 'template/anc_key_display_choice.php'; - } - - /** - * @brief display a list of keys, choose one to modify it - * - */ - static function display_list() - { - global $cn; - $a_key=$cn->get_array('select b.kd_id,b.kd_name,b.kd_description, - (select sum(ke_percent) from key_distribution_detail as a where a.kd_id=b.kd_id) as distrib - from key_distribution as b order by b.kd_name'); - if (empty($a_key)) - { - echo _('Aucune clef disponible'); - } - include 'template/anc_key_display_list.php'; - } - - /** - * @brief Show the detail for a key distribution and let you change it - * for adding or update - */ - function input() - { - global $cn; - - $plan=$cn->get_array(' - select - pa_id, - pa_name , - pa_description - from - plan_analytique - order by pa_name'); - $count_max=count($plan); - - $a_row=$cn->get_array('select ke_id,ke_row,ke_percent from key_distribution_detail - where - kd_id=$1 order by ke_row', array($this->key->getp('id'))); - - require_once NOALYSS_INCLUDE.'/template/anc_key_input.php'; - } - - /** - * @brief verify that data are ok - * @param type $p_array - */ - function verify($p_array) - { - $a_percent=$p_array['percent']; - if (count($a_percent)==0) - { - throw new Exception(_('Aucune répartition')); - } - $tot_percent=0; - bcscale(4); - for ($i=0; $i100) - { - throw new Exception(_('Le total ne vaut pas 100, total calculé = ').$tot_percent); - } - if ($p_array['name_key']=='') { - throw new Exception (_('Le nom ne peut être vide')); - } - } - - /** - * @brief save the data of a repartition key. - * @param received an array - * index : - * - key_id : key_distribution.kd_id - * - row : array of key_distribution.ke_id (row - * - pa : array of plan_analytic.pa_id (column) - * - po_id : double array, - * first index is the row - * second index is the first plan, the second the second plan...(column) - * - percent array, one per row - * - jrn : array of available ledgers - * @note if po_id == -1 then it is replaced by null, this why the pa_id is needed : to identify - * the column - * @verbatim - - 'key_id' => string '1' (length=1) - 'row' => - array - 0 => string '1' (length=1) - 1 => string '2' (length=1) - 2 => string '3' (length=1) - 'pa' => - array - 0 => string '1' (length=1) - 1 => string '2' (length=1) - 'po_id' => - array - 0 => - array - 0 => string '1' (length=1) - 1 => string '8' (length=1) - 1 => - array - 0 => string '2' (length=1) - 1 => string '-1' (length=2) - 2 => - array - 0 => string '3' (length=1) - 1 => string '8' (length=1) - 'percent' => - array - 0 => string '50.0000' (length=7) - 1 => string '20.0000' (length=7) - 2 => string '30.0000' (length=7) - 'jrn' => - array - 0 => string '3' (length=1) - 1 => string '2' (length=1) - @endverbatim - * - */ - function save($p_array) - { - global $cn; - $this->verify($p_array); - $cn->start(); - // for each row - $a_row=$p_array['row']; - $a_ledger=HtmlInput::default_value("jrn",array(),$p_array); - $a_percent=$p_array['percent']; - $a_po_id=$p_array['po_id']; - $a_plan=$p_array['pa']; - try - { - $this->key->setp('name',$p_array['name_key']); - $this->key->setp('description',$p_array['description_key']); - $this->key->save(); - for ($i=0; $isetp('id', $a_row[$i]); - $key_row->setp('key', $this->key->getp('id')); - $key_row->setp('row', $i+1); - $key_row->setp('percent', $a_percent[$i]); - $key_row->save(); - // - // Save each activity + percent - $cn->exec_sql('delete from key_distribution_activity where ke_id=$1', array($key_row->getp('id'))); - - // Don't save row with 0 % - if ($a_percent[$i]==0) - { - $key_row->delete(); - continue; - } - for ($j=0; $jsetp('detail', $key_row->ke_id); - $value=($a_po_id[$i][$j]==-1)?null:$a_po_id[$i][$j]; - $activity->setp('activity', $value); - $activity->setp('plan',$a_plan[$j]); - $activity->save(); - } - } - // delete all from key_distribution_ledger - $cn->exec_sql('delete from key_distribution_ledger where kd_id=$1', array($this->key->getp('id'))); - for ($k=0; $kkd_id=$this->key->getp('id'); - $ledger->jrn_def_id=$a_ledger[$k]; - $ledger->save(); - } - - $cn->commit(); - } - catch (Exception $e) - { - if ( DEBUG ) { echo $e->getTraceAsString(); var_dump($_POST);} else { echo _('erreur');} - $cn->rollback(); - } - } - /** - * @brief Call the Anc_Operation::display_form_plan with the right amounts. - * This function compute the array and amount to pass to the Anc_Operation::display_form_plan - * and replace the current table of activity with the value computed from the key. - * - * @global $cn database connection - * @param $p_target Table to be replaced - * @param $p_amount amount to distribute among activities - */ - function fill_table($p_target,$p_amount) - { - global $cn; - /* number is the index of the plan, he's computed from p_target */ - $number=preg_replace('/det[0-9]/', '', $p_target); - $number=str_replace('t', '', $number); - $number=str_replace('popup', '', $number); - - $op[$number]=$p_amount; - $array['op']=$op; - $a_plan=$cn->get_array('select pa_id from plan_analytique order by pa_id'); - for ($i=0;$i < count($a_plan);$i++) - { - $array['pa_id'][$i]=$a_plan[$i]['pa_id']; - } - - $a_poste=$cn->get_array('select po_id,ke_percent,pa_id,ke_row - from key_distribution_activity - join key_distribution_detail using (ke_id) - where - kd_id=$1 - order by ke_row,pa_id', - array($this->key->getp('id'))); - - for ($i=0;$i< count($a_poste);$i++) - { - $hplan[$number][$i]=($a_poste[$i]['po_id']==null)?-1:$a_poste[$i]['po_id']; - } - $array['hplan']=$hplan; - - $a_amount=$cn->get_array("select distinct ke_row,ke_percent - from key_distribution_activity - join key_distribution_detail using (ke_id) - where - kd_id=$1 - and pa_id=$2 - order by ke_row", - array($this->key->getp('id'),$a_plan[0]['pa_id'])); - bcscale(2); - for ($i=0;$i< count($a_amount);$i++) - { - $val[$number][$i]=bcmul($p_amount,$a_amount[$i]['ke_percent'])/100; - } - $array['val']=$val; - - $anc_operation=new Anc_Operation($cn); - echo $anc_operation->display_form_plan($array, 1, 1, $number, $p_amount,'',false); - - } - /** - *@brief show a form for adding a key + button to display it - * - */ - static function key_add() - { - $key=new Anc_Key(); - $key->key->setp('name',_('Nouvelle clef')); - $key->key->setp('description',_('Description de la nouvelle clef')); - ?> - -'; - - } - /** - *@brief delete the distribution key - */ - function delete () - { - $this->key->delete(); - } -} diff --git a/sources/include/class_anc_key_sql.php b/sources/include/class_anc_key_sql.php deleted file mode 100644 index 07be1ed..0000000 --- a/sources/include/class_anc_key_sql.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - * @file - * @brief Class to manage distribution keys for SQL. - * - */ -require_once NOALYSS_INCLUDE.'/class_noalyss_sql.php'; - - -/** - * @brief Manage the table key_distribution. - */ -class Anc_Key_SQL extends Noalyss_SQL -{ - - function __construct($p_cn, $p_id = -1) - { - $this->table = "public.key_distribution"; - $this->primary_key = "kd_id"; - - $this->name = array( - "id" => "kd_id", - "name"=>"kd_name", - "description"=>"kd_description" - ); - - $this->type = array( - "kd_id" => "numeric", - "kd_name" => "text", - "kd_description" => "text" - ); - - $this->default = array( - "kd_id" => "auto" - ); - // PHPUNIT seems to have a problem with this line - //global $cn; - - parent::__construct($p_cn, $p_id); - } - -} -/** - * @brief manage table key_distribution_ledger - */ -class Anc_Key_Ledger_SQL extends Noalyss_SQL -{ - function __construct(&$p_cn, $p_id = -1) - { - $this->table = "public.key_distribution_ledger"; - $this->primary_key = "kl_id"; - - $this->name = array( - "id" => "kl_id", - "key"=>"kd_id", - "ledger"=>"jrn_def_id" - ); - - $this->type = array( - "kl_id" => "numeric", - "kd_id" => "numeric", - "jrn_def_id" => "numeric" - ); - - $this->default = array( - "kl_id" => "auto" - ); - // PHPUNIT seems to have a problem with this line - //global $cn; - - parent::__construct($p_cn, $p_id); - } -} -/** - * @brief manage table key_distribution_detail - */ -class Anc_Key_Detail_SQL extends Noalyss_SQL -{ - function __construct(&$p_cn, $p_id = -1) - { - - $this->table = "public.key_distribution_detail"; - $this->primary_key = "ke_id"; - - $this->name = array( - "id" => "ke_id", - "key"=>"kd_id", - "row"=>"ke_row", - "percent"=>"ke_percent" - ); - - $this->type = array( - "ke_id" => "numeric", - "kd_id" => "numeric", - "ke_row" => "numeric", - "ke_percent" => "numeric" - ); - - $this->default = array( - "ke_id" => "auto" - ); - // PHPUNIT seems to have a problem with this line - //global $cn; - - - parent::__construct($p_cn, $p_id); - } -} -/** - * @brief manage table key_distribution_activity - */ -class Anc_Key_Activity_SQL extends Noalyss_SQL -{ - function __construct($p_cn, $p_id = -1) - { - $this->table = "public.key_distribution_activity"; - $this->primary_key = "ka_id"; - - $this->name = array( - "id" => "ka_id", - "detail"=>"ke_id", - "activity"=>"po_id", - "plan"=>"pa_id" - ); - - $this->type = array( - "ka_id" => "numeric", - "ke_id" => "numeric", - "po_id" => "numeric", - "pa_id" => "numeric" - - ); - - $this->default = array( - "ka_id" => "auto" - ); - - parent::__construct($p_cn, $p_id); - } -} \ No newline at end of file diff --git a/sources/include/class_anc_listing.php b/sources/include/class_anc_listing.php deleted file mode 100644 index 93c1a3f..0000000 --- a/sources/include/class_anc_listing.php +++ /dev/null @@ -1,216 +0,0 @@ -'; - $r=parent::display_form($p_string); - $r.=HtmlInput::submit('result', _('Rechercher')); - $r.= ''; - return $r; - - } - /*! - * \brief complete the object with the data in $_REQUEST - */ - - function get_request() - { - parent::get_request(); - $this->pa_id=(isset($_REQUEST['pa_id']))?$_REQUEST['pa_id']:""; - } - /*! - * \brief compute the html display - * - * - * \return string - */ - - function display_html() - { - $idx=0; - $r=""; - //---Html - $array=$this->load(); - if ( is_array($array) == false || empty($array) ) - { - return 0; - } - $r.= ''; - $r.= ''. - ''. - ''. - ''. - ''. - th(_('Description')). - ''. - ''. - ''. - ''. - ''; - foreach ( $array as $row ) - { - $class=($idx%2==0)?'even':'odd'; - $idx++; - $r.= ''; - $detail=($row['jr_id'] != null)?HtmlInput::detail_op($row['jr_id'],$row['jr_internal']):''; - $post_detail=($row['j_poste'] != null)?HtmlInput::history_account($row['j_poste'],$row['j_poste']):''; - $card_detail=($row['f_id'] != null)?HtmlInput::history_card($row['f_id'],$row['qcode']):''; - - $r.= - ''. - td($post_detail). - td($card_detail). - ''. - ''. - td($row['jr_comment']). - ''. - ''. - ''; - $r.= ''; - } - $r.= '
    '._('Date').''._('Poste').''._('Quick_code').''._('Analytique').''._('libelle').''._('Num.interne').''._('Montant').''._('D/C').'
    '.$row['oa_date'].''.h($row['po_name']).''.h($row['oa_description']).''.$detail.''.nbm($row['oa_amount']).''.(($row['oa_debit']=='f')?'CREDIT':'DEBIT').'
    '; - return $r; - } - /*! - * \brief load the data from the database - * - * \return array - */ - function load() - { - $op=new Anc_Operation ($this->db); - $op->pa_id=$this->pa_id; - $array=$op->get_list($this->from,$this->to,$this->from_poste,$this->to_poste); - if (! $array ) - { - $this->has_data=0; - } - else - { - $this->has_data=count($array); - } - return $array; - } - /*! - * \brief Compute the csv export - * \return string with the csv - */ - - function display_csv() - { - $array=$this->load($this->from,$this->to,$this->from_poste,$this->to_poste); - if ( empty($array) == true ) - { - return $array; - - } - $r=""; - foreach ( $array as $row) - { - // the name and po_id - $r.=sprintf('"%s";',$row['oa_date']); - $r.=sprintf('"%s";',$row['j_poste']); - $r.=sprintf('"%s";',$row['qcode']); - $r.=sprintf('"%s";',$row['po_name']); - $r.=sprintf('"%s";',$row['oa_description']); - $r.=sprintf('"%s";',$row['oa_description']); - - $r.=sprintf("%12.2f;",$row['oa_amount']); - $r.=sprintf("'%s'",(($row['oa_debit']=='f')?'CREDIT':'DEBIT')); - $r.="\r\n"; - } - return $r; - - } - - /*! - * \brief show the export button to pdf and CSV - * \param $p_string string containing some HTML tag as hidden field - * \param - * \param - * - * - * \return string containing the html code - */ - function show_button($p_string='') - { - $r=""; - $submit=HtmlInput::submit('',''); - $hidden=new IHidden(); - /* for the export in PDF - * Not yet needed, the html print should be enough - $r.= '
    '; - $r.= $p_string; - $r.= dossier::hidden(); - $r.= $hidden->input("to",$this->to); - $r.= $hidden->input("from",$this->from); - $r.= $hidden->input("pa_id",$this->pa_id); - $r.= $hidden->input("from_poste",$this->from_poste); - $r.= $hidden->input("to_poste",$this->to_poste); - $r.=HtmlInput::submit('bt_pdf',"Export en PDF"); - $r.= '
    '; - */ - - $r.= '
    '; - $r.= HtmlInput::hidden("to",$this->to); - $r.= HtmlInput::hidden("from",$this->from); - $r.= HtmlInput::hidden("pa_id",$this->pa_id); - $r.= HtmlInput::hidden("from_poste",$this->from_poste); - $r.= HtmlInput::hidden("to_poste",$this->to_poste); - $r.=HtmlInput::hidden('act','CSV:AncList'); - $r.=HtmlInput::hidden('ac',$_REQUEST['ac']); - $r.= $p_string; - $r.= dossier::hidden(); - $r.=HtmlInput::submit('bt_csv',"Export en CSV"); - $r.= '
    '; - return $r; - - } - /*! - * \brief debugging and test function for dev. only - * \param - * \param - * \param - * - * - * \return - */ - static function test_me() - { - } -} diff --git a/sources/include/class_anc_operation.php b/sources/include/class_anc_operation.php deleted file mode 100644 index 20c90cc..0000000 --- a/sources/include/class_anc_operation.php +++ /dev/null @@ -1,964 +0,0 @@ -db=$p_cn; - $this->id=$p_id; - $this->oa_jrnx_id_source=null; - $this->oa_positive='Y'; - $this->has_data=0; - $this->in_div=""; - } - /*!\brief add a row to the table operation_analytique - * \note if $this->oa_group if 0 then a sequence id will be computed for - * the oa_group, if $this->j_id=0 then it will be null - * - */ - function add($p_seq=0) - { - - if ( $this->oa_group == 0) - { - $this->oa_group=$this->db->get_next_seq('s_oa_group'); - } - - if ( $this->j_id == 0 ) - { - $this->j_id=null; - } else { - // must be the same side than the operation - if ( $this->oa_jrnx_id_source == null) - { - $side=$this->db->get_value('select j_debit from jrnx where j_id=$1', - array($this->j_id)); - } else - { - $side=$this->db->get_value('select j_debit from jrnx where j_id=$1', - array($this->oa_jrnx_id_source)); - } - $this->oa_debit=$side; - } - - - // we don't save null operations - if ( $this->oa_amount == 0 || $this->po_id==-1) - return; - - if ( $this->oa_amount< 0) - { - // if negatif must be oa_positive='N' - $this->oa_positive='N'; - $this->oa_debit=($this->oa_debit=='t')?'f':'t'; - } - - $oa_row=(isset($this->oa_row))?$this->oa_row:null; - $sql="insert into operation_analytique ( - po_id, - oa_amount, - oa_description, - oa_debit, - oa_group, - j_id, - oa_date, - oa_row, - oa_jrnx_id_source, - oa_positive - ) values ($1,$2,$3,$4,$5,$6,to_date($7,'DD.MM.YYYY'),$8,$9,$10)"; - - $this->db->exec_sql($sql,array( - $this->po_id, // 1 - abs($this->oa_amount), //2 - $this->oa_description, //3 - $this->oa_debit, //4 - $this->oa_group, //5 - $this->j_id, //6 - $this->oa_date, //7 - $oa_row, //8 - $this->oa_jrnx_id_source, //8 - $this->oa_positive - )); - - } - /*!\brief delete a row from the table operation_analytique - * \note be carefull : do not delete a row when we have a group - */ - function delete() - { - $sql="delete from operation_analytique where oa_id=$1"; - - $this->db->exec_sql($sql,array($this->oa_id)); - } - - /*!\brief get a list of row from a certain periode - */ - function get_list($p_from,$p_to,$p_from_poste="",$p_to_poste="") - { - $cond=""; - $cond_poste=""; - - if ($p_from!="") - $cond="and (jr_date >= to_date('$p_from','DD.MM.YYYY') or oa_date >= to_date('$p_from','DD.MM.YYYY') )"; - if ( $p_to!="" ) - $cond.="and (jr_date <=to_date('$p_to','DD.MM.YYYY') or oa_date <=to_date('$p_to','DD.MM.YYYY')) "; - - if ($p_from_poste != "" ) - $cond_poste=" and upper(po_name) >= upper('".$p_from_poste."')"; - if ($p_to_poste != "" ) - $cond_poste.=" and upper(po_name) <= upper('".$p_to_poste."')"; - $pa_id_cond=""; - if ( isset ( $this->pa_id) && $this->pa_id !='') - $pa_id_cond= "pa_id=".$this->pa_id." and"; - $sql=" - - select oa_id, - po_name, - oa_description, - po_description, - oa_debit, - (case when jr_date is not null then to_char(jr_date,'DD.MM.YYYY') else to_char(oa_date,'DD.MM.YYYY') end ) as oa_date, - oa_amount, - oa_group, - j_id , - jr_internal, - jr_id, - jr_comment, - j_poste, - jrnx.f_id, - ( select ad_value from fiche_Detail where f_id=jrnx.f_id and ad_id=23) as qcode, - jr_pj_number - from operation_analytique as B join poste_analytique using(po_id) - left join jrnx using (j_id) - left join jrn on (j_grpt=jr_grpt_id) - where $pa_id_cond oa_amount <> 0.0 $cond $cond_poste - order by jr_date,oa_group,oa_debit desc,oa_id"; - - $RetSql=$this->db->exec_sql($sql); - $array=Database::fetch_all($RetSql); - return $array; - } - - /*\brief show the HTML table for the operation - */ - function html_table($p_from) - { - if ($p_from=="") - { - $from=""; - $to=""; - } - else - { - $p=new Periode($this->db); - list($from,$to)=$p->get_date_limit($p_from); - } - - $array=$this->get_list($from,$to); - if ( empty($array) ) - return "Pas d'enregistrement trouvé"; - - // navigation_bar - $step=$_SESSION['g_pagesize']; - $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; - $bar=navigation_bar($offset+1,count($array),$step,$page); - - if ( $step !=-1) - $view=array_splice($array,$offset,$step); - else - $view=$array; - - $gDossier=dossier::id(); - $ret=""; - $ret.=$bar; - - $count=0; - $group=0; - $oldgroup=0; - $oldjrid=0; - - foreach ($view as $row) - { - $group=$row['oa_group']; - if ( $group !=$oldgroup ) - { - if ( $oldgroup!=0 ) - { - - $efface=new IButton(); - $efface->javascript="anc_remove_operation(".$gDossier.",".$oldgroup.")"; - $efface->name="Efface"; - $efface->label="Efface"; - $ret.="".$efface->input().""; - - $this->oa_group=$oldgroup; - $jr_id=$this->get_jrid(); - - if ( $jr_id != 0) - { - // get the old jr_id - $detail=new IButton(); - $detail->javascript="viewOperation($jr_id,$gDossier)"; - $detail->name="Detail"; - $detail->label="Detail"; - $ret.="".$detail->input().""; - } - $ret.=''; - - } - $ret.=''; - - $ret.="". - td($row['oa_date']). - "". - td(); - - $ret.="". - - $oldgroup=$group; - - } - - $class=($count%2==0)?"odd":"even"; - $count++; - $cred= ( $row['oa_debit'] == 'f')?"CREDIT":"DEBIT"; - $ret.=""; - $ret.= ""; - - $ret.=td(h($row['po_description'])); - - $ret.='". - "". - - ""; - } - - - $efface=new IButton(); - $efface->javascript="anc_remove_operation("."$gDossier,".$oldgroup.")"; - $efface->name="Efface"; - $efface->label="Efface"; - $ret.=""; - // get the old jr_id - $this->oa_group=$oldgroup; - $jr_id=$this->get_jrid(); - if ( $jr_id != 0 ) - { - $detail=new IButton(); - $detail->javascript="modifyOperation($jr_id,'".$gDossier."')"; - $detail->name="Detail"; - $detail->label="Detail"; - $ret.=""; - } - $ret.='
    ". - HtmlInput::detail_op($row['jr_id'], h($row['oa_description']." ".$row['jr_pj_number'])). - "". - "Groupe id : ".$row['oa_group']. - "
    ". - h($row['po_name']). - "'. nbm($row['oa_amount']). - "". - $cred. - "
    ".$efface->input()."".$detail->input()."
    '; - $ret.=$bar; - return $ret; - } - /*!\brief retrieve an operation thanks a jrnx.j_id - * \param the jrnx.j_id - * \return null if nothing is found other an array - */ - function get_by_jid($p_jid) - { - $array=array(); - $a_plan=$this->db->get_array('select pa_id from plan_analytique order by pa_id'); - $res=array(); - /* - * For one oa_row - */ - $a_rowcount=$this->db->get_array("select distinct oa_row " - ." from operation_analytique where j_id=$1 order by oa_row", array($p_jid)); - - for ($i=0; $idb->get_array(' - select distinct oa_id, - po_id, - oa_amount, - oa_description, - oa_debit, - j_id, - oa_group, - oa_date, - pa_id, - oa_row, - oa_positive - from operation_analytique join poste_analytique using (po_id) - where - j_id=$1 and oa_row = $2 - order by j_id,oa_row', - array($p_jid, $a_rowcount[$i]['oa_row'])); - - // the first row we found will be the template - $template=$a_existing[0]; - /* - * For each plan - */ - for ($j=0; $jdb->get_array(' - select distinct oa_id, - po_id, - oa_amount, - oa_description, - oa_debit, - j_id, - oa_group, - oa_date, - pa_id, - oa_row, - oa_positive - from operation_analytique join poste_analytique using (po_id) - where - j_id=$1 and oa_row = $2 and pa_id=$3', array($p_jid, - $a_rowcount[$i]['oa_row'], - $a_plan[$j]['pa_id'] - ) - ); - if (count($a_fetch)==0) - { - $a_fetch=$template; - $a_fetch['pa_id']=$a_plan[$j]['pa_id']; - $a_fetch['po_id']=-1; - $a_fetch['oa_id']=''; - $res[]=$a_fetch; - } - else - if (count($a_fetch)==1) - { - $res[]=$a_fetch[0]; - } - } - } - - foreach ($res as $row) - { - $a=new Anc_Operation($this->db); - foreach ($row as $attr=> $value) - { - $a->$attr=$row[$attr]; - } - $array[]=clone $a; - } - - - return $array; - } - - /*!\brief modify an op from modify_op.php - * - */ - function update_from_jrnx($p_po_id) - { - $a=$this->get_by_jid($this->j_id); - if ( $a == null ) - { - // retrieve data from jrnx - $sql="select jr_date,j_montant,j_debit from jrnx ". - " join jrn on (jr_grpt_id = j_grpt) ". - "where j_id=".$this->j_id; - $res=$this->db->exec_sql($sql); - if (Database::num_row($res) == 0 ) return; - $row=Database::fetch_array($res,0); - $this->oa_amount=$row['j_amount']; - $this->oa_date=$row['jr_date']; - $this->oa_debit=$row['j_debit']; - $this->oa_description=$row['jr_comment']; - $this->add(); - } - else - { - foreach ($a as $row ) - { - if ( $row->pa_id == $this->pa_id ) - { - $row->po_id=$p_po_id; - $row->update(); - } - } - } - } - /*!\brief retrieve the jr_id thanks the oa_group */ - function get_jrid() - { - $sql="select distinct jr_id from jrn join jrnx on (j_grpt=jr_grpt_id) join operation_analytique using (j_id) where j_id is not null and oa_group=".$this->oa_group; - $res=$this->db->exec_sql($sql); - if ( Database::num_row($res) == 0 ) return 0; - $ret=Database::fetch_all($res); - return $ret[0]['jr_id']; - } - /*\brief this function get the balance for a certain period - *\param $p_from from date (accountancy period) - *\param $p_to to dat (accountancy period) - *\param $p_plan_id the plan id - */ - function get_balance($p_from,$p_to,$p_plan_id) - { - // for the operation connected to jrnx - $cond=sql_filter_per($this->db,$p_from,$p_to,'p_id','j_date'); - $sql="select oa_id, po_id, oa_amount, oa_debit, j_date from jrnx join operation_analytique using (j_id) - join poste_analytique using (po_id) - where - $cond and j_id is not null and pa_id=$p_plan_id"; - - // OD - $cond=sql_filter_per($this->db,$p_from,$p_to,'p_id','oa_date'); - $sql="union select oa_id, po_id, oa_amount, oa_debit,oa_date from - operation_analytique - join poste_analytique using (po_id) - where j_id is null and - $cond and pa_id=$p_plan_id "; - try - { - $res=$this->db->exec_sql($sql); - $array=Database::fetch_all($res); - } - catch (Exception $e) - { - var_dump($e); - } - } - /*!\brief display the form for PA - *\param $p_array contains POST (or GET) data (val[] hplan[][] op[]) - * \param $p_null = 1 if PA optional otherwise 0 mandatory - * \param $p_mode == form 1 ==> read/write otherwise 0==>readonly - * \param $p_seq number of the row - * \param $p_amount amount - * \param $p_id operation is detailled in a HTML popup, if several - * are opened, the tableid MUST be different. So we need to use a new parameter - * \param $p_add_button true, show the button, false don't display them - * \see save_form_plan - @note - - op is an array containing the line number - - pa_id is an array of the existing array - - hplan is an array of the POSTE ANALYTIQUE id used, the size of hplan from 0 to x, - x can be bigger than the number of plan id - - val contains the amount by row inside the table. One operation (j_id) you can have several rows - @code - 0 => - array - 'op' => int 200 - 'pa_id' => - array - 0 => string '14' (length=2) - 1 => string '15' (length=2) - 'hplan' => - array - 1 => - array - 0 => string '25' (length=2) - 1 => string '26' (length=2) - 'val' => - array - 1 => - array - 0 => string '100.0000' (length=8) - - @endcode - */ - function display_form_plan($p_array,$p_null,$p_mode,$p_seq,$p_amount,$p_id='',$p_add_button=true) - { - if ( $p_array != null) - extract ($p_array); - $result=""; - $plan=new Anc_Plan($this->db); - $a_plan=$plan->get_list(" order by pa_id "); - if ( empty ($a_plan) ) return ""; - $table_id="t".$p_seq; - $hidden=new IHidden(); - - $readonly=($p_mode==1)?false:true; - - $result.=$hidden->input('amount_'.$table_id,$p_amount); - if ( $p_mode==1 ) - $result.=''; - else - $result.='
    '; - $result.="".$plan->header().""; - - /* compute the number of rows */ - $nb_row=(isset($val[$p_seq]))?count($val[$p_seq]):1; - $count=0; - - $remain=abs($p_amount); - $ctrl_remain="remain".$this->in_div.$table_id; - - for ( $i=0; $i < $nb_row;$i++) - { - $result.=''; - - foreach ($a_plan as $r_plan) - { - - $array=$this->db->make_array( - "select po_id as value,". - " html_quote(po_name) as label from poste_analytique ". - " where pa_id = ".$r_plan['id']. - " order by po_name",$p_null); - $select =new ISelect("hplan[".$p_seq."][]",$array); - $select->table=0; - // view only or editables - if ( $p_mode==1 ) - { - // editable - $select->readonly=false; - if ( isset($hplan) && isset($hplan[$p_seq][$count]) ){ - $select->selected=$hplan[$p_seq][$count]; - - } - } - else - { - if ( isset($hplan) && isset($hplan[$p_seq][$count]) ){ - $select->selected=$hplan[$p_seq][$count]; - } - // view only - $select->readOnly=true; - } - if ($p_mode==1) - $result.=''; - else - $result.=''; - $count++; - - - } - $value=new INum(); - $value->javascript='onchange="format_number(this);anc_refresh_remain(\''.$this->in_div.$table_id.'\',\''.$p_seq.'\')"'; - $value->name="val[".$p_seq."][]"; - $value->size=6; - $value->value=(isset($val[$p_seq][$i]))?$val[$p_seq][$i]:abs($p_amount); - $value->readOnly=($p_mode==1)?false:true; - $remain=bcsub($remain,$value->value); - $result.=''; - - $result.=""; - } - - $result.="
    montant
    '.$select->input().''.$select->display().''.$value->input().'
    "; - - if ($p_add_button && $p_mode == 1) - { - $style_remain=($remain==0)?'style="color:green"':' style="color:red"'; - $result.=" Reste à imputer = ". - ''. - $remain.''; - // add a button to add a row - $button=new IButton(); - $button->javascript="add_row('".$p_id."$table_id',$p_seq);"; - $button->name="js".$p_id.$p_seq; - $button->label=_("Nouvelle ligne"); - - $result.="
    ".$button->input(); - /** - * Add a button for distribution key - * - */ - $ledger=HtmlInput::default_value_post("p_jrn", 0); - if ($ledger==0) { - $ledger=$this->db->get_value('select j_jrn_def from jrnx where j_id=$1',array($this->j_id)); - } - $gDossier=Dossier::id(); - $button_key=new IButton(); - $button_key->javascript="anc_key_choice(".$gDossier.",'".$p_id."$table_id',$p_amount,'".$ledger."');"; - $button_key->name="js".$p_id.$p_seq; - $button_key->label=_("Clef"); - $result .= $button_key->input(); - - } - - return $result; - } - /** - * Save the ND VAT with prorata - * - * @param $p_array usually $_POST - * @param $p_item item of the form - * @param $p_j_id jrnx.j_id concerned writing - * @param $p_nd amount nd vat - * @see Anc_Operation::save_form_plan_vat_nd - * @return type - */ - function save_form_plan_vat_nd($p_array,$p_item,$p_j_id,$p_nd) - { - bcscale(4); - extract($p_array); - if (! isset ($hplan) ) return; - - if ( ! isset(${'amount_t'.$p_item}) ) - throw new Exception ('amount not set'); - - $tot=0; - /* variable for in array - pa_id array of existing pa_id - hplan double array with the pa_id (column) - val double array by row with amount - op contains sequence - p_item is used to identify what op is concerned - */ - /* echo "j_id = $j_id p_item = $p_item hplan=".var_export($hplan[$p_item],true)." val = ".var_export($val[$p_item],true).'
    '; */ - /* for each row */ - // for ($i=0;$idb); - $op->po_id=$hplan[$p_item][$e]; - $op->oa_group=$this->oa_group; - $op->j_id=$p_j_id; - $ratio=bcdiv($val[$p_item][$row],${"amount_t".$p_item}); - $amount= bcmul($p_nd, $ratio); - $op->oa_amount=round($amount,2); - $op->oa_debit=$this->oa_debit; - $op->oa_date=$this->oa_date; - - $op->oa_description=$this->oa_description; - $op->oa_row=$row; - $op->oa_jrnx_id_source=$this->oa_jrnx_id_source; - $a_Anc_Operation[]=clone $op; - } - $idx_pa_id++; - } - $nb_op=count($a_Anc_Operation); - bcscale(2); - for ($i=0;$i<$nb_op;$i++) - { - $tot=bcadd($tot,$a_Anc_Operation[$i]->oa_amount); - } - if ( $tot != $p_nd ) - { - $diff= bcsub($tot, $p_nd); - $a_Anc_Operation[0]->oa_amount=bcsub($a_Anc_Operation[0]->oa_amount,$diff); - } - for ($i=0;$i<$nb_op;$i++) - { - $a_Anc_Operation[$i]->add(); - } - } - /*!\brief it called for each item, the data are taken from $p_array - * data and set before in this. - * \param $p_item if the item nb for each item (purchase or selling - * merchandise) - * \param $p_array structure - * \verbatim - nb_tA A is the number of the item it contains the number of - rows of CA for this card - valAlR amount for the CA (item A row R) - ta_AoCrow_R contains the value of the pa_id and po_id for this - row with the form pa_id_po_id %d_%d - *\endverbatim - * \attention The idea is one j_id matches several oa_id, - * serveral data are set before the call : - * -j_id - * -oa_debit - * -oa_group - * -oa_date - * -oa_description - * - */ - function save_form_plan($p_array,$p_item,$p_j_id) - { - extract($p_array); - if (! isset ($hplan) ) return; - /* variable for in array - pa_id array of existing pa_id - hplan double array with the pa_id (column) - val double array by row with amount - op contains sequence - p_item is used to identify what op is concerned - */ - /* echo "j_id = $j_id p_item = $p_item hplan=".var_export($hplan[$p_item],true)." val = ".var_export($val[$p_item],true).'
    '; */ - /* for each row */ - // for ($i=0;$idb); - $op->po_id=$hplan[$p_item][$e]; - $op->oa_group=$this->oa_group; - $op->j_id=$p_j_id; - $op->oa_amount=$val[$p_item][$row]; - $op->oa_debit=$this->oa_debit; - $op->oa_date=$this->oa_date; - - $op->oa_description=$this->oa_description; - $op->oa_row=$row; - $op->add(); - } - $idx_pa_id++; - } - // } - } - - /** - *@brief save a whole form from a update box - *@param $p_array for ALL j_id - *@return - *@note - *@see save_form_plan to_request - @code - - @endcode - */ - function save_update_form($p_array) - { - extract($p_array); - for ($i = 0; $i < count($op); $i++) - { - /* clean operation_analytique */ - $this->db->exec_sql('delete from operation_analytique where j_id=$1', array($op[$i])); - - /* get missing data for adding */ - $a_missing = $this->db->get_array("select to_char(jr_date,'DD.MM.YYYY') - as mdate,j_montant,j_debit,jr_comment ,j_poste - from jrnx join jrn on (j_grpt=jr_grpt_id) where j_id=$1", array($op[$i])); - $missing = $a_missing[0]; - - $this->oa_description = $missing['jr_comment']; - $this->j_id = $op[$i]; - $group = $this->db->get_next_seq("s_oa_group"); /* for analytic */ - $this->oa_group = $group; - $this->oa_date = $missing['mdate']; - $this->save_form_plan($p_array, $i, $op[$i]); - - // There is ND VAT amount - $a_nd = $this->db->get_array('select j_id from operation_analytique - where oa_jrnx_id_source=$1', array($op[$i])); - if (count($a_nd) > 0) - { - // for each ND VAT amount - for ($e=0;$edb->exec_sql('delete from operation_analytique where j_id=$1', array($a_nd[$e]['j_id'])); - /* get missing data for adding */ - $a_missing_vat = $this->db->get_array("select to_char(jr_date,'DD.MM.YYYY') as mdate,j_montant,j_debit,jr_comment from jrnx join jrn on (j_grpt=jr_grpt_id) where j_id=$1", array($a_nd[$e]['j_id'])); - $missing_vat = $a_missing_vat[0]; - $this->oa_debit = 't'; - $this->oa_description = $missing_vat['jr_comment']; - $this->j_id = $op[$i]; - $group = $this->db->get_next_seq("s_oa_group"); /* for analytic */ - $this->oa_group = $group; - $this->oa_date = $missing_vat['mdate']; - $this->oa_jrnx_id_source=$op[$i]; - $p_array['amount_t'.$i]=$missing['j_montant']; - $this->save_form_plan_vat_nd($p_array, $i, $a_nd[$e]['j_id'],$missing_vat['j_montant']); - } - } - } - } - - /*\brief transform a array of operation into a array usage by - *display_form_plan & save_form_plan - *\param $p_array array of operation - *\param $p_line line - *\return an array complying with \see save_form_plan - */ - function to_request ($p_array,$p_line) - { - $result=array(); - $result[]=array('op'=>$this->j_id); - $pa_id=array(); - - /* First add the pa_id */ - for ($i=0;$i < count($p_array);$i++) - { - if ( in_array($p_array[$i]->pa_id,$pa_id)==false) - $pa_id[]=$p_array[$i]->pa_id; - } - $result['pa_id']=$pa_id; - - /* add the hplan */ - $seq=0; - for ($i=0;$i < count($p_array);$i++) - { - $hplan[$p_line][$i]=$p_array[$i]->po_id; - } - $result['hplan']=$hplan; - /* Add the amount */ - $idx_pa=0; - $jrn_def=$this->db->get_value('select jrn_def_type from jrnx join jrn_def on (j_jrn_def=jrn_def_id) where j_id=$1',array($this->j_id)); - for ($i=0;$i < count($p_array);$i++) - { - - /* - * For the bank, negatif are always on the debit and positif on the credit - */ - if ( $jrn_def != 'FIN') - { - $val[$p_line][$p_array[$i]->oa_row]=($p_array[$i]->oa_positive=='Y')?$p_array[$i]->oa_amount:($p_array[$i]->oa_amount*(-1)); - } - else - { - $val[$p_line][$p_array[$i]->oa_row]=$p_array[$i]->oa_amount; - } - } - $result['val']=$val; - return $result; - } - /*! - * \brief delete from operation_analytique - * \param $p_jid the operation_analytique.j_id field - * - * \return none - */ - function delete_by_jid($p_jid) - { - $sql="delete from operation_analytique where j_id=$p_jid"; - $this->db->exec_sql($sql); - } - /*\brief Display a table with analytic accounting in - * detail of operation - *@note $this->j_id must be set - *\param $p_mode 0 = readonly or 1=writable - *\param $p_amount amount - *\param $p_id unique id - *@see display_form_plan - *\return string to display - */ - function display_table($p_mode,$p_amount,$p_id) - { - static $seq=-1; /* first seq == 0 */ - $seq++; - - $array=$this->get_by_jid($this->j_id) ; - if ( $array != null ) - { - $request=$this->to_request($array,$seq); - return "".$this->display_form_plan($request,1,$p_mode,$seq,$p_amount,$p_id).""; - } - else - { - return ''.$this->display_form_plan(null,1,$p_mode,$seq,$p_amount,$p_id).""; - } - return ""; - - } -/////////////////////////////////////////////////////////////////////////// -// TEST -/////////////////////////////////////////////////////////////////////////// - /*\brief test the class - *\param - *\param - *\return - */ - function test_me() - { - $cn=new Database(dossier::id()); - $anco=new Anc_Operation($cn); - $j_id=200; - $anco->j_id=$j_id; - $array=$anco->get_by_jid($j_id); - $a=$anco->to_request($array,1); - echo '
    '; - echo dossier::hidden(); - echo HtmlInput::hidden('j_id',$j_id); - echo HtmlInput::hidden('test_select',$_REQUEST['test_select']); - echo $anco->display_table(1,15002,0); - echo ''; - echo '
    '; - if ( isset($_REQUEST['save'])) - { - echo "to_save"; - var_dump($_REQUEST); - } - var_dump($a); - - } - -} diff --git a/sources/include/class_anc_plan.php b/sources/include/class_anc_plan.php deleted file mode 100644 index ab6646b..0000000 --- a/sources/include/class_anc_plan.php +++ /dev/null @@ -1,248 +0,0 @@ -db=$p_cn; - $this->id=$p_id; - $this->name=""; - $this->description=""; - $this->get(); - } - /*!\brief get the list of all existing PA - * \return an array of PA (not object) - * - */ - function get_list($p_order=" order by pa_name") - { - $array=array(); - $sql="select pa_id as id,pa_name as name,". - "pa_description as description from plan_analytique $p_order"; - $ret=$this->db->exec_sql($sql); - $array=Database::fetch_all($ret); - return $array; - } - - function get() - { - if ( $this->id==0) return; - - $sql="select pa_name,pa_description from plan_analytique where pa_id=".$this->id; - $ret= $this->db->exec_sql($sql); - if ( Database::num_row($ret) == 0) - { - return; - } - $a= Database::fetch_array($ret,0); - $this->name=$a['pa_name']; - $this->description=$a['pa_description']; - - } - - function delete() - { - if ( $this->id == 0 ) return; - $this->db->exec_sql("delete from plan_analytique where pa_id=".$this->id); - } - - function update() - { - if ( $this->id==0) return; - $name=sql_string($this->name); - if ( strlen($name) == 0) - return; - - $description=sql_string($this->description); - $this->db->exec_sql("update plan_analytique set pa_name=$1, - pa_description=$2 where pa_id=$3",array($name,$description,$this->id)); - } - - function add() - { - $name=sql_string($this->name); - if ( strlen($name) == 0) - return; - if ( $this->isAppend() == false) return; - $description=sql_string($this->description); - $this->db->exec_sql("insert into plan_analytique(pa_name,pa_description)". - " values (". - "'".$name."',". - "'".$description."')"); - $this->id=$this->db->get_current_seq('plan_analytique_pa_id_seq'); - - } - function form() - { - - $wName=new IText('pa_name',$this->name); - - $wName->table=1; - $wDescription=new IText('pa_description',$this->description); - $wDescription->table=1; - $wId=new IHidden("pa_id",$this->id); - $ret=""; - $ret.=''.td(_('Nom')).$wName->input().''; - $ret.="".td(_('Description')).$wDescription->input().""; - $ret.="
    "; - $ret.=$wId->input(); - return $ret; - } - function isAppend() - { - $count=$this->db->get_value("select count(pa_id) from plan_analytique"); - - if ( $count > 10 ) - return false; - else - return true; - } - /*!\brief get all the poste related to the current - * Analytic plan - * \return an array of Poste_analytic object - */ - function get_poste_analytique($p_order="") - { - $sql="select po_id,po_name from poste_analytique where pa_id=".$this->id." $p_order"; - $r=$this->db->exec_sql($sql); - $ret=array(); - if ( Database::num_row($r) == 0 ) - return $ret; - - $all=Database::fetch_all($r); - foreach ($all as $line) - { - $obj=new Anc_Account($this->db,$line['po_id']); - $obj->get_by_id(); - $ret[]=clone $obj; - } - return $ret; - } - /*!\brief show the header for a table for PA - * \return string like name... - */ - function header() - { - $res=""; - $a_plan=$this->get_list(" order by pa_id"); - if ( empty($a_plan)) return ""; - foreach ($a_plan as $r_plan) - { - $res.="".h($r_plan['name']).""; - } - return $res; - } - function count() - { - $a=$this->db->count_sql("select pa_id from plan_analytique"); - return $a; - } - function exist() - { - $a=$this->db->count_sql("select pa_id from plan_analytique where pa_id=". - Database::escape_string($this->pa_id)); - - return ($a==0)?false:true; - - } - /** - *@brief return an HTML string containing hidden input type to - * hold the differant PA_ID - *@param $p_array contains a array, it is the result of the fct - * Anc_Plan::get_list - *@return html string - *@see Anc_Plan::get_list - */ - static function hidden($p_array) - { - $r=''; - for ($i_anc=0;$i_anc Plan analytique : test"; - echo "clean"; - $cn->exec_sql("delete from plan_analytique"); - - $p=new Anc_Plan($cn); - echo "

    Add

    "; - $p->name="Nouveau 1"; - $p->description="C'est un test"; - echo "Add
    "; - $p->add(); - $p->name="Nouveau 2"; - $p->add(); - $pa_id=$p->id; - echo $p->id."/"; - $p->name="Nouveau 3"; - $p->add(); - echo $p->id."/"; - - - $p->name="Nouveau 4"; - $p->add(); - echo $p->id; - - echo "

    get

    "; - $p->get(); - var_dump($p); - echo "

    Update

    "; - $p->name="Update "; - $p->description="c'est change"; - $p->update(); - $p->get(); - var_dump($p); - echo "

    get_list

    "; - $a=$p->get_list(); - var_dump($a); - echo "

    delete

    "; - $p->delete(); - - - } -} - -?> diff --git a/sources/include/class_anc_print.php b/sources/include/class_anc_print.php deleted file mode 100644 index f9fc3e5..0000000 --- a/sources/include/class_anc_print.php +++ /dev/null @@ -1,224 +0,0 @@ -db=$p_cn; - $this->from=""; - $this->to=""; - $this->from_poste=""; - $this->to_poste=""; - $this->has_data=0; - - } - /*! - * \brief complete the object with the data in $_REQUEST - */ - function get_request() - { - if ( isset($_REQUEST['from'])) - $this->from=$_REQUEST['from']; - - if ( isset($_REQUEST['to'])) - $this->to=$_REQUEST['to']; - - if ( isset($_REQUEST['from_poste'])) - $this->from_poste=$_REQUEST['from_poste']; - - if ( isset($_REQUEST['to_poste'])) - $this->to_poste=$_REQUEST['to_poste']; - if ( isset($_REQUEST['pa_id'])) - $this->pa_id=$_REQUEST['pa_id']; - else - $this->pa_id=""; - - } - /*! - * \brief Compute the form to display - * \param $p_hidden hidden tag to be included (gDossier,...) - * - * - * \return string containing the data - */ - function display_form($p_hidden="") - { - /* if there is no analytic plan return */ - $pa=new Anc_Plan($this->db); - if ( $pa->count() == 0 ) - { - echo '
    '; - echo '

    '._('Aucun plan défini').'

    '; - echo '
    '; - return; - } - - $from=new IDate('from','from'); - $from->size=10; - $from->value=$this->from; - - $to=new IDate('to','to'); - $to->value=$this->to; - $to->size=10; - - $from_poste=new IAncCard('from_poste','from_poste'); - $from_poste->size=10; - $from_poste->plan_ctl='pa_id'; - $from_poste->value=$this->from_poste; - - $to_poste=new IAncCard('to_poste','to_poste'); - $to_poste->value=$this->to_poste; - $to_poste->size=10; - - $hidden=new IHidden(); - $r=dossier::hidden(); - $r.=$hidden->input("result","1"); - - $r.=HtmlInput::request_to_hidden(array('ac')); - $r.=$p_hidden; - $plan=new Anc_Plan($this->db); - $plan_id=new ISelect("pa_id"); - $plan_id->value=$this->db->make_array("select pa_id, pa_name from plan_analytique order by pa_name"); - $plan_id->selected=$this->pa_id; - $choose_from=new IButton(); - $choose_from->name=_("Choix Poste"); - $choose_from->label=_("Recherche"); - $choose_from->javascript="onClick=search_ca(".dossier::id().",'from_poste','pa_id')"; - - - $choose_to=new IButton(); - $choose_to->name=_("Choix Poste"); - $choose_to->label=_("Recherche"); - - - $choose_to->javascript="onClick=search_ca(".dossier::id().",'to_poste','pa_id')"; - - $r.=HtmlInput::request_to_hidden(array('ac')); - ob_start(); - ?> - - - - - - - - - - -
    - - - input(); - ?> -
    - - - input(); - ?> -
    - - input(); - echo HtmlInput::infobulle(42); - ?> - - -input(); - $r.=$choose_from->input(); - $r.=_(" et l'activité ").$to_poste->input(); - $r.=$choose_to->input(); - - $r.='
    '; - return $r; - } - /*! - * \brief Set the filter (account_date) - * - * \return return the string to add to load - */ - - function set_sql_filter() - { - $sql=""; - $and=" and "; - if ( $this->from != "" ) - { - $sql.="$and a.oa_date >= to_date('".$this->from."','DD.MM.YYYY')"; - } - if ( $this->to != "" ) - { - $sql.=" $and a.oa_date <= to_date('".$this->to."','DD.MM.YYYY')"; - } - - return $sql; - - } - function check() - { - - /* - * check date - */ - if (($this->from != '' && isDate ($this->from) == 0) - || - ($this->to != '' && isDate ($this->to) == 0)) - return -1; - - return 0; - } - - -} diff --git a/sources/include/class_anc_table.php b/sources/include/class_anc_table.php deleted file mode 100644 index 877c836..0000000 --- a/sources/include/class_anc_table.php +++ /dev/null @@ -1,329 +0,0 @@ -value=array( - array('value'=>1,'label'=>'Par fiche'), - array('value'=>2,'label'=>'Par poste comptable') - ); - $icard->selected=$this->card_poste; - $r.=$icard->input(); - $r.=HtmlInput::request_to_hidden(array('ac')); - return $r; - } - - - /** - * load the data - * does not return anything but give a value to this->aheader and this->arow - */ - function load_poste() - { - $sql_from_poste=($this->from_poste!='')?" and po.po_name >= upper('".Database::escape_string($this->from_poste)."')":''; - $sql_to_poste=($this->to_poste!='')?" and po.po_name <= upper('".Database::escape_string($this->to_poste)."')":''; - $this->db->exec_sql('create temporary table table_analytic as select * from comptaproc.table_analytic_account(\''.$this->from.'\',\''.$this->to.'\')'); - - $header="select distinct po_id,po_name from table_analytic - where - pa_id=$1 ".$sql_from_poste.$sql_to_poste." order by po_name"; - $this->aheader=$this->db->get_array($header,array($this->pa_id)); - - $this->arow=$this->db->get_array("select distinct card_account,name - from table_analytic - where - pa_id=$1 ".$sql_from_poste.$sql_to_poste." order by card_account",array($this->pa_id)); - - $this->sql='select sum_amount from table_analytic where card_account=$1 and po_id=$2 and pa_id='.$this->pa_id.' '.$sql_from_poste.$sql_to_poste; - } - - /** - * load the data - * does not return anything but give a value to this->aheader and this->arow - */ - function load_card() - { - $sql_from_poste=($this->from_poste!='')?" and po.po_name >= upper('".Database::escape_string($this->from_poste)."')":''; - $sql_to_poste=($this->to_poste!='')?" and po.po_name <= upper('".Database::escape_string($this->to_poste)."')":''; - $this->db->exec_sql('create temporary table table_analytic as select * from comptaproc.table_analytic_card(\''.$this->from.'\',\''.$this->to.'\')'); - - $header="select distinct po_id,po_name from table_analytic - where - pa_id=$1 ".$sql_from_poste.$sql_to_poste." order by po_name"; - $this->aheader=$this->db->get_array($header,array($this->pa_id)); - - $this->arow=$this->db->get_array("select distinct f_id,card_account,name from table_analytic - where - pa_id=$1 ".$sql_from_poste.$sql_to_poste." order by name",array($this->pa_id)); - $this->sql='select sum_amount from table_analytic where f_id=$1 and po_id=$2 and pa_id='.$this->pa_id.' '.$sql_from_poste.$sql_to_poste; - } - /** - *@brief display the button export CSV - *@param $p_hidden is a string containing hidden items - *@return html string - */ - function show_button($p_hidden) - { - $r=""; - $r.= '
    '; - $r.= HtmlInput::hidden("act","CSV:AncTable"); - $r.= HtmlInput::hidden("to",$this->to); - $r.= HtmlInput::hidden("from",$this->from); - $r.= HtmlInput::hidden("pa_id",$this->pa_id); - $r.= HtmlInput::hidden("from_poste",$this->from_poste); - $r.= HtmlInput::hidden("to_poste",$this->to_poste); - $r.= HtmlInput::hidden("card_poste",$this->card_poste); - $r.= $p_hidden; - $r.= dossier::hidden(); - $r.=HtmlInput::submit('bt_csv',"Export en CSV"); - $r.= '
    '; - return $r; - } - function display_html() - { - bcscale(2); - if ( $this->check() != 0) - { - alert('Désolé mais une des dates données n\'est pas valide'); - return; - } - - if ( $this->card_poste=='1') - { - $this->load_card(); - - echo ''; - echo ''; - echo th('Fiche'); - foreach ($this->aheader as $h) - { - echo ''; - } - echo th('Total',' style="text-align:right"'); - echo ''; - /* - * Show all the result - */ - $tot_global=0; - for ($i=0;$iarow);$i++) - { - $tr=($i%2==0)?'':''; - echo $tr; - echo td(HtmlInput::history_card($this->arow[$i]['f_id'],$this->arow[$i]['card_account'].' '.$this->arow[$i]['name'])); - $tot_row=0; - for ($x=0;$xaheader);$x++) - { - $amount=$this->db->get_value($this->sql,array($this->arow[$i]['f_id'],$this->aheader[$x]['po_id'])); - if ($amount==null)$amount=0; - if ( isset($tot_col[$x])) - { - $tot_col[$x]=bcadd($tot_col[$x],$amount); - } - else - { - $tot_col[$x]=$amount; - } - echo td(nbm($amount),' class="num" '); - $tot_row=bcadd($tot_row,$amount); - } - echo td(nbm($tot_row),' class="num"'); - $tot_global=bcadd($tot_global,$tot_row); - echo ''; - - - } - echo ''; - echo td('Totaux'); - for ($i=0;$iaheader);$i++) - { - echo td(nbm($tot_col[$i]),' class="num"'); - } - echo td(nbm($tot_global),' class="num input_text notice" '); - echo ''; - echo '
    '.h($h['po_name']).'
    '; - } - if ( $this->card_poste=='2') - { - $this->load_poste(); - - echo ''; - echo ''; - echo th('poste comptable '); - foreach ($this->aheader as $h) - { - echo ''; - } - echo th('Total',' style="text-align:right"'); - echo ''; - /* - * Show all the result - */ - $tot_global=0; - for ($i=0;$iarow);$i++) - { - $tr=($i%2==0)?'':''; - echo $tr; - echo td(HtmlInput::history_account($this->arow[$i]['card_account'],$this->arow[$i]['card_account'].' '.$this->arow[$i]['name'])); - $tot_row=0; - for ($x=0;$xaheader);$x++) - { - $amount=$this->db->get_value($this->sql,array($this->arow[$i]['card_account'],$this->aheader[$x]['po_id'])); - if ($amount==null)$amount=0; - if ( isset($tot_col[$x])) - { - $tot_col[$x]=bcadd($tot_col[$x],$amount); - } - else - { - $tot_col[$x]=$amount; - } - echo td(nbm($amount),' class="num" '); - $tot_row=bcadd($tot_row,$amount); - } - echo td(nbm($tot_row),' class="num"'); - $tot_global=bcadd($tot_global,$tot_row); - echo ''; - - - } - echo ''; - - echo td('Totaux'); - for ($i=0;$iaheader);$i++) - { - echo td(nbm($tot_col[$i]),' class="num"'); - } - echo td(nbm($tot_global),' class="num input_text notice" '); - echo ''; - echo '
    '.h($h['po_name']).'
    '; - - } - - } - function export_csv() - { - bcscale(2); - if ( $this->check () != 0 ) {throw new Exception ( "DATE INVALIDE");} - - if ( $this->card_poste=='1') - { - $this->load_card(); - - echo '"Fiche"'; - foreach ($this->aheader as $h) - { - echo ';"'.$h['po_name'].'"'; - } - echo ';"Total"'; - printf("\r\n"); - /* - * Show all the result - */ - - for ($i=0;$iarow);$i++) - { - - printf('"%s"',$this->arow[$i]['card_account'].' '.$this->arow[$i]['name']); - $tot_row=0; - for ($x=0;$xaheader);$x++) - { - $amount=$this->db->get_value($this->sql,array($this->arow[$i]['f_id'],$this->aheader[$x]['po_id'])); - if ($amount==null)$amount=0; - if ( isset($tot_col[$x])) - { - $tot_col[$x]=bcadd($tot_col[$x],$amount); - } - else - { - $tot_col[$x]=$amount; - } - printf(";%s",nb($amount)); - $tot_row=bcadd($tot_row,$amount); - } - printf(";%s",nb($tot_row)); - printf("\r\n"); - - - } - } - if ( $this->card_poste=='2') - { - $this->load_poste(); - - echo '"Poste"'; - foreach ($this->aheader as $h) - { - echo ';"'.$h['po_name'].'"'; - } - echo ';"Total"'; - printf("\r\n"); - /* - * Show all the result - */ - - for ($i=0;$iarow);$i++) - { - - printf('"%s"',$this->arow[$i]['card_account'].' '.$this->arow[$i]['name']); - $tot_row=0; - for ($x=0;$xaheader);$x++) - { - $amount=$this->db->get_value($this->sql,array($this->arow[$i]['card_account'],$this->aheader[$x]['po_id'])); - if ($amount==null)$amount=0; - if ( isset($tot_col[$x])) - { - $tot_col[$x]=bcadd($tot_col[$x],$amount); - } - else - { - $tot_col[$x]=$amount; - } - printf(";%s",nb($amount)); - $tot_row=bcadd($tot_row,$amount); - } - printf(";%s",nb($tot_row)); - printf("\r\n"); - - - } - } - - } - -} \ No newline at end of file diff --git a/sources/include/class_anticipation.php b/sources/include/class_anticipation.php deleted file mode 100644 index e5ba8ce..0000000 --- a/sources/include/class_anticipation.php +++ /dev/null @@ -1,452 +0,0 @@ -1,"val2"=>"Seconde valeur","val3"=>0); */ - private static $variable=array ("id"=>"f_id","name"=>"f_name"); - private $cn; - var $cat; /*!< array of object categorie (forecast_cat)*/ - var $item; /*< array of object item (forecast_item) */ - /** - * @brief constructor - * @param $p_init Database object - */ - function __construct ($p_init,$p_id=0) - { - $this->cn=$p_init; - $this->f_id=$p_id; - } - public function get_parameter($p_string) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - return $this->$idx; - } - else - throw new Exception("Attribut inexistant $p_string"); - } - public function set_parameter($p_string,$p_value) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - $this->$idx=$p_value; - } - else - throw new Exception("Attribut inexistant $p_string"); - - - } - public function get_info() - { - return var_export(self::$variable,true); - } - public function verify() - { - // Verify that the elt we want to add is correct - // the f_name must be unique (case insensitive) - return 0; - } - public function save() - { - /* please adapt */ - if ( $this->get_parameter("id") == 0 ) - $this->insert(); - else - $this->update(); - } - - public function insert() - { - if ( $this->verify() != 0 ) return; - } - - public function update() -{} - - public function load() - {} - /** - *@brief Display the result of the forecast - *@param $p_periode - *@return HTML String with the code - */ - public function display() - { - bcscale(4); - $forecast=new Forecast($this->cn,$this->f_id); - $forecast->load(); - $str_name=h($forecast->get_parameter('name')); - - $start=$forecast->get_parameter('start_date'); - $end=$forecast->get_parameter('end_date'); - - if ( $start=='') throw new Exception (_('Période de début non valable')); - if ( $end=='') throw new Exception (_('Période de fin non valable')); - - $per=new Periode($this->cn,$start); - $str_start=format_date($per->first_day()); - - $per=new Periode($this->cn,$end); - $str_end=format_date($per->last_day()); - - - $r=""; - $aCat=$this->cn->get_array('select fc_id,fc_desc from forecast_cat where f_id=$1 order by fc_order',array($this->f_id)); - $aItem=array(); - $aReal=array(); - $poste=new Acc_Account_Ledger($this->cn,0); - $fiche=new Fiche($this->cn); - $aPeriode=$this->cn->get_array("select p_id,to_char(p_start,'MM.YYYY') as myear from parm_periode - where p_start >= (select p_start from parm_periode where p_id=$start) - and p_end <= (select p_end from parm_periode where p_id=$end) - order by p_start;"); - $error=array(); - for($j=0;$jcn->get_array('select fi_card,fi_account,fi_text,fi_amount,fi_debit from forecast_item where fc_id=$1 and fi_pid=0 order by fi_order ',array($aCat[$j]['fc_id'])); - $aPerMonth[$j]=$this->cn->get_array('select fi_pid,fi_card,fi_account,fi_text,fi_amount,fi_debit from forecast_item where fc_id=$1 and fi_pid !=0 order by fi_order ',array($aCat[$j]['fc_id'])); - - /* compute the real amount for periode */ - for($k=0;$kid=$aItem[$j][$k]['fi_card']; - $amount=$fiche->get_solde_detail("j_tech_per = ".$aPeriode[$l]['p_id']); - if ($aItem[$j][$k]['fi_debit']=='C' && $amount['debit']>$amount['credit']) $amount['solde']=$amount["solde"]*(-1); - if ($aItem[$j][$k]['fi_debit']=='D' && $amount['debit']<$amount['credit']) $amount['solde']=$amount["solde"]*(-1); - - } - else - { - $poste->id=$aItem[$j][$k]['fi_account']; - $aresult=Impress::parse_formula($this->cn,"OK",$poste->id,$aPeriode[$l]['p_id'],$aPeriode[$l]['p_id']); - $tmp_label=$aresult['desc']; - $amount['solde']=$aresult['montant']; - - if ( $tmp_label != 'OK') $error[]="
  • ".$aItem[$j][$k]['fi_text'].$poste->id.'
  • '; - } - $aReal[$j][$k][$l]=$amount['solde']; - } - } - - } - ob_start(); - require_once NOALYSS_INCLUDE.'/template/forecast_result.php'; - $r.=ob_get_contents(); - ob_end_clean(); - return $r; - } - public static function div() - { - $r=''; - return $r; - } - public function delete() - {} - /** - *@brief Display a form for modifying the name or/and the category of an existing - * anticipation - *@return html string with the form - */ - private function form_cat_mod() - { - global $g_user; - $a=new Forecast($this->cn,$this->f_id); - $a->load(); - $name=new IText('an_name'); - $name->value=$a->get_parameter("name"); - $str_name=$name->input(); - $str_action=_('Modification'); - - $start_date=new IPeriod('start_date'); - $start_date->type=ALL; - $start_date->cn=$this->cn; - $start_date->show_end_date=false; - $start_date->show_start_date=true; - $start_date->user=$g_user; - $start_date->filter_year=false; - - $end_date=new IPeriod('end_date'); - $end_date->type=ALL; - $end_date->cn=$this->cn; - $end_date->show_end_date=true; - $end_date->show_start_date=false; - $end_date->user=$g_user; - $end_date->filter_year=false; - - $start_date->value=$a->f_start_date; - $end_date->value=$a->f_end_date; - - $str_start_date=$start_date->input(); - $str_end_date=$end_date->input(); - - - $r=HtmlInput::hidden('f_id',$this->f_id); - $array=Forecast_Cat::load_all($this->cn,$this->f_id); - - for ($i=0;$ivalue=(isset ($array[$i]['fc_desc']))?$array[$i]['fc_desc']:''; - $aCat[$i]['name']=$name->input(); - - - /* category order */ - $order_name=(isset($array[$i]['fc_id']))?'fc_order'.$array[$i]['fc_id']:'fc_order_new'.$i; - $order=new IText($order_name); - $order->value=(isset($array[$i]['fc_order']))?$array[$i]['fc_order']:$i+1; - $aCat[$i]['order']=$order->input(); - } - - ob_start(); - require_once NOALYSS_INCLUDE.'/template/forecast_cat.php'; - $r.=ob_get_contents(); - ob_end_clean(); - return $r; - } - /** - *@brief Display a form for adding an new anticipation - *@return html string with the form - */ - private function form_cat_new() - { - global $g_user; - $r=""; - $str_action=_('Nouveau'); - - $name=new IText('an_name'); - $str_name=$name->input(); - - $start_date=new IPeriod('start_date'); - $start_date->type=ALL; - $start_date->cn=$this->cn; - $start_date->show_end_date=false; - $start_date->show_start_date=true; - $start_date->user=$g_user; - $start_date->filter_year=false; - - $end_date=new IPeriod('end_date'); - $end_date->type=ALL; - $end_date->cn=$this->cn; - $end_date->show_end_date=true; - $end_date->show_start_date=false; - $end_date->user=$g_user; - $end_date->filter_year=false; - - $period=$g_user->get_periode(); - $per=new Periode($this->cn,$period); - $year=$per->get_exercice(); - - list($per_start,$per_end)=$per->get_limit($year); - $start_date->value=$per_start->p_id; - $end_date->value=$per_end->p_id; - - $str_start_date=$start_date->input(); - $str_end_date=$end_date->input(); - - $aLabel=array(_('Ventes'),_('Dépense'),_('Banque')); - $aCat=array(); - - for ($i=0;$ivalue=(isset($aLabel[$i]))?$aLabel[$i]:''; - $aCat[$i]['name']=$name->input(); - - - /* category order */ - $order=new IText('fr_order'.$i); - $order->value=$i+1; - $aCat[$i]['order']=$order->input(); - } - - ob_start(); - require_once NOALYSS_INCLUDE.'/template/forecast_cat.php'; - $r.=ob_get_contents(); - ob_end_clean(); - return $r; - - } - /** - * @brief create an empty object anticipation - * @return html string with the form - */ - public function form_cat() - { - if ($this->f_id != 0) - return $this->form_cat_mod(); - else - return $this->form_cat_new(); - } - /** - *@brief display a form for modifying or add a forecast - *@return HTML code - */ - public function form_item() - { - $forecast=new Forecast($this->cn,$this->f_id); - $forecast->load(); - $str_name=$forecast->get_parameter('name'); - $str_start=$forecast->get_parameter('start_date'); - $str_end=$forecast->get_parameter('end_date'); - - - $r=""; - $str_action=_("Elements"); - $cat=new Forecast_Cat($this->cn); - $array=$cat->make_array($this->f_id); - $periode=new Periode($this->cn); - $aPeriode=$this->cn->make_array("select p_id,to_char(p_start,'MM.YYYY') as label from parm_periode - where p_start >= (select p_start from parm_periode where p_id=$str_start) - and p_end <= (select p_end from parm_periode where p_id=$str_end) - order by p_start"); - $aPeriode[]=array('value'=>0,'label'=>'Mensuel'); - $value=$this->cn->get_array("select fi_id,fi_text,fi_account,fi_card,fc_id,fi_amount,fi_debit,fi_pid ". - " from forecast_item ". - " where fc_id in (select fc_id from forecast_cat where f_id = $1)",array($this->f_id)); - $max=(count($value) < MAX_FORECAST_ITEM)?MAX_FORECAST_ITEM:count($value); - $r.=HtmlInput::hidden('nbrow',$max); - - for ($i=0;$i<$max;$i++) - { - if (isset($value[$i]['fi_id'])) - { - $r.=HtmlInput::hidden('fi_id'.$i,$value[$i]['fi_id']); - } - /* category*/ - $category=new ISelect(); - $category->name='an_cat'.$i; - $category->value=$array; - $category->selected=(isset($value[$i]["fc_id"]))?$value[$i]["fc_id"]:-1; - $aCat[$i]['cat']=$category->input(); - - /* amount */ - $amount=new INum('an_cat_amount'.$i); - $amount->value=(isset($value[$i]["fi_amount"]))?$value[$i]["fi_amount"]:0; - $aCat[$i]['amount']=$amount->input(); - - /* Accounting*/ - $account=new IPoste('an_cat_acc'.$i); - $account->set_attribute('ipopup','ipop_account'); - // $account->set_attribute('label','an_label'.$i); - $account->set_attribute('account','an_cat_acc'.$i); - $account->set_attribute('bracket',1); - $account->set_attribute('no_overwrite',1); - $account->set_attribute('noquery',1); - $account->css_size="85%"; - $account->value=(isset($value[$i]["fi_account"]))?$value[$i]["fi_account"]:""; - $aCat[$i]['account']=$account->input(); - /*Quick Code */ - $qc=new ICard('an_qc'.$i); - // If double click call the javascript fill_ipopcard - $qc->set_dblclick("fill_ipopcard(this);"); - - // This attribute is mandatory, it is the name of the IPopup - $qc->set_attribute('ipopup','ipopcard'); - - // name of the field to update with the name of the card - $qc->set_attribute('label','an_label'.$i); - - // Type of card : all - $qc->set_attribute('typecard','all'); - $qc->set_attribute('jrn',0); - $qc->extra='all'; - - // when value selected in the autcomplete - $qc->set_function('fill_data'); - if (isset($value[$i]["fi_card"])) - { - $f=new Fiche($this->cn,$value[$i]["fi_card"]); - $qc->value=$f->strAttribut(ATTR_DEF_QUICKCODE); - ; - } - - $aCat[$i]['qc']=$qc->search().$qc->input(); - /* Label */ - $label=new IText('an_label'.$i); - $label->value=(isset($value[$i]["fi_text"]))?$value[$i]["fi_text"]:""; - $aCat[$i]['name']=$label->input(); - - //Deb or Cred - $deb=new ISelect('an_deb'.$i); - $deb->selected=(isset($value[$i]["fi_debit"]))?$value[$i]["fi_debit"]:-1; - $deb->value=array(array('value'=>'D','label'=>_('Débit')), - array('value'=>'C','label'=>_('Crédit')) - ); - $aCat[$i]['deb']=$deb->input(); - //Periode - $isPeriode=new ISelect('month'.$i); - $isPeriode->value=$aPeriode; - $isPeriode->selected=(isset($value[$i]["fi_pid"]))?$value[$i]["fi_pid"]:0; - $aCat[$i]['per']=$isPeriode->input(); - } - $add_row=new IButton('add_row'); - $add_row->label=_('Ajouter une ligne'); - $add_row->javascript='for_add_row(\'fortable\')'; - $f_add_row=$add_row->input(); - ob_start(); - require_once NOALYSS_INCLUDE.'/template/forecast-detail.php'; - $r.=ob_get_contents(); - ob_end_clean(); - return $r; - } - /** - * @brief unit test - */ - static function test_me() - { - $cn=new Database(dossier::id()); - $test=new Anticipation($cn); - - } - -} - -?> diff --git a/sources/include/class_balance_age.php b/sources/include/class_balance_age.php deleted file mode 100644 index 364448b..0000000 --- a/sources/include/class_balance_age.php +++ /dev/null @@ -1,240 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ -require_once NOALYSS_INCLUDE.'/class_lettering.php'; - -/* * * - * @file - * @brief compute the ageing balance, currently this code is not used - * - */ - -class Balance_Age -{ - - private $cn; - - function __construct($p_cn) - { - $this->cn=$p_cn; - $this->afiche=null; - } - - function get_array_card($p_type, $p_extra="") - { - switch ($p_type) - { - case 'X': - $this->afiche=$this->cn->get_array(" - with m as (select distinct qp_supplier as f_id from quant_purchase union select qs_client from quant_sold) - select distinct fiche.f_id as f_id ,f1.ad_value as name, f3.ad_value as first_name,f2.ad_value as quick_code - from fiche - join m on (fiche.f_id=m.f_id) - join fiche_detail as f1 on (fiche.f_id=f1.f_id and f1.ad_id=1) - join fiche_detail as f2 on (fiche.f_id=f2.f_id and f2.ad_id=23) - left join fiche_detail as f3 on (fiche.f_id=f3.f_id and f3.ad_id=32) - where - fiche.fd_id=$1 - order by f1.ad_value - ", array($p_extra)); - break; - case 'U': - $fiche=new Fiche($this->cn, $p_extra); - $this->afiche[0]['f_id']=$fiche->id; - $this->afiche[0]['quick_code']=$fiche->get_quick_code(); - $this->afiche[0]['name']=$fiche->strAttribut(ATTR_DEF_NAME, 0); - $this->afiche[0]['first_name']=$fiche->strAttribut(ATTR_DEF_FIRST_NAME, 0); - break; - case 'F': - $this->afiche=$this->cn->get_array(" - select distinct qp_supplier as f_id ,f1.ad_value as name, f3.ad_value as first_name,f2.ad_value as quick_code - from quant_purchase join - fiche_detail as f1 on (qp_supplier=f1.f_id and f1.ad_id=1) - join fiche_detail as f2 on (qp_supplier=f2.f_id and f2.ad_id=23) - left join fiche_detail as f3 on (qp_supplier=f3.f_id and f3.ad_id=32) - order by f1.ad_value - "); - break; - case 'C': - $this->afiche=$this->cn->get_array(" - select distinct qs_client as f_id ,f1.ad_value as name, f3.ad_value as first_name,f2.ad_value as quick_code - from quant_sold join - fiche_detail as f1 on (qs_client=f1.f_id and f1.ad_id=1) - join fiche_detail as f2 on (qs_client=f2.f_id and f2.ad_id=23) - left join fiche_detail as f3 on (qs_client=f3.f_id and f3.ad_id=32) - order by f1.ad_value - "); - break; - default: - throw new Exception('Type invalide'); - } - } - - function display_card($p_date_start, $p_fiche, $p_let) - { - $this->get_array_card('U', $p_fiche); - $a_fiche=$this->afiche; - $nb_fiche=count($a_fiche); - require 'template/balance_aged_result.php'; - } - - function display_category($p_date_start, $p_cat, $p_let) - { - // Get all fiche from Purchase - - $this->get_array_card('X', $p_cat); - $a_fiche=$this->afiche; - $nb_fiche=count($a_fiche); - require 'template/balance_aged_result.php'; - } - - /** - * Display all the operation for the customer - * @param type $p_date_start min date of the operatin - * @param type $p_let 'unlet' only unlettered or 'let' for all - */ - function display_purchase($p_date_start, $p_let) - { - // Get all fiche from Purchase - $this->get_array_card('F'); - $a_fiche=$this->afiche; - $nb_fiche=count($a_fiche); - require 'template/balance_aged_result.php'; - } - - /** - * Display all the operation for the supplier - * @param type $p_date_start min date of the operatin - * @param type $p_let 'unlet' only unlettered or 'let' for all - */ - function display_sale($p_date_start, $p_let) - { - // Get all fiche from Purchase - $this->get_array_card('C'); - $a_fiche=$this->afiche; - $nb_fiche=count($a_fiche); - require 'template/balance_aged_result.php'; - } - - function export_csv($p_date_start, $p_let) - { - $nb_fiche=count($this->afiche); - $title=sprintf('"%s";', _('QuickCode')); - $title.=sprintf('"%s";', _('Nom')); - $title.=sprintf('"%s";', _('Prénom')); - $title.=sprintf('"%s";', _('Date')); - $title.=sprintf('"%s";', _('N° pièce')); - $title.=sprintf('"%s";', _('Interne')); - $title.=sprintf('"%s";', _('Fin')); - $title.=sprintf('"%s";', _('<30 jours')); - $title.=sprintf('"%s";', _('entre 30 et 60 jours')); - $title.=sprintf('"%s";', _('entre 60 et 90 jours')); - $title.=sprintf('"%s";', _('> 90 jours')); - $title.=sprintf("\n\r"); - $flag_title=false; - for ($i=0; $i<$nb_fiche; $i++) - { - $card=new Lettering_Card($this->cn, $this->afiche[$i]['quick_code']); - $card->set_parameter('start', $p_date_start); - $card->get_balance_ageing($p_let); - if (empty($card->content)) - continue; - if ( ! $flag_title ) { echo $title;$flag_title=true;} - $nb_row=count($card->content); - $sum_lt_30=0; - $sum_gt_30_lt_60=0; - $sum_gt_60_lt_90=0; - $sum_gt_90=0; - $sum_fin=0; - for ($j=0; $j<$nb_row; $j++) - { - $show=true; - printf('"%s";', str_replace('"', '', $this->afiche[$i]['quick_code'])); - printf('"%s";', str_replace('"', '', $this->afiche[$i]['name'])); - printf('"%s";', str_replace('"', '', $this->afiche[$i]['first_name'])); - printf('"%s";', $card->content[$j]['j_date_fmt']); - printf('"%s";', $card->content[$j]['jr_pj_number']); - printf('"%s";', $card->content[$j]['jr_internal']); - if ($card->content[$j]['jrn_def_type']=='FIN'||$card->content[$j]['jrn_def_type']=='ODS') - { - printf("%s;", nb($card->content[$j]['j_montant'])); - $sum_fin=bcadd($sum_fin, $card->content[$j]['j_montant']); - $show=false; - } - else - { - printf('0;'); - } - if ($show&&$card->content[$j]['day_paid']<=30) - { - printf("%s;", nb($card->content[$j]['j_montant'])); - $sum_lt_30=bcadd($sum_lt_30, $card->content[$j]['j_montant']); - $show=false; - } - else - { - printf('0;'); - } - - if ($show&&$card->content[$j]['day_paid']>30&&$card->content[$j]['day_paid']<=60) - { - printf("%s;", nb($card->content[$j]['j_montant'])); - $sum_gt_30_lt_60=bcadd($sum_gt_30_lt_60, $card->content[$j]['j_montant']); - } - else - { - printf('0;'); - } - - if ($show&&$card->content[$j]['day_paid']>60&&$card->content[$j]['day_paid']<=90) - { - printf("%s;", nb($card->content[$j]['j_montant'])); - $sum_gt_60_lt_90=bcadd($sum_gt_60_lt_90, $card->content[$j]['j_montant']); - } - else - { - printf('0;'); - } - if ($show&&$card->content[$j]['day_paid']>90) - { - printf("%s", nb($card->content[$j]['j_montant'])); - $sum_gt_90=bcadd($sum_gt_90, $card->content[$j]['j_montant']); - } - else - { - printf('0;'); - } - printf("\n\r"); - } - printf('"%s";', _('Totaux')); - printf('"";'); - printf('"";'); - printf('"";'); - printf('"";'); - printf('"";'); - printf('%s;', nb($sum_fin)); - printf('%s;', nb($sum_lt_30)); - printf('%s;', nb($sum_gt_30_lt_60)); - printf('%s;', nb($sum_gt_60_lt_90)); - printf('%s', nb($sum_gt_90)); - printf("\n\r"); - } - } - -} diff --git a/sources/include/class_bank.php b/sources/include/class_bank.php deleted file mode 100644 index 886c209..0000000 --- a/sources/include/class_bank.php +++ /dev/null @@ -1,58 +0,0 @@ -fiche_def_ref=FICHE_TYPE_FIN; - parent::__construct($p_cn,$p_id) ; - } - - - -} - -?> diff --git a/sources/include/class_calendar.php b/sources/include/class_calendar.php deleted file mode 100644 index 4959392..0000000 --- a/sources/include/class_calendar.php +++ /dev/null @@ -1,341 +0,0 @@ -current_date=getdate(); - $this->month=$this->current_date['mon']; - $this->day=self::$nb_day[$this->month-1]; - $this->year=$this->current_date['year']; - $this->action_div=array(); - $this->action=array(); - $this->title=array(); - - if ( $this->year % 4 == 0 && $this->month=2) - $this->day=29; - } - - /*!\brief fill the array given as parameter with the data from action_gestion - *\param $p_array array of the date of the month - * \param $p_style is either short or long, short: for a small title, long for a complete one - */ - function fill_from_action(&$p_array,$p_style) - { - global $g_user; - $profile=$g_user->get_profile(); - - $cn=new Database(dossier::id()); - $sql="select ag_id,to_char(ag_remind_date,'DD')::integer as ag_timestamp_day,ag_title,ag_hour, - coalesce(name,'interne') as str_name - ". - " from action_gestion ". - " left join vw_fiche_name on (f_id=f_id_dest) ". - " where ". - " to_char(ag_remind_date,'MM')::integer=$1 ". - " and to_char(ag_remind_date,'YYYY')::integer=$2 ". - " and ag_dest in (select p_granted from user_sec_action_profile where p_id =$3) - and ag_state IN (2, 3) - "; - - $array=$cn->get_array($sql,array($this->month,$this->year,$profile)); - for ($i=0;$iaction[$ind][]=$array[$i]['ag_id']; - $this->title[$ind][]=$array[$i]['ag_title']; - $this->hour[$ind][]=$array[$i]['ag_hour']; - $this->str_name[$ind][]=$array[$i]['str_name']; - - } - /* - * Fill foreach day - */ - if ( $p_style == "short") - { - foreach ($this->action as $day=>$aAction) - { - if ($p_array[$day]=="") { - $p_array[$day]=''." ".count($aAction)." "._("Tâches").''; - } - $this->action_div[$day]=''; - } - } - else if ( $p_style == "long") - { - foreach ($this->action as $day=>$aAction) - { - $p_array[$day].="
      "; - for ($i=0;$istr_name[$day][$i]).'→'.HtmlInput::detail_action($aAction[$i], $this->hour[$day][$i]." ".$this->title[$day][$i]).''; - } - $p_array[$day].='
    '; - } - } - } - /*!\brief fill the array given as parameter with the data from todo - *\param $p_array array of the date of the month - * \param $p_style is either short or long, short: for a small title, long for a complete one - */ - function fill_from_todo(&$p_array,$p_style) - { - $cn=new Database(dossier::id()); - if ($p_style=="short") - { - $sql="select count(*) as nb,to_char(tl_date,'DD')::integer as tl_date_day ". - " from todo_list ". - " where ". - " to_char(tl_date,'MM')::integer=$1 ". - " and to_char(tl_date,'YYYY')::integer=$2 ". - " and use_login=$3 group by to_char(tl_date,'DD')::integer "; - $array=$cn->get_array($sql,array($this->month,$this->year,$_SESSION['g_user'])); - for ($i=0;$i".h($array[$i]['nb'])." "._('Notes').''; - } - } else if ($p_style=="long") - { - $sql="select to_char(tl_date,'DD')::integer as tl_date_day,tl_title ". - " from todo_list ". - " where ". - " to_char(tl_date,'MM')::integer=$1 ". - " and to_char(tl_date,'YYYY')::integer=$2 ". - " and use_login=$3 "; - $array=$cn->get_array($sql,array($this->month,$this->year,$_SESSION['g_user'])); - for ($i=0;$i".h($array[$i]['tl_title']).''; - } - } - } - /*!\brief display a calendar after a call to Calendar::fill - *\param $p_type long or short - * - *\return HTML String - */ - function display($p_type,$p_notitle) - { - global $g_user; - if ($p_type != 'long' && $p_type != 'short') { - throw new Exception("Calendar::display, unknow type"); - } - $exercice_user=$g_user->get_exercice(); - /* day */ - $cell=array(); - for ($i=0;$i<42;$i++) - { - $cell[$i]=""; - } - $this->set_month_year(); - /* weekday */ - $week=array(_('Dimanche'),_('Lundi'),_('Mardi'),_('Mercredi'),_('Jeudi'),_('Vendredi'),_('Samedi')); - - $notitle=$p_notitle; - - $this->fill_from_action($cell,$p_type); - $this->fill_from_todo($cell,$p_type); - $wMonth=new ISelect('per'); - $cn=new Database(dossier::id()); - $wMonth->value=$cn->make_array("select p_id,to_char(p_start,'MM/YYYY') from parm_periode where p_exercice = '$exercice_user' order by p_start"); - $wMonth->selected=$this->default_periode; - $wMonth->javascript="onchange=change_month(this)"; - $wMonth->set_attribute('gDossier',dossier::id()); - $wMonth->set_attribute('type_display',$p_type); - $wMonth->set_attribute('notitle',$notitle); - $month_year=$wMonth->input().$wMonth->get_js_attr(); - ob_start(); - $zoom=($p_type=='short')?0:1; - - require_once NOALYSS_INCLUDE.'/template/calendar.php'; - - if (count($this->action_div) > 0) - { - foreach ($this->action_div as $day) - { - echo $day; - } - } - $ret=ob_get_contents(); - ob_end_clean(); - return $ret; - } - /** - *@brief set correctly the month and the year with the default_periode - */ - function set_month_year() - { - $cn=new Database(dossier::id()); - $array=$cn->get_array("select to_char(p_start,'MM') as month, to_char(p_start,'YYYY') as year ". - " from parm_periode where p_id=$1",array($this->default_periode)); - $this->month=(int)$array[0]['month']; - $this->year=(int)$array[0]['year']; - $this->day=self::$nb_day[$this->month-1]; - if ( $this->year % 4 == 0 && $this->month==2) - $this->day=29; - } - /** - *@brief get the periode from the preference of the current user - * change the value of default_periode to today - *@return $this->default_periode - */ - function get_preference() - { - global $g_user; - $cn=new Database(dossier::id()); - $today=date('d.m.Y'); - $p_id=$cn->get_value(" - select p_id from parm_periode - where - p_start <= to_date($1,'DD.MM.YYYY') - and - p_end >= to_date($1,'DD.MM.YYYY')", - array($today)); - if ( $p_id == '') - { - $p_id=$g_user->get_periode(); - } - $this->default_periode=$p_id; - return $p_id; - } - /** - *@brief set the periode to the parameter, change the value of $this->default_periode - * there is no check on the periode - */ - function set_periode($p_per) - { - $this->default_periode=$p_per; - } - /** - * @brief zoom the calendar - */ - function zoom_calendar($notitle) - { - global $g_user; - $exercice_user=$g_user->get_exercice(); - /* day */ - $cell=array(); - for ($i=0;$i<42;$i++) - { - $cell[$i]=""; - } - $this->set_month_year(); - /* weekday */ - $week=array(_('Dimanche'),_('Lundi'),_('Mardi'),_('Mercredi'),_('Jeudi'),_('Vendredi'),_('Samedi')); - - $this->fill_from_action($cell,"long"); - $this->fill_from_todo($cell,"long"); - $wMonth=new ISelect('per_div'); - $cn=new Database(dossier::id()); - $wMonth->value=$cn->make_array("select p_id,to_char(p_start,'MM/YYYY') from parm_periode where p_exercice = '$exercice_user' order by p_start"); - $wMonth->selected=$this->default_periode; - $wMonth->javascript=sprintf("onchange=calendar_zoom({gDossier:%d,invalue:'%s',outvalue:'%s',distype:'%s',notitle:%d})", - dossier::id(),'per_div','calendar_zoom_div','cal',$notitle); - $wMonth->set_attribute('gDossier',dossier::id()); - $month_year=$wMonth->input().$wMonth->get_js_attr(); - ob_start(); - $zoom=1; - $notitle=HtmlInput::default_value_get('notitle', 0); - require_once NOALYSS_INCLUDE.'/template/calendar.php'; - - if (count($this->action_div) > 0) - { - foreach ($this->action_div as $day) - { - echo $day; - } - } - $ret=ob_get_contents(); - ob_end_clean(); - return $ret; - } - /** - * Display the next events for 30 days - * todo list + action to remind - */ - function zoom_list($notitle) - { - global $g_user; - $cn=new Database(dossier::id()); - $profile=$g_user->get_profile(); - - // Get the event from now and before 30 before - // union the TODO list - $sql = " - select ag_id,ag_remind_date,to_char(ag_remind_date,'DD.MM.YY') as str_date,ag_title,ag_hour, - coalesce(name,'interne') as str_name, - case when ag_remind_date < now() then 'R' - when ag_remind_date = now() then 'N' - else 'F' - end as status, - coalesce (ag_remind_date::date,current_date) - current_date as delta_days - from action_gestion - left join vw_fiche_name on (f_id=f_id_dest) - where - ag_dest in (select p_granted from user_sec_action_profile where p_id =$1) - and ag_state IN (2, 3) - order by ag_remind_date,ag_hour - "; - $a_event=$cn->get_array($sql,array($profile)); - ob_start(); - require_once NOALYSS_INCLUDE.'/template/calendar-list.php'; - $ret=ob_get_clean(); - return $ret; - - - } - - function zoom($p_type,$p_notitle) - { - switch ($p_type) - { - case 'cal': - return $this->zoom_calendar($p_notitle); - break; - case 'list': - return $this->zoom_list($p_notitle); - break; - } - } - - static function test_me() { - - } - -} diff --git a/sources/include/class_contact.php b/sources/include/class_contact.php deleted file mode 100644 index 31bde74..0000000 --- a/sources/include/class_contact.php +++ /dev/null @@ -1,143 +0,0 @@ -fiche_def_ref=FICHE_TYPE_CONTACT; - parent::__construct($p_cn,$p_id) ; - $this->company=""; - } - /*! Summary - ************************************************** - * \brief show the default screen - * - * \param p_search (filter) - * - * \return string to display - */ - function Summary($p_search="",$p_action="",$p_sql="",$p_nothing=false) - { - $p_search=sql_string($p_search); - $extra_sql=""; - if ( $this->company != "") - { - $extra_sql="and f_id in (select f_id from fiche_detail - where ad_value=upper('".$this->company."') and ad_id=".ATTR_DEF_COMPANY.") "; - } - $url=urlencode($_SERVER['REQUEST_URI']); - $script=$_SERVER['PHP_SELF']; - // Creation of the nav bar - // Get the max numberRow - $all_contact=$this->count_by_modele($this->fiche_def_ref,$p_search,$extra_sql); - // Get offset and page variable - $offset=( isset ($_REQUEST['offset'] )) ?$_REQUEST['offset']:0; - $page=(isset($_REQUEST['page']))?$_REQUEST['page']:1; - $bar=navigation_bar($offset,$all_contact,$_SESSION['g_pagesize'],$page); - // set a filter ? - $search=""; - if ( trim($p_search) != "" ) - { - $search=" and f_id in - (select f_id from fiche_Detail - where - ad_id=1 and ad_value ~* '$p_search') "; - } - // Get The result Array - $step_contact=$this->get_by_category($offset,$search.$extra_sql.$p_sql); - - if ( $all_contact == 0 ) return ""; - $r=$bar; - $r.=' - - - - - - - - - '; - $base=$_SERVER['PHP_SELF']; - // Compute the url - $url=""; - $and="?"; - $get=$_GET; - if ( isset ($get) ) - { - foreach ($get as $name=>$value ) - { - // we clean the parameter offset, step, page and size - if ( ! in_array($name,array('f_id','detail'))) - { - $url.=$and.$name."=".$value; - $and="&"; - }// if - }//foreach - }// if - $back_url=urlencode($_SERVER['REQUEST_URI']); - if ( sizeof ($step_contact ) == 0 ) - return $r; - $idx=0; - foreach ($step_contact as $contact ) - { - $l_company=new Fiche($this->cn); - $l_company->get_by_qcode($contact->strAttribut(ATTR_DEF_COMPANY),false); - $l_company_name=$l_company->strAttribut(ATTR_DEF_NAME); - if ( $l_company_name == NOTFOUND ) $l_company_name=""; - // add popup for detail - if ( $l_company_name !="") - { - $l_company_name=HtmlInput::card_detail($contact->strAttribut(ATTR_DEF_COMPANY),$l_company_name,'style="text-decoration:underline;"'); - } - $tr=($idx%2==0)?' ':''; - $idx++; - $r.=$tr; - $qcode=$contact->strAttribut(ATTR_DEF_QUICKCODE); - $r.='"; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $r.="". - ""; - - $r.=""; - - } - $r.="
    Quick CodeNomPrénomSociétéTéléphoneemailFax
    '.HtmlInput::card_detail($qcode)."".$contact->strAttribut(ATTR_DEF_NAME)."".$contact->strAttribut(ATTR_DEF_FIRST_NAME)."".$l_company_name."".$contact->strAttribut(ATTR_DEF_TEL)."".$contact->strAttribut(ATTR_DEF_EMAIL)." ".$contact->strAttribut(ATTR_DEF_FAX)."
    "; - $r.=$bar; - return $r; - } - -} diff --git a/sources/include/class_customer.php b/sources/include/class_customer.php deleted file mode 100644 index 7545574..0000000 --- a/sources/include/class_customer.php +++ /dev/null @@ -1,187 +0,0 @@ -fiche_def_ref=FICHE_TYPE_CLIENT; - parent::__construct($p_cn,$p_id) ; - - } - /*! \brief Get all info contains in the view - * thanks to the poste elt (account) - */ - function get_by_account($p_poste=0) - { - $this->poste=($p_poste==0)?$this->poste:$p_poste; - $sql="select * from vw_client where poste_comptable=$1"; - $Res=$this->cn->exec_sql($sql,array($this->poste)); - if ( Database::num_row($Res) == 0) return null; - if ( Database::num_row($Res) > 1 ) throw new Exception ('Plusieurs fiches avec le même poste',1); - // There is only _one_ row by customer - $row=Database::fetch_array($Res,0); - $this->name=$row['name']; - $this->id=$row['f_id']; - $this->street=$row['rue']; - $this->cp=$row['code_postal']; - $this->country=$row['pays']; - $this->vat_number=$row['tva_num']; - - } - /*! - * \brief Get all the info for making a vat listing - * for the vat administration - * - * \param $p_year - * - * \return double array structure is - * ( j_poste,name,vat_number,amount,tva,customer(object) - * - */ - function VatListing($p_year) - { - $cond_sql=" and A.j_date = B.j_date and extract(year from A.j_date) ='$p_year'"; - /* List of customer */ - $aCustomer=$this->cn->get_array('select f_id,name,quick_code,tva_num,poste_comptable from vw_client '. - " where tva_num !='' "); - - /* Use the code */ - - // BASE ACCOUNT - // for belgium - $s=new Acc_Parm_Code($this->cn,'VENTE'); - $s->load(); - $SOLD=$s->p_value; - - $c=new Acc_Parm_Code($this->cn,'CUSTOMER'); - $c->load(); - $CUSTOMER=$c->p_value; - - $t=new Acc_Parm_Code($this->cn,'COMPTE_TVA'); - $t->load(); - $TVA=$t->p_value; - - $a_Res=array(); - /* for each customer compute VAT, Amount...*/ - foreach ($aCustomer as $l ) - { - // Seek the customer - //--- - $customer=$l['quick_code']; - $a_Res[$customer]['name']=$l['name']; - $a_Res[$customer]['vat_number']=$l['tva_num']; - $a_Res[$customer]['amount']=0; - $a_Res[$customer]['tva']=0; - $a_Res[$customer]['poste_comptable']=$l['poste_comptable']; - /* retrieve only operation of sold and vat */ - // Get all the sell operation - //---- - $sql="select distinct j_grpt - from - jrnx as A - join jrnx as B using (j_grpt) - where - A.j_qcode = '".$l['quick_code']."' and - B.j_poste::text like '".$SOLD."%' - $cond_sql - "; - - $Res=$this->cn->exec_sql($sql); - // Foreach operation - // where 7% or tva account are involved - // and store the result in an array (a_Res) - //--- - - for ($i=0; $i < Database::num_row($Res);$i++) - { - // Get each row - //--- - $row1=Database::fetch_array($Res,$i); - - - // select the operation - //---- - $Res2=$this->cn->exec_sql("select j_poste,j_montant,j_debit from jrnx where j_grpt=".$row1['j_grpt']); - $a_row=Database::fetch_all($Res2); - - // Store the amount in the array - //--- - foreach ($a_row as $e) - { - $amount=0; - $tva=0; - if ( substr($e['j_poste'],0, strlen($SOLD))===$SOLD) - { - $amount=($e['j_debit']=='f')?$e['j_montant']:$e['j_montant']*-1; - } - if ( substr($e['j_poste'],0, strlen($TVA))===$TVA) - { - $tva=($e['j_debit']=='f')?$e['j_montant']:$e['j_montant']*-1; - } - // store sold - //--- - $a_Res[$customer]['amount']=(isset($a_Res[$customer]['amount']))?$a_Res[$customer]['amount']:0; - $a_Res[$customer]['amount']+=$amount; - - // store vat - //--- - $a_Res[$customer]['tva']=(isset($a_Res[$customer]['tva']))?$a_Res[$customer]['tva']:0; - $a_Res[$customer]['tva']+=$tva; - - // store customef info - //--- - $a_Res[$customer]['customer']=$customer; - } - }// foreach $a - } // foreach ( customer) - - return $a_Res; - } - - -} - -?> diff --git a/sources/include/class_database.php b/sources/include/class_database.php deleted file mode 100644 index 9b87e70..0000000 --- a/sources/include/class_database.php +++ /dev/null @@ -1,1051 +0,0 @@ -5) - die("-->Dossier invalide [$p_database_id]"); - $noalyss_user=(defined("noalyss_user"))?noalyss_user:phpcompta_user; - $password=(defined("noalyss_password"))?noalyss_password:phpcompta_password; - $port=(defined("noalyss_psql_port"))?noalyss_psql_port:phpcompta_psql_port; - $host=(!defined("noalyss_psql_host") )?'127.0.0.1':noalyss_psql_host; - if (defined("MULTI")&&MULTI=="0") - { - $l_dossier=dbname; - } - else - { - - if ($p_database_id==0) - { /* connect to the repository */ - $l_dossier=sprintf("%saccount_repository", strtolower(domaine)); - } - else if ($p_type=='dos') - { /* connect to a folder (dossier) */ - $l_dossier=sprintf("%sdossier%d", strtolower(domaine), $p_database_id); - } - else if ($p_type=='mod') - { /* connect to a template (modele) */ - $l_dossier=sprintf("%smod%d", strtolower(domaine), $p_database_id); - } - else if ($p_type=='template') - { - $l_dossier='template1'; - } - else - { - throw new Exception('Connection invalide'); - } - } - - ob_start(); - $a=pg_connect("dbname=$l_dossier host='$host' user='$noalyss_user' - password='$password' port=$port"); - - if ($a==false) - { - if (DEBUG) - { - ob_end_clean(); - echo '

    Impossible de se connecter à postgreSql !

    '; - echo '

    '; - echo "Vos paramètres sont incorrectes :
    "; - echo "
    "; - echo "base de donnée : $l_dossier
    "; - echo "Domaine : ".domaine."
    "; - echo "Port $port
    "; - echo "Utilisateur : $noalyss_user
    "; - echo '

    '; - - die("Connection impossible : vérifiez vos paramètres de base - de données"); - } - else - { - echo '

    Erreur de connexion !

    '; - } - } - $this->db=$a; - $this->is_open=TRUE; - if ($this->exist_schema('comptaproc')) - pg_exec($this->db, 'set search_path to public,comptaproc;'); - pg_exec($this->db, 'set DateStyle to ISO, MDY;'); - ob_end_clean(); - } - - public function verify() - { - // Verify that the elt we want to add is correct - } - - function set_encoding($p_charset) - { - pg_set_client_encoding($this->db, $p_charset); - } - - /** - * \brief send a sql string to the database - * \param $p_string sql string - * \param $p_array array for the SQL string (see pg_query_params) - * \return the result of the query, a resource or false if an - * error occured - */ - - function exec_sql($p_string, $p_array=null) - { - try - { - if ( ! $this->is_open ) throw new Exception(' Database is closed'); - $this->sql=$p_string; - $this->array=$p_array; - - if ($p_array==null) - { - if (!DEBUG) - $this->ret=pg_query($this->db, $p_string); - else - $this->ret=@pg_query($this->db, $p_string); - } - else - { - $a=is_array($p_array); - if (!is_array($p_array)) - { - throw new Exception("Erreur : exec_sql attend un array"); - } - if (!DEBUG) - $this->ret=pg_query_params($this->db, $p_string, $p_array); - else - $this->ret=@pg_query_params($this->db, $p_string, $p_array); - } - if (!$this->ret) - { - $str_error=pg_last_error($this->db).pg_result_error($this->ret); - throw new Exception(" SQL ERROR $p_string ".$str_error, 1); - } - } - catch (Exception $a) - { - if (DEBUG) - { - print_r($p_string); - print_r($p_array); - echo $a->getMessage(); - echo $a->getTrace(); - echo $a->getTraceAsString(); - echo pg_last_error($this->db); - } - $this->rollback(); - - throw ($a); - } - - return $this->ret; - } - - /** \brief Count the number of row returned by a sql statement - * - * \param $p_sql sql string - * \param $p_array if not null we use the safer pg_query_params - */ - - function count_sql($p_sql, $p_array=null) - { - $r_sql=$this->exec_sql($p_sql, $p_array); - return pg_NumRows($r_sql); - } - - /**\brief get the current sequence value - */ - - function get_current_seq($p_seq) - { - $Res=$this->get_value("select currval('$p_seq') as seq"); - return $Res; - } - - /**\brief get the next sequence value - */ - - function get_next_seq($p_seq) - { - $Res=$this->exec_sql("select nextval('$p_seq') as seq"); - $seq=pg_fetch_array($Res, 0); - return $seq['seq']; - } - - /** - * @ brief : start a transaction - * - */ - function start() - { - $Res=$this->exec_sql("start transaction"); - } - - /** - * Commit the transaction - * - */ - function commit() - { - if ( ! $this->is_open) return; - $Res=$this->exec_sql("commit"); - } - - /** - * rollback the current transaction - */ - function rollback() - { - if ( ! $this->is_open) return; - $Res=$this->exec_sql("rollback"); - } - - /** - * @brief alter the sequence value - * @param $p_name name of the sequence - * @param $min the start value of the sequence - */ - function alter_seq($p_name, $min) - { - if ($min<1) - $min=1; - $Res=$this->exec_sql("alter sequence $p_name restart $min"); - } - - /** - * \brief Execute a sql script - * \param $script script name - */ - - function execute_script($script) - { - - if (!DEBUG) - ob_start(); - $hf=fopen($script, 'r'); - if ($hf==false) - { - throw new Exception ( 'Ne peut ouvrir '.$script); - } - $sql=""; - $flag_function=false; - while (!feof($hf)) - { - $buffer=fgets($hf); - $buffer=str_replace("$", "\$", $buffer); - print $buffer."
    "; - // comment are not execute - if (substr($buffer, 0, 2)=="--") - { - //echo "comment $buffer"; - continue; - } - // Blank Lines Are Skipped - If (Strlen($buffer)==0) - { - //echo "Blank $buffer"; - Continue; - } - if (strpos(strtolower($buffer), "create function")===0) - { - echo "found a function"; - $flag_function=true; - $sql=$buffer; - continue; - } - if (strpos(strtolower($buffer), "create or replace function")===0) - { - echo "found a function"; - $flag_function=true; - $sql=$buffer; - continue; - } - // No semi colon -> multiline command - if ($flag_function==false&&strpos($buffer, ';')==false) - { - $sql.=$buffer; - continue; - } - if ($flag_function) - { - if (strpos(strtolower($buffer), "language plpgsql")===false&& - strpos(strtolower($buffer), "language 'plpgsql'")===false) - { - $sql.=$buffer; - continue; - } - } - else - { - // cut the semi colon - $buffer=str_replace(';', '', $buffer); - } - $sql.=$buffer; - if ($this->exec_sql($sql)==false) - { - $this->rollback(); - if (!DEBUG) - ob_end_clean(); - print "ERROR : $sql"; - throw new Exception("ERROR : $sql"); - } - $sql=""; - $flag_function=false; - print "
    "; - } // while (feof) - fclose($hf); - if (!DEBUG) - ob_end_clean(); - } - - /** - * \brief Get version of a database, the content of the - * table version - * - * \return version number - * - */ - - function get_version() - { - $Res=$this->get_value("select val from version"); - return $Res; - } - - /** - * @brief fetch the $p_indice array from the last query - * @param $p_indice index - * - */ - function fetch($p_indice) - { - if ($this->ret==false) - throw new Exception('this->ret is empty'); - return pg_fetch_array($this->ret, $p_indice); - } - - /** - * - * @brief return the number of rows found by the last query, or the number - * of rows from $p_ret - * @param $p_ret is the result of a query, the default value is null, in that case - * it is related to the last query - * @note synomym for count() - */ - - function size($p_ret=null) - { - if ($p_ret==null) - return pg_NumRows($this->ret); - else - return pg_NumRows($p_ret); - } - - /** - * @brief synomym for size() - */ - - function count($p_ret=null) - { - return $this->size($p_ret); - } - - /** - * \brief loop to apply all the path to a folder or - * a template - * \param $p_name database name - * \param $from_setup == 1 if called from setup.php - * - */ - - function apply_patch($p_name, $from_setup=1) - { - if ( ! $this->exist_table('version')) { - echo _('Base de donnée vide'); - return; - } - $MaxVersion=DBVERSION-1; - $succeed=""; - echo '
      '; - $add=($from_setup==0)?'admin/':''; - for ($i=4; $i<=$MaxVersion; $i++) - { - $to=$i+1; - - if ($this->get_version()<=$i) - { - if ($this->get_version()==97) - { - if ($this->exist_schema("amortissement")) - { - $this->exec_sql('ALTER TABLE amortissement.amortissement_histo - ADD CONSTRAINT internal_fk FOREIGN KEY (jr_internal) REFERENCES jrn (jr_internal) - ON UPDATE CASCADE ON DELETE SET NULL'); - } - } - echo "
    • Patching ".$p_name. - " from the version ".$this->get_version()." to $to "; - - $this->execute_script($add.'sql/patch/upgrade'.$i.'.sql'); - echo $succeed; - - if (!DEBUG) - ob_start(); - // specific for version 4 - if ($i==4) - { - $sql="select jrn_def_id from jrn_def "; - $Res=$this->exec_sql($sql); - $Max=$this->size(); - for ($seq=0; $seq<$Max; $seq++) - { - $row=pg_fetch_array($Res, $seq); - $sql=sprintf("create sequence s_jrn_%d", $row['jrn_def_id']); - $this->exec_sql($sql); - } - } - // specific to version 7 - if ($i==7) - { - // now we use sequence instead of computing a max - // - $Res2=$this->exec_sql('select coalesce(max(jr_grpt_id),1) as l from jrn'); - $Max2=pg_NumRows($Res2); - if ($Max2==1) - { - $Row=pg_fetch_array($Res2, 0); - var_dump($Row); - $M=$Row['l']; - $this->exec_sql("select setval('s_grpt',$M,true)"); - } - } - // specific to version 17 - if ($i==17) - { - $this->execute_script($add.'sql/patch/upgrade17.sql'); - $max=$this->get_value('select last_value from s_jnt_fic_att_value'); - $this->alter_seq($p_cn, 's_jnt_fic_att_value', $max+1); - } // version - // reset sequence in the modele - //-- - if ($i==30&&$p_name=="mod") - { - $a_seq=array('s_jrn', 's_jrn_op', 's_centralized', - 's_stock_goods', 'c_order', 's_central'); - foreach ($a_seq as $seq) - { - $sql=sprintf("select setval('%s',1,false)", $seq); - $Res=$this->exec_sql($sql); - } - $sql="select jrn_def_id from jrn_def "; - $Res=$this->exec_sql($sql); - $Max=pg_NumRows($Res); - for ($seq=0; $seq<$Max; $seq++) - { - $row=pg_fetch_array($Res, $seq); - $sql=sprintf("select setval('s_jrn_%d',1,false)", $row['jrn_def_id']); - $this->exec_sql($sql); - } - } - if ($i==36) - { - /* check the country and apply the path */ - $res=$this->exec_sql("select pr_value from parameter where pr_id='MY_COUNTRY'"); - $country=pg_fetch_result($res, 0, 0); - $this->execute_script($add."sql/patch/upgrade36.".$country.".sql"); - $this->exec_sql('update tmp_pcmn set pcm_type=find_pcm_type(pcm_val)'); - } - if ($i==59) - { - $res=$this->exec_sql("select pr_value from parameter where pr_id='MY_COUNTRY'"); - $country=pg_fetch_result($res, 0, 0); - if ($country=='BE') - $this->exec_sql("insert into parm_code values ('SUPPLIER',440,'Poste par défaut pour les fournisseurs')"); - if ($country=='FR') - $this->exec_sql("insert into parm_code values ('SUPPLIER',400,'Poste par défaut pour les fournisseurs')"); - } - if ($i==61) - { - $country=$this->get_value("select pr_value from parameter where pr_id='MY_COUNTRY'"); - $this->execute_script($add."sql/patch/upgrade61.".$country.".sql"); - } - - if (!DEBUG) - ob_end_clean(); - } - } - echo '
    '; - } - - /** - * - * \brief return the value of the sql, the sql will return only one value - * with the value - * \param $p_sql the sql stmt example :select s_value from - document_state where s_id=2 - * \param $p_array if array is not null we use the ExecSqlParm (safer) - * \see exec_sql - * \note print a warning if several value are found, if only the first value is needed - * consider using a LIMIT clause - * \return only the first value or an empty string if nothing is found - */ - - function get_value($p_sql, $p_array=null) - { - $this->ret=$this->exec_sql($p_sql, $p_array); - $r=pg_NumRows($this->ret); - if ($r==0) - return ""; - if ($r>1) - { - $array=pg_fetch_all($this->ret); - throw new Exception("Attention $p_sql retourne ".pg_NumRows($this->ret)." valeurs ". - var_export($p_array, true)." values=".var_export($array, true)); - } - $r=pg_fetch_row($this->ret, 0); - return $r[0]; - } - /** - * @brief return the number of rows affected by the previous query - */ - function get_affected() - { - return Database::num_row($this->ret); - } - - /** - * \brief purpose return the result of a sql statment - * in a array - * \param $p_sql sql query - * \param $p_array if not null we use ExecSqlParam - * \return an empty array if nothing is found - */ - - function get_array($p_sql, $p_array=null) - { - $r=$this->exec_sql($p_sql, $p_array); - - if (($Max=pg_NumRows($r))==0) - return array(); - $array=pg_fetch_all($r); - return $array; - } - - function create_sequence($p_name, $min=1) - { - if ($min<1) - $min=1; - $sql="create sequence ".$p_name." minvalue $min"; - $this->exec_sql($sql); - } - - /** - * \brief test if a sequence exist */ - /* \return true if the seq. exist otherwise false - */ - - function exist_sequence($p_name) - { - $r=$this->count_sql("select relname from pg_class where relname=lower($1)", array($p_name)); - if ($r==0) - return false; - return true; - } - - /**\brief test if a table exist - * \param $p_name table name - * \param $schema name of the schema default public - * \return true if a table exist otherwise false - */ - - function exist_table($p_name, $p_schema='public') - { - $r=$this->count_sql("select table_name from information_schema.tables where table_schema=$1 and table_name=lower($2)", array($p_schema, $p_name)); - if ($r==0) - return false; - return true; - } - - /** - * Check if a column exists in a table - * @param $col : column name - * @param $table :table name - * @param $schema :schema name, default public - * @return true or false - */ - function exist_column($col, $table, $schema) - { - $r=$this->get_value('select count(*) from information_schema.columns where table_name=lower($1) and column_name=lower($2) and table_schema=lower($3)', array($col, $table, $schema)); - if ($r>0) - return true; - return false; - } - - /** - * return the name of the database with the domain name - * @param $p_id of the folder WITHOUT the domain name - * @param $p_type dos for folder mod for template - * @return formatted name - */ - function format_name($p_id, $p_type) - { - switch ($p_type) - { - case 'dos': - $sys_name=sprintf("%sdossier%d", strtolower(domaine), $p_id); - break; - case 'mod': - $sys_name=sprintf("%smod%d", strtolower(domaine), $p_id); - break; - default: - echo_error(__FILE__." format_name invalid type ".$p_type, __LINE__); - throw new Exception(__FILE__." format_name invalid type ".$p_type. __LINE__); - } - return $sys_name; - } - - /** - * Count the database name in a system view - * @param $p_name string database name - * @return number of database found (normally 0 or 1) - */ - function exist_database($p_name) - { - $database_exist=$this->get_value('select count(*) - from pg_catalog.pg_database where datname = lower($1)', array($p_name)); - return $database_exist; - } - - /** - * @brief check if the large object exists - * @param $p_oid of the large object - * @return return true if the large obj exist or false if not - */ - function exist_blob($p_oid) - { - $r=$this->get_value('select count(loid) from pg_largeobject where loid=$1' - , array($p_oid)); - if ($r>0) - return true; - else - return false; - } - - /* - * !\brief test if a view exist - * \return true if the view. exist otherwise false - */ - - function exist_view($p_name) - { - $r=$this->count_sql("select viewname from pg_views where viewname=lower($1)", array($p_name)); - if ($r==0) - return false; - return true; - } - - /* - * !\brief test if a schema exists - * \return true if the schemas exists otherwise false - */ - - function exist_schema($p_name) - { - $r=$this->count_sql("select nspname from pg_namespace where nspname=lower($1)", array($p_name)); - if ($r==0) - return false; - return true; - } - - /** - * \brief create a string containing the value separated by comma - * for use in a SQL in statement - * \return the string or empty if nothing is found - * \see fid_card.php - */ - - function make_list($sql, $p_array=null) - { - if ($p_array==null) - { - $aArray=$this->get_array($sql); - } - else - { - $aArray=$this->get_array($sql, $p_array); - } - if (empty($aArray)) - return ""; - $aIdx=array_keys($aArray[0]); - $idx=$aIdx[0]; - $ret=""; - $f=""; - for ($i=0; $i Array - ( - [value] => 1 - [label] => Marchandise A - ) - - [1] => Array - ( - [value] => 2 - [label] => Marchandise B - ) - - [2] => Array - ( - [value] => 3 - [label] => Marchandise C - ) - ) - \endverbatim - * \see ISelect - */ - - function make_array($p_sql, $p_null=0,$p_array=null) - { - $a=$this->exec_sql($p_sql,$p_array); - $max=pg_NumRows($a); - if ($max==0&&$p_null==0) - return null; - for ($i=0; $i<$max; $i++) - { - $row=pg_fetch_row($a); - $r[$i]['value']=$row[0]; - $r[$i]['label']=h($row[1]); - } - // add a blank item ? - if ($p_null==1) - { - for ($i=$max; $i!=0; $i--) - { - $r[$i]['value']=$r[$i-1]['value']; - $r[$i]['label']=h($r[$i-1]['label']); - } - $r[0]['value']=-1; - $r[0]['label']=" "; - } // if ( $p_null == 1 ) - - return $r; - } - - /** - * \brief Save a "piece justificative" - * - * \param $seq jr_grpt_id - * \return $oid of the lob file if success - * null if a error occurs - * - */ - - function save_upload_document($seq) - { - /* there is - no file to - upload */ - if ($_FILES["pj"]["error"]==UPLOAD_ERR_NO_FILE) - { - return; - } - - $new_name=tempnam($_ENV['TMP'], 'pj'); - if ($_FILES["pj"]["error"]>0) - { - print_r($_FILES); - echo_error(__FILE__.":".__LINE__."Error: ".$_FILES["pj"]["error"]); - } - if (strlen($_FILES['pj']['tmp_name'])!=0) - { - if (move_uploaded_file($_FILES['pj']['tmp_name'], $new_name)) - { - // echo "Image saved"; - $oid=pg_lo_import($this->db, $new_name); - if ($oid==false) - { - echo_error('postgres.php', __LINE__, "cannot upload document"); - $this->rollback(); - return; - } - // Remove old document - $ret=$this->exec_sql("select jr_pj from jrn where jr_grpt_id=$seq"); - if (pg_num_rows($ret)!=0) - { - $r=pg_fetch_array($ret, 0); - $old_oid=$r['jr_pj']; - if (strlen($old_oid)!=0) - pg_lo_unlink($cn, $old_oid); - } - // Load new document - $this->exec_sql("update jrn set jr_pj=$1 , jr_pj_name=$2, - jr_pj_type=$3 where jr_grpt_id=$4", - array($oid,$_FILES['pj']['name'] ,$_FILES['pj']['type'],$seq)); - return $oid; - } - else - { - echo "

    Error

    "; - $this->rollback(); - } - } - return 0; - } - - /**\brief wrapper for the function pg_NumRows - * \param $ret is the result of a exec_sql - * \return number of line affected - */ - - static function num_row($ret) - { - return pg_NumRows($ret); - } - - /**\brief wrapper for the function pg_fetch_array - * \param $ret is the result of a pg_exec - * \param $p_indice is the index - * \return $array of column - */ - - static function fetch_array($ret, $p_indice=0) - { - return pg_fetch_array($ret, $p_indice); - } - - /**\brief wrapper for the function pg_fetch_all - * \param $ret is the result of pg_exec (exec_sql) - * \return double array (row x col ) - */ - - static function fetch_all($ret) - { - return pg_fetch_all($ret); - } - - /**\brief wrapper for the function pg_fetch_all - * \param $ret is the result of pg_exec (exec_sql) - * \param $p_row is the indice of the row - * \param $p_col is the indice of the col - * \return a string or an integer - */ - - static function fetch_result($ret, $p_row=0, $p_col=0) - { - return pg_fetch_result($ret, $p_row, $p_col); - } - - /**\brief wrapper for the function pg_fetch_row - * \param $ret is the result of pg_exec (exec_sql) - * \param $p_row is the indice of the row - * \return an array indexed from 0 - */ - - static function fetch_row($ret, $p_row) - { - return pg_fetch_row($ret, $p_row); - } - - /**\brief wrapper for the function pg_lo_unlink - * \param $p_oid is the of oid - * \return return the result of the operation - */ - - function lo_unlink($p_oid) - { - return pg_lo_unlink($this->db, $p_oid); - } - - /**\brief wrapper for the function pg_prepare - * \param $p_string string name for pg_prepare function - * \param $p_sql is the sql to prepare - * \return return the result of the operation - */ - - function prepare($p_string, $p_sql) - { - return pg_prepare($this->db, $p_string, $p_sql); - } - - /**\brief wrapper for the function pg_execute - * \param $p_string string name of the stmt given in pg_prepare function - * \param $p_array contains the variables - * \note set this->ret to the return of pg_execute - * \return return the result of the operation, - */ - - function execute($p_string, $p_array) - { - $this->ret=pg_execute($this->db, $p_string, $p_array); - return $this->ret; - } - - /**\brief wrapper for the function pg_lo_export - * \param $p_oid is the oid of the log - * \param $tmp is the file - * \return result of the operation - */ - - function lo_export($p_oid, $tmp) - { - return pg_lo_export($this->db, $p_oid, $tmp); - } - - /**\brief wrapper for the function pg_lo_export - * \param $p_oid is the oid of the log - * \param $tmp is the file - * \return result of the operation - */ - - function lo_import($p_oid) - { - return pg_lo_import($this->db, $p_oid); - } - - /**\brief wrapper for the function pg_escape_string - * \param $p_string is the string to escape - * \return escaped string - */ - - static function escape_string($p_string) - { - return pg_escape_string($p_string); - } - - /**\brief wrapper for the function pg_close - */ - - function close() - { - if ( $this->is_open ) pg_close($this->db); - $this->is_open=FALSE; - } - - /**\brief - * \param - * \return - * \note - * \see - */ - - function __toString() - { - return "database "; - } - - static function test_me() - { - - } - - function status() - { - return pg_transaction_status($this->db); - } - - /** - * with the handle of a successull query, echo each row into CSV and - * send it directly - * @param type $ret handle to a query - * @param type $aheader double array, each item of the array contains - * a key type (num) and a key title - */ - function query_to_csv($ret, $aheader) - { - $seq=""; - for ($i=0; $iseek(); - for ($i = 0; $i < Database::num_row($ret); $i++) - { - $tmenu = $menu->next($ret, $i); - $idx = $tmenu->getp('md_code'); - $this->a_menu_def[$idx] = $tmenu->getp('me_code'); - } - $this->code = explode(',', 'code_follow,code_invoice'); - } - - function input_value() - { - $code_invoice = new IText('code_invoice', $this->a_menu_def['code_invoice']); - $code_follow = new IText('code_follow', $this->a_menu_def['code_follow']); - echo '

    ' . _('Code pour création facture depuis gestion') . $code_invoice->input() . '

    '; - echo '

    ' . _('Code pour appel gestion') . $code_follow->input() . '

    '; - } - - private function check_code($p_string) - { - global $cn; - $count = $cn->get_value('select count(*) from v_menu_description_favori where ' - . 'code = $1', array($p_string)); - if ($count == 0) - { - throw new Exception('code_inexistant'); - } - } - - function verify() - { - foreach ($this->code as $code) - { - $this->check_code($this->a_menu_def[$code]); - } - } - - function set($p_string, $p_value) - { - if (in_array($p_string, $this->code) == false) - { - throw new Exception("code_invalid"); - } - $this->a_menu_def[$p_string] = $p_value; - } - function get ($p_string) - { - return $this->a_menu_def[$p_string]; - } - - function save() - { - global $cn; - try - { - $this->verify(); - foreach ($this->code as $key => $value) - { - $cn->exec_sql('update menu_default set me_code=$1 where - md_code =$2', array($value,$this->a_menu_def[$value])); - } - } catch (Exception $e) - { - $e->getTraceAsString(); - throw $e; - } - } - - static function test_me() - { - global $cn, $g_user, $g_succeed, $g_failed; - - echo h2('Constructor', ''); - $a = new Default_Menu(); - echo $g_succeed . 'constructor'; - if (count($a->a_menu_def) != 2) - echo $g_failed; - else - echo $g_succeed; - echo h2("input_value", ""); - $a->input_value(); - echo h2('verify'); - $a->verify(); - try { - echo h2('Verify must failed'); - $a->set('code_follow', 'MEMNU/MEMEM/'); - $a->verify(); - } catch (Exception $e) { - echo $g_succeed. " OK "; - } - echo h2('Verify must succeed'); - try { - $a->set('code_follow', 'GESTION/FOLLOW'); - $a->verify(); - echo $g_succeed. " OK "; - } catch (Exception $e) - { - echo $g_failed."NOK"; - } - echo h2('Save'); - $a->save(); - echo h2('GET'); - echo ( assert($a->get('code_follow')=='GESTION/FOLLOW') )?$g_succeed.$a->get('code_follow'):$g_failed.$a->get('code_follow'); - echo ( assert($a->get('code_invoice')=='COMPTA/VENMENU/VEN') )?$g_succeed.$a->get('code_invoice'):$g_failed.$a->get('code_invoice'); - echo $a->get('code_invoice'); - } - -} diff --git a/sources/include/class_default_menu_sql.php b/sources/include/class_default_menu_sql.php deleted file mode 100644 index 38292e1..0000000 --- a/sources/include/class_default_menu_sql.php +++ /dev/null @@ -1,57 +0,0 @@ -table = "public.menu_default"; - $this->primary_key = "md_id"; - - $this->name = array( - "md_id"=>"md_id", - "md_code" => "md_code", - "me_code" => "me_code" - ); - $this->type = array( - "md_id"=>"md_id" - ,"md_code" => "text" - , "me_code" => "text" - ); - $this->default = array( - "md_id" - ); - global $cn; - - parent::__construct($cn, $p_id); - } - -} diff --git a/sources/include/class_document.php b/sources/include/class_document.php deleted file mode 100644 index 7acaf91..0000000 --- a/sources/include/class_document.php +++ /dev/null @@ -1,1285 +0,0 @@ -db=$p_cn; - $this->d_id=$p_d_id; - $this->counter=0; - } - /*!\brief insert a minimal document and set the d_id - */ - function blank() - { - $this->d_id=$this->db->get_next_seq("document_d_id_seq"); - // affect a number - $this->d_number=$this->db->get_next_seq("seq_doc_type_".$this->md_type); - $sql=sprintf('insert into document(d_id,ag_id,d_number) values(%d,%d,%d)', - $this->d_id, - $this->ag_id, - $this->d_number); - $this->db->exec_sql($sql); - - } - function compute_filename($pj,$filename) - { - foreach (array('/','*','<','>',';',',','\\','.',':') as $i) { - $pj= str_replace($i, "-",$pj); - } - // save the suffix - $pos_prefix=strrpos($filename,"."); - if ($pos_prefix == 0) $pos_prefix=strlen($filename); - $filename_no=substr($filename,0,$pos_prefix); - $filename_suff=substr($filename,$pos_prefix,strlen($filename)); - $new_filename= strtolower($filename_no."-".$pj.$filename_suff); - return $new_filename; - } - /*! - * \brief Generate the document, Call $this-\>Replace to replace - * tag by value - *@param p_array contains the data normally it is the $_POST - *@param contains the new filename - * \return an array : the url where the generated doc can be found, the name - * of the file and his mimetype - */ - function Generate($p_array,$p_filename="") - { - // create a temp directory in /tmp to unpack file and to parse it - $dirname=tempnam($_ENV['TMP'],'doc_'); - - - unlink($dirname); - mkdir ($dirname); - // Retrieve the lob and save it into $dirname - $this->db->start(); - $dm_info="select md_name,md_type,md_lob,md_filename,md_mimetype - from document_modele where md_id=".$this->md_id; - $Res=$this->db->exec_sql($dm_info); - - $row=Database::fetch_array($Res,0); - $this->d_lob=$row['md_lob']; - $this->d_filename=$row['md_filename']; - $this->d_mimetype=$row['md_mimetype']; - $this->d_name=$row['md_name']; - - - chdir($dirname); - $filename=$row['md_filename']; - $exp=$this->db->lo_export($row['md_lob'],$dirname.DIRECTORY_SEPARATOR.$filename); - if ( $exp === false ) echo_warning( __FILE__.":".__LINE__."Export NOK $filename"); - - $type="n"; - // if the doc is a OOo, we need to unzip it first - // and the name of the file to change is always content.xml - if ( strpos($row['md_mimetype'],'vnd.oasis') != 0 ) - { - ob_start(); - $zip = new Zip_Extended; - if ($zip->open($filename) === TRUE) { - $zip->extractTo($dirname.DIRECTORY_SEPARATOR); - $zip->close(); - } else { - echo __FILE__.":".__LINE__."cannot unzip model ".$filename; - } - - // Remove the file we do not need anymore - unlink($filename); - ob_end_clean(); - $file_to_parse="content.xml"; - $type="OOo"; - } - else - $file_to_parse=$filename; - // affect a number - $this->d_number=$this->db->get_next_seq("seq_doc_type_".$row['md_type']); - - // parse the document - return the doc number ? - $this->ParseDocument($dirname,$file_to_parse,$type,$p_array); - - $this->db->commit(); - // if the doc is a OOo, we need to re-zip it - if ( strpos($row['md_mimetype'],'vnd.oasis') != 0 ) - { - ob_start(); - $zip = new Zip_Extended; - $res = $zip->open($filename, ZipArchive::CREATE); - if($res !== TRUE) - { - throw new Exception ( __FILE__.":".__LINE__."cannot recreate zip"); - } - $zip->add_recurse_folder($dirname.DIRECTORY_SEPARATOR); - $zip->close(); - - ob_end_clean(); - - $file_to_parse=$filename; - } - if ( $p_filename !="") { - - $this->d_filename=$this->compute_filename($p_filename, $this->d_filename); - } - $this->SaveGenerated($dirname.DIRECTORY_SEPARATOR.$file_to_parse); - // Invoice - $ret='Document généré'; - @rmdir($dirname); - return $ret; - } - - /*! ParseDocument - * \brief This function parse a document and replace all - * the predefined tags by a value. This functions - * generate diffent documents (invoice, order, letter) - * with the info from the database - * - * \param $p_dir directory name - * \param $p_file filename - * \param $p_type For the OOo document the tag are < and > instead of < and > - * \param $p_array variable from $_POST - */ - function ParseDocument($p_dir,$p_file,$p_type,$p_array) - { - - /*!\note Replace in the doc the tags by their values. - * - MY_* table parameter - * - ART_VEN* table quant_sold for invoice - * - CUST_* table quant_sold and fiche for invoice - * - e_* for the invoice in the $_POST - */ - // open the document - $infile_name=$p_dir.DIRECTORY_SEPARATOR.$p_file; - $h=fopen($infile_name,"r"); - - // check if tmpdir exist otherwise create it - $temp_dir=$_SERVER["DOCUMENT_ROOT"].DIRECTORY_SEPARATOR.'tmp'; - if ( is_dir($temp_dir) == false ) - { - if ( mkdir($temp_dir) == false ) - { - $msg=_("Ne peut pas créer le répertoire ".$temp_dir); - throw new Exception($msg); - } - } - // Compute output_name - $output_name=tempnam($temp_dir,"gen_doc_"); - $output_file=fopen($output_name,"w+"); - // check if the opening is sucessfull - if ( $h === false ) - { - echo __FILE__.":".__LINE__."cannot open $p_dir $p_file "; - $msg=_("Ne peut pas ouvrir $p_dir $p_file"); - throw new Exception($msg); - } - if ( $output_file == false) - { - $msg=_("Ne peut pas ouvrir $p_dir $p_file"); - echo $msg; - throw new Exception($msg); - } - // compute the regex - if ( $p_type=='OOo') - { - $regex="/=*<<[A-Z]+_*[A-Z]*_*[A-Z]*_*[A-Z]*_*[0-9]*>>/i"; - $lt="<"; - $gt=">"; - } - else - { - $regex="/=*<<[A-Z]+_*[A-Z]*_*[A-Z]*_*[A-Z]*_*[0-9]*>>/i"; - $lt="<"; - $gt=">"; - } - - //read the file - while(! feof($h)) - { - // replace the tag - $buffer=fgets($h); - // search in the buffer the magic << and >> - // while preg_match_all finds something to replace - while ( preg_match_all ($regex,$buffer,$f) >0 ) - { - - - foreach ( $f as $apattern ) - { - - - foreach($apattern as $pattern) - { - - - $to_remove=$pattern; - // we remove the < and > from the pattern - $tag=str_replace($lt,'',$pattern); - $tag=str_replace($gt,'',$tag); - - - // if the pattern if found we replace it - $value=$this->Replace($tag,$p_array); - if ( strpos($value,'ERROR') != false ) $value=""; - /* - * Change type of cell to numeric - * allow numeric cel in ODT for the formatting and formula - */ - if ( is_numeric($value) && $p_type=='OOo') - { - $searched='/office:value-type="string">'.$pattern.'/'; - $replaced='office:value-type="float" office:value="'.$value.'">'.$pattern; - $buffer=preg_replace($searched, $replaced, $buffer,1); - } - // replace into the $buffer - // take the position in the buffer - $pos=strpos($buffer,$to_remove); - // get the length of the string to remove - $len=strlen($to_remove); - if ( $p_type=='OOo' ) - { - $value=str_replace('&','&',$value); - $value=str_replace('<','<',$value); - $value=str_replace('>','>',$value); - $value=str_replace('"','"',$value); - $value=str_replace("'",''',$value); - } - $buffer=substr_replace($buffer,$value,$pos,$len); - - // if the pattern if found we replace it - } - } - } - // write into the output_file - fwrite($output_file,$buffer); - - } - fclose($h); - fclose($output_file); - if ( ($ret=copy ($output_name,$infile_name)) == FALSE ) - { - echo _('Ne peut pas sauver '.$output_name.' vers '.$infile_name.' code d\'erreur ='.$ret); - } - - - } - /*! SaveGenerated - * \brief Save the generated Document - * \param $p_file is the generated file - * - * - * \return 0 if no error otherwise 1 - */ - function SaveGenerated($p_file) - { - // We save the generated file - $doc=new Document($this->db); - $this->db->start(); - $this->d_lob=$this->db->lo_import($p_file); - if ( $this->d_lob == false ) - { - echo "ne peut pas importer [$p_file]"; - return 1; - } - - $sql="insert into document(ag_id,d_lob,d_number,d_filename,d_mimetype) - values ($1,$2,$3,$4,$5)"; - - $this->db->exec_sql($sql, array($this->ag_id, - $this->d_lob, - $this->d_number, - $this->d_filename, - $this->d_mimetype)); - $this->d_id=$this->db->get_current_seq("document_d_id_seq"); - // Clean the file - unlink ($p_file); - $this->db->commit(); - return 0; - } - /*! Upload - * \brief Upload a file into document - * all the needed data are in $_FILES we don't increment the seq - * \param $p_file : array containing by default $_FILES - * - * \return - */ - function Upload($p_ag_id) - { - // nothing to save - if ( sizeof($_FILES) == 0 ) return; - - /* for several files */ - /* $_FILES is now an array */ - // Start Transaction - $this->db->start(); - $name=$_FILES['file_upload']['name']; - for ($i = 0; $i < sizeof($name);$i++) - { - $new_name=tempnam($_ENV['TMP'],'doc_'); - // check if a file is submitted - if ( strlen($_FILES['file_upload']['tmp_name'][$i]) != 0 ) - { - // upload the file and move it to temp directory - if ( move_uploaded_file($_FILES['file_upload']['tmp_name'][$i],$new_name)) - { - $oid=$this->db->lo_import($new_name); - // check if the lob is in the database - if ( $oid == false ) - { - $this->db->rollback(); - return 1; - } - } - // the upload in the database is successfull - $this->d_lob=$oid; - $this->d_filename=$_FILES['file_upload']['name'][$i]; - $this->d_mimetype=$_FILES['file_upload']['type'][$i]; - $this->d_description= strip_tags($_POST['input_desc'][$i]); - // insert into the table - $sql="insert into document (ag_id, d_lob,d_filename,d_mimetype,d_number,d_description) values ($1,$2,$3,$4,$5,$6)"; - $this->db->exec_sql($sql,array($p_ag_id,$this->d_lob,$this->d_filename,$this->d_mimetype,1,$this->d_description)); - } - } /* end for */ - $this->db->commit(); - - } - /** - * Copy a existing OID (LOB) into the table document - * @note use of global variable $cn which is the db connx to the current folder - * @param type $p_ag_id Follow_Up::ag_id - * @param type $p_lob oid of existing document - * @param type $p_filename filename of existing document - * @param type $p_mimetype mimetype of existing document - * @param type $p_description Description of existing document (default empty) - */ - static function insert_existing_document($p_ag_id, $p_lob, $p_filename, $p_mimetype, $p_description = "") - { - global $cn; - // insert into the table - $sql = "insert into document (ag_id, d_lob,d_filename,d_mimetype,d_number,d_description) values ($1,$2,$3,$4,$5,$6)"; - $cn->exec_sql($sql, array($p_ag_id, $p_lob, $p_filename, $p_mimetype, 1, $p_description)); - } - - /*! a_ref - * \brief create and compute a string for reference the doc - * - * \return a string - */ - function anchor() - { - if ( $this->d_id == 0 ) - return ''; - $image=''; - $r=""; - $r=''.$image.''; - return $r; - } - /** Get - * \brief Send the document - */ - function Send() - { - // retrieve the template and generate document - $this->db->start(); - $ret=$this->db->exec_sql( - "select d_id,d_lob,d_filename,d_mimetype from document where d_id=".$this->d_id ); - if ( Database::num_row ($ret) == 0 ) - return; - $row=Database::fetch_array($ret,0); - //the document is saved into file $tmp - $tmp=tempnam($_ENV['TMP'],'document_'); - $this->db->lo_export($row['d_lob'],$tmp); - $this->d_mimetype=$row['d_mimetype']; - $this->d_filename=$row['d_filename']; - - // send it to stdout - ini_set('zlib.output_compression','Off'); - header("Pragma: public"); - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Cache-Control: must-revalidate"); - header('Content-type: '.$this->d_mimetype); - header('Content-Disposition: attachment;filename="'.$this->d_filename.'"',FALSE); - header("Accept-Ranges: bytes"); - $file=fopen($tmp,'r'); - while ( !feof ($file) ) - { - echo fread($file,8192); - } - fclose($file); - - unlink ($tmp); - - $this->db->commit(); - - } - /*!\brief get all the document of a given action - *\param $ag_id the ag_id from action::ag_id (primary key) - *\return an array of objects document or an empty array if nothing found - */ - function get_all($ag_id) - { - $res=$this->db->get_array('select d_id, ag_id, d_lob, d_number, d_filename,'. - ' d_mimetype,d_description from document where ag_id=$1',array($ag_id)); - $a=array(); - for ($i=0;$idb); - $doc->d_id=$res[$i]['d_id']; - $doc->ag_id=$res[$i]['ag_id']; - $doc->d_lob=$res[$i]['d_lob']; - $doc->d_number=$res[$i]['d_number']; - $doc->d_filename=$res[$i]['d_filename']; - $doc->d_mimetype=$res[$i]['d_mimetype']; - $doc->d_description=$row['d_description']; - $a[$i]=clone $doc; - } - return $a; - } - - /*!\brief Get complete all the data member thx info from the database - */ - function get() - { - $sql="select * from document where d_id=".$this->d_id; - $ret=$this->db->exec_sql($sql); - if ( Database::num_row($ret) == 0 ) - return; - $row=Database::fetch_array($ret,0); - $this->ag_id=$row['ag_id']; - $this->d_mimetype=$row['d_mimetype']; - $this->d_filename=$row['d_filename']; - $this->d_lob=$row['d_lob']; - $this->d_number=$row['d_number']; - $this->d_description=$row['d_description']; - - } - /*! - * \brief replace the TAG by the real value, this value can be into - * the database or in $_POST - * The possible tags are - * - [CUST_NAME] customer's name - * - [CUST_ADDR_1] customer's address line 1 - * - [CUST_CP] customer's ZIP code - * - [CUST_CO] customer's country - * - [CUST_CITY] customer's city - * - [CUST_VAT] customer's VAT - * - [MARCH_NEXT] end this item and increment the counter $i - * - [DATE_LIMIT] - * - [VEN_ART_NAME] - * - [VEN_ART_PRICE] - * - [VEN_ART_QUANT] - * - [VEN_ART_TVA_CODE] - * - [VEN_ART_STOCK_CODE] - * - [VEN_HTVA] - * - [VEN_TVAC] - * - [VEN_TVA] - * - [TOTAL_VEN_HTVA] - * - [DATE_CALC] - * - [DATE] - * - [DATE_LIMIT] - * - [DATE_LIMIT_CALC] - * - [NUMBER] - * - [MY_NAME] - * - [MY_CP] - * - [MY_COMMUNE] - * - [MY_TVA] - * - [MY_STREET] - * - [MY_NUMBER] - * - [TVA_CODE] - * - [TVA_RATE] - * - [BON_COMMANDE] - * - [OTHER_INFO] - * - [CUST_NUM] - * - [CUST_BANQUE_NAME] - * - [CUST_BANQUE_NO] - * - [USER] - * - [REFERENCE] - * - [BENEF_NAME] - * - [BENEF_BANQUE_NAME] - * - [BENEF_BANQUE_NO] - * - [BENEF_ADDR_1] - * - [BENEF_CP] - * - [BENEF_CO] - * - [BENEF_CITY] - * - [BENEF_VAT] - * - [ACOMPTE] - * - [TITLE] - * - [DESCRIPTION] - * - * \param $p_tag TAG - * \param $p_array data from $_POST - * \return String which must replace the tag - */ - function Replace($p_tag,$p_array) - { - global $g_parameter; - $p_tag=strtoupper($p_tag); - $p_tag=str_replace('=','',$p_tag); - $r="Tag inconnu"; - - switch ($p_tag) - { - case 'DATE': - $r=(isset ($p_array['ag_timestamp']))?$p_array['ag_timestamp']:$p_array['e_date']; - break; - case 'DATE_CALC': - $r=' Date inconnue '; - // Date are in $p_array['ag_date'] - // or $p_array['e_date'] - if ( isset ($p_array['ag_timestamp'])) { - $date=format_date($p_array['ag_timestamp'],'DD.MM.YYYY','YYYY-MM-DD'); - $r=$date; - } - if ( isset ($p_array['e_date'])) { - $date=format_date($p_array['e_date'],'DD.MM.YYYY','YYYY-MM-DD'); - $r=$date; - } - break; - // - // the company priv - - case 'MY_NAME': - $r=$g_parameter->MY_NAME; - break; - case 'MY_CP': - $r=$g_parameter->MY_CP; - break; - case 'MY_COMMUNE': - $r=$g_parameter->MY_COMMUNE; - break; - case 'MY_TVA': - $r=$g_parameter->MY_TVA; - break; - case 'MY_STREET': - $r=$g_parameter->MY_STREET; - break; - case 'MY_NUMBER': - $r=$g_parameter->MY_NUMBER; - break; - case 'MY_TEL': - $r=$g_parameter->MY_TEL; - break; - case 'MY_FAX': - $r=$g_parameter->MY_FAX; - break; - case 'MY_PAYS': - $r=$g_parameter->MY_PAYS; - break; - - // customer - /*\note The CUST_* are retrieved thx the $p_array['tiers'] - * which contains the quick_code - */ - case 'SOLDE': - $tiers=new Fiche($this->db); - $qcode=isset($p_array['qcode_dest'])?$p_array['qcode_dest']:$p_array['e_client']; - $tiers->get_by_qcode($qcode,false); - $p=$tiers->strAttribut(ATTR_DEF_ACCOUNT); - $poste=new Acc_Account_Ledger($this->db,$p); - $r=$poste->get_solde(' true' ); - break; - case 'CUST_NAME': - $tiers=new Fiche($this->db); - $qcode=isset($p_array['qcode_dest'])?$p_array['qcode_dest']:$p_array['e_client']; - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_NAME); - break; - case 'CUST_ADDR_1': - $tiers=new Fiche($this->db); - $qcode=isset($p_array['qcode_dest'])?$p_array['qcode_dest']:$p_array['e_client']; - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_ADRESS); - - break ; - case 'CUST_CP': - $tiers=new Fiche($this->db); - - $qcode=isset($p_array['qcode_dest'])?$p_array['qcode_dest']:$p_array['e_client']; - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_CP); - - break; - case 'CUST_CITY': - $tiers=new Fiche($this->db); - - $qcode=isset($p_array['qcode_dest'])?$p_array['qcode_dest']:$p_array['e_client']; - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_CITY); - - break; - - case 'CUST_CO': - $tiers=new Fiche($this->db); - - $qcode=isset($p_array['qcode_dest'])?$p_array['qcode_dest']:$p_array['e_client']; - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_PAYS); - - break; - // Marchandise in $p_array['e_march*'] - // \see user_form_achat.php or user_form_ven.php - case 'CUST_VAT': - $tiers=new Fiche($this->db); - - $qcode=isset($p_array['qcode_dest'])?$p_array['qcode_dest']:$p_array['e_client']; - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_NUMTVA); - break; - case 'CUST_NUM': - $tiers=new Fiche($this->db); - $qcode=isset($p_array['qcode_dest'])?$p_array['qcode_dest']:$p_array['e_client']; - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_NUMBER_CUSTOMER); - break; - case 'CUST_BANQUE_NO': - $tiers=new Fiche($this->db); - $qcode=isset($p_array['qcode_dest'])?$p_array['qcode_dest']:$p_array['e_client']; - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_BQ_NO); - break; - case 'CUST_BANQUE_NAME': - $tiers=new Fiche($this->db); - $qcode=isset($p_array['qcode_dest'])?$p_array['qcode_dest']:$p_array['e_client']; - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_BQ_NAME); - break; - /* -------------------------------------------------------------------------------- */ - /* BENEFIT (fee notes */ - case 'BENEF_NAME': - $tiers=new Fiche($this->db); - $qcode=isset($p_array['qcode_benef'])?$p_array['qcode_benef']:''; - if ( $qcode=='') - { - $r=''; - break; - } - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_NAME); - break; - case 'BENEF_ADDR_1': - $tiers=new Fiche($this->db); - $qcode=isset($p_array['qcode_benef'])?$p_array['qcode_benef']:''; - if ( $qcode=='') - { - $r=''; - break; - } - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_ADRESS); - - break ; - case 'BENEF_CP': - $tiers=new Fiche($this->db); - - $qcode=isset($p_array['qcode_benef'])?$p_array['qcode_benef']:''; - if ( $qcode=='') - { - $r=''; - break; - } - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_CP); - - break; - case 'BENEF_CITY': - $tiers=new Fiche($this->db); - - $qcode=isset($p_array['qcode_benef'])?$p_array['qcode_benef']:''; - if ( $qcode=='') - { - $r=''; - break; - } - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_CITY); - - break; - - case 'BENEF_CO': - $tiers=new Fiche($this->db); - - $qcode=isset($p_array['qcode_benef'])?$p_array['qcode_benef']:''; - if ( $qcode=='') - { - $r=''; - break; - } - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_PAYS); - - break; - // Marchandise in $p_array['e_march*'] - // \see user_form_achat.php or user_form_ven.php - case 'BENEF_VAT': - $tiers=new Fiche($this->db); - - $qcode=isset($p_array['qcode_benef'])?$p_array['qcode_benef']:''; - if ( $qcode=='') - { - $r=''; - break; - } - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_NUMTVA); - break; - case 'BENEF_NUM': - $tiers=new Fiche($this->db); - $qcode=isset($p_array['qcode_benef'])?$p_array['qcode_benef']:''; - if ( $qcode=='') - { - $r=''; - break; - } - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_NUMBER_CUSTOMER); - break; - case 'BENEF_BANQUE_NO': - $tiers=new Fiche($this->db); - $qcode=isset($p_array['qcode_benef'])?$p_array['qcode_benef']:''; - if ( $qcode=='') - { - $r=''; - break; - } - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_BQ_NO); - break; - case 'BENEF_BANQUE_NAME': - $tiers=new Fiche($this->db); - $qcode=isset($p_array['qcode_benef'])?$p_array['qcode_benef']:''; - if ( $qcode=='') - { - $r=''; - break; - } - $tiers->get_by_qcode($qcode,false); - $r=$tiers->strAttribut(ATTR_DEF_BQ_NAME); - break; - - // Marchandise in $p_array['e_march*'] - // \see user_form_achat.php or user_form_ven.php - case 'NUMBER': - $r=$this->d_number; - break; - - case 'USER' : - return $_SESSION['use_name'].', '.$_SESSION['use_first_name']; - - break; - case 'REFERENCE': - $act=new Follow_Up($this->db); - $act->ag_id=$this->ag_id; - $act->get(); - $r=$act->ag_ref; - break; - - /* - * - [VEN_ART_NAME] - * - [VEN_ART_PRICE] - * - [VEN_ART_QUANT] - * - [VEN_ART_TVA_CODE] - * - [VEN_ART_STOCK_CODE] - * - [VEN_HTVA] - * - [VEN_TVAC] - * - [VEN_TVA] - * - [TOTAL_VEN_HTVA] - * - [DATE_LIMIT] - */ - case 'DATE_LIMIT_CALC': - extract ($p_array); - $id='e_ech' ; - if ( !isset (${$id}) ) return ""; - $r=format_date(${$id},'DD.MM.YYYY','YYYY-MM-DD'); - break; - case 'DATE_LIMIT': - extract ($p_array); - $id='e_ech' ; - if ( !isset (${$id}) ) return ""; - $r=${$id}; - break; - case 'MARCH_NEXT': - $this->counter++; - $r=''; - break; - - case 'VEN_ART_NAME': - extract ($p_array); - $id='e_march'.$this->counter; - // check if the march exists - if ( ! isset (${$id})) return ""; - // check that something is sold - if ( ${'e_march'.$this->counter.'_price'} != 0 && ${'e_quant'.$this->counter} != 0 ) - { - $f=new Fiche($this->db); - $f->get_by_qcode(${$id},false); - $r=$f->strAttribut(ATTR_DEF_NAME); - } - else $r = ""; - break; - case 'VEN_ART_LABEL': - extract ($p_array); - $id='e_march'.$this->counter."_label"; - // check if the march exists - - if (! isset (${$id}) || (isset (${$id}) && strlen(trim(${$id})) == 0)) - { - $id = 'e_march' . $this->counter; - // check if the march exists - if (!isset(${$id})) - $r= ""; - else - { - // check that something is sold - if (${'e_march' . $this->counter . '_price'} != 0 && ${'e_quant' . $this->counter} != 0) - { - $f = new Fiche($this->db); - $f->get_by_qcode(${$id}, false); - $r = $f->strAttribut(ATTR_DEF_NAME); - } else - $r = ""; - } - } - else - $r=${'e_march'.$this->counter.'_label'}; - break; - case 'VEN_ART_STOCK_CODE': - extract ($p_array); - $id = 'e_march' . $this->counter; - // check if the march exists - if (!isset(${$id})) - $r= ""; - else - { - // check that something is sold - if (${'e_march' . $this->counter . '_price'} != 0 && ${'e_quant' . $this->counter} != 0) - { - $f = new Fiche($this->db); - $f->get_by_qcode(${$id}, false); - $r = $f->strAttribut(ATTR_DEF_STOCK); - $r=($r == NOTFOUND)?'':$r; - } - } - break; - case 'VEN_ART_PRICE': - extract ($p_array); - $id='e_march'.$this->counter.'_price' ; - if ( !isset (${$id}) ) return ""; - if (${$id} == 0 ) return ""; - $r=${$id}; - break; - - case 'TVA_RATE': - case 'VEN_ART_TVA_RATE': - extract ($p_array); - $id='e_march'.$this->counter.'_tva_id'; - if ( !isset (${$id}) ) return ""; - if ( ${$id} == -1 || ${$id}=='' ) return ""; - $march_id='e_march'.$this->counter.'_price' ; - if ( ! isset (${$march_id})) return ''; - $tva=new Acc_Tva($this->db); - $tva->set_parameter("id",${$id}); - if ( $tva->load() == -1) return ''; - return $tva->get_parameter("rate"); - break; - - case 'TVA_CODE': - case 'VEN_ART_TVA_CODE': - extract ($p_array); - $id='e_march'.$this->counter.'_tva_id'; - if ( !isset (${$id}) ) return ""; - if ( ${$id} == -1 ) return ""; - $qt='e_quant'.$this->counter; - $price='e_march'.$this->counter.'_price' ; - if ( ${$price} == 0 || ${$qt} == 0 - || strlen(trim( $price )) ==0 - || strlen(trim($qt)) ==0) - return ""; - - $r=${$id}; - break; - - case 'TVA_LABEL': - extract ($p_array); - $id='e_march'.$this->counter.'_tva_id'; - if ( !isset (${$id}) ) return ""; - $march_id='e_march'.$this->counter.'_price' ; - if ( ! isset (${$march_id})) return ''; - if ( ${$march_id} == 0) return ''; - $tva=new Acc_Tva($this->db,${$id}); - if ($tva->load() == -1 ) return ""; - $r=$tva->get_parameter('label'); - - break; - - /* total VAT for one sold */ - case 'TVA_AMOUNT': - case 'VEN_TVA': - extract ($p_array); - $qt='e_quant'.$this->counter; - $price='e_march'.$this->counter.'_price' ; - $tva='e_march'.$this->counter.'_tva_id'; - /* if we do not use vat this var. is not set */ - if ( !isset(${$tva}) ) return ''; - if ( !isset (${'e_march'.$this->counter}) ) return ""; - // check that something is sold - if ( ${$price} == 0 || ${$qt} == 0 - || strlen(trim( $price )) ==0 - || strlen(trim($qt)) ==0) - return ""; - $r=${'e_march'.$this->counter.'_tva_amount'}; - break; - /* TVA automatically computed */ - case 'VEN_ART_TVA': - - extract ($p_array); - $qt='e_quant'.$this->counter; - $price='e_march'.$this->counter.'_price' ; - $tva='e_march'.$this->counter.'_tva_id'; - if ( !isset (${'e_march'.$this->counter}) ) return ""; - // check that something is sold - if ( ${$price} == 0 || ${$qt} == 0 - || strlen(trim( $price )) ==0 - || strlen(trim($qt)) ==0) - return ""; - $oTva=new Acc_Tva($this->db,${$tva}); - if ($oTva->load() == -1 ) return ""; - $r=round(${$price},2)*$oTva->get_parameter('rate'); - $r=round($r,2); - break; - - case 'VEN_ART_TVAC': - extract ($p_array); - $qt='e_quant'.$this->counter; - $price='e_march'.$this->counter.'_price' ; - $tva='e_march'.$this->counter.'_tva_id'; - if ( !isset (${'e_march'.$this->counter}) ) return ""; - // check that something is sold - if ( ${$price} == 0 || ${$qt} == 0 - || strlen(trim( $price )) ==0 - || strlen(trim($qt)) ==0) - return ""; - if ( ! isset (${$tva}) ) return ''; - $tva=new Acc_Tva($this->db,${$tva}); - if ($tva->load() == -1 ) - { - $r=round(${$price},2); - } - else - { - $r=round(${$price}*$tva->get_parameter('rate')+${$price},2); - } - - break; - - case 'VEN_ART_QUANT': - extract ($p_array); - $id='e_quant'.$this->counter; - if ( !isset (${$id}) ) return ""; - // check that something is sold - if ( ${'e_march'.$this->counter.'_price'} == 0 - || ${'e_quant'.$this->counter} == 0 - || strlen(trim( ${'e_march'.$this->counter.'_price'} )) ==0 - || strlen(trim(${'e_quant'.$this->counter})) ==0 ) - return ""; - $r=${$id}; - break; - - case 'VEN_HTVA': - extract ($p_array); - $id='e_march'.$this->counter.'_price' ; - $quant='e_quant'.$this->counter; - if ( !isset (${$id}) ) return ""; - - // check that something is sold - if ( ${'e_march'.$this->counter.'_price'} == 0 || ${'e_quant'.$this->counter} == 0 - || strlen(trim( ${'e_march'.$this->counter.'_price'} )) ==0 - || strlen(trim(${'e_quant'.$this->counter})) ==0) - return ""; - bcscale(4); - $r=bcmul(${$id},${$quant}); - $r=round($r,2); - break; - - case 'VEN_TVAC': - extract ($p_array); - $id='e_march'.$this->counter.'_tva_amount' ; - $price='e_march'.$this->counter.'_price' ; - $quant='e_quant'.$this->counter; - if ( ! isset(${'e_march'.$this->counter.'_price'})|| !isset(${'e_quant'.$this->counter})) return ""; - // check that something is sold - if ( ${'e_march'.$this->counter.'_price'} == 0 || ${'e_quant'.$this->counter} == 0 ) return ""; - bcscale(4); - // if TVA not exist - if ( ! isset(${$id})) - $r= bcmul(${$price},${$quant}); - else{ - $r= bcmul(${$price},${$quant}); - $r=bcadd($r,${$id}); - } - $r=round($r,2); - return $r; - break; - - case 'TOTAL_VEN_HTVA': - extract($p_array); - bcscale(4); - $sum=0.0; - for ($i=0;$i<$nb_item;$i++) - { - $sell='e_march'.$i.'_price'; - $qt='e_quant'.$i; - - if ( ! isset (${$sell}) ) break; - - if ( strlen(trim(${$sell})) == 0 || - strlen(trim(${$qt})) == 0 || - ${$qt}==0 || ${$sell}==0) - continue; - $tmp1=bcmul(${$sell},${$qt}); - $sum=bcadd($sum,$tmp1); - - - } - $r=round($sum,2); - break; - case 'TOTAL_VEN_TVAC': - extract($p_array); - $sum=0.0; - bcscale(4); - for ($i=0;$i<$nb_item;$i++) - { - $tva='e_march'.$i.'_tva_amount'; - $tva_amount=0; - /* if we do not use vat this var. is not set */ - if ( isset(${$tva}) ) - { - $tva_amount=${$tva}; - } - $sell=${'e_march'.$i.'_price'}; - $qt=${'e_quant'.$i}; - $tot=bcmul($sell,$qt); - $tot=bcadd($tot,$tva_amount); - $sum=bcadd($sum,$tot); - } - $r=round($sum,2); - - break; - case 'TOTAL_TVA': - extract($p_array); - $sum=0.0; - for ($i=0;$i<$nb_item;$i++) - { - $tva='e_march'.$i.'_tva_amount'; - if (! isset(${$tva})) $tva_amount=0.0; - else $tva_amount=$ - { - $tva - }; - $sum+=$tva_amount; - $sum=round($sum,2); - } - $r=$sum; - - break; - case 'BON_COMMANDE': - if ( isset($p_array['bon_comm'])) - return $p_array['bon_comm']; - else - return ""; - break; - case 'PJ': - if ( isset($p_array['e_pj'])) - return $p_array['e_pj']; - else - return ""; - - case 'OTHER_INFO': - if ( isset($p_array['other_info'])) - return $p_array['other_info']; - else - return ""; - break; - case 'COMMENT': - if ( isset($p_array['e_comm'])) - return $p_array['e_comm']; - break; - case 'ACOMPTE': - if ( isset($p_array['acompte'])) - return $p_array['acompte']; - return "0"; - break; - case 'STOCK_NAME': - if ( ! isset ($p_array['repo'])) return ""; - $ret=$this->db->get_value('select r_name from public.stock_repository where r_id=$1',array($p_array['repo'])); - return $ret; - case 'STOCK_ADRESS': - if ( ! isset ($p_array['repo'])) return ""; - $ret=$this->db->get_value('select r_adress from public.stock_repository where r_id=$1',array($p_array['repo'])); - return $ret; - case 'STOCK_COUNTRY': - if ( ! isset ($p_array['repo'])) return ""; - $ret=$this->db->get_value('select r_country from public.stock_repository where r_id=$1',array($p_array['repo'])); - return $ret; - case 'STOCK_CITY': - if ( ! isset ($p_array['repo'])) return ""; - $ret=$this->db->get_value('select r_city from public.stock_repository where r_id=$1',array($p_array['repo'])); - return $ret; - case 'STOCK_PHONE': - if ( ! isset ($p_array['repo'])) return ""; - $ret=$this->db->get_value('select r_phone from public.stock_repository where r_id=$1',array($p_array['repo'])); - return $ret; - case 'TITLE': - $title=HtmlInput::default_value_request("ag_title", ""); - return $title; - - } - /* - * retrieve the value of ATTR for e_march - */ - if (preg_match('/^ATTR/', $p_tag) == 1) - { - // Retrieve f_id - if ( isset ($p_array['e_march'.$this->counter])) - { - $id = $p_array['e_march' . $this->counter]; - $r=$this->replace_special_tag($id,$p_tag); - } - } - /* - * retrieve the value of ATTR for e_march - */ - if (preg_match('/^BENEFATTR/', $p_tag) == 1) - { - $qcode=isset($p_array['qcode_benef'])?$p_array['qcode_benef']:''; - // Retrieve f_id - $r=$this->replace_special_tag($qcode,$p_tag); - } - if (preg_match('/^CUSTATTR/', $p_tag) == 1) - { - if ( isset($p_array['qcode_dest']) || isset($p_array['e_client']) ) - { - $qcode=(isset($p_array['qcode_dest']))?$p_array['qcode_dest']:$p_array['e_client']; - $r=$this->replace_special_tag($qcode,$p_tag); - } - } - return $r; - } - /*!\brief remove a row from the table document, the lob object is not deleted - * because can be linked elsewhere - */ - function remove() - { - $d_lob=$this->db->get_value('select d_lob from document where d_id=$1', - array($this->d_id)); - $sql='delete from document where d_id='.$this->d_id; - $this->db->exec_sql($sql); - if ( $d_lob != 0 ) - $this->db->lo_unlink($d_lob); - } - /*!\brief Move a document from the table document into the concerned row - * the document is not copied : it is only a link - * - * \param $p_internal internal code - * - */ - function MoveDocumentPj($p_internal) - { - $sql="update jrn set jr_pj=$1,jr_pj_name=$2,jr_pj_type=$3 where jr_internal=$4"; - - $this->db->exec_sql($sql,array($this->d_lob,$this->d_filename,$this->d_mimetype,$p_internal)); - // clean the table document - $sql='delete from document where d_id='.$this->d_id; - $this->db->exec_sql($sql); - - - } - /** - *Replace a special tag *TAGxxxx with the value from fiche_detail, the xxxx - * is the ad_value - * @param $p_qcode qcode of the card - * @param $p_tag tag to parse - * @return the ad_value contained in fiche_detail or for the type "select" the - * label - */ - function replace_special_tag($p_qcode, $p_tag) - { - // check if the march exists - if ($p_qcode == "") - return ""; - - $f = new Fiche($this->db); - $found = $f->get_by_qcode($p_qcode, false); - // if not found exit - if ($found == 1) - return ""; - - // get the ad_id - $attr=preg_replace("/^.*ATTR/","",$p_tag); - - if (isNumber($attr) == 0) return ""; - $ad_type=$this->db->get_value("select ad_type from attr_def where ad_id=$1",array($attr)); - - // get ad_value - $ad_value=$this->db->get_value("select ad_value from fiche_detail where f_id=$1 and ad_id=$2",array($f->id,$attr)); - - // if ad_id is type select execute select and get value - if ( $ad_type=="select") - { - $sql=$this->db->get_value("select ad_extra from attr_def where ad_id=$1",array($attr)); - $array= $this->db->make_array($sql); - for ($a=0;$adb->exec_sql('update document set d_description = $1 where d_id=$2', - array($p_desc,$this->d_id)); - } - -} diff --git a/sources/include/class_document_export.php b/sources/include/class_document_export.php deleted file mode 100644 index 8de4af2..0000000 --- a/sources/include/class_document_export.php +++ /dev/null @@ -1,215 +0,0 @@ -feedback = array(); - $this->store_convert = tempnam($_ENV['TMP'], 'convert_'); - $this->store_pdf = tempnam($_ENV['TMP'], 'pdf_'); - unlink($this->store_convert); - unlink($this->store_pdf); - umask(0); - mkdir($this->store_convert); - mkdir($this->store_pdf); - } - /** - * @brief concatenate all PDF into a single one and save it into the - * store_pdf folder. - * If an error occurs then it is added to feedback - */ - function concatenate_pdf() - { - try - { - $this->check_file(); - $stmt=PDFTK." ".$this->store_pdf.'/stamp_*pdf output '.$this->store_pdf.'/result.pdf'; - $status=0; - echo $stmt; - passthru($stmt, $status); - - if ($status<>0) - { - $cnt_feedback=count($this->feedback); - $this->feedback[$cnt_feedback]['file']='result.pdf'; - $this->feedback[$cnt_feedback]['message']=' cannot concatenate PDF'; - $this->feedback[$cnt_feedback]['error']=$status; - } - } - catch (Exception $exc) - { - $cnt_feedback=count($this->feedback); - $this->feedback[$cnt_feedback]['file']=' '; - $this->feedback[$cnt_feedback]['message']=$exc->getMessage(); - $this->feedback[$cnt_feedback]['error']=0; - } - } - - function move_file($p_source, $target) - { - $this->check_file(); - copy($p_source, $this->store_pdf . '/' . $target); - } - /** - * @brief send the resulting PDF to the browser - */ - function send_pdf() - { - header('Content-Type: application/x-download'); - header('Content-Disposition: attachment; filename="result.pdf"'); - header('Cache-Control: private, max-age=0, must-revalidate'); - header('Pragma: public'); - echo file_get_contents($this->store_pdf . '/result.pdf'); - } - - function clean_folder() - { - //unlink($this->store_convert . '/*.pdf'); - } - - /** - * @brief export all the pieces in PDF and transform them into a PDF with - * a stamp. If an error occurs then $this->feedback won't be empty - * @param $p_array contents all the jr_id - */ - function export_all($p_array) - { - $this->check_file(); - ob_start(); - var_dump($p_array); - $cnt_feedback=0; - global $cn; - - $cn->start(); - foreach ($p_array as $value) - { - // For each file save it into the temp folder, - $file = $cn->get_array('select jr_pj,jr_pj_name,jr_pj_number,jr_pj_type from jrn ' - . ' where jr_id=$1', array($value)); - if ($file[0]['jr_pj'] == '') - continue; - - $cn->lo_export($file[0]['jr_pj'], $this->store_convert . '/' . $file[0]['jr_pj_name']); - - // Convert this file into PDF - if ($file[0]['jr_pj_type'] != 'application/pdf') - { - $status = 0; - $arg=" ".escapeshellarg($this->store_convert.DIRECTORY_SEPARATOR.$file[0]['jr_pj_name']); - echo "arg = [".$arg."]"; - passthru(OFFICE . " " . $arg , $status); - if ($status <> 0) - { - $this->feedback[$cnt_feedback]['file'] = $file[0]['jr_pj_name']; - $this->feedback[$cnt_feedback]['message'] = ' cannot convert to PDF'; - $this->feedback[$cnt_feedback]['error'] = $status; - $cnt_feedback++; - continue; - } - } - - // Create a image with the stamp + formula - $img = imagecreatefromgif(__DIR__ . '/template/template.gif'); - $font = imagecolorallocatealpha($img, 100, 100, 100, 110); - imagettftext($img, 40, 25, 500, 1000, $font, __DIR__ . '/tfpdf/font/unifont/DejaVuSans.ttf', _("Copie certifiée conforme à l'original")); - imagettftext($img, 40, 25, 550, 1100, $font, __DIR__ . '/tfpdf/font/unifont/DejaVuSans.ttf', $file[0]['jr_pj_number']); - imagettftext($img, 40, 25, 600, 1200, $font, __DIR__ . '/tfpdf/font/unifont/DejaVuSans.ttf', $file[0]['jr_pj_name']); - imagegif($img, $this->store_convert . '/' . 'stamp.gif'); - - // transform gif file to pdf with convert tool - $stmt = CONVERT_GIF_PDF . " " . escapeshellarg($this->store_convert . '/' . 'stamp.gif') . " " . escapeshellarg($this->store_convert . '/stamp.pdf'); - passthru($stmt, $status); - - if ($status <> 0) - { - $this->feedback[$cnt_feedback]['file'] = 'stamp.pdf'; - $this->feedback[$cnt_feedback]['message'] = ' cannot convert to PDF'; - $this->feedback[$cnt_feedback]['error'] = $status; - $cnt_feedback++; - continue; - } - - // - // remove extension - $ext = strrpos($file[0]['jr_pj_name'], "."); - $file_pdf = substr($file[0]['jr_pj_name'], 0, $ext); - $file_pdf .=".pdf"; - - // output - $output = $this->store_convert . '/stamp_' . $file_pdf; - - // Concatenate stamp + file - $stmt = PDFTK . " " . escapeshellarg($this->store_convert . '/' . $file_pdf) . ' stamp ' . $this->store_convert . - '/stamp.pdf output ' . $output; - - passthru($stmt, $status); - echo $stmt; - if ($status <> 0) - { - - $this->feedback[$cnt_feedback]['file'] = $file_pdf; - $this->feedback[$cnt_feedback]['message'] = _(' ne peut pas convertir en PDF'); - $this->feedback[$cnt_feedback]['error'] = $status; - $cnt_feedback++; - continue; - } - // Move the PDF into another temp directory - $this->move_file($output, 'stamp_' . $file_pdf); - } - $this->concatenate_pdf(); - ob_clean(); - $this->send_pdf(); - - // remove files from "conversion folder" - $this->clean_folder(); - var_dump($this->feedback); - // concatenate all pdf into one - } - /** - * @brief check that the files are installed - * throw a exception if one is missing - */ - function check_file() - { - try - { - if (CONVERT_GIF_PDF == 'NO') throw new Exception(_("CONVERT_GIF_PDF n'est pas installé")); - if (PDFTK == 'NO') throw new Exception(_("TKPDF n'est pas installé")); - } catch (Exception $ex) - { - throw ($ex); - } - } -} diff --git a/sources/include/class_document_modele.php b/sources/include/class_document_modele.php deleted file mode 100644 index e993af3..0000000 --- a/sources/include/class_document_modele.php +++ /dev/null @@ -1,364 +0,0 @@ -cn=$p_cn; - $this->md_id=$p_id; - } - - /*! - ************************************************** - * \brief : show all the stored document_modele. - * return a string containing all the data - * separate by TD & TR tag - * \return table in HTML Code - */ - function myList() - { - $s=dossier::get(); - $sql="select md_id,md_name,md_affect,dt_value from document_modele join document_type on(dt_id=md_type) order by md_name"; - $Res=$this->cn->exec_sql($sql); - $all=Database::fetch_all($Res); - $r=''; - if ( Database::num_row($Res) != 0 ) { - - $r.='

    '; - $r.=dossier::hidden(); - $r.=""; - $r.=" "; - $r.=th(_('Nom')); - $r.=th(_('Catégorie')); - $r.=th(_('Affect.')); - $r.=th(_('Fichier')); - $r.=th(_('Effacer')); - $r.=""; - foreach ( $all as $row) - { - $r.=""; - $r.=""; - $r.=""; - $r.=td(h($row['md_affect'])); - $r.=""; - $r.=""; - $r.=td(HtmlInput::detail_modele_document($row['md_id'],'Modifier')); - - $r.=""; - } - $r.="
    "; - $r.=h($row['md_name']); - $r.=""; - $r.=$row['dt_value']; - $r.=""; - $r.='Document'; - $r.=""; - $c=new ICheckBox(); - $c->name="dm_remove_".$row['md_id']; - $r.=$c->input(); - $r.="
    "; - - // need hidden parameter for subaction - $a=new IHidden(); - $a->name="sa"; - $a->value="rm_template"; - $r.=$a->input(); - $r.=HtmlInput::submit("rm_template","Effacer la sélection"); - } - $b=new IButton('show'); - $b->label="Ajout d'un document"; - $b->javascript="$('add_modele').style.display='block';new Draggable('add_modele',{starteffect:function(){ - new Effect.Highlight(obj.id,{scroll:window,queue:'end'});}});"; - $r.=$b->input(); - $r.="

    "; - return $r; - } - /*! - * \brief : Save a document_modele in the database, - * if the document_modele doesn't exist yet it will be - * first created (-> insert into document_modele) - * in that case the name and the type must be set - * set before calling Save, the name will be modified - * with sql_string - * - */ - function Save() - { - // if name is empty return immediately - if ( trim(strlen($this->md_name))==0) - return; - try - { - // Start transaction - $this->cn->start(); - // Save data into the table document_modele - // if $this->md_id == -1 it means it is a new document model - // so first we have to insert it - // the name and the type must be set before calling save - if ( $this->md_id == -1) - { - - // insert into the table document_modele - $this->md_id=$this->cn->get_next_seq('document_modele_md_id_seq'); - $sql="insert into document_modele(md_id,md_name,md_type,md_affect) - values ($1,$2,$3,$4)"; - - $Ret=$this->cn->exec_sql($sql,array($this->md_id,$this->md_name,$this->md_type,$this->md_affect)); - // create the sequence for this modele of document - $this->md_sequence="document_".$this->cn->get_next_seq("document_seq"); - // if start is not equal to 0 and he's a number than the user - // request a number change - - if ( $this->start != 0 && isNumber($this->start) == 1 ) - { - $sql="alter sequence seq_doc_type_".$this->md_type." restart ".$this->start; - $this->cn->exec_sql($sql); - } - - } - // Save the file - $new_name=tempnam($_ENV['TMP'],'document_'); - if ( strlen ($_FILES['doc']['tmp_name']) != 0 ) - { - if (move_uploaded_file($_FILES['doc']['tmp_name'], - $new_name)) - { - // echo "Image saved"; - $oid= $this->cn->lo_import($new_name); - if ( $oid == false ) - { - echo_error('class_document_modele.php',__LINE__,"cannot upload document"); - $this->cn->rollback(); - return; - } - // Remove old document - $ret=$this->cn->exec_sql("select md_lob from document_modele where md_id=".$this->md_id); - if (Database::num_row($ret) != 0) - { - $r=Database::fetch_array($ret,0); - $old_oid=$r['md_lob']; - if (strlen($old_oid) != 0) - $this->cn->lo_unlink($old_oid); - } - // Load new document - $this->cn->exec_sql("update document_modele set md_lob=".$oid.", md_mimetype='".$_FILES['doc']['type']."' ,md_filename='".$_FILES['doc']['name']."' where md_id=".$this->md_id); - $this->cn->commit(); - } - else - { - echo "

    Error

    "; - $this->cn->rollback(); - throw new Exception("Erreur".__FILE__.__LINE__); - } - } - } - catch (Exception $e) - { - rollback($this->cn); - return ; - } - } - /*! - * \brief Remove a template - * \return nothing - */ - function Delete() - { - $this->cn->start(); - // first we unlink the document - $sql="select md_lob from document_modele where md_id=".$this->md_id; - $res=$this->cn->exec_sql($sql); - $r=Database::fetch_array($res,0); - // if a lob is found - if ( strlen ($r['md_lob']) && - $this->cn->exist_blob($r['md_lob']) ) - { - // we remove it first - $this->cn->lo_unlink($r['md_lob']); - } - // now we can delete the row - $sql="delete from document_modele where md_id =".$this->md_id; - $sql=$this->cn->exec_sql($sql); - $this->cn->commit(); - } - - /** - * @brief show the form for loading a template - * @param p_action for the field action = destination url - * - * - * @return string containing the forms - */ - function form() - { - $r='

    '; - $r.='Veuillez introduire les modèles servant à générer vos documents'; - $r.='

    '; - $r.='
    '; - $r.=dossier::hidden(); - // we need to add the sub action as hidden - $h=new IHidden(); - $h->name="sa"; - $h->value="add_document"; - - $r.=$h->input(); - - $r.=''; - $t=new IText(); - $t->name="md_name"; - $r.=""; - - $r.=""; - $r.=""; - $w=new ISelect(); - $w->name="md_type"; - - $w->value=$this->cn->make_array('select dt_id,dt_value from document_type order by dt_value'); - $r.=""; - - $r.=''; - $r.=td(_('Affectation')); - $waffect=new ISelect(); - $waffect->name='md_affect'; - $waffect->value=array( - array('value'=>'ACH','label'=>_('Uniquement journaux achat')), - array('value'=>'VEN','label'=>_('Uniquement journaux vente')), - array('value'=>'GES','label'=>_('Partie gestion')) - ); - - $r.=td($waffect->input()); - $r.=''; - - $f=new IFile(); - $f->name="doc"; - $r.=""; - - $start=new IText(); - $start->name="start_seq"; - $start->size=9; - $start->value="0"; - - $r.=""; - $r.=''; - $r.=""; - $r.='
    Nom ".$t->input()."
    Catégorie de document ".$w->input()."
    fichier ".$f->input()."
    Numerotation commence a ".$start->input()."Si vous laissez à 0, la numérotation ne changera pas, la prochaine facture sera n+1, n étant le n° que vous avez donné
    '; - $r.=HtmlInput::submit('add_document','Ajout'); - $r.="

    "; - return $r; - } - /*!\brief load the value of a document_modele,the ag_id variable must be set - */ - function load() - { - $array=$this->cn->get_array("SELECT md_id, md_name, md_lob, md_type, md_filename, md_mimetype,md_affect". - " FROM document_modele where md_id=$1",array($this->md_id)); - if ( count($array) == 0 ) return null; - foreach ( array('md_name', 'md_lob','md_type', 'md_filename', 'md_mimetype','md_affect') as $idx) - { - $this->$idx=$array[0][$idx]; - } - } - /*! - * \brief : update a document_modele in the database, - */ - function update($p_array) - { - $this->load(); - // if name is empty return immediately - if ( trim(strlen($p_array['md_name']))==0) - return; - try - { - // Start transaction - $this->cn->start(); - $sql="update document_modele set md_name=$1,md_type=$2,md_affect=$3 where md_id=$4"; - $this->cn->exec_sql($sql,array( - $p_array['md_name'], - $p_array['md_type'], - $p_array['md_affect'], - $this->md_id - )); - if ( $p_array['seq'] != 0 ) - $this->cn->alter_seq('seq_doc_type_'.$p_array['md_type'],$p_array['seq']); - - // Save the file - $new_name=tempnam($_ENV['TMP'],'document_'); - if ( strlen ($_FILES['doc']['tmp_name']) != 0 ) - { - if (move_uploaded_file($_FILES['doc']['tmp_name'], - $new_name)) - { - // echo "Image saved"; - $oid= $this->cn->lo_import($new_name); - if ( $oid == false ) - { - echo_error('class_document_modele.php',__LINE__,"cannot upload document"); - $this->cn->rollback(); - return; - } - // Remove old document - $ret=$this->cn->exec_sql("select md_lob from document_modele where md_id=".$this->md_id); - if (Database::num_row($ret) != 0) - { - $r=Database::fetch_array($ret,0); - $old_oid=$r['md_lob']; - if (strlen($old_oid) != 0) - $this->cn->lo_unlink($old_oid); - } - // Load new document - $this->cn->exec_sql("update document_modele set md_lob=".$oid.", md_mimetype='".$_FILES['doc']['type']."' ,md_filename='".$_FILES['doc']['name']."' where md_id=".$this->md_id); - $this->cn->commit(); - } - else - { - echo "

    Error

    "; - $this->cn->rollback(); - throw new Exception("Erreur".__FILE__.__LINE__); - } - } - } - catch (Exception $e) - { - rollback($this->cn); - return ; - } - $this->cn->commit(); - } - -} -?> diff --git a/sources/include/class_document_type.php b/sources/include/class_document_type.php deleted file mode 100644 index 2b4b8f0..0000000 --- a/sources/include/class_document_type.php +++ /dev/null @@ -1,137 +0,0 @@ -db = $p_cn; - $this->dt_id = $p_id; - } - - /** - * \brief Get all the data for this dt_id - */ - - function get() - { - $sql = "select * from document_type where dt_id=$1"; - $R = $this->db->exec_sql($sql, array($this->dt_id)); - if (count($R) == 0) return 1; - $r = Database::fetch_array($R, 0); - $this->dt_id = $r['dt_id']; - $this->dt_value = $r['dt_value']; - $this->dt_prefix = $r['dt_prefix']; - return 0; - } - - /** - * @brief get a list - * @parameter $p_cn database connection - * @return array of data from document_type - */ - static function get_list($p_cn) - { - $sql = "select * from document_type order by dt_value"; - $r = $p_cn->get_array($sql); - $array = array(); - for ($i = 0; $i < count($r); $i++) - { - $tmp['dt_value'] = $r[$i]['dt_value']; - $tmp['dt_prefix'] = $r[$i]['dt_prefix']; - - $bt = new IButton('M' . $r[$i]['dt_id']); - $bt->label = _('Modifier'); - $bt->javascript = "cat_doc_change('" . $r[$i]['dt_id'] . "','" . Dossier::id() . "');"; - - $tmp['js_mod'] = $bt->input(); - $tmp['dt_id'] = $r[$i]['dt_id']; - - $bt = new IButton('X' . $r[$i]['dt_id']); - $bt->label = _('Effacer'); - $bt->javascript = "confirm_box('X{$r[$i]['dt_id']}','" . _('Vous confirmez') . "',"; - $bt->javascript.="function () { cat_doc_remove('{$r[$i]['dt_id']}','" . Dossier::id() . "');})"; - - $tmp['js_remove'] = $bt->input(); - - - $array[$i] = $tmp; - } - return $array; - } - - function insert($p_value, $p_prefix) - { - $sql = "insert into document_type(dt_value,dt_prefix) values ($1,$2)"; - try - { - if ($this->db->count_sql('select * from document_type where upper(dt_value)=upper(trim($1))', array($p_value)) > 0) - throw new Exception('Nom en double'); - if (strlen(trim($p_value)) > 0) - $this->db->exec_sql($sql, array($p_value, $p_prefix)); - } - catch (Exception $e) - { - alert(j(_("Impossible d'ajouter [$p_value] ") . $e->getMessage())); - } - } - - /** - * Update - */ - function update() - { - try - { - $this->db->exec_sql("update document_type set dt_value=$1,dt_prefix=$2 where dt_id=$3", array($this->dt_value, - $this->dt_prefix, $this->dt_id)); - } - catch (Exception $e) - { - alert(" Erreur " . $e->getMessage()); - } - } - - function set_number($p_int) - { - try - { - $this->db->exec_sql("alter sequence seq_doc_type_" . $this->dt_id . " restart " . $p_int); - } - catch (Exception $e) - { - alert("Erreur " . $e->getMessage()); - } - } -} diff --git a/sources/include/class_dossier.php b/sources/include/class_dossier.php deleted file mode 100644 index 2925587..0000000 --- a/sources/include/class_dossier.php +++ /dev/null @@ -1,314 +0,0 @@ -"dos_id", - "name"=>"dos_name", - "desc"=>"dos_description"); - * - */ -require_once NOALYSS_INCLUDE.'/class_database.php'; -require_once NOALYSS_INCLUDE.'/ac_common.php'; - -class Dossier -{ - private static $variable=array("id"=>"dos_id", - "name"=>"dos_name", - "desc"=>"dos_description"); - function __construct($p_id) - { - $this->cn=new Database(); // Connect to the repository - $this->dos_id=$p_id; - } - /*!\brief return the $_REQUEST['gDossier'] after a check */ - static function id() - { - self::check(); - return $_REQUEST['gDossier']; - } - - /** - * @brief Show the folder where user have access. - * @param p_type string - - A for all dossiers - - R for accessible folders - - X forbidden folders - * @param p_login is the user name - * @param p_text is a part of the name where are looking for - * @return nothing - * - */ - static function show_dossier($p_type,$p_login="",$p_text="",$limit=0) - { - $cn=new Database(); - $str_limit=($limit==0)?'':' limit '.$limit; - if ( $p_type == "A") - { - $l_sql="select *, 'W' as priv_priv from ac_dossier where dos_name ~* $2 or dos_description ~* $2 ORDER BY dos_name $str_limit "; - $a_row=$cn->get_array($l_sql,$p_text); - return $a_row; - } - else if ($p_type == "R") - { - $l_sql="select * from jnt_use_dos - natural join ac_dossier - natural join ac_users - where - use_login=$1 - and ( dos_name ~* $2 or dos_description ~* $2) - - order by dos_name - $str_limit - "; - - $a_row=$cn->get_array($l_sql,array($p_login,$p_text)); - return $a_row; - - } - else if ($p_type == 'X') - { - $l_sql=' select * from ac_dossier where dos_id not in - (select dos_id from jnt_use_dos where use_id=$1) - and ( dos_name ~* $2 or dos_description ~* $2) - order by dos_name '.$str_limit; - $a_row=$cn->get_array($l_sql,array($p_login,$p_text)); - return $a_row; - - } - else - { - throw new Exception (_("Erreur paramètre")); - } - - - } - /** - * Count the number of folder in the repository - * @return integer - */ - function count() - { - $nb_folder=$this->cn->get_value('select count(*) from ac_dossier'); - return $nb_folder; - } - /*! - * \brief Return all the users - * as an array - */ - function get_user_folder($sql="") - { - - $sql=" - select - use_id, - use_first_name, - use_name, - use_login, - use_active, - use_admin, - ag_dossier - from - ac_users as ac - left join (select array_to_string(array_agg(dos_name),',') as ag_dossier,jt.use_id as jt_use_id - from ac_dossier as ds - join jnt_use_dos as jt on (jt.dos_id=ds.dos_id) - group by jt.use_id) as dossier_name on (jt_use_id=ac.use_id) - where - use_login!='phpcompta' - $sql - "; - - $res=$this->cn->get_array($sql); - return $res; - } - - /*!\brief check if gDossier is set */ - static function check() - { - if ( ! isset ($_REQUEST['gDossier']) ) - { - echo_error ('Dossier inconnu '); - exit('Dossier invalide '); - } - $id=$_REQUEST['gDossier']; - if ( is_numeric ($id) == 0 || - strlen($id)> 6 || - $id > 999999) - exit('gDossier Invalide : '.$id); - - } - /*!\brief return a string to put to gDossier into a GET */ - static function get() - { - self::check(); - return "gDossier=".$_REQUEST['gDossier']; - - } - - /*!\brief return a string to set gDossier into a FORM */ - static function hidden() - { - self::check(); - return ''; - } - /*!\brief retrieve the name of the current dossier */ - static function name($id=0) - { - self::check(); - - $cn=new Database(); - $id=($id==0)?$_REQUEST['gDossier']:$id; - $name=$cn->get_value("select dos_name from ac_dossier where dos_id=$1",array($_REQUEST['gDossier'])); - return $name; - } - - public function get_parameter($p_string) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - return $this->$idx; - } - else - throw new Exception("Attribut inexistant $p_string"); - } - public function set_parameter($p_string,$p_value) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - $this->$idx=$p_value; - } - else - throw new Exception("Attribut inexistant $p_string"); - - - } - public function get_info() - { - return var_export(self::$variable,true); - } - - public function save() - { - $this->update(); - } - - public function update() - { - if ( strlen(trim($this->dos_name))== 0 ) return; - - if ( $this->cn->get_value("select count(*) from ac_dossier where dos_name=$1 and dos_id<>$2", - array($this->dos_name,$this->dos_id)) !=0 ) - return ; - - $sql="update ac_dossier set dos_name=$1,dos_description=$2 ". - " where dos_id = $3"; - $res=$this->cn->exec_sql( - $sql, - array(trim($this->dos_name), - trim($this->dos_description), - $this->dos_id) - ); - } - - public function load() - { - - $sql="select dos_name,dos_description from ac_dossier where dos_id=$1"; - - $res=$this->cn->exec_sql( - $sql, - array($this->dos_id) - ); - - if ( Database::num_row($res) == 0 ) return; - $row=Database::fetch_array($res,0); - foreach ($row as $idx=>$value) - { - $this->$idx=$value; - } - - } - - static function get_version($p_cn) - { - return $p_cn->get_value('select val from version'); - } - - static function connect() - { - $id = Dossier::id(); - $cn = new Database($id); - return $cn; - } - /** - *connect to folder and give to admin. the profile Admin(builtin) - * @param int $p_id dossier::id() - */ - static function synchro_admin($p_id) - { - // connect to target - $cn=new Database($p_id); - - if (! $cn->exist_table("profile_menu")) - { - echo_warning("Dossier invalide"); - return; - } - // connect to repo - $repo=new Database(); - - $a_admin=$repo->get_array("select use_login from ac_users where - use_admin=1 and use_active=1"); - try - { - /** - * synchro global - */ - $cn->start(); - for ($i=0;$iget_value("select p_id from profile_user - where user_name=$1",array($a_admin[$i]['use_login'])); - if ( $exist == "") - { - $cn->exec_sql("insert into profile_user(user_name,p_id) values($1,1)", - array($a_admin[$i]['use_login'])); - } - - } - $cn->commit(); - } catch(Exception $e) - { - echo_warning($e->getMessage()); - $cn->rollback(); - } - } -} diff --git a/sources/include/class_exercice.php b/sources/include/class_exercice.php deleted file mode 100644 index 490157b..0000000 --- a/sources/include/class_exercice.php +++ /dev/null @@ -1,77 +0,0 @@ -cn=$cn; - } - /** - *return the number of different exercices into a folder - *@param $cn is the database connexion object database - *@return the count of exercice - */ - function count() - { - $count=$this->cn->get_value('select count(distinct p_exercice) from parm_periode'); - return $count; - } - /** - *Show a ISelect with the different exercices - *@param $name of the iselect - *@param $selected the selected year (default = '') - *@param $js javascript (default = '') - *@return ISelect object - */ - function select($name,$selected='',$js='') - { - $iselect=new ISelect($name); - $iselect->value=$this->cn->make_array('select distinct p_exercice,p_exercice from parm_periode order by 1'); - $iselect->selected=$selected; - $iselect->javascript=$js; - return $iselect; - } - /** - *Show a ISelect with the different exercices, display start and end date - *@param $name of the iselect - *@param $selected the selected year (default = '') - *@param $js javascript (default = '') - *@return ISelect object - */ - function select_date($name,$selected='',$js='') - { - $iselect=new ISelect($name); - $iselect->value=$this->cn->make_array("select distinct p_exercice,to_char (min(p_start),'DD.MM.YY') - ||' - ' - ||to_char (max(p_end),'DD.MM.YY') - from parm_periode - group by p_exercice order by 1"); - $iselect->selected=$selected; - $iselect->javascript=$js; - return $iselect; - } -} diff --git a/sources/include/class_extension.php b/sources/include/class_extension.php deleted file mode 100644 index 7ca07c3..0000000 --- a/sources/include/class_extension.php +++ /dev/null @@ -1,309 +0,0 @@ -me_code)=="") throw new Exception('Le code ne peut pas être vide'); - if (trim($this->me_menu)=="") throw new Exception('Le nom ne peut pas être vide'); - if (trim($this->me_file)=="") throw new Exception('Chemin incorrect'); - if (file_exists('..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'ext'.DIRECTORY_SEPARATOR.$this->me_file) == false) - throw new Exception ('Extension non trouvée, le chemin est-il correct?'); - } - /*!@brief search a extension, the what is the column (extends_code */ - function search($p_what) - { - $this->me_code=strtoupper($p_what); - if ( $this->load() == -1) return null; - return 1; - } - /*!\brief return 1 if the user given in parameter can access this extension - * otherwise returns 0 - *\param $p_login the user login - *\return 1 has access, 0 has no access - */ - function can_request($p_login) - { - $cnt=$this->cn->get_value("select count(*) from menu_ref - join profile_menu using (me_code) - join profile_user using (p_id) - where - me_code=$1 - and user_name=$2", - array($this->me_code,$p_login)); - if ( $cnt > 0) return 1; - return 0; - } - /*!@brief make an array of the available plugin for the current user - * @return an array - *@see ISelect - */ - static function make_array($cn) - { - $sql="select DISTINCT me_code as value, me_menu as label from ". - " menu_ref join profile_menu using (me_code) - join profile_user using (p_id) where ". - " user_name=$1 and me_type='PL' ORDER BY ME_MENU"; - $a=$cn->get_array($sql,array($_SESSION['g_user'])); - return $a; - } - static function check_version($i) - { - global $version_noalyss; - if ( ! isset ($version_noalyss) || $version_noalyss < $i ) - { - alert('Cette extension ne fonctionne pas sur cette version de NOALYSS'. - ' Veuillez mettre votre programme a jour. Version minimum '.$i); - return; - } - Extension::check_plugin_version(); - } - /** - * insert into the table profile_menu for the given profile id and depending - * of the module $p_module - * @global type $cn - * @param type $p_id profile.p_id - * @param type $p_module menu_ref.me_code - * @throws Exception 10 : profile absent , 20 module absent , 30 No parent menu - */ - function insert_profile_menu($p_id=1,$p_module='EXT') - { - global $cn; - //profile exists ? - $profile=new Profile_sql($cn,$p_id); - if ( $profile->p_id != $p_id) { - throw new Exception(_('Profil inexistant'),10); - } - // Menu exists - $module=new Menu_Ref($cn,$p_module); - if ($module->me_code==null) { - throw new Exception(_('Module inexistant'),20); - } - // Dependency - $dep_id=$cn->get_value('select pm_id from profile_menu - where - p_id=$1 - and me_code = $2 ',array($p_id,$p_module)); - // throw an exception if there is no dependency - if ($dep_id=="") { - throw new Exception(_('Pas de menu ').$p_module,30); - } - - $profil_menu=new Profile_Menu($cn); - $profil_menu->me_code=$this->me_code; - $profil_menu->me_code_dep=$p_module; - $profil_menu->p_type_display='S'; - $profil_menu->p_id=$p_id; - $profil_menu->pm_id_dep=$dep_id; - - $cnt=$profil_menu->count(' where p_id=$1 and me_code = $2',array($p_id,$this->me_code)); - if ( $cnt==0) { - $profil_menu->insert(); - } - - - } - function remove_from_profile_menu($p_id) - { - global $cn; - - $cn->exec_sql('delete from profile_menu where (me_code = $1 or me_code in (select me_code from menu_ref where me_file=$2)) and p_id=$3',array($this->me_code,$this->me_file,$p_id)); - - } - /** - * Insert a plugin into the given profile, by default always insert into EXT - * - * @param type $p_id profile.p_id - * @throws Exception if duplicate or error db - */ - function insert_plugin() - { - try - { - $this->cn->start(); - $this->verify(); - // check if duplicate - $this->me_code = strtoupper($this->me_code); - $count = $this->cn->get_value("select count(*) from menu_ref where me_code=$1", array($this->me_code)); - if ($count != 0) - throw new Exception("Doublon"); - $this->me_type = 'PL'; - $this->insert(); - $this->cn->commit(); - } - catch (Exception $exc) - { - echo alert($exc->getMessage()); - } - } - function update_plugin() - { - try - { - $this->cn->start(); - $this->verify(); - $this->me_type = 'PL'; - $this->update(); - $this->cn->commit(); - } - catch (Exception $exc) - { - echo alert($exc->getMessage()); - } - } - function remove_plugin() - { - try - { - $this->cn->start(); - $this->delete(); - $this->cn->commit(); - } - catch (Exception $exc) - { - echo alert($exc->getMessage()); - } - } - /** - *remove all the schema from the plugins - * @param Database $p_cn - */ - static function clean(Database $p_cn) - { - $a_ext=array("tva_belge","amortissement","impdol","coprop","importbank"); - for($i=0;$iexist_schema($a_ext[$i])) { - $p_cn->exec_sql("drop schema ".$a_ext[$i]." cascade"); - } - } - } - static function check_plugin_version() - { - global $g_user,$version_plugin; - if ($g_user->Admin() == 1) - { - if (SITE_UPDATE_PLUGIN != "") - { - $update = @file_get_contents(SITE_UPDATE_PLUGIN); - if ($update > $version_plugin) - { - echo '
    '; - echo '

    '; - echo "Mise à jour disponible des plugins pour NOALYSS, version actuelle : $update votre version $version_plugin"; - echo '

    '; - echo '

    '. - ''. - _('Fermer'). - "

    "; - echo '
    '; - } - } - } - } - /** - * Check that the xml contains all the needed information to change them into - * a extension, the exception code is 0 if the element is optional - * @brief Check XML. - * @param SimpleXMLElement $xml - * @throws Exception - */ - function check_xml(SimpleXMLElement $xml) - { - try { - if ( !isset ($xml->plugin)) throw new Exception(_('Manque plugin'),1); - $nb_plugin=count($xml->plugin); - - for ($i=0;$i<$nb_plugin;$i++) - { - if ( !isset ($xml->plugin[$i]->name)) throw new Exception(_('Manque nom'),1); - if ( !isset ($xml->plugin[$i]->description)) throw new Exception(_('Manque description'),0); - if ( !isset ($xml->plugin[$i]->code)) throw new Exception(_('Manque code'),1); - if ( !isset ($xml->plugin[$i]->author)) throw new Exception(_('Manque auteur'),0); - if ( !isset ($xml->plugin[$i]->root)) throw new Exception(_('Manque répertoire racine'),1); - if ( !isset ($xml->plugin[$i]->file)) throw new Exception(_('Manque fichier à inclure'),1); - } - } catch (Exception $ex) { - throw $ex; - } - } - /** - * Parse a XML file to complete an array of extension objects - * @brief Create extension from XML. - * @param type $p_file filename - * @return array of Extension - */ - static function read_definition($p_file) - { - global $cn; - $dom=new DomDocument('1.0'); - $dom->load($p_file); - $xml=simplexml_import_dom($dom); - $nb_plugin=count($xml->plugin); - $a_extension=array(); - for ($i=0;$i<$nb_plugin;$i++) - { - - $extension=new Extension($cn); - try { - $extension->check_xml($xml); - } catch (Exception $ex) { - echo_warning($e->getMessage()); - if ( $ex->getCode()==1) { - continue; - } - - } - $extension->me_file=trim($xml->plugin[$i]->root).'/'.trim($xml->plugin[$i]->file); - $extension->me_code=trim($xml->plugin[$i]->code); - $extension->me_description=(isset ($xml->plugin[$i]->description))?trim($xml->plugin[$i]->description):""; - $extension->me_description_etendue=(trim($xml->plugin[$i]->author))?trim($xml->plugin[$i]->author):""; - $extension->me_type='PL'; - $extension->me_menu=trim($xml->plugin[$i]->name); - $extension->me_parameter='plugin_code='.trim($xml->plugin[$i]->code); - $a_extension[]=clone $extension; - } - return $a_extension; - } -} - diff --git a/sources/include/class_fiche.php b/sources/include/class_fiche.php deleted file mode 100644 index 065c24a..0000000 --- a/sources/include/class_fiche.php +++ /dev/null @@ -1,1992 +0,0 @@ -cn=$p_cn; - $this->id=$p_id; - $this->quick_code=''; - } - /** - *@brief used with a usort function, to sort an array of Fiche on the name - */ - static function cmp_name(Fiche $o1,Fiche $o2) - { - return strcmp($o1->strAttribut(ATTR_DEF_NAME),$o2->strAttribut(ATTR_DEF_NAME)); - } - - /** - *@brief get the available bank_account filtered by the security - *@return array of card - */ - function get_bk_account() - { - global $g_user; - $sql_ledger=$g_user->get_ledger_sql('FIN',3); - $avail=$this->cn->get_array("select jrn_def_id,jrn_def_name," - . "jrn_def_bank,jrn_def_description from jrn_def where jrn_def_type='FIN' and $sql_ledger - order by jrn_def_name"); - - if ( count($avail) == 0 ) - return null; - - for ($i=0;$icn,$avail[$i]['jrn_def_bank']); - $t->ledger_name=$avail[$i]['jrn_def_name']; - $t->ledger_description=$avail[$i]['jrn_def_description']; - $t->getAttribut(); - $all[$i]=$t; - - } - return $all; - } - - - /*! get_by_qcode($p_qcode) - * \brief Retrieve a card thx his quick_code - * complete the object,, set the id member of the object or set it - * to 0 if no card is found - * \param $p_qcode quick_code (ad_id=23) - * \param $p_all retrieve all the attribut of the card, possible value - * are true or false. false retrieves only the f_id. By default true - * \return 0 success 1 error not found - */ - function get_by_qcode($p_qcode=null,$p_all=true) - { - if ( $p_qcode == null ) - $p_qcode=$this->quick_code; - $p_qcode=trim($p_qcode); - $sql="select f_id from fiche_detail - where ad_id=23 and ad_value=upper($1)"; - $this->id=$this->cn->get_value($sql,array($p_qcode)); - if ( $this->cn->count()==0) - { - $this->id=0; - return 1; - } - - - if ( $p_all ) - $this->getAttribut(); - return 0; - } - /** - *@brief set an attribute by a value, if the attribut array is empty - * a call to getAttribut is performed - *@param the AD_ID - *@param the value - *@see constant.php table: attr_def - */ - function setAttribut($p_ad_id,$p_value) - { - if ( sizeof($this->attribut)==0 ) $this->getAttribut(); - for ($e=0;$e attribut);$e++) - { - if ( $this->attribut[$e]->ad_id == $p_ad_id ) - { - $this->attribut[$e]->av_text=$p_value; - break; - } - } - } - /** - *\brief get all the attribute of a card, add missing ones - * and sort the array ($this-\>attribut) by ad_id - */ - function getAttribut() - { - if ( $this->id == 0) - { - return; - } - $sql="select * - from - fiche - natural join fiche_detail - join jnt_fic_attr on (jnt_fic_attr.fd_id=fiche.fd_id and fiche_detail.ad_id=jnt_fic_attr.ad_id) - join attr_def on (attr_def.ad_id=fiche_detail.ad_id) where f_id=".$this->id. - " order by jnt_order"; - - $Ret=$this->cn->exec_sql($sql); - if ( ($Max=Database::num_row($Ret)) == 0 ) - return ; - for ($i=0;$i<$Max;$i++) - { - $row=Database::fetch_array($Ret,$i); - $this->fiche_def=$row['fd_id']; - $t=new Fiche_Attr ($this->cn); - $t->ad_id=$row['ad_id']; - $t->ad_text=$row['ad_text']; - $t->av_text=$row['ad_value']; - $t->ad_type=$row['ad_type']; - $t->ad_size=$row['ad_size']; - $t->ad_extra=$row['ad_extra']; - $t->jnt_order=$row['jnt_order']; - $this->attribut[$i]=$t; - } - $e=new Fiche_Def($this->cn,$this->fiche_def); - $e->GetAttribut(); - - if ( sizeof($this->attribut) != sizeof($e->attribut ) ) - { - - /* - * !! Missing attribute - */ - foreach ($e->attribut as $f ) - { - $flag=0; - foreach ($this->attribut as $g ) - { - if ( $g->ad_id == $f->ad_id ) - $flag=1; - } - if ( $flag == 0 ) - { - // there's a missing one, we insert it - $t=new Fiche_Attr ($f->ad_id); - $t->av_text=""; - $t->ad_text=$f->ad_text; - $t->jnt_order=$f->jnt_order; - $t->ad_type=$f->ad_type; - $t->ad_size=$f->ad_size; - $t->ad_id=$f->ad_id; - $t->ad_extra=$f->ad_extra; - $this->attribut[$Max]=$t; - $Max++; - } // if flag == 0 - - }// foreach - - - }//missing attribut - } - /** - * @brief find the card with the p_attribut equal to p_value, it is not case sensitive - * @param $p_attribut attribute to find see table attr_def - * @param $p_value value in attr_value.av_text - * @return return ARRAY OF jft_id,f_id,fd_id,ad_id,av_text - */ - function seek($p_attribut,$p_value) - { - $sql="select jft_id,f_id,fd_id,ad_id,ad_value from fiche join fiche_detail using (f_id) - where ad_id=$1 and upper(ad_value)=upper($2)"; - $res=$this->cn->get_array($sql,array($p_attribut,$p_value)); - return $res; - } - - /*! - * \brief give the size of a card object - * - * \return size - */ - function size() - { - if ( isset ($this->ad_id)) - return sizeof($this->ad_id); - else - return 0; - } - - - /*! - ************************************************** - * \brief Return array of card from the frd family - * - * \param $p_frd_id the fiche_def_ref.frd_id - * \param $p_search p_search is a filter on the name - * \param $p_sql extra sql condition - * - * \return array of fiche object - */ - function count_by_modele($p_frd_id,$p_search="",$p_sql="") - { - $sql="select * - from - fiche join fiche_Def using (fd_id) - where frd_id=".$p_frd_id; - if ( $p_search != "" ) - { - $a=sql_string($p_search); - $sql="select * from vw_fiche_attr where frd_id=".$p_frd_id. - " and vw_name ~* '$p_search'"; - } - - $Ret=$this->cn->exec_sql($sql.$p_sql); - - return Database::num_row($Ret) ; - } - /*! - ************************************************** - * \brief Return array of card from the frd family - * - * - * \param $p_frd_id the fiche_def_ref.frd_id - * \param $p_offset - * \param $p_search is an optional filter - *\param $p_order : possible values are name, f_id - * \return array of fiche object - */ - function GetByDef($p_frd_id,$p_offset=-1,$p_search="",$p_order='') - { - switch($p_order) - { - case 'name' : - $order=' order by name'; - break; - case 'f_id': - $order='order by f_id'; - break; - default: - $order=''; - } - if ( $p_offset == -1 ) - { - $sql="select * - from - fiche join fiche_Def using (fd_id) join vw_fiche_name using(f_id) - where frd_id=".$p_frd_id." $p_search ".$order; - } - else - { - $limit=($_SESSION['g_pagesize']!=-1)?"limit ".$_SESSION['g_pagesize']:""; - $sql="select * - from - fiche join fiche_Def using (fd_id) join vw_fiche_name using(f_id) - where frd_id=".$p_frd_id." $p_search $order " - .$limit." offset ".$p_offset; - - } - - $Ret=$this->cn->exec_sql($sql); - if ( ($Max=Database::num_row($Ret)) == 0 ) - return ; - $all[0]=new Fiche($this->cn); - - for ($i=0;$i<$Max;$i++) - { - $row=Database::fetch_array($Ret,$i); - $t=new Fiche($this->cn,$row['f_id']); - $t->getAttribut(); - $all[$i]=clone $t; - - } - return $all; - } - function ShowTable() - { - echo " ". - $this->id."". - " ". - $this->attribut_value."". - " ". - $this->attribut_def.""; - } - /*** - * @brief return the string of the given attribute - * (attr_def.ad_id) - * @param $p_ad_id the AD_ID from attr_def.ad_id - * @param $p_return 1 return NOTFOUND otherwise an empty string - * @see constant.php - * @return string - */ - function strAttribut($p_ad_id,$p_return=1) - { - $return=($p_return==1)?NOTFOUND:""; - if ( sizeof ($this->attribut) == 0 ) - { - - if ($this->id==0) { - return $return; - } - // object is not in memory we need to look into the database - $sql="select ad_value from fiche_detail - where f_id= $1 and ad_id= $2 "; - $Res=$this->cn->exec_sql($sql,array($this->id,$p_ad_id)); - $row=Database::fetch_all($Res); - // if not found return error - if ( $row == false ) - return $return; - - return $row[0]['ad_value']; - } - - foreach ($this->attribut as $e) - { - if ( $e->ad_id == $p_ad_id ) - return $e->av_text; - } - return $return; - } - /** - * @brief make an array of attributes of the category of card (FICHE_DEF.FD_ID) - *The array can be used with the function insert, it will return a struct like this : - * in the first key (av_textX), X is the ATTR_DEF::AD_ID - \verbatim - Example - Array - ( - [av_text1] => Nom - [av_text12] => Personne de contact - [av_text5] => Poste Comptable - [av_text13] => numéro de tva - [av_text14] => Adresse - [av_text15] => code postal - [av_text24] => Ville - [av_text16] => pays - [av_text17] => téléphone - [av_text18] => email - [av_text23] => Quick Code - ) - - \endverbatim - *\param $pfd_id FICHE_DEF::FD_ID - *\return an array of attribute - *\exception Exception if the cat of card doesn't exist, Exception.getCode()=1 - *\see fiche::insert() - */ - function to_array($pfd_id) - { - $sql="select 'av_text'||to_char(ad_id,'9999') as key,". - " ad_text ". - " from fiche_def join jnt_fic_attr using (fd_id)". - " join attr_def using (ad_id) ". - " where fd_id=$1 order by jnt_order"; - $ret=$this->cn->get_array($sql,array($pfd_id)); - if ( empty($ret)) throw new Exception(_('Cette categorie de card n\'existe pas').' '.$pfd_id,1); - $array=array(); - foreach($ret as $idx=>$val) - { - $a=str_replace(' ','',$val['key']); - $array[$a]=$val['ad_text']; - } - return $array; - - } - /*! - * \brief insert a new record - * show a blank card to be filled - * - * \param $p_fiche_def is the fiche_def.fd_id - * - * \return HTML Code - */ - function blank($p_fiche_def) - { - // array = array of attribute object sorted on ad_id - $f=new Fiche_Def($this->cn,$p_fiche_def); - $f->get(); - $array=$f->getAttribut(); - $r=h2(_('Catégorie').' '.$f->label,""); - $r.=''; - foreach ($array as $attr) - { - $table=0; - $msg="";$bulle=''; - if ( $attr->ad_id == ATTR_DEF_ACCOUNT) - { - $w=new IPoste("av_text".$attr->ad_id); - $w->set_attribute('ipopup','ipop_account'); - $w->set_attribute('account',"av_text".$attr->ad_id); - $w->dbl_click_history(); - // account created automatically - $sql="select account_auto($p_fiche_def)"; - $ret_sql=$this->cn->exec_sql($sql); - $a=Database::fetch_array($ret_sql,0); - $label=new ISpan(); - $label->name="av_text".$attr->ad_id."_label"; - - if ( $a['account_auto'] == 't' ) - $msg.=$label->input()." ". - _("Rappel: Poste créé automatiquement à partir de ") - .$f->class_base." "; - else - { - // if there is a class base in fiche_def_ref, this account will be the - // the default one - if ( strlen(trim($f->class_base)) != 0 ) - { - $msg.="".td(_("Poste Comptable"),' class="input_text" ' ).td($w->input().$msg).""; - continue; - } - elseif ( $attr->ad_id == ATTR_DEF_TVA) - { - $w=new ITva_Popup('popup_tva'); - $w->table=1; - } - - else - { - switch ($attr->ad_type) - { - case 'text': - $w = new IText(); - $w->css_size = "100%"; - break; - case 'numeric': - $w = new INum(); - $w->prec=($attr->ad_extra=="")?2:$attr->ad_extra; - $w->size = $attr->ad_size; - break; - case 'date': - $w = new IDate(); - break; - case 'zone': - $w = new ITextArea(); - $w->style=' class="itextarea" style="margin:0px;width:100%"'; - break; - case 'poste': - $w = new IPoste("av_text" . $attr->ad_id); - $w->set_attribute('ipopup', 'ipop_account'); - $w->set_attribute('account', "av_text" . $attr->ad_id); - $w->table = 1; - $bulle = HtmlInput::infobulle(14); - break; - case 'select': - $w = new ISelect("av_text" . $attr->ad_id); - $w->value = $this->cn->make_array($attr->ad_extra); - $w->style= 'style="width:100%"'; - break; - case 'card': - $w = new ICard("av_text" . $attr->ad_id); - // filter on frd_id - $w->extra = $attr->ad_extra; - $w->extra2 = 0; - $label = new ISpan(); - $label->name = "av_text" . $attr->ad_id . "_label"; - $w->set_attribute('ipopup', 'ipopcard'); - $w->set_attribute('typecard', $attr->ad_extra); - $w->set_attribute('inp', "av_text" . $attr->ad_id); - $w->set_attribute('label', "av_text" . $attr->ad_id . "_label"); - $msg = $w->search(); - $msg.=$label->input(); - break; - } - $w->table = 0; - } - $w->table = $table; - $w->label = $attr->ad_text; - $w->name = "av_text" . $attr->ad_id; - if ($attr->ad_id == 21 || $attr->ad_id==22||$attr->ad_id==20||$attr->ad_id==31) - { - $bulle=HtmlInput::infobulle(21); - } - $r.="" . td(_($w->label)." $bulle", ' class="input_text" ') . td($w->input()." $msg")." "; - } - $r.= '
    ".$label->input()." "._("Rappel: Poste par défaut sera "). - $f->class_base. - " ! "; - $w->value=$f->class_base; - } - - } - $r.="
    '; - return $r; - } - - - /*! - * \brief Display object instance, getAttribute - * sort the attribute and add missing ones - * \param $p_readonly true= if can not modify, otherwise false - * - * - * \return string to display or FNT string for fiche non trouvé - */ - function Display($p_readonly) - { - $this->GetAttribut(); - $attr=$this->attribut; - /* show card type here */ - $type_card=$this->cn->get_value('select fd_label ' - . ' from fiche_def join fiche using (fd_id) where f_id=$1', - array($this->id)); - $ret=""; - $ret.=h2(_("Catégorie")." ".$type_card, 'style="display:inline"'); - $ret.=''. - _('id fiche').':'.$this->id.""; - $ret.=""; - if (empty($attr)) - { - return 'FNT'; - } - - /* for each attribute */ - foreach ($attr as $r) - { - $msg=""; - $bulle=""; - if ($p_readonly) - { - $w=new IText(); - $w->table=1; - $w->readOnly=true; - $w->css_size="100%"; - } - if ($p_readonly==false) - { - - if ($r->ad_id==ATTR_DEF_ACCOUNT) - { - $w=new IPoste("av_text".$r->ad_id); - $w->set_attribute('ipopup', 'ipop_account'); - $w->set_attribute('account', "av_text".$r->ad_id); - $w->dbl_click_history(); - // account created automatically - $w->table=0; - $w->value=$r->av_text; - // account created automatically - $sql="select account_auto($this->fiche_def)"; - $ret_sql=$this->cn->exec_sql($sql); - $a=Database::fetch_array($ret_sql, 0); - $bulle=HtmlInput::infobulle(10); - - if ($a['account_auto']=='t') - $bulle.=HtmlInput::warnbulle(11); - } - elseif ($r->ad_id==ATTR_DEF_TVA) - { - $w=new ITva_Popup('popup_tva'); - $w->table=1; - $w->value=$r->av_text; - } - else - { - switch ($r->ad_type) - { - case 'text': - $w=new IText('av_text'.$r->ad_id); - $w->css_size="100%"; - $w->value=$r->av_text; - break; - case 'numeric': - $w=new INum('av_text'.$r->ad_id); - $w->size=$r->ad_size; - $w->prec=($r->ad_extra=="")?2:$r->ad_extra; - $w->value=$r->av_text; - break; - case 'date': - $w=new IDate('av_text'.$r->ad_id); - $w->value=$r->av_text; - break; - case 'zone': - $w=new ITextArea('av_text'.$r->ad_id); - $w->style=' class="itextarea" style="margin:0px;width:100%"'; - $w->value=$r->av_text; - break; - case 'poste': - $w=new IPoste("av_text".$r->ad_id); - $w->set_attribute('ipopup', 'ipop_account'); - $w->set_attribute('account', "av_text".$r->ad_id); - $w->dbl_click_history(); - $w->width=$r->ad_size; - $w->table=0; - $bulle=HtmlInput::infobulle(14); - $w->value=$r->av_text; - break; - case 'card': - $uniq=rand(0, 1000); - $w=new ICard("av_text".$r->ad_id); - $w->id="card_".$this->id.$uniq; - // filter on ad_extra - - $filter=$r->ad_extra; - $w->width=$r->ad_size; - $w->extra=$filter; - $w->extra2=0; - $label=new ISpan(); - $label->name="av_text".$uniq.$r->ad_id."_label"; - $fiche=new Fiche($this->cn); - $fiche->get_by_qcode($r->av_text); - if ($fiche->id==0) - { - $label->value=(trim($r->av_text)=='')?"":" "._("Fiche non trouvée")." "; - $r->av_text=""; - } - else - { - $label->value=$fiche->strAttribut(ATTR_DEF_NAME). - " ". - $fiche->strAttribut(ATTR_DEF_FIRST_NAME,0); - } - $w->set_attribute('ipopup', 'ipopcard'); - $w->set_attribute('typecard', $filter); - $w->set_attribute('inp', "av_text".$r->ad_id); - $w->set_attribute('label', $label->name); - $w->autocomplete=0; - $w->dblclick="fill_ipopcard(this);"; - $msg=$w->search(); - $msg.=$label->input(); - $w->value=$r->av_text; - break; - case 'select': - $w=new ISelect(); - $w->value=$this->cn->make_array($r->ad_extra); - $w->selected=$r->av_text; - $w->style=' style="width:100%" '; - break; - default: - var_dump($r); - throw new Exception("Type invalide"); - } - $w->table=0; - } - } - else - { - switch ($r->ad_type) - { - case 'select': - $x=new ISelect(); - $x->value=$this->cn->make_array($r->ad_extra); - $x->selected=$r->av_text; - $value=$x->display(); - $w->value=$value; - break; - default: - $w->value=$r->av_text; - } - } - - $w->name="av_text".$r->ad_id; - $w->readOnly=$p_readonly; - - if ($r->ad_id==21||$r->ad_id==22||$r->ad_id==20||$r->ad_id==31) - { - $bulle=HtmlInput::infobulle(21); - } - $ret.="".td(_($r->ad_text).$bulle).td($w->input()." ".$msg)." "; - } - - $ret.="
    "; - - return $ret; - } - - /*! - * \brief Save a card, call insert or update - * - * \param p_fiche_def (default 0) - */ - function Save($p_fiche_def=0) - { - // new card or only a update ? - if ( $this->id == 0 ) - $this->insert($p_fiche_def); - else - $this->update(); - } - /*! - * \brief insert a new record - * - * \param $p_fiche_def fiche_def.fd_id - * \param $p_array is the array containing the data - *\param $transation if we want to manage the transaction in this function - * true for small insert and false for a larger loading, the BEGIN / COMMIT sql - * must be done into the caller - av_textX where X is the ad_id - *\verb - example - av_text1=>'name' - \endverb - */ - function insert($p_fiche_def,$p_array=null,$transaction=true) - { - if ($p_array==null) - $p_array=$_POST; - - $fiche_id=$this->cn->get_next_seq('s_fiche'); - $this->id=$fiche_id; - // first we create the card - if ($transaction) - $this->cn->start(); - /* - * Sort the array for having the name AFTER the quickcode and the - * Accounting - */ - ksort($p_array); - - try - { - $sql=sprintf("insert into fiche(f_id,fd_id)". - " values (%d,%d)", $fiche_id, $p_fiche_def); - $Ret=$this->cn->exec_sql($sql); - // parse the $p_array array - foreach ($p_array as $name=> $value) - { - /* avoid the button for searching an accounting item */ - if (preg_match('/^av_text[0-9]+$/', $name)==0) - continue; - - list ($id)=sscanf($name, "av_text%d"); - if ($id==null) - continue; - - // Special traitement - // quickcode - if ($id==ATTR_DEF_QUICKCODE) - { - $sql=sprintf("select insert_quick_code(%d,'%s')", $fiche_id, - sql_string($value)); - $this->cn->exec_sql($sql); - continue; - } - // name - if ($id==ATTR_DEF_NAME) - { - if (strlen(trim($value))==0) - $value="pas de nom"; - } - // account - if ($id==ATTR_DEF_ACCOUNT) - { - $v=mb_substr(sql_string($value), 0, 40); - try - { - - if (strlen(trim($v))!=0) - { - if (strpos($value, ',')==0) - { - $v=$this->cn->get_value("select format_account($1)", - array($value)); - } - else - { - $ac_array=explode(",", $value); - if (count($ac_array)<>2) - throw new Exception('Désolé, il y a trop de virgule dans le poste comptable '.h($value)); - $part1=$ac_array[0]; - $part2=$ac_array[1]; - $part1=$this->cn->get_value('select format_account($1)', - array($part1)); - $part2=$this->cn->get_value('select format_account($1)', - array($part2)); - $v=$part1.','.$part2; - } - $parameter=array($this->id, $v); - } - else - { - $parameter=array($this->id, null); - } - $v=$this->cn->get_value("select account_insert($1,$2)", - $parameter); - } - catch (Exception $e) - { - throw new Exception("Erreur : ce compte [$v] n'a pas de compte parent.". - "L'opération est annulée", 1); - } - continue; - } - // TVA - if ($id==ATTR_DEF_TVA) - { - // Verify if the rate exists, if not then do not update - if (strlen(trim($value))!=0) - { - if (isNumber($value)==0) - continue; - if ($this->cn->count_sql("select * from tva_rate where tva_id=".$value)==0) - { - continue; - } - } - } - // Normal traitement - $value2=sql_string($value); - - $sql=sprintf("select attribut_insert(%d,%d,'%s')", $fiche_id, - $id, strip_tags(trim($value2))); - $this->cn->exec_sql($sql); - } - } - catch (Exception $e) - { - $this->cn->rollback(); - throw ($e); - return; - } - if ($transaction) - $this->cn->commit(); - return; - } - - /*!\brief update a card - */ - function update($p_array=null) - { - global $g_user; - if ($p_array==null) - $p_array=$_POST; - - try - { - $this->cn->start(); - // parse the $p_array array - foreach ($p_array as $name=> $value) - { - if (preg_match('/^av_text[0-9]+$/', $name)==0) - continue; - - list ($id)=sscanf($name, "av_text%d"); - - if ($id==null) - continue; - - // retrieve jft_id to update table attr_value - $sql=" select jft_id from fiche_detail where ad_id=$id and f_id=$this->id"; - $Ret=$this->cn->exec_sql($sql); - if (Database::num_row($Ret)==0) - { - // we need to insert this new attribut - $jft_id=$this->cn->get_next_seq('s_jnt_fic_att_value'); - - $sql2="insert into fiche_detail(jft_id,ad_id,f_id,ad_value) values ($1,$2,$3,NULL)"; - - $ret2=$this->cn->exec_sql($sql2, - array($jft_id, $id, $this->id)); - } - else - { - $tmp=Database::fetch_array($Ret, 0); - $jft_id=$tmp['jft_id']; - } - // Special traitement - // quickcode - if ($id==ATTR_DEF_QUICKCODE) - { - $sql=sprintf("select update_quick_code(%d,'%s')", $jft_id, - sql_string($value)); - $this->cn->exec_sql($sql); - continue; - } - // name - if ($id==ATTR_DEF_NAME) - { - if (strlen(trim($value))==0) - continue; - } - // account - if ($id==ATTR_DEF_ACCOUNT) - { - $v=sql_string($value); - if (trim($v)!='') - { - if (strpos($v, ',')!=0) - { - $ac_array=explode(",", $v); - if (count($ac_array)<>2) - throw new Exception('Désolé, il y a trop de virgule dans le poste comptable '.h($v)); - $part1=$ac_array[0]; - $part2=$ac_array[1]; - $part1=$this->cn->get_value('select format_account($1)', - array($part1)); - $part2=$this->cn->get_value('select format_account($1)', - array($part2)); - $v=$part1.','.$part2; - } - else - { - $v=$this->cn->get_value('select format_account($1)', - array($value)); - } - $sql=sprintf("select account_update(%d,'%s')", - $this->id, $v); - try - { - $this->cn->exec_sql($sql); - } - catch (Exception $e) - { - throw new Exception(__LINE__."Erreur : ce compte [$v] n'a pas de compte parent.". - "L'opération est annulée"); - } - continue; - } - if (strlen(trim($v))==0) - { - - $sql=sprintf("select account_update(%d,null)", $this->id); - try - { - $Ret=$this->cn->exec_sql($sql); - } - catch (Exception $e) - { - throw new Exception(__LINE__."Erreur : ce compte [$v] n'a pas de compte parent.". - "L'opération est annulée"); - } - - continue; - } - } - // TVA - if ($id==ATTR_DEF_TVA) - { - // Verify if the rate exists, if not then do not update - if (strlen(trim($value))!=0) - { - if ($this->cn->count_sql("select * from tva_rate where tva_id=".$value)==0) - { - continue; - } - } - } - // Normal traitement - $sql="update fiche_detail set ad_value=$1 where jft_id=$2"; - $this->cn->exec_sql($sql, array(strip_tags($value), $jft_id)); - } - } - catch (Exception $e) - { - echo ''. - $e->getMessage(). - ''; - $this->cn->rollback(); - return; - } - $this->cn->commit(); - return; - } - - /*!\brief remove a card - */ - function remove($silent=false) - { - if ( $this->id==0 ) return; - // verify if that card has not been used is a ledger - // if the card has its own account in PCMN - // Get the fiche_def.fd_id from fiche.f_id - $this->Get(); - $fiche_def=new Fiche_Def($this->cn,$this->fiche_def); - $fiche_def->get(); - - // if the card is used do not removed it - $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); - - if ( $this->cn->count_sql("select * from jrnx where j_qcode='".Database::escape_string($qcode)."'") != 0) - { - if ( ! $silent ) { - alert(_('Impossible cette fiche est utilisée dans un journal')); - } - return 1; - } - - $this->delete(); - return 0; - } - - - /*!\brief return the name of a card - * - */ - function getName() - { - $sql="select ad_value from fiche_detail - where ad_id=1 and f_id=$1"; - $Res=$this->cn->exec_sql($sql,array($this->id)); - $r=Database::fetch_all($Res); - if ( sizeof($r) == 0 ) - return 1; - return $r[0]['ad_value']; - } - - /*!\brief return the quick_code of a card - * \return null if not quick_code is found - */ - function get_quick_code() - { - $sql="select ad_value from fiche_detail where ad_id=23 and f_id=$1"; - $Res=$this->cn->exec_sql($sql,array($this->id)); - $r=Database::fetch_all($Res); - if ( sizeof($r) == 0 ) - return null; - return $r[0]['ad_value']; - } - - /*!\brief Synonum of fiche::getAttribut - */ - function Get() - { - $this->getAttribut(); - } - /*!\brief Synonum of fiche::getAttribut - */ - function load() - { - $this->getAttribut(); - } - /*!\brief get all the card thanks the fiche_def_ref - * \param $p_offset (default =-1) - * \param $p_search sql condition - * \return array of fiche object - */ - function get_by_category($p_offset=-1,$p_search="",$p_order='') - { - return fiche::GetByDef($this->fiche_def_ref,$p_offset,$p_search,$p_order); - } - /*!\brief retrieve the frd_id of the fiche it is the type of the - * card (bank, purchase...) - * (fiche_def_ref primary key) - */ - function get_fiche_def_ref_id() - { - $result=$this->cn->get_array("select frd_id from fiche join fiche_Def using (fd_id) where f_id=".$this->id); - if ( $result == null ) - return null; - - return $result[0]['frd_id']; - } - /** - *@brief fetch and return and array - *@see get_row get_row_date - */ - private function get_row_result($res) - { - $array=array(); - $tot_cred=0.0; - $tot_deb=0.0; - $Max=Database::num_row($res); - if ( $Max == 0 ) return null; - for ($i=0;$i<$Max;$i++) - { - $array[]=Database::fetch_array($res,$i); - if ($array[$i]['j_debit']=='t') - { - $tot_deb+=$array[$i]['deb_montant'] ; - } - else - { - $tot_cred+=$array[$i]['cred_montant'] ; - } - } - $this->row=$array; - return array($array,$tot_deb,$tot_cred); - } - /*! - * \brief Get data for poste - * - * \param $p_from periode from - * \param $p_to end periode - *\param $op_let 0 all operation, 1 only lettered one, 2 only unlettered one - * \return double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal) - * (tot_deb,tot_credit - * - */ - function get_row_date($p_from,$p_to,$op_let=0) - { - global $g_user; - if ( $this->id == 0 ) - { - echo_error("class_fiche",__LINE__,"id is 0"); - return; - } - $filter_sql=$g_user->get_ledger_sql('ALL',3); - $sql_let=''; - switch ($op_let) - { - case 0: - break; - case 1: - $sql_let=' and j_id in (select j_id from letter_cred union select j_id from letter_deb)'; - break; - case '2': - $sql_let=' and j_id not in (select j_id from letter_cred union select j_id from letter_deb) '; - break; - } - - $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); - $Res=$this->cn->exec_sql("select distinct substring(jr_pj_number,'[0-9]+$'),j_id,j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,j_qcode,". - "case when j_debit='t' then j_montant else 0 end as deb_montant,". - "case when j_debit='f' then j_montant else 0 end as cred_montant,". - " jr_comment as description,jrn_def_name as jrn_name,". - " jr_pj_number,". - "j_debit, jr_internal,jr_id,coalesce(comptaproc.get_letter_jnt(j_id),-1) as letter, ". - " jr_tech_per,p_exercice,jrn_def_name, - jrn_def_code". - " from jrnx left join jrn_def on jrn_def_id=j_jrn_def ". - " left join jrn on jr_grpt_id=j_grpt". - " left join parm_periode on (p_id=jr_tech_per) ". - " where j_qcode=$1 and ". - " ( to_date($2,'DD.MM.YYYY') <= j_date and ". - " to_date($3,'DD.MM.YYYY') >= j_date )". - " and $filter_sql $sql_let ". - " order by j_date,substring(jr_pj_number,'[0-9]+$')",array($qcode,$p_from,$p_to)); - - return $this->get_row_result($Res); - } - - /*! - * \brief Get data for poste - * - * \param $p_from periode from - * \param $p_to end periode - * \return double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal) - * (tot_deb,tot_credit - * - */ - function get_row($p_from,$p_to) - { - if ( $this->id == 0 ) - { - echo_error("class_fiche",__LINE__,"id is 0"); - return; - } - $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); - $periode=sql_filter_per($this->cn,$p_from,$p_to,'p_id','jr_tech_per'); - - $Res=$this->cn->exec_sql("select j_date,to_char(j_date,'DD.MM.YYYY') as j_date_fmt,j_qcode,". - "case when j_debit='t' then j_montant else 0 end as deb_montant,". - "case when j_debit='f' then j_montant else 0 end as cred_montant,". - " jr_comment as description,jrn_def_name as jrn_name,". - "j_debit, jr_internal,jr_id ". - " from jrnx left join jrn_def on jrn_def_id=j_jrn_def ". - " left join jrn on jr_grpt_id=j_grpt". - " where j_qcode='".$qcode."' and ".$periode. - " order by j_date::date"); - return $this->get_row_result($Res); - - } - /*! - * \brief HtmlTable, display a HTML of a card for the asked period - *\param $op_let 0 all operation, 1 only lettered one, 2 only unlettered one - * \return none - */ - function HtmlTableDetail($p_array=null,$op_let=0) - { - if ( $p_array == null) - $p_array=$_REQUEST; - - $name=$this->getName(); - - list($array,$tot_deb,$tot_cred)=$this->get_row_date( $p_array['from_periode'], - $p_array['to_periode'], - $op_let - ); - - if ( count($this->row ) == 0 ) - return; - $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); - - $rep=""; - $already_seen=array(); - echo '

    '.$this->id." ".$name.'

    '; - echo ""; - echo "". - "". - "". - "". - "". - "". - ""; - - foreach ( $this->row as $op ) - { - if ( in_array($op['jr_internal'],$already_seen) ) - continue; - else - $already_seen[]=$op['jr_internal']; - echo "". - "". - "". - "". - "". - "". - ""; - $ac=new Acc_Operation($this->cn); - $ac->jr_id=$op['jr_id']; - $ac->qcode=$qcode; - echo $ac->display_jrnx_detail(1); - - } - $solde_type=($tot_deb>$tot_cred)?_("solde débiteur"):_("solde créditeur"); - $diff=round(abs($tot_deb-$tot_cred),2); - echo "". - "". - "". - "". - "". - ""; - - echo "
    "._("n° de pièce / Code interne")." "._("Date").""._("Description")." "._('Montant')." "._('Débit/Crédit')."
    ".$op['jr_pj_number']." / ".$op['jr_internal']."".$op['j_date']."".h($op['description'])."".""."
    $solde_type". - "$diff$tot_deb$tot_cred
    "; - - return; - } - /*! - * \brief HtmlTable, display a HTML of a card for the asked period - * \param $p_array default = null keys = from_periode, to_periode - *\param $op_let 0 all operation, 1 only lettered one, 2 only unlettered one - *\return -1 if nothing is found otherwise 0 - *\see get_row_date - */ - function HtmlTable($p_array=null,$op_let=0,$from_div=1) - { - if ( $p_array == null) - $p_array=$_REQUEST; - $progress=0; - // if from_periode is greater than to periode then swap the values - if (cmpDate($p_array['from_periode'],$p_array['to_periode']) > 0) - { - $tmp=$p_array['from_periode']; - $p_array['from_periode']=$p_array['to_periode']; - $p_array['to_periode']=$tmp; - - } - list($array, $tot_deb, $tot_cred) = $this->get_row_date($p_array['from_periode'], $p_array['to_periode'], $op_let); - - if ( count($this->row ) == 0 ) - return -1; - - $rep=""; - if ( $from_div==1) - { - echo ""; - } - else - { - echo "
    "; - } - echo ''; - echo "". - "". - "". - "". - "". - "". - "". - th('Prog.','style="text-align:right"'). - th('Let.','style="text-align:right"'); - "" - ; - $old_exercice="";$sum_deb=0;$sum_cred=0; - bcscale(2); - $idx=0; - foreach ( $this->row as $op ) - { - $vw_operation = sprintf('%s', $op['jr_id'], dossier::id(), $op['jr_internal']); - $let = ''; - $html_let = ""; - if ($op['letter'] != -1) - { - $let = strtoupper(base_convert($op['letter'], 10, 36)); - $html_let = HtmlInput::show_reconcile($from_div, $let); - } - $tmp_diff=bcsub($op['deb_montant'],$op['cred_montant']); - - /* - * reset prog. balance to zero if we change of exercice - */ - if ( $old_exercice != $op['p_exercice']) - { - if ($old_exercice != '' ) - { - $progress=bcsub($sum_deb,$sum_cred); - $side=" ".$this->get_amount_side($progress); - echo "". - "". - td(''). - "". - "". - "". - "". - td(nbm(abs($progress)).$side,'style="text-align:right"'). - td(''). - ""; - $sum_cred=0; - $sum_deb=0; - $progress=0; - } - } - $progress=bcadd($progress,$tmp_diff); - $side=" ".$this->get_amount_side($progress); - $sum_cred=bcadd($sum_cred,$op['cred_montant']); - $sum_deb=bcadd($sum_deb,$op['deb_montant']); - if ($idx%2 == 0) $class='class="odd"'; else $class=' class="even"'; - $idx++; - - echo "" . - "". - td(h($op['jr_pj_number'])). - "". - "". - "". - "". - td(nbm(abs($progress)).$side,'style="text-align:right"'). - td($html_let, ' style="text-align:right"') . - ""; - $old_exercice=$op['p_exercice']; - - } - $solde_type=($sum_deb>$sum_cred)?"solde débiteur":"solde créditeur"; - $diff=abs(bcsub($sum_deb,$sum_cred)); - echo ''; - echo "". - "". - "". - "". - "". - "". - "". - "". - - ""; - echo "". - "". - "". - "". - ""; - echo ''; - echo ''; - - echo "
    "._('Date').""._('n° pièce')." "._('Code interne')." "._('Description')." "._('Débit')." "._('Crédit')."
    $old_exerciceTotaux".nbm($sum_deb)."".nbm($sum_cred)."
    ".smaller_date(format_date($op['j_date_fmt']))."".$vw_operation."".h($op['description'])."".nbm($op['deb_montant'])."".nbm($op['cred_montant'])."
    Totaux".nbm($sum_deb)."".nbm($sum_cred)."".nbm($diff)."
    $solde_type".nbm($diff)."
    "; - - return 0; - } - /*! - * \brief Display HTML Table Header (button) - * - * \return none - */ - function HtmlTableHeader($p_array=null) - { - if ( $p_array == null) - $p_array=$_REQUEST; - - $hid=new IHidden(); - echo '
    '; - echo ""; - echo ''; - - echo '"; - $str_ople=(isset($_REQUEST['ople']))?HtmlInput::hidden('ople',$_REQUEST['ople']):''; - - echo '"; - - echo '"; - echo ""; - echo ''; - echo "
    '. - HtmlInput::submit('bt_other',"Autre poste"). - HtmlInput::array_to_hidden(array('gDossier','ac'), $_REQUEST). - dossier::hidden(). - $hid->input("type","poste").$hid->input('p_action','impress')."
    '. - HtmlInput::submit('bt_pdf',_("Export PDF")). - dossier::hidden().$str_ople. - HtmlInput::hidden('act','PDF:fichedetail'). - $hid->input("type","poste"). - $hid->input('p_action','impress'). - $hid->input("f_id",$this->id). - dossier::hidden(). - $hid->input("from_periode",$p_array['from_periode']). - $hid->input("to_periode",$p_array['to_periode']); - if (isset($p_array['oper_detail'])) - echo $hid->input('oper_detail','on'); - - echo "
    '. - HtmlInput::submit('bt_csv',_("Export CSV")). - HtmlInput::hidden('act','CSV:fichedetail'). - dossier::hidden().$str_ople. - $hid->input("type","poste"). - $hid->input('p_action','impress'). - $hid->input("f_id",$this->id). - $hid->input("from_periode",$p_array['from_periode']). - $hid->input("to_periode",$p_array['to_periode']); - if (isset($p_array['oper_detail'])) - echo $hid->input('oper_detail','on'); - - echo "
    '; - echo HtmlInput::print_window(); - echo '
    "; - echo '
    '; - - } - /*! - * \brief give the balance of an card - * \return - * balance of the card - * - */ - function get_solde_detail($p_cond="") - { - if ( $this->id == 0 ) return array('credit'=>0,'debit'=>0,'solde'=>0); - $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); - - if ( $p_cond != "") $p_cond=" and ".$p_cond; - $Res=$this->cn->exec_sql("select sum(deb) as sum_deb, sum(cred) as sum_cred from - ( select j_poste, - case when j_debit='t' then j_montant else 0 end as deb, - case when j_debit='f' then j_montant else 0 end as cred - from jrnx - where - j_qcode = ('$qcode'::text) - $p_cond - ) as m "); - $Max=Database::num_row($Res); - if ($Max==0) return 0; - $r=Database::fetch_array($Res,0); - - return array('debit'=>$r['sum_deb'], - 'credit'=>$r['sum_cred'], - 'solde'=>abs($r['sum_deb']-$r['sum_cred'])); - } - /** - *get the bank balance with receipt or not - * - */ - function get_bk_balance($p_cond="") - { - if ( $this->id == 0 ) throw new Exception('fiche->id est nul'); - $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); - - if ( $p_cond != "") $p_cond=" and ".$p_cond; - $sql="select sum(deb) as sum_deb, sum(cred) as sum_cred from - ( select j_poste, - case when j_debit='t' then j_montant else 0 end as deb, - case when j_debit='f' then j_montant else 0 end as cred - from jrnx - join jrn on (jr_grpt_id=j_grpt) - where - j_qcode = ('$qcode'::text) - $p_cond - ) as m "; - - $Res=$this->cn->exec_sql($sql); - $Max=Database::num_row($Res); - if ($Max==0) return 0; - $r=Database::fetch_array($Res,0); - - return array('debit'=>$r['sum_deb'], - 'credit'=>$r['sum_cred'], - 'solde'=>abs($r['sum_deb']-$r['sum_cred'])); - - } - /*!\brief check if an attribute is empty - *\param $p_attr the id of the attribut to check (ad_id) - *\return return true is the attribute is empty or missing - */ - function empty_attribute($p_attr) - { - $sql="select ad_value - from fiche_detail - natural join fiche - left join attr_def using (ad_id) where f_id=".$this->id. - " and ad_id = ".$p_attr. - " order by ad_id"; - $res=$this->cn->exec_sql($sql); - if ( Database::num_row($res) == 0 ) return true; - $text=Database::fetch_result($res,0,0); - return (strlen(trim($text)) > 0)?false:true; - - - } - /*! Summary - * \brief show the default screen - * - * \param $p_search (filter) - * \param $p_action used for specific action bank, red if credit < debit - * \param $p_sql SQL to filter the number of card must start with AND - * \param $p_amount true : only cards with at least one operation default : false - * \return: string to display - */ - function Summary($p_search="",$p_action="",$p_sql="",$p_amount=false) - { - global $g_user; - $bank=new Acc_Parm_Code($this->cn,'BANQUE'); - $cash=new Acc_Parm_Code($this->cn,'CAISSE'); - $cc=new Acc_Parm_Code($this->cn,'COMPTE_COURANT'); - - bcscale(4); - $gDossier=dossier::id(); - $p_search=sql_string($p_search); - $script=$_SERVER['PHP_SELF']; - // Creation of the nav bar - // Get the max numberRow - $filter_amount=''; - global $g_user; - - $filter_year=" j_tech_per in (select p_id from parm_periode ". - "where p_exercice='".$g_user->get_exercice()."')"; - - if ( $p_amount) $filter_amount=' and f_id in (select f_id from jrnx where '.$filter_year.')'; - - $all_tiers=$this->count_by_modele($this->fiche_def_ref,"",$p_sql.$filter_amount); - // Get offset and page variable - $offset=( isset ($_REQUEST['offset'] )) ?$_REQUEST['offset']:0; - $page=(isset($_REQUEST['page']))?$_REQUEST['page']:1; - $bar=navigation_bar($offset,$all_tiers,$_SESSION['g_pagesize'],$page); - - // set a filter ? - $search=$p_sql; - - $exercice=$g_user->get_exercice(); - $tPeriode=new Periode($this->cn); - list($max,$min)=$tPeriode->get_limit($exercice); - - - if ( trim($p_search) != "" ) - { - $search.=" and f_id in - (select distinct f_id from fiche_detail - where - ad_id in (1,32,30,23,18,13) and ad_value ~* '$p_search')"; - } - // Get The result Array - $step_tiers=$this->get_by_category($offset,$search.$filter_amount,'name'); - - if ( $all_tiers == 0 || count($step_tiers)==0 ) return ""; - $r=""; - $r.=_("Filtre rapide ").HtmlInput::filter_table("tiers_tb", '0,1,2', 1); - $r.=$bar; - - $r.=' - - '. - ''. - ' - - - - '; - $r.=''; - if ( sizeof ($step_tiers ) == 0 ) - return $r; - - $i=0; - $deb=0;$cred=0; - foreach ($step_tiers as $tiers ) - { - $i++; - - /* Filter on the default year */ - $amount=$tiers->get_solde_detail($filter_year); - - /* skip the tiers without operation */ - if ( $p_amount && $amount['debit']==0 && $amount['credit'] == 0 && $amount['solde'] == 0 ) continue; - - $odd=""; - $odd = ($i % 2 == 0 ) ? ' odd ': ' even '; - $accounting=$tiers->strAttribut(ATTR_DEF_ACCOUNT); - if ( $p_action == 'bank' && $amount['debit'] < $amount['credit'] ){ - if ( strpos($accounting,$bank->p_value)===0 || strpos($accounting,$cash->p_value)===0 || strpos($accounting,$cc->p_value)===0){ - //put in red if c>d - $odd.=" notice "; - } - } - - $odd=' class="'.$odd.'"'; - - $r.=""; - $url_detail=$script.'?'.http_build_query(array('sb'=>'detail','sc'=>'sv','ac'=>$_REQUEST['ac'],'f_id'=>$tiers->id,'gDossier'=>$gDossier)); - $e=sprintf(' ', - $url_detail); - - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $str_deb=(($amount['debit']==0)?0:nbm($amount['debit'])); - $str_cred=(($amount['credit']==0)?0:nbm($amount['credit'])); - $str_solde=nbm($amount['solde']); - $r.=''; - $r.=''; - $side=($amount['debit'] > $amount['credit'])?'D':'C'; - $side=($amount['debit'] == $amount['credit'])?'=':$side; - $red=""; - if ( $p_action == 'customer' && $amount['debit'] < $amount['credit'] ){ - //put in red if d>c - $red=" notice "; - } - if ( $p_action == 'supplier' && $amount['debit'] > $amount['credit'] ){ - //put in red if c>d - $red=" notice "; - } - $r.='"; - $deb=bcadd($deb,$amount['debit']); - $cred=bcadd($cred,$amount['credit']); - - $r.=""; - - } - $r.=""; - $solde=abs(bcsub($deb,$cred)); - $side=($deb > $cred)?'Débit':'Crédit'; - $r.=''; - $r.=td("").td("").td("").td("Totaux").td(nbm($deb),'class="num"').td(nbm($cred),'class="num"').td(" $side ".nbm($solde),'class="num"'); - $r.=''; - $r.=""; - $r.="
    '._('Quick Code').HtmlInput::infobulle(17).''._('Poste comptable').''._('Nom').' ▴'.''._('Adresse').''._('Total débit').''._('Total crédit').''._('Solde').'
    $e".$tiers->strAttribut(ATTR_DEF_QUICKCODE)." $e".$accounting."".h($tiers->strAttribut(ATTR_DEF_NAME))."".h($tiers->strAttribut(ATTR_DEF_ADRESS). - " ".$tiers->strAttribut(ATTR_DEF_CP). - " ".$tiers->strAttribut(ATTR_DEF_PAYS)). - " '.$str_deb.' '.$str_cred.' '.$str_solde."$side
    "; - $r.=$bar; - return $r; - } - /*! - * \brief get the fd_id of the card : fd_id, it set the attribute fd_id - */ - function get_categorie() - { - if ( $this->id == 0 ) throw new Exception('class_fiche : f_id = 0 '); - $sql='select fd_id from fiche where f_id='.$this->id; - $R=$this->cn->get_value($sql); - if ( $R == "" ) - $this->fd_id=0; - else - $this->fd_id=$R; - } - /*! - *************************************************** - * \brief Check if a fiche is used by a jrn - * return 1 if the fiche is in the range otherwise 0, the quick_code - * or the id must be set - * - * - * \param $p_jrn journal_id - * \param $p_type : deb or cred default empty - * - * \return 1 if the fiche is in the range otherwise < 1 - * -1 the card doesn't exist - * -2 the ledger has no card to check - * - */ - function belong_ledger($p_jrn,$p_type="") - { - // check if we have a quick_code or a f_id - if (($this->quick_code==null || $this->quick_code == "" ) - && $this->id == 0 ) - { - throw new Exception( 'erreur ni quick_code ni f_id ne sont donnes'); - } - - //retrieve the quick_code - if ( $this->quick_code=="") - $this->quick_code=$this->get_quick_code(); - - - if ( $this->quick_code==null) - return -1; - - if ( $this->id == 0 ) - if ( $this->get_by_qcode(null,false) == 1) - return -1; - - $get=""; - if ( $p_type == 'deb' ) - { - $get='jrn_def_fiche_deb'; - } - if ( $p_type == 'cred' ) - { - $get='jrn_def_fiche_cred'; - } - if ( $get != "" ) - { - $Res=$this->cn->exec_sql("select $get as fiche from jrn_def where jrn_def_id=$p_jrn"); - } - else - { - // Get all the fiche type (deb and cred) - $Res=$this->cn->exec_sql(" select jrn_def_fiche_cred as fiche - from jrn_def where jrn_def_id=$p_jrn - union - select jrn_def_fiche_deb - from jrn_def where jrn_def_id=$p_jrn" - ); - } - $Max=Database::num_row($Res); - if ( $Max==0) - { - return -2; - } - /* convert the array to a string */ - $list=Database::fetch_all($Res); - $str_list=""; - $comma=''; - foreach ($list as $row) - { - if ( $row['fiche'] != '' ) - { - $str_list.=$comma.$row['fiche']; - $comma=','; - } - } - // Normally Max must be == 1 - - if ( $str_list=="") - { - return -3; - } - - $sql="select * - from fiche - where - fd_id in (".$str_list.") and f_id= ".$this->id; - - $Res=$this->cn->exec_sql($sql); - $Max=Database::num_row($Res); - if ($Max==0 ) - return 0; - else - return 1; - } - /*!\brief get all the card from a categorie - *\param $p_cn database connx - *\param $pFd_id is the category id - *\param $p_order for the sort, possible values is name_asc,name_desc or nothing - *\return an array of card, but only the fiche->id is set - */ - static function get_fiche_def($p_cn,$pFd_id,$p_order='') - { - switch ($p_order) - { - case 'name_asc': - $sql='select f_id,ad_value from fiche join fiche_detail using (f_id) where ad_id=1 and fd_id=$1 order by 2 asc'; - break; - case 'name_desc': - $sql='select f_id,ad_value from fiche join fiche_detail using (f_id) where ad_id=1 and fd_id=$1 order by 2 desc'; - break; - default: - $sql='select f_id from fiche where fd_id=$1 '; - } - $array=$p_cn->get_array($sql,array($pFd_id)); - - return $array; - } - /*!\brief check if a card is used - *\return return true is a card is used otherwise false - */ - function is_used() - { - /* retrieve first the quickcode */ - $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); - $sql='select count(*) as c from jrnx where j_qcode=$1'; - $count=$this->cn->get_value($sql,array($qcode)); - if ( $count == 0 ) return false; - return true; - } - /*\brief remove a card without verification */ - function delete() - { - // Remove from attr_value - $Res=$this->cn->exec_sql("delete from fiche_detail - where - f_id=".$this->id); - - // Remove from fiche - $Res=$this->cn->exec_sql("delete from fiche where f_id=".$this->id); - - } - /*!\brief create the sql statement for retrieving all - * the card - *\return string with sql statement - *\param $array contains the condition - \verbatim - [jrn] => 2 - [typecard] => cred / deb / filter or list - [query] => string - \endverbatim - *\note the typecard cred, deb or filter must be used with jrn, the value of list means a list of fd_id - *\see ajax_card.php cards.js - */ - function build_sql($array) - { - if (!empty($array)) - extract($array); - $and=''; - $filter_fd_id='true'; - $filter_query=''; - if (isset($typecard)) - { - if (strpos($typecard, "sql")==false) - { - switch ($typecard) - { - case 'cred': - if (!isset($jrn)) - throw ('Erreur pas de valeur pour jrn'); - $filter_jrn=$this->cn->make_list("select jrn_def_fiche_cred from jrn_Def where jrn_def_id=$1", - array($jrn)); - $filter_fd_id=" fd_id in (".$filter_jrn.")"; - $and=" and "; - break; - case 'deb': - if (!isset($jrn)) - throw ('Erreur pas de valeur pour jrn'); - $filter_jrn=$this->cn->make_list("select jrn_def_fiche_deb from jrn_Def where jrn_def_id=$1", - array($jrn)); - $filter_fd_id=" fd_id in (".$filter_jrn.")"; - $and=" and "; - break; - case 'filter': - if (!isset($jrn)) - throw ('Erreur pas de valeur pour jrn'); - $filter_jrn=$this->cn->make_list("select jrn_def_fiche_deb from jrn_Def where jrn_def_id=$1", - array($jrn)); - - if (trim($filter_jrn)!='') - $fp1=" fd_id in (".$filter_jrn.")"; - else - $fp1="fd_id < 0"; - - $filter_jrn=$this->cn->make_list("select jrn_def_fiche_cred from jrn_Def where jrn_def_id=$1", - array($jrn)); - - if (trim($filter_jrn)!='') - $fp2=" fd_id in (".$filter_jrn.")"; - else - $fp2="fd_id < 0"; - - $filter_fd_id='('.$fp1.' or '.$fp2.')'; - - $and=" and "; - break; - case 'all': - $filter_fd_id=' true'; - break; - default: - if (trim($typecard)!='') - $filter_fd_id=' fd_id in ('.$typecard.')'; - else - $filter_fd_id=' fd_id < 0'; - } - } - else - { - $filter_fd_id=str_replace('[sql]', '', $typecard); - } - } - - $and=" and "; - if (isset($query)) - { - $query=sql_string($query); - - if (strlen(trim($query))>1) - { - $filter_query=$and."(vw_name ilike '%$query%' or quick_code ilike ('%$query%') " - ." or vw_description ilike '%$query%' or tva_num ilike '%$query%' or accounting like upper('$query%'))"; - } - else - { - $filter_query=''; - } - } - $sql="select * from vw_fiche_attr where ".$filter_fd_id.$filter_query; - return $sql; - } - - /** - *@brief move a card to another cat. The properties will changed - * and be removed - *@param $p_fdid the fd_id of destination - */ - function move_to($p_fdid) - { - $this->cn->start(); - $this->cn->exec_sql('update fiche set fd_id=$1 where f_id=$2',array($p_fdid,$this->id)); - // add missing - $this->cn->exec_sql('select fiche_attribut_synchro($1)',array($p_fdid)); - // add to the destination missing fields - $this->cn->exec_sql("insert into jnt_fic_attr (fd_id,ad_id,jnt_order) select $1,ad_id,100 from fiche_detail where f_id=$2 and ad_id not in (select ad_id from jnt_fic_attr where fd_id=$3)",array($p_fdid,$this->id,$p_fdid)); - $this->cn->commit(); - } - /** - * return the letter C if amount is > 0, D if < 0 or = - * @param type $p_amount - * @return string - */ - function get_amount_side($p_amount) - { - if ($p_amount == 0) - return "="; - if ($p_amount < 0) - return "C"; - if ($p_amount > 0) - return "D"; - } - static function test_me() - { - $cn=new Database(dossier::id()); - $a=new Fiche($cn); - $select_cat=new ISelect('fd_id'); - $select_cat->value=$cn->make_array('select fd_id,fd_label from fiche_def where frd_id='. - FICHE_TYPE_CLIENT); - echo '
    '; - echo dossier::hidden(); - echo HtmlInput::hidden('test_select',$_GET['test_select']); - echo 'Choix de la catégorie'; - echo $select_cat->input(); - echo HtmlInput::submit('go_card','Afficher'); - echo '
    '; - if ( isset ($_GET['go_card'])) - { - $empty=$a->to_array($_GET['fd_id']); - print_r($empty); - } - } - - function get_gestion_title() - { - $r = "

    " . h($this->getName()) . " " . h($this->getAttribut(ATTR_DEF_FIRST_NAME)) . '[' . $this->get_quick_code() . ']

    '; - return $r; - } - function get_all_account() - { - - } -} - -?> diff --git a/sources/include/class_fiche_attr.php b/sources/include/class_fiche_attr.php deleted file mode 100644 index ff7a4fb..0000000 --- a/sources/include/class_fiche_attr.php +++ /dev/null @@ -1,284 +0,0 @@ -column_name,"email"=>"column_name_email","val3"=>0); */ - - protected $variable=array("id"=>"ad_id","desc"=>"ad_text","type"=>"ad_type","size"=>"ad_size","extra"=>"ad_extra"); - function __construct ($p_cn,$p_id=0) - { - $this->cn=$p_cn; - if ( $p_id == 0 ) - { - /* Initialize an empty object */ - foreach ($this->variable as $key=>$value) $this->$value=''; - } - else - { - /* load it */ - $this->ad_id=$p_id; - $this->load(); - } - } - public function get_parameter($p_string) - { - if ( array_key_exists($p_string,$this->variable) ) - { - $idx=$this->variable[$p_string]; - return $this->$idx; - } - else - throw new Exception (__FILE__.":".__LINE__.$p_string.'Erreur attribut inexistant'); - } - public function set_parameter($p_string,$p_value) - { - if ( array_key_exists($p_string,$this->variable) ) - { - $idx=$this->variable[$p_string]; - $this->$idx=$p_value; - } - else - throw new Exception (__FILE__.":".__LINE__.$p_string.'Erreur attribut inexistant'); - } - public function get_info() - { - return var_export($this,true); - } - public function verify() - { - // Verify that the elt we want to add is correct - /* verify only the datatype */ - if ( strlen(trim($this->ad_text))==0) - throw new Exception('La description ne peut pas être vide',1); - if ( strlen(trim($this->ad_type))==0) - throw new Exception('Le type ne peut pas être vide',1); - $this->ad_type=strtolower($this->ad_type); - if ( in_array($this->ad_type,array('date','text','numeric','zone','poste','card','select'))==false) - throw new Exception('Le type doit être text, numeric,poste, card, select ou date',1); - if ( trim($this->ad_size)=='' || isNumber($this->ad_size)==0||$this->ad_size>22) - { - switch ($this->ad_type) - { - case 'text': - $this->ad_size=22; - break; - case 'numeric': - $this->ad_size=9; - break; - case 'date': - $this->ad_size=8; - break; - case 'zone': - $this->ad_size=22; - break; - - default: - $this->ad_size=22; - } - } - if ( $this->ad_type == 'numeric' ) { - $this->ad_extra=(trim($this->ad_extra)=='')?'2':$this->ad_extra; - if (isNumber($this->ad_extra) == 0) throw new Exception ("La précision doit être un chiffre"); - - } - if ( $this->ad_type == 'select') - { - if (trim($this->ad_extra)=="") throw new Exception ("La requête SQL est vide "); - if ( preg_match('/^\h*select/i',$this->ad_extra) == 0) throw new Exception ("La requête SQL doit commencer par SELECT "); - try{ - - $this->cn->exec_sql($this->ad_extra); - }catch (Exception $e) - { - throw new Exception ("La requête SQL ".h($this->ad_extra)." est invalide "); - } - } - } - public function save() - { - - /* please adapt */ - if ( $this->ad_id == 0 ) - $this->insert(); - else - $this->update(); - } - /** - *@brief retrieve array of object thanks a condition - *@param $cond condition (where clause) - *@param $p_array array for the SQL stmt - *@see Database::get_array - *@return an empty array if nothing is found - */ - public function seek($cond='',$p_array=null) - { - if ( $cond != '') - $sql="select * from attr_def where $cond order by ad_text"; - else - $sql="select * from attr_def order by ad_text"; - - $aobj=array(); - $array= $this->cn->get_array($sql,$p_array); - // map each row in a object - $size=$this->cn->count(); - if ( $size == 0 ) return $aobj; - for ($i=0;$i<$size;$i++) - { - $oobj=new Fiche_Attr ($this->cn); - foreach ($array[$i] as $idx=>$value) - { - $oobj->$idx=$value; - } - $aobj[]=clone $oobj; - } - return $aobj; - } - public function insert() - { - try{ - $this->verify(); - /* please adapt */ - $sql="insert into attr_def(ad_text - ,ad_type,ad_size,ad_extra - ) values ($1 - ,$2,$3,$4 - ) returning ad_id"; - - $this->ad_id=$this->cn->get_value( - $sql, - array( $this->ad_text,$this->ad_type,$this->ad_size,$this->ad_extra - ) - ); - } catch (Exception $e) - { - throw $e; - } - - } - - public function update() - { - try - { - $this->verify(); - if ( $this->ad_id < 9000) return; - /* please adapt */ - $sql=" update attr_def set ad_text = $1 - ,ad_type = $2,ad_size=$4,ad_extra=$5 - where ad_id= $3"; - $res=$this->cn->exec_sql( - $sql, - array($this->ad_text - ,$this->ad_type - ,$this->ad_id,$this->ad_size,$this->ad_extra) - ); - }catch (Exception $e) - { - throw $e; - } - - - } - /** - *@brief load a object - *@return 0 on success -1 the object is not found - */ - public function load() - { - - $sql="select ad_text - ,ad_type,ad_size,ad_extra - from attr_def where ad_id=$1"; - /* please adapt */ - $res=$this->cn->get_array( - $sql, - array($this->ad_id) - ); - - if ( count($res) == 0 ) - { - /* Initialize an empty object */ - foreach ($this->variable as $key=>$value) $this->$key=''; - - return -1; - } - foreach ($res[0] as $idx=>$value) - { - $this->$idx=$value; - } - return 0; - } - - public function delete() - { - if ($this->ad_id < 9000) return; - $sql=$this->cn->exec_sql("delete from fiche_detail where ad_id=$1 ", - array($this->ad_id)); - - $sql="delete from jnt_fic_attr where ad_id=$1"; - $res=$this->cn->exec_sql($sql,array($this->ad_id)); - - $sql="delete from attr_def where ad_id=$1"; - $res=$this->cn->exec_sql($sql,array($this->ad_id)); - - } - /** - * Unit test for the class - */ - static function test_me() - { - $cn=new Database(25); - $cn->start(); - echo h2info('Test object vide'); - $obj=new Fiche_Attr($cn); - var_dump($obj); - - echo h2info('Test object NON vide'); - $obj->set_parameter('j_id',3); - $obj->load(); - var_dump($obj); - - echo h2info('Update'); - $obj->set_parameter('j_qcode','NOUVEAU CODE'); - $obj->save(); - $obj->load(); - var_dump($obj); - - echo h2info('Insert'); - $obj->set_parameter('j_id',0); - $obj->save(); - $obj->load(); - var_dump($obj); - - echo h2info('Delete'); - $obj->delete(); - echo (($obj->load()==0)?'Trouve':'non trouve'); - var_dump($obj); - $cn->rollback(); - - } - /*! - *@brief used with a usort function, to sort an array of Attribut on the attribut_id (ad_id) - */ - static function sort_by_id($o1,$o2) - { - if ( $o1->ad_id > $o2->ad_id ) return 1; - if ( $o1->ad_id == $o2->ad_id ) return 0; - return -1; - } - - -} -//Fiche_Attr::test_me(); - - - diff --git a/sources/include/class_fiche_def.php b/sources/include/class_fiche_def.php deleted file mode 100644 index 9962fb7..0000000 --- a/sources/include/class_fiche_def.php +++ /dev/null @@ -1,816 +0,0 @@ -cn=$p_cn; - $this->id=$p_id; - } - /*!\brief show the content of the form to create a new Fiche_Def_Ref - */ - function input () - { - $ref=$this->cn->get_array("select * from fiche_def_ref order by frd_text"); - $iradio=new IRadio(); - /* the accounting item */ - $class_base=new IPoste('class_base'); - $class_base->set_attribute('ipopup','ipop_account'); - $class_base->set_attribute('account','class_base'); - $class_base->set_attribute('label','acc_label'); - $f_class_base=$class_base->input(); - $fd_description=new ITextarea('fd_description'); - $fd_description->width=80; - $fd_description->heigh=4; - $fd_description->style='class="itextarea" style="margin-left:0px;vertical-align:text-top"'; - require_once NOALYSS_INCLUDE.'/template/fiche_def_input.php'; - return; - } - - /*! - * \brief Get attribut of a fiche_def - * - * \return string value of the attribute - */ - function getAttribut() - { - $sql="select * from jnt_fic_attr ". - " natural join attr_def where fd_id=".$this->id. - " order by jnt_order"; - - $Ret=$this->cn->exec_sql($sql); - - if ( ($Max=Database::num_row($Ret)) == 0 ) - return ; - for ($i=0;$i < $Max;$i++) - { - $row=Database::fetch_array($Ret,$i); - $t = new Fiche_Attr($this->cn); - $t->ad_id=$row['ad_id']; - $t->ad_text=$row['ad_text']; - $t->jnt_order=$row['jnt_order']; - $t->ad_size=$row['ad_size']; - $t->ad_type=$row['ad_type']; - $t->ad_extra=$row['ad_extra']; - $this->attribut[$i]=clone $t; - } - return $this->attribut; - } - - /*! - * \brief Get attribut of the fiche_def - * - */ - function get() - { - if ( $this->id == 0 ) - return 0; - /* $this->cn->exec_sql('select fiche_attribut_synchro($1)', - array($this->id)); - */ - $sql="select * from fiche_def ". - " where fd_id=".$this->id; - $Ret=$this->cn->exec_sql($sql); - if ( ($Max=Database::num_row($Ret)) == 0 ) - return ; - $row=Database::fetch_array($Ret,0); - $this->label=$row['fd_label']; - $this->class_base=$row['fd_class_base']; - $this->fiche_def=$row['frd_id']; - $this->create_account=$row['fd_create_account']; - $this->fd_description=$row['fd_description']; - } - /*! - ************************************************** - * \brief Get all the fiche_def - * - * \return an array of fiche_def object - */ - function get_all() - { - $sql="select * from fiche_def "; - - $Ret=$this->cn->exec_sql($sql); - if ( ($Max=Database::num_row($Ret)) == 0 ) - return ; - - for ( $i = 0; $i < $Max;$i++) - { - $row=Database::fetch_array($Ret,$i); - $this->all[$i]=new Fiche_Def($this->cn,$row['fd_id']); - $this->all[$i]->label=$row['fd_label']; - $this->all[$i]->class_base=$row['fd_class_base']; - $this->all[$i]->fiche_def=$row['frd_id']; - $this->all[$i]->create_account=$row['fd_create_account']; - } - } - /*! - ************************************************** - * \brief Check in vw_fiche_def if a fiche has - * a attribut X - * - * - * \param $p_attr attribut to check - * \return true or false - */ - function HasAttribute($p_attr) - { - return ($this->cn->count_sql("select * from vw_fiche_def where ad_id=$p_attr and fd_id=".$this->id)>0)?true:false; - - } - /*! - ************************************************** - * \brief Display category into a table - * - * \return HTML row - */ - function Display() - { - $tab = new Sort_Table(); - - $url = HtmlInput::get_to_string(array('ac', 'gDossier')); - $tab->add(_("Nom de fiche"), $url, "order by fd_label asc", "order by fd_label desc", "na", "nd"); - $tab->add(_("Basé sur le poste comptable"), $url, "order by fd_class_base asc", "order by fd_class_base desc", "pa", "pd"); - $tab->add(_("Calcul automatique du poste comptable"), $url, "order by fd_create_account asc", "order by fd_create_account desc", "ca", "cd"); - $tab->add(_("Basé sur le modèle"), $url, "order by frd_text asc", "order by frd_text desc", "ma", "md"); - - $order = (isset($_GET['ord'])) ? $tab->get_sql_order($_GET["ord"]) : $tab->get_sql_order("na"); - - - $res = $this->cn->exec_sql("SELECT fd_id, fd_class_base, fd_label, fd_create_account, fiche_def_ref.frd_id, -frd_text , fd_description FROM fiche_def join fiche_def_ref on (fiche_def.frd_id=fiche_def_ref.frd_id) -$order -"); - - require_once NOALYSS_INCLUDE.'/template/fiche_def_list.php'; - } - /*!\brief Add a fiche category thanks the element from the array - * you cannot add twice the same cat. name - * table : insert into fiche_def - * insert into attr_def - * - * \param $array array - * index FICHE_REF - * nom_mod - * class_base - * fd_description - */ - function Add($array) - { - /** - * Check needed info - */ - $p_nom_mod = HtmlInput::default_value('nom_mod', "", $array); - $p_fd_description = HtmlInput::default_value('fd_description', "", $array); - $p_class_base= HtmlInput::default_value('class_base', "", $array); - $p_fiche_def= HtmlInput::default_value('FICHE_REF', "", $array); - $p_create= HtmlInput::default_value('create', "off", $array); - - // If there is no description then add a empty one - if ( ! isset ($p_fd_description)) { - $p_fd_description=""; - } - // Format correctly the name of the cat. of card - $p_nom_mod=sql_string($p_nom_mod); - - - // Name can't be empty - if ( strlen(trim($p_nom_mod)) == 0 ) - { - alert (_('Le nom de la catégorie ne peut pas être vide')); - return 1; - } - // $p_fiche_def can't be empty - if ( strlen(trim($p_fiche_def)) == 0 ) - { - alert (_('Un modéle de catégorie est obligatoire')); - return 1; - } - - /* check if the cat. name already exists */ - $sql="select count(*) from fiche_Def where upper(fd_label)=upper($1)"; - $count=$this->cn->get_value($sql,array(trim($p_nom_mod))); - - if ($count != 0 ) { - echo alert (_('Catégorie existante')); - return 1; - } - // Set the value of fiche_def.fd_create_account - // automatic creation for 'poste comptable' - if ( $p_create == "on" && strlen(trim($p_class_base)) != 0) - $p_create='true'; - else - $p_create='false'; - - // Class is valid ? - if ( sql_string($p_class_base) != null || ( $p_class_base !='' && strpos(',',$p_class_base) != 0 )) - { - // p_class is a valid number - $sql="insert into fiche_def(fd_label,fd_class_base,frd_id,fd_create_account,fd_description) - values ($1,$2,$3,$4,$5) returning fd_id"; - - $fd_id=$this->cn->get_value($sql,array($p_nom_mod,$p_class_base,$p_fiche_def,$p_create,$p_fd_description)); - - // p_class must be added to tmp_pcmn if it is a single accounting - if ( strpos(',',$p_class_base) ==0) - { - $sql="select account_add($1,$2)"; - $Res=$this->cn->exec_sql($sql,array($p_class_base,$p_nom_mod)); - } - // Get the fd_id - $fd_id=$this->cn->get_current_seq('s_fdef'); - - // update jnt_fic_attr - $sql=sprintf("insert into jnt_fic_attr(fd_id,ad_id,jnt_order) - values (%d,%d,10)",$fd_id,ATTR_DEF_ACCOUNT); - $Res=$this->cn->exec_sql($sql); - } - else - { - //There is no class base not even as default - $sql="insert into fiche_def(fd_label,frd_id,fd_create_account,fd_description) values ($1,$2,$3,$4) returning fd_id"; - - - $this->id=$this->cn->get_value($sql,array($p_nom_mod,$p_fiche_def,$p_create,$p_fd_description)); - - // Get the fd_id - $fd_id=$this->cn->get_current_seq('s_fdef'); - - } - - // Get the default attr_def from attr_min - $def_attr=$this->get_attr_min($p_fiche_def); - - //if defaut attr not null - // build the sql insert for the table attr_def - if (sizeof($def_attr) != 0 ) - { - // insert all the mandatory fields into jnt_fiche_attr - $jnt_order=10; - foreach ( $def_attr as $i=>$v) - { - $order=$jnt_order; - if ( $v['ad_id'] == ATTR_DEF_NAME ) - $order=0; - $count=$this->cn->get_value("select count(*) from jnt_fic_attr where fd_id=$1 and ad_id=$2",array($fd_id,$v['ad_id'])); - if ($count == 0) - { - $sql=sprintf("insert into jnt_fic_Attr(fd_id,ad_id,jnt_order) - values (%d,%s,%d)", - $fd_id,$v['ad_id'],$order); - $this->cn->exec_sql($sql); - $jnt_order+=10; - } - } - } - $this->id=$fd_id; - return 0; - - }//--------------end function Add ---------------------------- - /*! - * \brief Get all the card where the fiche_def.fd_id is given in parameter - * \param $step = 0 we don't use the offset, page_size,... - * $step = 1 we use the jnr_bar_nav - * - * \return array ('f_id'=>..,'ad_value'=>..) - *\see fiche - */ - function get_by_type($step=0) - { - $sql="select f_id,ad_value - from - fiche join fiche_detail using(f_id) - where ad_id=1 and fd_id=$1 order by 2"; - - // we use navigation_bar - if ($step == 1 && $_SESSION['g_pagesize'] != -1 ) - { - $offset=(isset($_GET['offset']))?$_GET['offset']:0; - $step=$_SESSION['g_pagesize']; - $sql.=" offset $offset limit $step"; - } - - $Ret=$this->cn->get_array($sql,array($this->id)); - - return $Ret; - } - /*! - * \brief Get all the card where the fiche_def.frd_id is given in parameter - * \return array of fiche or null is nothing is found - */ - function get_by_category($p_cat) - { - $sql="select f_id,ad_value - from - fiche join fiche_def using(fd_id) - join fiche_detail using(f_id) - where ad_id=1 and frd_id=$1 order by 2 "; - - $Ret=$this->cn->exec_sql($sql,array($p_cat)); - if ( ($Max=Database::num_row($Ret)) == 0 ) - return null; - $all[0]=new Fiche($this->cn); - - for ($i=0;$i<$Max;$i++) - { - $row=Database::fetch_array($Ret,$i); - $t=new Fiche($this->cn,$row['f_id']); - $t->getAttribut(); - $all[$i]=$t; - - } - return $all; - } - - /*!\brief list the card of a fd_id - */ - function myList() - { - $this->get(); - echo '

    '.$this->id." ".$this->label.'

    '; - - $step=$_SESSION['g_pagesize']; - $sql_limit=""; - $sql_offset=""; - $bar=""; - if ( $step != -1 ) - { - - $page=(isset($_GET['page']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; - $max_line=$this->cn->count_sql("select f_id,ad_value from - fiche join fiche_detail using (f_id) - where fd_id='".$this->id."' and ad_id=".ATTR_DEF_NAME." order by f_id"); - $sql_limit=" limit ".$step; - $sql_offset=" offset ".$offset; - $bar=navigation_bar($offset,$max_line,$step,$page); - } - - // Get all name the cards of the select category - // 1 for attr_def.ad_id is always the name - $Res=$this->cn->exec_sql("select f_id,vw_name,quick_code from ". - " vw_fiche_attr ". - " where fd_id='".$this->id. - "' order by f_id $sql_offset $sql_limit "); - $Max=Database::num_row($Res); - echo $bar; - $str=""; - // save the url - // with offet &offset=15&step=15&page=2&size=15 - if ( $_SESSION['g_pagesize'] != -1) - { - $str=sprintf("&offset=%s&step=%s&page=%s&size=%s", - $offset, - $step, - $page, - $max_line); - } - - - echo '
    '; - echo HtmlInput::hidden('ac',$_REQUEST['ac']); - echo dossier::hidden(); - echo HtmlInput::hidden("fiche",$this->id); - echo HtmlInput::submit('add','Ajout fiche'); - echo '
    '; - $str_dossier=dossier::get(); - echo ''; - for ( $i = 0; $i < $Max; $i++) - { - $l_line=Database::fetch_array($Res,$i); - if ( $i%2 == 0) - echo ''; - else - echo ''; - - $span_mod=''; - - echo $span_mod.'"; - echo ''; - } - echo '
    '.$l_line['quick_code'] - .''.h($l_line['vw_name'])."
    '; - echo '
    '; - echo HtmlInput::hidden('ac',$_REQUEST['ac']); - echo dossier::hidden(); - echo HtmlInput::hidden("fiche",$this->id); - echo HtmlInput::submit('add','Ajout fiche'); - echo '
    '; - echo $bar; - - } - /*!\brief show input for the basic attribute : label, class_base, create_account - * use only when we want to update - * - *\return HTML string with the form - */ - function input_base() - { - $r=""; - $r.=_('Label'); - $label=new IText('label',$this->label); - $r.=$label->input(); - $r.='
    '; - /* the accounting item */ - $class_base=new IPoste('class_base',$this->class_base); - $class_base->set_attribute('ipopup','ipop_account'); - $class_base->set_attribute('account','class_base'); - $class_base->set_attribute('label','acc_label'); - $fd_description=new ITextarea('fd_description',$this->fd_description); - $fd_description->width=80; - $fd_description->heigh=4; - $fd_description->style='class="itextarea" style="margin-left:0px;vertical-align:text-top"'; - - $r.=_('Poste Comptable de base').' : '; - $r.=$class_base->input(); - $r.='
    '; - $r.='
    '; - $r.=" Description ".$fd_description->input(); - /* auto Create */ - $r.='
    '; - $ck=new ICheckBox('create'); - $ck->selected=($this->create_account=='f')?false:true; - $r.=_('Chaque fiche aura automatiquement son propre poste comptable : '); - $r.=$ck->input(); - return $r; - } - /*!\brief Display all the attribut of the fiche_def - *\param $str give the action possible values are remove, empty - */ - function DisplayAttribut($str="") - { - if ( $this->id == 0 ) - return ; - $this->cn->exec_sql('select fiche_attribut_synchro($1)',array($this->id)); - - $MaxLine=sizeof($this->attribut); - $r=""; - $r.="".th('Nom attribut').th('').th('Ordre','style="text-align:right"').''; - // Display each attribute - $add_action=""; - for ($i=0;$i<$MaxLine;$i++) - { - $class="even"; - if ( $i % 2 == 0 ) - $class="odd"; - - $r.=''; - } - - // Show the possible attribute which are not already attribute of the model - // of card - $Res=$this->cn->exec_sql("select ad_id,ad_text from attr_def - where - ad_id not in (select ad_id from fiche_def natural join jnt_fic_attr - where fd_id=$1) order by ad_text",array($this->id) ); - $M=Database::num_row($Res); - - // Show the unused attribute - $r.='
    '; - // Can change the name - if ( $this->attribut[$i]->ad_id == ATTR_DEF_NAME ) - { - continue; - } - else - { - if ( $str == "remove" ) - { - //Only for the not mandatory attribute (not defined in attr_min) - if ( $this->cn->count_sql("select * from attr_min where frd_id=". - $this->fiche_def." and ad_id = ".$this->attribut[$i]->ad_id) == 0 - && $this->attribut[$i]->ad_id != ATTR_DEF_QUICKCODE - && $this->attribut[$i]->ad_id != ATTR_DEF_ACCOUNT - ) - { - $add_action=sprintf( ' Supprimer ', - $this->attribut[$i]->ad_id); - } - else - $add_action=""; - } - // The attribut. - $a=sprintf('%s ', $this->attribut[$i]->ad_text); - $r.=$a.$add_action; - /*---------------------------------------- */ - /* ORDER OF THE CARD */ - /*---------------------------------------- */ - $order=new IText(); - $order->name='jnt_order'.$this->attribut[$i]->ad_id; - $order->size=3; - $order->value=$this->attribut[$i]->jnt_order; - $r.=' '.$order->input(); - } - $r.= '
    '; - $r.= ''; - - $r.="
    "; - return $r; - } - /*!\brief Save the label of the fiche_def - * \param $p_label label - */ - function SaveLabel($p_label) - { - if ( $this->id == 0 ) return; - $p_label=sql_string($p_label); - if (strlen(trim ($p_label)) == 0 ) - { - return; - } - $sql=sprintf("update fiche_def set fd_label='%s' ". - "where fd_id=%d", - $p_label,$this->id); - $Res=$this->cn->exec_sql($sql); - - } - /*!\brief set the auto create accounting item for each card and - * save it into the database - * \param $p_label true or false - */ - function set_autocreate($p_label) - { - if ( $this->id == 0 ) return; - if ($p_label==true) - $t='t'; - if ($p_label==false) - $t='f'; - - $sql="update fiche_def set fd_create_account=$1 ". - "where fd_id=$2"; - - $Res=$this->cn->exec_sql($sql,array($t,$this->id)); - - } - /*!\brief Save the class base - * \param $p_label label - */ - function save_class_base($p_label) - { - if ( $this->id == 0 ) return; - $p_label=sql_string($p_label); - - $sql="update fiche_def set fd_class_base=$1 ". - "where fd_id=$2"; - - $Res=$this->cn->exec_sql($sql,array($p_label,$this->id)); - } - function save_description($p_description) - { - if ( $this->id == 0) return; - $this->cn->exec_sql("update fiche_def set fd_description=$1 where fd_id=$2",array($p_description,$this->id)); - } - - - /*!\brief insert a new attribut for this fiche_def - * \param $p_ad_id id of the attribut - */ - function InsertAttribut($p_ad_id) - { - if ( $this->id == 0 ) return; - /* ORDER */ - $this->GetAttribut(); - $max=sizeof($this->attribut)*15; - // Insert a new attribute for the model - // it means insert a row in jnt_fic_attr - $sql=sprintf("insert into jnt_fic_attr (fd_id,ad_id,jnt_order) values (%d,%d,%d)", - $this->id,$p_ad_id,$max); - $Res=$this->cn->exec_sql($sql); - } - /*!\brief remove an attribut for this fiche_def - * \param array of ad_id to remove - * \remark you can't remove the attribut defined in attr_min - */ - function RemoveAttribut($array) - { - foreach ($array as $ch) - { - $this->cn->start(); - $sql="delete from jnt_fic_attr where fd_id=$1 ". - " and ad_id=$2"; - $this->cn->exec_sql($sql,array($this->id,$ch)); - - $sql="delete from fiche_detail where jft_id in ( select ". - " jft_id from fiche_Detail ". - " join fiche using(f_id) ". - " where ". - "fd_id = $1 and ". - "ad_id=$2)"; - $this->cn->exec_sql($sql,array($this->id,$ch)); - - $this->cn->commit(); - } - } - - /*!\brief save the order of a card, update the column jnt_fic_attr.jnt_order - *\param $p_array containing the order - */ - function save_order($p_array) - { - extract($p_array); - $this->GetAttribut(); - foreach ($this->attribut as $row) - { - if ( $row->ad_id == 1 ) continue; - if ( ${'jnt_order'.$row->ad_id} <= 0 ) continue; - $sql='update jnt_fic_attr set jnt_order=$1 where fd_id=$2 and ad_id=$3'; - $this->cn->exec_sql($sql,array(${'jnt_order'.$row->ad_id}, - $this->id, - $row->ad_id)); - - } - /* correct the order */ - $this->cn->exec_sql('select attribute_correct_order()'); - } - - - /*!\brief remove all the card from a categorie after having verify - *that the card is not used and then remove also the category - *\return the remains items, not equal to 0 if a card remains and - *then the category is not removed - */ - function remove() - { - if ( $this->id >= 500000 ) { - throw new Exception(_('Catégorie verrouillée ')); - } - $remain=0; - /* get all the card */ - $aFiche=fiche::get_fiche_def($this->cn,$this->id); - if ( $aFiche != null ) - { - /* check if the card is used */ - foreach ($aFiche as $dfiche) - { - $fiche=new Fiche($this->cn,$dfiche['f_id']); - - /* if the card is not used then remove it otherwise increment remains */ - if ( $fiche->is_used() == false ) - { - $fiche->delete(); - } - else - $remain++; - } - } - /* if remains == 0 then remove cat */ - if ( $remain == 0 ) - { - $sql='delete from jnt_fic_attr where fd_id=$1'; - $this->cn->exec_sql($sql,array($this->id)); - $sql='delete from fiche_def where fd_id=$1'; - $this->cn->exec_sql($sql,array($this->id)); - } - - return $remain; - - } - /*! - * \brief retrieve the mandatory field of the card model - * - * \param $p_fiche_def_ref - * \return array of ad_id (attr_min.ad_id) and labels (attr_def.ad_text) - */ - function get_attr_min($p_fiche_def_ref) - { - - // find the min attr for the fiche_def_ref - $Sql="select ad_id,ad_text from attr_min natural join attr_def - natural join fiche_def_ref - where - frd_id= $1"; - $Res=$this->cn->exec_sql($Sql,array($p_fiche_def_ref)); - $Num=Database::num_row($Res); - - // test the number of returned rows - if ($Num == 0 ) return null; - - // Get Results & Store them in a array - for ($i=0;$i<$Num;$i++) - { - $f=Database::fetch_array($Res,$i); - $array[$i]['ad_id']=$f['ad_id']; - $array[$i]['ad_text']=$f['ad_text']; - } - return $array; - } - /*!\brief count the number of fiche_def (category) which has the frd_id (type of category) - *\param $p_frd_id is the frd_id in constant.php the FICHE_TYPE_ - *\return the number of cat. of card of the given type - *\see constant.php - */ - function count_category($p_frd_id) - { - $ret=$this->cn->count_sql("select fd_id from fiche_def where frd_id=$1",array($p_frd_id)); - return $ret; - } - function input_detail() - { - $r = ""; - // Save the label - - $this->get(); - $this->GetAttribut(); - $r.= '

    ' . $this->id . " " . h($this->label) . '

    '; - $r.='
    '._('Données générales').''; - - /* show the values label class_base and create account */ - $r.='
    '; - $r.=dossier::hidden(); - $r.=HtmlInput::hidden("fd_id", $this->id); - $r.=HtmlInput::hidden("p_action", "fiche"); - $r.= $this->input_base(); - $r.='
    '; - $r.=HtmlInput::submit('change_name', _('Sauver')); - $r.='
    '; - $r.='
    '; - /* attributes */ - $r.='
    '._('Détails').''; - - $r.= '
    '; - $r.=dossier::hidden(); - $r.=HtmlInput::hidden("fd_id", $this->id); - $r.=HtmlInput::hidden("action", ""); - $r.= $this->DisplayAttribut("remove"); - $r.= HtmlInput::submit('add_line_bt', _('Ajoutez cet élément'), - 'onclick="$(\'action\').value=\'add_line\'"'); - $r.= HtmlInput::submit("save_line_bt", _("Sauvez"), - 'onclick="$(\'action\').value=\'save_line\'"'); - - $r.=HtmlInput::submit('remove_cat_bt', _('Effacer cette catégorie'), 'onclick="$(\'action\').value=\'remove_cat\';return confirm_box(\'input_detail_frm\',\'' . _('Vous confirmez ?') . '\')"'); - // if there is nothing to remove then hide the button - if (strpos($r, "chk_remove") != 0) - { - $r.=HtmlInput::submit('remove_line_bt', _("Enleve les éléments cochés"), - 'onclick="$(\'action\').value=\'remove_line\';return confirm_box(\'input_detail_frm\',\'' . _('Vous confirmez ?') . '\')"'); - } - $r.= "
    "; - $r.="

    " . _("Attention : il n'y aura pas de demande de confirmation pour enlever les - attributs sélectionnés. Il ne sera pas possible de revenir en arrière") . "

    "; - $r.='
    '; - return $r; - } - function input_new() - { - $single=new Tool_Uos("dup"); - echo '
    '; - echo $single->hidden(); - echo HtmlInput::hidden("p_action","fiche"); - echo dossier::hidden(); - echo $this->input(); // CreateCategory($cn,$search); - echo HtmlInput::submit("add_modele" ,_("Sauve")); - echo '
    '; - } - -} -?> diff --git a/sources/include/class_fiche_def_ref.php b/sources/include/class_fiche_def_ref.php deleted file mode 100644 index c8aa5c1..0000000 --- a/sources/include/class_fiche_def_ref.php +++ /dev/null @@ -1,153 +0,0 @@ -db=$p_cn; - $this->frd_id=$p_frd_id; - $this->attribut=array('frd_id','frd_text','frd_class_base'); - } - /*! - ************************************************** - * \brief Load all the fiche_def_ref data and - * return an array of fiche_def_ref objects - * - * \return array - */ - function LoadAll() - { - $sql="select * from fiche_def_ref order by frd_id"; - $Res=$this->db->exec_sql($sql); - $all=Database::fetch_all($Res); - if ( $Res == false ) return array(); - $idx=0; - $array=array(); - foreach ($all as $row) - { - $o=new Fiche_Def_Ref($this->db); - - foreach ( $this->attribut as $value) - { - $o->$value=$row[$value]; - } - $array[$idx]=$o; - $idx++; - } - return $array; - } - /*! - ************************************************** - * \brief Display data between tag - * - * \return string - */ - function Display() - { - $r=""; - foreach ( $this->attribut as $value) - { - $r.="".$this->$value.''; - } - return $r; - } - /*! - ************************************************** - * \brief Input Data between tag - * - * \return string - */ - function Input() - { - $r=""; - $h=new IHidden(); - $r.='
  • Id :'.$h->input('frd_id',$this->frd_id).$this->frd_id."
  • "; - $w=new IText(); - $r.='
  • '._('Commentaire ').' :'.$w->input('frd_text',$this->frd_text)."
  • "; - $t=new IText(); - $r.='
  • '._('Poste de base').':'.$t->input('frd_class_base',$this->frd_class_base)."
  • "; - - return $r; - } - /*! - ************************************************** - * \brief Store data into the database: update the - * record - * - * - - * \return none - */ - function Save() - { - $sql="update fiche_def_ref set frd_text=$1 ". - " , frd_class_base=$2 ". - " where frd_id= $3"; - $Res=$this->db->exec_sql($sql,array($this->frd_text,$this->frd_class_base,$this->frd_id)); - } - /*! - ************************************************** - * \brief Get the data with the p_code and complete - * the current object - * - * \return none - */ - function Get() - { - $sql="select * from fiche_def_ref ". - " where frd_id=".$this->frd_id; - $Res=$this->db->exec_sql($sql); - if ( Database::num_row($Res) == 0 ) return null; - $r=Database::fetch_array($Res,0); - $this->frd_text=$r['frd_text']; - $this->frd_class_base=$r['frd_class_base']; - } - /** - * get category of cards by model - * @param $p_modele if the FRD_ID - * @return array of category (fd_id) - */ - function get_by_modele($p_modele) - { - $array = array(); - $result = $this->db->get_array('select fd_id from fiche_def where frd_id=$1', array($p_modele)); - for ($i = 0; $i < count($result); $i++) - { - $array[$i] = $result[$i]['fd_id']; - } - return $array; - } - -} -?> diff --git a/sources/include/class_filetosend.php b/sources/include/class_filetosend.php deleted file mode 100644 index af9b4b3..0000000 --- a/sources/include/class_filetosend.php +++ /dev/null @@ -1,98 +0,0 @@ -full_name=$p_filename; - if (strpos($p_filename,'/') != false) - { - $this->path=dirname($p_filename); - } - $this->filename=basename ($p_filename); - if ( $p_type=="") - { - $this->guess_type(); - - } - } - /** - * set the $this->type to the mimetype, called from __construct - */ - private function guess_type() - { - $ext_pos= strrpos($this->filename,'.'); - if ( $ext_pos == false ) { - $this->type="application/octect"; - return; - } - $ext= substr($this->filename, $ext_pos+1, 3); - switch ($ext) - { - case 'odt': - $this->type='application/vnd.oasis.opendocument.text'; - break; - case 'ods': - $this->type='application/vnd.oasis.opendocument.spreadsheet'; - break; - case 'pdf': - $this->type="application/pdf"; - break; - case 'zip': - $this->type="application/zip"; - break; - default: - $this->type="application/octet"; - } - - } - /** - * Compute properly the filename - */ - function compute_name($p_filename) - { - /** - * @todo compute a filename - */ - } - -} diff --git a/sources/include/class_follow_up.php b/sources/include/class_follow_up.php deleted file mode 100644 index ed5c662..0000000 --- a/sources/include/class_follow_up.php +++ /dev/null @@ -1,1840 +0,0 @@ - - *
  • an invoice - *
  • a meeting - *
  • an order - *
  • a letter - * - * The table document_type are the possible actions - */ - -/** - * \brief class_action for manipulating actions - * action can be : - *
      - *
    • a meeting - *
    • an order - *
    • a letter - *
    - * The table document_type are the possible actions - */ -class Follow_Up -{ - - var $db; /* !< $db database connexion */ - var $ag_timestamp; /* !< $ag_timestamp document date (ag_gestion.ag_timestamp) */ - var $dt_id; /* !< $dt_id type of the document (document_type.dt_id) */ - var $ag_state; /* !< $ag_state stage of the document (printed, send to client...) */ - var $d_number; /* !< $d_number number of the document */ - var $d_filename; /* !< $d_filename filename's document */ - var $d_mimetype; /* !< $d_mimetype document's filename */ - var $ag_title; /* !< $ag_title title document */ - var $f_id; /* !< $f_id_dest fiche id (From field ) */ - var $ag_ref; /* !< $ag_ref is the ref */ - var $ag_hour; /* !< $ag_hour is the hour of the meeting, action */ - var $ag_priority; /* !< $ag_priority is the priority 1 High, 2 medium, 3 low */ - var $ag_dest; /* !< $ag_dest person who is in charged */ - var $ag_contact; /* !< $ag_contact contact */ - var $ag_remind_date; /* !< $ag_contact contact */ - - /** - * @brief $operation string related operation - */ - var $operation; - - /** - * @brief $action string related action - */ - var $action; - - /** - * @brief constructor - * \brief constructor - * \param p_cn database connection - */ - function __construct($p_cn, $p_id=0) - { - $this->db=$p_cn; - $this->ag_id=$p_id; - $this->f_id=0; - $this->aAction_detail=array(); - $this->operation=""; - $this->action=""; - } - /** - * Create a filter based on the current user, - * @global type $g_user Connected user - * @param type $cn Database connection - * @param type $p_mode Mode is R (for Read) or W (for write) - * @return string SQL where clause to include in the SQL - * example: (ag_dest in (select p_granted from user_sec_action_profile where p_id=x) - */ - static function sql_security_filter($cn, $p_mode) - { - global $g_user; - $profile=$cn->get_value("select p_id from profile_user where user_name=$1", array($g_user->login)); - if ($profile=='') - die("Security"); - if ($p_mode=='R') - { - $sql=" (ag_dest in (select p_granted from user_sec_action_profile where p_id=$profile ) ) "; - } else if ($p_mode=='W') - { - $sql=" ( ag_dest in (select p_granted from user_sec_action_profile where p_id=$profile and ua_right='W' ) )"; - } else { - error_log(_('Securité')); - throw new Exception(_('Securité')); - } - return $sql; - } - - //---------------------------------------------------------------------- - /** - * \brief Display the object, the tags for the FORM - * are in the caller. It will be used for adding and updating - * action - * \note If ag_id is not equal to zero then it is an update otherwise - * it is a new document - * - * \param $p_view form will be in readonly mode (value: READ, UPD or NEW ) - * \param $p_gen true we show the tag for generating a doc (value : true or false) and adding files - * \param $p_base is the ac parameter - * \param $retour is the html code for the return button - * \note update the reference number or the document type is not allowed - * - * - * \return string containing the html code - */ - function Display($p_view, $p_gen, $p_base, $retour="") - { - global $g_user; - if ($p_view=='UPD') - { - $upd=true; - $readonly=false; - } - elseif ($p_view=="NEW") - { - $upd=false; - $readonly=false; - $this->ag_ref=_("Nouveau"); - } - elseif ($p_view=='READ') - { - $upd=true; - $readonly=true; - } - else - { - throw new Exception('class_action'.__LINE__.'Follow_Up::Display error unknown parameter'.$p_view); - } - // Compute the widget - // Date - $date=new IDate(); - $date->readOnly=$readonly; - $date->name="ag_timestamp"; - $date->id="ag_timestamp"; - $date->value=$this->ag_timestamp; - - $remind_date=new IDate(); - $remind_date->readOnly=$readonly; - $remind_date->name="ag_remind_date"; - $remind_date->id="ag_remind_date"; - $remind_date->value=$this->ag_remind_date; - - - // Doc Type - $doc_type=new ISelect(); - $doc_type->name="dt_id"; - $doc_type->value=$this->db->make_array("select dt_id,dt_value from document_type order by dt_value", 1); - $doc_type->selected=$this->dt_id; - $doc_type->readOnly=$readonly; - $str_doc_type=$doc_type->input(); - - // Description - $desc=new ITextArea(); - $desc->style=' class="itextarea" style="width:80%;margin-left:0px"'; - $desc->name="ag_comment"; - $desc->readOnly=$readonly; - $acomment=$this->db->get_array("SELECT agc_id, ag_id, to_char(agc_date,'DD.MM.YYYY HH24:MI') as str_agc_date, agc_comment, tech_user - FROM action_gestion_comment where ag_id=$1 order by agc_id;", array($this->ag_id) - ); - - // List opération liées - $operation=$this->db->get_array("select ago_id,j.jr_id,j.jr_internal,j.jr_comment,to_char(j.jr_date,'DD.MM.YY') as str_date - from jrn as j join action_gestion_operation as ago on (j.jr_id=ago.jr_id) - where ag_id=$1 order by jr_date", array($this->ag_id)); - $iconcerned=new IConcerned('operation'); - - // List related action - $action=$this->db->get_array(" - select ag_id,ag_ref,substr(ag_title,1,40) as sub_title,to_char(ag_timestamp,'DD.MM.YY') as str_date , - ag_timestamp,dt_value - from action_gestion - join document_type on (ag_type=dt_id) - where - ag_id in (select aga_greatest from action_gestion_related where aga_least =$1) - or - ag_id in (select aga_least from action_gestion_related where aga_greatest =$1) - order by ag_timestamp", array($this->ag_id)); - $iaction=new IRelated_Action('action'); - $iaction->value=(isset($this->action))?$this->action:""; - - // state - // Retrieve the value - $a=$this->db->make_array("select s_id,s_value from document_state "); - $state=new ISelect(); - $state->readOnly=$readonly; - $state->name="ag_state"; - $state->value=$a; - $state->selected=$this->ag_state; - $str_state=$state->input(); - - // Retrieve the value if there is an attached doc - $doc_ref=""; - // Document id - - $h2=new IHidden(); - $h2->name="d_id"; - $h2->value=$this->d_id; - - if ($this->d_id!=0&&$this->d_id!="") - { - $h2->readonly=($p_view=='NEW')?false:true; - $doc=new Document($this->db, $this->d_id); - $doc->get(); - if (strlen(trim($doc->d_lob))!=0) - { - $d_id=new IHidden(); - $doc_ref="

    Document ".$doc->anchor().'

    '; - $doc_ref.=$h2->input().$d_id->input('d_id', $this->d_id); - } - } - - - // title - $title=new IText(); - $title->readOnly=$readonly; - $title->name="ag_title"; - $title->value=$this->ag_title; - $title->size=60; - - - // Priority of the ag_priority - $ag_priority=new ISelect(); - $ag_priority->readOnly=$readonly; - $ag_priority->name="ag_priority"; - $ag_priority->selected=$this->ag_priority; - $ag_priority->value=array(array('value'=>1, 'label'=>'Haute'), - array('value'=>2, 'label'=>'Moyenne'), - array('value'=>3, 'label'=>'Basse') - ); - $str_ag_priority=$ag_priority->input(); - - // hour of the action (meeting) ag_hour - $ag_hour=new IText(); - $ag_hour->readOnly=$readonly; - $ag_hour->name="ag_hour"; - $ag_hour->value=$this->ag_hour; - $ag_hour->size=6; - $ag_hour->javascript=" onblur=check_hour('ag_hour');"; - $str_ag_hour=$ag_hour->input(); - - // Profile in charged of the action - $ag_dest=new ISelect(); - $ag_dest->readOnly=$readonly; - $ag_dest->name="ag_dest"; - // select profile - $aAg_dest=$this->db->make_array("select p_id as value, ". - "p_name as label ". - " from profile where p_id in (select p_granted from user_sec_action_profile where ua_right='W' and p_id=".$g_user->get_profile().") order by 2"); - - $ag_dest->value=$aAg_dest; - $ag_dest->selected=$this->ag_dest; - $str_ag_dest=$ag_dest->input(); - - // ag_ref - // Always false for update - - $client_label=new ISpan(); - - /* Add button */ - $f_add_button=new IButton('add_card'); - $f_add_button->label=_('Créer une nouvelle fiche'); - $f_add_button->set_attribute('ipopup', 'ipop_newcard'); - $filter=$this->db->make_list('select fd_id from fiche_def '); - $f_add_button->set_attribute('filter', $filter); - - $f_add_button->javascript=" select_card_type(this);"; - $str_add_button=$f_add_button->input(); - - // f_id_dest sender - if ($this->qcode_dest!=NOTFOUND&&strlen(trim($this->qcode_dest))!=0) - { - $tiers=new Fiche($this->db); - $tiers->get_by_qcode($this->qcode_dest); - $qcode_dest_label=$tiers->strAttribut(1); - $this->f_id_dest=$tiers->id; - } - else - { - $qcode_dest_label=($this->f_id_dest==0||trim($this->qcode_dest)=="")?'Interne ':'Error'; - } - - $h_ag_id=new IHidden(); - // if concerns another action : show the link otherwise nothing - // - // sender - $w=new ICard(); - $w->readOnly=$readonly; - $w->jrn=0; - $w->name='qcode_dest'; - $w->value=($this->f_id_dest!=0)?$this->qcode_dest:""; - $w->label=""; - $list_recipient=$this->db->make_list('select fd_id from fiche_def where frd_id in (14,25,8,9,16)'); - $w->extra=$list_recipient; - $w->set_attribute('typecard', $list_recipient); - $w->set_dblclick("fill_ipopcard(this);"); - $w->set_attribute('ipopup', 'ipopcard'); - - // name of the field to update with the name of the card - $w->set_attribute('label', 'qcode_dest_label'); - // name of the field to update with the name of the card - $w->set_attribute('typecard', $w->extra); - $w->set_function('fill_data'); - $w->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', $w->name); - - $sp=new ISpan(); - $sp->name='qcode_dest_label'; - $sp->value=$qcode_dest_label; - - // autre - a refaire pour avoir plusieurs fiches - // Sur le modèle des tags - $ag_contact=new ICard(); - $ag_contact->readOnly=$readonly; - $ag_contact->jrn=0; - $ag_contact->name='ag_contact'; - $ag_contact->value=''; - $ag_contact->set_attribute('ipopup', 'ipopcard'); - - if ($this->ag_contact!=0) - { - $contact=new Fiche($this->db, $this->ag_contact); - $ag_contact->value=$contact->get_quick_code(); - } - - $ag_contact->label=""; - - $list_contact=$this->db->make_list('select fd_id from fiche_def where frd_id=16'); - $ag_contact->extra=$list_contact; - - $ag_contact->set_dblclick("fill_ipopcard(this);"); - // name of the field to update with the name of the card - $ag_contact->set_attribute('label', 'ag_contact_label'); - // name of the field to update with the name of the card - $ag_contact->set_attribute('typecard', $list_contact); - $ag_contact->set_function('fill_data'); - $ag_contact->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', $ag_contact->name); - - $spcontact=new ISpan(); - $spcontact->name='ag_contact_label'; - $spcontact->value=''; - $fiche_contact=new Fiche($this->db); - $fiche_contact->get_by_qcode($this->ag_contact); - if ($fiche_contact->id!=0) - { - $spcontact->value=$fiche_contact->strAttribut(ATTR_DEF_NAME); - } - - - $h_agrefid=new IHidden(); - $iag_ref=new IText("ag_ref"); - $iag_ref->value=$this->ag_ref; - $iag_ref->readOnly=($p_view=="NEW"||$p_view=='READ')?true:false; - $str_ag_ref=$iag_ref->input(); - // Preparing the return string - $r=""; - - /* for new files */ - $upload=new IFile(); - $upload->name="file_upload[]"; - $upload->readOnly=$readonly; - $upload->value=""; - $aAttachedFile=$this->db->get_array('select d_id,d_filename,d_description,d_mimetype,'. - '\'show_document.php?'. - Dossier::get().'&d_id=\'||d_id as link'. - ' from document where ag_id=$1', array($this->ag_id)); - /* create the select for document */ - $aDocMod=new ISelect(); - $aDocMod->name='doc_mod'; - $aDocMod->value=$this->db->make_array('select md_id,dt_value||\' : \'||md_name as md_name'. - ' from document_modele join document_type on (md_type=dt_id)'. - ' order by md_name'); - $str_select_doc=$aDocMod->input(); - /* if no document then do not show the generate button */ - if (empty($aDocMod->value)) - $str_submit_generate=""; - else - $str_submit_generate=HtmlInput::submit("generate", _("Génére le document")); - - $ag_id=$this->ag_id; - - /* fid = Icard */ - $icard=new ICard(); - $icard->jrn=0; - $icard->table=0; - $icard->extra2='QuickCode'; - $icard->noadd="no"; - $icard->extra='all'; - - /* Text desc */ - $text=new IText(); - $num=new INum(); - - /* TVA */ - $itva=new ITva_Popup($this->db); - $itva->in_table=true; - $aCard=array(); - /* create aArticle for the detail section */ - $article_count=(count($this->aAction_detail)==0)?MAX_ARTICLE:count($this->aAction_detail); - /* Compute total */ - $tot_item=0; - $tot_vat=0; - for ($i=0; $i<$article_count; $i++) - { - /* fid = Icard */ - $icard=new ICard(); - $icard->jrn=0; - $icard->table=0; - $icard->noadd="no"; - $icard->extra='all'; - $icard->name="e_march".$i; - $tmp_ad=(isset($this->aAction_detail[$i]))?$this->aAction_detail[$i]:false; - $icard->readOnly=$readonly; - $icard->value=''; - $aCard[$i]=0; - if ($tmp_ad) - { - $march=new Fiche($this->db); - $f=$tmp_ad->get_parameter('qcode'); - if ($f!=0) - { - $march->id=$f; - $icard->value=$march->get_quick_code(); - $aCard[$i]=$f; - } - } - $icard->set_dblclick("fill_ipopcard(this);"); - // name of the field to update with the name of the card - $icard->set_attribute('label', "e_march".$i."_label"); - // name of the field to update with the name of the card - $icard->set_attribute('typecard', $icard->extra); - $icard->set_attribute('ipopup', 'ipopcard'); - $icard->set_function('fill_data'); - $icard->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', $icard->name); - - $aArticle[$i]['fid']=$icard->search().$icard->input(); - - $text->javascript=' onchange="clean_tva('.$i.');compute_ledger('.$i.')"'; - $text->css_size="100%"; - $text->name="e_march".$i."_label"; - $text->id="e_march".$i."_label"; - $text->size=40; - $text->value=($tmp_ad)?$tmp_ad->get_parameter('text'):""; - $text->readOnly=$readonly; - $aArticle[$i]['desc']=$text->input(); - - $num->javascript=' onchange="format_number(this);clean_tva('.$i.');compute_ledger('.$i.')"'; - $num->name="e_march".$i."_price"; - $num->id="e_march".$i."_price"; - $num->size=8; - $num->readOnly=$readonly; - $num->value=($tmp_ad)?$tmp_ad->get_parameter('price_unit'):0; - $aArticle[$i]['pu']=$num->input(); - - $num->name="e_quant".$i; - $num->id="e_quant".$i; - $num->size=8; - $num->value=($tmp_ad)?$tmp_ad->get_parameter('quantity'):0; - $aArticle[$i]['quant']=$num->input(); - - $itva->name='e_march'.$i.'_tva_id'; - $itva->id='e_march'.$i.'_tva_id'; - $itva->value=($tmp_ad)?$tmp_ad->get_parameter('tva_id'):0; - $itva->readOnly=$readonly; - $itva->js=' onchange="format_number(this);clean_tva('.$i.');compute_ledger('.$i.')"'; - $itva->set_attribute('compute', $i); - - $aArticle[$i]['tvaid']=$itva->input(); - - $num->name="e_march".$i."_tva_amount"; - $num->id="e_march".$i."_tva_amount"; - $num->value=($tmp_ad)?$tmp_ad->get_parameter('tva_amount'):0; - $num->javascript=" onchange=\"compute_ledger('".$i." ')\""; - $num->size=8; - $aArticle[$i]['tva']=$num->input(); - $tot_vat=bcadd($tot_vat,$num->value); - - $num->name="tvac_march".$i; - $num->id="tvac_march".$i; - $num->value=($tmp_ad)?$tmp_ad->get_parameter('total'):0; - $num->size=8; - $aArticle[$i]['tvac']=$num->input(); - $tot_item=bcadd($tot_item,$num->value); - - $aArticle[$i]['hidden_htva']=HtmlInput::hidden('htva_march'.$i, 0); - $aArticle[$i]['hidden_tva']=HtmlInput::hidden('tva_march'.$i, 0); - $aArticle[$i]['ad_id']=($tmp_ad)?HtmlInput::hidden('ad_id'.$i, $tmp_ad->get_parameter('id')):HtmlInput::hidden('ad_id'.$i, 0); - } - - /* Add the needed hidden values */ - $r.=dossier::hidden(); - - /* add the number of item */ - $Hid=new IHidden(); - $r.=$Hid->input("nb_item", $article_count); - $r.=HtmlInput::request_to_hidden(array("closed_action", "remind_date_end", "remind_date", "sag_ref", "only_internal", "state", "qcode", "ag_dest_query", "action_query", "tdoc", "date_start", "date_end", "hsstate", "searchtag")); - $a_tag=$this->tag_get(); - $menu=new Default_Menu(); - /* get template */ - ob_start(); - require 'template/detail-action.php'; - $content=ob_get_contents(); - ob_end_clean(); - $r.=$content; - - //hidden - $r.="

    "; - $r.=$h2->input(); - $r.=$h_ag_id->input('ag_id', $this->ag_id); - $hidden2=new IHidden(); - $r.=$hidden2->input('f_id_dest', $this->f_id_dest); - $r.="

    "; - - return $r; - } - - //---------------------------------------------------------------------- - /* * \brief This function shows the detail of an action thanks the ag_id - */ - function get() - { - $sql="select ag_id,to_char (ag_timestamp,'DD.MM.YYYY') as ag_timestamp,". - " f_id_dest,ag_title,ag_ref,d_id,ag_type,ag_state, ag_owner, ". - " ag_dest, ag_hour, ag_priority, ag_contact,to_char (ag_remind_date,'DD.MM.YYYY') as ag_remind_date ". - " from action_gestion left join document using (ag_id) where ag_id=".$this->ag_id; - $r=$this->db->exec_sql($sql); - $row=Database::fetch_all($r); - if ($row==false) - { - $this->ag_id=0; - return; - } - $this->ag_timestamp=$row[0]['ag_timestamp']; - $this->ag_contact=$row[0]['ag_contact']; - $this->f_id_dest=$row[0]['f_id_dest']; - $this->ag_title=$row[0]['ag_title']; - $this->ag_type=$row[0]['ag_type']; - $this->ag_ref=$row[0]['ag_ref']; - $this->ag_state=$row[0]['ag_state']; - $this->d_id=$row[0]['d_id']; - $this->ag_dest=$row[0]['ag_dest']; - $this->ag_hour=$row[0]['ag_hour']; - $this->ag_priority=$row[0]['ag_priority']; - $this->ag_remind_date=$row[0]['ag_remind_date']; - $this->ag_owner=$row[0]['ag_owner']; - - $action_detail=new Follow_Up_Detail($this->db); - $action_detail->set_parameter('ag_id', $this->ag_id); - $this->aAction_detail=$action_detail->load_all(); - - - // if there is no document set 0 to d_id - if ($this->d_id=="") - $this->d_id=0; - // if there is a document fill the object - if ($this->d_id!=0) - { - $this->state=$row['0']['ag_state']; - $this->ag_state=$row[0]['ag_state']; - } - $this->dt_id=$this->ag_type; - $aexp=new Fiche($this->db, $this->f_id_dest); - $this->qcode_dest=$aexp->strAttribut(ATTR_DEF_QUICKCODE); - } - - /** - * \brief Save the document and propose to save the generated document or - * to upload one, the data are included except the file. Temporary the generated - * document is save. - * The files into $_FILES['file_upload'] will be saved - * @note the array $_POST['input_desc'] must be set, contains the description - * of the uploaded files - * - * \return - */ - function save() - { - - // Get The sequence id, - $seq_name="seq_doc_type_".$this->dt_id; - $str_file=""; - $add_file=''; - - // f_id exp - $exp=new Fiche($this->db); - $exp->get_by_qcode($this->qcode_dest); - $exp->id=($exp->id==0)?null:$exp->id; - - $contact=new Fiche($this->db); - $contact->get_by_qcode($this->ag_contact); - - if (trim($this->ag_title)=="") - { - $doc_mod=new document_type($this->db); - $doc_mod->dt_id=$this->dt_id; - $doc_mod->get(); - $this->ag_title=$doc_mod->dt_value; - } - $this->ag_id=$this->db->get_next_seq('action_gestion_ag_id_seq'); - - // Create the reference - $ag_ref=$this->db->get_value('select dt_prefix from document_type where dt_id=$1', array($this->dt_id)).'-'.$this->db->get_next_seq($seq_name); - $this->ag_ref=$ag_ref; - - // save into the database - if ($this->ag_remind_date!=null||$this->ag_remind_date!='') - { - $sql="insert into action_gestion". - "(ag_id,ag_timestamp,ag_type,ag_title,f_id_dest,ag_ref, ag_dest, ". - " ag_hour, ag_priority,ag_owner,ag_contact,ag_state,ag_remind_date) ". - " values ($1,to_date($2,'DD.MM.YYYY'),$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,to_date($13,'DD.MM.YYYY'))"; - } - else - { - $this->ag_remind_date=null; - $sql="insert into action_gestion". - "(ag_id,ag_timestamp,ag_type,ag_title,f_id_dest,ag_ref, ag_dest, ". - " ag_hour, ag_priority,ag_owner,ag_contact,ag_state,ag_remind_date) ". - " values ($1,to_date($2,'DD.MM.YYYY'),$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13)"; - } - $this->db->exec_sql($sql, array($this->ag_id, /* 1 */ - $this->ag_timestamp, /* 2 */ - $this->dt_id, /* 3 */ - $this->ag_title, /* 4 */ - $exp->id, /* 5 */ - $ag_ref, /* 6 */ - $this->ag_dest, /* 7 */ - $this->ag_hour, /* 8 */ - $this->ag_priority, /* 9 */ - $_SESSION['g_user'], /* 10 */ - $contact->id, /* 11 */ - $this->ag_state, /* 12 */ - $this->ag_remind_date /* 13 */ - ) - ); - - /* insert also the details */ - for ($i=0; $i<$_POST['nb_item']; $i++) - { - $act=new Follow_Up_Detail($this->db); - $act->from_array($_POST, $i); - if ($act->f_id==0) - continue; - $act->ag_id=$this->ag_id; - $act->save(); - } - - /* Upload the documents */ - $doc=new Document($this->db); - $doc->Upload($this->ag_id); - if (trim($this->ag_comment)!='') - { - $this->db->exec_sql("insert into action_gestion_comment (ag_id,tech_user,agc_comment) values ($1,$2,$3)" - , array($this->ag_id, $_SESSION['g_user'], $this->ag_comment)); - } - $this->insert_operation(); - $this->insert_action(); - } - - /** - * myList($p_base, $p_filter = "", $p_search = "") - * Show list of action by default if sorted on date - * @param $p_base base url with ac... - * @param $p_filter filters on the document_type - * @param $p_search must a valid sql command ( ex 'and ag_title like upper('%hjkh%')) - * @return string containing html code - */ - function myList($p_base, $p_filter="", $p_search="") - { - // for the sort - $url=HtmlInput::get_to_string(array("closed_action", "remind_date_end", "remind_date", "sag_ref", "only_internal", "state", "qcode", "ag_dest_query", "action_query", "tdoc", "date_start", "date_end", "hsstate", "searchtag")).'&'.$p_base; - - $table=new Sort_Table(); - $table->add('Date Doc.', $url, 'order by ag_timestamp asc', 'order by ag_timestamp desc', 'da', 'dd'); - $table->add('Date Comm.', $url, 'order by last_comment', 'order by last_comment desc', 'dca', 'dcd'); - $table->add('Date Limite', $url, 'order by ag_remind_date asc', 'order by ag_remind_date desc', 'ra', 'rd'); - $table->add('Tag', $url, 'order by tags asc', 'order by tags desc', 'taa', 'tad'); - $table->add('Réf.', $url, 'order by ag_ref asc', 'order by ag_ref desc', 'ra', 'rd'); - $table->add('Groupe', $url, "order by coalesce((select p_name from profile where p_id=ag_dest),'Aucun groupe')", "order by coalesce((select p_name from profile where p_id=ag_dest),'Aucun groupe') desc", 'dea', 'ded'); - $table->add('Dest/Exp', $url, 'order by name asc', 'order by name desc', 'ea', 'ed'); - $table->add('Titre', $url, 'order by ag_title asc', 'order by ag_title desc', 'ta', 'td'); - - $ord=(!isset($_GET['ord']))?"dcd":$_GET['ord']; - $sort=$table->get_sql_order($ord); - - if (strlen(trim($p_filter))!=0) - $p_filter_doc=" dt_id in ( $p_filter )"; - else - $p_filter_doc=" 1=1 "; - - $sql=" - select ag_id,to_char(ag_timestamp,'DD.MM.YYYY') as my_date, - to_char(ag_remind_date,'DD.MM.YYYY') as my_remind, - to_char(coalesce((select max(agc_date) from action_gestion_comment as agc where agc.ag_id=ag.ag_id),ag_timestamp),'DD.MM.YY') as str_last_comment, - coalesce((select max(agc_date) from action_gestion_comment as agc where agc.ag_id=ag.ag_id),ag_timestamp) as last_comment, - f_id_dest, - s_value, - ag_title,dt_value,ag_ref, ag_priority,ag_state, - coalesce((select p_name from profile where p_id=ag_dest),'Aucun groupe') as dest, - (select ad_value from fiche_Detail where f_id=ag.f_id_dest and ad_id=1) as name, - array_to_string((select array_agg(t1.t_tag) from action_tags as a1 join tags as t1 on (a1.t_id=t1.t_id) where a1.ag_id=ag.ag_id ),',') as tags - from action_gestion as ag - join document_type on (ag_type=dt_id) - join document_state on (ag_state=s_id) - where $p_filter_doc $p_search $sort"; - $max_line=$this->db->count_sql($sql); - $step=$_SESSION['g_pagesize']; - $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?Database::escape_string($_GET['offset']):0; - if ($step!=-1) - $limit=" LIMIT $step OFFSET $offset "; - else - $limit=''; - $bar=navigation_bar($offset, $max_line, $step, $page); - - $Res=$this->db->exec_sql($sql.$limit); - $a_row=Database::fetch_all($Res); - - $r=""; - $r.='

    '.$bar.'

    '; - $r.=''; - $r.=""; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=''; - $r.=th('Priorité'); - $r.=""; - - - // if there are no records return a message - if (sizeof($a_row)==0 or $a_row==false) - { - $r='
    '; - $r.='
    Aucun enregistrement trouvé'; - $r.="
    "; - return $r; - } - $today=date('d.m.Y'); - $i=0; - $checkbox=new ICheckBox("mag_id[]"); - //show the sub_action - foreach ($a_row as $row) - { - $href=''; - $i++; - $tr=($i%2==0)?'even':'odd'; - if ($row['ag_priority']<2) - $tr='priority1'; - $st=''; - if ($row['my_date']==$today) - $st=' style="font-weight:bold; border:2px solid orange;"'; - $date_remind=format_date($row['my_remind'], 'DD.MM.YYYY', 'YYYYMMDD'); - $date_today=date('Ymd'); - if ($date_remind!=""&&$date_remind==$date_today&&$row['ag_state']!=1&&$row['ag_state']!=3) - $st=' style="font-weight:bold;background:orange"'; - if ($date_remind!=""&&$date_remind<$date_today&&$row['ag_state']!=1&&$row['ag_state']!=3) - $st=' style="font-weight:bold;background:#FF0000;color:white;"'; - $r.=""; - $checkbox->value=$row['ag_id']; - $r.=''; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - $r.=""; - - // Expediteur - $fexp=new Fiche($this->db); - $fexp->id=$row['f_id_dest']; - $qcode_dest=$fexp->strAttribut(ATTR_DEF_QUICKCODE); - - $qexp=($qcode_dest==NOTFOUND)?"Interne":$qcode_dest; - $jsexp=sprintf("javascript:showfiche('%s')", $qexp); - if ($qexp!='Interne') - { - $r.="'; - } - else - $r.=""; - - $ref=""; - - - $r.='"; - - /* - * State - */ - switch ($row['ag_priority']) - { - case 1: - $priority='Haute'; - break; - case 2: - $priority="Moyenne"; - break; - case 3: - $priority="Important"; - break; - } - $r.=td($priority); - - $r.=""; - $r.=""; - } - - $r.="
    '.ICheckBox::toggle_checkbox('ag', 'list_ag_frm').''.$table->get_header(0).''.$table->get_header(1).''.$table->get_header(2).''.$table->get_header(3).''.$table->get_header(4).''.$table->get_header(5).''.$table->get_header(6).''.$table->get_header(7).'
    '.$checkbox->input().'".$href.smaller_date($row['my_date']).''."".$href.$row['str_last_comment'].''."".$href.smaller_date($row['my_remind']).''."".$href.h($row['tags']).''."".$href.$row['ag_ref'].''."".$href.h($row['dest']).''."$href".$qexp." : ".$fexp->getName().'$href Interne '.$href. - h($row['ag_title'])."".$ref."
    "; - - $r.='

    '.$bar.'

    '; - return $r; - } - - //---------------------------------------------------------------------- - /* * \brief Update the data into the database - * - * \return true on success otherwise false - */ - function Update() - { - - // if ag_id == 0 nothing to do - if ($this->ag_id==0) - return; - // retrieve customer - // f_id - - if (trim($this->qcode_dest)=="") - { - // internal document - $this->f_id_dest=null; // internal document - } - else - { - $tiers=new Fiche($this->db); - if ($tiers->get_by_qcode($this->qcode_dest)==-1) // Error we cannot retrieve this qcode - return false; - else - $this->f_id_dest=$tiers->id; - } - $contact=new Fiche($this->db); - if ($contact->get_by_qcode($this->ag_contact)==-1) - $contact->id=0; - - // reload the old one - $old=new Follow_Up($this->db); - $old->ag_id=$this->ag_id; - $old->get(); - - // If ag_ref changed then check if unique - if ($old->ag_ref!=$this->ag_ref) - { - $nAg_ref=$this->db->get_value("select count(*) from action_gestion where ag_ref=$1", array($this->ag_ref)); - if ($nAg_ref!=0) - { - echo h2("Référence en double, référence non sauvée", 'class="error"'); - $this->ag_ref=$old->ag_ref; - } - } - - - if ($this->ag_remind_date!=null) - { - $this->db->exec_sql("update action_gestion set ". - " ag_timestamp=to_date($1,'DD.MM.YYYY'),". - " ag_title=$2,". - " ag_type=$3, ". - " f_id_dest=$4, ". - "ag_state=$5,". - " ag_hour = $7 ,". - " ag_priority = $8 ,". - " ag_dest = $9 , ". - " ag_contact = $10, ". - " ag_ref = $11, ". - " ag_remind_date=to_date($12,'DD.MM.YYYY') ". - " where ag_id = $6", array( - $this->ag_timestamp, /* 1 */ - $this->ag_title, /* 2 */ - $this->dt_id, /* 3 */ - $this->f_id_dest, /* 4 */ - $this->ag_state, /* 5 */ - $this->ag_id, /* 6 */ - $this->ag_hour, /* 7 */ - $this->ag_priority, /* 8 */ - $this->ag_dest, /* 9 */ - $contact->id, /* 10 */ - $this->ag_ref, /* 11 */ - $this->ag_remind_date /* 12 */ - )); - } - else - { - $this->db->exec_sql("update action_gestion set ". - " ag_timestamp=to_date($1,'DD.MM.YYYY'),". - " ag_title=$2,". - " ag_type=$3, ". - " f_id_dest=$4, ". - "ag_state=$5,". - " ag_hour = $7 ,". - " ag_priority = $8 ,". - " ag_dest = $9 , ". - " ag_contact = $10, ". - " ag_ref = $11, ". - " ag_remind_date=null ". - " where ag_id = $6", array( - $this->ag_timestamp, /* 1 */ - $this->ag_title, /* 2 */ - $this->dt_id, /* 3 */ - $this->f_id_dest, /* 4 */ - $this->ag_state, /* 5 */ - $this->ag_id, /* 6 */ - $this->ag_hour, /* 7 */ - $this->ag_priority, /* 8 */ - $this->ag_dest, /* 9 */ - $contact->id, /* 10 */ - $this->ag_ref /* 11 */ - )); - } - // Upload documents - $doc=new Document($this->db); - $doc->Upload($this->ag_id); - - /* save action details */ - for ($i=0; $i<$_POST['nb_item']; $i++) - { - $act=new Follow_Up_Detail($this->db); - $act->from_array($_POST, $i); - if ($act->f_id==0&&$act->ad_id!=0) - $act->delete(); - if ($act->f_id==0) - continue; - $act->save(); - } - if (trim($this->ag_comment)!='') - { - $this->db->exec_sql("insert into action_gestion_comment (ag_id,tech_user,agc_comment) values ($1,$2,$3)" - , array($this->ag_id, $_SESSION['g_user'], $this->ag_comment)); - } - $this->insert_operation(); - $this->insert_action(); - return true; - } - - /** - * \brief generate the document and add it to the action - * \param md_id is the id of the document_modele - * \param $p_array contains normally the $_POST - */ - function generate_document($md_id, $p_array) - { - $doc=new Document($this->db); - $mod=new Document_Modele($this->db, $md_id); - $mod->load(); - $doc->f_id=$this->f_id_dest; - $doc->md_id=$md_id; - $doc->ag_id=$this->ag_id; - $doc->Generate($p_array); - } - - /** - * \brief put an array in the variable member, the indice - * is the member name - * \param $p_array to parse - * - ag_id id of the Follow_up - * - ag_ref reference of the action - * - qcode_dest quick_code of the card of dest - * - f_id_dest f_id of the card of dest - * - dt_id Document_Modele::dt_id - * - ag_state document_state::s_id (default:2) - * - ag_title title of the action - * - ag_hour - * - ag_dest Profile, profile of the user - * - ag_comment comment - * - ag_remind_date Remind Date - * - operation related operation - * - action related action - * - op deprecated - * \return nothing - */ - function fromArray($p_array) - { - global $g_user; - $this->ag_id=(isset($p_array['ag_id']))?$p_array['ag_id']:0; - $this->ag_ref=(isset($p_array['ag_ref']))?$p_array['ag_ref']:""; - $this->qcode_dest=(isset($p_array['qcode_dest']))?$p_array['qcode_dest']:""; - $this->f_id_dest=(isset($p_array['f_id_dest']))?$p_array['f_id_dest']:null; - $this->ag_timestamp=(isset($p_array['ag_timestamp']))?$p_array['ag_timestamp']:date('d.m.Y'); - $this->qcode_dest=(isset($p_array['qcode_dest']))?$p_array['qcode_dest']:""; - $this->dt_id=(isset($p_array['dt_id']))?$p_array['dt_id']:""; - $this->ag_state=(isset($p_array['ag_state']))?$p_array['ag_state']:2; - $this->ag_ref=(isset($p_array['ag_ref']))?$p_array['ag_ref']:""; - $this->ag_title=(isset($p_array['ag_title']))?$p_array['ag_title']:""; - $this->ag_hour=(isset($p_array['ag_hour']))?$p_array['ag_hour']:""; - $this->ag_dest=(isset($p_array['ag_dest']))?$p_array['ag_dest']:$g_user->get_profile(); - $this->ag_priority=(isset($p_array['ag_priority']))?$p_array['ag_priority']:2; - $this->ag_contact=(isset($p_array['ag_contact']))?$p_array['ag_contact']:""; - $this->ag_comment=(isset($p_array['ag_comment']))?$p_array['ag_comment']:""; - $this->ag_remind_date=(isset($p_array['ag_remind_date']))?$p_array['ag_remind_date']:null; - $this->operation=(isset($p_array['operation']))?$p_array['operation']:null; - /** - * @todo - * deprecated : to remove - $this->op = (isset($p_array['op'])) ? $p_array['op'] : null; - */ - $this->action=(isset($p_array['action']))?$p_array['action']:null; - } - - /** - * \brief remove the action - * - */ - function remove() - { - $this->get(); - // remove the key - $sql="delete from action_gestion where ag_id=$1"; - $this->db->exec_sql($sql, array($this->ag_id)); - - /* check the number of attached document */ - $doc=new Document($this->db); - $aDoc=$doc->get_all($this->ag_id); - if (!empty($aDoc)) - { - // if there are documents - for ($i=0; $iremove(); - } - } - } - - /** - * \brief return the last p_limit operation into an array, there is a security - * on user - * \param $p_limit is the max of operation to return - * \return $p_array of Follow_Up object - */ - function get_last($p_limit) - { - - $sql="select coalesce(vw_name,'Interne') as vw_name,quick_code,ag_id,ag_title,ag_ref, dt_value,to_char(ag_timestamp,'DD.MM.YYYY') as ag_timestamp_fmt,ag_timestamp ". - " from action_gestion join document_type ". - " on (ag_type=dt_id) " - . "left join vw_fiche_attr on (f_id=f_id_dest) " - . "where ag_state in (2,3) " - . "and ".self::sql_security_filter($this->db,'R'). - "order by ag_timestamp desc limit $p_limit"; - $array=$this->db->get_array($sql); - return $array; - } - - /** - * get the action where the remind day is today - * @return array - */ - function get_today() - { - $sql="select ag_ref,coalesce(vw_name,'Interne') as vw_name,ag_id,ag_title,ag_ref, dt_value,to_char(ag_remind_date,'DD.MM.YYYY') as ag_timestamp_fmt,ag_timestamp ". - " from action_gestion join document_type ". - " on (ag_type=dt_id) - left join vw_fiche_attr on (f_id=f_id_dest) - where - ag_state not in (1,4) - and to_char(ag_remind_date,'DDMMYYYY')=to_char(now(),'DDMMYYYY') - and ". self::sql_security_filter($this->db,'R'); - $array=$this->db->get_array($sql); - return $array; - } - - /** - * get the action where the remind day is today - * @return array - */ - function get_late() - { - $sql="select ag_ref,coalesce(vw_name,'Interne') as vw_name,ag_id,ag_title,ag_ref, dt_value,to_char(ag_remind_date,'DD.MM.YYYY') as ag_timestamp_fmt,ag_timestamp ". - " from action_gestion join document_type ". - " on (ag_type=dt_id) left join vw_fiche_attr on (f_id=f_id_dest) where ag_state not in (1,4) - and ag_remind_date < now() and ".self::sql_security_filter($this->db,'R'); - $array=$this->db->get_array($sql); - return $array; - } - - /** - * insert a related operation - */ - function insert_operation() - { - if (trim($this->operation)=='') - return; - $array=explode(",", $this->operation); - for ($i=0; $idb->get_value("select count(*) from action_gestion_operation - where ag_id=$1 and jr_id=$2", array($this->ag_id, $array[$i]))==0) - { - $this->db->exec_sql("insert into action_gestion_operation (ag_id,jr_id) values ($1,$2)", array($this->ag_id, $array[$i])); - } - } - } - - /** - * remove a related operation - * @deprecated not used : dead_code - * @todo to remove - */ - function remove_operation_deprecated() - { - if ($this->op==null) - return; - $op=$this->op; - for ($i=0; $idb->exec_sql("delete from action_gestion_operation where ago_id=$1", array($op[$i])); - } - } - - /** - * Display only a search box for searching an action - * @param $cn database connx - */ - static function display_search($cn, $inner=false) - { - $a=(isset($_GET['action_query']))?$_GET['action_query']:""; - $qcode=(isset($_GET['qcode']))?$_GET['qcode']:""; - - $supl_hidden=''; - if (isset($_REQUEST['sc'])) - $supl_hidden.=HtmlInput::hidden('sc', $_REQUEST['sc']); - if (isset($_REQUEST['f_id'])) - { - $supl_hidden.=HtmlInput::hidden('f_id', $_REQUEST['f_id']); - $f=new Fiche($cn, $_REQUEST['f_id']); - $supl_hidden.=HtmlInput::hidden('qcode_dest', $f->get_quick_code()); - } - if (isset($_REQUEST['sb'])) - $supl_hidden.=HtmlInput::hidden('sb', $_REQUEST['sb']); - $supl_hidden.=HtmlInput::hidden('ac', $_REQUEST['ac']); - - /** - * Show the default button (add action, show search...) - */ - if (!$inner) - require_once NOALYSS_INCLUDE.'/template/action_button.php'; - - $w=new ICard(); - $w->name='qcode'; - $w->id=$w->generate_id($w->name); - $w->value=$qcode; - $w->extra="all"; - $w->typecard='all'; - $w->jrn=0; - $w->table=0; - $list=$cn->make_list("select fd_id from fiche_def where frd_id in (4,8,9,14,15,16,25)"); - $w->extra=$list; - - - /* type of documents */ - $type_doc=new ISelect('tdoc'); - $aTDoc=$cn->make_array('select dt_id,dt_value from document_type order by dt_value'); - $aTDoc[]=array('value'=>'-1', 'label'=>_('Tous les types')); - $type_doc->value=$aTDoc; - $type_doc->selected=(isset($_GET['tdoc']))?$_GET['tdoc']:-1; - - /* State of documents */ - $type_state=new ISelect('state'); - $aState=$cn->make_array('select s_id,s_value from document_state order by s_value'); - $aState[]=array('value'=>'-1', 'label'=>_('Tous les Etats')); - $type_state->value=$aState; - $type_state->selected=(isset($_GET['state']))?$_GET['state']:-1; - - - - /* Except State of documents */ - $hsExcptype_state=new ISelect('hsstate'); - $aExcpState=$cn->make_array('select s_id,s_value from document_state order by s_value'); - $aExcpState[]=array('value'=>'-1', 'label'=>_('Aucun')); - $hsExcptype_state->value=$aExcpState; - $hsExcptype_state->selected=(isset($_GET['hsstate']))?$_GET['hsstate']:-1; - - - // date - $start=new IDate('date_start'); - $start->value=(isset($_GET['date_start']))?$_GET['date_start']:""; - $end=new IDate('date_end'); - $end->value=(isset($_GET['date_end']))?$_GET['date_end']:""; - - // Closed action - $closed_action=new ICheckBox('closed_action'); - $closed_action->selected=(isset($_GET['closed_action']))?true:false; - - // Internal - $only_internal=new ICheckBox('only_internal'); - $only_internal->selected=(isset($_GET['only_internal']))?true:false; - // select profile - $aAg_dest=$cn->make_array("select p_id as value, ". - "p_name as label ". - " from profile order by 2"); - $aAg_dest[]=array('value'=>'-2', 'label'=>_('Tous les profiles')); - $ag_dest=new ISelect(); - $ag_dest->name="ag_dest_query"; - $ag_dest->value=$aAg_dest; - $ag_dest->selected=(isset($_GET["ag_dest_query"]))?$_GET["ag_dest_query"]:-2; - $str_ag_dest=$ag_dest->input(); - $osag_ref=new IText("sag_ref"); - $osag_ref->value=(isset($_GET['sag_ref']))?$_GET['sag_ref']:""; - $remind_date=new IDate('remind_date'); - $remind_date->value=(isset($_GET['remind_date']))?$_GET['remind_date']:""; - $remind_date_end=new IDate('remind_date_end'); - $remind_date_end->value=(isset($_GET['remind_date_end']))?$_GET['remind_date_end']:""; - $otag=new Tag($cn); - - // show the action in - require_once NOALYSS_INCLUDE.'/template/action_search.php'; - } - - /** - * @brief show a list of documents - * @param $cn database connextion - * @param $p_base base URL - */ - static function show_action_list($cn, $p_base) - { - - Follow_Up::display_search($cn); - - $act=new Follow_Up($cn); - /** \brief - * \note The field 'recherche' is about a part of the title or a ref. number - */ - $query=Follow_Up::create_query($cn); - - echo '
    '; - echo HtmlInput::request_to_hidden(array("gDossier", "ac", "sb", "sc", "f_id")); - require_once NOALYSS_INCLUDE.'/template/action_other_action.php'; - echo $act->myList($p_base, "", $query); - echo '
    '; - } - - /** - * Create a subquery to filter thanks the selected tag - * @param $cn db connx - * @param $p_array - * @return SQL - */ - static function filter_by_tag($cn, $p_array=null) - { - if ($p_array==null) - $p_array=$_GET; - - extract($p_array); - $query=""; - if (count($searchtag)==0) - return ""; - for ($i=0; $iget_by_qcode($_REQUEST['qcode']); - // if quick code not found then nothing - if ($fiche->id==0) - $str=' and false '; - else - $str=" and (f_id_dest= ".$fiche->id." or ag_id in (select ag_id from action_person as ap where ap.f_id=".$fiche->id.") )"; - } - } - if (isset($tdoc)&&$tdoc!=-1) - { - $action_query .= ' and dt_id = '.sql_string($tdoc); - } - if (isset($state)&&$state!=-1) - { - $action_query .= ' and ag_state= '.sql_string($state); - } - if (isset($hsstate)&&$hsstate!=-1) - { - $action_query .= ' and ag_state <> '.sql_string($hsstate); - } - if (isset($sag_ref)&&trim($sag_ref)!="") - { - $query .= ' and ag_ref= \''.sql_string($sag_ref)."'"; - } - - if (isset($_GET['only_internal'])) - $action_query .= ' and f_id_dest=0 '; - - if (isset($date_start)&&isDate($date_start)!=null) - { - $action_query.=" and ag_timestamp >= to_date('$date_start','DD.MM.YYYY')"; - } - if (isset($date_end)&&isDate($date_end)!=null) - { - $action_query.=" and ag_timestamp <= to_date('$date_end','DD.MM.YYYY')"; - } - if (isset($ag_dest_query)&&$ag_dest_query!=-2) - { - $action_query.= " and ((ag_dest = ".sql_string($ag_dest_query)." and ".self::sql_security_filter($cn, "R").") or ". - "(ag_dest = ".sql_string($ag_dest_query)." and ".self::sql_security_filter($cn, "R")." and ". - " ag_owner='".$_SESSION['g_user']."'))"; - } - else - { - $action_query .=" and (ag_owner='".$_SESSION['g_user']."' or ".self::sql_security_filter($cn, "R")." or ag_dest=-1 )"; - } - - - if (isNumber($ag_id)==1&&$ag_id!=0) - { - $action_query=" and ag_id= ".sql_string($ag_id); - } - if (isset($remind_date)&&$remind_date!=""&&isDate($remind_date)==$remind_date) - { - $action_query .= " and to_date('".sql_string($remind_date)."','DD.MM.YYYY')<= ag_remind_date"; - } - if (isset($remind_date_end)&&$remind_date_end!=""&&isDate($remind_date_end)==$remind_date_end) - { - $action_query .= " and to_date('".sql_string($remind_date_end)."','DD.MM.YYYY')>= ag_remind_date"; - } - if (!isset($closed_action)) - { - $action_query.=" and s_status is null "; - } - if (isset($searchtag)) - { - $action_query .= Follow_Up::filter_by_tag($cn, $p_array); - } - return $action_query.$str; - } - - /** - * Show the result of a search in an inner windows, the result is limited to 25 - * @param type $cn database connx - * @param type $p_sql the query - */ - static function short_list($cn, $p_sql) - { - $sql=" - select ag_id,to_char(ag_timestamp,'DD.MM.YY') as my_date, - f_id_dest, - substr(ag_title,1,40) as sub_ag_title,dt_value,ag_ref, ag_priority,ag_state, - coalesce((select p_name from profile where p_id=ag_dest),'Aucun groupe') as dest, - (select ad_value from fiche_Detail where f_id=action_gestion.f_id_dest and ad_id=1) as name - from action_gestion - join document_type on (ag_type=dt_id) - join document_state on (s_id=ag_state) - where $p_sql"; - $max_line=$cn->count_sql($sql); - - $limit=($max_line>25)?25:$max_line; - $Res=$cn->exec_sql($sql."limit ".$limit); - $a_row=Database::fetch_all($Res); - require_once NOALYSS_INCLUDE.'/template/action_search_result.php'; - } - - /** - * Insert a related action into the table action_gestion_related - */ - function insert_action() - { - if (trim($this->action)=='') - return; - $array=explode(",", $this->action); - for ($i=0; $idb->get_value("select count(*) from action_gestion_related - where (aga_least=$1 and aga_greatest=$2) or (aga_greatest=$1 and aga_least=$2)", array($array[$i], $this->ag_id))==0&&$this->ag_id!=$array[$i]) - { - $this->db->exec_sql("insert into action_gestion_related(aga_least,aga_greatest) values ($1,$2)", array($this->ag_id, $array[$i])); - } - } - } - - /** - * export to CSV the query the p_array has - * @param array $p_array - */ - function export_csv($p_array) - { - extract($p_array); - - - $p_search=self::create_query($this->db, $p_array); - $sql=" - select ag_id, - to_char(ag_timestamp,'DD.MM.YYYY') as my_date, - to_char(ag_remind_date,'DD.MM.YYYY') as my_remind, - to_char(coalesce((select max(agc_date) from action_gestion_comment as agc where agc.ag_id=ag_id),ag_timestamp),'DD.MM.YY') as last_comment, - array_to_string((select array_agg(t1.t_tag) from action_tags as a1 join tags as t1 on (a1.t_id=t1.t_id) where a1.ag_id=ag.ag_id ),',') as tags, - (select ad_value from fiche_Detail where f_id=ag.f_id_dest and ad_id=1) as name, - ag_title, - dt_value, - ag_ref, - ag_priority, - ag_state, - - coalesce((select p_name from profile where p_id=ag_dest),'Aucun groupe') as dest - from action_gestion as ag - join document_type on (ag.ag_type=dt_id) - join document_state on(ag.ag_state=s_id) - where true $p_search order by ag.ag_timestamp,ag.ag_id"; - $ret=$this->db->exec_sql($sql); - - if (Database::num_row($ret)==0) - return; - $this->db->query_to_csv($ret, array( - array("title"=>"doc id", "type"=>"string"), - array("title"=>"date", "type"=>"date"), - array("title"=>"rappel", "type"=>"date"), - array("title"=>"date dernier commentaire", "type"=>"date"), - array("title"=>"tags", "type"=>"string"), - array("title"=>"nom", "type"=>"string"), - array("title"=>"titre", "type"=>"string"), - array("title"=>"type document", "type"=>"string"), - array("title"=>"ref", "type"=>"string"), - array("title"=>"priorite", "type"=>"string"), - array("title"=>"etat", "type"=>"string"), - array("title"=>"profil", "type"=>"string") - ) - ); - } - - static function get_all_operation($p_jr_id) - { - global $cn; - $array=$cn->get_array(" - select ag_id,ag_ref,ago_id, - ag_title - from action_gestion - join action_gestion_operation using(ag_id) - where - jr_id=$1", array($p_jr_id)); - return $array; - } - - /** - * @brief get the tags of the current objet - * @return an array idx [ag_id,t_id,at_id,t_tag] - */ - function tag_get() - { - if ($this->ag_id==0) - return; - $sql='select b.ag_id,b.t_id,b.at_id,a.t_tag' - .' from ' - .' tags as a join action_tags as b on (a.t_id=b.t_id)' - .' where ag_id=$1 ' - .' order by a.t_tag'; - $array=$this->db->get_array($sql, array($this->ag_id)); - return $array; - } - - /** - * @brief show the tags of the current objet - * normally used by ajax. The same tag cannot be added twice - * - */ - function tag_add($p_t_id) - { - if ($this->ag_id==0) - return; - $count=$this->db->get_value('select count(*) from action_tags'. - ' where ag_id=$1 and t_id=$2', array($this->ag_id, $p_t_id)); - if ($count>0) - return; - $sql=' insert into action_tags (ag_id,t_id) values ($1,$2)'; - $this->db->exec_sql($sql, array($this->ag_id, $p_t_id)); - } - - /** - * @brief remove the tags of the current objet - * normally used by ajax - */ - function tag_remove($p_t_id) - { - if ($this->ag_id==0) - return; - $sql=' delete from action_tags where ag_id=$1 and t_id=$2'; - $this->db->exec_sql($sql, array($this->ag_id, $p_t_id)); - } - - /** - * @brief show the cell content in Display for the tags - * called also by ajax - */ - function tag_cell() - { - global $g_user; - $a_tag=$this->tag_get(); - $c=count($a_tag); - for ($e=0; $e<$c; $e++) - { - echo ''; - echo $a_tag[$e]['t_tag']; - if ($g_user->can_write_action($this->ag_id)==true) - { - $js_remove=sprintf("onclick=\"action_tag_remove('%s','%s','%s')\"", dossier::id(), $this->ag_id, $a_tag[$e]['t_id']); - echo HtmlInput::anchor(SMALLX, "javascript:void(0)", $js_remove, ' class="smallbutton" style="padding:0px;display:inline" '); - } - echo ''; - echo ' '; - echo ' '; - } - $js=sprintf("onclick=\"action_tag_select('%s','%s')\"", dossier::id(), $this->ag_id); - if ($g_user->can_write_action($this->ag_id)==true) - { - echo HtmlInput::button('tag_bt', 'Ajout tag', $js, 'smallbutton'); - } - } - - static function action_tag_remove($cn, $p_array) - { - global $g_user; - $mag_id=$p_array['mag_id']; - $remtag=$p_array['remtag']; - for ($i=0; $ican_write_action($mag_id[$i])==false) - continue; - for ($e=0; $etag_remove($remtag[$e]); - } - } - } - - static function action_tag_add($cn, $p_array) - { - global $g_user; - $mag_id=$p_array['mag_id']; - $addtag=$p_array['addtag']; - for ($i=0; $ican_write_action($mag_id[$i])==false) - continue; - for ($e=0; $etag_add($addtag[$e]); - } - } - } - - static function action_tag_clear($cn, $p_array) - { - global $g_user; - $mag_id=$p_array['mag_id']; - for ($i=0; $ican_write_action($mag_id[$i])==false) - continue; - $a=new Follow_Up($cn, $mag_id[$i]); - $a->tag_clear(); - } - } - - static function action_print($cn, $p_array) - { - global $g_user; - $mag_id=$p_array['mag_id']; - for ($i=0; $ican_read_action($mag_id[$i])==false) - continue; - $a=new Follow_Up($cn, $mag_id[$i]); - $a->get(); - echo '
    '; - echo $a->Display("READ", false, ""); - echo '
    '; - echo '

    - -

    '; - } - } - - function tag_clear() - { - $this->db->exec_sql('delete from action_tags where ag_id=$1', array($this->ag_id)); - } - - static function action_set_state($cn, $p_array) - { - - global $g_user; - $mag_id=$p_array['mag_id']; - $state=$p_array['ag_state']; - for ($i=0; $ican_write_action($mag_id[$i])==false) - continue; - $cn->exec_sql('update action_gestion set ag_state=$1 where ag_id=$2', array($state, $mag_id[$i])); - } - } - - static function action_remove($cn, $p_array) - { - global $g_user; - - $mag_id=$p_array['mag_id']; - for ($i=0; $ican_write_action($mag_id[$i])==false) - continue; - $cn->exec_sql('delete from action_gestion where ag_id=$1', array($mag_id[$i])); - } - } - - /** - * Verify that data are correct - * @throws Exception - */ - function verify() - { - if ($this->dt_id==-1) - { - throw new Exception(_('Type action invalide'), 10); - } - if (isDate($this->ag_timestamp)!=$this->ag_timestamp) - throw new Exception(_('Date invalide'), 20); - if (isDate($this->ag_remind_date)!=$this->ag_remind_date) - throw new Exception(_('Date invalide'), 30); - if ($this->f_id_dest==0) - $this->f_id_dest=null; - } - - /** - * Add another concerned (tiers, supplier...) - * @global type $g_user - * @param type $p_fiche_id - */ - function insert_linked_card($p_fiche_id) - { - global $g_user; - if ($g_user->can_write_action($this->ag_id)) - { - /** - * insert into action_person - */ - $count=$this->db->get_value('select count(*) from action_person where f_id=$1 and ag_id=$2', array($p_fiche_id, $this->ag_id)); - if ($count==0) - { - $this->db->exec_sql('insert into action_person (ag_id,f_id) values ($1,$2)', array($this->ag_id, $p_fiche_id)); - } - } - } - - /** - * Remove another concerned (tiers, supplier...) - * @global type $g_user - * @param type $p_fiche_id - */ - function remove_linked_card($p_fiche_id) - { - global $g_user; - if ($g_user->can_write_action($this->ag_id)) - { - $this->db->exec_sql('delete from action_person where ag_id = $1 and f_id = $2', array($this->ag_id, $p_fiche_id)); - } - } - - /** - * Display the other concerned (tiers, supplier...) - * @return string - */ - function display_linked() - { - $a_linked=$this->db->get_array('select ap_id,f_id from action_person where ag_id=$1', array($this->ag_id)); - if (count($a_linked)==0) - return ""; - for ($i=0; $idb, $a_linked[$i]['f_id']); - $qc=$fiche->get_quick_code(); - $js_remove=sprintf("onclick=\"action_remove_concerned('%s','%s','%s')\"", dossier::id(), $a_linked[$i]['f_id'], $this->ag_id); - echo ''; - echo $qc; - echo HtmlInput::anchor(SMALLX, "javascript:void(0)", $js_remove, ' class="smallbutton" style="padding:0px;display:inline" '); - echo ''; - echo ' '; - echo ' '; - } - } - /** - * @brief display a small form to enter a new event - * - */ - function display_short() - { - $cn=$this->db; - include 'template/action_display_short.php'; - } - /** - * Add an event , with the minimum of informations, - * used in Dashboard and Scheduler - */ - function save_short() - { - global $g_user; - // check if we can add - if ($g_user->can_add_action($this->ag_dest) == FALSE ) - { - throw new Exception(_('SECURITE : Ajout impossible')); - } - - - - // Get The sequence id, - $seq_name="seq_doc_type_".$this->dt_id; - $str_file=""; - $add_file=''; - - - $this->ag_id=$this->db->get_next_seq('action_gestion_ag_id_seq'); - - // Create the reference - $ag_ref=$this->db->get_value('select dt_prefix from document_type ' - . 'where dt_id=$1', array($this->dt_id)) - .'-'.$this->db->get_next_seq($seq_name); - - $this->ag_ref=$ag_ref; - /** - * If ag_ref already exist then compute a new one - */ - - // save into the database - $sql="insert into action_gestion". - "(ag_id,ag_timestamp,ag_type,ag_title,f_id_dest,ag_ref, " - . "ag_dest, ". - " ag_priority,ag_owner,ag_state,ag_remind_date) ". - " values " - . "($1,to_date($2,'DD.MM.YYYY'),$3,$4,$5,$6," - . "$7," - . "$8,$9,$10,to_date($11,'DD.MM.YYYY'))"; - - $this->db->exec_sql($sql, array( - $this->ag_id, /* 1 */ - $this->ag_timestamp, /* 2 */ - $this->dt_id, /* 3 */ - $this->ag_title, /* 4 */ - $this->f_id_dest, /* 5 */ - $ag_ref, /* 6 */ - $this->ag_dest, /* 7 */ - $this->ag_priority, /* 8 */ - $_SESSION['g_user'], /* 9 */ - $this->ag_state, /* 10 */ - $this->ag_remind_date /* 11 */ - ) - ); - - if (trim($this->ag_comment)!='') - { - $this->db->exec_sql("insert into action_gestion_comment (ag_id,tech_user,agc_comment) values ($1,$2,$3)" - , array($this->ag_id, $_SESSION['g_user'], $this->ag_comment)); - } - } -} diff --git a/sources/include/class_follow_up_detail.php b/sources/include/class_follow_up_detail.php deleted file mode 100644 index 35365b9..0000000 --- a/sources/include/class_follow_up_detail.php +++ /dev/null @@ -1,248 +0,0 @@ -"ad_id", primary key - * - "qcode"=>"f_id", quick_code - * - "text"=>"ad_text", description lines - * - "price_unit"=>"ad_pu", price by unit - * - "quantity"=>"ad_quant", quantity - * - "tva_id"=>"ad_tva_id", tva_od - * - "tva_amount"=>"ad_tva_amount", vat amount - * - "total"=>"ad_total_amount", total amount including vat - * - "ag_id"=>"ag_id" => foreign key to action_gestion - * - db is the database connection - */ -class Follow_Up_Detail -{ - private static $variable=array( - "id"=>"ad_id", - "qcode"=>"f_id", - "text"=>"ad_text", - "price_unit"=>"ad_pu", - "quantity"=>"ad_quant", - "tva_id"=>"ad_tva_id", - "tva_amount"=>"ad_tva_amount", - "total"=>"ad_total_amount", - "ag_id"=>"ag_id" - ); - function __construct ($p_cn,$p_id=0) - { - $this->db=$p_cn; - $this->ad_id=$p_id; - } - public function get_parameter($p_string) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - return $this->$idx; - } - else - throw new Exception("Attribut inexistant $p_string"); - } - public function set_parameter($p_string,$p_value) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - $this->$idx=$p_value; - } - else - throw new Exception("Attribut inexistant $p_string"); - - - } - public function get_info() - { - return var_export(self::$variable,true); - } - public function verify() - { - // Verify that the elt we want to add is correct - return 0; - } - public function save() - { - if ( $this->ad_id == 0 ) - $this->insert(); - else - $this->update(); - } - - public function insert() - { - if ( $this->verify() != 0 ) return; - $sql='INSERT INTO action_detail('. - ' f_id, ad_text, ad_pu, ad_quant, ad_tva_id, ad_tva_amount,'. - ' ad_total_amount, ag_id)'. - ' VALUES ($1, $2, $3, $4,$5,$6,$7,$8) returning ad_id'; - $this->ad_id=$this->db->get_value($sql,array( - $this->f_id, - $this->ad_text, - $this->ad_pu, - $this->ad_quant, - $this->ad_tva_id, - $this->ad_tva_amount, - $this->ad_total_amount, - $this->ag_id - ) - ); - - } - - public function update() - { - if ( $this->verify() != 0 ) return; - - $sql='UPDATE action_detail '. - ' SET f_id=$1, ad_text=$2, ad_pu=$3, ad_quant=$4, ad_tva_id=$5,'. - ' ad_tva_amount=$6, ad_total_amount=$7, ag_id=$8'. - ' WHERE ad_id=$9'; - $this->id=$this->db->exec_sql($sql,array( - $this->f_id, - $this->ad_text, - $this->ad_pu, - $this->ad_quant, - $this->ad_tva_id, - $this->ad_tva_amount, - $this->ad_total_amount, - $this->ag_id, - $this->ad_id - ) - ); - - - } - /*!\brief retrieve all the details of an Follow_Up - *\return array of Action_Detail - *\see Follow_Up::get - */ - public function load_all() - { - $sql="SELECT ad_id, f_id, ad_text, ad_pu, ad_quant, ad_tva_id, ad_tva_amount, - ad_total_amount, ag_id FROM action_detail ". - " where ag_id=$1 order by ad_id"; - $res=$this->db->get_array( - $sql, - array($this->ag_id) - ); - if ( $this->db->count() == 0 ) return; - $aRet=array(); - for($i=0;$idb); - $row=$res[$i]; - foreach ($row as $idx=>$value) - { - $a->$idx=$value; - } - $aRet[$i]=clone $a; - } - return $aRet; - } - - public function load() - { - $sql="SELECT ad_id, f_id, ad_text, ad_pu, ad_quant, ad_tva_id, ad_tva_amount, - ad_total_amount, ag_id FROM action_detail". - " where ad_id=$1"; - - $res=$this->db->get_array($this->db, - $sql, - array($this->ad_id) - ); - if ( $this->db->count() == 0 ) return; - $row=$res[0]; - foreach ($row as $idx=>$value) - { - $this->$idx=$value; - } - - } - public function delete() - { - $sql="delete from action_detail where ad_id=$1"; - $this->db->exec_sql($sql,array($this->ad_id)); - } - /*!\brief Fill an Action_Detail Object with the data contained in an array - *\param $array - - [ad_id7] => ad_id - - [e_march7] => f_id - - [e_march7_label] => ad_text - - [e_march7_price] => ad_pu - - [e_quant7] => ad_quant - - [e_march7_tva_id] => ad_tva_id - - [e_march7_tva_amount] => ad_tva_amount - - [tvac_march7] => ad_total_amount - - [ag_id] => ag_id - *\param $idx is the idx (example 7) - *\note */ - public function from_array($array,$idx) - { - $row=$array; - $this->ad_id=(isset($row['ad_id'.$idx]))?$row['ad_id'.$idx]:0; - - $qcode=(isset($row['e_march'.$idx]))?$row['e_march'.$idx]:""; - if (trim($qcode)=='') - { - $this->f_id=0; - } - else - { - $tmp=new Fiche($this->db); - $tmp->get_by_qcode($qcode,false); - $this->f_id=$tmp->id; - } - $this->ad_text=(isset($row['e_march'.$idx.'_label']))?$row['e_march'.$idx.'_label']:""; - $this->ad_pu=(isset($row['e_march'.$idx.'_price']))?$row['e_march'.$idx.'_price']:0; - $this->ad_quant=(isset($row['e_quant'.$idx]))?$row['e_quant'.$idx]:0; - $this->ad_tva_id=(isset($row['e_march'.$idx.'_tva_id']))?$row['e_march'.$idx.'_tva_id']:0; - $this->ad_tva_amount=(isset($row['e_march'.$idx.'_tva_amount']))?$row['e_march'.$idx.'_tva_amount']:0; - $this->ad_total_amount=(isset($row['tvac_march'.$idx]))?$row['tvac_march'.$idx]:0; - $this->ag_id=(isset($array['ag_id']))?$array['ag_id']:0; - /* protect numeric */ - if (trim($this->ad_pu)=="" || isNumber($this->ad_pu)==0) $this->ad_pu=0; - if (trim($this->ad_quant)=="" || isNumber($this->ad_quant)==0) $this->ad_quant=0; - if (trim($this->ad_tva_amount)==""||isNumber($this->ad_tva_amount)==0) $this->ad_tva_amount=0; - if (trim($this->ad_total_amount)==""||isNumber($this->ad_total_amount)==0) $this->ad_total_amount=0; - if (trim($this->ad_tva_id)=="" || isNumber($this->ad_tva_id)==0) $this->ad_tva_id=0; - } - /*!\brief - *\param - *\return - *\note - *\see - */ - static function test_me() -{} - -} - -/* test::test_me(); */ - diff --git a/sources/include/class_forecast.php b/sources/include/class_forecast.php deleted file mode 100644 index 3383d84..0000000 --- a/sources/include/class_forecast.php +++ /dev/null @@ -1,168 +0,0 @@ -"f_id","name"=>"f_name","start_date"=>"f_start_date","end_date"=>"f_end_date"); - private $cn; - /** - * @brief constructor - * @param $p_init Database object - */ - function __construct ($p_init,$p_id=0) - { - $this->cn=$p_init; - $this->f_id=$p_id; - } - public function get_parameter($p_string) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - return $this->$idx; - } - else - throw new Exception("Attribut inexistant $p_string"); - } - public function set_parameter($p_string,$p_value) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - $this->$idx=$p_value; - } - else - throw new Exception("Attribut inexistant $p_string"); - } - public function get_info() - { - return var_export(self::$variable,true); - } - - public function verify() - { - // Verify that the elt we want to add is correct - // the f_name must be unique (case insensitive) - if ( strlen(trim($this->f_name))==0) throw new Exception(_('Le nom ne peut pas être vide')); - - return 0; - } - public function save() - { - /* please adapt */ - if ( $this->get_parameter("id") == 0 ) - $this->insert(); - else - $this->update(); - } - - public function insert() - { - if ( $this->verify() != 0 ) return; - $sql="insert into forecast (f_name,f_start_date,f_end_date) ". - " values ($1,$2,$3) returning f_id"; - $res=$this->cn->exec_sql( - $sql, - array($this->f_name,$this->f_start_date,$this->f_end_date) - ); - $this->f_id=Database::fetch_result($res,0,0); - } - - /** - *@brief update the forecast table - */ - public function update() - { - if ( $this->verify() != 0 ) return; - - $sql="update forecast set f_name=$1,f_start_date=$2,f_end_date=$3 ". - " where f_id = $4"; - $res=$this->cn->exec_sql( - $sql, - array($this->f_name,$this->f_start_date,$this->f_end_date, $this->f_id) - ); - - } - /** - *@brief load all the existing forecast - *@param $p_cn is an Database object - *@return array of f_id and f_name - */ - public static function load_all($p_cn) - { - $sql="select f_id, f_name,f_start_date,f_end_date from forecast order by 2 desc"; - $ret=$p_cn->get_array($sql); - return $ret; - } - public function load() - { - $sql="select f_name,f_start_date ,f_end_date from forecast where f_id=$1"; - $res=$this->cn->exec_sql( - $sql, - array($this->f_id) - ); - if ( Database::num_row($res) == 0 ) return -1; - $row=Database::fetch_array($res,0); - foreach ($row as $idx=>$value) - { - $this->$idx=$value; - } - - } - public function delete() - { - $sql="delete from forecast where f_id=$1"; - $res=$this->cn->exec_sql($sql,array($this->f_id)); - } - public function object_clone() - { - $this->load(); - /* save into the table forecast */ - $sql="insert into forecast(f_name,f_start_date,f_end_date) select 'clone '||f_name,f_start_date,f_end_date from forecast where f_id=$1 returning f_id"; - $new=$this->cn->get_value($sql,array($this->f_id)); - - /* save into forecast_cat */ - $sql="insert into forecast_cat(fc_desc,f_id,fc_order) select fc_desc,$1,fc_order from forecast_cat where f_id=$2 returning fc_id" ; - $array=$this->cn->get_array($sql,array($new,$this->f_id)); - - $old=$this->cn->get_array("select fc_id from forecast_cat where f_id=$1",array($this->f_id)); - /* save into forecast_item */ - for ($i=0;$icn->exec_sql("insert into forecast_item (fi_text,fi_account,fi_card,fi_order,fc_id,fi_amount,fi_debit,fi_pid) ". - " select fi_text,fi_account,fi_card,fi_order,$1,fi_amount,fi_debit,fi_pid ". - " from forecast_item where fc_id=$2",array($array[$i]['fc_id'],$old[$i]['fc_id'])); - } - } - /** - * @brief unit test - */ - static function test_me() - {} - -} -?> diff --git a/sources/include/class_forecast_cat.php b/sources/include/class_forecast_cat.php deleted file mode 100644 index 2b7188e..0000000 --- a/sources/include/class_forecast_cat.php +++ /dev/null @@ -1,172 +0,0 @@ -1,"val2"=>"Seconde valeur","val3"=>0); */ - private static $variable=array ("id"=>"fc_id","order"=>"fc_order","desc"=>"fc_desc","forecast"=>"f_id"); - private $cn; - /** - * @brief constructor - * @param $p_init Database object - */ - function __construct ($p_init,$p_id=0) - { - $this->cn=$p_init; - $this->fc_id=$p_id; - } - public function get_parameter($p_string) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - return $this->$idx; - } - else - throw new Exception("Attribut inexistant $p_string"); - } - public function set_parameter($p_string,$p_value) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - $this->$idx=$p_value; - } - else - throw new Exception("Attribut inexistant $p_string"); - - - } - public function get_info() - { - return var_export(self::$variable,true); - } - public function verify() - { - if (strlen(trim($this->fc_order))==0) - { - $this->fc_order="1"; - } - // Verify that the elt we want to add is correct - // the f_name must be unique (case insensitive) - return 0; - } - public function save() - { - if ( $this->get_parameter("id") == 0 ) - $this->insert(); - else - $this->update(); - } - - public function insert() - { - if ( $this->verify() != 0 ) return; - - $sql="insert into forecast_cat (fc_desc,fc_order,f_id) ". - " values ($1,$2,$3) returning fc_id"; - $res=$this->cn->exec_sql( - $sql, - array($this->fc_desc,$this->fc_order,$this->f_id) - ); - $this->fc_id=Database::fetch_result($res,0,0); - } - - public function update() - { - if ( $this->verify() != 0 ) return; - - $sql="update forecast_cat set fc_desc=$1,f_id=$2,fc_order=$3 ". - " where fc_id = $4"; - $res=$this->cn->exec_sql( - $sql, - array($this->fc_desc,$this->f_id, $this->fc_order,$this->fc_id) - ); - } - /** - *@brief Load all the cat. for a given forecast and return them into a array - *@param $p_cn database connx - *@param $p_id is the forecast id (f_id) - *@return an array with all the data - */ - public static function load_all($p_cn,$p_id) - { - $sql="select fc_id,fc_desc,fc_order from forecast_cat where f_id=$1"; - - $res=$p_cn->get_array($sql,array($p_id)); - - return $res; - } - public function load() - { - - $sql="select fc_desc, f_id,fc_order from forecast_cat where fc_id=$1"; - - $res=$this->cn->exec_sql( - $sql, - array($this->fc_id) - ); - - if ( Database::num_row($res) == 0 ) return; - $row=Database::fetch_array($res,0); - foreach ($row as $idx=>$value) - { - $this->$idx=$value; - } - - } - /** - *@brief Make a array for a ISelect of the available cat - *@param $id is forecast::f_id - *@return array for ISelect - *@see ISelect - */ - public function make_array($id) - { - $sql="select fc_id,fc_desc from forecast_cat where f_id=$id"; - $ret=$this->cn->make_array($sql); - return $ret; - } - public function delete() - { - $sql="delete from forecast_cat where fc_id=$1"; - $res=$this->cn->exec_sql($sql,array($this->fc_id)); - } - /** - * @brief unit test - */ - static function test_me() - {} - -} - -?> \ No newline at end of file diff --git a/sources/include/class_forecast_item.php b/sources/include/class_forecast_item.php deleted file mode 100644 index 0081532..0000000 --- a/sources/include/class_forecast_item.php +++ /dev/null @@ -1,165 +0,0 @@ -1,"val2"=>"Seconde valeur","val3"=>0); */ - private static $variable=array ("id"=>"fi_id","text"=>"fi_text","account"=>"fi_account", - "card"=>"fi_card","order"=>"fi_order","cat_id"=>"fc_id","amount"=>"fi_amount","debit"=>"fi_debit","periode"=>"fi_pid"); - private $cn; - /** - * @brief constructor - * @param $p_init Database object - */ - function __construct ($p_init,$p_id=0) - { - $this->cn=$p_init; - $this->fi_id=$p_id; - } - public function get_parameter($p_string) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - return $this->$idx; - } - else - throw new Exception("Attribut inexistant $p_string"); - } - public function set_parameter($p_string,$p_value) - { - if ( array_key_exists($p_string,self::$variable) ) - { - $idx=self::$variable[$p_string]; - $this->$idx=$p_value; - } - else - throw new Exception("Attribut inexistant $p_string"); - - - } - public function get_info() - { - return var_export(self::$variable,true); - } - public function verify() - { - $this->fi_account= str_replace(" ", "", $this->fi_account); - // Verify that the elt we want to add is correct - // the f_name must be unique (case insensitive) - return 0; - } - public function save() - { - /* please adapt */ - if ( $this->get_parameter("id") == 0 ) - $this->insert(); - else - $this->update(); - } - - public function insert() - { - if ( $this->verify() != 0 ) return; - - $sql="INSERT INTO forecast_item( - fi_text, fi_account, fi_card, fi_order, fc_id, fi_amount, - fi_debit,fi_pid) - VALUES ($1, $2, $3, $4, $5, $6, $7,$8) returning fi_id;"; - $res=$this->cn->exec_sql( - $sql, - array($this->fi_text,$this->fi_account,$this->fi_card,$this->fi_order,$this->fc_id,$this->fi_amount,$this->fi_debit,$this->fi_pid) - ); - $this->fi_id=Database::fetch_result($res,0,0); - } - - public function update() - { - if ( $this->verify() != 0 ) return; - - $sql="UPDATE forecast_item - SET fi_text=$1, fi_account=$2, fi_card=$3, fi_order=$4, fc_id=$5, - fi_amount=$6, fi_debit=$7,fi_pid=$8 - WHERE fi_id=$9;"; - $res=$this->cn->exec_sql($sql, - array($this->fi_text, - $this->fi_account, - $this->fi_card, - $this->fi_order, - $this->fc_id, - $this->fi_amount, - $this->fi_debit, - $this->fi_pid, - $this->fi_id) - ); - - } - - public function load() - { - - $sql="SELECT fi_id, fi_text, fi_account, fi_card, fi_order, fc_id, fi_amount, - fi_debit,fi_pid - FROM forecast_item where fi_id=$1"; - - $res=$this->cn->exec_sql( - $sql, - array($this->fi_id) - ); - - if ( Database::num_row($res) == 0 ) return; - $row=Database::fetch_array($res,0); - foreach ($row as $idx=>$value) - { - $this->$idx=$value; - } - - } - - - - - public function delete() - { - $sql="delete from forecast_item where fi_id=$1"; - $res=$this->cn->exec_sql($sql,array($this->fi_id)); - } - /** - * @brief unit test - */ - static function test_me() - {} - -} - -?> \ No newline at end of file diff --git a/sources/include/class_gestion_purchase.php b/sources/include/class_gestion_purchase.php deleted file mode 100644 index 8a1d592..0000000 --- a/sources/include/class_gestion_purchase.php +++ /dev/null @@ -1,128 +0,0 @@ -qp_internal=="") - throw new Exception(__FILE__.__LINE__." qs_internal est vide"); - $sql="select qp_id, - qp_internal, - qp_fiche, - qp_quantite, - qp_price, - qp_vat, - qp_vat_code, - tva_rate, - tva_label, - qp_nd_amount, - qp_nd_tva, - qp_nd_tva_recup, - qp_supplier, - j_id, - qp_dep_priv, - qp_vat_sided - from quant_purchase left join tva_rate on (qp_vat_code=tva_id) - where qp_internal='".$this->qp_internal."'"; - $ret=$this->db->exec_sql($sql); - // $res contains all the line - $res=Database::fetch_all($ret); - - if ( sizeof($res)==0) return null; - $count=0; - foreach ($res as $row) - { - $t_gestion_purchase=new gestion_purchase($this->db); - foreach ($row as $idx=>$value) - $t_gestion_purchase->$idx=$value; - $array[$count]=clone $t_gestion_purchase; - $count++; - } - return $array; - } - function search_by_jid($p_jid) - { - $res=$this->db->exec_sql("select qp_id from quant_purchase where j_id=".$p_jid); - - if ( Database::num_row($res) == 1) - $this->qp_id=Database::fetch_result($res,0,0); - else - $this->qp_id=0; - } - function load() - { - $sql="select qp_id, - qp_internal, - qp_fiche, - qp_quantite, - qp_price, - qp_vat, - qp_vat_code, - qp_nd_amount, - qp_nd_tva, - qp_nd_tva_recup, - qp_supplier, - j_id, - qp_dep_priv, - qp_vat_sided - from quant_purchase - where qp_id=".$this->qp_id; - $ret=$this->db->exec_sql($sql); - // $res contains all the line - $res=Database::fetch_all($ret); - - if ( empty($res) ) return null; - foreach ($res[0] as $idx=>$value) - $this->$idx=$value; - - } - -} diff --git a/sources/include/class_gestion_sold.php b/sources/include/class_gestion_sold.php deleted file mode 100644 index 1b0036f..0000000 --- a/sources/include/class_gestion_sold.php +++ /dev/null @@ -1,115 +0,0 @@ -qs_internal=="") - throw new Exception(__FILE__.__LINE__." qs_internal est vide"); - $sql="select qs_id, - qs_internal, - qs_fiche, - qs_quantite, - qs_price, - qs_vat, - tva_label, - tva_rate, - qs_vat_code, - qs_client, - j_id, - qs_vat_sided - from quant_sold left join tva_rate on (qs_vat_code=tva_id) - where qs_internal='".$this->qs_internal."'"; - $ret=$this->db->exec_sql($sql); - // $res contains all the line - $res=Database::fetch_all($ret); - - if ( sizeof($res)==0) return null; - $count=0; - - foreach ($res as $row) - { - $t_gestion_sold=new gestion_sold($this->db); - foreach ($row as $idx=>$value) - $t_gestion_sold->$idx=$value; - $array[$count]=clone $t_gestion_sold; - $count++; - } - return $array; - } - function search_by_jid($p_jid) - { - $res=$this->db->exec_sql("select qs_id from quant_sold where j_id=".$p_jid); - - if ( Database::num_row($res) == 1) - $this->qs_id=Database::fetch_result($res,0,0); - else - $this->qs_id=0; - } - function load() - { - $sql=" select qs_id, - qs_internal, - qs_fiche, - qs_quantite, - qs_price, - qs_vat, - qs_vat_code, - qs_client, - j_id, - qs_vat_sided - from quant_sold - where qs_id=$1"; - $ret=$this->db->exec_sql($sql,array($this->qs_id)); - // $res contains all the line - $res=Database::fetch_all($ret); - - if ( empty($res) ) return null; - foreach ($res[0] as $idx=>$value) - $this->$idx=$value; - } -} diff --git a/sources/include/class_gestion_table.php b/sources/include/class_gestion_table.php deleted file mode 100644 index 30ed6b2..0000000 --- a/sources/include/class_gestion_table.php +++ /dev/null @@ -1,37 +0,0 @@ -db=$p_cn; - } -} diff --git a/sources/include/class_html_input.php b/sources/include/class_html_input.php deleted file mode 100755 index 98ded82..0000000 --- a/sources/include/class_html_input.php +++ /dev/null @@ -1,929 +0,0 @@ -js you have the javascript code - * - SELECT the options are passed via this->value, this array is - * build thanks the make_array function, each array (of the - * array) aka row must contains a field value and a field label - * - PASSWORD - * - CHECKBOX - * - RADIO - * - TEXTAREA - * - RICHTEXT - * - FILE - * - SPAN - */ -class HtmlInput -{ - - var $type; /*!< $type type of the widget */ - var $name; /*!< $name field NAME of the INPUT */ - var $value; /*!< $value what the INPUT contains */ - var $readOnly; /*!< $readonly true : we cannot change value */ - var $size; /*!< $size size of the input */ - var $selected; /*!< $selected for SELECT RADIO and CHECKBOX the selected value */ - var $table; /*!< $table =1 add the table tag */ - var $label; /*!< $label the question before the input */ - var $disabled; /*!< $disabled poss. value == true or nothing, to disable INPUT*/ - var $extra; /*!< $extra different usage, it depends of the $type */ - var $extra2; /*!< $extra2 different usage, - it depends of the $type */ - var $javascript; /*!< $javascript is the javascript to add to the widget */ - var $ctrl; /*!<$ctrl is the control to update (see js_search_card_control) */ - - var $tabindex; - function __construct($p_name="",$p_value="",$p_id="") - { - $this->name=$p_name; - $this->readOnly=false; - $this->size=20; - $this->width=50; - $this->heigh=20; - $this->value=$p_value; - $this->selected=""; - $this->table=0; - $this->disabled=false; - $this->javascript=""; - $this->extra2="all"; - $this->attribute=array(); - $this->id=$p_id; - - } - function setReadOnly($p_read) - { - $this->readOnly=$p_read; - } - /*!\brief set the extra javascript property for the INPUT field - *\param $p_name name of the parameter - *\param $p_value default value of this parameter - */ - public function set_attribute($p_name,$p_value) - { - $this->attribute[]=array($p_name,$p_value); - $this->$p_name=$p_value; - } - /** - *@brief you can add attribute to this in javascript - * this function is a wrapper and create a script (in js) to modify - * "this" (in javascript) with the value of obj->attribute from PHP - *@return return string with the javascript code - */ - public function get_js_attr() - { - require_once NOALYSS_INCLUDE.'/function_javascript.php'; - $attr=""; - if ( count($this->attribute) == 0) return ""; - - /* Add properties at the widget */ - for ($i=0;$i< count($this->attribute);$i++) - { - list($name,$value)=$this->attribute[$i]; - $tmp1=sprintf("$('%s').%s='%s';", - $this->name, - $name, - $value); - $attr.=$tmp1; - } - $attr=create_script($attr); - return $attr; - } - /** - * Make a JSON object, this method create a javascript object - * with the attribute set, it returns a javascript string with the object - * @param $p_name : name of the object, can be null. If the name is not null, return - * $p_name={} otherwise only the object {} - * @return javascript string with the object - * @note: there is not check on the key->value, so you could need to escape - * special char as quote, single-quote... - * @code - $a=new IButton() - $a->set_attribute('prop','1'); - $a->set_attribute('prop','2'); - $a->set_attribute('prop','3'); - $string = $a->make_object('property'); - echo $string => property={'prop':'1','prop2':'2','prop3':'3'}; - $string = $a->make_object(null); - echo $string => {'prop':'1','prop2':'2','prop3':'3'}; - @endcode - */ - public function make_object($p_name=null) - { - $name=($p_name != null)?$p_name.'=':''; - if ( count($this->attribute) == 0) return $name."{}"; - $ret=$name."{"; - $and=''; - - for ($i=0;$i< count($this->attribute);$i++) - { - list($name,$value)=$this->attribute[$i]; - $tmp1=sprintf($and."'%s':'%s'", - $name, - $value); - $ret.=$tmp1; - $and=','; - } - - $ret.='}'; - return $ret; - } - //##################################################################### - /* Debug - */ - function debug() - { - echo "Type ".$this->type."
    "; - echo "name ".$this->name."
    "; - echo "value". $this->value."
    "; - $readonly=($this->readonly==false)?"false":"true"; - echo "read only".$readonly."
    "; - } - static function submit ($p_name,$p_value,$p_javascript="",$p_class="smallbutton") - { - - return ''; - } - static function button ($p_name,$p_value,$p_javascript="",$p_class="smallbutton") - { - - return ''; - } - - static function reset ($p_value) - { - return ''; - } - static function hidden($p_name,$p_value,$p_id="") - { - if ($p_id=="") $p_id=$p_name; - return ''; - } - - static function extension() - { - return self::hidden('plugin_code',$_REQUEST['plugin_code']); - } - - /*!\brief create a button with a ref - *\param $p_label the text - *\param $p_value the location of the window, - *\param $p_name the id of the span - *\param $p_javascript javascript for this button - *\return string with htmlcode - */ - static function button_anchor($p_label,$p_value,$p_name="",$p_javascript="",$p_class="button") - { - $r=sprintf('
    %s', - $p_name, - $p_value, - $p_javascript, - $p_label); - return $r; - } - static function infobulle($p_comment) - { - $r='?'; - return $r; - } - static function warnbulle($p_comment) - { - $r='Δ'; - return $r; - } - /** - * return a string containing the html code for calling the modifyOperation - */ - static function detail_op($p_jr_id,$p_mesg) - { - return sprintf('%s', - $p_jr_id,dossier::id(),$p_mesg); - } - /** - * @brief return an anchor to view the detail of an action - * @param $ag_id - * @param $p_mesg - * @param $p_modify let you modify an operation - * - */ - static function detail_action($ag_id,$p_mesg,$p_modify=1) - { - return sprintf('%s', - $ag_id,dossier::id(),$p_modify,$p_mesg); - } - /** - * return a string containing the html code for calling the modifyModeleDocument - */ - static function detail_modele_document($p_id,$p_mesg) - { - return sprintf('%s', - $p_id,dossier::id(),$p_mesg); - } - - /** - * return a string containing the html code for calling the removeStock - */ - static function remove_stock($p_id,$p_mesg) - { - return sprintf('%s', - $p_id,dossier::id(),$p_mesg); - } - - /** - * display a div with the history of the card - */ - static function history_card($f_id,$p_mesg,$p_style="") - { - $view_history= sprintf('%s', - $p_style,$f_id, dossier::id(), $p_mesg); - return $view_history; - } - /** - * display a div with the history of the card - */ - static function history_card_button($f_id,$p_mesg) - { - static $e=0; - $e++; - $js= sprintf('onclick="view_history_card(\'%s\',\'%s\')"', - $f_id, dossier::id()); - $view_history=HtmlInput::button("hcb"+$e,$p_mesg,$js); - return $view_history; - } - - /** - * display a div with the history of the account - */ - static function history_account($p_account,$p_mesg,$p_style="") - { - $view_history= sprintf('%s', - $p_style,$p_account, dossier::id(), $p_mesg); - return $view_history; - } - - /** - * return the html code to create an hidden div and a button - * to show this DIV. This contains all the available ledgers - * for the user in READ or RW - *@param $selected is an array of checkbox - *@param $div div suffix - *@note the choosen ledger are stored in the array r_jrn (_GET) - */ - static function select_ledger($p_type,$p_selected,$div='') - { - global $g_user; - $r = ''; - /* security : filter ledger on user */ - $p_array = $g_user->get_ledger($p_type, 3); - - ob_start(); - - - /* create a hidden div for the ledger */ - echo '
    '; - echo HtmlInput::title_box(_("Journaux"), $div."jrn_search"); - echo '
    '; - echo '
    '; - echo HtmlInput::hidden('nb_jrn', count($p_array)); - echo _('Filtre ').HtmlInput::filter_table($div.'tb_jrn', '0,1,2', 2); - echo ''; - echo ''; - echo th(_('Nom')); - echo th(_('Description')); - echo th(_('Type')); - echo ''; - echo ''; - echo ''; - echo ''; - for ($e=0;$eselected=true; - } - $class=($e%2==0)?' class="even" ':' class="odd" '; - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - - } - echo '
    '; - echo HtmlInput::button('sel_'.$div,_('Inverser la sélection'),' onclick = "toggle_checkbox(\''."{$div}search_frm".'\')"'); - echo '
    '.$r->input().$row['jrn_def_name'].''.$row['jrn_def_description'].''.$row['jrn_def_type'].'
    '; - echo HtmlInput::hidden('div',$div); - echo HtmlInput::submit('save',_('Valider')); - echo HtmlInput::button_close($div."jrn_search"); - echo '
    '; - echo '
    '; - echo '
    '; - - $ret=ob_get_contents(); - ob_end_clean(); - return $ret; - } - /** - *create a hidden plus button to select the cat of ledger - *@note the selected value is stored in the array p_cat - */ - static function select_cat($array_cat) - { - ob_start(); - $ledger=new ISmallButton('l'); - $ledger->label=_("Catégorie"); - $ledger->javascript=" show_cat_choice()"; - echo $ledger->input(); - - /* create a hidden div for the ledger */ - echo '
    '; - echo '

    '._('Choix des categories').'

    '; - $selected=(isset($_GET['r_cat']))?$_GET['r_cat']:null; - - echo '
      '; - for ($e=0;$eselected=true; - } - echo '
    • '.$re->input().$row['name'].'('.$row['cat'].')
    • '; - - } - echo '
    '; - $hide=new IButton('l2'); - $hide->label=_("Valider"); - $hide->javascript=" hide_cat_choice() "; - echo $hide->input(); - - echo '
    '; - $r=ob_get_contents(); - ob_end_clean(); - return $r; - } - static function display_periode($p_id) - { - $r=sprintf('Modifier', - dossier::id(), - $p_id); - return $r; - } - /** - *close button for the HTML popup - *@see add_div modify_operation - *@param $div_name is the name of the div to remove - */ - static function button_close($div_name) - { - $a=new IButton('Fermer'); - $a->label=_("Fermer"); - $a->javascript="removeDiv('".$div_name."')"; - $html=$a->input(); - - return $html; - - } - /** - * Return a html string with an anchor which close the inside popup. (top-right corner) - *@param name of the DIV to close - */ - static function anchor_close($div,$p_js="") - { - $r=''; - $r.='
    '; - $r.= ''; - $r.='
    '; - return $r; - } - /** - * button Html - *@param $action action action to perform (message) without onclick - *@param $javascript javascript to execute - */ - static function button_action($action,$javascript,$id="xx",$p_class="button") - { - if ($id=="xx"){ - $id=HtmlInput::generate_id("xx"); - } - $r=""; - $r.=''; - return $r; - - } - /** - * button Html image - *@param $javascript javascript to execute - * @param $id id of the button - * @param $class class of the button - * @param $p_image image - */ - static function button_image($javascript,$id="xx",$p_class='class="button"',$p_image="") - { - if ($id=="xx"){ - $id=HtmlInput::generate_id("xx"); - } - $r=""; - $r.=''; - return $r; - - } - /** - * Return a html string with an anchor to hide a div, put it in the right corner - *@param $action action action to perform (message) - *@param $javascript javascript - *@note not protected against html - *@see Acc_Ledger::display_search_form - */ - static function anchor_hide($action,$javascript) - { - $r=''; - $r.='
    '; - $r.= ''.$action.''; - $r.='
    '; - return $r; - } - - /** - * Javascript to print the current window - */ - static function print_window() - { - $r=''; - $r.=HtmlInput::button('print','Imprimer','onclick="window.print();"'); - return $r; - } - /** - *show the detail of a card - */ - static function card_detail($p_qcode,$pname='',$p_style="",$p_nohistory=false) - { - //if ($pname=='')$pname=$p_qcode; - $r=""; - $histo=($p_nohistory==true)?' ,nohistory:1':""; - $r.=sprintf('%s [%s]', - $p_style,$p_qcode,$histo,$pname,$p_qcode); - return $r; - } - /** - *transform request data to hidden - *@param $array is an of indices - *@param $request name of the superglobal $_POST $_GET $_REQUEST(default) - *@return html string with the hidden data - */ - static function array_to_hidden($array,$global_array ) - { - - $r=""; - - if ( count($global_array )==0) return ''; - foreach ($array as $a) - { - if (isset($global_array [$a])) - if (is_array($global_array[$a]) == false ) { - $r.=HtmlInput::hidden($a,$global_array [$a]); - } else { - if (count($global_array[$a]) > 0) - { - foreach ($global_array[$a] as $value) - { - $r.=HtmlInput::hidden($a."[]",$value); - } - } - } - } - - return $r; - } - /** - *transform $_GET data to hidden - *@param $array is an of indices - *@see HtmlInput::request_to_hidden - *@return html string with the hidden data - */ - static function get_to_hidden($array) - { - $r=self::array_to_hidden($array,$_GET ); - return $r; - } - - /** - *transform $_POST data to hidden - *@param $array is an of indices - *@see HtmlInput::request_to_hidden - *@return html string with the hidden data - */ - static function post_to_hidden($array) - { - $r=self::array_to_hidden($array,$_POST ); - return $r; - } - - /** - *transform $_REQUEST data to hidden - *@param $array is an of indices - *@see HtmlInput::request_to_hidden - *@return html string with the hidden data - */ - static function request_to_hidden($array) - { - $r=self::array_to_hidden($array,$_REQUEST ); - return $r; - } - - /** - *transform request data to string - *@param $array is an of indices - *@param $request name of the superglobal $_POST $_GET $_REQUEST(default) - *@return html string with the string data - */ - static function array_to_string($array,$global_array,$start="?" ) - { - - $r=$start; - - if ( count($global_array )==0) return ''; - $and=""; - foreach ($array as $a) - { - if (isset($global_array [$a])) - { - if (is_array($global_array[$a]) == false ) { - $r.=$and."$a=".$global_array [$a]; - } else { - for ($i=0;$i'.HtmlInput::anchor("⬜","",$p_js,' name="small'.$div.'" id="close_div" class="input_text" ').''; } else - if ( $mod == 'custom') {$r=''.$p_js."";} else - if ( $mod == 'none') {$r="" ; } - else - die (__FILE__.":".__LINE__._('Paramètre invaide')); - $r.=h2($name,' class="title" '); - return $r; - } - /** - * @brief let you create only a link and set an id on it. - * After create a javascript for getting the event - * onclick = function() {...} - * @param type $p_text Text to display - * @param type $p_id id of the link - * @param type $type title of the link - * @code - * echo HtmlInput::anchor_empty('go','go_id'); - * - * @endcode - */ - static function anchor_empty($p_text,$p_id,$p_title="") - { - $p_url="javascript:void(0)"; - $str=sprintf('%s', - $p_id,$p_title,$p_text); - return $str; - } - /** - *Return a simple anchor with a url or a javascript - * if $p_js is not null then p_url will be javascript:void(0) - * we don't add the event onclick. You must give p_url OR p_js - * default CSS class=line - * @param string $p_text text of the anchor - * @param string $p_url url - * @param string $p_js javascript - * @param string $p_style is the visuable effect (class, style...) - */ - static function anchor($p_text,$p_url="",$p_js="",$p_style=' class="line" ') - { - if ($p_js != "") - { - $p_url="javascript:void(0)"; - } - - - $str=sprintf('%s', - $p_style,$p_url,$p_js,$p_text); - return $str; - } - /** - *Create an ISelect object containing the available repository for reading - * or writing - * @global $g_user - * @param $p_cn db object - * @param $p_name name of the select - * @param $p_mode is 'R' for reading, 'W' for writinh - * @return ISelect - * @throws Exception if p_mode is wrong - */ - static function select_stock( $p_cn, $p_name,$p_mode) - { - global $g_user; - if ( ! in_array($p_mode,array('R','W') ) ) - { - throw new Exception (__FILE__.":".__LINE__." $p_mode invalide"); - } - $profile=$g_user->get_profile(); - $sel=new ISelect($p_name); - - if ($p_mode == 'W') - { - $sel->value=$p_cn->make_array(" - select r_id,r_name - from stock_repository join profile_sec_repository using (r_id) - where - ur_right='W' and p_id=".sql_string($profile). - " order by 2" ); - return $sel; - } - if ($p_mode == 'R') - { - $sel->value=$p_cn->make_array(" - select r_id,r_name - from stock_repository join profile_sec_repository using (r_id) - where - p_id=".sql_string($profile). - " order by 2" ); - return $sel; - } - } - static function filter_table($p_table_id,$p_col,$start_row) - { - $r= " - - - - - "; - $r.=' '; - return $r; - } - - static function show_reconcile($p_div, $let,$span="") - { - $r = '' . $let.$span . ''; - return $r; - } - /** - * Zoom the calendar - * @param type $obj objet json for the javascript - * @see calendar_zoom in scripts.js - */ - static function calendar_zoom($obj) - { - $button=new ISmallButton("calendar", _("Calendrier")); - $button->javascript="calendar_zoom($obj)"; - return $button->input(); - } - /** - * - * @param type $p_array indice - * - div div name - * - type ALL, VEN, ACH or ODS - * - all_type 1 yes 0 no - * - */ - static function button_choice_ledger($p_array) - { - extract ($p_array); - $bledger_param = json_encode(array( - 'dossier' => $_REQUEST['gDossier'], - 'type' => $type, - 'all_type' => $all_type, - 'div' => $div, - 'class'=>'inner_box' - )); - - $bledger_param = str_replace('"', "'", $bledger_param); - $bledger = new ISmallButton('l'); - $bledger->label = _("choix des journaux"); - $bledger->javascript = " show_ledger_choice($bledger_param)"; - $f_ledger = $bledger->input(); - $hid_jrn = ""; - if (isset($_REQUEST[$div . 'nb_jrn'])) - { - for ($i = 0; $i < $_REQUEST[$div . 'nb_jrn']; $i++) - { - if (isset($_REQUEST[$div . "r_jrn"][$i])) - $hid_jrn.=HtmlInput::hidden($div . 'r_jrn[' . $i . ']', $_REQUEST[$div . "r_jrn"][$i]); - } - $hid_jrn.=HtmlInput::hidden($div . 'nb_jrn', $_REQUEST[$div . 'nb_jrn']); - } else - { - $hid_jrn = HtmlInput::hidden($div . 'nb_jrn', 0); - } - echo $f_ledger; - echo ''; - echo $hid_jrn; - echo ''; - } - /** - * Returns HTML code for displaying a icon with a link to a receipt document from - * the ledger - * @global $cn database connx - * @param $p_jr_id jrn.jr_id - * @return nothing or HTML Code for a link to the document - */ - static function show_receipt_document($p_jr_id) - { - global $cn; - - $array=$cn->get_array('select jr_def_id,jr_pj_name,jr_grpt_id from jrn where jr_id=$1',array($p_jr_id)); - if (count($array)==0) return ""; - if ($array[0]['jr_pj_name'] == "") return ""; - $str_dossier=Dossier::get(); - $image=''; - $r=sprintf('%s', $array[0]['jr_def_id'], $array[0]['jr_grpt_id'], $str_dossier, $image); - return $r; - - } - /** - * - * @param type $p_operation_jr_id action_gestion_operation.ago_id - */ - static function button_action_remove_operation($p_operation) - { - $rmOperation=sprintf("javascript:confirm_box(null,'"._('Voulez-vous effacer cette relation ')."',function () {remove_operation('%s','%s');});", - dossier::id(), - $p_operation); - $js= ''.SMALLX.''; - return $js; - } - static function button_action_add_concerned_card($p_agid) - { - $dossier=Dossier::id(); - $javascript= <<'N° de fiche', - 'style'=>'text-align:right', - 'link'=>$url, - 'image'=>$img), - array('name'=>'Nom', - 'style'=>'text-align:right'), - array('name'=>'QuickCode') - ) - , - $sql - ); - } -@endcode - */ - static function sql2table($cn,$a_col,$sql,$table_style='class="result"',$a_sql_var=null) - { - $r=''; - $r=sprintf('',$table_style); - $r.=''; - for ( $i=0;$i %s',$a_col[$i]['image'],$content); - } - if ( isset($a_col[$i]['link']) ) - { - $content=sprintf('%s', - $a_col[$i]['link'], - $content); - $r.=""; - } - else - $r.= ""; - } - $r.=''; - $ret=$cn->exec_sql($sql,$a_sql_var); - for ($i=0;$i'; - else - $r.=td($content,$style); - } - $r.=''; - } - $r.='
    $content". h($content)."
    '; - return $r; - } - static function test_me() - { - $cn=new Database(Dossier::id()); - $order=" order by f_id desc "; - $url=HtmlInput::get_to_string(array("gDossier","test_select")); - - if ( isset($_GET['sb'])) - { - $order=" order by f_id"; - $img="image/select1.gif"; - } - else - { - $url=$url."&sb=as"; - $img="image/select2.gif"; - } - $sql="select f_id,name,quick_code from vw_client $order limit 10"; - echo $sql; - - - echo Html_Table::sql2table($cn, - array( - array('name'=>'N° de fiche', - 'style'=>'text-align:right', - 'link'=>$url, - 'image'=>$img), - array('name'=>'Nom', - 'style'=>'text-align:right'), - array('name'=>'QuickCode') - ) - , - $sql - ); - } -} \ No newline at end of file diff --git a/sources/include/class_iaction.php b/sources/include/class_iaction.php deleted file mode 100644 index 86ed399..0000000 --- a/sources/include/class_iaction.php +++ /dev/null @@ -1,61 +0,0 @@ -name=($p_name=="")?$this->name:$p_name; - $this->value=($p_value=="")?$this->value:$p_value; - $this->id=($this->id=="")?$this->name:$this->id; - if ( $this->readOnly==true) return $this->display(); - $this->javascript= (!isset ($this->javascript))?"":$this->javascript; - if ( $this->value !="") - $r=sprintf(' %s', - $this->id, - $this->value, - $this->javascript, - $this->label); - else - $r=sprintf(' %s', - $this->id, - $this->javascript, - $this->label); - - return $r; - - } - /*!\brief print in html the readonly value of the widget*/ - public function display() - { - return; - } - static public function test_me() - { - } -} diff --git a/sources/include/class_ianccard.php b/sources/include/class_ianccard.php deleted file mode 100644 index 10ae7c2..0000000 --- a/sources/include/class_ianccard.php +++ /dev/null @@ -1,200 +0,0 @@ -fct='update_value'; - $this->dblclick=''; - $this->callback='null'; - $this->javascript=''; - // the pa_id to filter - $this->plan=0; - // or the container of the Plan Analytic which contains the pa_id - $this->plan_ctl=""; - } - /*!\brief set the javascript callback function - * by default it is update_value called BEFORE the querystring is send - * If you use the plan ctl must be set to filter_anc - *\param $p_name callback function name - */ - function set_callback($p_name) - { - $this->callback=$p_name; - } - - /*!\brief set the javascript callback function - * by default it is update_value called AFTER an item has been selected - *\param $p_name callback function name - */ - function set_function($p_name) - { - $this->fct=$p_name; - } - - /*!\brief set the extra javascript property for a double click on - * INPUT field - *\param $p_action action when a double click happens - *\note the $p_action cannot contain a double quote - */ - function set_dblclick($p_action) - { - $this->dblclick=$p_action; - } - /*!\brief show the html input of the widget*/ - public function input($p_name=null,$p_value=null) - { - if ( $p_name == null && $this->name == "") - throw (new Exception('Le nom d une icard doit être donne')); - - $this->value=($p_value==null)?$this->value:$p_value; - if ( $this->readOnly==true) return $this->display(); - - $this->id=($this->id=="")?$this->name:$this->id; - - - - $label=''; - if ( $this->dblclick != '') - { - $e=sprintf(' ondblclick="%s" ', - $this->dblclick); - $this->dblclick=$e; - } - $input=sprintf('', - $this->name, - $this->name, - $this->value, - $this->size, - $this->dblclick, - $this->javascript - ); - - - $div=sprintf('
    ', - $this->name); - $query="op=autoanc&".dossier::get(); - - // add parameter to search into a plan (pa_id) or get the value from - // a HtmlObject - if ($this->plan <> 0) - { - $query.="&pa_id=".$this->plan; - } elseif ( $this->plan_ctl <> '') - { - $this->set_attribute("plan_ctl", $this->plan_ctl); - } - $attr=$this->get_js_attr(); - $javascript=sprintf('try { new Ajax.Autocompleter("%s","%s_choices","ajax_misc.php?%s",'. - '{paramName:"anccard",minChars:1,indicator:null, '. - 'callback:%s, '. - ' afterUpdateElement:%s});} catch (e){alert(e.message);};', - $this->name, - $this->name, - $query, - $this->callback, - $this->fct); - - $javascript=create_script($javascript.$this->dblclick); - - $r=$label.$input.$attr.$div.$javascript; - if ( $this->table == 1 ) - $r=td($r); - return $r; - - } - /*!\brief print in html the readonly value of the widget*/ - public function display() - { - $r=sprintf(' - ', - $this->name, - $this->value - ); - $r.=''.$this->value.''; - return $r; - - } - /** - *@brief return a string containing the button for displaying - * a search form. When clicking on the result, update the input text file - * the common used attribute as - * - jrn the ledger - * - label the field to update - * - name name of the input text - * - price amount - * - tvaid - * - typecard (deb, cred, filter or list of value) - * will be set - * if ICard is in readOnly, the button disappears, so the return string is empty - \code - // search ipopup - $search_card=new IPopup('ipop_card'); - $search_card->title=_('Recherche de fiche'); - $search_card->value=''; - echo $search_card->input(); - - $a=new ICard('test'); - $a->search(); - - \endcode - *\see ajax_card.php - *\note the ipopup id is hard coded : ipop_card - *@return HTML string with the button - */ - function search() - { - if ( $this->readOnly==true) return ''; - - $button=new IButton($this->name.'_bt'); - $a=""; - foreach (array('typecard','jrn','label','price','tvaid') as $att) - { - if (isset($this->$att) ) - $a.="this.".$att."='".$this->$att."';"; - } - if (isset($this->name)) - $a.="this.inp='".$this->name."';"; - $a.="this.popup='ipop_card';"; - - $button->javascript=$a.' search_card(this)'; - return $button->input(); - } - - static public function test_me() - { - - } -} diff --git a/sources/include/class_ibutton.php b/sources/include/class_ibutton.php deleted file mode 100644 index d348a0c..0000000 --- a/sources/include/class_ibutton.php +++ /dev/null @@ -1,118 +0,0 @@ -name=($p_name==null)?$this->name:$p_name; - $this->value=($p_value==null)?$this->value:$p_value; - $this->label=(trim($this->label) != '')?$this->label:$this->value; - $this->class=($p_class != "")?$p_class:$this->class; - $this->class=($this->class=="")?"smallbutton ":$this->class; - if ( $this->readOnly==true) return $this->display(); - $extra= ( isset($this->extra))?$this->extra:""; - $this->id=($this->id=="")?$this->name:$this->id; - $tab=(isset($this->tabindex))?' tabindex="'.$this->tabindex.'"':""; - $r='extra. - $tab. - ' id="'.$this->id.'"'. - ' value="'.$this->label.'"'. - ' onClick="'.$this->javascript.'"'.$extra.'>'; - $attr=$this->get_js_attr(); - $r.=$attr; - return $r; - - } - - /*!\brief print in html the readonly value of the widget*/ - public function display() - { - return ""; - } - static function tooggle_checkbox($p_form) - { - $select_all=new IButton('select_all'); - $select_all->label=_('Inverser la sélection'); - $select_all->javascript="toggle_checkbox('$p_form')"; - return $select_all->input(); - } - static function select_checkbox($p_form) - { - $select_all=new IButton('select_all'); - $select_all->label=_('Cocher tous'); - $select_all->javascript="select_checkbox('$p_form')"; - return $select_all->input(); - } - static function unselect_checkbox($p_form) - { - $select_all=new IButton('select_all'); - $select_all->label=_('Décocher tous'); - $select_all->javascript="unselect_checkbox('$p_form')"; - return $select_all->input(); - } - static function show_calc() - { - $calc=new IButton('shcalc'); - $calc->label=_('Calculatrice'); - $calc->javascript="show_calc()"; - return $calc->input(); - - } - static public function test_me() - { - } -} -class ISmallButton extends IButton -{ - var $label; - /*!\brief show the html input of the widget*/ - public function input($p_name=null,$p_value=null,$p_style=null) - { - $this->name=($p_name==null)?$this->name:$p_name; - $this->value=($p_value==null)?$this->value:$p_value; - $this->label=(trim($this->label) != '')?$this->label:$this->value; - if ( $this->readOnly==true) return $this->display(); - $extra= ( isset($this->extra))?$this->extra:""; - $this->id=($this->id=="")?$this->name:$this->id; - $tab=(isset($this->tabindex))?' tabindex="'.$this->tabindex.'"':""; - $r='extra. - $tab. - ' id="'.$this->id.'"'. - ' value="'.$this->label.'"'. - ' onClick="'.$this->javascript.'"'.$extra.'>'; - $attr=$this->get_js_attr(); - $r.=$attr; - return $r; - - } -} \ No newline at end of file diff --git a/sources/include/class_icard.php b/sources/include/class_icard.php deleted file mode 100644 index 0865cc9..0000000 --- a/sources/include/class_icard.php +++ /dev/null @@ -1,394 +0,0 @@ -label="Client ".HtmlInput::infobulle(0) ; - $W1->name="e_client"; - $W1->tabindex=3; - $W1->value=$e_client; - $W1->table=0; -// If double click call the javascript fill_ipopcard - $W1->set_dblclick("fill_ipopcard(this);"); - - // Type of card : deb, cred or all - $W1->set_attribute('typecard','deb'); - - $W1->extra='deb'; - -// Add the callback function to filter the card on the jrn - $W1->set_callback('filter_card'); - -// when value selected in the autcomplete - $W1->set_function('fill_data'); - -// when the data change - $W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ', - $W1->name); - - // name of the field to update with the name of the card - $W1->set_attribute('label','e_client_label'); - $client_label=new ISpan(); - $client_label->table=0; - $f_client=$client_label->input("e_client_label",$e_client_label); - - $f_client_qcode=$W1->input(); - -// Search button for card - $f_client_bt=$W1->search(); -* \endcode -For searching a card, you need a popup, the script card.js and set -the values for card, popup filter_card callback -@code -$card=new ICard('acc'); -$card->name="acc"; -$card->extra="all"; -$card->set_attribute('typecard','all'); -$card->set_callback('filter_card'); - -echo $card->input(); -echo $card->search(); -// example 2 -$w=new ICard("av_text".$attr->ad_id); -// filter on frd_id -$sql=' select fd_id from fiche_def where frd_id in ('.FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX.')'; -$filter=$this->cn->make_list($sql); -$w->set_attribute('ipopup','ipopcard'); -$w->set_attribute('typecard',$filter); -$w->set_attribute('inp',"av_text".$attr->ad_id); -$w->set_attribute('label',"av_text".$attr->ad_id."_label"); - -$w->extra=$filter; -$w->extra2=0; -$label=new ISpan(); -$label->name="av_text".$attr->ad_id."_label"; -$msg.=td($w->search().$label->input()); -@endcode -*/ -require_once NOALYSS_INCLUDE.'/class_html_input.php'; -require_once NOALYSS_INCLUDE.'/function_javascript.php'; - -class ICard extends HtmlInput -{ - function __construct($name="",$value="",$p_id="") - { - parent::__construct($name,$value); - $this->fct='update_value'; - $this->dblclick=''; - $this->callback='null'; - $this->javascript=''; - $this->id=($p_id != "")?$p_id:$name; - $this->choice=null; - $this->indicator=null; - $this->choice_create=1; - $this->autocomplete=1; - $this->style=' style="vertical-align:50%"'; - } - /*!\brief set the javascript callback function - * by default it is update_value called BEFORE the querystring is send - * - *\param $p_name callback function name - */ - function set_callback($p_name) - { - $this->callback=$p_name; - } - - /*!\brief set the javascript callback function - * by default it is update_value called AFTER an item has been selected - *\param $p_name callback function name - */ - function set_function($p_name) - { - $this->fct=$p_name; - } - /*!\brief return the html string for creating the ipopup, this ipopup - * can be used for adding, modifying or display a card - *@note ipopup is obsolete, the popin is created by javascript - *\param $p_name name of the ipopup, must be set after with set_attribute - \code - $f_add_button=new IButton('add_card'); - $f_add_button->label='Créer une nouvelle fiche'; - $f_add_button->set_attribute('ipopup','ipop_newcard'); - $f_add_button->set_attribute('filter',$this->get_all_fiche_def ()); - $f_add_button->javascript=" select_card_type(this);"; - $str_add_button=$f_add_button->input(); - - \endcode - *\return html string - *\note must be one of first instruction on a new page, to avoid problem - * of position with IE - */ - static function ipopup($p_name) - { - $ip_card=new IPopup ($p_name); - $ip_card->drag=true; - $ip_card->set_width('45%'); - $ip_card->title='Fiche '; - $ip_card->value=''; - - return $ip_card->input(); - } - /*!\brief set the extra javascript property for a double click on - * INPUT field - *\param $p_action action when a double click happens - *\note the $p_action cannot contain a double quote - */ - function set_dblclick($p_action) - { - $this->dblclick=$p_action; - } - /*!\brief show the html input of the widget*/ - public function input($p_name=null,$p_value=null) - { - if ( $p_name == null && $this->name == "") - throw (new Exception('Le nom d une icard doit être donne')); - - $this->value=($p_value==null)?$this->value:$p_value; - if ( $this->readOnly==true) return $this->display(); - - $this->id=($this->id=="")?$this->name:$this->id; - $this->choice=($this->choice==null)?sprintf("%s_choices",$this->id):$this->choice; - $this->indicator=($this->indicator==null)?sprintf("%s_ind",$this->id):$this->indicator; - $attr=$this->get_js_attr(); - - $label=''; - if ( $this->dblclick != '') - { - $e=sprintf(' ondblclick="%s" ', - $this->dblclick); - $this->dblclick=$e; - } - $input=sprintf('', - $this->name, - $this->id, - $this->value, - $this->size, - $this->dblclick, - $this->javascript, - $this->style - ); - if ( $this->autocomplete == 1) - { - $this->indicator="ind_".$this->id; - $ind=sprintf('', - $this->indicator); - $this->indicator="null"; - $div=($this->choice_create == 1) ? sprintf('
    ',$this->choice):""; - - $query=dossier::get().'&e='.urlencode($this->typecard); - - $javascript=sprintf('try { new Ajax.Autocompleter("%s","%s","fid_card.php?%s",'. - '{paramName:"FID",minChars:1,indicator:%s, '. - 'callback:%s, '. - ' afterUpdateElement:%s});} catch (e){alert(e.message);};', - $this->id, - $this->choice, - $query, - $this->indicator, - $this->callback, - $this->fct); - - $javascript=create_script($javascript.$this->dblclick); - - $r=$label.$input.$attr.$ind.$div.$javascript; - } - else - { - $r=$label.$input; - } - if ( $this->table == 1 ) - $r=td($r); - return $r; - - } - /*!\brief print in html the readonly value of the widget*/ - public function display() - { - $r=sprintf(' ', - $this->name, - $this->name, - $this->value - ); - $r.=''.$this->value.''; - return $r; - - } - /** - *@brief return a string containing the button for displaying - * a search form. When clicking on the result, update the input text file - * the common used attribute as - * - jrn the ledger - * - label the field to update - * - name name of the input text - * - price amount - * - tvaid - * - typecard (deb, cred, filter or list of value) - * will be set - * if ICard is in readOnly, the button disappears, so the return string is empty - \code - // search ipopup - $search_card=new IPopup('ipop_card'); - $search_card->title=_('Recherche de fiche'); - $search_card->value=''; - echo $search_card->input(); - - $a=new ICard('test'); - $a->search(); - - \endcode - *\see ajax_card.php - *\note the ipopup id is hard coded : ipop_card - *@return HTML string with the button - */ - function search() - { - if ( $this->readOnly==true) return ''; - if ( ! isset($this->id )) $this->id=$this->name; - $a=""; - foreach (array('typecard','jrn','label','price','tvaid') as $att) - { - if (isset($this->$att) ) - $a.="this.".$att."='".$this->$att."';"; - } - if (isset($this->id) && $this->id != "") - $a.="this.inp='".$this->id."';"; - else - $a.="this.inp='".$this->name."';"; - $a.="this.popup='ipop_card';"; - $javascript=$a.' search_card(this);return false;'; - - $button=HtmlInput::button_image($javascript,$this->name."_bt", 'alt="'._('Recherche').'" class="image_search"',"image/magnifier13.png"); - return $button; - } - - static public function test_me() - { - require_once NOALYSS_INCLUDE.'/class_itext.php'; - $_SESSION['isValid']=1; - $a=new ICard('testme'); - $a->extra="all"; - $a->set_attribute('label','ctl_label'); - $a->set_attribute('tvaid','ctl_tvaid'); - $a->set_attribute('price','ctl_price'); - $a->set_attribute('purchase','ctl_purchase'); - $a->set_attribute('type','all'); - echo <<
  • - - - - - - - -EOF; - echo "
    "; - $l=new IText('ctl_label'); - $t=new IText('ctl_tvaid'); - $p=new IText('ctl_price'); - $b=new IText('ctl_purchase'); - - echo "Label ".$l->input().'
    '; - echo "Tva id ".$t->input().'
    '; - echo "Price ".$p->input().'
    '; - echo "Purchase ".$b->input().'
    '; - - if ( isset($_REQUEST['test_select']) ) - echo HtmlInput::hidden('test_select',$_REQUEST['test_select']); - $a->set_function('test_value'); - $a->javascript=' onchange="alert(\'onchange\');" onblur="alert(\'onblur\');" '; - echo $a->input(); - echo dossier::hidden(); - echo HtmlInput::submit('Entree','entree'); - echo '
    '; - echo <<name=($p_name==null)?$this->name:$p_name; - $this->value=($p_value==null)?$this->value:$p_value; - if ( $this->readOnly==true) return $this->display(); - $this->id=($this->id=="")?$this->name:$this->id; - - $check=( $this->selected==true )?"checked":"unchecked"; - $r='disabled." ".$this->javascript.'>'; - - $r=$r." $this->label"; - - return $r; - - - } - /*!\brief print in html the readonly value of the widget*/ - public function display() - { - $check=( $this->selected==true )?"checked":"unchecked"; - $r='value==$p_value)$this->selected=true; - } - static function toggle_checkbox($p_name,$p_form) { - $a=new ICheckBox($p_name); - $a->javascript='onclick="toggle_checkbox(\''.$p_form.'\')"'; - return $a->input(); - } - static public function test_me() - { - } -} diff --git a/sources/include/class_iconcerned.php b/sources/include/class_iconcerned.php deleted file mode 100644 index 283189e..0000000 --- a/sources/include/class_iconcerned.php +++ /dev/null @@ -1,80 +0,0 @@ -name=$p_name; - $this->value=$p_value; - $this->amount_id=null; - $this->paid=''; - $this->id=$p_id; - $this->tiers=""; // id of the field for the tiers to be updated - } - /*!\brief show the html input of the widget*/ - public function input($p_name=null,$p_value=null) - { - $this->name=($p_name==null)?$this->name:$p_name; - $this->value=($p_value==null)?$this->value:$p_value; - if ( $this->readOnly==true) return $this->display(); - - $this->id=($this->id=="")?$this->name:$this->id; - - - $r=sprintf(" - - - - - - ", - $this->name, - $this->amount_id, - $this->paid, - $this->tiers, - $this->name, - $this->id, - $this->value, - $this->id - ); - return $r; - } - /*!\brief print in html the readonly value of the widget*/ - public function display() - { - $r=sprintf("%s",$this->value); - $r.=sprintf('', $this->name,$this->value); - return $r; - - } - static public function test_me() - { - } -} diff --git a/sources/include/class_idate.php b/sources/include/class_idate.php deleted file mode 100644 index cea64c8..0000000 --- a/sources/include/class_idate.php +++ /dev/null @@ -1,71 +0,0 @@ -name=($p_name==null)?$this->name:$p_name; - $this->value=($p_value==null)?$this->value:$p_value; - if ( $this->readOnly==true) return $this->display(); - if( $this->id=="") - $this->id=self::generate_id($this->name); - $r=''. - ''; - $r.=' - '; - return $r; - - } - /*!\brief print in html the readonly value of the widget*/ - public function display() - { - $r=" : ".$this->value; - $r.=''; - return $r; - - } - static public function test_me() - { - } -} diff --git a/sources/include/class_ifile.php b/sources/include/class_ifile.php deleted file mode 100644 index 66475f3..0000000 --- a/sources/include/class_ifile.php +++ /dev/null @@ -1,46 +0,0 @@ -name=($p_name==null)?$this->name:$p_name; - $this->value=($p_value==null)?$this->value:$p_value; - if ( $this->readOnly==true) return $this->display(); - $r=''; - return $r; - - } - /*!\brief print in html the readonly value of the widget*/ - public function display() - { - - } - static public function test_me() - { - } -} diff --git a/sources/include/class_ihidden.php b/sources/include/class_ihidden.php deleted file mode 100644 index 08d00a5..0000000 --- a/sources/include/class_ihidden.php +++ /dev/null @@ -1,42 +0,0 @@ -name=($p_name==null)?$this->name:$p_name; - $this->value=($p_value==null)?$this->value:$p_value; - $this->id=($this->id=="")?$this->name:$this->id; - - $r=''; - return $r; - - } - static public function test_me() - { - } -} diff --git a/sources/include/class_impress.php b/sources/include/class_impress.php deleted file mode 100644 index 2bdbafd..0000000 --- a/sources/include/class_impress.php +++ /dev/null @@ -1,293 +0,0 @@ -$p_label.' Erreur Formule!', - 'montant'=>0); - else - return $p_formula; - - } - if ( $p_type_date == 0 ) - $cond=sql_filter_per($p_cn,$p_start,$p_end,'p_id','j_tech_per'); - else - $cond="( j_date >= to_date('$p_start','DD.MM.YYYY') and j_date <= to_date('$p_end','DD.MM.YYYY'))"; - - include_once("class_acc_account_ledger.php"); - - while (preg_match_all("(\[[0-9]*[A-Z]*%*c*d*s*\])",$p_formula,$e) == true) - { - - // remove the [ ] - $x=$e[0]; - foreach ($x as $line) - { - $compute='all'; - if ( strpos($line,'d') != 0 ) - $compute='deb'; - if ( strpos($line,'c') != 0 ) - $compute='cred'; - if ( strpos($line,'s') != 0 ) - $compute='signed'; - $line=str_replace ("[","",$line); - $line=str_replace ("]","",$line); - $line=str_replace ("d","",$line); - $line=str_replace ("c","",$line); - $line=str_replace ("s","",$line); - // If there is a FROM clause we must recompute - // the time cond - - if ($p_type_date == 0 && preg_match ("/FROM=[0-9]+\.[0-9]+/", $p_formula,$afrom) == 1 ) - { - // There is a FROM clause - // then we must modify the cond for the periode - $from=str_replace("FROM=","",$afrom[0]); - - // Get the periode - /*! \note special value for the clause FROM=00.0000 - */ - if ( $from == '00.0000' ) - { - - // retrieve the first month of this periode - $user_periode=$g_user->get_periode(); - $oPeriode=new Periode($p_cn); - $periode=$oPeriode->get_exercice($user_periode); - list($first,$last)=$oPeriode->get_limit($periode); - $ret=$first->get_date_limit(); - $end_date=$oPeriode->get_date_limit($p_end); - if ($ret == null ) throw new Exception ('Pas de limite à cette période',1); - $cond=sql_filter_per($p_cn,$ret['p_start'],$end_date['p_end'],'date','j_tech_per'); - - - } - else - { - $oPeriode=new Periode($p_cn); - try - { - $pfrom=$oPeriode->find_periode('01.'.$from); - $cond= sql_filter_per($p_cn, $pfrom, $p_end,'p_id','j_tech_per'); - } - catch (Exception $exp) - { - /* if none periode is found - then we take the first periode of the year - */ - $user_periode=$g_user->get_periode(); - - $year=$oPeriode->get_exercice($user_periode); - list($first,$last)=$oPeriode->get_limit($year); - $ret=$first->get_date_limit(); - $end_date=$oPeriode->get_date_limit($p_end); - if ($ret == null ) throw new Exception ('Pas de limite à cette période',1); - $cond=sql_filter_per($p_cn,$ret['p_start'],$end_date['p_end'],'date','j_tech_per'); - } - } - } - - if ( strpos($p_formula,"FROM") != 0) - { - // We remove FROM out of the p_formula - $p_formula=substr_replace($p_formula,"",strpos($p_formula,"FROM")); - } - - // Get sum of account - $P=new Acc_Account_Ledger($p_cn,$line); - $detail=$P->get_solde_detail($cond.$p_sql); - - - if ( $compute=='all') - $i=$detail['solde']; - if ( $compute=='deb') - $i=$detail['debit']; - if ( $compute=='cred') - $i=$detail['credit']; - if ( $compute=='signed') - $i=$detail['debit']-$detail['credit']; - $p_formula=str_replace($x[0],$i,$p_formula); - } - } - - // $p_eval is true then we eval and returns result - if ( $p_eval == true) - { - $p_formula="\$result=".$p_formula.";"; - eval("$p_formula"); - - while (preg_match("/\[([0-9]+)([Tt]*)\]/",trim($p_label),$e) == 1) - { - $nom = "!!".$e[1]."!!"; - if (Impress::check_formula($e[0])) - { - $nom = $p_cn->get_value ( "SELECT pcm_lib AS acct_name FROM tmp_pcmn WHERE pcm_val::text LIKE $1||'%' ORDER BY pcm_val ASC LIMIT 1",array($e[1])); - if($nom) - { - if($e[2] == 'T') $nom = strtoupper($nom); - if($e[2] == 't') $nom = strtolower($nom); - } - } - $p_label = str_replace($e[0], $nom, $p_label); - } - - $aret=array('desc'=>$p_label, - 'montant'=>$result); - return $aret; - } - else - { - // $p_eval is false we returns only the string - return $p_formula; - } - } - /*! - * \brief Check if formula doesn't contain - * php injection - * \param string - * - * \return true if the formula is good otherwise false - */ - static function check_formula($p_string) - { - // the preg_match gets too complex if we want to add a test - // for parenthesis, math function... - // So I prefer remove them before testing - $p_string=str_replace("round","",$p_string); - $p_string=str_replace("abs","",$p_string); - $p_string=str_replace("(","",$p_string); - $p_string=str_replace(")","",$p_string); - // for the inline test like $a=(cond)?value:other; - $p_string=str_replace("?","+",$p_string); - $p_string=str_replace(":","+",$p_string); - $p_string=str_replace(">=","+",$p_string); - $p_string=str_replace("<=","+",$p_string); - $p_string=str_replace(">","+",$p_string); - $p_string=str_replace("<","+",$p_string); - // eat Space + comma - $p_string=str_replace(" ","",$p_string); - $p_string=str_replace(",","",$p_string); - // Remove D/C/S - $p_string=str_replace("c","",$p_string); - $p_string=str_replace("d","",$p_string); - $p_string=str_replace("s","",$p_string); - // Remove T,t - $p_string=str_replace("t","",$p_string); - - // remove date - $p_string= preg_replace("/FROM*=*[0-9]+/", "", $p_string); - // remove comment - $p_string= preg_replace("/#.*/", "", $p_string); - // remove $C= - $p_string= preg_replace('/\$[a-z]*[A-Z]*[0-9]*[A-Z]*[a-z]*/', "", $p_string); - $p_string= preg_replace('/=/', "", $p_string); - - // remove account - $p_string= preg_replace("/\[[0-9]*[A-Z]*%*\]/", "", $p_string); - - $p_string= preg_replace("/\+|-|\/|\*/", "", $p_string); - $p_string= preg_replace("/[0-9]*\.*[0-9]/", "", $p_string); - - //******************************************************************************************************************** - // If the string is empty then formula should be good - // - //******************************************************************************************************************** - if ($p_string == '') - { - return true; - } - else - { - return false; - } - } - /** - * with the handle of a successull query, echo each row into CSV and - * send it directly - * @param type $array of data - * @param type $aheader double array, each item of the array contains - * a key type (num) and a key title - */ - static function array_to_csv($array,$aheader) - { - $seq=""; - for ($i=0;$i$value) - { - if ($e > count($aheader)) $e=0; - - if ( isset ($aheader[$e]['type'])) - { - switch ($aheader[$e]['type']) - { - case 'num': - echo $sep2.nb($value); - break; - default: - echo $sep2.'"'.$value.'"'; - } - } else { - echo '"'.$value.'"'.$sep2; - } - $sep2=";";$e++; - } - printf("\r"); - } - } -} \ No newline at end of file diff --git a/sources/include/class_inum.php b/sources/include/class_inum.php deleted file mode 100644 index 3cba46c..0000000 --- a/sources/include/class_inum.php +++ /dev/null @@ -1,111 +0,0 @@ -size=9; - $this->style='class="inum"'; - $this->javascript= 'onchange="format_number(this,2);"'; - } - /*!\brief print in html the readonly value of the widget*/ - public function display() - { - - $readonly=" readonly "; - $this->id=($this->id=="")?$this->name:$this->id; - - //$style='style="border:solid 1px blue;color:black;background:#EDEDED;text-align:right"'; - $style=' class="inum input_text_ro"'; - $this->value=str_replace('"','',$this->value); - $r='javascript." $readonly $this->extra >"; - - /* add tag for column if inside a table */ - if ( $this->table == 1 ) $r=''.$r.''; - - return $r; - - } - /*!\brief show the html input of the widget*/ - public function input($p_name=null,$p_value=null) - { - if ( isset ($this->prec)) { - $this->javascript= 'onchange="format_number(this,'.$this->prec.');"'; - } - $this->name=($p_name==null)?$this->name:$p_name; - $this->value=($p_value==null)?$this->value:$p_value; - $this->id=($this->id=="")?$this->name:$this->id; - - if ( $this->readOnly==true) return $this->display(); - - $t= ((isset($this->title)))?'title="'.$this->title.'" ':' '; - - $extra=(isset($this->extra))?$this->extra:""; - - $this->value=str_replace('"','',$this->value); - if ( ! isset ($this->css_size)) - { - $r='style.' TYPE="TEXT" id="'. - $this->id.'"'.$t. - 'NAME="'.$this->name.'" VALUE="'.$this->value.'" '. - 'SIZE="'.$this->size.'" '.$this->javascript." $this->extra >"; - /* add tag for column if inside a table */ - } else { - $r='style.' TYPE="TEXT" id="'. - $this->id.'"'.$t. - 'NAME="'.$this->name.'" VALUE="'.$this->value.'" '. - ' style="width:'.$this->css_size.';" '.$this->javascript." $this->extra >"; - - } - - if ( $this->table == 1 ) $r=''.$r.''; - - return $r; - - } - -} - - diff --git a/sources/include/class_iperiod.php b/sources/include/class_iperiod.php deleted file mode 100644 index a22c26e..0000000 --- a/sources/include/class_iperiod.php +++ /dev/null @@ -1,171 +0,0 @@ -name=$p_name; - $this->readOnly=false; - $this->size=20; - $this->width=50; - $this->heigh=20; - $this->value=$p_value; - $this->selected=""; - $this->table=0; - $this->disabled=false; - $this->javascript=""; - $this->extra2="all"; - $this->show_start_date=true; - $this->show_end_date=true; - $this->exercice=$p_exercice; - } - /*! - * \brief show the input html for a periode - *\param $p_name is the name of the widget - *\param $p_value is the default value - *\param $p_exercice is the exercice, if not set then the user preference is used - * \return string containing html code for the HTML - * - * - */ - public function input($p_name=null,$p_value=null) - { - foreach (array('type','cn') as $a) - { - if ( ! isset ($this->$a) ) throw new Exception('Variable non définie [ '.$a.']'); - } - $this->name=($p_name==null)?$this->name:$p_name; - $this->value=($p_value==null)?$this->value:$p_value; - if ( $this->readOnly==true) return $this->display(); - - switch ($this->type) - { - case CLOSED: - $sql_closed="where p_closed=true and p_central = false "; - break; - case OPEN: - $sql_closed="where p_closed=false"; - break; - case NOTCENTRALIZED: - $sql_closed="where p_closed=true and p_central = false "; - break; - case ALL: - $sql_closed=""; - break; - default: - throw new Exception("invalide p_type in ".__FILE__.':'.__LINE__); - } - $sql="select p_id,to_char(p_start,'DD.MM.YYYY') as p_start_string, - to_char(p_end,'DD.MM.YYYY') as p_end_string - from parm_periode - $sql_closed "; - - $cond=""; - - - /* Create a filter on the current exercice */ - if ( ! isset($this->filter_year) || (isset($this->filter_year) && $this->filter_year==true)) - { - if ( $this->exercice=='') - { - if (! isset($this->user) ) throw new Exception (__FILE__.':'.__LINE__.' user is not set'); - $this->exercice=$this->user->get_exercice(); - } - - $cond=''; - if ( $sql_closed=="") $and=" where " ; else $and=" and "; - if ($this->type == 'all' ) $cond=$and.' true '; - $cond.=" $and p_exercice='".sql_string($this->exercice)."'"; - } - - $sql.=$cond." order by p_start,p_end"; - - $Res=$this->cn->exec_sql($sql); - $Max=$this->cn->size($Res); - if ( $Max == 0 ) throw new Exception(_('Aucune periode trouvée'),1); - $ret='"; - return $ret; - - - } - /*!\brief print in html the readonly value of the widget*/ - public function display() - { - $r="not implemented ".__FILE__.":".__LINE__; - return $r; - - } - static public function test_me() - { - } -} diff --git a/sources/include/class_ipopup.php b/sources/include/class_ipopup.php deleted file mode 100644 index 62620ae..0000000 --- a/sources/include/class_ipopup.php +++ /dev/null @@ -1,191 +0,0 @@ -name=$p_name; - $this->parameter=''; - $this->attribute=array(); - $this->drag=false; - $this->blocking=true; - } - function set_width($p_val) - { - $js=sprintf('$("%s'.'_border").style.width="%s";', - $this->name,$p_val); - $this->parameter.=$js; - - } - function set_height($p_val) - { - $js=sprintf('$("%s'.'_border").style.height="%s";', - $this->name,$p_val); - $this->parameter.=$js; - - } - /** - *@brief set or not a blocking fond - *@param $p_block if true if you want to avoid access to background, - *accept true or false - */ - function set_block($p_block) - { - $this->blocking=$p_block; - } - - function set_zindex($p_val) - { - $js=sprintf('$("%s'.'_border").style.zIndex=%d;', - $this->name,$p_val); - $js=sprintf('$("%s'.'_content").style.zIndex=%d;', - $this->name,$p_val); - $this->parameter.=$js; - } - function set_dragguable($p_value) - { - $this->drag=$p_value; - } - /*!\brief set the attribute thanks javascript as the width, the position ... - *\param $p_name attribute name - *\param $p_val val of the attribute - *\note add to the this->attribut, it will be used in input() - */ - function set_attribute($p_name,$p_val) - { - $this->attribute[]=array($p_name,$p_val); - } - /*!\brief set the title of a ipopup thanks javascript and php mode - *\param title of the IPopup - *\return html string with js script - */ - function set_title($p_title) - { - $this->title=$p_title; - $s=sprintf('$("%s_"+"title")="%s"', - $this->name,$this->title); - return create_script($s); - } - function input() - { - $r=""; - if ($this->blocking) - { - $r.=sprintf('"; - } - $javascript=sprintf("javascript:hideIPopup('%s')", - $this->name); - - - if ( isset($this->title) && trim($this->title) != "" ) - { - $r.=sprintf(''; -return; -?> diff --git a/sources/include/compta_ach.inc.php b/sources/include/compta_ach.inc.php deleted file mode 100644 index f4f3104..0000000 --- a/sources/include/compta_ach.inc.php +++ /dev/null @@ -1,306 +0,0 @@ -check_jrn($_REQUEST['p_jrn']) != 'W') - { - NoAccess(); - exit - 1; - } -$p_msg=""; -/* if a new invoice is encoded, we display a form for confirmation */ -if (isset($_POST['view_invoice'])) -{ - $Ledger = new Acc_Ledger_Purchase($cn, $_POST['p_jrn']); - try - { - $Ledger->verify($_POST); - } - catch (Exception $e) - { - alert($e->getMessage()); - $p_msg=$e->getMessage(); - $correct = 1; - } - // if correct is not set it means it is correct - if (!isset($correct)) - { - echo '
    '; - echo '
    '; - echo h1(_("Confirmation")); - echo '
    '; - - echo '
    '; - echo h2(_("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer"),' class="notice"'); - echo '
    '; - - echo '
    '; - echo '
    '; - echo dossier::hidden(); - - echo $Ledger->confirm($_POST); - echo HtmlInput::hidden('ac', $_REQUEST['ac']); - ?> -
    - - -select_depot(false, -1); - echo $Ledger->extra_info(); - - echo ''; - - - echo ''; - - echo HtmlInput::submit("record", _("Enregistrement"), 'onClick="return verify_ca(\'\');"'); - echo HtmlInput::submit('correct', _("Corriger")); - echo ''; - echo '
    '; /* tab_id */ - echo '
    '; - ?> - -'; - return; - - return; - } -} -//------------------------------ -/* Record the invoice */ -//------------------------------ - -if (isset($_POST['record'])) -{ - $Ledger = new Acc_Ledger_Purchase($cn, $_POST['p_jrn']); - try - { - $Ledger->verify($_POST); - } - catch (Exception $e) - { - alert($e->getMessage()); - $p_msg=$e->getMessage(); - $correct = 1; - } - // record the invoice - if (!isset($correct)) - { - echo '
    '; - - $Ledger = new Acc_Ledger_Purchase($cn, $_POST['p_jrn']); - $internal = $Ledger->insert($_POST); - - - /* Save the predefined operation */ - if ( isset($_POST['opd_name']) && trim($_POST['opd_name']) != "" ) - { - $opd = new Pre_op_ach($cn); - $opd->get_post(); - $opd->save(); - } - - /* Show button */ - $jr_id = $cn->get_value('select jr_id from jrn where jr_internal=$1', array($internal)); - - echo '

    '._('Enregistrement').'

    '; - /* Save the additional information into jrn_info */ - $obj = new Acc_Ledger_Info($cn); - $obj->save_extra($Ledger->jr_id, $_POST); - //printf('%s
    ', $jr_id, dossier::id(), $internal); - // Feedback - echo $Ledger->confirm($_POST, true); - if (isset($Ledger->doc)) - { - echo '

    '._('Document').'

    '; - echo $Ledger->doc; - } - // extourne - if (isset($_POST['reverse_ck'])) - { - $p_date=HtmlInput::default_value_post('reverse_date', ''); - if (isDate($p_date)==$p_date) - { - // reverse the operation - try - { - $Ledger->reverse($p_date); - echo '

    '; - echo _('Extourné au ').$p_date; - echo '

    '; - } - catch (Exception $e) - { - echo '

    '._('Opération non extournée'). - $e->getMessage(). - '

    '; - } - } - else - { - // warning because date is invalid - echo '

    '._('Date invalide, opération non extournée').'

    '; - } - } - echo $Ledger->button_new_operation(); - echo '
    '; - return; - } -} -// ------------------------------ -/* Display a blank form or a form with predef operation */ -/* or a form for correcting */ -// ------------------------------ - -echo '
    '; -// - - -$array = (isset($_POST['correct']) || isset($correct)) ? $_POST : null; -$Ledger = new Acc_Ledger_Purchase($cn, 0); - - -if (!isset($_REQUEST ['p_jrn'])) -{ - $def_ledger = $Ledger->get_first('ach',2); - if ( empty ($def_ledger)) - { - exit('Pas de journal disponible'); - } - $Ledger->id = $def_ledger['jrn_def_id']; -} -else - $Ledger->id = $_REQUEST ['p_jrn']; - -if (isset ($_REQUEST['p_jrn_predef'])){ - $Ledger->id=$_REQUEST['p_jrn_predef']; -} -// pre defined operation -// -echo '
    '; -echo HtmlInput::hidden('p_jrn_predef', $Ledger->id); -$op = new Pre_op_ach($cn); -$op->set('ledger', $Ledger->id); -$op->set('ledger_type', "ACH"); -$op->set('direct', 'f'); -$url=http_build_query(array('p_jrn_predef'=>$Ledger->id,'ac'=>$_REQUEST['ac'],'gDossier'=>dossier::id())); -echo $op->form_get('do.php?'.$url); -echo '
    '; -echo '
    '; - -if ( is_msie() == 0 ) - echo '
    '; -else - echo '
    '; - -echo '

    '.$p_msg.'

    '; -try -{ - echo "
    "; - /* request for a predefined operation */ - if (isset($_REQUEST['pre_def'])&&!isset($_POST['correct'])) - { - // used a predefined operation - // - $op=new Pre_op_ach($cn); - $op->set_od_id($_REQUEST['pre_def']); - $p_post=$op->compute_array(); - $Ledger->id=$_REQUEST ['p_jrn_predef']; - $p_post['p_jrn']=$Ledger->id; - echo $Ledger->input($p_post); - echo '
    '; - echo $Ledger->input_paid(); - echo '
    '; - echo ''; - } - else - { - echo $Ledger->input($array); - echo HtmlInput::hidden("p_action", "ach"); - echo HtmlInput::hidden("sa", "p"); - echo '
    '; - echo $Ledger->input_paid(); - echo '
    '; - echo ''; - } - echo '
    '; - echo HtmlInput::button('act', _('Actualiser'), - 'onClick="compute_all_ledger();"'); - echo HtmlInput::submit("view_invoice", _("Enregistrer")); - echo HtmlInput::reset(_('Effacer ')); - echo '
    '; - echo "
    "; -} -catch (Exception $e) -{ - alert($e->getMessage()); - return; -} -if (!isset($_POST['e_date']) && $g_parameter->MY_DATE_SUGGEST=='Y') - echo create_script(" get_last_date()"); -echo create_script(" update_name()"); -echo '
    '; - - -return; -// end record invoice -?> \ No newline at end of file diff --git a/sources/include/compta_fin.inc.php b/sources/include/compta_fin.inc.php deleted file mode 100644 index f818bf5..0000000 --- a/sources/include/compta_fin.inc.php +++ /dev/null @@ -1,164 +0,0 @@ -id=$_REQUEST['p_jrn']; -else -{ - $def_ledger=$Ledger->get_first('fin'); - if ( empty ($def_ledger)) - { - exit('Pas de journal disponible'); - } - $Ledger->id=$def_ledger['jrn_def_id']; -} -$jrn_priv=$g_user->get_ledger_access($Ledger->id); -// Check privilege -if ( isset($_REQUEST['p_jrn']) && ( $jrn_priv == 'X')) -{ - NoAccess(); - exit -1; -} -$p_msg=""; -//---------------------------------------- -// Confirm the operations -//---------------------------------------- -if ( isset($_POST['save'])) -{ - try - { - $Ledger->verify($_POST); - } - catch (Exception $e) - { - alert($e->getMessage()); - $p_msg=$e->getMessage(); - $correct=1; - } - if ( ! isset ($correct )) - { - echo '
    '; - echo h1(_('Confirmation'),''); - echo_warning(_("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer")); - echo '
    '; - echo HtmlInput::hidden('ac',$_REQUEST['ac']); - echo $Ledger->confirm($_POST); - echo HtmlInput::submit('confirm',_('Confirmer')); - echo HtmlInput::submit('correct',_('Corriger')); - - echo '
    '; - echo '
    '; - return; - } -} -//---------------------------------------- -// Confirm and save the operations -// into the database -//---------------------------------------- -if ( isset($_POST['confirm'])) -{ - try - { - $Ledger->verify($_POST); - } - catch (Exception $e) - { - alert($e->getMessage()); - $p_msg=$e->getMessage(); - $correct=1; - } - if ( !isset($correct)) - { - echo '
    '; - echo '

    ' . $Ledger->get_name() . '

    '; - echo '
    '; - - echo '
    '; - $a= $Ledger->insert($_POST); - echo '

    '._('Enregistrement').'

    '; - echo '
    '; - echo $a; - echo '
    '; - - echo '
    '; - echo $Ledger->button_new_operation(); - return; - } -} -//---------------------------------------- -// Correct the operations -//---------------------------------------- -if ( isset($_POST['correct'])) -{ - $correct=1; -} -//---------------------------------------- -// Blank form -//---------------------------------------- -echo '
    '; - -echo '

    '.$p_msg.'

    '; - -echo '
    '; -echo HtmlInput::hidden('ledger_type','fin'); -echo HtmlInput::hidden('ac',$_REQUEST['ac']); -$array=( isset($correct))?$_POST:null; - -// show select ledger -try -{ - echo $Ledger->input($array); - - echo HtmlInput::button('add_item',_('Ajout article'), ' onClick="ledger_fin_add_row()"'); - echo HtmlInput::submit('save',_('Sauve')); - echo HtmlInput::reset(_('Effacer')); - - if ( ! isset ($_POST['e_date'])&& $g_parameter->MY_DATE_SUGGEST=='Y') - { - echo create_script(" get_last_date();ajax_saldo('first_sold');"); - }else { - echo create_script(" ajax_saldo('first_sold');"); - } - echo create_script(" update_name()"); -} catch (Exception $ex) { - echo $ex->getMessage(); -} -return; \ No newline at end of file diff --git a/sources/include/compta_fin_rec.inc.php b/sources/include/compta_fin_rec.inc.php deleted file mode 100644 index 080f6f5..0000000 --- a/sources/include/compta_fin_rec.inc.php +++ /dev/null @@ -1,218 +0,0 @@ -'; -$Ledger = new Acc_Ledger_Fin($cn, 0); -if (!isset($_REQUEST['p_jrn'])) -{ - $a = $Ledger->get_first('fin'); - $Ledger->id = $a['jrn_def_id']; -} -else - $Ledger->id = $_REQUEST['p_jrn']; -$jrn_priv = $g_user->get_ledger_access($Ledger->id); -if (isset($_GET["p_jrn"]) && $jrn_priv == "X") -{ - NoAccess(); - return; -} -//------------------------- -// save -//------------------------- -if (isset($_POST['save'])) -{ - if (trim($_POST['ext']) != '' && isset($_POST['op'])) - { - $array = $_POST['op']; - $tot = 0; - $cn->start(); - for ($i = 0; $i < count($array); $i++) - { - $cn->exec_sql('update jrn set jr_pj_number=$1 where jr_id=$2', array($_POST['ext'], $array[$i])); - $tot = bcadd($tot, $cn->get_value('select qf_amount from quant_fin where jr_id=$1', array($array[$i]))); - } - $diff = bcsub($_POST['end_extrait'], $_POST['start_extrait']); - if ($diff != 0 && $diff != $tot) - { - $remain=bcsub($tot,$diff); - $cn->rollback(); - alert("D'après l'extrait il y aurait du avoir un montant de $diff à rapprocher alors qu'il y a $tot rapprochés, mise à jour annulée, la différence est de $remain"); - echo '
    '; - echo '

    '.$g_failed._("D'après l'extrait il y aurait du avoir un montant de $diff à rapprocher alors qu'il y a $tot rapprochés, la différence est de $remain
    mise à jour annulée").'

    '; - echo '
    '; - } - else - { - echo '
    '.$g_succeed.' Mise à jour extrait '.$_POST['ext'].'
    '; - } - - $cn->commit(); - } -} -//------------------------- -// show the operation of this ledger -// without receipt number -//------------------------- -echo '
    '; -echo ''; -echo HtmlInput::get_to_hidden(array('gDossier', 'ledger_type', 'ac', 'sa')); -$wLedger = $Ledger->select_ledger('FIN', 3); -if ($wLedger == null) - exit('Pas de journal disponible'); -echo '
    '; -echo '

    ' . $Ledger->get_name() . '

    '; -echo '
    '; -$wLedger->javascript = "onchange='this.form.submit()';"; -echo $wLedger->input(); -echo HtmlInput::submit('ref', 'Rafraîchir'); -echo ''; -echo '' . hb(h($Ledger->get_bank_name())) . ''; - -echo '
    '; - -echo dossier::hidden(); -echo HtmlInput::get_to_hidden(array('sa', 'p_action', 'p_jrn')); - -$operation = $cn->get_array("select jr_id,jr_internal, - jr_comment, - to_char(jr_date,'DD.MM.YYYY') as fmt_date, - jr_montant, - to_char(jr_date,'YYYYMMDD') as raw_date - from jrn where jr_def_id=$1 and (jr_pj_number is null or jr_pj_number='') order by jr_date", array($Ledger->id)); - -echo '

    '; -$iextrait = new IText('ext'); -if ( isset ($_POST['ext'])) $iextrait->value=$_POST['ext']; else $iextrait->value = $Ledger->guess_pj(); -$nstart_extrait = new INum('start_extrait'); -if( isset($_POST['start_extrait'])) $nstart_extrait->value=$_POST['start_extrait']; -$nend_extrait = new INum('end_extrait'); -if( isset($_POST['end_extrait'])) $nend_extrait->value=$_POST['end_extrait']; - -echo "Extrait / relevé :" . $iextrait->input(); -echo 'solde Début' . $nstart_extrait->input(); -echo 'solde Fin' . $nend_extrait->input(); -echo IButton::tooggle_checkbox('rec1'); -echo '

    '; -echo '

    '; -echo _('Filtre').HtmlInput::infobulle(25); -echo HtmlInput::filter_table("t_rec_bk", "0,1,2,3","1"); -echo '

    '; -echo HtmlInput::submit('save', 'Mettre à jour le n° de relevé bancaire'); -echo ''; - - - echo ''; -echo ''; -$r =''; -$r.=th('Libellé'); -$r.=th('N° interne'); -$r.=th('Montant', ' style="text-align:right"'); -$r.=th('Selection', ' style="text-align:center" '); -echo tr($r); -$iradio = new ICheckBox('op[]'); -$tot_not_reconcilied = 0; -$diff = 0; -for ($i = 0; $i < count($operation); $i++) -{ - $row = $operation[$i]; - $r = ''; - $js = HtmlInput::detail_op($row['jr_id'], $row['jr_internal']); - $r.=''; - $r.=td($row['jr_comment']); - $r.=td($js); - $amount=$cn->get_value('select qf_amount from quant_fin where jr_id=$1', array($row['jr_id'])); - $r.=''; - - $diff=bcadd($diff,$amount); - $tot_not_reconcilied+=$row['jr_montant']; - $iradio->value = $row['jr_id']; - $iradio->selected=false; - if (isset($_POST['op'])) - { - for ($x=0;$xselected=true; - break; - } - } - } - $r.=td(HtmlInput::hidden('jrid['.$i.']', $row['jr_id']) . $iradio->input(), ' style="text-align:center" '); - if ($i % 2 == 0) - echo tr($r, ' class="odd" '); - else - echo tr($r,' class="even" '); -} -echo '
    '.'Date '.HtmlInput::infobulle(17).' ▴'.''.$row['fmt_date'].''.nbm ($amount).'
    '; -$bk_card = new Fiche($cn); -$bk_card->id = $Ledger->get_bank(); -$filter_year = " j_tech_per in (select p_id from parm_periode where p_exercice='" . $g_user->get_exercice() . "')"; - -/* get saldo for not reconcilied operations */ -$saldo_not_reconcilied = $bk_card->get_solde_detail($filter_year . " and j_grpt in (select jr_grpt_id from jrn where trim(jr_pj_number) ='' or jr_pj_number is null)"); - -/* get saldo for reconcilied operation */ -$saldo_reconcilied = $bk_card->get_solde_detail($filter_year . " and j_grpt in (select jr_grpt_id from jrn where trim(jr_pj_number) != '' and jr_pj_number is not null)"); - -/* solde compte */ -$saldo = $bk_card->get_solde_detail($filter_year); - -echo ''; -echo ''; -echo td("Solde compte "); -echo td(nbm(bcsub($saldo['debit'] , $saldo['credit'])), ' style="text-align:right"'); -echo ''; - -echo ''; -echo td("Solde non rapproché "); -echo td(nbm (bcsub($saldo_not_reconcilied['debit'], $saldo_not_reconcilied['credit'])), ' style="text-align:right"'); -echo ''; - -echo ''; -echo td("Solde rapproché "); -echo td(nbm(bcsub($saldo_reconcilied['debit'] , $saldo_reconcilied['credit'])), ' style="text-align:right"'); -echo ''; - - -echo ''; -echo td("Total montant "); -echo td(nbm ($tot_not_reconcilied), ' style="text-align:right"'); -echo ''; - -echo '
    '; - -echo HtmlInput::submit('save', 'Mettre à jour le n° de relevé bancaire'); -echo '
    '; -echo '
    '; -return; -?> diff --git a/sources/include/compta_fin_saldo.inc.php b/sources/include/compta_fin_saldo.inc.php deleted file mode 100644 index 48e285e..0000000 --- a/sources/include/compta_fin_saldo.inc.php +++ /dev/null @@ -1,127 +0,0 @@ -'; - $fiche=new Fiche($cn); - - $array=$fiche->get_bk_account(); - - echo '
    '; - echo dossier::hidden(); - echo _('Filtre :').HtmlInput::filter_table("fin_saldo_tb", '0,1,2,3', '1'); - echo ''; - echo tr(th('Quick Code',' class=" sorttable_sorted_reverse"',HtmlInput::infobulle(17).' ▴') - .th('Compte en banque',' style="text-align:left"') - .th('Journal',' style="text-align:center"') - .th('Description',' style="text-align:center"') - .th('solde opération',' style="text-align:right" class="sorttable_numeric"') - .th('solde extrait/relevé',' style="text-align:right" class="sorttable_numeric"') - .th('différence',' style="text-align:right" class="sorttable_numeric"') - ); - // Filter the saldo - // on the current year - $filter_year=" j_tech_per in (select p_id from parm_periode where p_exercice='".$g_user->get_exercice()."')"; - // for highligting tje line - $idx=0; - bcscale(2); - $tot_extrait=0;$tot_diff=0;$tot_operation=0; - // for each account - for ( $i = 0; $i < count($array);$i++) - { - if ( $array[$i]->id==0) { - echo ''; - echo td(h2("Journal mal configuré",' class="error" '),' colspan="5" style="width:auto" '); - echo ''; - continue; - } - // get the saldo - $m=$array[$i]->get_solde_detail($filter_year); - - $solde=$m['debit']-$m['credit']; - - // print the result if the saldo is not equal to 0 - if ( $m['debit'] != 0.0 || $m['credit'] != 0.0) - { - /* get saldo for not reconcilied operations */ - $saldo_not_reconcilied=$array[$i]->get_bk_balance($filter_year." and (trim(jr_pj_number) ='' or jr_pj_number is null)" ); - - /* get saldo for reconcilied operation */ - - $saldo_reconcilied=$array[$i]->get_bk_balance($filter_year." and ( trim(jr_pj_number) != '' and jr_pj_number is not null)" ); - - if ( $idx%2 != 0 ) - $odd="odd"; - else - $odd="even"; - - $idx++; - echo ""; - echo ""; - - $saldo_rec=bcsub($saldo_reconcilied['debit'],$saldo_reconcilied['credit']); - $diff=bcsub($saldo_not_reconcilied['debit'],$saldo_not_reconcilied['credit']); - echo "". - td(h($array[$i]->ledger_name)). - td(h($array[$i]->ledger_description)). - '". - '". - '". - ""; - $tot_extrait=bcadd($tot_extrait,$solde); - $tot_operation=bcadd($tot_operation,$saldo_rec); - $tot_diff=bcadd($tot_diff,$diff); - } - }// for - echo ''; - echo ''; - echo td(''); - echo td(''); - echo td(''); - echo td(' TOTAUX ','style="font-weight:bold"'); - echo td(nbm($tot_extrait),'style="font-weight:bold" class="num"'); - echo td(nbm($tot_operation),' style="font-weight:bold" class="num"'); - echo td(nbm($tot_diff),' style="font-weight:bold" class="num"'); - echo ''; - - echo ''; - echo "
    ". - IButton::history_card($array[$i]->id,$array[$i]->strAttribut(ATTR_DEF_QUICKCODE)). - "". - $array[$i]->strAttribut(ATTR_DEF_NAME). - "'. - nbm($solde). - "'. - nbm($saldo_rec). - "'. - nbm($diff). - "
    "; - echo "
    "; - return; -?> diff --git a/sources/include/compta_ods.inc.php b/sources/include/compta_ods.inc.php deleted file mode 100644 index a760c3f..0000000 --- a/sources/include/compta_ods.inc.php +++ /dev/null @@ -1,145 +0,0 @@ -get_first('ODS'); -if ( empty ($first_ledger)) -{ - exit('Pas de journal disponible'); -} -$ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id_ledger; - -/**\brief show a form for quick_writing */ -$def = -1; -$ledger->with_concerned = true; - - - - -if ($g_user->check_jrn($ledger->id) == 'X') -{ - NoAccess(); - exit - 1; -} -$p_msg=""; -if (!isset($_POST['summary']) && !isset($_POST['save'])) -{ - require('operation_ods_new.inc.php'); - return; -} -elseif (isset($_POST['summary'])) -{ - try { - $ledger->verify($_POST); - require_once NOALYSS_INCLUDE.'/operation_ods_confirm.inc.php'; - } catch (Exception $e) - { - echo alert($e->getMessage()); - $p_msg=$e->getMessage(); - require('operation_ods_new.inc.php'); - - } - return; -} -elseif (isset($_POST['save'])) -{ - $array = $_POST; - echo '
    '; - try - { - $ledger->save($array); - $jr_id = $cn->get_value('select jr_id from jrn where jr_internal=$1', array($ledger->internal)); - - echo '

    Opération enregistrée Piece ' . h($ledger->pj) . '

    '; - if (strcmp($ledger->pj, $_POST['e_pj']) != 0) - { - echo '

    ' . _('Attention numéro pièce existante, elle a du être adaptée') . '

    '; - } - printf('%s
    ', $jr_id, dossier::id(), $ledger->internal); - - // show feedback - echo '
    '; echo '

    ' . $ledger->get_name() . '

    '; echo '
    '; - echo $ledger->confirm($_POST, true); - // extourne - if (isset($_POST['reverse_ck'])) - { - $p_date=HtmlInput::default_value_post('reverse_date', ''); - if (isDate($p_date)==$p_date) - { - // reverse the operation - try - { - $ledger->reverse($p_date); - echo '

    '; - echo _('Extourné au ').$p_date; - echo '

    '; - } - catch (Exception $e) - { - echo '

    '._('Opération non extournée'). - $e->getMessage(). - '

    '; - - } - } - else - { - // warning because date is invalid - echo '

    '._('Date invalide, opération non extournée').'

    '; - } - } - - echo $ledger->button_new_operation(); - - } - catch (Exception $e) - { - require('operation_ods_new.inc.php'); - alert($e->getMessage()); - $p_msg=$e->getMessage(); - } - echo '
    '; - return; -} -return; - diff --git a/sources/include/compta_ven.inc.php b/sources/include/compta_ven.inc.php deleted file mode 100644 index 13029b4..0000000 --- a/sources/include/compta_ven.inc.php +++ /dev/null @@ -1,341 +0,0 @@ -check_jrn($_REQUEST['p_jrn']) != 'W' ) - { - - NoAccess(); - exit -1; - } - - /* if a new invoice is encoded, we display a form for confirmation */ - if ( isset ($_POST['view_invoice'] ) ) - { - $Ledger=new Acc_Ledger_Sold($cn,$_POST['p_jrn']); - try - { - $Ledger->verify($_POST); - } - catch (Exception $e) - { - alert($e->getMessage()); - $p_msg=$e->getMessage(); - $correct=1; - } - // if correct is not set it means it is correct - if ( ! isset($correct)) - { - echo '
    '; - - echo '
    '; - echo h1(_("Confirmation")); - echo '
    '; - - echo '
    '; - echo h2(_("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer"),' class="notice"'); - echo '
    '; - - echo '
    '; - echo '
    '; - echo dossier::hidden(); - echo $Ledger->confirm($_POST ); - echo HtmlInput::hidden('ac',$_REQUEST['ac']); - ?> -
    - - -select_depot(false, -1); - echo $Ledger->extra_info(); - echo ''; - - - echo ''; - - echo HtmlInput::hidden('ac',$_REQUEST['ac']); - echo HtmlInput::submit("record",_("Enregistrement"),'onClick="return verify_ca(\'\');"'); - echo HtmlInput::submit('correct',_("Corriger")); - echo ''; - echo '
    '; - echo '
    '; /* tab_id */ -?> - -'; - return; - } - } - //------------------------------ - /* Record the invoice */ - //------------------------------ - - if ( isset($_POST['record']) ) - { -// Check privilege - if ( $g_user->check_jrn($_REQUEST['p_jrn']) != 'W' ) - { - - NoAccess(); - exit -1; - } - - $Ledger=new Acc_Ledger_Sold($cn,$_POST['p_jrn']); - try - { - $Ledger->verify($_POST); - } - catch (Exception $e) - { - alert($e->getMessage()); - $correct=1; - } - - if ( ! isset($correct)) - { - if ( is_msie() == 0 ) - echo '
    '; - else - echo '
    '; - - $Ledger=new Acc_Ledger_Sold($cn,$_POST['p_jrn']); - $internal=$Ledger->insert($_POST); - - /* Save the predefined operation */ - if ( isset($_POST['opd_name']) && trim($_POST['opd_name']) != "" ) - { - $opd=new Pre_op_ven($cn); - $opd->get_post(); - $opd->save(); - } - - /* Show button */ - echo '

    Enregistrement

    '; - - echo $Ledger->confirm($_POST,true); - /* Show link for Invoice */ - if (isset ($Ledger->doc) ) - { - echo '

    Document

    '; - echo $Ledger->doc; - } - - - /* Save the additional information into jrn_info */ - $obj=new Acc_Ledger_Info($cn); - $obj->save_extra($Ledger->jr_id,$_POST); - // extourne - if (isset($_POST['reverse_ck'])) - { - $p_date=HtmlInput::default_value_post('reverse_date', ''); - if (isDate($p_date)==$p_date) - { - // reverse the operation - try - { - $Ledger->reverse($p_date); - echo '

    '; - echo _('Extourné au ').$p_date; - echo '

    '; - - } - catch (Exception $e) - { - echo '

    '._('Opération non extournée'). - $e->getMessage(). - '

    '; - } - } - else - { - // warning because date is invalid - echo '

    '._('Date invalide, opération non extournée').'

    '; - } - } - - echo $Ledger->button_new_operation(); - - echo '
    '; - return; - } - } - // ------------------------------ - /* Display a blank form or a form with predef operation */ - // ------------------------------ - - $array=(isset($_POST['correct'])||isset ($correct))?$_POST:null; - $Ledger=new Acc_Ledger_Sold($cn,0); -// -// pre defined operation -// -if ( is_msie() == 0 ) - echo '
    '; -else - echo '
    '; - -if (!isset($_REQUEST ['p_jrn'])) -{ - $def_ledger=$Ledger->get_first('ven', 2); - if (empty($def_ledger)) - { - exit('Pas de journal disponible'); - } - $Ledger->id=$def_ledger['jrn_def_id']; -} -else - $Ledger->id=$_REQUEST ['p_jrn']; -if (isset($_REQUEST['p_jrn_predef'])) -{ - $Ledger->id=$_REQUEST['p_jrn_predef']; -} - -echo '
    '; -echo HtmlInput::hidden('p_jrn_predef', $Ledger->id); -$op=new Pre_op_ven($cn); -$op->set('ledger',$Ledger->id); -$op->set('ledger_type',"VEN"); -$op->set('direct','f'); -$url=http_build_query(array('p_jrn_predef'=>$Ledger->id,'ac'=>$_REQUEST['ac'],'gDossier'=>dossier::id())); -echo $op->form_get('do.php?'.$url); -echo '
    '; - -echo '
    '; -echo '

    '.$p_msg.'

    '; -try -{ - echo "
    "; - /* request for a predefined operation */ - if (isset($_REQUEST['pre_def'])&&!isset($_POST['correct'])) - { - // used a predefined operation - // - $op=new Pre_op_ven($cn); - $op->set_od_id($_REQUEST['pre_def']); - $p_post=$op->compute_array(); - $Ledger->id=$_REQUEST ['p_jrn_predef']; - - echo $Ledger->input($p_post); - echo '
    '; - echo $Ledger->input_paid(); - echo '
    '; - echo ''; - } - else if (isset($_GET['create_invoice'])) - { - $array=$Ledger->convert_from_follow($_GET ['ag_id']); - echo HtmlInput::hidden("ledger_type", "VEN"); - echo HtmlInput::hidden("ac", $_REQUEST['ac']); - echo HtmlInput::hidden("sa", "p"); - echo $Ledger->input($array); - echo '
    '; - echo $Ledger->input_paid(); - echo '
    '; - echo ''; - } - else - { - echo HtmlInput::hidden("ledger_type", "VEN"); - echo HtmlInput::hidden("ac", $_REQUEST['ac']); - echo HtmlInput::hidden("sa", "p"); - - echo $Ledger->input($array); - echo '
    '; - echo $Ledger->input_paid(); - echo '
    '; - echo ''; - } -} -catch (Exception $e) -{ - alert($e->getMessage()); - return; -} -echo '
    '; - - - echo HtmlInput::button('act',_('Actualiser'),'onClick="compute_all_ledger();"'); - echo HtmlInput::submit("view_invoice",_("Enregistrer")); - echo HtmlInput::reset(_('Effacer ')); - echo '
    '; - echo "
    "; - - /* if we suggest the pj n# the run the script */ - if ( $g_parameter->MY_PJ_SUGGEST=='Y') - { - echo ''; - } - if (!isset($_POST['e_date']) && $g_parameter->MY_DATE_SUGGEST=='Y') - { - echo create_script(" get_last_date()"); - } -echo create_script(" update_name()"); -return; -?> diff --git a/sources/include/config.inc b/sources/include/config.inc deleted file mode 100644 index 7f0b1c4..0000000 --- a/sources/include/config.inc +++ /dev/null @@ -1,63 +0,0 @@ - diff --git a/sources/include/config_file.php b/sources/include/config_file.php deleted file mode 100644 index 11a82f7..0000000 --- a/sources/include/config_file.php +++ /dev/null @@ -1,192 +0,0 @@ -size=25; - - $iclocale=new ISelect('clocale'); - $iclocale->value=array( - array("value"=>1,"label"=>"Activé"), - array("value"=>0,"label"=>"Désactivé") - ); - $iclocale->selected=1; - - $icpath=new IText("cpath",$cpath); - $icpath->size=30; - - $icuser=new IText('cuser',$cuser); - $icpasswd=new IText('cpasswd',$cpasswd); - $icport=new IText("cport",$cport); - /* - * For version MONO - */ - $smulti=new ICheckBox('multi'); - $smulti->javascript=' onchange="show_dbname(this)" '; - - $icdbname=new IText('cdbname'); - - require 'template_config_form.php'; -} -/*!\brief create the config file - */ -function config_file_create($p_array,$from_setup=1,$p_os=1) -{ - extract ($p_array); - $add=($from_setup==1)?'..'.DIRECTORY_SEPARATOR:''; - $hFile= fopen($add.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'config.inc.php','w'); - fputs($hFile,''); - fclose($hFile); -} diff --git a/sources/include/constant.php b/sources/include/constant.php deleted file mode 100644 index 04253ac..0000000 --- a/sources/include/constant.php +++ /dev/null @@ -1,272 +0,0 @@ -✖"; -$g_succeed=""; -define ('SMALLX','ⵝ'); -define ('BUTTONADD',"✚"); - -/* uncomment for development */ - -// define ('SVNINFO',6800); -//define ("DEBUG",true); -//define ("LOGINPUT",true); - - - -define ('SVNINFO',6900); -if ( ! defined ('DEBUG')) { - define ("DEBUG",false); -} -if ( ! defined ('LOGINPUT')) { - define ("LOGINPUT",false); -} - -$version_noalyss=SVNINFO; - -// If you don't want to be notified of the update -if ( !defined("SITE_UPDATE")) - define ("SITE_UPDATE",'http://www.noalyss.eu/last_version.txt'); -if ( !defined("SITE_UPDATE_PLUGIN")) - define ("SITE_UPDATE_PLUGIN",'http://www.noalyss.eu/plugin_last_version.txt'); - - -define ("DBVERSION",121); -define ("MONO_DATABASE",25); -define ("DBVERSIONREPO",16); -define ('NOTFOUND','--not found--'); -define ("MAX_COMPTE",4); -define ('MAX_ARTICLE',5); -define ('MAX_ARTICLE_STOCK',20); -define ('MAX_CAT',15); -define ('MAX_CARD_SEARCH',550); -define ('MAX_FORECAST_ITEM',10); -define ('MAX_PREDEFINED_OPERATION',50); -define ('MAX_COMPTE_CARD',4); -define ('COMPTA_MAX_YEAR',2100); -define ('COMPTA_MIN_YEAR',1900); -define ('MAX_RECONCILE',25); -define ('MAX_QCODE',4); -define ('MAX_SEARCH_CARD',20); -define ('MAX_FOLDER_TO_SHOW',20); -define ('MAX_ACTION_SHOW',20); - -if ( DEBUG ) { - error_reporting(2147483647); - ini_set("display_errors",1); - ini_set("display_startup_errors",1); - ini_set("html_errors",1); - ini_set('log_errors',1); - ini_set('log_errors_max_len',0); -} -else { - // Rapporte les erreurs d'exécution de script - error_reporting(E_ERROR | E_WARNING | E_PARSE|E_NOTICE); - ini_set("display_errors",0); - ini_set("html_errors",0); - ini_set('log_errors',1); - ini_set('log_errors_max_len',0); -} -// Erreur -define ("NOERROR",0); -define ("BADPARM",1); -define ("BADDATE",2); -define ("NOTPERIODE",3); -define ("PERIODCLOSED",4); -define ("INVALID_ECH",5); -define ("RAPPT_ALREADY_USED",6); -define ("RAPPT_NOT_EXIST",7); -define ("DIFF_AMOUNT",8); -define ("RAPPT_NOMATCH_AMOUNT",9); -define ("NO_PERIOD_SELECTED",10); -define ("NO_POST_SELECTED",11); -define ("LAST",1); -define ("FIRST",0); -define ("ERROR",12); - -//!\enum ACTION defines document_type for action -define('ACTION','1,5,6,7,8'); - -//valeurs standardd -define ("YES",1); -define ("NO",0); -define ("OPEN",1); -define ("CLOSED",0); -define ("NOTCENTRALIZED",3); -define ("ALL",4); - -// Pour les ShowMenuComptaLeft -define ("MENU_FACT",1); -define ("MENU_FICHE",2); -define ("MENU_PARAM",3); - -// for the fiche_inc.GetSqlFiche function -define ("ALL_FICHE_DEF_REF", 1000); - -// fixed value for attr_def data -define ("ATTR_DEF_ACCOUNT",5); -define ("ATTR_DEF_NAME",1); -define ("ATTR_DEF_BQ_NO",3); -define ("ATTR_DEF_BQ_NAME",4); -define ("ATTR_DEF_PRIX_ACHAT",7); -define ("ATTR_DEF_PRIX_VENTE",6); -define ("ATTR_DEF_TVA",2); -define ("ATTR_DEF_NUMTVA",13); -define ("ATTR_DEF_ADRESS",14); -define ("ATTR_DEF_CP",15); -define ("ATTR_DEF_PAYS",16); -define ("ATTR_DEF_STOCK",19); -define ("ATTR_DEF_TEL",17); -define ("ATTR_DEF_EMAIL",18); -define ("ATTR_DEF_CITY",24); -define ("ATTR_DEF_COMPANY",25); -define ("ATTR_DEF_FAX",26); -define ("ATTR_DEF_NUMBER_CUSTOMER",30); -define ("ATTR_DEF_DEP_PRIV",31); -define ("ATTR_DEF_DEPENSE_NON_DEDUCTIBLE",20); -define ("ATTR_DEF_TVA_NON_DEDUCTIBLE",21); -define ("ATTR_DEF_TVA_NON_DEDUCTIBLE_RECUP",22); -define ("ATTR_DEF_QUICKCODE",23); -define ("ATTR_DEF_FIRST_NAME",32); - -define( 'ATTR_DEF_ACCOUNT_ND_TVA',50); -define('ATTR_DEF_ACCOUNT_ND_TVA_ND',51); -define ('ATTR_DEF_ACCOUNT_ND_PERSO',52); -define ('ATTR_DEF_ACCOUNT_ND',53); - -define ("FICHE_TYPE_CLIENT",9); -define ("FICHE_TYPE_VENTE",1); -define ("FICHE_TYPE_FOURNISSEUR",8); -define ("FICHE_TYPE_FIN",4); -define ("FICHE_TYPE_CONTACT",16); -define ("FICHE_TYPE_EMPL",25); -define ("FICHE_TYPE_ADM_TAX",14); -define ("FICHE_TYPE_ACH_MAR",2); -define ("FICHE_TYPE_ACH_SER",3); -define ("FICHE_TYPE_ACH_MAT",7); -define ("FICHE_TYPE_PROJET",26); -define ("FICHE_TYPE_MATERIAL",7); - -/** - * -- pour utiliser unoconv démarrer un server libreoffice - * commande - * libreoffice --headless --accept="socket,host=127.0.0.1,port=2002;urp;" --nofirststartwizard - * ou - * unoconv -l -v -s localhost - */ -define ('OFFICE','unoconv '); -define ('GENERATE_PDF','YES'); - -/** - * Pour conversion GIF en PDF - */ -$convert_gif_pdf='/usr/bin/convert'; -if (file_exists($convert_gif_pdf)) -{ - define ('CONVERT_GIF_PDF',$convert_gif_pdf); -} else { - define ('CONVERT_GIF_PDF','NOT'); - -} - -/** - * Outil pour manipuler les PDF - */ -$pdftk='/usr/bin/pdftk'; -if (file_exists($pdftk)) -{ - define ('PDFTK',$pdftk); -} -else -{ - define ('PDFTK','NOT'); -} - - -define ('JS_INFOBULLE',' -
    - '); - - -// Sql string -define ("SQL_LIST_ALL_INVOICE",""); - -define ("SQL_LIST_UNPAID_INVOICE"," (jr_rapt is null or jr_rapt = '') and jr_valid = true " - ); - - -define ("SQL_LIST_UNPAID_INVOICE_DATE_LIMIT" ," - where (jr_rapt is null or jr_rapt = '') - and to_date(to_char(jr_ech,'DD.MM.YYYY'),'DD.MM.YYYY') < to_date(to_char(now(),'DD.MM.YYYY'),'DD.MM.YYYY') - and jr_valid = true" ); -?> diff --git a/sources/include/constant.security.php b/sources/include/constant.security.php deleted file mode 100644 index 1c87b6c..0000000 --- a/sources/include/constant.security.php +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/sources/include/contact.inc.php b/sources/include/contact.inc.php deleted file mode 100644 index 832fe00..0000000 --- a/sources/include/contact.inc.php +++ /dev/null @@ -1,158 +0,0 @@ -check_action(FICADD) == 0 ) - { - alert(_('Vous ne pouvez pas enlever de fiche')); - return; - } - - $f_id = $_REQUEST['f_id']; - - $fiche = new Contact($cn, $f_id); - $fiche->remove(); - $low_action = "list"; - } -} - -//----------------------------------------------------- -// list of contact -//----------------------------------------------------- -if ($low_action == "list") -{ - ?> -
    -
    -
    - value = $cn->make_array('select fd_id, fd_label from fiche_def ' . - ' where frd_id=' . FICHE_TYPE_CONTACT . - ' order by fd_label ', 1); - $sel_card->selected = (isset($_GET['cat'])) ? $_GET['cat'] : -1; - $sel_card->javascript = ' onchange="submit(this);"'; - - echo _('Catégorie :') . $sel_card->input(); - - $sl_company=new ISelect("sel_company"); - $sl_company->value = $cn->make_array('select distinct ad_value,ad_value from fiche_detail as fd' . - ' join fiche as f1 on (f1.f_id=fd.f_id) join fiche_def as fdf on (f1.fd_id=fdf.fd_id) - where - ad_id='.ATTR_DEF_COMPANY. " and frd_id= ".FICHE_TYPE_CONTACT. - ' order by 1', 1); - $sl_company->selected = (isset($_GET['sel_company'])) ? $_GET['sel_company'] : ''; - echo _('Société :') . $sl_company->input(); - - ?> - - -
    -
    - company=$_GET['sel_company']; - } - } - - echo '
    '; - echo $client->Summary($search,"contact",$sql); - - - echo '
    '; - echo '
    '; - echo '
    '; - /* Add button */ - $f_add_button = new IButton('add_card'); - $f_add_button->label = _('Créer une nouvelle fiche'); - $f_add_button->set_attribute('win_refresh', 'yes'); - $f_add_button->set_attribute('type_cat', FICHE_TYPE_CONTACT); - $f_add_button->javascript = " select_card_type(this);"; - echo $f_add_button->input(); - - $f_cat_button=new IButton('add_cat'); - $f_cat_button->set_attribute('ipopup','ipop_cat'); - $f_cat_button->set_attribute('type_cat',FICHE_TYPE_CONTACT); - $f_cat_button->label=_('Ajout d\'une catégorie'); - $f_cat_button->javascript='add_category(this)'; - echo $f_cat_button->input(); - - echo '
    '; - echo '
    '; - - -} -/*---------------------------------------------------------------------- - * Detail for a card, Suivi, Contact, Operation,... * - * cc stands for contact card - *----------------------------------------------------------------------*/ -if ( $low_action == 'detail') -{ - /* Menu */ - require_once NOALYSS_INCLUDE.'/category_card.inc.php'; - return; -} - - html_page_stop(); -?> diff --git a/sources/include/customer.inc.php b/sources/include/customer.inc.php deleted file mode 100644 index 66beaed..0000000 --- a/sources/include/customer.inc.php +++ /dev/null @@ -1,158 +0,0 @@ -check_action(FICADD) == 0) - { - alert(j(_('Vous ne pouvez pas enlever de fiche'))); - return; - } - - $f_id = $_REQUEST['f_id']; - - $fiche = new Customer($cn, $f_id); - $fiche->remove(); - $low_action = "list"; - } -} - -//----------------------------------------------------- -// list of customer -//----------------------------------------------------- -if ($low_action == "list") -{ - ?> -
    -
    -
    - ' . "Exercice " . $g_user->get_exercice() . ''; - $a=(isset($_GET['query']))?$_GET['query']:""; - printf (_('Recherche').' ', - $a); - $choice_cat=HtmlInput::default_value_request("choice_cat", 1); - - if ( $choice_cat == 1 ) - { - $sel_card=new ISelect('cat'); - $sel_card->value=$cn->make_array('select fd_id, fd_label from fiche_def '. - ' where frd_id='.FICHE_TYPE_CLIENT. - ' order by fd_label ',1); - $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1; - $sel_card->javascript=' onchange="submit(this);"'; - echo _('Catégorie :').$sel_card->input(); - } else - { - $cat=HtmlInput::default_value_request('cat', ''); - echo HtmlInput::hidden("cat",$cat); - echo HtmlInput::hidden('choice_cat', 0); - } - $nooperation = new ICheckBox('noop'); - $nooperation->selected = (isset($_GET['noop'])) ? true : false; - echo Dossier::hidden(); - - echo _('Inclure les clients sans opération :') . $nooperation->input(); - ?> - - -
    -
    - '; - echo $client->Summary($search, 'customer', $sql, $noop); - - - echo '
    '; - echo '
    '; - echo '
    '; - /* Add button */ - $f_add_button = new IButton('add_card'); - $f_add_button->class="smallbutton"; - $f_add_button->label = _('Créer une nouvelle fiche'); - $f_add_button->set_attribute('ipopup', 'ipop_newcard'); - $f_add_button->set_attribute('win_refresh', 'yes'); -// $list=$cn->make_list("select fd_id from fiche_def where frd_id=$1",array(FICHE_TYPE_CLIENT)); - $f_add_button->set_attribute('type_cat', FICHE_TYPE_CLIENT); - $f_add_button->javascript = " select_card_type(this);"; - echo $f_add_button->input(); - - $f_cat_button=new IButton('add_cat'); - $f_cat_button->set_attribute('ipopup','ipop_cat'); - $f_cat_button->set_attribute('type_cat',FICHE_TYPE_CLIENT); - $f_cat_button->label=_('Ajout d\'une catégorie'); - $f_cat_button->javascript='add_category(this)'; - echo $f_cat_button->input(); - - echo '
    '; - echo '
    '; - - -} -/*---------------------------------------------------------------------- - * Detail for a card, Suivi, Contact, Operation,... * - * cc stands for customer card - *----------------------------------------------------------------------*/ -if ( $low_action == 'detail') -{ - /* Menu */ - require_once NOALYSS_INCLUDE.'/category_card.inc.php'; - return; -} - - html_page_stop(); -?> diff --git a/sources/include/dashboard.inc.php b/sources/include/dashboard.inc.php deleted file mode 100644 index f9d5f44..0000000 --- a/sources/include/dashboard.inc.php +++ /dev/null @@ -1,49 +0,0 @@ -'; -global $g_user; -/* others report */ -$cal=new Calendar(); -$cal->get_preference(); - -$obj=sprintf("{gDossier:%d,invalue:'%s',outdiv:'%s','distype':'%s'}", - dossier::id(),'per','calendar_zoom_div','cal'); -$Operation=new Follow_Up($cn); -$last_operation=$Operation->get_today(); -$late_operation=$Operation->get_late(); - -$Ledger=new Acc_Ledger($cn,0); -$last_ledger=array(); -$last_ledger=$Ledger->get_last(20); - -// Supplier late and now -$supplier_now=$Ledger->get_supplier_now(); -$supplier_late=$Ledger->get_supplier_late(); - -// Customer late and now -$customer_now=$Ledger->get_customer_now(); -$customer_late=$Ledger->get_customer_late(); - -ob_start(); -require_once NOALYSS_INCLUDE.'/template/dashboard.php'; -$ret=ob_get_contents(); -ob_end_clean(); -echo $ret; - -echo '
    '; -?> diff --git a/sources/include/database.item.php b/sources/include/database.item.php deleted file mode 100644 index ad48c39..0000000 --- a/sources/include/database.item.php +++ /dev/null @@ -1,216 +0,0 @@ -lokal - - - - - - diff --git a/sources/include/default_menu.inc.php b/sources/include/default_menu.inc.php deleted file mode 100644 index 0813c92..0000000 --- a/sources/include/default_menu.inc.php +++ /dev/null @@ -1,47 +0,0 @@ -set('code_follow',$_POST['code_follow']); - $a_default->set('code_invoice',$_POST['code_invoice']); - try - { - $a_default->save(); - echo h2("Sauvé",'class="notice"',$g_succeed); - } catch (Exception $ex) - { - echo h2("Code menu invalide",'class="notice"',$g_failed); - } -} - -echo '
    '; -echo HtmlInput::hidden('ac',$_REQUEST['ac']); -echo Dossier::hidden(); -$a_default->input_value(); -echo HtmlInput::submit('save_menu_default', _("Sauver")); -echo '
    '; -?> \ No newline at end of file diff --git a/sources/include/doc_state.inc.php b/sources/include/doc_state.inc.php deleted file mode 100644 index 4ea6eaf..0000000 --- a/sources/include/doc_state.inc.php +++ /dev/null @@ -1,72 +0,0 @@ -exec_sql('insert into document_state(s_value,s_status) values ($1,$2)',array($_POST['s_value'],'C')); - } - else - { - $cn->exec_sql('insert into document_state(s_value) values ($1)',array($_POST['s_value'])); - } - } -} -$a_stat=$cn->get_array("select s_value,s_status from document_state order by 1"); -?> - - - - - - - - - - -
    - - - -
    -

    Ajout d'un état

    -
    -

    - Nom de l'état input()?> -

    -

    - Cochez la case si cet état ferme une action input()?> - - -

    -
    \ No newline at end of file diff --git a/sources/include/document_modele.inc.php b/sources/include/document_modele.inc.php deleted file mode 100644 index 3859dc3..0000000 --- a/sources/include/document_modele.inc.php +++ /dev/null @@ -1,84 +0,0 @@ -'; -// show the form for adding a template -// -$doc=new Document_modele($cn); - -//----------------------------------------------------- -// Document add a template -//----------------------------------------------------- -if ( $sub_action=='add_document') -{ - require_once NOALYSS_INCLUDE.'/class_document_modele.php'; - $doc=new Document_modele($cn); - $doc->md_name=$_POST['md_name']; - $doc->md_id=-1; // because it is a new model - $doc->md_type=$_POST['md_type']; - $doc->start=$_POST['start_seq']; - $doc->md_affect=$_POST['md_affect']; - $doc->Save(); -} -//----------------------------------------------------- -// Document remove a template -//----------------------------------------------------- -if ( $sub_action=='rm_template') -{ - require_once NOALYSS_INCLUDE.'/class_document_modele.php'; - // Get all the document to remove - - foreach ( $_POST as $name=>$value ) - { - list ($id) = sscanf ($name,"dm_remove_%d"); - if ( $id == null ) continue; - // a document has to be removed - $doc=new Document_modele($cn); - $doc->md_id=$id; - $doc->Delete(); - } - -} -//---------------------------------------------------------------------- -// Document modify a template -//---------------------------------------------------------------------- -if ( $sub_action == 'mod_template') - { - require_once NOALYSS_INCLUDE.'/class_document_modele.php'; - $doc=new Document_modele($cn,$_POST['id']); - $doc->update($_POST); - } -//----------------------------------------------------- -// Default action : Show the list -//----------------------------------------------------- -echo $doc->myList(); -echo ''; - -?> \ No newline at end of file diff --git a/sources/include/dossier.inc.php b/sources/include/dossier.inc.php deleted file mode 100644 index f1d9bd7..0000000 --- a/sources/include/dossier.inc.php +++ /dev/null @@ -1,407 +0,0 @@ -set_parameter('name',$name); - $dos->set_parameter('desc',$desc); - $dos->save(); -} -echo '
    '; -/* - * check and add an new folder - */ -if ( isset ($_POST["DATABASE"]) ) -{ - $repo=new Database(); - $dos=HtmlInput::default_value_post('DATABASE', ""); - $dos=sql_string($dos); - if (strlen($dos)==0) - { - echo _("Le nom du dossier est vide"); - exit -1; - } - /* - * check template encoding - */ - - // Get the modeledef.mod_id - $template=HtmlInput::default_value_post("FMOD_ID",-1); - if ( $template == -1 || isNumber($template ) == 0) - die (_('Parametre invalide')); - /* - * If template is not empty - */ - if ( $template != 0 ) - { - // compute template name - $template_name=domaine.'mod'.$template; - - - $encoding=$repo->get_value("select encoding from pg_database where ". - " datname=$1",array($template_name)); - if ( $encoding != 6 ) - { - alert(_('Désolé vous devez migrer ce modèle en unicode')); - echo ''; - echo _('le modele ').domaine.'mod'.$_POST["FMOD_ID"]._(" doit être migré en unicode."); - echo _('Pour le passer en unicode, faites-en un backup puis restaurez le fichier reçu').''; - echo HtmlInput::button_anchor('Retour','admin_repo.php?action=dossier_mgt'); - return; - } - } - /* - * Insert new dossier with description - */ - $desc=HtmlInput::default_value_post("DESCRIPTION",""); - try - { - $repo->start(); - - $Res=$repo->exec_sql("insert into ac_dossier(dos_name,dos_description) - values ($1,$2)",array($dos,$desc)); - $l_id=$repo->get_current_seq('dossier_id'); - $repo->commit(); - } - catch (Exception $e) - { - $msg=_("Desole la creation de ce dossier a echoue,\n la cause la plus probable est". - ' deux fois le même nom de dossier'); - alert($msg); - $l_id=0; - $repo->rollback(); - - } - // If the id is not null, name successfully inserted - // Database created - - if ( $l_id != 0) - { - /* - * We don't create and empty database - */ - if ($template != 0 ) - { - //-- - // setting the year - //-- - $year=sql_string($_POST['YEAR']); - if ( strlen($year) != 4 || isNumber($year) == 0 || $year > 2100 || $year < 2000 || $year != round($year,0)) - { - echo "$year"._(" est une année invalide"); - $Res=$repo->exec_sql("delete from ac_dossier where dos_id=$l_id"); - } - else - { - $Sql=sprintf("CREATE DATABASE %sDOSSIER%d encoding='UTF8' TEMPLATE %sMOD%d", - domaine, - $l_id, - domaine, - sql_string($_POST["FMOD_ID"])); - ob_start(); - if ( $repo->exec_sql($Sql)==false) - { - echo "[".$Sql."]"; - - //ob_end_clean(); - $repo->exec_sql("delete from ac_dossier where dos_id=$l_id"); - echo "

    "._(" Base de donnée ").domaine."mod".$_POST['FMOD_ID']." ". - _("est accèdée, déconnectez-vous d'abord")."

    "; - exit; - } - ob_flush(); - // Connect to the new database - $cn=new Database($l_id); - //--year -- - $Res=$cn->exec_sql("delete from parm_periode"); - if ( ($year % 4 == 0 && $year % 100 != 0) || $year % 400 == 0 ) - $fev=29; - else - $fev=28; - $Res=$cn->exec_sql("delete from user_local_pref where parameter_type='PERIODE'"); - $nb_day=array(31,$fev,31,30,31,30,31,31,30,31,30,31); - $m=1; - foreach ($nb_day as $day) - { - $p_start=sprintf("01-%d-%s",$m,$year); - $p_end=sprintf("%d-%d-%s",$day,$m,$year); - $sql=sprintf("insert into parm_periode (p_start,p_end,p_exercice) - values (to_date('%s','DD-MM-YYYY'),to_date('%s','DD-MM-YYYY'),'%s')", - $p_start,$p_end,$year); - $Res=$cn->exec_sql($sql); - $m++; - } - $sql=" insert into jrn_periode(p_id,jrn_def_id,status) ". - "select p_id,jrn_def_id, 'OP'". - " from parm_periode cross join jrn_def"; - $Res=$cn->exec_sql($sql); - - Dossier::synchro_admin($l_id); - - - } - } - else { - /* - * An empty database is asked, it is created - */ - $Sql=sprintf("CREATE DATABASE %sDOSSIER%d encoding='UTF8' ", - domaine, - $l_id, - domaine - ); - ob_start(); - if ( $repo->exec_sql($Sql)==false) - { - echo "[".$Sql."]"; - - //ob_end_clean(); - $repo->exec_sql("delete from ac_dossier where dos_id=$l_id"); - echo _("Echec création "); - exit; - } - ob_flush(); - - } - } // if $l_id != 0 -} // $_POST[DATABASE] -?> -

    - -'; - echo HtmlInput::button(_('Ajouter'),_('Ajouter un dossier')," onclick=\$('folder_add_id').show()"); - echo '

    '; - $header=new Sort_Table(); - $url=$_SERVER['PHP_SELF']."?sa=list&action=".$_REQUEST['action']; - $header->add(_("id"),$url," order by dos_id asc"," order by dos_id desc","da","dd"); - $header->add(_("Nom"),$url," order by dos_name asc"," order by dos_name desc","na","nd"); - $header->add(_("Description"),$url," order by dos_description asc"," order by dos_description desc","da","dd"); - $repo=new Dossier(0); - $repocn=new Database(); - $ord=(isset($_REQUEST['ord']))?$_REQUEST['ord']:'na'; - $sql_order=$header->get_sql_order($ord); - $Res=$repocn->get_array("select * from ac_dossier $sql_order"); - - $compteur=1; - $template=""; - echo '
    '; - echo ''; - echo _('Filtre').HtmlInput::infobulle(23); - echo HtmlInput::filter_table("t_dossier", "0,1,2","1"); - echo ''; - echo ''; - $r=""; - $r.='"; - $str_name=domaine.'dossier'.$Dossier['dos_id']; - - echo ""; - - $database_exist=$repocn->exist_database($str_name); - - if ($database_exist > 0 ) - { - $size=$repocn->get_value("select pg_database_size($1)/(1024*1024)::float", - array($str_name)); - echo td(nbm($size)."MB",' style="text-align:right"'); - } else { - echo td(_("Dossier inexistant"),'style="color:red"'); - } - echo td($str_name); - if ( $database_exist > 0) - { - echo td(HtmlInput::anchor(_('Effacer'),'?action=dossier_mgt&sa=del&d='.$Dossier['dos_id']," onclick=\"folder_drop('".$Dossier['dos_id']."')\"")); - - echo td(HtmlInput::anchor(_('Modifier'),'?action=dossier_mgt&sa=mod&d=' - .$Dossier['dos_id']," onclick=\"folder_modify('".$Dossier['dos_id']."')\"")); - - echo td(HtmlInput::anchor(_('Backup'),'backup.php?action=backup&sa=b&t=d&d=' - .$Dossier['dos_id'])); - } else - { - echo td(HtmlInput::anchor(_('Effacer'),'?action=dossier_mgt&sa=del&d='.$Dossier['dos_id']," onclick=\"folder_drop('".$Dossier['dos_id']."')\"")); - } - $compteur++; - - } - echo ""; - - } - echo '
    '.$header->get_header(0).''; - $r.=''.$header->get_header(1).''; - $r.=''.$header->get_header(2).''; - $r.=th(_('Taille')).th(_('Nom base de données')); - - $r=tr($r); - echo $r; - // show all dossiers - if ( $Res != null ) - { - foreach ( $Res as $Dossier) - { - - if ( $compteur%2 == 0 ) - $cl='class="odd"'; - else - $cl='class="even"'; - - echo "
    ". - $Dossier['dos_id']." ".h($Dossier['dos_name'])." ".h($Dossier['dos_description'])."
    '; - - -} -?> - -get_value("select dos_name from ac_dossier where dos_id=$1",array($dossier_id)); - if ( strlen(trim($name)) == 0 ) - { - echo "

    $msg "._('inexistant')."

    "; - return; - } - /** - * Check if db exists - */ - $str_name=domaine.'dossier'.$dossier_id; - - $database_exist=$cn->exist_database($str_name); - - // if db exists for postgres then drop it - if ( $database_exist == 1) - { - $sql="drop database ".domaine."dossier".sql_string($_REQUEST['d']); - ob_start(); - if ( $cn->exec_sql($sql)==false) - { - ob_end_clean(); - - echo "

    "; - echo _('Base de donnée ').domaine."dossier".$_REQUEST['d']. - _("est accèdée, déconnectez-vous d'abord")."

    "; - exit; - } - ob_flush(); - } - - // clean tables about this dossier - $sql="delete from jnt_use_dos where dos_id=$1"; - $cn->exec_sql($sql,array($dossier_id)); - $sql="delete from ac_dossier where dos_id=$1"; - $cn->exec_sql($sql,array($dossier_id)); - print '

    '; - printf (_("Le dossier %s est effacé").'

    ',h($name)); - echo HtmlInput::button_anchor(_('Retour'),'?action=dossier_mgt'); -} -?> -
    diff --git a/sources/include/export_anc_acc_list_csv.php b/sources/include/export_anc_acc_list_csv.php deleted file mode 100644 index e58d0c2..0000000 --- a/sources/include/export_anc_acc_list_csv.php +++ /dev/null @@ -1,36 +0,0 @@ -get_request(); -echo $bal->export_csv(); diff --git a/sources/include/export_anc_balance_double_csv.php b/sources/include/export_anc_balance_double_csv.php deleted file mode 100644 index 635a157..0000000 --- a/sources/include/export_anc_balance_double_csv.php +++ /dev/null @@ -1,40 +0,0 @@ -get_request(); -echo $bal->display_csv(); diff --git a/sources/include/export_anc_balance_double_pdf.php b/sources/include/export_anc_balance_double_pdf.php deleted file mode 100644 index 012c68f..0000000 --- a/sources/include/export_anc_balance_double_pdf.php +++ /dev/null @@ -1,37 +0,0 @@ -get_request(); - -$balance->display_pdf(); - diff --git a/sources/include/export_anc_balance_group_csv.php b/sources/include/export_anc_balance_group_csv.php deleted file mode 100644 index fed3c00..0000000 --- a/sources/include/export_anc_balance_group_csv.php +++ /dev/null @@ -1,35 +0,0 @@ -get_request(); -$a->export_csv(); -?> \ No newline at end of file diff --git a/sources/include/export_anc_balance_simple_csv.php b/sources/include/export_anc_balance_simple_csv.php deleted file mode 100644 index d97c87c..0000000 --- a/sources/include/export_anc_balance_simple_csv.php +++ /dev/null @@ -1,36 +0,0 @@ -get_request(); -echo $bal->display_csv(); diff --git a/sources/include/export_anc_balance_simple_pdf.php b/sources/include/export_anc_balance_simple_pdf.php deleted file mode 100644 index edaa0c7..0000000 --- a/sources/include/export_anc_balance_simple_pdf.php +++ /dev/null @@ -1,35 +0,0 @@ -get_request(); -$balance->display_pdf(); -?> diff --git a/sources/include/export_anc_grandlivre_csv.php b/sources/include/export_anc_grandlivre_csv.php deleted file mode 100644 index 403f690..0000000 --- a/sources/include/export_anc_grandlivre_csv.php +++ /dev/null @@ -1,37 +0,0 @@ -get_request(); -echo $gl->display_csv(); - - - - -?> diff --git a/sources/include/export_anc_list_csv.php b/sources/include/export_anc_list_csv.php deleted file mode 100644 index 569bb0d..0000000 --- a/sources/include/export_anc_list_csv.php +++ /dev/null @@ -1,37 +0,0 @@ -get_request(); -echo $bal->display_csv(); diff --git a/sources/include/export_anc_receipt_pdf.php b/sources/include/export_anc_receipt_pdf.php deleted file mode 100644 index 7025f40..0000000 --- a/sources/include/export_anc_receipt_pdf.php +++ /dev/null @@ -1,40 +0,0 @@ -export_all($ck); diff --git a/sources/include/export_anc_table_csv.php b/sources/include/export_anc_table_csv.php deleted file mode 100644 index 9a3fd8d..0000000 --- a/sources/include/export_anc_table_csv.php +++ /dev/null @@ -1,34 +0,0 @@ -get_request(); -$atable->export_csv(); -?> \ No newline at end of file diff --git a/sources/include/export_balance_age_csv.php b/sources/include/export_balance_age_csv.php deleted file mode 100644 index cac21b3..0000000 --- a/sources/include/export_balance_age_csv.php +++ /dev/null @@ -1,88 +0,0 @@ - - -if (!defined('ALLOWED')) - die('Appel direct ne sont pas permis'); -require 'class_balance_age.php'; -header('Pragma: public'); -header('Content-type: application/csv'); -header('Content-Disposition: attachment;filename="balance_age.csv"',FALSE); -/** - * @file - * @brief Export an ageing balance - * @param p_date_start considered writing after this date - * @param p_let lettered or not value (all): let or only unlettered value:unlet - * @param p_type - * - C customer - * - F supplier - * - U only a card - * - X a category - * @param cat only if p_type = X it that case contains the category id (fiche_def.fd_id) - * @param fiche only if p_type = U in that case contains the card id (fiche.f_id) - * @param all Ony with p_type = X all the customer / supplier cards - */ -/* - * Retrieve card - */ -$bal=new Balance_Age($cn); -$p_type = HtmlInput::default_value_get('p_type', "-"); -$p_date= HtmlInput::default_value_get('p_date_start', "-"); -$p_let= HtmlInput::default_value_get('p_let', "let"); -$cat= HtmlInput::default_value_get('cat', ""); -$fiche= HtmlInput::default_value_get('fiche', "0"); -$all= HtmlInput::default_value_get('all', "0"); -switch ($p_type) -{ - case 'C': - $bal->get_array_card('C'); - $bal->export_csv($p_date, $p_let); - break; - case 'F': - $bal->get_array_card('F'); - $bal->export_csv($p_date, $p_let); - break; - case 'U': - $bal->get_array_card('U', $fiche); - $bal->export_csv($p_date, $p_let); - break; - case 'X': - $all=HtmlInput::default_value_get('all', 0); - if ($all==0) - { - $bal->get_array_card('X', $_GET['cat']); - $bal->export_csv($p_date, $p_let); - } - else - { - $a_cat=$cn->get_array("select fd_id from vw_fiche_def where ad_id=".ATTR_DEF_ACCOUNT." order by fd_label asc"); - $nb_cat=count($a_cat); - for ($i=0; $i<$nb_cat; $i++) - { - $bal->get_array_card('X', $a_cat[$i]['fd_id']); - $bal->export_csv($p_date, $p_let); - } - } - break; - - default: - break; -} -?> diff --git a/sources/include/export_balance_csv.php b/sources/include/export_balance_csv.php deleted file mode 100644 index cb3303d..0000000 --- a/sources/include/export_balance_csv.php +++ /dev/null @@ -1,103 +0,0 @@ -jrn=null; -switch( $_GET['p_filter']) -{ -case 0: - $bal->jrn=null; - break; -case 1: - if ( isset($_GET['r_jrn'])) - { - $selected=$_GET['r_jrn']; - $array_ledger=$g_user->get_ledger('ALL',3); - $array=get_array_column($array_ledger,'jrn_def_id'); - for ($e=0;$ejrn[]=$selected[$e]; - } - } - break; -case 2: - if ( isset($_GET['r_cat'])) $bal->filter_cat($_GET['r_cat']); - break; -} - -$bal->from_poste=$_GET['from_poste']; -$bal->to_poste=$_GET['to_poste']; -if (isset($_GET['unsold'])) $bal->unsold=true; -$prev = (isset($_GET['previous_exc'])) ? 1: 0; - -$row=$bal->get_row($_GET['from_periode'], - $_GET['to_periode'], - $prev); -$prev = ( isset ($row[0]['sum_cred_previous'])) ?1:0; -echo 'poste;libelle;'; -if ($prev == 1 ) echo 'deb n-1;cred n-1;solde n-1;d/c;'; -echo 'deb;cred;solde;d/c'; -printf("\n"); -foreach ($row as $r) -{ - echo $r['poste'].';'. - $r['label'].';'; - if ( $prev == 1 ) - { - $delta=bcsub($r['solde_deb_previous'],$r['solde_cred_previous']); - $sign=($delta<0)?'C':'D'; - $sign=($delta == 0)?'=':$sign; - echo nb($r['sum_deb_previous']).';'. - nb($r['sum_cred_previous']).';'. - nb(abs($delta)).';'. - "$sign".';'; - - } - $delta=bcsub($r['solde_deb'],$r['solde_cred']); - $sign=($delta<0)?'C':'D'; - $sign=($delta == 0)?'=':$sign; - echo nb($r['sum_deb']).';'. - nb($r['sum_cred']).';'. - nb(abs($delta)).';'. - "$sign"; - printf("\n"); -} - - -?> diff --git a/sources/include/export_balance_pdf.php b/sources/include/export_balance_pdf.php deleted file mode 100644 index 1620aa0..0000000 --- a/sources/include/export_balance_pdf.php +++ /dev/null @@ -1,284 +0,0 @@ -Check(); - -$bal=new Acc_Balance($cn); - -extract ($_GET); -$bal->jrn=null; -switch( $_GET['p_filter']) -{ -case 0: - $bal->jrn=null; - break; -case 1: - if ( isset($_GET['r_jrn'])) - { - $selected=$_GET['r_jrn']; - $array_ledger=$g_user->get_ledger('ALL',3); - $array=get_array_column($array_ledger,'jrn_def_id'); - for ($e=0;$ejrn[]=$selected[$e]; - } - } - break; -case 2: - if ( isset($_GET['r_cat'])) $bal->filter_cat($_GET['r_cat']); - break; -} - -$bal->from_poste=$_GET['from_poste']; -$bal->to_poste=$_GET['to_poste']; -if (isset($_GET['unsold'])) $bal->unsold=true; -$previous=(isset($_GET['previous_exc']))?1:0; - -$array=$bal->get_row($from_periode,$to_periode,$previous); - -$previous= (isset ($array[0]['sum_cred_previous']))?1:0; - - -if ( sizeof($array) == 0 ) -{ - exit(); - -} - -$pPeriode=new Periode($cn); -$a=$pPeriode->get_date_limit($from_periode); -$b=$pPeriode->get_date_limit($to_periode); -$per_text=" du ".$a['p_start']." au ".$b['p_end']; -if ($previous == 1 ) { - $pdf=new PDFLand($cn); -} else { - $pdf= new PDF($cn); -} -$pdf->setDossierInfo(" Balance ".$per_text); -$pdf->AliasNbPages(); -$pdf->AddPage(); -$pdf->SetAuthor('NOALYSS'); -$pdf->SetFont('DejaVuCond','',7); -$pdf->setTitle("Balance comptable",true); -$pdf->Cell(30,6,'poste'); -$pdf->LongLine(60,6,'Libellé'); -if ($previous == 1 ){ - $pdf->Cell(20,6,'Débit N-1',0,0,'R'); - $pdf->Cell(20,6,'Crédit N-1',0,0,'R'); - $pdf->Cell(20,6,'Débiteur N-1',0,0,'R'); - $pdf->Cell(20,6,'Créditeur N-1',0,0,'R'); -} -$pdf->Cell(25,6,'Total Débit',0,0,'R'); -$pdf->Cell(25,6,'Total Crédit',0,0,'R'); -$pdf->Cell(25,6,'Solde Débiteur',0,0,'R'); -$pdf->Cell(25,6,'Solde Créditeur',0,0,'R'); -$pdf->Ln(); - -$pdf->SetFont('DejaVuCond','',8); -$tp_deb=0; -$tp_cred=0; -$tp_sold=0; -$tp_solc=0; -$tp_deb_previous=0; -$tp_cred_previous=0; -$tp_sold_previous=0; -$tp_solc_previous=0; -if ( $previous == 1) { - $a_sum=array('sum_cred','sum_deb','solde_deb','solde_cred','sum_cred_previous','sum_deb_previous','solde_deb_previous','solde_cred_previous'); -} -else { - $a_sum=array('sum_cred','sum_deb','solde_deb','solde_cred') ; -} -foreach($a_sum as $a) - { - $nlvl1[$a]=0; - $nlvl2[$a]=0; - $nlvl3[$a]=0; - } -$lvl1_old=''; -$lvl2_old=''; -$lvl3_old=''; - -bcscale(2); -if (! empty($array)) - { - $i=0; - foreach ($array as $key=>$value) - { - $i++; - /* - * level x - */ - if ( $value['poste']=='') continue; - foreach (array(3,2,1) as $ind) - { - $r=$value; - if ( ! isset($_GET['lvl'.$ind]))continue; - - if (${'lvl'.$ind.'_old'} == '') ${'lvl'.$ind.'_old'}=substr($r['poste'],0,$ind); - if ( ${'lvl'.$ind.'_old'} != substr($r['poste'],0,$ind)) - { - $pdf->SetFont('DejaVu','B',7); - $pdf->LongLine(30,6,${'lvl'.$ind.'_old'}); - $delta=bcsub(${'nlvl'.$ind}['solde_cred'],${'nlvl'.$ind}['solde_deb']); - $side=($delta< 0) ? "D":"C"; - if ($previous == 1 ) { - $delta_previous=bcsub(${'nlvl'.$ind}['solde_cred_previous'],${'nlvl'.$ind}['solde_deb_previous']); - $side_previous=($delta_previous < 0) ? "D":"C"; - $pdf->Cell(30,6,"n-1 : " .nbm($delta_previous)." $side_previous",0,0,'R'); - $pdf->Cell(30,6," n : ".nbm($delta)." $side",0,0,'R'); - $pdf->Cell(22,6,nbm(${'nlvl'.$ind}['sum_deb_previous']),0,0,'R'); - $pdf->Cell(22,6,nbm(${'nlvl'.$ind}['sum_cred_previous']),0,0,'R'); - $pdf->Cell(22,6,nbm(${'nlvl'.$ind}['solde_deb_previous']),0,0,'R'); - $pdf->Cell(22,6,nbm(${'nlvl'.$ind}['solde_cred_previous']),0,0,'R'); - } else { - $pdf->Cell(60,6,nbm($delta)." $side",0,0,'R'); - } - $pdf->Cell(25,6,nbm(${'nlvl'.$ind}['sum_deb']),0,0,'R'); - $pdf->Cell(25,6,nbm(${'nlvl'.$ind}['sum_cred']),0,0,'R'); - $pdf->Cell(25,6,nbm(${'nlvl'.$ind}['solde_deb']),0,0,'R'); - $pdf->Cell(25,6,nbm(${'nlvl'.$ind}['solde_cred']),0,0,'R'); - $pdf->Ln(); - $pdf->SetFont('DejaVuCond','',7); - ${'lvl'.$ind.'_old'}=substr($r['poste'],0,$ind); - foreach($a_sum as $a) - { - ${'nlvl'.$ind}[$a]=0; - } - } - } - foreach($a_sum as $a) - { - $nlvl1[$a]=bcadd($nlvl1[$a],$r[$a]); - $nlvl2[$a]=bcadd($nlvl2[$a],$r[$a]); - $nlvl3[$a]=bcadd($nlvl3[$a],$r[$a]); - } - - if ( $i % 2 == 0 ) - { - $pdf->SetFillColor(220,221,255); - $fill=1; - } - else - { - $pdf->SetFillColor(0,0,0); - $fill=0; - } - - $pdf->LongLine(30,6,$value['poste'],0,'L',$fill); - $pdf->LongLine(60,6,$value['label'],0,'L',$fill); - if ($previous == 1 ) { - $pdf->Cell(22,6,nbm($value['sum_deb_previous']),0,0,'R',$fill); - $pdf->Cell(22,6,nbm($value['sum_cred_previous']),0,0,'R',$fill); - $pdf->Cell(22,6,nbm($value['solde_deb_previous']),0,0,'R',$fill); - $pdf->Cell(22,6,nbm($value['solde_cred_previous']),0,0,'R',$fill); - $tp_deb_previous=bcadd($tp_deb_previous,$value['sum_deb_previous']); - $tp_cred_previous=bcadd($tp_cred_previous,$value['sum_cred_previous']); - $tp_sold_previous=bcadd($tp_sold_previous,$value['solde_deb_previous']); - $tp_solc_previous=bcadd($tp_solc_previous,$value['solde_cred_previous']); - } - $pdf->Cell(25,6,nbm($value['sum_deb']),0,0,'R',$fill); - $pdf->Cell(25,6,nbm($value['sum_cred']),0,0,'R',$fill); - $pdf->Cell(25,6,nbm($value['solde_deb']),0,0,'R',$fill); - $pdf->Cell(25,6,nbm($value['solde_cred']),0,0,'R',$fill); - $pdf->Ln(); - $tp_deb=bcadd($tp_deb,$value['sum_deb']); - $tp_cred=bcadd($tp_cred,$value['sum_cred']); - $tp_sold=bcadd($tp_sold,$value['solde_deb']); - $tp_solc=bcadd($tp_solc,$value['solde_cred']); - - } - foreach (array(3,2,1) as $ind) - { - $r=$value; - if ( ! isset($_GET['lvl'.$ind]))continue; - - if (${'lvl'.$ind.'_old'} == '') ${'lvl'.$ind.'_old'}=substr($r['poste'],0,$ind); - if ( ${'lvl'.$ind.'_old'} != substr($r['poste'],0,$ind)) - { - $pdf->SetFont('DejaVu','B',7); - $pdf->Cell(30,6,"Totaux ".$ind); - $pdf->Cell(60,6,${'lvl'.$ind.'_old'}); - if ($previous == 1 ) { - $pdf->Cell(22,6,nbm(${'nlvl'.$ind}['sum_deb_previous']),0,0,'R'); - $pdf->Cell(22,6,nbm(${'nlvl'.$ind}['sum_cred_previous']),0,0,'R'); - $pdf->Cell(22,6,nbm(${'nlvl'.$ind}['solde_deb_previous']),0,0,'R'); - $pdf->Cell(22,6,nbm(${'nlvl'.$ind}['solde_cred_previous']),0,0,'R'); - } - $pdf->Cell(25,6,nbm(${'nlvl'.$ind}['sum_deb']),0,0,'R'); - $pdf->Cell(25,6,nbm(${'nlvl'.$ind}['sum_cred']),0,0,'R'); - $pdf->Cell(25,6,nbm(${'nlvl'.$ind}['solde_deb']),0,0,'R'); - $pdf->Cell(25,6,nbm(${'nlvl'.$ind}['solde_cred']),0,0,'R'); - $pdf->Ln(); - $pdf->SetFont('DejaVuCond','',7); - ${'lvl'.$ind.'_old'}=substr($r['poste'],0,$ind); - foreach($a_sum as $a) - { - ${'nlvl'.$ind}[$a]=0; - } - } - } - - // Totaux - $pdf->SetFont('DejaVuCond','B',8); - $pdf->Cell(90,6,'Totaux'); - if ($previous == 1 ) { - $pdf->Cell(22,6,nbm($tp_deb_previous),'T',0,'R',0); - $pdf->Cell(22,6,nbm($tp_cred_previous),'T',0,'R',0); - $pdf->Cell(22,6,nbm($tp_sold_previous),'T',0,'R',0); - $pdf->Cell(22,6,nbm($tp_solc_previous),'T',0,'R',0); - } - $pdf->Cell(25,6,nbm($tp_deb),'T',0,'R',0); - $pdf->Cell(25,6,nbm($tp_cred),'T',0,'R',0); - $pdf->Cell(25,6,nbm($tp_sold),'T',0,'R',0); - $pdf->Cell(25,6,nbm($tp_solc),'T',0,'R',0); - $pdf->Ln(); - } /** empty */ - -$fDate=date('dmy-Hi'); -$pdf->Output('balance-'.$fDate.'.pdf','D'); - - - -?> diff --git a/sources/include/export_bilan_oth.php b/sources/include/export_bilan_oth.php deleted file mode 100644 index a4c2ebe..0000000 --- a/sources/include/export_bilan_oth.php +++ /dev/null @@ -1,61 +0,0 @@ -get_request_get(); -$bilan->load(); - -if ( $bilan->b_type=='odt') -{ - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Cache-Control: must-revalidate"); - header('Content-type: application/vnd.oasis.opendocument.text'); - header('Content-Disposition: attachment;filename="'.$bilan->b_name.'.odt"',FALSE); - header("Accept-Ranges: bytes"); - -} -if ( $bilan->b_type=='ods') -{ - header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); - header("Cache-Control: must-revalidate"); - header('Content-type: application/vnd.oasis.opendocument.spreadsheet'); - header('Content-Disposition: attachment;filename="'.$bilan->b_name.'.ods"',FALSE); - header("Accept-Ranges: bytes"); - -} - -$bilan->generate(); -?> diff --git a/sources/include/export_fiche_balance_csv.php b/sources/include/export_fiche_balance_csv.php deleted file mode 100644 index 4588678..0000000 --- a/sources/include/export_fiche_balance_csv.php +++ /dev/null @@ -1,200 +0,0 @@ -category, export in CVS the history of a category - * of card - */ -if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); -header('Pragma: public'); -header('Content-type: application/csv'); -header('Content-Disposition: attachment;filename="bal-fiche.csv"',FALSE); - -// Security we check if user does exist and his privilege -require_once NOALYSS_INCLUDE.'/class_user.php'; -require_once NOALYSS_INCLUDE.'/class_database.php'; -require_once NOALYSS_INCLUDE.'/class_dossier.php'; -require_once NOALYSS_INCLUDE.'/ac_common.php'; -$allcard=(isset($_GET['allcard']))?1:0; - -/* balance */ -if ( $_GET['histo'] == 4 || $_GET['histo'] == 5) -{ - $fd=new Fiche_Def($cn,$_REQUEST['cat']); - if ( $allcard==1 && $fd->hasAttribute(ATTR_DEF_ACCOUNT) == false ) - { - exit; - } - // all card - if ($allcard==1) - { - $afiche=$cn->get_array("select fd_id from vw_fiche_def where ad_id=".ATTR_DEF_ACCOUNT." order by fd_label asc"); - } - else - { - $afiche[0]=array('fd_id'=>$_REQUEST['cat']); - } - printf('"Quick code";"Nom";"poste comptable";"debit";"credit";"solde";"D/C";'); - printf("\n"); - for ($e = 0; $e < count($afiche); $e++) - { - $aCard = $cn->get_array("select f_id,ad_value from fiche join fiche_Detail using (f_id) where ad_id=1 and fd_id=$1 order by 2 ", array($afiche[$e]['fd_id'])); - - if (empty($aCard)) - { - continue; - } - - for ($i = 0; $i < count($aCard); $i++) - { - if (isDate($_REQUEST['start']) == null || isDate($_REQUEST['end']) == null) - exit; - $filter = " (j_date >= to_date('" . $_REQUEST['start'] . "','DD.MM.YYYY') " . - " and j_date <= to_date('" . $_REQUEST['end'] . "','DD.MM.YYYY')) "; - $oCard = new Fiche($cn, $aCard[$i]['f_id']); - $solde = $oCard->get_solde_detail($filter); - if ($solde['debit'] == 0 && $solde['credit'] == 0) - continue; - /* only not purged card */ - if ($_GET['histo'] == 5 && $solde['solde'] == 0) - continue; - $side = ''; - if (bcsub($solde['credit'], $solde['debit']) < 0) - $side = 'Deb.'; - if (bcsub($solde['credit'], $solde['debit']) > 0) - $side = 'Cred.'; - - printf('"%s";"%s";"%s";%s;%s;%s;"%s"', $oCard->strAttribut(ATTR_DEF_QUICKCODE), $oCard->strAttribut(ATTR_DEF_NAME), $oCard->strAttribut(ATTR_DEF_ACCOUNT),nb($solde['debit']), nb($solde['credit']), nb(abs($solde['solde'])), $side); - printf("\n"); - } - } -} -else -{ - // all card - if ($allcard == 1) - { - $afiche = $cn->get_array("select fd_id from vw_fiche_def where ad_id=" . ATTR_DEF_ACCOUNT . " order by fd_label asc"); - } - else - { - $afiche[0] = array('fd_id' => $_REQUEST['cat']); - } - $fic=new Fiche($cn); - for ($e = 0; $e < count($afiche); $e++) - { - $array = Fiche::get_fiche_def($cn, $afiche[$e]['fd_id'], 'name_asc'); - - foreach ($array as $card) - { - $row = new Fiche($cn, $card['f_id']); - $letter = new Lettering_Card($cn); - $letter->set_parameter('quick_code', $row->strAttribut(ATTR_DEF_QUICKCODE)); - $letter->set_parameter('start', $_GET['start']); - $letter->set_parameter('end', $_GET['end']); - // all - if ($_GET['histo'] == 0) - { - $letter->get_all(); - } - - // lettered - if ($_GET['histo'] == 1) - { - $letter->get_letter(); - } - // unlettered - if ($_GET['histo'] == 2) - { - $letter->get_unletter(); - } - if ($_GET['histo'] == 6) - { - $letter->get_letter_diff(); - } - /* skip if nothing to display */ - if (count($letter->content) == 0) - continue; - printf('"%s";"%s";"%s"'."\n",$row->strAttribut(ATTR_DEF_QUICKCODE), $row->strAttribut(ATTR_DEF_NAME),$row->strAttribut(ATTR_DEF_ACCOUNT)); - - printf('"%s";"%s";"%s";"%s";"%s";"%s";"%s";"%s";"%s"', - _('Date'), - _('ref'), - _('Interne'), - _('Comm'), - _('Débit'), - _('Crébit'), - _('Prog.'), - _('D/C'), - _('Let.'), - _("Diff Let.")); - printf("\n"); - $amount_deb = 0; - $amount_cred = 0; - $prog = 0; - bcscale(2); - for ($i = 0; $i < count($letter->content); $i++) - { - $row = $letter->content[$i]; - printf ('"%s";',$row['j_date_fmt']); - printf ('"%s";',$row['jr_pj_number']); - printf ('"%s";',$row['jr_internal']); - printf ('"%s";',$row['jr_comment']); - if ($row['j_debit'] == 't') - { - printf("%s;",nb($row['j_montant'])); - $amount_deb=bcadd($amount_deb,$row['j_montant']); - $prog = bcadd($prog, $row['j_montant']); - printf (";"); - } - else - { - printf(";"); - printf("%s;",nb($row['j_montant'])); - $amount_cred=bcadd($amount_cred,$row['j_montant']); - $prog = bcsub($prog, $row['j_montant']); - } - printf ("%s;\"%s\";",abs(nb($prog)),$fic->get_amount_side($prog)); - if ($row['letter'] != -1) - { - printf('"%s";', strtoupper(base_convert($row['letter'],10,36))); - printf("%s",nb($row['letter_diff'])); - } - else - printf(";"); - printf("\n"); - } - if ($prog < 0 ) - $msg="Solde Debit"; - elseif ($prog>0) - $msg="Solde Credit"; - else - $msg="soldé"; - - printf(';;;"%s";%s;%s;%s;"%s"', - $msg,nb($amount_deb),nb($amount_cred),nb(abs($prog)),$fic->get_amount_side($prog)); - printf("\n"); - } - } -} -exit; - - diff --git a/sources/include/export_fiche_balance_pdf.php b/sources/include/export_fiche_balance_pdf.php deleted file mode 100644 index c60f58a..0000000 --- a/sources/include/export_fiche_balance_pdf.php +++ /dev/null @@ -1,317 +0,0 @@ -category, export in PDF the history of a category or balance - * of card - */ -if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); -// Security we check if user does exist and his privilege -require_once NOALYSS_INCLUDE.'/class_user.php'; -require_once NOALYSS_INCLUDE.'/class_database.php'; -require_once NOALYSS_INCLUDE.'/class_pdf.php'; -require_once NOALYSS_INCLUDE.'/class_lettering.php'; -require_once NOALYSS_INCLUDE.'/class_dossier.php'; -require_once NOALYSS_INCLUDE.'/ac_common.php'; - -/* Security */ -$gDossier=dossier::id(); -$cn=new Database($gDossier); -$g_user->Check(); -$g_user->check_dossier($gDossier); -$name=$cn->get_value('select fd_label from fiche_def where fd_id=$1',array($_GET['cat'])); - -$pdf=new PDF($cn); -$pdf->setDossierInfo(" Periode : ".$_GET['start']." - ".$_GET['end']); -$pdf->AliasNbPages(); -$pdf->AddPage(); - -$pdf->SetTitle($name,1); -$pdf->SetAuthor('NOALYSS'); -/* balance */ -$allcard=(isset($_GET['allcard']))?1:0; -/* - * Balance - */ -if ( $_GET['histo'] == 4 || $_GET['histo']==5) -{ - $fd=new Fiche_Def($cn,$_REQUEST['cat']); - if ($allcard==1 && $fd->hasAttribute(ATTR_DEF_ACCOUNT) == false ) - { - $pdf->Cell(0,10, "Cette catégorie n'ayant pas de poste comptable n'a pas de balance"); - //Save PDF to file - $fDate=date('dmy-Hi'); - $pdf->Output("category-$fDate.pdf", 'D'); - exit; - } - // all card - if ($allcard==1) - { - $afiche=$cn->get_array("select fd_id from vw_fiche_def where ad_id=".ATTR_DEF_ACCOUNT." order by fd_label asc"); - } - else - { - $afiche[0]=array('fd_id'=>$_REQUEST['cat']); - } - - if ( $allcard==0 && empty($afiche)) - { - $pdf->Cell(0,10, "Aucune fiche trouvée");//Save PDF to file - $fDate=date('dmy-Hi'); - $pdf->Output("category-$fDate.pdf", 'D'); - exit; - } - for ($e = 0; $e < count($afiche); $e++) - { - $aCard=$cn->get_array("select f_id,ad_value from fiche join fiche_Detail using (f_id) where ad_id=1 and fd_id=$1 order by 2 ",array($afiche[$e]['fd_id'])); - $name=$cn->get_value('select fd_label from fiche_def where fd_id=$1',array($afiche[$e]['fd_id'])); - $pdf->SetFont('DejaVu','BI',14); - $pdf->Cell(0,8,$name,0,1,'C'); - - $pdf->SetFont('DejaVuCond','',7); - $pdf->LongLine(30,7,'Quick Code',0,'L',0); - $pdf->LongLine(80,7,'Libellé',0,'L',0); - $pdf->Cell(20,7,'Débit',0,0,'R',0); - $pdf->Cell(20,7,'Crédit',0,0,'R',0); - $pdf->Cell(20,7,'Solde',0,0,'R',0); - $pdf->Cell(20,7,'D/C',0,0,'C',0); - $pdf->Ln(); - - if (empty($aCard)) continue; - - - $idx=0;$sum_deb=0;$sum_cred=0;bcscale(4); - for ($i=0;$i < count($aCard);$i++) - { - if ( isDate($_REQUEST['start']) == null || isDate ($_REQUEST['end']) == null ) exit; - $filter= " (j_date >= to_date('".$_REQUEST['start']."','DD.MM.YYYY') ". - " and j_date <= to_date('".$_REQUEST['end']."','DD.MM.YYYY')) "; - $oCard=new Fiche($cn,$aCard[$i]['f_id']); - $solde=$oCard->get_solde_detail($filter); - if ( $solde['debit'] == 0 && $solde['credit']==0) continue; - /* only not purged card */ - if ($_GET['histo'] == 5 && $solde['debit'] == $solde['credit']) continue; - - if ( $idx % 2 == 0 ) - { - $pdf->SetFillColor(220,221,255); - $fill=1; - } - else - { - $pdf->SetFillColor(0,0,0); - $fill=0; - } - $idx++; - $side=''; - if(bcsub($solde['credit'],$solde['debit']) < 0) $side='Deb.'; - if(bcsub($solde['credit'],$solde['debit']) > 0) $side='Cred.'; - - $sum_cred=bcadd($sum_cred,$solde['credit']); - $sum_deb=bcadd($sum_deb,$solde['debit']); - $sum_solde=bcsub($sum_deb,$sum_cred); - - $pdf->Cell(30,7,$oCard->strAttribut(ATTR_DEF_QUICKCODE),0,0,'L',$fill); - $pdf->LongLine(80,7,$oCard->strAttribut(ATTR_DEF_NAME)." (".$oCard->strAttribut(ATTR_DEF_ACCOUNT).")",0,'L',$fill); - $pdf->Cell(20,7,nbm($solde['debit']),0,0,'R',$fill); - $pdf->Cell(20,7,nbm($solde['credit']),0,0,'R',$fill); - $pdf->Cell(20,7,nbm(abs($solde['solde'])),0,0,'R',$fill); - $pdf->Cell(20,7,$side,0,0,'C',$fill); - $pdf->Ln(); - } - if ( $idx % 2 == 0 ) - { - $pdf->SetFillColor(220,221,255); - $fill=1; - } - else - { - $pdf->SetFillColor(0,0,0); - $fill=0; - } - $idx++; - // Sum by category - $pdf->Cell(30,7,"",0,0,'L',$fill); - $pdf->Cell(80,7,_("Totaux"),0,0,'L',$fill); - $pdf->Cell(20,7,nbm($sum_deb),0,0,'R',$fill); - $pdf->Cell(20,7,nbm($sum_cred),0,0,'R',$fill); - $pdf->Cell(20,7,nbm(abs($sum_solde)),0,0,'R',$fill); - $side=" = "; - if ( $sum_solde > 0 ) - { - $side='Deb.'; - } - else if ( $sum_solde < 0) - { - $side='Cred.'; - } - - $pdf->Cell(20,7,$side,0,0,'C',$fill); - $pdf->Ln(); - } -} -else -{ - // History - // all card - if ($allcard == 1) - { - $afiche = $cn->get_array("select fd_id from vw_fiche_def where ad_id=" . ATTR_DEF_ACCOUNT . " order by fd_label asc"); - } - else - { - $afiche[0] = array('fd_id' => $_REQUEST['cat']); - } - $fic=new Fiche($cn); - for ($e = 0; $e < count($afiche); $e++) - { - $array = Fiche::get_fiche_def($cn,$afiche[$e]['fd_id'] , 'name_asc'); - /* - * You show now the result - */ - if ($array == null) - { - continue; - } - $tab = array(12, 20, 20,68, 20, 20, 10, 20); - $align = array('L', 'C', 'L', 'L', 'R','R', 'R', 'R'); - - foreach ($array as $row_fiche) - { - $fic = new Fiche($cn, $row_fiche['f_id']); - $letter = new Lettering_Card($cn); - $letter->set_parameter('quick_code', $fic->strAttribut(ATTR_DEF_QUICKCODE)); - $letter->set_parameter('start', $_GET['start']); - $letter->set_parameter('end', $_GET['end']); - // all - if ($_GET['histo'] == 0) - { - $letter->get_all(); - } - - // lettered - if ($_GET['histo'] == 1) - { - $letter->get_letter(); - } - // unlettered - if ($_GET['histo'] == 2) - { - $letter->get_unletter(); - } - if ($_GET['histo'] == 6) - { - $letter->get_letter_diff(); - } - /* skip if nothing to display */ - if (count($letter->content) == 0) - continue; - $pdf->SetFont('DejaVuCond', '', 10); - $fiche = new Fiche($cn, $row_fiche['f_id']); - $pdf->Cell(0, 7, $fiche->strAttribut(ATTR_DEF_NAME)." [".$fiche->strAttribut(ATTR_DEF_QUICKCODE).":".$fiche->strAttribut(ATTR_DEF_ACCOUNT)."]", 1, 'C'); - - $pdf->SetFont('DejaVuCond', '', 7); - $pdf->Ln(); - $pdf->Cell($tab[0], 7, 'Date'); - $pdf->Cell($tab[1], 7, 'ref'); - $pdf->Cell($tab[2], 7, 'Internal'); - $pdf->Cell($tab[3], 7, 'Comm'); - $pdf->Cell($tab[4], 7, 'Montant', 0, 0, 'C'); - $pdf->Cell($tab[5], 7, 'Prog.', 0, 0, 'R'); - $pdf->Cell($tab[6], 7, 'Let.', 0, 0, 'R'); - $pdf->Cell($tab[7], 7, 'Diff. Let.', 0, 0, 'R'); - $pdf->ln(); - - $amount_deb = 0; - $amount_cred = 0; - $prog=0; - for ($i = 0; $i < count($letter->content); $i++) - { - if ($i % 2 == 0) - { - $pdf->SetFillColor(220, 221, 255); - $fill = 1; - } - else - { - $pdf->SetFillColor(0, 0, 0); - $fill = 0; - } - $pdf->SetFont('DejaVuCond', '', 7); - $row = $letter->content[$i]; - $str_date = shrink_date($row['j_date_fmt']); - - $pdf->LongLine($tab[0], 4, $str_date, 0, $align[0], $fill); - $pdf->Cell($tab[1], 4, $row['jr_pj_number'], 0, 0, $align[1], $fill); - $pdf->LongLine($tab[2], 4, $row['jr_internal'], 0, $align[1], $fill); - $pdf->LongLine($tab[3], 4, $row['jr_comment'], 0, $align[2], $fill); - if ($row['j_debit'] == 't') - { - $prog=bcadd($prog,$row['j_montant']); - $pdf->Cell($tab[4], 4, sprintf('%s D', nbm($row['j_montant'])), 0, 0, $align[4], $fill); - $amount_deb+=$row['j_montant']; - $str_prog=sprintf("%s %s",nbm(abs($prog)),$fic->get_amount_side($prog)); - $pdf->Cell($tab[5], 4, $str_prog, 0, 0, $align[5], $fill); - } - else - { - $prog=bcsub($prog,$row['j_montant']); - $pdf->Cell($tab[4], 4, sprintf('%s C', nbm($row['j_montant'])), 0, 0, $align[4], $fill); - $amount_cred+=$row['j_montant']; - $str_prog=sprintf("%s %s",nbm(abs($prog)),$fic->get_amount_side($prog)); - $pdf->Cell($tab[5], 4, $str_prog, 0, 0, $align[5], $fill); - } - if ($row['letter'] != -1) - { - $pdf->Cell($tab[6], 4, strtoupper(base_convert($row['letter'],10,36)), 0, 0, $align[6], $fill); - // get sum for this lettering - - $pdf->Cell($tab[7], 4, sprintf('%s', nbm($row['letter_diff'])), '0', '0', $align[7], $fill); - } - else - $pdf->Cell($tab[6], 4, "", 0, 0, 'R', $fill); - $pdf->Ln(); - } - $pdf->SetFillColor(0, 0, 0); - $pdf->SetFont('DejaVuCond', 'B', 8); - $debit = sprintf('Debit : %s', nbm($amount_deb)); - $credit = sprintf('Credit : %s', nbm($amount_cred)); - if ($amount_deb > $amount_cred) - $s = 'solde débiteur'; - else - $s = 'solde crediteur'; - $solde = sprintf('%s : %s', $s, nbm(abs(round($amount_cred - $amount_deb, 2)))); - - $pdf->Cell(0, 6, $debit, 0, 0, 'R'); - $pdf->ln(4); - $pdf->Cell(0, 6, $credit, 0, 0, 'R'); - $pdf->ln(4); - $pdf->Cell(0, 6, $solde, 0, 0, 'R'); - $pdf->ln(4); - - $pdf->Ln(); - } - } -} -//Save PDF to file -$fDate=date('dmy-Hi'); -$pdf->Output("category-$fDate.pdf", 'D'); -exit; diff --git a/sources/include/export_fiche_csv.php b/sources/include/export_fiche_csv.php deleted file mode 100644 index aff85a6..0000000 --- a/sources/include/export_fiche_csv.php +++ /dev/null @@ -1,89 +0,0 @@ -get_by_type(); - $o=0; - // Heading - $fiche_def->GetAttribut(); - foreach ($fiche_def->attribut as $attribut) - { - if ( $o == 0 ) - { - printf("%s",$attribut->ad_text); - $o=1; - } - else - { - printf(";%s",$attribut->ad_text); - } - } - printf("\n"); - $o=0; - // Details - - foreach ($e as $fiche) - { - $detail=new Fiche($cn,$fiche['f_id']); - - $detail->getAttribut(); - - foreach ( $detail->attribut as $dattribut ) - { - if ( $o == 0 ) - { - printf("%s",$dattribut->av_text); - $o=1; - } - else - { - printf (";%s",$dattribut->av_text); - - } - } - printf("\n"); - $o=0; - } - - -} -exit; -?> diff --git a/sources/include/export_fiche_detail_csv.php b/sources/include/export_fiche_detail_csv.php deleted file mode 100644 index ad6c00e..0000000 --- a/sources/include/export_fiche_detail_csv.php +++ /dev/null @@ -1,163 +0,0 @@ -get_quick_code(); - -header('Content-type: application/csv'); - -header('Pragma: public'); -header('Content-Disposition: attachment;filename="fiche-'.$qcode.'.csv"',FALSE); -$Fiche->getName(); -list($array,$tot_deb,$tot_cred)=$Fiche->get_row_date( - $_GET['from_periode'], - $_GET['to_periode'], - $_GET['ople'] - ); -if ( count($Fiche->row ) == 0 ) -{ - echo "Aucune donnée"; - return; -} - - -if ( ! isset ($_REQUEST['oper_detail'])) -{ - echo '"Qcode";'. - "\"Date\";". - "\"n° pièce\";". - "\"Code interne\";". - '"Code journal";'. - '"Nom journal";'. - "\"Description\";". - "\"Débit\";". - "\"Crédit\";". - "\"Prog.\";". - "\"Let.\"" ; - printf("\n"); - $progress=0; - $current_exercice=""; - $tot_deb=0;$tot_cred=0; - bcscale(2); - foreach ( $Fiche->row as $op ) - { - /* - * separation per exercice - */ - if ( $current_exercice == "") $current_exercice=$op['p_exercice']; - - if ( $current_exercice != $op['p_exercice']) { - $solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur"; - $diff=abs($tot_deb-$tot_cred); - printf( - ";;;". - '"'._('total').'";'. - '"'.$current_exercice.'";;'. - '"'."$solde_type".'"'.";". - nb($tot_deb).";". - nb($tot_cred).";". - nb($diff).";"."\n"); - /* - * reset total and current_exercice - */ - $progress=0; - $current_exercice=$op['p_exercice']; - $tot_deb=0;$tot_cred=0; - } - $diff=bcsub($op['deb_montant'],$op['cred_montant']); - $progress=bcadd($progress,$diff); - $tot_deb=bcadd($tot_deb,$op['deb_montant']); - $tot_cred=bcadd($tot_cred,$op['cred_montant']); - echo '"'.$op['j_qcode'].'";'. - '"'.$op['j_date_fmt'].'"'.";". - '"'.$op['jr_pj_number'].'"'.";". - '"'.$op['jr_internal'].'"'.";". - '"'.$op['jrn_def_code'].'"'.";". - '"'.$op['jrn_def_name'].'"'.";". - '"'.$op['description'].'"'.";". - nb($op['deb_montant']).";". - nb($op['cred_montant']).";". - nb(abs($progress)).';'. - '"'.(($op['letter']==-1)?'':strtoupper(base_convert($op['letter'],10,36))).'"'; - printf("\n"); - - } -} -else -{ - echo '"Poste";"Qcode";"date";"ref";"internal";'; - echo "\"Description\";". - "\"Montant\";". - "\"D/C\""; - - printf("\r\n"); - - foreach ( $Fiche->row as $op ) - { - $acc=new Acc_Operation($cn); - $acc->jr_id=$op['jr_id']; - $result= $acc->get_jrnx_detail(); - - foreach ( $result as $r) - { - printf('"%s";"%s";"%s";"%s";"%s";%s;%s;"%s"', - $r['j_poste'], - $r['j_qcode'], - $r['jr_date'], - $op['jr_pj_number'], - $r['jr_internal'], - $r['description'], - nb($r['j_montant']), - $r['debit']); - printf("\r\n"); - - } - - - - } -} -$solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur"; -$diff=abs($tot_deb-$tot_cred); -printf( - '"'."$solde_type".'"'.";". - nb($diff).";". - nb($tot_deb).";". - nb($tot_cred)."\n"); - -exit; -?> diff --git a/sources/include/export_fiche_detail_pdf.php b/sources/include/export_fiche_detail_pdf.php deleted file mode 100644 index 73d5d15..0000000 --- a/sources/include/export_fiche_detail_pdf.php +++ /dev/null @@ -1,231 +0,0 @@ -setDossierInfo(" Periode : ".$_GET['from_periode']." - ".$_GET['to_periode']); -$pdf->AliasNbPages(); -$pdf->AddPage(); -$pdf->SetAuthor('NOALYSS'); -$pdf->setTitle("Détail fiche",true); - - -$Fiche=new Fiche($cn,$f_id); - - -list($array,$tot_deb,$tot_cred)=$Fiche->get_row_date($from_periode,$to_periode,$_GET['ople']); -// don't print empty account -if ( count($array) == 0 ) -{ - exit; -} -$size=array(13,25,20,60,12,20,20,20); -$align=array('L','C','C','L','R','R','R','R'); - -$Libelle=sprintf("(%s) %s [ %s ]",$Fiche->id,$Fiche->getName(),$Fiche->get_quick_code()); -$pdf->SetFont('DejaVu','',10); -$pdf->Cell(0,8,$Libelle,1,0,'C'); -$pdf->Ln(); - - -$pdf->SetFont('DejaVuCond','',8); -$l=0; -$pdf->Cell($size[$l],6,'Date',0,0,'L'); -$l++; -$pdf->Cell($size[$l],6,'Ref',0,0,'C'); -$l++; -$pdf->Cell($size[$l],6,'Journal',0,0,'C'); -$l++; -$pdf->Cell($size[$l],6,'Libellé',0,0,'L'); -$l++; -$pdf->Cell($size[$l],6,'Let',0,0,'R'); -$l++; -$pdf->Cell($size[$l],6,'Debit',0,0,'R'); -$l++; -$pdf->Cell($size[$l],6,'Credit',0,0,'R'); -$l++; -$pdf->Cell($size[$l],6,'Prog',0,0,'R'); -$l++; -$pdf->ln(); -$tot_deb=0; -$tot_cred=0; -$progress=0; -$current_exercice=""; -bcscale(2); -for ($e=0;$eSetFont('DejaVu','B',8); - $pdf->LongLine(15,6,_('totaux'),0,'L'); - $pdf->Cell(15,6,$current_exercice,0,0,'L'); - $pdf->LongLine(40,6,$solde,0,'L'); - $pdf->Cell(40,6,$str_debit,0,0,'R'); - $pdf->Cell(40,6,$str_credit,0,0,'R'); - $pdf->Cell(40,6,$str_diff_solde,0,0,'R'); - $pdf->Ln(); - /* - * reset total and current_exercice - */ - $prog=0; - $current_exercice=$row['p_exercice']; - $tot_deb=0;$tot_cred=0; - $pdf->SetFont('DejaVuCond','',8); - } - $l=0; - $progress=bcsub($row['deb_montant'],$row['cred_montant']); - - - $date=shrink_date($row['j_date_fmt']); - $pdf->LongLine($size[$l],6,$date,0,$align[$l]); - $l++; - if ( $row['jr_pj_number'] == '') - $pdf->Cell($size[$l],6,"",0,0,$align[$l]); - else - $pdf->Cell($size[$l],6,$row['jr_pj_number'],0,0,$align[$l]); - - $l++; - $pdf->LongLine($size[$l],6,mb_substr($row['jrn_def_code'],0,14),0,$align[$l]); - $l++; - $pdf->LongLine($size[$l],6,($row['description'].'('.$row['jr_internal'].")"),0,$align[$l]); - - $l++; - $pdf->LongLine($size[$l],6,(($row['letter']!=-1)?strtoupper(base_convert($row['letter'],10,36)):''),0,$align[$l]); - $l++; - $pdf->LongLine($size[$l],6,(sprintf('% 12.2f',$row['deb_montant'])),0,$align[$l]); - $l++; - $pdf->LongLine($size[$l],6,(sprintf('% 12.2f',$row['cred_montant'])),0,$align[$l]); - $l++; - $pdf->LongLine($size[$l],6,(sprintf('% 12.2f',abs($progress))),0,$align[$l]); - $l++; - $pdf->ln(); - $tot_deb=bcadd($tot_deb,$row['deb_montant']); - $tot_cred=bcadd($tot_cred,$row['cred_montant']); - /* -------------------------------------- */ - /* if details are asked we show them here */ - /* -------------------------------------- */ - if ( isset($_GET['oper_detail'])) - { - $detail=new Acc_Operation($cn); - $detail->jr_id=$row['jr_id']; - $a_detail=$detail->get_jrnx_detail(); - for ($f=0;$fCell($size[$l],6,'',0,0,$align[$l]); - $l++; - $pdf->Cell($size[$l],6,$a_detail[$f]['j_qcode'],0,0,'L'); - $l++; - $pdf->Cell($size[$l],6,$a_detail[$f]['j_poste'],0,0,'R'); - $l++; - if ( $a_detail[$f]['j_qcode']=='') - $lib=$a_detail[$f]['pcm_lib']; - else - { - $f_id=$cn->get_value('select f_id from vw_poste_qcode where j_qcode=$1',array($a_detail[$f]['j_qcode'])) ; - $lib=$cn->get_value('select ad_value from fiche_detail where ad_id=$1 and f_id=$2', - array(ATTR_DEF_NAME,$f_id)); - } - $pdf->Cell($size[$l],6,$lib,0,0,$align[$l]); - $l++; - $pdf->Cell($size[$l],6,(($a_detail[$f]['letter']!=-1)?$a_detail[$f]['letter']:''),0,0,$align[$l]); - $l++; - - $deb=($a_detail[$f]['debit']=='D')?$a_detail[$f]['j_montant']:''; - $cred=($a_detail[$f]['debit']=='C')?$a_detail[$f]['j_montant']:''; - - $pdf->Cell($size[$l],6,(sprintf('% 12.2f',$deb)),0,0,$align[$l]); - $l++; - $pdf->Cell($size[$l],6,(sprintf('% 12.2f',$cred)),0,0,$align[$l]); - $l++; - $pdf->ln(); - } - } - -} -$str_debit=sprintf("% 12.2f €",$tot_deb); -$str_credit=sprintf("% 12.2f €",$tot_cred); -$diff_solde=$tot_deb-$tot_cred; -if ( $diff_solde < 0 ) -{ - $solde=" créditeur "; - $diff_solde*=-1; -} -else -{ - $solde=" débiteur "; -} -$str_diff_solde=sprintf("%12.2f €",$diff_solde); - -$pdf->SetFont('DejaVu','B',8); - -$pdf->Cell(160,5,'Débit',0,0,'R'); -$pdf->Cell(30,5,$str_debit,0,0,'R'); -$pdf->Ln(); -$pdf->Cell(160,5,'Crédit',0,0,'R'); -$pdf->Cell(30,5,$str_credit,0,0,'R'); -$pdf->Ln(); -$pdf->Cell(160,5,'Solde '.$solde,0,0,'R'); -$pdf->Cell(30,5,$str_diff_solde,0,0,'R'); -$pdf->Ln(); - -$fDate=date('dmy-Hi'); -$pdf->Output('fiche-'.$fDate.'.pdf','D'); - - -?> diff --git a/sources/include/export_fiche_pdf.php b/sources/include/export_fiche_pdf.php deleted file mode 100644 index 73c4925..0000000 --- a/sources/include/export_fiche_pdf.php +++ /dev/null @@ -1,232 +0,0 @@ -category, export in PDF the history of a category - * of card - */ -if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); -// Security we check if user does exist and his privilege -require_once NOALYSS_INCLUDE.'/class_user.php'; -require_once NOALYSS_INCLUDE.'/class_database.php'; -require_once NOALYSS_INCLUDE.'/class_pdf.php'; -require_once NOALYSS_INCLUDE.'/class_lettering.php'; -require_once NOALYSS_INCLUDE.'/class_dossier.php'; -require_once NOALYSS_INCLUDE.'/ac_common.php'; - -/* Security */ -$gDossier=dossier::id(); -$cn=new Database($gDossier); -$g_user->Check(); -$g_user->check_dossier($gDossier); - -$pdf=new PDF($cn); -$pdf->setDossierInfo(" Periode : ".$_GET['start']." - ".$_GET['end']); -$pdf->AliasNbPages(); -$pdf->AddPage(); -$name=$cn->get_value('select fd_label from fiche_def where fd_id=$1',array($_GET['cat'])); -$pdf->SetFont('DejaVu','BI',14); -$pdf->Cell(0,8,$name,0,1,'C'); -$pdf->SetTitle($name,1); -$pdf->SetAuthor('NOALYSS'); -/* balance */ -if ( $_GET['histo'] == 4 ) -{ - $fd=new Fiche_Def($cn,$_REQUEST['cat']); - if ( $fd->hasAttribute(ATTR_DEF_ACCOUNT) == false ) - { - $pdf->Cell(0,10, "Cette catégorie n'ayant pas de poste comptable n'a pas de balance"); - //Save PDF to file - $fDate=date('dmy-Hi'); - $pdf->Output("category-$fDate.pdf", 'D'); - exit; - } - $aCard=$cn->get_array("select f_id,ad_value from fiche join fiche_Detail using (f_id) where ad_id=1 and fd_id=$1 order by 2 ",array($_REQUEST['cat'])); - - if ( empty($aCard)) - { - $pdf->Cell(0,10, "Aucune fiche trouvée");//Save PDF to file - $fDate=date('dmy-Hi'); - $pdf->Output("category-$fDate.pdf", 'D'); - exit; - } - $pdf->SetFont('DejaVuCond','',7); - $pdf->Cell(30,7,'Quick Code',0,0,'L',0); - $pdf->Cell(80,7,'Libellé',0,0,'L',0); - $pdf->Cell(20,7,'Débit',0,0,'R',0); - $pdf->Cell(20,7,'Crédit',0,0,'R',0); - $pdf->Cell(20,7,'Solde',0,0,'R',0); - $pdf->Cell(20,7,'D/C',0,0,'C',0); - $pdf->Ln(); - $idx=0; - for ($i=0;$i < count($aCard);$i++) - { - if ( isDate($_REQUEST['start']) == null || isDate ($_REQUEST['end']) == null ) exit; - $filter= " (j_date >= to_date('".$_REQUEST['start']."','DD.MM.YYYY') ". - " and j_date <= to_date('".$_REQUEST['end']."','DD.MM.YYYY')) "; - $oCard=new Fiche($cn,$aCard[$i]['f_id']); - $solde=$oCard->get_solde_detail($filter); - if ( $solde['debit'] == 0 && $solde['credit']==0) continue; - - if ( $idx % 2 == 0 ) - { - $pdf->SetFillColor(220,221,255); - $fill=1; - } - else - { - $pdf->SetFillColor(0,0,0); - $fill=0; - } - $idx++; - - $pdf->Cell(30,7,$oCard->strAttribut(ATTR_DEF_QUICKCODE),0,0,'L',$fill); - $pdf->Cell(80,7,$oCard->strAttribut(ATTR_DEF_NAME),0,0,'L',$fill); - $pdf->Cell(20,7,sprintf('%.02f',$solde['debit']),0,0,'R',$fill); - $pdf->Cell(20,7,sprintf('%.02f',$solde['credit']),0,0,'R',$fill); - $pdf->Cell(20,7,sprintf('%.02f',abs($solde['solde'])),0,0,'R',$fill); - $pdf->Cell(20,7,(($solde['solde']<0)?'CRED':'DEB'),0,0,'C',$fill); - $pdf->Ln(); - } -} -else -{ - $array=Fiche::get_fiche_def($cn,$_GET['cat'],'name_asc'); - /* - * You show now the result - */ - if ($array == null ) - { - exit(); - } - $tab=array(13,25,55,20,20,12,20); - $align=array('L','L','L','R','R','R','R'); - - foreach($array as $row_fiche) - { - $row=new Fiche($cn,$row_fiche['f_id']); - $letter=new Lettering_Card($cn); - $letter->set_parameter('quick_code',$row->strAttribut(ATTR_DEF_QUICKCODE)); - $letter->set_parameter('start',$_GET['start']); - $letter->set_parameter('end',$_GET['end']); - // all - if ( $_GET['histo'] == 0 ) - { - $letter->get_all(); - } - - // lettered - if ( $_GET['histo'] == 1 ) - { - $letter->get_letter(); - } - // unlettered - if ( $_GET['histo'] == 2 ) - { - $letter->get_unletter(); - } - /* skip if nothing to display */ - if (count($letter->content) == 0 ) continue; - $pdf->SetFont('DejaVuCond','',10); - $fiche=new Fiche($cn,$row_fiche['f_id']); - $pdf->Cell(0,7,$fiche->strAttribut(ATTR_DEF_NAME),1,1,'C'); - - $pdf->SetFont('DejaVuCond','',7); - - $pdf->Cell($tab[0],7,'Date'); - $pdf->Cell($tab[1],7,'ref'); - $pdf->Cell($tab[1],7,'Int.'); - $pdf->Cell($tab[2],7,'Comm'); - $pdf->Cell(40,7,'Montant',0,0,'C'); - $pdf->Cell($tab[5],7,'Let.',0,0,'R'); - $pdf->Cell($tab[6],7,'Som. Let.',0,0,'R'); - $pdf->ln(); - - $amount_deb=0; - $amount_cred=0; - for ($i=0;$icontent);$i++) - { - if ( $i % 2 == 0 ) - { - $pdf->SetFillColor(220,221,255); - $fill=1; - } - else - { - $pdf->SetFillColor(0,0,0); - $fill=0; - } - $pdf->SetFont('DejaVuCond','',7); - $row=$letter->content[$i]; - $str_date=shrink_date($row['j_date_fmt']); - - $pdf->Cell($tab[0],4,$str_date,0,0,$align[0],$fill); - $pdf->Cell($tab[1],4,$row['jr_pj_number'],0,0,$align[1],$fill); - $pdf->Cell($tab[1],4,$row['jr_internal'],0,0,$align[1],$fill); - $pdf->Cell($tab[2],4,$row['jr_comment'],0,0,$align[2],$fill); - if ( $row['j_debit'] == 't') - { - $pdf->Cell($tab[3],4,sprintf('%10.2f',$row['j_montant']),0,0,$align[4],$fill); - $amount_deb+=$row['j_montant']; - $pdf->Cell($tab[4],4,"",0,0,'C',$fill); - } - else - { - $pdf->Cell($tab[3],4,"",0,0,'C',$fill); - $pdf->Cell($tab[4],4,sprintf('%10.2f',$row['j_montant']),0,0,$align[4],$fill); - $amount_cred+=$row['j_montant']; - } - if ($row['letter'] != -1 ) - { - $pdf->Cell($tab[5],4,strtoupper(base_convert($row['letter'],10,36)),0,0,$align[5],$fill); - // get sum for this lettering - $sql="select sum(j_montant) from jrnx where j_debit=$1 and j_id in ". - " (select j_id from jnt_letter join letter_deb using (jl_id) where jl_id=$2 union ". - " select j_id from jnt_letter join letter_cred using (jl_id) where jl_id=$3)"; - $sum=$cn->get_value($sql,array($row['j_debit'],$row['letter'],$row['letter'])); - $pdf->Cell($tab[6],4,sprintf('%.2f',$sum),'0','0','R',$fill); - } - else - $pdf->Cell($tab[5],4,"",0,0,'R',$fill); - $pdf->Ln(); - } - $pdf->SetFillColor(0,0,0); - $pdf->SetFont('DejaVuCond','B',8); - $debit =sprintf('Debit : % 12.2f',$amount_deb); - $credit=sprintf('Credit : % 12.2f',$amount_cred); - if ( $amount_deb>$amount_cred) $s='solde débiteur'; - else $s='solde crediteur'; - $solde =sprintf('%s : % 12.2f',$s,(abs(round($amount_cred-$amount_deb,2)))); - - $pdf->Cell(0,6,$debit,0,0,'R'); - $pdf->ln(4); - $pdf->Cell(0,6,$credit,0,0,'R'); - $pdf->ln(4); - $pdf->Cell(0,6,$solde,0,0,'R'); - $pdf->ln(4); - - $pdf->Ln(); - } -} -//Save PDF to file -$fDate=date('dmy-Hi'); -$pdf->Output("category-$fDate.pdf", 'D'); -exit; diff --git a/sources/include/export_follow_up_csv.php b/sources/include/export_follow_up_csv.php deleted file mode 100644 index 0fa1323..0000000 --- a/sources/include/export_follow_up_csv.php +++ /dev/null @@ -1,42 +0,0 @@ -export_csv($_GET); - -exit(); - -?> diff --git a/sources/include/export_form_csv.php b/sources/include/export_form_csv.php deleted file mode 100644 index 6fb205c..0000000 --- a/sources/include/export_form_csv.php +++ /dev/null @@ -1,105 +0,0 @@ -get_name(); -// Step ? -//-- -$step=HtmlInput::default_value_get("p_step", 0); -if ( $step == 0 ) -{ - if ( $_GET ['type_periode'] == 0 ) - $array=$Form->get_row( $_GET['from_periode'],$_GET['to_periode'], $_GET['type_periode']); - else - $array=$Form->get_row( $_GET['from_date'],$_GET['to_date'], $_GET['type_periode']); - - - if ( count($Form->row ) == 0 ) - exit; - - echo "\"Description\";". - "\"Montant\"\n"; - - - - foreach ( $Form->row as $op ) - { - echo '"'.$op['desc'].'"'.";". - nb($op['montant']). - "\n"; - - } -} -elseif ($step == 1) -{ - // Gather all the data - //--- - for ($e=$_GET['from_periode'];$e<=$_GET['to_periode'];$e+=$_GET['p_step']) - { - $periode=getPeriodeName($cn,$e); - if ( $periode == null ) continue; - $array[]=$Form->get_row($e,$e,$_GET['type_periode']); - $periode_name[]=$periode; - } - // Display column heading - //-- - $x=""; - printf ("Mois;"); - foreach ($array[0] as $e) - { - printf("%s%s",$x,$e['desc']); - $x=";"; - - } - printf("\n"); - // Display value for each line - //-- - $a=0; - foreach ($array as $e ) - { - print $periode_name[$a]; - $a++; - foreach ($e as $elt) - { - printf(";%s",nb($elt['montant'])); - } - printf("\n"); - } -} -exit; -?> diff --git a/sources/include/export_form_pdf.php b/sources/include/export_form_pdf.php deleted file mode 100644 index 5bb8e12..0000000 --- a/sources/include/export_form_pdf.php +++ /dev/null @@ -1,130 +0,0 @@ -get_name()); -$pdf= new PDF($cn); -$pdf->setDossierInfo($Libelle); -$pdf->AliasNbPages(); -$pdf->AddPage(); -$pdf->SetAuthor('NOALYSS'); -$pdf->setTitle("Rapport ".$Libelle,true); - -// Step ?? -//-- -$step=HtmlInput::default_value_get("p_step", 0); - -if ( $step == 0 ) -{ - // No step asked - //-- - if ( $_GET ['type_periode'] == 0 ) - $array=$Form->get_row( $_GET['from_periode'],$_GET['to_periode'], $_GET['type_periode']); - else - $array=$Form->get_row( $_GET['from_date'],$_GET['to_date'], $_GET['type_periode']); - -} -else -{ - // yes with step - //-- - for ($e=$_GET['from_periode'];$e<=$_GET['to_periode'];$e+=$_GET['p_step']) - { - $periode=getPeriodeName($cn,$e); - if ( $periode == null ) continue; - $array[]=$Form->get_row($e,$e,'periode'); - $periode_name[]=$periode; - } - -} - - -$pdf->SetFont('DejaVuCond','',8); - -// without step -if ( $step == 0 ) -{ - if ( $_GET['type_periode'] == 0 ) - { - $q=getPeriodeName($cn,$from_periode); - if ( $from_periode != $to_periode) - { - $periode=sprintf("Période %s à %s",$q,getPeriodeName($cn,$to_periode)); - } - else - { - $periode=sprintf("Période %s",$q); - } - } - else - { - $periode=sprintf("Date %s jusque %s",$_GET['from_date'],$_GET['to_date']); - } - $pdf->Cell(0,7,$periode,'B'); - $pdf->Ln(); - for ($i=0;$iCell(160,6,$array[$i]['desc']); - $pdf->Cell(30,6,sprintf('% 12.2f',$array[$i]['montant']),0,0,'R'); - $pdf->Ln(); - } -} -else -{ // With Step - $a=0; - foreach ($array as $e) - { - $pdf->Cell(0,7,$periode_name[$a],'B'); - $pdf->Ln(); - $a++; - for ($i=0;$iCell(160,6,$e[$i]['desc']); - $pdf->Cell(30,6,sprintf('% 12.2f',$e[$i]['montant']),0,0,'R'); - $pdf->Ln(); - } - } -} - -$fDate=date('dmy-Hi'); -$pdf->Output('rapport-'.$fDate.'.pdf','D'); - -?> diff --git a/sources/include/export_gl_csv.php b/sources/include/export_gl_csv.php deleted file mode 100644 index 2e40e61..0000000 --- a/sources/include/export_gl_csv.php +++ /dev/null @@ -1,214 +0,0 @@ -get_array("select pcm_val from tmp_pcmn where pcm_val::text like '$parent%' order by pcm_val::text"); - } - elseif ( $cn->count_sql('select * from tmp_pcmn where pcm_val='.sql_string($poste_id)) != 0 ) - { - $a_poste=array('pcm_val' => $poste_id); - } -} -else -{ - $cond_poste=''; - $sql="select pcm_val from tmp_pcmn "; - if ($from_poste != '') - { - $cond_poste = ' where '; - $cond_poste .=" pcm_val >= upper ('".Database::escape_string($from_poste)."')"; - } - - if ( $to_poste != '') - { - if ( $cond_poste == '') - { - $cond_poste = " where pcm_val <= upper ('".Database::escape_string($to_poste)."')"; - } - else - { - $cond_poste.=" and pcm_val <= upper ('".Database::escape_string($to_poste)."')"; - } - } - - $sql=$sql.$cond_poste.' order by pcm_val::text'; - - $a_poste=$cn->get_array($sql); - -} - -if ( count($a_poste) == 0 ) -{ - echo 'Rien à rapporter.'; - printf("\n"); - exit; -} - -// Header -$header = array( "Date", "Référence", "Libellé", "Pièce","Lettrage", "Débit", "Crédit", "Solde" ); - -$l=(isset($_GET['letter']))?2:0; -$s=(isset($_REQUEST['solded']))?1:0; - -foreach ($a_poste as $poste) -{ - - - $Poste=new Acc_Account_Ledger($cn,$poste['pcm_val']); - - $array1=$Poste->get_row_date($from_periode,$to_periode,$l,$s); - // don't print empty account - if ( count($array1) == 0 ) - { - continue; - } - $array=$array1[0]; - $tot_deb=$array1[1]; - $tot_cred=$array1[2]; - - // don't print empty account - if ( count($array) == 0 ) - { - continue; - } - - echo sprintf("%s - %s ",$Poste->id,$Poste->get_name()); - printf("\n"); - - for($i=0;$irow as $detail) - { - - /* - [0] => 1 [jr_id] => 1 - [1] => 01.02.2009 [j_date_fmt] => 01.02.2009 - [2] => 2009-02-01 [j_date] => 2009-02-01 - [3] => 0 [deb_montant] => 0 - [4] => 12211.9100 [cred_montant] => 12211.9100 - [5] => Ecriture douverture [description] => Ecriture douverture - [6] => Opération Diverses [jrn_name] => Opération Diverses - [7] => f [j_debit] => f - [8] => 17OD-01-1 [jr_internal] => 17OD-01-1 - [9] => ODS1 [jr_pj_number] => ODS1 ) 1 - */ -/* - * separation per exercice - */ - if ( $current_exercice == "") $current_exercice=$detail['p_exercice']; - - if ( $current_exercice != $detail['p_exercice']) { - echo ";"; - echo '"'.$current_exercice.'";'; - echo ";"; - echo ";"; - echo 'Total du compte '.$Poste->id.";"; - echo ($solde_d > 0 ? nb($solde_d) : '').";"; - echo ($solde_c > 0 ? nb( $solde_c) : '').";"; - echo nb(abs($solde_c-$solde_d)).";"; - echo ($solde_c > $solde_d ? 'C' : 'D').";"; - printf("\n"); - printf("\n"); - /* - * reset total and current_exercice - */ - $current_exercice=$detail['p_exercice']; - $solde = 0.0; - $solde_d = 0.0; - $solde_c = 0.0; - - } - if ($detail['cred_montant'] > 0) - { - $solde -= $detail['cred_montant']; - $solde_c += $detail['cred_montant']; - } - if ($detail['deb_montant'] > 0) - { - $solde += $detail['deb_montant']; - $solde_d += $detail['deb_montant']; - } - - echo $detail['j_date_fmt'].";"; - echo $detail['jr_internal'].";"; - echo $detail['description'].";"; - echo $detail['jr_pj_number'].";"; - if ($detail['letter'] == -1) { echo ';'; } else { echo $detail['letter'].";";} - echo ($detail['deb_montant'] > 0 ? nb($detail['deb_montant']) : '').";"; - echo ($detail['cred_montant'] > 0 ? nb($detail['cred_montant']) : '').";"; - echo nb(abs($solde)).";"; - echo $Poste->get_amount_side($solde); - printf("\n"); - - } - - - echo ";"; - echo '"'.$current_exercice.'";'; - echo ";"; - echo ";"; - echo 'Total du compte '.$Poste->id.";"; - echo ($solde_d > 0 ? nb($solde_d) : '').";"; - echo ($solde_c > 0 ? nb( $solde_c) : '').";"; - echo nb(abs($solde_c-$solde_d)).";"; - echo ($solde_c > $solde_d ? 'C' : 'D').";"; - printf("\n"); - printf("\n"); -} - -exit; - -?> diff --git a/sources/include/export_gl_pdf.php b/sources/include/export_gl_pdf.php deleted file mode 100644 index eed2fe5..0000000 --- a/sources/include/export_gl_pdf.php +++ /dev/null @@ -1,239 +0,0 @@ -Check(); -$g_user->check_dossier($gDossier); - -$sql="select pcm_val from tmp_pcmn "; - -extract($_GET); -$cond_poste=""; -if ($from_poste != '') - { - $cond_poste = ' where '; - $cond_poste .=' pcm_val >= upper (\''.Database::escape_string($from_poste).'\')'; - } - -if ( $to_poste != '') - { - if ( $cond_poste == '') - { - $cond_poste = ' where pcm_val <= upper (\''.Database::escape_string($to_poste).'\')'; - } - else - { - $cond_poste.=' and pcm_val <= upper (\''.Database::escape_string($to_poste).'\')'; - } - } - -$sql=$sql.$cond_poste.' order by pcm_val::text'; -$a_poste=$cn->get_array($sql); - -$pdf = new PDF($cn); -$pdf->setDossierInfo(" Periode : ".$from_periode." - ".$to_periode); -$pdf->AliasNbPages(); -$pdf->AddPage(); -$pdf->setTitle("Grand Livre",true); -$pdf->SetAuthor('NOALYSS'); - -if ( count($a_poste) == 0 ) -{ - $pdf->Output(); - return; -} - -// Header -$header = array( "Date", "Référence", "Libellé", "Pièce","Let", "Débit", "Crédit", "Solde" ); -// Left or Right aligned -$lor = array( "L" , "L" , "L" , "L" , "R", "R" , "R" , "R" ); -// Column widths (in mm) -$width = array( 13 , 20 , 60 , 15 , 12 , 20 , 20 , 20 ); -$l=(isset($_REQUEST['letter']))?2:0; -$s=(isset($_REQUEST['solded']))?1:0; - -foreach ($a_poste as $poste) -{ - - $Poste=new Acc_Account_Ledger($cn,$poste['pcm_val']); - - - $array1=$Poste->get_row_date($from_periode,$to_periode,$l,$s); - // don't print empty account - if ( count($array1) == 0 ) - { - continue; - } - $array=$array1[0]; - $tot_deb=$array1[1]; - $tot_cred=$array1[2]; - - $pdf->SetFont('DejaVuCond','',10); - $Libelle=sprintf("%s - %s ",$Poste->id,$Poste->get_name()); - $pdf->Cell(0, 7, $Libelle, 1, 1, 'C'); - - $pdf->SetFont('DejaVuCond','',6); - for($i=0;$iCell($width[$i], 4, $header[$i], 0, 0, $lor[$i]); - $pdf->Ln(); - - $pdf->SetFont('DejaVuCond','',7); - - - $solde = 0.0; - $solde_d = 0.0; - $solde_c = 0.0; - $current_exercice=""; - foreach ($Poste->row as $detail) - { - - /* - [0] => 1 [jr_id] => 1 - [1] => 01.02.2009 [j_date_fmt] => 01.02.2009 - [2] => 2009-02-01 [j_date] => 2009-02-01 - [3] => 0 [deb_montant] => 0 - [4] => 12211.9100 [cred_montant] => 12211.9100 - [5] => Ecriture douverture [description] => Ecriture douverture - [6] => Opération Diverses [jrn_name] => Opération Diverses - [7] => f [j_debit] => f - [8] => 17OD-01-1 [jr_internal] => 17OD-01-1 - [9] => ODS1 [jr_pj_number] => ODS1 ) 1 - */ - /* - * separation per exercice - */ - if ( $current_exercice == "") $current_exercice=$detail['p_exercice']; - - if ( $current_exercice != $detail['p_exercice']) { - - $pdf->SetFont('DejaVuCond','B',8); - $i=0; - $pdf->Cell($width[$i], 6, $current_exercice, 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, '', 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, '', 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, '', 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, 'Total du compte '.$Poste->id, 0, 0, 'R'); - $i++; - $pdf->Cell($width[$i], 6, ($solde_d > 0 ? nbm($solde_d) : ''), 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, ($solde_c > 0 ? nbm( $solde_c) : ''), 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, nbm(abs($solde_c-$solde_d)), 0, 0, $lor[$i]); - $i++; - $pdf->Cell(5, 6, ($solde_c > $solde_d ? 'C' : 'D'), 0, 0, 'L'); - /* - * reset total and current_exercice - */ - $current_exercice=$detail['p_exercice']; - $solde = 0.0; - $solde_d = 0.0; - $solde_c = 0.0; - $pdf->Ln(); - $pdf->SetFont('DejaVuCond','',7); - - } - - if ($detail['cred_montant'] > 0) - { - $solde = bcsub ($solde,$detail['cred_montant']); - $solde_c = bcadd($solde_c,$detail['cred_montant']); - } - if ($detail['deb_montant'] > 0) - { - $solde = bcadd($solde,$detail['deb_montant']); - $solde_d = bcadd($solde_d,$detail['deb_montant']); - } - - $i = 0; - $side=" ".$Poste->get_amount_side($solde); - $pdf->LongLine($width[$i], 6, shrink_date($detail['j_date_fmt']), 0, $lor[$i]); - $i++; - $pdf->LongLine($width[$i], 6, $detail['jr_internal'], 0, $lor[$i] ); - $i++; - /* limit set to 40 for the substring */ - $triple_point = (mb_strlen($detail['description']) > 40 ) ? '...':''; - $pdf->LongLine($width[$i], 6, mb_substr($detail['description'],0,40).$triple_point, 0,$lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, $detail['jr_pj_number'], 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, ($detail['letter']!=-1)?$detail['letter']:'', 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, ($detail['deb_montant'] > 0 ? nbm( $detail['deb_montant']) : ''), 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, ($detail['cred_montant'] > 0 ? nbm( $detail['cred_montant']) : ''), 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, nbm(abs( $solde)).$side, 0, 0, $lor[$i]); - $i++; - $pdf->Ln(); - - } - - - $pdf->SetFont('DejaVuCond','B',8); - - $i = 0; - $pdf->Cell($width[$i], 6, $current_exercice, 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, '', 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, '', 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, '', 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, 'Total du compte '.$Poste->id, 0, 0, 'R'); - $i++; - $pdf->Cell($width[$i], 6, ($solde_d > 0 ? nbm($solde_d) : ''), 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, ($solde_c > 0 ? nbm( $solde_c) : ''), 0, 0, $lor[$i]); - $i++; - $pdf->Cell($width[$i], 6, nbm(abs($solde_c-$solde_d)), 0, 0, $lor[$i]); - $i++; - $pdf->Cell(5, 6, ($solde_c > $solde_d ? 'C' : 'D'), 0, 0, 'L'); - - $pdf->Ln(); - $pdf->Ln(); - -} -//Save PDF to file -$pdf->Output("gl_comptes.pdf", 'D'); -exit; -?> diff --git a/sources/include/export_histo_csv.php b/sources/include/export_histo_csv.php deleted file mode 100644 index 8eae32b..0000000 --- a/sources/include/export_histo_csv.php +++ /dev/null @@ -1,75 +0,0 @@ -build_search_sql($_GET); - -$order=" order by jr_date_order asc,substring(jr_pj_number,'[0-9]+$')::numeric asc "; - -$res=$cn->get_array($sql.$order); - -printf('"%s";',"Internal"); -printf('"%s";',"Journal"); -printf('"%s";',"Date"); -printf('"%s";',"Echeance"); -printf('"%s";',"Paiement"); -printf('"%s";',"Piece"); -printf('"%s";"";',"Tiers"); -printf('"%s";',"Description"); -printf('"%s";',"Note"); -printf('"%s"',"Montant opération"); -printf("\r\n"); - -for ($i=0;$iget_value("select qf_amount from quant_fin where jr_id=$1",array($res[$i]['jr_id'])); - if ( $positive !='' ) $amount=$positive; - } - printf('%s',nb($amount)); - - printf("\r\n"); - - } \ No newline at end of file diff --git a/sources/include/export_ledger_csv.php b/sources/include/export_ledger_csv.php deleted file mode 100644 index a7f94ab..0000000 --- a/sources/include/export_ledger_csv.php +++ /dev/null @@ -1,284 +0,0 @@ -Check(); -$g_user->check_dossier($gDossier); - -//---------------------------------------------------------------------------- -// $get_jrn == 0 when request for all ledger, in that case, we must filter -// the legder with the security in Acc_Ledger::get_row -//---------------------------------------------------------------------------- -if ($get_jrn!=0 && $g_user->check_jrn($get_jrn) =='X') -{ - NoAccess(); - exit(); -} - -$Jrn=new Acc_Ledger($cn,$get_jrn); - -$Jrn->get_name(); -$jrn_type=$Jrn->get_type(); - -// -// With Detail per item which is possible only for VEN or ACH -// -if ($get_option == 2) -{ - if ($jrn_type != 'ACH' && $jrn_type != 'VEN' || $Jrn->id == 0) - { - $get_option = 0; - } - else - { - switch ($jrn_type) - { - case 'VEN': - $ledger = new Acc_Ledger_Sold($cn, $get_jrn); - $ret_detail = $ledger->get_detail_sale($get_from_periode, $get_to_periode); - $a_heading= Acc_Ledger_Sold::heading_detail_sale(); - - break; - case 'ACH': - $ledger = new Acc_Ledger_Purchase($cn, $get_jrn); - $ret_detail = $ledger->get_detail_purchase($get_from_periode, $get_to_periode); - $a_heading= Acc_Ledger_Purchase::heading_detail_purchase(); - break; - default: - die(__FILE__ . ":" . __LINE__ . 'Journal invalide'); - break; - } - if ($ret_detail == null) - return; - $nb = Database::num_row($ret_detail); - $output=fopen("php://output","w"); - - for ($i = 0;$i < $nb ; $i++) { - $row=Database::fetch_array($ret_detail, $i); - if ( $i == 0 ) { - fputcsv($output,$a_heading,';'); - } - $a_row=array(); - for ($j=0;$j < count($row) / 2;$j++) { - $a_row[]=$row[$j]; - } - fputcsv($output,$a_row,';'); - unset($a_row); - } - } -} -//----------------------------------------------------------------------------- -// Detailled printing -// For miscellaneous legder or all ledgers -//----------------------------------------------------------------------------- -if ( $get_option == 0 ) -{ - $Jrn->get_row( $get_from_periode, $get_to_periode ); - - if ( count($Jrn->row) == 0) - exit; - foreach ( $Jrn->row as $op ) - { - // should clean description : remove tag and '; char - $desc=$op['description']; - $desc=str_replace("","",$desc); - $desc=str_replace("","",$desc); - $desc=str_replace("","",$desc); - $desc=str_replace("","",$desc); - $desc=str_replace('"',"'",$desc); - $desc=str_replace(";",",",$desc); - - printf("\"%s\";\"%s\";\"%s\";\"%s\";\"%s\";\"%s\";%s;%s\n", - $op['j_id'], - $op['jr_pj_number'], - $op['internal'], - $op['j_date'], - $op['poste'], - $desc, - nb($op['deb_montant']), - nb($op['cred_montant']) - ); - - } - exit; -} -//----------------------------------------------------------------------------- -// Detail printing for ACH or VEN : 1 row resume the situation with VAT, DNA -// for Misc the amount -// For Financial only the tiers and the sign of the amount -//----------------------------------------------------------------------------- -if ($get_option == 1) -{ - -//----------------------------------------------------- - if ( $jrn_type == 'ODS' || $jrn_type == 'FIN' || $jrn_type=='GL') - { - $Row=$Jrn->get_rowSimple($get_from_periode, - $get_to_periode, - 0); - printf ('" operation";'. - '"Date";'. - '"N° Pièce";'. - '"Tiers";'. - '"commentaire";'. - '"internal";'. - '"montant";'. - "\r\n"); - foreach ($Row as $line) - { - - echo $line['num'].";"; - echo $line['date'].";"; - echo $line['jr_pj_number'].";"; - echo $Jrn->get_tiers($line['jrn_def_type'],$line['jr_id']).";"; - echo $line['comment'].";"; - echo $line['jr_internal'].";"; - // echo "".$line['pj'].";"; - // If the ledger is financial : - // the credit must be negative and written in red - // Get the jrn type - if ( $line['jrn_def_type'] == 'FIN' ) { - $positive = $cn->get_value("select qf_amount from quant_fin ". - " where jr_id=".$line['jr_id']); - - echo nb($positive); - echo ";"; - } - else - { - echo nb($line['montant']).";"; - } - - printf("\r\n"); - } - } - -//------------------------------------------------------------------------------ -// One line summary with tiers, amount VAT, DNA, tva code .... -// -//------------------------------------------------------------------------------ - if ( $jrn_type=='ACH' || $jrn_type=='VEN') - { - $Row=$Jrn->get_rowSimple($get_from_periode, - $get_to_periode, - 0); - $cn->prepare('reconcile_date',"select to_char(jr_date,'DD.MM.YY') as str_date,* " - . "from jrn " - . "where " - . "jr_id in (select jra_concerned from jrn_rapt where jr_id = $1 union all select jr_id from jrn_rapt where jra_concerned=$1)"); - - $own=new Own($cn); - $col_tva=""; - - if ( $own->MY_TVA_USE=='Y') - { - $a_Tva=$cn->get_array("select tva_id,tva_label from tva_rate order by tva_rate,tva_label,tva_id"); - foreach($a_Tva as $line_tva) - { - $col_tva.='"Tva '.$line_tva['tva_label'].'";'; - } - } - echo '"Date";"Paiement";"operation";"Pièce";"Client/Fourn.";"Commentaire";"inter.";"HTVA";"privé";"DNA";"tva non ded.";"TVA NP";'.$col_tva.'"TVAC";"opérations liées"'."\n\r"; - foreach ($Row as $line) - { - printf('"%s";"%s";"%s";"%s";"%s";%s;%s;%s;%s;%s;%s;%s;', - $line['date'], - $line['date_paid'], - $line['num'], - $line['jr_pj_number'], - $Jrn->get_tiers($line['jrn_def_type'],$line['jr_id']), - $line['comment'], - $line['jr_internal'], - nb($line['HTVA']), - nb($line['dep_priv']), - nb($line['dna']), - nb($line['tva_dna']), - nb($line['tva_np']) - ); - $a_tva_amount=array(); - //- set all TVA to 0 - foreach ($a_Tva as $l) { - $t_id=$l["tva_id"]; - $a_tva_amount[$t_id]=0; - } - foreach ($line['TVA'] as $lineTVA) - { - $idx_tva=$lineTVA[1][0]; - $a_tva_amount[$idx_tva]=$lineTVA[1][2]; - } - if ($own->MY_TVA_USE == 'Y' ) - { - foreach ($a_Tva as $line_tva) - { - $a=$line_tva['tva_id']; - echo nb($a_tva_amount[$a]).';'; - } - } - echo nb ($line['TVAC']); - /** - * Retrieve payment if any - */ - $ret_reconcile=$cn->execute('reconcile_date',array($line['jr_id'])); - $max=Database::num_row($ret_reconcile); - if ($max > 0) { - $sep=";"; - for ($e=0;$e<$max;$e++) { - $row=Database::fetch_array($ret_reconcile, $e); - echo $sep.$row['str_date'].'; '. $row['jr_internal']; - } - } - printf("\r\n"); - - } - } -} -?> diff --git a/sources/include/export_ledger_pdf.php b/sources/include/export_ledger_pdf.php deleted file mode 100644 index 52f5ea9..0000000 --- a/sources/include/export_ledger_pdf.php +++ /dev/null @@ -1,79 +0,0 @@ -get_name(); -$g_user->Check(); -$g_user->check_dossier($gDossier); - -// Security -if ($_GET['jrn_id'] != 0 && $g_user->check_jrn($_GET['jrn_id']) == 'X') { - /* Cannot Access */ - NoAccess(); -} - -$ret = ""; - -$jrn_type = $Jrn->get_type(); - -$pdf = Print_Ledger::factory($cn, $_REQUEST['p_simple'], "PDF", $Jrn); - -$pdf->setDossierInfo($Jrn->name); -$pdf->AliasNbPages(); -$pdf->AddPage(); -$pdf->SetAuthor('NOALYSS'); -$pdf->setTitle(_("Journal"), true); - -$pdf->export(); - -$fDate = date('dmy-Hi'); -$pdf->Output('journal-' . $fDate . '.pdf', 'D'); -exit(0); - - -?> diff --git a/sources/include/export_poste_detail_csv.php b/sources/include/export_poste_detail_csv.php deleted file mode 100644 index c781a28..0000000 --- a/sources/include/export_poste_detail_csv.php +++ /dev/null @@ -1,194 +0,0 @@ -get_array("select pcm_val from tmp_pcmn where pcm_val::text like $1||'%'",array($_REQUEST["poste_id"])); -} -else -{ - $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val = $1",array($_REQUEST['poste_id'])); -} -bcscale(2); -if ( ! isset ($_REQUEST['oper_detail'])) -{ - if ( count($a_poste) == 0 ) - exit; - - foreach ($a_poste as $pos) - { - $Poste=new Acc_Account_Ledger($cn,$pos['pcm_val']); - $name=$Poste->get_name(); - list($array,$tot_deb,$tot_cred)=$Poste->get_row_date( $_REQUEST['from_periode'], - $_REQUEST['to_periode'], - $_GET['ople'] - ); - if ( count($Poste->row ) == 0 ) - continue; - - echo '"Poste";'. - '"n° pièce";'. - '"Code journal";'. - '"Nom journal";'. - '"Lib.";'. - "\"Code interne\";". - "\"Date\";". - "\"Description\";". - "\"Débit\";". - "\"Crédit\";". - "\"Prog.\";". - "\"Let.\""; - printf("\n"); - - $prog=0; - $current_exercice=""; - $tot_cred=0; - $tot_deb=0; - $diff=0; - foreach ( $Poste->row as $op ) - { - /* - * separation per exercice - */ - if ( $current_exercice == "") $current_exercice=$op['p_exercice']; - - if ( $current_exercice != $op['p_exercice']) { - $solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur"; - $diff=abs($tot_deb-$tot_cred); - printf( - ";;;". - '"'._('total').'";'. - '"'.$current_exercice.'";'. - '"'."$solde_type".'"'.";". - nb($tot_deb).";". - nb($tot_cred).";". - nb($diff).";"."\n"); - /* - * reset total and current_exercice - */ - $prog=0; - $current_exercice=$op['p_exercice']; - $tot_deb=0;$tot_cred=0; - } - $tot_deb=bcadd($tot_deb,$op['deb_montant']); - $tot_cred=bcadd($tot_cred,$op['cred_montant']); - $diff=bcsub($op['deb_montant'],$op['cred_montant']); - $prog=bcadd($prog,$diff); - echo '"'.$pos['pcm_val'].'";'. - '"'.$op['jr_pj_number'].'"'.";". - '"'.$op['jrn_def_code'].'"'.";". - '"'.$op['jrn_def_name'].'"'.";". - '"'.$name.'";'. - '"'.$op['jr_internal'].'"'.";". - '"'.$op['j_date_fmt'].'"'.";". - '"'.$op['description'].'";'. - nb($op['deb_montant']).";". - nb($op['cred_montant']).";". - nb(abs($prog)).";". - (($op['letter']!=-1)?strtoupper(base_convert($op['letter'],10,36)):""); - printf("\n"); - - - } - $solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur"; - $diff=abs($tot_deb-$tot_cred); - printf( - ";;;". - '"'._('total').'";'. - '"'.$current_exercice.'";'. - '"'."$solde_type".'"'.";". - nb($tot_deb).";". - nb($tot_cred).";". - nb($diff).";"."\n"); - } -} -else -{ - /* detail of all operation */ - if ( count($a_poste) == 0 ) - exit; - - foreach ($a_poste as $pos) - { - $Poste=new Acc_Account_Ledger($cn,$pos['pcm_val']); - $Poste->get_name(); - list($array,$tot_deb,$tot_cred)=$Poste->get_row_date( $_REQUEST['from_periode'], - $_REQUEST['to_periode'], - $_GET['ople'] - ); - if ( count($Poste->row ) == 0 ) - continue; - - echo '"Poste";'. - '"Lib.";'. - '"QuickCode";'. - "\"Code interne\";". - "\"Date\";". - "\"Description\";". - "\"Montant\";". - "\"D/C\""; - printf("\n"); - - - foreach ( $Poste->row as $a ) - { - $op=new Acc_Operation($cn); - $op->jr_id=$a['jr_id']; - $result=$op->get_jrnx_detail(); - foreach ( $result as $r) - { - printf('"%s";"%s";"%s";"%s";"%s";"%s";"%s";%12.2f;"%s"', - $r['j_poste'], - $r['pcm_lib'], - $r['j_qcode'], - $r['jr_internal'], - $r['jr_date'], - $a['description'], - $a['jr_pj_number'], - nb($r['j_montant']), - $r['debit']); - printf("\r\n"); - - } - - - - } - } - exit; -} -?> diff --git a/sources/include/export_poste_detail_pdf.php b/sources/include/export_poste_detail_pdf.php deleted file mode 100644 index 3d055cb..0000000 --- a/sources/include/export_poste_detail_pdf.php +++ /dev/null @@ -1,241 +0,0 @@ -get_array("select pcm_val from tmp_pcmn where pcm_val::text like '$poste_id%' order by pcm_val"); -} -else - $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text = '$poste_id'"); - - -$ret=""; - -$pdf=new PDF($cn); -$pdf->setDossierInfo(" Periode : ".$_GET['from_periode']." - ".$_GET['to_periode']); -$pdf->AliasNbPages(); -$pdf->AddPage(); -$pdf->SetAuthor('NOALYSS'); -$pdf->setTitle("Détail poste comptable",true); - - -if ( count($a_poste) == 0 ) -{ - $pdf->Output('poste.pdf','D'); - exit; -} -$size=array(13,25,13,65,12,20,20,20); -$align=array('L','C','C','L','R','R','R','R'); - -foreach ($a_poste as $poste) -{ - $Poste=new Acc_Account_Ledger($cn,$poste['pcm_val']); - list($array,$tot_deb,$tot_cred)=$Poste->get_row_date($from_periode,$to_periode,$_GET['ople']); - // don't print empty account - if ( count($array) == 0 ) - { - continue; - } - $Libelle=sprintf("(%s) %s ",$Poste->id,$Poste->get_name()); - $pdf->SetFont('DejaVuCond','',10); - $pdf->Cell(0,8,$Libelle,1,0,'C'); - $pdf->Ln(); - - $pdf->SetFont('DejaVuCond','',8); - $l=0; - $pdf->Cell($size[$l],6,'Date',0,0,'L'); - $l++; - $pdf->Cell($size[$l],6,'Ref',0,0,'C'); - $l++; - $pdf->Cell($size[$l],6,'Journal',0,0,'C'); - $l++; - $pdf->LongLine($size[$l],6,'Libellé',0,'L'); - $l++; - $pdf->Cell($size[$l],6,'Let',0,0,'R'); - $l++; - $pdf->Cell($size[$l],6,'Debit',0,0,'R'); - $l++; - $pdf->Cell($size[$l],6,'Credit',0,0,'R'); - $l++; - $pdf->Cell($size[$l],6,'Prog',0,0,'R'); - $l++; - $pdf->ln(); - $tot_deb=0; - $tot_cred=0; - $prog=0; - $current_exercice=""; - bcscale(2); - for ($e=0;$eSetFont('DejaVu','B',8); - $pdf->Cell(15,6,_('totaux'),0,0,'L'); - $pdf->Cell(15,6,$current_exercice,0,0,'L'); - $pdf->Cell(40,6,$solde,0,'L'); - $pdf->Cell(40,6,$str_debit,0,0,'R'); - $pdf->Cell(40,6,$str_credit,0,0,'R'); - $pdf->Cell(40,6,$str_diff_solde,0,0,'R'); - $pdf->Ln(); - /* - * reset total and current_exercice - */ - $prog=0; - $current_exercice=$row['p_exercice']; - $tot_deb=0;$tot_cred=0; - $pdf->SetFont('DejaVuCond','',8); - } - $l=0; - $diff=bcsub($row['deb_montant'],$row['cred_montant']); - $prog=bcadd($row['deb_montant'],$row['cred_montant']); - - $date=shrink_date($row['j_date_fmt']); - $pdf->Cell($size[$l],6,$date,0,0,$align[$l]); - $l++; - if ( $row['jr_pj_number'] == '') - $pdf->Cell($size[$l],6,$row['jr_internal'],0,0,$align[$l]); - else - $pdf->Cell($size[$l],6,$row['jr_pj_number'],0,0,$align[$l]); - $l++; - $pdf->Cell($size[$l],6,mb_substr($row['jrn_def_code'],0,14),0,0,$align[$l]); - $l++; - $pdf->LongLine($size[$l],6, $row['description'],0,$align[$l]); - $l++; - $pdf->Cell($size[$l],6,(($row['letter']!=-1)?$row['letter']:''),0,0,$align[$l]); - $l++; - $pdf->Cell($size[$l],6,(sprintf('% 12.2f',$row['deb_montant'])),0,0,$align[$l]); - $l++; - $pdf->Cell($size[$l],6,(sprintf('% 12.2f',$row['cred_montant'])),0,0,$align[$l]); - $l++; - $pdf->Cell($size[$l],6,(sprintf('% 12.2f',abs($prog))),0,0,$align[$l]); - $l++; - $pdf->ln(); - $tot_deb=bcadd($tot_deb,$row['deb_montant']); - $tot_cred=bcadd($tot_deb,$row['cred_montant']); - /* -------------------------------------- */ - /* if details are asked we show them here */ - /* -------------------------------------- */ - if ( isset($_GET['oper_detail'])) - { - $detail=new Acc_Operation($cn); - $detail->jr_id=$row['jr_id']; - $a_detail=$detail->get_jrnx_detail(); - for ($f=0;$fCell($size[$l],6,'',0,0,$align[$l]); - $l++; - $pdf->Cell($size[$l],6,$a_detail[$f]['j_qcode'],0,0,$align[$l]); - $l++; - $pdf->Cell($size[$l],6,$a_detail[$f]['j_poste'],0,0,$align[$l]); - $l++; - if ( $a_detail[$f]['j_qcode']=='') - $lib=$a_detail[$f]['pcm_lib']; - else - { - $f_id=$cn->get_value('select f_id from vw_poste_qcode where j_qcode=$1',array($a_detail[$f]['j_qcode'])) ; - $lib=$cn->get_value('select ad_value from fiche_detail where ad_id=$1 and f_id=$2', - array(ATTR_DEF_NAME,$f_id)); - } - $pdf->Cell($size[$l],6,$lib,0,0,$align[$l]); - $l++; - $pdf->Cell($size[$l],6,(($a_detail[$f]['letter']!=-1)?$a_detail[$f]['letter']:''),0,0,$align[$l]); - $l++; - - $deb=($a_detail[$f]['debit']=='D')?$a_detail[$f]['j_montant']:''; - $cred=($a_detail[$f]['debit']=='C')?$a_detail[$f]['j_montant']:''; - - $pdf->Cell($size[$l],6,(sprintf('% 12.2f',$deb)),0,0,$align[$l]); - $l++; - $pdf->Cell($size[$l],6,(sprintf('% 12.2f',$cred)),0,0,$align[$l]); - $l++; - $pdf->ln(); - } - } - } - $str_debit=sprintf("% 12.2f €",$tot_deb); - $str_credit=sprintf("% 12.2f €",$tot_cred); - $diff_solde=$tot_deb-$tot_cred; - if ( $diff_solde < 0 ) - { - $solde=" créditeur "; - $diff_solde=bcmul($diff_solde,-1); - } - else - { - $solde=" débiteur "; - } - $str_diff_solde=sprintf("%12.2f €",$diff_solde); - - $pdf->SetFont('DejaVu','B',8); - - $pdf->Cell(160,5,'Débit',0,0,'R'); - $pdf->Cell(30,5,$str_debit,0,0,'R'); - $pdf->Ln(); - $pdf->Cell(160,5,'Crédit',0,0,'R'); - $pdf->Cell(30,5,$str_credit,0,0,'R'); - $pdf->Ln(); - $pdf->Cell(160,5,'Solde '.$solde,0,0,'R'); - $pdf->Cell(30,5,$str_diff_solde,0,0,'R'); - $pdf->Ln(); - -} -$fDate=date('dmy-Hi'); -$pdf->Output('poste-'.$fDate.'-'.$poste_id.'.pdf','D'); -?> diff --git a/sources/include/export_rec_csv.php b/sources/include/export_rec_csv.php deleted file mode 100644 index da719f5..0000000 --- a/sources/include/export_rec_csv.php +++ /dev/null @@ -1,39 +0,0 @@ -a_jrn=$r_jrn; -$acc_reconciliation->start_day=$p_start; -$acc_reconciliation->end_day=$p_end; - -$array=$acc_reconciliation->export_csv($choice); \ No newline at end of file diff --git a/sources/include/export_reportinit_csv.php b/sources/include/export_reportinit_csv.php deleted file mode 100644 index a078693..0000000 --- a/sources/include/export_reportinit_csv.php +++ /dev/null @@ -1,56 +0,0 @@ -export_csv($file); -?> diff --git a/sources/include/export_security_pdf.php b/sources/include/export_security_pdf.php deleted file mode 100755 index 667b6e0..0000000 --- a/sources/include/export_security_pdf.php +++ /dev/null @@ -1,178 +0,0 @@ -get_folder_access($gDossier); - -if ( $access == 'L') -{ - $str='Local Admin'; - $admin=1; -} -elseif ($access=='R') -{ - $str=' Utilisateur normal'; -} -elseif ($access=='P') -{ - $str=' Extension uniquement'; -} - - -if ( $SecUser->admin==1 ) -{ - $str=' Super Admin'; - $admin=1; -} - - -//----------------------------------------------------- -// Print result - -$pdf=new PDF($cn); -$pdf->setDossierInfo(dossier::name().' Sécurité'); -$pdf->AliasNbPages(); -$pdf->AddPage(); -$pdf->SetAuthor('NOALYSS'); -$pdf->setTitle("Sécurité",true); - -$str_user=sprintf("( %d ) %s %s [ %s ] - %s", - $SecUser->id, - $SecUser->first_name, - $SecUser->name, - $SecUser->login, - $str); - -$pdf->SetFont('DejaVu','B',9); -$pdf->Cell(0,7,$str_user,'B',0,'C'); -$pdf->Ln(); -if ( $SecUser->active==0) -{ - $pdf->SetTextColor(255,0,34); - $pdf->Cell(0,7,'Bloqué',0,0,'R'); - $pdf->Ln(); -} - -if ( $SecUser->admin==1) -{ - $pdf->SetTextColor(0,0,0); - $pdf->setFillColor(239,251,255); - $pdf->Cell(40,7,'Administrateur',1,1,'R'); - $pdf->Ln(); -} -$pdf->SetTextColor(0,0,0); - -//----------------------------------------------------- -// Journal -$pdf->Cell(0,7,'Accès journaux',1,0,'C'); -$pdf->Ln(); -$pdf->SetFont('DejaVu','',6); -$Res=$cn->exec_sql("select jrn_def_id,jrn_def_name from jrn_def "); -$SecUser->db=$cn; -for ($e=0;$e < Database::num_row($Res);$e++) -{ - $row=Database::fetch_array($Res,$e); - $pdf->Cell(40,6,$row['jrn_def_name']); - $priv=$SecUser->check_jrn($row['jrn_def_id']); - switch($priv) - { - case 'X': - $pdf->SetTextColor(255,0,34); - $pdf->Cell(30,6,"Pas d'accès"); - break; - case 'R': - $pdf->SetTextColor(54,233,0); - $pdf->Cell(30,6,"Lecture"); - break; - case 'O': - /** - *non implemente - */ - $pdf->Cell(30,6,"Opérations prédéfinies uniquement"); - break; - case 'W': - $pdf->SetTextColor(54,233,0); - $pdf->Cell(30,6,'Ecriture'); - break; - } - $pdf->SetTextColor(0); - $pdf->Ln(); -} - -//----------------------------------------------------- -// Follow_Up -$pdf->SetFont('DejaVu','B',9); -$pdf->Cell(0,7,'Accès action',1,0,'C'); -$pdf->Ln(); -$pdf->SetFont('DejaVu','',6); -$Res=$cn->exec_sql( - "select ac_id, ac_description from action order by ac_description "); - -$Max=Database::num_row($Res); - -for ( $i =0 ; $i < $Max; $i++ ) -{ - $l_line=Database::fetch_array($Res,$i); - $pdf->Cell(90,6,$l_line['ac_description']); - $right=$SecUser->check_action($l_line['ac_id']); - switch ($right) - { - case 0: - $pdf->SetTextColor(255,0,34); - - $pdf->Cell(30,6,"Pas d'accès"); - break; - case 1: - case 2: - $pdf->SetTextColor(54,233,0); - $pdf->Cell(30,6,"Accès"); - break; - } - $pdf->SetTextColor(0); - - $pdf->Ln(); -} -$fDate=date('dmy-HI'); -$pdf->Output('security-'.$fDate.'pdf','D'); -?> diff --git a/sources/include/export_stock_histo_csv.php b/sources/include/export_stock_histo_csv.php deleted file mode 100644 index e47b9a1..0000000 --- a/sources/include/export_stock_histo_csv.php +++ /dev/null @@ -1,63 +0,0 @@ -create_query_histo($_GET); -$sql .= " order by real_date asc"; - -$res=$cn->exec_sql($sql); -$max_row=Database::num_row($res); -header('Pragma: public'); -header('Content-type: application/csv'); -header('Content-Disposition: attachment;filename="histo-stock.csv"',FALSE); -printf('"Date";'); - printf('"%s";','Code Stock'); - printf('"%s";','Depot'); - printf('"%s";','Fiche'); - printf('"%s";','Commentaire'); - printf('%s;','Quantité'); - printf('"%s";','IN/OUT'); - printf("\n\r"); -for ($i=0;$i<$max_row;$i++) -{ - $row=Database::fetch_array($res,$i); - printf('"%s";',$row['cdate']); - printf('"%s";',$row['sg_code']); - printf('"%s";',$row['r_name']); - printf('"%s";',$row['qcode']); - $row['ccomment']=str_replace('"','',$row['ccomment']); - printf('"%s";',$row['ccomment']); - printf('%s;',nbm($row['sg_quantity'])); - printf('"%s";',$row['direction']); - printf("\n\r"); - -} - -?> \ No newline at end of file diff --git a/sources/include/export_stock_resume_list.php b/sources/include/export_stock_resume_list.php deleted file mode 100644 index eccd5e7..0000000 --- a/sources/include/export_stock_resume_list.php +++ /dev/null @@ -1,91 +0,0 @@ -build_tmp_table($_GET); - -header('Pragma: public'); -header('Content-type: application/csv'); -header('Content-Disposition: attachment;filename="stock-summary-list.csv"',FALSE); - -?> -"Depot";"Adresse";"Ville";"Pays";"Code Stock";"Fiches";"IN";"OUT";"DIFF" -get_array("select distinct t.r_id,r_name,r_adress,r_city,r_country from stock_repository as s join tmp_stockgood_detail as t - on (s.r_id=t.r_id) - where - s_id=$1 - order by 2 - ",array($tmp_id)); - for ($r=0;$rget_array( - " - select coalesce(sum(s_qin),0) as qin,coalesce(sum(s_qout),0) as qout,sg_code - from tmp_stockgood_detail where r_id=$1 and s_id=$2 - group by sg_code - order by sg_code - - ",array($a_repo[$r]['r_id'],$tmp_id)); - for ($s=0;$sget_array( - " - select f_id,vw_name,quick_code - from vw_fiche_attr - where - f_id in ( - select distinct f_id from fiche_detail - where - ad_id=19 and - ad_value=$1) - order by vw_name,quick_code - ",array($a_stock[$s]['sg_code'])); - -printf ('"%s";',$a_repo[$r]['r_name']); -printf ('"%s";',$a_repo[$r]['r_adress']); -printf ('"%s";',$a_repo[$r]['r_city']); -printf ('"%s";',$a_repo[$r]['r_country']); -printf('"%s";',$a_stock[$s]['sg_code']); - $sep=""; - for ( $c=0;$c'; -echo dossier::hidden(); -// Ceci vous permet de revenir ici (voir extension.php) -echo HtmlInput::extension(); - -echo "Choix de la catégorie de fiche"; -$select_cat=new ISelect('fd_id'); -$select_cat->value=$cn->make_array('select fd_id,fd_label from fiche_def where frd_id='. - FICHE_TYPE_CLIENT); -echo $select_cat->input(); -echo HtmlInput::submit('display_prop','Afficher les propriétés'); - -echo ''; - -// on choisit d'afficher les propriétés avant de confirmer l'import -// get parce qu'on interroge -if ( isset($_GET['display_prop'])){ - $a=new Fiche($cn); - $prop=$a->to_array($_GET['fd_id']); - foreach ($prop as $key=>$value) echo "Index : $key valeur $value
    "; - - echo '
    '; - echo dossier::hidden(); - echo HtmlInput::extension(); - echo HtmlInput::hidden('fd_id',$_GET['fd_id']); - $file=new IFile('fichier_csv'); - echo $file->input(); - echo HtmlInput::submit('start_import','Démarrez importation'); - echo '
    '; - exit; -} -// Il est demandé de démarrer l'importation -// Post parce qu'on sauve -// On image que le fichier CSV n'a que 4 champs -// "nom client","prenom client", "numero client","adresse client" -// -if ( isset($_POST['start_import'])){ - $fd_id=$_POST['fd_id']; - $tmp_file=$_FILES['fichier_csv']['tmp_name']; - if ( ! is_uploaded_file($tmp_file)) - die ('Je ne peux charger ce fichier'); - // on ouvre le fichier - $f=fopen($tmp_file,'r'); - // On récupère les propriétés de cette catégorie de fiche - $client=new Fiche($cn); - // $array contient toutes les valeurs nécessaires à Fiche::insert, - $array=$client->to_array($_POST['fd_id']); - - while ( ($data=fgetcsv($f))==true) { - // remarque : on a éliminé les traitements d'erreur - - // On remet tous les attributs (propriétés) à vide - foreach(array_keys($array) as $key) $array[$key]=""; - - // Nom et prénom - $array['av_text1']=$data[0].' '.$data[1]; - // Numéro de client - $array['av_text30']=$data[2]; - // Adresse - $array['av_text14']=$data[3]; - // Quickcode - $array['av_text23']="CLI".$data[2]; - $client->insert($fd_id,$array); - } - exit; -} - -?> - -Voici le fichier plugin_client.txt (dans le répertoire dev) -"Nom client1","Prénom","C1","Rue de la boite,55" -"Nom client2","Prénom","C2","Rue du couvercle,55" -"Nom client3","Prénom","C3","Rue de la chaussure,55" -"Nom client4","Prénom","C4","Rue de la couleur,55" - -Si vous vérifiez dans VW_CLIENT, vous verrez que toutes vos fiches ont été ajoutées. Dans l'exemple, il faudra rajouter un traitement d'erreur plus élaborée, le fait que si une fiche echoue , l'opération est annulée (Database::rollback) ou alors création d'un fichier avec les enregistrements "ratés"... - - diff --git a/sources/include/extension_choice.inc.php b/sources/include/extension_choice.inc.php deleted file mode 100644 index 12b975f..0000000 --- a/sources/include/extension_choice.inc.php +++ /dev/null @@ -1,60 +0,0 @@ -'; -@html_page_start($_SESSION['g_theme']); - -$cn=new Database(dossier::id()); -global $g_user; -$g_user=new User($cn); -$g_user->check(); -$only_plugin=$g_user->check_dossier(dossier::id()); - - -/* javascript file */ -echo load_all_script(); - -/* show all the extension we can access */ -$a=new ISelect('plugin_code'); -$a->value=Extension::make_array($cn); -$a->selected=(isset($_REQUEST['plugin_code']))?strtoupper($_REQUEST['plugin_code']):''; - -/* no plugin available */ -if ( count($a->value) == 0 ) -{ - alert(j(_("Aucune extension disponible"))); - exit; -} - -/* only one plugin available then we don't propose a choice*/ -if ( count($a->value)==1 ) -{ - $_REQUEST['plugin_code']=$a->value[0]['value']; -} -echo '
    '; -/*else -{ - if (!isset($_REQUEST['ac'])) echo_warning ("ac non positionné"); - echo '
    '; - echo Dossier::hidden(); - echo HtmlInput::request_to_hidden(array('plugin_code','ac')); - echo _('Extension').$a->input().HtmlInput::submit('go',_("Choix de l'extension")); - echo '
    '; - echo '
    '; -}*/ - -//if ( isset($_REQUEST['plugin_code'])) -// require_once NOALYSS_INCLUDE.'/extension_get.inc.php'; -?> diff --git a/sources/include/extension_get.inc.php b/sources/include/extension_get.inc.php deleted file mode 100644 index 8ae3d4f..0000000 --- a/sources/include/extension_get.inc.php +++ /dev/null @@ -1,45 +0,0 @@ -search($_REQUEST['plugin_code']) == -1) - { - echo_warning("plugin non trouvé"); - return; -} -if ($ext->can_request($g_user->login)==-1) -{ - alert("Plugin non authorisé"); - return; -} -if ( ! file_exists(NOALYSS_PLUGIN.'/'.trim($ext->me_file))) - { - alert(j(_("Ce fichier n'existe pas "))); - return; - } -echo '
    '; -require_once NOALYSS_PLUGIN.DIRECTORY_SEPARATOR.trim($ext->me_file); - - -?> diff --git a/sources/include/fiche.inc.php b/sources/include/fiche.inc.php deleted file mode 100644 index 36b97cb..0000000 --- a/sources/include/fiche.inc.php +++ /dev/null @@ -1,601 +0,0 @@ -value = $cn->make_array('select fd_id,fd_label from fiche_def order by fd_label'); -$categorie->selected = (isset($_GET['cat'])) ? $_GET['cat'] : 0; -$str_categorie = $categorie->input(); - -$icall = new ICheckBox("allcard", 1); -$icall->selected = (isset($_GET['allcard'])) ? 1 : 0; -$str_icall = $icall->input(); -/* periode */ -$exercice = $g_user->get_exercice(); -$iperiode = new Periode($cn); -list ($first, $last) = $iperiode->get_limit($exercice); - -$periode_start = new IDate('start'); -$periode_end = new IDate('end'); - -$periode_start->value = (isset($_GET['start'])) ? $_GET['start'] : $first->first_day(); -$periode_end->value = (isset($_GET['end'])) ? $_GET['end'] : $last->last_day(); - -$str_start = $periode_start->input(); -$str_end = $periode_end->input(); - -/* histo ou summary */ -$histo = new ISelect('histo'); -$histo->value = array( - array('value' => -1, 'label' => _('Liste')), - array('value' => 0, 'label' => _('Historique')), - array('value' => 1, 'label' => _('Historique Lettré')), - array('value' => 6, 'label' => _('Historique Lettré et montants différents')), - array('value' => 2, 'label' => _('Historique non Lettré')), - array('value' => 3, 'label' => _('Résumé')), - array('value' => 4, 'label' => _('Balance')), - array('value' => 6, 'label' => _('Balance âgée')), - array('value' => 7, 'label' => _('Balance âgée en-cours')), - array('value' => 5, 'label' => _('Balance non soldée')) -); -$histo->javascript = 'onchange="if (this.value==3 || this.value==-1) { - g("trstart").style.display="none";g("trend").style.display="none";g("allcard").style.display="none";} - else {g("trstart").style.display="";g("trend").style.display="";g("allcard").style.display="";}"'; - -$histo->selected = (isset($_GET['histo'])) ? $_GET['histo'] : -1; -$str_histo = $histo->input(); -echo '
    '; -echo '
    '; -echo dossier::hidden(); -echo HtmlInput::hidden('ac', $_GET['ac']); -require_once NOALYSS_INCLUDE.'/template/impress_cat_card.php'; -echo HtmlInput::submit('cat_display', _('Recherche')); -echo '
    '; -$search_card=new IText('card_search'); -$search_card_js=sprintf('onclick="boxsearch_card(\'%d\')"',dossier::id()); -?> -
    - - :input()?> - -
    -'; -$str = "if (g('histo').value==3 || g('histo').value== -1 ) { - g('trstart').style.display='none';g('trend').style.display='none';g('allcard').style.display='none';} - else {g('trstart').style.display='';g('trend').style.display='';g('allcard').style.display='';} - if ( g('histo').value== -1 ) { g('allcard').style.display='';} - - "; -echo create_script($str); -echo '
    '; - -//----------------------------------------------------- -if (!isset($_GET['cat_display'])) - return; - -$fd_id = $_GET['cat']; - -$array = Fiche::get_fiche_def($cn, $_GET['cat'], 'name_asc'); - -$h_add_card_b = new IButton('add_card'); -$h_add_card_b->label = _('Créer une nouvelle fiche'); -$h_add_card_b->javascript = "dis_blank_card({gDossier:$gDossier,fd_id:$fd_id,ref:2})"; -$str_add_card = ($g_user->check_action(FICADD) == 1) ? $h_add_card_b->input() : ""; - -/* - * You show now the result - */ -if ($array == null) -{ - echo '
    '; - echo '

    '._('Aucune fiche trouvée').'

    '; - echo $str_add_card; - echo '
    '; - return; -} - -$allcard = (isset($_GET['allcard'])) ? 1 : 0; -if ( $allcard == 0 ){ - $fiche_def=new Fiche_Def($cn,$_GET['cat']); - $fiche_def->get(); - echo h1($fiche_def->label,""); - echo h2($fiche_def->fd_description,""); -} -echo '
    '; -/* * ********************************************************************************************************************************* - * Liste - * - * ******************************************************************************************************************************** */ -if ($_GET['histo'] == -1) -{ - $write = $g_user->check_action(FICADD); - /** - * If ask for move or delete - */ - if (isset($_POST['action'])) - { - if ($write == 1) - { - $ack = $_POST['f_id']; - /** - * Move - */ - if (isset($_POST['move'])&& $_POST['move'] == 1) - { - for ($i = 0; $i < count($ack); $i++) - { - $fiche = new Fiche($cn, $ack[$i]); - $fiche->move_to($_POST['move_to']); - } - } - /** - * Delete - */ - if (isset($_POST['delete'])&& $_POST['delete']==1) - { - $msg=""; - for ($i = 0; $i < count($ack); $i++) - { - $fiche = new Fiche($cn, $ack[$i]); - if ( $fiche->remove(true) == 1 ) - { - $msg.="\n ".$fiche->strAttribut(ATTR_DEF_QUICKCODE); - } - } - if ($msg != "") - { - echo '
    '; - echo h2(_("Fiche non effacées"), ' class="error" '); - echo '

    '._(" Ces fiches n'ont pas été effacées ").$msg; - echo '

    '; - } - } - } - else - { - echo NoAccess(); - } - } - $sql = "select f_id from fiche "; - if ($allcard == 1) - { - $cond = ""; - } - else - { - $cond = " where f.fd_id = " . sql_string($_GET['cat']); - } - // Create nav bar - $max = $cn->get_value("select count(*) from fiche as f " . $cond); - - $step = $_SESSION['g_pagesize']; - $page = (isset($_GET['offset'])) ? $_GET['page'] : 1; - $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0; - $bar = navigation_bar($offset, $max, $step, $page); - $limit = ($step == -1 ) ? "" : " limit " . $step; - $res = $cn->exec_sql(" - select f_id, - (select ad_value from fiche_detail as fd1 where ad_id=1 and fd1.f_id=f.f_id) as name, - (select ad_value from fiche_detail as fd1 where ad_id=23 and fd1.f_id=f.f_id) as qcode, - fd_label, - (select ad_value from fiche_detail as fd1 where ad_id=5 and fd1.f_id=f.f_id) as poste - from fiche as f join fiche_def as fd on (fd.fd_id=f.fd_id) - $cond order by 2,4 offset $offset $limit - "); - $nb_line = Database::num_row($res); - if ($write != 1 || $allcard != 0 ) $str_add_card=""; - require_once NOALYSS_INCLUDE.'/template/fiche_list.php'; - echo '
    '.$bar; - return; -} -/* * ********************************************************************************************************************************* - * Summary - * - * ******************************************************************************************************************************** */ -if ($_GET['histo'] == 3) -{ - $cat_card = new Fiche_Def($cn); - $cat_card->id = $_GET['cat']; - $aHeading = $cat_card->getAttribut(); - if ( $allcard == 0) echo $str_add_card; - require_once NOALYSS_INCLUDE.'/template/result_cat_card_summary.php'; - - $hid = new IHidden(); - echo '
    ' . dossier::hidden() . - HtmlInput::submit('bt_csv', "Export CSV") . - HtmlInput::hidden('act', "CSV:fiche") . - $hid->input("type", "fiche") . - $hid->input("ac", $_REQUEST['ac']) . - $hid->input("fd_id", $_REQUEST['cat']); - echo "
    "; - - return; -} -$export_pdf = '
    '; -$export_pdf.=HtmlInput::hidden('cat', $_GET['cat']); -$export_pdf.=HtmlInput::hidden('act', "PDF:fiche_balance") . - $export_pdf.=HtmlInput::hidden('start', $_GET['start']); -$export_pdf.=HtmlInput::hidden('end', $_GET['end']); -$export_pdf.=HtmlInput::hidden('histo', $_GET['histo']); -$export_pdf.=HtmlInput::request_to_hidden(array('allcard')); -$export_pdf.=dossier::hidden(); -$export_pdf.=HtmlInput::submit('pdf', 'Export en PDF'); -$export_pdf.='
    '; - -$export_print = HtmlInput::print_window(); - -$export_csv = '
    '; -$export_csv.=HtmlInput::hidden('cat', $_GET['cat']); -$export_csv.=HtmlInput::hidden('act', 'CSV:fiche_balance'); -$export_csv.=HtmlInput::hidden('start', $_GET['start']); -$export_csv.=HtmlInput::hidden('end', $_GET['end']); -$export_csv.=HtmlInput::hidden('histo', $_GET['histo']); -$export_csv.=HtmlInput::request_to_hidden(array('allcard')); -$export_csv.=dossier::hidden(); -$export_csv.=HtmlInput::submit('CSV', 'Export en CSV'); -$export_csv.='
    '; -/* - * Date is important is requested balance - */ -if (isDate($_REQUEST['start']) == null || isDate($_REQUEST['end']) == null) -{ - echo h2('Date invalide !', 'class="error"'); - alert('Date invalide !'); - return; -} -/************************************************************************************************************************* - * Balance agée tous -/*************************************************************************************************************************/ -if ( $_GET['histo'] == 6) -{ - require_once NOALYSS_INCLUDE.'/class_balance_age.php'; - $bal=new Balance_Age($cn); - $export_csv = '
    '; - $export_csv .=HtmlInput::request_to_hidden(array('gDossier','ac','p_let','p_date_start')); - $export_csv.=HtmlInput::hidden('p_date_start', $_GET['start']); - $export_csv .= HtmlInput::hidden('act','CSV:balance_age'); - $export_csv .= HtmlInput::hidden('p_let','let'); - $export_csv .= HtmlInput::hidden('p_type','X'); - $export_csv .= HtmlInput::hidden('cat',$_GET['cat']); - $export_csv .= HtmlInput::hidden('all',$allcard); - $export_csv .= HtmlInput::submit('csv',_('Export CSV')); - $export_csv.='

    '; - if ( $allcard == 0 ) - { - echo $export_csv; - $bal->display_category($_GET['start'],$_GET['cat'],'let'); - echo $export_csv; - } - else - { - echo $export_csv; - $a_cat = $cn->get_array("select fd_id from vw_fiche_def where ad_id=" . ATTR_DEF_ACCOUNT . " order by fd_label asc"); - $nb_cat=count($a_cat); - for ($i=0;$i < $nb_cat;$i++) - { - $bal->display_category($_GET['start'],$a_cat[$i]['fd_id'],'let'); - } - echo $export_csv; - } - return; -} -/************************************************************************************************************************* - * Balance en-cours -/*************************************************************************************************************************/ -if ( $_GET['histo'] == 7) -{ - require_once NOALYSS_INCLUDE.'/class_balance_age.php'; - $bal=new Balance_Age($cn); - $export_csv = '
    '; - $export_csv .=HtmlInput::request_to_hidden(array('gDossier','ac','p_let','p_date_start')); - $export_csv.=HtmlInput::hidden('p_date_start', $_GET['start']); - $export_csv .= HtmlInput::hidden('act','CSV:balance_age'); - $export_csv .= HtmlInput::hidden('p_let','unlet'); - $export_csv .= HtmlInput::hidden('p_type','X'); - $export_csv .= HtmlInput::hidden('cat',$_GET['cat']); - $export_csv .= HtmlInput::hidden('all',$allcard); - $export_csv .= HtmlInput::submit('csv',_('Export CSV')); - $export_csv.='

    '; - if ( $allcard == 0 ) - { - echo $export_csv; - $bal->display_category($_GET['start'],$_GET['cat'],'unlet'); - echo $export_csv; - } - else - { - echo $export_csv; - $a_cat = $cn->get_array("select fd_id from vw_fiche_def where ad_id=" . ATTR_DEF_ACCOUNT . " order by fd_label asc"); - $nb_cat=count($a_cat); - for ($i=0;$i < $nb_cat;$i++) - { - $bal->display_category($_GET['start'],$a_cat[$i]['fd_id'],'unlet'); - } - echo $export_csv; - } - return; -} -/******************************************************************************************************************************** - * Balance - * - **********************************************************************************************************************************/ -if ($_GET['histo'] == 4 || $_GET['histo'] == 5) -{ - if ( $allcard == 0 ) echo $str_add_card; - echo $export_pdf; - echo $export_csv; - echo $export_print; - - $fd = new Fiche_Def($cn, $_REQUEST['cat']); - if ($allcard == 0 && $fd->hasAttribute(ATTR_DEF_ACCOUNT) == false) - { - echo alert(_("Cette catégorie n'ayant pas de poste comptable n'a pas de balance")); - return; - } - // all card - if ($allcard == 1) - { - $afiche = $cn->get_array("select fd_id from vw_fiche_def where ad_id=" . ATTR_DEF_ACCOUNT . " order by fd_label asc"); - } - else - { - $afiche[0] = array('fd_id' => $_REQUEST['cat']); - } - - for ($e = 0; $e < count($afiche); $e++) - { - $ret = $cn->exec_sql("select f_id,ad_value from fiche join fiche_detail using(f_id) where fd_id=$1 and ad_id=1 order by 2 ", array($afiche[$e]['fd_id'])); - if ($cn->count() == 0) - { - if ($allcard == 0) - { - echo _("Aucune fiche trouvée"); - return; - } else - continue; - } - echo '

    ' . $cn->get_value("select fd_label from fiche_def where fd_id=$1", array($afiche[$e]['fd_id'])) . '

    '; - $id="table_".$afiche[$e]['fd_id']."_id"; - echo _('Filtre rapide:').HtmlInput::filter_table($id, '0,1,2', '1'); - echo ''; - echo tr( - th('Quick Code') . - th('Libellé') . - ''. - th('Débit', 'style="text-align:right"') . - th('Crédit', 'style="text-align:right"') . - th('Solde', 'style="text-align:right"') . - th('D/C', 'style="text-align:right"') - ); - $idx = 0;$sum_deb=0;$sum_cred=0;$sum_solde=0;bcscale(4); - for ($i = 0; $i < Database::num_row($ret); $i++) - { - $filter = " (j_date >= to_date('" . $_REQUEST['start'] . "','DD.MM.YYYY') " . - " and j_date <= to_date('" . $_REQUEST['end'] . "','DD.MM.YYYY')) "; - $aCard = Database::fetch_array($ret, $i); - $oCard = new Fiche($cn, $aCard['f_id']); - $solde = $oCard->get_solde_detail($filter); - if ($solde['debit'] == 0 && $solde['credit'] == 0) - continue; - /* only not purged card */ - if ($_GET['histo'] == 5 && $solde['debit'] == $solde['credit']) - continue; - $class =($idx % 2 == 0) ? 'class="odd"':'class="even"'; - $idx++; - $sum_cred=bcadd($sum_cred,$solde['credit']); - $sum_deb=bcadd($sum_deb,$solde['debit']); - $sum_solde=bcsub($sum_deb,$sum_cred); - echo tr( - td(HtmlInput::history_card($oCard->id, $oCard->strAttribut(ATTR_DEF_QUICKCODE))) . - td($oCard->strAttribut(ATTR_DEF_NAME)) . - td(HtmlInput::history_account($oCard->strAttribut(ATTR_DEF_ACCOUNT),$oCard->strAttribut(ATTR_DEF_ACCOUNT))). - td(nbm($solde['debit']), 'class="sorttable_numeric" sorttable_customkey="'.$solde['debit'].'" style="text-align:right"') . - td(nbm($solde['credit']), 'class="sorttable_numeric" sorttable_customkey="'.$solde['debit'].'" style="text-align:right"') . - td(nbm(abs($solde['solde'])), 'class="sorttable_numeric" sorttable_customkey="'.$solde['solde'].'" style="text-align:right"') . - td((($solde['debit'] < $solde['credit']) ? 'C' : 'D'), 'style="text-align:right"'), $class - ); - - - - } - echo ''; - echo tr( - td(''). - td(_('Totaux')). - td(''). - td(nbm($sum_deb), 'style="text-align:right"'). - td(nbm($sum_cred), 'style="text-align:right"'). - td(nbm(abs($sum_solde)), 'style="text-align:right"'). - td((($sum_deb < $sum_cred) ? 'C' : 'D'), 'style="text-align:right"'),' class="highlight"'); - echo ''; - echo '
    Poste'.HtmlInput::infobulle(27).'
    '; - } - if ( $allcard == 0 ) echo $str_add_card; - echo $export_pdf; - echo $export_csv; - echo $export_print; - - return; -} - -/*********************************************************************************************************************************** - * Lettering - * - **********************************************************************************************************************************/ -// all card -if ($allcard == 1) -{ - $afiche = $cn->get_array("select fd_id from vw_fiche_def where ad_id=" . ATTR_DEF_ACCOUNT . " order by fd_label asc"); -} -else -{ - $afiche[0] = array('fd_id' => $_REQUEST['cat']); -} -if ( $allcard == 0) echo $str_add_card; -echo $export_csv; -echo $export_pdf; -echo $export_print; -$fiche = new Fiche($cn); -for ($e = 0; $e < count($afiche); $e++) -{ - $array = Fiche::get_fiche_def($cn, $afiche[$e]['fd_id'], 'name_asc'); - - foreach ($array as $card) - { - $row = new Fiche($cn, $card['f_id']); - $letter = new Lettering_Card($cn); - $letter->set_parameter('quick_code', $row->strAttribut(ATTR_DEF_QUICKCODE)); - $letter->set_parameter('start', $_GET['start']); - $letter->set_parameter('end', $_GET['end']); - // all - if ($_GET['histo'] == 0) - { - $letter->get_all(); - } - - // lettered - if ($_GET['histo'] == 1) - { - $letter->get_letter(); - } - // unlettered - if ($_GET['histo'] == 2) - { - $letter->get_unletter(); - } - if ($_GET['histo'] == 6) - { - $letter->get_letter_diff(); - } - /* skip if nothing to display */ - if (count($letter->content) == 0) - continue; - $detail_card = HtmlInput::card_detail($row->strAttribut(ATTR_DEF_QUICKCODE), $row->strAttribut(ATTR_DEF_NAME)); - - echo '

    ' . $detail_card ; - echo "poste " - . ":".HtmlInput::history_account($row->strAttribut(ATTR_DEF_ACCOUNT),$row->strAttribut(ATTR_DEF_ACCOUNT),'display:inline').HtmlInput::infobulle(27).'

    '; - - echo ''; - echo ''; - echo th(_('Date')); - echo th(_('ref')); - echo th(_('Interne')); - echo th(_('Comm')); - echo th(_('Montant'), 'style="width:auto" colspan="2"'); - echo th(_('Prog.')); - echo th(_('Let.')); - echo ''; - $amount_deb = 0; - $amount_cred = 0; - $prog = 0; - bcscale(2); - for ($i = 0; $i < count($letter->content); $i++) - { - $row = $letter->content[$i]; - $html_letter=""; - if ($row['letter']!=-1) { - $html_letter=strtoupper(base_convert($row['letter'],10,36)); - } - if ($i % 2 == 0) - echo ''; - else - echo ''; - - echo td($row['j_date_fmt']); - echo td(h($row['jr_pj_number'])); - echo td(HtmlInput::detail_op($row['jr_id'], $row['jr_internal'])); - echo td(h($row['jr_comment'])); - if ($row['j_debit'] == 't') - { - echo td(nbm($row['j_montant']), ' style="text-align:right"'); - $amount_deb=bcadd($amount_deb,$row['j_montant']); - $prog = bcadd($prog, $row['j_montant']); - echo td(""); - } - else - { - echo td(""); - echo td(nbm($row['j_montant']), ' style="text-align:right"'); - $amount_cred=bcadd($amount_cred,$row['j_montant']); - $prog = bcsub($prog, $row['j_montant']); - } - $side = " " . $fiche->get_amount_side($prog); - echo td(nbm($prog) . $side, 'style="text-align:right"'); - $html_let=""; - if ($row['letter']!=-1) { - $span_error = ""; - if ($row['letter_diff'] != 0) - $span_error = $g_failed; - echo ''; - } - else - echo td(''); - echo ''; - } - echo '
    '.HtmlInput::show_reconcile("", $html_letter,$span_error).'
    '; - echo ''; - echo ''; - echo td(_('Debit')); - echo td(nbm($amount_deb), ' style="font-weight:bold;text-align:right"'); - echo ''; - echo ''; - echo td(_('Credit')); - echo td(nbm($amount_cred), ' style="font-weight:bold;text-align:right"'); - echo ''; - echo ''; - $solde=abs(round($amount_cred - $amount_deb, 2)); - if ( $solde == 0) - { - $s='solde'; - } - else if ($amount_deb > $amount_cred) - $s = 'solde débiteur'; - else - $s = 'solde crediteur'; - echo td($s); - echo td(nbm($solde), ' style="font-weight:bold;text-align:right"'); - echo ''; - echo '
    '; - } -} -if ( $allcard == 0) echo $str_add_card; -echo $export_csv; -echo $export_pdf; -echo $export_print; -?> - diff --git a/sources/include/fiche_def.inc.php b/sources/include/fiche_def.inc.php deleted file mode 100644 index 789b83e..0000000 --- a/sources/include/fiche_def.inc.php +++ /dev/null @@ -1,87 +0,0 @@ -'; -// record change -if ( isset ($_POST['confirm_mod'])) -{ - extract ($_POST); - $update=new Fiche_Def_Ref($cn); - $update->frd_id=sql_string($frd_id); - $update->frd_text=sql_string($frd_text); - $update->frd_class_base=sql_string($frd_class_base); - $update->Save(); -} -// Load All Fiche_def -$fiche_def=new Fiche_Def_Ref($cn); -$all=$fiche_def->LoadAll(); - -// Display Them -echo ''; -for ($i=0;$i'; - echo $all[$i]->Display(); - echo ""; - echo ''; -} -echo "
    "; - echo '
    '; - $w=new IHidden(); - echo $w->input('idx',$all[$i]->frd_id); - echo HtmlInput::submit('mod','modifie'); - echo $w->input($_REQUEST['ac'],'ac'); - //echo $w->input($sa,'sa'); - echo "
    "; - echo "
    "; -// modify input -if ( isset ($_POST['mod']) ) -{ - extract ($_POST); - echo '
    '; - echo _("Voulez-vous modifier ?"); - echo "
    "; - echo _("Attention, ne changer pas la signification de ce poste."); - echo hi(_("par exemple ne pas changer Client par fournisseur"))."
    "; - echo _("sinon le programme fonctionnera mal, ". - "utiliser uniquement des chiffres pour la classe de base ou rien")."
    "; - - $mod=new Fiche_Def_Ref($cn); - $mod->frd_id=$idx; - $mod->Get(); - echo '
    '; - echo '
      Input(); - echo "
    "; - $w=new IHidden(); - echo $w->input('ac',$_REQUEST['ac']); -// echo $w->input('sa',$sa); - echo HtmlInput::submit('confirm_mod' ,'Confirme'); - echo HtmlInput::submit('no','Cancel'); - echo '
    '; - echo '
    '; -} -echo '
    '; diff --git a/sources/include/forecast.inc.php b/sources/include/forecast.inc.php deleted file mode 100644 index 18836cc..0000000 --- a/sources/include/forecast.inc.php +++ /dev/null @@ -1,396 +0,0 @@ -'; - -$sa = (isset($_REQUEST['sa'])) ? $_REQUEST['sa'] : 'list'; -/* * ******************************************************************** - * Remove a anticipation - * - * - * ******************************************************************** */ -if ( $action == 'del' ) -{ - $forecast = new Forecast($cn, $_GET['f_id']); - $forecast->delete(); -} -/* - * Cloning - */ -if ( $action == 'clone' ) -{ - echo "

    cloning

    "; - /* - * We need to clone the forecast - */ - $anti = new Forecast($cn, $_REQUEST ['f_id']); - $anti->object_clone(); - $sa="list"; -} -/* * ******************************************************************** - * Save the modification mod_cat_save - * - * - * ******************************************************************** */ -if (isset($_POST['mod_cat_save'])) -{ - /* - * We save the forecast - */ - $anti = new Forecast($cn, $_POST['f_id']); - try - { - $cn->start(); - /* Save forecast */ - $anti->set_parameter('name', $_POST['an_name']); - $anti->set_parameter('start_date', $_POST['start_date']); - $anti->set_parameter('end_date', $_POST['end_date']); - - $anti->save(); - - /* add new category */ - for ($i = 0; $i < MAX_CAT; $i++) - { - if (isset($_POST['fr_cat_new' . $i])) - { - if (strlen(trim($_POST['fr_cat_new' . $i])) != 0) - { - $c = new Forecast_Cat($cn); - $c->set_parameter('order', $_POST['fc_order_new' . $i]); - $c->set_parameter('desc', $_POST['fr_cat_new' . $i]); - $c->set_parameter('forecast', $_POST['f_id']); - $c->save(); - } - } - } - - /* update existing cat */ - foreach ($_POST as $key => $value) - { - $var = sscanf($key, 'fr_cat%d'); - $idx = sprintf("fr_cat%d", $var[0]); - if (isset($_POST[$idx])) - { - $fc = new Forecast_Cat($cn, $var[0]); - if (strlen(trim($_POST[$idx])) == 0) - { - $fc->delete(); - } - else - { - $fc->set_parameter('order', $_POST['fc_order' . $var[0]]); - $fc->set_parameter('desc', $_POST['fr_cat' . $var[0]]); - $fc->set_parameter('forecast', $_POST['f_id']); - $fc->save(); - } - } - } - - $cn->commit(); - } - catch (Exception $e) - { - alert($e->getMessage()); - $cn->rollback(); - } - $sa = 'vw'; -} -/* * ******************************************************************** - * Save first the data for new - * - * - * ******************************************************************** */ -if ($sa == 'new' || isset($_POST['step3'])) -{ - $correct = 0; - if (isset($_POST['step3'])) - { - /* save all the items */ - try - { - $cn->start(); - for ($i = 0; $i < $_POST['nbrow']; $i++) - { - - // Delete if needed - if (isset($_POST['fi_id' . $i])) - { - if (strlen(trim($_POST['an_cat_acc' . $i])) == 0 && strlen(trim($_POST['an_qc' . $i])) == 0) - { - $e = new Forecast_item($cn); - $e->set_parameter("id", $_POST['fi_id' . $i]); - $e->delete(); - } - } - - if (strlen(trim($_POST['an_cat_acc' . $i])) != 0 || strlen(trim($_POST['an_qc' . $i])) != 0) - { - /* we save only if there is something */ - $e = new Forecast_item($cn); - if (isset($_POST['fi_id' . $i])) - { - $e->set_parameter("id", $_POST['fi_id' . $i]); - } - $e->set_parameter('text', $_POST['an_label' . $i]); - $e->set_parameter('amount', $_POST['an_cat_amount' . $i]); - $e->set_parameter('debit', $_POST['an_deb' . $i]); - $e->set_parameter('cat_id', $_POST['an_cat' . $i]); - $e->set_parameter('account', $_POST['an_cat_acc' . $i]); - $e->set_parameter('periode', $_POST['month' . $i]); - $f = new Fiche($cn); - if ($f->get_by_qcode($_POST['an_qc' . $i], false) == 0) - $e->set_parameter('card', $f->id); - else - $e->set_parameter('card', null); - $e->set_parameter('order', $i); - $e->save(); - } - } - $cn->commit(); - $sa = 'vw'; // to avoid to restart the add of new anticipation - } - catch (Exception $e) - { - $cn->rollback(); - alert($e->getMessage()); - $correct = 1; - } - } - /* Second step : we save the name and category - * and propose the items we add the item */ - if ($correct == 2 || isset($_POST['step2'])) - { - try - { - $cn->start(); - /* Save forecast */ - $a = new Forecast($cn); - $a->set_parameter('name', $_POST['an_name']); - $a->set_parameter('start_date', $_POST['start_date']); - $a->set_parameter('end_date', $_POST['end_date']); - - - $a->save(); - $id = $a->get_parameter("id"); - /* save cat */ - for ($i = 0; $i < MAX_CAT; $i++) - { - if (strlen(trim($_POST['fr_cat' . $i])) != 0) - { - $c = new Forecast_Cat($cn); - $c->set_parameter('order', $_POST['fr_order' . $i]); - $c->set_parameter('desc', $_POST['fr_cat' . $i]); - $c->set_parameter('forecast', $id); - $c->save(); - } - } - $cn->commit(); - } - catch (Exception $e) - { - alert($e->getMessage()); - $correct = 1; - unset($_POST['step2']); - $cn->rollback(); - } - } -} - -/* * ******************************************************************** - * Ask for a new anticipation (forecast) - * - * - * ******************************************************************** */ -if ($sa == 'new') -{ - /* Second step : we save the name and category - * and propose the items we add the item */ - if ($correct == 2 || isset($_POST['step2'])) - { - /* Propose a form for the items - */ - $anticip = new Anticipation($cn, $a->get_parameter("id")); - echo '
    '; - echo ICard::ipopup('ipopcard'); - echo IPoste::ipopup('ipop_account'); - $search_card = new IPopup('ipop_card'); - $search_card->title = _('Recherche de fiche'); - $search_card->value = ''; - echo $search_card->input(); - - echo '
    '; - echo dossier::hidden(); - echo HtmlInput::hidden('sa', 'new'); - echo HtmlInput::hidden('ac', $_REQUEST['ac']); - echo HtmlInput::hidden('f_id', $id); - echo $anticip->form_item(); - echo HtmlInput::submit('step3', _('Sauver')); - echo '
    '; - echo '
    '; - } - /* First step, the name and the category */ - if (!isset($_POST['step2']) || $correct == 1) - { - $anc = new Anticipation($cn); - echo '
    '; - /* display a blank form for name and category */ - echo '
    '; - echo dossier::hidden(); - echo HtmlInput::hidden('sa', 'new'); - echo HtmlInput::hidden('ac', $_REQUEST['ac']); - echo $anc->form_cat(); - echo HtmlInput::submit('step2', _('Sauver')); - echo '
    '; - echo '
    '; - } -} -/* * ******************************************************************** - * If we request to modify the category or the name - * - * - * ******************************************************************** */ -if ( $action == 'mod_cat') -{ - $anc = new Anticipation($cn, $_GET['f_id']); - echo '
    '; - /* display a blank form for name and category */ - echo '
    '; - echo dossier::hidden(); - echo HtmlInput::hidden('sa', 'mod'); - echo HtmlInput::hidden('ac', $_REQUEST['ac']); - echo $anc->form_cat(); - echo HtmlInput::submit('mod_cat_save', _('Sauver')); - - echo '
    '; - echo '
    '; - return; -} -/* * ******************************************************************** - * If we request to modify the items - * - * - * ******************************************************************** */ -if ($action == 'mod_item' ) -{ - - /* Propose a form for the items - */ - $anticip = new Anticipation($cn, $_GET['f_id']); - echo '
    '; - echo '
    '; - echo dossier::hidden(); - echo HtmlInput::hidden('sa', 'new'); - echo HtmlInput::hidden('ac', $_REQUEST['ac']); - echo HtmlInput::hidden('f_id', $_GET['f_id']); - echo $anticip->form_item(); - echo HtmlInput::submit('step3', _('Sauver')); - echo '
    '; - echo '
    '; - return; -} -/* * ******************************************************************** - * if a forecast is asked we display the result - * - * - * ******************************************************************** */ -if (isset($_REQUEST['f_id']) && $sa == "vw") -{ - echo '
    '; - $forecast = new Anticipation($cn); - $forecast->set_parameter("id", $_REQUEST['f_id']); - try - { - echo $forecast->display(); - echo '
    '; - echo '
    '; - echo dossier::hidden(); - echo HtmlInput::hidden('action',''); - echo HtmlInput::hidden('f_id', $_REQUEST['f_id']); - echo HtmlInput::submit('mod_cat_bt', _('Modifier nom ou catégories'),'onclick="$(\'action\').value=\'mod_cat\';"'); - echo HtmlInput::submit('mod_item_bt', _('Modifier éléments'),'onclick="$(\'action\').value=\'mod_item\';"'); - //echo HtmlInput::submit('cvs',_('Export CVS')); - echo HtmlInput::submit('del_bt', _('Effacer'), 'onclick="$(\'action\').value=\'del\';return confirm_box(\'forecast_frm\',\'' . _('Vous confirmez l\\\' effacement') . '\')"'); - echo HtmlInput::submit('clone_bt', _('Cloner'), 'onclick="$(\'action\').value=\'clone\';return confirm_box(\'forecast_frm\',\'' . _('Vous confirmez le clonage ') . '\')"'); - echo HtmlInput::hidden('ac', $_REQUEST['ac']); - $href=http_build_query(array('ac'=>$_REQUEST['ac'],'gDossier'=>$_REQUEST['gDossier'])); - echo ''._('Retour').''; - echo '
    '; - echo '
    '; - echo '
    '; - return; - } - catch (Exception $e) - { - echo "

    " . _("Erreur")." : " . $e->getMessage() . '

    ' . _('Vous devez corriger') . '

    '; - $anc = new Anticipation($cn, $_GET['f_id']); - echo '
    '; - /* display a blank form for name and category */ - echo '
    '; - echo dossier::hidden(); - echo HtmlInput::hidden('sa', 'mod'); - echo HtmlInput::hidden('ac', $_REQUEST['ac']); - echo $anc->form_cat(); - echo HtmlInput::submit('mod_cat_save', _('Sauver')); - echo '
    '; - echo '
    '; - } -} -/* * ******************************************************************** - * Display menu - * - * - * ******************************************************************** */ -// display button add and list of forecast to display -if ($sa=='list') -{ - $aForecast=Forecast::load_all($cn); - $menu=array(); - $get_dossier=dossier::get(); - - echo '
    '; - echo _('Filtre')." ".HtmlInput::filter_table("forecast_table_id", '0', 1); - echo ''; - $href="?ac=".$_REQUEST['ac']."&sa=new&".$get_dossier; - echo ''; - $def=(isset($_REQUEST['f_id']))?$_REQUEST['f_id']:-1; - for ($i=0; $i'; - } - - echo "
    '._("Ajout d'une prévision").'
    '.h($name).'
    "; - echo '
    '; - return; -} -?> -
    \ No newline at end of file diff --git a/sources/include/function_javascript.php b/sources/include/function_javascript.php deleted file mode 100644 index 7022b83..0000000 --- a/sources/include/function_javascript.php +++ /dev/null @@ -1,2786 +0,0 @@ -'; - // debug - - return $script; - -} -/*! - *\brief create the HTML for adding the script tags around of the script - *\param $p_string source codename of the file - *\return the HTML script - */ -function create_script($p_string) -{ - $script=''; - return $script; - -} -function encodeURIComponent($string) -{ - $result = ""; - for ($i = 0; $i < strlen($string); $i++) - { - $result .= encodeURIComponentbycharacter(urlencode($string[$i])); - } - return $result; -} - -function encodeURIComponentbycharacter($char) -{ - if ($char == "+") - { - return "%20"; - } - if ($char == "%21") - { - return "!"; - } - if ($char == "%27") - { - return '"'; - } - if ($char == "%28") - { - return "("; - } - if ($char == "%29") - { - return ")"; - } - if ($char == "%2A") - { - return "*"; - } - if ($char == "%7E") - { - return "~"; - } - if ($char == "%80") - { - return "%E2%82%AC"; - } - if ($char == "%81") - { - return "%C2%81"; - } - if ($char == "%82") - { - return "%E2%80%9A"; - } - if ($char == "%83") - { - return "%C6%92"; - } - if ($char == "%84") - { - return "%E2%80%9E"; - } - if ($char == "%85") - { - return "%E2%80%A6"; - } - if ($char == "%86") - { - return "%E2%80%A0"; - } - if ($char == "%87") - { - return "%E2%80%A1"; - } - if ($char == "%88") - { - return "%CB%86"; - } - if ($char == "%89") - { - return "%E2%80%B0"; - } - if ($char == "%8A") - { - return "%C5%A0"; - } - if ($char == "%8B") - { - return "%E2%80%B9"; - } - if ($char == "%8C") - { - return "%C5%92"; - } - if ($char == "%8D") - { - return "%C2%8D"; - } - if ($char == "%8E") - { - return "%C5%BD"; - } - if ($char == "%8F") - { - return "%C2%8F"; - } - if ($char == "%90") - { - return "%C2%90"; - } - if ($char == "%91") - { - return "%E2%80%98"; - } - if ($char == "%92") - { - return "%E2%80%99"; - } - if ($char == "%93") - { - return "%E2%80%9C"; - } - if ($char == "%94") - { - return "%E2%80%9D"; - } - if ($char == "%95") - { - return "%E2%80%A2"; - } - if ($char == "%96") - { - return "%E2%80%93"; - } - if ($char == "%97") - { - return "%E2%80%94"; - } - if ($char == "%98") - { - return "%CB%9C"; - } - if ($char == "%99") - { - return "%E2%84%A2"; - } - if ($char == "%9A") - { - return "%C5%A1"; - } - if ($char == "%9B") - { - return "%E2%80%BA"; - } - if ($char == "%9C") - { - return "%C5%93"; - } - if ($char == "%9D") - { - return "%C2%9D"; - } - if ($char == "%9E") - { - return "%C5%BE"; - } - if ($char == "%9F") - { - return "%C5%B8"; - } - if ($char == "%A0") - { - return "%C2%A0"; - } - if ($char == "%A1") - { - return "%C2%A1"; - } - if ($char == "%A2") - { - return "%C2%A2"; - } - if ($char == "%A3") - { - return "%C2%A3"; - } - if ($char == "%A4") - { - return "%C2%A4"; - } - if ($char == "%A5") - { - return "%C2%A5"; - } - if ($char == "%A6") - { - return "%C2%A6"; - } - if ($char == "%A7") - { - return "%C2%A7"; - } - if ($char == "%A8") - { - return "%C2%A8"; - } - if ($char == "%A9") - { - return "%C2%A9"; - } - if ($char == "%AA") - { - return "%C2%AA"; - } - if ($char == "%AB") - { - return "%C2%AB"; - } - if ($char == "%AC") - { - return "%C2%AC"; - } - if ($char == "%AD") - { - return "%C2%AD"; - } - if ($char == "%AE") - { - return "%C2%AE"; - } - if ($char == "%AF") - { - return "%C2%AF"; - } - if ($char == "%B0") - { - return "%C2%B0"; - } - if ($char == "%B1") - { - return "%C2%B1"; - } - if ($char == "%B2") - { - return "%C2%B2"; - } - if ($char == "%B3") - { - return "%C2%B3"; - } - if ($char == "%B4") - { - return "%C2%B4"; - } - if ($char == "%B5") - { - return "%C2%B5"; - } - if ($char == "%B6") - { - return "%C2%B6"; - } - if ($char == "%B7") - { - return "%C2%B7"; - } - if ($char == "%B8") - { - return "%C2%B8"; - } - if ($char == "%B9") - { - return "%C2%B9"; - } - if ($char == "%BA") - { - return "%C2%BA"; - } - if ($char == "%BB") - { - return "%C2%BB"; - } - if ($char == "%BC") - { - return "%C2%BC"; - } - if ($char == "%BD") - { - return "%C2%BD"; - } - if ($char == "%BE") - { - return "%C2%BE"; - } - if ($char == "%BF") - { - return "%C2%BF"; - } - if ($char == "%C0") - { - return "%C3%80"; - } - if ($char == "%C1") - { - return "%C3%81"; - } - if ($char == "%C2") - { - return "%C3%82"; - } - if ($char == "%C3") - { - return "%C3%83"; - } - if ($char == "%C4") - { - return "%C3%84"; - } - if ($char == "%C5") - { - return "%C3%85"; - } - if ($char == "%C6") - { - return "%C3%86"; - } - if ($char == "%C7") - { - return "%C3%87"; - } - if ($char == "%C8") - { - return "%C3%88"; - } - if ($char == "%C9") - { - return "%C3%89"; - } - if ($char == "%CA") - { - return "%C3%8A"; - } - if ($char == "%CB") - { - return "%C3%8B"; - } - if ($char == "%CC") - { - return "%C3%8C"; - } - if ($char == "%CD") - { - return "%C3%8D"; - } - if ($char == "%CE") - { - return "%C3%8E"; - } - if ($char == "%CF") - { - return "%C3%8F"; - } - if ($char == "%D0") - { - return "%C3%90"; - } - if ($char == "%D1") - { - return "%C3%91"; - } - if ($char == "%D2") - { - return "%C3%92"; - } - if ($char == "%D3") - { - return "%C3%93"; - } - if ($char == "%D4") - { - return "%C3%94"; - } - if ($char == "%D5") - { - return "%C3%95"; - } - if ($char == "%D6") - { - return "%C3%96"; - } - if ($char == "%D7") - { - return "%C3%97"; - } - if ($char == "%D8") - { - return "%C3%98"; - } - if ($char == "%D9") - { - return "%C3%99"; - } - if ($char == "%DA") - { - return "%C3%9A"; - } - if ($char == "%DB") - { - return "%C3%9B"; - } - if ($char == "%DC") - { - return "%C3%9C"; - } - if ($char == "%DD") - { - return "%C3%9D"; - } - if ($char == "%DE") - { - return "%C3%9E"; - } - if ($char == "%DF") - { - return "%C3%9F"; - } - if ($char == "%E0") - { - return "%C3%A0"; - } - if ($char == "%E1") - { - return "%C3%A1"; - } - if ($char == "%E2") - { - return "%C3%A2"; - } - if ($char == "%E3") - { - return "%C3%A3"; - } - if ($char == "%E4") - { - return "%C3%A4"; - } - if ($char == "%E5") - { - return "%C3%A5"; - } - if ($char == "%E6") - { - return "%C3%A6"; - } - if ($char == "%E7") - { - return "%C3%A7"; - } - if ($char == "%E8") - { - return "%C3%A8"; - } - if ($char == "%E9") - { - return "%C3%A9"; - } - if ($char == "%EA") - { - return "%C3%AA"; - } - if ($char == "%EB") - { - return "%C3%AB"; - } - if ($char == "%EC") - { - return "%C3%AC"; - } - if ($char == "%ED") - { - return "%C3%AD"; - } - if ($char == "%EE") - { - return "%C3%AE"; - } - if ($char == "%EF") - { - return "%C3%AF"; - } - if ($char == "%F0") - { - return "%C3%B0"; - } - if ($char == "%F1") - { - return "%C3%B1"; - } - if ($char == "%F2") - { - return "%C3%B2"; - } - if ($char == "%F3") - { - return "%C3%B3"; - } - if ($char == "%F4") - { - return "%C3%B4"; - } - if ($char == "%F5") - { - return "%C3%B5"; - } - if ($char == "%F6") - { - return "%C3%B6"; - } - if ($char == "%F7") - { - return "%C3%B7"; - } - if ($char == "%F8") - { - return "%C3%B8"; - } - if ($char == "%F9") - { - return "%C3%B9"; - } - if ($char == "%FA") - { - return "%C3%BA"; - } - if ($char == "%FB") - { - return "%C3%BB"; - } - if ($char == "%FC") - { - return "%C3%BC"; - } - if ($char == "%FD") - { - return "%C3%BD"; - } - if ($char == "%FE") - { - return "%C3%BE"; - } - if ($char == "%FF") - { - return "%C3%BF"; - } - return $char; -} - -function decodeURIComponent($string) -{ - $result = ""; - for ($i = 0; $i < strlen($string); $i++) - { - $decstr = ""; - for ($p = 0; $p <= 8; $p++) - { - $decstr .= $string[$i+$p]; - } - list($decodedstr, $num) = decodeURIComponentbycharacter($decstr); - $result .= urldecode($decodedstr); - $i += $num ; - } - return $result; -} - -function decodeURIComponentbycharacter($str) -{ - - $char = $str; - - if ($char == "%E2%82%AC") - { - return array("%80", 8); - } - if ($char == "%E2%80%9A") - { - return array("%82", 8); - } - if ($char == "%E2%80%9E") - { - return array("%84", 8); - } - if ($char == "%E2%80%A6") - { - return array("%85", 8); - } - if ($char == "%E2%80%A0") - { - return array("%86", 8); - } - if ($char == "%E2%80%A1") - { - return array("%87", 8); - } - if ($char == "%E2%80%B0") - { - return array("%89", 8); - } - if ($char == "%E2%80%B9") - { - return array("%8B", 8); - } - if ($char == "%E2%80%98") - { - return array("%91", 8); - } - if ($char == "%E2%80%99") - { - return array("%92", 8); - } - if ($char == "%E2%80%9C") - { - return array("%93", 8); - } - if ($char == "%E2%80%9D") - { - return array("%94", 8); - } - if ($char == "%E2%80%A2") - { - return array("%95", 8); - } - if ($char == "%E2%80%93") - { - return array("%96", 8); - } - if ($char == "%E2%80%94") - { - return array("%97", 8); - } - if ($char == "%E2%84%A2") - { - return array("%99", 8); - } - if ($char == "%E2%80%BA") - { - return array("%9B", 8); - } - - $char = substr($str, 0, 6); - - if ($char == "%C2%81") - { - return array("%81", 5); - } - if ($char == "%C6%92") - { - return array("%83", 5); - } - if ($char == "%CB%86") - { - return array("%88", 5); - } - if ($char == "%C5%A0") - { - return array("%8A", 5); - } - if ($char == "%C5%92") - { - return array("%8C", 5); - } - if ($char == "%C2%8D") - { - return array("%8D", 5); - } - if ($char == "%C5%BD") - { - return array("%8E", 5); - } - if ($char == "%C2%8F") - { - return array("%8F", 5); - } - if ($char == "%C2%90") - { - return array("%90", 5); - } - if ($char == "%CB%9C") - { - return array("%98", 5); - } - if ($char == "%C5%A1") - { - return array("%9A", 5); - } - if ($char == "%C5%93") - { - return array("%9C", 5); - } - if ($char == "%C2%9D") - { - return array("%9D", 5); - } - if ($char == "%C5%BE") - { - return array("%9E", 5); - } - if ($char == "%C5%B8") - { - return array("%9F", 5); - } - if ($char == "%C2%A0") - { - return array("%A0", 5); - } - if ($char == "%C2%A1") - { - return array("%A1", 5); - } - if ($char == "%C2%A2") - { - return array("%A2", 5); - } - if ($char == "%C2%A3") - { - return array("%A3", 5); - } - if ($char == "%C2%A4") - { - return array("%A4", 5); - } - if ($char == "%C2%A5") - { - return array("%A5", 5); - } - if ($char == "%C2%A6") - { - return array("%A6", 5); - } - if ($char == "%C2%A7") - { - return array("%A7", 5); - } - if ($char == "%C2%A8") - { - return array("%A8", 5); - } - if ($char == "%C2%A9") - { - return array("%A9", 5); - } - if ($char == "%C2%AA") - { - return array("%AA", 5); - } - if ($char == "%C2%AB") - { - return array("%AB", 5); - } - if ($char == "%C2%AC") - { - return array("%AC", 5); - } - if ($char == "%C2%AD") - { - return array("%AD", 5); - } - if ($char == "%C2%AE") - { - return array("%AE", 5); - } - if ($char == "%C2%AF") - { - return array("%AF", 5); - } - if ($char == "%C2%B0") - { - return array("%B0", 5); - } - if ($char == "%C2%B1") - { - return array("%B1", 5); - } - if ($char == "%C2%B2") - { - return array("%B2", 5); - } - if ($char == "%C2%B3") - { - return array("%B3", 5); - } - if ($char == "%C2%B4") - { - return array("%B4", 5); - } - if ($char == "%C2%B5") - { - return array("%B5", 5); - } - if ($char == "%C2%B6") - { - return array("%B6", 5); - } - if ($char == "%C2%B7") - { - return array("%B7", 5); - } - if ($char == "%C2%B8") - { - return array("%B8", 5); - } - if ($char == "%C2%B9") - { - return array("%B9", 5); - } - if ($char == "%C2%BA") - { - return array("%BA", 5); - } - if ($char == "%C2%BB") - { - return array("%BB", 5); - } - if ($char == "%C2%BC") - { - return array("%BC", 5); - } - if ($char == "%C2%BD") - { - return array("%BD", 5); - } - if ($char == "%C2%BE") - { - return array("%BE", 5); - } - if ($char == "%C2%BF") - { - return array("%BF", 5); - } - if ($char == "%C3%80") - { - return array("%C0", 5); - } - if ($char == "%C3%81") - { - return array("%C1", 5); - } - if ($char == "%C3%82") - { - return array("%C2", 5); - } - if ($char == "%C3%83") - { - return array("%C3", 5); - } - if ($char == "%C3%84") - { - return array("%C4", 5); - } - if ($char == "%C3%85") - { - return array("%C5", 5); - } - if ($char == "%C3%86") - { - return array("%C6", 5); - } - if ($char == "%C3%87") - { - return array("%C7", 5); - } - if ($char == "%C3%88") - { - return array("%C8", 5); - } - if ($char == "%C3%89") - { - return array("%C9", 5); - } - if ($char == "%C3%8A") - { - return array("%CA", 5); - } - if ($char == "%C3%8B") - { - return array("%CB", 5); - } - if ($char == "%C3%8C") - { - return array("%CC", 5); - } - if ($char == "%C3%8D") - { - return array("%CD", 5); - } - if ($char == "%C3%8E") - { - return array("%CE", 5); - } - if ($char == "%C3%8F") - { - return array("%CF", 5); - } - if ($char == "%C3%90") - { - return array("%D0", 5); - } - if ($char == "%C3%91") - { - return array("%D1", 5); - } - if ($char == "%C3%92") - { - return array("%D2", 5); - } - if ($char == "%C3%93") - { - return array("%D3", 5); - } - if ($char == "%C3%94") - { - return array("%D4", 5); - } - if ($char == "%C3%95") - { - return array("%D5", 5); - } - if ($char == "%C3%96") - { - return array("%D6", 5); - } - if ($char == "%C3%97") - { - return array("%D7", 5); - } - if ($char == "%C3%98") - { - return array("%D8", 5); - } - if ($char == "%C3%99") - { - return array("%D9", 5); - } - if ($char == "%C3%9A") - { - return array("%DA", 5); - } - if ($char == "%C3%9B") - { - return array("%DB", 5); - } - if ($char == "%C3%9C") - { - return array("%DC", 5); - } - if ($char == "%C3%9D") - { - return array("%DD", 5); - } - if ($char == "%C3%9E") - { - return array("%DE", 5); - } - if ($char == "%C3%9F") - { - return array("%DF", 5); - } - if ($char == "%C3%A0") - { - return array("%E0", 5); - } - if ($char == "%C3%A1") - { - return array("%E1", 5); - } - if ($char == "%C3%A2") - { - return array("%E2", 5); - } - if ($char == "%C3%A3") - { - return array("%E3", 5); - } - if ($char == "%C3%A4") - { - return array("%E4", 5); - } - if ($char == "%C3%A5") - { - return array("%E5", 5); - } - if ($char == "%C3%A6") - { - return array("%E6", 5); - } - if ($char == "%C3%A7") - { - return array("%E7", 5); - } - if ($char == "%C3%A8") - { - return array("%E8", 5); - } - if ($char == "%C3%A9") - { - return array("%E9", 5); - } - if ($char == "%C3%AA") - { - return array("%EA", 5); - } - if ($char == "%C3%AB") - { - return array("%EB", 5); - } - if ($char == "%C3%AC") - { - return array("%EC", 5); - } - if ($char == "%C3%AD") - { - return array("%ED", 5); - } - if ($char == "%C3%AE") - { - return array("%EE", 5); - } - if ($char == "%C3%AF") - { - return array("%EF", 5); - } - if ($char == "%C3%B0") - { - return array("%F0", 5); - } - if ($char == "%C3%B1") - { - return array("%F1", 5); - } - if ($char == "%C3%B2") - { - return array("%F2", 5); - } - if ($char == "%C3%B3") - { - return array("%F3", 5); - } - if ($char == "%C3%B4") - { - return array("%F4", 5); - } - if ($char == "%C3%B5") - { - return array("%F5", 5); - } - if ($char == "%C3%B6") - { - return array("%F6", 5); - } - if ($char == "%C3%B7") - { - return array("%F7", 5); - } - if ($char == "%C3%B8") - { - return array("%F8", 5); - } - if ($char == "%C3%B9") - { - return array("%F9", 5); - } - if ($char == "%C3%BA") - { - return array("%FA", 5); - } - if ($char == "%C3%BB") - { - return array("%FB", 5); - } - if ($char == "%C3%BC") - { - return array("%FC", 5); - } - if ($char == "%C3%BD") - { - return array("%FD", 5); - } - if ($char == "%C3%BE") - { - return array("%FE", 5); - } - if ($char == "%C3%BF") - { - return array("%FF", 5); - } - - $char = substr($str, 0, 3); - if ($char == "%20") - { - return array("+", 2); - } - - $char = substr($str, 0, 1); - - if ($char == "!") - { - return array("%21", 0); - } - if ($char == "\"") - { - return array("%27", 0); - } - if ($char == "(") - { - return array("%28", 0); - } - if ($char == ")") - { - return array("%29", 0); - } - if ($char == "*") - { - return array("%2A", 0); - } - if ($char == "~") - { - return array("%7E", 0); - } - - if ($char == "%") - { - return array(substr($str, 0, 3), 2); - } - else - { - return array($char, 0); - } -} - -function encodeURI($string) -{ - $result = ""; - for ($i = 0; $i < strlen($string); $i++) - { - $result .= encodeURIbycharacter(urlencode($string[$i])); - } - return $result; -} - -function encodeURIbycharacter($char) -{ - if ($char == "+") - { - return "%20"; - } - if ($char == "%21") - { - return "!"; - } - if ($char == "%23") - { - return "#"; - } - if ($char == "%24") - { - return "$"; - } - if ($char == "%26") - { - return "&"; - } - if ($char == "%27") - { - return "\""; - } - if ($char == "%28") - { - return "("; - } - if ($char == "%29") - { - return ")"; - } - if ($char == "%2A") - { - return "*"; - } - if ($char == "%2B") - { - return "+"; - } - if ($char == "%2C") - { - return ","; - } - if ($char == "%2F") - { - return "/"; - } - if ($char == "%3A") - { - return ":"; - } - if ($char == "%3B") - { - return ";"; - } - if ($char == "%3D") - { - return "="; - } - if ($char == "%3F") - { - return "?"; - } - if ($char == "%40") - { - return "@"; - } - if ($char == "%7E") - { - return "~"; - } - if ($char == "%80") - { - return "%E2%82%AC"; - } - if ($char == "%81") - { - return "%C2%81"; - } - if ($char == "%82") - { - return "%E2%80%9A"; - } - if ($char == "%83") - { - return "%C6%92"; - } - if ($char == "%84") - { - return "%E2%80%9E"; - } - if ($char == "%85") - { - return "%E2%80%A6"; - } - if ($char == "%86") - { - return "%E2%80%A0"; - } - if ($char == "%87") - { - return "%E2%80%A1"; - } - if ($char == "%88") - { - return "%CB%86"; - } - if ($char == "%89") - { - return "%E2%80%B0"; - } - if ($char == "%8A") - { - return "%C5%A0"; - } - if ($char == "%8B") - { - return "%E2%80%B9"; - } - if ($char == "%8C") - { - return "%C5%92"; - } - if ($char == "%8D") - { - return "%C2%8D"; - } - if ($char == "%8E") - { - return "%C5%BD"; - } - if ($char == "%8F") - { - return "%C2%8F"; - } - if ($char == "%90") - { - return "%C2%90"; - } - if ($char == "%91") - { - return "%E2%80%98"; - } - if ($char == "%92") - { - return "%E2%80%99"; - } - if ($char == "%93") - { - return "%E2%80%9C"; - } - if ($char == "%94") - { - return "%E2%80%9D"; - } - if ($char == "%95") - { - return "%E2%80%A2"; - } - if ($char == "%96") - { - return "%E2%80%93"; - } - if ($char == "%97") - { - return "%E2%80%94"; - } - if ($char == "%98") - { - return "%CB%9C"; - } - if ($char == "%99") - { - return "%E2%84%A2"; - } - if ($char == "%9A") - { - return "%C5%A1"; - } - if ($char == "%9B") - { - return "%E2%80%BA"; - } - if ($char == "%9C") - { - return "%C5%93"; - } - if ($char == "%9D") - { - return "%C2%9D"; - } - if ($char == "%9E") - { - return "%C5%BE"; - } - if ($char == "%9F") - { - return "%C5%B8"; - } - if ($char == "%A0") - { - return "%C2%A0"; - } - if ($char == "%A1") - { - return "%C2%A1"; - } - if ($char == "%A2") - { - return "%C2%A2"; - } - if ($char == "%A3") - { - return "%C2%A3"; - } - if ($char == "%A4") - { - return "%C2%A4"; - } - if ($char == "%A5") - { - return "%C2%A5"; - } - if ($char == "%A6") - { - return "%C2%A6"; - } - if ($char == "%A7") - { - return "%C2%A7"; - } - if ($char == "%A8") - { - return "%C2%A8"; - } - if ($char == "%A9") - { - return "%C2%A9"; - } - if ($char == "%AA") - { - return "%C2%AA"; - } - if ($char == "%AB") - { - return "%C2%AB"; - } - if ($char == "%AC") - { - return "%C2%AC"; - } - if ($char == "%AD") - { - return "%C2%AD"; - } - if ($char == "%AE") - { - return "%C2%AE"; - } - if ($char == "%AF") - { - return "%C2%AF"; - } - if ($char == "%B0") - { - return "%C2%B0"; - } - if ($char == "%B1") - { - return "%C2%B1"; - } - if ($char == "%B2") - { - return "%C2%B2"; - } - if ($char == "%B3") - { - return "%C2%B3"; - } - if ($char == "%B4") - { - return "%C2%B4"; - } - if ($char == "%B5") - { - return "%C2%B5"; - } - if ($char == "%B6") - { - return "%C2%B6"; - } - if ($char == "%B7") - { - return "%C2%B7"; - } - if ($char == "%B8") - { - return "%C2%B8"; - } - if ($char == "%B9") - { - return "%C2%B9"; - } - if ($char == "%BA") - { - return "%C2%BA"; - } - if ($char == "%BB") - { - return "%C2%BB"; - } - if ($char == "%BC") - { - return "%C2%BC"; - } - if ($char == "%BD") - { - return "%C2%BD"; - } - if ($char == "%BE") - { - return "%C2%BE"; - } - if ($char == "%BF") - { - return "%C2%BF"; - } - if ($char == "%C0") - { - return "%C3%80"; - } - if ($char == "%C1") - { - return "%C3%81"; - } - if ($char == "%C2") - { - return "%C3%82"; - } - if ($char == "%C3") - { - return "%C3%83"; - } - if ($char == "%C4") - { - return "%C3%84"; - } - if ($char == "%C5") - { - return "%C3%85"; - } - if ($char == "%C6") - { - return "%C3%86"; - } - if ($char == "%C7") - { - return "%C3%87"; - } - if ($char == "%C8") - { - return "%C3%88"; - } - if ($char == "%C9") - { - return "%C3%89"; - } - if ($char == "%CA") - { - return "%C3%8A"; - } - if ($char == "%CB") - { - return "%C3%8B"; - } - if ($char == "%CC") - { - return "%C3%8C"; - } - if ($char == "%CD") - { - return "%C3%8D"; - } - if ($char == "%CE") - { - return "%C3%8E"; - } - if ($char == "%CF") - { - return "%C3%8F"; - } - if ($char == "%D0") - { - return "%C3%90"; - } - if ($char == "%D1") - { - return "%C3%91"; - } - if ($char == "%D2") - { - return "%C3%92"; - } - if ($char == "%D3") - { - return "%C3%93"; - } - if ($char == "%D4") - { - return "%C3%94"; - } - if ($char == "%D5") - { - return "%C3%95"; - } - if ($char == "%D6") - { - return "%C3%96"; - } - if ($char == "%D7") - { - return "%C3%97"; - } - if ($char == "%D8") - { - return "%C3%98"; - } - if ($char == "%D9") - { - return "%C3%99"; - } - if ($char == "%DA") - { - return "%C3%9A"; - } - if ($char == "%DB") - { - return "%C3%9B"; - } - if ($char == "%DC") - { - return "%C3%9C"; - } - if ($char == "%DD") - { - return "%C3%9D"; - } - if ($char == "%DE") - { - return "%C3%9E"; - } - if ($char == "%DF") - { - return "%C3%9F"; - } - if ($char == "%E0") - { - return "%C3%A0"; - } - if ($char == "%E1") - { - return "%C3%A1"; - } - if ($char == "%E2") - { - return "%C3%A2"; - } - if ($char == "%E3") - { - return "%C3%A3"; - } - if ($char == "%E4") - { - return "%C3%A4"; - } - if ($char == "%E5") - { - return "%C3%A5"; - } - if ($char == "%E6") - { - return "%C3%A6"; - } - if ($char == "%E7") - { - return "%C3%A7"; - } - if ($char == "%E8") - { - return "%C3%A8"; - } - if ($char == "%E9") - { - return "%C3%A9"; - } - if ($char == "%EA") - { - return "%C3%AA"; - } - if ($char == "%EB") - { - return "%C3%AB"; - } - if ($char == "%EC") - { - return "%C3%AC"; - } - if ($char == "%ED") - { - return "%C3%AD"; - } - if ($char == "%EE") - { - return "%C3%AE"; - } - if ($char == "%EF") - { - return "%C3%AF"; - } - if ($char == "%F0") - { - return "%C3%B0"; - } - if ($char == "%F1") - { - return "%C3%B1"; - } - if ($char == "%F2") - { - return "%C3%B2"; - } - if ($char == "%F3") - { - return "%C3%B3"; - } - if ($char == "%F4") - { - return "%C3%B4"; - } - if ($char == "%F5") - { - return "%C3%B5"; - } - if ($char == "%F6") - { - return "%C3%B6"; - } - if ($char == "%F7") - { - return "%C3%B7"; - } - if ($char == "%F8") - { - return "%C3%B8"; - } - if ($char == "%F9") - { - return "%C3%B9"; - } - if ($char == "%FA") - { - return "%C3%BA"; - } - if ($char == "%FB") - { - return "%C3%BB"; - } - if ($char == "%FC") - { - return "%C3%BC"; - } - if ($char == "%FD") - { - return "%C3%BD"; - } - if ($char == "%FE") - { - return "%C3%BE"; - } - if ($char == "%FF") - { - return "%C3%BF"; - } - return $char; -} - -function decodeURI($string) -{ - $result = ""; - for ($i = 0; $i < strlen($string); $i++) - { - $decstr = ""; - for ($p = 0; $p <= 8; $p++) - { - $decstr .= $string[$i+$p]; - } - list($decodedstr, $num) = decodeURIbycharacter($decstr); - $result .= urldecode($decodedstr); - $i += $num ; - } - return $result; -} - -function decodeURIbycharacter($str) -{ - - $char = $str; - - if ($char == "%E2%82%AC") - { - return array("%80", 8); - } - if ($char == "%E2%80%9A") - { - return array("%82", 8); - } - if ($char == "%E2%80%9E") - { - return array("%84", 8); - } - if ($char == "%E2%80%A6") - { - return array("%85", 8); - } - if ($char == "%E2%80%A0") - { - return array("%86", 8); - } - if ($char == "%E2%80%A1") - { - return array("%87", 8); - } - if ($char == "%E2%80%B0") - { - return array("%89", 8); - } - if ($char == "%E2%80%B9") - { - return array("%8B", 8); - } - if ($char == "%E2%80%98") - { - return array("%91", 8); - } - if ($char == "%E2%80%99") - { - return array("%92", 8); - } - if ($char == "%E2%80%9C") - { - return array("%93", 8); - } - if ($char == "%E2%80%9D") - { - return array("%94", 8); - } - if ($char == "%E2%80%A2") - { - return array("%95", 8); - } - if ($char == "%E2%80%93") - { - return array("%96", 8); - } - if ($char == "%E2%80%94") - { - return array("%97", 8); - } - if ($char == "%E2%84%A2") - { - return array("%99", 8); - } - if ($char == "%E2%80%BA") - { - return array("%9B", 8); - } - - $char = substr($str, 0, 6); - - if ($char == "%C2%81") - { - return array("%81", 5); - } - if ($char == "%C6%92") - { - return array("%83", 5); - } - if ($char == "%CB%86") - { - return array("%88", 5); - } - if ($char == "%C5%A0") - { - return array("%8A", 5); - } - if ($char == "%C5%92") - { - return array("%8C", 5); - } - if ($char == "%C2%8D") - { - return array("%8D", 5); - } - if ($char == "%C5%BD") - { - return array("%8E", 5); - } - if ($char == "%C2%8F") - { - return array("%8F", 5); - } - if ($char == "%C2%90") - { - return array("%90", 5); - } - if ($char == "%CB%9C") - { - return array("%98", 5); - } - if ($char == "%C5%A1") - { - return array("%9A", 5); - } - if ($char == "%C5%93") - { - return array("%9C", 5); - } - if ($char == "%C2%9D") - { - return array("%9D", 5); - } - if ($char == "%C5%BE") - { - return array("%9E", 5); - } - if ($char == "%C5%B8") - { - return array("%9F", 5); - } - if ($char == "%C2%A0") - { - return array("%A0", 5); - } - if ($char == "%C2%A1") - { - return array("%A1", 5); - } - if ($char == "%C2%A2") - { - return array("%A2", 5); - } - if ($char == "%C2%A3") - { - return array("%A3", 5); - } - if ($char == "%C2%A4") - { - return array("%A4", 5); - } - if ($char == "%C2%A5") - { - return array("%A5", 5); - } - if ($char == "%C2%A6") - { - return array("%A6", 5); - } - if ($char == "%C2%A7") - { - return array("%A7", 5); - } - if ($char == "%C2%A8") - { - return array("%A8", 5); - } - if ($char == "%C2%A9") - { - return array("%A9", 5); - } - if ($char == "%C2%AA") - { - return array("%AA", 5); - } - if ($char == "%C2%AB") - { - return array("%AB", 5); - } - if ($char == "%C2%AC") - { - return array("%AC", 5); - } - if ($char == "%C2%AD") - { - return array("%AD", 5); - } - if ($char == "%C2%AE") - { - return array("%AE", 5); - } - if ($char == "%C2%AF") - { - return array("%AF", 5); - } - if ($char == "%C2%B0") - { - return array("%B0", 5); - } - if ($char == "%C2%B1") - { - return array("%B1", 5); - } - if ($char == "%C2%B2") - { - return array("%B2", 5); - } - if ($char == "%C2%B3") - { - return array("%B3", 5); - } - if ($char == "%C2%B4") - { - return array("%B4", 5); - } - if ($char == "%C2%B5") - { - return array("%B5", 5); - } - if ($char == "%C2%B6") - { - return array("%B6", 5); - } - if ($char == "%C2%B7") - { - return array("%B7", 5); - } - if ($char == "%C2%B8") - { - return array("%B8", 5); - } - if ($char == "%C2%B9") - { - return array("%B9", 5); - } - if ($char == "%C2%BA") - { - return array("%BA", 5); - } - if ($char == "%C2%BB") - { - return array("%BB", 5); - } - if ($char == "%C2%BC") - { - return array("%BC", 5); - } - if ($char == "%C2%BD") - { - return array("%BD", 5); - } - if ($char == "%C2%BE") - { - return array("%BE", 5); - } - if ($char == "%C2%BF") - { - return array("%BF", 5); - } - if ($char == "%C3%80") - { - return array("%C0", 5); - } - if ($char == "%C3%81") - { - return array("%C1", 5); - } - if ($char == "%C3%82") - { - return array("%C2", 5); - } - if ($char == "%C3%83") - { - return array("%C3", 5); - } - if ($char == "%C3%84") - { - return array("%C4", 5); - } - if ($char == "%C3%85") - { - return array("%C5", 5); - } - if ($char == "%C3%86") - { - return array("%C6", 5); - } - if ($char == "%C3%87") - { - return array("%C7", 5); - } - if ($char == "%C3%88") - { - return array("%C8", 5); - } - if ($char == "%C3%89") - { - return array("%C9", 5); - } - if ($char == "%C3%8A") - { - return array("%CA", 5); - } - if ($char == "%C3%8B") - { - return array("%CB", 5); - } - if ($char == "%C3%8C") - { - return array("%CC", 5); - } - if ($char == "%C3%8D") - { - return array("%CD", 5); - } - if ($char == "%C3%8E") - { - return array("%CE", 5); - } - if ($char == "%C3%8F") - { - return array("%CF", 5); - } - if ($char == "%C3%90") - { - return array("%D0", 5); - } - if ($char == "%C3%91") - { - return array("%D1", 5); - } - if ($char == "%C3%92") - { - return array("%D2", 5); - } - if ($char == "%C3%93") - { - return array("%D3", 5); - } - if ($char == "%C3%94") - { - return array("%D4", 5); - } - if ($char == "%C3%95") - { - return array("%D5", 5); - } - if ($char == "%C3%96") - { - return array("%D6", 5); - } - if ($char == "%C3%97") - { - return array("%D7", 5); - } - if ($char == "%C3%98") - { - return array("%D8", 5); - } - if ($char == "%C3%99") - { - return array("%D9", 5); - } - if ($char == "%C3%9A") - { - return array("%DA", 5); - } - if ($char == "%C3%9B") - { - return array("%DB", 5); - } - if ($char == "%C3%9C") - { - return array("%DC", 5); - } - if ($char == "%C3%9D") - { - return array("%DD", 5); - } - if ($char == "%C3%9E") - { - return array("%DE", 5); - } - if ($char == "%C3%9F") - { - return array("%DF", 5); - } - if ($char == "%C3%A0") - { - return array("%E0", 5); - } - if ($char == "%C3%A1") - { - return array("%E1", 5); - } - if ($char == "%C3%A2") - { - return array("%E2", 5); - } - if ($char == "%C3%A3") - { - return array("%E3", 5); - } - if ($char == "%C3%A4") - { - return array("%E4", 5); - } - if ($char == "%C3%A5") - { - return array("%E5", 5); - } - if ($char == "%C3%A6") - { - return array("%E6", 5); - } - if ($char == "%C3%A7") - { - return array("%E7", 5); - } - if ($char == "%C3%A8") - { - return array("%E8", 5); - } - if ($char == "%C3%A9") - { - return array("%E9", 5); - } - if ($char == "%C3%AA") - { - return array("%EA", 5); - } - if ($char == "%C3%AB") - { - return array("%EB", 5); - } - if ($char == "%C3%AC") - { - return array("%EC", 5); - } - if ($char == "%C3%AD") - { - return array("%ED", 5); - } - if ($char == "%C3%AE") - { - return array("%EE", 5); - } - if ($char == "%C3%AF") - { - return array("%EF", 5); - } - if ($char == "%C3%B0") - { - return array("%F0", 5); - } - if ($char == "%C3%B1") - { - return array("%F1", 5); - } - if ($char == "%C3%B2") - { - return array("%F2", 5); - } - if ($char == "%C3%B3") - { - return array("%F3", 5); - } - if ($char == "%C3%B4") - { - return array("%F4", 5); - } - if ($char == "%C3%B5") - { - return array("%F5", 5); - } - if ($char == "%C3%B6") - { - return array("%F6", 5); - } - if ($char == "%C3%B7") - { - return array("%F7", 5); - } - if ($char == "%C3%B8") - { - return array("%F8", 5); - } - if ($char == "%C3%B9") - { - return array("%F9", 5); - } - if ($char == "%C3%BA") - { - return array("%FA", 5); - } - if ($char == "%C3%BB") - { - return array("%FB", 5); - } - if ($char == "%C3%BC") - { - return array("%FC", 5); - } - if ($char == "%C3%BD") - { - return array("%FD", 5); - } - if ($char == "%C3%BE") - { - return array("%FE", 5); - } - if ($char == "%C3%BF") - { - return array("%FF", 5); - } - - $char = substr($str, 0, 3); - if ($char == "%20") - { - return array("+", 2); - } - - $char = substr($str, 0, 1); - - if ($char == "!") - { - return array("%21", 0); - } - if ($char == "#") - { - return array("%23", 0); - } - if ($char == "$") - { - return array("%24", 0); - } - if ($char == "&") - { - return array("%26", 0); - } - if ($char == "\"") - { - return array("%27", 0); - } - if ($char == "(") - { - return array("%28", 0); - } - if ($char == ")") - { - return array("%29", 0); - } - if ($char == "*") - { - return array("%2A", 0); - } - if ($char == "+") - { - return array("%2B", 0); - } - if ($char == ",") - { - return array("%2C", 0); - } - if ($char == "/") - { - return array("%2F", 0); - } - if ($char == ":") - { - return array("%3A", 0); - } - if ($char == ";") - { - return array("%3B", 0); - } - if ($char == "=") - { - return array("%3D", 0); - } - if ($char == "?") - { - return array("%3F", 0); - } - if ($char == "@") - { - return array("%40", 0); - } - if ($char == "~") - { - return array("%7E", 0); - } - - if ($char == "%") - { - return array(substr($str, 0, 3), 2); - } - else - { - return array($char, 0); - } -} - -function escape($string) -{ - $result = ""; - for ($i = 0; $i < strlen($string); $i++) - { - $result .= escapebycharacter(urlencode($string[$i])); - } - return $result; -} - -function escapebycharacter($char) -{ - if ($char == '+') - { - return '%20'; - } - if ($char == '%2A') - { - return '*'; - } - if ($char == '%2B') - { - return '+'; - } - if ($char == '%2F') - { - return '/'; - } - if ($char == '%40') - { - return '@'; - } - if ($char == '%80') - { - return '%u20AC'; - } - if ($char == '%82') - { - return '%u201A'; - } - if ($char == '%83') - { - return '%u0192'; - } - if ($char == '%84') - { - return '%u201E'; - } - if ($char == '%85') - { - return '%u2026'; - } - if ($char == '%86') - { - return '%u2020'; - } - if ($char == '%87') - { - return '%u2021'; - } - if ($char == '%88') - { - return '%u02C6'; - } - if ($char == '%89') - { - return '%u2030'; - } - if ($char == '%8A') - { - return '%u0160'; - } - if ($char == '%8B') - { - return '%u2039'; - } - if ($char == '%8C') - { - return '%u0152'; - } - if ($char == '%8E') - { - return '%u017D'; - } - if ($char == '%91') - { - return '%u2018'; - } - if ($char == '%92') - { - return '%u2019'; - } - if ($char == '%93') - { - return '%u201C'; - } - if ($char == '%94') - { - return '%u201D'; - } - if ($char == '%95') - { - return '%u2022'; - } - if ($char == '%96') - { - return '%u2013'; - } - if ($char == '%97') - { - return '%u2014'; - } - if ($char == '%98') - { - return '%u02DC'; - } - if ($char == '%99') - { - return '%u2122'; - } - if ($char == '%9A') - { - return '%u0161'; - } - if ($char == '%9B') - { - return '%u203A'; - } - if ($char == '%9C') - { - return '%u0153'; - } - if ($char == '%9E') - { - return '%u017E'; - } - if ($char == '%9F') - { - return '%u0178'; - } - return $char; -} - -function unescape($string) -{ - $result = ""; - for ($i = 0; $i < strlen($string); $i++) - { - $decstr = ""; - for ($p = 0; $p <= 5; $p++) - { - $decstr .= $string[$i+$p]; - } - list($decodedstr, $num) = unescapebycharacter($decstr); - $result .= urldecode($decodedstr); - $i += $num ; - } - return $result; -} - -function unescapebycharacter($str) -{ - - $char = $str; - - if ($char == '%u20AC') - { - return array("%80", 5); - } - if ($char == '%u201A') - { - return array("%82", 5); - } - if ($char == '%u0192') - { - return array("%83", 5); - } - if ($char == '%u201E') - { - return array("%84", 5); - } - if ($char == '%u2026') - { - return array("%85", 5); - } - if ($char == '%u2020') - { - return array("%86", 5); - } - if ($char == '%u2021') - { - return array("%87", 5); - } - if ($char == '%u02C6') - { - return array("%88", 5); - } - if ($char == '%u2030') - { - return array("%89", 5); - } - if ($char == '%u0160') - { - return array("%8A", 5); - } - if ($char == '%u2039') - { - return array("%8B", 5); - } - if ($char == '%u0152') - { - return array("%8C", 5); - } - if ($char == '%u017D') - { - return array("%8E", 5); - } - if ($char == '%u2018') - { - return array("%91", 5); - } - if ($char == '%u2019') - { - return array("%92", 5); - } - if ($char == '%u201C') - { - return array("%93", 5); - } - if ($char == '%u201D') - { - return array("%94", 5); - } - if ($char == '%u2022') - { - return array("%95", 5); - } - if ($char == '%u2013') - { - return array("%96", 5); - } - if ($char == '%u2014') - { - return array("%97", 5); - } - if ($char == '%u02DC') - { - return array("%98", 5); - } - if ($char == '%u2122') - { - return array("%99", 5); - } - if ($char == '%u0161') - { - return array("%9A", 5); - } - if ($char == '%u203A') - { - return array("%9B", 5); - } - if ($char == '%u0153') - { - return array("%9C", 5); - } - if ($char == '%u017E') - { - return array("%9E", 5); - } - if ($char == '%u0178') - { - return array("%9F", 5); - } - - $char = substr($str, 0, 3); - if ($char == "%20") - { - return array("+", 2); - } - - $char = substr($str, 0, 1); - - if ($char == '*') - { - return array("%2A", 0); - } - if ($char == '+') - { - return array("%2B", 0); - } - if ($char == '/') - { - return array("%2F", 0); - } - if ($char == '@') - { - return array("%40", 0); - } - - if ($char == "%") - { - return array(substr($str, 0, 3), 2); - } - else - { - return array($char, 0); - } -} -/** - * @brief When data are transfered thanks ajax in a xml document, the xml - * can not contains some character, to escape those characters, we must use this - * function - *@param $p_xml the xml to escape - *@return the xml string with the forbidden char escaped - *@see ajax_card.js ajaxFid - */ -function escape_xml($p_xml) -{ - $xml=$p_xml; - $xml=str_replace('&','&',$xml); - $xml=str_replace('<','<',$xml); - $xml=str_replace('>','>',$xml); - $xml=str_replace("'",''',$xml); - $xml=str_replace('"','"',$xml); - return $xml; -} -/** - * @brief - * replace special char - *@param $p_xml the xml to escape - *@return the xml string with the forbidden char escaped - *@see ajax_card.js ajaxFid - *@see escape_xml - */ -function unescape_xml($p_xml) -{ - $xml=$p_xml; - $xml=str_replace('&','&',$xml); - $xml=str_replace('<','<',$xml); - $xml=str_replace('>','>',$xml); - $xml=str_replace(''',"'",$xml); - $xml=str_replace('"','"',$xml); - return $xml; -} -/** - *load all the javascript only one time - * - */ -function load_all_script() -{ - // check not called twiced - static $already_call=0; - if ( $already_call==1)return; - $already_call=1; - - echo JS_INFOBULLE; - echo js_include('smoke.js'); - echo js_include('prototype.js'); - echo js_include('scriptaculous.js'); - echo js_include('scripts.js'); - // echo js_include('effects.js'); - // echo js_include('dragdrop.js'); - // echo js_include('controls.js'); - // echo js_include('slider.js'); - echo js_include('acc_ledger.js'); - echo js_include('accounting_item.js'); - echo js_include('ajax_fiche.js'); - echo js_include('anc_script.js'); - // echo js_include('builder.js'); - echo js_include('calc.js'); - echo js_include('card.js'); - echo js_include('compute_direct.js'); - echo js_include('compute.js'); - echo js_include('forecast.js'); - echo js_include('gestion.js'); - echo js_include('todo_list.js'); - echo js_include('anc_script.js'); - echo js_include('sorttable.js'); - echo js_include('nicEdit.js'); - - -} -?> diff --git a/sources/include/header_print.php b/sources/include/header_print.php deleted file mode 100644 index d940f2b..0000000 --- a/sources/include/header_print.php +++ /dev/null @@ -1,44 +0,0 @@ -MY_NAME; - - $date=date('d / m / Y H:i '); - $dossier=utf8_decode(" Dossier : ".dossier::name()); - return $dossier." ".$soc." ".$date; -} - -?> diff --git a/sources/include/history_operation.inc.php b/sources/include/history_operation.inc.php deleted file mode 100644 index e08fca2..0000000 --- a/sources/include/history_operation.inc.php +++ /dev/null @@ -1,156 +0,0 @@ -type='ODS'; - break; - case 'ALL': - $Ledger=new Acc_Ledger($cn,0); - $ask_pay=0; - $p_array['ledger_type']='ALL'; - $Ledger->type='ALL'; - break; - case 'VEN': - $Ledger=new Acc_Ledger_Sold($cn,0); - $ask_pay=1; - break; - case 'FIN': - $Ledger=new Acc_Ledger_Fin($cn,0); - $ask_pay=0; - break; - -} -echo '
    '; -// Check privilege -$p_jrn=HtmlInput::default_value_request("p_jrn", -1); -if (isset($_REQUEST['p_jrn']) && - $g_user->check_jrn($_REQUEST['p_jrn']) == 'X') -{ - - NoAccess(); - exit - 1; -} - -$Ledger->id = $p_jrn; -echo $Ledger->display_search_form(); -//------------------------------ -// UPdate the payment -//------------------------------ -if (isset($_GET ['paid'])) -{ - $Ledger->update_paid($_GET); -} - - -$msg=""; -/* by default we should use the default period */ -if (!isset($p_array['date_start'])) -{ - $period = $g_user->get_periode(); - $per = new Periode($cn, $period); - list($date_start, $date_end) = $per->get_date_limit(); - $p_array['date_start'] = $date_start; - $p_array['date_end'] = $date_end; - $msg='

    '._("Période ").$date_start._(" au ").$date_end.'

    '; -} -else -{ - $msg='

    '._("Période ").$_GET['date_start']._(" au ").$_GET['date_end'].'

    '; - -} -/* compute the sql stmt */ -list($sql, $where) = $Ledger->build_search_sql($p_array); - -$max_line = $cn->count_sql($sql); - -$step = $_SESSION['g_pagesize']; -$page = (isset($_GET['offset'])) ? $_GET['page'] : 1; -$offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0; -$bar = navigation_bar($offset, $max_line, $step, $page); - -echo $msg; -echo '
    '; -echo HtmlInput::hidden("ac", $_REQUEST['ac']); -echo HtmlInput::hidden('ledger_type',$ledger_type); -echo dossier::hidden(); -echo $bar; - -list($count, $html) = $Ledger->list_operation($sql, $offset, $ask_pay); -echo $html; -echo $bar; -$r = HtmlInput::get_to_hidden(array('l', 'date_start', 'date_end', 'desc', 'amount_min', 'amount_max', 'qcode', 'accounting', 'unpaid', 'gDossier', 'ledger_type', 'p_action')); -if (isset($_GET['r_jrn'])) -{ - foreach ($_GET['r_jrn'] as $k => $v) - $r.=HtmlInput::hidden('r_jrn[' . $k . ']', $v); -} -echo $r; - -if ($ask_pay) - echo '

    ' . HtmlInput::submit('paid', _('Mise à jour paiement')) . IButton::select_checkbox('fpaida') . IButton::unselect_checkbox('fpaida') . '

    '; - -echo '
    '; -/* - * Export to csv - */ -$r = HtmlInput::get_to_hidden(array('l', 'date_paid_start','date_paid_end', - 'date_start', 'date_end', 'desc', 'amount_min', 'amount_max', 'qcode', - 'accounting', 'unpaid', 'gDossier', 'ledger_type', 'p_action')); -if (isset($_GET['r_jrn'])) -{ - foreach ($_GET['r_jrn'] as $k => $v) - $r.=HtmlInput::hidden('r_jrn[' . $k . ']', $v); -} -echo '
    '; -echo $r; -echo HtmlInput::hidden('act', 'CSV:histo'); -echo HtmlInput::submit('viewsearch', _('Export vers CSV')); - -echo '
    '; - -echo '
    '; -return; -?> diff --git a/sources/include/impress_bilan.inc.php b/sources/include/impress_bilan.inc.php deleted file mode 100644 index 5eb2560..0000000 --- a/sources/include/impress_bilan.inc.php +++ /dev/null @@ -1,103 +0,0 @@ -get_request_get(); -echo '
    '; -$exercice=(isset($_GET['exercice']))?$_GET['exercice']:$g_user->get_exercice(); -if ( ! isset ($_GET['verif'])) -{ -/* - * Let you change the exercice - */ -echo '
    '._('Exercice').'';; -echo '
    '; -echo _('Choisissez un autre exercice'); -$ex=new Exercice($cn); -$wex=$ex->select('exercice',$exercice,' onchange="submit(this)"'); -echo $wex->input(); -echo dossier::hidden(); -echo HtmlInput::get_to_hidden(array('ac','type')); -echo '
    '; -echo '
    '; - -$filter_year=" where p_exercice='".sql_string($exercice)."'"; -echo '
    '; -echo HtmlInput::hidden('type','bilan'); -echo dossier::hidden(); -echo $bilan->display_form ($filter_year); -echo ' '._('Attention : si le bilan n\'est pas équilibré.
    Vérifiez
      -
    • L\'affectation du résultat est fait
    • -
    • Vos comptes actifs ont un solde débiteur (sauf les comptes dit inversés)
    • -
    • les comptes passifs ont un solde créditeur (sauf les comptes dit inversés)
    • -
    - Utilisez la balance des comptes pour vérifier.').'
    '; -echo HtmlInput::submit('verif',_('Verification comptabilite')); -echo HtmlInput::get_to_hidden(array('ac','exercice')); -echo '
    '; -} - - -if ( isset($_GET['verif'])) -{ - $periode=new Periode($cn); - $date_from=$periode->first_day($bilan->from); - $date_to=$periode->last_day($bilan->to); - echo '

    '._('Etape 2 :Impression')." ".$date_from.'-'.$date_to.'

    '; - - $bilan->get_request_get(); - $bilan->verify(); - $url_verify=http_build_query(array('ac'=>'VERIFBIL','gDossier'=>dossier::id())); - echo _('Pour une vérification complète, allez dans ').' VERIFBIL'; - echo '
    '; - echo dossier::hidden(); - echo HtmlInput::get_to_hidden(array('exercice')); - echo HtmlInput::hidden('b_id',$_GET['b_id']); - echo HtmlInput::hidden('act','OTH:Bilan'); - - echo HtmlInput::hidden('from_periode',$bilan->from); - echo HtmlInput::hidden('to_periode',$bilan->to); - echo HtmlInput::submit('Impression','Impression'); - echo '
    '; - -} - -echo '
    '; -echo '
    '; -?> diff --git a/sources/include/impress_gl_comptes.inc.php b/sources/include/impress_gl_comptes.inc.php deleted file mode 100644 index 015d62a..0000000 --- a/sources/include/impress_gl_comptes.inc.php +++ /dev/null @@ -1,282 +0,0 @@ -'; - -echo '
    '; -echo HtmlInput::hidden('ac',$_REQUEST['ac']); -echo HtmlInput::hidden('type','gl_comptes'); -echo dossier::hidden(); -echo ''; - -$cn=new Database(dossier::id()); -$periode=new Periode($cn); -$a=$periode->get_limit($g_user->get_exercice()); -// $a is an array -$first_day=$a[0]->first_day(); -$last_day=$a[1]->last_day(); - -// filter on period -$date_from=new IDate('from_periode'); -$date_to=new IDate('to_periode'); -$year=$g_user->get_exercice(); -$date_from->value=(isset($_REQUEST['from_periode'])&& isDate($_REQUEST['from_periode'])!=0)?$_REQUEST['from_periode']:$first_day; -$date_to->value=(isset($_REQUEST['to_periode']) && isDate($_REQUEST['to_periode']) !=0 )?$_REQUEST['to_periode']:$last_day; -echo td(_('Depuis').$date_from->input()); -echo td(_('Jusque ').$date_to->input()); - -$letter=new ICheckbox('letter'); -$letter->selected=(isset($_REQUEST['letter']))?true:false; - -$from_poste=new IPoste('from_poste'); -$from_poste->value=HtmlInput::default_value('from_poste','',$_REQUEST); -$from_poste->set_attribute('account','from_poste'); - -$to_poste=new IPoste('to_poste'); -$to_poste->value=HtmlInput::default_value('to_poste','',$_REQUEST); -$to_poste->set_attribute('account','to_poste'); - -$solded=new ICheckbox('solded'); -$solded->selected=(isset($_REQUEST['solded']))?true:false; - -echo ''; -echo td(_('Depuis le poste')).td($from_poste->input()); -echo ''; - -echo ''; -echo td(_("Jusqu'au poste")).td($to_poste->input()); -echo ''; - -echo ''; -echo td(_('Uniquement les opérations non lettrées')); -echo td($letter->input()); -echo ''; - -echo ''; -echo td(_('Uniquement les comptes non soldés')); -echo td($solded->input()); -echo ''; - - -// -echo '
    '; -print HtmlInput::submit('bt_html',_('Visualisation')); - -echo '
    '; -echo '
    '; -echo '
    '; - -//----------------------------------------------------- -// If print is asked -// First time in html -// after in pdf or cvs -//----------------------------------------------------- -if ( isset( $_REQUEST['bt_html'] ) ) -{ - require_once NOALYSS_INCLUDE.'/class_acc_account_ledger.php'; - echo '
    '; - echo Acc_Account_Ledger::HtmlTableHeader("gl_comptes"); - echo '
    '; - $sql='select pcm_val from tmp_pcmn '; - $cond_poste=''; - - if ($from_poste->value != '') - { - $cond_poste = ' where '; - $cond_poste .=' pcm_val >= upper (\''.Database::escape_string($from_poste->value).'\')'; - } - - if ( $to_poste->value != '') - { - if ( $cond_poste == '') - { - $cond_poste = ' where pcm_val <= upper (\''.Database::escape_string($to_poste->value).'\')'; - } - else - { - $cond_poste.=' and pcm_val <= upper (\''.Database::escape_string($to_poste->value).'\')'; - } - } - - $sql=$sql.$cond_poste.' order by pcm_val::text'; - - $a_poste=$cn->get_array($sql); - - if ( sizeof($a_poste) == 0 ) - { - die("Nothing here. Strange."); - exit; - } - if ( isDate($_REQUEST['from_periode'])==null || isDate($_REQUEST['to_periode'])==null) - { - echo alert('Date malformée, désolée'); - return; - } - echo '
    '; - - - echo ''; - $l=(isset($_REQUEST['letter']))?2:0; - $s=(isset($_REQUEST['solded']))?1:0; - - - foreach ($a_poste as $poste_id ) - { - $Poste=new Acc_Account_Ledger ($cn, $poste_id['pcm_val']); - $Poste->load(); - - - $Poste->get_row_date( $_GET['from_periode'], $_GET['to_periode'],$l,$s); - if ( empty($Poste->row)) - { - continue; - } - - - echo ' - - '; - - echo ' - - - - - - - - - '; - - $solde = 0.0; - $solde_d = 0.0; - $solde_c = 0.0; - bcscale(2); - $i=0; - $current_exercice=""; - - foreach ($Poste->row as $detail) - { - /* - * separation per exercice - */ - if ( $current_exercice == "") $current_exercice=$detail['p_exercice']; - - if ( $current_exercice != $detail['p_exercice']) { - echo ' - - - - - - - - '. - ''; - /* - * reset total and current_exercice - */ - $current_exercice=$detail['p_exercice']; - $solde = 0.0; - $solde_d = 0.0; - $solde_c = 0.0; - - } - - - if ($detail['cred_montant'] > 0) - { - $solde=bcsub($solde, $detail['cred_montant']); - $solde_c=bcadd($solde_c,$detail['cred_montant']); - } - if ($detail['deb_montant'] > 0) - { - $solde = bcadd($solde,$detail['deb_montant']); - $solde_d = bcadd($solde_d,$detail['deb_montant']); - } - $side=" ".$Poste->get_amount_side($solde); - $letter=""; - $html_let=""; - if ($detail['letter']!=-1) { - $letter=strtoupper(base_convert($detail['letter'],10,36)); - $html_let = HtmlInput::show_reconcile("", $letter); - } - $i++; - if (($i % 2 ) == 0) $class="odd"; else $class="even"; - echo ' - - - - - - - - - '; - } - echo ' - - - - - - - - '. - ''; - } - echo '
    -

    '. $poste_id['pcm_val'].' '.h($Poste->label).'

    -
    DateRéférenceLibelléPièceDébitCréditSoldeLet.
    '.$current_exercice.''.''.''.'Total du compte '.$poste_id['pcm_val'].''.''.''.($solde_d > 0 ? nbm( $solde_d) : '').''.($solde_c > 0 ? nbm( $solde_c) : '').''.nbm( abs($solde_c-$solde_d)).''; - if ($solde_c > $solde_d ) echo _("Crédit"); - if ($solde_c < $solde_d ) echo _("Débit"); - if ($solde_c == $solde_d ) echo "="; - - echo '
    '.$detail['j_date_fmt'].''.HtmlInput::detail_op($detail['jr_id'],$detail['jr_internal']).''.$detail['description'].''.$detail['jr_pj_number'].''.($detail['deb_montant'] > 0 ? nbm($detail['deb_montant']) : '').''.($detail['cred_montant'] > 0 ? nbm($detail['cred_montant']) : '').''.nbm(abs($solde)).$side.''.$html_let.'
    '.$current_exercice.''.''.''.''.'Total du compte '.$poste_id['pcm_val'].''.''.''.''.''.($solde_d > 0 ? nbm( $solde_d) : '').''.''.''.($solde_c > 0 ? nbm( $solde_c) : '').''.''.''.nbm( abs($solde_c-$solde_d)).''.''; - if ($solde_c > $solde_d ) echo "Crédit"; - if ($solde_c < $solde_d ) echo "Débit"; - if ($solde_c == $solde_d ) echo "="; - - echo '
    '; - echo Acc_Account_Ledger::HtmlTableHeader("gl_comptes"); - echo "
    "; - exit; -} -?> diff --git a/sources/include/impress_jrn.inc.php b/sources/include/impress_jrn.inc.php deleted file mode 100644 index aefb0e5..0000000 --- a/sources/include/impress_jrn.inc.php +++ /dev/null @@ -1,407 +0,0 @@ -Admin() == 0 && $g_user->is_local_admin() == 0) -{ - $sql = "select jrn_def_id,jrn_def_name - from jrn_def join jrn_type on jrn_def_type=jrn_type_id - join user_sec_jrn on uj_jrn_id=jrn_def_id - where - uj_login='$g_user->login' - and uj_priv in ('R','W') - order by jrn_def_name - "; - $ret = $cn->make_array($sql); -} -else -{ - $ret = $cn->make_array("select jrn_def_id,jrn_def_name - from jrn_def join jrn_type on jrn_def_type=jrn_type_id - order by jrn_def_name - "); -} -// Count the forbidden journaux -$NoPriv = $cn->count_sql("select jrn_def_id,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, - jrn_deb_max_line,jrn_cred_max_line - from jrn_def join jrn_type on jrn_def_type=jrn_type_id - join user_sec_jrn on uj_jrn_id=jrn_def_id - where - uj_login='$g_user->id' - and uj_priv ='X' - "); -/* - * Show all the available ledgers - */ -$a = count($ret); -$all = array('value' => 0, 'label' => 'Tous les journaux disponibles'); -$ret[$a] = $all; -if (count($ret) < 1) - NoAccess(); -$exercice = (isset($_GET['exercice'])) ? $_GET['exercice'] : $g_user->get_exercice(); - -//----------------------------------------------------- -// Form -//----------------------------------------------------- -echo '
    '; -/* - * Let you change the exercice - */ -echo '
    '; -echo '
    ' . _('Exercice') . ''; -; -echo _('Choisissez un autre exercice').' :'; -$ex = new Exercice($cn); -$wex = $ex->select('exercice', $exercice, ' onchange="submit(this)"'); -echo $wex->input(); -echo dossier::hidden(); -echo HtmlInput::get_to_hidden(array('ac', 'type')); -echo '
    '; -echo '
    '; -?> -' . dossier::hidden(); -echo HtmlInput::get_to_hidden(array('ac', 'type')); -echo HtmlInput::hidden('type', 'jrn'); -echo HtmlInput::get_to_hidden(array('exercice')); -echo ''; -$w = new ISelect(); -$w->table = 1; -$label = "Choisissez le journal"; -$w->selected = (isset($_GET['jrn_id'])) ? $_GET['jrn_id'] : ''; -print td($label) . $w->input("jrn_id", $ret); -print ''; -print ''; -// filter on the current year -$filter_year = " where p_exercice='" . sql_string($exercice) . "'"; - -$periode_start = $cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); -$w->selected = (isset($_GET['from_periode'])) ? $_GET['from_periode'] : ''; -print td('Depuis') . $w->input('from_periode', $periode_start); -print ''; -print ''; - -$periode_end = $cn->make_array("select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); -$w->selected = (isset($_GET['to_periode'])) ? $_GET['to_periode'] : ''; -print td('Jusque ') . $w->input('to_periode', $periode_end); -print ""; -$a = array( - array('value' => 0, 'label' => 'Ecriture comptable'), - array('value' => 1, 'label' => 'Liste opérations'), - array('value' => 2, 'label' => 'Avec Détails opérations ') -); -$w->selected = 1; -print ''; -print ''; -$w->selected = (isset($_GET['p_simple'])) ? $_GET['p_simple'] : ''; -echo '' . $w->input('p_simple', $a); -print ""; -echo '
    Style d\'impression '.HtmlInput::infobulle(32).'
    '; -print HtmlInput::submit('bt_html', 'Visualisation'); - -echo ''; -echo '
    '; - - -//----------------------------------------------------- -// If print is asked -// First time in html -// after in pdf or cvs -//----------------------------------------------------- -if (isset($_REQUEST['bt_html'])) -{ - require_once NOALYSS_INCLUDE.'/class_acc_ledger.php'; - - $d = var_export($_GET, true); - $Jrn = new Acc_Ledger($cn, $_GET['jrn_id']); - $Jrn->get_name(); - switch ($_GET['p_simple']) - { - case "0": - $Row = $Jrn->get_row($_GET['from_periode'], $_GET['to_periode']); - break; - case "1": - $Row = $Jrn->get_rowSimple($_GET['from_periode'], $_GET['to_periode']); - break; - case "2": - $Row = $Jrn->get_rowSimple($_GET['from_periode'], $_GET['to_periode']); - break; - default: - var_dump($_GET['p_simple']); - die(__FILE__ . ":" . __LINE__ . " error unknown style "); - } - $rep = ""; - $hid = new IHidden(); - echo '
    '; - echo '

    ' . h($Jrn->name) . '

    '; - echo ""; - echo ''; - echo '"; - - echo '"; - - echo '"; - - echo ''; - echo ""; - - echo "
    ' . dossier::hidden() . - $hid->input("type", "jrn") . $hid->input('p_action', 'impress') . "
    ' . dossier::hidden() . - HtmlInput::submit('bt_pdf', "Export PDF") . - HtmlInput::hidden('act', 'PDF:ledger') . - $hid->input("type", "jrn") . - $hid->input("jrn_id", $Jrn->id) . - $hid->input("from_periode", $_GET['from_periode']) . - $hid->input("to_periode", $_GET['to_periode']); - echo $hid->input("p_simple", $_GET['p_simple']); - echo HtmlInput::get_to_hidden(array('ac', 'type')); - echo "
    ' . dossier::hidden() . - HtmlInput::submit('bt_csv', "Export CSV") . - HtmlInput::hidden('act', 'CSV:ledger') . - $hid->input("type", "jrn") . - $hid->input("jrn_id", $Jrn->id) . - $hid->input("from_periode", $_GET['from_periode']) . - $hid->input("to_periode", $_GET['to_periode']); - echo $hid->input("p_simple", $_GET['p_simple']); - echo HtmlInput::get_to_hidden(array('ac', 'type')); - echo "
    '; - echo HtmlInput::print_window(); - echo '
    "; - if (count($Jrn->row) == 0 - && $Row == null) - exit; - - - ///////////////////////////////////////////////////////////////////////////////////// - // Ecriture comptable - ///////////////////////////////////////////////////////////////////////////////////// - if ($_GET['p_simple'] == 0) - { - echo ''; - // detailled printing - //--- - foreach ($Jrn->row as $op) - { - $class = ""; - if ($op['j_date'] != '') - { - $class = "odd"; - } - - echo ""; - - echo ""; - echo ""; - - - if ($op['internal'] != '') - echo ""; - else - echo td(); - - echo "" . - "" . - "" . - "" . - ""; - }// end loop - echo "
    " . $op['j_date'] . "" . $op['jr_pj_number'] . "" . HtmlInput::detail_op($op['jr_id'], $op['internal']) . "" . $op['poste'] . "" . $op['description'] . "" . nbm($op['deb_montant']) . "" . nbm($op['cred_montant']) . "
    "; - // show the saldo - - $solde = $Jrn->get_solde($_GET['from_periode'], $_GET['to_periode']); - echo "solde débiteur:" . $solde[0] . "
    "; - echo "solde créditeur:" . $solde[1]; - } // if - ///////////////////////////////////////////////////////////////////////////////////// - // Liste opérations - ///////////////////////////////////////////////////////////////////////////////////// - elseif ($_GET['p_simple'] == 1) - { - if ( $Jrn->get_type() != 'ACH' && $Jrn->get_type() != 'VEN') - { - // Simple printing - //--- - echo ''; - echo "" . - "" . - "" . - "" . - th('Tiers') . - "" . - "" . - ""; - // set a filter for the FIN - $i = 0;$tot_amount=0; - bcscale(2); - foreach ($Row as $line) - { - $i++; - $class = ($i % 2 == 0) ? ' class="even" ' : ' class="odd" '; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - $tiers = $Jrn->get_tiers($line['jrn_def_type'], $line['jr_id']); - echo td($tiers); - echo ""; - - - // echo ""; - // If the ledger is financial : - // the credit must be negative and written in red - // Get the jrn type - if ($line['jrn_def_type'] == 'FIN') - { - $positive = $cn->get_value("select qf_amount from quant_fin where jr_id=$1", array($line['jr_id'])); - if ($cn->count() == 0) - $positive = 1; - else - $positive = ($positive > 0) ? 1 : 0; - - echo ""; - if ( $positive == 1 ) { - $tot_amount=bcadd($tot_amount,$line['montant']); - } else { - $tot_amount=bcsub($tot_amount,$line['montant']); - } - } - else - { - echo ""; - $tot_amount=bcadd($tot_amount,$line['montant']); - } - - echo ""; - } - echo ''; - echo ''; - echo td().td().td().td().td(); - echo ''; - echo ''; - echo "
    operation " . - "Date n° de pièce internalCommentaireTotal opération
    " . $line['num'] . "" . $line['date'] . "" . h($line['jr_pj_number']) . "" . HtmlInput::detail_op($line['jr_id'], $line['jr_internal']) . "" . h($line['comment']) . "".$line['pj'].""; - echo ( $positive == 0 ) ? " - " . nbm($line['montant']) . "" : nbm($line['montant']); - echo "" . nbm($line['montant']) . "
    '._('Totaux').''.nbm($tot_amount).'
    "; - } else { - /* - * Ledger ACH or VEN - */ - $own=new Own($cn); - require_once NOALYSS_INCLUDE.'/template/print_ledger_simple.php'; - - } - } - ///////////////////////////////////////////////////////////////////////////////////// - // Détaillé - ///////////////////////////////////////////////////////////////////////////////////// - elseif ($_GET['p_simple'] == 2) - { - foreach ($Row as $line) - { - echo '
    '; - $class = ' class="odd" style="font-stretch: expanded;font-size:1em;"'; - echo ''; - echo ""; - echo '"; - echo '"; - echo '"; - $tiers = $Jrn->get_tiers($line['jrn_def_type'], $line['jr_id']); - $ledger_name = $cn->get_value("select jrn_def_name from jrn_def where jrn_def_id=$1", array($line['jr_def_id'])); - echo ''; - echo ''; - echo '"; - echo '"; - echo ""; - echo '
    ' . $line['date'] . "' . h($line['jr_pj_number']) . "' . HtmlInput::detail_op($line['jr_id'], $line['jr_internal']) . "' . h($ledger_name) . ' ' . h($tiers) . ' ' . h($line['comment']) . "'; - if ($line['jrn_def_type'] == 'FIN') - { - $positive = $cn->get_value("select qf_amount from quant_fin where jr_id=$1", array($line['jr_id'])); - if ($cn->count() == 0) - $positive = 1; - else - $positive = ($positive > 0) ? 1 : 0; - - echo ( $positive == 0 ) ? " - " . nbm($line['montant']) . "" : nbm($line['montant']); - } - else - { - if ( isset ($line['TVAC'])) { - echo ( nbm($line['TVAC']) < 0 ) ? " - " . nbm($line['TVAC']) . "" : nbm($line['TVAC']); - } else - { - echo nbm($line['montant']) ; - } - } - echo "
    '; - ////////////////////////////////////////////////////////////////////////////////////////////////////// - // Add detail for each operation - ////////////////////////////////////////////////////////////////////////////////////////////////////// - $op = new Acc_Operation($cn); - $op->jr_id = $line['jr_id']; - $op->get(); - $obj = $op->get_quant(); - switch ($obj->signature) - { - case 'FIN': - require 'template/operation_detail_fin.php'; - break; - case 'ACH': - require 'template/operation_detail_ach.php'; - break; - case 'VEN': - require 'template/operation_detail_ven.php'; - break; - case 'ODS': - require 'template/operation_detail_misc.php'; - break; - default: - die("unknown type of ledger"); - break; - } - echo '
    '; - //echo '
    '; - } // end loop - } - - echo "
    "; - exit; -} - -echo '
    '; -?> diff --git a/sources/include/impress_poste.inc.php b/sources/include/impress_poste.inc.php deleted file mode 100644 index 9301503..0000000 --- a/sources/include/impress_poste.inc.php +++ /dev/null @@ -1,306 +0,0 @@ -'; - -echo '
    '; -echo HtmlInput::hidden('ac',$_REQUEST['ac']); -echo HtmlInput::hidden('type','poste'); -echo dossier::hidden(); -echo ''; -$span=new ISpan(); - -$w=new IPoste('poste_id'); -$w->set_attribute('ipopup','ipop_account'); -$w->set_attribute('label','poste_id_label'); -$w->set_attribute('account','poste_id'); -$w->table=0; -$w->value=(isset($_REQUEST['poste_id']))?$_REQUEST['poste_id']:""; -$w->label="Choisissez le poste"; -print td('Choisissez un poste ').td($w->input()); -echo td($span->input('poste_id_label')); -echo ''; - -$w_poste=new ICard('f_id'); -$w_poste->table=0; -$w_poste->jrn=0; -echo td("Ou Choisissez la fiche"); -$w_poste->set_attribute('label','f_id_label'); -$w_poste->set_attribute('ipopup','ipop_card'); -$w_poste->set_attribute('gDossier',dossier::id()); -$w_poste->set_attribute('typecard','all'); -$w_poste->set_function('fill_data'); -$w_poste->set_dblclick("fill_ipopcard(this);"); - - -$w_poste->value=(isset($_REQUEST['f_id']))?$_REQUEST['f_id']:""; -print td($w_poste->input().$w_poste->search()); -echo td($span->input('f_id_label')); -print ''; -print ''; - -$date_from=new IDate('from_periode'); -$date_to=new IDate('to_periode'); -$year=$g_user->get_exercice(); -$date_from->value=(isset($_REQUEST['from_periode']))?$_REQUEST['from_periode']:"01.01.".$year; -$date_to->value=(isset($_REQUEST['to_periode']))?$_REQUEST['to_periode']:"31.12.".$year; -echo td(_('Depuis').$date_from->input()); -echo td(_('Jusque ').$date_to->input()); -// -print "'; -$a_let=array( - array('value'=>0,'label'=>'Toutes les opérations'), - array('value'=>1,'label'=>' Opérations lettrées'), - array('value'=>2,'label'=>' Opérations non lettrées') - ); -echo '
    "; -$all=new ICheckBox(); -$all->label="Tous les postes qui en dépendent"; -$all->disabled=false; -$all->selected=(isset($_REQUEST['poste_fille']))?true:false; -echo $all->input("poste_fille"); -echo '
    '; -$detail=new ICheckBox(); -$detail->label="Détail des opérations"; -$detail->disabled=false; -$detail->selected=(isset($_REQUEST['oper_detail']))?true:false; -echo $detail->input("oper_detail"); -echo '
    '; -$salet=new ISelect('ople'); -$salet->value=$a_let; -$salet->selected=(isset ($_GET['ople']))?$_GET['ople']:0; - -echo $salet->input(); - -print HtmlInput::submit('bt_html','Visualisation'); - -echo '
    '; -echo '
    '; -echo '
    '; - -//----------------------------------------------------- -// If print is asked -// First time in html -// after in pdf or cvs -//----------------------------------------------------- -if ( isset( $_REQUEST['bt_html'] ) ) -{ - if ( isDate($_REQUEST['from_periode'])==null || isDate($_REQUEST['to_periode'])==null) - { - echo alert(_('Date malformée, désolée')); - return; - } - require_once NOALYSS_INCLUDE.'/class_acc_account_ledger.php'; - $go=0; -// we ask a poste_id - if ( isset($_GET['poste_id']) && strlen(trim($_GET['poste_id'])) != 0 ) - { - if ( isset ($_GET['poste_fille']) ) - { - $parent=$_GET['poste_id']; - $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text like '$parent%' order by pcm_val::text"); - $go=3; - } - // Check if the post is numeric and exists - elseif ( $cn->count_sql('select * from tmp_pcmn where pcm_val=$1',array($_GET['poste_id'])) != 0 ) - { - $Poste=new Acc_Account_Ledger($cn,$_GET['poste_id']); - $go=1; - } - } - if ( strlen(trim($_GET['f_id'])) != 0 ) - { - require_once NOALYSS_INCLUDE.'/class_fiche.php'; - // thanks the qcode we found the poste account - $fiche=new Fiche($cn); - $qcode=$fiche->get_by_qcode($_GET['f_id']); - $p=$fiche->strAttribut(ATTR_DEF_ACCOUNT); - if ( $p != NOTFOUND) - { - $go=2; - } - } - - // A account is given - if ( $go == 1) - { - echo '
    '; - if ( ! isset($_REQUEST['oper_detail']) ) - { - Acc_Account_Ledger::HtmlTableHeader(); - echo '
    '; - $Poste->HtmlTable(null,$_GET['ople']); - echo '
    '; - echo Acc_Account_Ledger::HtmlTableHeader(); - } - else - { - //---------------------------------------------------------------------- - // Detail - //---------------------------------------------------------------------- - Acc_Account_Ledger::HtmlTableHeader(); - - $Poste->get_row_date( $_GET['from_periode'], $_GET['to_periode'],$_GET['ople']); - if ( empty($Poste->row)) return; - $Poste->load(); - - echo ''; - echo ''; - /* avoid duplicates */ - $old=array(); - foreach ($Poste->row as $detail) - { - if ( in_array($detail['jr_id'],$old) == TRUE ) continue; - $old[]=$detail['jr_id']; - echo ''; - - $op=new Acc_Operation($cn); - $op->jr_id=$detail['jr_id']; - $op->poste=$_GET['poste_id']; - echo $op->display_jrnx_detail(1); - } - echo '

    '. $_GET['poste_id'].' '.h($Poste->label).'

    '.$detail['j_date'].' '.$detail['jr_internal'].h($detail['description']).'
    '; - - echo Acc_Account_Ledger::HtmlTableHeader(); - } - echo "
    "; - exit; - } - - // A QuickCode is given - if ( $go == 2) - { - if ( ! isset($_REQUEST['oper_detail']) ) - { - echo '
    '; - echo '

    ' . - '(' . $fiche->id . ')' . - $fiche->getName() . ' ' . - ' [ ' . $fiche->get_quick_code() . ' ] ' . - '

    '; - $fiche->HtmlTableHeader(); - $fiche->HtmlTable(null, $_GET['ople']); - $fiche->HtmlTableHeader(); - echo "
    "; - } - else - { - // Detail // - echo '
    '; - echo '

    ' . - '(' . $fiche->id . ')' . - $fiche->getName() . ' ' . - ' [ ' . $fiche->get_quick_code() . ' ] ' . - '

    '; - - $fiche->HtmlTableHeader(); - $fiche->HtmlTableDetail(); - $fiche->HtmlTableHeader(); - echo "

    "; - } - exit; - } - - // All the children account - if ( $go == 3 ) - { - - if ( sizeof($a_poste) == 0 ) - exit; - echo '
    '; - - - if ( ! isset ($_REQUEST['oper_detail'])) - { - $Poste=new Acc_Account_Ledger($cn,$_GET['poste_id']); - echo Acc_Account_Ledger::HtmlTableHeader(); - - foreach ($a_poste as $poste_id ) - { - $Poste=new Acc_Account_Ledger ($cn,$poste_id['pcm_val']); - $Poste->HtmlTable(null,$_GET['ople']); - } - echo Acc_Account_Ledger::HtmlTableHeader(); - echo "
    "; - } - else - { - //---------------------------------------------------------------------- - // Detail - //---------------------------------------------------------------------- - echo Acc_Account_Ledger::HtmlTableHeader(); - echo ''; - foreach ($a_poste as $poste_id ) - { - $Poste=new Acc_Account_Ledger ($cn,$poste_id['pcm_val']); - $Poste->load(); - $Poste->get_row_date( $_GET['from_periode'], $_GET['to_periode'],$_GET['ople']); - if ( empty($Poste->row)) continue; - echo ''; - - $detail=$Poste->row[0]; - - $old=array(); - - foreach ($Poste->row as $detail) - { - /* avoid duplicates */ - if ( in_array($detail['jr_id'],$old) == TRUE ) continue; - $old[]=$detail['jr_id']; - echo tr(td("Journal :".$detail['jrn_def_name'],''),'style="width:auto" colspan="6"'); - echo ''; - - $op=new Acc_Operation($cn); - $op->poste=$poste_id['pcm_val']; - - $op->jr_id=$detail['jr_id']; - echo $op->display_jrnx_detail(1); - } - } - echo '

    '. $poste_id['pcm_val'].' '.h($Poste->label).'

    '. $detail['j_date'].' '.$detail['jr_internal'].' '.hb($detail['description']).' '.hi($detail['jr_pj_number']).'
    '; - echo Acc_Account_Ledger::HtmlTableHeader(); - } - - exit; - } -} -?> diff --git a/sources/include/impress_rapport.inc.php b/sources/include/impress_rapport.inc.php deleted file mode 100644 index d7dae64..0000000 --- a/sources/include/impress_rapport.inc.php +++ /dev/null @@ -1,293 +0,0 @@ -get_name(); - // step asked ? - //-- - $type_periode=HtmlInput::default_value_get("type_periode", -1); - if ( $type_periode == 1 ) - $array=$Form->get_row( $_GET['from_date'],$_GET['to_date'], $type_periode); - - if ($type_periode == 0 && $_GET['p_step'] == 0) - $array=$Form->get_row( $_GET['from_periode'],$_GET['to_periode'], $type_periode); - - - if ($type_periode == 0 && $_GET['p_step'] == 1 ) - { - // step are asked - //-- - for ($e=$_GET['from_periode'];$e<=$_GET['to_periode'];$e+=$_GET['p_step']) - { - - $periode=getPeriodeName($cn,$e); - if ( $periode == null ) continue; - $array[]=$Form->get_row($e,$e,$_GET['type_periode']); - $periode_name[]=$periode; - } - } - - - - $rep=""; - - $hid=new IHidden(); - echo '
    '; - if ( $_GET['type_periode'] == 0) - { - $t=($_GET['from_periode']==$_GET['to_periode'])?"":" -> ".getPeriodeName($cn,$_GET['to_periode'],'p_end'); - echo '

    '.$Form->id." ".$Form->name. - " - ".getPeriodeName($cn,$_GET['from_periode'],'p_start'). - " ".$t. - '

    '; - } - else - { - echo '

    '.$Form->id." ".$Form->name. - ' Date :'. - $_GET['from_date']. - " au ". - $_GET['to_date']. - '

    '; - } - echo ''; - echo ''; - echo '"; - - echo '"; - echo '"; - - echo ""; - - echo "
    '. - dossier::hidden(). - HtmlInput::submit('bt_other',"Autre Rapport"). - $hid->input("type","rapport").$hid->input("ac",$_GET['ac'])."
    '. - HtmlInput::submit('bt_pdf',"Export PDF"). - HtmlInput::hidden('act','PDF:report'). - dossier::hidden(). - $hid->input("type","rapport"). - $hid->input("ac",$_GET['ac']). - $hid->input("form_id",$Form->id); - if ( isset($_GET['from_periode'])) echo $hid->input("from_periode",$_GET['from_periode']); - if ( isset($_GET['to_periode'])) echo $hid->input("to_periode",$_GET['to_periode']); - if (isset($_GET['p_step'])) echo $hid->input("p_step",$_GET['p_step']); - if ( isset($_GET['from_date'])) echo $hid->input("from_date",$_GET['from_date']); - if ( isset($_GET['to_date'])) echo $hid->input("to_date",$_GET['to_date']); - echo $hid->input("type_periode",$_GET['type_periode']); - - - - - echo "
    '. - HtmlInput::hidden('act','CSV:report'). - HtmlInput::submit('bt_csv',"Export CSV"). - dossier::hidden(). - $hid->input("type","form"). - $hid->input("ac",$_GET['ac']). - $hid->input("form_id",$Form->id); - if ( isset($_GET['from_periode'])) echo $hid->input("from_periode",$_GET['from_periode']); - if ( isset($_GET['to_periode'])) echo $hid->input("to_periode",$_GET['to_periode']); - if (isset($_GET['p_step'])) echo $hid->input("p_step",$_GET['p_step']); - if ( isset($_GET['from_date'])) echo $hid->input("from_date",$_GET['from_date']); - if ( isset($_GET['to_date'])) echo $hid->input("to_date",$_GET['to_date']); - echo $hid->input("type_periode",$_GET['type_periode']); - - - echo "
    "; - if ( count($Form->row ) == 0 ) - exit; - if ( $_GET['type_periode']== 0 ) - { - if ( $_GET['p_step'] == 0) - { // check the step - // show tables - ShowReportResult($Form->row); - } - else - { - $a=0; - foreach ( $array as $e) - { - echo '

    Periode : '.$periode_name[$a]."

    "; - $a++; - ShowReportResult($e); - } - } - } - else - { - ShowReportResult($Form->row); - } - echo "
    "; - exit; -} - -//----------------------------------------------------- -// Show the jrn and date -//----------------------------------------------------- -require_once NOALYSS_INCLUDE.'/class_database.php'; -$ret=$cn->make_array("select fr_id,fr_label - from formdef - order by fr_label"); -if ( sizeof($ret) == 0 ) -{ - echo "Aucun Rapport"; - return; -} -//----------------------------------------------------- -// Form -//----------------------------------------------------- -echo '
    '; -$exercice=(isset($_GET['exercice']))?$_GET['exercice']:$g_user->get_exercice(); - -/* - * Let you change the exercice - */ -echo '
    '._('Exercice').'';; -echo '
    '; -echo 'Choisissez un autre exercice :'; -$ex=new Exercice($cn); -$wex=$ex->select('exercice',$exercice,' onchange="submit(this)"'); -echo $wex->input(); -echo dossier::hidden(); -echo HtmlInput::get_to_hidden(array('ac','type')); -echo '
    '; -echo '
    '; - - -echo '
    '; -$hidden=new IHidden(); -echo $hidden->input("ac",$_GET['ac']); -echo $hidden->input("type","rapport"); -echo dossier::hidden(); - -echo ''; -$w=new ISelect(); -$w->table=1; -print td(_("Choisissez le rapport")); -print $w->input("form_id",$ret); -print ''; -//-- calendrier ou periode comptable -$aCal=array( - array('value'=>0,'label'=>_('Période comptable')), - array('value'=>1,'label'=>_('Calendrier')) - ); - -$w->javascript=' onchange=enable_type_periode();'; -$w->id='type_periode'; -echo ''; -print td('Type de date : '); -echo $w->input('type_periode',$aCal); -echo ''; -$w->javascript=''; -print ''; -// filter on the current year -$filter_year=" where p_exercice='".sql_string($exercice)."'"; -$periode_start_select=new ISelect(); -$periode_start_select->table=1; -$periode_end_select=new ISelect(); -$periode_end_select->table=1; -$periode_start=$cn->make_array("select p_id,to_char(p_start,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); -print td("Période comptable : Depuis"); -echo $periode_start_select->input('from_periode',$periode_start); -print td(" jusqu'à "); -$periode_end=$cn->make_array("select p_id,to_char(p_end,'DD-MM-YYYY') from parm_periode $filter_year order by p_start,p_end"); -print $periode_end_select->input('to_periode',$periode_end); -print ""; -echo ''; -//--- by date -$date_from=new IDate('from_date'); -$date_from->id='from_date'; -$date_to=new IDate('to_date'); -$date_to->id='to_date'; - -echo td(_("Calendrier depuis :")); -echo td($date_from->input('from_date')); -echo td(_("jusque")); -echo td($date_to->input('to_date')); -echo ''; - -$aStep=array( - array('value'=>0,'label'=>_('Pas d\'étape')), - array('value'=>1,'label'=>_('1 mois')) - ); -echo ''; -echo td(_('Par étape de')); -$w->id='p_step'; -echo $w->input('p_step',$aStep); -echo ''; - -echo '
    '; -echo ' '._('Attention : vous ne pouvez pas utiliser les étapes avec les dates calendriers.').''; -echo '
    '; -echo ''._('Les clauses FROM sont ignorés avec les dates calendriers').''; -echo '
    '; -print HtmlInput::submit('bt_html',_('Visualisation')); - -echo '
    '; -echo ''; -echo '
    '; -echo '
    '; -//----------------------------------------------------- -// Function -//----------------------------------------------------- -function ShowReportResult($p_array) -{ - - echo ''; - echo "". - "". - "". - ""; - $i=0; - foreach ( $p_array as $op ) - { - $i++; - $class= ( $i % 2 == 0 )?' class="odd"':' class="even"'; - - echo "". - "". - "". - ""; - } - echo "
    Description montant
    ".h($op['desc'])."".nbm($op['montant'])."
    "; - -} - -?> diff --git a/sources/include/impress_rec.inc.php b/sources/include/impress_rec.inc.php deleted file mode 100644 index 608f09d..0000000 --- a/sources/include/impress_rec.inc.php +++ /dev/null @@ -1,103 +0,0 @@ -get_ledger('ALL',3); -echo '
    '; -echo '
    '; -$rjrn=''; -$radio=new IRadio('choice'); -$choice=(isset($_GET['choice']))?$_GET['choice']:0; -$r_jrn=(isset($_GET['r_jrn']))?$_GET['r_jrn']:''; -echo '
    '; -echo dossier::hidden().HtmlInput::hidden('ac',$_GET['ac']).HtmlInput::hidden('type','rec'); -echo _('Filtre par journal'); -HtmlInput::button_choice_ledger(array('div'=>'','type'=>'ALL','all_type'=>1)); -echo '
    '; -/* - * Limit by date, default current exercice - */ -list($start,$end)=$g_user->get_limit_current_exercice(); -$dstart=new IDate('p_start'); -$dstart->value=(isset($_REQUEST['p_start']))?$_REQUEST['p_start']:$start; - -$dend=new IDate('p_end'); -$dend->value=(isset($_REQUEST['p_end']))?$_REQUEST['p_end']:$end; - -echo "Opérations entre ".$dstart->input()." jusque ".$dend->input(); -echo '
      '; - -$radio->selected=($choice==0)?true:false; -$radio->value=0; -echo '
    1. '.$radio->input()._('Opérations rapprochées').'
    2. '; - -$radio->selected=($choice==1)?true:false; -$radio->value=1; -echo '
    3. '.$radio->input()._('Opérations rapprochées avec des montants différents').'
    4. '; - -$radio->selected=($choice==2)?true:false; -$radio->value=2; -echo '
    5. '.$radio->input()._('Opérations rapprochées avec des montants identiques').'
    6. '; - -$radio->selected=($choice==3)?true:false; -$radio->value=3; -echo '
    7. '.$radio->input()._('Opérations non rapprochées').'
    8. '; - -echo '
    '; - - - - -echo HtmlInput::submit('vis',_('Visualisation')); -echo '
    '; -echo '
    '; -echo '
    '; -echo '
    '; -echo '
    '; -if ( ! isset($_GET['vis'])) return; -$acc_reconciliation=new Acc_Reconciliation($cn); -$acc_reconciliation->a_jrn=$r_jrn; -$acc_reconciliation->start_day=$dstart->value; -$acc_reconciliation->end_day=$dend->value; - -$array=$acc_reconciliation->get_data($choice); - -$gDossier=Dossier::id(); -?> -
    - -
    -'; -echo ''; -if (! isset($_REQUEST['seek'])) exit; -echo '
    '; -//-------------------------------------------------------------------------------- -// record the data -//-------------------------------------------------------------------------------- -if ( isset($_POST['record'])) -{ - $letter=new Lettering_Account($cn); - $letter->save($_POST); -} -//-------------------------------------------------------------------------------- -// Show the result -//-------------------------------------------------------------------------------- -echo '
    '; -if ( isDate($_GET['start']) == null || isDate($_GET['end']) == null ) -{ - echo alert(_('Date malformée, désolé')); - return; -} -$letter=new Lettering_Account($cn); -$letter->set_parameter('account',$_GET['acc']); -$letter->set_parameter('start',$_GET['start']); -$letter->set_parameter('end',$_GET['end']); - -if ( $sel->selected == 0 ) - echo $letter->show_list('all'); -if ( $sel->selected == 1 ) - echo $letter->show_list('letter'); -if ( $sel->selected == 2 ) - echo $letter->show_list('unletter'); -if ( $sel->selected == 3 ) - echo $letter->show_list('letter_diff'); -echo '
    '; -echo ''; diff --git a/sources/include/lettering.card.inc.php b/sources/include/lettering.card.inc.php deleted file mode 100644 index 53adde7..0000000 --- a/sources/include/lettering.card.inc.php +++ /dev/null @@ -1,139 +0,0 @@ -'; -echo ''; -if (! isset($_REQUEST['seek'])) exit; -echo '
    '; -//-------------------------------------------------------------------------------- -// record the data -//-------------------------------------------------------------------------------- -if ( isset($_POST['record'])) -{ - $letter=new Lettering_Account($cn); - $letter->save($_POST); -} -//-------------------------------------------------------------------------------- -// Show the result -//-------------------------------------------------------------------------------- -echo '
    '; - - -$letter=new Lettering_Card($cn); -$quick_code=strtoupper(trim($_GET['acc'])); -$letter->set_parameter('quick_code',$quick_code); -$letter->set_parameter('start',$_GET['start']); -$letter->set_parameter('end',$_GET['end']); - -if ( $sel->selected == 0 ) - echo $letter->show_list('all'); -if ( $sel->selected == 1 ) - echo $letter->show_list('letter'); -if ( $sel->selected == 2 ) - echo $letter->show_list('unletter'); -if ( $sel->selected == 3 ) - echo $letter->show_list('letter_diff'); -echo '
    '; -echo ''; diff --git a/sources/include/lettering.gestion.inc.php b/sources/include/lettering.gestion.inc.php deleted file mode 100644 index 3e19306..0000000 --- a/sources/include/lettering.gestion.inc.php +++ /dev/null @@ -1,98 +0,0 @@ -'; - -echo ''; -//if (! isset($_REQUEST['seek'])) exit; -echo '
    '; -//-------------------------------------------------------------------------------- -// record the data -//-------------------------------------------------------------------------------- -if ( isset($_POST['record'])) -{ - $letter=new Lettering_Account($cn); - $letter->save($_POST); -} -//-------------------------------------------------------------------------------- -// Show the result -//-------------------------------------------------------------------------------- -if ( isset($_GET['start']) && isset($_GET['end'])) - { - if ( isDate($_GET['start']) == null || isDate($_GET['end']) == null ) - { - echo alert(_('Date malformée, désolé')); - return; - } - } -echo '
    '; -$fiche=new Fiche($cn,$_REQUEST['f_id']); -$quick_code=$fiche->get_quick_code(); -$letter=new Lettering_Card($cn); -$letter->set_parameter('quick_code',$quick_code); -$letter->set_parameter('start',$start->value); -$letter->set_parameter('end',$end->value); - -if ( $sel->selected == 0 ) - echo $letter->show_list('all'); -if ( $sel->selected == 1 ) - echo $letter->show_list('letter'); -if ( $sel->selected == 2 ) - echo $letter->show_list('unletter'); - -echo '
    '; -echo ''; -echo '
    '; -?> diff --git a/sources/include/manager.inc.php b/sources/include/manager.inc.php deleted file mode 100644 index f3ca9fd..0000000 --- a/sources/include/manager.inc.php +++ /dev/null @@ -1,162 +0,0 @@ -check_action(FICADD) == 0) - { - alert(_('Vous ne pouvez pas enlever de fiche')); - return; - } - - $f_id = $_REQUEST['f_id']; - - $fiche = new Manager($cn, $f_id); - $fiche->remove(); - $low_action = "list"; - } -} - -//----------------------------------------------------- -// list of Manager / employeed -//----------------------------------------------------- -if ($low_action == "list") -{ - ?> -
    -
    -
    - ' . "Exercice " . $g_user->get_exercice() . ''; - echo dossier::hidden(); - $a = (isset($_GET['query'])) ? $_GET['query'] : ""; - printf(_('Recherche') . ' ', $a); - echo HtmlInput::request_to_hidden(array('ac')); - $choice_cat=HtmlInput::default_value_request("choice_cat", 1); - if ( $choice_cat == 1 ) - { - $sel_card = new ISelect('cat'); - $sel_card->value = $cn->make_array('select fd_id, fd_label from fiche_def ' . - ' where frd_id=' . FICHE_TYPE_EMPL . - ' order by fd_label ', 1); - $sel_card->selected = (isset($_GET['cat'])) ? $_GET['cat'] : -1; - $sel_card->javascript = ' onchange="submit(this);"'; - echo _('Catégorie :') . $sel_card->input(); - } - else - { - $cat=HtmlInput::default_value_request('cat', ''); - echo HtmlInput::hidden("cat",$cat); - echo HtmlInput::hidden('choice_cat', 0); - } - $nooperation = new ICheckBox('noop'); - $nooperation->selected = (isset($_GET['noop'])) ? true : false; - echo _('Inclure les employés sans opération :') . $nooperation->input(); - ?> - - -
    -
    - '; - echo $supplier->Summary($search, 'manager', $sql, $noop); - - - echo '
    '; - echo '
    '; - echo '
    '; - if ($g_user->check_action(FICADD) == 1) - { - /* Add button */ - $f_add_button = new IButton('add_card'); - $f_add_button->label = _('Créer une nouvelle fiche'); - $f_add_button->set_attribute('win_refresh', 'yes'); - - $f_add_button->set_attribute('type_cat', FICHE_TYPE_EMPL); - $f_add_button->javascript = " select_card_type(this);"; - echo $f_add_button->input(); - - $f_cat_button = new IButton('add_cat'); - $f_cat_button->set_attribute('type_cat', FICHE_TYPE_EMPL); - $f_cat_button->set_attribute('ipopup', 'ipop_cat'); - $f_cat_button->label = _('Ajout d\'une catégorie'); - $f_cat_button->javascript = 'add_category(this)'; - echo $f_cat_button->input(); - } - - echo '
    '; - echo '
    '; -} -/* ---------------------------------------------------------------------- - * Detail for a card, Suivi, Contact, Operation,... * - * cc stands for supplier card - * ---------------------------------------------------------------------- */ -if ($low_action == 'detail') -{ - /* Menu */ - require_once NOALYSS_INCLUDE.'/category_card.inc.php'; - return; -} - - - -html_page_stop(); -?> diff --git a/sources/include/menu.inc.php b/sources/include/menu.inc.php deleted file mode 100644 index 9adba89..0000000 --- a/sources/include/menu.inc.php +++ /dev/null @@ -1,192 +0,0 @@ -'; -/** - * if post save then we save a new one - */ -if ( isset($_POST['save_plugin'])) -{ - extract($_POST); - $plugin=new Extension($cn); - $plugin->me_code=$me_code; - $plugin->me_menu=$me_menu; - $plugin->me_file=$me_file; - $plugin->me_description=$me_description; - $plugin->me_parameter='plugin_code='.$me_code; - $plugin->insert_plugin(); -} -/** - * if post update then we update - */ -if (isset($_POST['mod_plugin'])) -{ - extract ($_POST); - $plugin=new Extension($cn); - $plugin->me_code=strtoupper($me_code); - $plugin->me_menu=$me_menu; - $plugin->me_file=$me_file; - $plugin->me_description=$me_description; - $plugin->me_parameter='plugin_code='.strtoupper($me_code); - if ( !isset ($delete_pl)) - { - $plugin->update_plugin(); - } - else - { - $plugin->remove_plugin(); - } -} -/** - * if post save then we save a new one - */ -if ( isset($_POST['create_menu'])|| isset($_POST['modify_menu'])) -{ - extract($_POST); - $menu_ref=new Menu_Ref($cn); - $menu_ref->me_code=strtoupper($me_code); - $menu_ref->me_menu=$me_menu; - $menu_ref->me_file=$me_file; - $menu_ref->me_description=$me_description; - $menu_ref->me_parameter=$me_parameter; - $menu_ref->me_url=$me_url; - $menu_ref->me_javascript=$me_javascript; - $menu_ref->me_type='ME'; - $check=$menu_ref->verify(); - if ($check == 0) - { - if (isset($_POST['create_menu'])) - { - $menu_ref->insert(); - } - elseif (isset($_POST['modify_menu'])) - { - if ($menu_ref->verify() == 0) - $menu_ref->update(); - } - } -} -////////////////////////////////////////////////////////////////////////////// -// Show the list of menu -////////////////////////////////////////////////////////////////////////////// -global $cn; - -$table=new Sort_Table(); -$url=$_SERVER['REQUEST_URI']; - -$table->add(_('Code'),$url,"order by me_code asc","order by me_code desc","codea","coded"); -$table->add(_('Menu'),$url,"order by me_menu asc","order by me_menu desc","menua","menud"); -$table->add(_('Description'),$url,"order by me_description asc","order by me_description desc","desa","desd"); -$table->add(_('Type'),$url,"order by me_type asc","order by me_type desc","ta","td"); -$table->add(_('Fichier'),$url,"order by me_file asc","order by me_file desc","fa","fd"); -$table->add(_('URL'),$url,"order by me_url asc","order by me_url desc","urla","urld"); -$table->add(_('Paramètre'),$url,"order by me_parametere asc","order by me_parameter desc","paa","pad"); -$table->add(_('Javascript'),$url,"order by me_javascript asc","order by me_javascript desc","jsa","jsd"); - -$ord=(isset($_REQUEST['ord']))?$_REQUEST['ord']:'codea'; - -$order=$table->get_sql_order($ord); - - - -$iselect=new ISelect('p_type'); -$iselect->value=array( - array("value"=>'',"label"=>_("Tout")), - array("value"=>'ME',"label"=>_("Menu")), - array("value"=>'PR',"label"=>_("Impression")), - array("value"=>'PL',"label"=>_("Extension / Plugin")), - array("value"=>'SP',"label"=>_("Valeurs spéciales")) - ); -$iselect->selected=(isset($_REQUEST['p_type']))?$_REQUEST['p_type']:''; -$sql=""; -if ( $iselect->selected != '') -{ - $sql="where me_type='".sql_string($_REQUEST['p_type'])."' "; -} -$menu=new Menu_Ref_sql($cn); -$ret=$menu->seek($sql.$order); -?> -
    -
    - input()?> - - -
    - -
    -'; -echo ''; -echo ''.$table->get_header(0).''; -echo ''.$table->get_header(1).''; -echo ''.$table->get_header(2).''; -echo ''.$table->get_header(3).HtmlInput::infobulle(33).''; -echo ''.$table->get_header(4).''; -echo ''.$table->get_header(5).''; -echo ''.$table->get_header(6).''; -echo ''.$table->get_header(7).''; -echo ''; - -for ($i = 0; $i < Database::num_row($ret); $i++) -{ - $row = $menu->get_object($ret, $i); - $js = $row->me_code; - switch ($row->me_type) - { - case 'PL': - $js = sprintf('%s', $gDossier, $row->me_code, $row->me_code); - break; - case 'ME': - $js = sprintf('%s', $gDossier, $row->me_code, $row->me_code); - break; - } - $class = ( $i % 2 == 0) ? $class = ' class="odd"' : $class = ' class="even"'; - echo ""; - echo td($js); - echo td(_($row->me_menu)); - echo td(h(_($row->me_description))); - echo td(h($row->me_type)); - echo td(h($row->me_file)); - echo td(h($row->me_url)); - echo td(h($row->me_parameter)); - echo td(h($row->me_javascript)); - echo ''; -} -echo ''; - -?> diff --git a/sources/include/modele.inc.php b/sources/include/modele.inc.php deleted file mode 100644 index 8175b73..0000000 --- a/sources/include/modele.inc.php +++ /dev/null @@ -1,391 +0,0 @@ -get_value('select count(*) from modeledef where ' . - 'mod_name=$1 and mod_id !=$2', array(trim($name), $m)) == 0 - ) - { - - $cn->exec_sql("update modeledef set mod_name=$1, " . - " mod_desc=$2 where mod_id=$3 ", array(trim($name), trim($desc), $m)); - } - } - $sa = "list"; -} - -$cn = new Database(); - - - -// IF FMOD_NAME is posted then must add a template -if (isset($_POST["FMOD_NAME"])) -{ - $encoding = $cn->get_value("select encoding from pg_database where " . - " datname='" . domaine . 'dossier' . sql_string($_POST["FMOD_DBID"]) . "'"); - - if ($encoding != 6) - { - alert(_('Désolé vous devez migrer ce modèle en unicode')); - echo ''._('la base de donnée')." " . - domaine . 'mod' . $_POST["FMOD_DBID"]." " . _("doit être migrée en unicode").""; - echo ' '._("Pour le passer en unicode, faites-en un backup puis restaurez le fichier reçu").''; - - echo HtmlInput::button_anchor(_('Retour'), 'admin_repo.php?action=dossier_mgt'); - return; - } - - $mod_name = sql_string($_POST["FMOD_NAME"]); - $mod_desc = sql_string($_POST["FMOD_DESC"]); - if ($mod_name != null) - { - $Res = $cn->exec_sql("insert into modeledef(mod_name,mod_desc) - values ('" . $mod_name . "'," . - "'" . $mod_desc . "')"); - - // get the mod_id - $l_id = $cn->get_current_seq('s_modid'); - if ($l_id != 0) - { - $Sql = sprintf("CREATE DATABASE %sMOD%d encoding='UTF8' TEMPLATE %sDOSSIER%s", domaine, $l_id, domaine, $_POST["FMOD_DBID"]); - ob_start(); - if ($cn->exec_sql($Sql) == false) - { - ob_end_clean(); - echo "

    Base de donnée " . domaine . "dossier" . $_POST['FMOD_DBID'] . " "._("est accèdée, déconnectez-vous en d'abord")."

    "; - $Res = $cn->exec_sql("delete from modeledef where mod_id=" . $l_id); - - exit; - } - } - }// if $mod_name != null - - $cn_mod = new Database($l_id, 'mod'); - - // Clean some tables - - $Res = $cn_mod->exec_sql("select distinct jr_pj from jrn where jr_pj is not null "); - if (Database::num_row($Res) != 0) - { - $a_lob = Database::fetch_all($Res); - for ($i = 0; $i < count($a_lob); $i++) - $cn_mod->lo_unlink($a_lob[$i]['jr_pj']); - } - Extension::clean($cn_mod); - $Res = $cn_mod->exec_sql("truncate table centralized"); - $Res = $cn_mod->exec_sql("truncate table jrn cascade"); - $Res = $cn_mod->exec_sql("delete from del_jrn"); - $Res = $cn_mod->exec_sql("delete from del_jrnx"); - $Res = $cn_mod->exec_sql("truncate table jrnx cascade "); - $Res = $cn_mod->exec_sql("truncate table todo_list cascade "); - $Res = $cn_mod->exec_sql("delete from del_action"); - $Res = $cn_mod->exec_sql("delete from profile_user"); - $Res = $cn_mod->exec_sql("delete from jnt_letter"); - - $Res = $cn_mod->exec_sql('delete from operation_analytique'); - - // Reset the closed periode - $Res = $cn_mod->exec_sql("update parm_periode set p_closed='f'"); - $Res = $cn_mod->exec_sql('delete from jrn_periode'); - $Res = $cn_mod->exec_sql(' insert into jrn_periode(p_id,jrn_def_id,status) ' . - ' select p_id,jrn_def_id,\'OP\' ' . - ' from ' . - ' parm_periode cross join jrn_def'); - - // Reset Sequence - $a_seq = array('s_jrn', 's_jrn_op', 's_centralized', 's_stock_goods', 's_internal'); - foreach ($a_seq as $seq) - { - $sql = sprintf("select setval('%s',1,false)", $seq); - $Res = $cn_mod->exec_sql($sql); - } - $sql = "select jrn_def_id from jrn_def "; - $Res = $cn_mod->exec_sql($sql); - $Max = Database::num_row($Res); - for ($seq = 0; $seq < $Max; $seq++) - { - $row = Database::fetch_array($Res, $seq); - /* if seq doesn't exist create it */ - if ($cn_mod->exist_sequence('s_jrn_' . $row['jrn_def_id']) == false) - { - $cn_mod->create_sequence('s_jrn_' . $row['jrn_def_id']); - } - - - $sql = sprintf("select setval('s_jrn_%d',1,false)", $row['jrn_def_id']); - $cn_mod->exec_sql($sql); - - $sql = sprintf("select setval('s_jrn_pj%d',1,false)", $row['jrn_def_id']); - $cn_mod->exec_sql($sql); - $sql = sprintf("select setval('jnt_letter_jl_id_seq',1,false)"); - $cn_mod->exec_sql($sql); - } - //--- - // Cleaning Follow_Up - //-- - if (isset($_POST['DOC'])) - { - $Res = $cn_mod->exec_sql("delete from action_gestion"); - $Res = $cn_mod->exec_sql("delete from document"); - - // Remove lob file - $Res = $cn_mod->exec_sql("select distinct loid from pg_largeobject except select md_lob from document_modele"); - if (Database::num_row($Res) != 0) - { - $a_lob = Database::fetch_all($Res); - //var_dump($a_lob); - foreach ($a_lob as $lob) - { - $cn_mod->lo_unlink($lob['loid']); - } - } - } - if (isset($_POST['CARD'])) - { - $Res = $cn_mod->exec_sql("delete from fiche_detail"); - $Res = $cn_mod->exec_sql("delete from fiche"); - $Res = $cn_mod->exec_sql("delete from action_gestion"); - $Res = $cn_mod->exec_sql("delete from document"); - $Res = $cn_mod->exec_sql("delete from document_modele"); - $Res = $cn_mod->exec_sql("delete from op_predef"); - - // Remove lob file - $Res = $cn_mod->exec_sql("select distinct loid from pg_largeobject"); - if (Database::num_row($Res) != 0) - { - $a_lob = Database::fetch_all($Res); - foreach ($a_lob as $lob) - $cn_mod->lo_unlink($lob['loid']); - } - } - if (isset($_POST['CANAL'])) - { - $Res = $cn_mod->exec_sql('delete from poste_analytique'); - $Res = $cn_mod->exec_sql('delete from plan_analytique'); - } - if ( isset ($_POST['PLUGIN'])) { - $a_schema=$cn_mod->get_array(" - select nspname from pg_namespace - where - nspname not like 'pg_%' - and nspname not in ('information_schema','public','comptaproc') - "); - $nb_schema=count($a_schema); - for ($i=0;$i < $nb_schema;$i++) - { - $cn_mod->exec_sql(" drop schema ".$a_schema[$i]['nspname']." cascade"); - } - } - -} -// Show all available templates -require_once NOALYSS_INCLUDE.'/class_sort_table.php'; -$url=$_SERVER['PHP_SELF']."?sa=list&action=".$_REQUEST['action']; - -$header=new Sort_Table(); -$header->add(_("id"),$url," order by mod_id asc"," order by mod_id desc","ia","id"); -$header->add(_("Nom"),$url," order by mod_name asc"," order by mod_name desc","na","nd"); -$header->add(_("Description"),$url," order by mod_desc asc"," order by mod_desc desc","da","dd"); - -$ord=(isset($_REQUEST['ord']))?$_REQUEST['ord']:'na'; -$sql_order=$header->get_sql_order($ord); - -$Res = $cn->exec_sql("select mod_id,mod_name,mod_desc from - modeledef $sql_order"); - -$count = Database::num_row($Res); -echo '
    '; -echo "

    "._('Modèles')."

    "; -if ($sa == 'list') -{ - echo '

    '; - echo HtmlInput::button(_('Ajouter'),_('Ajouter un modèle')," onclick=\$('folder_add_id').show()"); - - echo '

    '; - if ($count == 0) - { - echo _("Aucun modèle disponible"); - } - else - { - - echo ''; - echo _('Filtre').HtmlInput::infobulle(23); - echo HtmlInput::filter_table("t_modele", "0,1,2","1"); - echo ''; - echo ''; - echo "". - "" . - "" . - "" . - "" . - "" . - "" . - ""; - - for ($i = 0; $i < $count; $i++) - { - $mod = Database::fetch_array($Res, $i); - $class = ($i % 2 == 0) ? "odd" : "even"; - $str_name=domaine.'mod'.$mod['mod_id']; - printf('' . - '' . - '' . - ''. - '' . - '' . - '' . - '' . - '' . - '', $mod['mod_id'], $mod['mod_name'], $mod['mod_desc']); - }// for - echo "
    ".$header->get_header(0)."".$header->get_header(1)."".$header->get_header(2).""._('Nom base de données')."
    %d %s %s '.$str_name.' ' . - HtmlInput::anchor(_('Effacer'), '?action=modele_mgt&sa=del&m=' . $mod['mod_id']," onclick = \"modele_drop('{$mod['mod_id']}') \"") . '' . HtmlInput::anchor(_('Modifie'), '?action=modele_mgt&sa=mod&m=' . $mod['mod_id']," onclick = \"modele_modify('{$mod['mod_id']}') \"") . '' . HtmlInput::anchor(_('Backup'), 'backup.php?action=backup&sa=b&t=m&d=' - . $mod['mod_id']) . '
    "; - }// if count = 0 - echo "

    "._("Si vous voulez récupérer toutes les adaptations d'un dossier " . - " dans un autre dossier, vous pouvez en faire un modèle." . - " Seules les fiches, la structure des journaux, les périodes,... seront reprises " . - "et aucune donnée du dossier sur lequel le dossier est basé. Les données contenues dans les extensions ne sont pas effacées")."

    "; -} -?> - - get_value("select mod_name from modeledef where mod_id=$1", array($_REQUEST['m'])); - if (strlen(trim($name)) == 0) - { - echo "

    $msg inexistant

    "; - return; - } - $sql = "drop database " . domaine . "mod" . sql_string($_REQUEST['m']); - ob_start(); - if ($cn->exec_sql($sql) == false) - { - ob_end_clean(); - - echo "

    "; - printf (_("Base de donnée %s mod %s est accèdée, déconnectez-vous d'abord"),domaine,$_REQUEST['m'] ) - . "

    "; - exit; - } - ob_flush(); - $sql = "delete from modeledef where mod_id=$1"; - $cn->exec_sql($sql, array($_REQUEST['m'])); - print '

    '; - printf (_("Le modèle %s est effacé")."

    ",$name ); - echo HtmlInput::button_anchor(_('Retour'), '?action=modele_mgt'); - } - echo '
    '; - ?> - diff --git a/sources/include/opening.inc.php b/sources/include/opening.inc.php deleted file mode 100644 index c27044c..0000000 --- a/sources/include/opening.inc.php +++ /dev/null @@ -1,264 +0,0 @@ -Check(); - -require_once NOALYSS_INCLUDE.'/user_menu.php'; - -// Correct (last step) -if (isset($_POST['correct'])) -{ - $ledger = new Acc_Ledger($cn, $_REQUEST['p_jrn']); - require_once NOALYSS_INCLUDE.'/operation_ods_new.inc.php'; - return; -} - -// confirm before saving -if ( isset($_POST['summary'])) -{ - try { - $ledger = new Acc_Ledger($cn, $_REQUEST['p_jrn']); - $ledger->with_concerned=false; - $ledger->verify($_POST); - require_once NOALYSS_INCLUDE.'/operation_ods_confirm.inc.php'; - } catch (Exception $e) - { - echo alert($e->getMessage()); - require('operation_ods_new.inc.php'); - - } - return; -} - -// record -if (isset($_POST['save'])) -{ - $array = $_POST; - $ledger = new Acc_Ledger($cn, $_REQUEST['p_jrn']); - $ledger->with_concerned=false; - try - { - $ledger->save($array); - $jr_id = $cn->get_value('select jr_id from jrn where jr_internal=$1', array($ledger->internal)); - - echo '

    Opération enregistrée Piece ' . h($ledger->pj) . '

    '; - if (strcmp($ledger->pj, $_POST['e_pj']) != 0) - { - echo '

    ' . _('Attention numéro pièce existante, elle a du être adaptée') . '

    '; - } - printf('%s
    ', $jr_id, dossier::id(), $ledger->internal); - - // show feedback - echo '
    '; echo '

    ' . $ledger->get_name() . '

    '; echo '
    '; - echo $ledger->confirm($_POST, true); - } - catch (Exception $e) - { - require('operation_ods_new.inc.php'); - alert($e->getMessage()); - } - return; -} - - -/* -------------------------------------------------- - * step 1 if nothing is asked we show the available folders - */ -if ($sa == '') -{ - echo '
    '; - - echo '

    Etape 1

    '; - - echo 'Choisissez le dossier où sont les soldes à importer'; - $avail = $g_user->get_available_folder(); - - if (empty($avail)) - { - echo '*** Aucun dossier ***'; - return; - } - echo '
    '; - echo HtmlInput::hidden('ac', $_REQUEST['ac']); - echo HtmlInput::hidden('sa', 'step2'); - echo dossier::hidden(); - $wAvail = new ISelect(); - /* compute select list */ - $array = array(); - $i = 0; - foreach ($avail as $r) - { - $array[$i]['value'] = $r['dos_id']; - $array[$i]['label'] = $r['dos_name']; - $i++; - } - - $wAvail->value = $array; - echo 'Choix du dossier :' . $wAvail->input('f'); - echo HtmlInput::submit('ok', 'Continuer'); - - echo '
    '; - echo '
    '; - echo '
    '; - return; -} -/* -------------------------------------------------- - * Step 2 choose now the exercice of this folder - */ -$back = 'do.php?ac=' . $_REQUEST['ac'] . '&' . dossier::get(); -if ($sa == 'step2') -{ - echo '
    ' . - '

    Etape 2

    ' . - '

    ' . dossier::name($_REQUEST['f']) . '

    ' . - '
    ' . - ' Choisissez l\'exercice du dossier '; - echo dossier::hidden(); - echo HtmlInput::hidden('ac', $_REQUEST['ac']); - echo HtmlInput::hidden('sa', 'step3'); - echo HtmlInput::hidden('f', $_REQUEST['f']); - $cn = new Database($_REQUEST['f']); - $periode = $cn->make_array("select distinct p_exercice,p_exercice from parm_periode order by p_exercice"); - $w = new ISelect(); - $w->table = 0; - $w->label = 'Periode'; - $w->readonly = false; - $w->value = $periode; - $w->name = "p_periode"; - echo 'Période : ' . $w->input(); - echo HtmlInput::submit('ok', 'Continuer'); - echo dossier::hidden(); - echo "
    "; - echo HtmlInput::button_anchor('Retour', $back); - exit(0); -} -/* -------------------------------------------------- - * select the ledger where we will import the data - */ -if ($sa == 'step3') -{ - echo '
    ' . - '

    Etape 3

    ' . - '

    ' . dossier::name($_REQUEST['f']) . '

    ' . - '
    ' . - ' Choisissez le journal qui contiendra l\'opération d\'ouverture '; - echo dossier::hidden(); - echo HtmlInput::hidden('p_action', 'ouv'); - echo HtmlInput::hidden('sa', 'step4'); - echo HtmlInput::hidden('f', $_REQUEST['f']); - echo HtmlInput::hidden('p_periode', $_REQUEST['p_periode']); - $wLedger = new ISelect(); - $g_user = new User(new Database(dossier::id())); - $avail = $g_user->get_ledger('ODS'); - /* compute select list */ - $array = array(); - $i = 0; - foreach ($avail as $r) - { - $array[$i]['value'] = $r['jrn_def_id']; - $array[$i]['label'] = $r['jrn_def_name']; - $i++; - } - $wLedger->value = $array; - echo $wLedger->input('p_jrn'); - echo HtmlInput::submit('ok', 'Continuer'); - echo HtmlInput::hidden('ac', $_REQUEST['ac']); - echo dossier::hidden(); - echo "
    "; - echo HtmlInput::button_anchor('Retour', $back . '&sa=step2&f=' . $_REQUEST['f']); - exit(0); -} -/* -------------------------------------------------- - * Step 4 we import data from the selected folder and year and - * transform it into a misc operation - */ -if ($sa == 'step4') -{ - echo '
    '; - echo '

    Dernière étape

    '; - $cn_target = new Database($_REQUEST['f']); - $saldo = new Acc_Ledger($cn_target, 0); - $array = $saldo->get_saldo_exercice($_REQUEST['p_periode']); - /* we need to transform the array into a Acc_Ledger array */ - $result = array(); - $result['desc'] = 'Ecriture d\'ouverture'; - $result['nb_item'] = sizeof($array); - $result['p_jrn'] = $_REQUEST['p_jrn']; - $idx = 0; - - foreach ($array as $row) - { - $qcode = 'qc_' . $idx; - $poste = 'poste' . $idx; - $amount = 'amount' . $idx; - $ck = 'ck' . $idx; - $result[$qcode] = $row['j_qcode']; - if (trim($row['j_qcode']) == '') - $result[$poste] = $row['j_poste']; - $result[$amount] = abs($row['solde']); - if ($row['solde'] > 0) - $result[$ck] = 'on'; - $idx++; - } - $cn = new Database(dossier::id()); - - $jrn = new Acc_Ledger($cn, $_REQUEST['p_jrn']); - - echo '
    '; - echo HtmlInput::hidden('ac', $_REQUEST['ac']); - echo HtmlInput::hidden('sa', 'step5'); - echo HtmlInput::hidden('f', $_REQUEST['f']); - echo HtmlInput::hidden('p_periode',$_REQUEST['p_periode']); - echo dossier::hidden(); - echo HtmlInput::hidden('p_jrn', $_REQUEST['p_jrn']); - echo $jrn->input($result, 0); - echo '
    '; - echo '

    Ne corrigez pas encore, cliquez continuer pour passer à l\'étape suivante

    '; - echo HtmlInput::submit('correct_it', 'Continuer'); - echo '
    '; - echo HtmlInput::button_anchor('Retour', $back); - - echo '
    '; -} -// if sa=step4 then record it -// -if ($_REQUEST['sa'] == 'step5') -{ - $ledger = new Acc_Ledger($cn, $_REQUEST['p_jrn']); - require_once NOALYSS_INCLUDE.'/operation_ods_new.inc.php'; -} - diff --git a/sources/include/operation_ods_confirm.inc.php b/sources/include/operation_ods_confirm.inc.php deleted file mode 100644 index 7d01ebd..0000000 --- a/sources/include/operation_ods_confirm.inc.php +++ /dev/null @@ -1,82 +0,0 @@ -'; -echo h2(_("Confirmation"),'class="info"'); -echo '
    '; -echo '

    ' . $ledger->get_name() . '

    '; -echo '
    '; - -echo '
    '; -echo h2(_("Attention, cette opération n'est pas encore sauvée : vous devez encore confirmer"),' class="notice"'); -echo '
    '; - -echo '
    '; -echo HtmlInput::request_to_hidden(array('ac')); -echo $ledger->confirm($_POST,false); - - -?> - - -
    diff --git a/sources/include/operation_ods_new.inc.php b/sources/include/operation_ods_new.inc.php deleted file mode 100644 index 6b817b0..0000000 --- a/sources/include/operation_ods_new.inc.php +++ /dev/null @@ -1,117 +0,0 @@ -get_first('ODS'); -$ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id_ledger; - -// check if we can write in the ledger -if ( $g_user->check_jrn($ledger->id)=='X') -{ - alert(_("Vous ne pouvez pas écrire dans ce journal, contacter votre administrateur")); - return; -} -echo '
    '; -echo '
    '; -echo HtmlInput::hidden('p_jrn_predef', $ledger->id); -$op = new Pre_op_ods($cn); -$op->set('ledger', $ledger->id); -$op->set('ledger_type', "ODS"); -$op->set('direct', 't'); -$url=http_build_query(array('action'=>'use_opd','p_jrn_predef'=>$ledger->id,'ac'=>$_REQUEST['ac'],'gDossier'=>dossier::id())); -echo $op->form_get('do.php?'.$url); - -echo '
    '; -echo '
    '; -echo '

    ' . $ledger->get_name() . '

    '; -echo '
    '; - -// Show the predef operation -// Don't forget the p_jrn -$p_post=$_POST; -if ( isset ($_GET['action']) && ! isset($_POST['correct'])) -{ - if ( $_GET['action']=='use_opd') - { - // get data from predef. operation - $op=new Pre_op_advanced($cn); - $p_post=null; - if ( isset($_REQUEST['pre_def']) && $_REQUEST['pre_def'] != '') - { - $op->set_od_id($_REQUEST['pre_def']); - $p_post=$op->compute_array(); - } - } -} -$p_msg=(isset($p_msg))?$p_msg:""; -print '

    '.$p_msg.'

    '; -echo '
    '; -echo dossier::hidden(); -echo HtmlInput::request_to_hidden(array('ac')); - -echo $ledger->input($p_post); - - - - -echo '
    '; -echo ''. - ''.td(_('Débit')) . '' . - td(_('Crédit')) . ' ' . - td(_('Difference')) . ' '; -echo '
    '; -echo '
    '; - -$iconcerned=new IConcerned('jrn_concerned'); -$iconcerned->amount_id="totalDeb"; -echo "Opération rapprochée : ".$iconcerned->input(); - -echo '

    '; -echo HtmlInput::button('add', _('Ajout d\'une ligne'), 'onClick="quick_writing_add_row()"'); -echo HtmlInput::submit('summary', _('Sauvez')); -echo '

    '; - -echo '
    '; - -echo ""; -echo create_script(" update_name()"); - -if ($g_parameter->MY_DATE_SUGGEST=='Y') -{ - echo create_script(" get_last_date()"); -} -echo '
    '; - -?> diff --git a/sources/include/param_pcmn.inc.php b/sources/include/param_pcmn.inc.php deleted file mode 100644 index 6444bf0..0000000 --- a/sources/include/param_pcmn.inc.php +++ /dev/null @@ -1,172 +0,0 @@ -
    '; - -/* Store the p_start parameter */ - -$g_start=HtmlInput::default_value_get('p_start',1); -?> - - -
    - -
    - -
    -exec_sql("select pcm_val,pcm_lib,pcm_val_parent,pcm_type,array_to_string(array_agg(j_qcode) , ',') as acode - from tmp_pcmn left join vw_poste_qcode on (j_poste=pcm_val) where substr(pcm_val::text,1,1)='".$g_start."'". - " group by pcm_val,pcm_lib,pcm_val_parent, pcm_type order by pcm_val::text"); -$MaxRow=Database::num_row($Ret); - -?> - - - - - - - - - - - - - - - - - - - - - - - -
    - - - ", - $str_dossier, $A['pcm_val']); - echo h($A['pcm_lib']); - ?> - - - - - - 0 ) : - if (strpos($A['acode'], ",") >0 ) : - $det_qcode= explode(",", $A['acode']); - echo '
      '; - $max=(count($det_qcode)>MAX_QCODE)?MAX_QCODE:count($det_qcode); - for ($e=0;$e<$max;$e++) : - echo '
    • '.HtmlInput::card_detail($det_qcode[$e],'',' style="display:inline"').'
    • '; - endfor; - echo ''; - if ($max < count($det_qcode)) : - echo "..."; - else : - echo HtmlInput::card_detail($A['acode']); - endif; - endif; - endif; - ?> -
    - - - -
    - - diff --git a/sources/include/param_sec.inc.php b/sources/include/param_sec.inc.php deleted file mode 100644 index 6487051..0000000 --- a/sources/include/param_sec.inc.php +++ /dev/null @@ -1,321 +0,0 @@ -Check(); -$g_user->check_dossier($gDossier); - -require_once NOALYSS_INCLUDE.'/user_menu.php'; - -///////////////////////////////////////////////////////////////////////// -// List users -///////////////////////////////////////////////////////////////////////// -if ( ! isset($_REQUEST['action'])) -{ - $base_url=$_SERVER['PHP_SELF']."?ac=".$_REQUEST['ac']."&".dossier::get(); - - echo '
    '; - $header=new Sort_Table(); - $header->add('Login',$base_url,"order by use_login asc","order by use_login desc",'la','ld'); - $header->add('Nom',$base_url,"order by use_name asc,use_first_name asc","order by use_name desc,use_first_name desc",'na','nd'); - $header->add('Type d\'utilisateur',$base_url,"order by use_admin asc,use_login asc","order by use_admin desc,use_login desc",'ta','td'); - - - $order=(isset($_REQUEST['ord']))?$_REQUEST['ord']:'la'; - - $ord_sql=$header->get_sql_order($order); - - - $repo=new Database(); - /* Show all the active users, including admin */ - $user_sql = $repo->exec_sql("select use_id, - use_first_name, - use_name, - use_login, - use_admin - from ac_users left join jnt_use_dos using (use_id) - where use_login != 'phpcompta' and use_active=1 - and (dos_id=$1 or (dos_id is null and use_admin=1))" . $ord_sql, array($gDossier)); - - $MaxUser = Database::num_row($user_sql); - - - echo ''; - echo ""; - echo ''; - echo ''; - echo th('prénom'); - echo th('profil'); - echo ''; - for ($i = 0;$i < $MaxUser;$i++) - { - echo ''; - $l_line=Database::fetch_array($user_sql,$i); - - - $str=""; - $str=_('Utilisateur Normal'); - if ( $l_line['use_admin'] == 1 ) - $str=_('Administrateur'); - - // get profile - $profile=$cn->get_value("select p_name from profile - join profile_user using(p_id) where user_name=$1",array($l_line['use_login'])); - - $url=$base_url."&action=view&user_id=".$l_line['use_id']; - echo ""; - echo td($l_line['use_name']); - echo td($l_line['use_first_name']); - echo td($profile); - echo td($str); - - echo ""; - } - echo '
    '.$header->get_header(0).''.$header->get_header(1).''.$header->get_header(2).'
    "; - echo HtmlInput::anchor($l_line['use_login'], $url); - echo "
    '; -} -$action=""; - -if ( isset ($_GET["action"] )) -{ - $action=$_GET["action"]; - -} -//---------------------------------------------------------------------- -// Action = save -//---------------------------------------------------------------------- -if ( isset($_POST['ok'])) -{ - try - { - $cn->start(); - $sec_User=new User($cn,$_POST['user_id']); - - // save profile - $sec_User->save_profile($_POST['profile']); - - /* Save first the ledger */ - $a=$cn->get_array('select jrn_def_id from jrn_def'); - - foreach ($a as $key) - { - $id=$key['jrn_def_id']; - $priv=sprintf("jrn_act%d",$id); - $count=$cn->get_value('select count(*) from user_sec_jrn where uj_login=$1 '. - ' and uj_jrn_id=$2',array($sec_User->login,$id)); - if ( $count == 0 ) - { - $cn->exec_sql('insert into user_sec_jrn (uj_login,uj_jrn_id,uj_priv)'. - ' values ($1,$2,$3)', - array($sec_User->login,$id,$_POST[$priv])); - - } - else - { - $cn->exec_sql('update user_sec_jrn set uj_priv=$1 where uj_login=$2 and uj_jrn_id=$3', - array($_POST[$priv],$sec_User->login,$id)); - } - } - /* now save all the actions */ - $a=$cn->get_array('select ac_id from action'); - - foreach ($a as $key) - { - $id=$key['ac_id']; - $priv=sprintf("action%d",$id); - if ( ! isset ($_POST[$priv])) - { - $cn->exec_sql("delete from user_sec_act where ua_act_id=$1",array($id)); - continue; - } - $count=$cn->get_value('select count(*) from user_sec_act where ua_login=$1 '. - ' and ua_act_id=$2',array($sec_User->login,$id)); - if ( $_POST[$priv] == 1 && $count == 0) - { - $cn->exec_sql('insert into user_sec_act (ua_login,ua_act_id)'. - ' values ($1,$2)', - array($sec_User->login,$id)); - - } - if ($_POST[$priv] == 0 ) - { - $cn->exec_sql('delete from user_sec_act where ua_login=$1 and ua_act_id=$2', - array($sec_User->login,$id)); - } - } - $cn->commit(); - } // end try - catch (Exception $e) - { - echo_warning ($e->getTraceAsString()); - $cn->rollback(); - } - -} - - - - -//-------------------------------------------------------------------------------- -// Action == View detail for users -//-------------------------------------------------------------------------------- - -if ( $action == "view" ) -{ - $l_Db=sprintf("dossier%d",$gDossier); - $return= HtmlInput::button_anchor('Retour à la liste','?&ac='.$_REQUEST['ac'].'&'.dossier::get(),'retour'); - - $repo=new Database(); - $User=new User($repo,$_GET['user_id']); - $admin=0; - $access=$User->get_folder_access($gDossier); - - $str="Aucun accès"; - - if ($access=='R') - { - $str=' Utilisateur normal'; - } - - if ( $User->admin==1 ) - { - $str=' Administrateur'; - $admin=1; - } - - echo '

    '.h($User->first_name).' '.h($User->name).' '.hi($User->login)."($str)

    "; - - - if ( $_GET['user_id'] == 1 ) - { - echo '

    Cet utilisateur est administrateur, il a tous les droits

    '; - echo "

    Impossible de modifier cet utilisateur dans cet écran, il faut passer par - l'écran administration -> utilisateur. -

    "; - echo $return; - return; - } - // - // Check if the user can access that folder - if ( $access == 'X' ) - { - echo "

    L'utilisateur n'a pas accès à ce dossier

    "; - echo "

    Impossible de modifier cet utilisateur dans cet écran, il faut passer par - l'écran administration -> utilisateur. -

    "; - echo $return; - $action=""; - return; - } - - //-------------------------------------------------------------------------------- - // Show access for journal - //-------------------------------------------------------------------------------- - - $Res=$cn->exec_sql("select jrn_def_id,jrn_def_name from jrn_def ". - " order by jrn_def_name"); - $sec_User=new User($cn,$_GET['user_id']); - - echo '
    '; - $sHref=sprintf ('export.php?act=PDF:sec&user_id=%s&'.$str_dossier , - $_GET ['user_id'] - ); - - echo dossier::hidden(); - echo HtmlInput::hidden('action','sec'); - echo HtmlInput::hidden('user_id',$_GET['user_id']); - $i_profile=new ISelect ('profile'); - $i_profile->value=$cn->make_array("select p_id,p_name from profile - order by p_name"); - - $i_profile->selected=$sec_User->get_profile(); - - echo "

    "; - echo _("Profil")." ".$i_profile->input(); - echo "

    "; - echo '
    Journaux '; - echo ''; - $MaxJrn=Database::num_row($Res); - $jrn_priv=new ISelect(); - $array=array( - array ('value'=>'R','label'=>'Uniquement lecture'), - array ('value'=>'W','label'=>'Lecture et écriture'), - array ('value'=>'X','label'=>'Aucun accès') - ); - - for ( $i =0 ; $i < $MaxJrn; $i++ ) - { - /* set the widget */ - $l_line=Database::fetch_array($Res,$i); - - echo ' '; - if ( $i == 0 ) echo ''; - else echo ""; - echo ""; - - $jrn_priv->name='jrn_act'.$l_line['jrn_def_id']; - $jrn_priv->value=$array; - if ($admin != 1) - $jrn_priv->selected=$sec_User->get_ledger_access($l_line['jrn_def_id']); - else - $jrn_priv->selected='W'; - - - echo ''; - echo ''; - } - echo '
    Journal $l_line[jrn_def_name] '; - echo $jrn_priv->input(); - echo '
    '; - echo '
    '; - - //********************************************************************** - // Show Priv. for actions - //********************************************************************** - echo '
    Actions '; - include('template/security_list_action.php'); - echo '
    '; - echo HtmlInput::button('Imprime','imprime',"onclick=\"window.open('".$sHref."');\""); - echo HtmlInput::submit('ok','Sauve'); - echo HtmlInput::reset('Annule'); - echo $return; - echo '
    '; -} // end of the form -echo "
    "; -html_page_stop(); -?> diff --git a/sources/include/payment_middle.inc.php b/sources/include/payment_middle.inc.php deleted file mode 100644 index 7bfd365..0000000 --- a/sources/include/payment_middle.inc.php +++ /dev/null @@ -1,150 +0,0 @@ -'; -$etd=''; -$tr=''; -$etr=''; -$th=''; -$eth=''; - -/*!\file - * \brief payment mode - */ -$sb=HtmlInput::default_value('sb', "", $_REQUEST); -echo '
    '; - -//---------------------------------------------------------------------- -// change -if ( $sb=='change') -{ - if ( !isset($_GET['id'])) exit; - $row=new Acc_Payment($cn,$_GET['id']); - $row->load(); - echo '
    '; - echo dossier::hidden(); - echo HtmlInput::hidden('sa','mp'); - echo HtmlInput::hidden('sb','save'); - echo HtmlInput::hidden('id',$row->get_parameter("id")); - echo HtmlInput::hidden('delete_ck',0); - echo $row->form(); - echo HtmlInput::submit('save',_('Sauve'), ' onclick="$(\'delete_ck\').value=0"'); - echo HtmlInput::submit('delete',_('Efface'),' onclick="$(\'delete_ck\').value=1"'); - echo HtmlInput::button_anchor(_('Retour sans sauver'), - '?p_action=divers&sa=mp&'.dossier::get()."&ac=".$_REQUEST['ac'], - "","","smallbutton"); - echo '
    '; - return; -} -//---------------------------------------------------------------------- -// Save the change -// -if ( $sb=='save') -{ - $delete=HtmlInput::default_value_post("delete_ck", 0); - if ( $delete == 0 ) - { - $row=new Acc_Payment($cn,$_POST ['id']); - $row->from_array($_POST); - $row->update(); - } else { -//--------------------------------------------------------------------------- -// Delete a card -//--------------------------------------------------------------------------- - $row=new Acc_Payment($cn,$_POST['id']); - $row->from_array($_POST); - $row->delete(); - - } -} -//--------------------------------------------------------------------------- -// Insert a new mod of payment -//--------------------------------------------------------------------------- -if ( isset($_POST['insert'])) -{ - $row=new Acc_Payment($cn); - $row->from_array($_POST); - $row->insert(); - $sb="list"; -} - -//--------------------------------------------------------------------------- -// Show form to enter a new one -//--------------------------------------------------------------------------- -if ($sb=='ins') -{ - $mp=new Acc_Payment($cn); - $r=$mp->blank(); - echo '
    '; - echo dossier::hidden(); - echo HtmlInput::hidden('ac',$_REQUEST['ac']),HtmlInput::hidden('insert',0); - echo $r; - echo HtmlInput::submit('insertsub',_('Enregistre')); - echo HtmlInput::button_anchor(_('Retour sans sauver'), - '?p_action=divers&sa=mp&'.dossier::get()."&ac=".$_REQUEST['ac'], - "","","smallbutton"); - echo '
    '; - - return; -} -//-------------------------------------------------------------------------------- -//LIST -//-------------------------------------------------------------------------------- -/* Get the data from database */ -$header=new Sort_Table(); -$base_url=$_SERVER['PHP_SELF']."?".Dossier::get()."&ac=".$_REQUEST['ac']; - -$header->add(_("Libelle"),$base_url,"order by mp_lib asc","order by mp_lib desc",'la','ld'); -$header->add(_("Pour le journal"),$base_url,"order by jrn_def_name asc","order by jrn_def_name desc",'ja','jd'); -$header->add(_("Type de fiche"),$base_url,"order by fd_label asc","order by fd_label desc",'tc','td'); -$header->add(_("Enregistré dans le journal"),$base_url,"order by jrn_target asc","order by jrn_target desc",'jta','jtd'); -$header->add(_("Avec la fiche"),$base_url,"order by vw_name asc","order by vw_name desc",'na','nd'); - -$order=(isset($_REQUEST['ord']))?$_REQUEST['ord']:'la'; - -$sql=$header->get_sql_order($order); - -$array=$cn->get_array(" - select - mp_id,mp_lib,mp_jrn_def_id,mp_fd_id,mp_qcode,j.jrn_def_id, - j.jrn_def_name as jrn_def_name, - j2.jrn_def_name as jrn_target, - fd_label, - coalesce(mp_qcode,'A choisir à l''encodage') as vw_name - from mod_payment as mp - left join jrn_def as j on (j.jrn_def_id=mp.jrn_def_id) - left join jrn_def as j2 on (j2.jrn_def_id=mp.mp_jrn_def_id) - left join fiche_def as fd on (mp.mp_fd_id=fd.fd_id) - $sql - "); -/* if there are data show them in a table */ -if ( ! empty ($array)) -{ - - require_once NOALYSS_INCLUDE.'/template/list_mod_payment.php'; - echo HtmlInput::button_anchor("Ajout", $base_url."&sb=ins","","","smallbutton"); -} -echo '
    '; -?> diff --git a/sources/include/periode.inc.php b/sources/include/periode.inc.php deleted file mode 100644 index f7e285a..0000000 --- a/sources/include/periode.inc.php +++ /dev/null @@ -1,147 +0,0 @@ -'; -$cn=new Database($gDossier); -//----------------------------------------------------- -// Periode -//----------------------------------------------------- -$action=""; -if ( isset($_REQUEST['action'])) - $action=$_REQUEST['action']; -$choose=(isset ($_GET['choose']))?$_GET['choose']:"no"; - -if ($choose=='Valider') $choose='yes'; - -if ( isset ($_POST["add_per"] )) -{ - extract($_POST); - $obj=new Periode($cn); - if ( $obj->insert($p_date_start,$p_date_end,$p_exercice) == 1 ) - { - alert(_('Valeurs invalides')); - } - $choose="yes"; - -} -if (isset($_POST['add_exercice'])) - { - $obj=new Periode($cn); - $exercice=$cn->get_value('select max(p_exercice::float)+1 from parm_periode'); - if ( $obj->insert_exercice($exercice,$_POST['nb_exercice']) == 1 ) - { - alert(_('Valeurs invalides')); - } - - $choose="yes"; - } -/* - * Close selected periode - */ -if ( isset($_POST['close_per']) ) -{ - if (isset($_POST['sel_per_close'] ) ) { - $a_per_to_close=$_POST['sel_per_close']; - for ($i=0;$i < count($a_per_to_close);$i++) { - $per=new Periode($cn); - $jrn_def_id=(isset($_GET['jrn_def_id']))?$_GET['jrn_def_id']:0; - $per->jrn_def_id=$jrn_def_id; - $per->set_periode($a_per_to_close[$i]); - $per->close(); - - } - } - $choose="yes"; -} - - -if ( $action== "delete_per" ) -{ - $p_per=$_GET["p_per"]; -// Check if the periode is not used - if ( $cn->count_sql("select * from jrnx where j_tech_per=$p_per") != 0 ) - { - alert(' Désolé mais cette période est utilisée'); - } - else - { - $count=$cn->get_value("select count(*) from parm_periode;"); - if ( $count > 1 ) { - $Res=$cn->exec_sql("delete from parm_periode where p_id=$p_per"); - } else - { - alert(' Désolé mais vous devez avoir au moins une période'); - } - } - $choose="yes"; -} -if ( $action == 'reopen') - { - $jrn_def_id=(isset($_GET['jrn_def_id']))?$_GET['jrn_def_id']:0; - $per=new Periode($cn); - $jrn_def_id=(isset($_GET['jrn_def_id']))?$_GET['jrn_def_id']:0; - $per->set_jrn($jrn_def_id); - $per->set_periode($_GET['p_per']); - $per->reopen(); - - $choose="yes"; - } -if ( $choose=="yes" ) -{ - echo '

    '; - echo HtmlInput::button_anchor('Autre Journal ?','?choose=no&ac='.$_REQUEST['ac'].'&gDossier='.dossier::id()); - echo '

    '; - $per=new Periode($cn); - $jrn=(isset($_GET['jrn_def_id']))?$_GET['jrn_def_id']:0; - $per->set_jrn($jrn); - - $per->display_form_periode(); - $nb_exercice=new ISelect("nb_exercice"); - $nb_exercice->value=array( - array('value'=>12,'label'=>"12 périodes"), - array('value'=>13,'label'=>"13 périodes") - ); - - require_once NOALYSS_INCLUDE.'/template/periode_add_exercice.php'; -} -else -{ - echo '
    '; - echo dossier::hidden(); - $sel_jrn=$cn->make_array("select jrn_def_id, jrn_def_name from ". - " jrn_def order by jrn_def_name"); - $sel_jrn[]=array('value'=>0,'label'=>'Global : periode pour tous les journaux'); - $wSel=new ISelect(); - $wSel->value=$sel_jrn; - $wSel->name='jrn_def_id'; - echo "Choisissez global ou uniquement le journal à fermer".$wSel->input(); - echo HtmlInput::submit('choose','Valider'); - echo HtmlInput::hidden('ac',$_REQUEST['ac']); - echo "
    "; - echo '

    Pour ajouter, effacer ou modifier une période, il faut choisir global

    '; -} -echo '
    '; -?> diff --git a/sources/include/poste.inc.php b/sources/include/poste.inc.php deleted file mode 100644 index d140855..0000000 --- a/sources/include/poste.inc.php +++ /dev/null @@ -1,89 +0,0 @@ -'; - -$gDossier=dossier::id(); - -//----------------------------------------------------- -// confirm mod -if ( isset( $_POST['confirm_mod'] ) ) -{ - extract($_POST); - $update=new Acc_Parm_Code($cn,$p_code); - $update->p_comment=$p_comment; - $update->p_value=$p_value; - $update->save(); -} -$object=new Acc_Parm_Code($cn); - -$all=$object->load_all(); -echo '
    '; -echo ''; -for ($i=0;$i'; - echo $all[$i]->display(); - echo ''; - echo ""; -} -echo "
    '; - $w=new IHidden(); - $w->name='id'; - $w->value=$i; - echo $w->input(); - echo HtmlInput::submit('mod','modifie'); - echo '
    '; - echo '
    "; -echo "
    "; -//----------------------------------------------------- -// modifie -if ( isset ($_POST['mod'] )) -{ - echo '
    '; - echo IPoste::ipopup('ipop_account'); - echo '
    '; - echo "Voulez-vous vraiment modifier ?"; - echo '
    '; - - echo ""; - $id=$_POST['id']; - echo $all[$id]->form(); - echo "
    "; - $h=new IHidden(); - $h->name='p_action'; - $h->value='divers'; - ; - echo $h->input(); - echo HtmlInput::hidden('sa','poste'); - echo HtmlInput::submit('confirm_mod','Confirme'); - echo HtmlInput::submit('no','Cancel'); - echo "
    "; - echo '
    '; - echo "
    "; - -} -echo '
    '; diff --git a/sources/include/preod.inc.php b/sources/include/preod.inc.php deleted file mode 100644 index b2c8028..0000000 --- a/sources/include/preod.inc.php +++ /dev/null @@ -1,122 +0,0 @@ -'; -echo '
    '; -$sel=new ISelect(); -$sel->name="jrn"; -$sel->value=$cn->make_array("select jrn_def_id,jrn_def_name from ". - " jrn_def where jrn_def_type in ('VEN','ACH','ODS') order by jrn_def_name"); -// Show a list of ledger -$sel->selected=$request_jrn; -echo 'Choisissez un journal '.$sel->input(); - -echo dossier::hidden(); -$hid=new IHidden(); -echo $hid->input("sa","jrn"); -echo $hid->input("ac",$request_ac); -echo '
    '; -echo HtmlInput::submit('Accepter','Accepter'); -echo '
    '; - -// if $_REQUEST[sa] == del delete the predefined operation -if ( $request_sa == 'del') -{ - $op=new Pre_operation($cn); - $op->od_id=$_REQUEST['od_id']; - $op->delete(); - $request_sa='jrn'; -} - -// if $_REQUEST[sa] == jrn show the predefined operation for this -// ledger -if ( $request_sa== 'jrn' ) -{ - $op=new Pre_operation($cn); - $op->set_jrn($get_jrn); - $is_ods = $cn->get_value("select count(*) - from jrn_def where - jrn_def_id=$1 - and jrn_def_type='ODS'", array($get_jrn)); - $op->od_direct = ($is_ods > 0) ? 't' : 'f'; - $array = $op->get_list_ledger(); - if (empty($array) == true) - { - echo _("Aucun enregistrement"); - return; - } - - echo ''; - $count=0; - foreach ($array as $row ) - { - - if ( $count %2 == 0 ) - echo ''; - else - echo ''; - $count++; - - echo ''; - echo ''; - echo ''; - $b=HtmlInput::button('mod'.$row['od_id'],"Modifier","onclick=\"mod_predf_op('".dossier::id()."','".$row['od_id']."');\""); - echo td($b); - echo ''; - - } - echo '
    '.h($row['od_name']).''.h($row['od_description']).''; - echo '
    '; - echo dossier::hidden(); - echo $hid->input("sa","del"); - echo $hid->input("ac",$request_ac); - echo $hid->input("del",""); - echo $hid->input("od_id",$row['od_id']); - echo $hid->input("jrn",$get_jrn); - - $b=''; - echo $b; - echo '
    '; - - echo '
    '; -} -echo '
    '; -?> diff --git a/sources/include/profile.inc.php b/sources/include/profile.inc.php deleted file mode 100644 index 958b886..0000000 --- a/sources/include/profile.inc.php +++ /dev/null @@ -1,422 +0,0 @@ -exec_sql("delete from user_sec_action_profile where p_id=$1 and p_granted=$2", - array($p_id, $ap_id[$e])); - continue; - } - if ($ua_id[$e]=="") - { - $cn->exec_sql("insert into user_sec_action_profile (p_id,p_granted,ua_right) values($1,$2,$3)", - array($p_id, $ap_id[$e], $right[$e])); - continue; - } - if ($ua_id[$e]!='') - { - $cn->exec_sql("update user_sec_action_profile set ua_right=$3 where p_id=$1 and p_granted=$2 ", - array($p_id, $ap_id[$e], $right[$e])); - continue; - } - } - } - catch (Exception $exc) - { - echo $exc->getTraceAsString(); - throw $exc; - } -} -//********************************************** -// Save avail. profiles -//********************************************** -if (isset($_POST['change_stock'])) -{ - extract($_POST); - try - { - for ($e=0; $eexec_sql("delete from profile_sec_repository where p_id=$1 and r_id=$2", - array($p_id, $ar_id[$e])); - continue; - } - if ($ur_id[$e]=="") - { - $cn->exec_sql("insert into profile_sec_repository (p_id,r_id,ur_right) values($1,$2,$3)", - array($p_id, $ar_id[$e], $right[$e])); - continue; - } - if ($ur_id[$e]!='') - { - $cn->exec_sql("update profile_sec_repository set ur_right=$3 where p_id=$1 and r_id=$2 ", - array($p_id, $ar_id[$e], $right[$e])); - continue; - } - } - } - catch (Exception $exc) - { - echo $exc->getTraceAsString(); - throw $exc; - } -} -//********************************************** -// Save_name -// ********************************************* - -if (isset($_POST['save_name'])) -{ - - extract($_POST); - try - { - if (strlen(trim($p_name))==0) - throw new Exception("Nom ne peut être vide"); - if (isNumber($p_id)==0) - throw new Exception("profile Invalide"); - $wc=(isset($with_calc))?1:0; - $wd=(isset($with_direct_form))?1:0; - $p_desc=(strlen(trim($p_desc))==0)?null:trim($p_desc); - if ($p_id!=-1) - { - $cn->exec_sql("update profile set p_name=$1,p_desc=$2, - with_calc=$3, with_direct_form=$4 where p_id=$5", - array($p_name, - $p_desc, $wc, $wd, $p_id)); - } - else - { - $p_id=$cn->get_value("insert into profile (p_name, - p_desc,with_calc,with_direct_form) values - ($1,$2,$3,$4) returning p_id", - array( - $p_name, $p_desc, $wc, $wd - )); - } - } - catch (Exception $e) - { - alert($e->getMessage()); - } -} -//************************************ -// Clone -//************************************ -if (isset($_POST['clone'])) -{ - extract($_POST); - try - { - $cn->start(); - $new_id=$cn->get_value("insert into profile(p_name,p_desc,with_calc, - with_direct_form) - select 'copie de '||p_name,p_desc,with_calc, - with_direct_form from profile where p_id=$1 returning p_id", array($p_id)); - $cn->exec_sql(" - insert into profile_menu (p_id,me_code,me_code_dep,p_order,p_type_display,pm_default) - select $1,me_code,me_code_dep,p_order,p_type_display,pm_default from profile_menu - where p_id=$2 - ", array($new_id, $p_id)); - $cn->commit(); - $p_id=$new_id; - } - catch (Exception $exc) - { - echo alert($exc->getMessage()); - $cn->rollback(); - } -} -//************************************ -// Delete -//************************************ -if (isset($_POST['delete_profil'])) -{ - extract($_POST); - try - { - $cn->start(); - if ($p_id==1) - { - throw new Exception('On ne peut pas effacer le profil par défaut'); - } - $new_id=$cn->get_value("delete from profile - where p_id=$1 ", array($p_id)); - $cn->commit(); - } - catch (Exception $exc) - { - echo alert($exc->getMessage()); - $cn->rollback(); - } -} -//************************************ -// Modify the menu or delete it -//************************************ -if (isset($_POST['mod'])) -{ - // pm_id of the menu to modify - $pm_id=HtmlInput::default_value_post("pm_id", 0); - // profile id - $p_id=HtmlInput::default_value_post("p_id", ""); - // display order - $p_order=HtmlInput::default_value_post("p_order", 0); - // code to add - $me_code=HtmlInput::default_value_post("me_code", ""); - // tab - $tab=HtmlInput::default_value_post("tab", ""); - // set Default - $pm_default=HtmlInput::default_value_post('pm_default', 0); - try - { - if ($pm_id==""|| - $p_id==""|| - $p_order==""|| - $me_code=="" - ) - throw new Exception('Argument'); - /** - * Printing cannot be a menu and do not depend of anything - */ - $menu_type=$cn->get_value("select me_type from menu_ref - where me_code=$1", array($me_code)); - - if ($menu_type=='PR') - { - $p_type='P'; - $me_code_dep=-1; - } - $cn->start(); - $p_order=(strlen(trim($p_order))==0)?"0":$p_order; - if ($pm_default==1) - { - // reset all default - $cn->exec_sql("update profile_menu set pm_default=0 - where pm_id_dep=(select pm_id_dep from profile_menu - where - pm_id=$1)", array($pm_id)); - } - $cn->exec_sql("update profile_menu set me_code=$1,p_order=$2,pm_default=$3 - where pm_id=$4", array($me_code, $p_order, $pm_default, $pm_id)); - $cn->commit(); - } - catch (Exception $e) - { - $cn->rollback(); - alert($e->getMessage()); - } -} - -//**************************************************** -// Add a menu, module, submenu,plugin... -//**************************************************** -if (isset($_POST['add_menu'])||isset($_POST['add_impress'])) -{ - // type of menu me or pr - $p_type=HtmlInput::default_value_post("type", ""); - // level - $p_level=HtmlInput::default_value_post("p_level", ""); - // pm_id of menu parent - $p_dep=HtmlInput::default_value_post("dep", ""); - // profile id - $p_id=HtmlInput::default_value_post("p_id", ""); - // display order - $p_order=HtmlInput::default_value_post("p_order", 0); - // code to add - $me_code=HtmlInput::default_value_post("me_code", ""); - // tab - $tab=HtmlInput::default_value_post("tab", ""); - try - { - $cn->start(); - - - /** - * Printing cannot be a menu and do not depend of anything - */ - $menu_type=$cn->get_value("select me_type from menu_ref - where me_code=$1", array($me_code)); - - if ($menu_type=='PR') - { - $p_type='P'; - $me_code_dep=null; - $pm_id_dep=null; - } - - // Module never depends of anything - if ($p_type=='me') - { - /* - * Check variable - */ - if ($p_type==""|| - $p_level==""|| - $p_dep==""|| - $p_id==""|| - $me_code=="" - ) - throw new Exception('Argument'); - if ($p_level==0) - { - $me_code_dep=null; - $pm_id_dep=null; - $p_type='M'; - } - else - { - $me_code_dep=$cn->get_value('select me_code from profile_menu' - .' where pm_id = $1 and p_id=$2', array($p_dep, $p_id)); - $pm_id_dep=$p_dep; - $p_type='E'; - } - } - /** - * Check for infinite loop - */ - $inf=$cn->get_value("select count(*) from profile_menu - where p_id=$1 and me_code_dep=$2 and me_code=$3", - array($p_id, $me_code, $me_code_dep)); - if ($inf>0) - throw new Exception("Boucle infinie"); - /** - * Check if we don't add a menu depending on itself - */ - if ($me_code==$me_code_dep) - throw new Exception("Un menu ne peut pas dépendre de lui-même"); - - - /** - * if me_code_dep == -1, it means it is null - */ - $me_code_dep=($me_code_dep==-1)?null:$me_code_dep; - - $pm_default=(isset($pm_default))?1:0; - $cn->exec_sql(" - insert into profile_menu (me_code,me_code_dep,p_id,p_order,pm_default,p_type_display,pm_id_dep) - values ($1,$2,$3,$4,$5,$6,$7) - ", - array($me_code, $me_code_dep, $p_id, $p_order, $pm_default, $p_type, - $pm_id_dep)); - - $cn->commit(); - } - catch (Exception $exc) - { - alert($exc->getMessage()); - } -} - -echo '
    '; -$table=new Sort_Table(); -$url=$_SERVER['REQUEST_URI']; - -$table->add(_('Nom'), $url, "order by p_name asc", "order by p_name desc", "na", - "nd"); -$table->add(_('Description'), $url, "order by p_desc asc", - "order by p_desc desc", "da", "dd"); -$table->add(_('Calculatrice visible'), $url, "order by with_calc asc", - "order by with_calc desc", "ca", "cd"); -$table->add(_('Accès Direct visible'), $url, "order by with_direct_form asc", - "order by with_direct_form desc", "fa", "fd"); - -$ord=(isset($_REQUEST['ord']))?$_REQUEST['ord']:'na'; - -$order=$table->get_sql_order($ord); - -$menu=new Profile_sql($cn); -$ret=$menu->seek("where p_id > 0 ".$order); -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -echo ''; -$gDossier=Dossier::id(); -for ($i=0; $iget_object($ret, $i); - - $js=sprintf('', - $gDossier, $row->p_id); - echo ''; - echo "'; - echo td($row->p_desc); - echo td($row->with_calc); - echo td($row->with_direct_form); - echo ''; -} -$js=sprintf('', - $gDossier, -1); -echo ''; -echo ""; -echo ''; -echo '
    '.$table->get_header(0).''.$table->get_header(1).''.$table->get_header(2).''.$table->get_header(3).'
    ".$js.$row->p_name.''.'
    ".$js._("Ajouter un profil")."
    '; -echo '
    '; - - -//******************************************************* -// Show details of the selected profile -//******************************************************* -echo '
    '; -if (isset($_POST['p_id'])) -{ - require_once NOALYSS_INCLUDE.'/ajax_get_profile.php'; - ?> - - '; -if (isset($_POST['delete_profil'])) -{ - echo create_script(" $('detail_profile').hide()"); - ?> - - diff --git a/sources/include/recover.php b/sources/include/recover.php deleted file mode 100644 index 2d2db0e..0000000 --- a/sources/include/recover.php +++ /dev/null @@ -1,157 +0,0 @@ - - -if (!defined('RECOVER')) - die('Appel direct ne sont pas permis'); -define('SIZE_REQUEST', 70); - - -require_once NOALYSS_INCLUDE.'/class_html_input.php'; -/** - * @brief generate a random string of char - * @param $car int length of the string - */ -function generate_random($car) -{ - $string=""; - $chaine="abcdefghijklmnpqrstuvwxyABCDEFGHIJKLMNPQRSTUVWXY0123456789"; - srand((double) microtime()*1020030); - for ($i=0; $i<$car; $i++) - { - $string .= $chaine[rand()%strlen($chaine)]; - } - return $string; -} - -/** - * @file - * @brief - * @param type $name Descriptionara - */ -$action=HtmlInput::default_value_request("id", ""); -if ($action=="") : - /* - * Display dialog box - */ - ?> - Donnez votre login ou votre email -
    - - - login - or - email - -
    - get_array("select use_id,use_email,use_login from ac_users where lower(use_login)=lower($1) " - , array($login_input)); - elseif (trim($email_input)!=""): - $array=$cn->get_array("select use_id,use_email,use_login from ac_users where " - ." lower(use_email)=lower($1) ", array( $email_input)); - - else: - return; - endif; - - - if ($cn->size()!=0): - list($user_id, $user_email, $user_login)=array_values($array[0]); - if (trim($user_email)!=" ") : - $valid=true; - endif; - endif; - - - if ($valid==true): - $request_id=generate_random(SIZE_REQUEST); - $user_password=generate_random(10); - /* - * save the request into - */ - $cn->exec_sql("insert into recover_pass(use_id,request,password,created_on,created_host) " - ." values ($1,$2,$3,now(),$4)", array($user_id, $request_id, $user_password, $_SERVER['REMOTE_ADDR'])); - - /* - * send an email - */ - $mail=new Sendmail(); - $mail->set_from(ADMIN_WEB); - $mail->mailto($user_email); - $mail->set_subject("NOALYSS : Réinitialisation de mot de passe"); - $message=<<set_message($message); - $mail->compose(); - $mail->send(); - echo '

    -L\'email a été envoyé avec un lien et le nouveau mot de passe, vérifiez vos spams

    '; - endif; -elseif ($action=="req") : - $request_id=HtmlInput::default_value_request("req", ""); - if (strlen(trim($request_id))==SIZE_REQUEST) : - require_once NOALYSS_INCLUDE.'/class_database.php'; - $cn=new Database(0); - - $value=$cn->get_value("select password from recover_pass where request=$1 and created_on > now() - interval '12 hours' and recover_on is null", array($request_id)); - if ($cn->get_affected()>0) : - $cn->exec_sql("update ac_users set use_pass=md5(rp.password) from recover_pass as rp where rp.use_id=ac_users.use_id and request=$1", array($request_id)); - $cn->exec_sql("update recover_pass set recover_by=$1 , recover_on=now() where request=$2", array($_SERVER['REMOTE_ADDR'],$request_id)); - ?> -

    - Opération réussie , vous pouvez vous connecter avec votre nouveau mot de passe - -

    - id=$_POST['fr_id']; - $rap->delete(); - $menu=1; -} -if (isset($_POST["record"])) -{ - $rap->from_array($_POST); - $rap->save(); - $menu=1; -} -if (isset($_POST['update'])) -{ - $rap->from_array($_POST); - $rap->save($_POST); - $menu=1; -} -if (isset($_POST['upload'])) -{ - $rap->upload(); - $menu=1; -} - -if (isset($_REQUEST["action"]) && $menu == 0) -{ - - $action=$_REQUEST ["action"]; - $rap->id=(isset($_REQUEST ['fr_id']))?$_REQUEST['fr_id']:0; - - if ($action=="add"&&!isset($_REQUEST['fr_id'])) - { - - echo '
    '; - echo '

    '._('Définition').'

    '; - echo '
    '; - echo dossier::hidden(); - $rap->id=0; - echo $rap->form(15); - - echo HtmlInput::submit("record", _("Sauve")); - echo '
    '; - echo ''._("Les lignes vides seront effacées").''; - echo "
    "; - echo '
    '; - - echo '
    '; - echo '

    Importation

    '; - echo dossier::hidden(); - $rap->id=0; - $wUpload=new IFile(); - $wUpload->name='report'; - $wUpload->value='report_value'; - echo _('Importer ce rapport').' '; - echo $wUpload->input(); - echo HtmlInput::submit("upload", _("Sauve")); - echo '
    '; - echo ''._("Les lignes vides seront effacées").''; - echo "
    "; - } - if ($action=="view") - { - echo '
    "; - } -} -else -{ - - $lis=$rap->get_list(); - $ac="&ac=".$_REQUEST['ac']; - $p_action='p_action=defreport'; - echo '
    '; - echo _('Filtre')." ".HtmlInput::filter_table("rapport_table_id", '0', 1); - - echo ''; - echo ''; - - foreach ($lis as $row) - { - printf('', $row->id, $str_dossier, $row->name); - } - echo "
    Ajout
    %s
    "; - echo '
    '; -} -html_page_stop(); -?> diff --git a/sources/include/restore.inc.php b/sources/include/restore.inc.php deleted file mode 100644 index de044b0..0000000 --- a/sources/include/restore.inc.php +++ /dev/null @@ -1,241 +0,0 @@ -'.HtmlInput::button_anchor(_("Retour"),"?action=restore","","smallbutton"); - if ( ! isset($_REQUEST['t'])) - { - echo '
    '; - echo (""._("Vous devez préciser s'il s'agit d'un modèle ou d'un dossier").""); - echo $retour; - echo '
    '; - exit(); - } - if ( empty ($_FILES['file']['name']) || - strlen(trim($_FILES['file']['name']))==0 - ) - { - echo '
    '; - - echo (""._('Vous devez donner un fichier')." "); - echo $retour; - echo '
    '; - exit(); - } - //--------------------------------------------------------------------------- - // Restore a folder (dossier) - if ( $_REQUEST['t']=='d') - { - echo '
    '; - - $cn=new Database(); - $id=$cn->get_next_seq('dossier_id'); - - if ( strlen(trim($_REQUEST['database'])) == 0 ) - { - $lname=$id." Restauration :".sql_string($_FILES['file']['name']); - } - else - { - $lname=$id." ".$_REQUEST['database']; - } - - if (strlen(trim($_REQUEST['desc']))==0) - { - $ldesc=$lname; - } - else - { - $ldesc=sql_string($_REQUEST['desc']); - } - - $sql="insert into ac_dossier (dos_id,dos_name,dos_description) values ($1,$2,$3)"; - $cn->start(); - try - { - $cn->get_value($sql,array($id,$lname,$ldesc)); - - - } - catch ( Exception $e) - { - echo ''._("Echec de la restauration ").''; - $cn->rollback(); - exit(); - } - $cn->commit(); - $name=domaine."dossier".$id; - echo $name; - $cn->exec_sql("create database ".$name." encoding='utf8'"); - $args=" --no-owner -d $name ".$_FILES['file']['tmp_name']; - $cmd= escapeshellcmd(PG_RESTORE); - exec($cmd.$args); - $test=new Database($id); - if ( $test->exist_table('version') ) - { - echo '

    '._('Restauration réussie du dossier ').$lname.'

    '; - $test->close(); - } - else - { - $test->close(); - echo '

    '._('Problème lors de la restauration ').$lname.'

    '; - $cn->exec_sql('delete from ac_dossier where dos_id=$1',array($id)); - $cn->exec_sql('drop database '.$name); - exit(); - } - $new_cn=new Database($id); - - $new_cn->apply_patch($name,0); - echo ''._('Ne pas recharger la page, sinon votre base de données sera restaurée une fois de plus').''; - Dossier::synchro_admin($id); - echo $retour; - - echo '
    '; - } - //--------------------------------------------------------------------------- - // Restore a modele - - if ( $_REQUEST['t']=='m') - { - echo '
    '; - - $cn=new Database(); - $id=$cn->get_next_seq('s_modid'); - - if ( strlen(trim($_REQUEST['database'])) == 0 ) - $lname=$id." Restauration :".sql_string($_FILES['file']['name']); - else - $lname=$id." ".$_REQUEST['database']; - - - $sql="insert into modeledef (mod_id,mod_name,mod_desc) values (".$id.",'Restauration".$lname."','".$ldesc."') "; - $cn->start(); - try - { - $cn->get_value($sql); - - } - catch ( Exception $e) - { - echo ''._("Echec de la restauration ").''; - $cn->rollback(); - exit(); - } - $cn->commit(); - - $name=domaine."mod".$id; - $cn->exec_sql("create database ".$name." encoding='utf8'"); - $args=" -d $name ".$_FILES['file']['tmp_name']; - $status=exec(PG_RESTORE.$args); - - $test=new Database($id,'mod'); - if ( $test->exist_table('version') ) - { - echo '

    '._('Restauration réussie du dossier ').$lname.'

    '; - $test->close(); - } - else - { - $test->close(); - echo '

    '._('Problème lors de la restauration ').$lname.'

    '; - $cn->exec_sql('delete from modeledef where mod_id=$1',array($id)); - $cn->exec_sql('drop database '.$name); - exit(); - } - - $new_cn=new Database($id,'mod'); - - $new_cn->apply_patch($name,0); - - echo ''._('Ne pas recharger la page, sinon votre base de données sera restaurée une fois de plus').''; - echo $retour; - - echo '
    '; - } -} -else -{ - echo '
    '; - echo '
    '; - echo HtmlInput::hidden('action','restore'); - echo HtmlInput::hidden('sa','r'); - echo ''; - echo ''; - $wNom=new IText(); - $wNom->name="database"; - $wNom->size=30; - echo ''; - echo ''; - $chk=new IRadio(); - $chk->name="t"; - $chk->value="d"; - echo ''; - echo ''; - $chk->name="t"; - $chk->value="m"; - echo ''; - echo ''; - $file=new IFile(); - $file->name="file"; - $file->value="mod"; - echo td(_('Fichier ')). - td($file->input()); - $desc=new ITextarea('desc'); - echo ''; - echo '
    '._("Nom de la base de donnée").HtmlInput::infobulle(29) - .''.$wNom->input().'
    '._("Type de backup")." :".' '.$chk->input()._("Dossier").'
    '.$chk->input()._("Modele").'
    '; - echo "

    Description

    "; - $desc->heigh=4;$desc->width=60; - echo $desc->input(); - echo '

    '; - echo HtmlInput::submit("",_("Restauration")); - echo '

    '; - echo '
    '; - echo '
    '; -} diff --git a/sources/include/search.inc.php b/sources/include/search.inc.php deleted file mode 100644 index 1251c65..0000000 --- a/sources/include/search.inc.php +++ /dev/null @@ -1,136 +0,0 @@ -type='ALL'; -if (isset($_GET['amount_id'])) -{ - put_global(array( - array("key"=>'amount_min','value'=>$_GET['amount_id']), - array("key"=>'amount_max','value'=>$_GET['amount_id']) - )); -} - -$search_box=$ledger->search_form('ALL',1,'search_op'); - -if ($base == 'recherche.php' || $base == 'do.php') - { - echo '
    '; - echo '
    '; - } - else - { - $div='search_op'; - $action=""; - $callback=""; - echo HtmlInput::title_box(_('Recherche'), $div); - echo ''; - echo HtmlInput::get_to_hidden(array('ctlc','ledger','target')); - $inside=true; - } - -echo $search_box; -echo HtmlInput::submit("viewsearch",_("Recherche")); -echo HtmlInput::button_close('search_op'); -echo '
    '; - -if ( isset ($_GET['amount_min'])&& isset($_GET['amount_max'])&& ($_GET['amount_max']!=0 ||$_GET['amount_min']!=0 )) -{ - $_GET['viewsearch']=1; - put_global( - array - ( - array('key'=>'ledger_type','value'=>'ALL') - ) - - ); - -} -//----------------------------------------------------- -// Display search result -//----------------------------------------------------- -if ( isset ($_GET['viewsearch']) ) -{ - - // Navigation bar - $step=MAX_RECONCILE; - $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; - if (count ($_GET) == 0) - $array=null; - else - $array=$_GET; - $array['p_action']='ALL'; - if ( ! isset ($array['date_start']) || ! isset ($array['date_end'])) - { - // get first date of current exercice - list($array['date_start'],$array['date_end'])=$g_user->get_limit_current_exercice(); - } - - list($sql,$where)=$ledger->build_search_sql($array); - // Count nb of line - $max_line=$cn->count_sql($sql); - $target=HtmlInput::default_value_get("target", ""); - list($count,$content)=$ledger->list_operation_to_reconcile($sql,$target); - $bar=navigation_bar($offset,$max_line,$step,$page); - - if (! $inside ) { - echo $bar; - - } else - { - if ($step<$max_line ) echo '

    '._('Liste limitée à ').$step._(' enregistrements. Le nombre d\'enregistrements trouvés est de ') .$max_line.'

    '; - } - echo '
    '; - echo HtmlInput::submit("upd_rec",_("Mettre à jour")); - echo HtmlInput::get_to_hidden(array('ctlc','amount_id','ledger')); - echo HtmlInput::get_to_hidden(array('l','date_start','date_end','desc','amount_min','amount_max','qcodesearch_op','accounting','unpaid','gDossier','ledger_type')); - echo $content; - echo HtmlInput::submit("upd_rec",_("Mettre à jour")); - if (! $inside )echo $bar; - - if (isset($_GET[$op.'r_jrn'])) { - foreach ($_GET[$op.'r_jrn'] as $k=>$v) - echo HtmlInput::hidden($op.'r_jrn['.$k.']',$v); - } - echo '
    '; -} -echo '
    '; -?> diff --git a/sources/include/stock_cfg.inc.php b/sources/include/stock_cfg.inc.php deleted file mode 100644 index 3a133bc..0000000 --- a/sources/include/stock_cfg.inc.php +++ /dev/null @@ -1,167 +0,0 @@ -MY_STOCK == 'N') -{ - echo '

    '; - echo _("Vous n'utilisez pas de gestion de stock"); - echo '

    '; - return; -} -if ( isset ($_POST['add_stock'])) -{ - $post_name=HtmlInput::default_value_post('r_name', ""); - if ( strlen(trim($post_name)) != 0) - { - $st=new Stock_Sql($cn); - $st->from_array($_POST); - $st->insert(); - } -} -if ( isset ($_POST['mod_stock'])) -{ - $post_name=HtmlInput::default_value_post('r_name', ""); - if ( strlen(trim($post_name)) != 0) - { - - $st=new Stock_Sql($cn,$_POST['r_id']); - $st->from_array($_POST); - $st->update(); - } -} -$tb=new Sort_Table(); -$p_url=HtmlInput::get_to_string(array("ac","gDossier")); - -$tb->add(_("Nom"), $p_url, " order by r_name asc", "order by r_name desc", "ona", "ond"); -$tb->add(_("Adresse"), $p_url, " order by r_adress asc", "order by r_adress desc", "oaa", "oad"); -$tb->add(_("Ville"), $p_url, " order by r_city asc", "order by r_city desc", "ova", "ovd"); -$tb->add(_("Pays"), $p_url, " order by r_country asc", "order by r_country desc", "opa", "opd"); -$tb->add(_("Téléphone"), $p_url, " order by r_phone asc", "order by r_phone desc", "opa", "opd"); - -$sql="select * from stock_repository "; - -$ord=(isset($_GET['ord']))?$_GET['ord']:"ona"; - -$order=$tb->get_sql_order($ord); - -$array=$cn->get_array($sql." ".$order); - -?> -
    - - - - - - - - - - - - - - - - - - - - -
    get_header(0)?>get_header(1)?>get_header(2)?>get_header(3)?>get_header(4)?>
    - - - - - - - - - - - -
    - - -
    diff --git a/sources/include/stock_histo.inc.php b/sources/include/stock_histo.inc.php deleted file mode 100644 index 7481f8c..0000000 --- a/sources/include/stock_histo.inc.php +++ /dev/null @@ -1,48 +0,0 @@ -get_exercice(); - $periode = new Periode($cn); - list($periode_start, $periode_end) = $periode->get_limit($exercice); - - $array['wdate_start'] = $periode_start->first_day(); - $array['wdate_end'] =$periode_end->last_day(); -} - -$stock->history($array); - -?> diff --git a/sources/include/stock_inv.inc.php b/sources/include/stock_inv.inc.php deleted file mode 100644 index 42cd1bd..0000000 --- a/sources/include/stock_inv.inc.php +++ /dev/null @@ -1,55 +0,0 @@ -record_save($_POST); - echo h2info(_("Opération sauvée")); - $inv->input($_POST,true); - - }catch(Exception $e) - { - alert($e->getMessage()); - $array=input($_POST); - } -} else if ( isset ($_GET['reprise_frm']) ) -{ - - $array=$inv->take_last_inventory($_GET); -} -echo $inv->input($array); - -?> diff --git a/sources/include/stock_inv_histo.inc.php b/sources/include/stock_inv_histo.inc.php deleted file mode 100644 index 30279cf..0000000 --- a/sources/include/stock_inv_histo.inc.php +++ /dev/null @@ -1,111 +0,0 @@ -can_write_repo($_POST['r_id'])) - { - $cn->exec_sql('delete from stock_change where c_id=$1',array($_POST['c_id'])); - } - else - { - alert(_("Vous ne pouvez pas modifier ce dépôt")); - } - } - else - { - alert(_("Opération non effacée: vous n'avez pas confirmé")); - } -} -$profile=$g_user->get_profile(); -$gDossier=dossier::id(); -$default_exercice=$g_user->get_exercice(); -$p_exercice=HtmlInput::default_value_get("p_exercice", $default_exercice); - -$a_change=$cn->get_array("select *,to_char(c_date,'DD.MM.YY') as str_date from stock_change as sc - join stock_repository as sr on (sc.r_id=sr.r_id) - where sc.r_id in (select r_id from profile_sec_repository where p_id=$1) - and c_date >= (select min(p_start) from parm_periode where p_exercice = $2) - and c_date <= (select max(p_end) from parm_periode where p_exercice = $2) - order by c_date",array($profile,$p_exercice)); - - -$exercice=new Exercice($cn); -?> -
    -
    - - select('p_exercice',$p_exercice)->input();?> - -
    - - - - - - - - - - - - > - - - - - - - - - -
    - - - - - - - - - -
    - - - - - - - - - -
    -
    diff --git a/sources/include/stock_state.inc.php b/sources/include/stock_state.inc.php deleted file mode 100644 index f5d4ca2..0000000 --- a/sources/include/stock_state.inc.php +++ /dev/null @@ -1,57 +0,0 @@ -value=$cn->make_array("select max(p_end) as date_end, p_exercice from parm_periode group by p_exercice order by 2 desc"); -$per=new Periode($cn,$g_user->get_periode()); -$per->load(); -$date_limit=$per->limit_year($per->p_exercice); -$last_day=$per->last_day($date_limit['end']); -$last_day=format_date($last_day,'DD.MM.YYYY','YYYY-MM-DD'); -$iexercice->selected=(isset($_GET['state_exercice']))?$_GET['state_exercice']:$last_day; - -$presentation=new ISelect("present"); -$presentation->value=array ( - array("value"=>"T","label"=>"Tableau récapitulatif"), - array("value"=>"L","label"=>"Liste") -); -$presentation->selected=(isset($_GET['present']))?$_GET['present']:"T"; -require_once NOALYSS_INCLUDE.'/template/stock_state_search.php'; - -$stock=new Stock($cn); - - -$stock->summary($_GET); - -?> diff --git a/sources/include/supplier.inc.php b/sources/include/supplier.inc.php deleted file mode 100644 index 4472e96..0000000 --- a/sources/include/supplier.inc.php +++ /dev/null @@ -1,163 +0,0 @@ -check_action(FICADD) == 0 ) - { - alert(_('Vous ne pouvez pas enlever de fiche')); - return; - } - - $f_id=$_REQUEST['f_id']; - - $fiche=new Supplier($cn,$f_id); - $fiche->remove(); - $low_action="list"; - } -} - -//----------------------------------------------------- -// list of supplier -//----------------------------------------------------- -if ( $low_action == "list" ) -{ - - ?> -
    -
    -
    - ' . "Exercice " . $g_user->get_exercice() . ''; - echo dossier::hidden(); - $a=(isset($_GET['query']))?$_GET['query']:""; - printf (_('Recherche').' ', - $a); - $choice_cat=HtmlInput::default_value_request("choice_cat", 1); - if ( $choice_cat == 1 ) - { - $sel_card=new ISelect('cat'); - $sel_card->value=$cn->make_array('select fd_id, fd_label from fiche_def '. - ' where frd_id='.FICHE_TYPE_FOURNISSEUR. - ' order by fd_label ',1); - $sel_card->selected=(isset($_GET['cat']))?$_GET['cat']:-1; - $sel_card->javascript=' onchange="submit(this);"'; - echo _('Catégorie :').$sel_card->input(); - } else - { - $cat=HtmlInput::default_value_request('cat', ''); - echo HtmlInput::hidden("cat",$cat); - echo HtmlInput::hidden('choice_cat', 0); - } - $nooperation=new ICheckBox('noop'); - $nooperation->selected=(isset($_GET['noop']))?true:false; - echo _('Inclure les fournisseurs sans opération :').$nooperation->input(); - - ?> - - -
    -
    - '; - echo $supplier->Summary($search,'supplier',$sql,$noop); - - - echo '
    '; - echo '
    '; - echo '
    '; - if ($g_user->check_action(FICADD)==1) - { - /* Add button */ - $f_add_button=new IButton('add_card'); - $f_add_button->label=_('Créer une nouvelle fiche'); - $f_add_button->set_attribute('win_refresh','yes'); - - $f_add_button->set_attribute('type_cat',FICHE_TYPE_FOURNISSEUR); - $f_add_button->javascript=" select_card_type(this);"; - echo $f_add_button->input(); - - $f_cat_button=new IButton('add_cat'); - $f_cat_button->set_attribute('type_cat',FICHE_TYPE_FOURNISSEUR); - $f_cat_button->set_attribute('ipopup','ipop_cat'); - $f_cat_button->label=_('Ajout d\'une catégorie'); - $f_cat_button->javascript='add_category(this)'; - echo $f_cat_button->input(); - } - - echo '
    '; - echo '
    '; - - -} -/*---------------------------------------------------------------------- - * Detail for a card, Suivi, Contact, Operation,... * - * cc stands for supplier card - *----------------------------------------------------------------------*/ -if ( $low_action == 'detail') -{ - /* Menu */ - require_once NOALYSS_INCLUDE.'/category_card.inc.php'; - return; -} - - - -html_page_stop(); -?> diff --git a/sources/include/template/account_result.php b/sources/include/template/account_result.php deleted file mode 100644 index d196bd5..0000000 --- a/sources/include/template/account_result.php +++ /dev/null @@ -1,63 +0,0 @@ - -
    - -
    - - - - - - - - - -> - - - - - - - -
    - - - - - - - - - - - 0 ) { - if (strpos($array[$i]['acode'], ",") >0 ) { - - $det_qcode= explode(",", $array[$i]['acode']); - $sep=""; - $max=(count($det_qcode)>$limite)?$limite:count($det_qcode); - for ($e=0;$e<$max;$e++) { - echo $sep.HtmlInput::card_detail($det_qcode[$e]); - $sep=" , "; - } - if ($max < count($det_qcode)) { - echo "..."; - } - } else { - echo HtmlInput::card_detail($array[$i]['acode']); - } - } - ?> -
    - - - - -
    -
    \ No newline at end of file diff --git a/sources/include/template/account_search.php b/sources/include/template/account_search.php deleted file mode 100644 index e6039a4..0000000 --- a/sources/include/template/account_search.php +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/sources/include/template/action_button.php b/sources/include/template/action_button.php deleted file mode 100644 index 0d72879..0000000 --- a/sources/include/template/action_button.php +++ /dev/null @@ -1,44 +0,0 @@ - -
    -
    -
    - - "> - - - - - - - -
    -
    \ No newline at end of file diff --git a/sources/include/template/action_display_short.php b/sources/include/template/action_display_short.php deleted file mode 100644 index c99cf6f..0000000 --- a/sources/include/template/action_display_short.php +++ /dev/null @@ -1,113 +0,0 @@ - -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - * - */ - - -/** - * @file - * @brief call from follow_up::display_short display a small form to - * enter a new event - */ -global $g_user; -// Date of the event -$date=new IDate("date_event"); -$date->id="date_event_action_short"; -$title=new IText('title_event'); -$title->css_isze="60%"; -// Description -$summary=new ITextarea('summary'); -$summary->style.='class="itextarea" style="padding:0px;margin:0px"'; - -// Type of document / event -$type=new ISelect("type_event"); -$type->name="type_event"; -$type->value=$cn->make_array("select dt_id,dt_value from document_type order by dt_value", 1); -$type->selected=0; - -// Available for the profile -$profile=new ISelect('event_group'); -$profile->value=$cn->make_array("select p_id as value, ". - "p_name as label ". - " from profile " - . "where " - . "p_id in " - . " (select p_granted " - . " from user_sec_action_profile " - . " where ua_right='W' and p_id=".$g_user->get_profile().") " - . "order by 2"); - -// priority -$priority=new ISelect('event_priority'); -$priority->value=array( - array('value'=>1, 'label'=>_('Haute')), - array('value'=>2, 'label'=>_('Moyenne')), - array('value'=>3, 'label'=>_('Basse')) - ); -$priority->selected=2; - -// Card -$dest=new ICard('dest'); -$dest->jrn=0; -$dest->name='dest'; -$dest->value=""; -$dest->label=""; -$list_recipient=$cn->make_list('select fd_id from fiche_def where frd_id in (14,25,8,9,16)'); -$dest->extra=$list_recipient; -$dest->set_attribute('typecard', $list_recipient); -$dest->set_dblclick("fill_ipopcard(this);"); -$dest->set_attribute('ipopup', 'ipopcard'); -$dest->style=' style="vertical-align:0%"'; - -echo HtmlInput::title_box(_('Nouvel événement'), 'action_add_div'); -?> - -
    -

    - - Dateinput()?> - - - Type évenement -input();?> - - Priorité -input()?> - groupe -input()?> -

    -Destinataire input();?> -

    - - - input()?> - -

    - -

    - input()?> -

    - -

    - -

    -
    diff --git a/sources/include/template/action_other_action.php b/sources/include/template/action_other_action.php deleted file mode 100644 index bb51613..0000000 --- a/sources/include/template/action_other_action.php +++ /dev/null @@ -1,69 +0,0 @@ - - - - - diff --git a/sources/include/template/action_search.php b/sources/include/template/action_search.php deleted file mode 100644 index e88267d..0000000 --- a/sources/include/template/action_search.php +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - -
    - - - - -> - - - - - - - - -
    - - - - - - - - - - -
    - -
    -
    - - get_last(MAX_ACTION_SHOW); - $len_array=count($array); - ?> - - - - - - - - - -
    - - - - - - - -
    -
    - - - - diff --git a/sources/include/template/detail-action.php b/sources/include/template/detail-action.php deleted file mode 100644 index 7a95d32..0000000 --- a/sources/include/template/detail-action.php +++ /dev/null @@ -1,509 +0,0 @@ -
    -

    input(); ?>

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ag_id > 0 ): ?> - - - - - - -
    - - - ag_id;?> -
    - - - -
    - - - -
    - - - search().$w->input(); - ?> -
    - - - can_write_action($this->ag_id) == true ): - echo $ag_contact->search().$ag_contact->input(); - endif; - ?> -
    - input(); ?> -
    - - - display_linked(); - if ($g_user->can_write_action($this->ag_id) == true ): - echo HtmlInput::button_action_add_concerned_card( $this->ag_id); - endif; - ?> - - -
    - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -ag_id > 0 ): ?> - - - - - - -
    - - - input(); - ?> -
    - - - -
    - - - input(); - ?> -
    - - - - -
    - - - - -
    - - - -
    - Dossier / tags - - tag_cell(); - ?> -
    - -
    -
    -
    -

    Opérations concernées

    -
      - - '.$operation[$o]['str_date']." ".HtmlInput::detail_op($operation[$o]['jr_id'],$operation[$o]['jr_internal'])." ".h($operation[$o]['jr_comment'])." " - .$js.''; - } - else - { - echo '
    1. '.$operation[$o]['str_date']." ".HtmlInput::detail_op($operation[$o]['jr_id'],$operation[$o]['jr_internal'])." ".h($operation[$o]['jr_comment'])." " - .'
    2. '; - } - } - - ?> -
    - '.$iconcerned->input().'';?> -
    - -
    -

    -
      - - '; - $js= ''.SMALLX.''; - echo '
    1. '.$showAction.$action[$o]['str_date']." ".$action[$o]['ag_ref']." ". - h($action[$o]['sub_title']).'('.h($action[$o]['dt_value']).')'." " - .$js.'
    2. '; - } else - /* - * Display detail requested from Ajax Div - */ - if ( $p_base == 'ajax' ) - { - $xaction = sprintf('view_action(%d,%d,%d)',$action[$o]['ag_id'],Dossier::id(),1); - $showAction=''; - echo '
    3. '.$showAction.$action[$o]['str_date']." ".$action[$o]['ag_ref']." ". - h($action[$o]['sub_title']).'('.h($action[$o]['dt_value']).')'." " - .'
    4. '; - } - /* - * READ ONLY - */ - else - { - $showAction=''; - echo '
    5. '.$showAction.$action[$o]['str_date']." ".$action[$o]['ag_ref']." ". - h($action[$o]['sub_title']).'('.h($action[$o]['dt_value']).')'." " - .'
    6. '; - } - } - - ?> -
    - '.$iaction->input().'';?> -
    -
    -
    -
    -

    - -

    -

    - - -Document créé le ag_timestamp ?> par ag_owner?> - -

    -

    - input(); - ?> -

    -
    - -

    - - '.SMALLX.''; - echo hb('n°'.$acomment[$c]['agc_id'].'('.$acomment[$c]['tech_user']." ".$acomment[$c]['str_agc_date'].')').$js. - '
     '.
    -				" ".h($acomment[$c]['agc_comment']).'
    ' - ; - } - else - { - echo hb('n°'.$acomment[$c]['agc_id'].'('.$acomment[$c]['tech_user']." ".$acomment[$c]['str_agc_date'].')'). - '
     '.
    -				" ".h($acomment[$c]['agc_comment']).'
    ' - ; - - } -} -echo ''; -echo $desc->input(); -echo ''; -?> - -

    - value="+" onclick="enlarge('ag_comment');return false;"> - value="-" style="display:none" onclick="small('ag_comment');return false;"> -

    - -
    -
    - - - - - - -
    - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    -
    -
    -
    - -
    -
    Total HTVA -
    Total TVA -
    Total TVAC -
    - - -
    - - "> -
    - - -
    -ag_id != 0 && ! $readonly) : ?> -
    -

    - Dossier::id(),'ag_id'=>$this->ag_id,'create_invoice'=>1,'ac'=>$menu->get('code_invoice'))); - echo HtmlInput::button_anchor(_("Transformer en facture"),"do.php?".$query,"create_invoice", ' target="_blank" ',"button"); - ?> -

    -
    - - -
    - - -
    - - - - - -
    - - - -
    - - - - - - - - - - -
    - " href=""> - - - - - - - - - - - - - - - - - " href="javascript:void(0)" onclick=""> -
    -
    - - -
    -

    Fichiers à ajouter:

    -
      -
    1. - input(); - ?> - - -
    2. -
    - - "> - -
    - -
    -
    - diff --git a/sources/include/template/document_mod_change.php b/sources/include/template/document_mod_change.php deleted file mode 100644 index c5a8423..0000000 --- a/sources/include/template/document_mod_change.php +++ /dev/null @@ -1,87 +0,0 @@ -get(); -?> -
    - - - - - - - - - - - - - - - - - - - - -
    - - dt_value); - echo $name->input(); - ?> -
    - - dt_prefix); - echo $prefix->input(); - ?> -
    - - get_array("select last_value,is_called from seq_doc_type_".$doc_type->dt_id) ; - - $last=$ret[0]['last_value']; - /*! - *\note With PSQL sequence , the last_value column is 1 when before AND after the first call, to make the difference between them - * I have to check whether the sequence has been already called or not */ - if ($ret[0]['is_called']=='f' ) $last--; - echo $last; - ?> -
    - - - input(); - ?> -
    - - -
    \ No newline at end of file diff --git a/sources/include/template/fiche_def_input.php b/sources/include/template/fiche_def_input.php deleted file mode 100644 index b7291e7..0000000 --- a/sources/include/template/fiche_def_input.php +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - -
    - Description - - input(); ?> -
    -

    Modèles de catégorie

    -
      -$v) { ?> -
    • -input("FICHE_REF",$v['frd_id']); - echo $v['frd_text']; - if ( sizeof ($v['frd_class_base']) != 0 ) - echo "  Class base = ".$v['frd_class_base'].""; - - }?> -
    • - -
    \ No newline at end of file diff --git a/sources/include/template/fiche_def_list.php b/sources/include/template/fiche_def_list.php deleted file mode 100644 index 25f47c2..0000000 --- a/sources/include/template/fiche_def_list.php +++ /dev/null @@ -1,89 +0,0 @@ - -
    - - - - - - - - - - - > - - - - - - - - - -
    - get_header(0)?> - - get_header(1)?> - - get_header(2)?> - - get_header(3)?> - - Description -
    - - - - - - - - - -
    - -
    - \ No newline at end of file diff --git a/sources/include/template/fiche_list.php b/sources/include/template/fiche_list.php deleted file mode 100644 index 5c8e5e0..0000000 --- a/sources/include/template/fiche_list.php +++ /dev/null @@ -1,104 +0,0 @@ - - -
    ')"> - - - - - - - - - - - - - - > - - - - - - - - - - - -
    - - - - -  ▴ - - - - - - - -
    - - - - - - - - - - input(); - } - ?> -
    - - - - - - - -value=$cn->make_array("select fd_id,fd_label from fiche_def order by 2"); -echo $iselect->input(); -?> - - -
    -
    - - \ No newline at end of file diff --git a/sources/include/template/folder_display.php b/sources/include/template/folder_display.php deleted file mode 100644 index fb33899..0000000 --- a/sources/include/template/folder_display.php +++ /dev/null @@ -1,67 +0,0 @@ - -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - * - */ - - -/** - * @file - * @brief display the folders the user has no access and permit to add them - * thanks ajax call. - * - * The received parameter are - * - $a_dossier, the result of Dossier::show_dossier - * - $user_id id of the user - * - */ -echo js_include('admin.js'); -if ( count($a_dossier) == 0 ) -{ - echo '

    '._('Aucun dossier à afficher').'

    '; - return; -} -?> - - - - - - - - -
    - - - - - - -
    \ No newline at end of file diff --git a/sources/include/template/forecast-detail.php b/sources/include/template/forecast-detail.php deleted file mode 100644 index 2c44034..0000000 --- a/sources/include/template/forecast-detail.php +++ /dev/null @@ -1,34 +0,0 @@ - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - diff --git a/sources/include/template/forecast_cat.php b/sources/include/template/forecast_cat.php deleted file mode 100644 index 757a759..0000000 --- a/sources/include/template/forecast_cat.php +++ /dev/null @@ -1,30 +0,0 @@ -
    - - - - - - -

    - - - - - - - - - - - -
    - - - -
    - - -
    \ No newline at end of file diff --git a/sources/include/template/forecast_result.php b/sources/include/template/forecast_result.php deleted file mode 100644 index f272f93..0000000 --- a/sources/include/template/forecast_result.php +++ /dev/null @@ -1,203 +0,0 @@ -

    -Période du à - - -
    - - - - - - - - - - - - - -
    - '.h($aItem[$i][$e]['fi_text']).'';?> -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0)) - { - echo ' - - - - - - - 0)) - { - echo ' - - 0)) - { - echo ' - - - -
    - - -
    - - - - - - -
    - - - - - -
    - - - -
    - -'; - } -else if ($diff==0) - { - echo ''; - } -else - { - echo ''; - } - -echo nbm( $diff); -?> -
    - -'; - } -else if ($cum ==0) - { - echo ''; - } - -else - { - echo ''; - } - -echo nbm( $cum); -?> -'; - } -else - { - echo ''; - } - echo nbm( $cum); -?> -
    -
    - - - - - - - - - - - -
    -
    - - - - -
    -Désolé il y a des formules incorrectes -
      - - - - -
    -
    - \ No newline at end of file diff --git a/sources/include/template/form_ledger_detail.php b/sources/include/template/form_ledger_detail.php deleted file mode 100644 index 29cd8d4..0000000 --- a/sources/include/template/form_ledger_detail.php +++ /dev/null @@ -1,134 +0,0 @@ - -
    -

    get_name()?>

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - - -
    - - - -
    -
    - - - -
    - - - - -
    - - -
    - - -

    - - - - - - - - - - - - - - - - - - - - -'; -echo $item['quick_code']; -echo ''; -?> - -'; -} - -?> -
    Code
    '.$item['bt'].'
    - -
    - -
    - -
    -
    0.0 - -
    0.0 -
    0.0 - - -
    - -
    - -
    -
    -
    - -
    - -
    - - - diff --git a/sources/include/template/form_ledger_fin.php b/sources/include/template/form_ledger_fin.php deleted file mode 100644 index 4d91387..0000000 --- a/sources/include/template/form_ledger_fin.php +++ /dev/null @@ -1,71 +0,0 @@ -
    -
    -

    get_name()?>

    -
    - -value=array( - array('value'=>1,'label'=>_("Avec date d'extrait")), - array('value'=>2,'label'=>_("Avec date opérations")) - ); - $wchdate->selected=(isset($chdate))?$chdate:1; - $wchdate->javascript='onchange="show_fin_chdate(\'chdate\')"'; -?> -input();?> - - - - -
    -
    - - -
    - -
    - -
    - - input();?> - input();?> -
    - -
    - - - - - - - - - - -'; -// echo td($item['dateop']); -echo td($item['dateop'],' style="display:none" id="tdchdate'.$i.'"'); -echo td($item['qcode'].$item['search']); -echo td($item['cname']); -echo td($item['comment']); -echo td($item['amount']); -echo td($item['concerned']); -echo ''; -$i++; - -} -?> -
    code
    -
    -
    - - diff --git a/sources/include/template/history_top.php b/sources/include/template/history_top.php deleted file mode 100644 index 917d20b..0000000 --- a/sources/include/template/history_top.php +++ /dev/null @@ -1,15 +0,0 @@ -
    -⬜ -'; -echo ''; -} -?> -
    diff --git a/sources/include/template/impress_cat_card.php b/sources/include/template/impress_cat_card.php deleted file mode 100644 index 46563b8..0000000 --- a/sources/include/template/impress_cat_card.php +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -
    diff --git a/sources/include/template/impress_reconciliation.php b/sources/include/template/impress_reconciliation.php deleted file mode 100644 index 5da24b9..0000000 --- a/sources/include/template/impress_reconciliation.php +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - -db->execute('detail_quant',array($array[$i]['first']['jr_id'])); - $acc_reconciliation->show_detail($ret); - if ( isset($array[$i]['depend']) ) - { - $tot2=0; - $limit=count($array[$i]['depend'])-1; - for ($e=0;$e'.$r.''; - else - echo tr($r); - $ret=$acc_reconciliation->db->execute('detail_quant',array($array[$i]['depend'][$e]['jr_id'])); - $acc_reconciliation->show_detail($ret); - } - echo tr(td(_('Total ')).td('operation').td(nbm($tot)).td('operations dépendantes').td(nbm($tot2)).td('Delta').td(bcsub($tot,$tot2)),' class="highlight"'); - echo tr(td('
    ',' colspan="6" style="witdh:auto"')); - - } -} -?> -
    - - - - - - - - - - - -
    \ No newline at end of file diff --git a/sources/include/template/impress_reconciliation_detail.php b/sources/include/template/impress_reconciliation_detail.php deleted file mode 100644 index 0d65172..0000000 --- a/sources/include/template/impress_reconciliation_detail.php +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - -
    - - - - - - - - - - - - - -
    - Totaux - - - - - - - - - - - - -
    diff --git a/sources/include/template/ledger_detail_ach.php b/sources/include/template/ledger_detail_ach.php deleted file mode 100644 index 9ead4ec..0000000 --- a/sources/include/template/ledger_detail_ach.php +++ /dev/null @@ -1,255 +0,0 @@ - -
    - - - -
    - - - - - - - - -
    - - - value = format_date($obj->det->jr_date); - echo td(_('Date')) . td($date->input()); - ?> - - - value = format_date($obj->det->jr_ech); - echo td(_('Echeance')) . td($date_ech->input()); - ?> - - - - - - - - - - - - - - - - - - - - -
    - - - value = format_date($obj->det->jr_date_paid); - echo $date_paid->input(); - ?> -
    - det->array[0]['qp_supplier']); - echo td(_('Fournisseur')); - - $view_card_detail = HtmlInput::card_detail($bk->get_quick_code(), h($bk->getName()), ' class="line" '); - echo td($view_card_detail); - ?> -
    - value = strip_tags($obj->det->jr_pj_number); - echo td(_('Pièce')) . td($itext->input()); - ?> -
    - value = strip_tags($obj->det->jr_comment); - $itext->size = 40; - echo td(_('Libellé')) . td($itext->input(), ' colspan="2" '); - ?> -
    Payé - selected = ($obj->det->jr_rapt == 'paid'); - echo $ipaid->input(); - ?> -
    -
    - - - - - - -
    - Note -
    - style=' class="itextarea" style="width:90%;height:100%;"'; - $inote->value = strip_tags($obj->det->note); - echo $inote->input(); - ?> - -
    -
    -
    - - MY_TVA_USE == 'Y') - { - echo th(_('Taux TVA'), 'style="text-align:right"'); - } else - { - echo th(''); - } - echo th(_('Prix/Un.'), 'style="text-align:right"'); - echo th(_('Quantité'), 'style="text-align:right"'); - echo th(_('Non ded'), 'style="text-align:right"'); - - if ($owner->MY_TVA_USE == 'Y') - { - echo th(_('HTVA'), 'style="text-align:right"'); - echo th(_('TVA ND'), 'style="text-align:right"'); - echo th(_('TVA'), 'style="text-align:right"'); - echo th(_('TVAC'), 'style="text-align:right"'); - } else - echo th(_('Total'), 'style="text-align:right"'); - - if ($owner->MY_ANALYTIC != 'nu' ) - { - $anc = new Anc_Plan($cn); - $a_anc = $anc->get_list(' order by pa_id '); - $x = count($a_anc); - /* set the width of the col */ - /* add hidden variables pa[] to hold the value of pa_id */ - $str_anc.=''; - - } - echo ''; - for ($e = 0; $e < count($obj->det->array); $e++) - { - $row = ''; - $q = $obj->det->array[$e]; - $fiche = new Fiche($cn, $q['qp_fiche']); - $qcode=$fiche->strAttribut(ATTR_DEF_QUICKCODE); - $view_card_detail = HtmlInput::card_detail($qcode, "", ' class="line" '); - $row = td($view_card_detail); - $sym_tva = ''; - - if ($owner->MY_TVA_USE == 'Y' && $q['qp_vat_code'] != '') - { - /* retrieve TVA symbol */ - $tva = new Acc_Tva($cn, $q['qp_vat_code']); - $tva->load(); - $sym_tva = h($tva->get_parameter('label')); - } - if ($owner->MY_UPDLAB == 'Y') - { - $l_lib = ($q['j_text'] == '') ? $fiche->strAttribut(ATTR_DEF_NAME) : $q['j_text']; - $hidden = HtmlInput::hidden("j_id[]", $q['j_id']); - $input = new IText("e_march" . $q['j_id'] . "_label", $l_lib); - $input->css_size = "100%"; - } else - { - $input = new ISpan("e_march" . $q['j_id'] . "_label"); - $hidden = HtmlInput::hidden("j_id[]", $q['j_id']); - $input->value = $fiche->strAttribut(ATTR_DEF_NAME); - } - $row.=td($input->input() . $hidden); - $row.=td($sym_tva, 'style="text-align:center"'); - $pu = 0; - if ($q['qp_quantite'] != 0) - $pu = bcdiv($q['qp_price'], $q['qp_quantite']); - $row.=td(nbm($pu), 'class="num"'); - $row.=td(nbm($q['qp_quantite']), 'class="num"'); - - $no_ded = bcadd($q['qp_dep_priv'], $q['qp_nd_amount']); - $row.=td(nbm($no_ded), ' style="text-align:right"'); - $htva = $q['qp_price']; - - - $row.=td(nbm($htva), 'class="num"'); - $tvac = bcadd($htva, $q['qp_vat']); - $tvac = bcadd($tvac, $q['qp_nd_tva']); - $tvac = bcadd($tvac, $q['qp_nd_tva_recup']); - $tvac = bcsub ($tvac,$q['qp_vat_sided']); - - if ($owner->MY_TVA_USE == 'Y') - { - $tva_amount_nd = bcadd($q['qp_nd_tva_recup'], $q['qp_nd_tva']); - $class = ""; - if ($q['qp_vat_sided'] <> 0) - { - $class = ' style="text-decoration:line-through"'; - } - $row.=td(nbm($tva_amount_nd), 'class="num" ' . $class); - $row.=td(nbm($q['qp_vat']), 'class="num" ' . $class); - $row.=td(nbm($tvac), 'class="num"'); - } - $total_tvac=bcadd($total_tvac,$tvac); - $total_htva=bcadd($htva,$total_htva); - /* Analytic accountancy */ - if ($owner->MY_ANALYTIC != "nu" /*&& $div == 'popup'*/ ) - { - $poste = $fiche->strAttribut(ATTR_DEF_ACCOUNT); - if (preg_match('/^(6|7)/', $poste)) - { - $anc_op = new Anc_Operation($cn); - $anc_op->j_id = $q['j_id']; - $anc_op->in_div=$div; - echo HtmlInput::hidden('op[]', $anc_op->j_id); - /* compute total price */ - bcscale(2); - $str_anc.=''; - $str_anc.=td($qcode); - $str_anc.=td(nbm($htva)); - $str_anc.=$anc_op->display_table(1, $htva, $div); - } else - { - $row.=td(''); - } - } - $class=($e%2==0)?' class="even"':'class="odd"'; - echo tr($row,$class); - } - if ($owner->MY_TVA_USE == 'Y') - $row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;width:auto" colspan="6"'); - else - $row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;width:auto" colspan="6"'); - $row.=td(nbm($total_htva), 'class="num" style="font-style:italic;font-weight: bolder;"'); - if ($owner->MY_TVA_USE == 'Y') - $row.=td("") . td("").td(nbm($total_tvac), 'class="num" style="font-style:italic;font-weight: bolder;"'); - echo tr($row); - ?> -
    CodeMontant' . _('Compt. Analytique') . Anc_Plan::hidden($a_anc).'
    - - -
    - - - -
    diff --git a/sources/include/template/ledger_detail_bottom.php b/sources/include/template/ledger_detail_bottom.php deleted file mode 100644 index bde34bc..0000000 --- a/sources/include/template/ledger_detail_bottom.php +++ /dev/null @@ -1,334 +0,0 @@ -
    -jr_id=$jr_id; -$aRap=$oRap->get(); - -// Detail of operation - $detail = new Acc_Misc($cn, $obj->jr_id); - $detail->get(); - - $nb_document=($detail->det->jr_pj_name != "")?1:0; - - -// Array of tab -// -$a_tab['writing_div']=array('id'=>'writing_div'.$div,'label'=>_('Ecriture Comptable'),'display'=>'none'); -$a_tab['info_operation_div']=array('id'=>'info_operation_div'.$div,'label'=>_('Information'),'display'=>'none'); -$a_tab['linked_operation_div']=array('id'=>'linked_operation_div'.$div,'label'=>_('Opérations liées').'('.count($aRap).')','display'=>'none'); -$a_tab['document_operation_div']=array('id'=>'document_operation_div'.$div,'label'=>_('Document').'('.$nb_document.')','display'=>'block'); -$a_tab['linked_action_div']=array('id'=>'linked_action_div'.$div,'label'=>_('Actions Gestion').'('.count($a_followup).')','display'=>'none'); -$a_tab['analytic_div']=array('id'=>'analytic_div'.$div,'label'=>_('Comptabilité Analytique'),'display'=>'none'); - - -// show tabs -if ( $div != "popup") : - $a_tab['document_operation_div']['display']='block'; -?> -
      - $a_value): ?> - -
    • - - -
    • - -
    -$a_value): - $a_tab[$idx]['display']='block'; - endforeach; -endif; -?> - - -info->command); - $other=new IText('OTHER',$obj->info->other); -?> -
    - -

    - - -
    - - - - '; - for ($e = 0; $e < count($detail->det->array); $e++) - { - $row = ''; - $q = $detail->det->array; - $view_history = sprintf('%s', $q[$e]['j_poste'], $gDossier, $q[$e]['j_poste']); - - $row.=td($view_history); - if ($q[$e]['j_qcode'] != '') - { - $fiche = new Fiche($cn); - $fiche->get_by_qcode($q[$e]['j_qcode']); - $view_history = sprintf('%s', $fiche->id, $gDossier, $q[$e]['j_qcode']); - } else - $view_history = ''; - $row.=td($view_history); - - if ($q[$e]['j_text']=="") - { - if ($q[$e]['j_qcode'] != '') - { - // nom de la fiche - $ff = new Fiche($cn); - $ff->get_by_qcode($q[$e]['j_qcode']); - $row.=td($ff->strAttribut(h(ATTR_DEF_NAME))); - } else - { - // libellé du compte - $name = $cn->get_value('select pcm_lib from tmp_pcmn where pcm_val=$1', array($q[$e]['j_poste'])); - $row.=td(h($name)); - } - } - else - $row.=td(h($q[$e]['j_text'])); - - $montant = td(nbm($q[$e]['j_montant']), 'class="num"'); - $row.=($q[$e]['j_debit'] == 't') ? $montant : td(''); - $row.=($q[$e]['j_debit'] == 'f') ? $montant : td(''); - $class=($e%2==0)?' class="even"':'class="odd"'; - - echo tr($row,$class); - } - ?> -
    -
    -
    -
    - -

    - - - - - - - - -
    : input(); ?>
    : input();?>
    -
    -
    - -

    - -'; - for ($e=0;$ejr_id=$aRap[$e]; - $internal=$opRap->get_internal(); - $array_jr=$cn->get_array('select jr_date,jr_montant,jr_comment from jrn where jr_id=$1',array($aRap[$e])); - $amount=$array_jr[0]['jr_montant']; - $str="modifyOperation(".$aRap[$e].",".$gDossier.")"; - $rmReconciliation=new IButton('rmr'); - $rmReconciliation->label=SMALLX; - $rmReconciliation->class="tinybutton"; - $rmReconciliation->javascript="return confirm_box(null,'"._("vous confirmez?")."',"; - $rmReconciliation->javascript.=sprintf('function () { dropLink(\'%s\',\'%s\',\'%s\',\'%s\');deleteRowRec(\'%s\',$(\'row%d\'));})', - $gDossier, - $div, - $jr_id, - $aRap[$e], - $tableid, - $e - ); - if ( $access=='W') - $remove=$rmReconciliation->input(); - else - $remove=''; - - $comment=strip_tags($array_jr[0]['jr_comment']); - echo tr (td(format_date($array_jr[0]['jr_date'])). - td(''.$internal.''). - td($comment). - td(nbm($amount)). - td($remove),' id = "row'.$e.'"'); - } - echo ''; -} -?> -amount_id=$obj->det->jr_montant; - echo $wConcerned->input(); - -} -?> -
    -
    - -

    - -'; -for ($i = 0; $i < count($a_followup); $i++) -{ - $remove=''; - if ( $access=='W') $remove=HtmlInput::button_action_remove_operation($a_followup[$i]['ago_id']); - if ( $div == 'popup') - { - echo '
  • '.HtmlInput::detail_action($a_followup[$i]['ag_id'], h($a_followup[$i]['ag_ref']." ".$a_followup[$i]['ag_title']),0).$remove.'
  • '; - } - else - { - echo '
  • '.HtmlInput::detail_action($a_followup[$i]['ag_id'], h($a_followup[$i]['ag_ref']." ".$a_followup[$i]['ag_title']),1).$remove.'
  • '; - } -} -echo ''; -$related=new IRelated_Action('related'); -$related->id='related'.$div; - if ( $access=='W') echo $related->input(); -echo '
    '; -?> - - - - -
    - -

    - - MY_ANALYTIC != "nu") : - if ( strpos($str_anc,'') == true ): - ?> - - - -
    - - - - - - - - - - -
    - -
    -'; - -if ( $div != 'popup' ) { - $a=new IButton('Fermer',_('Fermer')); - $a->label=_("Fermer"); - $a->javascript="removeDiv('".$div."')"; - echo $a->input(); -} else { - echo HtmlInput::hidden('p_jrn',$oLedger->id); -} - -?> - -MY_ANALYTIC != 'nu' /*&& $div=='popup' */){ - echo ''; - } - - $per=new Periode($cn,$obj->det->jr_tech_per); - if ( $per->is_closed() == 0 && $owner->MY_STRICT=='N' && $g_user->check_action(RMOPER)==1) - { - $remove=new IButton('Effacer'); - $remove->label=_('Effacer'); - $remove->javascript="return confirm_box(null,'Vous confirmez effacement ?',function () {removeOperation('".$obj->det->jr_id."',".dossier::id().",'".$div."')})"; - echo $remove->input(); - } - - $reverse=new IButton('bext'.$div); - $reverse->label=_('Extourner'); - $reverse->javascript="g('ext".$div."').style.display='block'"; - echo $reverse->input(); - echo '

    '; -echo ''; - - echo ''; - - - -}else { - echo '

    '; -} -?> diff --git a/sources/include/template/ledger_detail_file.php b/sources/include/template/ledger_detail_file.php deleted file mode 100644 index bbc64f1..0000000 --- a/sources/include/template/ledger_detail_file.php +++ /dev/null @@ -1,16 +0,0 @@ - - -
    - -
    \ No newline at end of file diff --git a/sources/include/template/ledger_detail_fin.php b/sources/include/template/ledger_detail_fin.php deleted file mode 100644 index e3b5fcd..0000000 --- a/sources/include/template/ledger_detail_fin.php +++ /dev/null @@ -1,146 +0,0 @@ - -
    - - -
    - - - - - - - -
    - - -value=format_date($obj->det->jr_date); - echo td(_('Date')).td($date->input()); - - ?> - - - - -det->array[0]['qf_bank']); -$view_card_detail=HtmlInput::card_detail($bk->get_quick_code(),h($bk->getName()), ' class="line" '); -echo td(_('Compte en banque')).td($view_card_detail).td();; - -?> - - -det->array[0]['qf_other']); -$view_card_detail=HtmlInput::card_detail($bk->get_quick_code(),h($bk->getName()), ' class="line" '); - -echo td(_('Tiers')).td($view_card_detail); -?> - - - -value=strip_tags($obj->det->jr_comment); - $itext->size=40; - echo td(_('Libellé')).td($itext->input(),' colspan="2" style="width:auto"'); - - -?> - - -det->array[0]['qf_amount']),' class="inum"');?> - - -value=strip_tags($obj->det->jr_pj_number); -echo td(_('Pièce')).td($itext->input()); -?> - - -
    -
    - - - - - - -
    - Note -
    - style=' class="itextarea" style="width:90%;height:100%;"'; - $inote->value = strip_tags($obj->det->note); - echo $inote->input(); - ?> - -
    -
    - - -
    -jr_id); - $detail->get(); -?> -MY_ANALYTIC != 'nu' /*&& $div == 'popup'*/){ - $anc=new Anc_Plan($cn); - $a_anc=$anc->get_list(' order by pa_id '); - $x=count($a_anc); - /* set the width of the col */ - $str_anc .= ''._('Compt. Analytique').''; - - /* add hidden variables pa[] to hold the value of pa_id */ - $str_anc .= Anc_Plan::hidden($a_anc); - } - bcscale(2); - for ($e=0;$edet->array);$e++) { - $row=''; $q=$detail->det->array; - $fiche=new Fiche($cn); - $fiche->get_by_qcode($q[$e]['j_qcode']); - /* Analytic accountancy */ - if ( $owner->MY_ANALYTIC != "nu" /*&& $div == 'popup'*/) - { - $poste=$fiche->strAttribut(ATTR_DEF_ACCOUNT); - if ( preg_match('/^(6|7)/',$q[$e]['j_poste'])) - { - $qcode=$fiche->strAttribut(ATTR_DEF_QUICKCODE); - $anc_op=new Anc_Operation($cn); - $anc_op->j_id=$q[$e]['j_id']; - $anc_op->in_div=$div; - $str_anc.=''; - $str_anc.=td($poste); - $str_anc.=td($qcode); - $str_anc.=td(nbm($q[$e]['j_montant'])); - $str_anc.=''; - $str_anc.= HtmlInput::hidden('op[]',$anc_op->j_id); - $montant=($q[$e]['j_debit'] == "t")?$q[$e]['j_montant']:bcmul($q[$e]['j_montant'], -1); - $str_anc.=$anc_op->display_table(1,$montant,$div); - $str_anc.=''; - $str_anc.=''; - - } - } - } -?> -
    - -
    \ No newline at end of file diff --git a/sources/include/template/ledger_detail_forbidden.php b/sources/include/template/ledger_detail_forbidden.php deleted file mode 100644 index 8246c50..0000000 --- a/sources/include/template/ledger_detail_forbidden.php +++ /dev/null @@ -1,6 +0,0 @@ -
    -

    ; -
    \ No newline at end of file diff --git a/sources/include/template/ledger_detail_misc.php b/sources/include/template/ledger_detail_misc.php deleted file mode 100644 index 8e2bcbc..0000000 --- a/sources/include/template/ledger_detail_misc.php +++ /dev/null @@ -1,192 +0,0 @@ - - -
    - - - - - - - - - - - - -
    - - - - - - - - - - - - - - -
    - value=format_date($obj->det->jr_date); - echo td(_('Date')).td($date->input()); - - ?> -
    - value=strip_tags($obj->det->jr_comment); - $itext->size=40; - echo td(_('Libellé')).td($itext->input()); - - - ?> -
    - det->jr_montant),' class="inum"');?> -
    - value=strip_tags($obj->det->jr_pj_number); - echo td(_('Pièce')).td($itext->input()); - ?> -
    -
    - - - - - - -
    - Note -
    - style=' class="itextarea" style="width:90%;height:100%;"'; - $inote->value = strip_tags($obj->det->note); - echo $inote->input(); - ?> - -
    -
    - -
    - - - -MY_ANALYTIC != 'nu' /* && $div == 'popup' */ ){ - $anc=new Anc_Plan($cn); - $a_anc=$anc->get_list(' order by pa_id '); - $x=count($a_anc); - /* set the width of the col */ - $str_anc.=''; - - /* add hidden variables pa[] to hold the value of pa_id */ - $str_anc.= Anc_Plan::hidden($a_anc); - } -echo ''; -$amount_idx=0; - for ($e=0;$edet->array);$e++) { - $row=''; $q=$obj->det->array; - $view_history= sprintf('%s', - $q[$e]['j_poste'], $gDossier, $q[$e]['j_poste']); - - $row.=td($view_history); - - if ( $q[$e]['j_qcode'] !='') { - $fiche=new Fiche($cn); - $fiche->get_by_qcode($q[$e]['j_qcode']); - $view_history= sprintf('%s', - $fiche->id, $gDossier, $q[$e]['j_qcode']); - } - else - $view_history=''; - $row.=td($view_history); - $l_lib = $q[$e]['j_text'] ; - - if ( $l_lib!='') - { - $l_lib=$q[$e]['j_text']; - } - else if ( $q[$e]['j_qcode'] !='') { - // nom de la fiche - $ff=new Fiche($cn); - $ff->get_by_qcode( $q[$e]['j_qcode']); - $l_lib=$ff->strAttribut(ATTR_DEF_NAME); - } else { - // libellé du compte - $name=$cn->get_value('select pcm_lib from tmp_pcmn where pcm_val=$1',array($q[$e]['j_poste'])); - $l_lib=$name; - } - $l_lib=strip_tags($l_lib); - if ($owner->MY_UPDLAB == 'Y') - { - $hidden = HtmlInput::hidden("j_id[]", $q[$e]['j_id']); - $input = new IText("e_march" . $q[$e]['j_id'] . "_label", $l_lib); - $input->css_size="100%"; - } - else - { - $input = new ISpan("e_march" . $q[$e]['j_id'] . "_label"); - $input->value=$l_lib; - $hidden = HtmlInput::hidden("j_id[]", $q[$e]['j_id']); - } - $row.=td($input->input().$hidden); - $montant=td(nbm($q[$e]['j_montant']),'class="num"'); - $row.=($q[$e]['j_debit']=='t')?$montant:td(''); - $row.=($q[$e]['j_debit']=='f')?$montant:td(''); - /* Analytic accountancy */ - if ( $owner->MY_ANALYTIC != "nu" /*&& $div=='popup'*/){ - if ( preg_match('/^(6|7)/',$q[$e]['j_poste'])) { - - echo HtmlInput::hidden("amount_t".$amount_idx,$q[$e]['j_montant']); - $anc_op=new Anc_Operation($cn); - $anc_op->j_id=$q[$e]['j_id']; - $anc_op->in_div=$div; - $str_anc.=''; - $str_anc.=HtmlInput::hidden('op[]',$anc_op->j_id); - $str_anc.=td($q[$e]['j_qcode']); - $str_anc.=td($q[$e]['j_poste']); - $str_anc.=td($q[$e]['j_montant']); - $str_anc.=$anc_op->display_table(1,$q[$e]['j_montant'],$div); - $str_anc.=''; - $amount_idx++; - } else { - $row.=td(''); - } - } - $class=($e%2==0)?' class="even"':'class="odd"'; - - echo tr($row,$class); - - } -?> -
    CodePosteMontant' . _('Compt. Analytique') . '
    -
    - -
    diff --git a/sources/include/template/ledger_detail_top.php b/sources/include/template/ledger_detail_top.php deleted file mode 100644 index 7f6ca24..0000000 --- a/sources/include/template/ledger_detail_top.php +++ /dev/null @@ -1,30 +0,0 @@ -
    -Dossier::id(), - 'jr_id'=>$obj->det->jr_id, - 'act'=>'de', - 'div'=>$div, - 'ajax'=>$callback)); - $msg_close=_('Fermer'); - $msg_pop=_('Ouvrir dans une fenêtre séparée'); - - echo '⬜ -'; - echo ''; - } -?> -
    -
    - get_name(),'class="title"'); ?> -
    -det->jr_internal); ?> -
    - \ No newline at end of file diff --git a/sources/include/template/ledger_detail_ven.php b/sources/include/template/ledger_detail_ven.php deleted file mode 100644 index 4ba39d4..0000000 --- a/sources/include/template/ledger_detail_ven.php +++ /dev/null @@ -1,256 +0,0 @@ - - -
    - - - - - - - - - - - - -
    - - - - - value = format_date($obj->det->jr_date); - echo td(_('Date')) . td($date->input()); - ?> - - - - value = format_date($obj->det->jr_ech); - echo td(_('Echeance')) . td($date_ech->input()); - ?> - - - - - - - - - - - - - - - - - - - -
    - - -value = format_date($obj->det->jr_date_paid); -echo $date_paid->input(); -?> -
    -det->array[0]['qs_client']); -echo td(_('Client')); - -$view_card_detail = HtmlInput::card_detail($bk->get_quick_code(), h($bk->getName()), ' class="line" '); -echo td($view_card_detail); -?> -
    -value = strip_tags($obj->det->jr_pj_number); -echo td(_('Pièce')) . td($itext->input()); -?> -
    -value = strip_tags($obj->det->jr_comment); -$itext->size = 40; -echo td(_('Libellé')) . td($itext->input(), ' colspan="2" '); -?> -
    -selected = ($obj->det->jr_rapt == 'paid'); -echo $ipaid->input(); -?> -
    -
    - - - - - - -
    - Note -
    - style=' class="itextarea" style="width:90%;height:100%;"'; - $inote->value = strip_tags($obj->det->note); - echo $inote->input(); - ?> - -
    -
    -
    - - MY_TVA_USE == 'Y') - echo th(_('Taux TVA'), 'style="text-align:right"'); - else - echo th(''); - if ($owner->MY_TVA_USE == 'Y') - { - echo th(_('HTVA'), 'style="text-align:right"'); - echo th(_('TVA'), 'style="text-align:right"'); - echo th(_('TVAC'), 'style="text-align:right"'); - } else - echo th(_('Total'), 'style="text-align:right"'); - - if ($owner->MY_ANALYTIC != 'nu' /*&& $div == 'popup'*/) - { - $anc = new Anc_Plan($cn); - $a_anc = $anc->get_list(" order by pa_id "); - $x = count($a_anc); - /* set the width of the col */ - /* add hidden variables pa[] to hold the value of pa_id */ - $str_anc.=''.''; - - } - - echo ''; - for ($e = 0; $e < count($obj->det->array); $e++) - { - $row = ''; - $q = $obj->det->array[$e]; - $fiche = new Fiche($cn, $q['qs_fiche']); - $qcode=$fiche->strAttribut(ATTR_DEF_QUICKCODE); - $view_card_detail = HtmlInput::card_detail($qcode, "", ' class="line" '); - $row.=td($view_card_detail); - if ($owner->MY_UPDLAB == 'Y') - { - $l_lib = ($q['j_text'] == '') ? $fiche->strAttribut(ATTR_DEF_NAME) : $q['j_text']; - $hidden = HtmlInput::hidden("j_id[]", $q['j_id']); - $input = new IText("e_march" . $q['j_id'] . "_label", $l_lib); - $input->css_size = "100%"; - } else - { - $input = new ISpan("e_march" . $q['j_id'] . "_label"); - $hidden = HtmlInput::hidden("j_id[]", $q['j_id']); - $input->value = $fiche->strAttribut(ATTR_DEF_NAME); - } - - $row.=td($input->input() . $hidden); - $sym_tva = ''; - $pu = 0; - if ($q['qs_quantite'] != 0) - $pu = bcdiv($q['qs_price'], $q['qs_quantite']); - $row.=td(nbm($pu), 'class="num"'); - $row.=td(nbm($q['qs_quantite']), 'class="num"'); - $sym_tva = ''; - if ($owner->MY_TVA_USE == 'Y' && $q['qs_vat_code'] != '') - { - /* retrieve TVA symbol */ - $tva = new Acc_Tva($cn, $q['qs_vat_code']); - $tva->load(); - $sym_tva = (h($tva->get_parameter('label'))); - // $sym_tva=$sym - } - - $row.=td($sym_tva, 'style="text-align:center"'); - - $htva = $q['qs_price']; - - $row.=td(nbm($htva), 'class="num"'); - $tvac = bcadd($htva, $q['qs_vat']); - if ($owner->MY_TVA_USE == 'Y') - { - $class = ""; - if ($q['qs_vat_sided'] != 0) - { - $class = ' style="text-decoration:line-through"'; - $tvac = bcsub($tvac, $q['qs_vat']); - } - $row.=td(nbm($q['qs_vat']), 'class="num"' . $class); - $row.=td(nbm($tvac), 'class="num"'); - } - $total_tvac = bcadd($total_tvac, $tvac); - $total_htva = bcadd($total_htva, $htva); - /* Analytic accountancy */ - if ($owner->MY_ANALYTIC != "nu" /*&& $div == 'popup' */ ) - { - $poste = $fiche->strAttribut(ATTR_DEF_ACCOUNT); - if (preg_match('/^(6|7)/', $poste)) - { - $anc_op = new Anc_Operation($cn); - $anc_op->in_div=$div; - $anc_op->j_id = $q['j_id']; - echo HtmlInput::hidden('op[]', $anc_op->j_id); - /* compute total price */ - bcscale(2); - $str_anc.=''; - $str_anc.=td($qcode); - $str_anc.=td(nbm($htva)); - $str_anc.=$anc_op->display_table(1, $htva, $div).''; - // $row.=($div == 'popup') ? $anc_op->display_table(1, $htva, $div):""; - } else - { - $row.=td(''); - } - } - $class=($e%2==0)?' class="even"':'class="odd"'; - echo tr($row,$class); - } - if ($owner->MY_TVA_USE == 'Y') - $row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;" colspan="5"'); - else - $row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;" colspan="5"'); - $row.=td(nbm($total_htva), 'class="num" style="font-style:italic;font-weight: bolder;"'); - if ($owner->MY_TVA_USE == 'Y') - $row.=td("") . td(nbm($total_tvac), 'class="num" style="font-style:italic;font-weight: bolder;"'); - echo tr($row); - ?> -
    CodeMontant' . _('Compt. Analytique') .Anc_Plan::hidden($a_anc). '
    - - - - - - -
    - - diff --git a/sources/include/template/ledger_search.php b/sources/include/template/ledger_search.php deleted file mode 100644 index d0e4180..0000000 --- a/sources/include/template/ledger_search.php +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - -
    - - -input(); ?> input(); ?> -
    - - -input(); ?> input(); ?> -
    - - -input(); ?> -
    - - -input(); ?> input(); ; ?> -
    - - - input(); echo $f_qcode->search(); ?> -
    - - -input(); ?> -
    - - -input(); ?> -
    - diff --git a/sources/include/template/letter_all.php b/sources/include/template/letter_all.php deleted file mode 100644 index 836809f..0000000 --- a/sources/include/template/letter_all.php +++ /dev/null @@ -1,118 +0,0 @@ -content) == 0 ) : -?> -

    - - - - - - - - - - - - - - -content);$i++): - $class=""; -$class= ( ($i % 2) == 0 ) ? "odd":"even"; -?> - > - - - - -%s', - $this->content[$i]['jr_id'], $gDossier, $this->content[$i]['jr_internal']); -?> - - - content[$i]['j_debit']=='t') : ?> - - - - - - - - - - -
    - - - - - - - - - - - - - - - -
    -content[$i]['letter']==-1)?" aucun lettrage ":strtoupper(base_convert($this->content[$i]['letter'],10,36)); -$js="this.gDossier=".dossier::id(). - ";this.j_id=".$this->content[$i]['j_id']. - ";this.obj_type='".$this->object_type."'". - ";dsp_letter(this)"; - -?> - -content[$i]['letter_diff'] != 0) echo $g_failed; ?> - - content[$i]['j_date_fmt'])?> content[$i]['jr_pj_number']?> content[$i]['jr_comment'])?> content[$i]['j_montant'])?> content[$i]['j_montant'])?> -db); - $rec->set_jr_id($this->content[$i]['jr_id']); - $a=$rec->get(); - if ( $a != null ) { - foreach ($a as $key => $element) - { - $operation=new Acc_Operation($this->db); - $operation->jr_id=$element; - $l_amount=$this->db->get_value("select jr_montant from jrn ". - " where jr_id=$element"); - echo " ".$operation->get_internal()." [ ".nb($l_amount)." € ]"; - }//for - }// if ( $a != null ) { -// compute amount -$amount_deb+=($this->content[$i]['j_debit']=='t')?$this->content[$i]['j_montant']:0; -$amount_cred+=($this->content[$i]['j_debit']=='f')?$this->content[$i]['j_montant']:0; - -?> -
    -

    :

    -

    :

    - 0 ) : -?> -

    :

    - -

    :

    - diff --git a/sources/include/template/letter_prop.php b/sources/include/template/letter_prop.php deleted file mode 100644 index 6ff77de..0000000 --- a/sources/include/template/letter_prop.php +++ /dev/null @@ -1,165 +0,0 @@ -content) == 0 ) : -?> -

    - - - - - - - - - - - - - - -content=array_merge($this->linked,$this->content); -$amount_deb=($j_debit=='t')?$amount_init:0; -$amount_cred=($j_debit=='f')?$amount_init:0; - -$linked_limit=count($this->linked); - -for ($i=0;$icontent);$i++): - $class=""; -$class= ( ($i % 2) == 0 ) ? "odd":"even"; -if ( $i < $linked_limit ) $class="even"; -if ($linked_limit != 0 && $i==$linked_limit) -{ - ?> - - - - - - - - - - - - > - - - -%s', - $this->content[$i]['jr_id'], $gDossier, $this->content[$i]['jr_internal']); -?> - - - content[$i]['j_debit']=='t') : ?> - - - - - - - - - -content[$i]['letter'] && $this->content[$i]['j_debit']=='t')?$this->content[$i]['j_montant']:0; - $amount_cred+=( $jnt_id == $this->content[$i]['letter'] && $this->content[$i]['j_debit']=='f')?$this->content[$i]['j_montant']:0; -} - endfor; -$delta = bcsub($amount_deb, $amount_cred); -$side = _('Créditeur'); -if ($delta < 0 ) { -$side = _("Débiteur"); -$delta = abs($delta); -} -?> -
    - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - -
    -content[$i]['j_id']==$p_jid) continue; -if ( $jnt_id == $this->content[$i]['letter'] && $i >= $linked_limit) continue; - -$check=new ICheckbox('ck[]',$this->content[$i]['j_id']); -if ( $jnt_id == $this->content[$i]['letter'] && $i < $linked_limit) $check->selected=true; else $check->selected=false; - -if ( $this->content[$i]['letter'] < 0 || $check->selected == true ) - echo $check->input(); -echo HtmlInput::hidden('letter_j_id[]',$this->content[$i]['j_id']); -?> - -content[$i]['letter']< 0)?" ":strtoupper(base_convert($this->content[$i]['letter'],10,36)); -?> - - content[$i]['j_date_fmt'])?> content[$i]['jr_comment']?> content[$i]['j_montant'])?> content[$i]['j_montant'])?> -db); - $rec->set_jr_id($this->content[$i]['jr_id']); - $a=$rec->get(); - if ( $a != null ) { - foreach ($a as $key => $element) - { - $operation=new Acc_Operation($this->db); - $operation->jr_id=$element; - $l_amount=$this->db->get_value("select jr_montant from jrn ". - " where jr_id=$element"); - echo " ".$operation->get_internal()." [ $l_amount € ]"; - }//for - }// if ( $a != null ) { - -?> -
    -

    - - - - - - - \ No newline at end of file diff --git a/sources/include/template/list_category_document.php b/sources/include/template/list_category_document.php deleted file mode 100644 index 13159b3..0000000 --- a/sources/include/template/list_category_document.php +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - -
    - - - - - -
    - - \ No newline at end of file diff --git a/sources/include/template/list_mod_payment.php b/sources/include/template/list_mod_payment.php deleted file mode 100644 index 5bd9a68..0000000 --- a/sources/include/template/list_mod_payment.php +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - > - - - - - - - - - - - -
    - get_header(0)?> - - get_header(1)?> - - get_header(2)?> - - get_header(3)?> - - get_header(4)?> - - -
    - - - - - - - - - - - -
    \ No newline at end of file diff --git a/sources/include/template/menu.php b/sources/include/template/menu.php deleted file mode 100644 index 5c46026..0000000 --- a/sources/include/template/menu.php +++ /dev/null @@ -1,89 +0,0 @@ -
    - 4 && $level == 0) : - $style ='style= "width:100%"'; - elseif ($level==0): -switch (count($amenu)) -{ -case 4: -case 3: - $width=count($amenu)*20; - $left=round((100-$width)/2); -$style="style=\"width:$width%;margin-left:$left%\""; -break; -default: -$style=""; -} - else: - $style=" class=\"mtitle\""; - - endif;?> - > - - - - - - 1 && - $url.'/'.$amenu[$i]['me_code'] == $a_request[0].'/'.$a_request[1]) - $class="selectedcell"; - } elseif ($level == 1) - { - $url=$a_request[0].'/'.$a_request[1]; - } - $url.='/'.$amenu[$i]['me_code']; - if ($url == $_REQUEST['ac']) $class="selectedcell"; - $url="do.php?gDossier=".Dossier::id()."&ac=".$url; - } - -?> - - - - - - - -
    - - - - - title=""> - - -
    -
    diff --git a/sources/include/template/menu_detail.php b/sources/include/template/menu_detail.php deleted file mode 100644 index 954a10f..0000000 --- a/sources/include/template/menu_detail.php +++ /dev/null @@ -1,89 +0,0 @@ -me_code); -if ( $m->me_code != -1) $str_code->setReadOnly (true); - -$str_menu=new IText('me_menu',$m->me_menu); -$str_desc=new IText('me_description',$m->me_description); -$str_file=new IText('me_file',$m->me_file); -$str_url=new IText('me_url',$m->me_url); -$str_parameter=new IText('me_parameter',$m->me_parameter); -$str_js=new IText('me_javascript',$m->me_javascript); -$a_type=array ( - array ('label'=>_('Impression'),'value'=>'PR' ), - array ('label'=>_('Menu'),'value'=>'ME' ) - ); -$str_type=new ISelect("me_type", $a_type); -$str_type->selected=$m->me_type; -?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - input()?> -
    - - - input()?> -
    - - - input()?> -
    - - - input();?> -
    - - - input()?> -
    - URL - - input()?> -
    - - - input()?> -
    - Javascript - - input()?> -
    diff --git a/sources/include/template/modele_document.php b/sources/include/template/modele_document.php deleted file mode 100644 index 679b824..0000000 --- a/sources/include/template/modele_document.php +++ /dev/null @@ -1,121 +0,0 @@ - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -value=$doc->md_name; -echo $a->input(); -?> -
    - - -name="md_type"; - - $w->value=$cn->make_array('select dt_id,dt_value from document_type order by dt_value'); - $w->selected=$doc->md_type; - echo $w->input(); -?> - -
    - - -name='md_affect'; - $waffect->value=array( - array('value'=>'ACH','label'=>_('Uniquement journaux achat')), - array('value'=>'VEN','label'=>_('Uniquement journaux vente')), - array('value'=>'GES','label'=>_('Partie gestion')) - ); - $waffect->selected=$doc->md_affect; - echo $waffect->input(); -?> -
    - -md_id.'&'.$s.'">(fichier actuel)'; -?> - -input(); - - -?> -
    - - -exist_sequence("seq_doc_type_".$doc->md_type) ) - { - $ret= $cn->get_array("select last_value,is_called from seq_doc_type_".$doc->md_type) ; - - $last=$ret[0]['last_value']; - /*! - *\note With PSQL sequence , the last_value column is 1 when before AND after the first call, to make the difference between them - * I have to check whether the sequence has been already called or not */ - if ($ret[0]['is_called']=='f' ) $last--; - } -echo $last; -?> -
    - - -value=0; -echo $pj->input(); -?> -
    -md_id); -echo HtmlInput::submit("mod",_('Sauver')); - -?> -
    \ No newline at end of file diff --git a/sources/include/template/module.php b/sources/include/template/module.php deleted file mode 100644 index 7754671..0000000 --- a/sources/include/template/module.php +++ /dev/null @@ -1,99 +0,0 @@ -
    -
    - -
    -
    -
    - -get_value("select count(*) from profile join profile_user using (p_id) - where user_name=$1 and with_calc=true",array($_SESSION['g_user'])) ==1): - echo '
    '; - echo IButton::show_calc(); -echo '
    '; -endif; - -if ( $cn->get_value("select count(*) from profile join profile_user using (p_id) - where user_name=$1 and with_direct_form=true",array($_SESSION['g_user'])) ==1): -?> -
    -
    - - - style='class="input_text"'; - $direct->value=''; - $direct->size=20; - echo $direct->input(); - $gDossier=dossier::id(); - ?> -
    - - -
    - -
    - - -
    - -
    - - - "; - continue; - } - $style="tool"; - if ($row['me_code']==$selected_module) - { - $style='toolselected'; - } - if ( $row['me_url']!='') - { - $url=$row['me_url']; - } - elseif ($row['me_javascript'] != '') - { - $url="javascript:void(0)"; - $js_dossier=str_replace('', Dossier::id(), $row['me_javascript']); - $js=sprintf(' onclick="%s"',$js_dossier); - } - else - { - $url="do.php?gDossier=".Dossier::id()."&ac=".$row['me_code']; - } - ?> - - - -
    - >
    - -
    - -
    -
    diff --git a/sources/include/template/new_mod_payment.php b/sources/include/template/new_mod_payment.php deleted file mode 100644 index 2d06179..0000000 --- a/sources/include/template/new_mod_payment.php +++ /dev/null @@ -1,55 +0,0 @@ -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - -
    - - - -
    - - - -
    - - - -
    - - - -
    - -
    \ No newline at end of file diff --git a/sources/include/template/operation_detail_ach.php b/sources/include/template/operation_detail_ach.php deleted file mode 100644 index bff3105..0000000 --- a/sources/include/template/operation_detail_ach.php +++ /dev/null @@ -1,126 +0,0 @@ - - - MY_TVA_USE == 'Y') - { - echo th(_('Taux TVA'), 'style="text-align:right"'); - } - else - { - echo th(''); - } - echo th(_('Prix/Un.'), 'style="text-align:right"'); - echo th(_('Quantité'), 'style="text-align:right"'); - echo th(_('Personnel'), 'style="text-align:right"'); - echo th(_('Non ded'), 'style="text-align:right"'); - - if ($g_parameter->MY_TVA_USE == 'Y') - { - echo th(_('HTVA'), 'style="text-align:right"'); - echo th(_('TVA NP'), 'style="text-align:right"'); - echo th(_('TVA'), 'style="text-align:right"'); - echo th(_('TVAC'), 'style="text-align:right"'); - }else - echo th(_('Total'), 'style="text-align:right"'); - - echo ''; - for ($e = 0; $e < count($obj->det->array); $e++) - { - $row = ''; - $q = $obj->det->array[$e]; - $fiche = new Fiche($cn, $q['qp_fiche']); - $view_card_detail = HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE), "", ' class="line" '); - $row = td($view_card_detail); - $sym_tva = ''; - - if ($g_parameter->MY_TVA_USE == 'Y' && $q['qp_vat_code'] != '') - { - /* retrieve TVA symbol */ - $tva = new Acc_Tva($cn, $q['qp_vat_code']); - $tva->load(); - $sym_tva = h($tva->get_parameter('label')); - } - $input = new ISpan("e_march" . $q['j_id'] . "_label"); - $hidden = HtmlInput::hidden("j_id[]", $q['j_id']); - $input->value = $fiche->strAttribut(ATTR_DEF_NAME); - $row.=td($input->input() . $hidden); - $row.=td($sym_tva, 'style="text-align:center"'); - $pu = 0; - if ($q['qp_quantite'] != 0) - $pu = bcdiv($q['qp_price'], $q['qp_quantite']); - $row.=td(nbm($pu), 'class="num"'); - $row.=td(nbm($q['qp_quantite']), 'class="num"'); - - $no_ded = $q['qp_nd_amount']; - $row.=td(nbm($q['qp_dep_priv']), 'style="text-align:right"'); - $row.=td(nbm($no_ded), ' style="text-align:right"'); - $htva = $q['qp_price']; - - - $row.=td(nbm($htva), 'class="num"'); - $tvac = bcadd($htva, $q['qp_vat']); - $tvac = bcadd($tvac, $q['qp_nd_tva']); - $tvac = bcadd($tvac, $q['qp_nd_tva_recup']); - - - if ($g_parameter->MY_TVA_USE == 'Y') - { - $tva_amount = bcadd($q['qp_vat'], $q['qp_nd_tva']); - $tva_amount = bcadd($tva_amount, $q['qp_nd_tva_recup']); - $class = ""; - if ($q['qp_vat_sided'] <> 0) - { - $class = ' style="text-decoration:line-through"'; - $tvac = bcsub($tvac, $q['qp_vat_sided']); - } - $row.=td(nbm($q['qp_vat_sided']),'class="num"'); - $row.=td(nbm($tva_amount), 'class="num" ' . $class); - $row.=td(nbm($tvac), 'class="num"'); - } - $total_tvac+=$tvac; - $total_htva+=$htva; - echo tr($row); - } - if ($g_parameter->MY_TVA_USE == 'Y') - $row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;width:auto" colspan="6"'); - else - $row = td(_('Total'), ' style="font-style:italic;text-align:right;font-weight: bolder;width:auto" colspan="6"'); - $row.=td(nbm($total_htva), 'class="num" style="font-style:italic;font-weight: bolder;"'); - if ($g_parameter->MY_TVA_USE == 'Y') - $row.=td("") . td(nbm($total_tvac), 'class="num" style="font-style:italic;font-weight: bolder;"'); - echo tr($row); - ?> -
    diff --git a/sources/include/template/operation_detail_fin.php b/sources/include/template/operation_detail_fin.php deleted file mode 100644 index 93cd225..0000000 --- a/sources/include/template/operation_detail_fin.php +++ /dev/null @@ -1,50 +0,0 @@ -'; -echo ''; -echo th(_('Compte en banque')); -echo th(_('Tiers')); -echo th(_('Libellé')); -echo th(_('Montant')); -echo ''; - -echo ''; -$bk = new Fiche($cn, $obj->det->array[0]['qf_bank']); -$view_card_detail = HtmlInput::card_detail($bk->get_quick_code(), h($bk->getName()), ' class="line" '); -echo td($view_card_detail); -$other = new Fiche($cn, $obj->det->array[0]['qf_other']); -$view_card_detail = HtmlInput::card_detail($other->get_quick_code(), h($other->getName()), ' class="line" '); -echo td($view_card_detail); -$comment = strip_tags($obj->det->jr_comment); -echo td($comment); -echo td(nbm($obj->det->array[0]['qf_amount']), ' class="inum"'); -echo ''; -echo ''; -?> - diff --git a/sources/include/template/operation_detail_misc.php b/sources/include/template/operation_detail_misc.php deleted file mode 100644 index 9b3710e..0000000 --- a/sources/include/template/operation_detail_misc.php +++ /dev/null @@ -1,86 +0,0 @@ - - - -'; -$amount_idx=0; -for ($e = 0; $e < count($obj->det->array); $e++) -{ - $row = ''; - $q = $obj->det->array; - $view_history = sprintf('%s', $q[$e]['j_poste'], $gDossier, $q[$e]['j_poste']); - - $row.=td($view_history); - - if ($q[$e]['j_qcode'] != '') - { - $fiche = new Fiche($cn); - $fiche->get_by_qcode($q[$e]['j_qcode']); - $view_history = sprintf('%s', $fiche->id, $gDossier, $q[$e]['j_qcode']); - } - else - $view_history = ''; - $row.=td($view_history); - $l_lib = $q[$e]['j_text']; - - if ($l_lib != '') - { - $l_lib = $q[$e]['j_text']; - } - else if ($q[$e]['j_qcode'] != '') - { - // nom de la fiche - $ff = new Fiche($cn); - $ff->get_by_qcode($q[$e]['j_qcode']); - $l_lib = $ff->strAttribut(ATTR_DEF_NAME); - } - else - { - // libellé du compte - $name = $cn->get_value('select pcm_lib from tmp_pcmn where pcm_val=$1', array($q[$e]['j_poste'])); - $l_lib = $name; - } - $l_lib = strip_tags($l_lib); - $input = new ISpan("e_march" . $q[$e]['j_id'] . "_label"); - $input->value = $l_lib; - $hidden = HtmlInput::hidden("j_id[]", $q[$e]['j_id']); - $row.=td($input->input() . $hidden); - $montant = td(nbm($q[$e]['j_montant']), 'class="num"'); - $row.=($q[$e]['j_debit'] == 't') ? $montant : td(''); - $row.=($q[$e]['j_debit'] == 'f') ? $montant : td(''); - echo tr($row); -} -?> -
    \ No newline at end of file diff --git a/sources/include/template/operation_detail_ven.php b/sources/include/template/operation_detail_ven.php deleted file mode 100644 index a56c0c6..0000000 --- a/sources/include/template/operation_detail_ven.php +++ /dev/null @@ -1,109 +0,0 @@ - - -MY_TVA_USE == 'Y') - echo th(_('Taux TVA'), 'style="text-align:right"'); -else - echo th(''); -if ( $g_parameter->MY_TVA_USE == 'Y') { - echo th(_('HTVA'), 'style="text-align:right"'); - echo th(_('TVA NP'), 'style="text-align:right"'); - echo th(_('TVA'), 'style="text-align:right"'); - echo th(_('TVAC'), 'style="text-align:right"'); -} else - echo th(_('Total'), 'style="text-align:right"'); - - -echo ''; - for ($e=0;$edet->array);$e++) { - $row=''; - $q=$obj->det->array[$e]; - $fiche=new Fiche($cn,$q['qs_fiche']); - $view_card_detail=HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE),"", ' class="line" '); - $row.=td($view_card_detail); - $input = new ISpan("e_march" . $q['j_id'] . "_label"); - $hidden = HtmlInput::hidden("j_id[]", $q['j_id']); - $input->value = $fiche->strAttribut(ATTR_DEF_NAME); - - $row.=td($input->input().$hidden); - $sym_tva=''; - $pu=0; - if ($q['qs_quantite'] != 0) $pu=bcdiv($q['qs_price'],$q['qs_quantite']); - $row.=td(nbm($pu),'class="num"'); - $row.=td(nbm($q['qs_quantite']),'class="num"'); - $sym_tva=''; - if ( $g_parameter->MY_TVA_USE=='Y' && $q['qs_vat_code'] != '') { - /* retrieve TVA symbol */ - $tva=new Acc_Tva($cn,$q['qs_vat_code']); - $tva->load(); - $sym_tva=(h($tva->get_parameter('label'))); - // $sym_tva=$sym - } - - $row.=td($sym_tva,'style="text-align:center"'); - - $htva=$q['qs_price']; - - $row.=td(nbm($htva),'class="num"'); - $tvac=bcadd($htva,$q['qs_vat']); - if ($g_parameter->MY_TVA_USE=='Y') - { - $class=""; - if ($q['qs_vat_sided'] != 0) { - $class=' style="text-decoration:line-through"'; - $tvac=bcsub($tvac,$q['qs_vat']); - } - $row.=td(nbm($q['qs_vat_sided']),'class="num"'); - $row.=td(nbm($q['qs_vat']),'class="num"'.$class); - $row.=td(nbm($tvac),'class="num"'); - } - $total_tvac=bcadd($total_tvac,$tvac); - $total_htva=bcadd($total_htva,$htva); - echo tr($row); - - } - if ($g_parameter->MY_TVA_USE=='Y') - $row= td(_('Total'),' style="font-style:italic;text-align:right;font-weight: bolder;" colspan="5"'); - else - $row= td(_('Total'),' style="font-style:italic;text-align:right;font-weight: bolder;" colspan="5"'); -$row.=td(nbm($total_htva),'class="num" style="font-style:italic;font-weight: bolder;"'); -if ($g_parameter->MY_TVA_USE=='Y') - $row.=td("").td(nbm($total_tvac),'class="num" style="font-style:italic;font-weight: bolder;"'); -echo tr($row); -?> -
    \ No newline at end of file diff --git a/sources/include/template/param_jrn.php b/sources/include/template/param_jrn.php deleted file mode 100644 index d07c7ed..0000000 --- a/sources/include/template/param_jrn.php +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - -
    - - - input();?> -
    - - -name='bank'; -$card->extra=$cn->make_list('select fd_id from fiche_def where frd_id=4'); -$card->set_dblclick("fill_ipopcard(this);"); -$card->set_function('fill_data'); -$card->set_attribute('ipopup','ipop_card'); -$list=$cn->make_list('select fd_id from fiche_def where frd_id=4'); -$card->set_attribute('typecard',$list); - -$card->value=$qcode_bank; -echo $card->search(); -echo $card->input(); -echo $str_add_button; -?> - - -
    Minimum de lignes à afficherinput()?>
    - -
    -
    - - - -
    - - - - -
    - - - - -
    - - - -
    -
    - -
    -

    Fiches

    - - - - - - - - exec_sql("select fd_id,fd_label from fiche_def order by fd_label"); - $num=$cn->size(); - // default card for ACH - if ($new == 1) - { - $rdeb=$default_deb_purchase; - $rcred=$default_cred_purchase; - } - - for ($i=0;$i<$num;$i++) { - $res=$cn->fetch($i); - $CHECKED=" unchecked"; - foreach ( $rdeb as $element) { - if ( $element == $res['fd_id'] ) { - $CHECKED="CHECKED"; - break; - } - } - echo ''; - printf ('', - $res['fd_id'],$CHECKED,$res['fd_label']); - $CHECKED=" unchecked"; - foreach ( $rcred as $element) { - if ( $element == $res['fd_id'] ) { - $CHECKED="CHECKED"; - break; - } - } - printf ('', - $res['fd_id'],$CHECKED,$res['fd_label']); - echo ''; - } - ?> -
    - Services, fournitures ou biens achetés (D) - - Fournisseurs (C) -
    %s %s
    -
    - - -
    -

    Fiches

    - - - - - - - - - exec_sql("select fd_id,fd_label from fiche_def order by fd_label"); - $num=$cn->size(); - // default card for VEN - if ($new == 1) - { - $rdeb=$default_deb_sale; - $rcred=$default_cred_sale; - } - - for ($i=0;$i<$num;$i++) { - $res=$cn->fetch($i); - $CHECKED=" unchecked"; - foreach ( $rdeb as $element) { - if ( $element == $res['fd_id'] ) { - $CHECKED="CHECKED"; - break; - } - } - echo ''; - printf ('', - $res['fd_id'],$CHECKED,$res['fd_label']); - $CHECKED=" unchecked"; - foreach ( $rcred as $element) { - if ( $element == $res['fd_id'] ) { - $CHECKED="CHECKED"; - break; - } - } - printf ('', - $res['fd_id'],$CHECKED,$res['fd_label']); - echo ''; - } - ?> -
    - Clients (C) - - Services, fournitures ou biens vendus (D) -
    %s %s
    -
    - - -
    -

    Fiches

    - - - - - - - - exec_sql("select fd_id,fd_label from fiche_def order by fd_label"); - $num=$cn->size(); - // default card for ODS - if ($new == 1) - { - $rdeb=$default_ods; - } - for ($i=0;$i<$num;$i++) { - $res=$cn->fetch($i); - $CHECKED=" unchecked"; - foreach ( $rdeb as $element) { - if ( $element == $res['fd_id'] ) { - $CHECKED="CHECKED"; - break; - } - } - echo ''; - printf ('', - $res['fd_id'],$CHECKED,$res['fd_label']); - $CHECKED=" unchecked"; - foreach ( $rcred as $element) { - if ( $element == $res['fd_id'] ) { - $CHECKED="CHECKED"; - break; - } - } - echo ''; - } - ?> -
    - Fiches utilisables (D/C) -
    %s
    -
    - - -
    -

    Fiches

    - - - - - - - - exec_sql("select fd_id,fd_label from fiche_def order by fd_label"); - $num=$cn->size(); - // default card for ACH - if ($new == 1) - { - $rdeb=$default_fin; - } - for ($i=0;$i<$num;$i++) { - $res=$cn->fetch($i); - $CHECKED=" unchecked"; - foreach ( $rdeb as $element) { - if ( $element == $res['fd_id'] ) { - $CHECKED="CHECKED"; - break; - } - } - echo ''; - printf ('', - $res['fd_id'],$CHECKED,$res['fd_label']); - $CHECKED=" unchecked"; - foreach ( $rcred as $element) { - if ( $element == $res['fd_id'] ) { - $CHECKED="CHECKED"; - break; - } - } - echo ''; - } - ?> -
    - Tiers (D/C) -
    %s
    -
    - - - - diff --git a/sources/include/template/pcmn_update.php b/sources/include/template/pcmn_update.php deleted file mode 100644 index 6a8ddb3..0000000 --- a/sources/include/template/pcmn_update.php +++ /dev/null @@ -1,55 +0,0 @@ - - -if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); - -/** - * @file - * @brief - * @param type $name Descriptionara - */ -echo HtmlInput::title_box("Poste comptable", "acc_update", "hide"); -?> - -
    - - -input()); -echo tr($r); -$r= td(_('Description'),'style="width:auto;text-align:right"').td($lib->input()); -echo tr($r); -$r= td(_('Parent'),'style="width:auto;text-align:right"').td($parent->input()); -echo tr($r); -$r= td(_('Type'),'style="width:auto;text-align:right"').td($type->input()); -echo tr($r); -?> -
    -input(); -echo '
    '; -echo HtmlInput::submit('update',_('Sauve')); -echo HtmlInput::button('hide',_('Annuler'),'onClick="$(\'acc_update\').hide();return true;"'); -?> -
    \ No newline at end of file diff --git a/sources/include/template/periode_add_exercice.php b/sources/include/template/periode_add_exercice.php deleted file mode 100644 index bab2298..0000000 --- a/sources/include/template/periode_add_exercice.php +++ /dev/null @@ -1,26 +0,0 @@ -
    Ajout d'un exercice -
      -
    • -Exercice en 12 périodes : Ajout d'un exercice comptable de 12 périodes, commençant le 1 janvier et terminant le 31 décembre.
    • -
    • Exercice en 13 périodes: Ajout d'une période d'un jour le 31/12. Cette période est utilisée -pour faire toutes les écritures de fin d'exercice: amortissements, régulations de compte... Avec une 13ième période, cela simplifie les prévisions, les rapports...
    • -
    • - Pour ajouter des années, ne commençant pas en janvier ou comptant un nombre de mois supérieur à 12, utilisez le plugin "Outils Comptables" -
    • -
    - -
    ')"> -input(); -echo HtmlInput::hidden("jrn_def_id","0"); -echo HtmlInput::hidden("add_exercice","1"); -echo Dossier::hidden(); -echo HtmlInput::submit("add_exercicebt",_("Ajout d'un exercice comptable")); -?> - -
    -
    diff --git a/sources/include/template/predf_ledger_detail.php b/sources/include/template/predf_ledger_detail.php deleted file mode 100644 index e28ad12..0000000 --- a/sources/include/template/predf_ledger_detail.php +++ /dev/null @@ -1,84 +0,0 @@ -
    - - -
    - - -
    - -
    - - - - - - - - - - - - - - - - - - - - - -'; -echo $item['quick_code']; -echo ''; -?> - -'; -} - -?> -
    Code
    '.$item['bt'].'
    - -
    - -
    - -
    -
    0.0 - -
    0.0 -
    0.0 - - -
    - -
    - -
    -
    -
    - -
    - -
    - -
    - - diff --git a/sources/include/template/print_ledger_simple.php b/sources/include/template/print_ledger_simple.php deleted file mode 100644 index 75903de..0000000 --- a/sources/include/template/print_ledger_simple.php +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - - - - - -MY_TVA_USE=='Y') - { - echo ''; - $a_Tva=$cn->get_array("select tva_id,tva_label from tva_rate where tva_rate != 0.0000 order by tva_rate"); - foreach($a_Tva as $line_tva) - { - $col_tva.=''; - } - } -echo $col_tva; -?> - - - -prepare('reconcile_date','select * from jrn where jr_id in (select jra_concerned from jrn_rapt where jr_id = $1 union all select jr_id from jrn_rapt where jra_concerned=$1)'); -$tot['htva']=0; -$tot['dep_priv']=0; -$tot['dna']=0; -$tot['tva_nd']=0; -$tot['tvac']=0; -$tot['tva']=array(); -bcscale(2); -foreach ($Row as $line) { - $i++; - /* - * Get date of reconcile operation - */ - $ret_reconcile=$cn->execute('reconcile_date',array($line['jr_id'])); - - $class = ($i % 2 == 0) ? ' class="even" ' : ' class="odd" '; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - $tiers = $Jrn->get_tiers($line['jrn_def_type'], $line['jr_id']); - echo td($tiers); - echo ""; - $dep_priv=($line['dep_priv']==0)?"":nbm($line['dep_priv']); - $tot['dep_priv']=bcadd($tot['dep_priv'], floatval($line['dep_priv'])); - $dna=($line['dna']==0)?"":nbm($line['dna']); - $tot['dna']=bcadd($tot['dna'],floatval($line['dna'])); - echo ""; - $tot['htva']=bcadd($tot['htva'], floatval($line['HTVA'])); - - echo ""; - echo ""; - if ($own->MY_TVA_USE == 'Y' ) - { - $tva_dna=($line['tva_dna']==0)?"":nbm($line['tva_dna']); - $tot['tva_nd']=bcadd($tot['tva_nd'], floatval($line['tva_dna'])); - echo ""; - $a_tva_amount=array(); - foreach ($line['TVA'] as $lineTVA) - { - foreach ($a_Tva as $idx=>$line_tva) - { - - if ($line_tva['tva_id'] == $lineTVA[1][0]) - { - $a=$line_tva['tva_id']; - $a_tva_amount[$a]=$lineTVA[1][2]; - } - } - } - foreach ($a_Tva as $line_tva) - { - $a=$line_tva['tva_id']; - if ( isset($a_tva_amount[$a])) { - echo ''; - $tot['tva'][$a]=(isset($tot['tva'][$a]))?bcadd($tot['tva'][$a],floatval($a_tva_amount[$a])):floatval($a_tva_amount[$a]); - } - else - printf(""); - } - } - echo ''; - $tot['tvac']=bcadd($tot['tvac'], floatval($line['TVAC'])); - /* - * If reconcile print them - */ - echo ''; - echo ""; -} -/** - * summary - */ -?> - - - - - - - - - - - MY_TVA_USE == 'Y' ): ?> - - - - - - - - - - - - - -
    HTVAPrivéDNATVA NDTva '.$line_tva['tva_label'].'TVAC
    " . h($line['jr_pj_number']) . "" . smaller_date($line['date']) . "" . smaller_date($line['date_paid']) . "" . HtmlInput::detail_op($line['jr_id'], $line['jr_internal']) . "" . h($line['comment']) . "" . nbm($line['HTVA']) . "" .$dep_priv . "" . $dna . "" . $tva_dna. "'.nb($a_tva_amount[$a]).''.$line['TVAC'].''; - $max=Database::num_row($ret_reconcile); - if ($max > 0) { - $sep=""; - for ($e=0;$e<$max;$e++) { - $row=Database::fetch_array($ret_reconcile, $e); - echo $sep.HtmlInput::detail_op($row['jr_id'],$row['jr_date'].' '. $row['jr_internal']); - $sep=' ,'; - } - } - echo '
    - - - -
    \ No newline at end of file diff --git a/sources/include/template/profile.php b/sources/include/template/profile.php deleted file mode 100644 index 39a78ff..0000000 --- a/sources/include/template/profile.php +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - -
    input();?>
    input()?>
    input()?>
    input()?>
    \ No newline at end of file diff --git a/sources/include/template/profile_menu.php b/sources/include/template/profile_menu.php deleted file mode 100644 index 60c2724..0000000 --- a/sources/include/template/profile_menu.php +++ /dev/null @@ -1,30 +0,0 @@ - diff --git a/sources/include/template/profile_menu_display_module.php b/sources/include/template/profile_menu_display_module.php deleted file mode 100644 index e32f419..0000000 --- a/sources/include/template/profile_menu_display_module.php +++ /dev/null @@ -1,103 +0,0 @@ - -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - * - */ -/** - * @file - * @brief display the module, used to setup the module and menu, included from - * Profile_Menu - */ -?> -
    - - - "; - continue; - } - $style=" tool "; - $url="XX"; - if ( $row['me_url']!='') - { - $url=$row['me_url']; - } - elseif ($row['me_javascript'] != '') - { - $url=$row['me_javascript']; - } - elseif ( $row['me_file'] != "") - { - $url=$row['me_file']; - } - else - { - $url=HtmlInput::anchor(_('Menu'),'', - sprintf(" onclick = \" \$('menu_table').innerHTML='';display_sub_menu(%d,%d,%d,%d)\" ", - Dossier::id(), - $this->p_id, - $row['pm_id'],0)); - } - ?> - - - - -
    - - - - -

    - -

    -

    - -

    -

    - -

    - -

    - -
    - p_id,'me',0) - ,"xx",'smallbutton') - ?> -
    -
    - - \ No newline at end of file diff --git a/sources/include/template/profile_menu_display_submenu.php b/sources/include/template/profile_menu_display_submenu.php deleted file mode 100644 index c5ac5ff..0000000 --- a/sources/include/template/profile_menu_display_submenu.php +++ /dev/null @@ -1,79 +0,0 @@ - -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - * - */ - - -/** - * @file - * @brief display a submenu contained in a array - * @parameter $a_module contains rows from profile_menu - * @parameter $p_module_id is the module / menu id main menu - * @see Profile_Menu::display_module_menu - */ -?> - - - javascript"; - } else { - $url = HtmlInput::anchor("sous-menu", "x", - sprintf(" onclick = \" display_sub_menu(%d,%d,%d,%d)\"",Dossier::id(),$this->p_id,$a_module[$i]['pm_id'],$p_level), - ' class="line" '); - } - ?> - - - - -
    - -

    - -

    - -

    - - - - p_id,'me',$p_level,$p_module_id) - ,"xx",'smallbutton') - ?> - - diff --git a/sources/include/template/profile_sec_repository.php b/sources/include/template/profile_sec_repository.php deleted file mode 100644 index a2c359d..0000000 --- a/sources/include/template/profile_sec_repository.php +++ /dev/null @@ -1,60 +0,0 @@ - -
    - - - p_id);?> - - - - - - - - - - - - -
    - - - - - - value=$aright_value; - $isel->selected=$array[$i]['ur_right']; - echo $isel->input();?> -
    -
    - diff --git a/sources/include/template/result_cat_card_summary.php b/sources/include/template/result_cat_card_summary.php deleted file mode 100644 index c2ef10f..0000000 --- a/sources/include/template/result_cat_card_summary.php +++ /dev/null @@ -1,69 +0,0 @@ -
    - : - - - -  ▾'; - $sort= 'class="sorttable_sorted"'; - } - echo ''; - endfor; -?> - -'; - else - echo ''; - $fiche=new Fiche($cn); - $fiche->id=$row['f_id']; - $fiche->getAttribut(); -$detail=HtmlInput::card_detail($fiche->strAttribut(ATTR_DEF_QUICKCODE)); -echo td($detail); - foreach($fiche->attribut as $attr) : - $sort=""; - - if ( $attr->ad_type != 'select'): - if ($attr->ad_type=="date") : - // format YYYYMMDD - $sort='sorttable_customkey="'.format_date($attr->av_text, "DD.MM.YYYY", "YYYYMMDD").'"'; - endif; - echo td($attr->av_text,'style="padding: 0 10 1 10;white-space:nowrap;" '.$sort); - else: - $value=$cn->make_array($attr->ad_extra); - $row_content=""; - for ($e=0;$eav_text): - $row_content=h($value[$e]['label']); - break; - endif; - endfor; - echo td($row_content,'style="padding: 0 10 1 10;white-space:nowrap;"'); - - endif; - endforeach; - echo ''; -endforeach; - -?> -
    '.$aHeading[$i]->ad_text.$span.'
    - - - -
    diff --git a/sources/include/template/security_list_action.php b/sources/include/template/security_list_action.php deleted file mode 100644 index 7d3e81a..0000000 --- a/sources/include/template/security_list_action.php +++ /dev/null @@ -1,74 +0,0 @@ -0,'label'=>_("Pas d'accès")), - array('value'=>1,'label'=>_('Accès')), - ); - - $gDossier=dossier::id(); - ?> -
    - - - - - - - check_action($l_line['ac_id']); - - $a=new ISelect(); - $a->name=sprintf('action%d',$l_line['ac_id']); - $a->value=$array; - $a->selected=$right; - if ( $right==1) { - ?> - - - -
    - - - - - - - input(); ?> -
    -
    - -get_array("select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", - array(800,1000)); - display_security_fieldset(_('Fiche'),$array,$sec_User); ?> -get_array("select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", - array(1001,1100)); - display_security_fieldset(_('Suivi'),$array,$sec_User); ?> - -get_array("select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", - array(1101,1200)); - display_security_fieldset(_('Comptabilité'),$array,$sec_User); ?> - -get_array("select ac_id, ac_description from action where ac_id >=$1 and ac_id <=$2 order by ac_id ", - array(1200,1300)); - display_security_fieldset(_('Note'),$array,$sec_User); -?> diff --git a/sources/include/template/stock_histo.php b/sources/include/template/stock_histo.php deleted file mode 100644 index bdb496d..0000000 --- a/sources/include/template/stock_histo.php +++ /dev/null @@ -1,87 +0,0 @@ - -
    - - - - - - - - - - - - - - - > - - - - - - - - - - - -
    get_header(0);?>get_header(1);?>get_header(2);?>get_header(3);?>Opérationget_header(4);?>get_header(5);?>get_header(6);?>get_header(7);?>
    - - - - - - - - - - - - - - - - - - - - - -
    - -
    \ No newline at end of file diff --git a/sources/include/template/stock_histo_search.php b/sources/include/template/stock_histo_search.php deleted file mode 100644 index 40895ce..0000000 --- a/sources/include/template/stock_histo_search.php +++ /dev/null @@ -1,71 +0,0 @@ - - - diff --git a/sources/include/template/stock_inv.php b/sources/include/template/stock_inv.php deleted file mode 100644 index 649382c..0000000 --- a/sources/include/template/stock_inv.php +++ /dev/null @@ -1,134 +0,0 @@ - -
    " class="content"> -
    ')"> - - - - - - - - - - - - -
    - - - input()?> -
    - - - input()?> -
    - - - input()?> -
    - - - - - - - - - - - - - - - - - - -
    - - - - - -
    - - input()?> - search()?> - input()?> - - value) != "") echo HtmlInput::card_detail($sg_code[$i]->value,h($sg_code[$i]->value),' class="line"',true)?> - - - - get_quick_code(),h($fiche[$i]->getName()),' class="line"');?> - - value==0 && $p_readonly==true):?> - - - input()?> - - - - - -
    - - - - -
    -
    - diff --git a/sources/include/template/stock_state_search.php b/sources/include/template/stock_state_search.php deleted file mode 100644 index f73863c..0000000 --- a/sources/include/template/stock_state_search.php +++ /dev/null @@ -1,51 +0,0 @@ - -
    - - - - - - - - - - -
    - - - input()?> -
    - - - input()?> -
    - -
    \ No newline at end of file diff --git a/sources/include/template/stock_summary_list.php b/sources/include/template/stock_summary_list.php deleted file mode 100644 index de8686a..0000000 --- a/sources/include/template/stock_summary_list.php +++ /dev/null @@ -1,105 +0,0 @@ -get_array("select distinct t.r_id,r_name,r_adress,r_city,r_country,r_phone from stock_repository as s join tmp_stockgood_detail as t - on (s.r_id=t.r_id) - where - s_id=$1 - order by 2 - ",array($tmp_id)); -?> -
    - -

    -

    -

    -

    -

    - - - - - - - - - get_array( - " - select coalesce(sum(s_qin),0) as qin,coalesce(sum(s_qout),0) as qout,sg_code - from tmp_stockgood_detail where r_id=$1 and s_id=$2 - group by sg_code - order by sg_code - - ",array($a_repo[$r]['r_id'],$tmp_id)); - for ($s=0;$sget_array( - " - select f_id,vw_name,quick_code - from vw_fiche_attr - where - f_id in ( - select distinct f_id - from tmp_stockgood_detail - where - r_id=$1 - and s_id=$2 - and sg_code=$3) - order by vw_name,quick_code - ",array($a_repo[$r]['r_id'],$tmp_id,$a_stock[$s]['sg_code'])); - ?> - - - - - - - - -
    - - - '._("Changement manuel").''; - ?> - - - - - - - -
    - - -
    \ No newline at end of file diff --git a/sources/include/template/stock_summary_table.php b/sources/include/template/stock_summary_table.php deleted file mode 100644 index 485bd74..0000000 --- a/sources/include/template/stock_summary_table.php +++ /dev/null @@ -1,136 +0,0 @@ - -
    - - - - - - - - - - - > - - get_array("select coalesce(sum(s_qin)) as s_qin,coalesce(sum(s_qout)) as s_qout - from tmp_stockgood_detail - where r_id=$1 and sg_code=$2 and s_id=$3" - , array($a_repository[$e]['r_id'], $a_code[$x]['sg_code'],$tmp_id)); - ?> - - - - - -
    - - - - - -
    - - - - - - - - - - - - - - - - -
    - : - - -
    - : - - -
    - : - - -
    - -
    - - - - - - - - - - - - - -
    - : - - -
    - : - - -
    - : - - -
    -
    -
    \ No newline at end of file diff --git a/sources/include/template/tag_choose.php b/sources/include/template/tag_choose.php deleted file mode 100644 index 0581d29..0000000 --- a/sources/include/template/tag_choose.php +++ /dev/null @@ -1,47 +0,0 @@ -cn->count($ret); -if ( $max == 0 ) { - echo h2(_("Aucune étiquette disponible"),' class="notice"'); - return; -} -?> - - - - - - - - - - - -
    - Tag - - Description -
    - - - -
    - \ No newline at end of file diff --git a/sources/include/template/tag_detail.php b/sources/include/template/tag_detail.php deleted file mode 100644 index 7aa93f3..0000000 --- a/sources/include/template/tag_detail.php +++ /dev/null @@ -1,29 +0,0 @@ -t_id); -echo HtmlInput::hidden('ac',$_REQUEST['ac']); -$uos=new Tool_Uos('tag'); -echo $uos->hidden(); -$t_tag=new IText('t_tag',$data->t_tag); -$t_description=new ITextarea('t_description',$data->t_description); -$t_description->style=' class="itextarea" style="height:5em;vertical-align: top;"'; -?> -

    - : input(); ?> -

    -

    - : input(); ?> -

    -t_id != '-1') : -?> -

    -

    - - \ No newline at end of file diff --git a/sources/include/template/tag_list.php b/sources/include/template/tag_list.php deleted file mode 100644 index 8b02aed..0000000 --- a/sources/include/template/tag_list.php +++ /dev/null @@ -1,39 +0,0 @@ -cn->count($ret); -echo HtmlInput::filter_table("tag_tb", '0,1', '1'); -?> - - - - - - - - - - - -
    - - - -
    - - - -
    \ No newline at end of file diff --git a/sources/include/template/tag_search_select.php b/sources/include/template/tag_search_select.php deleted file mode 100644 index 15720fd..0000000 --- a/sources/include/template/tag_search_select.php +++ /dev/null @@ -1,43 +0,0 @@ -cn->count($ret); -if ( $max == 0 ) { - echo h2(_("Aucune étiquette disponible"),' class="notice"'); - return; -} -?> -Filtrer = - - - - - - - - - - - -
    - - - -
    - - - -
    \ No newline at end of file diff --git a/sources/include/template/tag_select.php b/sources/include/template/tag_select.php deleted file mode 100644 index 7f179b7..0000000 --- a/sources/include/template/tag_select.php +++ /dev/null @@ -1,44 +0,0 @@ -cn->count($ret); -if ( $max == 0 ) { - echo h2(_("Aucune étiquette disponible"),' class="notice"'); - return; -} -?> -Filtrer = - - - - - - - - - - - -
    - - - -
    - - - -
    \ No newline at end of file diff --git a/sources/include/template/template.gif b/sources/include/template/template.gif deleted file mode 100644 index ab44205..0000000 Binary files a/sources/include/template/template.gif and /dev/null differ diff --git a/sources/include/template/todo_list_display.php b/sources/include/template/todo_list_display.php deleted file mode 100644 index 1970411..0000000 --- a/sources/include/template/todo_list_display.php +++ /dev/null @@ -1,106 +0,0 @@ - -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - - -/** - * @brief included from Todo_List::display - * create a html with content - * @see Todo_List - */ -global $g_user; -$wDate=new IDate('p_date_todo',$this->tl_date); - -$wTitle=new IText('p_title',$this->tl_title); -$wDesc=new ITextArea('p_desc', strip_tags($this->tl_desc)); -$wDesc->heigh=5; -$wDesc->width=40; -$is_public=new ICheckBox('p_public'); -$is_public->value='Y'; -$is_public->set_check($this->is_public); -$dossier=Dossier::id(); -$close_share=" if ( \$('shared_{$this->tl_id}') ){ \$('shared_{$this->tl_id}').remove();}"; -echo HtmlInput::title_box("Note","todo_list_div".$this->tl_id,'close',$close_share); -?> -
    - - - - - - - - - - - - - - - check_action(SHARENOTEPUBLIC)): - ?> - - - - - - check_action(SHARENOTE)) : - ?> - - - - - - -
    - - - input() ?> -
    - - - input());?> -
    - - - input()?> -
    - - - tl_id},{$dossier}) \";")?> -
    - input()); ?> - - - tl_id) ?> - use_login == $_SESSION['g_user']) : ?> -

    - -

    - -
    \ No newline at end of file diff --git a/sources/include/template/todo_list_list_user.php b/sources/include/template/todo_list_list_user.php deleted file mode 100644 index dee9ead..0000000 --- a/sources/include/template/todo_list_list_user.php +++ /dev/null @@ -1,78 +0,0 @@ - -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - * - */ - - -/** - * @brief display all the user for the todo_list. - * @see Todo_List::display_user - * @param $p_array array of user who can access this folder - * @param Object Todo_List - * @param $dossier = Dossier::id() - * - */ -echo _('Filtre')." ".HtmlInput::filter_table("todo_user_table", "0,1,2", 1); -?> - - - - - - - - login) : - continue; - endif; - ?> - - - - - - - - - -
    - - - - - - -
    - - - - - - - tl_id); - if ($this->is_shared_with($p_array[$i]['use_login']) != 0) { - $check->selected=true; - } - $check->javascript=" onclick=\"todo_list_set_share({$this->tl_id},'{$p_array[$i]['use_login']}','{$dossier}')\""; - echo $check->input(); - ?> -
    \ No newline at end of file diff --git a/sources/include/template/user_sec_profile.php b/sources/include/template/user_sec_profile.php deleted file mode 100644 index 6f0d001..0000000 --- a/sources/include/template/user_sec_profile.php +++ /dev/null @@ -1,59 +0,0 @@ - -
    - - p_id);?> - - - - - - - - - - - - -
    - - - - - value=$aright_value; - $isel->selected=$array[$i]['ua_right']; - echo $isel->input();?> -
    - -
    \ No newline at end of file diff --git a/sources/include/tfpdf/font/courier.php b/sources/include/tfpdf/font/courier.php deleted file mode 100644 index 213bf35..0000000 --- a/sources/include/tfpdf/font/courier.php +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/sources/include/tfpdf/font/courierb.php b/sources/include/tfpdf/font/courierb.php deleted file mode 100755 index 3fc69a5..0000000 --- a/sources/include/tfpdf/font/courierb.php +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/sources/include/tfpdf/font/courierbi.php b/sources/include/tfpdf/font/courierbi.php deleted file mode 100755 index a49f2ae..0000000 --- a/sources/include/tfpdf/font/courierbi.php +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/sources/include/tfpdf/font/courieri.php b/sources/include/tfpdf/font/courieri.php deleted file mode 100755 index 9c1c2cf..0000000 --- a/sources/include/tfpdf/font/courieri.php +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/sources/include/tfpdf/font/helvetica.php b/sources/include/tfpdf/font/helvetica.php deleted file mode 100644 index 7e20c3a..0000000 --- a/sources/include/tfpdf/font/helvetica.php +++ /dev/null @@ -1,19 +0,0 @@ -278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, - chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584, - ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667, - 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, - 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833, - 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556, - chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, - chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, - chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, - chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556, - chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); -?> diff --git a/sources/include/tfpdf/font/helveticab.php b/sources/include/tfpdf/font/helveticab.php deleted file mode 100644 index 452e0ac..0000000 --- a/sources/include/tfpdf/font/helveticab.php +++ /dev/null @@ -1,19 +0,0 @@ -278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, - chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584, - ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722, - 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, - 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889, - 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556, - chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, - chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, - chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, - chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611, - chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556); -?> diff --git a/sources/include/tfpdf/font/helveticabi.php b/sources/include/tfpdf/font/helveticabi.php deleted file mode 100644 index ea5c56f..0000000 --- a/sources/include/tfpdf/font/helveticabi.php +++ /dev/null @@ -1,19 +0,0 @@ -278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, - chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584, - ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722, - 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, - 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889, - 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556, - chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, - chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, - chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, - chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611, - chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556); -?> diff --git a/sources/include/tfpdf/font/helveticai.php b/sources/include/tfpdf/font/helveticai.php deleted file mode 100644 index e3c638a..0000000 --- a/sources/include/tfpdf/font/helveticai.php +++ /dev/null @@ -1,19 +0,0 @@ -278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, - chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584, - ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667, - 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, - 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833, - 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556, - chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, - chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, - chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, - chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556, - chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); -?> diff --git a/sources/include/tfpdf/font/symbol.php b/sources/include/tfpdf/font/symbol.php deleted file mode 100644 index b980b07..0000000 --- a/sources/include/tfpdf/font/symbol.php +++ /dev/null @@ -1,19 +0,0 @@ -250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, - chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549, - ','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722, - 'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768, - 'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576, - 'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0, - chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0, - chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603, - chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768, - chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042, - chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329, - chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0); -?> diff --git a/sources/include/tfpdf/font/times.php b/sources/include/tfpdf/font/times.php deleted file mode 100644 index d3ea808..0000000 --- a/sources/include/tfpdf/font/times.php +++ /dev/null @@ -1,19 +0,0 @@ -250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, - chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564, - ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722, - 'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944, - 'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, - 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, - chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980, - chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333, - chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, - chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500, - chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500); -?> diff --git a/sources/include/tfpdf/font/timesb.php b/sources/include/tfpdf/font/timesb.php deleted file mode 100644 index 1c198f0..0000000 --- a/sources/include/tfpdf/font/timesb.php +++ /dev/null @@ -1,19 +0,0 @@ -250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, - chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, - ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722, - 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000, - 'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833, - 'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, - chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, - chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333, - chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, - chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556, - chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); -?> diff --git a/sources/include/tfpdf/font/timesbi.php b/sources/include/tfpdf/font/timesbi.php deleted file mode 100644 index a6034b2..0000000 --- a/sources/include/tfpdf/font/timesbi.php +++ /dev/null @@ -1,19 +0,0 @@ -250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, - chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, - ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667, - 'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889, - 'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, - 'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, - chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, - chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333, - chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, - chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556, - chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444); -?> diff --git a/sources/include/tfpdf/font/timesi.php b/sources/include/tfpdf/font/timesi.php deleted file mode 100644 index bd9e0d9..0000000 --- a/sources/include/tfpdf/font/timesi.php +++ /dev/null @@ -1,19 +0,0 @@ -250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, - chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675, - ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611, - 'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833, - 'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722, - 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, - chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980, - chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333, - chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611, - chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500, - chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444); -?> diff --git a/sources/include/tfpdf/font/unifont/DejaVuSans-Bold.ttf b/sources/include/tfpdf/font/unifont/DejaVuSans-Bold.ttf deleted file mode 100644 index 0f4d5e9..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSans-Bold.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSans-BoldOblique.ttf b/sources/include/tfpdf/font/unifont/DejaVuSans-BoldOblique.ttf deleted file mode 100644 index 48f06a8..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSans-BoldOblique.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSans-ExtraLight.ttf b/sources/include/tfpdf/font/unifont/DejaVuSans-ExtraLight.ttf deleted file mode 100644 index 01a5652..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSans-ExtraLight.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSans-Oblique.ttf b/sources/include/tfpdf/font/unifont/DejaVuSans-Oblique.ttf deleted file mode 100644 index 4485638..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSans-Oblique.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSans.ttf b/sources/include/tfpdf/font/unifont/DejaVuSans.ttf deleted file mode 100644 index 27cff47..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSans.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSansCondensed-Bold.ttf b/sources/include/tfpdf/font/unifont/DejaVuSansCondensed-Bold.ttf deleted file mode 100644 index 9edd89c..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSansCondensed-Bold.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSansCondensed-BoldOblique.ttf b/sources/include/tfpdf/font/unifont/DejaVuSansCondensed-BoldOblique.ttf deleted file mode 100644 index e2db5ce..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSansCondensed-BoldOblique.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSansCondensed-Oblique.ttf b/sources/include/tfpdf/font/unifont/DejaVuSansCondensed-Oblique.ttf deleted file mode 100644 index 7cec04c..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSansCondensed-Oblique.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSansCondensed.ttf b/sources/include/tfpdf/font/unifont/DejaVuSansCondensed.ttf deleted file mode 100644 index 826e619..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSansCondensed.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSansMono-Bold.ttf b/sources/include/tfpdf/font/unifont/DejaVuSansMono-Bold.ttf deleted file mode 100644 index 09d4279..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSansMono-Bold.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSansMono-BoldOblique.ttf b/sources/include/tfpdf/font/unifont/DejaVuSansMono-BoldOblique.ttf deleted file mode 100644 index 0344c22..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSansMono-BoldOblique.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSansMono-Oblique.ttf b/sources/include/tfpdf/font/unifont/DejaVuSansMono-Oblique.ttf deleted file mode 100644 index bc16d51..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSansMono-Oblique.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSansMono.ttf b/sources/include/tfpdf/font/unifont/DejaVuSansMono.ttf deleted file mode 100644 index 7260bd6..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSansMono.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSerif-Bold.ttf b/sources/include/tfpdf/font/unifont/DejaVuSerif-Bold.ttf deleted file mode 100644 index afa2d5e..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSerif-Bold.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSerif-BoldItalic.ttf b/sources/include/tfpdf/font/unifont/DejaVuSerif-BoldItalic.ttf deleted file mode 100644 index ce9443e..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSerif-BoldItalic.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSerif-Italic.ttf b/sources/include/tfpdf/font/unifont/DejaVuSerif-Italic.ttf deleted file mode 100644 index c1864a3..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSerif-Italic.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSerif.ttf b/sources/include/tfpdf/font/unifont/DejaVuSerif.ttf deleted file mode 100644 index ed53a29..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSerif.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSerifCondensed-Bold.ttf b/sources/include/tfpdf/font/unifont/DejaVuSerifCondensed-Bold.ttf deleted file mode 100644 index 55adca4..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSerifCondensed-Bold.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSerifCondensed-BoldItalic.ttf b/sources/include/tfpdf/font/unifont/DejaVuSerifCondensed-BoldItalic.ttf deleted file mode 100644 index e211957..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSerifCondensed-BoldItalic.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSerifCondensed-Italic.ttf b/sources/include/tfpdf/font/unifont/DejaVuSerifCondensed-Italic.ttf deleted file mode 100644 index 275b26d..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSerifCondensed-Italic.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVuSerifCondensed.ttf b/sources/include/tfpdf/font/unifont/DejaVuSerifCondensed.ttf deleted file mode 100644 index 83120cd..0000000 Binary files a/sources/include/tfpdf/font/unifont/DejaVuSerifCondensed.ttf and /dev/null differ diff --git a/sources/include/tfpdf/font/unifont/DejaVu_LICENSE.txt b/sources/include/tfpdf/font/unifont/DejaVu_LICENSE.txt deleted file mode 100644 index ac475a8..0000000 --- a/sources/include/tfpdf/font/unifont/DejaVu_LICENSE.txt +++ /dev/null @@ -1,99 +0,0 @@ -Fonts are (c) Bitstream (see below). DejaVu changes are in public domain. -Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below) - -Bitstream Vera Fonts Copyright ------------------------------- - -Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is -a trademark of Bitstream, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of the fonts accompanying this license ("Fonts") and associated -documentation files (the "Font Software"), to reproduce and distribute the -Font Software, including without limitation the rights to use, copy, merge, -publish, distribute, and/or sell copies of the Font Software, and to permit -persons to whom the Font Software is furnished to do so, subject to the -following conditions: - -The above copyright and trademark notices and this permission notice shall -be included in all copies of one or more of the Font Software typefaces. - -The Font Software may be modified, altered, or added to, and in particular -the designs of glyphs or characters in the Fonts may be modified and -additional glyphs or characters may be added to the Fonts, only if the fonts -are renamed to names not containing either the words "Bitstream" or the word -"Vera". - -This License becomes null and void to the extent applicable to Fonts or Font -Software that has been modified and is distributed under the "Bitstream -Vera" names. - -The Font Software may be sold as part of a larger software package but no -copy of one or more of the Font Software typefaces may be sold by itself. - -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, -TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME -FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING -ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE -FONT SOFTWARE. - -Except as contained in this notice, the names of Gnome, the Gnome -Foundation, and Bitstream Inc., shall not be used in advertising or -otherwise to promote the sale, use or other dealings in this Font Software -without prior written authorization from the Gnome Foundation or Bitstream -Inc., respectively. For further information, contact: fonts at gnome dot -org. - -Arev Fonts Copyright ------------------------------- - -Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the fonts accompanying this license ("Fonts") and -associated documentation files (the "Font Software"), to reproduce -and distribute the modifications to the Bitstream Vera Font Software, -including without limitation the rights to use, copy, merge, publish, -distribute, and/or sell copies of the Font Software, and to permit -persons to whom the Font Software is furnished to do so, subject to -the following conditions: - -The above copyright and trademark notices and this permission notice -shall be included in all copies of one or more of the Font Software -typefaces. - -The Font Software may be modified, altered, or added to, and in -particular the designs of glyphs or characters in the Fonts may be -modified and additional glyphs or characters may be added to the -Fonts, only if the fonts are renamed to names not containing either -the words "Tavmjong Bah" or the word "Arev". - -This License becomes null and void to the extent applicable to Fonts -or Font Software that has been modified and is distributed under the -"Tavmjong Bah Arev" names. - -The Font Software may be sold as part of a larger software package but -no copy of one or more of the Font Software typefaces may be sold by -itself. - -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL -TAVMJONG BAH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. - -Except as contained in this notice, the name of Tavmjong Bah shall not -be used in advertising or otherwise to promote the sale, use or other -dealings in this Font Software without prior written authorization -from Tavmjong Bah. For further information, contact: tavmjong @ free -. fr. - -$Id$ diff --git a/sources/include/tfpdf/font/unifont/ttfonts.php b/sources/include/tfpdf/font/unifont/ttfonts.php deleted file mode 100644 index a9db5fb..0000000 --- a/sources/include/tfpdf/font/unifont/ttfonts.php +++ /dev/null @@ -1,1089 +0,0 @@ - * -* License: LGPL * -* Copyright (c) Ian Back, 2010 * -* This header must be retained in any redistribution or * -* modification of the file. * -* * -*******************************************************************************/ - -// Define the value used in the "head" table of a created TTF file -// 0x74727565 "true" for Mac -// 0x00010000 for Windows -// Either seems to work for a font embedded in a PDF file -// when read by Adobe Reader on a Windows PC(!) -define("_TTF_MAC_HEADER", false); - - -// TrueType Font Glyph operators -define("GF_WORDS",(1 << 0)); -define("GF_SCALE",(1 << 3)); -define("GF_MORE",(1 << 5)); -define("GF_XYSCALE",(1 << 6)); -define("GF_TWOBYTWO",(1 << 7)); - - - -class TTFontFile { - -var $maxUni; -var $_pos; -var $numTables; -var $searchRange; -var $entrySelector; -var $rangeShift; -var $tables; -var $otables; -var $filename; -var $fh; -var $hmetrics; -var $glyphPos; -var $charToGlyph; -var $ascent; -var $descent; -var $name; -var $familyName; -var $styleName; -var $fullName; -var $uniqueFontID; -var $unitsPerEm; -var $bbox; -var $capHeight; -var $stemV; -var $italicAngle; -var $flags; -var $underlinePosition; -var $underlineThickness; -var $charWidths; -var $defaultWidth; -var $maxStrLenRead; - - function TTFontFile() { - $this->maxStrLenRead = 200000; // Maximum size of glyf table to read in as string (otherwise reads each glyph from file) - } - - - function getMetrics($file) { - $this->filename = $file; - $this->fh = fopen($file,'rb') or die('Can\'t open file ' . $file); - $this->_pos = 0; - $this->charWidths = ''; - $this->glyphPos = array(); - $this->charToGlyph = array(); - $this->tables = array(); - $this->otables = array(); - $this->ascent = 0; - $this->descent = 0; - $this->TTCFonts = array(); - $this->version = $version = $this->read_ulong(); - if ($version==0x4F54544F) - die("Postscript outlines are not supported"); - if ($version==0x74746366) - die("ERROR - TrueType Fonts Collections not supported"); - if (!in_array($version, array(0x00010000,0x74727565))) - die("Not a TrueType font: version=".$version); - $this->readTableDirectory(); - $this->extractInfo(); - fclose($this->fh); - } - - - function readTableDirectory() { - $this->numTables = $this->read_ushort(); - $this->searchRange = $this->read_ushort(); - $this->entrySelector = $this->read_ushort(); - $this->rangeShift = $this->read_ushort(); - $this->tables = array(); - for ($i=0;$i<$this->numTables;$i++) { - $record = array(); - $record['tag'] = $this->read_tag(); - $record['checksum'] = array($this->read_ushort(),$this->read_ushort()); - $record['offset'] = $this->read_ulong(); - $record['length'] = $this->read_ulong(); - $this->tables[$record['tag']] = $record; - } - } - - - function sub32($x, $y) { - $xlo = $x[1]; - $xhi = $x[0]; - $ylo = $y[1]; - $yhi = $y[0]; - if ($ylo > $xlo) { $xlo += 1 << 16; $yhi += 1; } - $reslo = $xlo-$ylo; - if ($yhi > $xhi) { $xhi += 1 << 16; } - $reshi = $xhi-$yhi; - $reshi = $reshi & 0xFFFF; - return array($reshi, $reslo); - } - - function calcChecksum($data) { - if (strlen($data) % 4) { $data .= str_repeat("\0",(4-(strlen($data) % 4))); } - $hi=0x0000; - $lo=0x0000; - for($i=0;$i> 16; - $lo = $lo & 0xFFFF; - $hi = $hi & 0xFFFF; - } - return array($hi, $lo); - } - - function get_table_pos($tag) { - $offset = $this->tables[$tag]['offset']; - $length = $this->tables[$tag]['length']; - return array($offset, $length); - } - - function seek($pos) { - $this->_pos = $pos; - fseek($this->fh,$this->_pos); - } - - function skip($delta) { - $this->_pos = $this->_pos + $delta; - fseek($this->fh,$this->_pos); - } - - function seek_table($tag, $offset_in_table = 0) { - $tpos = $this->get_table_pos($tag); - $this->_pos = $tpos[0] + $offset_in_table; - fseek($this->fh, $this->_pos); - return $this->_pos; - } - - function read_tag() { - $this->_pos += 4; - return fread($this->fh,4); - } - - function read_short() { - $this->_pos += 2; - $s = fread($this->fh,2); - $a = (ord($s[0])<<8) + ord($s[1]); - if ($a & (1 << 15) ) { $a = ($a - (1 << 16)) ; } - return $a; - } - - function unpack_short($s) { - $a = (ord($s[0])<<8) + ord($s[1]); - if ($a & (1 << 15) ) { - $a = ($a - (1 << 16)); - } - return $a; - } - - function read_ushort() { - $this->_pos += 2; - $s = fread($this->fh,2); - return (ord($s[0])<<8) + ord($s[1]); - } - - function read_ulong() { - $this->_pos += 4; - $s = fread($this->fh,4); - // if large uInt32 as an integer, PHP converts it to -ve - return (ord($s[0])*16777216) + (ord($s[1])<<16) + (ord($s[2])<<8) + ord($s[3]); // 16777216 = 1<<24 - } - - function get_ushort($pos) { - fseek($this->fh,$pos); - $s = fread($this->fh,2); - return (ord($s[0])<<8) + ord($s[1]); - } - - function get_ulong($pos) { - fseek($this->fh,$pos); - $s = fread($this->fh,4); - // iF large uInt32 as an integer, PHP converts it to -ve - return (ord($s[0])*16777216) + (ord($s[1])<<16) + (ord($s[2])<<8) + ord($s[3]); // 16777216 = 1<<24 - } - - function pack_short($val) { - if ($val<0) { - $val = abs($val); - $val = ~$val; - $val += 1; - } - return pack("n",$val); - } - - function splice($stream, $offset, $value) { - return substr($stream,0,$offset) . $value . substr($stream,$offset+strlen($value)); - } - - function _set_ushort($stream, $offset, $value) { - $up = pack("n", $value); - return $this->splice($stream, $offset, $up); - } - - function _set_short($stream, $offset, $val) { - if ($val<0) { - $val = abs($val); - $val = ~$val; - $val += 1; - } - $up = pack("n",$val); - return $this->splice($stream, $offset, $up); - } - - function get_chunk($pos, $length) { - fseek($this->fh,$pos); - if ($length <1) { return ''; } - return (fread($this->fh,$length)); - } - - function get_table($tag) { - list($pos, $length) = $this->get_table_pos($tag); - if ($length == 0) { die('Truetype font ('.$this->filename.'): error reading table: '.$tag); } - fseek($this->fh,$pos); - return (fread($this->fh,$length)); - } - - function add($tag, $data) { - if ($tag == 'head') { - $data = $this->splice($data, 8, "\0\0\0\0"); - } - $this->otables[$tag] = $data; - } - - - -///////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////// - -///////////////////////////////////////////////////////////////////////////////////////// - - function extractInfo() { - /////////////////////////////////// - // name - Naming table - /////////////////////////////////// - $this->sFamilyClass = 0; - $this->sFamilySubClass = 0; - - $name_offset = $this->seek_table("name"); - $format = $this->read_ushort(); - if ($format != 0) - die("Unknown name table format ".$format); - $numRecords = $this->read_ushort(); - $string_data_offset = $name_offset + $this->read_ushort(); - $names = array(1=>'',2=>'',3=>'',4=>'',6=>''); - $K = array_keys($names); - $nameCount = count($names); - for ($i=0;$i<$numRecords; $i++) { - $platformId = $this->read_ushort(); - $encodingId = $this->read_ushort(); - $languageId = $this->read_ushort(); - $nameId = $this->read_ushort(); - $length = $this->read_ushort(); - $offset = $this->read_ushort(); - if (!in_array($nameId,$K)) continue; - $N = ''; - if ($platformId == 3 && $encodingId == 1 && $languageId == 0x409) { // Microsoft, Unicode, US English, PS Name - $opos = $this->_pos; - $this->seek($string_data_offset + $offset); - if ($length % 2 != 0) - die("PostScript name is UTF-16BE string of odd length"); - $length /= 2; - $N = ''; - while ($length > 0) { - $char = $this->read_ushort(); - $N .= (chr($char)); - $length -= 1; - } - $this->_pos = $opos; - $this->seek($opos); - } - else if ($platformId == 1 && $encodingId == 0 && $languageId == 0) { // Macintosh, Roman, English, PS Name - $opos = $this->_pos; - $N = $this->get_chunk($string_data_offset + $offset, $length); - $this->_pos = $opos; - $this->seek($opos); - } - if ($N && $names[$nameId]=='') { - $names[$nameId] = $N; - $nameCount -= 1; - if ($nameCount==0) break; - } - } - if ($names[6]) - $psName = $names[6]; - else if ($names[4]) - $psName = preg_replace('/ /','-',$names[4]); - else if ($names[1]) - $psName = preg_replace('/ /','-',$names[1]); - else - $psName = ''; - if (!$psName) - die("Could not find PostScript font name"); - $this->name = $psName; - if ($names[1]) { $this->familyName = $names[1]; } else { $this->familyName = $psName; } - if ($names[2]) { $this->styleName = $names[2]; } else { $this->styleName = 'Regular'; } - if ($names[4]) { $this->fullName = $names[4]; } else { $this->fullName = $psName; } - if ($names[3]) { $this->uniqueFontID = $names[3]; } else { $this->uniqueFontID = $psName; } - if ($names[6]) { $this->fullName = $names[6]; } - - /////////////////////////////////// - // head - Font header table - /////////////////////////////////// - $this->seek_table("head"); - $this->skip(18); - $this->unitsPerEm = $unitsPerEm = $this->read_ushort(); - $scale = 1000 / $unitsPerEm; - $this->skip(16); - $xMin = $this->read_short(); - $yMin = $this->read_short(); - $xMax = $this->read_short(); - $yMax = $this->read_short(); - $this->bbox = array(($xMin*$scale), ($yMin*$scale), ($xMax*$scale), ($yMax*$scale)); - $this->skip(3*2); - $indexToLocFormat = $this->read_ushort(); - $glyphDataFormat = $this->read_ushort(); - if ($glyphDataFormat != 0) - die('Unknown glyph data format '.$glyphDataFormat); - - /////////////////////////////////// - // hhea metrics table - /////////////////////////////////// - // ttf2t1 seems to use this value rather than the one in OS/2 - so put in for compatibility - if (isset($this->tables["hhea"])) { - $this->seek_table("hhea"); - $this->skip(4); - $hheaAscender = $this->read_short(); - $hheaDescender = $this->read_short(); - $this->ascent = ($hheaAscender *$scale); - $this->descent = ($hheaDescender *$scale); - } - - /////////////////////////////////// - // OS/2 - OS/2 and Windows metrics table - /////////////////////////////////// - if (isset($this->tables["OS/2"])) { - $this->seek_table("OS/2"); - $version = $this->read_ushort(); - $this->skip(2); - $usWeightClass = $this->read_ushort(); - $this->skip(2); - $fsType = $this->read_ushort(); - if ($fsType == 0x0002 || ($fsType & 0x0300) != 0) { - die('ERROR - Font file '.$this->filename.' cannot be embedded due to copyright restrictions.'); - $this->restrictedUse = true; - } - $this->skip(20); - $sF = $this->read_short(); - $this->sFamilyClass = ($sF >> 8); - $this->sFamilySubClass = ($sF & 0xFF); - $this->_pos += 10; //PANOSE = 10 byte length - $panose = fread($this->fh,10); - $this->skip(26); - $sTypoAscender = $this->read_short(); - $sTypoDescender = $this->read_short(); - if (!$this->ascent) $this->ascent = ($sTypoAscender*$scale); - if (!$this->descent) $this->descent = ($sTypoDescender*$scale); - if ($version > 1) { - $this->skip(16); - $sCapHeight = $this->read_short(); - $this->capHeight = ($sCapHeight*$scale); - } - else { - $this->capHeight = $this->ascent; - } - } - else { - $usWeightClass = 500; - if (!$this->ascent) $this->ascent = ($yMax*$scale); - if (!$this->descent) $this->descent = ($yMin*$scale); - $this->capHeight = $this->ascent; - } - $this->stemV = 50 + intval(pow(($usWeightClass / 65.0),2)); - - /////////////////////////////////// - // post - PostScript table - /////////////////////////////////// - $this->seek_table("post"); - $this->skip(4); - $this->italicAngle = $this->read_short() + $this->read_ushort() / 65536.0; - $this->underlinePosition = $this->read_short() * $scale; - $this->underlineThickness = $this->read_short() * $scale; - $isFixedPitch = $this->read_ulong(); - - $this->flags = 4; - - if ($this->italicAngle!= 0) - $this->flags = $this->flags | 64; - if ($usWeightClass >= 600) - $this->flags = $this->flags | 262144; - if ($isFixedPitch) - $this->flags = $this->flags | 1; - - /////////////////////////////////// - // hhea - Horizontal header table - /////////////////////////////////// - $this->seek_table("hhea"); - $this->skip(32); - $metricDataFormat = $this->read_ushort(); - if ($metricDataFormat != 0) - die('Unknown horizontal metric data format '.$metricDataFormat); - $numberOfHMetrics = $this->read_ushort(); - if ($numberOfHMetrics == 0) - die('Number of horizontal metrics is 0'); - - /////////////////////////////////// - // maxp - Maximum profile table - /////////////////////////////////// - $this->seek_table("maxp"); - $this->skip(4); - $numGlyphs = $this->read_ushort(); - - - /////////////////////////////////// - // cmap - Character to glyph index mapping table - /////////////////////////////////// - $cmap_offset = $this->seek_table("cmap"); - $this->skip(2); - $cmapTableCount = $this->read_ushort(); - $unicode_cmap_offset = 0; - for ($i=0;$i<$cmapTableCount;$i++) { - $platformID = $this->read_ushort(); - $encodingID = $this->read_ushort(); - $offset = $this->read_ulong(); - $save_pos = $this->_pos; - if (($platformID == 3 && $encodingID == 1) || $platformID == 0) { // Microsoft, Unicode - $format = $this->get_ushort($cmap_offset + $offset); - if ($format == 4) { - if (!$unicode_cmap_offset) $unicode_cmap_offset = $cmap_offset + $offset; - break; - } - } - $this->seek($save_pos ); - } - if (!$unicode_cmap_offset) - die('Font ('.$this->filename .') does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)'); - - - $glyphToChar = array(); - $charToGlyph = array(); - $this->getCMAP4($unicode_cmap_offset, $glyphToChar, $charToGlyph ); - - /////////////////////////////////// - // hmtx - Horizontal metrics table - /////////////////////////////////// - $this->getHMTX($numberOfHMetrics, $numGlyphs, $glyphToChar, $scale); - - } - - -///////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////// - - - function makeSubset($file, &$subset) { - $this->filename = $file; - $this->fh = fopen($file ,'rb') or die('Can\'t open file ' . $file); - $this->_pos = 0; - $this->charWidths = ''; - $this->glyphPos = array(); - $this->charToGlyph = array(); - $this->tables = array(); - $this->otables = array(); - $this->ascent = 0; - $this->descent = 0; - $this->skip(4); - $this->maxUni = 0; - $this->readTableDirectory(); - - - /////////////////////////////////// - // head - Font header table - /////////////////////////////////// - $this->seek_table("head"); - $this->skip(50); - $indexToLocFormat = $this->read_ushort(); - $glyphDataFormat = $this->read_ushort(); - - /////////////////////////////////// - // hhea - Horizontal header table - /////////////////////////////////// - $this->seek_table("hhea"); - $this->skip(32); - $metricDataFormat = $this->read_ushort(); - $orignHmetrics = $numberOfHMetrics = $this->read_ushort(); - - /////////////////////////////////// - // maxp - Maximum profile table - /////////////////////////////////// - $this->seek_table("maxp"); - $this->skip(4); - $numGlyphs = $this->read_ushort(); - - - /////////////////////////////////// - // cmap - Character to glyph index mapping table - /////////////////////////////////// - $cmap_offset = $this->seek_table("cmap"); - $this->skip(2); - $cmapTableCount = $this->read_ushort(); - $unicode_cmap_offset = 0; - for ($i=0;$i<$cmapTableCount;$i++) { - $platformID = $this->read_ushort(); - $encodingID = $this->read_ushort(); - $offset = $this->read_ulong(); - $save_pos = $this->_pos; - if (($platformID == 3 && $encodingID == 1) || $platformID == 0) { // Microsoft, Unicode - $format = $this->get_ushort($cmap_offset + $offset); - if ($format == 4) { - $unicode_cmap_offset = $cmap_offset + $offset; - break; - } - } - $this->seek($save_pos ); - } - - if (!$unicode_cmap_offset) - die('Font ('.$this->filename .') does not have cmap for Unicode (platform 3, encoding 1, format 4, or platform 0, any encoding, format 4)'); - - - $glyphToChar = array(); - $charToGlyph = array(); - $this->getCMAP4($unicode_cmap_offset, $glyphToChar, $charToGlyph ); - - $this->charToGlyph = $charToGlyph; - - /////////////////////////////////// - // hmtx - Horizontal metrics table - /////////////////////////////////// - $scale = 1; // not used - $this->getHMTX($numberOfHMetrics, $numGlyphs, $glyphToChar, $scale); - - /////////////////////////////////// - // loca - Index to location - /////////////////////////////////// - $this->getLOCA($indexToLocFormat, $numGlyphs); - - $subsetglyphs = array(0=>0); - $subsetCharToGlyph = array(); - foreach($subset AS $code) { - if (isset($this->charToGlyph[$code])) { - $subsetglyphs[$this->charToGlyph[$code]] = $code; // Old Glyph ID => Unicode - $subsetCharToGlyph[$code] = $this->charToGlyph[$code]; // Unicode to old GlyphID - - } - $this->maxUni = max($this->maxUni, $code); - } - - list($start,$dummy) = $this->get_table_pos('glyf'); - - $glyphSet = array(); - ksort($subsetglyphs); - $n = 0; - $fsLastCharIndex = 0; // maximum Unicode index (character code) in this font, according to the cmap subtable for platform ID 3 and platform- specific encoding ID 0 or 1. - foreach($subsetglyphs AS $originalGlyphIdx => $uni) { - $fsLastCharIndex = max($fsLastCharIndex , $uni); - $glyphSet[$originalGlyphIdx] = $n; // old glyphID to new glyphID - $n++; - } - - ksort($subsetCharToGlyph); - foreach($subsetCharToGlyph AS $uni => $originalGlyphIdx) { - $codeToGlyph[$uni] = $glyphSet[$originalGlyphIdx] ; - } - $this->codeToGlyph = $codeToGlyph; - - ksort($subsetglyphs); - foreach($subsetglyphs AS $originalGlyphIdx => $uni) { - $this->getGlyphs($originalGlyphIdx, $start, $glyphSet, $subsetglyphs); - } - - $numGlyphs = $numberOfHMetrics = count($subsetglyphs ); - - //tables copied from the original - $tags = array ('name'); - foreach($tags AS $tag) { $this->add($tag, $this->get_table($tag)); } - $tags = array ('cvt ', 'fpgm', 'prep', 'gasp'); - foreach($tags AS $tag) { - if (isset($this->tables[$tag])) { $this->add($tag, $this->get_table($tag)); } - } - - // post - PostScript - $opost = $this->get_table('post'); - $post = "\x00\x03\x00\x00" . substr($opost,4,12) . "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; - $this->add('post', $post); - - // Sort CID2GID map into segments of contiguous codes - ksort($codeToGlyph); - unset($codeToGlyph[0]); - //unset($codeToGlyph[65535]); - $rangeid = 0; - $range = array(); - $prevcid = -2; - $prevglidx = -1; - // for each character - foreach ($codeToGlyph as $cid => $glidx) { - if ($cid == ($prevcid + 1) && $glidx == ($prevglidx + 1)) { - $range[$rangeid][] = $glidx; - } else { - // new range - $rangeid = $cid; - $range[$rangeid] = array(); - $range[$rangeid][] = $glidx; - } - $prevcid = $cid; - $prevglidx = $glidx; - } - - // cmap - Character to glyph mapping - Format 4 (MS / ) - $segCount = count($range) + 1; // + 1 Last segment has missing character 0xFFFF - $searchRange = 1; - $entrySelector = 0; - while ($searchRange * 2 <= $segCount ) { - $searchRange = $searchRange * 2; - $entrySelector = $entrySelector + 1; - } - $searchRange = $searchRange * 2; - $rangeShift = $segCount * 2 - $searchRange; - $length = 16 + (8*$segCount ) + ($numGlyphs+1); - $cmap = array(0, 1, // Index : version, number of encoding subtables - 3, 1, // Encoding Subtable : platform (MS=3), encoding (Unicode) - 0, 12, // Encoding Subtable : offset (hi,lo) - 4, $length, 0, // Format 4 Mapping subtable: format, length, language - $segCount*2, - $searchRange, - $entrySelector, - $rangeShift); - - // endCode(s) - foreach($range AS $start=>$subrange) { - $endCode = $start + (count($subrange)-1); - $cmap[] = $endCode; // endCode(s) - } - $cmap[] = 0xFFFF; // endCode of last Segment - $cmap[] = 0; // reservedPad - - // startCode(s) - foreach($range AS $start=>$subrange) { - $cmap[] = $start; // startCode(s) - } - $cmap[] = 0xFFFF; // startCode of last Segment - // idDelta(s) - foreach($range AS $start=>$subrange) { - $idDelta = -($start-$subrange[0]); - $n += count($subrange); - $cmap[] = $idDelta; // idDelta(s) - } - $cmap[] = 1; // idDelta of last Segment - // idRangeOffset(s) - foreach($range AS $subrange) { - $cmap[] = 0; // idRangeOffset[segCount] Offset in bytes to glyph indexArray, or 0 - - } - $cmap[] = 0; // idRangeOffset of last Segment - foreach($range AS $subrange) { - foreach($subrange AS $glidx) { - $cmap[] = $glidx; - } - } - $cmap[] = 0; // Mapping for last character - $cmapstr = ''; - foreach($cmap AS $cm) { $cmapstr .= pack("n",$cm); } - $this->add('cmap', $cmapstr); - - - // glyf - Glyph data - list($glyfOffset,$glyfLength) = $this->get_table_pos('glyf'); - if ($glyfLength < $this->maxStrLenRead) { - $glyphData = $this->get_table('glyf'); - } - - $offsets = array(); - $glyf = ''; - $pos = 0; - - $hmtxstr = ''; - $xMinT = 0; - $yMinT = 0; - $xMaxT = 0; - $yMaxT = 0; - $advanceWidthMax = 0; - $minLeftSideBearing = 0; - $minRightSideBearing = 0; - $xMaxExtent = 0; - $maxPoints = 0; // points in non-compound glyph - $maxContours = 0; // contours in non-compound glyph - $maxComponentPoints = 0; // points in compound glyph - $maxComponentContours = 0; // contours in compound glyph - $maxComponentElements = 0; // number of glyphs referenced at top level - $maxComponentDepth = 0; // levels of recursion, set to 0 if font has only simple glyphs - $this->glyphdata = array(); - - foreach($subsetglyphs AS $originalGlyphIdx => $uni) { - // hmtx - Horizontal Metrics - $hm = $this->getHMetric($orignHmetrics, $originalGlyphIdx); - $hmtxstr .= $hm; - - $offsets[] = $pos; - $glyphPos = $this->glyphPos[$originalGlyphIdx]; - $glyphLen = $this->glyphPos[$originalGlyphIdx + 1] - $glyphPos; - if ($glyfLength < $this->maxStrLenRead) { - $data = substr($glyphData,$glyphPos,$glyphLen); - } - else { - if ($glyphLen > 0) $data = $this->get_chunk($glyfOffset+$glyphPos,$glyphLen); - else $data = ''; - } - - if ($glyphLen > 0) { - $up = unpack("n", substr($data,0,2)); - } - - if ($glyphLen > 2 && ($up[1] & (1 << 15)) ) { // If number of contours <= -1 i.e. composiste glyph - $pos_in_glyph = 10; - $flags = GF_MORE; - $nComponentElements = 0; - while ($flags & GF_MORE) { - $nComponentElements += 1; // number of glyphs referenced at top level - $up = unpack("n", substr($data,$pos_in_glyph,2)); - $flags = $up[1]; - $up = unpack("n", substr($data,$pos_in_glyph+2,2)); - $glyphIdx = $up[1]; - $this->glyphdata[$originalGlyphIdx]['compGlyphs'][] = $glyphIdx; - $data = $this->_set_ushort($data, $pos_in_glyph + 2, $glyphSet[$glyphIdx]); - $pos_in_glyph += 4; - if ($flags & GF_WORDS) { $pos_in_glyph += 4; } - else { $pos_in_glyph += 2; } - if ($flags & GF_SCALE) { $pos_in_glyph += 2; } - else if ($flags & GF_XYSCALE) { $pos_in_glyph += 4; } - else if ($flags & GF_TWOBYTWO) { $pos_in_glyph += 8; } - } - $maxComponentElements = max($maxComponentElements, $nComponentElements); - } - - $glyf .= $data; - $pos += $glyphLen; - if ($pos % 4 != 0) { - $padding = 4 - ($pos % 4); - $glyf .= str_repeat("\0",$padding); - $pos += $padding; - } - } - - $offsets[] = $pos; - $this->add('glyf', $glyf); - - // hmtx - Horizontal Metrics - $this->add('hmtx', $hmtxstr); - - // loca - Index to location - $locastr = ''; - if ((($pos + 1) >> 1) > 0xFFFF) { - $indexToLocFormat = 1; // long format - foreach($offsets AS $offset) { $locastr .= pack("N",$offset); } - } - else { - $indexToLocFormat = 0; // short format - foreach($offsets AS $offset) { $locastr .= pack("n",($offset/2)); } - } - $this->add('loca', $locastr); - - // head - Font header - $head = $this->get_table('head'); - $head = $this->_set_ushort($head, 50, $indexToLocFormat); - $this->add('head', $head); - - - // hhea - Horizontal Header - $hhea = $this->get_table('hhea'); - $hhea = $this->_set_ushort($hhea, 34, $numberOfHMetrics); - $this->add('hhea', $hhea); - - // maxp - Maximum Profile - $maxp = $this->get_table('maxp'); - $maxp = $this->_set_ushort($maxp, 4, $numGlyphs); - $this->add('maxp', $maxp); - - - // OS/2 - OS/2 - $os2 = $this->get_table('OS/2'); - $this->add('OS/2', $os2 ); - - fclose($this->fh); - - // Put the TTF file together - $stm = ''; - $this->endTTFile($stm); - return $stm ; - } - - ////////////////////////////////////////////////////////////////////////////////// - // Recursively get composite glyph data - function getGlyphData($originalGlyphIdx, &$maxdepth, &$depth, &$points, &$contours) { - $depth++; - $maxdepth = max($maxdepth, $depth); - if (count($this->glyphdata[$originalGlyphIdx]['compGlyphs'])) { - foreach($this->glyphdata[$originalGlyphIdx]['compGlyphs'] AS $glyphIdx) { - $this->getGlyphData($glyphIdx, $maxdepth, $depth, $points, $contours); - } - } - else if (($this->glyphdata[$originalGlyphIdx]['nContours'] > 0) && $depth > 0) { // simple - $contours += $this->glyphdata[$originalGlyphIdx]['nContours']; - $points += $this->glyphdata[$originalGlyphIdx]['nPoints']; - } - $depth--; - } - - - ////////////////////////////////////////////////////////////////////////////////// - // Recursively get composite glyphs - function getGlyphs($originalGlyphIdx, &$start, &$glyphSet, &$subsetglyphs) { - $glyphPos = $this->glyphPos[$originalGlyphIdx]; - $glyphLen = $this->glyphPos[$originalGlyphIdx + 1] - $glyphPos; - if (!$glyphLen) { - return; - } - $this->seek($start + $glyphPos); - $numberOfContours = $this->read_short(); - if ($numberOfContours < 0) { - $this->skip(8); - $flags = GF_MORE; - while ($flags & GF_MORE) { - $flags = $this->read_ushort(); - $glyphIdx = $this->read_ushort(); - if (!isset($glyphSet[$glyphIdx])) { - $glyphSet[$glyphIdx] = count($subsetglyphs); // old glyphID to new glyphID - $subsetglyphs[$glyphIdx] = true; - } - $savepos = ftell($this->fh); - $this->getGlyphs($glyphIdx, $start, $glyphSet, $subsetglyphs); - $this->seek($savepos); - if ($flags & GF_WORDS) - $this->skip(4); - else - $this->skip(2); - if ($flags & GF_SCALE) - $this->skip(2); - else if ($flags & GF_XYSCALE) - $this->skip(4); - else if ($flags & GF_TWOBYTWO) - $this->skip(8); - } - } - } - - ////////////////////////////////////////////////////////////////////////////////// - - function getHMTX($numberOfHMetrics, $numGlyphs, &$glyphToChar, $scale) { - $start = $this->seek_table("hmtx"); - $aw = 0; - $this->charWidths = str_pad('', 256*256*2, "\x00"); - $nCharWidths = 0; - if (($numberOfHMetrics*4) < $this->maxStrLenRead) { - $data = $this->get_chunk($start,($numberOfHMetrics*4)); - $arr = unpack("n*", $data); - } - else { $this->seek($start); } - for( $glyph=0; $glyph<$numberOfHMetrics; $glyph++) { - - if (($numberOfHMetrics*4) < $this->maxStrLenRead) { - $aw = $arr[($glyph*2)+1]; - } - else { - $aw = $this->read_ushort(); - $lsb = $this->read_ushort(); - } - if (isset($glyphToChar[$glyph]) || $glyph == 0) { - - if ($aw >= (1 << 15) ) { $aw = 0; } // 1.03 Some (arabic) fonts have -ve values for width - // although should be unsigned value - comes out as e.g. 65108 (intended -50) - if ($glyph == 0) { - $this->defaultWidth = $scale*$aw; - continue; - } - foreach($glyphToChar[$glyph] AS $char) { - if ($char != 0 && $char != 65535) { - $w = intval(round($scale*$aw)); - if ($w == 0) { $w = 65535; } - if ($char < 196608) { - $this->charWidths[$char*2] = chr($w >> 8); - $this->charWidths[$char*2 + 1] = chr($w & 0xFF); - $nCharWidths++; - } - } - } - } - } - $data = $this->get_chunk(($start+$numberOfHMetrics*4),($numGlyphs*2)); - $arr = unpack("n*", $data); - $diff = $numGlyphs-$numberOfHMetrics; - for( $pos=0; $pos<$diff; $pos++) { - $glyph = $pos + $numberOfHMetrics; - if (isset($glyphToChar[$glyph])) { - foreach($glyphToChar[$glyph] AS $char) { - if ($char != 0 && $char != 65535) { - $w = intval(round($scale*$aw)); - if ($w == 0) { $w = 65535; } - if ($char < 196608) { - $this->charWidths[$char*2] = chr($w >> 8); - $this->charWidths[$char*2 + 1] = chr($w & 0xFF); - $nCharWidths++; - } - } - } - } - } - // NB 65535 is a set width of 0 - // First bytes define number of chars in font - $this->charWidths[0] = chr($nCharWidths >> 8); - $this->charWidths[1] = chr($nCharWidths & 0xFF); - } - - function getHMetric($numberOfHMetrics, $gid) { - $start = $this->seek_table("hmtx"); - if ($gid < $numberOfHMetrics) { - $this->seek($start+($gid*4)); - $hm = fread($this->fh,4); - } - else { - $this->seek($start+(($numberOfHMetrics-1)*4)); - $hm = fread($this->fh,2); - $this->seek($start+($numberOfHMetrics*2)+($gid*2)); - $hm .= fread($this->fh,2); - } - return $hm; - } - - function getLOCA($indexToLocFormat, $numGlyphs) { - $start = $this->seek_table('loca'); - $this->glyphPos = array(); - if ($indexToLocFormat == 0) { - $data = $this->get_chunk($start,($numGlyphs*2)+2); - $arr = unpack("n*", $data); - for ($n=0; $n<=$numGlyphs; $n++) { - $this->glyphPos[] = ($arr[$n+1] * 2); - } - } - else if ($indexToLocFormat == 1) { - $data = $this->get_chunk($start,($numGlyphs*4)+4); - $arr = unpack("N*", $data); - for ($n=0; $n<=$numGlyphs; $n++) { - $this->glyphPos[] = ($arr[$n+1]); - } - } - else - die('Unknown location table format '.$indexToLocFormat); - } - - - // CMAP Format 4 - function getCMAP4($unicode_cmap_offset, &$glyphToChar, &$charToGlyph ) { - $this->maxUniChar = 0; - $this->seek($unicode_cmap_offset + 2); - $length = $this->read_ushort(); - $limit = $unicode_cmap_offset + $length; - $this->skip(2); - - $segCount = $this->read_ushort() / 2; - $this->skip(6); - $endCount = array(); - for($i=0; $i<$segCount; $i++) { $endCount[] = $this->read_ushort(); } - $this->skip(2); - $startCount = array(); - for($i=0; $i<$segCount; $i++) { $startCount[] = $this->read_ushort(); } - $idDelta = array(); - for($i=0; $i<$segCount; $i++) { $idDelta[] = $this->read_short(); } // ???? was unsigned short - $idRangeOffset_start = $this->_pos; - $idRangeOffset = array(); - for($i=0; $i<$segCount; $i++) { $idRangeOffset[] = $this->read_ushort(); } - - for ($n=0;$n<$segCount;$n++) { - $endpoint = ($endCount[$n] + 1); - for ($unichar=$startCount[$n];$unichar<$endpoint;$unichar++) { - if ($idRangeOffset[$n] == 0) - $glyph = ($unichar + $idDelta[$n]) & 0xFFFF; - else { - $offset = ($unichar - $startCount[$n]) * 2 + $idRangeOffset[$n]; - $offset = $idRangeOffset_start + 2 * $n + $offset; - if ($offset >= $limit) - $glyph = 0; - else { - $glyph = $this->get_ushort($offset); - if ($glyph != 0) - $glyph = ($glyph + $idDelta[$n]) & 0xFFFF; - } - } - $charToGlyph[$unichar] = $glyph; - if ($unichar < 196608) { $this->maxUniChar = max($unichar,$this->maxUniChar); } - $glyphToChar[$glyph][] = $unichar; - } - } - } - - - // Put the TTF file together - function endTTFile(&$stm) { - $stm = ''; - $numTables = count($this->otables); - $searchRange = 1; - $entrySelector = 0; - while ($searchRange * 2 <= $numTables) { - $searchRange = $searchRange * 2; - $entrySelector = $entrySelector + 1; - } - $searchRange = $searchRange * 16; - $rangeShift = $numTables * 16 - $searchRange; - - // Header - if (_TTF_MAC_HEADER) { - $stm .= (pack("Nnnnn", 0x74727565, $numTables, $searchRange, $entrySelector, $rangeShift)); // Mac - } - else { - $stm .= (pack("Nnnnn", 0x00010000 , $numTables, $searchRange, $entrySelector, $rangeShift)); // Windows - } - - // Table directory - $tables = $this->otables; - - ksort ($tables); - $offset = 12 + $numTables * 16; - foreach ($tables AS $tag=>$data) { - if ($tag == 'head') { $head_start = $offset; } - $stm .= $tag; - $checksum = $this->calcChecksum($data); - $stm .= pack("nn", $checksum[0],$checksum[1]); - $stm .= pack("NN", $offset, strlen($data)); - $paddedLength = (strlen($data)+3)&~3; - $offset = $offset + $paddedLength; - } - - // Table data - foreach ($tables AS $tag=>$data) { - $data .= "\0\0\0"; - $stm .= substr($data,0,(strlen($data)&~3)); - } - - $checksum = $this->calcChecksum($stm); - $checksum = $this->sub32(array(0xB1B0,0xAFBA), $checksum); - $chk = pack("nn", $checksum[0],$checksum[1]); - $stm = $this->splice($stm,($head_start + 8),$chk); - return $stm ; - } - - - - -} - - -?> \ No newline at end of file diff --git a/sources/include/tfpdf/font/zapfdingbats.php b/sources/include/tfpdf/font/zapfdingbats.php deleted file mode 100644 index afef4d3..0000000 --- a/sources/include/tfpdf/font/zapfdingbats.php +++ /dev/null @@ -1,19 +0,0 @@ -0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0, - chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939, - ','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692, - 'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776, - 'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873, - 'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317, - chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0, - chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788, - chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788, - chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918, - chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874, - chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0); -?> diff --git a/sources/include/tfpdf/tfpdf.php b/sources/include/tfpdf/tfpdf.php deleted file mode 100644 index 698e7a5..0000000 --- a/sources/include/tfpdf/tfpdf.php +++ /dev/null @@ -1,2302 +0,0 @@ - * -* License: LGPL * -*******************************************************************************/ - -define('tFPDF_VERSION','1.24'); - -class tFPDF -{ - -var $unifontSubset; -var $page; // current page number -var $n; // current object number -var $offsets; // array of object offsets -var $buffer; // buffer holding in-memory PDF -var $pages; // array containing pages -var $state; // current document state -var $compress; // compression flag -var $k; // scale factor (number of points in user unit) -var $DefOrientation; // default orientation -var $CurOrientation; // current orientation -var $StdPageSizes; // standard page sizes -var $DefPageSize; // default page size -var $CurPageSize; // current page size -var $PageSizes; // used for pages with non default sizes or orientations -var $wPt, $hPt; // dimensions of current page in points -var $w, $h; // dimensions of current page in user unit -var $lMargin; // left margin -var $tMargin; // top margin -var $rMargin; // right margin -var $bMargin; // page break margin -var $cMargin; // cell margin -var $x, $y; // current position in user unit -var $lasth; // height of last printed cell -var $LineWidth; // line width in user unit -var $fontpath; // path containing fonts -var $CoreFonts; // array of core font names -var $fonts; // array of used fonts -var $FontFiles; // array of font files -var $diffs; // array of encoding differences -var $FontFamily; // current font family -var $FontStyle; // current font style -var $underline; // underlining flag -var $CurrentFont; // current font info -var $FontSizePt; // current font size in points -var $FontSize; // current font size in user unit -var $DrawColor; // commands for drawing color -var $FillColor; // commands for filling color -var $TextColor; // commands for text color -var $ColorFlag; // indicates whether fill and text colors are different -var $ws; // word spacing -var $images; // array of used images -var $PageLinks; // array of links in pages -var $links; // array of internal links -var $AutoPageBreak; // automatic page breaking -var $PageBreakTrigger; // threshold used to trigger page breaks -var $InHeader; // flag set when processing header -var $InFooter; // flag set when processing footer -var $ZoomMode; // zoom display mode -var $LayoutMode; // layout display mode -var $title; // title -var $subject; // subject -var $author; // author -var $keywords; // keywords -var $creator; // creator -var $AliasNbPages; // alias for total number of pages -var $PDFVersion; // PDF version number - -/******************************************************************************* -* * -* Public methods * -* * -*******************************************************************************/ -function tFPDF($orientation='P', $unit='mm', $size='A4') -{ - // Some checks - $this->_dochecks(); - // Initialization of properties - $this->page = 0; - $this->n = 2; - $this->buffer = ''; - $this->pages = array(); - $this->PageSizes = array(); - $this->state = 0; - $this->fonts = array(); - $this->FontFiles = array(); - $this->diffs = array(); - $this->images = array(); - $this->links = array(); - $this->InHeader = false; - $this->InFooter = false; - $this->lasth = 0; - $this->FontFamily = ''; - $this->FontStyle = ''; - $this->FontSizePt = 12; - $this->underline = false; - $this->DrawColor = '0 G'; - $this->FillColor = '0 g'; - $this->TextColor = '0 g'; - $this->ColorFlag = false; - $this->ws = 0; - // Font path - if(defined('FPDF_FONTPATH')) - { - $this->fontpath = FPDF_FONTPATH; - if(substr($this->fontpath,-1)!='/' && substr($this->fontpath,-1)!='\\') - $this->fontpath .= '/'; - } - elseif(is_dir(dirname(__FILE__).'/font')) - $this->fontpath = dirname(__FILE__).'/font/'; - else - $this->fontpath = ''; - // Core fonts - $this->CoreFonts = array('courier', 'helvetica', 'times', 'symbol', 'zapfdingbats'); - // Scale factor - if($unit=='pt') - $this->k = 1; - elseif($unit=='mm') - $this->k = 72/25.4; - elseif($unit=='cm') - $this->k = 72/2.54; - elseif($unit=='in') - $this->k = 72; - else - $this->Error('Incorrect unit: '.$unit); - // Page sizes - $this->StdPageSizes = array('a3'=>array(841.89,1190.55), 'a4'=>array(595.28,841.89), 'a5'=>array(420.94,595.28), - 'letter'=>array(612,792), 'legal'=>array(612,1008)); - $size = $this->_getpagesize($size); - $this->DefPageSize = $size; - $this->CurPageSize = $size; - // Page orientation - $orientation = strtolower($orientation); - if($orientation=='p' || $orientation=='portrait') - { - $this->DefOrientation = 'P'; - $this->w = $size[0]; - $this->h = $size[1]; - } - elseif($orientation=='l' || $orientation=='landscape') - { - $this->DefOrientation = 'L'; - $this->w = $size[1]; - $this->h = $size[0]; - } - else - $this->Error('Incorrect orientation: '.$orientation); - $this->CurOrientation = $this->DefOrientation; - $this->wPt = $this->w*$this->k; - $this->hPt = $this->h*$this->k; - // Page margins (1 cm) - $margin = 28.35/$this->k; - $this->SetMargins($margin,$margin); - // Interior cell margin (1 mm) - $this->cMargin = $margin/10; - // Line width (0.2 mm) - $this->LineWidth = .567/$this->k; - // Automatic page break - $this->SetAutoPageBreak(true,2*$margin); - // Default display mode - $this->SetDisplayMode('default'); - // Enable compression - $this->SetCompression(true); - // Set default PDF version number - $this->PDFVersion = '1.3'; -} - -function SetMargins($left, $top, $right=null) -{ - // Set left, top and right margins - $this->lMargin = $left; - $this->tMargin = $top; - if($right===null) - $right = $left; - $this->rMargin = $right; -} - -function SetLeftMargin($margin) -{ - // Set left margin - $this->lMargin = $margin; - if($this->page>0 && $this->x<$margin) - $this->x = $margin; -} - -function SetTopMargin($margin) -{ - // Set top margin - $this->tMargin = $margin; -} - -function SetRightMargin($margin) -{ - // Set right margin - $this->rMargin = $margin; -} - -function SetAutoPageBreak($auto, $margin=0) -{ - // Set auto page break mode and triggering margin - $this->AutoPageBreak = $auto; - $this->bMargin = $margin; - $this->PageBreakTrigger = $this->h-$margin; -} - -function SetDisplayMode($zoom, $layout='default') -{ - // Set display mode in viewer - if($zoom=='fullpage' || $zoom=='fullwidth' || $zoom=='real' || $zoom=='default' || !is_string($zoom)) - $this->ZoomMode = $zoom; - else - $this->Error('Incorrect zoom display mode: '.$zoom); - if($layout=='single' || $layout=='continuous' || $layout=='two' || $layout=='default') - $this->LayoutMode = $layout; - else - $this->Error('Incorrect layout display mode: '.$layout); -} - -function SetCompression($compress) -{ - // Set page compression - if(function_exists('gzcompress')) - $this->compress = $compress; - else - $this->compress = false; -} - -function SetTitle($title, $isUTF8=false) -{ - // Title of document - if($isUTF8) - $title = $this->_UTF8toUTF16($title); - $this->title = $title; -} - -function SetSubject($subject, $isUTF8=false) -{ - // Subject of document - if($isUTF8) - $subject = $this->_UTF8toUTF16($subject); - $this->subject = $subject; -} - -function SetAuthor($author, $isUTF8=false) -{ - // Author of document - if($isUTF8) - $author = $this->_UTF8toUTF16($author); - $this->author = $author; -} - -function SetKeywords($keywords, $isUTF8=false) -{ - // Keywords of document - if($isUTF8) - $keywords = $this->_UTF8toUTF16($keywords); - $this->keywords = $keywords; -} - -function SetCreator($creator, $isUTF8=false) -{ - // Creator of document - if($isUTF8) - $creator = $this->_UTF8toUTF16($creator); - $this->creator = $creator; -} - -function AliasNbPages($alias='{nb}') -{ - // Define an alias for total number of pages - $this->AliasNbPages = $alias; -} - -function Error($msg) -{ - // Fatal error - die('FPDF error: '.$msg); -} - -function Open() -{ - // Begin document - $this->state = 1; -} - -function Close() -{ - // Terminate document - if($this->state==3) - return; - if($this->page==0) - $this->AddPage(); - // Page footer - $this->InFooter = true; - $this->Footer(); - $this->InFooter = false; - // Close page - $this->_endpage(); - // Close document - $this->_enddoc(); -} - -function AddPage($orientation='', $size='') -{ - // Start a new page - if($this->state==0) - $this->Open(); - $family = $this->FontFamily; - $style = $this->FontStyle.($this->underline ? 'U' : ''); - $fontsize = $this->FontSizePt; - $lw = $this->LineWidth; - $dc = $this->DrawColor; - $fc = $this->FillColor; - $tc = $this->TextColor; - $cf = $this->ColorFlag; - if($this->page>0) - { - // Page footer - $this->InFooter = true; - $this->Footer(); - $this->InFooter = false; - // Close page - $this->_endpage(); - } - // Start new page - $this->_beginpage($orientation,$size); - // Set line cap style to square - $this->_out('2 J'); - // Set line width - $this->LineWidth = $lw; - $this->_out(sprintf('%.2F w',$lw*$this->k)); - // Set font - if($family) - $this->SetFont($family,$style,$fontsize); - // Set colors - $this->DrawColor = $dc; - if($dc!='0 G') - $this->_out($dc); - $this->FillColor = $fc; - if($fc!='0 g') - $this->_out($fc); - $this->TextColor = $tc; - $this->ColorFlag = $cf; - // Page header - $this->InHeader = true; - $this->Header(); - $this->InHeader = false; - // Restore line width - if($this->LineWidth!=$lw) - { - $this->LineWidth = $lw; - $this->_out(sprintf('%.2F w',$lw*$this->k)); - } - // Restore font - if($family) - $this->SetFont($family,$style,$fontsize); - // Restore colors - if($this->DrawColor!=$dc) - { - $this->DrawColor = $dc; - $this->_out($dc); - } - if($this->FillColor!=$fc) - { - $this->FillColor = $fc; - $this->_out($fc); - } - $this->TextColor = $tc; - $this->ColorFlag = $cf; -} - -function Header() -{ - // To be implemented in your own inherited class -} - -function Footer() -{ - // To be implemented in your own inherited class -} - -function PageNo() -{ - // Get current page number - return $this->page; -} - -function SetDrawColor($r, $g=null, $b=null) -{ - // Set color for all stroking operations - if(($r==0 && $g==0 && $b==0) || $g===null) - $this->DrawColor = sprintf('%.3F G',$r/255); - else - $this->DrawColor = sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255); - if($this->page>0) - $this->_out($this->DrawColor); -} - -function SetFillColor($r, $g=null, $b=null) -{ - // Set color for all filling operations - if(($r==0 && $g==0 && $b==0) || $g===null) - $this->FillColor = sprintf('%.3F g',$r/255); - else - $this->FillColor = sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); - $this->ColorFlag = ($this->FillColor!=$this->TextColor); - if($this->page>0) - $this->_out($this->FillColor); -} - -function SetTextColor($r, $g=null, $b=null) -{ - // Set color for text - if(($r==0 && $g==0 && $b==0) || $g===null) - $this->TextColor = sprintf('%.3F g',$r/255); - else - $this->TextColor = sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); - $this->ColorFlag = ($this->FillColor!=$this->TextColor); -} - -function GetStringWidth($s) -{ - // Get width of a string in the current font - $s = (string)$s; - $cw = &$this->CurrentFont['cw']; - $w=0; - if ($this->unifontSubset) { - $unicode = $this->UTF8StringToArray($s); - foreach($unicode as $char) { - if (isset($cw[$char])) { $w += (ord($cw[2*$char])<<8) + ord($cw[2*$char+1]); } - else if($char>0 && $char<128 && isset($cw[chr($char)])) { $w += $cw[chr($char)]; } - else if(isset($this->CurrentFont['desc']['MissingWidth'])) { $w += $this->CurrentFont['desc']['MissingWidth']; } - else if(isset($this->CurrentFont['MissingWidth'])) { $w += $this->CurrentFont['MissingWidth']; } - else { $w += 500; } - } - } - else { - $l = strlen($s); - for($i=0;$i<$l;$i++) - $w += $cw[$s[$i]]; - } - return $w*$this->FontSize/1000; -} - -function SetLineWidth($width) -{ - // Set line width - $this->LineWidth = $width; - if($this->page>0) - $this->_out(sprintf('%.2F w',$width*$this->k)); -} - -function Line($x1, $y1, $x2, $y2) -{ - // Draw a line - $this->_out(sprintf('%.2F %.2F m %.2F %.2F l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k)); -} - -function Rect($x, $y, $w, $h, $style='') -{ - // Draw a rectangle - if($style=='F') - $op = 'f'; - elseif($style=='FD' || $style=='DF') - $op = 'B'; - else - $op = 'S'; - $this->_out(sprintf('%.2F %.2F %.2F %.2F re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op)); -} - -function AddFont($family, $style='', $file='', $uni=false) -{ - // Add a TrueType, OpenType or Type1 font - $family = strtolower($family); - $style = strtoupper($style); - if($style=='IB') - $style='BI'; - if($file=='') { - if ($uni) { - $file = str_replace(' ','',$family).strtolower($style).'.ttf'; - } - else { - $file = str_replace(' ','',$family).strtolower($style).'.php'; - } - } - $fontkey = $family.$style; - if(isset($this->fonts[$fontkey])) - return; - - if ($uni) { - if (defined("_SYSTEM_TTFONTS") && file_exists(_SYSTEM_TTFONTS.$file )) { $ttffilename = _SYSTEM_TTFONTS.$file ; } - else { $ttffilename = $this->_getfontpath().'unifont/'.$file ; } - $unifilename = $this->_getfontpath().'unifont/'.strtolower(substr($file ,0,(strpos($file ,'.')))); - $name = ''; - $originalsize = 0; - $ttfstat = stat($ttffilename); - if (file_exists($unifilename.'.mtx.php')) { - include($unifilename.'.mtx.php'); - } - if (!isset($type) || !isset($name) || $originalsize != $ttfstat['size']) { - $ttffile = $ttffilename; - require_once($this->_getfontpath().'unifont/ttfonts.php'); - $ttf = new TTFontFile(); - $ttf->getMetrics($ttffile); - $cw = $ttf->charWidths; - $name = preg_replace('/[ ()]/','',$ttf->fullName); - - $desc= array('Ascent'=>round($ttf->ascent), - 'Descent'=>round($ttf->descent), - 'CapHeight'=>round($ttf->capHeight), - 'Flags'=>$ttf->flags, - 'FontBBox'=>'['.round($ttf->bbox[0])." ".round($ttf->bbox[1])." ".round($ttf->bbox[2])." ".round($ttf->bbox[3]).']', - 'ItalicAngle'=>$ttf->italicAngle, - 'StemV'=>round($ttf->stemV), - 'MissingWidth'=>round($ttf->defaultWidth)); - $up = round($ttf->underlinePosition); - $ut = round($ttf->underlineThickness); - $originalsize = $ttfstat['size']+0; - $type = 'TTF'; - // Generate metrics .php file - $s='"; - if (is_writable(dirname($this->_getfontpath().'unifont/'.'x'))) { - $fh = fopen($unifilename.'.mtx.php',"w"); - fwrite($fh,$s,strlen($s)); - fclose($fh); - $fh = fopen($unifilename.'.cw.dat',"wb"); - fwrite($fh,$cw,strlen($cw)); - fclose($fh); - @unlink($unifilename.'.cw127.php'); - } - unset($ttf); - } - else { - $cw = @file_get_contents($unifilename.'.cw.dat'); - } - $i = count($this->fonts)+1; - if(!empty($this->AliasNbPages)) - $sbarr = range(0,57); - else - $sbarr = range(0,32); - $this->fonts[$fontkey] = array('i'=>$i, 'type'=>$type, 'name'=>$name, 'desc'=>$desc, 'up'=>$up, 'ut'=>$ut, 'cw'=>$cw, 'ttffile'=>$ttffile, 'fontkey'=>$fontkey, 'subset'=>$sbarr, 'unifilename'=>$unifilename); - - $this->FontFiles[$fontkey]=array('length1'=>$originalsize, 'type'=>"TTF", 'ttffile'=>$ttffile); - $this->FontFiles[$file]=array('type'=>"TTF"); - unset($cw); - } - else { - $info = $this->_loadfont($file); - $info['i'] = count($this->fonts)+1; - if(!empty($info['diff'])) - { - // Search existing encodings - $n = array_search($info['diff'],$this->diffs); - if(!$n) - { - $n = count($this->diffs)+1; - $this->diffs[$n] = $info['diff']; - } - $info['diffn'] = $n; - } - if(!empty($info['file'])) - { - // Embedded font - if($info['type']=='TrueType') - $this->FontFiles[$info['file']] = array('length1'=>$info['originalsize']); - else - $this->FontFiles[$info['file']] = array('length1'=>$info['size1'], 'length2'=>$info['size2']); - } - $this->fonts[$fontkey] = $info; - } -} - -function SetFont($family, $style='', $size=0) -{ - // Select a font; size given in points - if($family=='') - $family = $this->FontFamily; - else - $family = strtolower($family); - $style = strtoupper($style); - if(strpos($style,'U')!==false) - { - $this->underline = true; - $style = str_replace('U','',$style); - } - else - $this->underline = false; - if($style=='IB') - $style = 'BI'; - if($size==0) - $size = $this->FontSizePt; - // Test if font is already selected - if($this->FontFamily==$family && $this->FontStyle==$style && $this->FontSizePt==$size) - return; - // Test if font is already loaded - $fontkey = $family.$style; - if(!isset($this->fonts[$fontkey])) - { - // Test if one of the core fonts - if($family=='arial') - $family = 'helvetica'; - if(in_array($family,$this->CoreFonts)) - { - if($family=='symbol' || $family=='zapfdingbats') - $style = ''; - $fontkey = $family.$style; - if(!isset($this->fonts[$fontkey])) - $this->AddFont($family,$style); - } - else - $this->Error('Undefined font: '.$family.' '.$style); - } - // Select it - $this->FontFamily = $family; - $this->FontStyle = $style; - $this->FontSizePt = $size; - $this->FontSize = $size/$this->k; - $this->CurrentFont = &$this->fonts[$fontkey]; - if ($this->fonts[$fontkey]['type']=='TTF') { $this->unifontSubset = true; } - else { $this->unifontSubset = false; } - if($this->page>0) - $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); -} - -function SetFontSize($size) -{ - // Set font size in points - if($this->FontSizePt==$size) - return; - $this->FontSizePt = $size; - $this->FontSize = $size/$this->k; - if($this->page>0) - $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); -} - -function AddLink() -{ - // Create a new internal link - $n = count($this->links)+1; - $this->links[$n] = array(0, 0); - return $n; -} - -function SetLink($link, $y=0, $page=-1) -{ - // Set destination of internal link - if($y==-1) - $y = $this->y; - if($page==-1) - $page = $this->page; - $this->links[$link] = array($page, $y); -} - -function Link($x, $y, $w, $h, $link) -{ - // Put a link on the page - $this->PageLinks[$this->page][] = array($x*$this->k, $this->hPt-$y*$this->k, $w*$this->k, $h*$this->k, $link); -} - -function Text($x, $y, $txt) -{ - // Output a string - if ($this->unifontSubset) - { - $txt2 = '('.$this->_escape($this->UTF8ToUTF16BE($txt, false)).')'; - foreach($this->UTF8StringToArray($txt) as $uni) - $this->CurrentFont['subset'][$uni] = $uni; - } - else - $txt2 = '('.$this->_escape($txt).')'; - $s = sprintf('BT %.2F %.2F Td %s Tj ET',$x*$this->k,($this->h-$y)*$this->k,$txt2); - if($this->underline && $txt!='') - $s .= ' '.$this->_dounderline($x,$y,$txt); - if($this->ColorFlag) - $s = 'q '.$this->TextColor.' '.$s.' Q'; - $this->_out($s); -} - -function AcceptPageBreak() -{ - // Accept automatic page break or not - return $this->AutoPageBreak; -} - -function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='') -{ - // Output a cell - $k = $this->k; - if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) - { - // Automatic page break - $x = $this->x; - $ws = $this->ws; - if($ws>0) - { - $this->ws = 0; - $this->_out('0 Tw'); - } - $this->AddPage($this->CurOrientation,$this->CurPageSize); - $this->x = $x; - if($ws>0) - { - $this->ws = $ws; - $this->_out(sprintf('%.3F Tw',$ws*$k)); - } - } - if($w==0) - $w = $this->w-$this->rMargin-$this->x; - $s = ''; - if($fill || $border==1) - { - if($fill) - $op = ($border==1) ? 'B' : 'f'; - else - $op = 'S'; - $s = sprintf('%.2F %.2F %.2F %.2F re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op); - } - if(is_string($border)) - { - $x = $this->x; - $y = $this->y; - if(strpos($border,'L')!==false) - $s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k); - if(strpos($border,'T')!==false) - $s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k); - if(strpos($border,'R')!==false) - $s .= sprintf('%.2F %.2F m %.2F %.2F l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k); - if(strpos($border,'B')!==false) - $s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k); - } - if($txt!=='') - { - if($align=='R') - $dx = $w-$this->cMargin-$this->GetStringWidth($txt); - elseif($align=='C') - $dx = ($w-$this->GetStringWidth($txt))/2; - else - $dx = $this->cMargin; - if($this->ColorFlag) - $s .= 'q '.$this->TextColor.' '; - - // If multibyte, Tw has no effect - do word spacing using an adjustment before each space - if ($this->ws && $this->unifontSubset) { - foreach($this->UTF8StringToArray($txt) as $uni) - $this->CurrentFont['subset'][$uni] = $uni; - $space = $this->_escape($this->UTF8ToUTF16BE(' ', false)); - $s .= sprintf('BT 0 Tw %.2F %.2F Td [',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k); - $t = explode(' ',$txt); - $numt = count($t); - for($i=0;$i<$numt;$i++) { - $tx = $t[$i]; - $tx = '('.$this->_escape($this->UTF8ToUTF16BE($tx, false)).')'; - $s .= sprintf('%s ',$tx); - if (($i+1)<$numt) { - $adj = -($this->ws*$this->k)*1000/$this->FontSizePt; - $s .= sprintf('%d(%s) ',$adj,$space); - } - } - $s .= '] TJ'; - $s .= ' ET'; - } - else { - if ($this->unifontSubset) - { - $txt2 = '('.$this->_escape($this->UTF8ToUTF16BE($txt, false)).')'; - foreach($this->UTF8StringToArray($txt) as $uni) - $this->CurrentFont['subset'][$uni] = $uni; - } - else - $txt2='('.str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt))).')'; - $s .= sprintf('BT %.2F %.2F Td %s Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt2); - } - if($this->underline) - $s .= ' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt); - if($this->ColorFlag) - $s .= ' Q'; - if($link) - $this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->GetStringWidth($txt),$this->FontSize,$link); - } - if($s) - $this->_out($s); - $this->lasth = $h; - if($ln>0) - { - // Go to next line - $this->y += $h; - if($ln==1) - $this->x = $this->lMargin; - } - else - $this->x += $w; -} - -function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false) -{ - // Output text with automatic or explicit line breaks - $cw = &$this->CurrentFont['cw']; - if($w==0) - $w = $this->w-$this->rMargin-$this->x; - $wmax = ($w-2*$this->cMargin); - $s = str_replace("\r",'',$txt); - if ($this->unifontSubset) { - $nb=mb_strlen($s, 'utf-8'); - while($nb>0 && mb_substr($s,$nb-1,1,'utf-8')=="\n") $nb--; - } - else { - $nb = strlen($s); - if($nb>0 && $s[$nb-1]=="\n") - $nb--; - } - $b = 0; - if($border) - { - if($border==1) - { - $border = 'LTRB'; - $b = 'LRT'; - $b2 = 'LR'; - } - else - { - $b2 = ''; - if(strpos($border,'L')!==false) - $b2 .= 'L'; - if(strpos($border,'R')!==false) - $b2 .= 'R'; - $b = (strpos($border,'T')!==false) ? $b2.'T' : $b2; - } - } - $sep = -1; - $i = 0; - $j = 0; - $l = 0; - $ns = 0; - $nl = 1; - while($i<$nb) - { - // Get next character - if ($this->unifontSubset) { - $c = mb_substr($s,$i,1,'UTF-8'); - } - else { - $c=$s[$i]; - } - if($c=="\n") - { - // Explicit line break - if($this->ws>0) - { - $this->ws = 0; - $this->_out('0 Tw'); - } - if ($this->unifontSubset) { - $this->Cell($w,$h,mb_substr($s,$j,$i-$j,'UTF-8'),$b,2,$align,$fill); - } - else { - $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); - } - $i++; - $sep = -1; - $j = $i; - $l = 0; - $ns = 0; - $nl++; - if($border && $nl==2) - $b = $b2; - continue; - } - if($c==' ') - { - $sep = $i; - $ls = $l; - $ns++; - } - - if ($this->unifontSubset) { $l += $this->GetStringWidth($c); } - else { $l += $cw[$c]*$this->FontSize/1000; } - - if($l>$wmax) - { - // Automatic line break - if($sep==-1) - { - if($i==$j) - $i++; - if($this->ws>0) - { - $this->ws = 0; - $this->_out('0 Tw'); - } - if ($this->unifontSubset) { - $this->Cell($w,$h,mb_substr($s,$j,$i-$j,'UTF-8'),$b,2,$align,$fill); - } - else { - $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); - } - } - else - { - if($align=='J') - { - $this->ws = ($ns>1) ? ($wmax-$ls)/($ns-1) : 0; - $this->_out(sprintf('%.3F Tw',$this->ws*$this->k)); - } - if ($this->unifontSubset) { - $this->Cell($w,$h,mb_substr($s,$j,$sep-$j,'UTF-8'),$b,2,$align,$fill); - } - else { - $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill); - } - $i = $sep+1; - } - $sep = -1; - $j = $i; - $l = 0; - $ns = 0; - $nl++; - if($border && $nl==2) - $b = $b2; - } - else - $i++; - } - // Last chunk - if($this->ws>0) - { - $this->ws = 0; - $this->_out('0 Tw'); - } - if($border && strpos($border,'B')!==false) - $b .= 'B'; - if ($this->unifontSubset) { - $this->Cell($w,$h,mb_substr($s,$j,$i-$j,'UTF-8'),$b,2,$align,$fill); - } - else { - $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); - } - $this->x = $this->lMargin; -} - -function Write($h, $txt, $link='') -{ - // Output text in flowing mode - $cw = &$this->CurrentFont['cw']; - $w = $this->w-$this->rMargin-$this->x; - - $wmax = ($w-2*$this->cMargin); - $s = str_replace("\r",'',$txt); - if ($this->unifontSubset) { - $nb = mb_strlen($s, 'UTF-8'); - if($nb==1 && $s==" ") { - $this->x += $this->GetStringWidth($s); - return; - } - } - else { - $nb = strlen($s); - } - $sep = -1; - $i = 0; - $j = 0; - $l = 0; - $nl = 1; - while($i<$nb) - { - // Get next character - if ($this->unifontSubset) { - $c = mb_substr($s,$i,1,'UTF-8'); - } - else { - $c = $s[$i]; - } - if($c=="\n") - { - // Explicit line break - if ($this->unifontSubset) { - $this->Cell($w,$h,mb_substr($s,$j,$i-$j,'UTF-8'),0,2,'',0,$link); - } - else { - $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); - } - $i++; - $sep = -1; - $j = $i; - $l = 0; - if($nl==1) - { - $this->x = $this->lMargin; - $w = $this->w-$this->rMargin-$this->x; - $wmax = ($w-2*$this->cMargin); - } - $nl++; - continue; - } - if($c==' ') - $sep = $i; - - if ($this->unifontSubset) { $l += $this->GetStringWidth($c); } - else { $l += $cw[$c]*$this->FontSize/1000; } - - if($l>$wmax) - { - // Automatic line break - if($sep==-1) - { - if($this->x>$this->lMargin) - { - // Move to next line - $this->x = $this->lMargin; - $this->y += $h; - $w = $this->w-$this->rMargin-$this->x; - $wmax = ($w-2*$this->cMargin); - $i++; - $nl++; - continue; - } - if($i==$j) - $i++; - if ($this->unifontSubset) { - $this->Cell($w,$h,mb_substr($s,$j,$i-$j,'UTF-8'),0,2,'',0,$link); - } - else { - $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); - } - } - else - { - if ($this->unifontSubset) { - $this->Cell($w,$h,mb_substr($s,$j,$sep-$j,'UTF-8'),0,2,'',0,$link); - } - else { - $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link); - } - $i = $sep+1; - } - $sep = -1; - $j = $i; - $l = 0; - if($nl==1) - { - $this->x = $this->lMargin; - $w = $this->w-$this->rMargin-$this->x; - $wmax = ($w-2*$this->cMargin); - } - $nl++; - } - else - $i++; - } - // Last chunk - if($i!=$j) { - if ($this->unifontSubset) { - $this->Cell($l,$h,mb_substr($s,$j,$i-$j,'UTF-8'),0,0,'',0,$link); - } - else { - $this->Cell($l,$h,substr($s,$j),0,0,'',0,$link); - } - } -} - -function Ln($h=null) -{ - // Line feed; default value is last cell height - $this->x = $this->lMargin; - if($h===null) - $this->y += $this->lasth; - else - $this->y += $h; -} - -function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='') -{ - // Put an image on the page - if(!isset($this->images[$file])) - { - // First use of this image, get info - if($type=='') - { - $pos = strrpos($file,'.'); - if(!$pos) - $this->Error('Image file has no extension and no type was specified: '.$file); - $type = substr($file,$pos+1); - } - $type = strtolower($type); - if($type=='jpeg') - $type = 'jpg'; - $mtd = '_parse'.$type; - if(!method_exists($this,$mtd)) - $this->Error('Unsupported image type: '.$type); - $info = $this->$mtd($file); - $info['i'] = count($this->images)+1; - $this->images[$file] = $info; - } - else - $info = $this->images[$file]; - - // Automatic width and height calculation if needed - if($w==0 && $h==0) - { - // Put image at 96 dpi - $w = -96; - $h = -96; - } - if($w<0) - $w = -$info['w']*72/$w/$this->k; - if($h<0) - $h = -$info['h']*72/$h/$this->k; - if($w==0) - $w = $h*$info['w']/$info['h']; - if($h==0) - $h = $w*$info['h']/$info['w']; - - // Flowing mode - if($y===null) - { - if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) - { - // Automatic page break - $x2 = $this->x; - $this->AddPage($this->CurOrientation,$this->CurPageSize); - $this->x = $x2; - } - $y = $this->y; - $this->y += $h; - } - - if($x===null) - $x = $this->x; - $this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i'])); - if($link) - $this->Link($x,$y,$w,$h,$link); -} - -function GetX() -{ - // Get x position - return $this->x; -} - -function SetX($x) -{ - // Set x position - if($x>=0) - $this->x = $x; - else - $this->x = $this->w+$x; -} - -function GetY() -{ - // Get y position - return $this->y; -} - -function SetY($y) -{ - // Set y position and reset x - $this->x = $this->lMargin; - if($y>=0) - $this->y = $y; - else - $this->y = $this->h+$y; -} - -function SetXY($x, $y) -{ - // Set x and y positions - $this->SetY($y); - $this->SetX($x); -} - -function Output($name='', $dest='') -{ - // Output PDF to some destination - if($this->state<3) - $this->Close(); - $dest = strtoupper($dest); - if($dest=='') - { - if($name=='') - { - $name = 'doc.pdf'; - $dest = 'I'; - } - else - $dest = 'F'; - } - switch($dest) - { - case 'I': - // Send to standard output - $this->_checkoutput(); - if(PHP_SAPI!='cli') - { - // We send to a browser - header('Content-Type: application/pdf'); - header('Content-Disposition: inline; filename="'.$name.'"'); - header('Cache-Control: private, max-age=0, must-revalidate'); - header('Pragma: public'); - } - echo $this->buffer; - break; - case 'D': - // Download file - $this->_checkoutput(); - header('Content-Type: application/x-download'); - header('Content-Disposition: attachment; filename="'.$name.'"'); - header('Cache-Control: private, max-age=0, must-revalidate'); - header('Pragma: public'); - echo $this->buffer; - break; - case 'F': - // Save to local file - $f = fopen($name,'wb'); - if(!$f) - $this->Error('Unable to create output file: '.$name); - fwrite($f,$this->buffer,strlen($this->buffer)); - fclose($f); - break; - case 'S': - // Return as a string - return $this->buffer; - default: - $this->Error('Incorrect output destination: '.$dest); - } - return ''; -} - -/******************************************************************************* -* * -* Protected methods * -* * -*******************************************************************************/ -function _dochecks() -{ - // Check availability of %F - if(sprintf('%.1F',1.0)!='1.0') - $this->Error('This version of PHP is not supported'); - // Check availability of mbstring - if(!function_exists('mb_strlen')) - $this->Error('mbstring extension is not available'); - // Check mbstring overloading - if(ini_get('mbstring.func_overload') & 2) - $this->Error('mbstring overloading must be disabled'); - // Ensure runtime magic quotes are disabled - if(get_magic_quotes_runtime()) - @set_magic_quotes_runtime(0); -} - -function _getfontpath() -{ - return $this->fontpath; -} - -function _checkoutput() -{ - if(PHP_SAPI!='cli') - { - if(headers_sent($file,$line)) - $this->Error("Some data has already been output, can't send PDF file (output started at $file:$line)"); - } - if(ob_get_length()) - { - // The output buffer is not empty - if(preg_match('/^(\xEF\xBB\xBF)?\s*$/',ob_get_contents())) - { - // It contains only a UTF-8 BOM and/or whitespace, let's clean it - ob_end_clean(); - } - else - $this->Error("Some data has already been output, can't send PDF file"); - } -} - -function _getpagesize($size) -{ - if(is_string($size)) - { - $size = strtolower($size); - if(!isset($this->StdPageSizes[$size])) - $this->Error('Unknown page size: '.$size); - $a = $this->StdPageSizes[$size]; - return array($a[0]/$this->k, $a[1]/$this->k); - } - else - { - if($size[0]>$size[1]) - return array($size[1], $size[0]); - else - return $size; - } -} - -function _beginpage($orientation, $size) -{ - $this->page++; - $this->pages[$this->page] = ''; - $this->state = 2; - $this->x = $this->lMargin; - $this->y = $this->tMargin; - $this->FontFamily = ''; - // Check page size and orientation - if($orientation=='') - $orientation = $this->DefOrientation; - else - $orientation = strtoupper($orientation[0]); - if($size=='') - $size = $this->DefPageSize; - else - $size = $this->_getpagesize($size); - if($orientation!=$this->CurOrientation || $size[0]!=$this->CurPageSize[0] || $size[1]!=$this->CurPageSize[1]) - { - // New size or orientation - if($orientation=='P') - { - $this->w = $size[0]; - $this->h = $size[1]; - } - else - { - $this->w = $size[1]; - $this->h = $size[0]; - } - $this->wPt = $this->w*$this->k; - $this->hPt = $this->h*$this->k; - $this->PageBreakTrigger = $this->h-$this->bMargin; - $this->CurOrientation = $orientation; - $this->CurPageSize = $size; - } - if($orientation!=$this->DefOrientation || $size[0]!=$this->DefPageSize[0] || $size[1]!=$this->DefPageSize[1]) - $this->PageSizes[$this->page] = array($this->wPt, $this->hPt); -} - -function _endpage() -{ - $this->state = 1; -} - -function _loadfont($font) -{ - // Load a font definition file from the font directory - include($this->fontpath.$font); - $a = get_defined_vars(); - if(!isset($a['name'])) - $this->Error('Could not include font definition file'); - return $a; -} - -function _escape($s) -{ - // Escape special characters in strings - $s = str_replace('\\','\\\\',$s); - $s = str_replace('(','\\(',$s); - $s = str_replace(')','\\)',$s); - $s = str_replace("\r",'\\r',$s); - return $s; -} - -function _textstring($s) -{ - // Format a text string - return '('.$this->_escape($s).')'; -} - -function _UTF8toUTF16($s) -{ - // Convert UTF-8 to UTF-16BE with BOM - $res = "\xFE\xFF"; - $nb = strlen($s); - $i = 0; - while($i<$nb) - { - $c1 = ord($s[$i++]); - if($c1>=224) - { - // 3-byte character - $c2 = ord($s[$i++]); - $c3 = ord($s[$i++]); - $res .= chr((($c1 & 0x0F)<<4) + (($c2 & 0x3C)>>2)); - $res .= chr((($c2 & 0x03)<<6) + ($c3 & 0x3F)); - } - elseif($c1>=192) - { - // 2-byte character - $c2 = ord($s[$i++]); - $res .= chr(($c1 & 0x1C)>>2); - $res .= chr((($c1 & 0x03)<<6) + ($c2 & 0x3F)); - } - else - { - // Single-byte character - $res .= "\0".chr($c1); - } - } - return $res; -} - -function _dounderline($x, $y, $txt) -{ - // Underline text - $up = $this->CurrentFont['up']; - $ut = $this->CurrentFont['ut']; - $w = $this->GetStringWidth($txt)+$this->ws*substr_count($txt,' '); - return sprintf('%.2F %.2F %.2F %.2F re f',$x*$this->k,($this->h-($y-$up/1000*$this->FontSize))*$this->k,$w*$this->k,-$ut/1000*$this->FontSizePt); -} - -function _parsejpg($file) -{ - // Extract info from a JPEG file - $a = getimagesize($file); - if(!$a) - $this->Error('Missing or incorrect image file: '.$file); - if($a[2]!=2) - $this->Error('Not a JPEG file: '.$file); - if(!isset($a['channels']) || $a['channels']==3) - $colspace = 'DeviceRGB'; - elseif($a['channels']==4) - $colspace = 'DeviceCMYK'; - else - $colspace = 'DeviceGray'; - $bpc = isset($a['bits']) ? $a['bits'] : 8; - $data = file_get_contents($file); - return array('w'=>$a[0], 'h'=>$a[1], 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'DCTDecode', 'data'=>$data); -} - -function _parsepng($file) -{ - // Extract info from a PNG file - $f = fopen($file,'rb'); - if(!$f) - $this->Error('Can\'t open image file: '.$file); - $info = $this->_parsepngstream($f,$file); - fclose($f); - return $info; -} - -function _parsepngstream($f, $file) -{ - // Check signature - if($this->_readstream($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) - $this->Error('Not a PNG file: '.$file); - - // Read header chunk - $this->_readstream($f,4); - if($this->_readstream($f,4)!='IHDR') - $this->Error('Incorrect PNG file: '.$file); - $w = $this->_readint($f); - $h = $this->_readint($f); - $bpc = ord($this->_readstream($f,1)); - if($bpc>8) - $this->Error('16-bit depth not supported: '.$file); - $ct = ord($this->_readstream($f,1)); - if($ct==0 || $ct==4) - $colspace = 'DeviceGray'; - elseif($ct==2 || $ct==6) - $colspace = 'DeviceRGB'; - elseif($ct==3) - $colspace = 'Indexed'; - else - $this->Error('Unknown color type: '.$file); - if(ord($this->_readstream($f,1))!=0) - $this->Error('Unknown compression method: '.$file); - if(ord($this->_readstream($f,1))!=0) - $this->Error('Unknown filter method: '.$file); - if(ord($this->_readstream($f,1))!=0) - $this->Error('Interlacing not supported: '.$file); - $this->_readstream($f,4); - $dp = '/Predictor 15 /Colors '.($colspace=='DeviceRGB' ? 3 : 1).' /BitsPerComponent '.$bpc.' /Columns '.$w; - - // Scan chunks looking for palette, transparency and image data - $pal = ''; - $trns = ''; - $data = ''; - do - { - $n = $this->_readint($f); - $type = $this->_readstream($f,4); - if($type=='PLTE') - { - // Read palette - $pal = $this->_readstream($f,$n); - $this->_readstream($f,4); - } - elseif($type=='tRNS') - { - // Read transparency info - $t = $this->_readstream($f,$n); - if($ct==0) - $trns = array(ord(substr($t,1,1))); - elseif($ct==2) - $trns = array(ord(substr($t,1,1)), ord(substr($t,3,1)), ord(substr($t,5,1))); - else - { - $pos = strpos($t,chr(0)); - if($pos!==false) - $trns = array($pos); - } - $this->_readstream($f,4); - } - elseif($type=='IDAT') - { - // Read image data block - $data .= $this->_readstream($f,$n); - $this->_readstream($f,4); - } - elseif($type=='IEND') - break; - else - $this->_readstream($f,$n+4); - } - while($n); - - if($colspace=='Indexed' && empty($pal)) - $this->Error('Missing palette in '.$file); - $info = array('w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'FlateDecode', 'dp'=>$dp, 'pal'=>$pal, 'trns'=>$trns); - if($ct>=4) - { - // Extract alpha channel - if(!function_exists('gzuncompress')) - $this->Error('Zlib not available, can\'t handle alpha channel: '.$file); - $data = gzuncompress($data); - $color = ''; - $alpha = ''; - if($ct==4) - { - // Gray image - $len = 2*$w; - for($i=0;$i<$h;$i++) - { - $pos = (1+$len)*$i; - $color .= $data[$pos]; - $alpha .= $data[$pos]; - $line = substr($data,$pos+1,$len); - $color .= preg_replace('/(.)./s','$1',$line); - $alpha .= preg_replace('/.(.)/s','$1',$line); - } - } - else - { - // RGB image - $len = 4*$w; - for($i=0;$i<$h;$i++) - { - $pos = (1+$len)*$i; - $color .= $data[$pos]; - $alpha .= $data[$pos]; - $line = substr($data,$pos+1,$len); - $color .= preg_replace('/(.{3})./s','$1',$line); - $alpha .= preg_replace('/.{3}(.)/s','$1',$line); - } - } - unset($data); - $data = gzcompress($color); - $info['smask'] = gzcompress($alpha); - if($this->PDFVersion<'1.4') - $this->PDFVersion = '1.4'; - } - $info['data'] = $data; - return $info; -} - -function _readstream($f, $n) -{ - // Read n bytes from stream - $res = ''; - while($n>0 && !feof($f)) - { - $s = fread($f,$n); - if($s===false) - $this->Error('Error while reading stream'); - $n -= strlen($s); - $res .= $s; - } - if($n>0) - $this->Error('Unexpected end of stream'); - return $res; -} - -function _readint($f) -{ - // Read a 4-byte integer from stream - $a = unpack('Ni',$this->_readstream($f,4)); - return $a['i']; -} - -function _parsegif($file) -{ - // Extract info from a GIF file (via PNG conversion) - if(!function_exists('imagepng')) - $this->Error('GD extension is required for GIF support'); - if(!function_exists('imagecreatefromgif')) - $this->Error('GD has no GIF read support'); - $im = imagecreatefromgif($file); - if(!$im) - $this->Error('Missing or incorrect image file: '.$file); - imageinterlace($im,0); - $f = @fopen('php://temp','rb+'); - if($f) - { - // Perform conversion in memory - ob_start(); - imagepng($im); - $data = ob_get_clean(); - imagedestroy($im); - fwrite($f,$data); - rewind($f); - $info = $this->_parsepngstream($f,$file); - fclose($f); - } - else - { - // Use temporary file - $tmp = tempnam('.','gif'); - if(!$tmp) - $this->Error('Unable to create a temporary file'); - if(!imagepng($im,$tmp)) - $this->Error('Error while saving to temporary file'); - imagedestroy($im); - $info = $this->_parsepng($tmp); - unlink($tmp); - } - return $info; -} - -function _newobj() -{ - // Begin a new object - $this->n++; - $this->offsets[$this->n] = strlen($this->buffer); - $this->_out($this->n.' 0 obj'); -} - -function _putstream($s) -{ - $this->_out('stream'); - $this->_out($s); - $this->_out('endstream'); -} - -function _out($s) -{ - // Add a line to the document - if($this->state==2) - $this->pages[$this->page] .= $s."\n"; - else - $this->buffer .= $s."\n"; -} - -function _putpages() -{ - $nb = $this->page; - if(!empty($this->AliasNbPages)) - { - // Replace number of pages in fonts using subsets - $alias = $this->UTF8ToUTF16BE($this->AliasNbPages, false); - $r = $this->UTF8ToUTF16BE("$nb", false); - for($n=1;$n<=$nb;$n++) - $this->pages[$n] = str_replace($alias,$r,$this->pages[$n]); - // Now repeat for no pages in non-subset fonts - for($n=1;$n<=$nb;$n++) - $this->pages[$n] = str_replace($this->AliasNbPages,$nb,$this->pages[$n]); - } - if($this->DefOrientation=='P') - { - $wPt = $this->DefPageSize[0]*$this->k; - $hPt = $this->DefPageSize[1]*$this->k; - } - else - { - $wPt = $this->DefPageSize[1]*$this->k; - $hPt = $this->DefPageSize[0]*$this->k; - } - $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; - for($n=1;$n<=$nb;$n++) - { - // Page - $this->_newobj(); - $this->_out('<_out('/Parent 1 0 R'); - if(isset($this->PageSizes[$n])) - $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$this->PageSizes[$n][0],$this->PageSizes[$n][1])); - $this->_out('/Resources 2 0 R'); - if(isset($this->PageLinks[$n])) - { - // Links - $annots = '/Annots ['; - foreach($this->PageLinks[$n] as $pl) - { - $rect = sprintf('%.2F %.2F %.2F %.2F',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]); - $annots .= '<_textstring($pl[4]).'>>>>'; - else - { - $l = $this->links[$pl[4]]; - $h = isset($this->PageSizes[$l[0]]) ? $this->PageSizes[$l[0]][1] : $hPt; - $annots .= sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]>>',1+2*$l[0],$h-$l[1]*$this->k); - } - } - $this->_out($annots.']'); - } - if($this->PDFVersion>'1.3') - $this->_out('/Group <>'); - $this->_out('/Contents '.($this->n+1).' 0 R>>'); - $this->_out('endobj'); - // Page content - $p = ($this->compress) ? gzcompress($this->pages[$n]) : $this->pages[$n]; - $this->_newobj(); - $this->_out('<<'.$filter.'/Length '.strlen($p).'>>'); - $this->_putstream($p); - $this->_out('endobj'); - } - // Pages root - $this->offsets[1] = strlen($this->buffer); - $this->_out('1 0 obj'); - $this->_out('<_out($kids.']'); - $this->_out('/Count '.$nb); - $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$wPt,$hPt)); - $this->_out('>>'); - $this->_out('endobj'); -} - -function _putfonts() -{ - $nf=$this->n; - foreach($this->diffs as $diff) - { - // Encodings - $this->_newobj(); - $this->_out('<>'); - $this->_out('endobj'); - } - foreach($this->FontFiles as $file=>$info) - { - if (!isset($info['type']) || $info['type']!='TTF') { - // Font file embedding - $this->_newobj(); - $this->FontFiles[$file]['n']=$this->n; - $font=''; - $f=fopen($this->_getfontpath().$file,'rb',1); - if(!$f) - $this->Error('Font file not found'); - while(!feof($f)) - $font.=fread($f,8192); - fclose($f); - $compressed=(substr($file,-2)=='.z'); - if(!$compressed && isset($info['length2'])) - { - $header=(ord($font[0])==128); - if($header) - { - // Strip first binary header - $font=substr($font,6); - } - if($header && ord($font[$info['length1']])==128) - { - // Strip second binary header - $font=substr($font,0,$info['length1']).substr($font,$info['length1']+6); - } - } - $this->_out('<_out('/Filter /FlateDecode'); - $this->_out('/Length1 '.$info['length1']); - if(isset($info['length2'])) - $this->_out('/Length2 '.$info['length2'].' /Length3 0'); - $this->_out('>>'); - $this->_putstream($font); - $this->_out('endobj'); - } - } - foreach($this->fonts as $k=>$font) - { - // Font objects - //$this->fonts[$k]['n']=$this->n+1; - $type = $font['type']; - $name = $font['name']; - if($type=='Core') - { - // Standard font - $this->fonts[$k]['n']=$this->n+1; - $this->_newobj(); - $this->_out('<_out('/BaseFont /'.$name); - $this->_out('/Subtype /Type1'); - if($name!='Symbol' && $name!='ZapfDingbats') - $this->_out('/Encoding /WinAnsiEncoding'); - $this->_out('>>'); - $this->_out('endobj'); - } - elseif($type=='Type1' || $type=='TrueType') - { - // Additional Type1 or TrueType font - $this->fonts[$k]['n']=$this->n+1; - $this->_newobj(); - $this->_out('<_out('/BaseFont /'.$name); - $this->_out('/Subtype /'.$type); - $this->_out('/FirstChar 32 /LastChar 255'); - $this->_out('/Widths '.($this->n+1).' 0 R'); - $this->_out('/FontDescriptor '.($this->n+2).' 0 R'); - if($font['enc']) - { - if(isset($font['diff'])) - $this->_out('/Encoding '.($nf+$font['diff']).' 0 R'); - else - $this->_out('/Encoding /WinAnsiEncoding'); - } - $this->_out('>>'); - $this->_out('endobj'); - // Widths - $this->_newobj(); - $cw=&$font['cw']; - $s='['; - for($i=32;$i<=255;$i++) - $s.=$cw[chr($i)].' '; - $this->_out($s.']'); - $this->_out('endobj'); - // Descriptor - $this->_newobj(); - $s='<$v) - $s.=' /'.$k.' '.$v; - $file=$font['file']; - if($file) - $s.=' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R'; - $this->_out($s.'>>'); - $this->_out('endobj'); - } - // TrueType embedded SUBSETS or FULL - else if ($type=='TTF') { - $this->fonts[$k]['n']=$this->n+1; - require_once($this->_getfontpath().'unifont/ttfonts.php'); - $ttf = new TTFontFile(); - $fontname = 'MPDFAA'.'+'.$font['name']; - $subset = $font['subset']; - unset($subset[0]); - $ttfontstream = $ttf->makeSubset($font['ttffile'], $subset); - $ttfontsize = strlen($ttfontstream); - $fontstream = gzcompress($ttfontstream); - $codeToGlyph = $ttf->codeToGlyph; - unset($codeToGlyph[0]); - - // Type0 Font - // A composite font - a font composed of other fonts, organized hierarchically - $this->_newobj(); - $this->_out('<_out('/Subtype /Type0'); - $this->_out('/BaseFont /'.$fontname.''); - $this->_out('/Encoding /Identity-H'); - $this->_out('/DescendantFonts ['.($this->n + 1).' 0 R]'); - $this->_out('/ToUnicode '.($this->n + 2).' 0 R'); - $this->_out('>>'); - $this->_out('endobj'); - - // CIDFontType2 - // A CIDFont whose glyph descriptions are based on TrueType font technology - $this->_newobj(); - $this->_out('<_out('/Subtype /CIDFontType2'); - $this->_out('/BaseFont /'.$fontname.''); - $this->_out('/CIDSystemInfo '.($this->n + 2).' 0 R'); - $this->_out('/FontDescriptor '.($this->n + 3).' 0 R'); - if (isset($font['desc']['MissingWidth'])){ - $this->_out('/DW '.$font['desc']['MissingWidth'].''); - } - - $this->_putTTfontwidths($font, $ttf->maxUni); - - $this->_out('/CIDToGIDMap '.($this->n + 4).' 0 R'); - $this->_out('>>'); - $this->_out('endobj'); - - // ToUnicode - $this->_newobj(); - $toUni = "/CIDInit /ProcSet findresource begin\n"; - $toUni .= "12 dict begin\n"; - $toUni .= "begincmap\n"; - $toUni .= "/CIDSystemInfo\n"; - $toUni .= "<_out('<>'); - $this->_putstream($toUni); - $this->_out('endobj'); - - // CIDSystemInfo dictionary - $this->_newobj(); - $this->_out('<_out('/Ordering (UCS)'); - $this->_out('/Supplement 0'); - $this->_out('>>'); - $this->_out('endobj'); - - // Font descriptor - $this->_newobj(); - $this->_out('<_out('/FontName /'.$fontname); - foreach($font['desc'] as $kd=>$v) { - if ($kd == 'Flags') { $v = $v | 4; $v = $v & ~32; } // SYMBOLIC font flag - $this->_out(' /'.$kd.' '.$v); - } - $this->_out('/FontFile2 '.($this->n + 2).' 0 R'); - $this->_out('>>'); - $this->_out('endobj'); - - // Embed CIDToGIDMap - // A specification of the mapping from CIDs to glyph indices - $cidtogidmap = ''; - $cidtogidmap = str_pad('', 256*256*2, "\x00"); - foreach($codeToGlyph as $cc=>$glyph) { - $cidtogidmap[$cc*2] = chr($glyph >> 8); - $cidtogidmap[$cc*2 + 1] = chr($glyph & 0xFF); - } - $cidtogidmap = gzcompress($cidtogidmap); - $this->_newobj(); - $this->_out('<_out('/Filter /FlateDecode'); - $this->_out('>>'); - $this->_putstream($cidtogidmap); - $this->_out('endobj'); - - //Font file - $this->_newobj(); - $this->_out('<_out('/Filter /FlateDecode'); - $this->_out('/Length1 '.$ttfontsize); - $this->_out('>>'); - $this->_putstream($fontstream); - $this->_out('endobj'); - unset($ttf); - } - else - { - // Allow for additional types - $this->fonts[$k]['n'] = $this->n+1; - $mtd='_put'.strtolower($type); - if(!method_exists($this,$mtd)) - $this->Error('Unsupported font type: '.$type); - $this->$mtd($font); - } - } -} - -function _putTTfontwidths(&$font, $maxUni) { - if (file_exists($font['unifilename'].'.cw127.php')) { - include($font['unifilename'].'.cw127.php') ; - $startcid = 128; - } - else { - $rangeid = 0; - $range = array(); - $prevcid = -2; - $prevwidth = -1; - $interval = false; - $startcid = 1; - } - $cwlen = $maxUni + 1; - - // for each character - for ($cid=$startcid; $cid<$cwlen; $cid++) { - if ($cid==128 && (!file_exists($font['unifilename'].'.cw127.php'))) { - if (is_writable(dirname($this->_getfontpath().'unifont/x'))) { - $fh = fopen($font['unifilename'].'.cw127.php',"wb"); - $cw127='"; - fwrite($fh,$cw127,strlen($cw127)); - fclose($fh); - } - } - if ($font['cw'][$cid*2] == "\00" && $font['cw'][$cid*2+1] == "\00") { continue; } - $width = (ord($font['cw'][$cid*2]) << 8) + ord($font['cw'][$cid*2+1]); - if ($width == 65535) { $width = 0; } - if ($cid > 255 && (!isset($font['subset'][$cid]) || !$font['subset'][$cid])) { continue; } - if (!isset($font['dw']) || (isset($font['dw']) && $width != $font['dw'])) { - if ($cid == ($prevcid + 1)) { - if ($width == $prevwidth) { - if ($width == $range[$rangeid][0]) { - $range[$rangeid][] = $width; - } - else { - array_pop($range[$rangeid]); - // new range - $rangeid = $prevcid; - $range[$rangeid] = array(); - $range[$rangeid][] = $prevwidth; - $range[$rangeid][] = $width; - } - $interval = true; - $range[$rangeid]['interval'] = true; - } else { - if ($interval) { - // new range - $rangeid = $cid; - $range[$rangeid] = array(); - $range[$rangeid][] = $width; - } - else { $range[$rangeid][] = $width; } - $interval = false; - } - } else { - $rangeid = $cid; - $range[$rangeid] = array(); - $range[$rangeid][] = $width; - $interval = false; - } - $prevcid = $cid; - $prevwidth = $width; - } - } - $prevk = -1; - $nextk = -1; - $prevint = false; - foreach ($range as $k => $ws) { - $cws = count($ws); - if (($k == $nextk) AND (!$prevint) AND ((!isset($ws['interval'])) OR ($cws < 4))) { - if (isset($range[$k]['interval'])) { unset($range[$k]['interval']); } - $range[$prevk] = array_merge($range[$prevk], $range[$k]); - unset($range[$k]); - } - else { $prevk = $k; } - $nextk = $k + $cws; - if (isset($ws['interval'])) { - if ($cws > 3) { $prevint = true; } - else { $prevint = false; } - unset($range[$k]['interval']); - --$nextk; - } - else { $prevint = false; } - } - $w = ''; - foreach ($range as $k => $ws) { - if (count(array_count_values($ws)) == 1) { $w .= ' '.$k.' '.($k + count($ws) - 1).' '.$ws[0]; } - else { $w .= ' '.$k.' [ '.implode(' ', $ws).' ]' . "\n"; } - } - $this->_out('/W ['.$w.' ]'); -} - -function _putimages() -{ - foreach(array_keys($this->images) as $file) - { - $this->_putimage($this->images[$file]); - unset($this->images[$file]['data']); - unset($this->images[$file]['smask']); - } -} - -function _putimage(&$info) -{ - $this->_newobj(); - $info['n'] = $this->n; - $this->_out('<_out('/Subtype /Image'); - $this->_out('/Width '.$info['w']); - $this->_out('/Height '.$info['h']); - if($info['cs']=='Indexed') - $this->_out('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]'); - else - { - $this->_out('/ColorSpace /'.$info['cs']); - if($info['cs']=='DeviceCMYK') - $this->_out('/Decode [1 0 1 0 1 0 1 0]'); - } - $this->_out('/BitsPerComponent '.$info['bpc']); - if(isset($info['f'])) - $this->_out('/Filter /'.$info['f']); - if(isset($info['dp'])) - $this->_out('/DecodeParms <<'.$info['dp'].'>>'); - if(isset($info['trns']) && is_array($info['trns'])) - { - $trns = ''; - for($i=0;$i_out('/Mask ['.$trns.']'); - } - if(isset($info['smask'])) - $this->_out('/SMask '.($this->n+1).' 0 R'); - $this->_out('/Length '.strlen($info['data']).'>>'); - $this->_putstream($info['data']); - $this->_out('endobj'); - // Soft mask - if(isset($info['smask'])) - { - $dp = '/Predictor 15 /Colors 1 /BitsPerComponent 8 /Columns '.$info['w']; - $smask = array('w'=>$info['w'], 'h'=>$info['h'], 'cs'=>'DeviceGray', 'bpc'=>8, 'f'=>$info['f'], 'dp'=>$dp, 'data'=>$info['smask']); - $this->_putimage($smask); - } - // Palette - if($info['cs']=='Indexed') - { - $filter = ($this->compress) ? '/Filter /FlateDecode ' : ''; - $pal = ($this->compress) ? gzcompress($info['pal']) : $info['pal']; - $this->_newobj(); - $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>'); - $this->_putstream($pal); - $this->_out('endobj'); - } -} - -function _putxobjectdict() -{ - foreach($this->images as $image) - $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); -} - -function _putresourcedict() -{ - $this->_out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'); - $this->_out('/Font <<'); - foreach($this->fonts as $font) { - $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); - } - $this->_out('>>'); - $this->_out('/XObject <<'); - $this->_putxobjectdict(); - $this->_out('>>'); -} - -function _putresources() -{ - $this->_putfonts(); - $this->_putimages(); - // Resource dictionary - $this->offsets[2] = strlen($this->buffer); - $this->_out('2 0 obj'); - $this->_out('<<'); - $this->_putresourcedict(); - $this->_out('>>'); - $this->_out('endobj'); -} - -function _putinfo() -{ - $this->_out('/Producer '.$this->_textstring('tFPDF '.tFPDF_VERSION)); - if(!empty($this->title)) - $this->_out('/Title '.$this->_textstring($this->title)); - if(!empty($this->subject)) - $this->_out('/Subject '.$this->_textstring($this->subject)); - if(!empty($this->author)) - $this->_out('/Author '.$this->_textstring($this->author)); - if(!empty($this->keywords)) - $this->_out('/Keywords '.$this->_textstring($this->keywords)); - if(!empty($this->creator)) - $this->_out('/Creator '.$this->_textstring($this->creator)); - $this->_out('/CreationDate '.$this->_textstring('D:'.@date('YmdHis'))); -} - -function _putcatalog() -{ - $this->_out('/Type /Catalog'); - $this->_out('/Pages 1 0 R'); - if($this->ZoomMode=='fullpage') - $this->_out('/OpenAction [3 0 R /Fit]'); - elseif($this->ZoomMode=='fullwidth') - $this->_out('/OpenAction [3 0 R /FitH null]'); - elseif($this->ZoomMode=='real') - $this->_out('/OpenAction [3 0 R /XYZ null null 1]'); - elseif(!is_string($this->ZoomMode)) - $this->_out('/OpenAction [3 0 R /XYZ null null '.sprintf('%.2F',$this->ZoomMode/100).']'); - if($this->LayoutMode=='single') - $this->_out('/PageLayout /SinglePage'); - elseif($this->LayoutMode=='continuous') - $this->_out('/PageLayout /OneColumn'); - elseif($this->LayoutMode=='two') - $this->_out('/PageLayout /TwoColumnLeft'); -} - -function _putheader() -{ - $this->_out('%PDF-'.$this->PDFVersion); -} - -function _puttrailer() -{ - $this->_out('/Size '.($this->n+1)); - $this->_out('/Root '.$this->n.' 0 R'); - $this->_out('/Info '.($this->n-1).' 0 R'); -} - -function _enddoc() -{ - $this->_putheader(); - $this->_putpages(); - $this->_putresources(); - // Info - $this->_newobj(); - $this->_out('<<'); - $this->_putinfo(); - $this->_out('>>'); - $this->_out('endobj'); - // Catalog - $this->_newobj(); - $this->_out('<<'); - $this->_putcatalog(); - $this->_out('>>'); - $this->_out('endobj'); - // Cross-ref - $o = strlen($this->buffer); - $this->_out('xref'); - $this->_out('0 '.($this->n+1)); - $this->_out('0000000000 65535 f '); - for($i=1;$i<=$this->n;$i++) - $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); - // Trailer - $this->_out('trailer'); - $this->_out('<<'); - $this->_puttrailer(); - $this->_out('>>'); - $this->_out('startxref'); - $this->_out($o); - $this->_out('%%EOF'); - $this->state = 3; -} - -// ********* NEW FUNCTIONS ********* -// Converts UTF-8 strings to UTF16-BE. -function UTF8ToUTF16BE($str, $setbom=true) { - $outstr = ""; - if ($setbom) { - $outstr .= "\xFE\xFF"; // Byte Order Mark (BOM) - } - $outstr .= mb_convert_encoding($str, 'UTF-16BE', 'UTF-8'); - return $outstr; -} - -// Converts UTF-8 strings to codepoints array -function UTF8StringToArray($str) { - $out = array(); - $len = strlen($str); - for ($i = 0; $i < $len; $i++) { - $uni = -1; - $h = ord($str[$i]); - if ( $h <= 0x7F ) - $uni = $h; - elseif ( $h >= 0xC2 ) { - if ( ($h <= 0xDF) && ($i < $len -1) ) - $uni = ($h & 0x1F) << 6 | (ord($str[++$i]) & 0x3F); - elseif ( ($h <= 0xEF) && ($i < $len -2) ) - $uni = ($h & 0x0F) << 12 | (ord($str[++$i]) & 0x3F) << 6 - | (ord($str[++$i]) & 0x3F); - elseif ( ($h <= 0xF4) && ($i < $len -3) ) - $uni = ($h & 0x0F) << 18 | (ord($str[++$i]) & 0x3F) << 12 - | (ord($str[++$i]) & 0x3F) << 6 - | (ord($str[++$i]) & 0x3F); - } - if ($uni >= 0) { - $out[] = $uni; - } - } - return $out; -} - - -// End of class -} - -// Handle special IE contype request -if(isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT']=='contype') -{ - header('Content-Type: application/pdf'); - exit; -} - -?> diff --git a/sources/include/tva.inc.php b/sources/include/tva.inc.php deleted file mode 100644 index cebfc9c..0000000 --- a/sources/include/tva.inc.php +++ /dev/null @@ -1,341 +0,0 @@ -'; -// Confirm remove -if (isset($_POST['confirm_rm'])) -{ - if ($cn->count_sql('select * from tva_rate') > 1) - $cn->exec_sql('select tva_delete($1)', array($_POST['tva_id'])); - else - echo '

    Vous ne pouvez pas effacer tous taux' . - ' Si votre société n\'utilise pas la TVA, changer dans le menu société

    '; -} -$both_side=(isset($_REQUEST['both']))?1:0; -//----------------------------------------------------- -// Record Change -if (isset($_POST['confirm_mod']) - || isset($_POST['confirm_add'])) -{ - extract($_POST); - // remove space - $tva_poste = str_replace(" ", "", $tva_poste); - $err = 0; // Error code - - if (isNumber($tva_rate) == 0) - { - $err = 2; - } - - if ($err == 0) - { - if (isset($_POST['confirm_add'])) - { - $sql = "select tva_insert($1,$2,$3,$4,$5)"; - - $res = $cn->exec_sql( - $sql, array($tva_label, - $tva_rate, - $tva_comment, - $tva_poste, - $both_side) - ); - $err = Database::fetch_result($res); - } - if (isset($_POST['confirm_mod'])) - { - $Res = $cn->exec_sql( - "select tva_modify($1,$2,$3,$4,$5,$6)", array($tva_id, $tva_label, $tva_rate, $tva_comment, $tva_poste,$both_side) - ); - $err = Database::fetch_result($Res); - } - } - if ($err != 0) - { - $err_code = array(1 => "Tva id n\'est pas un nombre", - 2 => "Taux tva invalide", - 3 => "Label ne peut être vide", - 4 => "Poste invalide", - 5 => "Tva id doit être unique"); - $str_err = $err_code[$err]; - echo ""; - ; - } -} -// If company not use VAT -$own = new Own($cn); -if ($own->MY_TVA_USE == 'N') -{ - echo '

    '._("Vous n'êtes pas assujetti à la TVA").'

    '; - return; -} -//----------------------------------------------------- -// Display -$sql = "select tva_id,tva_label,tva_rate,tva_comment,tva_poste,tva_both_side from tva_rate order by tva_label"; -$Res = $cn->exec_sql($sql); -?> - - - - - - - - - - $row['tva_label'], - 'tva_rate' => $row['tva_rate'], - 'tva_comment' => $row['tva_comment'], - 'tva_poste' => $row['tva_poste'], - 'tva_both_side' => $row['tva_both_side'] - ); - - echo ""; - echo ''; - - echo ''; - - echo ""; - - echo ""; - - echo ""; - - echo ""; - - echo ""; - - echo ""; - - echo ''; - echo ""; -} -?> -
    IdLabelTauxCommentairePosteUtilisé en même temps au crédit et au débit
    '; - echo $row['tva_id']; - echo '"; - echo HtmlInput::hidden('tva_id', $row['tva_id']); - echo h($row['tva_label']); - echo ""; - echo $row['tva_rate']; - echo ""; - echo h($row['tva_comment']); - echo ""; - echo $row['tva_poste']; - echo ""; - $str_msg=( $row['tva_both_side']==1)?'Employé au crédit et débit':'normal' ; - echo $str_msg; - echo ""; - echo HtmlInput::submit("rm", "Efface"); - echo HtmlInput::submit("mod", "Modifie"); - $w = new IHidden(); - $w->name = "tva_id"; - $w->value = $row['tva_id']; - echo $w->input(); - $w = new IHidden(); - $w->name = "p_action"; - $w->value = "divers"; - echo $w->input(); - $w = new IHidden(); - $w->name = "sa"; - $w->value = "tva"; - echo $w->input(); - - echo "
    - -
    - - - -
    - - - - - - - - - - - - - - - - -
    LabelTauxCommentairePosteDouble côté
    - '; - echo ''; - echo HtmlInput::submit("confirm_rm", "Confirme"); - echo HtmlInput::submit("Cancel", "no"); - echo ""; - } - //----------------------------------------------------- - // add - if (isset($_REQUEST['add'])) - { - echo "
    Ajout d'un taux de tva "; - echo '
    '; - ?> - - - - - - - - - - - - - - - - - - - -
    Label (ce que vous verrez dans les journaux) size = 20; - echo $w->input('tva_label', '') - ?>
    Taux de tva size = 5; - echo $w->input('tva_rate', '') - ?>
    Commentaire heigh = 5; - $w->width = 50; - echo $w->input('tva_comment', '') - ?>
    Poste comptable utilisés format :debit,credit size = 20; - echo $w->input('tva_poste', '') - ?>
    Utilisé au débit et au crédit afin d'annuler cette tva size = 20; - echo $w->input('both', '') - ?>
    - - - -
    -
    - Modification d'un taux de tva "; - echo '
    '; - echo ''; - ?> - - - - - - - - - - - - - - - - - - - - - -
    Label (ce que vous verrez dans les journaux) size = 20; - echo $w->input('tva_label', $tva_array[$index]['tva_label']) - ?>
    Taux de tva size = 5; - echo $w->input('tva_rate', $tva_array[$index]['tva_rate']) - ?>
    Commentaire heigh = 5; - $w->width = 50; - echo $w->input('tva_comment', $tva_array[$index]['tva_comment']) - ?>
    Poste comptable utilisés format :debit,credit size = 20; - echo $w->input('tva_poste', $tva_array[$index]['tva_poste']) - ?>
    Utilisé au débit et au crédit afin d'annuler cette tva selected=$tva_array[$index]['tva_both_side']; - $w->size = 20; - echo $w->input('both', '') - ?>
    - - -
    - - '; -?> diff --git a/sources/include/user.inc.php b/sources/include/user.inc.php deleted file mode 100644 index 0d75f2a..0000000 --- a/sources/include/user.inc.php +++ /dev/null @@ -1,180 +0,0 @@ -'; -/******************************************************/ -// Add user -/******************************************************/ -if ( isset ($_POST["ADD"]) ) -{ - $cn=new Database(); - $pass5=md5($_POST['PASS']); - $new_user=new User($cn,0); - $new_user->first_name=HtmlInput::default_value_post('FNAME',''); - $new_user->last_name=HtmlInput::default_value_post('LNAME',''); - $login=HtmlInput::default_value_post('LOGIN',''); - $login=str_replace("'","",$login); - $login=str_replace('"',"",$login); - $login=str_replace(" ","",$login); - $login=strtolower($login); - $new_user->login=$login; - $new_user->pass=$pass5; - $new_user->email=HtmlInput::default_value_post('EMAIL',''); - if ( trim($login)=="") - { - alert(_("Le login ne peut pas être vide")); - } - else - { - $new_user->insert(); - $new_user->load(); - $_REQUEST['use_id']=$new_user->id; - require_once NOALYSS_INCLUDE.'/user_detail.inc.php'; - return; - - } -} //SET login - -// View user detail -if ( isset($_REQUEST['det'])) -{ - require_once NOALYSS_INCLUDE.'/user_detail.inc.php'; - - return; -} -?> - - - -'; -echo HtmlInput::button_action(_("Ajout utilisateur"), "$('create_user').show();","cu"); -echo '

    '; -// Show all the existing user on 7 columns -$repo=new Dossier(0); -/******************************************************/ -// Detail of a user -/******************************************************/ - - - -$compteur=0; -$header=new Sort_Table(); -$url=basename($_SERVER['PHP_SELF'])."?action=".$_REQUEST['action']; -$header->add(_("Login"), $url," order by use_login asc", "order by use_login desc","la", "ld"); -$header->add(_("Nom"), $url," order by use_name asc,use_first_name asc", "order by use_name desc,use_first_name desc","na", "nd"); -$header->add(_('Dossier'),$url,' order by ag_dossier asc','order by ag_dossier desc', - 'da','dd'); -$header->add(_("Actif"), $url," order by use_active asc", "order by use_active desc","aa", "ad"); -$ord=(isset($_REQUEST['ord']))?$_REQUEST['ord']:'la'; -$sql=$header->get_sql_order($ord); - -$a_user=$repo->get_user_folder($sql); - -if ( !empty ($a_user) ) -{ - echo ''; - echo _('Filtre').HtmlInput::infobulle(22); - echo HtmlInput::filter_table("user", "0,1,2,5","1"); - echo ''; - echo ''; - echo ''; - echo ''; - echo ''; - echo th(_("Prénom")); - echo ''; - echo ""; - echo ''; - echo ''; - - foreach ( $a_user as $r_user) - { - $compteur++; - $class=($compteur%2==0)?"odd":"even"; - - echo ""; - if ( $r_user['use_active'] == 0 ) - { - $Active=$g_failed; - } - else - { - $Active=$g_succeed; - } - $det_url=$url."&det&use_id=".$r_user['use_id']; - echo ""; - - echo td($r_user['use_name']); - echo td($r_user['use_first_name']); - echo td($Active); - $type=($r_user['use_admin']==1)?_("Administrateur"):_("Utilisateur"); - echo ""; - echo td($r_user['ag_dossier']); - echo ''; - }// foreach - echo '
    '.$header->get_header(0).''.$header->get_header(1).''.$header->get_header(3).'"._('Type')."'.$header->get_header(2).'
    "; - echo HtmlInput::anchor($r_user['use_login'],$det_url); - echo "".$type."
    '; -} // $cn != null -?> - -
    \ No newline at end of file diff --git a/sources/include/user_common.php b/sources/include/user_common.php deleted file mode 100644 index aa8f67b..0000000 --- a/sources/include/user_common.php +++ /dev/null @@ -1,248 +0,0 @@ -exec_sql("select jr_valid from jrn where jr_grpt_id=$p_grpt_id"); - - if ( ( $M = Database::num_row($Res)) == 0 ) return 0; - - $a=Database::fetch_array($Res,0); - - if ( $a['jr_valid'] == 't') return 1; - if ( $a['jr_valid'] == 'f') return 0; - - echo_error ("Invalid result = ".$a['result']); - - -} - -/*! - ************************************************** - *\brief - * Create a navigation_bar (pagesize) - * - * \param $p_offset first record number - * \param $p_line total of returned row - * \param $p_size current g_pagesize user's preference - * \param $p_page number of the page where the user is - * \param $p_javascript javascript code to add - * \note example : -\verbatim - $step=$_SESSION['g_pagesize']; - $page=(isset($_GET['offset']))?$_GET['page']:1; - $offset=(isset($_GET['offset']))?$_GET['offset']:0; - - list ($max_ligne,$list)=ListJrn($cn,$_GET['p_jrn'],$sql,null,$offset,1); - $bar=navigation_bar($offset,$max_ligne,$step,$page); -\endverbatim - * \return string with the nav. bar - */ -function navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1,$p_javascript="") -{ - // if the pagesize is unlimited return "" - // in that case there is no nav. bar - if ( $_SESSION['g_pagesize'] == -1 ) return ""; - if ( $p_size==0) - { - $p_size= $_SESSION['g_pagesize']; - } - // if there is no row return an empty string - if ( $p_line == 0 ) return ""; - - // Clean url, cut away variable coming frm here - $url=cleanUrl(); - // action to clean - $url=str_replace('&p_action=delete','',$url); - - // compute max of page - $nb_page=($p_line-($p_line%$p_size))/$p_size; - // if something remains - if ( $p_line % $p_size != 0 ) $nb_page+=1; - - // if max page == 1 then return a empty string - if ( $nb_page == 1) return ""; - - // restore the sort - if ( isset($_GET['o'])) - $url=$url.'&o='.$_GET['o']; - - $r=""; - // previous - if ($p_page !=1) - { - $e=$p_page-1; - $step=$p_size; - $offset=($e-1)*$step; - - $r=''; - $r.=" ←"; - // $r.=''; - $r.="  "; - } - //---------------------------------------------------------------------- - // Create a partial bar - // if current page < 11 show 1 to 20 - // otherwise show $p_page -10 to $p_page + 10 - //---------------------------------------------------------------------- - $start_bar=($p_page < 11 )?1:$p_page-10; - $end_bar =($p_page < 11 )?20:$p_page+10; - $end_bar =($end_bar > $nb_page )?$nb_page:$end_bar; - - $sep=""; - // Create the bar - for ($e=$start_bar;$e<=$end_bar;$e++) - { - // do not included current page - if ( $e != $p_page ) - { - $step=$p_size; - $offset=($e-1)*$step; - - $go=$_SERVER['PHP_SELF']."?".$url."&offset=$offset&step=$step&page=$e&size=$step"; - $r.=$sep; - $r.=sprintf('%d ',$go,$p_javascript,$e); - $sep=" ‧ "; - } - else - { - $r.=$sep; - $r.=" [ $e ] "; - $sep=" ‧ "; - } //else - } //for - // next - - if ($p_page !=$nb_page) - { - // If we are not at the last page show the button next - $e=$p_page+1; - $step=$p_size; - $offset=($e-1)*$step; - - $r.=' '; - $r.="→"; - //$r.=''; - $r.=""; - } - - - return $r; -} - -/*! - * \brief Clean the url, remove the $_GET offset,step, page and size - * \param none - * - * \return the cleaned url - */ - -function CleanUrl() -{ - // Compute the url - $url=""; - $and=""; - $get=$_GET; - if ( isset ($get) ) - { - foreach ($get as $name=>$value ) - { - // we clean the parameter offset, step, page and size - if ( ! in_array($name,array('offset','step','page','size','s','o','r_jrn'))) - { - $url.=$and.$name."=".$value; - $and="&"; - }// if - }//foreach - if ( isset($_GET['r_jrn'])) - { - $r_jrn=$_GET['r_jrn']; - if (count($r_jrn) > 0 ) - { - foreach ($r_jrn as $key=>$value) - { - $url.=$and."r_jrn[$key]=".$value; - $and="&"; - } - } - } - }// if - return $url; -} -function redirect($p_string,$p_time=0) -{ - if (strpos( $p_string,'?') == 0 ) { - $p_string = $p_string.'?v='.microtime(true); - } - echo ' Connecting... '; -} -/*!\brief remove the useless space, change comma by period and try to return - * a number - *\param $p_num number to format - *\return the formatted number - */ -function toNumber($p_num) -{ - $p_num=trim($p_num); - if ($p_num=='') return 0; - $p_num=str_replace("'",'',$p_num); - $p_num=str_replace(',','.',$p_num); - return $p_num; -} -/** - * Check that all the index are in the array, used by function to check if - * the array contains the needed variables before an extract - * @param type $p_array array to check - * @param type $needed string containing variable separated by comma - * @throws Exception - */ -function check_parameter($p_array,$p_needed) -{ - $needed =explode(',',$p_needed); - for ($e=0;$e diff --git a/sources/include/user_detail.inc.php b/sources/include/user_detail.inc.php deleted file mode 100644 index 52e4901..0000000 --- a/sources/include/user_detail.inc.php +++ /dev/null @@ -1,255 +0,0 @@ -id == false) -{ - // Message d'erreur - html_page_stop(); -} - -/* - * Update user changes - */ -$sbaction=HtmlInput::default_value_post('sbaction', ""); -if ($sbaction == "save") -{ - $uid = $_POST['UID']; - - // Update User - $cn = new Database(); - $UserChange = new User($cn, $uid); - - if ($UserChange->load() == -1) - { - alert(_("Cet utilisateur n'existe pas")); - } - else - { - $UserChange->first_name =HtmlInput::default_value_post('fname',null); - $UserChange->last_name = HtmlInput::default_value_post('lname',null); - $UserChange->active = HtmlInput::default_value_post('Actif',-1); - $UserChange->admin = HtmlInput::default_value_post('Admin',-1); - $UserChange->email = HtmlInput::default_value_post('email',null); - if ($UserChange->active ==-1 || $UserChange->admin ==-1) - { - die ('Missing data'); - } - else if ( trim($_POST['password'])<>'') - { - $UserChange->pass = md5($_POST['password']); - $UserChange->save(); - } - else - { - $UserChange->pass=$UserChange->password; - $UserChange->save(); - } - - } -} -else if ($sbaction == "delete") -{ -// -// Delete the user -// - $cn = new Database(); - $Res = $cn->exec_sql("delete from jnt_use_dos where use_id=$1", array($uid)); - $Res = $cn->exec_sql("delete from ac_users where use_id=$1", array($uid)); - - echo "

    Utilisateur " . h($_POST['fname']) . " " . h($_POST['lname']) . " est effacé

    "; - require_once NOALYSS_INCLUDE.'/class_iselect.php'; - require_once NOALYSS_INCLUDE.'/user.inc.php'; - return; -} -$UserChange->load(); -$it_pass=new IText('password'); -$it_pass->value=""; -?> -
    - - - - - -login', $UserChange->login); ?> - - - - - - - prénom - - - - - - - - - - - - - - - - - -
    %s
    - ', $UserChange->name); ?> -
    - ', $UserChange->first_name); - ?> -
    - - - -
    - Mot de passe :Laisser à VIDE pour ne PAS le changer - - input();?> -
    - - - value=array( - array('value'=>0,'label'=>_('Non')), - array('value'=>1,'label'=>_('Oui')) - ); - $select_actif->selected=$UserChange->active; - echo $select_actif->input(); - ?> -
    - - - value=array( - array('value'=>0,'label'=>_('Utilisateur normal')), - array('value'=>1,'label'=>_('Administrateur')) - ); - $select_admin->selected=$UserChange->admin; - echo $select_admin->input(); - ?> -
    - - - - - -
    -admin == 0 ) : -?> - -

    Accès aux dossiers

    -

    - Les autres droits doivent être réglés dans les dossiers (paramètre->sécurité), le fait de changer un utilisateur d'administrateur à utilisateur - normal ne change pas le profil administrateur dans les dossiers. - Il faut aller dans CFGSECURITY pour diminuer ses privilèges. -

    - - 'X', 'label' => 'Aucun Accès'), - array('value' => 'R', 'label' => 'Utilisateur normal') -); -$repo = new Dossier(0); -if ( $repo->count() == 0) -{ - echo hb('* Aucun Dossier *'); - echo '
    '; - return; -} - -$Dossier = $repo->show_dossier('R',$UserChange->login); - -$mod_user = new User(new Database(), $uid); -?> - - - - - - - - - -
    - - - - - id},{$rDossier['dos_id']});\"");?> -
    - id});\""); - ?> - admin==1 it means he can access all databases - // - else : - ?> - - - -
    - - - - diff --git a/sources/include/user_menu.php b/sources/include/user_menu.php deleted file mode 100644 index 76b8a37..0000000 --- a/sources/include/user_menu.php +++ /dev/null @@ -1,164 +0,0 @@ -'; - echo ''; - - echo ' - - '; - $Res=$cn->exec_sql("select fd_id,fd_label from fiche_def order by fd_label"); - $Max=Database::num_row($Res); - for ( $i=0; $i < $Max;$i++) - { - $l_line=Database::fetch_array($Res,$i); - printf(' - - ', - $l_line['fd_id'], - $str_dossier, - $l_line['fd_label'], - $l_line['fd_id'], - $str_dossier - - ); - } - echo "
    - '._('Création').''._('Recherche').'
    - %s - Liste -
    "; - echo '
    '; -} -/*! MenuAdmin */ -/* \brief show the menu for user/database management -/* -/* \return HTML code with the menu -*/ - -function MenuAdmin() -{ - $def=-1; - if (isset($_REQUEST['UID'])) - $def=0; - if ( isset ($_REQUEST['action'])) - { - switch ($_REQUEST['action']) - { - case 'user_mgt': - $def=0; - break; - case 'dossier_mgt': - $def=1; - break; - case 'modele_mgt': - $def=2; - break; - case 'audit_log': - $def=4; - break; - case 'restore'; - $def=3; - break; - } - } - if (!defined("MULTI")||(defined("MULTI")&&MULTI==1)) - { - $item=array (array("admin_repo.php?action=user_mgt",_("Utilisateurs"),_('Gestion des utilisateurs'),0), - array("admin_repo.php?action=dossier_mgt",_("Dossiers"),_('Gestion des dossiers'),1), - array("admin_repo.php?action=modele_mgt",_("Modèles"),_('Gestion des modèles'),2), - array("admin_repo.php?action=restore",_("Restaure"),_("Restaure une base de données"),3), - array("admin_repo.php?action=audit_log",_("Audit"),_("Utilisateurs qui se sont connectés"),4), - array("login.php",_("Accueil")) - ); - } - else - { - $item=array (array("admin_repo.php?action=user_mgt",_("Utilisateurs"),_('Gestion des utilisateurs'),0), - array("admin_repo.php?action=audit_log",_("Audit"),_("Utilisateurs qui se sont connectés"),4), - array("login.php",_("Accueil")) - ); - - } - $menu=ShowItem($item,'H',"mtitle","mtitle",$def,' style="width:80%;margin-left:10%" '); - return $menu; -} - -/*! - * \brief Show the menu from the pcmn page - * - * \param $p_start class start default=1 - * - * - * - * \return nothing - * - * - */ - -function menu_acc_plan($p_start=1) -{ - $base="?ac=".$_REQUEST['ac']; - $str_dossier="&".dossier::get(); - for ($i=0;$i<10;$i++) { $class[$i]="tabs";} - $class[$p_start]="tabs_selected"; - $idx=0; - ?> - -get_exercice(); -echo '
    '; - -$sql_year=" and j_tech_per in (select p_id from parm_periode where p_exercice='".$g_user->get_exercice()."')"; -echo '

    '._('Vérification des journaux').'

    '; - -$sql="select jrn_def_id,jrn_def_name from jrn_def"; -$res=$cn->exec_sql($sql); -$jrn=Database::fetch_all($res); -echo ''; -echo tr(th(_('Journal')).th(_('Débit'),' style="display:right"').th(_("Crédit"),' style="display:right"').th(_("Différence"),' style="display:right"').th('')); -$ix=0; -foreach ($jrn as $l) -{ - $id=$l['jrn_def_id']; - $name=$l['jrn_def_name']; - $deb=$cn->get_value("select sum (j_montant) from jrnx where j_debit='t' and j_jrn_def=$id $sql_year "); - $cred=$cn->get_value("select sum (j_montant) from jrnx where j_debit='f' and j_jrn_def=$id $sql_year "); - - if ( $cred == $deb ) - { - $result =$g_succeed; -} -else -{ - $result = $g_failed; -} - $class=($ix%2==0)?'odd':"even"; - print tr(td($name).td(nbm($deb),'class="num"').td(nbm($cred),'class="num"').td(nbm($result),'class="num"').td($result),"class=\"$class\""); - $ix++; - -} - -$deb=$cn->get_value("select sum (j_montant) from jrnx where j_debit='t' $sql_year "); -$cred=$cn->get_value("select sum (j_montant) from jrnx where j_debit='f' $sql_year "); - -if ( $cred == $deb ) -{ - $result =$g_succeed; -} -else -{ - $result = $g_failed; -} -$class=($ix%2==0)?'odd':"even"; -print tr(td(_('Grand livre')).td(nbm($deb),' class="num"').td(nbm($cred),' class="num"').td(nbm($result),' class="num"') - .td($result),"class=\"$class\""); - -echo '
    '; -echo '
    '; -echo '
    '; -echo '

    '._('Vérification des comptes').'

    '; -$bilan=new Acc_Bilan($cn); -$periode=new Periode($cn); -list ($start_periode,$end_periode)=$periode->get_limit($exercice); -$bilan->from=$start_periode->p_id; -$bilan->to=$end_periode->p_id; -$bilan->verify(); -echo '
    '; -?> -
    -
    -

    - ';?> -

    -

    - -

    - get_exercice()."')"; - $sql_year_source=" source.j_tech_per in (select p_id from parm_periode where p_exercice='".$g_user->get_exercice()."')"; - - $sql_qcode="select distinct source.f_id,source.j_qcode - from jrnx as source ,jrnx as target - where - source.j_id < target.j_id - and source.j_poste<>target.j_poste - and source.j_qcode = target.j_qcode - and $sql_year_source and $sql_year_target - "; - $sql_poste="select distinct j_poste,pcm_lib from jrnx join tmp_pcmn on (pcm_val=j_poste) where j_qcode =$1 $sql_year"; - $a_qcode=$cn->get_array($sql_qcode); - $res=$cn->prepare('get_poste',$sql_poste); - echo _("Résultat"); - if (count($a_qcode) == 0) { echo " OK $g_succeed";} else { echo " "._('Attention ').$g_failed;} - ?> -
      - execute('get_poste',array($a_qcode[$i]['j_qcode'])); - ?> -
    1. - -
    2. -
        - -
      • - - -
      • - -
      - -
    - -

    -

    - -

    - -get_array($sql_account_used); -$nb_account_used=count ($a_account_used); - if ( $nb_account_used == 0 ) - { - echo _('Résultat')." ".$g_succeed; - } - $ret=$cn->prepare('get_operation',$sql_concerned_operation); - -?> - - -

    - -

    - execute('get_operation',array($a_account_used[$i]['f_id'])); - $a_operation=Database::fetch_all($ret_operation); - $nb_operation=count($a_operation); - ?> - - - - - - - - - -
    - - - - - - - -
    - -
    \ No newline at end of file diff --git a/sources/license.txt b/sources/license.txt deleted file mode 100644 index 295c64d..0000000 --- a/sources/license.txt +++ /dev/null @@ -1,138 +0,0 @@ -GNU GENERAL PUBLIC LICENSE - -Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc. -59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. - -Preamble - -The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. - -To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. - -For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. - -We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. - -Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. - -Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. - -The precise terms and conditions for copying, distribution and modification follow. -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. - -1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. - -You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - - * a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. - - * b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. - -* c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. - -3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: - - * a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, - - * b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, - -* c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. - -If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - -4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. - -5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. - -7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. - -This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. - -9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. - -10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - -NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -END OF TERMS AND CONDITIONS -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - -one line to give the program's name and an idea of what it does. -Copyright (C) yyyy name of author - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - -Gnomovision version 69, Copyright (C) year name of author -Gnomovision comes with ABSOLUTELY NO WARRANTY; for details -type `show w'. This is free software, and you are welcome -to redistribute it under certain conditions; type `show c' -for details. - -The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright -interest in the program `Gnomovision' -(which makes passes at compilers) written -by James Hacker. - -signature of Ty Coon, 1 April 1989 -Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. diff --git a/sources/patches/.gitignore b/sources/patches/.gitignore new file mode 100644 index 0000000..783a4ae --- /dev/null +++ b/sources/patches/.gitignore @@ -0,0 +1,2 @@ +*~ +*.sw[op] diff --git a/sources/scenario/ajax-add-card-category.php b/sources/scenario/ajax-add-card-category.php deleted file mode 100644 index 3988aeb..0000000 --- a/sources/scenario/ajax-add-card-category.php +++ /dev/null @@ -1,15 +0,0 @@ - '42', - 'ctl' => 'select_card_div', - 'op' => 'st', - 'fil' => '-1', - 'ledger' => '2', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'ajax_card.php'; diff --git a/sources/scenario/ajax-detail-operation1.php b/sources/scenario/ajax-detail-operation1.php deleted file mode 100644 index 8245ac1..0000000 --- a/sources/scenario/ajax-detail-operation1.php +++ /dev/null @@ -1,14 +0,0 @@ - '27', - 'act' => 'de', - 'jr_id' => '2856', - 'div' => 'det2', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'ajax_ledger.php'; diff --git a/sources/scenario/ajax-detail-operation2.php b/sources/scenario/ajax-detail-operation2.php deleted file mode 100644 index 851d0f8..0000000 --- a/sources/scenario/ajax-detail-operation2.php +++ /dev/null @@ -1,14 +0,0 @@ - '27', - 'act' => 'de', - 'jr_id' => '2870', - 'div' => 'det2', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'ajax_ledger.php'; diff --git a/sources/scenario/ajax-detail-operation3.php b/sources/scenario/ajax-detail-operation3.php deleted file mode 100644 index 9a99ed6..0000000 --- a/sources/scenario/ajax-detail-operation3.php +++ /dev/null @@ -1,14 +0,0 @@ - '27', - 'act' => 'de', - 'jr_id' => '3532', - 'div' => 'det2', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'ajax_ledger.php'; diff --git a/sources/scenario/ajax-detail-operation4.php b/sources/scenario/ajax-detail-operation4.php deleted file mode 100644 index aaa2428..0000000 --- a/sources/scenario/ajax-detail-operation4.php +++ /dev/null @@ -1,14 +0,0 @@ - '27', - 'act' => 'de', - 'jr_id' => '2826', - 'div' => 'det2', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'ajax_ledger.php'; diff --git a/sources/scenario/ajax-save-operation.php b/sources/scenario/ajax-save-operation.php deleted file mode 100644 index c12c38a..0000000 --- a/sources/scenario/ajax-save-operation.php +++ /dev/null @@ -1,35 +0,0 @@ - 'det2', - 'jr_id' => '2856', - 'gDossier' => '27', - 'p_date' => '05.12.2013', - 'p_ech' => '', - 'p_date_paid' => '', - 'npj' => 'ACH607', - 'lib' => 'Consommable, ptit matériel', - 'jrn_note' => '', - 'j_id' => - array ( - 0 => '7629', - 1 => '7630', - ), - 'BON_COMMANDE' => '', - 'OTHER' => '', - 'raptdet2' => '', - 'related' => '327,231,330', - 'Fermer' => 'Fermer', - 'save' => 'Sauver', - 'Effacer' => 'Effacer', - 'bextdet2' => 'Extourner', - 'rapt' => '', - 'div' => 'det2', - 'act' => 'save', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'ajax_ledger.php'; diff --git a/sources/scenario/readme.txt b/sources/scenario/readme.txt deleted file mode 100644 index 6bd9065..0000000 --- a/sources/scenario/readme.txt +++ /dev/null @@ -1,36 +0,0 @@ -* - * Copyright (C) 2014 Dany De Bontridder - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -Afin d'avoir les scénarios pour les rejouer avec test.php. - -Dans include/constant.php, changer -define ('LOGINPUT',false); par -define ('LOGINPUT',true); - -Ensuite, aller dans votre dossier de test et faites une action (une vente, un achat...), vous devez ouvrir le fichier test.php -ce que vous venez de faire a été sauvé dans le répertoire défini par $_ENV['TMP'], (sous linux il s'agit de /tmp )avec un nom ressemblant à scenario-.php - -Vous devez d'abord copier ce fichier dans ce répertoire-ci - -Si vous pointez votre browser sur noalyss/html/test.php (après avoir créé le fichier authorized_debug) en cliquant sur le -lien avec le nom de fichier vous pourrez rejouer l'action. Vous pouvez améliorer la description en changeant l'annotation //@description: - -Vous pouvez aussi utiliser un nom de fichier plus parlant. - -L'objectif étant de pouvoir tester et de rejouer facilement les actions que vous avez faites. - - diff --git a/sources/scenario/scenario-1415994947.php b/sources/scenario/scenario-1415994947.php deleted file mode 100644 index 955b524..0000000 --- a/sources/scenario/scenario-1415994947.php +++ /dev/null @@ -1,17 +0,0 @@ - '42', - 'ac' => 'COMPTA/CARD', - 'cat' => '3', - 'histo' => '-1', - 'start' => '01.01.2014', - 'end' => '31.12.2014', - 'cat_display' => 'Recherche', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'fiche.inc.php'; diff --git a/sources/scenario/scenario-1415994966.php b/sources/scenario/scenario-1415994966.php deleted file mode 100644 index 9c00416..0000000 --- a/sources/scenario/scenario-1415994966.php +++ /dev/null @@ -1,17 +0,0 @@ - '42', - 'ac' => 'COMPTA/CARD', - 'cat' => '2', - 'histo' => '-1', - 'start' => '01.01.2014', - 'end' => '31.12.2014', - 'cat_display' => 'Recherche', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'fiche.inc.php'; diff --git a/sources/scenario/scenario-1415995071.php b/sources/scenario/scenario-1415995071.php deleted file mode 100644 index 670a2ec..0000000 --- a/sources/scenario/scenario-1415995071.php +++ /dev/null @@ -1,12 +0,0 @@ - '42', - 'ac' => 'COMPTA/VENMENU/VEN', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ven.inc.php'; diff --git a/sources/scenario/scenario-1415995185.php b/sources/scenario/scenario-1415995185.php deleted file mode 100644 index 1accb43..0000000 --- a/sources/scenario/scenario-1415995185.php +++ /dev/null @@ -1,43 +0,0 @@ - '42', - 'ac' => 'COMPTA/VENMENU/VEN', -); -$_POST=array ( - 'ledger_type' => 'VEN', - 'ac' => 'COMPTA/VENMENU/VEN', - 'sa' => 'p', - 'gDossier' => '42', - 'nb_item' => '2', - 'p_jrn' => '2', - 'e_date' => '14.11.2014', - 'e_ech' => '', - 'e_client' => 'CLIENT1 ', - 'e_pj' => 'VEN1', - 'e_pj_suggest' => 'VEN1', - 'e_comm' => 'Première vente', - 'e_march0' => 'DEPLAC', - 'e_march0_price' => '120', - 'e_quant0' => '1', - 'htva_march0' => '120', - 'e_march0_tva_id' => '1', - 'e_march0_tva_amount' => '25.2', - 'tva_march0' => '25.2', - 'tvac_march0' => '145.2', - 'e_march1' => '', - 'e_march1_price' => '', - 'e_quant1' => '1', - 'htva_march1' => '0', - 'e_march1_tva_id' => '', - 'e_march1_tva_amount' => '', - 'tva_march1' => '0', - 'tvac_march1' => '0', - 'jrn_type' => 'VEN', - 'e_mp' => '0', - 'view_invoice' => 'Enregistrer', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ven.inc.php'; diff --git a/sources/scenario/scenario-1415995188.php b/sources/scenario/scenario-1415995188.php deleted file mode 100644 index 5a4f1d2..0000000 --- a/sources/scenario/scenario-1415995188.php +++ /dev/null @@ -1,40 +0,0 @@ - '42', - 'ac' => 'COMPTA/VENMENU/VEN', -); -$_POST=array ( - 'gDossier' => '42', - 'bon_comm' => '', - 'other_info' => '', - 'e_client' => 'CLIENT1 ', - 'nb_item' => '2', - 'p_jrn' => '2', - 'mt' => '1415995185.7619', - 'e_comm' => 'Première vente', - 'e_date' => '14.11.2014', - 'e_ech' => '', - 'e_pj' => 'VEN1', - 'e_pj_suggest' => 'VEN1', - 'e_mp' => '0', - 'jrn_type' => 'VEN', - 'e_march0' => 'DEPLAC', - 'e_march0_price' => '120', - 'e_march0_tva_id' => '1', - 'e_march0_tva_amount' => '25.2', - 'e_quant0' => '1', - 'e_march1' => '', - 'e_march1_price' => '', - 'e_march1_tva_id' => '', - 'e_march1_tva_amount' => '', - 'e_quant1' => '1', - 'ac' => 'COMPTA/VENMENU/VEN', - 'opd_name' => '', - 'od_description' => '', - 'record' => 'Enregistrement', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ven.inc.php'; diff --git a/sources/scenario/scenario-1415995192.php b/sources/scenario/scenario-1415995192.php deleted file mode 100644 index dc3340c..0000000 --- a/sources/scenario/scenario-1415995192.php +++ /dev/null @@ -1,12 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUACH/ACH', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ach.inc.php'; diff --git a/sources/scenario/scenario-1415995229.php b/sources/scenario/scenario-1415995229.php deleted file mode 100644 index 89776e0..0000000 --- a/sources/scenario/scenario-1415995229.php +++ /dev/null @@ -1,34 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUACH/ACH', -); -$_POST=array ( - 'gDossier' => '42', - 'nb_item' => '1', - 'p_jrn' => '3', - 'e_date' => '01.03.2014', - 'e_ech' => '', - 'e_client' => 'IMMOB', - 'e_pj' => 'ACH1', - 'e_pj_suggest' => 'ACH1', - 'e_comm' => 'Loyer', - 'e_march0' => 'LOYER', - 'e_march0_price' => '2560', - 'e_quant0' => '1', - 'htva_march0' => '2560', - 'e_march0_tva_id' => '4', - 'e_march0_tva_amount' => '0', - 'tva_march0' => '0', - 'tvac_march0' => '2560', - 'jrn_type' => 'ACH', - 'p_action' => 'ach', - 'sa' => 'p', - 'e_mp' => '0', - 'view_invoice' => 'Enregistrer', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ach.inc.php'; diff --git a/sources/scenario/scenario-1415995238.php b/sources/scenario/scenario-1415995238.php deleted file mode 100644 index 82d40e5..0000000 --- a/sources/scenario/scenario-1415995238.php +++ /dev/null @@ -1,34 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUACH/ACH', -); -$_POST=array ( - 'gDossier' => '42', - 'nb_item' => '1', - 'p_jrn' => '3', - 'e_date' => '01.01.2014', - 'e_ech' => '', - 'e_client' => 'IMMOB', - 'e_pj' => 'ACH1', - 'e_pj_suggest' => 'ACH1', - 'e_comm' => 'Loyer', - 'e_march0' => 'LOYER', - 'e_march0_price' => '2560', - 'e_quant0' => '1', - 'htva_march0' => '2560', - 'e_march0_tva_id' => '4', - 'e_march0_tva_amount' => '0', - 'tva_march0' => '0', - 'tvac_march0' => '2560', - 'jrn_type' => 'ACH', - 'p_action' => 'ach', - 'sa' => 'p', - 'e_mp' => '0', - 'view_invoice' => 'Enregistrer', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ach.inc.php'; diff --git a/sources/scenario/scenario-1415995254.php b/sources/scenario/scenario-1415995254.php deleted file mode 100644 index 6f70f6b..0000000 --- a/sources/scenario/scenario-1415995254.php +++ /dev/null @@ -1,35 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUACH/ACH', -); -$_POST=array ( - 'gDossier' => '42', - 'e_client' => 'IMMOB', - 'nb_item' => '1', - 'p_jrn' => '3', - 'e_comm' => 'Loyer', - 'e_date' => '01.01.2014', - 'e_ech' => '', - 'jrn_type' => 'ACH', - 'e_pj' => 'ACH1', - 'e_pj_suggest' => 'ACH1', - 'mt' => '1415995238.7737', - 'e_mp' => '0', - 'e_march0' => 'LOYER', - 'e_march0_price' => '2560', - 'e_march0_tva_id' => '4', - 'e_march0_tva_amount' => '0', - 'e_quant0' => '1', - 'bon_comm' => '', - 'other_info' => '', - 'ac' => 'COMPTA/MENUACH/ACH', - 'opd_name' => 'Paiement loyer', - 'od_description' => 'Paiement du loyer', - 'record' => 'Enregistrement', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ach.inc.php'; diff --git a/sources/scenario/scenario-1415995260.php b/sources/scenario/scenario-1415995260.php deleted file mode 100644 index 41d4c3c..0000000 --- a/sources/scenario/scenario-1415995260.php +++ /dev/null @@ -1,14 +0,0 @@ - '3', - 'ac' => 'COMPTA/MENUACH/ACH', - 'gDossier' => '42', - 'pre_def' => '1', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ach.inc.php'; diff --git a/sources/scenario/scenario-1415995262.php b/sources/scenario/scenario-1415995262.php deleted file mode 100644 index 8401f52..0000000 --- a/sources/scenario/scenario-1415995262.php +++ /dev/null @@ -1,106 +0,0 @@ - '3', - 'ac' => 'COMPTA/MENUACH/ACH', - 'gDossier' => '42', - 'pre_def' => '1', -); -$_POST=array ( - 'gDossier' => '42', - 'nb_item' => '10', - 'p_jrn' => '3', - 'e_date' => '01.01.2014', - 'e_ech' => '', - 'e_client' => 'IMMOB', - 'e_pj' => 'ACH2', - 'e_pj_suggest' => 'ACH2', - 'e_comm' => 'Paiement loyer', - 'e_march0' => 'LOYER', - 'e_march0_price' => '2560.0000', - 'e_quant0' => '1.0000', - 'htva_march0' => '2560', - 'e_march0_tva_id' => '4', - 'e_march0_tva_amount' => '0', - 'tva_march0' => '0', - 'tvac_march0' => '2560', - 'e_march1' => '', - 'e_march1_price' => '', - 'e_quant1' => '1', - 'htva_march1' => '0', - 'e_march1_tva_id' => '', - 'e_march1_tva_amount' => '', - 'tva_march1' => '0', - 'tvac_march1' => '0', - 'e_march2' => '', - 'e_march2_price' => '', - 'e_quant2' => '1', - 'htva_march2' => '0', - 'e_march2_tva_id' => '', - 'e_march2_tva_amount' => '', - 'tva_march2' => '0', - 'tvac_march2' => '0', - 'e_march3' => '', - 'e_march3_price' => '', - 'e_quant3' => '1', - 'htva_march3' => '0', - 'e_march3_tva_id' => '', - 'e_march3_tva_amount' => '', - 'tva_march3' => '0', - 'tvac_march3' => '0', - 'e_march4' => '', - 'e_march4_price' => '', - 'e_quant4' => '1', - 'htva_march4' => '0', - 'e_march4_tva_id' => '', - 'e_march4_tva_amount' => '', - 'tva_march4' => '0', - 'tvac_march4' => '0', - 'e_march5' => '', - 'e_march5_price' => '', - 'e_quant5' => '1', - 'htva_march5' => '0', - 'e_march5_tva_id' => '', - 'e_march5_tva_amount' => '', - 'tva_march5' => '0', - 'tvac_march5' => '0', - 'e_march6' => '', - 'e_march6_price' => '', - 'e_quant6' => '1', - 'htva_march6' => '0', - 'e_march6_tva_id' => '', - 'e_march6_tva_amount' => '', - 'tva_march6' => '0', - 'tvac_march6' => '0', - 'e_march7' => '', - 'e_march7_price' => '', - 'e_quant7' => '1', - 'htva_march7' => '0', - 'e_march7_tva_id' => '', - 'e_march7_tva_amount' => '', - 'tva_march7' => '0', - 'tvac_march7' => '0', - 'e_march8' => '', - 'e_march8_price' => '', - 'e_quant8' => '1', - 'htva_march8' => '0', - 'e_march8_tva_id' => '', - 'e_march8_tva_amount' => '', - 'tva_march8' => '0', - 'tvac_march8' => '0', - 'e_march9' => '', - 'e_march9_price' => '', - 'e_quant9' => '1', - 'htva_march9' => '0', - 'e_march9_tva_id' => '', - 'e_march9_tva_amount' => '', - 'tva_march9' => '0', - 'tvac_march9' => '0', - 'jrn_type' => 'ACH', - 'e_mp' => '0', - 'view_invoice' => 'Enregistrer', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ach.inc.php'; diff --git a/sources/scenario/scenario-1415995277.php b/sources/scenario/scenario-1415995277.php deleted file mode 100644 index 64dc924..0000000 --- a/sources/scenario/scenario-1415995277.php +++ /dev/null @@ -1,108 +0,0 @@ - '3', - 'ac' => 'COMPTA/MENUACH/ACH', - 'gDossier' => '42', - 'pre_def' => '1', -); -$_POST=array ( - 'gDossier' => '42', - 'nb_item' => '10', - 'p_jrn' => '3', - 'e_date' => '01.02.2014', - 'e_ech' => '', - 'e_client' => 'IMMOB', - 'e_pj' => 'ACH2', - 'e_pj_suggest' => 'ACH2', - 'e_comm' => 'Paiement loyer', - 'e_march0' => 'LOYER', - 'e_march0_price' => '2560.0000', - 'e_quant0' => '1.0000', - 'htva_march0' => '2560', - 'e_march0_tva_id' => '4', - 'e_march0_tva_amount' => '0', - 'tva_march0' => '0', - 'tvac_march0' => '2560', - 'e_march1' => '', - 'e_march1_price' => '', - 'e_quant1' => '1', - 'htva_march1' => '0', - 'e_march1_tva_id' => '', - 'e_march1_tva_amount' => '', - 'tva_march1' => '0', - 'tvac_march1' => '0', - 'e_march2' => '', - 'e_march2_price' => '', - 'e_quant2' => '1', - 'htva_march2' => '0', - 'e_march2_tva_id' => '', - 'e_march2_tva_amount' => '', - 'tva_march2' => '0', - 'tvac_march2' => '0', - 'e_march3' => '', - 'e_march3_price' => '', - 'e_quant3' => '1', - 'htva_march3' => '0', - 'e_march3_tva_id' => '', - 'e_march3_tva_amount' => '', - 'tva_march3' => '0', - 'tvac_march3' => '0', - 'e_march4' => '', - 'e_march4_price' => '', - 'e_quant4' => '1', - 'htva_march4' => '0', - 'e_march4_tva_id' => '', - 'e_march4_tva_amount' => '', - 'tva_march4' => '0', - 'tvac_march4' => '0', - 'e_march5' => '', - 'e_march5_price' => '', - 'e_quant5' => '1', - 'htva_march5' => '0', - 'e_march5_tva_id' => '', - 'e_march5_tva_amount' => '', - 'tva_march5' => '0', - 'tvac_march5' => '0', - 'e_march6' => '', - 'e_march6_price' => '', - 'e_quant6' => '1', - 'htva_march6' => '0', - 'e_march6_tva_id' => '', - 'e_march6_tva_amount' => '', - 'tva_march6' => '0', - 'tvac_march6' => '0', - 'e_march7' => '', - 'e_march7_price' => '', - 'e_quant7' => '1', - 'htva_march7' => '0', - 'e_march7_tva_id' => '', - 'e_march7_tva_amount' => '', - 'tva_march7' => '0', - 'tvac_march7' => '0', - 'e_march8' => '', - 'e_march8_price' => '', - 'e_quant8' => '1', - 'htva_march8' => '0', - 'e_march8_tva_id' => '', - 'e_march8_tva_amount' => '', - 'tva_march8' => '0', - 'tvac_march8' => '0', - 'e_march9' => '', - 'e_march9_price' => '', - 'e_quant9' => '1', - 'htva_march9' => '0', - 'e_march9_tva_id' => '', - 'e_march9_tva_amount' => '', - 'tva_march9' => '0', - 'tvac_march9' => '0', - 'jrn_type' => 'ACH', - 'p_action' => 'ach', - 'sa' => 'p', - 'e_mp' => '0', - 'view_invoice' => 'Enregistrer', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ach.inc.php'; diff --git a/sources/scenario/scenario-1415995285.php b/sources/scenario/scenario-1415995285.php deleted file mode 100644 index d8dd41a..0000000 --- a/sources/scenario/scenario-1415995285.php +++ /dev/null @@ -1,11 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUFIN', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); diff --git a/sources/scenario/scenario-1415995301.php b/sources/scenario/scenario-1415995301.php deleted file mode 100644 index 079f791..0000000 --- a/sources/scenario/scenario-1415995301.php +++ /dev/null @@ -1,14 +0,0 @@ - '42', - 'ac' => 'PARAM/CFGLED', - 'sa' => 'detail', - 'p_jrn' => '1', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'cfgledger.inc.php'; diff --git a/sources/scenario/scenario-1415995308.php b/sources/scenario/scenario-1415995308.php deleted file mode 100644 index fa5bf18..0000000 --- a/sources/scenario/scenario-1415995308.php +++ /dev/null @@ -1,33 +0,0 @@ - '42', - 'ac' => 'PARAM/CFGLED', - 'sa' => 'detail', - 'p_jrn' => '1', -); -$_POST=array ( - 'p_jrn' => '1', - 'sa' => 'detail', - 'gDossier' => '42', - 'p_jrn_deb_max_line' => '10', - 'p_ech_lib' => 'echeance', - 'p_jrn_type' => 'FIN', - 'p_jrn_name' => 'Financier', - 'bank' => 'BQ', - 'min_row' => '5', - 'jrn_def_pj_pref' => 'FIN', - 'jrn_def_pj_seq' => '0', - 'p_description' => 'Concerne tous les mouvements financiers (comptes en banque, caisses, visa...)', - 'FICHEDEB' => - array ( - 0 => '3', - 1 => '2', - 2 => '4', - ), - 'update' => 'Sauve', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'cfgledger.inc.php'; diff --git a/sources/scenario/scenario-1415995317.php b/sources/scenario/scenario-1415995317.php deleted file mode 100644 index 9238ff0..0000000 --- a/sources/scenario/scenario-1415995317.php +++ /dev/null @@ -1,12 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUFIN/FIN', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_fin.inc.php'; diff --git a/sources/scenario/scenario-1415995350.php b/sources/scenario/scenario-1415995350.php deleted file mode 100644 index f41c47f..0000000 --- a/sources/scenario/scenario-1415995350.php +++ /dev/null @@ -1,54 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUFIN/FIN', -); -$_POST=array ( - 'ledger_type' => 'fin', - 'ac' => 'COMPTA/MENUFIN/FIN', - 'gDossier' => '42', - 'nb_item' => '5', - 'chdate' => '1', - 'e_date' => '02.01.2014', - 'p_jrn' => '1', - 'e_pj' => 'FIN1', - 'e_pj_suggest' => 'FIN1', - 'first_sold' => '0', - 'last_sold' => '', - 'dateop0' => '', - 'e_other0' => 'IMMOB ', - 'e_other_name0' => 'Immo Bureau', - 'e_other0_comment' => '', - 'e_other0_amount' => '2560', - 'e_concerned0' => '2', - 'dateop1' => '', - 'e_other1' => '', - 'e_other_name1' => '', - 'e_other1_comment' => '', - 'e_other1_amount' => '0', - 'e_concerned1' => '', - 'dateop2' => '', - 'e_other2' => '', - 'e_other_name2' => '', - 'e_other2_comment' => '', - 'e_other2_amount' => '0', - 'e_concerned2' => '', - 'dateop3' => '', - 'e_other3' => '', - 'e_other_name3' => '', - 'e_other3_comment' => '', - 'e_other3_amount' => '0', - 'e_concerned3' => '', - 'dateop4' => '', - 'e_other4' => '', - 'e_other_name4' => '', - 'e_other4_comment' => '', - 'e_other4_amount' => '0', - 'e_concerned4' => '', - 'save' => 'Sauve', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_fin.inc.php'; diff --git a/sources/scenario/scenario-1415995352.php b/sources/scenario/scenario-1415995352.php deleted file mode 100644 index 5abb0c9..0000000 --- a/sources/scenario/scenario-1415995352.php +++ /dev/null @@ -1,50 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUFIN/FIN', -); -$_POST=array ( - 'ac' => 'COMPTA/MENUFIN/FIN', - 'gDossier' => '42', - 'p_jrn' => '1', - 'nb_item' => '5', - 'last_sold' => '', - 'first_sold' => '0', - 'e_pj' => 'FIN1', - 'e_pj_suggest' => 'FIN1', - 'e_date' => '02.01.2014', - 'mt' => '1415995351.0398', - 'sa' => 'n', - 'e_other0' => 'IMMOB ', - 'e_other0_comment' => '', - 'e_other0_amount' => '2560', - 'e_concerned0' => '2', - 'dateop0' => '', - 'chdate' => '1', - 'e_other1' => '', - 'e_other1_comment' => '', - 'e_other1_amount' => '0', - 'e_concerned1' => '', - 'dateop1' => '', - 'e_other2' => '', - 'e_other2_comment' => '', - 'e_other2_amount' => '0', - 'e_concerned2' => '', - 'dateop2' => '', - 'e_other3' => '', - 'e_other3_comment' => '', - 'e_other3_amount' => '0', - 'e_concerned3' => '', - 'dateop3' => '', - 'e_other4' => '', - 'e_other4_comment' => '', - 'e_other4_amount' => '0', - 'e_concerned4' => '', - 'dateop4' => '', - 'confirm' => 'Confirmer', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_fin.inc.php'; diff --git a/sources/scenario/scenario-1415995357.php b/sources/scenario/scenario-1415995357.php deleted file mode 100644 index 925c69a..0000000 --- a/sources/scenario/scenario-1415995357.php +++ /dev/null @@ -1,12 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUODS/ODS', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ods.inc.php'; diff --git a/sources/scenario/scenario-1415995424.php b/sources/scenario/scenario-1415995424.php deleted file mode 100644 index d028bad..0000000 --- a/sources/scenario/scenario-1415995424.php +++ /dev/null @@ -1,12 +0,0 @@ - '42', - 'ac' => 'PARAM/CFGPCMN', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'param_pcmn.inc.php'; diff --git a/sources/scenario/scenario-1415995434.php b/sources/scenario/scenario-1415995434.php deleted file mode 100644 index d698b13..0000000 --- a/sources/scenario/scenario-1415995434.php +++ /dev/null @@ -1,19 +0,0 @@ - '42', - 'ac' => 'PARAM/CFGPCMN', -); -$_POST=array ( - 'p_action' => 'pcmn', - 'gDossier' => '42', - 'p_val' => '4519', - 'p_lib' => 'Compte TVA', - 'p_parent' => '451', - 'p_type' => 'ACT', - 'Ajout' => 'Ajout', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'param_pcmn.inc.php'; diff --git a/sources/scenario/scenario-1415995437.php b/sources/scenario/scenario-1415995437.php deleted file mode 100644 index 4675ee8..0000000 --- a/sources/scenario/scenario-1415995437.php +++ /dev/null @@ -1,13 +0,0 @@ - 'PARAM/CFGPCMN', - 'p_start' => '4', - 'gDossier' => '42', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'param_pcmn.inc.php'; diff --git a/sources/scenario/scenario-1415995449.php b/sources/scenario/scenario-1415995449.php deleted file mode 100644 index 98fdd20..0000000 --- a/sources/scenario/scenario-1415995449.php +++ /dev/null @@ -1,20 +0,0 @@ - 'PARAM/CFGPCMN', - 'p_start' => '4', - 'gDossier' => '42', -); -$_POST=array ( - 'p_valu' => '4519', - 'p_libu' => 'Compte TVA', - 'p_parentu' => '451', - 'p_typeu' => 'PAS', - 'p_oldu' => '4519', - 'gDossier' => '42', - 'update' => 'Sauve', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'param_pcmn.inc.php'; diff --git a/sources/scenario/scenario-1415995545.php b/sources/scenario/scenario-1415995545.php deleted file mode 100644 index 4c50305..0000000 --- a/sources/scenario/scenario-1415995545.php +++ /dev/null @@ -1,12 +0,0 @@ - '42', - 'ac' => 'PARAM/COMPANY', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'company.inc.php'; diff --git a/sources/scenario/scenario-1415995575.php b/sources/scenario/scenario-1415995575.php deleted file mode 100644 index 41a7e81..0000000 --- a/sources/scenario/scenario-1415995575.php +++ /dev/null @@ -1,32 +0,0 @@ - '42', - 'ac' => 'PARAM/COMPANY', -); -$_POST=array ( - 'gDossier' => '42', - 'p_name' => 'NOALYSS', - 'p_tel' => '', - 'p_fax' => '', - 'p_street' => 'Rue de l\'espoir', - 'p_no' => '14', - 'p_cp' => '1090', - 'p_Commune' => 'Jette', - 'p_pays' => 'Belgique', - 'p_tva' => 'BE99999999', - 'p_compta' => 'nu', - 'p_stock' => 'N', - 'p_strict' => 'Y', - 'p_tva_use' => 'Y', - 'p_pj' => 'Y', - 'p_date_suggest' => 'Y', - 'p_check_periode' => 'N', - 'p_alphanum' => 'N', - 'p_updlab' => 'N', - 'record_company' => 'Sauve', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'company.inc.php'; diff --git a/sources/scenario/scenario-1415996970.php b/sources/scenario/scenario-1415996970.php deleted file mode 100644 index 335ec53..0000000 --- a/sources/scenario/scenario-1415996970.php +++ /dev/null @@ -1,44 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUODS/ODS', -); -$_POST=array ( - 'gDossier' => '42', - 'ac' => 'COMPTA/MENUODS/ODS', - 'p_jrn' => '4', - 'e_date' => '14.11.2014', - 'e_pj' => 'ODS1', - 'e_pj_suggest' => 'ODS1', - 'desc' => 'TVA', - 'nb_item' => '5', - 'jrn_type' => 'ODS', - 'qc_0' => '', - 'poste0' => '4519', - 'ld0' => 'Compte TVA', - 'amount0' => '250', - 'qc_1' => '', - 'poste1' => '6700', - 'ld1' => 'Paiement TVA', - 'amount1' => '250', - 'ck1' => '', - 'qc_2' => '', - 'poste2' => '', - 'ld2' => '', - 'amount2' => '', - 'qc_3' => '', - 'poste3' => '', - 'ld3' => '', - 'amount3' => '', - 'qc_4' => '', - 'poste4' => '', - 'ld4' => '', - 'amount4' => '', - 'jrn_concerned' => '', - 'summary' => 'Sauvez', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ods.inc.php'; diff --git a/sources/scenario/scenario-1415996980.php b/sources/scenario/scenario-1415996980.php deleted file mode 100644 index 0868b28..0000000 --- a/sources/scenario/scenario-1415996980.php +++ /dev/null @@ -1,35 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUODS/ODS', -); -$_POST=array ( - 'ac' => 'COMPTA/MENUODS/ODS', - 'e_date' => '14.11.2014', - 'desc' => 'TVA', - 'period' => '102', - 'e_pj' => 'ODS1', - 'e_pj_suggest' => 'ODS1', - 'mt' => '1415996970.8822', - 'e_comm' => 'TVA', - 'jrn_type' => 'ODS', - 'p_jrn' => '4', - 'nb_item' => '5', - 'jrn_concerned' => '', - 'gDossier' => '42', - 'poste0' => '4519', - 'ld0' => 'Compte TVA', - 'amount0' => '250', - 'poste1' => '6700', - 'ld1' => 'Paiement TVA', - 'amount1' => '250', - 'ck1' => '', - 'opd_name' => 'Paiement TVA', - 'od_description' => '', - 'save' => 'Confirmer', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ods.inc.php'; diff --git a/sources/scenario/scenario-1415997148.php b/sources/scenario/scenario-1415997148.php deleted file mode 100644 index a3ecb36..0000000 --- a/sources/scenario/scenario-1415997148.php +++ /dev/null @@ -1,12 +0,0 @@ - '42', - 'ac' => 'ODS', - 'go' => 'aller', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); diff --git a/sources/scenario/scenario-1415997352.php b/sources/scenario/scenario-1415997352.php deleted file mode 100644 index 7187c96..0000000 --- a/sources/scenario/scenario-1415997352.php +++ /dev/null @@ -1,44 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUODS/ODS', -); -$_POST=array ( - 'gDossier' => '42', - 'ac' => 'COMPTA/MENUODS/ODS', - 'p_jrn' => '4', - 'e_date' => '14.11.2014', - 'e_pj' => 'ODS1', - 'e_pj_suggest' => 'ODS1', - 'desc' => 'TVA', - 'nb_item' => '5', - 'jrn_type' => 'ODS', - 'qc_0' => '', - 'poste0' => '4519', - 'ld0' => 'Compte TVA', - 'amount0' => '250', - 'qc_1' => '', - 'poste1' => '6700', - 'ld1' => 'Paiement TVA', - 'amount1' => '250', - 'ck1' => '', - 'qc_2' => '', - 'poste2' => '', - 'ld2' => '', - 'amount2' => '', - 'qc_3' => '', - 'poste3' => '', - 'ld3' => '', - 'amount3' => '', - 'qc_4' => '', - 'poste4' => '', - 'ld4' => '', - 'amount4' => '', - 'jrn_concerned' => '', - 'summary' => 'Sauvez', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ods.inc.php'; diff --git a/sources/scenario/scenario-1415997358.php b/sources/scenario/scenario-1415997358.php deleted file mode 100644 index 97135d1..0000000 --- a/sources/scenario/scenario-1415997358.php +++ /dev/null @@ -1,35 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUODS/ODS', -); -$_POST=array ( - 'ac' => 'COMPTA/MENUODS/ODS', - 'e_date' => '14.11.2014', - 'desc' => 'TVA', - 'period' => '102', - 'e_pj' => 'ODS1', - 'e_pj_suggest' => 'ODS1', - 'mt' => '1415997352.5804', - 'e_comm' => 'TVA', - 'jrn_type' => 'ODS', - 'p_jrn' => '4', - 'nb_item' => '5', - 'jrn_concerned' => '', - 'gDossier' => '42', - 'poste0' => '4519', - 'ld0' => 'Compte TVA', - 'amount0' => '250', - 'poste1' => '6700', - 'ld1' => 'Paiement TVA', - 'amount1' => '250', - 'ck1' => '', - 'opd_name' => 'Paiement TVA', - 'od_description' => '', - 'save' => 'Confirmer', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ods.inc.php'; diff --git a/sources/scenario/scenario-1415997389.php b/sources/scenario/scenario-1415997389.php deleted file mode 100644 index b08f801..0000000 --- a/sources/scenario/scenario-1415997389.php +++ /dev/null @@ -1,12 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUODS/ODS', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ods.inc.php'; diff --git a/sources/scenario/scenario-1415997404.php b/sources/scenario/scenario-1415997404.php deleted file mode 100644 index 52244f9..0000000 --- a/sources/scenario/scenario-1415997404.php +++ /dev/null @@ -1,67 +0,0 @@ - 'use_opd', - 'p_jrn_predef' => '4', - 'ac' => 'COMPTA/MENUODS/ODS', - 'gDossier' => '42', - 'pre_def' => '2', -); -$_POST=array ( - 'gDossier' => '42', - 'ac' => 'COMPTA/MENUODS/ODS', - 'p_jrn' => '4', - 'e_date' => '14.11.2014', - 'e_pj' => 'ODS4', - 'e_pj_suggest' => 'ODS4', - 'desc' => 'Paiement TVA', - 'nb_item' => '10', - 'jrn_type' => 'ODS', - 'qc_0' => '', - 'poste0' => '4519', - 'ld0' => 'Compte TVA', - 'amount0' => '250.0000', - 'qc_1' => '', - 'poste1' => '6700', - 'ld1' => 'Impôts et précomptes dus ou versés', - 'amount1' => '250.0000', - 'ck1' => '', - 'qc_2' => '', - 'poste2' => '', - 'ld2' => '', - 'amount2' => '', - 'qc_3' => '', - 'poste3' => '', - 'ld3' => '', - 'amount3' => '', - 'qc_4' => '', - 'poste4' => '', - 'ld4' => '', - 'amount4' => '', - 'qc_5' => '', - 'poste5' => '', - 'ld5' => '', - 'amount5' => '', - 'qc_6' => '', - 'poste6' => '', - 'ld6' => '', - 'amount6' => '', - 'qc_7' => '', - 'poste7' => '', - 'ld7' => '', - 'amount7' => '', - 'qc_8' => '', - 'poste8' => '', - 'ld8' => '', - 'amount8' => '', - 'qc_9' => '', - 'poste9' => '', - 'ld9' => '', - 'amount9' => '', - 'jrn_concerned' => '', - 'summary' => 'Sauvez', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ods.inc.php'; diff --git a/sources/scenario/scenario-1415997407.php b/sources/scenario/scenario-1415997407.php deleted file mode 100644 index cee4af6..0000000 --- a/sources/scenario/scenario-1415997407.php +++ /dev/null @@ -1,38 +0,0 @@ - 'use_opd', - 'p_jrn_predef' => '4', - 'ac' => 'COMPTA/MENUODS/ODS', - 'gDossier' => '42', - 'pre_def' => '2', -); -$_POST=array ( - 'ac' => 'COMPTA/MENUODS/ODS', - 'e_date' => '14.11.2014', - 'desc' => 'Paiement TVA', - 'period' => '102', - 'e_pj' => 'ODS4', - 'e_pj_suggest' => 'ODS4', - 'mt' => '1415997404.8993', - 'e_comm' => 'Paiement TVA', - 'jrn_type' => 'ODS', - 'p_jrn' => '4', - 'nb_item' => '10', - 'jrn_concerned' => '', - 'gDossier' => '42', - 'poste0' => '4519', - 'ld0' => 'Compte TVA', - 'amount0' => '250.0000', - 'poste1' => '6700', - 'ld1' => 'Impôts et précomptes dus ou versés', - 'amount1' => '250.0000', - 'ck1' => '', - 'opd_name' => '', - 'od_description' => '', - 'save' => 'Confirmer', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_ods.inc.php'; diff --git a/sources/scenario/scenario-1415997877.php b/sources/scenario/scenario-1415997877.php deleted file mode 100644 index 0bf7397..0000000 --- a/sources/scenario/scenario-1415997877.php +++ /dev/null @@ -1,12 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUACH/ACHISTO', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'history_operation.inc.php'; diff --git a/sources/scenario/scenario-1415997886.php b/sources/scenario/scenario-1415997886.php deleted file mode 100644 index 5567703..0000000 --- a/sources/scenario/scenario-1415997886.php +++ /dev/null @@ -1,12 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUFIN/FIHISTO', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'history_operation.inc.php'; diff --git a/sources/scenario/scenario-1415997889.php b/sources/scenario/scenario-1415997889.php deleted file mode 100644 index a5a4dc6..0000000 --- a/sources/scenario/scenario-1415997889.php +++ /dev/null @@ -1,12 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUFIN/FSALDO', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'compta_fin_saldo.inc.php'; diff --git a/sources/scenario/scenario-1415998124.php b/sources/scenario/scenario-1415998124.php deleted file mode 100644 index cfe2803..0000000 --- a/sources/scenario/scenario-1415998124.php +++ /dev/null @@ -1,13 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUACH/ACHISTO', - 'go' => 'aller', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'history_operation.inc.php'; diff --git a/sources/scenario/scenario-1415998134.php b/sources/scenario/scenario-1415998134.php deleted file mode 100644 index 3c57dbf..0000000 --- a/sources/scenario/scenario-1415998134.php +++ /dev/null @@ -1,13 +0,0 @@ - '42', - 'ac' => 'COMPTA/VENMENU/VEHISTO', - 'go' => 'aller', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'history_operation.inc.php'; diff --git a/sources/scenario/scenario-1415998146.php b/sources/scenario/scenario-1415998146.php deleted file mode 100644 index 4c84df0..0000000 --- a/sources/scenario/scenario-1415998146.php +++ /dev/null @@ -1,13 +0,0 @@ - '42', - 'ac' => 'COMPTA/MENUODS/ODHISTO', - 'go' => 'aller', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'history_operation.inc.php'; diff --git a/sources/scenario/scenario-1416078146.php b/sources/scenario/scenario-1416078146.php deleted file mode 100644 index a16a410..0000000 --- a/sources/scenario/scenario-1416078146.php +++ /dev/null @@ -1,14 +0,0 @@ - '42', - 'ctl' => 'div_new_card', - 'fd_id' => '2', - 'op' => 'bc', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'ajax_card.php'; diff --git a/sources/scenario/scenario-ajax-add-card.php b/sources/scenario/scenario-ajax-add-card.php deleted file mode 100644 index a6e7b7c..0000000 --- a/sources/scenario/scenario-ajax-add-card.php +++ /dev/null @@ -1,30 +0,0 @@ - '42', - 'ctl' => 'div_new_card', - 'fd_id' => '3', - 'av_text1' => 'caisse', - 'av_text3' => '', - 'av_text4' => '', - 'av_text12' => '', - 'av_text5' => '', - 'av_text5_bt' => 'Recherche', - 'av_text13' => '', - 'av_text14' => '', - 'av_text15' => '', - 'av_text16' => '', - 'av_text17' => '', - 'av_text18' => '', - 'av_text23' => '', - 'sc' => 'Sauve', - 'op' => 'sc', -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); - ini_set('disable_functions', 'exit,die,header'); -include 'ajax_card.php'; -?> diff --git a/sources/scenario/scenario-historic.php b/sources/scenario/scenario-historic.php deleted file mode 100644 index 3ee4169..0000000 --- a/sources/scenario/scenario-historic.php +++ /dev/null @@ -1,24 +0,0 @@ - '37', - 'ledger_type' => 'ALL', - 'ac' => 'HIST', - 'nb_jrn' => '0', - 'date_start' => '01.01.2014', - 'date_end' => '31.12.2014', - 'date_paid_start' => '', - 'date_paid_end' => '', - 'desc' => '', - 'amount_min' => '0', - 'amount_max' => '0', - 'qcode' => '', - 'accounting' => '', - 'search' => 'Rechercher', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'history_operation.inc.php'; diff --git a/sources/scenario/scenario-verif_bilan.php b/sources/scenario/scenario-verif_bilan.php deleted file mode 100644 index a457b3b..0000000 --- a/sources/scenario/scenario-verif_bilan.php +++ /dev/null @@ -1,13 +0,0 @@ - '27', - 'ac' => 'COMPTA/ADV/VERIFBIL', - 'go' => 'aller', -); -$_POST=array ( -); -$_POST['gDossier']=$gDossierLogInput; -$_GET['gDossier']=$gDossierLogInput; - $_REQUEST=array_merge($_GET,$_POST); -include 'verif_bilan.inc.php'; diff --git a/sources/sql/ac_upgrade.sql b/sources/sql/ac_upgrade.sql deleted file mode 100644 index 9beca2b..0000000 --- a/sources/sql/ac_upgrade.sql +++ /dev/null @@ -1,12 +0,0 @@ - -begin; -ALTER TABLE ac_dossier drop COLUMN dos_jnt_user ; -delete from jnt_use_dos where jnt_id in (select priv_jnt from priv_user where priv_priv='X'); -delete from jnt_use_dos where use_id in (select use_id from ac_users where use_admin=1 or use_active=0); -ALTER TABLE ac_users ADD COLUMN use_email text; -COMMENT ON COLUMN ac_users.use_email IS 'Email of the user'; - -drop table priv_user; -select upgrade_repo(16); -alter table -rollback; diff --git a/sources/sql/upgrade.sql b/sources/sql/upgrade.sql deleted file mode 100644 index 3516c8a..0000000 --- a/sources/sql/upgrade.sql +++ /dev/null @@ -1,274 +0,0 @@ -update menu_ref set me_file = null where me_code='EXT'; -update op_predef_detail set opd_poste=trim(opd_poste) ; - -CREATE OR REPLACE FUNCTION comptaproc.fiche_detail_qcode_upd() - RETURNS trigger AS -$BODY$ -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; - - end loop; - end if; -return NEW; -end; -$BODY$ -LANGUAGE plpgsql; - -CREATE OR REPLACE FUNCTION comptaproc.update_quick_code(njft_id integer, tav_text text) - RETURNS integer AS -$BODY$ - declare - ns integer; - nExist integer; - tText 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; - - loop - -- 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; - if tText = 'FID'||ns then - -- take the next sequence - select nextval('s_jnt_fic_att_value') into ns; - end if; - tText :='FID'||ns; - - end loop; - update fiche_detail set ad_value = tText where 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); - - - return ns; - end; -$BODY$ - LANGUAGE plpgsql ; - - -CREATE OR REPLACE FUNCTION comptaproc.insert_quick_code(nf_id integer, tav_text text) - RETURNS integer AS -$BODY$ - declare - ns integer; - nExist integer; - tText text; - tBase text; - tName text; - nCount Integer; - nDuplicate Integer; - begin - tText := lower(trim(tav_text)); - tText := replace(tText,' ',''); - tName:= translate(tName,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; - - - insert into fiche_detail(jft_id,f_id,ad_id,ad_value) values (ns,nf_id,23,upper(tText)); - return ns; - end; -$BODY$ -LANGUAGE plpgsql; - -create or replace function insert_menu() -returns void as -$BODY$ -declare - n_count integer := 0; -begin - select count(*) into n_count from menu_ref where me_code='CONTACT'; - if n_count = 0 then - insert into menu_ref(me_code, - me_file, - me_menu, - me_description,me_type,me_description_etendue) - values - ('CONTACT', - 'contact.inc.php', - 'Contact','Liste de vos contacts','ME','Liste de vos contacts normalement liée à des fiches de sociétés'); - end if; - - select count(*) into n_count from profile_menu where me_code='CONTACT' and p_id=1; - if n_count = 0 then - insert into profile_menu(me_code,me_code_dep,p_id,p_order,p_type_display,pm_default,pm_id_dep) select 'CONTACT','GESTION',1,22,'E',0,(select pm_id from profile_menu where me_code='GESTION' and p_id=1); - end if; - - select count(*) into n_count from profile_menu where me_code='CONTACT' and p_id=2; - if n_count = 0 then - insert into profile_menu(me_code,me_code_dep,p_id,p_order,p_type_display,pm_default,pm_id_dep) select 'CONTACT','GESTION',2,22,'E',0,(select pm_id from profile_menu where me_code='GESTION' and p_id=2); - end if; -end; -$BODY$ -language plpgsql; - -select insert_menu(); - -drop function insert_menu(); -drop view v_all_menu; - -CREATE OR REPLACE 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; - -DROP FUNCTION comptaproc.get_profile_menu(text); - -CREATE OR REPLACE FUNCTION comptaproc.get_profile_menu(p_profile integer) - RETURNS SETOF menu_tree AS -$BODY$ -declare - a menu_tree; - e menu_tree; -begin -for a in select me_code,me_description from v_all_menu where p_id=p_profile - and me_code_dep is null and me_type <> 'PR' and me_type <>'SP' -loop - return next a; - - for e in select * from get_menu_tree(a.code,p_profile) - loop - return next e; - end loop; - - end loop; -return; -end; -$BODY$ - LANGUAGE plpgsql ; - -DROP FUNCTION comptaproc.get_menu_tree(text, text); - -CREATE OR REPLACE FUNCTION comptaproc.get_menu_tree(p_code text, p_profile integer) - RETURNS SETOF menu_tree AS -$BODY$ -declare - i menu_tree; - e menu_tree; - a text; - x v_all_menu%ROWTYPE; -begin - for x in select * from v_all_menu where me_code_dep=p_code::text and p_id=p_profile - loop - if x.me_code_dep is not null then - i.code := x.me_code_dep||'/'||x.me_code; - else - i.code := x.me_code; - end if; - - i.description := x.me_description; - - return next i; - - for e in select * from get_menu_tree(x.me_code,p_profile) - loop - e.code:=x.me_code_dep||'/'||e.code; - return next e; - end loop; - - end loop; - return; -end; -$BODY$ - LANGUAGE plpgsql; \ No newline at end of file diff --git a/sources/unit-test/README b/sources/unit-test/README deleted file mode 100644 index eaf6ece..0000000 --- a/sources/unit-test/README +++ /dev/null @@ -1,23 +0,0 @@ -Ce répertoire sert aux tests unitaires avec PHPUNIT, il faut d'abord changer dans le bootstrap.php pour que le path soit correct. -Il faut configurer Netbeans pour pouvoir l'utiliser : -1 . Activer PHPUNIT, -2 . dans GLOBAL PATH (propriété du projet) ajouter le fichier phpunit.phar -3. Donner unit-test comme répertoire de test - -Ensuite copier bootstrap.php.example vers bootstrap.php et modifier les variables (le dossier à utiliser, include_path ...) - -Testing commande en ligne -========================= -Génération - php /phpunit-skelgen.phar --bootstrap bootstrap.php --test -- Intervat ../include/class_transform_intervat.php -test (depuis repertoire include) - php /phpunit.phar --tap --colors --bootstrap ../bootstrap.php class_acc_accountTest.php - -Tous les fichiers - for i in *.php;do php /phpunit.phar --tap --colors --bootstrap ../bootstrap.php $i;done - - -Génération pour tous les fichiers -================================= -Permet de voir les lignes de code qui ont été testées -php /phpunit.phar --coverage-html html --bootstrap bootstrap.php include diff --git a/sources/unit-test/bootstrap.php.example b/sources/unit-test/bootstrap.php.example deleted file mode 100644 index 62936a0..0000000 --- a/sources/unit-test/bootstrap.php.example +++ /dev/null @@ -1,154 +0,0 @@ -object=new Acc_Account($g_connection,400); - $this->object->load(); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Acc_Account::get_parameter - * @todo Implement testGet_parameter(). - * @backupGlobals enabled - */ - public function testGet_parameter() - { - $value=$this->object->get_parameter("value"); - $this->assertEquals($value,'400'); - - } - - /** - * @covers Acc_Account::set_parameter - * @todo Implement testSet_parameter(). - * @backupGlobals enabled - */ - public function testSet_parameter() - { - $this->object->set_parameter("value",500); - $value=$this->object->get_parameter("value"); - $this->assertEquals($value,500); - } - - /** - * @covers Acc_Account::get_lib - * @todo Implement testGet_lib(). - */ - public function testGet_lib() - { - $value=$this->object->get_lib(); - $this->assertEquals($value,'Clients'); - } - - /** - * @covers Acc_Account::check - * @todo Implement testCheck(). - */ - public function testCheck() - { - $value=$this->object->check('pcm_val'); - $this->assertTrue($value); - $value=$this->object->check('pcm_lib'); - $this->assertTrue($value); - $value=$this->object->check('pcm_val_parent'); - $this->assertTrue($value); - $value=$this->object->check('pcm_type','CHA'); - $this->assertTrue($value); - $this->setExpectedException("Exception"); - $value=$this->object->check('unknown'); - - } - - /** - * @covers Acc_Account::load - * @todo Implement testLoad(). - */ - public function testLoad() - { - $this->object->load(); - } - - /** - * @covers Acc_Account::form - * @todo Implement testForm(). - */ - public function testForm() - { - $_REQUEST['gDossier']=36; - $this->object->form(); - } - - /** - * @covers Acc_Account::count - * @todo Implement testCount(). - */ - public function testCount() - { - - $this->assertEquals($this->object->count('550'),1); - $this->assertEquals($this->object->count('500'),0); - } - - /** - * @covers Acc_Account::test_me - * @todo Implement testTest_me(). - */ - public function testTest_me() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Account::update - * @todo Implement testUpdate(). - */ - public function testUpdate() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_acc_account_ledgerTest.php b/sources/unit-test/include/class_acc_account_ledgerTest.php deleted file mode 100644 index c936326..0000000 --- a/sources/unit-test/include/class_acc_account_ledgerTest.php +++ /dev/null @@ -1,290 +0,0 @@ -object=new Acc_Account_Ledger($g_connection, 400); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Acc_Account_Ledger::get_row - * @todo Implement testGet_row(). - */ - public function testGet_row() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Account_Ledger::get_row_date - * @todo Implement testGet_row_date(). - */ - public function testGet_row_date() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - function dataGet_Name() - { - return array( - array('10','Capital '), - array('01','Poste inconnu') - ); - } - /** - * @covers Acc_Account_Ledger::get_name - * @todo Implement testGet_name(). - * @dataProvider dataGet_Name - */ - public function testGet_name($id,$result) - { - $this->object->id=$id; - $this->assertEquals($this->object->get_name(),$result); - } - - /** - * @covers Acc_Account_Ledger::do_exist - * @todo Implement testDo_exist(). - * @dataProvider dataDo_exist - */ - public function testDo_exist($p_value, $result) - { - $this->object->id=$p_value; - $this->assertEquals($this->object->do_exist(), $result); - } - - function dataDo_exist() - { - return array( - array('400', 1), - array('400A', 0), - array('550', 1), - array('60BXX', 0) - ); - } - - /** - * @covers Acc_Account_Ledger::load - * @todo Implement testLoad(). - */ - public function testLoad() - { - $this->object->load(); - - } - - /** - * @covers Acc_Account_Ledger::get - * @todo Implement testGet(). - */ - public function testGet() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Account_Ledger::get_solde - * @todo Implement testGet_solde(). - */ - public function testGet_solde() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Account_Ledger::get_solde_detail - * @todo Implement testGet_solde_detail(). - */ - public function testGet_solde_detail() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Account_Ledger::isTVA - * @todo Implement testIsTVA(). - */ - public function testIsTVA() - { - $this->object->id="4111"; - $this->assertEquals($this->object->isTVA(),1); - $this->object->id=10; - $this->assertEquals($this->object->isTVA(),0); - - } - - /** - * @covers Acc_Account_Ledger::HtmlTable - * @todo Implement testHtmlTable(). - */ - public function testHtmlTable() - { - $this->assertTrue(true,'Ne peut être testé car vue HTML'); - } - public function dataGet_amount_side() - { - return array ( - array(0,"="), - array(1000,'D'), - array(-1000,'C'), - ); - } - /** - * @covers Acc_Account_Ledger::get_amount_side - * @todo Implement testGet_amount_side(). - * @dataProvider dataGet_amount_side - */ - public function testGet_amount_side($amount,$result) - { - $this->assertEquals($this->object->get_amount_side($amount),$result); - } - - /** - * @covers Acc_Account_Ledger::HtmlTableHeader - * @todo Implement testHtmlTableHeader(). - */ - public function testHtmlTableHeader() - { - // Remove the following lines when you implement this test. - $this->assertTrue(true,'Ne peut être testé car vue HTML'); - } - - /** - * @covers Acc_Account_Ledger::belong_ledger - * @todo Implement testBelong_ledger(). - * @dataProvider DataBelong_ledger - */ - public function testBelong_ledger($p_jrn, $result) - { - $this->assertEquals($this->object->belong_ledger($p_jrn), $result); - } - - function DataBelong_ledger() - { - return array( - array(0, -1), - array(1, -1), - array(3, -1), - array(2, 0), - array(4, 0) - ); - } - public function dataGet_account_ledger() - { - return array( - array(0,array()), - array(1,array('5*','')), - array(2,array('4*')), - array(3,array('6*')) - - ); - } - /** - * @covers Acc_Account_Ledger::get_account_ledger - * @todo Implement testGet_account_ledger(). - * @dataProvider dataGet_account_ledger - */ - public function testGet_account_ledger($p_jrn,$result) - { - echo "ledger $p_jrn"; - $this->assertEquals($this->object->get_account_ledger($p_jrn),$result); - printf ("\n"); - } - - /** - * @covers Acc_Account_Ledger::build_sql_account - * @todo Implement testBuild_sql_account(). - * @dataProvider DataBuild_Sql_account - */ - public function testBuild_sql_account($p_jrn, $result) - { - print "\n--------------------\n"; - $value=$this->object->build_sql_account($p_jrn); - printf(" ledger %s [%s]", $p_jrn, $value); - $this->assertEquals(trim($value), $result); - } - - public function DataBuild_Sql_account() - { - return array( - array(0, ""), - array(1, "pcm_val::text like '5%'"), - array(2, "pcm_val::text like '4%'"), - array(3, "pcm_val::text like '6%'"), - array(4, "") - ); - } - - function dataFind_Card() - { - return array( - array('6191', '22'), - array('6192', '23'), - array('4400004', '25') - ); - } - - /** - * @covers Acc_Account_Ledger::find_card - * @todo Implement testFind_card(). - * @dataProvider dataFind_Card() - */ - public function testFind_card($p_value, $p_card) - { - $this->object->id=$p_value; - $result=$this->object->find_card(); - $this->assertEquals($p_card, $result[0]['f_id']); - } - - /** - * @covers Acc_Account_Ledger::test_me - * @todo Implement testTest_me(). - */ - public function testTest_me() - { - $this->assertEquals($this->object->test_me(),0); - } - -} diff --git a/sources/unit-test/include/class_acc_balanceTest.php b/sources/unit-test/include/class_acc_balanceTest.php deleted file mode 100644 index 0ee7926..0000000 --- a/sources/unit-test/include/class_acc_balanceTest.php +++ /dev/null @@ -1,74 +0,0 @@ -object=new Acc_Balance($g_connection); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Acc_Balance::get_row - * @todo Implement testGet_row(). - */ - public function testGet_row() - { - $this->object->get_row(1,200); - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'DATA : cannot be tested' - ); - } - - /** - * @covers Acc_Balance::filter_cat - * @todo Implement testFilter_cat(). - */ - public function testFilter_cat() - { - $this->object->jrn=1; - $this->object->filter_cat(array()); - $this->assertEquals($this->object->jrn,null); - $this->object->filter_cat(array('FIN')); - $this->assertEquals($this->object->jrn[0],2); - } - - /** - * @covers Acc_Balance::test_me - * @todo Implement testTest_me(). - */ - public function testTest_me() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_acc_bilanTest.php b/sources/unit-test/include/class_acc_bilanTest.php deleted file mode 100644 index 3cb07d4..0000000 --- a/sources/unit-test/include/class_acc_bilanTest.php +++ /dev/null @@ -1,176 +0,0 @@ -object=new Acc_Bilan($g_connection); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Acc_Bilan::display_form - * @todo Implement testDisplay_form(). - */ - public function testDisplay_form() - { - $r=$this->object->display_form(); - - } - - /** - * @covers Acc_Bilan::verify - * @todo Implement testVerify(). - */ - public function testVerify() - { - $this->object->verify(); - } - - /** - * @covers Acc_Bilan::get_request_get - * @todo Implement testGet_request_get(). - */ - public function testGet_request_get() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Bilan::load - * @todo Implement testLoad(). - */ - public function testLoad() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Bilan::file_open_form - * @todo Implement testFile_open_form(). - */ - public function testFile_open_form() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Bilan::file_open_template - * @todo Implement testFile_open_template(). - */ - public function testFile_open_template() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Bilan::compute_formula - * @todo Implement testCompute_formula(). - */ - public function testCompute_formula() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Bilan::generate_odt - * @todo Implement testGenerate_odt(). - */ - public function testGenerate_odt() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Bilan::generate_plain - * @todo Implement testGenerate_plain(). - */ - public function testGenerate_plain() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Bilan::generate - * @todo Implement testGenerate(). - */ - public function testGenerate() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Bilan::send - * @todo Implement testSend(). - */ - public function testSend() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Bilan::test_me - * @todo Implement testTest_me(). - */ - public function testTest_me() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_acc_computeTest.php b/sources/unit-test/include/class_acc_computeTest.php deleted file mode 100644 index 2f01e15..0000000 --- a/sources/unit-test/include/class_acc_computeTest.php +++ /dev/null @@ -1,191 +0,0 @@ -object=new Acc_Compute; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - public function dataGet_parameter() - { - return array( array('amount'), - array('amount_vat'), - array('amount_vat_rate'), - array('nd_vat'), - array('nd_vat_rate'), - array('nd_ded_vat'), - array('nd_ded_vat_rate'), - array('amount_nd'), - array('amount_nd_rate'), - array('nd_vat_rate'), - array('amount_perso'), - array('amount_perso_rate') - - ); - } - /** - * @covers Acc_Compute::get_parameter - * @todo Implement testGet_parameter(). - * @dataProvider dataGet_parameter - */ - public function testGet_parameter($data) - { - $result=$data; - $test=$data; - $this->object->get_parameter($test); - $this->assertEquals($test,$result); - } - - /** - * @covers Acc_Compute::set_parameter - * @todo Implement testSet_parameter(). - */ - public function testSet_parameter() - { - $this->object->set_parameter("nd_vat_rate",50); - $this->assertTrue(true,true); - } - - /** - * @covers Acc_Compute::get_info - * @todo Implement testGet_info(). - */ - public function testGet_info() - { - $this->object->get_info(); - $this->assertTrue(true,true); - } - - /** - * @covers Acc_Compute::compute_vat - * @todo Implement testCompute_vat(). - */ - public function testCompute_vat() - { - $this->object->set_parameter('amount',1.23); - $this->object->set_parameter('amount_vat_rate',0.21); - $this->object->compute_vat(); - $this->assertEquals($this->object->amount_vat,0.26); - } - - /** - * @covers Acc_Compute::compute_nd - * @todo Implement testCompute_nd(). - */ - public function testCompute_nd() - { - $this->object->set_parameter('amount',1.23); - $this->object->set_parameter('amount_vat_rate',0.21); - $this->object->set_parameter('amount_nd_rate',50); - $this->object->check=false; - $this->object->compute_nd(); - $this->assertEquals($this->object->amount_nd,0.62); - } - - /** - * @covers Acc_Compute::compute_nd_vat - * @todo Implement testCompute_nd_vat(). - */ - public function testCompute_nd_vat() - { - $this->object->set_parameter('amount',1.23); - $this->object->set_parameter('amount_vat_rate',0.21); - $this->object->set_parameter('nd_vat_rate',50); - $this->object->check=false; - $this->object->compute_nd_vat(); - $this->assertEquals($this->object->nd_vat,0.13); - } - - /** - * @covers Acc_Compute::compute_ndded_vat - * @todo Implement testCompute_ndded_vat(). - */ - public function testCompute_ndded_vat() - { - $this->object->set_parameter('amount',1.23); - $this->object->set_parameter('amount_vat_rate',0.21); - $this->object->set_parameter('nd_ded_vat_rate',50); - $this->object->check=false; - $this->object->compute_ndded_vat(); - $this->assertEquals($this->object->nd_ded_vat,0.13); - } - - /** - * @covers Acc_Compute::compute_perso - * @todo Implement testCompute_perso(). - */ - public function testCompute_perso() - { - $this->object->set_parameter('amount',1.23); - $this->object->set_parameter('amount_vat_rate',0.21); - $this->object->set_parameter('amount_perso_rate',50); - $this->object->compute_vat(); - $this->object->compute_perso(); - - $this->assertEquals($this->object->amount_perso,0.62); - $this->assertEquals($this->object->amount_vat,0.26); - } - - /** - * @covers Acc_Compute::correct - * @todo Implement testCorrect(). - */ - public function testCorrect() - { - $this->object->correct(); - } - - /** - * @covers Acc_Compute::verify - * @todo Implement testVerify(). - */ - public function testVerify() - { - $this->object->verify(); - $new=new Acc_Compute(); - $this->object->verify($new); - } - - /** - * @covers Acc_Compute::display - * @todo Implement testDisplay(). - * Cannot be checked - */ - public function testDisplay() - { - $this->object->display(); - } - - /** - * @covers Acc_Compute::test_me - * @todo Implement testTest_me(). - */ - public function testTest_me() - { - $this->object->test_me(); - $this->assertTrue(true,true); - } - -} diff --git a/sources/unit-test/include/class_acc_ledgerTest.php b/sources/unit-test/include/class_acc_ledgerTest.php deleted file mode 100644 index 5494dd7..0000000 --- a/sources/unit-test/include/class_acc_ledgerTest.php +++ /dev/null @@ -1,839 +0,0 @@ -addTable('jrn', dirname(__FILE__)."/jrn.csv"); - return $dataSet; - } - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp() - { - include 'global.php'; - $this->object=new Acc_Ledger($g_connection,0); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Acc_Ledger::get_last_pj - * @todo Implement testGet_last_pj(). - */ - public function testGet_last_pj() - { - - $this->object->id=1; - $array=$this->object->get_last(2); - $this->assertEquals(2,count($array)); - - } - - /** - * @covers Acc_Ledger::get_type - * @todo Implement testGet_type(). - */ - public function testGet_type() - { - $this->object->id=0; - $type=$this->object->get_type(); - $this->assertEquals('GL',$type); - - $this->object->id=1; - $type=$this->object->get_type(); - $this->assertEquals('FIN',$type); - - $this->object->id=2; - $type=$this->object->get_type(); - $this->assertEquals('VEN',$type); - - $this->object->id=3; - $type=$this->object->get_type(); - $this->assertEquals('ACH',$type); - } - - /** - * @covers Acc_Ledger::delete - * @todo Implement testDelete(). - */ - public function testDelete() - { - $this->object->delete(); - } - - /** - * @covers Acc_Ledger::display_warning - * @todo Implement testDisplay_warning(). - */ - public function testDisplay_warning() - { - $this->object->display_warning("Alert", "warning"); - } - - /** - * @covers Acc_Ledger::reverse - * @todo Implement testReverse(). - */ - public function testReverse() - { - $this->object->reverse('01.01.2014'); - } - - /** - * @covers Acc_Ledger::get_name - * @todo Implement testGet_name(). - */ - public function testGet_name() - { - $this->object->id=3; - $name=$this->object->get_name(); - $this->assertEquals('Achat',$name); - } - - /** - * @covers Acc_Ledger::get_row - * @todo Implement testGet_row(). - */ - public function testGet_row() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_rowSimple - * @todo Implement testGet_rowSimple(). - */ - public function testGet_rowSimple() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::guess_pj - * @todo Implement testGuess_pj(). - */ - public function testGuess_pj() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::list_operation_to_reconcile - * @todo Implement testList_operation_to_reconcile(). - */ - public function testList_operation_to_reconcile() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::list_operation - * @todo Implement testList_operation(). - */ - public function testList_operation() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_detail - * @todo Implement testGet_detail(). - */ - public function testGet_detail() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_propertie - * @todo Implement testGet_propertie(). - */ - public function testGet_propertie() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::GetDefLine - * @todo Implement testGetDefLine(). - */ - public function testGetDefLine() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_solde - * @todo Implement testGet_solde(). - */ - public function testGet_solde() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::select_ledger - * @todo Implement testSelect_ledger(). - */ - public function testSelect_ledger() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_fiche_def - * @todo Implement testGet_fiche_def(). - */ - public function testGet_fiche_def() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_class_def - * @todo Implement testGet_class_def(). - */ - public function testGet_class_def() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::confirm - * @todo Implement testConfirm(). - */ - public function testConfirm() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_min_row - * @todo Implement testGet_min_row(). - */ - public function testGet_min_row() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::input - * @todo Implement testInput(). - */ - public function testInput() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::is_closed - * @todo Implement testIs_closed(). - */ - public function testIs_closed() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::verify - * @todo Implement testVerify(). - */ - public function testVerify() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::compute_internal_code - * @todo Implement testCompute_internal_code(). - */ - public function testCompute_internal_code() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::save - * @todo Implement testSave(). - */ - public function testSave() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_request - * @todo Implement testGet_request(). - */ - public function testGet_request() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::next_number - * @todo Implement testNext_number(). - */ - public function testNext_number() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_first - * @todo Implement testGet_first(). - */ - public function testGet_first() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::update_paid - * @todo Implement testUpdate_paid(). - */ - public function testUpdate_paid() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::update_internal_code - * @todo Implement testUpdate_internal_code(). - */ - public function testUpdate_internal_code() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_default_card - * @todo Implement testGet_default_card(). - */ - public function testGet_default_card() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_all_fiche_def - * @todo Implement testGet_all_fiche_def(). - */ - public function testGet_all_fiche_def() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_saldo_exercice - * @todo Implement testGet_saldo_exercice(). - */ - public function testGet_saldo_exercice() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::check_strict - * @todo Implement testCheck_strict(). - */ - public function testCheck_strict() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::check_periode - * @todo Implement testCheck_periode(). - */ - public function testCheck_periode() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_last_date - * @todo Implement testGet_last_date(). - */ - public function testGet_last_date() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_id - * @todo Implement testGet_id(). - */ - public function testGet_id() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::create_document - * @todo Implement testCreate_document(). - */ - public function testCreate_document() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::check_payment - * @todo Implement testCheck_payment(). - */ - public function testCheck_payment() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::inc_seq_pj - * @todo Implement testInc_seq_pj(). - */ - public function testInc_seq_pj() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::search_form - * @todo Implement testSearch_form(). - */ - public function testSearch_form() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::build_search_sql - * @todo Implement testBuild_search_sql(). - */ - public function testBuild_search_sql() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::display_search_form - * @todo Implement testDisplay_search_form(). - */ - public function testDisplay_search_form() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_last - * @todo Implement testGet_last(). - */ - public function testGet_last() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::search_group - * @todo Implement testSearch_group(). - */ - public function testSearch_group() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_operation - * @todo Implement testGet_operation(). - */ - public function testGet_operation() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::existing_vat - * @todo Implement testExisting_vat(). - */ - public function testExisting_vat() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_other_amount - * @todo Implement testGet_other_amount(). - */ - public function testGet_other_amount() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::vat_operation - * @todo Implement testVat_operation(). - */ - public function testVat_operation() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::previous_amount - * @todo Implement testPrevious_amount(). - */ - public function testPrevious_amount() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::test_me - * @todo Implement testTest_me(). - */ - public function testTest_me() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::array_cat - * @todo Implement testArray_cat(). - */ - public function testArray_cat() - { - $array=Acc_Ledger::array_cat(); - $this->assertEquals(4,count($array)); - } - - /** - * @covers Acc_Ledger::get_tiers - * @todo Implement testGet_tiers(). - */ - public function testGet_tiers() - { - $this->object->get_tiers($p_jrn_type, $jr_id); - } - - /** - * @covers Acc_Ledger::listing - * @todo Implement testListing(). - */ - public function testListing() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::display_ledger - * @todo Implement testDisplay_ledger(). - */ - public function testDisplay_ledger() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::verify_ledger - * @todo Implement testVerify_ledger(). - */ - public function testVerify_ledger() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::update - * @todo Implement testUpdate(). - */ - public function testUpdate() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::input_paid - * @todo Implement testInput_paid(). - */ - public function testInput_paid() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::input_new - * @todo Implement testInput_new(). - */ - public function testInput_new() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::save_new - * @todo Implement testSave_new(). - */ - public function testSave_new() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::delete_ledger - * @todo Implement testDelete_ledger(). - */ - public function testDelete_ledger() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_operation_date - * @todo Implement testGet_operation_date(). - */ - public function testGet_operation_date() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_supplier_now - * @todo Implement testGet_supplier_now(). - */ - public function testGet_supplier_now() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_supplier_late - * @todo Implement testGet_supplier_late(). - */ - public function testGet_supplier_late() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_customer_now - * @todo Implement testGet_customer_now(). - */ - public function testGet_customer_now() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::get_customer_late - * @todo Implement testGet_customer_late(). - */ - public function testGet_customer_late() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger::convert_from_follow - * @todo Implement testConvert_from_follow(). - */ - public function testConvert_from_follow() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_acc_ledger_finTest.php b/sources/unit-test/include/class_acc_ledger_finTest.php deleted file mode 100644 index c4ebba7..0000000 --- a/sources/unit-test/include/class_acc_ledger_finTest.php +++ /dev/null @@ -1,138 +0,0 @@ -object=new Acc_Ledger_Fin($g_connection,1); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Acc_Ledger_Fin::verify - * @todo Implement testVerify(). - * @expectedException Exception - */ - public function testVerify() - { - - $this->object->verify(null); - } - - /** - * @covers Acc_Ledger_Fin::input - * @todo Implement testInput(). - */ - public function testInput() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger_Fin::confirm - * @todo Implement testConfirm(). - */ - public function testConfirm() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger_Fin::insert - * @todo Implement testInsert(). - */ - public function testInsert() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger_Fin::show_ledger - * @todo Implement testShow_ledger(). - */ - public function testShow_ledger() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger_Fin::get_bank_name - * @todo Implement testGet_bank_name(). - */ - public function testGet_bank_name() - { - $name=$this->object->get_bank_name(); - var_export($name); - if (strpos ($name,NOTFOUND) !=0 ) - $this->assertTrue(FALSE); - } - - /** - * @covers Acc_Ledger_Fin::get_bank - * @todo Implement testGet_bank(). - */ - public function testGet_bank() - { - $this->assertEquals(27,$this->object->get_bank()); - } - - /** - * @covers Acc_Ledger_Fin::numb_operation - * @todo Implement testNumb_operation(). - */ - public function testNumb_operation() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger_Fin::insert_quant_fin - * @todo Implement testInsert_quant_fin(). - */ - public function testInsert_quant_fin() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_acc_ledger_purchaseTest.php b/sources/unit-test/include/class_acc_ledger_purchaseTest.php deleted file mode 100644 index e5d23b4..0000000 --- a/sources/unit-test/include/class_acc_ledger_purchaseTest.php +++ /dev/null @@ -1,127 +0,0 @@ -object=new Acc_Ledger_Purchase($g_connection,3); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Acc_Ledger_Purchase::verify - * @todo Implement testVerify(). - * @expectedException Exception - */ - public function testVerify() - { - $this->object->verify(array()); - } - - /** - * @covers Acc_Ledger_Purchase::insert - * @todo Implement testInsert(). - */ - public function testInsert() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger_Purchase::input - * @todo Implement testInput(). - */ - public function testInput() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger_Purchase::confirm - * @todo Implement testConfirm(). - */ - public function testConfirm() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger_Purchase::extra_info - * @todo Implement testExtra_info(). - */ - public function testExtra_info() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger_Purchase::show_unpaid - * @todo Implement testShow_unpaid(). - */ - public function testShow_unpaid() - { - // OBSOLETE : function must be removed in the next code cleaning - // $str_html=$this->object->show_unpaid(); - - } - - /** - * @covers Acc_Ledger_Purchase::get_detail_purchase - * @todo Implement testGet_detail_purchase(). - */ - public function testGet_detail_purchase() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger_Purchase::heading_detail_purchase - * @todo Implement testHeading_detail_purchase(). - */ - public function testHeading_detail_purchase() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_acc_ledger_soldTest.php b/sources/unit-test/include/class_acc_ledger_soldTest.php deleted file mode 100644 index 40ded15..0000000 --- a/sources/unit-test/include/class_acc_ledger_soldTest.php +++ /dev/null @@ -1,128 +0,0 @@ -object=new Acc_Ledger_Sold($g_connection, 2); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Acc_Ledger_Sold::verify - * @todo Implement testVerify(). - * @expectedException Exception - */ - public function testVerify() - { - $this->object->verify(array()); - } - - /** - * @covers Acc_Ledger_Sold::insert - * @todo Implement testInsert(). - * @expectedException Exception - */ - public function testInsert() - { - $this->object->insert(array()); - } - - /** - * @covers Acc_Ledger_Sold::confirm - * @todo Implement testConfirm(). - * @expectedException Exception - */ - public function testConfirm() - { - $_POST['p_jrn']=$this->object->id; - $this->object->confirm(array()); - } - - /** - * @covers Acc_Ledger_Sold::extra_info - * @todo Implement testExtra_info(). - */ - public function testExtra_info() - { - $info=$this->object->extra_info(); - if (!is_string($info)) - { - $this->assertTrue(FALSE); - } - } - - /** - * @covers Acc_Ledger_Sold::show_unpaid - * @todo Implement testShow_unpaid(). - */ - public function testShow_unpaid() - { - // OBSOLETE : must be removed - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger_Sold::input - * @todo Implement testInput(). - */ - public function testInput() - { - $_REQUEST['ac']='VEN'; - $info=$this->object->input(); - if (!is_string($info)) - { - $this->assertTrue(FALSE); - } - } - - /** - * @covers Acc_Ledger_Sold::get_detail_sale - * @todo Implement testGet_detail_sale(). - */ - public function testGet_detail_sale() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Acc_Ledger_Sold::heading_detail_sale - * @todo Implement testHeading_detail_sale(). - */ - public function testHeading_detail_sale() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_acc_parm_codeTest.php b/sources/unit-test/include/class_acc_parm_codeTest.php deleted file mode 100644 index b4f0f42..0000000 --- a/sources/unit-test/include/class_acc_parm_codeTest.php +++ /dev/null @@ -1,108 +0,0 @@ -object=new Acc_Parm_Code($g_connection); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Acc_Parm_Code::load_all - * @todo Implement testLoad_all(). - */ - public function testLoad_all() - { - - $a_result=$this->object->load_all(); - for ($i=0;$ip_code; - if (! in_array($code, array('BANQUE','CAISSE','COMPTE_COURANT','COMPTE_TVA', - 'CUSTOMER','DEP_PRIV','DNA','SUPPLIER','TVA_DED_IMPOT','TVA_DNA','VENTE','VIREMENT_INTERNE'))) - $this->assertNull('code inconnu'.$code); - } - - - } - - /** - * @covers Acc_Parm_Code::save - * @todo Implement testSave(). - */ - public function testSave() - { - global $g_connection; - - $this->object->save(); - $a=new Acc_Parm_Code($g_connection,'CAISSE'); - $save=clone ($a); - $a->p_code='CAISSE'; - $a->p_comment='TEST'; - $a->p_value='5'; - $a->save(); - $test=new Acc_Parm_Code($g_connection,'CAISSE'); - $this->assertEquals($test->p_code,$a->p_code); - $this->assertEquals($test->p_comment,$a->p_comment); - $this->assertEquals($test->p_value,$a->p_value); - $save->save(); - } - - /** - * @covers Acc_Parm_Code::display - * @todo Implement testDisplay(). - */ - public function testDisplay() - { - $this->object->display(); - $this->assertTrue(TRUE); - } - - /** - * @covers Acc_Parm_Code::form - * @todo Implement testForm(). - */ - public function testForm() - { - $this->object->form(); - $this->assertTrue(TRUE); - } - - /** - * @covers Acc_Parm_Code::load - * @todo Implement testLoad(). - */ - public function testLoad() - { - $this->object->load(); - $this->object->p_code='CAISSE'; - $this->object->load(); - $this->assertTrue(TRUE); - } - -} diff --git a/sources/unit-test/include/class_anc_accountTest.php b/sources/unit-test/include/class_anc_accountTest.php deleted file mode 100644 index b818ed7..0000000 --- a/sources/unit-test/include/class_anc_accountTest.php +++ /dev/null @@ -1,176 +0,0 @@ -object=new Anc_Account; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Anc_Account::get_by_id - * @todo Implement testGet_by_id(). - */ - public function testGet_by_id() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Account::get_by_name - * @todo Implement testGet_by_name(). - */ - public function testGet_by_name() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Account::add - * @todo Implement testAdd(). - */ - public function testAdd() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Account::make_array_name - * @todo Implement testMake_array_name(). - */ - public function testMake_array_name() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Account::update - * @todo Implement testUpdate(). - */ - public function testUpdate() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Account::delete - * @todo Implement testDelete(). - */ - public function testDelete() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Account::get_list - * @todo Implement testGet_list(). - */ - public function testGet_list() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Account::display_list - * @todo Implement testDisplay_list(). - */ - public function testDisplay_list() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Account::debug - * @todo Implement testDebug(). - */ - public function testDebug() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Account::form - * @todo Implement testForm(). - */ - public function testForm() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Account::get_from_array - * @todo Implement testGet_from_array(). - */ - public function testGet_from_array() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Account::test_me - * @todo Implement testTest_me(). - */ - public function testTest_me() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_anc_grandlivreTest.php b/sources/unit-test/include/class_anc_grandlivreTest.php deleted file mode 100644 index 0d8c399..0000000 --- a/sources/unit-test/include/class_anc_grandlivreTest.php +++ /dev/null @@ -1,116 +0,0 @@ -object=new Anc_GrandLivre; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Anc_GrandLivre::set_sql_filter - * @todo Implement testSet_sql_filter(). - */ - public function testSet_sql_filter() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_GrandLivre::load - * @todo Implement testLoad(). - */ - public function testLoad() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_GrandLivre::load_csv - * @todo Implement testLoad_csv(). - */ - public function testLoad_csv() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_GrandLivre::button_export_pdf - * @todo Implement testButton_export_pdf(). - */ - public function testButton_export_pdf() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_GrandLivre::display_html - * @todo Implement testDisplay_html(). - */ - public function testDisplay_html() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_GrandLivre::show_button - * @todo Implement testShow_button(). - */ - public function testShow_button() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_GrandLivre::display_csv - * @todo Implement testDisplay_csv(). - */ - public function testDisplay_csv() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_anc_keyTest.php b/sources/unit-test/include/class_anc_keyTest.php deleted file mode 100644 index ce18542..0000000 --- a/sources/unit-test/include/class_anc_keyTest.php +++ /dev/null @@ -1,140 +0,0 @@ -object=new Anc_Key; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Anc_Key::key_avaiable - * @todo Implement testKey_avaiable(). - */ - public function testKey_avaiable() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Key::display_choice - * @todo Implement testDisplay_choice(). - */ - public function testDisplay_choice() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Key::display_list - * @todo Implement testDisplay_list(). - */ - public function testDisplay_list() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Key::input - * @todo Implement testInput(). - */ - public function testInput() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Key::verify - * @todo Implement testVerify(). - */ - public function testVerify() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Key::save - * @todo Implement testSave(). - */ - public function testSave() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Key::fill_table - * @todo Implement testFill_table(). - */ - public function testFill_table() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Key::key_add - * @todo Implement testKey_add(). - */ - public function testKey_add() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Key::delete - * @todo Implement testDelete(). - */ - public function testDelete() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_anc_key_sqlTest.php b/sources/unit-test/include/class_anc_key_sqlTest.php deleted file mode 100644 index da109d1..0000000 --- a/sources/unit-test/include/class_anc_key_sqlTest.php +++ /dev/null @@ -1,43 +0,0 @@ -object=new Anc_Key_Detail_SQL($g_connection); - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @backupGlobals enabled - * - */ - function test_me() - { - $this->assertTrue(true); - } - -} diff --git a/sources/unit-test/include/class_anc_operationTest.php b/sources/unit-test/include/class_anc_operationTest.php deleted file mode 100644 index 7a56dea..0000000 --- a/sources/unit-test/include/class_anc_operationTest.php +++ /dev/null @@ -1,224 +0,0 @@ -object=new Anc_Operation; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Anc_Operation::add - * @todo Implement testAdd(). - */ - public function testAdd() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::delete - * @todo Implement testDelete(). - */ - public function testDelete() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::get_list - * @todo Implement testGet_list(). - */ - public function testGet_list() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::html_table - * @todo Implement testHtml_table(). - */ - public function testHtml_table() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::get_by_jid - * @todo Implement testGet_by_jid(). - */ - public function testGet_by_jid() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::update_from_jrnx - * @todo Implement testUpdate_from_jrnx(). - */ - public function testUpdate_from_jrnx() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::get_jrid - * @todo Implement testGet_jrid(). - */ - public function testGet_jrid() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::get_balance - * @todo Implement testGet_balance(). - */ - public function testGet_balance() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::display_form_plan - * @todo Implement testDisplay_form_plan(). - */ - public function testDisplay_form_plan() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::save_form_plan_vat_nd - * @todo Implement testSave_form_plan_vat_nd(). - */ - public function testSave_form_plan_vat_nd() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::save_form_plan - * @todo Implement testSave_form_plan(). - */ - public function testSave_form_plan() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::save_update_form - * @todo Implement testSave_update_form(). - */ - public function testSave_update_form() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::to_request - * @todo Implement testTo_request(). - */ - public function testTo_request() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::delete_by_jid - * @todo Implement testDelete_by_jid(). - */ - public function testDelete_by_jid() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::display_table - * @todo Implement testDisplay_table(). - */ - public function testDisplay_table() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Anc_Operation::test_me - * @todo Implement testTest_me(). - */ - public function testTest_me() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_databaseTest.php b/sources/unit-test/include/class_databaseTest.php deleted file mode 100644 index f876962..0000000 --- a/sources/unit-test/include/class_databaseTest.php +++ /dev/null @@ -1,584 +0,0 @@ -object=new Database; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Database::verify - * @todo Implement testVerify(). - */ - public function testVerify() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::set_encoding - * @todo Implement testSet_encoding(). - */ - public function testSet_encoding() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::exec_sql - * @todo Implement testExec_sql(). - */ - public function testExec_sql() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::count_sql - * @todo Implement testCount_sql(). - */ - public function testCount_sql() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::get_current_seq - * @todo Implement testGet_current_seq(). - */ - public function testGet_current_seq() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::get_next_seq - * @todo Implement testGet_next_seq(). - */ - public function testGet_next_seq() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::start - * @todo Implement testStart(). - */ - public function testStart() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::commit - * @todo Implement testCommit(). - */ - public function testCommit() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::rollback - * @todo Implement testRollback(). - */ - public function testRollback() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::alter_seq - * @todo Implement testAlter_seq(). - */ - public function testAlter_seq() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::execute_script - * @todo Implement testExecute_script(). - */ - public function testExecute_script() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::get_version - * @todo Implement testGet_version(). - */ - public function testGet_version() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::fetch - * @todo Implement testFetch(). - */ - public function testFetch() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::size - * @todo Implement testSize(). - */ - public function testSize() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::count - * @todo Implement testCount(). - */ - public function testCount() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::apply_patch - * @todo Implement testApply_patch(). - */ - public function testApply_patch() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::get_value - * @todo Implement testGet_value(). - */ - public function testGet_value() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::get_array - * @todo Implement testGet_array(). - */ - public function testGet_array() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::create_sequence - * @todo Implement testCreate_sequence(). - */ - public function testCreate_sequence() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::exist_sequence - * @todo Implement testExist_sequence(). - */ - public function testExist_sequence() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::exist_table - * @todo Implement testExist_table(). - */ - public function testExist_table() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::exist_column - * @todo Implement testExist_column(). - */ - public function testExist_column() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::format_name - * @todo Implement testFormat_name(). - */ - public function testFormat_name() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::exist_database - * @todo Implement testExist_database(). - */ - public function testExist_database() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::exist_blob - * @todo Implement testExist_blob(). - */ - public function testExist_blob() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::exist_view - * @todo Implement testExist_view(). - */ - public function testExist_view() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::exist_schema - * @todo Implement testExist_schema(). - */ - public function testExist_schema() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::make_list - * @todo Implement testMake_list(). - */ - public function testMake_list() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::make_array - * @todo Implement testMake_array(). - */ - public function testMake_array() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::save_upload_document - * @todo Implement testSave_upload_document(). - */ - public function testSave_upload_document() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::num_row - * @todo Implement testNum_row(). - */ - public function testNum_row() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::fetch_array - * @todo Implement testFetch_array(). - */ - public function testFetch_array() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::fetch_all - * @todo Implement testFetch_all(). - */ - public function testFetch_all() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::fetch_result - * @todo Implement testFetch_result(). - */ - public function testFetch_result() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::fetch_row - * @todo Implement testFetch_row(). - */ - public function testFetch_row() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::lo_unlink - * @todo Implement testLo_unlink(). - */ - public function testLo_unlink() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::prepare - * @todo Implement testPrepare(). - */ - public function testPrepare() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::execute - * @todo Implement testExecute(). - */ - public function testExecute() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::lo_export - * @todo Implement testLo_export(). - */ - public function testLo_export() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::lo_import - * @todo Implement testLo_import(). - */ - public function testLo_import() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::escape_string - * @todo Implement testEscape_string(). - */ - public function testEscape_string() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::close - * @todo Implement testClose(). - */ - public function testClose() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::__toString - * @todo Implement test__toString(). - */ - public function test__toString() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::test_me - * @todo Implement testTest_me(). - */ - public function testTest_me() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::status - * @todo Implement testStatus(). - */ - public function testStatus() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Database::query_to_csv - * @todo Implement testQuery_to_csv(). - */ - public function testQuery_to_csv() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_default_menu_sqlTest.php b/sources/unit-test/include/class_default_menu_sqlTest.php deleted file mode 100644 index 7f68720..0000000 --- a/sources/unit-test/include/class_default_menu_sqlTest.php +++ /dev/null @@ -1,32 +0,0 @@ -object=new Default_Menu_SQL; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - -} diff --git a/sources/unit-test/include/class_document_exportTest.php b/sources/unit-test/include/class_document_exportTest.php deleted file mode 100644 index 6381fdf..0000000 --- a/sources/unit-test/include/class_document_exportTest.php +++ /dev/null @@ -1,104 +0,0 @@ -object=new Document_Export; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Document_Export::concatenate_pdf - * @todo Implement testConcatenate_pdf(). - */ - public function testConcatenate_pdf() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Document_Export::move_file - * @todo Implement testMove_file(). - */ - public function testMove_file() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Document_Export::send_pdf - * @todo Implement testSend_pdf(). - */ - public function testSend_pdf() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Document_Export::clean_folder - * @todo Implement testClean_folder(). - */ - public function testClean_folder() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Document_Export::export_all - * @todo Implement testExport_all(). - */ - public function testExport_all() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Document_Export::check_file - * @todo Implement testCheck_file(). - */ - public function testCheck_file() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_ficheTest.php b/sources/unit-test/include/class_ficheTest.php deleted file mode 100644 index 31a638a..0000000 --- a/sources/unit-test/include/class_ficheTest.php +++ /dev/null @@ -1,549 +0,0 @@ -object=new Fiche($g_connection); - $result=$this->object->get_bk_account(); - $this->assertEquals(gettype($result),'array'); - $count = count($result); - $this->assertGreaterThan(0,$count); - - } - - /** - * @covers Fiche::get_by_qcode - * @todo Implement testGet_by_qcode(). - */ - public function testGet_by_qcode() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::setAttribut - * @todo Implement testSetAttribut(). - */ - public function testSetAttribut() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::getAttribut - * @todo Implement testGetAttribut(). - */ - public function testGetAttribut() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::seek - * @todo Implement testSeek(). - */ - public function testSeek() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::size - * @todo Implement testSize(). - */ - public function testSize() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::count_by_modele - * @todo Implement testCount_by_modele(). - */ - public function testCount_by_modele() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::GetByDef - * @todo Implement testGetByDef(). - */ - public function testGetByDef() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::ShowTable - * @todo Implement testShowTable(). - */ - public function testShowTable() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::strAttribut - * @todo Implement testStrAttribut(). - */ - public function testStrAttribut() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::to_array - * @todo Implement testTo_array(). - */ - public function testTo_array() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::blank - * @todo Implement testBlank(). - */ - public function testBlank() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::Display - * @todo Implement testDisplay(). - */ - public function testDisplay() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::Save - * @todo Implement testSave(). - */ - public function testSave() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::insert - * @todo Implement testInsert(). - */ - public function testInsert() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::update - * @todo Implement testUpdate(). - */ - public function testUpdate() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::remove - * @todo Implement testRemove(). - */ - public function testRemove() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::getName - * @todo Implement testGetName(). - */ - public function testGetName() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::get_quick_code - * @todo Implement testGet_quick_code(). - */ - public function testGet_quick_code() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::Get - * @todo Implement testGet(). - */ - public function testGet() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::get_by_category - * @todo Implement testGet_by_category(). - */ - public function testGet_by_category() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::get_fiche_def_ref_id - * @todo Implement testGet_fiche_def_ref_id(). - */ - public function testGet_fiche_def_ref_id() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::get_row_date - * @todo Implement testGet_row_date(). - */ - public function testGet_row_date() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::get_row - * @todo Implement testGet_row(). - */ - public function testGet_row() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::HtmlTableDetail - * @todo Implement testHtmlTableDetail(). - */ - public function testHtmlTableDetail() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::HtmlTable - * @todo Implement testHtmlTable(). - */ - public function testHtmlTable() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::HtmlTableHeader - * @todo Implement testHtmlTableHeader(). - */ - public function testHtmlTableHeader() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::get_solde_detail - * @todo Implement testGet_solde_detail(). - */ - public function testGet_solde_detail() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::get_bk_balance - * @todo Implement testGet_bk_balance(). - */ - public function testGet_bk_balance() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::empty_attribute - * @todo Implement testEmpty_attribute(). - */ - public function testEmpty_attribute() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::Summary - * @todo Implement testSummary(). - */ - public function testSummary() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::get_categorie - * @todo Implement testGet_categorie(). - */ - public function testGet_categorie() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::belong_ledger - * @todo Implement testBelong_ledger(). - */ - public function testBelong_ledger() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::get_fiche_def - * @todo Implement testGet_fiche_def(). - */ - public function testGet_fiche_def() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::is_used - * @todo Implement testIs_used(). - */ - public function testIs_used() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::delete - * @todo Implement testDelete(). - */ - public function testDelete() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::build_sql - * @todo Implement testBuild_sql(). - */ - public function testBuild_sql() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::move_to - * @todo Implement testMove_to(). - */ - public function testMove_to() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::get_amount_side - * @todo Implement testGet_amount_side(). - */ - public function testGet_amount_side() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::test_me - * @todo Implement testTest_me(). - */ - public function testTest_me() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::get_gestion_title - * @todo Implement testGet_gestion_title(). - */ - public function testGet_gestion_title() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Fiche::get_all_account - * @todo Implement testGet_all_account(). - */ - public function testGet_all_account() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_follow_upTest.php b/sources/unit-test/include/class_follow_upTest.php deleted file mode 100644 index 02df8c3..0000000 --- a/sources/unit-test/include/class_follow_upTest.php +++ /dev/null @@ -1,428 +0,0 @@ -object=new Follow_Up; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Follow_Up::sql_security_filter - * @todo Implement testSql_security_filter(). - */ - public function testSql_security_filter() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::Display - * @todo Implement testDisplay(). - */ - public function testDisplay() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::get - * @todo Implement testGet(). - */ - public function testGet() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::save - * @todo Implement testSave(). - */ - public function testSave() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::myList - * @todo Implement testMyList(). - */ - public function testMyList() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::Update - * @todo Implement testUpdate(). - */ - public function testUpdate() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::generate_document - * @todo Implement testGenerate_document(). - */ - public function testGenerate_document() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::fromArray - * @todo Implement testFromArray(). - */ - public function testFromArray() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::remove - * @todo Implement testRemove(). - */ - public function testRemove() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::get_last - * @todo Implement testGet_last(). - */ - public function testGet_last() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::get_today - * @todo Implement testGet_today(). - */ - public function testGet_today() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::get_late - * @todo Implement testGet_late(). - */ - public function testGet_late() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::insert_operation - * @todo Implement testInsert_operation(). - */ - public function testInsert_operation() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::remove_operation_deprecated - * @todo Implement testRemove_operation_deprecated(). - */ - public function testRemove_operation_deprecated() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::display_search - * @todo Implement testDisplay_search(). - */ - public function testDisplay_search() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::show_action_list - * @todo Implement testShow_action_list(). - */ - public function testShow_action_list() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::filter_by_tag - * @todo Implement testFilter_by_tag(). - */ - public function testFilter_by_tag() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::create_query - * @todo Implement testCreate_query(). - */ - public function testCreate_query() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::short_list - * @todo Implement testShort_list(). - */ - public function testShort_list() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::insert_action - * @todo Implement testInsert_action(). - */ - public function testInsert_action() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::export_csv - * @todo Implement testExport_csv(). - */ - public function testExport_csv() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::get_all_operation - * @todo Implement testGet_all_operation(). - */ - public function testGet_all_operation() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::tag_get - * @todo Implement testTag_get(). - */ - public function testTag_get() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::tag_add - * @todo Implement testTag_add(). - */ - public function testTag_add() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::tag_remove - * @todo Implement testTag_remove(). - */ - public function testTag_remove() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::tag_cell - * @todo Implement testTag_cell(). - */ - public function testTag_cell() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::action_tag_remove - * @todo Implement testAction_tag_remove(). - */ - public function testAction_tag_remove() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::action_tag_add - * @todo Implement testAction_tag_add(). - */ - public function testAction_tag_add() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::action_tag_clear - * @todo Implement testAction_tag_clear(). - */ - public function testAction_tag_clear() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::action_print - * @todo Implement testAction_print(). - */ - public function testAction_print() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::tag_clear - * @todo Implement testTag_clear(). - */ - public function testTag_clear() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::action_set_state - * @todo Implement testAction_set_state(). - */ - public function testAction_set_state() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up::action_remove - * @todo Implement testAction_remove(). - */ - public function testAction_remove() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_follow_up_detailTest.php b/sources/unit-test/include/class_follow_up_detailTest.php deleted file mode 100644 index 742a054..0000000 --- a/sources/unit-test/include/class_follow_up_detailTest.php +++ /dev/null @@ -1,176 +0,0 @@ -object=new Follow_Up_Detail; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Follow_Up_Detail::get_parameter - * @todo Implement testGet_parameter(). - */ - public function testGet_parameter() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up_Detail::set_parameter - * @todo Implement testSet_parameter(). - */ - public function testSet_parameter() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up_Detail::get_info - * @todo Implement testGet_info(). - */ - public function testGet_info() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up_Detail::verify - * @todo Implement testVerify(). - */ - public function testVerify() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up_Detail::save - * @todo Implement testSave(). - */ - public function testSave() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up_Detail::insert - * @todo Implement testInsert(). - */ - public function testInsert() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up_Detail::update - * @todo Implement testUpdate(). - */ - public function testUpdate() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up_Detail::load_all - * @todo Implement testLoad_all(). - */ - public function testLoad_all() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up_Detail::load - * @todo Implement testLoad(). - */ - public function testLoad() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up_Detail::delete - * @todo Implement testDelete(). - */ - public function testDelete() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up_Detail::from_array - * @todo Implement testFrom_array(). - */ - public function testFrom_array() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Follow_Up_Detail::test_me - * @todo Implement testTest_me(). - */ - public function testTest_me() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_html_inputTest.php b/sources/unit-test/include/class_html_inputTest.php deleted file mode 100644 index 6cf6a86..0000000 --- a/sources/unit-test/include/class_html_inputTest.php +++ /dev/null @@ -1,644 +0,0 @@ -object=new HtmlInput; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers HtmlInput::setReadOnly - * @todo Implement testSetReadOnly(). - */ - public function testSetReadOnly() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::set_attribute - * @todo Implement testSet_attribute(). - */ - public function testSet_attribute() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::get_js_attr - * @todo Implement testGet_js_attr(). - */ - public function testGet_js_attr() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::make_object - * @todo Implement testMake_object(). - */ - public function testMake_object() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::debug - * @todo Implement testDebug(). - */ - public function testDebug() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::submit - * @todo Implement testSubmit(). - */ - public function testSubmit() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::button - * @todo Implement testButton(). - */ - public function testButton() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::reset - * @todo Implement testReset(). - */ - public function testReset() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::hidden - * @todo Implement testHidden(). - */ - public function testHidden() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::extension - * @todo Implement testExtension(). - */ - public function testExtension() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::button_anchor - * @todo Implement testButton_anchor(). - */ - public function testButton_anchor() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::infobulle - * @todo Implement testInfobulle(). - */ - public function testInfobulle() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::warnbulle - * @todo Implement testWarnbulle(). - */ - public function testWarnbulle() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::detail_op - * @todo Implement testDetail_op(). - */ - public function testDetail_op() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::detail_action - * @todo Implement testDetail_action(). - */ - public function testDetail_action() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::detail_modele_document - * @todo Implement testDetail_modele_document(). - */ - public function testDetail_modele_document() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::remove_stock - * @todo Implement testRemove_stock(). - */ - public function testRemove_stock() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::history_card - * @todo Implement testHistory_card(). - */ - public function testHistory_card() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::history_card_button - * @todo Implement testHistory_card_button(). - */ - public function testHistory_card_button() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::history_account - * @todo Implement testHistory_account(). - */ - public function testHistory_account() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::select_ledger - * @todo Implement testSelect_ledger(). - */ - public function testSelect_ledger() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::select_cat - * @todo Implement testSelect_cat(). - */ - public function testSelect_cat() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::display_periode - * @todo Implement testDisplay_periode(). - */ - public function testDisplay_periode() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::button_close - * @todo Implement testButton_close(). - */ - public function testButton_close() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::anchor_close - * @todo Implement testAnchor_close(). - */ - public function testAnchor_close() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::button_action - * @todo Implement testButton_action(). - */ - public function testButton_action() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::button_image - * @todo Implement testButton_image(). - */ - public function testButton_image() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::anchor_hide - * @todo Implement testAnchor_hide(). - */ - public function testAnchor_hide() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::print_window - * @todo Implement testPrint_window(). - */ - public function testPrint_window() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::card_detail - * @todo Implement testCard_detail(). - */ - public function testCard_detail() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::array_to_hidden - * @todo Implement testArray_to_hidden(). - */ - public function testArray_to_hidden() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::get_to_hidden - * @todo Implement testGet_to_hidden(). - */ - public function testGet_to_hidden() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::post_to_hidden - * @todo Implement testPost_to_hidden(). - */ - public function testPost_to_hidden() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::request_to_hidden - * @todo Implement testRequest_to_hidden(). - */ - public function testRequest_to_hidden() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::array_to_string - * @todo Implement testArray_to_string(). - */ - public function testArray_to_string() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::get_to_string - * @todo Implement testGet_to_string(). - */ - public function testGet_to_string() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::post_to_string - * @todo Implement testPost_to_string(). - */ - public function testPost_to_string() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::request_to_string - * @todo Implement testRequest_to_string(). - */ - public function testRequest_to_string() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::generate_id - * @todo Implement testGenerate_id(). - */ - public function testGenerate_id() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::default_value - * @todo Implement testDefault_value(). - */ - public function testDefault_value() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::default_value_get - * @todo Implement testDefault_value_get(). - */ - public function testDefault_value_get() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::default_value_post - * @todo Implement testDefault_value_post(). - */ - public function testDefault_value_post() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::default_value_request - * @todo Implement testDefault_value_request(). - */ - public function testDefault_value_request() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::title_box - * @todo Implement testTitle_box(). - */ - public function testTitle_box() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::anchor - * @todo Implement testAnchor(). - */ - public function testAnchor() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::select_stock - * @todo Implement testSelect_stock(). - */ - public function testSelect_stock() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::filter_table - * @todo Implement testFilter_table(). - */ - public function testFilter_table() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::show_reconcile - * @todo Implement testShow_reconcile(). - */ - public function testShow_reconcile() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::calendar_zoom - * @todo Implement testCalendar_zoom(). - */ - public function testCalendar_zoom() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::button_choice_ledger - * @todo Implement testButton_choice_ledger(). - */ - public function testButton_choice_ledger() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers HtmlInput::show_receipt_document - * @todo Implement testShow_receipt_document(). - */ - public function testShow_receipt_document() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_icardTest.php b/sources/unit-test/include/class_icardTest.php deleted file mode 100644 index 282acfc..0000000 --- a/sources/unit-test/include/class_icardTest.php +++ /dev/null @@ -1,128 +0,0 @@ -object=new ICard; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers ICard::set_callback - * @todo Implement testSet_callback(). - */ - public function testSet_callback() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers ICard::set_function - * @todo Implement testSet_function(). - */ - public function testSet_function() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers ICard::ipopup - * @todo Implement testIpopup(). - */ - public function testIpopup() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers ICard::set_dblclick - * @todo Implement testSet_dblclick(). - */ - public function testSet_dblclick() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers ICard::input - * @todo Implement testInput(). - */ - public function testInput() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers ICard::display - * @todo Implement testDisplay(). - */ - public function testDisplay() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers ICard::search - * @todo Implement testSearch(). - */ - public function testSearch() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers ICard::test_me - * @todo Implement testTest_me(). - */ - public function testTest_me() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_menu_ref_sqlTest.php b/sources/unit-test/include/class_menu_ref_sqlTest.php deleted file mode 100644 index 0aee82a..0000000 --- a/sources/unit-test/include/class_menu_ref_sqlTest.php +++ /dev/null @@ -1,44 +0,0 @@ -object=new Menu_Ref_SQL; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Menu_Ref_SQL::test_me - * @todo Implement testTest_me(). - */ - public function testTest_me() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_profile_sqlTest.php b/sources/unit-test/include/class_profile_sqlTest.php deleted file mode 100644 index 2aa57da..0000000 --- a/sources/unit-test/include/class_profile_sqlTest.php +++ /dev/null @@ -1,32 +0,0 @@ -object=new Profile_sql; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - -} diff --git a/sources/unit-test/include/class_stockTest.php b/sources/unit-test/include/class_stockTest.php deleted file mode 100644 index 9c516b9..0000000 --- a/sources/unit-test/include/class_stockTest.php +++ /dev/null @@ -1,128 +0,0 @@ -object=new Stock; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Stock::history - * @todo Implement testHistory(). - */ - public function testHistory() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Stock::export_stock_histo_form - * @todo Implement testExport_stock_histo_form(). - */ - public function testExport_stock_histo_form() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Stock::export_stock_summary_list_form - * @todo Implement testExport_stock_summary_list_form(). - */ - public function testExport_stock_summary_list_form() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Stock::search_box_button - * @todo Implement testSearch_box_button(). - */ - public function testSearch_box_button() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Stock::search_box - * @todo Implement testSearch_box(). - */ - public function testSearch_box() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Stock::create_query_histo - * @todo Implement testCreate_query_histo(). - */ - public function testCreate_query_histo() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Stock::summary - * @todo Implement testSummary(). - */ - public function testSummary() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Stock::build_tmp_table - * @todo Implement testBuild_tmp_table(). - */ - public function testBuild_tmp_table() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_stock_goods_sqlTest.php b/sources/unit-test/include/class_stock_goods_sqlTest.php deleted file mode 100644 index 65f2c2b..0000000 --- a/sources/unit-test/include/class_stock_goods_sqlTest.php +++ /dev/null @@ -1,32 +0,0 @@ -object=new Stock_Goods_Sql; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - -} diff --git a/sources/unit-test/include/class_stock_sqlTest.php b/sources/unit-test/include/class_stock_sqlTest.php deleted file mode 100644 index df21627..0000000 --- a/sources/unit-test/include/class_stock_sqlTest.php +++ /dev/null @@ -1,28 +0,0 @@ -object = new Stock_Sql; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } -} diff --git a/sources/unit-test/include/class_tagTest.php b/sources/unit-test/include/class_tagTest.php deleted file mode 100644 index 127011c..0000000 --- a/sources/unit-test/include/class_tagTest.php +++ /dev/null @@ -1,152 +0,0 @@ -object=new Tag; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - - /** - * @covers Tag::show_list - * @todo Implement testShow_list(). - */ - public function testShow_list() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Tag::select - * @todo Implement testSelect(). - */ - public function testSelect() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Tag::form_add - * @todo Implement testForm_add(). - */ - public function testForm_add() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Tag::show_form_add - * @todo Implement testShow_form_add(). - */ - public function testShow_form_add() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Tag::save - * @todo Implement testSave(). - */ - public function testSave() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Tag::remove - * @todo Implement testRemove(). - */ - public function testRemove() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Tag::button_search - * @todo Implement testButton_search(). - */ - public function testButton_search() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Tag::select_search - * @todo Implement testSelect_search(). - */ - public function testSelect_search() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Tag::update_search_cell - * @todo Implement testUpdate_search_cell(). - */ - public function testUpdate_search_cell() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers Tag::add_clear_button - * @todo Implement testAdd_clear_button(). - */ - public function testAdd_clear_button() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - -} diff --git a/sources/unit-test/include/class_tag_sqlTest.php b/sources/unit-test/include/class_tag_sqlTest.php deleted file mode 100644 index fda9fcb..0000000 --- a/sources/unit-test/include/class_tag_sqlTest.php +++ /dev/null @@ -1,32 +0,0 @@ -object=new Tag_SQL; - } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - - } - -}