diff --git a/.gitattributes b/.gitattributes index c5785ace780..4b0ed3d14b5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -31,3 +31,22 @@ *.frm binary *.MYD binary *.MYI binary + +# Export ignores to generate clean production tarballs +/build export-ignore +/dev export-ignore +/doc export-ignore +/test export-ignore +.buildpath export-ignore +/build.xml export-ignore +.codeclimate.yml export-ignore +Dockerfile export-ignore +.dockerignore export-ignore +.editorconfig export-ignore +.gitattributes export-ignore +.gitignore export-ignore +.mailmap export-ignore +.scrutinizer.yml export-ignore +.settings export-ignore +.travis.yml export-ignore +.tx export-ignore diff --git a/.gitignore b/.gitignore index 12983e5dfd8..1efe4f4bb82 100755 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,10 @@ doxygen_warnings.log *.iml Thumbs.db # Vagrant generated files -.vagrant \ No newline at end of file +.vagrant +# Composer installed repositories +/htdocs/includes/**/.git +# Composer autoloader and unwanted files +htdocs/includes/autoload.php +htdocs/includes/bin/ +htdocs/includes/composer/ diff --git a/.travis.yml b/.travis.yml index 5bc5f49b2e5..9eb355b2ab4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,146 +1,330 @@ # This script is used by Travis CI to run automatically Continuous test integration # from Dolibarr GitHub repository. -# Command run is phpunit # For syntax, see http://about.travis-ci.org/docs/user/languages/php/ +sudo: required + +language: php + +php: +- '5.3' +- '5.4' +- '5.5' +- '5.6' +- '7.0' +- nightly + +addons: + mariadb: '10.0' + # FIXME: find a way to import a MySQL dump into PostgreSQL + #postgresql: '9.3' + apt: + packages: + # We need a webserver to test the webservices + # Let's install Apache with. + - apache2 + # mod_php is not supported by Travis. Add fcgi. We install FPM later on. + - libapache2-mod-fastcgi + +# Start on every boot +services: +- memcached + +env: + global: + # Set to true for very verbose output + - DEBUG=false + matrix: + # MariaDB overrides MySQL installation so it's not possible to test both yet + #- DB=mysql + - DB=mariadb + # FIXME: find a way to import a MySQL dump into PostgreSQL + #- DB=postgresql + # TODO + #- DB=sqlite + # See https://docs.travis-ci.com/user/languages/php/#Apache-%2B-PHP + #- WS=apache + # See https://github.com/DracoBlue/travis-ci-nginx-php-fpm-test + #- WS=nginx + +matrix: + fast_finish: true + allow_failures: + - php: '7.0' + - php: nightly + # FIXME + #- env: DB=postgresql + # TODO + #- env: DB=sqlite + notifications: email: on_success: never # [always|never|change] default: change on_failure: change # [always|never|change] default: always - -addons: - postgresql: "9.3" + irc: + channels: + - "chat.freenode.net#dolibarr" + on_success: change + on_failure: always + use_notice: true -services: - - memcached # will start memcached +before_install: +- | + echo "Disabling Xdebug for composer" + export PHP_VERSION_NAME=$(phpenv version-name) + cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/conf.d/xdebug.ini /tmp/xdebug.ini + phpenv config-rm xdebug.ini + echo -# This will tell travis to run phpunit -language: php -php: -# - "5.2" is not supported because pyrus to install PHP_Codesniffer is not available - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - -matrix: - allow_failures: - - php: 7.0 +install: +- | + echo "Updating Composer" + composer self-update + echo -env: - - DB=mysql -# - DB=postgres +- | + echo "Installing Parallel Lint" + composer -n require jakub-onderka/php-parallel-lint ^0 + composer -n require jakub-onderka/php-console-highlighter ^0 + echo -before_script: - - echo Start travis - - echo Current dir is `pwd` - - echo Home dir is `echo ~` - - export PHPV=`phpenv version-name` - - echo PHP version $PHPV -# - echo Update composer -# - ~/.phpenv/versions/$(phpenv version-name)/bin/composer.phar self-update - - echo PHPUnit version - - which phpunit - - phpunit --version - - echo Install phpcs then show installed rules - - pyrus install pear/PHP_CodeSniffer - - phpenv rehash - - which phpcs - - phpcs --version - - phpcs -i - - echo Create dir $(pwd)/htdocs/documents - - sudo mkdir -p $(pwd)/htdocs/documents/admin/temp; - - sudo touch $(pwd)/htdocs/documents/dolibarr.log; - - sudo chmod a+rwx /home; sudo chmod a+rwx /home/travis; sudo chmod -R a+rwx /home/travis/build; - - sudo chmod -R a+rwx $(pwd); - - sudo chown -R www-data:travis $(pwd)/htdocs/documents; - - find $(pwd)/htdocs/documents -type d -exec ls -alt {} \; - - echo Edit php.ini file - - echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini -# - echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - sh -c "if [ '$PHPV' = '5.3' ]; then echo 'extension = apc.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - - sh -c "if [ '$PHPV' = '5.4' ]; then echo 'extension = apc.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - - sh -c "if [ '$PHPV' = '5.3' ]; then echo 'zend_extension_ts = xdebug.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - - sh -c "if [ '$PHPV' = '5.4' ]; then echo 'zend_extension_ts = xdebug.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi" - - cat ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo Mysql version - # INSTALL MYSQL 5.6 - # (https://github.com/piwik/piwik/commit/20bd2e1c24e5d673dce3feb256204ad48c29f160) - # TODO: Remove when mysql 5.6 is provided by travis. - # Otherwise, our migrations will raise a syntax error. - - "sudo apt-get remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5" - - "sudo apt-get autoremove" - - "sudo apt-get install libaio1" - - "wget -O mysql-5.6.14.deb http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.14-debian6.0-x86_64.deb/from/http://cdn.mysql.com/" - - "sudo dpkg -i mysql-5.6.14.deb" - - "sudo cp /opt/mysql/server-5.6/support-files/mysql.server /etc/init.d/mysql.server" - - "sudo ln -s /opt/mysql/server-5.6/bin/* /usr/bin/" - - "sudo sed -i'' 's/table_cache/table_open_cache/' /etc/mysql/my.cnf" - - "sudo sed -i'' 's/log_slow_queries/slow_query_log/' /etc/mysql/my.cnf" - - "sudo sed -i'' 's/basedir[^=]\\+=.*$/basedir = \\/opt\\/mysql\\/server-5.6/' /etc/mysql/my.cnf" - - "sudo /etc/init.d/mysql.server start" - - mysql --version - - mysql -e "SELECT VERSION();" - # /END MYSQL 5.6- mysql --version - - echo Init database - - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS myapp_test;' -U postgres; fi" - - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE myapp_test;' -U postgres; fi" - - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'DROP DATABASE IF EXISTS myapp_test;'; fi" - - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS myapp_test;'; fi" - - sh -c "if [ '$DB' = 'mysql' ]; then mysql -D myapp_test < $(pwd)/dev/initdata/mysqldump_dolibarr_3.5.0.sql; fi" - - echo Create config file htdocs/conf/conf.php - - echo ' htdocs/conf/conf.php - - sh -c "if [ '$DB' = 'pgsql' ]; then echo '$'dolibarr_main_db_type=\'pgsql\'';' >> htdocs/conf/conf.php; fi" - - sh -c "if [ '$DB' = 'mysql' ]; then echo '$'dolibarr_main_db_type=\'mysqli\'';' >> htdocs/conf/conf.php; fi" - - echo '$'dolibarr_main_url_root=\'http://localhost/\'';' >> htdocs/conf/conf.php - - echo '$'dolibarr_main_document_root=\'$(pwd)/htdocs\'';' >> htdocs/conf/conf.php - - echo '$'dolibarr_main_data_root=\'$(pwd)/htdocs/documents\'';' >> htdocs/conf/conf.php - - echo '$'dolibarr_main_db_host=\'localhost\'';' >> htdocs/conf/conf.php - - echo '$'dolibarr_main_db_name=\'myapp_test\'';' >> htdocs/conf/conf.php - - echo '$'dolibarr_main_db_user=\'travis\'';' >> htdocs/conf/conf.php - - echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> htdocs/conf/conf.php - - echo '?>' >> htdocs/conf/conf.php - - echo Show conf.php content - - cat htdocs/conf/conf.php - - echo Install apache server - - sudo apt-get update - - sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-mysql php5-pgsql php5-intl - - sudo sed -i -e "s,/var/www,$(pwd)/htdocs,g" /etc/apache2/sites-available/default - - echo Show default virtual host - - sudo cat /etc/apache2/sites-available/default - - sudo /etc/init.d/apache2 restart - - wget http://localhost/ - - sudo cat /etc/apache2/envvars - - sudo cat /var/log/apache2/error.log - - cat index.html +- | + echo "Installing PHP Unit" + if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then + composer -n require phpunit/phpunit ^4 + fi + if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then + composer -n require phpunit/phpunit ^5 + fi + echo +- | + echo "Installing PHP CodeSniffer" + composer require squizlabs/php_codesniffer ^2 + echo +- | + echo "Adding Composer binaries to the path" + export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH" + echo -script: - - cd htdocs/install - - date -# - php upgrade.php 3.4.0 3.5.0 ignoredbversion > upgrade340350.log -# - php upgrade2.php 3.4.0 3.5.0 ignoredbversion > upgrade340350-2.log - - php upgrade.php 3.5.0 3.6.0 ignoredbversion > upgrade350360.log - - php upgrade2.php 3.5.0 3.6.0 ignoredbversion > upgrade350360-2.log - - php upgrade.php 3.6.0 3.7.0 ignoredbversion > upgrade360370.log - - php upgrade2.php 3.6.0 3.7.0 ignoredbversion > upgrade360370-2.log - - php upgrade.php 3.7.0 3.8.0 ignoredbversion > upgrade370380.log -# - cat upgrade370380.log - - php upgrade2.php 3.7.0 3.8.0 ignoredbversion > upgrade370380-2.log -# - cat upgrade370380-2.log - - cd ../.. - - date - - phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php - - date -# - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/dev/vagrant/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php 2>&1 - - phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/htdocs/conf/conf.php,/build/html/,/dev/vagrant/,/documents/,/includes/,/test/report/ . 2>&1 - - date +before_script: +- | + echo Start travis + echo Current dir is `pwd` + echo Home dir is `echo ~` + echo TRAVIS_BUILD_DIR is $TRAVIS_BUILD_DIR + +- | + echo "Re-enabling Xdebug for PHP CodeSniffer and PHP Unit" + phpenv config-add /tmp/xdebug.ini + echo + +- | + echo "Setting up PHP" + echo + echo "Set timezone" + echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini + if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then + echo + echo "Enabling APC for PHP <= 5.4" + # Documentation says it should be available for PHP <= 5.6 but it's not for 5.5 and 5.6! + echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini + echo + echo "Enabling Memcached for PHP <= 5.4" + # Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0 and nightly! + echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini + fi + phpenv rehash + echo + +- | + if [ "$DEBUG" = true ]; then + echo "Debugging informations" + # Check PHP + php -i + # Check PHP CodeSniffer installation + which phpcs + phpcs --version + phpcs -i + # Check PHPUnit installation + which phpunit + phpunit --version + # Check MySQL + mysql --version + mysql -e "SELECT VERSION();" + echo + fi + +- | + echo "Setting up database" + if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then + echo "MySQL" + mysql -e 'DROP DATABASE IF EXISTS travis;' + mysql -e 'CREATE DATABASE IF NOT EXISTS travis;' + mysql -D travis < dev/initdata/mysqldump_dolibarr_3.5.0.sql + fi + # FIXME: find a way to import a MySQL dump into PostgreSQL + #if [ "$DB" = 'postgresql' ]; then + # pgsql travis < dev/initdata/mysqldump_dolibarr_3.5.0.sql + #fi + # TODO: SQLite + echo + +- | + export CONF_FILE=htdocs/conf/conf.php + echo "Setting up Dolibarr $CONF_FILE" + echo ' $CONF_FILE + echo '$'dolibarr_main_url_root=\'http://127.0.0.1\'';' >> $CONF_FILE + echo '$'dolibarr_main_document_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $CONF_FILE + echo '$'dolibarr_main_data_root=\'$TRAVIS_BUILD_DIR/documents\'';' >> $CONF_FILE + echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE + echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE + echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE + if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then + echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE + fi + # FIXME + #if [ "$DB" = 'postgresql' ]; then + # echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE + #fi + # TODO: SQLite + echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE + cat $CONF_FILE + echo + +- | + echo "Create documents directory and set permissions" + # and admin/temp subdirectory needed for unit tests + mkdir -p documents/admin/temp + echo "first line" > documents/dolibarr.log + echo + +- | + echo "Setting up Apache + FPM" + # enable php-fpm + cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf + if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then + # Copy the included pool + cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf + fi + if [ "$DEBUG" = true ]; then + cat ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf + fi + sudo a2enmod rewrite actions fastcgi alias + echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini + if [ "$DEBUG" = true ]; then + cat ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini + fi + ~/.phpenv/versions/$PHP_VERSION_NAME/sbin/php-fpm + # configure apache virtual hosts + sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/default + sudo sed -e "s?%TRAVIS_BUILD_DIR%?$TRAVIS_BUILD_DIR?g" --in-place /etc/apache2/sites-available/default + if [ "$DEBUG" = true ]; then + sudo cat /etc/apache2/sites-available/default + fi + sudo service apache2 restart + echo + +script: +- | + echo "Checking webserver availability" + # Ensure we catch errors + set -e + wget http://127.0.0.1 + if [ "$DEBUG" = true ]; then + cat index.html + fi + set +e + echo + +- | + echo "Checking PHP syntax errors" + # Ensure we catch errors + set -e + parallel-lint --exclude htdocs/includes --blame . + set +e + echo + +# TODO: dev/* checks + +- | + echo "Checking coding style" + # Ensure we catch errors + set -e + # Exclusions are defined in the ruleset.xml file + phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/codesniffer/ruleset.xml --encoding=utf-8 . + set +e + echo + +# TODO: Check Javascript (jshint?) + +# TODO: Check CSS (csslint?) + +# TODO: check SQL syntax (pgsanity?) + +- | + echo "Upgrading Dolibarr" + # Ensure we catch errors + set -e + cd htdocs/install + php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log + php upgrade2.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360-2.log + php step5.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360-3.log + php upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log + php upgrade2.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370-2.log + php step5.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370-3.log + php upgrade.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380.log + php upgrade2.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380-2.log + php step5.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380-3.log + php upgrade.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390.log + php upgrade2.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390-2.log + php step5.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390-3.log + php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log + php upgrade2.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400-2.log + php step5.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400-3.log + cd - + set +e + echo + +- | + echo "Unit testing" + # Ensure we catch errors. Set this to +e if you want to go to this end to see log file. + set -e + phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php + set +e + +- | + #echo "Output dolibarr.log" + #echo cat documents/dolibarr.log after_script: -# - echo Output dolibarr log file; cat $(pwd)/htdocs/documents/dolibarr.log - - echo Output apache log file; sudo cat /var/log/apache2/error.log - - echo End travis +- | + # Dolibarr log file + #echo "After script" + #cat documents/dolibarr.log + + +after_success: +- | + echo Success + +after_failure: +- | + echo Failure + # This part of code seems to be never executed, error or not ??? + echo "Debugging informations" + # Upgrade log files + cat *.log + echo "Debugging informations" + # Apache log file + sudo cat /var/log/apache2/error.log + # Dolibarr log file + cat documents/dolibarr.log + if [ "$DEBUG" = true ]; then + # MariaDB log file + sudo cat /var/log/mysql/error.log + # TODO: PostgreSQL log file + echo + fi diff --git a/.tx/config b/.tx/config index 03301ded378..b2bc84b5071 100644 --- a/.tx/config +++ b/.tx/config @@ -146,6 +146,12 @@ source_file = htdocs/langs/en_US/holiday.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.hrm] +file_filter = htdocs/langs//hrm.lang +source_file = htdocs/langs/en_US/hrm.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.incoterm] file_filter = htdocs/langs//incoterm.lang source_file = htdocs/langs/en_US/incoterm.lang @@ -218,6 +224,12 @@ source_file = htdocs/langs/en_US/members.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.oauth] +file_filter = htdocs/langs//oauth.lang +source_file = htdocs/langs/en_US/oauth.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.opensurvey] file_filter = htdocs/langs//opensurvey.lang source_file = htdocs/langs/en_US/opensurvey.lang @@ -278,6 +290,12 @@ source_file = htdocs/langs/en_US/propal.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.receiptprinter] +file_filter = htdocs/langs//receiptprinter.lang +source_file = htdocs/langs/en_US/receiptprinter.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.resource] file_filter = htdocs/langs//resource.lang source_file = htdocs/langs/en_US/resource.lang @@ -314,6 +332,12 @@ source_file = htdocs/langs/en_US/suppliers.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.supplier_proposal] +file_filter = htdocs/langs//supplier_proposal.lang +source_file = htdocs/langs/en_US/supplier_proposal.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.trips] file_filter = htdocs/langs//trips.lang source_file = htdocs/langs/en_US/trips.lang @@ -332,6 +356,12 @@ source_file = htdocs/langs/en_US/withdrawals.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.websites] +file_filter = htdocs/langs//withdrawals.lang +source_file = htdocs/langs/en_US/withdrawals.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.workflow] file_filter = htdocs/langs//workflow.lang source_file = htdocs/langs/en_US/workflow.lang diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a603fd242cc..6a188d04abb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,19 +4,18 @@ How to contribute to Dolibarr Bug reports and feature requests -------------------------------- -*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum). +*Note*: Issues are not a support forum. If you need help using the software, please use [the forums](http://www.dolibarr.org/forum). -**NEW** - -Issues are now managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues). +Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues). 1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem. 2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request. -3. Report with as much detail as possible ([Use screenshots or even screencasts whenever possible](https://help.github.com/articles/issue-attachments)). +4. Tell us the version you are using! +3. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible). -We're still figuring out how to migrate old issues to GitHub. In the meantime, they are still available at [Doliforge](https://doliforge.org/projects/dolibarr). -Code + +Code --------------------- ### Basic workflow @@ -27,7 +26,7 @@ We're still figuring out how to migrate old issues to GitHub. In the meantime, t 4. Commit and push your changes. 5. [Make a pull request](https://help.github.com/articles/creating-a-pull-request). -### Branches +### Branches Unless you're fixing a bug, all pull requests should be made against the *develop* branch. @@ -39,11 +38,47 @@ We officially support versions N, N − 1 and N − 2 for N the latest version a Choose your base branch accordingly. ### General rules -Please don't edit the ChangeLog file. A project manager will update it from your commit messages. +Please don't edit the ChangeLog file. File will be generated from your commit messages during release process by the project manager. -### Commits +### Commits Use clear commit messages with the following structure: +``` +[KEYWORD] [ISSUENUM] DESC + +LONGDESC +``` + +#### Keyword +In uppercase if you want to have the log comment appears into the generated ChangeLog file. + +The keyword can be ommitted if your commit does not fit in any of the following categories: +- Fix: for a bug fix +- Close: for closing a referenced feature request +- New: for an unreferenced new feature (Opening a feature request and using close is prefered) + +#### Issuenum +If your commit fixes a referenced bug or feature request. + +In the form of a # followed by the GitHub issue number. + +#### Desc +A short description of the commit content. + +This should ideally be less than 50 characters. + +#### LongDesc +A long description of the commit content. + +You can really go to town here and explain in depth what you've been doing. + +Feel free to express technical details, use cases or anything relevant to the current commit. + +This section can span multiple lines. + +Try to keep lines under 120 characters. + +#### Samples
 FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
 or
@@ -57,8 +92,17 @@ Long description (Can span accross multiple lines).
 
### Pull Requests -When submitting a pull request, use same rule than Commits. With upper case keyword to appear into ChangeLog. +When submitting a pull request, use same rule as [Commits](#commits) for the message. +If your pull request only contains one commit, GitHub will be smart enough to fill it for you. +Otherwise, please be a bit verbose about what you're providing. + +Your Pull Request must pass the Continuous Integration checks. +Also, some code changes need a prior approbation: + +* if you want to include a new external library (into htdocs/includes directory), please ask before to the project leader to see if such a library can be accepted. + +* if you add a new table, you must first create a page on http://wiki.dolibarr.org/index.php/Category:Table_SQL (copy an existing page changing its name to see it into this index page). Than ask the project leader if the new data model you plan to add can be accepted as you suggest. ### Resources [Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation) @@ -67,18 +111,18 @@ Translations ------------ The source language (en_US) is maintained in the repository. See the [Code](#code) section above. -All other translations are managed online at [Transifex](https://www.transifex.com/projects/p/dolibarr). +All other translations are managed online at [Transifex](https://www.transifex.com/dolibarr-association/dolibarr/). Join an existing translation team or create your own and translate into the interface. Your translations will be available in the next major release. ### Resources -[Translator documentation](http://wiki.dolibarr.org/index.php/Developer_documentation) +[Translator documentation](http://wiki.dolibarr.org/index.php/Translator_documentation) Documentation ------------- The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php). -*You need to create an account before being able to edit.* +*Note*: to help prevent spam, you need to create an account before being able to edit. diff --git a/COPYRIGHT b/COPYRIGHT index f7edb08cae8..6c2dab9444a 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -12,21 +12,24 @@ Dolibarr uses some external libraries released under different licenses. This is Component Version License GPL Compatible Usage ------------------------------------------------------------------------------------- PHP libraries: -AdoDb-Date 0.33 Modified BSD License Yes Date convertion (not into rpm package) -ChromePHP 4.3.3 Apache Software License 2.0 Yes Return server log to chrome browser console -CKEditor 4.3.3 LGPL-2.1+ Yes Editor WYSIWYG +AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package) +ChromePHP 4.1.0 Apache Software License 2.0 Yes Return server log to chrome browser console +CKEditor 4.5.6 LGPL-2.1+ Yes Editor WYSIWYG +EvalMath 1.0 BSD Yes Safe math expressions evaluation +Escpos-php MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers FPDI 1.5.2 Apache Software License 2.0 Yes PDF templates management GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package) -Mobiledetect 2.8.3 MIT License Yes Detect mobile devices browsers +Mobiledetect 2.8.17 MIT License Yes Detect mobile devices browsers NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package) PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency odtPHP 1.0.1 GPL-2+ b Yes Library to build/edit ODT files -PHPExcel 1.8.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files +PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP +PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests Restler 3.0 LGPL-3+ Yes Library to develop REST Web services -TCPDF 6.2.6 LGPL-3+ Yes PDF generation -EvalMath 1.0 BSD Yes Safe math expressions evaluation +TCPDF 6.2.12 LGPL-3+ Yes PDF generation +TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement JS libraries: jQuery 1.11.3 MIT License Yes JS library @@ -49,10 +52,10 @@ jQuery TableDnD 0.6 GPL and MIT License Yes jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker jQuery Tiptip 1.3 GPL and MIT License Yes JS library for tooltips jsGantt 1.2 BSD License Yes JS library (to build Gantt reports) -JsTimezoneDetect 1.0.4 MIT Licence Yes JS library to detect user timezone +JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone For licenses compatibility informations: -http://www.fsf.org/licensing/licenses/index_html +http://www.gnu.org/licenses/licenses.en.html Copyright diff --git a/ChangeLog b/ChangeLog index b77f8a098a3..13346d43763 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,13 +2,310 @@ English Dolibarr ChangeLog -------------------------------------------------------------- -WARNING: Do not try to make any Dolibarr upgrade if you are running Mysql version 5.5.40. +WARNING: + +Do not try to make any Dolibarr upgrade if you are running Mysql version 5.5.40. Mysql version 5.5.40 has a very critical bug making your data beeing definitely lost. -You may also experience troubles with Mysql 5.5.41 with error "Lost connection" during migration. +You may also experience troubles with Mysql 5.5.41/42/43 with error "Lost connection" +during migration. Upgrading to any other version or any other database system is abolutely required BEFORE trying make a Dolibarr upgrade. +***** ChangeLog for 3.9.0 compared to 3.8.* ***** +For users: +NEW: A new and more modern look for "eldy" theme. +NEW: Introduce a new theme called "Material Design". +NEW: #3767 Allow changing multiple prices of a product at once +NEW: Add a button to purge criteria in user list +NEW: Add a filter field to restrict list of member when doing a LDAP list request. Use also this filter into ldap command line script making sync from ldap to dolibarr. +NEW: Add all assigned users and all extrafields data in new event when we createFromClone +NEW: Add hidden option to use standard position address in crabe model For electronic sending solutions +NEW: Add a refresh button on page list of direct print jobs. +NEW: Add a tab "document" in donation card +NEW: Add cancel button on thirdparty create page +NEW: Add chart of product statistics +NEW: Add color on categories +NEW: Add date value filter on account records list +NEW: Add __PROJECT_NAME__ tag for customer invoice emails +NEW: Add option PDF_ALLOW_HTML_FOR_FREE_TEXT to be able to enter pdf footer text with wysiwyg editor. +NEW: Add fields into llx_cronjobs to be able to use job table to queue one shot jobs. +NEW: Add filter on status on invoice list +NEW: Add filter on status on shipments +NEW: Add gender property managed on user card FIX: Better error messages when uploading photo of user when permission to write are not granted +NEW: Add help tooltips on fields of dictionary edit pages. +NEW: Add hidden option MAIN_MAILFORM_DISABLE_ENTERKEY to disable the key enter into the form to send email. +NEW: Add $ID$ into extrafields management to allow use of current object id on filter for select list from table and checkbox list from table +NEW: Add info page on product card +NEW: Add into about page, a sample text to use to promote new version release (visible only if version is last stable) +NEW: Add none/all selection into list of files for FTP browser module +NEW: Add opportunity amount on project card. +NEW: Add link "date of invoice" to select date of invoice when creating a payment in one click. +NEW: Add planned workload and declared progress on project summary list on project home page (data aggregated from tasks of project) +NEW: Add ref and label of project into export +NEW: Add status into filters of graph +NEW: Add tab document on salaries payment +NEW: Add thumb of users into stats box on home page +NEW: A link to the bugtracker report tool can be enabled in the GUI +NEW: Better look for POS. More responsive design. +NEW: Can add project search on left menu search area +NEW: Can assign a task to yourself to have it appear on timesheet. +NEW: Can close a project that has draft status with no need to switch it to validate status before. +NEW: Can edit Background color for Top menu and Background color for table title line. +NEW: Can edit email templates using WYSIWYG editor. +NEW: Can edit list of prospect status for customers/prospects. Add a new entry into dictionary table to manage list fo status. +NEW: Can filter on contact status in prospect list. Removed deprecated menu entry. +NEW: Can filter proposal on a tag of a product. +NEW: Can filter proposal, orders or invoices with criteria "contain at least one product with following tag" +NEW: Can choose fields to show on project list. +NEW: Can choose fields to show in product list. Extrafields are also supported. +NEW: Can choose fields to show into the contact list. Extrafields are also supported. +NEW: Can choose fields to show into list of users. Extrafields are also supported. +NEW: Can set default value of event type when creating an event (if option "manage type of event" is used). +NEW: Can upload files on leave requests. Use more standard permissions. +NEW: Can use a "|" to make a OR search on several different criterias into search text filters of tables. +NEW: Can use the * as a joker characters into search boxes of lists. +NEW: Clean code into salary module, debug and add indexes +NEW: Can filter on user list and salary payments on user with naural search. +NEW: Can clone agenda events. +NEW: Color category is visible onto the thumb of tags on thirdparty, or products cards. +NEW: Conf to use next product/service ref when we clone a product/service +NEW: Contract module can be used to follow both sold and bought contracts/recurring subscriptions. +NEW: Can change amount when creating withdraws requests. +NEW: FEATURE PROPOSAL: on proposal, order or invoice creation from scratch, reload page after customer selection so its informations can be loaded +NEW: Filter "active" by default on user list. Fix label of permission of project module. +NEW: Forms are using the "tab look", even in creation mode. +NEW: Free text for cheque deposit receipt can be HTML content. +NEW: Hidden option THEME_ELDY_USE_HOVER is stable enough to become officialy visible into setup. +NEW: If module salaries is on, you can set a hourly value for time consumed by users. When a user enter its time consumed on a project, a calculation is done to provide the cost for human services. This value appears into the "Overview" of project. +NEW: Add import profile to import sales representatives of third parties. +NEW: Increase length of bank code to 128 char #3704 +NEW: Into the overview of projects, the name of thirdparty appears into combo lists of elements to link to project. +NEW: Introduce a "code" into table of vats to describe VAT. This will allow to suggest different vat lines with same value with ability to differentiate them. +NEW: Introduce cost price on products. +NEW: Introduce hidden option MAIN_LANDING_PAGE to decide the home page visible just after login. +NEW: Introduce hidden option MAIN_REPLACE_TRANS_xx_XX to allow simple replacement of translated string on the fly. Prefer to use next method. +NEW: Introduce table llx_overwrite_trans to be able to overwrite translations by simple database edition. +NEW: Introduce use of cache for thumbs images of users to save bandwith. +NEW: Experimental level multiprice generator based on per cent variations over base price. +NEW: List of projects of a thirdparty are visible on a project tab for the thirdparty. +NEW: Merge all left menu search boxes into one. +NEW: Merge all search fields of an area page into one search box. +NEW: Next ref on clone doesn't need conf, it's used if mask exists. +NEW: Only arrow of current sorted field is visible into table views. This save a lot of space. You can click on the column title to sort. This make clickable area larger and click to sort is easier. +NEW: On page to see/edit contact of an ojbect, the status of contact is visible (for both external and internal users). +NEW: Option "encrypt password" into database is set to on by default on first install. +NEW: Print event type on third party card tab agenda list (only if AGENDA_USE_EVENT_TYPE = 1) +NEW: Provide an easier way to understand if an order can be shipped. +NEW: Quick search filter works also on invoice, proposal, order, intervention, contract and expense reports. +NEW: Replace category edition page on members with new select2 component. +NEW: Show photo of logged user into login top right block. +NEW: If no photo is available for user, we show a generic photo depending on gender. +NEW: Show photo of user into user list. +NEW: Show which fields were used for search when doing a "generic search" from the "quick search" form on left menu. +NEW: Statistic graphs on products offer a filter on product type (product / service or both) +NEW: Syslog displays configuration errors +NEW: The clicktodial module is now able to provide link "tel:" on phone numbers. So it is also possible to use clicktodial with a client solution like the "xivo" local client. +NEW: The conditional IF into ODT templates works also on not defined var so we can show data only if defined. Close #3819 +NEW: The free text in PDF footers can now be a HTML content. So the WYSIWYG editor is on by default to edit it into module setup. +NEW: The thirdparties tabs, the contacts tabs and the members tabs are now presented using a new "top banner", saving space and using a same way to show address, status and navigation arrows. +NEW: Thumbs for statistics on main page are fully clicable (not only link inside the thumb) +NEW: Translate extrafield's labels. +NEW: Use new select2 component for juridical status, country and state selection. +NEW: When creating order, proposal or invoice from thirdparty card, the project is asked during creation. A link to create project if it does not exists is also available. +NEW: Uniformize form creation of proposal to add public and private notes during creation like for order and invoice. +NEW: More robust antiXSS engine. +NEW: Compatibility with Mysql 5.7+ + +For developers: +NEW: The search box and the bookmarks are now rendered by the menu manager. +NEW: Add a new widget $form->selectArrayAjax() to use combo list with content coming from an Ajax URL. +NEW: Add doActions hook method call in contract card +NEW: Added doActions hooks to user cards +NEW: Add a new component to select categories/tags from the main edit page of product. The dedicated tab is also removed. +NEW: upgrade jQuery Component Datable (and extras) to 1.10.7 +NEW: script to build API class from existing class +NEW: Prepare database to store information per files (for example to define if an image can be used as a cover or not) +NEW: log hooks loading +NEW: Introduce property module_position so a module can decide where it appears into list of modules. +NEW: Introduce function dolGetFirstLineOfText +NEW: Introduce a method getDefaultCreateValueForField for developers to get a default value to use for a form in create mode. Implement it for public and private notes. +NEW: A module can add its entries into cron module. +NEW: Framework feature. To have a page being loaded at same scrollbar level after a click on a href link, just add the class "reposition" on this link. +NEW: Add exemple of setup for multitail to render dolibarr log files +NEW: Add restler framework. First step to build REST API into Dolibarr. +NEW: Add css class and ids on column of detail lines to allow module to easily manipulate fields. +NEW: Add hook in send mail +NEW: Add hooks on list of members to allow an external module to add more fields into list view. +NEW: Add hooks to allow an external module to complete list of events into calendar views. +NEW: Add "productpricecard" hook and uniformize code +NEW: Enhance also the prototype test_arrays to include select form before table. +NEW: Enhance prototype, project list and proposal list with new hooks to have an external module able to add more fields. +NEW: Enhance style engine. Add option to set color of links. +NEW: ODT generators can now also set meta properties of ODT file. +NEW: Add missing columns into llx_expedition to match other tables. +NEW: A new function getImageFileNameForSize was also introduced to choose image best size according to usage to save bandwith. +NEW: Support logging to a Sentry server +NEW: Prepare database to have agenda able to store more detailed emails events. + +WARNING: + +Dolibarr 3.9 is not yet fully compatible with PHP 7 even if most features seems to work. + +Mysql minimum version is now 5.0.3 + +Following changes may create regression for some external modules, but were necessary to make +Dolibarr better: +- Deprecated Product::setPriceExpression. Use Product::update instead +- Deprecated hidden option MAIN_USE_CUSTOM_TRANSLATION has been removed. Use table llx_overwrite_trans instead. +- Trigger LINECONTRACT_INSERT has been renamed into LINECONTRACT_CREATE to match common denomination. +- A lot hooks used into PDF generation were not correctly implemented. We had to fix this. The result si that +the following hook were set as hook of type "replace". This means if your module implement such hooks, it must +return 0 to execute standard code or 1 to replace standard code (value to output should be set into resPrints instead). +This is list of hooks modified: +'pdf_getlinenum', 'pdf_getlineref', 'pdf_getlineref_supplier', 'pdf_getlinevatrate', 'pdf_getlineupexcltax', +'pdf_getlineupwithtax', 'pdf_getlineqty', 'pdf_getlineqty_asked', 'pdf_getlineqty_shipped', 'pdf_getlineqty_keeptoship', +'pdf_getlineunit', 'pdf_getlineremisepercent', 'pdf_getlineprogress', 'pdf_getlinetotalexcltax', 'pdf_getlinetotalwithtax' +- Renamed Product::isservice and Product::isproduct to match PSR-2 +- Remove deprecated Product::hidden property + + + +***** ChangeLog for 3.8.3 compared to 3.8.2 ***** +FIX: #3805 +FIX: #3231 [Members] Public subscription page displays GeoIP error +FIX: #3240 +FIX: #3293 Login page form icons not shown +FIX: #3508 Useless tooltip in 3.8 boxes +FIX: #3661 Margin is not selected correctly when adding a product +FIX: #3679 Error when deleting a Localtax2 special payment +FIX: #3707 Thirdparty bank account page table has a glitch +FIX: #3726 When upload file, don't test if PRODUCT_USE_OLD_PATH_FOR_PHOTO variable is empty or not +FIX: #3734 Do not show empty links of deleted source objects in stock movement list +FIX: #3836 Unable to upload a document to an invoice under some circunstances +FIX: #3878 Storing and deleting files on emailing was done at wrong place +FIX: #3880 +FIX: #3882 +FIX: #3890 Expected transactions bank account page, shows negative numbers +FIX: #3912 +FIX: #3928 Creating a Customer order and a Customer invoice from a project, does not inherit payment conditions and method of payment of customer card +FIX: #3953 Don't round supplier price +FIX: #3953 rounding of buying price +FIX: #3980 Search field in "product by supplier" list sends empty result 3.8 and 3.7 +FIX: #3987 Undefined variable $newref in CommandeFournisseur::approve +FIX: #3988 Undefined variable $conf and $error in CommandeFournisseur::addline +FIX: #3989 Undefined variable $conf in CommandeFournisseur::getNomUrl +FIX: #3990 +FIX: #3992 CommandeFournisseur::ref is marked as deprecated and it shouldn't be +FIX: #3996 Dictionnary hooks are not working in 3.8 +FIX: #3997 Wrong permission key used for Margins > Read all +FIX: #4016 User link is not correctly formed in emailing receivers +FIX: #4018 SQL error if trying to access the mailing/card.php page without an ID defined +FIX: #4036 Direct printing module without any driver configured, shows an unformatted error message +FIX: #4043 Incorrect translation in error mesage in menu creation admin page +FIX: #4049 PHP warning when trying to access a non-existing product/service +FIX: #4055 SQL error when trying to access a non-existing expedition +FIX: #4081 Added missing translation +FIX: #4097 Public holiday calculation +FIX: #4182 SQL error when deleting an unexisting bank entry +FIX: #4242 Allow disabling dashes in documents +FIX: #4243 sql injection +FIX: #4281 +FIX: #4282 Defined shipping time were not shown in Customer order's PDF documents +FIX: #4285 SQL query shown when accessing an unexisting invoice +FIX: #4287 SQL error when accessing an unexisting proposal +FIX: #4302 Undefined variable $conf in Commande::LibStatut +FIX: Allow to search on alias name into select +FIX: Add a protection to not make release if ChangeLog was not generated. +FIX: autofocus on input search product +FIX: bad calculation for stock value +FIX: Better compatibility for users that used the not supported option MAIN_USE_JQUERY_MULTISELECT set to 1. +FIX: Bug: $this is not accessible in static context in Mailing::libStatutDest #4050 +FIX: can not have access to the new ids or propal lines on PROPAL_CLONE +FIX: Can't update line's duration +FIX: Can use formated float number on old expense report module. +FIX: change object statut on close shipping and remove erratic db commit +FIX: change order date on clone (as everywhere else) +FIX: event's data lost on user assign update +FIX: export propal and order with extrafields +FIX: export with category contact extrafields +FIX: jquery select of project generate js error on change event +FIX: label of line is set in description field if empty +FIX: loss data also if update was cancel by error of ended state with no end date, try a generic patch +FIX: mail isn't display in title on event in mode view +FIX: Missing to set context into workflow actions, so triggers can't know we are creating an invoice from order or an order from a proposal. +FIX: NB task and percent progress in box project +FIX: Not delete a product when have customer price +FIX: Not deleting contrats on element_element table +FIX: Not use localtaxes when invoice some orders +FIX: only active customer should be available into select list thirdparty on invoice creation +FIX: only active customer should be return into new invoice creation select list +FIX: AWP calculation +FIX: product link in project box +FIX: Remove column creation for table llx_product_fournisseur_price, the column use un calss is fk_supplier_price_expression, and fk_price_expression does not exist into lx_product_fournisseur_price sql file declaration +FIX: Show category selector if we have permission to view products or services +FIX: showrefnav htmlspecialchar instead of < > +FIX: The label hidden was not supported when using jmobile +FIX: Too many information were hidden. A lot of users still need bank account on PDF. +FIX: Use "WHERE true" instead of "WHERE 1" #4132 + +***** ChangeLog for 3.8.2 compared to 3.8.1 ***** +FIX: Add a protection to not make release if ChangeLog was not generated. +FIX: 1/ update_extra() function must not be in "if(!empty(MAIN_DISABLE_CONTACTS_TAB)" test. 2/ Reindented code +FIX: #3240 +FIX: #3541 Bypass authentication when user was created using LDAP +FIX: #3605 deleting a shipping +FIX: #3661 Margin is not selected correctly when adding a product +FIX: #3689 Bug on workflow module +FIX: #3724 Bug: Blank page after cloning proposal if we changed client +FIX: #3726 Better support for PRODUCT_USE_OLD_PATH_FOR_PHOTO +FIX: #3726 Not showing images on product card +FIX: #3757 Can't set amount in a social contribution with some languages +FIX: #3786 Translation of select box. +FIX: #3841 creation of a task completed has not status set to finished by default +FIX: #3878 Storing and deleting files on emailing was done at wrong place +FIX: #3880 +FIX: #3882 +FIX: action not appear before an update because of a lack of line in action ressource +FIX: add tag myuser_job into ODT replacement +FIX: Avoid changing the state to a thirdparty who shouldn't be contacted anymore +FIX: bad calculation for stock value +FIX: Bad parameters +FIX: Bad picto for expense report +FIX: bad property so after creating an event from calendar, filter were lost. +FIX: bad stock valorisation +FIX: better fix to generate a PROV ref after clone +FIX: bug invoice classified in propale next update commonobject class in 3.8 +FIX: Can export a field into task time table with export project profile +FIX: change order date on clone (as everywhere else) +FIX: clone customer order create new order with validate ref and not with PROV +FIX: Contacts are not added to the list with the status "no contact" +FIX: Default thirdparty when cloning invoice was not set. +FIX: double db escape add too quote +FIX: event's data lost on user assign update +FIX: Filter in customer price per product of a thirdparty returned error +FIX: filters on supplier invoices list are not used, search_status instead +FIX: fix HTML into formconfirm box +FIX: IF autocomplete was set on thirdparty list, it was not possible to open list of extrafields. +FIX: If no end date is set on survey, we should be able to vote. +FIX: loss data also if update was cancel by error of ended state with no end date, try a generic patch +FIX: no need to remove file into mail form, the temp dir will be deleted after any sending +FIX: pmp calculation +FIX: Preview pages was not using correct style for ref +FIX: project was not retrieved on invoice creation form +FIX: Revert option WORKFLOW_PROPAL_CAN_CLASSIFIED_BILLED_WITHOUT_INVOICES into option WORKFLOW_PROPAL_NEED_INVOICE_TO_BE_CLASSIFIED_BILLED for better compatibility with old versions +FIX: Search status not saved into list +FIX: search_status not used in mergefusiontool +FIX: Show category selector if we have permission to view products or services +FIX: Show product image on getNomUrl() +FIX: skeleton class must use db->order rather than ORDER BY into fetchAll +FIX: Societe::set_parent() function needs societe object to be fetched to update parent +FIX: supplier rights for orderToInvoice +FIX: tag object_total_vat_x need x to be a string with unknown decimal lenght. Now use for x the real vat real with no more decimal (x = 20 or x = 8.5 or x = 5.99, ...) +FIX: The preview of PDF was never refreshed if PDF document was changed +FIX: The thumb of user into top menu was using the image in full size. This make a large download at each page call. We must use the mini thumbs. +FIX: Total in summary was not same than into detail on the referrer page. + ***** ChangeLog for 3.8.1 compared to 3.8.0 ***** FIX: #3521 postgresql migration error FIX: #3524 @@ -77,6 +374,7 @@ FIX: When filter with empty status, by default get canceled status (-1) FIX: When update a member login for a member linked to a user, the login of user was not sync (not updated). FIX: Wizard for restore does not show import command + ***** ChangeLog for 3.8 compared to 3.7.* ***** For users: FIX: #2519 @@ -294,25 +592,113 @@ Dolibarr better: to make difference between creation from contact or not. - Function get_exdir require now 6 parameters. This is to prepare a future feature. + +***** ChangeLog for 3.7.3 compared to 3.7.2 ***** +FIX: #3734 Do not show empty links of deleted source objects in stock movement list +FIX: #3890 Expected transactions bank account page, shows negative numbers +FIX: #3928 Creating a Customer order and a Customer invoice from a project, does not inherit payment conditions and method of payment of customer card +FIX: #3980 Search field in "product by supplier" list sends empty result 3.8 and 3.7 +FIX: #4081 Added missing translation +FIX: #4097 Public holiday calculation +FIX: #4242 Allow disabling dashes in documents +FIX: #4243 sql injection +FIX: Can use formated float number on old expense report module. +FIX: Change object statut when closing shipment and remove erratic db commit +FIX: Export with category contact extrafields +FIX: NB task and percent progress in box project +FIX: Not delete a product when have customer price +FIX: Not deleting contrats on element_element table +FIX: Not use localtaxes when invoice some orders +FIX: Product link in project box +FIX: Use "WHERE true" instead of "WHERE 1" #4132 + ***** ChangeLog for 3.7.2 compared to 3.7.1 ***** -FIX [ bug #2855 ] Wrong translation key in localtax report page -FIX [ bug #1852 ] JS error when editing a customer order line -FIX [ bug #2900 ] Courtesy title is not stored in create thirdparty form -FIX [ bug #3055 ] Product image thumbnails were not deleted after deleting the image -FIX [ bug 1634 ] Error deleting a project when it had many linked objects -FIX [ bug 1925 ] "Link to order" option in supplier invoices is not working properly -FIX [ bug #3198 ] Trigger LINECONTRACT_INSERT passes Contrat as $object instead of ContratLigne -FIX: Not showing delivery date on rouget pdf +FIX: #2957 : missing $langs object for trigger +FIX: #2983 Load gravatar avatar images securely over HTTPS +FIX: #3009: Better filtering to prevent SQL injection +FIX: #3091 TotalHT amount in supplier order is bold unlike the rest of Dolibarr +FIX: #3262 Webservice getProductsForCategory() +FIX: #3318 +FIX: [ #3460 ] Selected bank account was not saved when an error happened when trying to create a customer invoice +FIX: #3530 +FIX: #3630 - Wrong balance report when module salaries and donation disabled +FIX: #3679 Error when deleting a Localtax2 special payment +FIX: #3707 Thirdparty bank account page table has a glitch +FIX: #3724 Bug: Blank page after cloning proposal with changed client +FIX: #3836 Unable to upload a document to an invoice under some circunstances +FIX: #3841 creation of a task completed has not status set to finished by default +FIX: Add a protection to not make release if ChangeLog was not generated. +FIX: adjusted test for affecting supplier reference +FIX: Admin fiche inter page do not take good action +FIX: Avoid warning strict mode when hosting server do not have php5_curl installed +FIX: bad calculation for stock value +FIX: Bad condition into invoice export request making reporting too many rows. +FIX: bad stock valorisation +FIX: Bad visualization of suppliers name on Incomes-Expenses mode +FIX: Better management error into the color conversion functions +FIX: [ bug 1634 ] Error deleting a project when it had many linked objects +FIX: [ bug 1925 ] "Link to order" option in supplier invoices is not working properly +FIX: [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask +FIX: [ bug #3211 ] Error about sold to pay (Montant encours) +FIX: [ bug #3321 ] Users with certain permissions were shown a "forbidden access" page even if they had the rights +FIX: [ bug #3358 ] Tasks box does not work with PostgreSQL +FIX: [ bug #3383 ] Company name is overlapped with company direction in PDF models +FIX: [ bug #3426 ] Unable to create an invoice from a contract with extrafields +FIX: [ bug #3431 ] Invoice bank account is not respected +FIX: [ bug #3432 ] Spaces should be removed from IBAN when formatting it +FIX: Can create Proposal on close thridparty #3526 +FIX: change order date on clone (as everywhere else) +FIX: Close #2835 Customer prices of a product shows incorrect history order +FIX: Close #2837 Product list table column header does not match column body +FIX: Close bug #2855 Wrong translation key in localtax report page +FIX: Close bug #2861 Undefined variable $res when migrating from 3.6.2 to 3.7.0 +FIX: Close bug #2891 Category hooks do not work +FIX: Close bug #2900 Courtesy title is not stored in create thirdparty form +FIX: Close bug #2976: "Report" tab is the current tab but it is not marked as selected by the UI +FIX: contact country had wrong display if the country dont have translate +FIX: Display country name instead of country id (display country id makes no sense on vcard files) +FIX: display error on extrafields on ficheinter +FIX: double db escape add too quote +FIX: Email selector contact must not include inactive contact +FIX: End log must use same level then start log. +FIX: error in SQL due to a previous fix +FIX: event's data lost on user assign update +FIX: Export of tags for contact and member +FIX: facturestat bad sql when customer view is limited +FIX: if multicompany enabled, call to undifend method _setCookie instead of setCookie +FIX: If supplier invoice block linked element is display after other block total HT amount is not reset to 0 and sum other block (like customer orders values) +FIX: keep filter by category or by not enough stock if we switch page +FIX: Line break display as a block +FIX: load propal langs for availability traduction +FIX: loss data also if update was cancel by error of ended state with no end date, try a generic patch +FIX: Mass Mailing activity don't display all status +FIX: Missing to set context into workflow actions, so triggers can't know we are creating an invoice from order or an order from a proposal. +FIX: multientity warehouse management +FIX: New adherent from, always redirect on entity +FIX: No check warehouse is provided if module stock is not enabled. +FIX: no need to remove file into mail form, the temp dir will be deleted after any sending +FIX: no projet_task_time id from trigger TASK_TIMESPENT_CREATE FIX: Not showing task extrafields when creating from left menu -FIX [ bug #3288 ] Tasks box is not properly drawn -FIX [ bug #3211 ] Outstading bill amount of a client showed wrong amounts -FIX [ bug #3321 ] Users with certain permissions were shown a "forbidden access" page even if they had the rights -FIX [ bug #3426 ] Unable to create an invoice from a contract with extrafields -FIX [ bug #3431 ] Invoice bank account is not respected -FIX [ bug #3432 ] Spaces should be removed from IBAN when formatting it -FIX [ bug #3358 ] Tasks box does not work with PostgreSQL -FIX [ bug #3383 ] Company name is overlapped with company direction in PDF models -FIX [ bug #3460 ] Bank account is not saved when creating a customer invoice and facing an error message +FIX: only active customer should be return into new invoice creation select list +FIX: Payed invoices are showed as canceled FIX: Bad date filter on customer order +FIX: WAP calculation +FIX: Save of filters into export profiles failed. +FIX: supplier rights for orderToInvoice +FIX: Syntax error in Debian Apache configuration +FIX: The hours of date filter aren't correct +FIX: tool export handle the type "select" extrafields and return the value instead of id +FIX: total amount in tpl linked object are not reset +FIX: translate Jabberid on contact page with edit view +FIX: translation for 1 word do not work if product/service module are disabled because the translation search in products.lang +FIX: update2.php test res befre assign it +FIX: When delete actioncomm also delete actioncomm_resources +FIX: when fetch_optionnal_by_label in Extrafields with $this->db cannot work because this->db is never instanciated +FIX: when mailing is deleted, the targets list was kept in database +FIX: when multicompany was enabled, this function didn't check just on the good entity (problem when both company use same mask) +FIX: When we add an user on event in create mode, we lose linked object +FIX: When we automatically creta an order from a proposal with workflow module, if some extrafields of propal don't exist in order object, insertExtraFields() function tries to insert extrafields in unexistant column of commande_extrafields table. +FIX: When we clone a propal, if it has a project which is not assigned to a third, it was not on new propal because fk_project was always set to empty string if new propal is for another third. +FIX: XSS security using the onerror and missing escapement on type of member page. NEW: Created new ContratLigne::insert function @@ -339,9 +725,11 @@ FIX send mail, copy sendto don't read the list of contact FIX Properly escape untrusted data to prevent HTML injection. FIX send mail, copy sendto don't read the list of contact -Path to save photos of products was moved in 3.7.0 to match path of other attached files. If you had loose -your photo on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to -restore old path. +WARNING: + +Path to save photos of products was moved to match path of other attached files. If you had loose your photo +on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to 1 (home - setup - other) +to restore old path and get back working links without having to resubmit images. WARNING: @@ -514,11 +902,14 @@ You may also experience troubles with Mysql 5.5.41 with error "Lost connection" Upgrading to any other version or database system is abolutely required BEFORE trying to make a Dolibarr upgrade. -WARNING: Following changes may create regression for some external modules, but was necessary to make +WARNING: + +Following changes may create regression for some external modules, but was necessary to make Dolibarr better: - Path to save photos of products was moved to match path of other attached files. If you had loose your photo - on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to restore old path. + on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to 1 (home - setup - other) + to restore old path and get back working links without having to resubmit images. - If you can't see trips and expenses records, check that you have the new permission "read all trips and expenses". - Deprecated module "oscommerce" were removed. @@ -533,9 +924,54 @@ Dolibarr better: warehouse module and your Point Of Sale module setup if you use one. - Replaced USER_UPDATE_SESSION trigger with an updateSession hook may break modules using it. + +***** ChangeLog for 3.6.6 compared to 3.6.5 ***** +FIX: #3734 Do not show empty links of deleted source objects in stock movement list +FIX: #4081 Added missing translation +FIX: #4097 Public holiday calculation +FIX: #4242 Allow disabling dashes in documents +FIX: #4243 sql injection +FIX: Add a protection to not make release if ChangeLog was not generated. Prepare package 3.6.5 +FIX: export with category contact extrafields +FIX: Not delete a product when have customer price +FIX: Not deleting contrats on element_element table + ***** ChangeLog for 3.6.5 compared to 3.6.4 ***** -- Fix: [ bug #1776 ] Undefined $deliverycompany variable in pdf_build_address -- Fix: [ bug #1794 ] Error when cloning Proposal gives error in a malformed page +FIX: #2957 : missing $langs object for trigger +FIX: #2983 Load gravatar avatar images securely over HTTPS +FIX: #3009: Better filtering to prevent SQL injection +FIX: #3841 creation of a task completed has not status set to finished by default +FIX: #3890 Expected transactions bank account page, shows negative numbers +FIX: #3928 Creating a Customer order and a Customer invoice from a project, does not inherit payment conditions and method of payment of customer card +FIX: bad calculation for stock value +FIX: bad stock valo +FIX: bad stock valorisation +FIX: [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask +FIX: button create payment hide if tax amount is less than 1 +FIX: change object statut on close shipping and remove erratic db commit +FIX: change order date on clone (as everywhere else) +FIX: Close #2835 Customer prices of a product shows incorrect history order +FIX: Close #2837 Product list table column header does not match column body +FIX: Close bug #2861 Undefined variable $res when migrating from 3.6.2 to 3.7.0 +FIX: Close bug #2891 Category hooks do not work +FIX: Close bug #2976: "Report" tab is the current tab but it is not marked as selected by the UI +FIX: contact country had wrong display if the country dont have translate +FIX: double db escape add too quote +FIX: End log must use same level then start log. +FIX: error in SQL due to a previous fix +FIX: event for restricted user was restricted if company null +FIX: facturestat bad sql when customer view is limited +FIX: If supplier invoice block linked element is display after other block total HT amount is not reset to 0 and sum other block (like customer orders values) +FIX: keep filter by category or by not enough stock if we switch page +FIX: no need to remove file into mail form, the temp dir will be deleted after any sending +FIX: no projet_task_time id from trigger TASK_TIMESPENT_CREATE +FIX: pmp +FIX: send mail, copy sendto don't read the list of contact +FIX: The hours of date filter aren't correct +FIX: tool export handle the type "select" extrafields and return the value instead of id +FIX: top links menu have target attribute with wrong value +FIX: total amount in tpl linked object are not reset +FIX: when multicompany was enabled, this function didn't check just on the good entity (problem when both company use same mask) ***** ChangeLog for 3.6.4 compared to 3.6.3 ***** - Fix: [ bug #2893 ] Dolibarr error when viewing an invoice after changing invoice mask diff --git a/README-FR.md b/README-FR.md index 3f1819f6370..b3ce951c975 100644 --- a/README-FR.md +++ b/README-FR.md @@ -77,62 +77,75 @@ Voir fichier ChangeLog. ## CE QUE DOLIBARR PEUT FAIRE -Modules principaux: +### Modules principaux (tous optionnels): + - Annuaires des prospects et/ou client et/ou fournisseurs - Gestion de catalogue de produits et services -- Gestion de stock +- Gestion des devis, propositions commerciales +- Gestion des commandes +- Gestion des factures clients/fournisseurs et paiements +- Gestion des virements bancaires SEPA - Gestion des comptes bancaires - Agenda partagé -- Gestion des commandes -- Gestion des devis, propositions commerciales -- Gestion des factures clients et fournisseurs +- Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...) - Gestion de contrats de services -- Gestion des paiements -- Gestion des virements bancaires +- Gestion de stock - Gestion des expéditions - GED (Gestion Electronique de Documents) - EMailings de masse - Réalisation de sondages - Point de vente/Caisse enregistreuse +- … + +### Autres modules: -Autres modules: - Gestion de marque-pages - Gestion des promesses de dons - Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM) - Rapports - Imports/Exports des données - Connectivité LDAP -- Export PDF de tous les éléments (factures, propositions commerciales, commandes, bons expéditions, etc...) - De nombreuses autres fonctionnalités issues de modules officiels ou non (AWStats, Bittorrent, Gravatar, Google, Webcalendar...) +- … + +### Divers: -Divers: - Application multi-utilisateurs avec différents niveaux de permissions par module. +- Peux être multi-société par ajout du module externe multi-société. +- Peux-être multi-devise par ajout du module externe multi-devise. - Plusieurs gestionnaires de menus (possibilité de différencier les menus pour les utilisateurs internes ou externes comme les clients ou fournisseurs). - Application simple à utiliser. - Plusieurs thèmes visuels. - Code simple et facilement personnalisable. - Requiert PHP et Mysql ou Postgresql (Voir versions exactes sur http://wiki.dolibarr.org/index.php/Prérequis). - Compatible avec toutes les offres Cloud du marché respectant les prérequis MySQL et PHP ou Postgresql. +- Export PDF de tous les éléments (factures, propositions commerciales, commandes, bons expéditions, etc...) ## CE QUE DOLIBARR NE PEUT PAS FAIRE (TACHES A FAIRE) Voici un liste de fonctionnalites pas encore gérées par Dolibarr: -- Pas de compta analytique double-partie (uniquement gestion de trésorerie). +- Pas encore de compta analytique double-partie (uniquement gestion de trésorerie). - Dolibarr ne gère qu'une seule monnaie à la fois (mono-devise). -- Dolibarr ne gère en standard qu'une société/institution/association mère (mono-société). Pour en gérer plusieurs (comme vos filiales), il faut, soit faire plusieurs installations de Dolibarr, soit installer le module MultiCompany qui permet de gérer n société/institutions/associations dans une seule instance par une isolation logique des données. - Dolibarr ne contient pas de module de Gestion de la paie. - Les tâches du module de gestion de projets n'ont pas de dépendance entre elle. - Dolibarr ne contient pas de Webmail. - Dolibarr ne fait pas le café (pas encore). -## RESEAUX SOCIAUX +## ACTUALITES ET RESEAUX SOCIAUX -Suivez le projet Dolibarr project sur +Suivez le projet Dolibarr project sur les réseaux francophones -Facebook: +- Facebook: +- Google+: +- Twitter: -Google+: +ou sur les réseaux anglophones -Twitter: +- [Facebook](https://www.facebook.com/dolibarr) +- [Google+](https://plus.google.com/+DolibarrOrg) +- [Twitter](http://www.twitter.com/dolibarr) +- [LinkedIn](https://www.linkedin.com/company/association-dolibarr) +- [YouTube](https://www.youtube.com/user/DolibarrERPCRM) +- [GitHub](https://github.com/Dolibarr/dolibarr) diff --git a/README.md b/README.md index 8359b66cbd9..0c3507f62f6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # DOLIBARR ERP & CRM +![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg) ![Downloads per day](https://img.shields.io/sourceforge/dm/dolibarr.svg) + Dolibarr ERP & CRM is a modern software to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda, ...). It's an Open Source software (wrote in PHP language) designed for small and medium companies, foundation and freelances. @@ -14,9 +16,9 @@ You can use it as a standalone application or as a web application to be able to Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version (GPL-3+). -See the [COPYING](COPYING) file for a full copy of the license. +See the [COPYING](https://github.com/Dolibarr/dolibarr/blob/develop/COPYING) file for a full copy of the license. -Other licenses apply for some included dependencies. See [COPYRIGHT](COPYRIGHT) for a full list. +Other licenses apply for some included dependencies. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) for a full list. ## INSTALLING @@ -63,45 +65,28 @@ You can use a Web server and a supported database (MySQL recommended) to install *Note: migration process can safely be done multiple times.* -## NEWS +## WHAT'S NEW -See the [ChangeLog](ChangeLog) file. +See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file. ## FEATURES -### General features -- Users and groups with finely grained rights -- Localization in most major languages -- Very user friendly and easy to use -- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one) -- Works with PHP 5.3+ and MySQL 4.1+ or PostgreSQL 8.1. (See requirements on the [Wiki](http://wiki.dolibarr.org/index.php/Prerequisite)) -- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites. -- An easy to understand, maintain and code interfaces with your own information system (PHP with no heavy framework; trigger and hook architecture) -- Support for country specific features: - - Spanish Tax RE and ISPF - - French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM) - - Canadian double taxes (federal/province) and other countries using cumulative VAT - - Tunisian tax stamp - - Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE) -- ... - -### Main modules +### Main modules (all optional) - Customers, Prospects and/or Suppliers directory - Products and/or Services catalog -- Bank accounts management -- Customer and Supplier Orders management - Commercial proposals management -- Contracts management -- Invoices management +- Customer and Supplier Orders management +- Invoices and payment management +- Standing orders management (European SEPA) +- Bank accounts management +- Shared calendar +- Opportunities and/or project management (following project benefit including invoices, expense reports, time spent, ...) - Projects management -- Events management -- Payments management -- Standing orders management +- Contracts management - Stock management - Shipping management - Interventions management -- PDF or ODT generation for invoice, proposals, orders... - Agenda with ical and vcal export for third party tools integration - Electronic Document Management (EDM) - Foundations members management @@ -127,6 +112,25 @@ See the [ChangeLog](ChangeLog) file. - Payment platforms integration (PayBox, PayPal) - … +### Other general features +- Multi-Users and groups with finely grained rights +- Localization in most major languages +- Can manage several companies by adding external module multi-company. +- Can manage several currencies by adding external module multi-currency. +- Very user friendly and easy to use +- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one) +- Works with PHP 5.3+ and MySQL 4.1+ or PostgreSQL 8.1. (See requirements on the [Wiki](http://wiki.dolibarr.org/index.php/Prerequisite)) +- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites. +- An easy to understand, maintain and code interfaces with your own information system (PHP with no heavy framework; trigger and hook architecture) +- Support for country specific features: + - Spanish Tax RE and ISPF + - French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM) + - Canadian double taxes (federal/province) and other countries using cumulative VAT + - Tunisian tax stamp + - Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE) +- PDF or ODT generation for invoice, proposals, orders... +- … + ### Extending Dolibarr can be extended with a lot of other external modules from third party developers available at the [DoliStore](http://www.dolistore.com). @@ -135,10 +139,7 @@ Dolibarr can be extended with a lot of other external modules from third party d These are features that Dolibarr does **not** yet fully support: -- Double-entry bookkeeping (only bank and treasury management) -- Multiple currencies -- Multiple companies - If you want to manage several companies or foundations, you must install the software several times (on same server or not) or use the MultiCompany addon module that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas) +- Double-entry bookkeeping yet (only bank and treasury management) - Tasks dependencies in projects - Payroll module - Webmail @@ -148,13 +149,17 @@ These are features that Dolibarr does **not** yet fully support: Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](http://wiki.dolibarr.org). +## CONTRIBUTING + +See file [CONTRIBUTING](https://github.com/Dolibarr/dolibarr/blob/develop/CONTRIBUTING.md) + ## CREDITS Dolibarr is the work of many contributors over the years and uses some fine libraries. -See [COPYRIGHT](COPYRIGHT) file. +See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file. -## SOCIAL NETWORKS +## NEWS AND SOCIAL NETWORKS Follow Dolibarr project on: diff --git a/build/.gitignore b/build/.gitignore old mode 100755 new mode 100644 diff --git a/build/aps/APP-META-1.1.xml b/build/aps/APP-META-1.1.xml old mode 100755 new mode 100644 diff --git a/build/aps/APP-META-1.2.xml b/build/aps/APP-META-1.2.xml old mode 100755 new mode 100644 diff --git a/build/aps/README b/build/aps/README old mode 100755 new mode 100644 diff --git a/build/aps/configure.php b/build/aps/configure.php index f4bd03b5d9e..1b2565e3dc8 100755 --- a/build/aps/configure.php +++ b/build/aps/configure.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php \ No newline at end of file diff --git a/build/debian/README.howto b/build/debian/README.howto index e2efcb6cf48..5a8b7b742a2 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -14,8 +14,8 @@ with format .DEB (for Debian, Ubuntu, ...). # To build a debian package, you need first # With Ubuntu 12.04 # apt-get install debhelper dpkg-source gpg lintian git-buildpackage pkg-php-tools schroot sbuild dh-linktree dh-make-php -# With Debian 7 -# apt-get install debhelper dpkg gnupg lintian git-buildpackage pkg-php-tools schroot sbuild dh-linktree dh-make-php +# With Ubuntu 14.04 ou Debian 7 +# apt-get install debhelper dpkg gnupg lintian git-buildpackage pkg-php-tools schroot sbuild dh-linktree dh-make-php packaging-dev # To generate gpg key for email used into changelog @@ -29,6 +29,9 @@ Files are saved int .gnupg directory [DEFAULT] pristine-tar = True +[buildpackage] +ignore-branch = True + [git-buildpackage] sign-tags = True export-dir = ../build-area/ @@ -46,6 +49,7 @@ Other example: export DEBFULLNAME="Laurent Destailleur" export DEBEMAIL="eldy@destailleur.fr" +export QUILT_PATCHES=debian/patches # To use Alioth.debian.org * Create an account login @@ -133,6 +137,19 @@ With only message tag 729538 +pending +To remove status of a bug without "moreinfo" (bug can be processed) + +or replay to email 999999@bugs.debian.org + submitter of bug +With a message starting with: + +Control: tag -1 -moreinfo +Thanks. Fixed into git. + +or replay to email control@bugs.debian.org +With only message +tag 729538 -moreinfo + + ##### Testing a package into unstable env @@ -209,7 +226,9 @@ Warning: Name and email must match value into debian/control file (Entry added h * We try to build package > rm -fr ../build-area; -> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-3.5.x] +> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-x.y.z] +ou +> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-x.y.z] Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-3.5.x] Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file @@ -217,6 +236,7 @@ Note: You can use git-buildpackage -us -uc -d if you want to test Note: Package is built into directory ../build-area Note: To compare 2 packages: debdiff package1.dsc package2.dsc +* Test package (see dedicated chapter to test it with debian unstable env) * If package .deb is ok: Note: If there was errors managed manually, you may need to make a git commit but do not use option "amend" previous commit @@ -239,7 +259,7 @@ http://packages.qa.debian.org/t/tcpdf.html ##### Create/Maintain dolibarr package -To update dolibarr debian package when upstream version has changed +To update dolibarr debian package when upstream (official version of external project) has changed: * You can git clone debian git repo > git clone git.debian.org:/git/collab-maint/dolibarr.git [dolibarr-debian] @@ -284,17 +304,24 @@ Then check/modify also the user/date signature: - Name and email must match value into debian/control file (Entry added here is used by next step). -To update dolibarr debian package when only files into debian has changed +To update dolibarr debian package when only files into debian has changed: * Change files and commit. -* Add a tag debian/x.y.z+dfsgw-2 (increase the last 1 into 2) +* Add a tag debian/x.y.z+dfsgw-2 (increase the last 1 into 2, 3...) +To update dolibarr debian package when only files into debian has changed: + +* Manually, add patches into debian/patches and update file debian/series, or do the 2 steps with "quilt import filepatch.patch" +* You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revien a l'état du upstream sans les patch. + Once files has been prepared, it's time to test: * Try to build package > rm -fr ../build-area; -> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-3.5.x] +> git-buildpackage -us -uc --git-debian-branch=[master|jessie] --git-upstream-branch=[upstream|upstream-3.5.x|3.5.5] +ou +> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-3.5.x|3.5.5] Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-3.5.x] Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file @@ -331,7 +358,7 @@ http://packages.qa.debian.org Use this to move from unstable to testing. -reportbug -B debian +reportbug -B debian --smtphost=smtp.gmail.com:587 --smtpuser=xxxx --smtppasswd=yyyy --tls Choose package "release.debian.org" Then "unblock" Then name of package "dolibarr" @@ -345,15 +372,25 @@ After discussion with ..., it appears that security holes are enough to request Use this to request an update of a stable package -reportbug -B debian +reportbug -B debian --smtphost=smtp.gmail.com:587 --smtpuser=xxxx --smtppasswd=yyyy --tls Choose package "release.debian.org" Then "unblock" Then name of package "dolibarr" Fill message, for example: -"Please unblock package dolibarr -A security error CVE-2015-3935 was reported and is fixed into package 3.5.7. -Note that package 3.5.7 contains not only fixed for bugs reported to debian. It includes other fixes, but they are all related to stability or security, -so it is a better solution to validate this maintenance release than applying a patch of the only CVE-2015-3935. -After discussion with ..., it appears that security holes are enough to request this unblock request." +" +A security error CVE-2015-3935 was reported for Dolibarr ERP CRM package. This bug is fixed into official package 3.5.7 of Dolibarr. +Package 3.5.7 is a maintenance release compared to 3.5.5 and contains only fixes. But not only bugs reported to debian, it includes also other fixes (but they are all related to stability or security). +I think it is a better solution to validate this maintenance release based on the new upstream version of Dolibarr than applying a patch of the only CVE-2015-3935. +Pro are: +- It fixes all debian reported bugs (including security one) +- It fixes also stability bugs +- Patches were already tested because deployed and used by several thousands of users. +- It is easier for package maintener to include this official set of fixes than applying one patch after one patch for each debian report or backported each patch into a dedicated version. +- Debian maintenance version matches with official project maintenance version (better when all fixes are not related to the way the software is packaged) +Cons are: +- The patch include more than the only one security reported fxes +So I just need to know if it's ok to push such a version 3.5.7 (fixes for 3.5.* branch) instead of only one fix for only the few (the only) reported debian bugs, +since it provides more stability and is or me a more secured process. +" diff --git a/build/debian/conf.php.install b/build/debian/conf.php.install old mode 100755 new mode 100644 index e439e80caef..c0ba3bdb120 --- a/build/debian/conf.php.install +++ b/build/debian/conf.php.install @@ -226,5 +226,3 @@ $dolibarr_main_prod='0'; # Default value: 0 (use database value if exist) # Examples: # $dolibarr_mailing_limit_sendbyweb='0'; - -?> diff --git a/build/debian/copyright b/build/debian/copyright index 080965c31a3..e568996551e 100644 --- a/build/debian/copyright +++ b/build/debian/copyright @@ -159,7 +159,7 @@ Comments: Those files are not shipped in the binary package as we configure Dolibarr to use Dejavu fonts from "fonts-dejavu-core". -Files: docs/images/* +Files: doc/images/* Copyright: Laurent Destailleur License: CC-BY-SA-3.0 You are free: @@ -176,7 +176,7 @@ License: CC-BY-SA-3.0 . For more information, see http://creativecommons.org/licenses/by-sa/3.0/ -Files: htdocs/includes/fpdi/* +Files: htdocs/includes/fpdfi/* Copyright: 2004-2011 Setasign - Jan Slabon License: GPL-2+ This program is free software; you can redistribute it diff --git a/build/debian/dolibarr.desktop b/build/debian/dolibarr.desktop index f4b471edf13..dd59be792d2 100644 --- a/build/debian/dolibarr.desktop +++ b/build/debian/dolibarr.desktop @@ -22,5 +22,6 @@ Type=Application Categories=Office StartupNotify=true InitialPreference=5 +Keywords=erp,crm,billing,customer,supplier,stock,agenda,project,order,shipment #NoDisplay=true #OnlyShowIn=GNOME diff --git a/build/debian/dolibarr.install b/build/debian/dolibarr.install old mode 100755 new mode 100644 diff --git a/build/debian/dolibarr.lintian-overrides b/build/debian/dolibarr.lintian-overrides old mode 100755 new mode 100644 diff --git a/build/debian/dolibarr.templates.futur b/build/debian/dolibarr.templates.futur old mode 100755 new mode 100644 diff --git a/build/debian/install.forced.php.install b/build/debian/install.forced.php.install old mode 100755 new mode 100644 index a6347863b1d..57ab33464bc --- a/build/debian/install.forced.php.install +++ b/build/debian/install.forced.php.install @@ -26,7 +26,7 @@ $force_install_nophpinfo='1'; $force_install_lockinstall='444'; // Value to overwrite path to use shared libraries/fonts instead of embedded one. -// If we enable/disable libraries declaration during install, we must also check they are +// If during install, we enable/disable declaration to use non embedded libraries, we must also check they are // - not removed from package (see rm in rules file), // - declared into dependencies (see Depends in control file) //$force_dolibarr_lib_TCPDF_PATH=''; @@ -42,5 +42,3 @@ $force_install_lockinstall='444'; //$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; //$force_dolibarr_js_JQUERY_FLOT='/javascript/flot'; //$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf'; - -?> \ No newline at end of file diff --git a/build/debian/patches/use-etc-dolibarr-conf.patch b/build/debian/patches/use-etc-dolibarr-conf.patch index f911ad18af0..3bca20ee66f 100644 --- a/build/debian/patches/use-etc-dolibarr-conf.patch +++ b/build/debian/patches/use-etc-dolibarr-conf.patch @@ -34,7 +34,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +$conffiletoshow = "/etc/dolibarr/conf.php"; - if (! defined('DONOTLOADCONF') && file_exists($conffile)) + // Load conf file if it is already defined --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -69,8 +69,8 @@ $conffiletoshowshort = "conf.php"; @@ -47,4 +47,4 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +$conffiletoshow = "/etc/dolibarr/conf.php"; - if (! defined('DONOTLOADCONF') && file_exists($conffile)) + // Load conf file if it is already defined diff --git a/build/debian/po/POTFILES.in b/build/debian/po/POTFILES.in old mode 100755 new mode 100644 diff --git a/build/debian/po/fr.po b/build/debian/po/fr.po old mode 100755 new mode 100644 diff --git a/build/doxygen/doxygen_footer.html b/build/doxygen/doxygen_footer.html old mode 100755 new mode 100644 diff --git a/build/doxygen/doxygen_header.html b/build/doxygen/doxygen_header.html old mode 100755 new mode 100644 diff --git a/build/generate_filecheck_xml.php b/build/generate_filecheck_xml.php index dbe96b4c0e9..665bb3a65d1 100644 --- a/build/generate_filecheck_xml.php +++ b/build/generate_filecheck_xml.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php * diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 99ec7b3543a..1d6542eafc9 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -22,7 +22,8 @@ $PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr"; $PUBLISHBETARC="ldestailleur\@asso.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files"; -@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages +#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages +@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages %REQUIREMENTPUBLISH=( "SF"=>"git ssh rsync", "ASSO"=>"git ssh rsync" @@ -351,6 +352,31 @@ if ($nboftargetok) { print "Go to directory $SOURCE\n"; $olddir=getcwd(); chdir("$SOURCE"); + + # Test that the ChangeLog is ok + $TMPBUILDTOCHECKCHANGELOG=$BUILD; + $TMPBUILDTOCHECKCHANGELOG =~ s/\-rc//; + print "Check if ChangeLog is ok for version $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG\n"; + $ret=`grep "ChangeLog for $MAJOR.$MINOR\.$TMPBUILDTOCHECKCHANGELOG" "$SOURCE/ChangeLog" 2>&1`; + if (! $ret) + { + print "Error: The ChangeLogFile was not updated. Run the following command before building package for $MAJOR.$MINOR.$BUILD:\n"; + if (! $BUILD || $BUILD eq '0-rc') # For a major version + { + print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; + } + else # For a maintenance release + { + print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa'; + } + print "\n"; + exit; + } + else + { + print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog'\n"; + } + print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n"; $ret=`git tag -a -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD" 2>&1`; if ($ret =~ /already exists/) @@ -472,6 +498,8 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/calling*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimed*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimod*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`; @@ -482,7 +510,10 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/webmail*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/accountingexport*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`; # Removed other test files $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/eldy/*.new`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/api/explorer`; # This is a dev tool @@ -495,21 +526,36 @@ if ($nboftargetok) { $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jqueryFileTree/connectors/jqueryFileTree.pl`; # Avoid errors into rpmlint $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/template`; # Package not valid for most linux distributions (errors reported into compile.js). Package should be embed by modules to avoid problems. $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpmailer`; # Package not valid for most linux distributions (errors reported into file LICENSE). Package should be embed by modules to avoid problems. - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/adapters`; # Keep this removal in case we embed libraries + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries #$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf`; # Source of this flash is not available - $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extensions/TableTools/swf`; # Source of this flash is not available + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf`; # Source of this flash is not available + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/doc`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/.gitattributes`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/license.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/PDF`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Examples`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/unitTests`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`; - $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`; } @@ -797,17 +843,28 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/rpm`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/zip`; # Removed duplicate license files - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/LICENSE.md`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/plugins/scayt/LICENSE.md`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/plugins/wsc/LICENSE.md`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/LICENSE.md`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/plugins/scayt/LICENSE.md`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/plugins/wsc/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source/plugins/scayt/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source/plugins/wsc/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/plugins/scayt/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/plugins/wsc/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/php-iban/LICENSE`; $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/flot/LICENSE.txt`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.34/LICENSE`; - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tcpdf/fonts/freefont-20120503/COPYING`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/datatables/extensions/ColReorder/License.txt`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/datatables/extensions/ColVis/License.txt`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/datatables/extensions/FixedColumns/License.txt`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/datatables/extensions/Responsive/License.txt`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/datatables/license.txt`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/select2/LICENSE`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mike42/escpos-php/LICENSE.md`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mobiledetect/mobiledetectlib/LICENSE.txt`; + + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-2.34/LICENSE`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-20120503/COPYING`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_2.0/COPYING`; # Removed files we don't need - $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source`; + $ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source`; # Rename upstream changelog to match debian rules $ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`; @@ -869,8 +926,11 @@ if ($nboftargetok) { $ret=`chmod 755 $BUILDROOT/$PROJECT.tmp/debian/rules`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/translation/autotranslator.class.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/modMyModule.class.php`; + $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_api_class.class.php`; + $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_card.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_class.class.php`; - $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_page.php`; + $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_list.php`; + $ret=`chmod -R 755 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_script.php`; $ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/skeletons/skeleton_webservice_server.php`; $cmd="find $BUILDROOT/$PROJECT.tmp/scripts -name '*.php' -type f -exec chmod 755 {} \\; "; $ret=`$cmd`; @@ -1094,8 +1154,10 @@ if ($nboftargetok) { } else { - $destFolder="$NEWPUBLISH"; - print "Publish file ".$file." to $NEWPUBLISH\n"; + $filenameonly=$file; + $filenameonly =~ s/.*\/([^\/]+\/[^\/]+)$/$1/; # removes path + $destFolder="$NEWPUBLISH/$filenameonly"; + print "Publish file ".$file." to $NEWPUBLISH/".$filenameonly."\n"; } # mkdir @@ -1116,7 +1178,7 @@ if ($nboftargetok) { print "$command\n"; my $ret=`$command 2>&1`; - $command="rsync -s $OPTIONUPDATEDIST -e 'ssh' \"$file\" \"".$destFolder."\""; + $command="rsync -s -e 'ssh' \"$file\" \"".$destFolder."\""; print "$command\n"; my $ret=`$command 2>&1`; print "$ret\n"; diff --git a/build/makepack-howto.txt b/build/makepack-howto.txt index 953e207d28d..b4a13badbf4 100644 --- a/build/makepack-howto.txt +++ b/build/makepack-howto.txt @@ -9,8 +9,8 @@ beta version of Dolibarr, step by step. - Check all files are commited. - Update version/info in ChangeLog. -To generate a changelog of a major new version x.y.0, you can do "cd ~/git/dolibarr_x.y; git log `git merge-base x-1.y-1.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" -To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log `git merge-base x.y.z-1 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" +To generate a changelog of a major new version x.y.0, you can do "cd ~/git/dolibarr_x.y; git log `git rev-list --boundary x.y..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" +To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" - Update version number with x.y.z-w in htdocs/filefunc.inc.php - Commit all changes. @@ -31,8 +31,8 @@ complete release of Dolibarr, step by step. - Check all files are commited. - Update version/info in ChangeLog. -To generate a changelog of a major new version x.y.0, you can do "cd ~/git/dolibarr_x.y; git log `git merge-base x-1.y-1.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" -To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log `git merge-base x.y.z-1 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" +To generate a changelog of a major new version x.y.0, you can do "cd ~/git/dolibarr_x.y; git log `git rev-list --boundary x.y..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" +To generate a changelog of a maintenance version x.y.z, you can do "cd ~/git/dolibarr_x.y; git log x.y.z-1.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa" - Update version number with x.y.z in htdocs/filefunc.inc.php - Commit all changes. diff --git a/build/perl/virtualmin/dolibarr.pl b/build/perl/virtualmin/dolibarr.pl index aaaa1fdb33a..32324d28e42 100644 --- a/build/perl/virtualmin/dolibarr.pl +++ b/build/perl/virtualmin/dolibarr.pl @@ -30,7 +30,7 @@ return "Regis Houssin"; # script_dolibarr_versions() sub script_dolibarr_versions { -return ( "3.7.2", "3.6.3", "3.5.6" ); +return ( "3.8.1", "3.7.1", "3.6.4", "3.5.7" ); } sub script_dolibarr_category @@ -163,7 +163,7 @@ return ("tar", "gunzip"); } # script_dolibarr_install(&domain, version, &opts, &files, &upgrade-info) -# Actually installs joomla, and returns either 1 and an informational +# Actually installs dolibarr, and returns either 1 and an informational # message, or 0 and an error sub script_dolibarr_install { @@ -206,6 +206,9 @@ $pgcharset = $tmpl->{'postgres_encoding'}; $charset = $dbtype eq "mysql" ? $mycharset : $pgcharset; $collate = $dbtype eq "mysql" ? $mycollate : "C"; +# Install filename +local $step = $version >= 3.8 ? "step" : "etape"; + $path = &script_path_url($d, $opts); if ($path =~ /^https:/ || $d->{'ssl'}) { $url = "https://$d->{'dom'}"; @@ -224,6 +227,10 @@ if (!$upgrade) { &set_permissions_as_domain_user($d, 0666, $cfile); &run_as_domain_user($d, "mkdir ".quotemeta($docdir)); &set_permissions_as_domain_user($d, 0777, $docdir); + if (!$version >= 3.7.2) { + &run_as_domain_user($d, "mkdir ".quotemeta($altdir)); + &set_permissions_as_domain_user($d, 0777, $altdir); + } } else { # Preserve old config file, documents and custom directory @@ -259,7 +266,7 @@ if ($upgrade) { [ "versionfrom", $upgrade->{'version'} ], [ "versionto", $ver ], ); - local $err = &call_dolibarr_wizard_page(\@params, "step5", $d, $opts); + local $err = &call_dolibarr_wizard_page(\@params, $step."5", $d, $opts); return (-1, "Dolibarr wizard failed : $err") if ($err); # Remove the installation directory. @@ -282,15 +289,15 @@ else { [ "main_force_https", $opts->{'forcehttps'} ], [ "dolibarr_main_db_character_set", $charset ], [ "dolibarr_main_db_collation", $collate ], - [ "usealternaterootdir", "1" ], + [ "main_use_alt_dir", "1" ], [ "main_alt_dir_name", "custom" ], ); - local $err = &call_dolibarr_wizard_page(\@params, "step1", $d, $opts); + local $err = &call_dolibarr_wizard_page(\@params, $step."1", $d, $opts); return (-1, "Dolibarr wizard failed : $err") if ($err); # Second page (Populate database) local @params = ( [ "action", "set" ] ); - local $err = &call_dolibarr_wizard_page(\@params, "step2", $d, $opts); + local $err = &call_dolibarr_wizard_page(\@params, $step."2", $d, $opts); return (-1, "Dolibarr wizard failed : $err") if ($err); # Third page (Add administrator account) @@ -299,7 +306,7 @@ else { [ "pass", $dompass ], [ "pass_verif", $dompass ], ); - local $err = &call_dolibarr_wizard_page(\@params, "step5", $d, $opts); + local $err = &call_dolibarr_wizard_page(\@params, $step."5", $d, $opts); return (-1, "Dolibarr wizard failed : $err") if ($err); # Remove the installation directory and protect config file. @@ -324,14 +331,10 @@ local ($params, $page, $d, $opts) = @_; local $params = join("&", map { $_->[0]."=".&urlize($_->[1]) } @$params ); local $ipage = $opts->{'path'}."/install/".$page.".php"; local ($iout, $ierror); - &post_http_connection($d, $ipage, $params, \$iout, \$ierror); -print STDERR $iout; - if ($ierror) { return $ierror; } - return undef; } @@ -347,8 +350,8 @@ local $derr = &delete_script_install_directory($d, $opts); return (0, $derr) if ($derr); # Remove all llx_ tables from the database -# 4 times because of constraints -for(my $i=0; $i<4; $i++) { +# 10 times because of constraints +for(my $i=0; $i<10; $i++) { &cleanup_script_database($d, $opts->{'db'}, "llx_"); } @@ -381,9 +384,10 @@ sub script_dolibarr_check_latest { local ($ver) = @_; local @vers = &osdn_package_versions("dolibarr", - $ver >= 3.2 ? "dolibarr\\-(3\\.[0-9\\.]+)\\.tgz" : - $ver >= 3.1 ? "dolibarr\\-(3\\.1\\.[0-9\\.]+)\\.tgz" : - $ver >= 3 ? "dolibarr\\-(3\\.0\\.[0-9\\.]+)\\.tgz" : + $ver >= 3.8 ? "dolibarr\\-(3\\.[0-9\\.]+)\\.tgz" : + $ver >= 3.7 ? "dolibarr\\-(3\\.7\\.[0-9\\.]+)\\.tgz" : + $ver >= 3.6 ? "dolibarr\\-(3\\.6\\.[0-9\\.]+)\\.tgz" : + $ver >= 3.5 ? "dolibarr\\-(3\\.5\\.[0-9\\.]+)\\.tgz" : $ver >= 2.9 ? "dolibarr\\-(2\\.9\\.[0-9\\.]+)\\.tgz" : "dolibarr\\-(2\\.8\\.[0-9\\.]+)\\.tgz"); return "Failed to find versions" if (!@vers); diff --git a/build/rpm/conf.php b/build/rpm/conf.php old mode 100755 new mode 100644 diff --git a/build/rpm/dolibarr-forrpm.patch b/build/rpm/dolibarr-forrpm.patch old mode 100755 new mode 100644 index 41f27e3b791..6c484345be9 --- a/build/rpm/dolibarr-forrpm.patch +++ b/build/rpm/dolibarr-forrpm.patch @@ -25,7 +25,7 @@ diff -up htdocs/install/inc.php.patch htdocs/install/inc.php +$conffiletoshow = "/etc/dolibarr/conf.php"; - if (! defined('DONOTLOADCONF') && file_exists($conffile)) + // Load conf file if it is already defined diff -up htdocs/support/inc.php.patch htdocs/support/inc.php --- htdocs/support/inc.php.patch 2011-09-03 02:34:39.606952000 +0200 +++ htdocs/support/inc.php 2011-09-03 02:33:59.814952000 +0200 @@ -39,4 +39,4 @@ diff -up htdocs/support/inc.php.patch htdocs/support/inc.php +$conffiletoshow = "/etc/dolibarr/conf.php"; - if (! defined('DONOTLOADCONF') && file_exists($conffile)) + // Load conf file if it is already defined diff --git a/build/rpm/dolibarr.desktop b/build/rpm/dolibarr.desktop old mode 100755 new mode 100644 diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 7189b7b6dc2..0cd72f99cdd 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -183,6 +183,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/fourn %_datadir/dolibarr/htdocs/ftp %_datadir/dolibarr/htdocs/holiday +%_datadir/dolibarr/htdocs/hrm %_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/install @@ -200,6 +201,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/societe +%_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/user diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index 0e28ff594ea..043088bf5d6 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -263,6 +263,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/fourn %_datadir/dolibarr/htdocs/ftp %_datadir/dolibarr/htdocs/holiday +%_datadir/dolibarr/htdocs/hrm %_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/install @@ -280,6 +281,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/societe +%_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/user diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index 639ec2b52dd..3f439bb4a9a 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -180,6 +180,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/fourn %_datadir/dolibarr/htdocs/ftp %_datadir/dolibarr/htdocs/holiday +%_datadir/dolibarr/htdocs/hrm %_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/install @@ -197,6 +198,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/societe +%_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/user diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 23f42adaa0a..cc21d7083b3 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -191,6 +191,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/fourn %_datadir/dolibarr/htdocs/ftp %_datadir/dolibarr/htdocs/holiday +%_datadir/dolibarr/htdocs/hrm %_datadir/dolibarr/htdocs/imports %_datadir/dolibarr/htdocs/includes %_datadir/dolibarr/htdocs/install @@ -208,6 +209,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/public %_datadir/dolibarr/htdocs/resource %_datadir/dolibarr/htdocs/societe +%_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/theme %_datadir/dolibarr/htdocs/user diff --git a/build/rpm/file_contexts.dolibarr b/build/rpm/file_contexts.dolibarr old mode 100755 new mode 100644 diff --git a/build/rpm/install.forced.php.fedora b/build/rpm/install.forced.php.fedora old mode 100755 new mode 100644 index 994689bbfa1..108455a9403 --- a/build/rpm/install.forced.php.fedora +++ b/build/rpm/install.forced.php.fedora @@ -31,5 +31,3 @@ $force_dolibarr_lib_TCPDF_PATH=''; //$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; //$force_dolibarr_js_JQUERY_FLOT='/javascript/flot'; $force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf'; - -?> \ No newline at end of file diff --git a/build/rpm/install.forced.php.generic b/build/rpm/install.forced.php.generic old mode 100755 new mode 100644 index 718eade3696..161f69cdbb3 --- a/build/rpm/install.forced.php.generic +++ b/build/rpm/install.forced.php.generic @@ -20,4 +20,3 @@ $force_install_lockinstall='444'; // Value to overwrite path to use shared libraries/fonts instead of embedded one // We don't force any external lib with generic package -?> \ No newline at end of file diff --git a/build/rpm/install.forced.php.mandriva b/build/rpm/install.forced.php.mandriva old mode 100755 new mode 100644 index 53a8a53b60c..266468c7f33 --- a/build/rpm/install.forced.php.mandriva +++ b/build/rpm/install.forced.php.mandriva @@ -31,5 +31,3 @@ $force_dolibarr_lib_TCPDF_PATH=''; //$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; //$force_dolibarr_js_JQUERY_FLOT='/javascript/flot'; $force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/TTF/dejavu/DejaVuSans-Bold.ttf'; - -?> \ No newline at end of file diff --git a/build/rpm/install.forced.php.opensuse b/build/rpm/install.forced.php.opensuse old mode 100755 new mode 100644 index 06a0074b04d..b644cea6e24 --- a/build/rpm/install.forced.php.opensuse +++ b/build/rpm/install.forced.php.opensuse @@ -31,5 +31,3 @@ $force_dolibarr_lib_TCPDF_PATH=''; //$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui'; //$force_dolibarr_js_JQUERY_FLOT='/javascript/flot'; $force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/DejaVuSans-Bold.ttf'; - -?> \ No newline at end of file diff --git a/build/travis-ci/apache.conf b/build/travis-ci/apache.conf new file mode 100644 index 00000000000..5ba713924f2 --- /dev/null +++ b/build/travis-ci/apache.conf @@ -0,0 +1,18 @@ + + DocumentRoot %TRAVIS_BUILD_DIR%/htdocs + + + Options FollowSymLinks MultiViews ExecCGI + AllowOverride All + Order deny,allow + Allow from all + + + # Wire up Apache to use Travis CI's php-fpm. + + AddHandler php5-fcgi .php + Action php5-fcgi /php5-fcgi + Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi + FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization + + diff --git a/composer.json b/composer.json index ed75d3ca61d..f4ea5de0c73 100644 --- a/composer.json +++ b/composer.json @@ -6,27 +6,47 @@ "homepage": "http://www.dolibarr.org", "license": "GPL-3.0+", "support": { - "issues": "https://doliforge.org/projects/dolibarr", + "issues": "https://github.com/Dolibarr/dolibarr/issues", "forum": "http://www.dolibarr.org/forum", - "wiki": "http://wiki.dolibarr.org" + "wiki": "http://wiki.dolibarr.org", + "irc": "irc://chat.freenode.net/dolibarr", + "source": "https://github.com/Dolibarr/dolibarr" }, "require": { "php": ">=5.3.0", - "ext-gd": "*", "ext-curl": "*", - "restler/framework": "3.0.*" + "ccampbell/chromephp": "^4.1", + "ckeditor/ckeditor": "dev-full/stable", + "mike42/escpos-php": "dev-master", + "mobiledetect/mobiledetectlib": "2.8.17", + "phpoffice/phpexcel": "1.8.1", + "restler/framework": "^3.0", + "tecnickcom/tcpdf": "6.2.12" + }, + "require-dev": { + "jakub-onderka/php-parallel-lint": "^0", + "jakub-onderka/php-console-highlighter": "^0", + "phpunit/phpunit": "^4", + "squizlabs/php_codesniffer": "^2" }, "suggest": { - "ext-mysqli": "*", - "ext-pgsql": "*", - "ext-mssql": "*", - "ext-pdo_sqlite": "*", - "ext-imagick": "*", - "ext-mcrypt": "*", - "ext-openssl": "*", - "ext-mbstring": "*", - "ext-soap": "*", - "ext-zip": "*", - "ext-xml": "*" + "ext-mysqlnd": "To use with MySQL or MariaDB", + "ext-mysqli": "To use with MySQL or MariaDB", + "ext-pgsql": "To use with PostgreSQL", + "ext-mssql": "To use with MSSQL (experimental)", + "ext-pdo_sqlite": "To use with SQLite (experimental)", + "ext-gd": "Image manipulation (Required but maybe built-in PHP)", + "ext-imagick": "Image manipulation (TCPDF)", + "ext-mcrypt": "(Required but maybe built-in PHP)", + "ext-openssl": "Secure connections (Emails, SOAP…)", + "ext-mbstring": "Handle non UTF-8 databases", + "ext-soap": "Native SOAP", + "ext-zip": "ODT and Excel support", + "ext-xml": "Excel support", + "firephp/firephp-core": "Logging to Firebug console support", + "raven/raven": "Sentry logging server support" + }, + "config": { + "vendor-dir": "htdocs/includes" } } diff --git a/composer.lock b/composer.lock new file mode 100644 index 00000000000..2ccd1f616a5 --- /dev/null +++ b/composer.lock @@ -0,0 +1,1527 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "4a06567f53c5f081f9c961a0b3093da3", + "content-hash": "265061f1a1056df2e8c5184841993d0f", + "packages": [ + { + "name": "ccampbell/chromephp", + "version": "4.1.0", + "source": { + "type": "git", + "url": "https://github.com/ccampbell/chromephp.git", + "reference": "c3c297615d48ae5b2a86a82311152d1ed095fcef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ccampbell/chromephp/zipball/c3c297615d48ae5b2a86a82311152d1ed095fcef", + "reference": "c3c297615d48ae5b2a86a82311152d1ed095fcef", + "shasum": "" + }, + "require": { + "php": ">=5.0.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "ChromePhp": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Craig Campbell", + "email": "iamcraigcampbell@gmail.com", + "homepage": "http://craig.is", + "role": "Developer" + } + ], + "description": "Log variables to the Chrome console (via Chrome Logger Google Chrome extension).", + "homepage": "http://github.com/ccampbell/chromephp", + "keywords": [ + "log", + "logging" + ], + "time": "2013-06-26 03:44:33" + }, + { + "name": "ckeditor/ckeditor", + "version": "dev-full/stable", + "source": { + "type": "git", + "url": "https://github.com/ckeditor/ckeditor-releases.git", + "reference": "c1cefe7341e6910a1e6cb2f3f024bbdaf6cd1d4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ckeditor/ckeditor-releases/zipball/c1cefe7341e6910a1e6cb2f3f024bbdaf6cd1d4d", + "reference": "c1cefe7341e6910a1e6cb2f3f024bbdaf6cd1d4d", + "shasum": "" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0+", + "LGPL-2.1+", + "MPL-1.1+" + ], + "authors": [ + { + "name": "CKSource - Frederico Knabben", + "homepage": "http://cksource.com" + } + ], + "description": "JavaScript WYSIWYG web text editor.", + "homepage": "http://ckeditor.com", + "keywords": [ + "CKEditor", + "editor", + "fckeditor", + "html", + "javascript", + "richtext", + "text", + "wysiwyg" + ], + "time": "2015-12-09 15:49:34" + }, + { + "name": "mike42/escpos-php", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/mike42/escpos-php.git", + "reference": "63648d03d47b81e8f6c1020ac92f051a3f3b5793" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mike42/escpos-php/zipball/63648d03d47b81e8f6c1020ac92f051a3f3b5793", + "reference": "63648d03d47b81e8f6c1020ac92f051a3f3b5793", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.5.*" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roni Saha", + "email": "roni.cse@gmail.com" + }, + { + "name": "Michael Billington", + "email": "michael.billington@gmail.com" + }, + { + "name": "Gergely Radics", + "email": "gerifield@ustream.tv" + }, + { + "name": "Warren Doyle", + "email": "w.doyle@fuelled.co" + }, + { + "name": "vharo", + "email": "vharo@geepok.com" + } + ], + "description": "Thermal receipt printer library, for use with ESC/POS compatible printers", + "homepage": "https://github.com/mike42/escpos-php", + "keywords": [ + "ESC-POS", + "driver", + "escpos", + "print", + "receipt" + ], + "time": "2015-12-04 10:23:55" + }, + { + "name": "mobiledetect/mobiledetectlib", + "version": "2.8.17", + "source": { + "type": "git", + "url": "https://github.com/serbanghita/Mobile-Detect.git", + "reference": "b87da5f63a76e9615a0c74fcf168657b1ea7e41d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/b87da5f63a76e9615a0c74fcf168657b1ea7e41d", + "reference": "b87da5f63a76e9615a0c74fcf168657b1ea7e41d", + "shasum": "" + }, + "require": { + "php": ">=5.0.0" + }, + "require-dev": { + "codeclimate/php-test-reporter": "dev-master", + "johnkary/phpunit-speedtrap": "~1.0@dev", + "phpunit/phpunit": "*" + }, + "type": "library", + "autoload": { + "classmap": [ + "Mobile_Detect.php" + ], + "psr-0": { + "Detection": "namespaced/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Serban Ghita", + "email": "serbanghita@gmail.com", + "homepage": "http://mobiledetect.net", + "role": "Developer" + } + ], + "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", + "homepage": "https://github.com/serbanghita/Mobile-Detect", + "keywords": [ + "detect mobile devices", + "mobile", + "mobile detect", + "mobile detector", + "php mobile detect" + ], + "time": "2015-09-17 14:45:21" + }, + { + "name": "phpoffice/phpexcel", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PHPExcel.git", + "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/372c7cbb695a6f6f1e62649381aeaa37e7e70b32", + "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32", + "shasum": "" + }, + "require": { + "ext-xml": "*", + "ext-xmlwriter": "*", + "php": ">=5.2.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "PHPExcel": "Classes/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "http://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker" + }, + { + "name": "Franck Lefevre", + "homepage": "http://blog.rootslabs.net" + }, + { + "name": "Erik Tilt" + } + ], + "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "http://phpexcel.codeplex.com", + "keywords": [ + "OpenXML", + "excel", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "time": "2015-05-01 07:00:55" + }, + { + "name": "restler/framework", + "version": "3.0.0", + "target-dir": "Luracast/Restler", + "source": { + "type": "git", + "url": "https://github.com/Luracast/Restler-Framework.git", + "reference": "6ee10b3e5dbc6376916fed55ec2340a37cce436b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/6ee10b3e5dbc6376916fed55ec2340a37cce436b", + "reference": "6ee10b3e5dbc6376916fed55ec2340a37cce436b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "replace": { + "luracast/restler": "3.*" + }, + "require-dev": { + "bshaffer/oauth2-server-php": "v1.0", + "luracast/explorer": "*", + "mustache/mustache": "dev-master", + "rodneyrehm/plist": "dev-master", + "symfony/yaml": "*", + "twig/twig": "v1.13.0", + "zendframework/zendamf": "dev-master" + }, + "suggest": { + "bshaffer/oauth2-server-php": "Restler can provide OAuth2 authentication using this library (see require-dev for details)", + "luracast/explorer": "Restler's very own api explorer (see require-dev for details)", + "mustache/mustache": "Restler can render HtmlView using mustache/handlebar templates (see require-dev for details)", + "rodneyrehm/plist": "Restler supports tho Apple plist xml format (see require-dev for details)", + "symfony/yaml": "Restler can produce content in yaml format as well (see require-dev for details)", + "twig/twig": "Restler can render HtmlView using twig templates (see require-dev for details)", + "zendframework/zendamf": "Support for the amf document format (see require-dev for details)" + }, + "type": "library", + "extra": { + "branch-alias": { + "master": "v3.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Luracast\\Restler": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Luracast", + "email": "arul@luracast.com" + }, + { + "name": "Nick nickl- Lombard", + "email": "github@jigsoft.co.za" + } + ], + "description": "Just the Restler Framework without the tests and examples", + "homepage": "http://luracast.com/products/restler/", + "keywords": [ + "api", + "framework", + "rest", + "server" + ], + "time": "2015-08-04 07:52:49" + }, + { + "name": "tecnickcom/tcpdf", + "version": "6.2.12", + "source": { + "type": "git", + "url": "https://github.com/tecnickcom/TCPDF.git", + "reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/2f732eaa91b5665274689b1d40b285a7bacdc37f", + "reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "fonts", + "config", + "include", + "tcpdf.php", + "tcpdf_parser.php", + "tcpdf_import.php", + "tcpdf_barcodes_1d.php", + "tcpdf_barcodes_2d.php", + "include/tcpdf_colors.php", + "include/tcpdf_filters.php", + "include/tcpdf_font_data.php", + "include/tcpdf_fonts.php", + "include/tcpdf_images.php", + "include/tcpdf_static.php", + "include/barcodes/datamatrix.php", + "include/barcodes/pdf417.php", + "include/barcodes/qrcode.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPLv3" + ], + "authors": [ + { + "name": "Nicola Asuni", + "email": "info@tecnick.com", + "homepage": "http://nicolaasuni.tecnick.com" + } + ], + "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", + "homepage": "http://www.tcpdf.org/", + "keywords": [ + "PDFD32000-2008", + "TCPDF", + "barcodes", + "datamatrix", + "pdf", + "pdf417", + "qrcode" + ], + "time": "2015-09-12 10:08:34" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14 21:17:01" + }, + { + "name": "myclabs/deep-copy", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e3abefcd7f106677fd352cd7c187d6c969aa9ddc", + "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "homepage": "https://github.com/myclabs/DeepCopy", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2015-11-07 22:20:37" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", + "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2015-02-03 12:10:50" + }, + { + "name": "phpspec/prophecy", + "version": "v1.5.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1" + }, + "require-dev": { + "phpspec/phpspec": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2015-08-13 10:07:40" + }, + { + "name": "phpunit/php-code-coverage", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "f7bb5cddf4ffe113eeb737b05241adb947b43f9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f7bb5cddf4ffe113eeb737b05241adb947b43f9d", + "reference": "f7bb5cddf4ffe113eeb737b05241adb947b43f9d", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~5" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-11-12 21:08:20" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2015-06-21 13:08:43" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21 13:50:34" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.7", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2015-06-21 08:01:12" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2015-09-15 10:49:45" + }, + { + "name": "phpunit/phpunit", + "version": "5.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "c047ff05d2279404af9a7e89e2a7151c32c88022" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c047ff05d2279404af9a7e89e2a7151c32c88022", + "reference": "c047ff05d2279404af9a7e89e2a7151c32c88022", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "myclabs/deep-copy": "~1.3", + "php": ">=5.6", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~3.0", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": ">=1.0.6", + "phpunit/phpunit-mock-objects": ">=3.0.5", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2015-12-10 07:54:54" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "49bc700750196c04dd6bc2c4c99cb632b893836b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/49bc700750196c04dd6bc2c4c99cb632b893836b", + "reference": "49bc700750196c04dd6bc2c4c99cb632b893836b", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.6", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2015-12-08 08:47:06" + }, + { + "name": "sebastian/comparator", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", + "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2015-07-26 15:48:44" + }, + { + "name": "sebastian/diff", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-12-08 07:14:41" + }, + { + "name": "sebastian/environment", + "version": "1.3.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "6e7133793a8e5a5714a551a8324337374be209df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", + "reference": "6e7133793a8e5a5714a551a8324337374be209df", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2015-12-02 08:37:27" + }, + { + "name": "sebastian/exporter", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "7ae5513327cb536431847bcc0c10edba2701064e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", + "reference": "7ae5513327cb536431847bcc0c10edba2701064e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2015-06-21 07:55:53" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12 03:26:01" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-11-11 19:50:13" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28 20:34:47" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21 13:59:46" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "32a879f4f35019d78d568db2885d7779ca084a33" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/32a879f4f35019d78d568db2885d7779ca084a33", + "reference": "32a879f4f35019d78d568db2885d7779ca084a33", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2015-11-23 21:30:59" + }, + { + "name": "symfony/yaml", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "177a015cb0e19ff4a49e0e2e2c5fc1c1bee07002" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/177a015cb0e19ff4a49e0e2e2c5fc1c1bee07002", + "reference": "177a015cb0e19ff4a49e0e2e2c5fc1c1bee07002", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2015-11-30 12:36:17" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": { + "ckeditor/ckeditor": 20, + "mike42/escpos-php": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.3.0", + "ext-curl": "*" + }, + "platform-dev": [] +} diff --git a/dev/cliparts/commons.svg b/dev/cliparts/commons.svg new file mode 100644 index 00000000000..1abca065694 --- /dev/null +++ b/dev/cliparts/commons.svg @@ -0,0 +1,2058 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/codesniffer/README b/dev/codesniffer/README old mode 100755 new mode 100644 diff --git a/dev/codesniffer/php.ini b/dev/codesniffer/php.ini old mode 100755 new mode 100644 diff --git a/dev/codesniffer/ruleset.dtd b/dev/codesniffer/ruleset.dtd old mode 100755 new mode 100644 index e307d564e12..276626a3a16 --- a/dev/codesniffer/ruleset.dtd +++ b/dev/codesniffer/ruleset.dtd @@ -3,6 +3,7 @@ + diff --git a/dev/codesniffer/ruleset.xml b/dev/codesniffer/ruleset.xml old mode 100755 new mode 100644 index 9b5c0931650..7b887113d90 --- a/dev/codesniffer/ruleset.xml +++ b/dev/codesniffer/ruleset.xml @@ -3,12 +3,12 @@ Dolibarr coding standard. - */conf.php - */includes/* - */documents/* - */dev/vagrant/* - */custom/* - */nltechno* + build/html + documents + htdocs/custom + htdocs/includes + htdocs/conf.php + */nltechno* @@ -124,7 +124,7 @@ - + @@ -289,6 +289,15 @@ + + 0 + + + 0 + + + 0 + 0 @@ -304,12 +313,6 @@ 0 - - 0 - - - 0 - diff --git a/dev/codetemplates/README b/dev/codetemplates/README old mode 100755 new mode 100644 diff --git a/dev/codetemplates/codetemplates.dtd b/dev/codetemplates/codetemplates.dtd old mode 100755 new mode 100644 diff --git a/dev/codetemplates/codetemplates.xml b/dev/codetemplates/codetemplates.xml old mode 100755 new mode 100644 diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index bf68293d369..c5487f67273 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -62,6 +62,13 @@ In htdocs/includes/tcpdf/tcpdf.php * Renamed getmypid into dol_getmypid(). +To avoid to have QRcode changed because generated with a random mask, replace +define('QR_FIND_FROM_RANDOM', 2); +with +define('QR_FIND_FROM_RANDOM', false); + + + TCPDI: ------ Add fpdf_tpl.php 1.2 @@ -69,7 +76,7 @@ Add tcpdi.php Add tcpdi_parser.php and replace: require_once(dirname(__FILE__).'/include/tcpdf_filters.php'); with: -require_once(dirname(__FILE__).'/../tcpdf/include/tcpdf_filters.php'); +require_once(dirname(__FILE__).'/../tecnickcom/tcpdf/include/tcpdf_filters.php'); @@ -95,3 +102,13 @@ JQUERYFILETREE: --------------- * Remove directory htdocs/includes/jquery/plugins/jqueryFileTree/connectors + + +RESTLER: +-------- + + if ($className == 'Luracast\Restler\string') return; + if ($className == 'Luracast\Restler\mixed') return; + + + \ No newline at end of file diff --git a/dev/examples/README b/dev/examples/README old mode 100755 new mode 100644 diff --git a/dev/examples/create_invoice.php b/dev/examples/create_invoice.php index d59655ef613..bd82d38d306 100755 --- a/dev/examples/create_invoice.php +++ b/dev/examples/create_invoice.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php * diff --git a/dev/examples/create_order.php b/dev/examples/create_order.php index d490d230b77..4575e9e28f3 100755 --- a/dev/examples/create_order.php +++ b/dev/examples/create_order.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php * diff --git a/dev/examples/create_product.php b/dev/examples/create_product.php index 6ecce081d45..61598ff59d9 100755 --- a/dev/examples/create_product.php +++ b/dev/examples/create_product.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php * diff --git a/dev/examples/create_user.php b/dev/examples/create_user.php index d6126af2cba..f745032f575 100755 --- a/dev/examples/create_user.php +++ b/dev/examples/create_user.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php * diff --git a/dev/examples/get_contracts.php b/dev/examples/get_contracts.php index d1be3d9d7bf..1262fe3eebd 100755 --- a/dev/examples/get_contracts.php +++ b/dev/examples/get_contracts.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php * diff --git a/dev/initdata/documents_demo/.htaccess b/dev/initdata/documents_demo/.htaccess new file mode 100644 index 00000000000..cb24fd7fc0b --- /dev/null +++ b/dev/initdata/documents_demo/.htaccess @@ -0,0 +1,2 @@ +Order allow,deny +Deny from all diff --git a/dev/initdata/documents_demo/commande/(PROV6)/(PROV6).pdf b/dev/initdata/documents_demo/commande/(PROV6)/(PROV6).pdf new file mode 100644 index 00000000000..090d107a795 Binary files /dev/null and b/dev/initdata/documents_demo/commande/(PROV6)/(PROV6).pdf differ diff --git a/dev/initdata/documents_demo/commande/CO1107-0002/CO1107-0002.pdf b/dev/initdata/documents_demo/commande/CO1107-0002/CO1107-0002.pdf new file mode 100644 index 00000000000..f9d38ab68f3 Binary files /dev/null and b/dev/initdata/documents_demo/commande/CO1107-0002/CO1107-0002.pdf differ diff --git a/dev/initdata/documents_demo/commande/CO1107-0003/CO1107-0003.pdf b/dev/initdata/documents_demo/commande/CO1107-0003/CO1107-0003.pdf new file mode 100644 index 00000000000..cc4f13cb662 Binary files /dev/null and b/dev/initdata/documents_demo/commande/CO1107-0003/CO1107-0003.pdf differ diff --git a/dev/initdata/documents_demo/commande/CO1107-0004/CO1107-0004.pdf b/dev/initdata/documents_demo/commande/CO1107-0004/CO1107-0004.pdf new file mode 100644 index 00000000000..76fe6687796 Binary files /dev/null and b/dev/initdata/documents_demo/commande/CO1107-0004/CO1107-0004.pdf differ diff --git a/dev/initdata/documents_demo/commande/CO1108-0001/CO1108-0001.pdf b/dev/initdata/documents_demo/commande/CO1108-0001/CO1108-0001.pdf new file mode 100644 index 00000000000..1f139c2bbba Binary files /dev/null and b/dev/initdata/documents_demo/commande/CO1108-0001/CO1108-0001.pdf differ diff --git a/dev/initdata/documents_demo/custom/main.inc.php b/dev/initdata/documents_demo/custom/main.inc.php new file mode 100644 index 00000000000..37b615bbe52 --- /dev/null +++ b/dev/initdata/documents_demo/custom/main.inc.php @@ -0,0 +1,3 @@ + - * Copyright (C) 2004-2007 Laurent Destailleur - * - * 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 3 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, see . - * - * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION - */ - -/** - * \file dev/initdata/generate-commande.php - * \brief Script de generation de donnees aleatoires pour les commandes - */ - -// Test si mode batch -$sapi_type = php_sapi_name(); -if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer mailing-send.php en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n"; - exit; -} - -// Recupere root dolibarr -$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]); -require ($path."../../htdocs/master.inc.php"); -include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; -include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; -include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; - - -/* - * Parametre - */ - -define(GEN_NUMBER_COMMANDE, 10); - - -$ret=$user->fetch('','admin'); -if ($ret <= 0) -{ - print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; - exit; -} -$user->getrights(); - - -$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); -$resql=$db->query($sql); -if ($resql) { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) { - $row = $db->fetch_row($resql); - $societesid[$i] = $row[0]; - $i++; - } -} -else { print "err"; } - -$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array(); -$resql=$db->query($sql); -if ($resql) { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) { - $row = $db->fetch_row($resql); - $commandesid[$i] = $row[0]; - $i++; - } -} -else { print "err"; } - - -$prodids = array(); -$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; -$resql = $db->query($sql); -if ($resql) -{ - $num_prods = $db->num_rows($resql); - $i = 0; - while ($i < $num_prods) - { - $i++; - - $row = $db->fetch_row($resql); - $prodids[$i] = $row[0]; - } -} - - -$dates = array (mktime(12,0,0,1,3,2003), - mktime(12,0,0,1,9,2003), - mktime(12,0,0,2,13,2003), - mktime(12,0,0,2,23,2003), - mktime(12,0,0,3,30,2003), - mktime(12,0,0,4,3,2003), - mktime(12,0,0,4,3,2003), - mktime(12,0,0,5,9,2003), - mktime(12,0,0,5,1,2003), - mktime(12,0,0,5,13,2003), - mktime(12,0,0,5,19,2003), - mktime(12,0,0,5,23,2003), - mktime(12,0,0,6,3,2003), - mktime(12,0,0,6,19,2003), - mktime(12,0,0,6,24,2003), - mktime(12,0,0,7,3,2003), - mktime(12,0,0,7,9,2003), - mktime(12,0,0,7,23,2003), - mktime(12,0,0,7,30,2003), - mktime(12,0,0,8,9,2003), - mktime(12,0,0,9,23,2003), - mktime(12,0,0,10,3,2003), - mktime(12,0,0,11,12,2003), - mktime(12,0,0,11,13,2003), - mktime(12,0,0,1,3,2002), - mktime(12,0,0,1,9,2002), - mktime(12,0,0,2,13,2002), - mktime(12,0,0,2,23,2002), - mktime(12,0,0,3,30,2002), - mktime(12,0,0,4,3,2002), - mktime(12,0,0,4,3,2002), - mktime(12,0,0,5,9,2002), - mktime(12,0,0,5,1,2002), - mktime(12,0,0,5,13,2002), - mktime(12,0,0,5,19,2002), - mktime(12,0,0,5,23,2002), - mktime(12,0,0,6,3,2002), - mktime(12,0,0,6,19,2002), - mktime(12,0,0,6,24,2002), - mktime(12,0,0,7,3,2002), - mktime(12,0,0,7,9,2002), - mktime(12,0,0,7,23,2002), - mktime(12,0,0,7,30,2002), - mktime(12,0,0,8,9,2002), - mktime(12,0,0,9,23,2002), - mktime(12,0,0,10,3,2002), - mktime(12,0,0,11,12,2003), - mktime(12,0,0,11,13,2003), - mktime(12,0,0,12,12,2003), - mktime(12,0,0,12,13,2003), - ); - -require(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php"); - - -print "Build ".GEN_NUMBER_COMMANDE." orders\n"; -for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++) -{ - print "Process order ".$s."\n"; - - $com = new Commande($db); - - $com->socid = 4; - $com->date_commande = $dates[rand(1, count($dates)-1)]; - $com->note = 'A comment'; - $com->source = 1; - $com->fk_project = 0; - $com->remise_percent = 0; - - $db->begin(); - - $result=$com->create($user); - if ($result >= 0) - { - $result=$com->valid($user); - if ($result > 0) - { - $nbp = rand(2, 5); - $xnbp = 0; - while ($xnbp < $nbp) - { - $prodid = rand(1, $num_prods); - $product=new Product($db); - $result=$product->fetch($prodids[$prodid]); - $result=$com->addline($product->description, $product->price, rand(1,5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type); - if ($result < 0) - { - dol_print_error($db,$propal->error); - } - $xnbp++; - } - - $db->commit(); - print " OK with ref ".$com->ref."\n"; - } - else - { - print " KO\n"; - $db->rollback(); - dol_print_error($db,$com->error); - } - } - else - { - print " KO\n"; - $db->rollback(); - dol_print_error($db,$com->error); - } -} - diff --git a/dev/initdata/generate-facture.php b/dev/initdata/generate-facture.php deleted file mode 100755 index 97f00f7d6d6..00000000000 --- a/dev/initdata/generate-facture.php +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/php - - * - * 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 3 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, see . - * - * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION - */ - -/** - * \file dev/intdata/generate-facture.php - * \brief Script de generation de donnees aleatoires pour les factures - */ - -// Test si mode batch -$sapi_type = php_sapi_name(); -if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer mailing-send.php en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n"; - exit; -} - -// Recupere root dolibarr -$path=preg_replace('/generate-facture.php/i','',$_SERVER["PHP_SELF"]); -require ($path."../../htdocs/master.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); -require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); - - -/* - * Parameters - */ - -define(GEN_NUMBER_FACTURE, 5); - - -$ret=$user->fetch('','admin'); -if (! $ret > 0) -{ - print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; - exit; -} -$user->getrights(); - - -$socids = array(); -$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client=1"; -$resql = $db->query($sql); -if ($resql) -{ - $num_socs = $db->num_rows($resql); - $i = 0; - while ($i < $num_socs) - { - $i++; - - $row = $db->fetch_row($resql); - $socids[$i] = $row[0]; - } -} - -$prodids = array(); -$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; -$resql = $db->query($sql); -if ($resql) -{ - $num_prods = $db->num_rows($resql); - $i = 0; - while ($i < $num_prods) - { - $i++; - - $row = $db->fetch_row($resql); - $prodids[$i] = $row[0]; - } -} - -$i=0; -$result=0; -while ($i < GEN_NUMBER_FACTURE && $result >= 0) -{ - $i++; - $socid = rand(1, $num_socs); - - print "Invoice ".$i." for socid ".$socid; - - $facture = new Facture($db); - $facture->date = time(); - $facture->cond_reglement_id = 3; - $facture->mode_reglement_id = 3; - - $result=$facture->create($user); - if ($result >= 0) - { - $result=$facture->validate($user); - if ($result) - { - $nbp = rand(2, 5); - $xnbp = 0; - while ($xnbp < $nbp) - { - $prodid = rand(1, $num_prods); - $product=new Product($db); - $result=$product->fetch($prodids[$prodid]); - $result=$facture->addline($product->description, $product->price, rand(1,5), 0, 0, 0, $prodids[$prodid], 0, '', '', 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type); - if ($result < 0) - { - dol_print_error($db,$propal->error); - } - $xnbp++; - } - - print " OK with ref ".$facture->ref."\n";; - } - else - { - dol_print_error($db,$facture->error); - } - } - else - { - dol_print_error($db,$facture->error); - } - -} - - diff --git a/dev/initdata/generate-invoice.php b/dev/initdata/generate-invoice.php new file mode 100755 index 00000000000..c1b2f2646a5 --- /dev/null +++ b/dev/initdata/generate-invoice.php @@ -0,0 +1,137 @@ +#!/usr/bin/env php + + * + * 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 3 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, see . + * + * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION + */ + +/** + * \file dev/intdata/generate-invoice.php + * \brief Script example to inject random customer invoices (for load tests) + */ + +// Test si mode batch +$sapi_type = php_sapi_name(); +if (substr($sapi_type, 0, 3) == 'cgi') { + echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer mailing-send.php en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n"; + exit; +} + +// Recupere root dolibarr +$path=preg_replace('/generate-facture.php/i','',$_SERVER["PHP_SELF"]); +require ($path."../../htdocs/master.inc.php"); +require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); +require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); + + +/* + * Parameters + */ + +define(GEN_NUMBER_FACTURE, 5); + + +$ret=$user->fetch('','admin'); +if (! $ret > 0) +{ + print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; + exit; +} +$user->getrights(); + + +$socids = array(); +$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client=1"; +$resql = $db->query($sql); +if ($resql) +{ + $num_socs = $db->num_rows($resql); + $i = 0; + while ($i < $num_socs) + { + $i++; + + $row = $db->fetch_row($resql); + $socids[$i] = $row[0]; + } +} + +$prodids = array(); +$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; +$resql = $db->query($sql); +if ($resql) +{ + $num_prods = $db->num_rows($resql); + $i = 0; + while ($i < $num_prods) + { + $i++; + + $row = $db->fetch_row($resql); + $prodids[$i] = $row[0]; + } +} + +$i=0; +$result=0; +while ($i < GEN_NUMBER_FACTURE && $result >= 0) +{ + $i++; + $socid = rand(1, $num_socs); + + print "Invoice ".$i." for socid ".$socid; + + $facture = new Facture($db); + $facture->date = time(); + $facture->cond_reglement_id = 3; + $facture->mode_reglement_id = 3; + + $result=$facture->create($user); + if ($result >= 0) + { + $result=$facture->validate($user); + if ($result) + { + $nbp = rand(2, 5); + $xnbp = 0; + while ($xnbp < $nbp) + { + $prodid = rand(1, $num_prods); + $product=new Product($db); + $result=$product->fetch($prodids[$prodid]); + $result=$facture->addline($product->description, $product->price, rand(1,5), 0, 0, 0, $prodids[$prodid], 0, '', '', 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type); + if ($result < 0) + { + dol_print_error($db,$propal->error); + } + $xnbp++; + } + + print " OK with ref ".$facture->ref."\n";; + } + else + { + dol_print_error($db,$facture->error); + } + } + else + { + dol_print_error($db,$facture->error); + } + +} + + diff --git a/dev/initdata/generate-order.php b/dev/initdata/generate-order.php new file mode 100755 index 00000000000..082d5428c97 --- /dev/null +++ b/dev/initdata/generate-order.php @@ -0,0 +1,214 @@ +#!/usr/bin/env php + + * Copyright (C) 2004-2007 Laurent Destailleur + * + * 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 3 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, see . + * + * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION + */ + +/** + * \file dev/initdata/generate-order.php + * \brief Script example to inject random orders (for load tests) + */ + +// Test si mode batch +$sapi_type = php_sapi_name(); +if (substr($sapi_type, 0, 3) == 'cgi') { + echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer mailing-send.php en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n"; + exit; +} + +// Recupere root dolibarr +$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]); +require ($path."../../htdocs/master.inc.php"); +include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; +include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; + + +/* + * Parametre + */ + +define(GEN_NUMBER_COMMANDE, 10); + + +$ret=$user->fetch('','admin'); +if ($ret <= 0) +{ + print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; + exit; +} +$user->getrights(); + + +$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); +$resql=$db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $row = $db->fetch_row($resql); + $societesid[$i] = $row[0]; + $i++; + } +} +else { print "err"; } + +$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array(); +$resql=$db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $row = $db->fetch_row($resql); + $commandesid[$i] = $row[0]; + $i++; + } +} +else { print "err"; } + + +$prodids = array(); +$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; +$resql = $db->query($sql); +if ($resql) +{ + $num_prods = $db->num_rows($resql); + $i = 0; + while ($i < $num_prods) + { + $i++; + + $row = $db->fetch_row($resql); + $prodids[$i] = $row[0]; + } +} + + +$dates = array (mktime(12,0,0,1,3,2003), + mktime(12,0,0,1,9,2003), + mktime(12,0,0,2,13,2003), + mktime(12,0,0,2,23,2003), + mktime(12,0,0,3,30,2003), + mktime(12,0,0,4,3,2003), + mktime(12,0,0,4,3,2003), + mktime(12,0,0,5,9,2003), + mktime(12,0,0,5,1,2003), + mktime(12,0,0,5,13,2003), + mktime(12,0,0,5,19,2003), + mktime(12,0,0,5,23,2003), + mktime(12,0,0,6,3,2003), + mktime(12,0,0,6,19,2003), + mktime(12,0,0,6,24,2003), + mktime(12,0,0,7,3,2003), + mktime(12,0,0,7,9,2003), + mktime(12,0,0,7,23,2003), + mktime(12,0,0,7,30,2003), + mktime(12,0,0,8,9,2003), + mktime(12,0,0,9,23,2003), + mktime(12,0,0,10,3,2003), + mktime(12,0,0,11,12,2003), + mktime(12,0,0,11,13,2003), + mktime(12,0,0,1,3,2002), + mktime(12,0,0,1,9,2002), + mktime(12,0,0,2,13,2002), + mktime(12,0,0,2,23,2002), + mktime(12,0,0,3,30,2002), + mktime(12,0,0,4,3,2002), + mktime(12,0,0,4,3,2002), + mktime(12,0,0,5,9,2002), + mktime(12,0,0,5,1,2002), + mktime(12,0,0,5,13,2002), + mktime(12,0,0,5,19,2002), + mktime(12,0,0,5,23,2002), + mktime(12,0,0,6,3,2002), + mktime(12,0,0,6,19,2002), + mktime(12,0,0,6,24,2002), + mktime(12,0,0,7,3,2002), + mktime(12,0,0,7,9,2002), + mktime(12,0,0,7,23,2002), + mktime(12,0,0,7,30,2002), + mktime(12,0,0,8,9,2002), + mktime(12,0,0,9,23,2002), + mktime(12,0,0,10,3,2002), + mktime(12,0,0,11,12,2003), + mktime(12,0,0,11,13,2003), + mktime(12,0,0,12,12,2003), + mktime(12,0,0,12,13,2003), + ); + +require(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php"); + + +print "Build ".GEN_NUMBER_COMMANDE." orders\n"; +for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++) +{ + print "Process order ".$s."\n"; + + $com = new Commande($db); + + $com->socid = 4; + $com->date_commande = $dates[rand(1, count($dates)-1)]; + $com->note = 'A comment'; + $com->source = 1; + $com->fk_project = 0; + $com->remise_percent = 0; + + $db->begin(); + + $result=$com->create($user); + if ($result >= 0) + { + $result=$com->valid($user); + if ($result > 0) + { + $nbp = rand(2, 5); + $xnbp = 0; + while ($xnbp < $nbp) + { + $prodid = rand(1, $num_prods); + $product=new Product($db); + $result=$product->fetch($prodids[$prodid]); + $result=$com->addline($product->description, $product->price, rand(1,5), 0, 0, 0, $prodids[$prodid], 0, 0, 0, $product->price_base_type, $product->price_ttc, '', '', $product->type); + if ($result < 0) + { + dol_print_error($db,$propal->error); + } + $xnbp++; + } + + $db->commit(); + print " OK with ref ".$com->ref."\n"; + } + else + { + print " KO\n"; + $db->rollback(); + dol_print_error($db,$com->error); + } + } + else + { + print " KO\n"; + $db->rollback(); + dol_print_error($db,$com->error); + } +} + diff --git a/dev/initdata/generate-product.php b/dev/initdata/generate-product.php new file mode 100755 index 00000000000..975fc1ba33d --- /dev/null +++ b/dev/initdata/generate-product.php @@ -0,0 +1,100 @@ +#!/usr/bin/env php + + * Copyright (C) 2004-2010 Laurent Destailleur + * + * 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 3 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, see . + * + * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION + */ + +/** + * \file dev/initdata/generate-product.php + * \brief Script example to inject random products (for load tests) + */ + +// Test si mode batch +$sapi_type = php_sapi_name(); +if (substr($sapi_type, 0, 3) == 'cgi') { + echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer mailing-send.php en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n"; + exit; +} + +// Recupere root dolibarr +$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]); +require ($path."../../htdocs/master.inc.php"); +include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; +include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; + + +/* + * Parameters + */ + +define(GEN_NUMBER_PRODUIT, 100000); + + +$ret=$user->fetch('','admin'); +if (! $ret > 0) +{ + print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; + exit; +} +$user->getrights(); + + +$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array(); +$resql=$db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); $i = 0; + while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; } +} + +$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); +$resql=$db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); $i = 0; + while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; } +} else { print "err"; } + +$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array(); +$resql=$db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); $i = 0; + while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; } +} else { print "err"; } + + +print "Generates ".GEN_NUMBER_PRODUIT." products\n"; +for ($s = 0 ; $s < GEN_NUMBER_PRODUIT ; $s++) +{ + print "Product ".$s; + $produit = new Product($db); + $produit->type = rand(0,1); + $produit->status = 1; + $produit->ref = ($produit->type?'S':'P').time().$s; + $produit->label = 'Label '.time().$s; + $produit->description = 'Description '.time().$s; + $produit->price = rand(1,1000); + $produit->tva_tx = "19.6"; + $ret=$produit->create($user); + if ($ret < 0) print "Error $ret - ".$produit->error."\n"; + else print " OK with ref ".$produit->ref."\n"; +} + + diff --git a/dev/initdata/generate-produit.php b/dev/initdata/generate-produit.php deleted file mode 100755 index 6e7ea6dd05f..00000000000 --- a/dev/initdata/generate-produit.php +++ /dev/null @@ -1,100 +0,0 @@ -#!/usr/bin/php - - * Copyright (C) 2004-2010 Laurent Destailleur - * - * 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 3 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, see . - * - * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION - */ - -/** - * \file dev/initdata/generate-produit.php - * \brief Script de generation de donnees aleatoires pour les produits - */ - -// Test si mode batch -$sapi_type = php_sapi_name(); -if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer mailing-send.php en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n"; - exit; -} - -// Recupere root dolibarr -$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]); -require ($path."../../htdocs/master.inc.php"); -include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; -include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; -include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; - - -/* - * Parameters - */ - -define(GEN_NUMBER_PRODUIT, 100000); - - -$ret=$user->fetch('','admin'); -if (! $ret > 0) -{ - print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; - exit; -} -$user->getrights(); - - -$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array(); -$resql=$db->query($sql); -if ($resql) { - $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; } -} - -$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); -$resql=$db->query($sql); -if ($resql) { - $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; } -} else { print "err"; } - -$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array(); -$resql=$db->query($sql); -if ($resql) { - $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; } -} else { print "err"; } - - -print "Generates ".GEN_NUMBER_PRODUIT." products\n"; -for ($s = 0 ; $s < GEN_NUMBER_PRODUIT ; $s++) -{ - print "Product ".$s; - $produit = new Product($db); - $produit->type = rand(0,1); - $produit->status = 1; - $produit->ref = ($produit->type?'S':'P').time().$s; - $produit->label = 'Label '.time().$s; - $produit->description = 'Description '.time().$s; - $produit->price = rand(1,1000); - $produit->tva_tx = "19.6"; - $ret=$produit->create($user); - if ($ret < 0) print "Error $ret - ".$produit->error."\n"; - else print " OK with ref ".$produit->ref."\n"; -} - - diff --git a/dev/initdata/generate-propale.php b/dev/initdata/generate-propale.php deleted file mode 100755 index b7b76ec2c02..00000000000 --- a/dev/initdata/generate-propale.php +++ /dev/null @@ -1,165 +0,0 @@ -#!/usr/bin/php - - * Copyright (C) 2007 Laurent Destailleur - * - * 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 3 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, see . - * - * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION - */ - -/** - * \file dev/initdata/generate-propale.php - * \brief Script de generation de donnees aleatoires pour les propales - */ - -// Test si mode batch -$sapi_type = php_sapi_name(); -if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer mailing-send.php en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n"; - exit; -} - -// Recupere root dolibarr -$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]); -require ($path."../../htdocs/master.inc.php"); -require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); -require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php"); -require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php"); -require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); - -/* - * Parameters - */ - -define(GEN_NUMBER_PROPAL, 5); - - -$ret=$user->fetch('','admin'); -if (! $ret > 0) -{ - print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; - exit; -} -$user->getrights(); - - -$socids = array(); -$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client=1"; -$resql = $db->query($sql); -if ($resql) -{ - $num_socs = $db->num_rows($resql); - $i = 0; - while ($i < $num_socs) - { - $i++; - - $row = $db->fetch_row($resql); - $socids[$i] = $row[0]; - } -} - -$contids = array(); -$sql = "SELECT rowid, fk_soc FROM ".MAIN_DB_PREFIX."socpeople"; -$resql = $db->query($sql); -if ($resql) -{ - $num_conts = $db->num_rows($resql); - $i = 0; - while ($i < $num_conts) - { - $i++; - - $row = $db->fetch_row($resql); - $contids[$row[1]][0] = $row[0]; // A ameliorer - } -} - -$prodids = array(); -$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; -$resql = $db->query($sql); -if ($resql) -{ - $num_prods = $db->num_rows($resql); - $i = 0; - while ($i < $num_prods) - { - $i++; - - $row = $db->fetch_row($resql); - $prodids[$i] = $row[0]; - } -} - -$user->rights->propal->creer=1; -$user->rights->propal->propal_advance->validate=1; - - -if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php")) -{ - require_once(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"); -} - -$i=0; -$result=0; -while ($i < GEN_NUMBER_PROPAL && $result >= 0) -{ - $i++; - $socid = rand(1, $num_socs); - print "Proposal ".$i." for socid ".$socid; - - $soc = new Societe($db); - - - $propal = new Propal($db); - - $obj = $conf->global->PROPALE_ADDON; - $modPropale = new $obj; - $numpr = $modPropale->getNextValue($soc,$propal); - - $propal->ref = $numpr; - $propal->contactid = $contids[$socids[$socid]][0]; - $propal->socid = $socids[$socid]; - $propal->datep = time(); - $propal->cond_reglement_id = 3; - $propal->mode_reglement_id = 3; - $propal->author = $user->id; - - $result=$propal->create($user); - if ($result >= 0) - { - $nbp = rand(2, 5); - $xnbp = 0; - while ($xnbp < $nbp) - { - $prodid = rand(1, $num_prods); - $product=new Product($db); - $result=$product->fetch($prodids[$prodid]); - $result=$propal->addline($product->description, $product->price, rand(1,5), 0, 0, 0, $prodids[$prodid], 0); - if ($result < 0) - { - dol_print_error($db,$propal->error); - } - $xnbp++; - } - print " OK with ref ".$propal->ref."\n"; - } - else - { - dol_print_error($db,$propal->error); - } - -} - diff --git a/dev/initdata/generate-proposal.php b/dev/initdata/generate-proposal.php new file mode 100755 index 00000000000..8d413a518c1 --- /dev/null +++ b/dev/initdata/generate-proposal.php @@ -0,0 +1,165 @@ +#!/usr/bin/env php + + * Copyright (C) 2007 Laurent Destailleur + * + * 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 3 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, see . + * + * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION + */ + +/** + * \file dev/initdata/generate-proposal.php + * \brief Script example to inject random proposals (for load tests) + */ + +// Test si mode batch +$sapi_type = php_sapi_name(); +if (substr($sapi_type, 0, 3) == 'cgi') { + echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer mailing-send.php en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n"; + exit; +} + +// Recupere root dolibarr +$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]); +require ($path."../../htdocs/master.inc.php"); +require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php"); +require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php"); +require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php"); +require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php"); + +/* + * Parameters + */ + +define(GEN_NUMBER_PROPAL, 5); + + +$ret=$user->fetch('','admin'); +if (! $ret > 0) +{ + print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; + exit; +} +$user->getrights(); + + +$socids = array(); +$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe WHERE client=1"; +$resql = $db->query($sql); +if ($resql) +{ + $num_socs = $db->num_rows($resql); + $i = 0; + while ($i < $num_socs) + { + $i++; + + $row = $db->fetch_row($resql); + $socids[$i] = $row[0]; + } +} + +$contids = array(); +$sql = "SELECT rowid, fk_soc FROM ".MAIN_DB_PREFIX."socpeople"; +$resql = $db->query($sql); +if ($resql) +{ + $num_conts = $db->num_rows($resql); + $i = 0; + while ($i < $num_conts) + { + $i++; + + $row = $db->fetch_row($resql); + $contids[$row[1]][0] = $row[0]; // A ameliorer + } +} + +$prodids = array(); +$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; +$resql = $db->query($sql); +if ($resql) +{ + $num_prods = $db->num_rows($resql); + $i = 0; + while ($i < $num_prods) + { + $i++; + + $row = $db->fetch_row($resql); + $prodids[$i] = $row[0]; + } +} + +$user->rights->propal->creer=1; +$user->rights->propal->propal_advance->validate=1; + + +if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php")) +{ + require_once(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"); +} + +$i=0; +$result=0; +while ($i < GEN_NUMBER_PROPAL && $result >= 0) +{ + $i++; + $socid = rand(1, $num_socs); + print "Proposal ".$i." for socid ".$socid; + + $soc = new Societe($db); + + + $propal = new Propal($db); + + $obj = $conf->global->PROPALE_ADDON; + $modPropale = new $obj; + $numpr = $modPropale->getNextValue($soc,$propal); + + $propal->ref = $numpr; + $propal->contactid = $contids[$socids[$socid]][0]; + $propal->socid = $socids[$socid]; + $propal->datep = time(); + $propal->cond_reglement_id = 3; + $propal->mode_reglement_id = 3; + $propal->author = $user->id; + + $result=$propal->create($user); + if ($result >= 0) + { + $nbp = rand(2, 5); + $xnbp = 0; + while ($xnbp < $nbp) + { + $prodid = rand(1, $num_prods); + $product=new Product($db); + $result=$product->fetch($prodids[$prodid]); + $result=$propal->addline($product->description, $product->price, rand(1,5), 0, 0, 0, $prodids[$prodid], 0); + if ($result < 0) + { + dol_print_error($db,$propal->error); + } + $xnbp++; + } + print " OK with ref ".$propal->ref."\n"; + } + else + { + dol_print_error($db,$propal->error); + } + +} + diff --git a/dev/initdata/generate-societe.php b/dev/initdata/generate-societe.php deleted file mode 100755 index 72e4d9b1e84..00000000000 --- a/dev/initdata/generate-societe.php +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/php - - * Copyright (C) 2006-2013 Laurent Destailleur - * - * 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 3 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, see . - * - * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION - */ - -/** - * \file dev/initdata/generate-societe.php - * \brief Script de generation de donnees aleatoires pour les societes - */ - -// Test si mode batch -$sapi_type = php_sapi_name(); -if (substr($sapi_type, 0, 3) == 'cgi') { - echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer mailing-send.php en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n"; - exit; -} - -// Recupere root dolibarr -$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]); -require ($path."../../htdocs/master.inc.php"); -include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; -include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; -include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; -include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; - -$listoftown = array("Auray","Baden","Vannes","Pirouville","Haguenau","Souffelweiersheim","Illkirch-Graffenstaden","Lauterbourg","Picauville","Sainte-Mère Eglise","Le Bono"); -$listoflastname = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Dorothee","Saby","Brigitte","Karine","Jose-Anne","Celine","Virginie"); - - -/* - * Parametre - */ - -define(GEN_NUMBER_SOCIETE, 10); - - -$ret=$user->fetch('','admin'); -if (! $ret > 0) -{ - print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; - exit; -} -$user->getrights(); - - -$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array(); -$resql=$db->query($sql); -if ($resql) { - $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; } -} - -$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); -$resql=$db->query($sql); -if ($resql) { - $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; } -} else { print "err"; } - -$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array(); -$resql=$db->query($sql); -if ($resql) { - $num = $db->num_rows($resql); $i = 0; - while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; } -} else { print "err"; } - - - -print "Generates ".GEN_NUMBER_SOCIETE." companies\n"; -for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++) -{ - print "Company $s\n"; - $soc = new Societe($db); - $soc->name = "Company num ".time()."$s"; - $soc->town = $listoftown[rand(0, count($listoftown)-1)]; - $soc->client = rand(1,2); // Une societe sur 2 est prospect, l'autre client - $soc->fournisseur = rand(0,1); // Une societe sur 2 est fournisseur - $soc->code_client='CU'.time()."$s"; - $soc->code_fournisseur='SU'.time()."$s"; - $soc->tva_assuj=1; - $soc->country_id=1; - $soc->country_code='FR'; - // Un client sur 3 a une remise de 5% - $user_remise=rand(1,3); if ($user_remise==3) $soc->remise_percent=5; - print "> client=".$soc->client.", fournisseur=".$soc->fournisseur.", remise=".$soc->remise_percent."\n"; - $soc->note_private = 'Company created by the script generate-societe.php'; - $socid = $soc->create(); - - if ($socid >= 0) - { - $rand = rand(1,4); - print "> Generates $rand contact(s)\n"; - for ($c = 0 ; $c < $rand ; $c++) - { - $contact = new Contact($db); - $contact->socid = $soc->id; - $contact->lastname = "Lastname".$c; - $contact->firstname = $listoflastname[rand(0, count($listoflastname)-1)]; - if ( $contact->create($user) ) - { - - } - } - - print "Company ".$s." created nom=".$soc->name."\n"; - } - else - { - print "Error: ".$soc->error."\n"; - } -} - - diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php new file mode 100755 index 00000000000..d6e9d4c9393 --- /dev/null +++ b/dev/initdata/generate-thirdparty.php @@ -0,0 +1,131 @@ +#!/usr/bin/env php + + * Copyright (C) 2006-2013 Laurent Destailleur + * + * 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 3 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, see . + * + * ATTENTION DE PAS EXECUTER CE SCRIPT SUR UNE INSTALLATION DE PRODUCTION + */ + +/** + * \file dev/initdata/generate-thirdparty.php + * \brief Script example to inject random thirdparties (for load tests) + */ + +// Test si mode batch +$sapi_type = php_sapi_name(); +if (substr($sapi_type, 0, 3) == 'cgi') { + echo "Erreur: Vous utilisez l'interpreteur PHP pour le mode CGI. Pour executer mailing-send.php en ligne de commande, vous devez utiliser l'interpreteur PHP pour le mode CLI.\n"; + exit; +} + +// Recupere root dolibarr +$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]); +require ($path."../../htdocs/master.inc.php"); +include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; +include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; +include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; + +$listoftown = array("Auray","Baden","Vannes","Pirouville","Haguenau","Souffelweiersheim","Illkirch-Graffenstaden","Lauterbourg","Picauville","Sainte-Mère Eglise","Le Bono"); +$listoflastname = array("Joe","Marc","Steve","Laurent","Nico","Isabelle","Dorothee","Saby","Brigitte","Karine","Jose-Anne","Celine","Virginie"); + + +/* + * Parametre + */ + +define(GEN_NUMBER_SOCIETE, 10); + + +$ret=$user->fetch('','admin'); +if (! $ret > 0) +{ + print 'A user with login "admin" and all permissions must be created to use this script.'."\n"; + exit; +} +$user->getrights(); + + +$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array(); +$resql=$db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); $i = 0; + while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; } +} + +$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array(); +$resql=$db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); $i = 0; + while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; } +} else { print "err"; } + +$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array(); +$resql=$db->query($sql); +if ($resql) { + $num = $db->num_rows($resql); $i = 0; + while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; } +} else { print "err"; } + + + +print "Generates ".GEN_NUMBER_SOCIETE." companies\n"; +for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++) +{ + print "Company $s\n"; + $soc = new Societe($db); + $soc->name = "Company num ".time()."$s"; + $soc->town = $listoftown[rand(0, count($listoftown)-1)]; + $soc->client = rand(1,2); // Une societe sur 2 est prospect, l'autre client + $soc->fournisseur = rand(0,1); // Une societe sur 2 est fournisseur + $soc->code_client='CU'.time()."$s"; + $soc->code_fournisseur='SU'.time()."$s"; + $soc->tva_assuj=1; + $soc->country_id=1; + $soc->country_code='FR'; + // Un client sur 3 a une remise de 5% + $user_remise=rand(1,3); if ($user_remise==3) $soc->remise_percent=5; + print "> client=".$soc->client.", fournisseur=".$soc->fournisseur.", remise=".$soc->remise_percent."\n"; + $soc->note_private = 'Company created by the script generate-societe.php'; + $socid = $soc->create(); + + if ($socid >= 0) + { + $rand = rand(1,4); + print "> Generates $rand contact(s)\n"; + for ($c = 0 ; $c < $rand ; $c++) + { + $contact = new Contact($db); + $contact->socid = $soc->id; + $contact->lastname = "Lastname".$c; + $contact->firstname = $listoflastname[rand(0, count($listoflastname)-1)]; + if ( $contact->create($user) ) + { + + } + } + + print "Company ".$s." created nom=".$soc->name."\n"; + } + else + { + print "Error: ".$soc->error."\n"; + } +} + + diff --git a/dev/initdata/img/mybigcompany.png b/dev/initdata/img/mybigcompany.png deleted file mode 100644 index 7b9747e073b..00000000000 Binary files a/dev/initdata/img/mybigcompany.png and /dev/null differ diff --git a/dev/initdata/img/printcompany.png b/dev/initdata/img/printcompany.png deleted file mode 100644 index f3e51e3b5a7..00000000000 Binary files a/dev/initdata/img/printcompany.png and /dev/null differ diff --git a/dev/initdata/mysqldump_dolibarr_3.8.0.sql b/dev/initdata/mysqldump_dolibarr_3.8.0.sql index ba88c642d41..2daea375c02 100644 --- a/dev/initdata/mysqldump_dolibarr_3.8.0.sql +++ b/dev/initdata/mysqldump_dolibarr_3.8.0.sql @@ -1,8 +1,8 @@ --- MySQL dump 10.13 Distrib 5.6.19, for debian-linux-gnu (x86_64) +-- MySQL dump 10.13 Distrib 5.6.27, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: dolibarr38 -- ------------------------------------------------------ --- Server version 5.6.19-0ubuntu0.14.04.1 +-- Server version 5.6.27-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -145,7 +145,7 @@ CREATE TABLE `llx_accountingaccount` ( LOCK TABLES `llx_accountingaccount` WRITE; /*!40000 ALTER TABLE `llx_accountingaccount` DISABLE KEYS */; -INSERT INTO `llx_accountingaccount` VALUES (1,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','CAPITAL','101','1401','Capital',NULL,NULL,1),(2,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','105','1401','Ecarts de réévaluation',NULL,NULL,1),(3,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','1061','1401','Réserve légale',NULL,NULL,1),(4,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','1063','1401','Réserves statutaires ou contractuelles',NULL,NULL,1),(5,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','1064','1401','Réserves réglementées',NULL,NULL,1),(6,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','1068','1401','Autres réserves',NULL,NULL,1),(7,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','108','1401','Compte de l\'exploitant',NULL,NULL,1),(8,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','12','1401','Résultat de l\'exercice',NULL,NULL,1),(9,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','145','1401','Amortissements dérogatoires',NULL,NULL,1),(10,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','146','1401','Provision spéciale de réévaluation',NULL,NULL,1),(11,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','147','1401','Plus-values réinvesties',NULL,NULL,1),(12,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','148','1401','Autres provisions réglementées',NULL,NULL,1),(13,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','15','1401','Provisions pour risques et charges',NULL,NULL,1),(14,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','16','1401','Emprunts et dettes assimilees',NULL,NULL,1),(15,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','20','1402','Immobilisations incorporelles',NULL,NULL,1),(16,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','201','15','Frais d\'établissement',NULL,NULL,1),(17,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','206','15','Droit au bail',NULL,NULL,1),(18,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','207','15','Fonds commercial',NULL,NULL,1),(19,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','208','15','Autres immobilisations incorporelles',NULL,NULL,1),(20,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','21','1402','Immobilisations corporelles',NULL,NULL,1),(21,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','23','1402','Immobilisations en cours',NULL,NULL,1),(22,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','27','1402','Autres immobilisations financieres',NULL,NULL,1),(23,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','280','1402','Amortissements des immobilisations incorporelles',NULL,NULL,1),(24,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','281','1402','Amortissements des immobilisations corporelles',NULL,NULL,1),(25,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','290','1402','Provisions pour dépréciation des immobilisations incorporelles',NULL,NULL,1),(26,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','291','1402','Provisions pour dépréciation des immobilisations corporelles',NULL,NULL,1),(27,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','297','1402','Provisions pour dépréciation des autres immobilisations financières',NULL,NULL,1),(28,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','STOCK','XXXXXX','31','1403','Matieres premières',NULL,NULL,1),(29,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','STOCK','XXXXXX','32','1403','Autres approvisionnements',NULL,NULL,1),(30,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','STOCK','XXXXXX','33','1403','En-cours de production de biens',NULL,NULL,1),(31,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','STOCK','XXXXXX','34','1403','En-cours de production de services',NULL,NULL,1),(32,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','STOCK','XXXXXX','35','1403','Stocks de produits',NULL,NULL,1),(33,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','STOCK','XXXXXX','37','1403','Stocks de marchandises',NULL,NULL,1),(34,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','STOCK','XXXXXX','391','1403','Provisions pour dépréciation des matières premières',NULL,NULL,1),(35,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','STOCK','XXXXXX','392','1403','Provisions pour dépréciation des autres approvisionnements',NULL,NULL,1),(36,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','STOCK','XXXXXX','393','1403','Provisions pour dépréciation des en-cours de production de biens',NULL,NULL,1),(37,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','STOCK','XXXXXX','394','1403','Provisions pour dépréciation des en-cours de production de services',NULL,NULL,1),(38,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','STOCK','XXXXXX','395','1403','Provisions pour dépréciation des stocks de produits',NULL,NULL,1),(39,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','STOCK','XXXXXX','397','1403','Provisions pour dépréciation des stocks de marchandises',NULL,NULL,1),(40,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','SUPPLIER','400','1404','Fournisseurs et Comptes rattachés',NULL,NULL,1),(41,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','409','1404','Fournisseurs débiteurs',NULL,NULL,1),(42,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','CUSTOMER','410','1404','Clients et Comptes rattachés',NULL,NULL,1),(43,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','419','1404','Clients créditeurs',NULL,NULL,1),(44,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','421','1404','Personnel',NULL,NULL,1),(45,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','428','1404','Personnel',NULL,NULL,1),(46,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','43','1404','Sécurité sociale et autres organismes sociaux',NULL,NULL,1),(47,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','444','1404','Etat - impôts sur bénéfice',NULL,NULL,1),(48,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','445','1404','Etat - Taxes sur chiffre affaires',NULL,NULL,1),(49,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','447','1404','Autres impôts, taxes et versements assimilés',NULL,NULL,1),(50,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','45','1404','Groupe et associes',NULL,NULL,1),(51,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','455','50','Associés',NULL,NULL,1),(52,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','46','1404','Débiteurs divers et créditeurs divers',NULL,NULL,1),(53,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','47','1404','Comptes transitoires ou d\'attente',NULL,NULL,1),(54,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','481','1404','Charges à répartir sur plusieurs exercices',NULL,NULL,1),(55,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','486','1404','Charges constatées d\'avance',NULL,NULL,1),(56,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','487','1404','Produits constatés d\'avance',NULL,NULL,1),(57,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','491','1404','Provisions pour dépréciation des comptes de clients',NULL,NULL,1),(58,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','496','1404','Provisions pour dépréciation des comptes de débiteurs divers',NULL,NULL,1),(59,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','FINAN','XXXXXX','50','1405','Valeurs mobilières de placement',NULL,NULL,1),(60,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','FINAN','BANK','51','1405','Banques, établissements financiers et assimilés',NULL,NULL,1),(61,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','FINAN','CASH','53','1405','Caisse',NULL,NULL,1),(62,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','FINAN','XXXXXX','54','1405','Régies d\'avance et accréditifs',NULL,NULL,1),(63,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','FINAN','XXXXXX','58','1405','Virements internes',NULL,NULL,1),(64,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','FINAN','XXXXXX','590','1405','Provisions pour dépréciation des valeurs mobilières de placement',NULL,NULL,1),(65,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','PRODUCT','60','1406','Achats',NULL,NULL,1),(66,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','603','65','Variations des stocks',NULL,NULL,1),(67,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','SERVICE','61','1406','Services extérieurs',NULL,NULL,1),(68,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','62','1406','Autres services extérieurs',NULL,NULL,1),(69,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','63','1406','Impôts, taxes et versements assimiles',NULL,NULL,1),(70,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','641','1406','Rémunérations du personnel',NULL,NULL,1),(71,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','644','1406','Rémunération du travail de l\'exploitant',NULL,NULL,1),(72,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','SOCIAL','645','1406','Charges de sécurité sociale et de prévoyance',NULL,NULL,1),(73,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','646','1406','Cotisations sociales personnelles de l\'exploitant',NULL,NULL,1),(74,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','65','1406','Autres charges de gestion courante',NULL,NULL,1),(75,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','66','1406','Charges financières',NULL,NULL,1),(76,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','67','1406','Charges exceptionnelles',NULL,NULL,1),(77,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','681','1406','Dotations aux amortissements et aux provisions',NULL,NULL,1),(78,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','686','1406','Dotations aux amortissements et aux provisions',NULL,NULL,1),(79,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','687','1406','Dotations aux amortissements et aux provisions',NULL,NULL,1),(80,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','691','1406','Participation des salariés aux résultats',NULL,NULL,1),(81,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','695','1406','Impôts sur les bénéfices',NULL,NULL,1),(82,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','697','1406','Imposition forfaitaire annuelle des sociétés',NULL,NULL,1),(83,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','699','1406','Produits',NULL,NULL,1),(84,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','PRODUCT','701','1407','Ventes de produits finis',NULL,NULL,1),(85,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','SERVICE','706','1407','Prestations de services',NULL,NULL,1),(86,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','PRODUCT','707','1407','Ventes de marchandises',NULL,NULL,1),(87,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','PRODUCT','708','1407','Produits des activités annexes',NULL,NULL,1),(88,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','709','1407','Rabais, remises et ristournes accordés par l\'entreprise',NULL,NULL,1),(89,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','713','1407','Variation des stocks',NULL,NULL,1),(90,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','72','1407','Production immobilisée',NULL,NULL,1),(91,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','73','1407','Produits nets partiels sur opérations à long terme',NULL,NULL,1),(92,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','74','1407','Subventions d\'exploitation',NULL,NULL,1),(93,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','75','1407','Autres produits de gestion courante',NULL,NULL,1),(94,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','753','93','Jetons de présence et rémunérations d\'administrateurs, gérants,...',NULL,NULL,1),(95,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','754','93','Ristournes perçues des coopératives',NULL,NULL,1),(96,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','755','93','Quotes-parts de résultat sur opérations faites en commun',NULL,NULL,1),(97,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','76','1407','Produits financiers',NULL,NULL,1),(98,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','77','1407','Produits exceptionnels',NULL,NULL,1),(99,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','781','1407','Reprises sur amortissements et provisions',NULL,NULL,1),(100,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','786','1407','Reprises sur provisions pour risques',NULL,NULL,1),(101,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','787','1407','Reprises sur provisions',NULL,NULL,1),(102,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','79','1407','Transferts de charges',NULL,NULL,1),(103,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','10','1501','Capital et réserves',NULL,NULL,1),(104,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','CAPITAL','101','103','Capital',NULL,NULL,1),(105,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','104','103','Primes liées au capital social',NULL,NULL,1),(106,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','105','103','Ecarts de réévaluation',NULL,NULL,1),(107,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','106','103','Réserves',NULL,NULL,1),(108,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','107','103','Ecart d\'equivalence',NULL,NULL,1),(109,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','108','103','Compte de l\'exploitant',NULL,NULL,1),(110,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','109','103','Actionnaires : capital souscrit - non appelé',NULL,NULL,1),(111,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','11','1501','Report à nouveau (solde créditeur ou débiteur)',NULL,NULL,1),(112,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','110','111','Report à nouveau (solde créditeur)',NULL,NULL,1),(113,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','119','111','Report à nouveau (solde débiteur)',NULL,NULL,1),(114,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','12','1501','Résultat de l\'exercice (bénéfice ou perte)',NULL,NULL,1),(115,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','120','114','Résultat de l\'exercice (bénéfice)',NULL,NULL,1),(116,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','129','114','Résultat de l\'exercice (perte)',NULL,NULL,1),(117,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','13','1501','Subventions d\'investissement',NULL,NULL,1),(118,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','131','117','Subventions d\'équipement',NULL,NULL,1),(119,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','138','117','Autres subventions d\'investissement',NULL,NULL,1),(120,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','139','117','Subventions d\'investissement inscrites au compte de résultat',NULL,NULL,1),(121,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','14','1501','Provisions réglementées',NULL,NULL,1),(122,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','142','121','Provisions réglementées relatives aux immobilisations',NULL,NULL,1),(123,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','143','121','Provisions réglementées relatives aux stocks',NULL,NULL,1),(124,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','144','121','Provisions réglementées relatives aux autres éléments de l\'actif',NULL,NULL,1),(125,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','145','121','Amortissements dérogatoires',NULL,NULL,1),(126,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','146','121','Provision spéciale de réévaluation',NULL,NULL,1),(127,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','147','121','Plus-values réinvesties',NULL,NULL,1),(128,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','148','121','Autres provisions réglementées',NULL,NULL,1),(129,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','15','1501','Provisions pour risques et charges',NULL,NULL,1),(130,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','151','129','Provisions pour risques',NULL,NULL,1),(131,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','153','129','Provisions pour pensions et obligations similaires',NULL,NULL,1),(132,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','154','129','Provisions pour restructurations',NULL,NULL,1),(133,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','155','129','Provisions pour impôts',NULL,NULL,1),(134,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','156','129','Provisions pour renouvellement des immobilisations (entreprises concessionnaires)',NULL,NULL,1),(135,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','157','129','Provisions pour charges à répartir sur plusieurs exercices',NULL,NULL,1),(136,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','158','129','Autres provisions pour charges',NULL,NULL,1),(137,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','16','1501','Emprunts et dettes assimilees',NULL,NULL,1),(138,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','161','137','Emprunts obligataires convertibles',NULL,NULL,1),(139,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','163','137','Autres emprunts obligataires',NULL,NULL,1),(140,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','164','137','Emprunts auprès des établissements de crédit',NULL,NULL,1),(141,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','165','137','Dépôts et cautionnements reçus',NULL,NULL,1),(142,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','166','137','Participation des salariés aux résultats',NULL,NULL,1),(143,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','167','137','Emprunts et dettes assortis de conditions particulières',NULL,NULL,1),(144,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','168','137','Autres emprunts et dettes assimilées',NULL,NULL,1),(145,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','169','137','Primes de remboursement des obligations',NULL,NULL,1),(146,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','17','1501','Dettes rattachées à des participations',NULL,NULL,1),(147,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','171','146','Dettes rattachées à des participations (groupe)',NULL,NULL,1),(148,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','174','146','Dettes rattachées à des participations (hors groupe)',NULL,NULL,1),(149,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','178','146','Dettes rattachées à des sociétés en participation',NULL,NULL,1),(150,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','18','1501','Comptes de liaison des établissements et sociétés en participation',NULL,NULL,1),(151,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','181','150','Comptes de liaison des établissements',NULL,NULL,1),(152,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','186','150','Biens et prestations de services échangés entre établissements (charges)',NULL,NULL,1),(153,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','187','150','Biens et prestations de services échangés entre établissements (produits)',NULL,NULL,1),(154,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','188','150','Comptes de liaison des sociétés en participation',NULL,NULL,1),(155,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','20','1502','Immobilisations incorporelles',NULL,NULL,1),(156,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','201','155','Frais d\'établissement',NULL,NULL,1),(157,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','203','155','Frais de recherche et de développement',NULL,NULL,1),(158,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','205','155','Concessions et droits similaires, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',NULL,NULL,1),(159,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','206','155','Droit au bail',NULL,NULL,1),(160,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','207','155','Fonds commercial',NULL,NULL,1),(161,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','208','155','Autres immobilisations incorporelles',NULL,NULL,1),(162,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','21','1502','Immobilisations corporelles',NULL,NULL,1),(163,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','211','162','Terrains',NULL,NULL,1),(164,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','212','162','Agencements et aménagements de terrains',NULL,NULL,1),(165,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','213','162','Constructions',NULL,NULL,1),(166,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','214','162','Constructions sur sol d\'autrui',NULL,NULL,1),(167,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','215','162','Installations techniques, matériels et outillage industriels',NULL,NULL,1),(168,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','218','162','Autres immobilisations corporelles',NULL,NULL,1),(169,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','22','1502','Immobilisations mises en concession',NULL,NULL,1),(170,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','23','1502','Immobilisations en cours',NULL,NULL,1),(171,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','231','170','Immobilisations corporelles en cours',NULL,NULL,1),(172,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','232','170','Immobilisations incorporelles en cours',NULL,NULL,1),(173,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','237','170','Avances et acomptes versés sur immobilisations incorporelles',NULL,NULL,1),(174,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','238','170','Avances et acomptes versés sur commandes d\'immobilisations corporelles',NULL,NULL,1),(175,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','25','1502','Parts dans des entreprises liées et créances sur des entreprises liées',NULL,NULL,1),(176,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','26','1502','Participations et créances rattachées à des participations',NULL,NULL,1),(177,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','261','176','Titres de participation',NULL,NULL,1),(178,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','266','176','Autres formes de participation',NULL,NULL,1),(179,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','267','176','Créances rattachées à des participations',NULL,NULL,1),(180,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','268','176','Créances rattachées à des sociétés en participation',NULL,NULL,1),(181,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','269','176','Versements restant à effectuer sur titres de participation non libérés',NULL,NULL,1),(182,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','27','1502','Autres immobilisations financieres',NULL,NULL,1),(183,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','271','183','Titres immobilisés autres que les titres immobilisés de l\'activité de portefeuille (droit de propriété)',NULL,NULL,1),(184,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','272','183','Titres immobilisés (droit de créance)',NULL,NULL,1),(185,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','273','183','Titres immobilisés de l\'activité de portefeuille',NULL,NULL,1),(186,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','274','183','Prêts',NULL,NULL,1),(187,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','275','183','Dépôts et cautionnements versés',NULL,NULL,1),(188,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','276','183','Autres créances immobilisées',NULL,NULL,1),(189,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','277','183','(Actions propres ou parts propres)',NULL,NULL,1),(190,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','279','183','Versements restant à effectuer sur titres immobilisés non libérés',NULL,NULL,1),(191,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','28','1502','Amortissements des immobilisations',NULL,NULL,1),(192,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','280','191','Amortissements des immobilisations incorporelles',NULL,NULL,1),(193,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','281','191','Amortissements des immobilisations corporelles',NULL,NULL,1),(194,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','282','191','Amortissements des immobilisations mises en concession',NULL,NULL,1),(195,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','29','1502','Dépréciations des immobilisations',NULL,NULL,1),(196,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','290','195','Dépréciations des immobilisations incorporelles',NULL,NULL,1),(197,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','291','195','Dépréciations des immobilisations corporelles',NULL,NULL,1),(198,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','292','195','Dépréciations des immobilisations mises en concession',NULL,NULL,1),(199,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','293','195','Dépréciations des immobilisations en cours',NULL,NULL,1),(200,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','296','195','Provisions pour dépréciation des participations et créances rattachées à des participations',NULL,NULL,1),(201,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','297','195','Provisions pour dépréciation des autres immobilisations financières',NULL,NULL,1),(202,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','31','1503','Matières premières (et fournitures)',NULL,NULL,1),(203,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','311','202','Matières (ou groupe) A',NULL,NULL,1),(204,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','312','202','Matières (ou groupe) B',NULL,NULL,1),(205,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','317','202','Fournitures A, B, C,',NULL,NULL,1),(206,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','32','1503','Autres approvisionnements',NULL,NULL,1),(207,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','321','206','Matières consommables',NULL,NULL,1),(208,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','322','206','Fournitures consommables',NULL,NULL,1),(209,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','326','206','Emballages',NULL,NULL,1),(210,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','33','1503','En-cours de production de biens',NULL,NULL,1),(211,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','331','210','Produits en cours',NULL,NULL,1),(212,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','335','210','Travaux en cours',NULL,NULL,1),(213,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','34','1503','En-cours de production de services',NULL,NULL,1),(214,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','341','213','Etudes en cours',NULL,NULL,1),(215,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','345','213','Prestations de services en cours',NULL,NULL,1),(216,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','35','1503','Stocks de produits',NULL,NULL,1),(217,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','351','216','Produits intermédiaires',NULL,NULL,1),(218,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','355','216','Produits finis',NULL,NULL,1),(219,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','358','216','Produits résiduels (ou matières de récupération)',NULL,NULL,1),(220,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','37','1503','Stocks de marchandises',NULL,NULL,1),(221,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','371','220','Marchandises (ou groupe) A',NULL,NULL,1),(222,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','372','220','Marchandises (ou groupe) B',NULL,NULL,1),(223,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','39','1503','Provisions pour dépréciation des stocks et en-cours',NULL,NULL,1),(224,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','391','223','Provisions pour dépréciation des matières premières',NULL,NULL,1),(225,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','392','223','Provisions pour dépréciation des autres approvisionnements',NULL,NULL,1),(226,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','393','223','Provisions pour dépréciation des en-cours de production de biens',NULL,NULL,1),(227,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','394','223','Provisions pour dépréciation des en-cours de production de services',NULL,NULL,1),(228,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','395','223','Provisions pour dépréciation des stocks de produits',NULL,NULL,1),(229,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','397','223','Provisions pour dépréciation des stocks de marchandises',NULL,NULL,1),(230,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','40','1504','Fournisseurs et Comptes rattachés',NULL,NULL,1),(231,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','400','230','Fournisseurs et Comptes rattachés',NULL,NULL,1),(232,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','SUPPLIER','401','230','Fournisseurs',NULL,NULL,1),(233,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','403','230','Fournisseurs - Effets à payer',NULL,NULL,1),(234,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','404','230','Fournisseurs d\'immobilisations',NULL,NULL,1),(235,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','405','230','Fournisseurs d\'immobilisations - Effets à payer',NULL,NULL,1),(236,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','408','230','Fournisseurs - Factures non parvenues',NULL,NULL,1),(237,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','409','230','Fournisseurs débiteurs',NULL,NULL,1),(238,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','41','1504','Clients et comptes rattachés',NULL,NULL,1),(239,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','410','238','Clients et Comptes rattachés',NULL,NULL,1),(240,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','CUSTOMER','411','238','Clients',NULL,NULL,1),(241,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','413','238','Clients - Effets à recevoir',NULL,NULL,1),(242,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','416','238','Clients douteux ou litigieux',NULL,NULL,1),(243,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','418','238','Clients - Produits non encore facturés',NULL,NULL,1),(244,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','419','238','Clients créditeurs',NULL,NULL,1),(245,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','42','1504','Personnel et comptes rattachés',NULL,NULL,1),(246,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','421','245','Personnel - Rémunérations dues',NULL,NULL,1),(247,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','422','245','Comités d\'entreprises, d\'établissement, ...',NULL,NULL,1),(248,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','424','245','Participation des salariés aux résultats',NULL,NULL,1),(249,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','425','245','Personnel - Avances et acomptes',NULL,NULL,1),(250,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','426','245','Personnel - Dépôts',NULL,NULL,1),(251,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','427','245','Personnel - Oppositions',NULL,NULL,1),(252,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','428','245','Personnel - Charges à payer et produits à recevoir',NULL,NULL,1),(253,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','43','1504','Sécurité sociale et autres organismes sociaux',NULL,NULL,1),(254,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','431','253','Sécurité sociale',NULL,NULL,1),(255,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','437','253','Autres organismes sociaux',NULL,NULL,1),(256,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','438','253','Organismes sociaux - Charges à payer et produits à recevoir',NULL,NULL,1),(257,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','44','1504','État et autres collectivités publiques',NULL,NULL,1),(258,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','441','257','État - Subventions à recevoir',NULL,NULL,1),(259,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','442','257','Etat - Impôts et taxes recouvrables sur des tiers',NULL,NULL,1),(260,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','443','257','Opérations particulières avec l\'Etat, les collectivités publiques, les organismes internationaux',NULL,NULL,1),(261,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','444','257','Etat - Impôts sur les bénéfices',NULL,NULL,1),(262,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','445','257','Etat - Taxes sur le chiffre d\'affaires',NULL,NULL,1),(263,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','446','257','Obligations cautionnées',NULL,NULL,1),(264,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','447','257','Autres impôts, taxes et versements assimilés',NULL,NULL,1),(265,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','448','257','Etat - Charges à payer et produits à recevoir',NULL,NULL,1),(266,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','449','257','Quotas d\'émission à restituer à l\'Etat',NULL,NULL,1),(267,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','45','1504','Groupe et associes',NULL,NULL,1),(268,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','451','267','Groupe',NULL,NULL,1),(269,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','455','267','Associés - Comptes courants',NULL,NULL,1),(270,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','456','267','Associés - Opérations sur le capital',NULL,NULL,1),(271,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','457','267','Associés - Dividendes à payer',NULL,NULL,1),(272,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','458','267','Associés - Opérations faites en commun et en G.I.E.',NULL,NULL,1),(273,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','46','1504','Débiteurs divers et créditeurs divers',NULL,NULL,1),(274,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','462','273','Créances sur cessions d\'immobilisations',NULL,NULL,1),(275,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','464','273','Dettes sur acquisitions de valeurs mobilières de placement',NULL,NULL,1),(276,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','465','273','Créances sur cessions de valeurs mobilières de placement',NULL,NULL,1),(277,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','467','273','Autres comptes débiteurs ou créditeurs',NULL,NULL,1),(278,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','468','273','Divers - Charges à payer et produits à recevoir',NULL,NULL,1),(279,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','47','1504','Comptes transitoires ou d\'attente',NULL,NULL,1),(280,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','471','279','Comptes d\'attente',NULL,NULL,1),(281,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','476','279','Différence de conversion - Actif',NULL,NULL,1),(282,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','477','279','Différences de conversion - Passif',NULL,NULL,1),(283,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','478','279','Autres comptes transitoires',NULL,NULL,1),(284,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','48','1504','Comptes de régularisation',NULL,NULL,1),(285,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','481','284','Charges à répartir sur plusieurs exercices',NULL,NULL,1),(286,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','486','284','Charges constatées d\'avance',NULL,NULL,1),(287,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','487','284','Produits constatés d\'avance',NULL,NULL,1),(288,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','488','284','Comptes de répartition périodique des charges et des produits',NULL,NULL,1),(289,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','489','284','Quotas d\'émission alloués par l\'Etat',NULL,NULL,1),(290,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','49','1504','Provisions pour dépréciation des comptes de tiers',NULL,NULL,1),(291,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','491','290','Provisions pour dépréciation des comptes de clients',NULL,NULL,1),(292,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','495','290','Provisions pour dépréciation des comptes du groupe et des associés',NULL,NULL,1),(293,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','496','290','Provisions pour dépréciation des comptes de débiteurs divers',NULL,NULL,1),(294,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','50','1505','Valeurs mobilières de placement',NULL,NULL,1),(295,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','501','294','Parts dans des entreprises liées',NULL,NULL,1),(296,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','502','294','Actions propres',NULL,NULL,1),(297,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','503','294','Actions',NULL,NULL,1),(298,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','504','294','Autres titres conférant un droit de propriété',NULL,NULL,1),(299,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','505','294','Obligations et bons émis par la société et rachetés par elle',NULL,NULL,1),(300,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','506','294','Obligations',NULL,NULL,1),(301,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','507','294','Bons du Trésor et bons de caisse à court terme',NULL,NULL,1),(302,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','508','294','Autres valeurs mobilières de placement et autres créances assimilées',NULL,NULL,1),(303,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','509','294','Versements restant à effectuer sur valeurs mobilières de placement non libérées',NULL,NULL,1),(304,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','51','1505','Banques, établissements financiers et assimilés',NULL,NULL,1),(305,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','511','304','Valeurs à l\'encaissement',NULL,NULL,1),(306,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','BANK','512','304','Banques',NULL,NULL,1),(307,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','514','304','Chèques postaux',NULL,NULL,1),(308,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','515','304','\"Caisses\" du Trésor et des établissements publics',NULL,NULL,1),(309,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','516','304','Sociétés de bourse',NULL,NULL,1),(310,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','517','304','Autres organismes financiers',NULL,NULL,1),(311,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','518','304','Intérêts courus',NULL,NULL,1),(312,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','519','304','Concours bancaires courants',NULL,NULL,1),(313,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','52','1505','Instruments de trésorerie',NULL,NULL,1),(314,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','CASH','53','1505','Caisse',NULL,NULL,1),(315,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','531','314','Caisse siège social',NULL,NULL,1),(316,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','532','314','Caisse succursale (ou usine) A',NULL,NULL,1),(317,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','533','314','Caisse succursale (ou usine) B',NULL,NULL,1),(318,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','54','1505','Régies d\'avance et accréditifs',NULL,NULL,1),(319,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','58','1505','Virements internes',NULL,NULL,1),(320,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','59','1505','Provisions pour dépréciation des comptes financiers',NULL,NULL,1),(321,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','590','320','Provisions pour dépréciation des valeurs mobilières de placement',NULL,NULL,1),(322,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','PRODUCT','60','1506','Achats',NULL,NULL,1),(323,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','601','322','Achats stockés - Matières premières (et fournitures)',NULL,NULL,1),(324,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','602','322','Achats stockés - Autres approvisionnements',NULL,NULL,1),(325,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','603','322','Variations des stocks (approvisionnements et marchandises)',NULL,NULL,1),(326,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','604','322','Achats stockés - Matières premières (et fournitures)',NULL,NULL,1),(327,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','605','322','Achats de matériel, équipements et travaux',NULL,NULL,1),(328,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','606','322','Achats non stockés de matière et fournitures',NULL,NULL,1),(329,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','607','322','Achats de marchandises',NULL,NULL,1),(330,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','608','322','(Compte réservé, le cas échéant, à la récapitulation des frais accessoires incorporés aux achats)',NULL,NULL,1),(331,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','609','322','Rabais, remises et ristournes obtenus sur achats',NULL,NULL,1),(332,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','SERVICE','61','1506','Services extérieurs',NULL,NULL,1),(333,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','611','332','Sous-traitance générale',NULL,NULL,1),(334,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','612','332','Redevances de crédit-bail',NULL,NULL,1),(335,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','613','332','Locations',NULL,NULL,1),(336,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','614','332','Charges locatives et de copropriété',NULL,NULL,1),(337,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','615','332','Entretien et réparations',NULL,NULL,1),(338,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','616','332','Primes d\'assurances',NULL,NULL,1),(339,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','617','332','Etudes et recherches',NULL,NULL,1),(340,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','618','332','Divers',NULL,NULL,1),(341,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','619','332','Rabais, remises et ristournes obtenus sur services extérieurs',NULL,NULL,1),(342,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','62','1506','Autres services extérieurs',NULL,NULL,1),(343,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','621','342','Personnel extérieur à l\'entreprise',NULL,NULL,1),(344,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','622','342','Rémunérations d\'intermédiaires et honoraires',NULL,NULL,1),(345,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','623','342','Publicité, publications, relations publiques',NULL,NULL,1),(346,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','624','342','Transports de biens et transports collectifs du personnel',NULL,NULL,1),(347,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','625','342','Déplacements, missions et réceptions',NULL,NULL,1),(348,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','626','342','Frais postaux et de télécommunications',NULL,NULL,1),(349,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','627','342','Services bancaires et assimilés',NULL,NULL,1),(350,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','628','342','Divers',NULL,NULL,1),(351,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','629','342','Rabais, remises et ristournes obtenus sur autres services extérieurs',NULL,NULL,1),(352,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','63','1506','Impôts, taxes et versements assimilés',NULL,NULL,1),(353,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','631','352','Impôts, taxes et versements assimilés sur rémunérations (administrations des impôts)',NULL,NULL,1),(354,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','633','352','Impôts, taxes et versements assimilés sur rémunérations (autres organismes)',NULL,NULL,1),(355,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','635','352','Autres impôts, taxes et versements assimilés (administrations des impôts)',NULL,NULL,1),(356,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','637','352','Autres impôts, taxes et versements assimilés (autres organismes)',NULL,NULL,1),(357,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','64','1506','Charges de personnel',NULL,NULL,1),(358,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','641','357','Rémunérations du personnel',NULL,NULL,1),(359,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','644','357','Rémunération du travail de l\'exploitant',NULL,NULL,1),(360,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','SOCIAL','645','357','Charges de sécurité sociale et de prévoyance',NULL,NULL,1),(361,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','646','357','Cotisations sociales personnelles de l\'exploitant',NULL,NULL,1),(362,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','647','357','Autres charges sociales',NULL,NULL,1),(363,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','648','357','Autres charges de personnel',NULL,NULL,1),(364,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','65','1506','Autres charges de gestion courante',NULL,NULL,1),(365,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','651','364','Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',NULL,NULL,1),(366,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','653','364','Jetons de présence',NULL,NULL,1),(367,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','654','364','Pertes sur créances irrécouvrables',NULL,NULL,1),(368,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','655','364','Quote-part de résultat sur opérations faites en commun',NULL,NULL,1),(369,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','658','364','Charges diverses de gestion courante',NULL,NULL,1),(370,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','66','1506','Charges financières',NULL,NULL,1),(371,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','661','370','Charges d\'intérêts',NULL,NULL,1),(372,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','664','370','Pertes sur créances liées à des participations',NULL,NULL,1),(373,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','665','370','Escomptes accordés',NULL,NULL,1),(374,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','666','370','Pertes de change',NULL,NULL,1),(375,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','667','370','Charges nettes sur cessions de valeurs mobilières de placement',NULL,NULL,1),(376,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','668','370','Autres charges financières',NULL,NULL,1),(377,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','67','1506','Charges exceptionnelles',NULL,NULL,1),(378,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','671','377','Charges exceptionnelles sur opérations de gestion',NULL,NULL,1),(379,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','672','377','(Compte à la disposition des entités pour enregistrer, en cours d\'exercice, les charges sur exercices antérieurs)',NULL,NULL,1),(380,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','675','377','Valeurs comptables des éléments d\'actif cédés',NULL,NULL,1),(381,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','678','377','Autres charges exceptionnelles',NULL,NULL,1),(382,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','68','1506','Dotations aux amortissements et aux provisions',NULL,NULL,1),(383,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','681','382','Dotations aux amortissements et aux provisions - Charges d\'exploitation',NULL,NULL,1),(384,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','686','382','Dotations aux amortissements et aux provisions - Charges financières',NULL,NULL,1),(385,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','687','382','Dotations aux amortissements et aux provisions - Charges exceptionnelles',NULL,NULL,1),(386,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','69','1506','Participation des salariés - impôts sur les bénéfices et assimiles',NULL,NULL,1),(387,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','691','386','Participation des salariés aux résultats',NULL,NULL,1),(388,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','695','386','Impôts sur les bénéfices',NULL,NULL,1),(389,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','696','386','Suppléments d\'impôt sur les sociétés liés aux distributions',NULL,NULL,1),(390,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','697','386','Imposition forfaitaire annuelle des sociétés',NULL,NULL,1),(391,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','698','386','Intégration fiscale',NULL,NULL,1),(392,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','699','386','Produits - Reports en arrière des déficits',NULL,NULL,1),(393,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','70','1507','Ventes de produits fabriqués, prestations de services, marchandises',NULL,NULL,1),(394,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','PRODUCT','701','393','Ventes de produits finis',NULL,NULL,1),(395,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','702','393','Ventes de produits intermédiaires',NULL,NULL,1),(396,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','703','393','Ventes de produits résiduels',NULL,NULL,1),(397,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','704','393','Travaux',NULL,NULL,1),(398,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','705','393','Etudes',NULL,NULL,1),(399,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','SERVICE','706','393','Prestations de services',NULL,NULL,1),(400,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','PRODUCT','707','393','Ventes de marchandises',NULL,NULL,1),(401,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','PRODUCT','708','393','Produits des activités annexes',NULL,NULL,1),(402,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','709','393','Rabais, remises et ristournes accordés par l\'entreprise',NULL,NULL,1),(403,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','71','1507','Production stockée (ou déstockage)',NULL,NULL,1),(404,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','713','403','Variation des stocks (en-cours de production, produits)',NULL,NULL,1),(405,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','72','1507','Production immobilisée',NULL,NULL,1),(406,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','721','405','Immobilisations incorporelles',NULL,NULL,1),(407,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','722','405','Immobilisations corporelles',NULL,NULL,1),(408,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','74','1507','Subventions d\'exploitation',NULL,NULL,1),(409,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','75','1507','Autres produits de gestion courante',NULL,NULL,1),(410,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','751','409','Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',NULL,NULL,1),(411,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','752','409','Revenus des immeubles non affectés à des activités professionnelles',NULL,NULL,1),(412,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','753','409','Jetons de présence et rémunérations d\'administrateurs, gérants,...',NULL,NULL,1),(413,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','754','409','Ristournes perçues des coopératives (provenant des excédents)',NULL,NULL,1),(414,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','755','409','Quotes-parts de résultat sur opérations faites en commun',NULL,NULL,1),(415,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','758','409','Produits divers de gestion courante',NULL,NULL,1),(416,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','76','1507','Produits financiers',NULL,NULL,1),(417,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','761','416','Produits de participations',NULL,NULL,1),(418,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','762','416','Produits des autres immobilisations financières',NULL,NULL,1),(419,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','763','416','Revenus des autres créances',NULL,NULL,1),(420,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','764','416','Revenus des valeurs mobilières de placement',NULL,NULL,1),(421,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','765','416','Escomptes obtenus',NULL,NULL,1),(422,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','766','416','Gains de change',NULL,NULL,1),(423,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','767','416','Produits nets sur cessions de valeurs mobilières de placement',NULL,NULL,1),(424,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','768','416','Autres produits financiers',NULL,NULL,1),(425,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','77','1507','Produits exceptionnels',NULL,NULL,1),(426,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','771','425','Produits exceptionnels sur opérations de gestion',NULL,NULL,1),(427,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','772','425','(Compte à la disposition des entités pour enregistrer, en cours d\'exercice, les produits sur exercices antérieurs)',NULL,NULL,1),(428,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','775','425','Produits des cessions d\'éléments d\'actif',NULL,NULL,1),(429,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','777','425','Quote-part des subventions d\'investissement virée au résultat de l\'exercice',NULL,NULL,1),(430,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','778','425','Autres produits exceptionnels',NULL,NULL,1),(431,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','78','1507','Reprises sur amortissements et provisions',NULL,NULL,1),(432,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','781','431','Reprises sur amortissements et provisions (à inscrire dans les produits d\'exploitation)',NULL,NULL,1),(433,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','786','431','Reprises sur provisions pour risques (à inscrire dans les produits financiers)',NULL,NULL,1),(434,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','787','431','Reprises sur provisions (à inscrire dans les produits exceptionnels)',NULL,NULL,1),(435,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','79','1507','Transferts de charges',NULL,NULL,1),(436,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','791','435','Transferts de charges d\'exploitation ',NULL,NULL,1),(437,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','796','435','Transferts de charges financières',NULL,NULL,1),(438,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','797','435','Transferts de charges exceptionnelles',NULL,NULL,1),(439,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','10','1351','Capital',NULL,NULL,1),(440,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','100','439','Capital souscrit ou capital personnel',NULL,NULL,1),(441,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1000','440','Capital non amorti',NULL,NULL,1),(442,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1001','440','Capital amorti',NULL,NULL,1),(443,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','101','439','Capital non appelé',NULL,NULL,1),(444,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','109','439','Compte de l\'exploitant',NULL,NULL,1),(445,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1090','444','Opérations courantes',NULL,NULL,1),(446,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1091','444','Impôts personnels',NULL,NULL,1),(447,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1092','444','Rémunérations et autres avantages',NULL,NULL,1),(448,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','11','1351','Primes d\'émission',NULL,NULL,1),(449,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','12','1351','Plus-values de réévaluation',NULL,NULL,1),(450,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','120','449','Plus-values de réévaluation sur immobilisations incorporelles',NULL,NULL,1),(451,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1200','450','Plus-values de réévaluation',NULL,NULL,1),(452,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1201','450','Reprises de réductions de valeur',NULL,NULL,1),(453,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','121','449','Plus-values de réévaluation sur immobilisations corporelles',NULL,NULL,1),(454,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1210','453','Plus-values de réévaluation',NULL,NULL,1),(455,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1211','453','Reprises de réductions de valeur',NULL,NULL,1),(456,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','122','449','Plus-values de réévaluation sur immobilisations financières',NULL,NULL,1),(457,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1220','456','Plus-values de réévaluation',NULL,NULL,1),(458,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1221','456','Reprises de réductions de valeur',NULL,NULL,1),(459,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','123','449','Plus-values de réévaluation sur stocks',NULL,NULL,1),(460,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','124','449','Reprises de réductions de valeur sur placements de trésorerie',NULL,NULL,1),(461,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','13','1351','Réserve',NULL,NULL,1),(462,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','130','461','Réserve légale',NULL,NULL,1),(463,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','131','461','Réserves indisponibles',NULL,NULL,1),(464,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1310','463','Réserve pour actions propres',NULL,NULL,1),(465,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1311','463','Autres réserves indisponibles',NULL,NULL,1),(466,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','132','461','Réserves immunisées',NULL,NULL,1),(467,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','133','461','Réserves disponibles',NULL,NULL,1),(468,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1330','467','Réserve pour régularisation de dividendes',NULL,NULL,1),(469,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1331','467','Réserve pour renouvellement des immobilisations',NULL,NULL,1),(470,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1332','467','Réserve pour installations en faveur du personnel 1333 Réserves libres',NULL,NULL,1),(471,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','14','1351','Bénéfice reporté (ou perte reportée)',NULL,NULL,1),(472,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','15','1351','Subsides en capital',NULL,NULL,1),(473,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','150','472','Montants obtenus',NULL,NULL,1),(474,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','151','472','Montants transférés aux résultats',NULL,NULL,1),(475,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','16','1351','Provisions pour risques et charges',NULL,NULL,1),(476,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','160','475','Provisions pour pensions et obligations similaires',NULL,NULL,1),(477,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','161','475','Provisions pour charges fiscales',NULL,NULL,1),(478,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','162','475','Provisions pour grosses réparations et gros entretiens',NULL,NULL,1),(479,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','163','475','à 169 Provisions pour autres risques et charges',NULL,NULL,1),(480,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','164','475','Provisions pour sûretés personnelles ou réelles constituées à l\'appui de dettes et d\'engagements de tiers',NULL,NULL,1),(481,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','165','475','Provisions pour engagements relatifs à l\'acquisition ou à la cession d\'immobilisations',NULL,NULL,1),(482,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','166','475','Provisions pour exécution de commandes passées ou reçues',NULL,NULL,1),(483,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','167','475','Provisions pour positions et marchés à terme en devises ou positions et marchés à terme en marchandises',NULL,NULL,1),(484,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','168','475','Provisions pour garanties techniques attachées aux ventes et prestations déjà effectuées par l\'entreprise',NULL,NULL,1),(485,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','169','475','Provisions pour autres risques et charges',NULL,NULL,1),(486,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1690','485','Pour litiges en cours',NULL,NULL,1),(487,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1691','485','Pour amendes, doubles droits et pénalités',NULL,NULL,1),(488,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1692','485','Pour propre assureur',NULL,NULL,1),(489,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1693','485','Pour risques inhérents aux opérations de crédits à moyen ou long terme',NULL,NULL,1),(490,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1695','485','Provision pour charge de liquidation',NULL,NULL,1),(491,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1696','485','Provision pour départ de personnel',NULL,NULL,1),(492,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1699','485','Pour risques divers',NULL,NULL,1),(493,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17','1351','Dettes à plus d\'un an',NULL,NULL,1),(494,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','170','493','Emprunts subordonnés',NULL,NULL,1),(495,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1700','494','Convertibles',NULL,NULL,1),(496,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1701','494','Non convertibles',NULL,NULL,1),(497,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','171','493','Emprunts obligataires non subordonnés',NULL,NULL,1),(498,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1710','498','Convertibles',NULL,NULL,1),(499,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1711','498','Non convertibles',NULL,NULL,1),(500,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','172','493','Dettes de location-financement et assimilés',NULL,NULL,1),(501,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1720','500','Dettes de location-financement de biens immobiliers',NULL,NULL,1),(502,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1721','500','Dettes de location-financement de biens mobiliers',NULL,NULL,1),(503,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1722','500','Dettes sur droits réels sur immeubles',NULL,NULL,1),(504,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','173','493','Etablissements de crédit',NULL,NULL,1),(505,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1730','504','Dettes en compte',NULL,NULL,1),(506,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17300','505','Banque A',NULL,NULL,1),(507,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17301','505','Banque B',NULL,NULL,1),(508,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17302','505','Banque C',NULL,NULL,1),(509,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17303','505','Banque D',NULL,NULL,1),(510,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1731','504','Promesses',NULL,NULL,1),(511,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17310','510','Banque A',NULL,NULL,1),(512,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17311','510','Banque B',NULL,NULL,1),(513,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17312','510','Banque C',NULL,NULL,1),(514,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17313','510','Banque D',NULL,NULL,1),(515,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1732','504','Crédits d\'acceptation',NULL,NULL,1),(516,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17320','515','Banque A',NULL,NULL,1),(517,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17321','515','Banque B',NULL,NULL,1),(518,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17322','515','Banque C',NULL,NULL,1),(519,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17323','515','Banque D',NULL,NULL,1),(520,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','174','493','Autres emprunts',NULL,NULL,1),(521,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','175','493','Dettes commerciales',NULL,NULL,1),(522,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1750','521','Fournisseurs : dettes en compte',NULL,NULL,1),(523,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17500','522','Entreprises apparentées',NULL,NULL,1),(524,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','175000','523','Entreprises liées',NULL,NULL,1),(525,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','175001','523','Entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(526,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17501','522','Fournisseurs ordinaires',NULL,NULL,1),(527,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','175010','526','Fournisseurs belges',NULL,NULL,1),(528,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','175011','526','Fournisseurs C.E.E.',NULL,NULL,1),(529,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','175012','526','Fournisseurs importation',NULL,NULL,1),(530,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1751','521','Effets à payer',NULL,NULL,1),(531,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17510','530','Entreprises apparentées',NULL,NULL,1),(532,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','175100','531','Entreprises liées',NULL,NULL,1),(533,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','175101','531','Entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(534,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','17511','530','Fournisseurs ordinaires',NULL,NULL,1),(535,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','175110','534','Fournisseurs belges',NULL,NULL,1),(536,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','175111','534','Fournisseurs C.E.E.',NULL,NULL,1),(537,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','175112','534','Fournisseurs importation',NULL,NULL,1),(538,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','176','493','Acomptes reçus sur commandes',NULL,NULL,1),(539,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','178','493','Cautionnements reçus en numéraires',NULL,NULL,1),(540,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','179','493','Dettes diverses',NULL,NULL,1),(541,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1790','540','Entreprises liées',NULL,NULL,1),(542,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1791','540','Autres entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(543,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1792','540','Administrateurs, gérants et associés',NULL,NULL,1),(544,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1794','540','Rentes viagères capitalisées',NULL,NULL,1),(545,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1798','540','Dettes envers les coparticipants des associations momentanées et en participation',NULL,NULL,1),(546,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1799','540','Autres dettes diverses',NULL,NULL,1),(547,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','18','1351','Comptes de liaison des établissements et succursales',NULL,NULL,1),(548,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','20','1352','Frais d\'établissement',NULL,NULL,1),(549,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','200','548','Frais de constitution et d\'augmentation de capital',NULL,NULL,1),(550,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2000','549','Frais de constitution et d\'augmentation de capital',NULL,NULL,1),(551,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2009','549','Amortissements sur frais de constitution et d\'augmentation de capital',NULL,NULL,1),(552,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','201','548','Frais d\'émission d\'emprunts et primes de remboursement',NULL,NULL,1),(553,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2010','552','Agios sur emprunts et frais d\'émission d\'emprunts',NULL,NULL,1),(554,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2019','552','Amortissements sur agios sur emprunts et frais d\'émission d\'emprunts',NULL,NULL,1),(555,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','202','548','Autres frais d\'établissement',NULL,NULL,1),(556,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2020','555','Autres frais d\'établissement',NULL,NULL,1),(557,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2029','555','Amortissements sur autres frais d\'établissement',NULL,NULL,1),(558,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','203','548','Intérêts intercalaires',NULL,NULL,1),(559,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2030','558','Intérêts intercalaires',NULL,NULL,1),(560,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2039','558','Amortissements sur intérêts intercalaires',NULL,NULL,1),(561,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','204','548','Frais de restructuration',NULL,NULL,1),(562,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2040','561','Coût des frais de restructuration',NULL,NULL,1),(563,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2049','561','Amortissements sur frais de restructuration',NULL,NULL,1),(564,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','21','1352','Immobilisations incorporelles',NULL,NULL,1),(565,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','210','564','Frais de recherche et de développement',NULL,NULL,1),(566,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2100','565','Frais de recherche et de mise au point',NULL,NULL,1),(567,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2108','565','Plus-values actées sur frais de recherche et de mise au point',NULL,NULL,1),(568,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2109','565','Amortissements sur frais de recherche et de mise au point',NULL,NULL,1),(569,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','211','564','Concessions, brevets, licences, savoir-faire, marque et droits similaires',NULL,NULL,1),(570,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2110','569','Concessions, brevets, licences, marques, etc',NULL,NULL,1),(571,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2118','569','Plus-values actées sur concessions, etc',NULL,NULL,1),(572,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2119','569','Amortissements sur concessions, etc',NULL,NULL,1),(573,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','212','564','Goodwill',NULL,NULL,1),(574,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2120','573','Coût d\'acquisition',NULL,NULL,1),(575,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2128','573','Plus-values actées',NULL,NULL,1),(576,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2129','573','Amortissements sur goodwill',NULL,NULL,1),(577,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','213','564','Acomptes versés',NULL,NULL,1),(578,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22','1352','Terrains et constructions',NULL,NULL,1),(579,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','220','578','Terrains',NULL,NULL,1),(580,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2200','579','Terrains',NULL,NULL,1),(581,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2201','579','Frais d\'acquisition sur terrains',NULL,NULL,1),(582,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2208','579','Plus-values actées sur terrains',NULL,NULL,1),(583,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2209','579','Amortissements et réductions de valeur',NULL,NULL,1),(584,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22090','583','Amortissements sur frais d\'acquisition',NULL,NULL,1),(585,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22091','583','Réductions de valeur sur terrains',NULL,NULL,1),(586,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','221','578','Constructions',NULL,NULL,1),(587,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2210','586','Bâtiments industriels',NULL,NULL,1),(588,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2211','586','Bâtiments administratifs et commerciaux',NULL,NULL,1),(589,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2212','586','Autres bâtiments d\'exploitation',NULL,NULL,1),(590,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2213','586','Voies de transport et ouvrages d\'art',NULL,NULL,1),(591,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2215','586','Constructions sur sol d\'autrui',NULL,NULL,1),(592,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2216','586','Frais d\'acquisition sur constructions',NULL,NULL,1),(593,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2218','586','Plus-values actées',NULL,NULL,1),(594,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22180','593','Sur bâtiments industriels',NULL,NULL,1),(595,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22181','593','Sur bâtiments administratifs et commerciaux',NULL,NULL,1),(596,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22182','593','Sur autres bâtiments d\'exploitation',NULL,NULL,1),(597,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22184','593','Sur voies de transport et ouvrages d\'art',NULL,NULL,1),(598,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2219','586','Amortissements sur constructions',NULL,NULL,1),(599,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22190','598','Sur bâtiments industriels',NULL,NULL,1),(600,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22191','598','Sur bâtiments administratifs et commerciaux',NULL,NULL,1),(601,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22192','598','Sur autres bâtiments d\'exploitation',NULL,NULL,1),(602,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22194','598','Sur voies de transport et ouvrages d\'art',NULL,NULL,1),(603,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22195','598','Sur constructions sur sol d\'autrui',NULL,NULL,1),(604,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22196','598','Sur frais d\'acquisition sur constructions',NULL,NULL,1),(605,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','222','578','Terrains bâtis',NULL,NULL,1),(606,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2220','605','Valeur d\'acquisition',NULL,NULL,1),(607,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22200','606','Bâtiments industriels',NULL,NULL,1),(608,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22201','606','Bâtiments administratifs et commerciaux',NULL,NULL,1),(609,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22202','606','Autres bâtiments d\'exploitation',NULL,NULL,1),(610,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22203','606','Voies de transport et ouvrages d\'art',NULL,NULL,1),(611,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22204','606','Frais d\'acquisition des terrains à bâtir',NULL,NULL,1),(612,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2228','605','Plus-values actées',NULL,NULL,1),(613,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22280','612','Sur bâtiments industriels',NULL,NULL,1),(614,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22281','612','Sur bâtiments administratifs et commerciaux',NULL,NULL,1),(615,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22282','612','Sur autres bâtiments d\'exploitation',NULL,NULL,1),(616,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22283','612','Sur voies de transport et ouvrages d\'art',NULL,NULL,1),(617,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2229','605','Amortissements sur terrains bâtis',NULL,NULL,1),(618,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22290','617','Sur bâtiments industriels',NULL,NULL,1),(619,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22291','617','Sur bâtiments administratifs et commerciaux',NULL,NULL,1),(620,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22292','617','Sur autres bâtiments d\'exploitation',NULL,NULL,1),(621,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22293','617','Sur voies de transport et ouvrages d\'art',NULL,NULL,1),(622,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','22294','617','Sur frais d\'acquisition des terrains bâtis',NULL,NULL,1),(623,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','223','578','Autres droits réels sur des immeubles',NULL,NULL,1),(624,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2230','623','Valeur d\'acquisition',NULL,NULL,1),(625,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2238','623','Plus-values actées',NULL,NULL,1),(626,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2239','623','Amortissements',NULL,NULL,1),(627,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','23','1352','Installations, machines et outillages',NULL,NULL,1),(628,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','230','627','Installations',NULL,NULL,1),(629,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2300','628','Installations bâtiments industriels',NULL,NULL,1),(630,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2301','628','Installations bâtiments administratifs et commerciaux',NULL,NULL,1),(631,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2302','628','Installations bâtiments d\'exploitation',NULL,NULL,1),(632,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2303','628','Installations voies de transport et ouvrages d\'art',NULL,NULL,1),(633,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2300','628','Installation d\'eau',NULL,NULL,1),(634,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2301','628','Installation d\'électricité',NULL,NULL,1),(635,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2302','628','Installation de vapeur',NULL,NULL,1),(636,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2303','628','Installation de gaz',NULL,NULL,1),(637,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2304','628','Installation de chauffage',NULL,NULL,1),(638,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2305','628','Installation de conditionnement d\'air',NULL,NULL,1),(639,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2306','628','Installation de chargement',NULL,NULL,1),(640,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','231','627','Machines',NULL,NULL,1),(641,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2310','640','Division A',NULL,NULL,1),(642,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2311','640','Division B',NULL,NULL,1),(643,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2312','640','Division C',NULL,NULL,1),(644,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','237','627','Outillage',NULL,NULL,1),(645,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2370','644','Division A',NULL,NULL,1),(646,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2371','644','Division B',NULL,NULL,1),(647,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2372','644','Division C',NULL,NULL,1),(648,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','238','627','Plus-values actées',NULL,NULL,1),(649,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2380','648','Sur installations',NULL,NULL,1),(650,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2381','648','Sur machines',NULL,NULL,1),(651,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2382','648','Sur outillage',NULL,NULL,1),(652,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','239','627','Amortissements',NULL,NULL,1),(653,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2390','652','Sur installations',NULL,NULL,1),(654,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2391','652','Sur machines',NULL,NULL,1),(655,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2392','652','Sur outillage',NULL,NULL,1),(656,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24','1352','Mobilier et matériel roulant',NULL,NULL,1),(657,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','240','656','Mobilier',NULL,NULL,1),(658,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2400','656','Mobilier',NULL,NULL,1),(659,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24000','658','Mobilier des bâtiments industriels',NULL,NULL,1),(660,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24001','658','Mobilier des bâtiments administratifs et commerciaux',NULL,NULL,1),(661,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24002','658','Mobilier des autres bâtiments d\'exploitation',NULL,NULL,1),(662,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24003','658','Mobilier oeuvres sociales',NULL,NULL,1),(663,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2401','657','Matériel de bureau et de service social',NULL,NULL,1),(664,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24010','663','Des bâtiments industriels',NULL,NULL,1),(665,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24011','663','Des bâtiments administratifs et commerciaux',NULL,NULL,1),(666,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24012','663','Des autres bâtiments d\'exploitation',NULL,NULL,1),(667,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24013','663','Des oeuvres sociales',NULL,NULL,1),(668,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2408','657','Plus-values actées',NULL,NULL,1),(669,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24080','668','Plus-values actées sur mobilier',NULL,NULL,1),(670,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24081','668','Plus-values actées sur matériel de bureau et service social',NULL,NULL,1),(671,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2409','657','Amortissements',NULL,NULL,1),(672,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24090','671','Amortissements sur mobilier',NULL,NULL,1),(673,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24091','671','Amortissements sur matériel de bureau et service social',NULL,NULL,1),(674,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','241','656','Matériel roulant',NULL,NULL,1),(675,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2410','674','Matériel automobile',NULL,NULL,1),(676,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24100','675','Voitures',NULL,NULL,1),(677,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24105','675','Camions',NULL,NULL,1),(678,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2411','674','Matériel ferroviaire',NULL,NULL,1),(679,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2412','674','Matériel fluvial',NULL,NULL,1),(680,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2413','674','Matériel naval',NULL,NULL,1),(681,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2414','674','Matériel aérien',NULL,NULL,1),(682,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2418','674','Plus-values sur matériel roulant',NULL,NULL,1),(683,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24180','682','Plus-values sur matériel automobile',NULL,NULL,1),(684,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24181','682','Idem sur matériel ferroviaire',NULL,NULL,1),(685,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24182','682','Idem sur matériel fluvial',NULL,NULL,1),(686,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24183','682','Idem sur matériel naval',NULL,NULL,1),(687,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24184','682','Idem sur matériel aérien',NULL,NULL,1),(688,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2419','674','Amortissements sur matériel roulant',NULL,NULL,1),(689,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24190','688','Amortissements sur matériel automobile',NULL,NULL,1),(690,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24191','688','Idem sur matériel ferroviaire',NULL,NULL,1),(691,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24192','688','Idem sur matériel fluvial',NULL,NULL,1),(692,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24193','688','Idem sur matériel naval',NULL,NULL,1),(693,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','24194','688','Idem sur matériel aérien',NULL,NULL,1),(694,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','25','1352','Immobilisation détenues en location-financement et droits similaires',NULL,NULL,1),(695,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','250','694','Terrains et constructions',NULL,NULL,1),(696,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2500','695','Terrains',NULL,NULL,1),(697,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2501','695','Constructions',NULL,NULL,1),(698,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2508','695','Plus-values sur emphytéose, leasing et droits similaires : terrains et constructions',NULL,NULL,1),(699,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2509','695','Amortissements et réductions de valeur sur terrains et constructions en leasing',NULL,NULL,1),(700,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','251','694','Installations, machines et outillage',NULL,NULL,1),(701,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2510','700','Installations',NULL,NULL,1),(702,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2511','700','Machines',NULL,NULL,1),(703,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2512','700','Outillage',NULL,NULL,1),(704,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2518','700','Plus-values actées sur installations machines et outillage pris en leasing',NULL,NULL,1),(705,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2519','700','Amortissements sur installations machines et outillage pris en leasing',NULL,NULL,1),(706,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','252','694','Mobilier et matériel roulant',NULL,NULL,1),(707,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2520','706','Mobilier',NULL,NULL,1),(708,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2521','706','Matériel roulant',NULL,NULL,1),(709,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2528','706','Plus-values actées sur mobilier et matériel roulant en leasing',NULL,NULL,1),(710,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2529','706','Amortissements sur mobilier et matériel roulant en leasing',NULL,NULL,1),(711,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','26','1352','Autres immobilisations corporelles',NULL,NULL,1),(712,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','260','711','Frais d\'aménagements de locaux pris en location',NULL,NULL,1),(713,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','261','711','Maison d\'habitation',NULL,NULL,1),(714,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','262','711','Réserve immobilière',NULL,NULL,1),(715,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','263','711','Matériel d\'emballage',NULL,NULL,1),(716,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','264','711','Emballages récupérables',NULL,NULL,1),(717,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','268','711','Plus-values actées sur autres immobilisations corporelles',NULL,NULL,1),(718,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','269','711','Amortissements sur autres immobilisations corporelles',NULL,NULL,1),(719,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2690','718','Amortissements sur frais d\'aménagement des locaux pris en location',NULL,NULL,1),(720,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2691','718','Amortissements sur maison d\'habitation',NULL,NULL,1),(721,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2692','718','Amortissements sur réserve immobilière',NULL,NULL,1),(722,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2693','718','Amortissements sur matériel d\'emballage',NULL,NULL,1),(723,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2694','718','Amortissements sur emballages récupérables',NULL,NULL,1),(724,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','27','1352','Immobilisations corporelles en cours et acomptes versés',NULL,NULL,1),(725,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','270','724','Immobilisations en cours',NULL,NULL,1),(726,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2700','725','Constructions',NULL,NULL,1),(727,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2701','725','Installations machines et outillage',NULL,NULL,1),(728,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2702','725','Mobilier et matériel roulant',NULL,NULL,1),(729,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2703','725','Autres immobilisations corporelles',NULL,NULL,1),(730,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','271','724','Avances et acomptes versés sur immobilisations en cours',NULL,NULL,1),(731,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','28','1352','Immobilisations financières',NULL,NULL,1),(732,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','280','731','Participations dans des entreprises liées',NULL,NULL,1),(733,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2800','732','Valeur d\'acquisition (peut être subdivisé par participation)',NULL,NULL,1),(734,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2801','732','Montants non appelés (idem)',NULL,NULL,1),(735,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2808','732','Plus-values actées (idem)',NULL,NULL,1),(736,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2809','732','Réductions de valeurs actées (idem)',NULL,NULL,1),(737,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','281','731','Créances sur des entreprises liées',NULL,NULL,1),(738,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2810','737','Créances en compte',NULL,NULL,1),(739,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2811','737','Effets à recevoir',NULL,NULL,1),(740,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2812','737','Titres à revenu fixes',NULL,NULL,1),(741,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2817','737','Créances douteuses',NULL,NULL,1),(742,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2819','737','Réductions de valeurs actées',NULL,NULL,1),(743,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','282','731','Participations dans des entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(744,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2820','743','Valeur d\'acquisition (peut être subdivisé par participation)',NULL,NULL,1),(745,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2821','743','Montants non appelés (idem)',NULL,NULL,1),(746,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2828','743','Plus-values actées (idem)',NULL,NULL,1),(747,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2829','743','Réductions de valeurs actées (idem)',NULL,NULL,1),(748,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','283','731','Créances sur des entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(749,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2830','748','Créances en compte',NULL,NULL,1),(750,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2831','748','Effets à recevoir',NULL,NULL,1),(751,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2832','748','Titres à revenu fixe',NULL,NULL,1),(752,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2837','748','Créances douteuses',NULL,NULL,1),(753,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2839','748','Réductions de valeurs actées',NULL,NULL,1),(754,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','284','731','Autres actions et parts',NULL,NULL,1),(755,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2840','754','Valeur d\'acquisition',NULL,NULL,1),(756,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2841','754','Montants non appelés',NULL,NULL,1),(757,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2848','754','Plus-values actées',NULL,NULL,1),(758,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2849','754','Réductions de valeur actées',NULL,NULL,1),(759,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','285','731','Autres créances',NULL,NULL,1),(760,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2850','759','Créances en compte',NULL,NULL,1),(761,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2851','759','Effets à recevoir',NULL,NULL,1),(762,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2852','759','Titres à revenu fixe',NULL,NULL,1),(763,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2857','759','Créances douteuses',NULL,NULL,1),(764,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2859','759','Réductions de valeur actées',NULL,NULL,1),(765,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','288','731','Cautionnements versés en numéraires',NULL,NULL,1),(766,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2880','765','Téléphone, téléfax, télex',NULL,NULL,1),(767,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2881','765','Gaz',NULL,NULL,1),(768,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2882','765','Eau',NULL,NULL,1),(769,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2883','765','Electricité',NULL,NULL,1),(770,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2887','765','Autres cautionnements versés en numéraires',NULL,NULL,1),(771,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29','1352','Créances à plus d\'un an',NULL,NULL,1),(772,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','290','771','Créances commerciales',NULL,NULL,1),(773,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2900','772','Clients',NULL,NULL,1),(774,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29000','773','Créances en compte sur entreprises liées',NULL,NULL,1),(775,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29001','773','Sur entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(776,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29002','773','Sur clients Belgique',NULL,NULL,1),(777,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29003','773','Sur clients C.E.E.',NULL,NULL,1),(778,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29004','773','Sur clients exportation hors C.E.E.',NULL,NULL,1),(779,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29005','773','Créances sur les coparticipants (associations momentanées)',NULL,NULL,1),(780,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2901','772','Effets à recevoir',NULL,NULL,1),(781,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29010','780','Sur entreprises liées',NULL,NULL,1),(782,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29011','780','Sur entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(783,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29012','780','Sur clients Belgique',NULL,NULL,1),(784,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29013','780','Sur clients C.E.E.',NULL,NULL,1),(785,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29014','780','Sur clients exportation hors C.E.E.',NULL,NULL,1),(786,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2905','772','Retenues sur garanties',NULL,NULL,1),(787,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2906','772','Acomptes versés',NULL,NULL,1),(788,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2907','772','Créances douteuses (à ventiler comme clients 2900)',NULL,NULL,1),(789,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2909','772','Réductions de valeur actées (à ventiler comme clients 2900)',NULL,NULL,1),(790,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','291','771','Autres créances',NULL,NULL,1),(791,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2910','790','Créances en compte',NULL,NULL,1),(792,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29100','791','Sur entreprises liées',NULL,NULL,1),(793,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29101','791','Sur entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(794,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29102','791','Sur autres débiteurs',NULL,NULL,1),(795,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2911','790','Effets à recevoir',NULL,NULL,1),(796,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29110','795','Sur entreprises liées',NULL,NULL,1),(797,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29111','795','Sur entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(798,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','29112','795','Sur autres débiteurs',NULL,NULL,1),(799,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2912','790','Créances résultant de la cession d\'immobilisations données en leasing',NULL,NULL,1),(800,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2917','790','Créances douteuses',NULL,NULL,1),(801,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2919','790','Réductions de valeur actées',NULL,NULL,1),(802,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','30','1353','Approvisionnements - matières premières',NULL,NULL,1),(803,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','300','802','Valeur d\'acquisition',NULL,NULL,1),(804,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','309','802','Réductions de valeur actées',NULL,NULL,1),(805,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','31','1353','Approvsionnements et fournitures',NULL,NULL,1),(806,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','310','805','Valeur d\'acquisition',NULL,NULL,1),(807,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3100','806','Matières d\'approvisionnement',NULL,NULL,1),(808,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3101','806','Energie, charbon, coke, mazout, essence, propane',NULL,NULL,1),(809,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3102','806','Produits d\'entretien',NULL,NULL,1),(810,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3103','806','Fournitures diverses et petit outillage',NULL,NULL,1),(811,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3104','806','Imprimés et fournitures de bureau',NULL,NULL,1),(812,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3105','806','Fournitures de services sociaux',NULL,NULL,1),(813,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3106','806','Emballages commerciaux',NULL,NULL,1),(814,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','31060','813','Emballages perdus',NULL,NULL,1),(815,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','31061','813','Emballages récupérables',NULL,NULL,1),(816,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','319','805','Réductions de valeur actées',NULL,NULL,1),(817,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','32','1353','En cours de fabrication',NULL,NULL,1),(818,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','320','817','Valeur d\'acquisition',NULL,NULL,1),(819,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3200','818','Produits semi-ouvrés',NULL,NULL,1),(820,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3201','818','Produits en cours de fabrication',NULL,NULL,1),(821,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3202','818','Travaux en cours',NULL,NULL,1),(822,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3205','818','Déchets',NULL,NULL,1),(823,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3206','818','Rebuts',NULL,NULL,1),(824,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3209','818','Travaux en association momentanée',NULL,NULL,1),(825,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','329','817','Réductions de valeur actées',NULL,NULL,1),(826,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','33','1353','Produits finis',NULL,NULL,1),(827,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','330','826','Valeur d\'acquisition',NULL,NULL,1),(828,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3300','827','Produits finis',NULL,NULL,1),(829,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','339','826','Réductions de valeur actées',NULL,NULL,1),(830,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','34','1353','Marchandises',NULL,NULL,1),(831,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','340','830','Valeur d\'acquisition',NULL,NULL,1),(832,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3400','831','Groupe A',NULL,NULL,1),(833,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3401','831','Groupe B',NULL,NULL,1),(834,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3402','831','Groupe C',NULL,NULL,1),(835,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','349','830','Réductions de valeur actées',NULL,NULL,1),(836,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','35','1353','Immeubles destinés à la vente',NULL,NULL,1),(837,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','350','836','Valeur d\'acquisition',NULL,NULL,1),(838,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3500','837','Immeuble A',NULL,NULL,1),(839,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3501','837','Immeuble B',NULL,NULL,1),(840,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3502','837','Immeuble C',NULL,NULL,1),(841,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','351','836','Immeubles construits en vue de leur revente',NULL,NULL,1),(842,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3510','841','Immeuble A',NULL,NULL,1),(843,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3511','841','Immeuble B',NULL,NULL,1),(844,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3512','841','Immeuble C',NULL,NULL,1),(845,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','359','836','Réductions de valeurs actées',NULL,NULL,1),(846,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','36','1353','Acomptes versés sur achats pour stocks',NULL,NULL,1),(847,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','360','846','Acomptes versés (à ventiler éventuellement par catégorie)',NULL,NULL,1),(848,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','369','846','Réductions de valeur actées',NULL,NULL,1),(849,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','37','1353','Commandes en cours d\'exécution',NULL,NULL,1),(850,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','370','849','Valeur d\'acquisition',NULL,NULL,1),(851,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','371','849','Bénéfice pris en compte',NULL,NULL,1),(852,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','379','849','Réductions de valeur actées',NULL,NULL,1),(853,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','40','1354','Créances commerciales',NULL,NULL,1),(854,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','400','853','Clients',NULL,NULL,1),(855,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4007','854','Rabais, remises et ristournes à accorder et autres notes de crédit à établir',NULL,NULL,1),(856,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4008','854','Créances résultant de livraisons de biens (associations momentanées)',NULL,NULL,1),(857,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','401','853','Effets à recevoir',NULL,NULL,1),(858,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4010','857','Effets à recevoir',NULL,NULL,1),(859,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4013','857','Effets à l\'encaissement',NULL,NULL,1),(860,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4015','857','Effets à l\'escompte',NULL,NULL,1),(861,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','402','853','Clients, créances courantes, entreprises apparentées, administrateurs et gérants',NULL,NULL,1),(862,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4020','861','Entreprises liées',NULL,NULL,1),(863,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4021','861','Autres entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(864,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4022','861','Administrateurs et gérants d\'entreprise',NULL,NULL,1),(865,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','403','853','Effets à recevoir sur entreprises apparentées et administrateurs et gérants',NULL,NULL,1),(866,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4030','865','Entreprises liées',NULL,NULL,1),(867,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4031','865','Autres entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(868,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4032','865','Administrateurs et gérants de l\'entreprise',NULL,NULL,1),(869,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','404','853','Produits à recevoir (factures à établir)',NULL,NULL,1),(870,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','405','853','Clients : retenues sur garanties',NULL,NULL,1),(871,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','406','853','Acomptes versés',NULL,NULL,1),(872,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','407','853','Créances douteuses',NULL,NULL,1),(873,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','408','853','Compensation clients',NULL,NULL,1),(874,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','409','853','Réductions de valeur actées',NULL,NULL,1),(875,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','41','1354','Autres créances',NULL,NULL,1),(876,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','410','875','Capital appelé, non versé',NULL,NULL,1),(877,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4100','876','Appels de fonds',NULL,NULL,1),(878,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4101','876','Actionnaires défaillants',NULL,NULL,1),(879,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','411','875','T.V.A. à récupérer',NULL,NULL,1),(880,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4110','879','T.V.A. due',NULL,NULL,1),(881,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4111','879','T.V.A. déductible',NULL,NULL,1),(882,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4112','879','Compte courant administration T.V.A.',NULL,NULL,1),(883,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4118','879','Taxe d\'égalisation due',NULL,NULL,1),(884,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','412','875','Impôts et versements fiscaux à récupérer',NULL,NULL,1),(885,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4120','884','Impôts belges sur le résultat',NULL,NULL,1),(886,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4125','884','Autres impôts belges',NULL,NULL,1),(887,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4128','884','Impôts étrangers',NULL,NULL,1),(888,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','414','875','Produits à recevoir',NULL,NULL,1),(889,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','416','875','Créances diverses',NULL,NULL,1),(890,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4160','889','Associés (compte d\'apport en société)',NULL,NULL,1),(891,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4161','889','Avances et prêts au personnel',NULL,NULL,1),(892,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4162','889','Compte courant des associés en S.P.R.L.',NULL,NULL,1),(893,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4163','889','Compte courant des administrateurs et gérants',NULL,NULL,1),(894,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4164','889','Créances sur sociétés apparentées',NULL,NULL,1),(895,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4166','889','Emballages et matériel à rendre',NULL,NULL,1),(896,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4167','889','Etat et établissements publics',NULL,NULL,1),(897,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','41670','896','Subsides à recevoir',NULL,NULL,1),(898,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','41671','896','Autres créances',NULL,NULL,1),(899,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4168','889','Rabais, ristournes et remises à obtenir et autres avoirs non encore reçus',NULL,NULL,1),(900,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','417','875','Créances douteuses',NULL,NULL,1),(901,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','418','875','Cautionnements versés en numéraires',NULL,NULL,1),(902,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','419','875','Réductions de valeur actées',NULL,NULL,1),(903,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','42','1354','Dettes à plus d\'un an échéant dans l\'année',NULL,NULL,1),(904,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','420','903','Emprunts subordonnés',NULL,NULL,1),(905,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4200','904','Convertibles',NULL,NULL,1),(906,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4201','904','Non convertibles',NULL,NULL,1),(907,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','421','903','Emprunts obligataires non subordonnés',NULL,NULL,1),(908,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4210','907','Convertibles',NULL,NULL,1),(909,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4211','907','Non convertibles',NULL,NULL,1),(910,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','422','903','Dettes de location-financement et assimilées',NULL,NULL,1),(911,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4220','910','Financement de biens immobiliers',NULL,NULL,1),(912,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4221','910','Financement de biens mobiliers',NULL,NULL,1),(913,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','423','903','Etablissements de crédit',NULL,NULL,1),(914,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4230','913','Dettes en compte',NULL,NULL,1),(915,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4231','913','Promesses',NULL,NULL,1),(916,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4232','913','Crédits d\'acceptation',NULL,NULL,1),(917,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','424','903','Autres emprunts',NULL,NULL,1),(918,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','425','903','Dettes commerciales',NULL,NULL,1),(919,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4250','918','Fournisseurs',NULL,NULL,1),(920,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4251','918','Effets à payer',NULL,NULL,1),(921,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','426','903','Cautionnements reçus en numéraires',NULL,NULL,1),(922,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','429','903','Dettes diverses',NULL,NULL,1),(923,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4290','922','Entreprises liées',NULL,NULL,1),(924,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4291','922','Entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(925,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4292','922','Administrateurs, gérants, associés',NULL,NULL,1),(926,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4299','922','Autres dettes',NULL,NULL,1),(927,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','43','1354','Dettes financières',NULL,NULL,1),(928,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','430','927','Etablissements de crédit. Emprunts en compte à terme fixe',NULL,NULL,1),(929,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','431','927','Etablissements de crédit. Promesses',NULL,NULL,1),(930,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','432','927','Etablissements de crédit. Crédits d\'acceptation',NULL,NULL,1),(931,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','433','927','Etablissements de crédit. Dettes en compte courant',NULL,NULL,1),(932,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','439','927','Autres emprunts',NULL,NULL,1),(933,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','44','1354','Dettes commerciales',NULL,NULL,1),(934,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','440','933','Fournisseurs',NULL,NULL,1),(935,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4400','934','Entreprises apparentées',NULL,NULL,1),(936,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','44000','935','Entreprises liées',NULL,NULL,1),(937,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','44001','935','Entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(938,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4401','934','Fournisseurs ordinaires',NULL,NULL,1),(939,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','44010','938','Fournisseurs belges',NULL,NULL,1),(940,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','44011','938','Fournisseurs CEE',NULL,NULL,1),(941,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','44012','938','Fournisseurs importation',NULL,NULL,1),(942,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4402','934','Dettes envers les coparticipants (associations momentanées)',NULL,NULL,1),(943,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4403','934','Fournisseurs - retenues de garanties',NULL,NULL,1),(944,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','441','933','Effets à payer',NULL,NULL,1),(945,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4410','944','Entreprises apparentées',NULL,NULL,1),(946,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','44100','945','Entreprises liées',NULL,NULL,1),(947,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','44101','945','Entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(948,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4411','944','Fournisseurs ordinaires',NULL,NULL,1),(949,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','44110','948','Fournisseurs belges',NULL,NULL,1),(950,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','44111','948','Fournisseurs CEE',NULL,NULL,1),(951,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','44112','948','Fournisseurs importation',NULL,NULL,1),(952,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','444','933','Factures à recevoir',NULL,NULL,1),(953,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','446','933','Acomptes reçus',NULL,NULL,1),(954,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','448','933','Compensations fournisseurs',NULL,NULL,1),(955,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','45','1354','Dettes fiscales, salariales et sociales',NULL,NULL,1),(956,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','450','955','Dettes fiscales estimées',NULL,NULL,1),(957,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4501','956','Impôts sur le résultat',NULL,NULL,1),(958,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4505','956','Autres impôts en Belgique',NULL,NULL,1),(959,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4508','956','Impôts à l\'étranger',NULL,NULL,1),(960,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','451','955','T.V.A. à payer',NULL,NULL,1),(961,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4510','960','T.V.A. due',NULL,NULL,1),(962,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4511','960','T.V.A. déductible',NULL,NULL,1),(963,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4512','960','Compte courant administration T.V.A.',NULL,NULL,1),(964,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4518','960','Taxe d\'égalisation due',NULL,NULL,1),(965,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','452','955','Impôts et taxes à payer',NULL,NULL,1),(966,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4520','965','Autres impôts sur le résultat',NULL,NULL,1),(967,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4525','965','Autres impôts et taxes en Belgique',NULL,NULL,1),(968,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','45250','967','Précompte immobilier',NULL,NULL,1),(969,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','45251','967','Impôts communaux à payer',NULL,NULL,1),(970,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','45252','967','Impôts provinciaux à payer',NULL,NULL,1),(971,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','45253','967','Autres impôts et taxes à payer',NULL,NULL,1),(972,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4528','965','Impôts et taxes à l\'étranger',NULL,NULL,1),(973,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','453','955','Précomptes retenus',NULL,NULL,1),(974,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4530','973','Précompte professionnel retenu sur rémunérations',NULL,NULL,1),(975,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4531','973','Précompte professionnel retenu sur tantièmes',NULL,NULL,1),(976,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4532','973','Précompte mobilier retenu sur dividendes attribués',NULL,NULL,1),(977,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4533','973','Précompte mobilier retenu sur intérêts payés',NULL,NULL,1),(978,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4538','973','Autres précomptes retenus',NULL,NULL,1),(979,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','454','955','Office National de la Sécurité Sociale',NULL,NULL,1),(980,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4540','979','Arriérés',NULL,NULL,1),(981,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4541','979','1er trimestre',NULL,NULL,1),(982,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4542','979','2ème trimestre',NULL,NULL,1),(983,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4543','979','3ème trimestre',NULL,NULL,1),(984,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4544','979','4ème trimestre',NULL,NULL,1),(985,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','455','955','Rémunérations',NULL,NULL,1),(986,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4550','985','Administrateurs, gérants et commissaires (non réviseurs)',NULL,NULL,1),(987,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4551','985','Direction',NULL,NULL,1),(988,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4552','985','Employés',NULL,NULL,1),(989,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4553','985','Ouvriers',NULL,NULL,1),(990,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','456','955','Pécules de vacances',NULL,NULL,1),(991,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4560','990','Direction',NULL,NULL,1),(992,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4561','990','Employés',NULL,NULL,1),(993,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4562','990','Ouvriers',NULL,NULL,1),(994,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','459','955','Autres dettes sociales',NULL,NULL,1),(995,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4590','994','Provision pour gratifications de fin d\'année',NULL,NULL,1),(996,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4591','994','Départs de personnel',NULL,NULL,1),(997,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4592','994','Oppositions sur rémunérations',NULL,NULL,1),(998,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4593','994','Assurances relatives au personnel',NULL,NULL,1),(999,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','45930','998','Assurance loi',NULL,NULL,1),(1000,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','45931','998','Assurance salaire garanti',NULL,NULL,1),(1001,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','45932','998','Assurance groupe',NULL,NULL,1),(1002,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','45933','998','Assurances individuelles',NULL,NULL,1),(1003,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4594','994','Caisse d\'assurances sociales pour travailleurs indépendants',NULL,NULL,1),(1004,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4597','994','Dettes et provisions sociales diverses',NULL,NULL,1),(1005,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','46','1354','Acomptes reçus sur commande',NULL,NULL,1),(1006,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','47','1354','Dettes découlant de l\'affectation des résultats',NULL,NULL,1),(1007,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','470','1006','Dividendes et tantièmes d\'exercices antérieurs',NULL,NULL,1),(1008,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','471','1006','Dividendes de l\'exercice',NULL,NULL,1),(1009,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','472','1006','Tantièmes de l\'exercice',NULL,NULL,1),(1010,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','473','1006','Autres allocataires',NULL,NULL,1),(1011,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','48','4','Dettes diverses',NULL,NULL,1),(1012,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','480','1011','Obligations et coupons échus',NULL,NULL,1),(1013,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','481','1011','Actionnaires - capital à rembourser',NULL,NULL,1),(1014,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','482','1011','Participation du personnel à payer',NULL,NULL,1),(1015,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','483','1011','Acomptes reçus d\'autres tiers à moins d\'un an',NULL,NULL,1),(1016,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','486','1011','Emballages et matériel consignés',NULL,NULL,1),(1017,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','488','1011','Cautionnements reçus en numéraires',NULL,NULL,1),(1018,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','489','1011','Autres dettes diverses',NULL,NULL,1),(1019,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','49','1354','Comptes de régularisation et compte d\'attente',NULL,NULL,1),(1020,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','490','1019','Charges à reporter (à subdiviser par catégorie de charges)',NULL,NULL,1),(1021,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','491','1019','Produits acquis',NULL,NULL,1),(1022,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4910','1021','Produits d\'exploitation',NULL,NULL,1),(1023,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','49100','1022','Ristournes et rabais à obtenir',NULL,NULL,1),(1024,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','49101','1022','Commissions à obtenir',NULL,NULL,1),(1025,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','49102','1022','Autres produits d\'exploitation (redevances par exemple)',NULL,NULL,1),(1026,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4911','1021','Produits financiers',NULL,NULL,1),(1027,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','49110','1026','Intérêts courus et non échus sur prêts et débits',NULL,NULL,1),(1028,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','49111','1026','Autres produits financiers',NULL,NULL,1),(1029,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','492','1019','Charges à imputer (à subdiviser par catégorie de charges)',NULL,NULL,1),(1030,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','493','1019','Produits à reporter',NULL,NULL,1),(1031,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4930','1030','Produits d\'exploitation à reporter',NULL,NULL,1),(1032,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4931','1030','Produits financiers à reporter',NULL,NULL,1),(1033,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','499','1019','Comptes d\'attente',NULL,NULL,1),(1034,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4990','1033','Compte d\'attente',NULL,NULL,1),(1035,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4991','1033','Compte de répartition périodique des charges',NULL,NULL,1),(1036,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4999','1033','Transferts d\'exercice',NULL,NULL,1),(1037,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','50','1355','Actions propres',NULL,NULL,1),(1038,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','51','1355','Actions et parts',NULL,NULL,1),(1039,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','510','1038','Valeur d\'acquisition',NULL,NULL,1),(1040,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','511','1038','Montants non appelés',NULL,NULL,1),(1041,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','519','1038','Réductions de valeur actées',NULL,NULL,1),(1042,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','52','1355','Titres à revenus fixes',NULL,NULL,1),(1043,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','520','1042','Valeur d\'acquisition',NULL,NULL,1),(1044,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','529','1042','Réductions de valeur actées',NULL,NULL,1),(1045,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','53','1355','Dépots à terme',NULL,NULL,1),(1046,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','530','1045','De plus d\'un an',NULL,NULL,1),(1047,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','531','1045','De plus d\'un mois et à un an au plus',NULL,NULL,1),(1048,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','532','1045','d\'un mois au plus',NULL,NULL,1),(1049,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','539','1045','Réductions de valeur actées',NULL,NULL,1),(1050,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','54','1355','Valeurs échues à l\'encaissement',NULL,NULL,1),(1051,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','540','1050','Chèques à encaisser',NULL,NULL,1),(1052,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','541','1050','Coupons à encaisser',NULL,NULL,1),(1053,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','55','1355','Etablissements de crédit - Comptes ouverts auprès des divers établissements.',NULL,NULL,1),(1054,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','550','1053','Comptes courants',NULL,NULL,1),(1055,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','551','1053','Chèques émis',NULL,NULL,1),(1056,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','559','1053','Réductions de valeur actées',NULL,NULL,1),(1057,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','56','1355','Office des chèques postaux',NULL,NULL,1),(1058,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','560','1057','Compte courant',NULL,NULL,1),(1059,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','561','1057','Chèques émis',NULL,NULL,1),(1060,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','57','1355','Caisses',NULL,NULL,1),(1061,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','570','1060','à 577 Caisses - espèces ( 0 - centrale ; 7 - succursales et agences)',NULL,NULL,1),(1062,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','578','1060','Caisses - timbres ( 0 - fiscaux ; 1 - postaux)',NULL,NULL,1),(1063,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','58','1355','Virements internes',NULL,NULL,1),(1064,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','60','1356','Approvisionnements et marchandises',NULL,NULL,1),(1065,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','600','1064','Achats de matières premières',NULL,NULL,1),(1066,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','601','1064','Achats de fournitures',NULL,NULL,1),(1067,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','602','1064','Achats de services, travaux et études',NULL,NULL,1),(1068,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','603','1064','Sous-traitances générales',NULL,NULL,1),(1069,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','604','1064','Achats de marchandises',NULL,NULL,1),(1070,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','605','1064','Achats d\'immeubles destinés à la revente',NULL,NULL,1),(1071,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','608','1064','Remises , ristournes et rabais obtenus sur achats',NULL,NULL,1),(1072,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','609','1064','Variations de stocks',NULL,NULL,1),(1073,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6090','1072','De matières premières',NULL,NULL,1),(1074,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6091','1072','De fournitures',NULL,NULL,1),(1075,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6094','1072','De marchandises',NULL,NULL,1),(1076,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6095','1072','d\'immeubles destinés à la vente',NULL,NULL,1),(1077,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61','1356','Services et biens divers',NULL,NULL,1),(1078,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','610','1077','Loyers et charges locatives',NULL,NULL,1),(1079,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6100','1078','Loyers divers',NULL,NULL,1),(1080,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6101','1078','Charges locatives (assurances, frais de confort,etc)',NULL,NULL,1),(1081,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','611','1077','Entretien et réparation (fournitures et prestations)',NULL,NULL,1),(1082,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','612','1077','Fournitures faites à l\'entreprise',NULL,NULL,1),(1083,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6120','1082','Eau, gaz, électricité, vapeur',NULL,NULL,1),(1084,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61200','1083','Eau',NULL,NULL,1),(1085,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61201','1083','Gaz',NULL,NULL,1),(1086,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61202','1083','Electricité',NULL,NULL,1),(1087,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61203','1083','Vapeur',NULL,NULL,1),(1088,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6121','1082','Téléphone, télégrammes, télex, téléfax, frais postaux',NULL,NULL,1),(1089,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61210','1088','Téléphone',NULL,NULL,1),(1090,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61211','1088','Télégrammes',NULL,NULL,1),(1091,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61212','1088','Télex et téléfax',NULL,NULL,1),(1092,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61213','1088','Frais postaux',NULL,NULL,1),(1093,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6122','1082','Livres, bibliothèque',NULL,NULL,1),(1094,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6123','1082','Imprimés et fournitures de bureau (si non comptabilisé au 601)',NULL,NULL,1),(1095,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','613','1077','Rétributions de tiers',NULL,NULL,1),(1096,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6130','1095','Redevances et royalties',NULL,NULL,1),(1097,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61300','1096','Redevances pour brevets, licences, marques et accessoires',NULL,NULL,1),(1098,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61301','1096','Autres redevances (procédés de fabrication)',NULL,NULL,1),(1099,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6131','1095','Assurances non relatives au personnel',NULL,NULL,1),(1100,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61310','1099','Assurance incendie',NULL,NULL,1),(1101,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61311','1099','Assurance vol',NULL,NULL,1),(1102,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61312','1099','Assurance autos',NULL,NULL,1),(1103,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61313','1099','Assurance crédit',NULL,NULL,1),(1104,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61314','1099','Assurances frais généraux',NULL,NULL,1),(1105,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6132','1095','Divers',NULL,NULL,1),(1106,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61320','1105','Commissions aux tiers',NULL,NULL,1),(1107,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61321','1105','Honoraires d\'avocats, d\'experts, etc',NULL,NULL,1),(1108,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61322','1105','Cotisations aux groupements professionnels',NULL,NULL,1),(1109,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61323','1105','Dons, libéralités, etc',NULL,NULL,1),(1110,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61324','1105','Frais de contentieux',NULL,NULL,1),(1111,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61325','1105','Publications légales',NULL,NULL,1),(1112,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6133','1095','Transports et déplacements',NULL,NULL,1),(1113,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61330','1112','Transports de personnel',NULL,NULL,1),(1114,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','61331','1112','Voyages, déplacements et représentations',NULL,NULL,1),(1115,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6134','1095','Personnel intérimaire',NULL,NULL,1),(1116,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','614','1077','Annonces, publicité, propagande et documentation',NULL,NULL,1),(1117,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6140','1116','Annonces et insertions',NULL,NULL,1),(1118,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6141','1116','Catalogues et imprimés',NULL,NULL,1),(1119,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6142','1116','Echantillons',NULL,NULL,1),(1120,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6143','1116','Foires et expositions',NULL,NULL,1),(1121,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6144','1116','Primes',NULL,NULL,1),(1122,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6145','1116','Cadeaux à la clientèle',NULL,NULL,1),(1123,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6146','1116','Missions et réceptions',NULL,NULL,1),(1124,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6147','1116','Documentation',NULL,NULL,1),(1125,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','615','1077','Sous-traitants',NULL,NULL,1),(1126,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6150','1125','Sous-traitants pour activités propres',NULL,NULL,1),(1127,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6151','1125','Sous-traitants d\'associations momentanées (coparticipants)',NULL,NULL,1),(1128,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6152','1125','Quote-part bénéficiaire des coparticipants',NULL,NULL,1),(1129,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','617','1077','Personnel intérimaire et personnes mises à la disposition de l\'entreprise',NULL,NULL,1),(1130,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','618','1077','Rémunérations, primes pour assurances extralégales, pensions de retraite et de survie des administrateurs, gérants et associés actifs qui ne sont pas attribuées en vertu d\'un contrat de travail',NULL,NULL,1),(1131,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','62','1356','Rémunérations, charges sociales et pensions',NULL,NULL,1),(1132,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','620','1131','Rémunérations et avantages sociaux directs',NULL,NULL,1),(1133,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6200','1132','Administrateurs ou gérants',NULL,NULL,1),(1134,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6201','1132','Personnel de direction',NULL,NULL,1),(1135,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6202','1132','Employés',NULL,NULL,1),(1136,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6203','1132','Ouvriers',NULL,NULL,1),(1137,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6204','1132','Autres membres du personnel',NULL,NULL,1),(1138,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','621','1131','Cotisations patronales d\'assurances sociales',NULL,NULL,1),(1139,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6210','1138','Sur salaires',NULL,NULL,1),(1140,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6211','1138','Sur appointements et commissions',NULL,NULL,1),(1141,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','622','1131','Primes patronales pour assurances extralégales',NULL,NULL,1),(1142,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','623','1131','Autres frais de personnel',NULL,NULL,1),(1143,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6230','1142','Assurances du personnel',NULL,NULL,1),(1144,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','62300','1143','Assurances loi, responsabilité civile, chemin du travail',NULL,NULL,1),(1145,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','62301','1143','Assurance salaire garanti',NULL,NULL,1),(1146,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','62302','1143','Assurances individuelles',NULL,NULL,1),(1147,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6231','1142','Charges sociales diverses',NULL,NULL,1),(1148,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','62310','1147','Jours fériés payés',NULL,NULL,1),(1149,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','62311','1147','Salaire hebdomadaire garanti',NULL,NULL,1),(1150,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','62312','1147','Allocations familiales complémentaires',NULL,NULL,1),(1151,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6232','1142','Charges sociales des administrateurs, gérants et commissaires',NULL,NULL,1),(1152,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','62320','1151','Allocations familiales complémentaires pour non salariés',NULL,NULL,1),(1153,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','62321','1151','Lois sociales pour indépendants',NULL,NULL,1),(1154,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','62322','1151','Divers',NULL,NULL,1),(1155,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','624','1131','Pensions de retraite et de survie',NULL,NULL,1),(1156,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6240','1155','Administrateurs et gérants',NULL,NULL,1),(1157,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6241','1155','Personnel',NULL,NULL,1),(1158,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','625','1131','Provision pour pécule de vacances',NULL,NULL,1),(1159,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6250','1158','Dotations',NULL,NULL,1),(1160,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6251','1158','Utilisations et reprises',NULL,NULL,1),(1161,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','63','1356','Amortissements, réductions de valeur et provisions pour risques et charges',NULL,NULL,1),(1162,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','630','1161','Dotations aux amortissements et aux réductions de valeur sur immobilisations',NULL,NULL,1),(1163,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6300','1162','Dotations aux amortissements sur frais d\'établissement',NULL,NULL,1),(1164,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6301','1162','Dotations aux amortissements sur immobilisations incorporelles',NULL,NULL,1),(1165,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6302','1162','Dotations aux amortissements sur immobilisations corporelles',NULL,NULL,1),(1166,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6308','1162','Dotations aux réductions de valeur sur immobilisations incorporelles',NULL,NULL,1),(1167,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6309','1162','Dotations aux réductions de valeur sur immobilisations corporelles',NULL,NULL,1),(1168,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','631','1161','Réductions de valeur sur stocks',NULL,NULL,1),(1169,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6310','1168','Dotations',NULL,NULL,1),(1170,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6311','1168','Reprises',NULL,NULL,1),(1171,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','632','1161','Réductions de valeur sur commandes en cours d\'exécution',NULL,NULL,1),(1172,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6320','1171','Dotations',NULL,NULL,1),(1173,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6321','1171','Reprises',NULL,NULL,1),(1174,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','633','1161','Réductions de valeur sur créances commerciales à plus d\'un an',NULL,NULL,1),(1175,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6330','1174','Dotations',NULL,NULL,1),(1176,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6331','1174','Reprises',NULL,NULL,1),(1177,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','634','1161','Réductions de valeur sur créances commerciales à un an au plus',NULL,NULL,1),(1178,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6340','1177','Dotations',NULL,NULL,1),(1179,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6341','1177','Reprises',NULL,NULL,1),(1180,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','635','1161','Provisions pour pensions et obligations similaires',NULL,NULL,1),(1181,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6350','1180','Dotations',NULL,NULL,1),(1182,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6351','1180','Utilisations et reprises',NULL,NULL,1),(1183,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','636','11613','Provisions pour grosses réparations et gros entretiens',NULL,NULL,1),(1184,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6360','1183','Dotations',NULL,NULL,1),(1185,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6361','1183','Utilisations et reprises',NULL,NULL,1),(1186,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','637','1161','Provisions pour autres risques et charges',NULL,NULL,1),(1187,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6370','1186','Dotations',NULL,NULL,1),(1188,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6371','1186','Utilisations et reprises',NULL,NULL,1),(1189,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','64','1356','Autres charges d\'exploitation',NULL,NULL,1),(1190,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','640','1189','Charges fiscales d\'exploitation',NULL,NULL,1),(1191,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6400','1190','Taxes et impôts directs',NULL,NULL,1),(1192,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','64000','1191','Taxes sur autos et camions',NULL,NULL,1),(1193,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6401','1190','Taxes et impôts indirects',NULL,NULL,1),(1194,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','64010','1193','Timbres fiscaux pris en charge par la firme',NULL,NULL,1),(1195,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','64011','1193','Droits d\'enregistrement',NULL,NULL,1),(1196,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','64012','1193','T.V.A. non déductible',NULL,NULL,1),(1197,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6402','1190','Impôts provinciaux et communaux',NULL,NULL,1),(1198,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','64020','1197','Taxe sur la force motrice',NULL,NULL,1),(1199,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','64021','1197','Taxe sur le personnel occupé',NULL,NULL,1),(1200,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6403','1190','Taxes diverses',NULL,NULL,1),(1201,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','641','1189','Moins-values sur réalisations courantes d\'immobilisations corporelles',NULL,NULL,1),(1202,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','642','1189','Moins-values sur réalisations de créances commerciales',NULL,NULL,1),(1203,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','643','1189','à 648 Charges d\'exploitations diverses',NULL,NULL,1),(1204,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','649','1189','Charges d\'exploitation portées à l\'actif au titre de restructuration',NULL,NULL,1),(1205,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','65','1356','Charges financières',NULL,NULL,1),(1206,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','650','1205','Charges des dettes',NULL,NULL,1),(1207,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6500','1206','Intérêts, commissions et frais afférents aux dettes',NULL,NULL,1),(1208,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6501','1206','Amortissements des agios et frais d\'émission d\'emprunts',NULL,NULL,1),(1209,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6502','1206','Autres charges de dettes',NULL,NULL,1),(1210,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6503','1206','Intérêts intercalaires portés à l\'actif',NULL,NULL,1),(1211,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','651','1205','Réductions de valeur sur actifs circulants',NULL,NULL,1),(1212,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6510','1211','Dotations',NULL,NULL,1),(1213,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6511','1211','Reprises',NULL,NULL,1),(1214,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','652','1205','Moins-values sur réalisation d\'actifs circulants',NULL,NULL,1),(1215,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','653','1205','Charges d\'escompte de créances',NULL,NULL,1),(1216,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','654','1205','Différences de change',NULL,NULL,1),(1217,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','655','1205','Ecarts de conversion des devises',NULL,NULL,1),(1218,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','656','1205','Frais de banques, de chèques postaux',NULL,NULL,1),(1219,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','657','1205','Commissions sur ouvertures de crédit, cautions et avals',NULL,NULL,1),(1220,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','658','1205','Frais de vente des titres',NULL,NULL,1),(1221,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','66','1356','Charges exceptionnelles',NULL,NULL,1),(1222,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','660','1221','Amortissements et réductions de valeur exceptionnels',NULL,NULL,1),(1223,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6600','1222','Sur frais d\'établissement',NULL,NULL,1),(1224,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6601','1222','Sur immobilisations incorporelles',NULL,NULL,1),(1225,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6602','1222','Sur immobilisations corporelles',NULL,NULL,1),(1226,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','661','1221','Réductions de valeur sur immobilisations financières',NULL,NULL,1),(1227,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','662','1221','Provisions pour risques et charges exceptionnels',NULL,NULL,1),(1228,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','663','1221','Moins-values sur réalisation d\'actifs immobilisés',NULL,NULL,1),(1229,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6630','1228','Sur immobilisations incorporelles',NULL,NULL,1),(1230,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6631','1228','Sur immobilisations corporelles',NULL,NULL,1),(1231,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6632','1228','Sur immobilisations détenues en location-financement et droits similaires',NULL,NULL,1),(1232,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6633','1228','Sur immobilisations financières',NULL,NULL,1),(1233,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6634','1228','Sur immeubles acquis ou construits en vue de la revente',NULL,NULL,1),(1234,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','664','1221','à 668 Autres charges exceptionnelles',NULL,NULL,1),(1235,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','664','1221','Pénalités et amendes diverses',NULL,NULL,1),(1236,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','665','1221','Différence de charge',NULL,NULL,1),(1237,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','669','1221','Charges exceptionnelles transférées à l\'actif en frais de restructuration',NULL,NULL,1),(1238,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','67','1356','Impôts sur le résultat',NULL,NULL,1),(1239,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','670','1238','Impôts belges sur le résultat de l\'exercice',NULL,NULL,1),(1240,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6700','1239','Impôts et précomptes dus ou versés',NULL,NULL,1),(1241,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6701','1239','Excédent de versements d\'impôts et précomptes porté à l\'actif',NULL,NULL,1),(1242,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6702','1239','Charges fiscales estimées',NULL,NULL,1),(1243,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','671','1238','Impôts belges sur le résultat d\'exercices antérieurs',NULL,NULL,1),(1244,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6710','1243','Suppléments d\'impôts dus ou versés',NULL,NULL,1),(1245,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6711','1243','Suppléments d\'impôts estimés',NULL,NULL,1),(1246,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6712','1243','Provisions fiscales constituées',NULL,NULL,1),(1247,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','672','1238','Impôts étrangers sur le résultat de l\'exercice',NULL,NULL,1),(1248,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','673','1238','Impôts étrangers sur le résultat d\'exercices antérieurs',NULL,NULL,1),(1249,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','68','1356','Transferts aux réserves immunisées',NULL,NULL,1),(1250,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','69','1356','Affectation des résultats',NULL,NULL,1),(1251,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','690','1250','Perte reportée de l\'exercice précédent',NULL,NULL,1),(1252,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','691','1250','Dotation à la réserve légale',NULL,NULL,1),(1253,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','692','1250','Dotation aux autres réserves',NULL,NULL,1),(1254,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','693','1250','Bénéfice à reporter',NULL,NULL,1),(1255,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','694','1250','Rémunération du capital',NULL,NULL,1),(1256,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','695','1250','Administrateurs ou gérants',NULL,NULL,1),(1257,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','696','1250','Autres allocataires',NULL,NULL,1),(1258,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','70','1357','Chiffre d\'affaires',NULL,NULL,1),(1260,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','700','1258','Ventes de marchandises',NULL,NULL,1),(1261,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7000','1260','Ventes en Belgique',NULL,NULL,1),(1262,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7001','1260','Ventes dans les pays membres de la C.E.E.',NULL,NULL,1),(1263,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7002','1260','Ventes à l\'exportation',NULL,NULL,1),(1264,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','701','1258','Ventes de produits finis',NULL,NULL,1),(1265,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7010','1264','Ventes en Belgique',NULL,NULL,1),(1266,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7011','1264','Ventes dans les pays membres de la C.E.E.',NULL,NULL,1),(1267,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7012','1264','Ventes à l\'exportation',NULL,NULL,1),(1268,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','702','1258','Ventes de déchets et rebuts',NULL,NULL,1),(1269,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7020','1268','Ventes en Belgique',NULL,NULL,1),(1270,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7021','1268','Ventes dans les pays membres de la C.E.E.',NULL,NULL,1),(1271,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7022','1268','Ventes à l\'exportation',NULL,NULL,1),(1272,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','703','1258','Ventes d\'emballages récupérables',NULL,NULL,1),(1273,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','704','1258','Facturations des travaux en cours (associations momentanées)',NULL,NULL,1),(1274,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','705','1258','Prestations de services',NULL,NULL,1),(1275,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7050','1274','Prestations de services en Belgique',NULL,NULL,1),(1276,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7051','1274','Prestations de services dans les pays membres de la C.E.E.',NULL,NULL,1),(1277,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7052','1274','Prestations de services en vue de l\'exportation',NULL,NULL,1),(1278,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','706','1258','Pénalités et dédits obtenus par l\'entreprise',NULL,NULL,1),(1279,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','708','1258','Remises, ristournes et rabais accordés',NULL,NULL,1),(1280,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7080','1279','Sur ventes de marchandises',NULL,NULL,1),(1281,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7081','1279','Sur ventes de produits finis',NULL,NULL,1),(1282,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7082','1279','Sur ventes de déchets et rebuts',NULL,NULL,1),(1283,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7083','1279','Sur prestations de services',NULL,NULL,1),(1284,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7084','1279','Mali sur travaux facturés aux associations momentanées',NULL,NULL,1),(1285,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','71','1357','Variation des stocks et des commandes en cours d\'exécution',NULL,NULL,1),(1286,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','712','1285','Des en cours de fabrication',NULL,NULL,1),(1287,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','713','1285','Des produits finis',NULL,NULL,1),(1288,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','715','1285','Des immeubles construits destinés à la vente',NULL,NULL,1),(1289,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','717','1285','Des commandes en cours d\'exécution',NULL,NULL,1),(1290,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7170','1289','Commandes en cours - Coût de revient',NULL,NULL,1),(1291,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','71700','1290','Coût des commandes en cours d\'exécution',NULL,NULL,1),(1292,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','71701','1290','Coût des travaux en cours des associations momentanées',NULL,NULL,1),(1293,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7171','1289','Bénéfices portés en compte sur commandes en cours',NULL,NULL,1),(1294,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','71710','1293','Sur commandes en cours d\'exécution',NULL,NULL,1),(1295,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','71711','1293','Sur travaux en cours des associations momentanées',NULL,NULL,1),(1296,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','72','1357','Production immobilisée',NULL,NULL,1),(1297,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','720','1296','En frais d\'établissement',NULL,NULL,1),(1298,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','721','1296','En immobilisations incorporelles',NULL,NULL,1),(1299,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','722','1296','En immobilisations corporelles',NULL,NULL,1),(1300,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','723','1296','En immobilisations en cours',NULL,NULL,1),(1301,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','74','1357','Autres produits d\'exploitation',NULL,NULL,1),(1302,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','740','1301','Subsides d\'exploitation et montants compensatoires',NULL,NULL,1),(1303,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','741','1301','Plus-values sur réalisations courantes d\'immobilisations corporelles',NULL,NULL,1),(1304,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','742','1301','Plus-values sur réalisations de créances commerciales',NULL,NULL,1),(1305,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','743','1301','à 749 Produits d\'exploitation divers',NULL,NULL,1),(1306,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','743','1301','Produits de services exploités dans l\'intérêt du personnel',NULL,NULL,1),(1307,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','744','1301','Commissions et courtages',NULL,NULL,1),(1308,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','745','1301','Redevances pour brevets et licences',NULL,NULL,1),(1309,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','746','1301','Prestations de services (transports, études, etc)',NULL,NULL,1),(1310,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','747','1301','Revenus des immeubles affectés aux activités non professionnelles',NULL,NULL,1),(1311,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','748','1301','Locations diverses à caractère professionnel',NULL,NULL,1),(1312,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','749','1301','Produits divers',NULL,NULL,1),(1313,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7490','1312','Bonis sur reprises d\'emballages consignés',NULL,NULL,1),(1314,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7491','1312','Bonis sur travaux en associations momentanées',NULL,NULL,1),(1315,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','75','1357','Produits financiers',NULL,NULL,1),(1316,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','750','1315','Produits des immobilisations financières',NULL,NULL,1),(1317,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7500','1316','Revenus des actions',NULL,NULL,1),(1318,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7501','1316','Revenus des obligations',NULL,NULL,1),(1319,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7502','1316','Revenus des créances à plus d\'un an',NULL,NULL,1),(1320,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','751','1315','Produits des actifs circulants',NULL,NULL,1),(1321,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','752','1315','Plus-values sur réalisations d\'actifs circulants',NULL,NULL,1),(1322,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','753','1315','Subsides en capital et en intérêts',NULL,NULL,1),(1323,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','754','1315','Différences de change',NULL,NULL,1),(1324,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','755','1315','Ecarts de conversion des devises',NULL,NULL,1),(1325,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','756','1315','à 759 Produits financiers divers',NULL,NULL,1),(1326,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','756','1315','Produits des autres créances',NULL,NULL,1),(1327,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','757','1315','Escomptes obtenus',NULL,NULL,1),(1328,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','76','1357','Produits exceptionnels',NULL,NULL,1),(1329,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','760','1328','Reprises d\'amortissements et de réductions de valeur',NULL,NULL,1),(1330,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7600','1329','Sur immobilisations incorporelles',NULL,NULL,1),(1331,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7601','1329','Sur immobilisations corporelles',NULL,NULL,1),(1332,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','761','1328','Reprises de réductions de valeur sur immobilisations financières',NULL,NULL,1),(1333,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','762','1328','Reprises de provisions pour risques et charges exceptionnelles',NULL,NULL,1),(1334,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','763','1328','Plus-values sur réalisation d\'actifs immobilisés',NULL,NULL,1),(1335,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7630','1334','Sur immobilisations incorporelles',NULL,NULL,1),(1336,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7631','1334','Sur immobilisations corporelles',NULL,NULL,1),(1337,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7632','1334','Sur immobilisations financières',NULL,NULL,1),(1338,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','764','1328','Autres produits exceptionnels',NULL,NULL,1),(1339,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','77','1357','Régularisations d\'impôts et reprises de provisions fiscales',NULL,NULL,1),(1340,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','771','1339','Impôts belges sur le résultat',NULL,NULL,1),(1341,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7710','1340','Régularisations d\'impôts dus ou versés',NULL,NULL,1),(1342,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7711','1340','Régularisations d\'impôts estimés',NULL,NULL,1),(1343,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7712','1340','Reprises de provisions fiscales',NULL,NULL,1),(1344,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','773','1339','Impôts étrangers sur le résultat',NULL,NULL,1),(1345,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','79','1357','Affectation aux résultats',NULL,NULL,1),(1346,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','790','1345','Bénéfice reporté de l\'exercice précédent',NULL,NULL,1),(1347,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','791','1345','Prélèvement sur le capital et les primes d\'émission',NULL,NULL,1),(1348,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','792','1345','Prélèvement sur les réserves',NULL,NULL,1),(1349,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','793','1345','Perte à reporter',NULL,NULL,1),(1350,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','794','1345','Intervention d\'associés (ou du propriétaire) dans la perte',NULL,NULL,1),(1351,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CAPIT','XXXXXX','1','','Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',NULL,NULL,1),(1352,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','IMMO','XXXXXX','2','','Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',NULL,NULL,1),(1353,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','STOCK','XXXXXX','3','','Stock et commandes en cours d\'exécution',NULL,NULL,1),(1354,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','TIERS','XXXXXX','4','','Créances et dettes à un an au plus',NULL,NULL,1),(1355,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','FINAN','XXXXXX','5','','Placement de trésorerie et de valeurs disponibles',NULL,NULL,1),(1356,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','CHARGE','XXXXXX','6','','Charges',NULL,NULL,1),(1357,1,NULL,'2015-10-03 08:44:54','PCMN-BASE','PROD','XXXXXX','7','','Produits',NULL,NULL,1),(1401,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CAPIT','XXXXXX','1','','Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',NULL,NULL,1),(1402,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','IMMO','XXXXXX','2','','Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',NULL,NULL,1),(1403,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','STOCK','XXXXXX','3','','Stock et commandes en cours d\'exécution',NULL,NULL,1),(1404,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','TIERS','XXXXXX','4','','Créances et dettes à un an au plus',NULL,NULL,1),(1405,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','FINAN','XXXXXX','5','','Placement de trésorerie et de valeurs disponibles',NULL,NULL,1),(1406,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','CHARGE','XXXXXX','6','','Charges',NULL,NULL,1),(1407,1,NULL,'2015-10-03 08:44:54','PCG99-ABREGE','PROD','XXXXXX','7','','Produits',NULL,NULL,1),(1501,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CAPIT','XXXXXX','1','','Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',NULL,NULL,1),(1502,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','IMMO','XXXXXX','2','','Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',NULL,NULL,1),(1503,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','STOCK','XXXXXX','3','','Stock et commandes en cours d\'exécution',NULL,NULL,1),(1504,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','TIERS','XXXXXX','4','','Créances et dettes à un an au plus',NULL,NULL,1),(1505,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','FINAN','XXXXXX','5','','Placement de trésorerie et de valeurs disponibles',NULL,NULL,1),(1506,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','CHARGE','XXXXXX','6','','Charges',NULL,NULL,1),(1507,1,NULL,'2015-10-03 08:44:54','PCG99-BASE','PROD','XXXXXX','7','','Produits',NULL,NULL,1),(4001,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1','','Financiación básica',NULL,NULL,1),(4002,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','ACTIVO','XXXXXX','2','','Activo no corriente',NULL,NULL,1),(4003,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','EXISTENCIAS','XXXXXX','3','','Existencias',NULL,NULL,1),(4004,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4','','Acreedores y deudores por operaciones comerciales',NULL,NULL,1),(4005,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5','','Cuentas financieras',NULL,NULL,1),(4006,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6','','Compras y gastos',NULL,NULL,1),(4007,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7','','Ventas e ingresos',NULL,NULL,1),(4008,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','10','4001','CAPITAL',NULL,NULL,1),(4009,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','100','4008','Capital social',NULL,NULL,1),(4010,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','101','4008','Fondo social',NULL,NULL,1),(4011,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','CAPITAL','102','4008','Capital',NULL,NULL,1),(4012,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','103','4008','Socios por desembolsos no exigidos',NULL,NULL,1),(4013,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1030','4012','Socios por desembolsos no exigidos capital social',NULL,NULL,1),(4014,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1034','4012','Socios por desembolsos no exigidos capital pendiente de inscripción',NULL,NULL,1),(4015,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','104','4008','Socios por aportaciones no dineradas pendientes',NULL,NULL,1),(4016,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1040','4015','Socios por aportaciones no dineradas pendientes capital social',NULL,NULL,1),(4017,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1044','4015','Socios por aportaciones no dineradas pendientes capital pendiente de inscripción',NULL,NULL,1),(4018,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','108','4008','Acciones o participaciones propias en situaciones especiales',NULL,NULL,1),(4019,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','109','4008','Acciones o participaciones propias para reducción de capital',NULL,NULL,1),(4020,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','11','4001','Reservas y otros instrumentos de patrimonio',NULL,NULL,1),(4021,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','110','4020','Prima de emisión o asunción',NULL,NULL,1),(4022,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','111','4020','Otros instrumentos de patrimonio neto',NULL,NULL,1),(4023,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1110','4022','Patrimonio neto por emisión de instrumentos financieros compuestos',NULL,NULL,1),(4024,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1111','4022','Resto de instrumentos de patrimoio neto',NULL,NULL,1),(4025,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','112','4020','Reserva legal',NULL,NULL,1),(4026,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','113','4020','Reservas voluntarias',NULL,NULL,1),(4027,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','114','4020','Reservas especiales',NULL,NULL,1),(4028,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1140','4027','Reservas para acciones o participaciones de la sociedad dominante',NULL,NULL,1),(4029,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1141','4027','Reservas estatutarias',NULL,NULL,1),(4030,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1142','4027','Reservas por capital amortizado',NULL,NULL,1),(4031,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1143','4027','Reservas por fondo de comercio',NULL,NULL,1),(4032,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1144','4028','Reservas por acciones propias aceptadas en garantía',NULL,NULL,1),(4033,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','115','4020','Reservas por pérdidas y ganancias actuariales y otros ajustes',NULL,NULL,1),(4034,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','118','4020','Aportaciones de socios o propietarios',NULL,NULL,1),(4035,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','119','4020','Diferencias por ajuste del capital a euros',NULL,NULL,1),(4036,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','12','4001','Resultados pendientes de aplicación',NULL,NULL,1),(4037,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','120','4036','Remanente',NULL,NULL,1),(4038,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','121','4036','Resultados negativos de ejercicios anteriores',NULL,NULL,1),(4039,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','129','4036','Resultado del ejercicio',NULL,NULL,1),(4040,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','13','4001','Subvenciones, donaciones y ajustes por cambio de valor',NULL,NULL,1),(4041,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','130','4040','Subvenciones oficiales de capital',NULL,NULL,1),(4042,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','131','4040','Donaciones y legados de capital',NULL,NULL,1),(4043,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','132','4040','Otras subvenciones, donaciones y legados',NULL,NULL,1),(4044,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','133','4040','Ajustes por valoración en activos financieros disponibles para la venta',NULL,NULL,1),(4045,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','134','4040','Operaciones de cobertura',NULL,NULL,1),(4046,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1340','4045','Cobertura de flujos de efectivo',NULL,NULL,1),(4047,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1341','4045','Cobertura de una inversión neta en un negocio extranjero',NULL,NULL,1),(4048,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','135','4040','Diferencias de conversión',NULL,NULL,1),(4049,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','136','4040','Ajustes por valoración en activos no corrientes y grupos enajenables de elementos mantenidos para la venta',NULL,NULL,1),(4050,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','137','4040','Ingresos fiscales a distribuir en varios ejercicios',NULL,NULL,1),(4051,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1370','4050','Ingresos fiscales por diferencias permanentes a distribuir en varios ejercicios',NULL,NULL,1),(4052,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1371','4050','Ingresos fiscales por deducciones y bonificaciones a distribuir en varios ejercicios',NULL,NULL,1),(4053,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','14','4001','Provisiones',NULL,NULL,1),(4054,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','141','4053','Provisión para impuestos',NULL,NULL,1),(4055,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','142','4053','Provisión para otras responsabilidades',NULL,NULL,1),(4056,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','143','4053','Provisión por desmantelamiento, retiro o rehabilitación del inmovilizado',NULL,NULL,1),(4057,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','145','4053','Provisión para actuaciones medioambientales',NULL,NULL,1),(4058,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','15','4001','Deudas a largo plazo con características especiales',NULL,NULL,1),(4059,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','150','4058','Acciones o participaciones a largo plazo consideradas como pasivos financieros',NULL,NULL,1),(4060,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','153','4058','Desembolsos no exigidos por acciones o participaciones consideradas como pasivos financieros',NULL,NULL,1),(4061,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1533','4060','Desembolsos no exigidos empresas del grupo',NULL,NULL,1),(4062,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1534','4060','Desembolsos no exigidos empresas asociadas',NULL,NULL,1),(4063,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1535','4060','Desembolsos no exigidos otras partes vinculadas',NULL,NULL,1),(4064,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1536','4060','Otros desembolsos no exigidos',NULL,NULL,1),(4065,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','154','4058','Aportaciones no dinerarias pendientes por acciones o participaciones consideradas como pasivos financieros',NULL,NULL,1),(4066,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1543','4065','Aportaciones no dinerarias pendientes empresas del grupo',NULL,NULL,1),(4067,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1544','4065','Aportaciones no dinerarias pendientes empresas asociadas',NULL,NULL,1),(4068,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1545','4065','Aportaciones no dinerarias pendientes otras partes vinculadas',NULL,NULL,1),(4069,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1546','4065','Otras aportaciones no dinerarias pendientes',NULL,NULL,1),(4070,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','16','4001','Deudas a largo plazo con partes vinculadas',NULL,NULL,1),(4071,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','160','4070','Deudas a largo plazo con entidades de crédito vinculadas',NULL,NULL,1),(4072,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1603','4071','Deudas a largo plazo con entidades de crédito empresas del grupo',NULL,NULL,1),(4073,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1604','4071','Deudas a largo plazo con entidades de crédito empresas asociadas',NULL,NULL,1),(4074,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1605','4071','Deudas a largo plazo con otras entidades de crédito vinculadas',NULL,NULL,1),(4075,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','161','4070','Proveedores de inmovilizado a largo plazo partes vinculadas',NULL,NULL,1),(4076,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1613','4075','Proveedores de inmovilizado a largo plazo empresas del grupo',NULL,NULL,1),(4077,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1614','4075','Proveedores de inmovilizado a largo plazo empresas asociadas',NULL,NULL,1),(4078,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1615','4075','Proveedores de inmovilizado a largo plazo otras partes vinculadas',NULL,NULL,1),(4079,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','162','4070','Acreedores por arrendamiento financiero a largo plazo partes vinculadas',NULL,NULL,1),(4080,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1623','4079','Acreedores por arrendamiento financiero a largo plazo empresas del grupo',NULL,NULL,1),(4081,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1624','4080','Acreedores por arrendamiento financiero a largo plazo empresas asociadas',NULL,NULL,1),(4082,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1625','4080','Acreedores por arrendamiento financiero a largo plazo otras partes vinculadas',NULL,NULL,1),(4083,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','163','4070','Otras deudas a largo plazo con partes vinculadas',NULL,NULL,1),(4084,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1633','4083','Otras deudas a largo plazo empresas del grupo',NULL,NULL,1),(4085,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1634','4083','Otras deudas a largo plazo empresas asociadas',NULL,NULL,1),(4086,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','1635','4083','Otras deudas a largo plazo otras partes vinculadas',NULL,NULL,1),(4087,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','17','4001','Deudas a largo plazo por préstamos recibidos empresitos y otros conceptos',NULL,NULL,1),(4088,1,NULL,'2014-12-21 12:51:05','PCG08-PYME','FINANCIACION','XXXXXX','170','4087','Deudas a largo plazo con entidades de crédito',NULL,NULL,1),(4089,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','171','4087','Deudas a largo plazo',NULL,NULL,1),(4090,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','172','4087','Deudas a largo plazo transformables en suvbenciones donaciones y legados',NULL,NULL,1),(4091,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','173','4087','Proveedores de inmovilizado a largo plazo',NULL,NULL,1),(4092,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','174','4087','Acreedores por arrendamiento financiero a largo plazo',NULL,NULL,1),(4093,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','175','4087','Efectos a pagar a largo plazo',NULL,NULL,1),(4094,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','176','4087','Pasivos por derivados financieros a largo plazo',NULL,NULL,1),(4095,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','177','4087','Obligaciones y bonos',NULL,NULL,1),(4096,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','179','4087','Deudas representadas en otros valores negociables',NULL,NULL,1),(4097,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','18','4001','Pasivos por fianzas garantias y otros conceptos a largo plazo',NULL,NULL,1),(4098,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','180','4097','Fianzas recibidas a largo plazo',NULL,NULL,1),(4099,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','181','4097','Anticipos recibidos por ventas o prestaciones de servicios a largo plazo',NULL,NULL,1),(4100,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','185','4097','Depositos recibidos a largo plazo',NULL,NULL,1),(4101,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','19','4001','Situaciones transitorias de financiación',NULL,NULL,1),(4102,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','190','4101','Acciones o participaciones emitidas',NULL,NULL,1),(4103,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','192','4101','Suscriptores de acciones',NULL,NULL,1),(4104,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','194','4101','Capital emitido pendiente de inscripción',NULL,NULL,1),(4105,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','195','4101','Acciones o participaciones emitidas consideradas como pasivos financieros',NULL,NULL,1),(4106,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','197','4101','Suscriptores de acciones consideradas como pasivos financieros',NULL,NULL,1),(4107,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','FINANCIACION','XXXXXX','199','4101','Acciones o participaciones emitidas consideradas como pasivos financieros pendientes de inscripción',NULL,NULL,1),(4108,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','20','4002','Inmovilizaciones intangibles',NULL,NULL,1),(4109,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','200','4108','Investigación',NULL,NULL,1),(4110,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','201','4108','Desarrollo',NULL,NULL,1),(4111,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','202','4108','Concesiones administrativas',NULL,NULL,1),(4112,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','203','4108','Propiedad industrial',NULL,NULL,1),(4113,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','205','4108','Derechos de transpaso',NULL,NULL,1),(4114,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','206','4108','Aplicaciones informáticas',NULL,NULL,1),(4115,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','209','4108','Anticipos para inmovilizaciones intangibles',NULL,NULL,1),(4116,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','21','4002','Inmovilizaciones materiales',NULL,NULL,1),(4117,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','210','4116','Terrenos y bienes naturales',NULL,NULL,1),(4118,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','211','4116','Construcciones',NULL,NULL,1),(4119,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','212','4116','Instalaciones técnicas',NULL,NULL,1),(4120,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','213','4116','Maquinaria',NULL,NULL,1),(4121,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','214','4116','Utillaje',NULL,NULL,1),(4122,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','215','4116','Otras instalaciones',NULL,NULL,1),(4123,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','216','4116','Mobiliario',NULL,NULL,1),(4124,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','217','4116','Equipos para procesos de información',NULL,NULL,1),(4125,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','218','4116','Elementos de transporte',NULL,NULL,1),(4126,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','219','4116','Otro inmovilizado material',NULL,NULL,1),(4127,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','22','4002','Inversiones inmobiliarias',NULL,NULL,1),(4128,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','220','4127','Inversiones en terreons y bienes naturales',NULL,NULL,1),(4129,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','221','4127','Inversiones en construcciones',NULL,NULL,1),(4130,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','23','4002','Inmovilizaciones materiales en curso',NULL,NULL,1),(4131,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','230','4130','Adaptación de terrenos y bienes naturales',NULL,NULL,1),(4132,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','231','4130','Construcciones en curso',NULL,NULL,1),(4133,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','232','4130','Instalaciones técnicas en montaje',NULL,NULL,1),(4134,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','233','4130','Maquinaria en montaje',NULL,NULL,1),(4135,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','237','4130','Equipos para procesos de información en montaje',NULL,NULL,1),(4136,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','239','4130','Anticipos para inmovilizaciones materiales',NULL,NULL,1),(4137,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','24','4002','Inversiones financieras a largo plazo en partes vinculadas',NULL,NULL,1),(4138,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','240','4137','Participaciones a largo plazo en partes vinculadas',NULL,NULL,1),(4139,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2403','4138','Participaciones a largo plazo en empresas del grupo',NULL,NULL,1),(4140,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2404','4138','Participaciones a largo plazo en empresas asociadas',NULL,NULL,1),(4141,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2405','4138','Participaciones a largo plazo en otras partes vinculadas',NULL,NULL,1),(4142,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','241','4137','Valores representativos de deuda a largo plazo de partes vinculadas',NULL,NULL,1),(4143,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2413','4142','Valores representativos de deuda a largo plazo de empresas del grupo',NULL,NULL,1),(4144,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2414','4142','Valores representativos de deuda a largo plazo de empresas asociadas',NULL,NULL,1),(4145,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2415','4142','Valores representativos de deuda a largo plazo de otras partes vinculadas',NULL,NULL,1),(4146,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','242','4137','Créditos a largo plazo a partes vinculadas',NULL,NULL,1),(4147,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2423','4146','Créditos a largo plazo a empresas del grupo',NULL,NULL,1),(4148,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2424','4146','Créditos a largo plazo a empresas asociadas',NULL,NULL,1),(4149,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2425','4146','Créditos a largo plazo a otras partes vinculadas',NULL,NULL,1),(4150,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','249','4137','Desembolsos pendientes sobre participaciones a largo plazo en partes vinculadas',NULL,NULL,1),(4151,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2493','4150','Desembolsos pendientes sobre participaciones a largo plazo en empresas del grupo',NULL,NULL,1),(4152,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2494','4150','Desembolsos pendientes sobre participaciones a largo plazo en empresas asociadas',NULL,NULL,1),(4153,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2495','4150','Desembolsos pendientes sobre participaciones a largo plazo en otras partes vinculadas',NULL,NULL,1),(4154,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','25','4002','Otras inversiones financieras a largo plazo',NULL,NULL,1),(4155,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','250','4154','Inversiones financieras a largo plazo en instrumentos de patrimonio',NULL,NULL,1),(4156,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','251','4154','Valores representativos de deuda a largo plazo',NULL,NULL,1),(4157,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','252','4154','Créditos a largo plazo',NULL,NULL,1),(4158,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','253','4154','Créditos a largo plazo por enajenación de inmovilizado',NULL,NULL,1),(4159,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','254','4154','Créditos a largo plazo al personal',NULL,NULL,1),(4160,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','255','4154','Activos por derivados financieros a largo plazo',NULL,NULL,1),(4161,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','258','4154','Imposiciones a largo plazo',NULL,NULL,1),(4162,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','259','4154','Desembolsos pendientes sobre participaciones en el patrimonio neto a largo plazo',NULL,NULL,1),(4163,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','26','4002','Fianzas y depósitos constituidos a largo plazo',NULL,NULL,1),(4164,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','260','4163','Fianzas constituidas a largo plazo',NULL,NULL,1),(4165,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','261','4163','Depósitos constituidos a largo plazo',NULL,NULL,1),(4166,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','28','4002','Amortización acumulada del inmovilizado',NULL,NULL,1),(4167,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','280','4166','Amortización acumulado del inmovilizado intangible',NULL,NULL,1),(4168,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2800','4167','Amortización acumulada de investigación',NULL,NULL,1),(4169,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2801','4167','Amortización acumulada de desarrollo',NULL,NULL,1),(4170,1,NULL,'2014-12-21 12:51:06','PCG08-PYME','ACTIVO','XXXXXX','2802','4167','Amortización acumulada de concesiones administrativas',NULL,NULL,1),(4171,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2803','4167','Amortización acumulada de propiedad industrial',NULL,NULL,1),(4172,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2805','4167','Amortización acumulada de derechos de transpaso',NULL,NULL,1),(4173,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2806','4167','Amortización acumulada de aplicaciones informáticas',NULL,NULL,1),(4174,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','281','4166','Amortización acumulado del inmovilizado material',NULL,NULL,1),(4175,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2811','4174','Amortización acumulada de construcciones',NULL,NULL,1),(4176,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2812','4174','Amortización acumulada de instalaciones técnicas',NULL,NULL,1),(4177,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2813','4174','Amortización acumulada de maquinaria',NULL,NULL,1),(4178,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2814','4174','Amortización acumulada de utillaje',NULL,NULL,1),(4179,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2815','4174','Amortización acumulada de otras instalaciones',NULL,NULL,1),(4180,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2816','4174','Amortización acumulada de mobiliario',NULL,NULL,1),(4181,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2817','4174','Amortización acumulada de equipos para proceso de información',NULL,NULL,1),(4182,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2818','4174','Amortización acumulada de elementos de transporte',NULL,NULL,1),(4183,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2819','4175','Amortización acumulada de otro inmovilizado material',NULL,NULL,1),(4184,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','282','4166','Amortización acumulada de las inversiones inmobiliarias',NULL,NULL,1),(4185,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','29','4002','Deterioro de valor de activos no corrientes',NULL,NULL,1),(4186,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','290','4185','Deterioro de valor del inmovilizado intangible',NULL,NULL,1),(4187,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2900','4186','Deterioro de valor de investigación',NULL,NULL,1),(4188,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2901','4186','Deterioro de valor de desarrollo',NULL,NULL,1),(4189,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2902','4186','Deterioro de valor de concesiones administrativas',NULL,NULL,1),(4190,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2903','4186','Deterioro de valor de propiedad industrial',NULL,NULL,1),(4191,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2905','4186','Deterioro de valor de derechos de transpaso',NULL,NULL,1),(4192,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2906','4186','Deterioro de valor de aplicaciones informáticas',NULL,NULL,1),(4193,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','291','4185','Deterioro de valor del inmovilizado material',NULL,NULL,1),(4194,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2910','4193','Deterioro de valor de terrenos y bienes naturales',NULL,NULL,1),(4195,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2911','4193','Deterioro de valor de construcciones',NULL,NULL,1),(4196,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2912','4193','Deterioro de valor de instalaciones técnicas',NULL,NULL,1),(4197,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2913','4193','Deterioro de valor de maquinaria',NULL,NULL,1),(4198,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2914','4193','Deterioro de valor de utillajes',NULL,NULL,1),(4199,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2915','4194','Deterioro de valor de otras instalaciones',NULL,NULL,1),(4200,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2916','4194','Deterioro de valor de mobiliario',NULL,NULL,1),(4201,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2917','4194','Deterioro de valor de equipos para proceso de información',NULL,NULL,1),(4202,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2918','4194','Deterioro de valor de elementos de transporte',NULL,NULL,1),(4203,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2919','4194','Deterioro de valor de otro inmovilizado material',NULL,NULL,1),(4204,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','292','4185','Deterioro de valor de las inversiones inmobiliarias',NULL,NULL,1),(4205,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2920','4204','Deterioro de valor de terrenos y bienes naturales',NULL,NULL,1),(4206,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2921','4204','Deterioro de valor de construcciones',NULL,NULL,1),(4207,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','293','4185','Deterioro de valor de participaciones a largo plazo en partes vinculadas',NULL,NULL,1),(4208,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2933','4207','Deterioro de valor de participaciones a largo plazo en empresas del grupo',NULL,NULL,1),(4209,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2934','4207','Deterioro de valor de sobre participaciones a largo plazo en empresas asociadas',NULL,NULL,1),(4210,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2935','4207','Deterioro de valor de sobre participaciones a largo plazo en otras partes vinculadas',NULL,NULL,1),(4211,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','294','4185','Deterioro de valor de valores representativos de deuda a largo plazo en partes vinculadas',NULL,NULL,1),(4212,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2943','4211','Deterioro de valor de valores representativos de deuda a largo plazo en empresas del grupo',NULL,NULL,1),(4213,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2944','4211','Deterioro de valor de valores representativos de deuda a largo plazo en empresas asociadas',NULL,NULL,1),(4214,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2945','4211','Deterioro de valor de valores representativos de deuda a largo plazo en otras partes vinculadas',NULL,NULL,1),(4215,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','295','4185','Deterioro de valor de créditos a largo plazo a partes vinculadas',NULL,NULL,1),(4216,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2953','4215','Deterioro de valor de créditos a largo plazo a empresas del grupo',NULL,NULL,1),(4217,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2954','4215','Deterioro de valor de créditos a largo plazo a empresas asociadas',NULL,NULL,1),(4218,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','2955','4215','Deterioro de valor de créditos a largo plazo a otras partes vinculadas',NULL,NULL,1),(4219,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','296','4185','Deterioro de valor de participaciones en el patrimonio netoa largo plazo',NULL,NULL,1),(4220,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','297','4185','Deterioro de valor de valores representativos de deuda a largo plazo',NULL,NULL,1),(4221,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACTIVO','XXXXXX','298','4185','Deterioro de valor de créditos a largo plazo',NULL,NULL,1),(4222,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','30','4003','Comerciales',NULL,NULL,1),(4223,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','300','4222','Mercaderías A',NULL,NULL,1),(4224,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','301','4222','Mercaderías B',NULL,NULL,1),(4225,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','31','4003','Materias primas',NULL,NULL,1),(4226,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','310','4225','Materias primas A',NULL,NULL,1),(4227,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','311','4225','Materias primas B',NULL,NULL,1),(4228,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','32','4003','Otros aprovisionamientos',NULL,NULL,1),(4229,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','320','4228','Elementos y conjuntos incorporables',NULL,NULL,1),(4230,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','321','4228','Combustibles',NULL,NULL,1),(4231,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','322','4228','Repuestos',NULL,NULL,1),(4232,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','325','4228','Materiales diversos',NULL,NULL,1),(4233,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','326','4228','Embalajes',NULL,NULL,1),(4234,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','327','4228','Envases',NULL,NULL,1),(4235,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','328','4229','Material de oficina',NULL,NULL,1),(4236,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','33','4003','Productos en curso',NULL,NULL,1),(4237,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','330','4236','Productos en curos A',NULL,NULL,1),(4238,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','331','4236','Productos en curso B',NULL,NULL,1),(4239,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','34','4003','Productos semiterminados',NULL,NULL,1),(4240,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','340','4239','Productos semiterminados A',NULL,NULL,1),(4241,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','341','4239','Productos semiterminados B',NULL,NULL,1),(4242,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','35','4003','Productos terminados',NULL,NULL,1),(4243,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','350','4242','Productos terminados A',NULL,NULL,1),(4244,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','351','4242','Productos terminados B',NULL,NULL,1),(4245,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','36','4003','Subproductos, residuos y materiales recuperados',NULL,NULL,1),(4246,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','360','4245','Subproductos A',NULL,NULL,1),(4247,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','361','4245','Subproductos B',NULL,NULL,1),(4248,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','365','4245','Residuos A',NULL,NULL,1),(4249,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','366','4245','Residuos B',NULL,NULL,1),(4250,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','368','4245','Materiales recuperados A',NULL,NULL,1),(4251,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','369','4245','Materiales recuperados B',NULL,NULL,1),(4252,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','39','4003','Deterioro de valor de las existencias',NULL,NULL,1),(4253,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','390','4252','Deterioro de valor de las mercaderías',NULL,NULL,1),(4254,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','391','4252','Deterioro de valor de las materias primas',NULL,NULL,1),(4255,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','392','4252','Deterioro de valor de otros aprovisionamientos',NULL,NULL,1),(4256,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','393','4252','Deterioro de valor de los productos en curso',NULL,NULL,1),(4257,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','394','4252','Deterioro de valor de los productos semiterminados',NULL,NULL,1),(4258,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','395','4252','Deterioro de valor de los productos terminados',NULL,NULL,1),(4259,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','EXISTENCIAS','XXXXXX','396','4252','Deterioro de valor de los subproductos, residuos y materiales recuperados',NULL,NULL,1),(4260,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACREEDORES_DEUDORES','PROVEEDORES','40','4004','Proveedores',NULL,NULL,1),(4261,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACREEDORES_DEUDORES','PROVEEDORES','400','4260','Proveedores',NULL,NULL,1),(4262,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4000','4261','Proveedores euros',NULL,NULL,1),(4263,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4004','4261','Proveedores moneda extranjera',NULL,NULL,1),(4264,1,NULL,'2014-12-21 12:51:07','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4009','4261','Proveedores facturas pendientes de recibir o formalizar',NULL,NULL,1),(4265,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','401','4260','Proveedores efectos comerciales a pagar',NULL,NULL,1),(4266,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','403','4260','Proveedores empresas del grupo',NULL,NULL,1),(4267,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4030','4266','Proveedores empresas del grupo euros',NULL,NULL,1),(4268,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4031','4266','Efectos comerciales a pagar empresas del grupo',NULL,NULL,1),(4269,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4034','4266','Proveedores empresas del grupo moneda extranjera',NULL,NULL,1),(4270,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4036','4266','Envases y embalajes a devolver a proveedores empresas del grupo',NULL,NULL,1),(4271,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4039','4266','Proveedores empresas del grupo facturas pendientes de recibir o de formalizar',NULL,NULL,1),(4272,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','404','4260','Proveedores empresas asociadas',NULL,NULL,1),(4273,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','405','4260','Proveedores otras partes vinculadas',NULL,NULL,1),(4274,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','406','4260','Envases y embalajes a devolver a proveedores',NULL,NULL,1),(4275,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','407','4260','Anticipos a proveedores',NULL,NULL,1),(4276,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','41','4004','Acreedores varios',NULL,NULL,1),(4277,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','410','4276','Acreedores por prestaciones de servicios',NULL,NULL,1),(4278,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4100','4277','Acreedores por prestaciones de servicios euros',NULL,NULL,1),(4279,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4104','4277','Acreedores por prestaciones de servicios moneda extranjera',NULL,NULL,1),(4280,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4109','4277','Acreedores por prestaciones de servicios facturas pendientes de recibir o formalizar',NULL,NULL,1),(4281,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','411','4276','Acreedores efectos comerciales a pagar',NULL,NULL,1),(4282,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','419','4276','Acreedores por operaciones en común',NULL,NULL,1),(4283,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','CLIENTES','43','4004','Clientes',NULL,NULL,1),(4284,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','CLIENTES','430','4283','Clientes',NULL,NULL,1),(4285,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4300','4284','Clientes euros',NULL,NULL,1),(4286,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4304','4284','Clientes moneda extranjera',NULL,NULL,1),(4287,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4309','4284','Clientes facturas pendientes de formalizar',NULL,NULL,1),(4288,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','431','4283','Clientes efectos comerciales a cobrar',NULL,NULL,1),(4289,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4310','4288','Efectos comerciales en cartera',NULL,NULL,1),(4290,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4311','4288','Efectos comerciales descontados',NULL,NULL,1),(4291,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4312','4288','Efectos comerciales en gestión de cobro',NULL,NULL,1),(4292,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4315','4288','Efectos comerciales impagados',NULL,NULL,1),(4293,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','432','4283','Clientes operaciones de factoring',NULL,NULL,1),(4294,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','433','4283','Clientes empresas del grupo',NULL,NULL,1),(4295,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4330','4294','Clientes empresas del grupo euros',NULL,NULL,1),(4296,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4331','4294','Efectos comerciales a cobrar empresas del grupo',NULL,NULL,1),(4297,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4332','4294','Clientes empresas del grupo operaciones de factoring',NULL,NULL,1),(4298,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4334','4294','Clientes empresas del grupo moneda extranjera',NULL,NULL,1),(4299,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4336','4294','Clientes empresas del grupo dudoso cobro',NULL,NULL,1),(4300,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4337','4294','Envases y embalajes a devolver a clientes empresas del grupo',NULL,NULL,1),(4301,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4339','4294','Clientes empresas del grupo facturas pendientes de formalizar',NULL,NULL,1),(4302,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','434','4283','Clientes empresas asociadas',NULL,NULL,1),(4303,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','435','4283','Clientes otras partes vinculadas',NULL,NULL,1),(4304,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','436','4283','Clientes de dudoso cobro',NULL,NULL,1),(4305,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','437','4283','Envases y embalajes a devolver por clientes',NULL,NULL,1),(4306,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','438','4283','Anticipos de clientes',NULL,NULL,1),(4307,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','44','4004','Deudores varios',NULL,NULL,1),(4308,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','440','4307','Deudores',NULL,NULL,1),(4309,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4400','4308','Deudores euros',NULL,NULL,1),(4310,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4404','4308','Deudores moneda extranjera',NULL,NULL,1),(4311,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4409','4308','Deudores facturas pendientes de formalizar',NULL,NULL,1),(4312,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','441','4307','Deudores efectos comerciales a cobrar',NULL,NULL,1),(4313,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4410','4312','Deudores efectos comerciales en cartera',NULL,NULL,1),(4314,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4411','4312','Deudores efectos comerciales descontados',NULL,NULL,1),(4315,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4412','4312','Deudores efectos comerciales en gestión de cobro',NULL,NULL,1),(4316,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4415','4312','Deudores efectos comerciales impagados',NULL,NULL,1),(4317,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','446','4307','Deudores de dusoso cobro',NULL,NULL,1),(4318,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','449','4307','Deudores por operaciones en común',NULL,NULL,1),(4319,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','46','4004','Personal',NULL,NULL,1),(4320,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','460','4319','Anticipos de renumeraciones',NULL,NULL,1),(4321,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','465','4319','Renumeraciones pendientes de pago',NULL,NULL,1),(4322,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','47','4004','Administraciones Públicas',NULL,NULL,1),(4323,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','470','4322','Hacienda Pública deudora por diversos conceptos',NULL,NULL,1),(4324,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4700','4323','Hacienda Pública deudora por IVA',NULL,NULL,1),(4325,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4708','4323','Hacienda Pública deudora por subvenciones concedidas',NULL,NULL,1),(4326,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4709','4323','Hacienda Pública deudora por devolución de impuestos',NULL,NULL,1),(4327,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','471','4322','Organismos de la Seguridad Social deudores',NULL,NULL,1),(4328,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','472','4322','Hacienda Pública IVA soportado',NULL,NULL,1),(4329,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','473','4322','Hacienda Pública retenciones y pagos a cuenta',NULL,NULL,1),(4330,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','474','4322','Activos por impuesto diferido',NULL,NULL,1),(4331,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4740','4330','Activos por diferencias temporarias deducibles',NULL,NULL,1),(4332,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4742','4330','Derechos por deducciones y bonificaciones pendientes de aplicar',NULL,NULL,1),(4333,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4745','4330','Crédito por pérdidasa compensar del ejercicio',NULL,NULL,1),(4334,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','475','4322','Hacienda Pública acreedora por conceptos fiscales',NULL,NULL,1),(4335,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4750','4334','Hacienda Pública acreedora por IVA',NULL,NULL,1),(4336,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4751','4334','Hacienda Pública acreedora por retenciones practicadas',NULL,NULL,1),(4337,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4752','4334','Hacienda Pública acreedora por impuesto sobre sociedades',NULL,NULL,1),(4338,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4758','4334','Hacienda Pública acreedora por subvenciones a integrar',NULL,NULL,1),(4339,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','476','4322','Organismos de la Seguridad Social acreedores',NULL,NULL,1),(4340,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','477','4322','Hacienda Pública IVA repercutido',NULL,NULL,1),(4341,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','479','4322','Pasivos por diferencias temporarias imponibles',NULL,NULL,1),(4342,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','48','4004','Ajustes por periodificación',NULL,NULL,1),(4343,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','480','4342','Gastos anticipados',NULL,NULL,1),(4344,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','485','4342','Ingresos anticipados',NULL,NULL,1),(4345,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','49','4004','Deterioro de valor de créditos comerciales y provisiones a corto plazo',NULL,NULL,1),(4346,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','490','4345','Deterioro de valor de créditos por operaciones comerciales',NULL,NULL,1),(4347,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','493','4345','Deterioro de valor de créditos por operaciones comerciales con partes vinculadas',NULL,NULL,1),(4348,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4933','4347','Deterioro de valor de créditos por operaciones comerciales con empresas del grupo',NULL,NULL,1),(4349,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4934','4347','Deterioro de valor de créditos por operaciones comerciales con empresas asociadas',NULL,NULL,1),(4350,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4935','4347','Deterioro de valor de créditos por operaciones comerciales con otras partes vinculadas',NULL,NULL,1),(4351,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','499','4345','Provisiones por operaciones comerciales',NULL,NULL,1),(4352,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4994','4351','Provisión para contratos anerosos',NULL,NULL,1),(4353,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4999','4351','Provisión para otras operaciones comerciales',NULL,NULL,1),(4354,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','50','4005','Emprésitos deudas con características especiales y otras emisiones análogas a corto plazo',NULL,NULL,1),(4355,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','500','4354','Obligaciones y bonos a corto plazo',NULL,NULL,1),(4356,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','502','4354','Acciones o participaciones a corto plazo consideradas como pasivos financieros',NULL,NULL,1),(4357,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','505','4354','Deudas representadas en otros valores negociables a corto plazo',NULL,NULL,1),(4358,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','506','4354','Intereses a corto plazo de emprésitos y otras emisiones analógicas',NULL,NULL,1),(4359,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','507','4354','Dividendos de acciones o participaciones consideradas como pasivos financieros',NULL,NULL,1),(4360,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','509','4354','Valores negociables amortizados',NULL,NULL,1),(4361,1,NULL,'2014-12-21 12:51:08','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5090','4360','Obligaciones y bonos amortizados',NULL,NULL,1),(4362,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5095','4360','Otros valores negociables amortizados',NULL,NULL,1),(4363,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','51','4005','Deudas a corto plazo con partes vinculadas',NULL,NULL,1),(4364,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','510','4363','Deudas a corto plazo con entidades de crédito vinculadas',NULL,NULL,1),(4365,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5103','4364','Deudas a corto plazo con entidades de crédito empresas del grupo',NULL,NULL,1),(4366,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5104','4364','Deudas a corto plazo con entidades de crédito empresas asociadas',NULL,NULL,1),(4367,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5105','4364','Deudas a corto plazo con otras entidades de crédito vinculadas',NULL,NULL,1),(4368,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','511','4363','Proveedores de inmovilizado a corto plazo partes vinculadas',NULL,NULL,1),(4369,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5113','4368','Proveedores de inmovilizado a corto plazo empresas del grupo',NULL,NULL,1),(4370,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5114','4368','Proveedores de inmovilizado a corto plazo empresas asociadas',NULL,NULL,1),(4371,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5115','4368','Proveedores de inmovilizado a corto plazo otras partes vinculadas',NULL,NULL,1),(4372,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','512','4363','Acreedores por arrendamiento financiero a corto plazo partes vinculadas',NULL,NULL,1),(4373,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5123','4372','Acreedores por arrendamiento financiero a corto plazo empresas del grupo',NULL,NULL,1),(4374,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5124','4372','Acreedores por arrendamiento financiero a corto plazo empresas asociadas',NULL,NULL,1),(4375,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5125','4372','Acreedores por arrendamiento financiero a corto plazo otras partes vinculadas',NULL,NULL,1),(4376,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','513','4363','Otras deudas a corto plazo con partes vinculadas',NULL,NULL,1),(4377,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5133','4376','Otras deudas a corto plazo con empresas del grupo',NULL,NULL,1),(4378,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5134','4376','Otras deudas a corto plazo con empresas asociadas',NULL,NULL,1),(4379,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5135','4376','Otras deudas a corto plazo con partes vinculadas',NULL,NULL,1),(4380,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','514','4363','Intereses a corto plazo con partes vinculadas',NULL,NULL,1),(4381,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5143','4380','Intereses a corto plazo empresas del grupo',NULL,NULL,1),(4382,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5144','4380','Intereses a corto plazo empresas asociadas',NULL,NULL,1),(4383,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5145','4380','Intereses deudas a corto plazo partes vinculadas',NULL,NULL,1),(4384,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','52','4005','Deudas a corto plazo por préstamos recibidos y otros conceptos',NULL,NULL,1),(4385,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','520','4384','Deudas a corto plazo con entidades de crédito',NULL,NULL,1),(4386,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5200','4385','Préstamos a corto plazo de entidades de crédito',NULL,NULL,1),(4387,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5201','4385','Deudas a corto plazo por crédito dispuesto',NULL,NULL,1),(4388,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5208','4385','Deudas por efectos descontados',NULL,NULL,1),(4389,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5209','4385','Deudas por operaciones de factoring',NULL,NULL,1),(4390,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','521','4384','Deudas a corto plazo',NULL,NULL,1),(4391,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','522','4384','Deudas a corto plazo transformables en subvenciones donaciones y legados',NULL,NULL,1),(4392,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','523','4384','Proveedores de inmovilizado a corto plazo',NULL,NULL,1),(4393,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','526','4384','Dividendo activo a pagar',NULL,NULL,1),(4394,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','527','4384','Intereses a corto plazo de deudas con entidades de crédito',NULL,NULL,1),(4395,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','528','4384','Intereses a corto plazo de deudas',NULL,NULL,1),(4396,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','529','4384','Provisiones a corto plazo',NULL,NULL,1),(4397,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5291','4396','Provisión a corto plazo para impuestos',NULL,NULL,1),(4398,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5292','4396','Provisión a corto plazo para otras responsabilidades',NULL,NULL,1),(4399,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5293','4396','Provisión a corto plazo por desmantelamiento retiro o rehabilitación del inmovilizado',NULL,NULL,1),(4400,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5295','4396','Provisión a corto plazo para actuaciones medioambientales',NULL,NULL,1),(4401,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','53','4005','Inversiones financieras a corto plazo en partes vinculadas',NULL,NULL,1),(4402,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','530','4401','Participaciones a corto plazo en partes vinculadas',NULL,NULL,1),(4403,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5303','4402','Participaciones a corto plazo en empresas del grupo',NULL,NULL,1),(4404,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5304','4402','Participaciones a corto plazo en empresas asociadas',NULL,NULL,1),(4405,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5305','4402','Participaciones a corto plazo en otras partes vinculadas',NULL,NULL,1),(4406,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','531','4401','Valores representativos de deuda a corto plazo de partes vinculadas',NULL,NULL,1),(4407,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5313','4406','Valores representativos de deuda a corto plazo de empresas del grupo',NULL,NULL,1),(4408,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5314','4406','Valores representativos de deuda a corto plazo de empresas asociadas',NULL,NULL,1),(4409,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5315','4406','Valores representativos de deuda a corto plazo de otras partes vinculadas',NULL,NULL,1),(4410,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','532','4401','Créditos a corto plazo a partes vinculadas',NULL,NULL,1),(4411,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5323','4410','Créditos a corto plazo a empresas del grupo',NULL,NULL,1),(4412,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5324','4410','Créditos a corto plazo a empresas asociadas',NULL,NULL,1),(4413,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5325','4410','Créditos a corto plazo a otras partes vinculadas',NULL,NULL,1),(4414,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','533','4401','Intereses a corto plazo de valores representativos de deuda de partes vinculadas',NULL,NULL,1),(4415,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5333','4414','Intereses a corto plazo de valores representativos de deuda en empresas del grupo',NULL,NULL,1),(4416,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5334','4414','Intereses a corto plazo de valores representativos de deuda en empresas asociadas',NULL,NULL,1),(4417,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5335','4414','Intereses a corto plazo de valores representativos de deuda en otras partes vinculadas',NULL,NULL,1),(4418,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','534','4401','Intereses a corto plazo de créditos a partes vinculadas',NULL,NULL,1),(4419,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5343','4418','Intereses a corto plazo de créditos a empresas del grupo',NULL,NULL,1),(4420,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5344','4418','Intereses a corto plazo de créditos a empresas asociadas',NULL,NULL,1),(4421,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5345','4418','Intereses a corto plazo de créditos a otras partes vinculadas',NULL,NULL,1),(4422,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','535','4401','Dividendo a cobrar de inversiones financieras en partes vinculadas',NULL,NULL,1),(4423,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5353','4422','Dividendo a cobrar de empresas del grupo',NULL,NULL,1),(4424,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5354','4422','Dividendo a cobrar de empresas asociadas',NULL,NULL,1),(4425,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5355','4422','Dividendo a cobrar de otras partes vinculadas',NULL,NULL,1),(4426,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','539','4401','Desembolsos pendientes sobre participaciones a corto plazo en partes vinculadas',NULL,NULL,1),(4427,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5393','4426','Desembolsos pendientes sobre participaciones a corto plazo en empresas del grupo',NULL,NULL,1),(4428,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5394','4426','Desembolsos pendientes sobre participaciones a corto plazo en empresas asociadas',NULL,NULL,1),(4429,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5395','4426','Desembolsos pendientes sobre participaciones a corto plazo en otras partes vinculadas',NULL,NULL,1),(4430,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','54','4005','Otras inversiones financieras a corto plazo',NULL,NULL,1),(4431,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','540','4430','Inversiones financieras a corto plazo en instrumentos de patrimonio',NULL,NULL,1),(4432,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','541','4430','Valores representativos de deuda a corto plazo',NULL,NULL,1),(4433,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','542','4430','Créditos a corto plazo',NULL,NULL,1),(4434,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','543','4430','Créditos a corto plazo por enejenación de inmovilizado',NULL,NULL,1),(4435,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','544','4430','Créditos a corto plazo al personal',NULL,NULL,1),(4436,1,NULL,'2014-12-21 12:51:09','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','545','4430','Dividendo a cobrar',NULL,NULL,1),(4437,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','546','4430','Intereses a corto plazo de valores reprsentativos de deuda',NULL,NULL,1),(4438,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','547','4430','Intereses a corto plazo de créditos',NULL,NULL,1),(4439,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','548','4430','Imposiciones a corto plazo',NULL,NULL,1),(4440,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','549','4430','Desembolsos pendientes sobre participaciones en el patrimonio neto a corto plazo',NULL,NULL,1),(4441,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','55','4005','Otras cuentas no bancarias',NULL,NULL,1),(4442,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','550','4441','Titular de la explotación',NULL,NULL,1),(4443,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','551','4441','Cuenta corriente con socios y administradores',NULL,NULL,1),(4444,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','552','4441','Cuenta corriente otras personas y entidades vinculadas',NULL,NULL,1),(4445,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5523','4444','Cuenta corriente con empresas del grupo',NULL,NULL,1),(4446,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5524','4444','Cuenta corriente con empresas asociadas',NULL,NULL,1),(4447,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5525','4444','Cuenta corriente con otras partes vinculadas',NULL,NULL,1),(4448,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','554','4441','Cuenta corriente con uniones temporales de empresas y comunidades de bienes',NULL,NULL,1),(4449,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','555','4441','Partidas pendientes de aplicación',NULL,NULL,1),(4450,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','556','4441','Desembolsos exigidos sobre participaciones en el patrimonio neto',NULL,NULL,1),(4451,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5563','4450','Desembolsos exigidos sobre participaciones empresas del grupo',NULL,NULL,1),(4452,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5564','4450','Desembolsos exigidos sobre participaciones empresas asociadas',NULL,NULL,1),(4453,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5565','4450','Desembolsos exigidos sobre participaciones otras partes vinculadas',NULL,NULL,1),(4454,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5566','4450','Desembolsos exigidos sobre participaciones otras empresas',NULL,NULL,1),(4455,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','557','4441','Dividendo activo a cuenta',NULL,NULL,1),(4456,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','558','4441','Socios por desembolsos exigidos',NULL,NULL,1),(4457,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5580','4456','Socios por desembolsos exigidos sobre acciones o participaciones ordinarias',NULL,NULL,1),(4458,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5585','4456','Socios por desembolsos exigidos sobre acciones o participaciones consideradas como pasivos financieros',NULL,NULL,1),(4459,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','559','4441','Derivados financieros a corto plazo',NULL,NULL,1),(4460,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5590','4459','Activos por derivados financieros a corto plazo',NULL,NULL,1),(4461,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5595','4459','Pasivos por derivados financieros a corto plazo',NULL,NULL,1),(4462,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','56','4005','Finanzas y depósitos recibidos y constituidos a corto plazo y ajustes por periodificación',NULL,NULL,1),(4463,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','560','4462','Finanzas recibidas a corto plazo',NULL,NULL,1),(4464,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','561','4462','Depósitos recibidos a corto plazo',NULL,NULL,1),(4465,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','565','4462','Finanzas constituidas a corto plazo',NULL,NULL,1),(4466,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','566','4462','Depósitos constituidos a corto plazo',NULL,NULL,1),(4467,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','567','4462','Intereses pagados por anticipado',NULL,NULL,1),(4468,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','568','4462','Intereses cobrados a corto plazo',NULL,NULL,1),(4469,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','57','4005','Tesorería',NULL,NULL,1),(4470,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','CAJA','570','4469','Caja euros',NULL,NULL,1),(4471,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','571','4469','Caja moneda extranjera',NULL,NULL,1),(4472,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','BANCOS','572','4469','Bancos e instituciones de crédito cc vista euros',NULL,NULL,1),(4473,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','573','4469','Bancos e instituciones de crédito cc vista moneda extranjera',NULL,NULL,1),(4474,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','574','4469','Bancos e instituciones de crédito cuentas de ahorro euros',NULL,NULL,1),(4475,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','575','4469','Bancos e instituciones de crédito cuentas de ahorro moneda extranjera',NULL,NULL,1),(4476,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','576','4469','Inversiones a corto plazo de gran liquidez',NULL,NULL,1),(4477,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','59','4005','Deterioro del valor de las inversiones financieras a corto plazo',NULL,NULL,1),(4478,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','593','4477','Deterioro del valor de participaciones a corto plazo en partes vinculadas',NULL,NULL,1),(4479,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5933','4478','Deterioro del valor de participaciones a corto plazo en empresas del grupo',NULL,NULL,1),(4480,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5934','4478','Deterioro del valor de participaciones a corto plazo en empresas asociadas',NULL,NULL,1),(4481,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5935','4478','Deterioro del valor de participaciones a corto plazo en otras partes vinculadas',NULL,NULL,1),(4482,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','594','4477','Deterioro del valor de valores representativos de deuda a corto plazo en partes vinculadas',NULL,NULL,1),(4483,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5943','4482','Deterioro del valor de valores representativos de deuda a corto plazo en empresas del grupo',NULL,NULL,1),(4484,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5944','4482','Deterioro del valor de valores representativos de deuda a corto plazo en empresas asociadas',NULL,NULL,1),(4485,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5945','4482','Deterioro del valor de valores representativos de deuda a corto plazo en otras partes vinculadas',NULL,NULL,1),(4486,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','595','4477','Deterioro del valor de créditos a corto plazo en partes vinculadas',NULL,NULL,1),(4487,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5953','4486','Deterioro del valor de créditos a corto plazo en empresas del grupo',NULL,NULL,1),(4488,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5954','4486','Deterioro del valor de créditos a corto plazo en empresas asociadas',NULL,NULL,1),(4489,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5955','4486','Deterioro del valor de créditos a corto plazo en otras partes vinculadas',NULL,NULL,1),(4490,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','596','4477','Deterioro del valor de participaciones a corto plazo',NULL,NULL,1),(4491,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','597','4477','Deterioro del valor de valores representativos de deuda a corto plazo',NULL,NULL,1),(4492,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','598','4477','Deterioro de valor de créditos a corto plazo',NULL,NULL,1),(4493,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','60','4006','Compras',NULL,NULL,1),(4494,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','COMPRAS','600','4493','Compras de mercaderías',NULL,NULL,1),(4495,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','COMPRAS','601','4493','Compras de materias primas',NULL,NULL,1),(4496,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','602','4493','Compras de otros aprovisionamientos',NULL,NULL,1),(4497,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','606','4493','Descuentos sobre compras por pronto pago',NULL,NULL,1),(4498,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6060','4497','Descuentos sobre compras por pronto pago de mercaderías',NULL,NULL,1),(4499,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6061','4497','Descuentos sobre compras por pronto pago de materias primas',NULL,NULL,1),(4500,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6062','4497','Descuentos sobre compras por pronto pago de otros aprovisionamientos',NULL,NULL,1),(4501,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','COMPRAS','607','4493','Trabajos realizados por otras empresas',NULL,NULL,1),(4502,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','608','4493','Devoluciones de compras y operaciones similares',NULL,NULL,1),(4503,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6080','4502','Devoluciones de compras de mercaderías',NULL,NULL,1),(4504,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6081','4502','Devoluciones de compras de materias primas',NULL,NULL,1),(4505,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6082','4502','Devoluciones de compras de otros aprovisionamientos',NULL,NULL,1),(4506,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','609','4493','Rappels por compras',NULL,NULL,1),(4507,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6090','4506','Rappels por compras de mercaderías',NULL,NULL,1),(4508,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6091','4506','Rappels por compras de materias primas',NULL,NULL,1),(4509,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6092','4506','Rappels por compras de otros aprovisionamientos',NULL,NULL,1),(4510,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','61','4006','Variación de existencias',NULL,NULL,1),(4511,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','610','4510','Variación de existencias de mercaderías',NULL,NULL,1),(4512,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','611','4510','Variación de existencias de materias primas',NULL,NULL,1),(4513,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','612','4510','Variación de existencias de otros aprovisionamientos',NULL,NULL,1),(4514,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','62','4006','Servicios exteriores',NULL,NULL,1),(4515,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','620','4514','Gastos en investigación y desarrollo del ejercicio',NULL,NULL,1),(4516,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','621','4514','Arrendamientos y cánones',NULL,NULL,1),(4517,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','622','4514','Reparaciones y conservación',NULL,NULL,1),(4518,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','623','4514','Servicios profesionales independientes',NULL,NULL,1),(4519,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','624','4514','Transportes',NULL,NULL,1),(4520,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','625','4514','Primas de seguros',NULL,NULL,1),(4521,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','626','4514','Servicios bancarios y similares',NULL,NULL,1),(4522,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','627','4514','Publicidad, propaganda y relaciones públicas',NULL,NULL,1),(4523,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','628','4514','Suministros',NULL,NULL,1),(4524,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','629','4514','Otros servicios',NULL,NULL,1),(4525,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','63','4006','Tributos',NULL,NULL,1),(4526,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','630','4525','Impuesto sobre benecifios',NULL,NULL,1),(4527,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6300','4526','Impuesto corriente',NULL,NULL,1),(4528,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6301','4526','Impuesto diferido',NULL,NULL,1),(4529,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','631','4525','Otros tributos',NULL,NULL,1),(4530,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','633','4525','Ajustes negativos en la imposición sobre beneficios',NULL,NULL,1),(4531,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','634','4525','Ajustes negativos en la imposición indirecta',NULL,NULL,1),(4532,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6341','4531','Ajustes negativos en IVA de activo corriente',NULL,NULL,1),(4533,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6342','4531','Ajustes negativos en IVA de inversiones',NULL,NULL,1),(4534,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','636','4525','Devolución de impuestos',NULL,NULL,1),(4535,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','638','4525','Ajustes positivos en la imposición sobre beneficios',NULL,NULL,1),(4536,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','639','4525','Ajustes positivos en la imposición directa',NULL,NULL,1),(4537,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6391','4536','Ajustes positivos en IVA de activo corriente',NULL,NULL,1),(4538,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6392','4536','Ajustes positivos en IVA de inversiones',NULL,NULL,1),(4539,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','64','4006','Gastos de personal',NULL,NULL,1),(4540,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','640','4539','Sueldos y salarios',NULL,NULL,1),(4541,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','641','4539','Indemnizaciones',NULL,NULL,1),(4542,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','642','4539','Seguridad social a cargo de la empresa',NULL,NULL,1),(4543,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','649','4539','Otros gastos sociales',NULL,NULL,1),(4544,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','65','4006','Otros gastos de gestión',NULL,NULL,1),(4545,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','650','4544','Pérdidas de créditos comerciales incobrables',NULL,NULL,1),(4546,1,NULL,'2014-12-21 12:51:10','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','651','4544','Resultados de operaciones en común',NULL,NULL,1),(4547,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6510','4546','Beneficio transferido gestor',NULL,NULL,1),(4548,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6511','4546','Pérdida soportada participe o asociado no gestor',NULL,NULL,1),(4549,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','659','4544','Otras pérdidas en gestión corriente',NULL,NULL,1),(4550,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','66','4006','Gastos financieros',NULL,NULL,1),(4551,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','660','4550','Gastos financieros por actualización de provisiones',NULL,NULL,1),(4552,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','661','4550','Intereses de obligaciones y bonos',NULL,NULL,1),(4553,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6610','4452','Intereses de obligaciones y bonos a largo plazo empresas del grupo',NULL,NULL,1),(4554,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6611','4452','Intereses de obligaciones y bonos a largo plazo empresas asociadas',NULL,NULL,1),(4555,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6612','4452','Intereses de obligaciones y bonos a largo plazo otras partes vinculadas',NULL,NULL,1),(4556,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6613','4452','Intereses de obligaciones y bonos a largo plazo otras empresas',NULL,NULL,1),(4557,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6615','4452','Intereses de obligaciones y bonos a corto plazo empresas del grupo',NULL,NULL,1),(4558,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6616','4452','Intereses de obligaciones y bonos a corto plazo empresas asociadas',NULL,NULL,1),(4559,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6617','4452','Intereses de obligaciones y bonos a corto plazo otras partes vinculadas',NULL,NULL,1),(4560,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6618','4452','Intereses de obligaciones y bonos a corto plazo otras empresas',NULL,NULL,1),(4561,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','662','4550','Intereses de deudas',NULL,NULL,1),(4562,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6620','4561','Intereses de deudas empresas del grupo',NULL,NULL,1),(4563,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6621','4561','Intereses de deudas empresas asociadas',NULL,NULL,1),(4564,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6622','4561','Intereses de deudas otras partes vinculadas',NULL,NULL,1),(4565,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6623','4561','Intereses de deudas con entidades de crédito',NULL,NULL,1),(4566,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6624','4561','Intereses de deudas otras empresas',NULL,NULL,1),(4567,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','663','4550','Pérdidas por valorización de activos y pasivos financieros por su valor razonable',NULL,NULL,1),(4568,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','664','4550','Gastos por dividendos de acciones o participaciones consideradas como pasivos financieros',NULL,NULL,1),(4569,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6640','4568','Dividendos de pasivos empresas del grupo',NULL,NULL,1),(4570,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6641','4568','Dividendos de pasivos empresas asociadas',NULL,NULL,1),(4571,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6642','4568','Dividendos de pasivos otras partes vinculadas',NULL,NULL,1),(4572,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6643','4568','Dividendos de pasivos otras empresas',NULL,NULL,1),(4573,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','665','4550','Intereses por descuento de efectos y operaciones de factoring',NULL,NULL,1),(4574,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6650','4573','Intereses por descuento de efectos en entidades de crédito del grupo',NULL,NULL,1),(4575,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6651','4573','Intereses por descuento de efectos en entidades de crédito asociadas',NULL,NULL,1),(4576,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6652','4573','Intereses por descuento de efectos en entidades de crédito vinculadas',NULL,NULL,1),(4577,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6653','4573','Intereses por descuento de efectos en otras entidades de crédito',NULL,NULL,1),(4578,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6654','4573','Intereses por operaciones de factoring con entidades de crédito del grupo',NULL,NULL,1),(4579,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6655','4573','Intereses por operaciones de factoring con entidades de crédito asociadas',NULL,NULL,1),(4580,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6656','4573','Intereses por operaciones de factoring con otras entidades de crédito vinculadas',NULL,NULL,1),(4581,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6657','4573','Intereses por operaciones de factoring con otras entidades de crédito',NULL,NULL,1),(4582,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','666','4550','Pérdidas en participaciones y valores representativos de deuda',NULL,NULL,1),(4583,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6660','4582','Pérdidas en valores representativos de deuda a largo plazo empresas del grupo',NULL,NULL,1),(4584,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6661','4582','Pérdidas en valores representativos de deuda a largo plazo empresas asociadas',NULL,NULL,1),(4585,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6662','4582','Pérdidas en valores representativos de deuda a largo plazo otras partes vinculadas',NULL,NULL,1),(4586,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6663','4582','Pérdidas en participaciones y valores representativos de deuda a largo plazo otras empresas',NULL,NULL,1),(4587,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6665','4582','Pérdidas en participaciones y valores representativos de deuda a corto plazo empresas del grupo',NULL,NULL,1),(4588,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6666','4582','Pérdidas en participaciones y valores representativos de deuda a corto plazo empresas asociadas',NULL,NULL,1),(4589,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6667','4582','Pérdidas en valores representativos de deuda a corto plazo otras partes vinculadas',NULL,NULL,1),(4590,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6668','4582','Pérdidas en valores representativos de deuda a corto plazo otras empresas',NULL,NULL,1),(4591,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','667','4550','Pérdidas de créditos no comerciales',NULL,NULL,1),(4592,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6670','4591','Pérdidas de créditos a largo plazo empresas del grupo',NULL,NULL,1),(4593,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6671','4591','Pérdidas de créditos a largo plazo empresas asociadas',NULL,NULL,1),(4594,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6672','4591','Pérdidas de créditos a largo plazo otras partes vinculadas',NULL,NULL,1),(4595,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6673','4591','Pérdidas de créditos a largo plazo otras empresas',NULL,NULL,1),(4596,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6675','4591','Pérdidas de créditos a corto plazo empresas del grupo',NULL,NULL,1),(4597,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6676','4591','Pérdidas de créditos a corto plazo empresas asociadas',NULL,NULL,1),(4598,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6677','4591','Pérdidas de créditos a corto plazo otras partes vinculadas',NULL,NULL,1),(4599,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6678','4591','Pérdidas de créditos a corto plazo otras empresas',NULL,NULL,1),(4600,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','668','4550','Diferencias negativas de cambio',NULL,NULL,1),(4601,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','669','4550','Otros gastos financieros',NULL,NULL,1),(4602,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','67','4006','Pérdidas procedentes de activos no corrientes y gastos excepcionales',NULL,NULL,1),(4603,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','670','4602','Pérdidas procedentes del inmovilizado intangible',NULL,NULL,1),(4604,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','671','4602','Pérdidas procedentes del inmovilizado material',NULL,NULL,1),(4605,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','672','4602','Pérdidas procedentes de las inversiones inmobiliarias',NULL,NULL,1),(4607,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','673','4602','Pérdidas procedentes de participaciones a largo plazo en partes vinculadas',NULL,NULL,1),(4608,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6733','4607','Pérdidas procedentes de participaciones a largo plazo empresas del grupo',NULL,NULL,1),(4609,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6734','4607','Pérdidas procedentes de participaciones a largo plazo empresas asociadas',NULL,NULL,1),(4610,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6735','4607','Pérdidas procedentes de participaciones a largo plazo otras partes vinculadas',NULL,NULL,1),(4611,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','675','4602','Pérdidas por operaciones con obligaciones propias',NULL,NULL,1),(4612,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','678','4602','Gastos excepcionales',NULL,NULL,1),(4613,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','68','4006','Dotaciones para amortizaciones',NULL,NULL,1),(4614,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','680','4613','Amortización del inmovilizado intangible',NULL,NULL,1),(4615,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','681','4613','Amortización del inmovilizado material',NULL,NULL,1),(4616,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','682','4613','Amortización de las inversiones inmobiliarias',NULL,NULL,1),(4617,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','69','4006','Pérdidas por deterioro y otras dotaciones',NULL,NULL,1),(4618,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','690','4617','Pérdidas por deterioro del inmovilizado intangible',NULL,NULL,1),(4619,1,NULL,'2014-12-21 12:51:11','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','691','4617','Pérdidas por deterioro del inmovilizado material',NULL,NULL,1),(4620,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','692','4617','Pérdidas por deterioro de las inversiones inmobiliarias',NULL,NULL,1),(4621,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','693','4617','Pérdidas por deterioro de existencias',NULL,NULL,1),(4622,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6930','4621','Pérdidas por deterioro de productos terminados y en curso de fabricación',NULL,NULL,1),(4623,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6931','4621','Pérdidas por deterioro de mercaderías',NULL,NULL,1),(4624,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6932','4621','Pérdidas por deterioro de materias primas',NULL,NULL,1),(4625,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6933','4621','Pérdidas por deterioro de otros aprovisionamientos',NULL,NULL,1),(4626,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','694','4617','Pérdidas por deterioro de créditos por operaciones comerciales',NULL,NULL,1),(4627,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','695','4617','Dotación a la provisión por operaciones comerciales',NULL,NULL,1),(4628,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6954','4627','Dotación a la provisión por contratos onerosos',NULL,NULL,1),(4629,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6959','4628','Dotación a la provisión para otras operaciones comerciales',NULL,NULL,1),(4630,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','696','4617','Pérdidas por deterioro de participaciones y valores representativos de deuda a largo plazo',NULL,NULL,1),(4631,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6960','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas del grupo',NULL,NULL,1),(4632,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6961','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas asociadas',NULL,NULL,1),(4633,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6962','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras partes vinculadas',NULL,NULL,1),(4634,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6963','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras empresas',NULL,NULL,1),(4635,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6965','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo empresas del grupo',NULL,NULL,1),(4636,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6966','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo empresas asociadas',NULL,NULL,1),(4637,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6967','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo otras partes vinculadas',NULL,NULL,1),(4638,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6968','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo otras empresas',NULL,NULL,1),(4639,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','697','4617','Pérdidas por deterioro de créditos a largo plazo',NULL,NULL,1),(4640,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6970','4639','Pérdidas por deterioro de créditos a largo plazo empresas del grupo',NULL,NULL,1),(4641,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6971','4639','Pérdidas por deterioro de créditos a largo plazo empresas asociadas',NULL,NULL,1),(4642,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6972','4639','Pérdidas por deterioro de créditos a largo plazo otras partes vinculadas',NULL,NULL,1),(4643,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6973','4639','Pérdidas por deterioro de créditos a largo plazo otras empresas',NULL,NULL,1),(4644,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','698','4617','Pérdidas por deterioro de participaciones y valores representativos de deuda a corto plazo',NULL,NULL,1),(4645,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6980','4644','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas del grupo',NULL,NULL,1),(4646,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6981','4644','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas asociadas',NULL,NULL,1),(4647,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6985','4644','Pérdidas por deterioro en valores representativos de deuda a corto plazo empresas del grupo',NULL,NULL,1),(4648,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6986','4644','Pérdidas por deterioro en valores representativos de deuda a corto plazo empresas asociadas',NULL,NULL,1),(4649,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6988','4644','Pérdidas por deterioro en valores representativos de deuda a corto plazo de otras empresas',NULL,NULL,1),(4650,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','699','4617','Pérdidas por deterioro de crédito a corto plazo',NULL,NULL,1),(4651,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6990','4650','Pérdidas por deterioro de crédito a corto plazo empresas del grupo',NULL,NULL,1),(4652,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6991','4650','Pérdidas por deterioro de crédito a corto plazo empresas asociadas',NULL,NULL,1),(4653,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6992','4650','Pérdidas por deterioro de crédito a corto plazo otras partes vinculadas',NULL,NULL,1),(4654,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','COMPRAS_Y_GASTOS','XXXXXX','6993','4650','Pérdidas por deterioro de crédito a corto plazo otras empresas',NULL,NULL,1),(4655,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','70','4007','Ventas',NULL,NULL,1),(4656,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','VENTAS','700','4655','Ventas de mercaderías',NULL,NULL,1),(4657,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','VENTAS','701','4655','Ventas de productos terminados',NULL,NULL,1),(4658,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','702','4655','Ventas de productos semiterminados',NULL,NULL,1),(4659,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','703','4655','Ventas de subproductos y residuos',NULL,NULL,1),(4660,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','704','4655','Ventas de envases y embalajes',NULL,NULL,1),(4661,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','VENTAS','705','4655','Prestaciones de servicios',NULL,NULL,1),(4662,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','706','4655','Descuentos sobre ventas por pronto pago',NULL,NULL,1),(4663,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7060','4662','Descuentos sobre ventas por pronto pago de mercaderías',NULL,NULL,1),(4664,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7061','4662','Descuentos sobre ventas por pronto pago de productos terminados',NULL,NULL,1),(4665,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7062','4662','Descuentos sobre ventas por pronto pago de productos semiterminados',NULL,NULL,1),(4666,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7063','4662','Descuentos sobre ventas por pronto pago de subproductos y residuos',NULL,NULL,1),(4667,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','708','4655','Devoluciones de ventas y operacioes similares',NULL,NULL,1),(4668,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7080','4667','Devoluciones de ventas de mercaderías',NULL,NULL,1),(4669,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7081','4667','Devoluciones de ventas de productos terminados',NULL,NULL,1),(4670,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7082','4667','Devoluciones de ventas de productos semiterminados',NULL,NULL,1),(4671,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7083','4667','Devoluciones de ventas de subproductos y residuos',NULL,NULL,1),(4672,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7084','4667','Devoluciones de ventas de envases y embalajes',NULL,NULL,1),(4673,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','71','4007','Variación de existencias',NULL,NULL,1),(4674,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','710','4673','Variación de existencias de productos en curso',NULL,NULL,1),(4675,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','711','4673','Variación de existencias de productos semiterminados',NULL,NULL,1),(4676,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','712','4673','Variación de existencias de productos terminados',NULL,NULL,1),(4677,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','713','4673','Variación de existencias de subproductos, residuos y materiales recuperados',NULL,NULL,1),(4678,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','73','4007','Trabajos realizados para la empresa',NULL,NULL,1),(4679,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','730','4678','Trabajos realizados para el inmovilizado intangible',NULL,NULL,1),(4680,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','731','4678','Trabajos realizados para el inmovilizado tangible',NULL,NULL,1),(4681,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','732','4678','Trabajos realizados en inversiones inmobiliarias',NULL,NULL,1),(4682,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','733','4678','Trabajos realizados para el inmovilizado material en curso',NULL,NULL,1),(4683,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','74','4007','Subvenciones, donaciones y legados',NULL,NULL,1),(4684,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','740','4683','Subvenciones, donaciones y legados a la explotación',NULL,NULL,1),(4685,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','746','4683','Subvenciones, donaciones y legados de capital transferidos al resultado del ejercicio',NULL,NULL,1),(4686,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','747','4683','Otras subvenciones, donaciones y legados transferidos al resultado del ejercicio',NULL,NULL,1),(4687,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','75','4007','Otros ingresos de gestión',NULL,NULL,1),(4688,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','751','4687','Resultados de operaciones en común',NULL,NULL,1),(4689,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7510','4688','Pérdida transferida gestor',NULL,NULL,1),(4690,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7511','4688','Beneficio atribuido participe o asociado no gestor',NULL,NULL,1),(4691,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','752','4687','Ingreso por arrendamiento',NULL,NULL,1),(4692,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','753','4687','Ingresos de propiedad industrial cedida en explotación',NULL,NULL,1),(4693,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','754','4687','Ingresos por comisiones',NULL,NULL,1),(4694,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','755','4687','Ingresos por servicios al personal',NULL,NULL,1),(4695,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','759','4687','Ingresos por servicios diversos',NULL,NULL,1),(4696,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76','4007','Ingresos financieros',NULL,NULL,1),(4697,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','760','4696','Ingresos de participaciones en instrumentos de patrimonio',NULL,NULL,1),(4698,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7600','4697','Ingresos de participaciones en instrumentos de patrimonio empresas del grupo',NULL,NULL,1),(4699,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7601','4697','Ingresos de participaciones en instrumentos de patrimonio empresas asociadas',NULL,NULL,1),(4700,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7602','4697','Ingresos de participaciones en instrumentos de patrimonio otras partes asociadas',NULL,NULL,1),(4701,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7603','4697','Ingresos de participaciones en instrumentos de patrimonio otras empresas',NULL,NULL,1),(4702,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','761','4696','Ingresos de valores representativos de deuda',NULL,NULL,1),(4703,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7610','4702','Ingresos de valores representativos de deuda empresas del grupo',NULL,NULL,1),(4704,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7611','4702','Ingresos de valores representativos de deuda empresas asociadas',NULL,NULL,1),(4705,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7612','4702','Ingresos de valores representativos de deuda otras partes asociadas',NULL,NULL,1),(4706,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7613','4702','Ingresos de valores representativos de deuda otras empresas',NULL,NULL,1),(4707,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','762','4696','Ingresos de créditos',NULL,NULL,1),(4708,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7620','4707','Ingresos de créditos a largo plazo',NULL,NULL,1),(4709,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76200','4708','Ingresos de crédito a largo plazo empresas del grupo',NULL,NULL,1),(4710,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76201','4708','Ingresos de crédito a largo plazo empresas asociadas',NULL,NULL,1),(4711,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76202','4708','Ingresos de crédito a largo plazo otras partes asociadas',NULL,NULL,1),(4712,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76203','4708','Ingresos de crédito a largo plazo otras empresas',NULL,NULL,1),(4713,1,NULL,'2014-12-21 12:51:12','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7621','4707','Ingresos de créditos a corto plazo',NULL,NULL,1),(4714,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76210','4713','Ingresos de crédito a corto plazo empresas del grupo',NULL,NULL,1),(4715,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76211','4713','Ingresos de crédito a corto plazo empresas asociadas',NULL,NULL,1),(4716,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76212','4713','Ingresos de crédito a corto plazo otras partes asociadas',NULL,NULL,1),(4717,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76213','4713','Ingresos de crédito a corto plazo otras empresas',NULL,NULL,1),(4718,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','763','4696','Beneficios por valorización de activos y pasivos financieros por su valor razonable',NULL,NULL,1),(4719,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','766','4696','Beneficios en participaciones y valores representativos de deuda',NULL,NULL,1),(4720,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7660','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo empresas del grupo',NULL,NULL,1),(4721,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7661','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo empresas asociadas',NULL,NULL,1),(4722,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7662','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo otras partes asociadas',NULL,NULL,1),(4723,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7663','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo otras empresas',NULL,NULL,1),(4724,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7665','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo empresas del grupo',NULL,NULL,1),(4725,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7666','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo empresas asociadas',NULL,NULL,1),(4726,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7667','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo otras partes asociadas',NULL,NULL,1),(4727,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7668','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo otras empresas',NULL,NULL,1),(4728,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','768','4696','Diferencias positivas de cambio',NULL,NULL,1),(4729,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','769','4696','Otros ingresos financieros',NULL,NULL,1),(4730,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','77','4007','Beneficios procedentes de activos no corrientes e ingresos excepcionales',NULL,NULL,1),(4731,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','770','4730','Beneficios procedentes del inmovilizado intangible',NULL,NULL,1),(4732,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','771','4730','Beneficios procedentes del inmovilizado material',NULL,NULL,1),(4733,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','772','4730','Beneficios procedentes de las inversiones inmobiliarias',NULL,NULL,1),(4734,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','773','4730','Beneficios procedentes de participaciones a largo plazo en partes vinculadas',NULL,NULL,1),(4735,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7733','4734','Beneficios procedentes de participaciones a largo plazo empresas del grupo',NULL,NULL,1),(4736,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7734','4734','Beneficios procedentes de participaciones a largo plazo empresas asociadas',NULL,NULL,1),(4737,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7735','4734','Beneficios procedentes de participaciones a largo plazo otras partes vinculadas',NULL,NULL,1),(4738,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','775','4730','Beneficios por operaciones con obligaciones propias',NULL,NULL,1),(4739,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','778','4730','Ingresos excepcionales',NULL,NULL,1),(4741,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','79','4007','Excesos y aplicaciones de provisiones y pérdidas por deterioro',NULL,NULL,1),(4742,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','790','4741','Revisión del deterioro del inmovilizado intangible',NULL,NULL,1),(4743,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','791','4741','Revisión del deterioro del inmovilizado material',NULL,NULL,1),(4744,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','792','4741','Revisión del deterioro de las inversiones inmobiliarias',NULL,NULL,1),(4745,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','793','4741','Revisión del deterioro de las existencias',NULL,NULL,1),(4746,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7930','4745','Revisión del deterioro de productos terminados y en curso de fabricación',NULL,NULL,1),(4747,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7931','4745','Revisión del deterioro de mercaderías',NULL,NULL,1),(4748,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7932','4745','Revisión del deterioro de materias primas',NULL,NULL,1),(4749,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7933','4745','Revisión del deterioro de otros aprovisionamientos',NULL,NULL,1),(4750,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','794','4741','Revisión del deterioro de créditos por operaciones comerciales',NULL,NULL,1),(4751,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','795','4741','Exceso de provisiones',NULL,NULL,1),(4752,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7951','4751','Exceso de provisión para impuestos',NULL,NULL,1),(4753,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7952','4751','Exceso de provisión para otras responsabilidades',NULL,NULL,1),(4755,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7954','4751','Exceso de provisión para operaciones comerciales',NULL,NULL,1),(4756,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','79544','4755','Exceso de provisión por contratos onerosos',NULL,NULL,1),(4757,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','79549','4755','Exceso de provisión para otras operaciones comerciales',NULL,NULL,1),(4758,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7955','4751','Exceso de provisión para actuaciones medioambienteales',NULL,NULL,1),(4759,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','796','4741','Revisión del deterioro de participaciones y valores representativos de deuda a largo plazo',NULL,NULL,1),(4760,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7960','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas del grupo',NULL,NULL,1),(4761,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7961','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas asociadas',NULL,NULL,1),(4762,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7962','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras partes vinculadas',NULL,NULL,1),(4763,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7963','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras empresas',NULL,NULL,1),(4764,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7965','4759','Revisión del deterioro de valores representativos a largo plazo empresas del grupo',NULL,NULL,1),(4765,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7966','4759','Revisión del deterioro de valores representativos a largo plazo empresas asociadas',NULL,NULL,1),(4766,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7967','4759','Revisión del deterioro de valores representativos a largo otras partes vinculadas',NULL,NULL,1),(4767,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7968','4759','Revisión del deterioro de valores representativos a largo plazo otras empresas',NULL,NULL,1),(4768,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','797','4741','Revisión del deterioro de créditos a largo plazo',NULL,NULL,1),(4769,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7970','4768','Revisión del deterioro de créditos a largo plazo empresas del grupo',NULL,NULL,1),(4770,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7971','4768','Revisión del deterioro de créditos a largo plazo empresas asociadas',NULL,NULL,1),(4771,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7972','4768','Revisión del deterioro de créditos a largo plazo otras partes vinculadas',NULL,NULL,1),(4772,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7973','4768','Revisión del deterioro de créditos a largo plazo otras empresas',NULL,NULL,1),(4773,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','798','4741','Revisión del deterioro de participaciones y valores representativos de deuda a corto plazo',NULL,NULL,1),(4774,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7980','4773','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas del grupo',NULL,NULL,1),(4775,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7981','4773','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas asociadas',NULL,NULL,1),(4776,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7985','4773','Revisión del deterioro de valores representativos de deuda a corto plazo empresas del grupo',NULL,NULL,1),(4777,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7986','4773','Revisión del deterioro de valores representativos de deuda a corto plazo empresas asociadas',NULL,NULL,1),(4778,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7987','4773','Revisión del deterioro de valores representativos de deuda a corto plazo otras partes vinculadas',NULL,NULL,1),(4779,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7988','4773','Revisión del deterioro de valores representativos de deuda a corto plazo otras empresas',NULL,NULL,1),(4780,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','799','4741','Revisión del deterioro de créditos a corto plazo',NULL,NULL,1),(4781,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7990','4780','Revisión del deterioro de créditos a corto plazo empresas del grupo',NULL,NULL,1),(4782,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7991','4780','Revisión del deterioro de créditos a corto plazo empresas asociadas',NULL,NULL,1),(4783,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7992','4780','Revisión del deterioro de créditos a corto plazo otras partes vinculadas',NULL,NULL,1),(4784,1,NULL,'2014-12-21 12:51:13','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7993','4780','Revisión del deterioro de créditos a corto plazo otras empresas',NULL,NULL,1); +INSERT INTO `llx_accountingaccount` VALUES (1,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','CAPITAL','101','1401','Capital',NULL,NULL,1),(2,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','105','1401','Ecarts de réévaluation',NULL,NULL,1),(3,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1061','1401','Réserve légale',NULL,NULL,1),(4,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1063','1401','Réserves statutaires ou contractuelles',NULL,NULL,1),(5,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1064','1401','Réserves réglementées',NULL,NULL,1),(6,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1068','1401','Autres réserves',NULL,NULL,1),(7,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','108','1401','Compte de l\'exploitant',NULL,NULL,1),(8,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','12','1401','Résultat de l\'exercice',NULL,NULL,1),(9,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','145','1401','Amortissements dérogatoires',NULL,NULL,1),(10,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','146','1401','Provision spéciale de réévaluation',NULL,NULL,1),(11,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','147','1401','Plus-values réinvesties',NULL,NULL,1),(12,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','148','1401','Autres provisions réglementées',NULL,NULL,1),(13,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','15','1401','Provisions pour risques et charges',NULL,NULL,1),(14,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','16','1401','Emprunts et dettes assimilees',NULL,NULL,1),(15,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','20','1402','Immobilisations incorporelles',NULL,NULL,1),(16,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','201','15','Frais d\'établissement',NULL,NULL,1),(17,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','206','15','Droit au bail',NULL,NULL,1),(18,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','207','15','Fonds commercial',NULL,NULL,1),(19,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','208','15','Autres immobilisations incorporelles',NULL,NULL,1),(20,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','21','1402','Immobilisations corporelles',NULL,NULL,1),(21,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','23','1402','Immobilisations en cours',NULL,NULL,1),(22,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','27','1402','Autres immobilisations financieres',NULL,NULL,1),(23,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','280','1402','Amortissements des immobilisations incorporelles',NULL,NULL,1),(24,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','281','1402','Amortissements des immobilisations corporelles',NULL,NULL,1),(25,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','290','1402','Provisions pour dépréciation des immobilisations incorporelles',NULL,NULL,1),(26,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','291','1402','Provisions pour dépréciation des immobilisations corporelles',NULL,NULL,1),(27,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','297','1402','Provisions pour dépréciation des autres immobilisations financières',NULL,NULL,1),(28,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','31','1403','Matieres premières',NULL,NULL,1),(29,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','32','1403','Autres approvisionnements',NULL,NULL,1),(30,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','33','1403','En-cours de production de biens',NULL,NULL,1),(31,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','34','1403','En-cours de production de services',NULL,NULL,1),(32,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','35','1403','Stocks de produits',NULL,NULL,1),(33,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','37','1403','Stocks de marchandises',NULL,NULL,1),(34,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','391','1403','Provisions pour dépréciation des matières premières',NULL,NULL,1),(35,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','392','1403','Provisions pour dépréciation des autres approvisionnements',NULL,NULL,1),(36,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','393','1403','Provisions pour dépréciation des en-cours de production de biens',NULL,NULL,1),(37,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','394','1403','Provisions pour dépréciation des en-cours de production de services',NULL,NULL,1),(38,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','395','1403','Provisions pour dépréciation des stocks de produits',NULL,NULL,1),(39,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','397','1403','Provisions pour dépréciation des stocks de marchandises',NULL,NULL,1),(40,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','SUPPLIER','400','1404','Fournisseurs et Comptes rattachés',NULL,NULL,1),(41,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','409','1404','Fournisseurs débiteurs',NULL,NULL,1),(42,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','CUSTOMER','410','1404','Clients et Comptes rattachés',NULL,NULL,1),(43,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','419','1404','Clients créditeurs',NULL,NULL,1),(44,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','421','1404','Personnel',NULL,NULL,1),(45,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','428','1404','Personnel',NULL,NULL,1),(46,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','43','1404','Sécurité sociale et autres organismes sociaux',NULL,NULL,1),(47,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','444','1404','Etat - impôts sur bénéfice',NULL,NULL,1),(48,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','445','1404','Etat - Taxes sur chiffre affaires',NULL,NULL,1),(49,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','447','1404','Autres impôts, taxes et versements assimilés',NULL,NULL,1),(50,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','45','1404','Groupe et associes',NULL,NULL,1),(51,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','455','50','Associés',NULL,NULL,1),(52,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','46','1404','Débiteurs divers et créditeurs divers',NULL,NULL,1),(53,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','47','1404','Comptes transitoires ou d\'attente',NULL,NULL,1),(54,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','481','1404','Charges à répartir sur plusieurs exercices',NULL,NULL,1),(55,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','486','1404','Charges constatées d\'avance',NULL,NULL,1),(56,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','487','1404','Produits constatés d\'avance',NULL,NULL,1),(57,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','491','1404','Provisions pour dépréciation des comptes de clients',NULL,NULL,1),(58,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','496','1404','Provisions pour dépréciation des comptes de débiteurs divers',NULL,NULL,1),(59,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','50','1405','Valeurs mobilières de placement',NULL,NULL,1),(60,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','BANK','51','1405','Banques, établissements financiers et assimilés',NULL,NULL,1),(61,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','CASH','53','1405','Caisse',NULL,NULL,1),(62,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','54','1405','Régies d\'avance et accréditifs',NULL,NULL,1),(63,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','58','1405','Virements internes',NULL,NULL,1),(64,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','590','1405','Provisions pour dépréciation des valeurs mobilières de placement',NULL,NULL,1),(65,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','PRODUCT','60','1406','Achats',NULL,NULL,1),(66,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','603','65','Variations des stocks',NULL,NULL,1),(67,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','SERVICE','61','1406','Services extérieurs',NULL,NULL,1),(68,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','62','1406','Autres services extérieurs',NULL,NULL,1),(69,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','63','1406','Impôts, taxes et versements assimiles',NULL,NULL,1),(70,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','641','1406','Rémunérations du personnel',NULL,NULL,1),(71,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','644','1406','Rémunération du travail de l\'exploitant',NULL,NULL,1),(72,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','SOCIAL','645','1406','Charges de sécurité sociale et de prévoyance',NULL,NULL,1),(73,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','646','1406','Cotisations sociales personnelles de l\'exploitant',NULL,NULL,1),(74,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','65','1406','Autres charges de gestion courante',NULL,NULL,1),(75,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','66','1406','Charges financières',NULL,NULL,1),(76,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','67','1406','Charges exceptionnelles',NULL,NULL,1),(77,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','681','1406','Dotations aux amortissements et aux provisions',NULL,NULL,1),(78,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','686','1406','Dotations aux amortissements et aux provisions',NULL,NULL,1),(79,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','687','1406','Dotations aux amortissements et aux provisions',NULL,NULL,1),(80,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','691','1406','Participation des salariés aux résultats',NULL,NULL,1),(81,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','695','1406','Impôts sur les bénéfices',NULL,NULL,1),(82,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','697','1406','Imposition forfaitaire annuelle des sociétés',NULL,NULL,1),(83,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','699','1406','Produits',NULL,NULL,1),(84,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','PRODUCT','701','1407','Ventes de produits finis',NULL,NULL,1),(85,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','SERVICE','706','1407','Prestations de services',NULL,NULL,1),(86,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','PRODUCT','707','1407','Ventes de marchandises',NULL,NULL,1),(87,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','PRODUCT','708','1407','Produits des activités annexes',NULL,NULL,1),(88,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','709','1407','Rabais, remises et ristournes accordés par l\'entreprise',NULL,NULL,1),(89,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','713','1407','Variation des stocks',NULL,NULL,1),(90,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','72','1407','Production immobilisée',NULL,NULL,1),(91,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','73','1407','Produits nets partiels sur opérations à long terme',NULL,NULL,1),(92,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','74','1407','Subventions d\'exploitation',NULL,NULL,1),(93,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','75','1407','Autres produits de gestion courante',NULL,NULL,1),(94,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','753','93','Jetons de présence et rémunérations d\'administrateurs, gérants,...',NULL,NULL,1),(95,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','754','93','Ristournes perçues des coopératives',NULL,NULL,1),(96,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','755','93','Quotes-parts de résultat sur opérations faites en commun',NULL,NULL,1),(97,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','76','1407','Produits financiers',NULL,NULL,1),(98,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','77','1407','Produits exceptionnels',NULL,NULL,1),(99,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','781','1407','Reprises sur amortissements et provisions',NULL,NULL,1),(100,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','786','1407','Reprises sur provisions pour risques',NULL,NULL,1),(101,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','787','1407','Reprises sur provisions',NULL,NULL,1),(102,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','79','1407','Transferts de charges',NULL,NULL,1),(103,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','10','1501','Capital et réserves',NULL,NULL,1),(104,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','CAPITAL','101','103','Capital',NULL,NULL,1),(105,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','104','103','Primes liées au capital social',NULL,NULL,1),(106,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','105','103','Ecarts de réévaluation',NULL,NULL,1),(107,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','106','103','Réserves',NULL,NULL,1),(108,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','107','103','Ecart d\'equivalence',NULL,NULL,1),(109,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','108','103','Compte de l\'exploitant',NULL,NULL,1),(110,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','109','103','Actionnaires : capital souscrit - non appelé',NULL,NULL,1),(111,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','11','1501','Report à nouveau (solde créditeur ou débiteur)',NULL,NULL,1),(112,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','110','111','Report à nouveau (solde créditeur)',NULL,NULL,1),(113,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','119','111','Report à nouveau (solde débiteur)',NULL,NULL,1),(114,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','12','1501','Résultat de l\'exercice (bénéfice ou perte)',NULL,NULL,1),(115,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','120','114','Résultat de l\'exercice (bénéfice)',NULL,NULL,1),(116,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','129','114','Résultat de l\'exercice (perte)',NULL,NULL,1),(117,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','13','1501','Subventions d\'investissement',NULL,NULL,1),(118,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','131','117','Subventions d\'équipement',NULL,NULL,1),(119,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','138','117','Autres subventions d\'investissement',NULL,NULL,1),(120,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','139','117','Subventions d\'investissement inscrites au compte de résultat',NULL,NULL,1),(121,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','14','1501','Provisions réglementées',NULL,NULL,1),(122,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','142','121','Provisions réglementées relatives aux immobilisations',NULL,NULL,1),(123,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','143','121','Provisions réglementées relatives aux stocks',NULL,NULL,1),(124,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','144','121','Provisions réglementées relatives aux autres éléments de l\'actif',NULL,NULL,1),(125,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','145','121','Amortissements dérogatoires',NULL,NULL,1),(126,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','146','121','Provision spéciale de réévaluation',NULL,NULL,1),(127,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','147','121','Plus-values réinvesties',NULL,NULL,1),(128,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','148','121','Autres provisions réglementées',NULL,NULL,1),(129,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','15','1501','Provisions pour risques et charges',NULL,NULL,1),(130,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','151','129','Provisions pour risques',NULL,NULL,1),(131,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','153','129','Provisions pour pensions et obligations similaires',NULL,NULL,1),(132,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','154','129','Provisions pour restructurations',NULL,NULL,1),(133,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','155','129','Provisions pour impôts',NULL,NULL,1),(134,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','156','129','Provisions pour renouvellement des immobilisations (entreprises concessionnaires)',NULL,NULL,1),(135,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','157','129','Provisions pour charges à répartir sur plusieurs exercices',NULL,NULL,1),(136,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','158','129','Autres provisions pour charges',NULL,NULL,1),(137,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','16','1501','Emprunts et dettes assimilees',NULL,NULL,1),(138,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','161','137','Emprunts obligataires convertibles',NULL,NULL,1),(139,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','163','137','Autres emprunts obligataires',NULL,NULL,1),(140,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','164','137','Emprunts auprès des établissements de crédit',NULL,NULL,1),(141,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','165','137','Dépôts et cautionnements reçus',NULL,NULL,1),(142,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','166','137','Participation des salariés aux résultats',NULL,NULL,1),(143,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','167','137','Emprunts et dettes assortis de conditions particulières',NULL,NULL,1),(144,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','168','137','Autres emprunts et dettes assimilées',NULL,NULL,1),(145,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','169','137','Primes de remboursement des obligations',NULL,NULL,1),(146,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','17','1501','Dettes rattachées à des participations',NULL,NULL,1),(147,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','171','146','Dettes rattachées à des participations (groupe)',NULL,NULL,1),(148,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','174','146','Dettes rattachées à des participations (hors groupe)',NULL,NULL,1),(149,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','178','146','Dettes rattachées à des sociétés en participation',NULL,NULL,1),(150,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','18','1501','Comptes de liaison des établissements et sociétés en participation',NULL,NULL,1),(151,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','181','150','Comptes de liaison des établissements',NULL,NULL,1),(152,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','186','150','Biens et prestations de services échangés entre établissements (charges)',NULL,NULL,1),(153,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','187','150','Biens et prestations de services échangés entre établissements (produits)',NULL,NULL,1),(154,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','188','150','Comptes de liaison des sociétés en participation',NULL,NULL,1),(155,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','20','1502','Immobilisations incorporelles',NULL,NULL,1),(156,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','201','155','Frais d\'établissement',NULL,NULL,1),(157,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','203','155','Frais de recherche et de développement',NULL,NULL,1),(158,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','205','155','Concessions et droits similaires, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',NULL,NULL,1),(159,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','206','155','Droit au bail',NULL,NULL,1),(160,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','207','155','Fonds commercial',NULL,NULL,1),(161,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','208','155','Autres immobilisations incorporelles',NULL,NULL,1),(162,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','21','1502','Immobilisations corporelles',NULL,NULL,1),(163,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','211','162','Terrains',NULL,NULL,1),(164,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','212','162','Agencements et aménagements de terrains',NULL,NULL,1),(165,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','213','162','Constructions',NULL,NULL,1),(166,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','214','162','Constructions sur sol d\'autrui',NULL,NULL,1),(167,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','215','162','Installations techniques, matériels et outillage industriels',NULL,NULL,1),(168,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','218','162','Autres immobilisations corporelles',NULL,NULL,1),(169,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','22','1502','Immobilisations mises en concession',NULL,NULL,1),(170,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','23','1502','Immobilisations en cours',NULL,NULL,1),(171,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','231','170','Immobilisations corporelles en cours',NULL,NULL,1),(172,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','232','170','Immobilisations incorporelles en cours',NULL,NULL,1),(173,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','237','170','Avances et acomptes versés sur immobilisations incorporelles',NULL,NULL,1),(174,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','238','170','Avances et acomptes versés sur commandes d\'immobilisations corporelles',NULL,NULL,1),(175,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','25','1502','Parts dans des entreprises liées et créances sur des entreprises liées',NULL,NULL,1),(176,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','26','1502','Participations et créances rattachées à des participations',NULL,NULL,1),(177,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','261','176','Titres de participation',NULL,NULL,1),(178,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','266','176','Autres formes de participation',NULL,NULL,1),(179,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','267','176','Créances rattachées à des participations',NULL,NULL,1),(180,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','268','176','Créances rattachées à des sociétés en participation',NULL,NULL,1),(181,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','269','176','Versements restant à effectuer sur titres de participation non libérés',NULL,NULL,1),(182,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','27','1502','Autres immobilisations financieres',NULL,NULL,1),(183,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','271','183','Titres immobilisés autres que les titres immobilisés de l\'activité de portefeuille (droit de propriété)',NULL,NULL,1),(184,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','272','183','Titres immobilisés (droit de créance)',NULL,NULL,1),(185,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','273','183','Titres immobilisés de l\'activité de portefeuille',NULL,NULL,1),(186,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','274','183','Prêts',NULL,NULL,1),(187,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','275','183','Dépôts et cautionnements versés',NULL,NULL,1),(188,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','276','183','Autres créances immobilisées',NULL,NULL,1),(189,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','277','183','(Actions propres ou parts propres)',NULL,NULL,1),(190,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','279','183','Versements restant à effectuer sur titres immobilisés non libérés',NULL,NULL,1),(191,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','28','1502','Amortissements des immobilisations',NULL,NULL,1),(192,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','280','191','Amortissements des immobilisations incorporelles',NULL,NULL,1),(193,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','281','191','Amortissements des immobilisations corporelles',NULL,NULL,1),(194,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','282','191','Amortissements des immobilisations mises en concession',NULL,NULL,1),(195,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','29','1502','Dépréciations des immobilisations',NULL,NULL,1),(196,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','290','195','Dépréciations des immobilisations incorporelles',NULL,NULL,1),(197,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','291','195','Dépréciations des immobilisations corporelles',NULL,NULL,1),(198,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','292','195','Dépréciations des immobilisations mises en concession',NULL,NULL,1),(199,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','293','195','Dépréciations des immobilisations en cours',NULL,NULL,1),(200,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','296','195','Provisions pour dépréciation des participations et créances rattachées à des participations',NULL,NULL,1),(201,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','297','195','Provisions pour dépréciation des autres immobilisations financières',NULL,NULL,1),(202,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','31','1503','Matières premières (et fournitures)',NULL,NULL,1),(203,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','311','202','Matières (ou groupe) A',NULL,NULL,1),(204,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','312','202','Matières (ou groupe) B',NULL,NULL,1),(205,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','317','202','Fournitures A, B, C,',NULL,NULL,1),(206,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','32','1503','Autres approvisionnements',NULL,NULL,1),(207,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','321','206','Matières consommables',NULL,NULL,1),(208,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','322','206','Fournitures consommables',NULL,NULL,1),(209,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','326','206','Emballages',NULL,NULL,1),(210,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','33','1503','En-cours de production de biens',NULL,NULL,1),(211,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','331','210','Produits en cours',NULL,NULL,1),(212,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','335','210','Travaux en cours',NULL,NULL,1),(213,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','34','1503','En-cours de production de services',NULL,NULL,1),(214,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','341','213','Etudes en cours',NULL,NULL,1),(215,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','345','213','Prestations de services en cours',NULL,NULL,1),(216,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','35','1503','Stocks de produits',NULL,NULL,1),(217,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','351','216','Produits intermédiaires',NULL,NULL,1),(218,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','355','216','Produits finis',NULL,NULL,1),(219,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','358','216','Produits résiduels (ou matières de récupération)',NULL,NULL,1),(220,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','37','1503','Stocks de marchandises',NULL,NULL,1),(221,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','371','220','Marchandises (ou groupe) A',NULL,NULL,1),(222,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','372','220','Marchandises (ou groupe) B',NULL,NULL,1),(223,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','39','1503','Provisions pour dépréciation des stocks et en-cours',NULL,NULL,1),(224,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','391','223','Provisions pour dépréciation des matières premières',NULL,NULL,1),(225,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','392','223','Provisions pour dépréciation des autres approvisionnements',NULL,NULL,1),(226,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','393','223','Provisions pour dépréciation des en-cours de production de biens',NULL,NULL,1),(227,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','394','223','Provisions pour dépréciation des en-cours de production de services',NULL,NULL,1),(228,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','395','223','Provisions pour dépréciation des stocks de produits',NULL,NULL,1),(229,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','397','223','Provisions pour dépréciation des stocks de marchandises',NULL,NULL,1),(230,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','40','1504','Fournisseurs et Comptes rattachés',NULL,NULL,1),(231,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','400','230','Fournisseurs et Comptes rattachés',NULL,NULL,1),(232,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','SUPPLIER','401','230','Fournisseurs',NULL,NULL,1),(233,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','403','230','Fournisseurs - Effets à payer',NULL,NULL,1),(234,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','404','230','Fournisseurs d\'immobilisations',NULL,NULL,1),(235,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','405','230','Fournisseurs d\'immobilisations - Effets à payer',NULL,NULL,1),(236,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','408','230','Fournisseurs - Factures non parvenues',NULL,NULL,1),(237,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','409','230','Fournisseurs débiteurs',NULL,NULL,1),(238,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','41','1504','Clients et comptes rattachés',NULL,NULL,1),(239,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','410','238','Clients et Comptes rattachés',NULL,NULL,1),(240,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','CUSTOMER','411','238','Clients',NULL,NULL,1),(241,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','413','238','Clients - Effets à recevoir',NULL,NULL,1),(242,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','416','238','Clients douteux ou litigieux',NULL,NULL,1),(243,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','418','238','Clients - Produits non encore facturés',NULL,NULL,1),(244,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','419','238','Clients créditeurs',NULL,NULL,1),(245,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','42','1504','Personnel et comptes rattachés',NULL,NULL,1),(246,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','421','245','Personnel - Rémunérations dues',NULL,NULL,1),(247,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','422','245','Comités d\'entreprises, d\'établissement, ...',NULL,NULL,1),(248,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','424','245','Participation des salariés aux résultats',NULL,NULL,1),(249,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','425','245','Personnel - Avances et acomptes',NULL,NULL,1),(250,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','426','245','Personnel - Dépôts',NULL,NULL,1),(251,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','427','245','Personnel - Oppositions',NULL,NULL,1),(252,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','428','245','Personnel - Charges à payer et produits à recevoir',NULL,NULL,1),(253,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','43','1504','Sécurité sociale et autres organismes sociaux',NULL,NULL,1),(254,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','431','253','Sécurité sociale',NULL,NULL,1),(255,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','437','253','Autres organismes sociaux',NULL,NULL,1),(256,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','438','253','Organismes sociaux - Charges à payer et produits à recevoir',NULL,NULL,1),(257,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','44','1504','État et autres collectivités publiques',NULL,NULL,1),(258,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','441','257','État - Subventions à recevoir',NULL,NULL,1),(259,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','442','257','Etat - Impôts et taxes recouvrables sur des tiers',NULL,NULL,1),(260,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','443','257','Opérations particulières avec l\'Etat, les collectivités publiques, les organismes internationaux',NULL,NULL,1),(261,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','444','257','Etat - Impôts sur les bénéfices',NULL,NULL,1),(262,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','445','257','Etat - Taxes sur le chiffre d\'affaires',NULL,NULL,1),(263,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','446','257','Obligations cautionnées',NULL,NULL,1),(264,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','447','257','Autres impôts, taxes et versements assimilés',NULL,NULL,1),(265,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','448','257','Etat - Charges à payer et produits à recevoir',NULL,NULL,1),(266,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','449','257','Quotas d\'émission à restituer à l\'Etat',NULL,NULL,1),(267,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','45','1504','Groupe et associes',NULL,NULL,1),(268,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','451','267','Groupe',NULL,NULL,1),(269,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','455','267','Associés - Comptes courants',NULL,NULL,1),(270,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','456','267','Associés - Opérations sur le capital',NULL,NULL,1),(271,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','457','267','Associés - Dividendes à payer',NULL,NULL,1),(272,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','458','267','Associés - Opérations faites en commun et en G.I.E.',NULL,NULL,1),(273,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','46','1504','Débiteurs divers et créditeurs divers',NULL,NULL,1),(274,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','462','273','Créances sur cessions d\'immobilisations',NULL,NULL,1),(275,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','464','273','Dettes sur acquisitions de valeurs mobilières de placement',NULL,NULL,1),(276,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','465','273','Créances sur cessions de valeurs mobilières de placement',NULL,NULL,1),(277,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','467','273','Autres comptes débiteurs ou créditeurs',NULL,NULL,1),(278,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','468','273','Divers - Charges à payer et produits à recevoir',NULL,NULL,1),(279,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','47','1504','Comptes transitoires ou d\'attente',NULL,NULL,1),(280,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','471','279','Comptes d\'attente',NULL,NULL,1),(281,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','476','279','Différence de conversion - Actif',NULL,NULL,1),(282,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','477','279','Différences de conversion - Passif',NULL,NULL,1),(283,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','478','279','Autres comptes transitoires',NULL,NULL,1),(284,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','48','1504','Comptes de régularisation',NULL,NULL,1),(285,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','481','284','Charges à répartir sur plusieurs exercices',NULL,NULL,1),(286,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','486','284','Charges constatées d\'avance',NULL,NULL,1),(287,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','487','284','Produits constatés d\'avance',NULL,NULL,1),(288,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','488','284','Comptes de répartition périodique des charges et des produits',NULL,NULL,1),(289,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','489','284','Quotas d\'émission alloués par l\'Etat',NULL,NULL,1),(290,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','49','1504','Provisions pour dépréciation des comptes de tiers',NULL,NULL,1),(291,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','491','290','Provisions pour dépréciation des comptes de clients',NULL,NULL,1),(292,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','495','290','Provisions pour dépréciation des comptes du groupe et des associés',NULL,NULL,1),(293,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','496','290','Provisions pour dépréciation des comptes de débiteurs divers',NULL,NULL,1),(294,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','50','1505','Valeurs mobilières de placement',NULL,NULL,1),(295,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','501','294','Parts dans des entreprises liées',NULL,NULL,1),(296,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','502','294','Actions propres',NULL,NULL,1),(297,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','503','294','Actions',NULL,NULL,1),(298,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','504','294','Autres titres conférant un droit de propriété',NULL,NULL,1),(299,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','505','294','Obligations et bons émis par la société et rachetés par elle',NULL,NULL,1),(300,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','506','294','Obligations',NULL,NULL,1),(301,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','507','294','Bons du Trésor et bons de caisse à court terme',NULL,NULL,1),(302,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','508','294','Autres valeurs mobilières de placement et autres créances assimilées',NULL,NULL,1),(303,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','509','294','Versements restant à effectuer sur valeurs mobilières de placement non libérées',NULL,NULL,1),(304,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','51','1505','Banques, établissements financiers et assimilés',NULL,NULL,1),(305,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','511','304','Valeurs à l\'encaissement',NULL,NULL,1),(306,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','BANK','512','304','Banques',NULL,NULL,1),(307,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','514','304','Chèques postaux',NULL,NULL,1),(308,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','515','304','\"Caisses\" du Trésor et des établissements publics',NULL,NULL,1),(309,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','516','304','Sociétés de bourse',NULL,NULL,1),(310,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','517','304','Autres organismes financiers',NULL,NULL,1),(311,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','518','304','Intérêts courus',NULL,NULL,1),(312,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','519','304','Concours bancaires courants',NULL,NULL,1),(313,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','52','1505','Instruments de trésorerie',NULL,NULL,1),(314,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','CASH','53','1505','Caisse',NULL,NULL,1),(315,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','531','314','Caisse siège social',NULL,NULL,1),(316,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','532','314','Caisse succursale (ou usine) A',NULL,NULL,1),(317,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','533','314','Caisse succursale (ou usine) B',NULL,NULL,1),(318,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','54','1505','Régies d\'avance et accréditifs',NULL,NULL,1),(319,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','58','1505','Virements internes',NULL,NULL,1),(320,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','59','1505','Provisions pour dépréciation des comptes financiers',NULL,NULL,1),(321,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','590','320','Provisions pour dépréciation des valeurs mobilières de placement',NULL,NULL,1),(322,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','PRODUCT','60','1506','Achats',NULL,NULL,1),(323,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','601','322','Achats stockés - Matières premières (et fournitures)',NULL,NULL,1),(324,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','602','322','Achats stockés - Autres approvisionnements',NULL,NULL,1),(325,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','603','322','Variations des stocks (approvisionnements et marchandises)',NULL,NULL,1),(326,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','604','322','Achats stockés - Matières premières (et fournitures)',NULL,NULL,1),(327,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','605','322','Achats de matériel, équipements et travaux',NULL,NULL,1),(328,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','606','322','Achats non stockés de matière et fournitures',NULL,NULL,1),(329,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','607','322','Achats de marchandises',NULL,NULL,1),(330,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','608','322','(Compte réservé, le cas échéant, à la récapitulation des frais accessoires incorporés aux achats)',NULL,NULL,1),(331,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','609','322','Rabais, remises et ristournes obtenus sur achats',NULL,NULL,1),(332,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','SERVICE','61','1506','Services extérieurs',NULL,NULL,1),(333,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','611','332','Sous-traitance générale',NULL,NULL,1),(334,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','612','332','Redevances de crédit-bail',NULL,NULL,1),(335,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','613','332','Locations',NULL,NULL,1),(336,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','614','332','Charges locatives et de copropriété',NULL,NULL,1),(337,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','615','332','Entretien et réparations',NULL,NULL,1),(338,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','616','332','Primes d\'assurances',NULL,NULL,1),(339,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','617','332','Etudes et recherches',NULL,NULL,1),(340,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','618','332','Divers',NULL,NULL,1),(341,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','619','332','Rabais, remises et ristournes obtenus sur services extérieurs',NULL,NULL,1),(342,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','62','1506','Autres services extérieurs',NULL,NULL,1),(343,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','621','342','Personnel extérieur à l\'entreprise',NULL,NULL,1),(344,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','622','342','Rémunérations d\'intermédiaires et honoraires',NULL,NULL,1),(345,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','623','342','Publicité, publications, relations publiques',NULL,NULL,1),(346,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','624','342','Transports de biens et transports collectifs du personnel',NULL,NULL,1),(347,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','625','342','Déplacements, missions et réceptions',NULL,NULL,1),(348,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','626','342','Frais postaux et de télécommunications',NULL,NULL,1),(349,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','627','342','Services bancaires et assimilés',NULL,NULL,1),(350,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','628','342','Divers',NULL,NULL,1),(351,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','629','342','Rabais, remises et ristournes obtenus sur autres services extérieurs',NULL,NULL,1),(352,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','63','1506','Impôts, taxes et versements assimilés',NULL,NULL,1),(353,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','631','352','Impôts, taxes et versements assimilés sur rémunérations (administrations des impôts)',NULL,NULL,1),(354,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','633','352','Impôts, taxes et versements assimilés sur rémunérations (autres organismes)',NULL,NULL,1),(355,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','635','352','Autres impôts, taxes et versements assimilés (administrations des impôts)',NULL,NULL,1),(356,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','637','352','Autres impôts, taxes et versements assimilés (autres organismes)',NULL,NULL,1),(357,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','64','1506','Charges de personnel',NULL,NULL,1),(358,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','641','357','Rémunérations du personnel',NULL,NULL,1),(359,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','644','357','Rémunération du travail de l\'exploitant',NULL,NULL,1),(360,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','SOCIAL','645','357','Charges de sécurité sociale et de prévoyance',NULL,NULL,1),(361,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','646','357','Cotisations sociales personnelles de l\'exploitant',NULL,NULL,1),(362,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','647','357','Autres charges sociales',NULL,NULL,1),(363,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','648','357','Autres charges de personnel',NULL,NULL,1),(364,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','65','1506','Autres charges de gestion courante',NULL,NULL,1),(365,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','651','364','Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',NULL,NULL,1),(366,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','653','364','Jetons de présence',NULL,NULL,1),(367,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','654','364','Pertes sur créances irrécouvrables',NULL,NULL,1),(368,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','655','364','Quote-part de résultat sur opérations faites en commun',NULL,NULL,1),(369,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','658','364','Charges diverses de gestion courante',NULL,NULL,1),(370,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','66','1506','Charges financières',NULL,NULL,1),(371,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','661','370','Charges d\'intérêts',NULL,NULL,1),(372,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','664','370','Pertes sur créances liées à des participations',NULL,NULL,1),(373,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','665','370','Escomptes accordés',NULL,NULL,1),(374,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','666','370','Pertes de change',NULL,NULL,1),(375,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','667','370','Charges nettes sur cessions de valeurs mobilières de placement',NULL,NULL,1),(376,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','668','370','Autres charges financières',NULL,NULL,1),(377,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','67','1506','Charges exceptionnelles',NULL,NULL,1),(378,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','671','377','Charges exceptionnelles sur opérations de gestion',NULL,NULL,1),(379,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','672','377','(Compte à la disposition des entités pour enregistrer, en cours d\'exercice, les charges sur exercices antérieurs)',NULL,NULL,1),(380,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','675','377','Valeurs comptables des éléments d\'actif cédés',NULL,NULL,1),(381,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','678','377','Autres charges exceptionnelles',NULL,NULL,1),(382,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','68','1506','Dotations aux amortissements et aux provisions',NULL,NULL,1),(383,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','681','382','Dotations aux amortissements et aux provisions - Charges d\'exploitation',NULL,NULL,1),(384,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','686','382','Dotations aux amortissements et aux provisions - Charges financières',NULL,NULL,1),(385,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','687','382','Dotations aux amortissements et aux provisions - Charges exceptionnelles',NULL,NULL,1),(386,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','69','1506','Participation des salariés - impôts sur les bénéfices et assimiles',NULL,NULL,1),(387,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','691','386','Participation des salariés aux résultats',NULL,NULL,1),(388,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','695','386','Impôts sur les bénéfices',NULL,NULL,1),(389,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','696','386','Suppléments d\'impôt sur les sociétés liés aux distributions',NULL,NULL,1),(390,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','697','386','Imposition forfaitaire annuelle des sociétés',NULL,NULL,1),(391,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','698','386','Intégration fiscale',NULL,NULL,1),(392,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','699','386','Produits - Reports en arrière des déficits',NULL,NULL,1),(393,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','70','1507','Ventes de produits fabriqués, prestations de services, marchandises',NULL,NULL,1),(394,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','PRODUCT','701','393','Ventes de produits finis',NULL,NULL,1),(395,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','702','393','Ventes de produits intermédiaires',NULL,NULL,1),(396,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','703','393','Ventes de produits résiduels',NULL,NULL,1),(397,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','704','393','Travaux',NULL,NULL,1),(398,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','705','393','Etudes',NULL,NULL,1),(399,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','SERVICE','706','393','Prestations de services',NULL,NULL,1),(400,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','PRODUCT','707','393','Ventes de marchandises',NULL,NULL,1),(401,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','PRODUCT','708','393','Produits des activités annexes',NULL,NULL,1),(402,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','709','393','Rabais, remises et ristournes accordés par l\'entreprise',NULL,NULL,1),(403,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','71','1507','Production stockée (ou déstockage)',NULL,NULL,1),(404,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','713','403','Variation des stocks (en-cours de production, produits)',NULL,NULL,1),(405,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','72','1507','Production immobilisée',NULL,NULL,1),(406,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','721','405','Immobilisations incorporelles',NULL,NULL,1),(407,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','722','405','Immobilisations corporelles',NULL,NULL,1),(408,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','74','1507','Subventions d\'exploitation',NULL,NULL,1),(409,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','75','1507','Autres produits de gestion courante',NULL,NULL,1),(410,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','751','409','Redevances pour concessions, brevets, licences, marques, procédés, logiciels, droits et valeurs similaires',NULL,NULL,1),(411,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','752','409','Revenus des immeubles non affectés à des activités professionnelles',NULL,NULL,1),(412,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','753','409','Jetons de présence et rémunérations d\'administrateurs, gérants,...',NULL,NULL,1),(413,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','754','409','Ristournes perçues des coopératives (provenant des excédents)',NULL,NULL,1),(414,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','755','409','Quotes-parts de résultat sur opérations faites en commun',NULL,NULL,1),(415,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','758','409','Produits divers de gestion courante',NULL,NULL,1),(416,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','76','1507','Produits financiers',NULL,NULL,1),(417,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','761','416','Produits de participations',NULL,NULL,1),(418,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','762','416','Produits des autres immobilisations financières',NULL,NULL,1),(419,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','763','416','Revenus des autres créances',NULL,NULL,1),(420,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','764','416','Revenus des valeurs mobilières de placement',NULL,NULL,1),(421,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','765','416','Escomptes obtenus',NULL,NULL,1),(422,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','766','416','Gains de change',NULL,NULL,1),(423,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','767','416','Produits nets sur cessions de valeurs mobilières de placement',NULL,NULL,1),(424,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','768','416','Autres produits financiers',NULL,NULL,1),(425,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','77','1507','Produits exceptionnels',NULL,NULL,1),(426,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','771','425','Produits exceptionnels sur opérations de gestion',NULL,NULL,1),(427,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','772','425','(Compte à la disposition des entités pour enregistrer, en cours d\'exercice, les produits sur exercices antérieurs)',NULL,NULL,1),(428,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','775','425','Produits des cessions d\'éléments d\'actif',NULL,NULL,1),(429,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','777','425','Quote-part des subventions d\'investissement virée au résultat de l\'exercice',NULL,NULL,1),(430,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','778','425','Autres produits exceptionnels',NULL,NULL,1),(431,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','78','1507','Reprises sur amortissements et provisions',NULL,NULL,1),(432,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','781','431','Reprises sur amortissements et provisions (à inscrire dans les produits d\'exploitation)',NULL,NULL,1),(433,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','786','431','Reprises sur provisions pour risques (à inscrire dans les produits financiers)',NULL,NULL,1),(434,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','787','431','Reprises sur provisions (à inscrire dans les produits exceptionnels)',NULL,NULL,1),(435,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','79','1507','Transferts de charges',NULL,NULL,1),(436,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','791','435','Transferts de charges d\'exploitation ',NULL,NULL,1),(437,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','796','435','Transferts de charges financières',NULL,NULL,1),(438,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','797','435','Transferts de charges exceptionnelles',NULL,NULL,1),(439,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','10','1351','Capital',NULL,NULL,1),(440,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','100','439','Capital souscrit ou capital personnel',NULL,NULL,1),(441,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1000','440','Capital non amorti',NULL,NULL,1),(442,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1001','440','Capital amorti',NULL,NULL,1),(443,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','101','439','Capital non appelé',NULL,NULL,1),(444,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','109','439','Compte de l\'exploitant',NULL,NULL,1),(445,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1090','444','Opérations courantes',NULL,NULL,1),(446,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1091','444','Impôts personnels',NULL,NULL,1),(447,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1092','444','Rémunérations et autres avantages',NULL,NULL,1),(448,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','11','1351','Primes d\'émission',NULL,NULL,1),(449,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','12','1351','Plus-values de réévaluation',NULL,NULL,1),(450,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','120','449','Plus-values de réévaluation sur immobilisations incorporelles',NULL,NULL,1),(451,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1200','450','Plus-values de réévaluation',NULL,NULL,1),(452,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1201','450','Reprises de réductions de valeur',NULL,NULL,1),(453,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','121','449','Plus-values de réévaluation sur immobilisations corporelles',NULL,NULL,1),(454,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1210','453','Plus-values de réévaluation',NULL,NULL,1),(455,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1211','453','Reprises de réductions de valeur',NULL,NULL,1),(456,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','122','449','Plus-values de réévaluation sur immobilisations financières',NULL,NULL,1),(457,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1220','456','Plus-values de réévaluation',NULL,NULL,1),(458,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1221','456','Reprises de réductions de valeur',NULL,NULL,1),(459,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','123','449','Plus-values de réévaluation sur stocks',NULL,NULL,1),(460,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','124','449','Reprises de réductions de valeur sur placements de trésorerie',NULL,NULL,1),(461,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','13','1351','Réserve',NULL,NULL,1),(462,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','130','461','Réserve légale',NULL,NULL,1),(463,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','131','461','Réserves indisponibles',NULL,NULL,1),(464,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1310','463','Réserve pour actions propres',NULL,NULL,1),(465,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1311','463','Autres réserves indisponibles',NULL,NULL,1),(466,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','132','461','Réserves immunisées',NULL,NULL,1),(467,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','133','461','Réserves disponibles',NULL,NULL,1),(468,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1330','467','Réserve pour régularisation de dividendes',NULL,NULL,1),(469,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1331','467','Réserve pour renouvellement des immobilisations',NULL,NULL,1),(470,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1332','467','Réserve pour installations en faveur du personnel 1333 Réserves libres',NULL,NULL,1),(471,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','14','1351','Bénéfice reporté (ou perte reportée)',NULL,NULL,1),(472,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','15','1351','Subsides en capital',NULL,NULL,1),(473,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','150','472','Montants obtenus',NULL,NULL,1),(474,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','151','472','Montants transférés aux résultats',NULL,NULL,1),(475,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','16','1351','Provisions pour risques et charges',NULL,NULL,1),(476,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','160','475','Provisions pour pensions et obligations similaires',NULL,NULL,1),(477,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','161','475','Provisions pour charges fiscales',NULL,NULL,1),(478,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','162','475','Provisions pour grosses réparations et gros entretiens',NULL,NULL,1),(479,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','163','475','à 169 Provisions pour autres risques et charges',NULL,NULL,1),(480,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','164','475','Provisions pour sûretés personnelles ou réelles constituées à l\'appui de dettes et d\'engagements de tiers',NULL,NULL,1),(481,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','165','475','Provisions pour engagements relatifs à l\'acquisition ou à la cession d\'immobilisations',NULL,NULL,1),(482,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','166','475','Provisions pour exécution de commandes passées ou reçues',NULL,NULL,1),(483,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','167','475','Provisions pour positions et marchés à terme en devises ou positions et marchés à terme en marchandises',NULL,NULL,1),(484,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','168','475','Provisions pour garanties techniques attachées aux ventes et prestations déjà effectuées par l\'entreprise',NULL,NULL,1),(485,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','169','475','Provisions pour autres risques et charges',NULL,NULL,1),(486,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1690','485','Pour litiges en cours',NULL,NULL,1),(487,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1691','485','Pour amendes, doubles droits et pénalités',NULL,NULL,1),(488,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1692','485','Pour propre assureur',NULL,NULL,1),(489,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1693','485','Pour risques inhérents aux opérations de crédits à moyen ou long terme',NULL,NULL,1),(490,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1695','485','Provision pour charge de liquidation',NULL,NULL,1),(491,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1696','485','Provision pour départ de personnel',NULL,NULL,1),(492,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1699','485','Pour risques divers',NULL,NULL,1),(493,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17','1351','Dettes à plus d\'un an',NULL,NULL,1),(494,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','170','493','Emprunts subordonnés',NULL,NULL,1),(495,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1700','494','Convertibles',NULL,NULL,1),(496,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1701','494','Non convertibles',NULL,NULL,1),(497,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','171','493','Emprunts obligataires non subordonnés',NULL,NULL,1),(498,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1710','498','Convertibles',NULL,NULL,1),(499,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1711','498','Non convertibles',NULL,NULL,1),(500,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','172','493','Dettes de location-financement et assimilés',NULL,NULL,1),(501,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1720','500','Dettes de location-financement de biens immobiliers',NULL,NULL,1),(502,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1721','500','Dettes de location-financement de biens mobiliers',NULL,NULL,1),(503,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1722','500','Dettes sur droits réels sur immeubles',NULL,NULL,1),(504,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','173','493','Etablissements de crédit',NULL,NULL,1),(505,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1730','504','Dettes en compte',NULL,NULL,1),(506,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17300','505','Banque A',NULL,NULL,1),(507,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17301','505','Banque B',NULL,NULL,1),(508,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17302','505','Banque C',NULL,NULL,1),(509,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17303','505','Banque D',NULL,NULL,1),(510,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1731','504','Promesses',NULL,NULL,1),(511,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17310','510','Banque A',NULL,NULL,1),(512,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17311','510','Banque B',NULL,NULL,1),(513,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17312','510','Banque C',NULL,NULL,1),(514,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17313','510','Banque D',NULL,NULL,1),(515,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1732','504','Crédits d\'acceptation',NULL,NULL,1),(516,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17320','515','Banque A',NULL,NULL,1),(517,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17321','515','Banque B',NULL,NULL,1),(518,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17322','515','Banque C',NULL,NULL,1),(519,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17323','515','Banque D',NULL,NULL,1),(520,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','174','493','Autres emprunts',NULL,NULL,1),(521,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175','493','Dettes commerciales',NULL,NULL,1),(522,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1750','521','Fournisseurs : dettes en compte',NULL,NULL,1),(523,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17500','522','Entreprises apparentées',NULL,NULL,1),(524,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175000','523','Entreprises liées',NULL,NULL,1),(525,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175001','523','Entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(526,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17501','522','Fournisseurs ordinaires',NULL,NULL,1),(527,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175010','526','Fournisseurs belges',NULL,NULL,1),(528,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175011','526','Fournisseurs C.E.E.',NULL,NULL,1),(529,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175012','526','Fournisseurs importation',NULL,NULL,1),(530,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1751','521','Effets à payer',NULL,NULL,1),(531,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17510','530','Entreprises apparentées',NULL,NULL,1),(532,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175100','531','Entreprises liées',NULL,NULL,1),(533,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175101','531','Entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(534,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','17511','530','Fournisseurs ordinaires',NULL,NULL,1),(535,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175110','534','Fournisseurs belges',NULL,NULL,1),(536,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175111','534','Fournisseurs C.E.E.',NULL,NULL,1),(537,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','175112','534','Fournisseurs importation',NULL,NULL,1),(538,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','176','493','Acomptes reçus sur commandes',NULL,NULL,1),(539,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','178','493','Cautionnements reçus en numéraires',NULL,NULL,1),(540,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','179','493','Dettes diverses',NULL,NULL,1),(541,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1790','540','Entreprises liées',NULL,NULL,1),(542,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1791','540','Autres entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(543,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1792','540','Administrateurs, gérants et associés',NULL,NULL,1),(544,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1794','540','Rentes viagères capitalisées',NULL,NULL,1),(545,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1798','540','Dettes envers les coparticipants des associations momentanées et en participation',NULL,NULL,1),(546,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','1799','540','Autres dettes diverses',NULL,NULL,1),(547,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','CAPIT','XXXXXX','18','1351','Comptes de liaison des établissements et succursales',NULL,NULL,1),(548,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','20','1352','Frais d\'établissement',NULL,NULL,1),(549,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','200','548','Frais de constitution et d\'augmentation de capital',NULL,NULL,1),(550,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2000','549','Frais de constitution et d\'augmentation de capital',NULL,NULL,1),(551,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2009','549','Amortissements sur frais de constitution et d\'augmentation de capital',NULL,NULL,1),(552,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','201','548','Frais d\'émission d\'emprunts et primes de remboursement',NULL,NULL,1),(553,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2010','552','Agios sur emprunts et frais d\'émission d\'emprunts',NULL,NULL,1),(554,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2019','552','Amortissements sur agios sur emprunts et frais d\'émission d\'emprunts',NULL,NULL,1),(555,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','202','548','Autres frais d\'établissement',NULL,NULL,1),(556,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2020','555','Autres frais d\'établissement',NULL,NULL,1),(557,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2029','555','Amortissements sur autres frais d\'établissement',NULL,NULL,1),(558,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','203','548','Intérêts intercalaires',NULL,NULL,1),(559,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2030','558','Intérêts intercalaires',NULL,NULL,1),(560,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2039','558','Amortissements sur intérêts intercalaires',NULL,NULL,1),(561,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','204','548','Frais de restructuration',NULL,NULL,1),(562,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2040','561','Coût des frais de restructuration',NULL,NULL,1),(563,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2049','561','Amortissements sur frais de restructuration',NULL,NULL,1),(564,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','21','1352','Immobilisations incorporelles',NULL,NULL,1),(565,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','210','564','Frais de recherche et de développement',NULL,NULL,1),(566,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2100','565','Frais de recherche et de mise au point',NULL,NULL,1),(567,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2108','565','Plus-values actées sur frais de recherche et de mise au point',NULL,NULL,1),(568,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2109','565','Amortissements sur frais de recherche et de mise au point',NULL,NULL,1),(569,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','211','564','Concessions, brevets, licences, savoir-faire, marque et droits similaires',NULL,NULL,1),(570,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2110','569','Concessions, brevets, licences, marques, etc',NULL,NULL,1),(571,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2118','569','Plus-values actées sur concessions, etc',NULL,NULL,1),(572,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2119','569','Amortissements sur concessions, etc',NULL,NULL,1),(573,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','212','564','Goodwill',NULL,NULL,1),(574,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2120','573','Coût d\'acquisition',NULL,NULL,1),(575,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2128','573','Plus-values actées',NULL,NULL,1),(576,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2129','573','Amortissements sur goodwill',NULL,NULL,1),(577,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','213','564','Acomptes versés',NULL,NULL,1),(578,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22','1352','Terrains et constructions',NULL,NULL,1),(579,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','220','578','Terrains',NULL,NULL,1),(580,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2200','579','Terrains',NULL,NULL,1),(581,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2201','579','Frais d\'acquisition sur terrains',NULL,NULL,1),(582,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2208','579','Plus-values actées sur terrains',NULL,NULL,1),(583,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2209','579','Amortissements et réductions de valeur',NULL,NULL,1),(584,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22090','583','Amortissements sur frais d\'acquisition',NULL,NULL,1),(585,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22091','583','Réductions de valeur sur terrains',NULL,NULL,1),(586,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','221','578','Constructions',NULL,NULL,1),(587,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2210','586','Bâtiments industriels',NULL,NULL,1),(588,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2211','586','Bâtiments administratifs et commerciaux',NULL,NULL,1),(589,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2212','586','Autres bâtiments d\'exploitation',NULL,NULL,1),(590,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2213','586','Voies de transport et ouvrages d\'art',NULL,NULL,1),(591,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2215','586','Constructions sur sol d\'autrui',NULL,NULL,1),(592,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2216','586','Frais d\'acquisition sur constructions',NULL,NULL,1),(593,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2218','586','Plus-values actées',NULL,NULL,1),(594,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22180','593','Sur bâtiments industriels',NULL,NULL,1),(595,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22181','593','Sur bâtiments administratifs et commerciaux',NULL,NULL,1),(596,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22182','593','Sur autres bâtiments d\'exploitation',NULL,NULL,1),(597,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22184','593','Sur voies de transport et ouvrages d\'art',NULL,NULL,1),(598,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2219','586','Amortissements sur constructions',NULL,NULL,1),(599,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22190','598','Sur bâtiments industriels',NULL,NULL,1),(600,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22191','598','Sur bâtiments administratifs et commerciaux',NULL,NULL,1),(601,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22192','598','Sur autres bâtiments d\'exploitation',NULL,NULL,1),(602,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22194','598','Sur voies de transport et ouvrages d\'art',NULL,NULL,1),(603,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22195','598','Sur constructions sur sol d\'autrui',NULL,NULL,1),(604,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22196','598','Sur frais d\'acquisition sur constructions',NULL,NULL,1),(605,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','222','578','Terrains bâtis',NULL,NULL,1),(606,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2220','605','Valeur d\'acquisition',NULL,NULL,1),(607,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22200','606','Bâtiments industriels',NULL,NULL,1),(608,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22201','606','Bâtiments administratifs et commerciaux',NULL,NULL,1),(609,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22202','606','Autres bâtiments d\'exploitation',NULL,NULL,1),(610,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22203','606','Voies de transport et ouvrages d\'art',NULL,NULL,1),(611,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22204','606','Frais d\'acquisition des terrains à bâtir',NULL,NULL,1),(612,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2228','605','Plus-values actées',NULL,NULL,1),(613,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22280','612','Sur bâtiments industriels',NULL,NULL,1),(614,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22281','612','Sur bâtiments administratifs et commerciaux',NULL,NULL,1),(615,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22282','612','Sur autres bâtiments d\'exploitation',NULL,NULL,1),(616,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22283','612','Sur voies de transport et ouvrages d\'art',NULL,NULL,1),(617,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2229','605','Amortissements sur terrains bâtis',NULL,NULL,1),(618,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22290','617','Sur bâtiments industriels',NULL,NULL,1),(619,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22291','617','Sur bâtiments administratifs et commerciaux',NULL,NULL,1),(620,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22292','617','Sur autres bâtiments d\'exploitation',NULL,NULL,1),(621,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22293','617','Sur voies de transport et ouvrages d\'art',NULL,NULL,1),(622,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','22294','617','Sur frais d\'acquisition des terrains bâtis',NULL,NULL,1),(623,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','223','578','Autres droits réels sur des immeubles',NULL,NULL,1),(624,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2230','623','Valeur d\'acquisition',NULL,NULL,1),(625,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2238','623','Plus-values actées',NULL,NULL,1),(626,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2239','623','Amortissements',NULL,NULL,1),(627,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','23','1352','Installations, machines et outillages',NULL,NULL,1),(628,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','230','627','Installations',NULL,NULL,1),(629,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2300','628','Installations bâtiments industriels',NULL,NULL,1),(630,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2301','628','Installations bâtiments administratifs et commerciaux',NULL,NULL,1),(631,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2302','628','Installations bâtiments d\'exploitation',NULL,NULL,1),(632,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2303','628','Installations voies de transport et ouvrages d\'art',NULL,NULL,1),(633,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2300','628','Installation d\'eau',NULL,NULL,1),(634,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2301','628','Installation d\'électricité',NULL,NULL,1),(635,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2302','628','Installation de vapeur',NULL,NULL,1),(636,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2303','628','Installation de gaz',NULL,NULL,1),(637,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2304','628','Installation de chauffage',NULL,NULL,1),(638,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2305','628','Installation de conditionnement d\'air',NULL,NULL,1),(639,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2306','628','Installation de chargement',NULL,NULL,1),(640,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','231','627','Machines',NULL,NULL,1),(641,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2310','640','Division A',NULL,NULL,1),(642,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2311','640','Division B',NULL,NULL,1),(643,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2312','640','Division C',NULL,NULL,1),(644,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','237','627','Outillage',NULL,NULL,1),(645,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2370','644','Division A',NULL,NULL,1),(646,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2371','644','Division B',NULL,NULL,1),(647,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2372','644','Division C',NULL,NULL,1),(648,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','238','627','Plus-values actées',NULL,NULL,1),(649,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2380','648','Sur installations',NULL,NULL,1),(650,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2381','648','Sur machines',NULL,NULL,1),(651,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2382','648','Sur outillage',NULL,NULL,1),(652,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','239','627','Amortissements',NULL,NULL,1),(653,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2390','652','Sur installations',NULL,NULL,1),(654,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2391','652','Sur machines',NULL,NULL,1),(655,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2392','652','Sur outillage',NULL,NULL,1),(656,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24','1352','Mobilier et matériel roulant',NULL,NULL,1),(657,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','240','656','Mobilier',NULL,NULL,1),(658,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2400','656','Mobilier',NULL,NULL,1),(659,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24000','658','Mobilier des bâtiments industriels',NULL,NULL,1),(660,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24001','658','Mobilier des bâtiments administratifs et commerciaux',NULL,NULL,1),(661,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24002','658','Mobilier des autres bâtiments d\'exploitation',NULL,NULL,1),(662,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24003','658','Mobilier oeuvres sociales',NULL,NULL,1),(663,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2401','657','Matériel de bureau et de service social',NULL,NULL,1),(664,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24010','663','Des bâtiments industriels',NULL,NULL,1),(665,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24011','663','Des bâtiments administratifs et commerciaux',NULL,NULL,1),(666,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24012','663','Des autres bâtiments d\'exploitation',NULL,NULL,1),(667,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24013','663','Des oeuvres sociales',NULL,NULL,1),(668,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2408','657','Plus-values actées',NULL,NULL,1),(669,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24080','668','Plus-values actées sur mobilier',NULL,NULL,1),(670,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24081','668','Plus-values actées sur matériel de bureau et service social',NULL,NULL,1),(671,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2409','657','Amortissements',NULL,NULL,1),(672,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24090','671','Amortissements sur mobilier',NULL,NULL,1),(673,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24091','671','Amortissements sur matériel de bureau et service social',NULL,NULL,1),(674,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','241','656','Matériel roulant',NULL,NULL,1),(675,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2410','674','Matériel automobile',NULL,NULL,1),(676,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24100','675','Voitures',NULL,NULL,1),(677,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24105','675','Camions',NULL,NULL,1),(678,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2411','674','Matériel ferroviaire',NULL,NULL,1),(679,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2412','674','Matériel fluvial',NULL,NULL,1),(680,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2413','674','Matériel naval',NULL,NULL,1),(681,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2414','674','Matériel aérien',NULL,NULL,1),(682,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2418','674','Plus-values sur matériel roulant',NULL,NULL,1),(683,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24180','682','Plus-values sur matériel automobile',NULL,NULL,1),(684,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24181','682','Idem sur matériel ferroviaire',NULL,NULL,1),(685,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24182','682','Idem sur matériel fluvial',NULL,NULL,1),(686,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24183','682','Idem sur matériel naval',NULL,NULL,1),(687,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24184','682','Idem sur matériel aérien',NULL,NULL,1),(688,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2419','674','Amortissements sur matériel roulant',NULL,NULL,1),(689,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24190','688','Amortissements sur matériel automobile',NULL,NULL,1),(690,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24191','688','Idem sur matériel ferroviaire',NULL,NULL,1),(691,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24192','688','Idem sur matériel fluvial',NULL,NULL,1),(692,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24193','688','Idem sur matériel naval',NULL,NULL,1),(693,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','24194','688','Idem sur matériel aérien',NULL,NULL,1),(694,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','25','1352','Immobilisation détenues en location-financement et droits similaires',NULL,NULL,1),(695,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','250','694','Terrains et constructions',NULL,NULL,1),(696,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2500','695','Terrains',NULL,NULL,1),(697,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2501','695','Constructions',NULL,NULL,1),(698,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2508','695','Plus-values sur emphytéose, leasing et droits similaires : terrains et constructions',NULL,NULL,1),(699,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2509','695','Amortissements et réductions de valeur sur terrains et constructions en leasing',NULL,NULL,1),(700,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','251','694','Installations, machines et outillage',NULL,NULL,1),(701,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2510','700','Installations',NULL,NULL,1),(702,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2511','700','Machines',NULL,NULL,1),(703,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2512','700','Outillage',NULL,NULL,1),(704,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2518','700','Plus-values actées sur installations machines et outillage pris en leasing',NULL,NULL,1),(705,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2519','700','Amortissements sur installations machines et outillage pris en leasing',NULL,NULL,1),(706,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','252','694','Mobilier et matériel roulant',NULL,NULL,1),(707,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2520','706','Mobilier',NULL,NULL,1),(708,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2521','706','Matériel roulant',NULL,NULL,1),(709,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2528','706','Plus-values actées sur mobilier et matériel roulant en leasing',NULL,NULL,1),(710,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2529','706','Amortissements sur mobilier et matériel roulant en leasing',NULL,NULL,1),(711,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','26','1352','Autres immobilisations corporelles',NULL,NULL,1),(712,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','260','711','Frais d\'aménagements de locaux pris en location',NULL,NULL,1),(713,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','261','711','Maison d\'habitation',NULL,NULL,1),(714,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','262','711','Réserve immobilière',NULL,NULL,1),(715,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','263','711','Matériel d\'emballage',NULL,NULL,1),(716,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','264','711','Emballages récupérables',NULL,NULL,1),(717,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','268','711','Plus-values actées sur autres immobilisations corporelles',NULL,NULL,1),(718,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','269','711','Amortissements sur autres immobilisations corporelles',NULL,NULL,1),(719,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2690','718','Amortissements sur frais d\'aménagement des locaux pris en location',NULL,NULL,1),(720,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2691','718','Amortissements sur maison d\'habitation',NULL,NULL,1),(721,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2692','718','Amortissements sur réserve immobilière',NULL,NULL,1),(722,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2693','718','Amortissements sur matériel d\'emballage',NULL,NULL,1),(723,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2694','718','Amortissements sur emballages récupérables',NULL,NULL,1),(724,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','27','1352','Immobilisations corporelles en cours et acomptes versés',NULL,NULL,1),(725,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','270','724','Immobilisations en cours',NULL,NULL,1),(726,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2700','725','Constructions',NULL,NULL,1),(727,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2701','725','Installations machines et outillage',NULL,NULL,1),(728,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2702','725','Mobilier et matériel roulant',NULL,NULL,1),(729,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2703','725','Autres immobilisations corporelles',NULL,NULL,1),(730,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','271','724','Avances et acomptes versés sur immobilisations en cours',NULL,NULL,1),(731,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','28','1352','Immobilisations financières',NULL,NULL,1),(732,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','280','731','Participations dans des entreprises liées',NULL,NULL,1),(733,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2800','732','Valeur d\'acquisition (peut être subdivisé par participation)',NULL,NULL,1),(734,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2801','732','Montants non appelés (idem)',NULL,NULL,1),(735,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2808','732','Plus-values actées (idem)',NULL,NULL,1),(736,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2809','732','Réductions de valeurs actées (idem)',NULL,NULL,1),(737,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','281','731','Créances sur des entreprises liées',NULL,NULL,1),(738,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2810','737','Créances en compte',NULL,NULL,1),(739,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2811','737','Effets à recevoir',NULL,NULL,1),(740,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2812','737','Titres à revenu fixes',NULL,NULL,1),(741,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2817','737','Créances douteuses',NULL,NULL,1),(742,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2819','737','Réductions de valeurs actées',NULL,NULL,1),(743,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','282','731','Participations dans des entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(744,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2820','743','Valeur d\'acquisition (peut être subdivisé par participation)',NULL,NULL,1),(745,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2821','743','Montants non appelés (idem)',NULL,NULL,1),(746,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2828','743','Plus-values actées (idem)',NULL,NULL,1),(747,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2829','743','Réductions de valeurs actées (idem)',NULL,NULL,1),(748,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','283','731','Créances sur des entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(749,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2830','748','Créances en compte',NULL,NULL,1),(750,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2831','748','Effets à recevoir',NULL,NULL,1),(751,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2832','748','Titres à revenu fixe',NULL,NULL,1),(752,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2837','748','Créances douteuses',NULL,NULL,1),(753,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','2839','748','Réductions de valeurs actées',NULL,NULL,1),(754,1,NULL,'2016-01-22 17:28:15','PCMN-BASE','IMMO','XXXXXX','284','731','Autres actions et parts',NULL,NULL,1),(755,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2840','754','Valeur d\'acquisition',NULL,NULL,1),(756,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2841','754','Montants non appelés',NULL,NULL,1),(757,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2848','754','Plus-values actées',NULL,NULL,1),(758,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2849','754','Réductions de valeur actées',NULL,NULL,1),(759,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','285','731','Autres créances',NULL,NULL,1),(760,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2850','759','Créances en compte',NULL,NULL,1),(761,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2851','759','Effets à recevoir',NULL,NULL,1),(762,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2852','759','Titres à revenu fixe',NULL,NULL,1),(763,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2857','759','Créances douteuses',NULL,NULL,1),(764,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2859','759','Réductions de valeur actées',NULL,NULL,1),(765,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','288','731','Cautionnements versés en numéraires',NULL,NULL,1),(766,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2880','765','Téléphone, téléfax, télex',NULL,NULL,1),(767,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2881','765','Gaz',NULL,NULL,1),(768,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2882','765','Eau',NULL,NULL,1),(769,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2883','765','Electricité',NULL,NULL,1),(770,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2887','765','Autres cautionnements versés en numéraires',NULL,NULL,1),(771,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29','1352','Créances à plus d\'un an',NULL,NULL,1),(772,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','290','771','Créances commerciales',NULL,NULL,1),(773,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2900','772','Clients',NULL,NULL,1),(774,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29000','773','Créances en compte sur entreprises liées',NULL,NULL,1),(775,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29001','773','Sur entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(776,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29002','773','Sur clients Belgique',NULL,NULL,1),(777,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29003','773','Sur clients C.E.E.',NULL,NULL,1),(778,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29004','773','Sur clients exportation hors C.E.E.',NULL,NULL,1),(779,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29005','773','Créances sur les coparticipants (associations momentanées)',NULL,NULL,1),(780,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2901','772','Effets à recevoir',NULL,NULL,1),(781,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29010','780','Sur entreprises liées',NULL,NULL,1),(782,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29011','780','Sur entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(783,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29012','780','Sur clients Belgique',NULL,NULL,1),(784,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29013','780','Sur clients C.E.E.',NULL,NULL,1),(785,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29014','780','Sur clients exportation hors C.E.E.',NULL,NULL,1),(786,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2905','772','Retenues sur garanties',NULL,NULL,1),(787,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2906','772','Acomptes versés',NULL,NULL,1),(788,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2907','772','Créances douteuses (à ventiler comme clients 2900)',NULL,NULL,1),(789,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2909','772','Réductions de valeur actées (à ventiler comme clients 2900)',NULL,NULL,1),(790,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','291','771','Autres créances',NULL,NULL,1),(791,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2910','790','Créances en compte',NULL,NULL,1),(792,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29100','791','Sur entreprises liées',NULL,NULL,1),(793,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29101','791','Sur entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(794,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29102','791','Sur autres débiteurs',NULL,NULL,1),(795,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2911','790','Effets à recevoir',NULL,NULL,1),(796,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29110','795','Sur entreprises liées',NULL,NULL,1),(797,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29111','795','Sur entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(798,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','29112','795','Sur autres débiteurs',NULL,NULL,1),(799,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2912','790','Créances résultant de la cession d\'immobilisations données en leasing',NULL,NULL,1),(800,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2917','790','Créances douteuses',NULL,NULL,1),(801,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2919','790','Réductions de valeur actées',NULL,NULL,1),(802,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','30','1353','Approvisionnements - matières premières',NULL,NULL,1),(803,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','300','802','Valeur d\'acquisition',NULL,NULL,1),(804,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','309','802','Réductions de valeur actées',NULL,NULL,1),(805,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','31','1353','Approvsionnements et fournitures',NULL,NULL,1),(806,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','310','805','Valeur d\'acquisition',NULL,NULL,1),(807,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3100','806','Matières d\'approvisionnement',NULL,NULL,1),(808,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3101','806','Energie, charbon, coke, mazout, essence, propane',NULL,NULL,1),(809,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3102','806','Produits d\'entretien',NULL,NULL,1),(810,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3103','806','Fournitures diverses et petit outillage',NULL,NULL,1),(811,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3104','806','Imprimés et fournitures de bureau',NULL,NULL,1),(812,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3105','806','Fournitures de services sociaux',NULL,NULL,1),(813,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3106','806','Emballages commerciaux',NULL,NULL,1),(814,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','31060','813','Emballages perdus',NULL,NULL,1),(815,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','31061','813','Emballages récupérables',NULL,NULL,1),(816,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','319','805','Réductions de valeur actées',NULL,NULL,1),(817,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','32','1353','En cours de fabrication',NULL,NULL,1),(818,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','320','817','Valeur d\'acquisition',NULL,NULL,1),(819,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3200','818','Produits semi-ouvrés',NULL,NULL,1),(820,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3201','818','Produits en cours de fabrication',NULL,NULL,1),(821,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3202','818','Travaux en cours',NULL,NULL,1),(822,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3205','818','Déchets',NULL,NULL,1),(823,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3206','818','Rebuts',NULL,NULL,1),(824,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3209','818','Travaux en association momentanée',NULL,NULL,1),(825,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','329','817','Réductions de valeur actées',NULL,NULL,1),(826,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','33','1353','Produits finis',NULL,NULL,1),(827,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','330','826','Valeur d\'acquisition',NULL,NULL,1),(828,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3300','827','Produits finis',NULL,NULL,1),(829,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','339','826','Réductions de valeur actées',NULL,NULL,1),(830,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','34','1353','Marchandises',NULL,NULL,1),(831,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','340','830','Valeur d\'acquisition',NULL,NULL,1),(832,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3400','831','Groupe A',NULL,NULL,1),(833,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3401','831','Groupe B',NULL,NULL,1),(834,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3402','831','Groupe C',NULL,NULL,1),(835,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','349','830','Réductions de valeur actées',NULL,NULL,1),(836,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','35','1353','Immeubles destinés à la vente',NULL,NULL,1),(837,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','350','836','Valeur d\'acquisition',NULL,NULL,1),(838,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3500','837','Immeuble A',NULL,NULL,1),(839,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3501','837','Immeuble B',NULL,NULL,1),(840,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3502','837','Immeuble C',NULL,NULL,1),(841,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','351','836','Immeubles construits en vue de leur revente',NULL,NULL,1),(842,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3510','841','Immeuble A',NULL,NULL,1),(843,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3511','841','Immeuble B',NULL,NULL,1),(844,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3512','841','Immeuble C',NULL,NULL,1),(845,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','359','836','Réductions de valeurs actées',NULL,NULL,1),(846,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','36','1353','Acomptes versés sur achats pour stocks',NULL,NULL,1),(847,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','360','846','Acomptes versés (à ventiler éventuellement par catégorie)',NULL,NULL,1),(848,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','369','846','Réductions de valeur actées',NULL,NULL,1),(849,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','37','1353','Commandes en cours d\'exécution',NULL,NULL,1),(850,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','370','849','Valeur d\'acquisition',NULL,NULL,1),(851,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','371','849','Bénéfice pris en compte',NULL,NULL,1),(852,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','379','849','Réductions de valeur actées',NULL,NULL,1),(853,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','40','1354','Créances commerciales',NULL,NULL,1),(854,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','400','853','Clients',NULL,NULL,1),(855,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4007','854','Rabais, remises et ristournes à accorder et autres notes de crédit à établir',NULL,NULL,1),(856,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4008','854','Créances résultant de livraisons de biens (associations momentanées)',NULL,NULL,1),(857,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','401','853','Effets à recevoir',NULL,NULL,1),(858,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4010','857','Effets à recevoir',NULL,NULL,1),(859,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4013','857','Effets à l\'encaissement',NULL,NULL,1),(860,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4015','857','Effets à l\'escompte',NULL,NULL,1),(861,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','402','853','Clients, créances courantes, entreprises apparentées, administrateurs et gérants',NULL,NULL,1),(862,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4020','861','Entreprises liées',NULL,NULL,1),(863,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4021','861','Autres entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(864,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4022','861','Administrateurs et gérants d\'entreprise',NULL,NULL,1),(865,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','403','853','Effets à recevoir sur entreprises apparentées et administrateurs et gérants',NULL,NULL,1),(866,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4030','865','Entreprises liées',NULL,NULL,1),(867,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4031','865','Autres entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(868,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4032','865','Administrateurs et gérants de l\'entreprise',NULL,NULL,1),(869,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','404','853','Produits à recevoir (factures à établir)',NULL,NULL,1),(870,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','405','853','Clients : retenues sur garanties',NULL,NULL,1),(871,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','406','853','Acomptes versés',NULL,NULL,1),(872,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','407','853','Créances douteuses',NULL,NULL,1),(873,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','408','853','Compensation clients',NULL,NULL,1),(874,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','409','853','Réductions de valeur actées',NULL,NULL,1),(875,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','41','1354','Autres créances',NULL,NULL,1),(876,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','410','875','Capital appelé, non versé',NULL,NULL,1),(877,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4100','876','Appels de fonds',NULL,NULL,1),(878,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4101','876','Actionnaires défaillants',NULL,NULL,1),(879,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','411','875','T.V.A. à récupérer',NULL,NULL,1),(880,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4110','879','T.V.A. due',NULL,NULL,1),(881,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4111','879','T.V.A. déductible',NULL,NULL,1),(882,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4112','879','Compte courant administration T.V.A.',NULL,NULL,1),(883,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4118','879','Taxe d\'égalisation due',NULL,NULL,1),(884,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','412','875','Impôts et versements fiscaux à récupérer',NULL,NULL,1),(885,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4120','884','Impôts belges sur le résultat',NULL,NULL,1),(886,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4125','884','Autres impôts belges',NULL,NULL,1),(887,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4128','884','Impôts étrangers',NULL,NULL,1),(888,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','414','875','Produits à recevoir',NULL,NULL,1),(889,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','416','875','Créances diverses',NULL,NULL,1),(890,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4160','889','Associés (compte d\'apport en société)',NULL,NULL,1),(891,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4161','889','Avances et prêts au personnel',NULL,NULL,1),(892,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4162','889','Compte courant des associés en S.P.R.L.',NULL,NULL,1),(893,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4163','889','Compte courant des administrateurs et gérants',NULL,NULL,1),(894,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4164','889','Créances sur sociétés apparentées',NULL,NULL,1),(895,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4166','889','Emballages et matériel à rendre',NULL,NULL,1),(896,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4167','889','Etat et établissements publics',NULL,NULL,1),(897,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','41670','896','Subsides à recevoir',NULL,NULL,1),(898,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','41671','896','Autres créances',NULL,NULL,1),(899,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4168','889','Rabais, ristournes et remises à obtenir et autres avoirs non encore reçus',NULL,NULL,1),(900,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','417','875','Créances douteuses',NULL,NULL,1),(901,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','418','875','Cautionnements versés en numéraires',NULL,NULL,1),(902,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','419','875','Réductions de valeur actées',NULL,NULL,1),(903,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','42','1354','Dettes à plus d\'un an échéant dans l\'année',NULL,NULL,1),(904,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','420','903','Emprunts subordonnés',NULL,NULL,1),(905,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4200','904','Convertibles',NULL,NULL,1),(906,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4201','904','Non convertibles',NULL,NULL,1),(907,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','421','903','Emprunts obligataires non subordonnés',NULL,NULL,1),(908,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4210','907','Convertibles',NULL,NULL,1),(909,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4211','907','Non convertibles',NULL,NULL,1),(910,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','422','903','Dettes de location-financement et assimilées',NULL,NULL,1),(911,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4220','910','Financement de biens immobiliers',NULL,NULL,1),(912,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4221','910','Financement de biens mobiliers',NULL,NULL,1),(913,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','423','903','Etablissements de crédit',NULL,NULL,1),(914,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4230','913','Dettes en compte',NULL,NULL,1),(915,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4231','913','Promesses',NULL,NULL,1),(916,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4232','913','Crédits d\'acceptation',NULL,NULL,1),(917,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','424','903','Autres emprunts',NULL,NULL,1),(918,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','425','903','Dettes commerciales',NULL,NULL,1),(919,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4250','918','Fournisseurs',NULL,NULL,1),(920,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4251','918','Effets à payer',NULL,NULL,1),(921,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','426','903','Cautionnements reçus en numéraires',NULL,NULL,1),(922,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','429','903','Dettes diverses',NULL,NULL,1),(923,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4290','922','Entreprises liées',NULL,NULL,1),(924,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4291','922','Entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(925,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4292','922','Administrateurs, gérants, associés',NULL,NULL,1),(926,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4299','922','Autres dettes',NULL,NULL,1),(927,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','43','1354','Dettes financières',NULL,NULL,1),(928,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','430','927','Etablissements de crédit. Emprunts en compte à terme fixe',NULL,NULL,1),(929,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','431','927','Etablissements de crédit. Promesses',NULL,NULL,1),(930,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','432','927','Etablissements de crédit. Crédits d\'acceptation',NULL,NULL,1),(931,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','433','927','Etablissements de crédit. Dettes en compte courant',NULL,NULL,1),(932,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','439','927','Autres emprunts',NULL,NULL,1),(933,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44','1354','Dettes commerciales',NULL,NULL,1),(934,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','440','933','Fournisseurs',NULL,NULL,1),(935,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4400','934','Entreprises apparentées',NULL,NULL,1),(936,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44000','935','Entreprises liées',NULL,NULL,1),(937,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44001','935','Entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(938,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4401','934','Fournisseurs ordinaires',NULL,NULL,1),(939,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44010','938','Fournisseurs belges',NULL,NULL,1),(940,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44011','938','Fournisseurs CEE',NULL,NULL,1),(941,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44012','938','Fournisseurs importation',NULL,NULL,1),(942,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4402','934','Dettes envers les coparticipants (associations momentanées)',NULL,NULL,1),(943,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4403','934','Fournisseurs - retenues de garanties',NULL,NULL,1),(944,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','441','933','Effets à payer',NULL,NULL,1),(945,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4410','944','Entreprises apparentées',NULL,NULL,1),(946,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44100','945','Entreprises liées',NULL,NULL,1),(947,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44101','945','Entreprises avec lesquelles il existe un lien de participation',NULL,NULL,1),(948,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4411','944','Fournisseurs ordinaires',NULL,NULL,1),(949,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44110','948','Fournisseurs belges',NULL,NULL,1),(950,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44111','948','Fournisseurs CEE',NULL,NULL,1),(951,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','44112','948','Fournisseurs importation',NULL,NULL,1),(952,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','444','933','Factures à recevoir',NULL,NULL,1),(953,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','446','933','Acomptes reçus',NULL,NULL,1),(954,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','448','933','Compensations fournisseurs',NULL,NULL,1),(955,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45','1354','Dettes fiscales, salariales et sociales',NULL,NULL,1),(956,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','450','955','Dettes fiscales estimées',NULL,NULL,1),(957,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4501','956','Impôts sur le résultat',NULL,NULL,1),(958,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4505','956','Autres impôts en Belgique',NULL,NULL,1),(959,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4508','956','Impôts à l\'étranger',NULL,NULL,1),(960,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','451','955','T.V.A. à payer',NULL,NULL,1),(961,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4510','960','T.V.A. due',NULL,NULL,1),(962,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4511','960','T.V.A. déductible',NULL,NULL,1),(963,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4512','960','Compte courant administration T.V.A.',NULL,NULL,1),(964,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4518','960','Taxe d\'égalisation due',NULL,NULL,1),(965,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','452','955','Impôts et taxes à payer',NULL,NULL,1),(966,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4520','965','Autres impôts sur le résultat',NULL,NULL,1),(967,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4525','965','Autres impôts et taxes en Belgique',NULL,NULL,1),(968,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45250','967','Précompte immobilier',NULL,NULL,1),(969,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45251','967','Impôts communaux à payer',NULL,NULL,1),(970,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45252','967','Impôts provinciaux à payer',NULL,NULL,1),(971,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45253','967','Autres impôts et taxes à payer',NULL,NULL,1),(972,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4528','965','Impôts et taxes à l\'étranger',NULL,NULL,1),(973,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','453','955','Précomptes retenus',NULL,NULL,1),(974,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4530','973','Précompte professionnel retenu sur rémunérations',NULL,NULL,1),(975,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4531','973','Précompte professionnel retenu sur tantièmes',NULL,NULL,1),(976,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4532','973','Précompte mobilier retenu sur dividendes attribués',NULL,NULL,1),(977,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4533','973','Précompte mobilier retenu sur intérêts payés',NULL,NULL,1),(978,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4538','973','Autres précomptes retenus',NULL,NULL,1),(979,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','454','955','Office National de la Sécurité Sociale',NULL,NULL,1),(980,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4540','979','Arriérés',NULL,NULL,1),(981,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4541','979','1er trimestre',NULL,NULL,1),(982,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4542','979','2ème trimestre',NULL,NULL,1),(983,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4543','979','3ème trimestre',NULL,NULL,1),(984,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4544','979','4ème trimestre',NULL,NULL,1),(985,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','455','955','Rémunérations',NULL,NULL,1),(986,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4550','985','Administrateurs, gérants et commissaires (non réviseurs)',NULL,NULL,1),(987,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4551','985','Direction',NULL,NULL,1),(988,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4552','985','Employés',NULL,NULL,1),(989,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4553','985','Ouvriers',NULL,NULL,1),(990,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','456','955','Pécules de vacances',NULL,NULL,1),(991,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4560','990','Direction',NULL,NULL,1),(992,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4561','990','Employés',NULL,NULL,1),(993,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4562','990','Ouvriers',NULL,NULL,1),(994,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','459','955','Autres dettes sociales',NULL,NULL,1),(995,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4590','994','Provision pour gratifications de fin d\'année',NULL,NULL,1),(996,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4591','994','Départs de personnel',NULL,NULL,1),(997,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4592','994','Oppositions sur rémunérations',NULL,NULL,1),(998,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4593','994','Assurances relatives au personnel',NULL,NULL,1),(999,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45930','998','Assurance loi',NULL,NULL,1),(1000,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45931','998','Assurance salaire garanti',NULL,NULL,1),(1001,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45932','998','Assurance groupe',NULL,NULL,1),(1002,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','45933','998','Assurances individuelles',NULL,NULL,1),(1003,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4594','994','Caisse d\'assurances sociales pour travailleurs indépendants',NULL,NULL,1),(1004,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4597','994','Dettes et provisions sociales diverses',NULL,NULL,1),(1005,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','46','1354','Acomptes reçus sur commande',NULL,NULL,1),(1006,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','47','1354','Dettes découlant de l\'affectation des résultats',NULL,NULL,1),(1007,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','470','1006','Dividendes et tantièmes d\'exercices antérieurs',NULL,NULL,1),(1008,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','471','1006','Dividendes de l\'exercice',NULL,NULL,1),(1009,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','472','1006','Tantièmes de l\'exercice',NULL,NULL,1),(1010,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','473','1006','Autres allocataires',NULL,NULL,1),(1011,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','48','4','Dettes diverses',NULL,NULL,1),(1012,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','480','1011','Obligations et coupons échus',NULL,NULL,1),(1013,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','481','1011','Actionnaires - capital à rembourser',NULL,NULL,1),(1014,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','482','1011','Participation du personnel à payer',NULL,NULL,1),(1015,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','483','1011','Acomptes reçus d\'autres tiers à moins d\'un an',NULL,NULL,1),(1016,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','486','1011','Emballages et matériel consignés',NULL,NULL,1),(1017,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','488','1011','Cautionnements reçus en numéraires',NULL,NULL,1),(1018,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','489','1011','Autres dettes diverses',NULL,NULL,1),(1019,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49','1354','Comptes de régularisation et compte d\'attente',NULL,NULL,1),(1020,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','490','1019','Charges à reporter (à subdiviser par catégorie de charges)',NULL,NULL,1),(1021,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','491','1019','Produits acquis',NULL,NULL,1),(1022,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4910','1021','Produits d\'exploitation',NULL,NULL,1),(1023,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49100','1022','Ristournes et rabais à obtenir',NULL,NULL,1),(1024,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49101','1022','Commissions à obtenir',NULL,NULL,1),(1025,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49102','1022','Autres produits d\'exploitation (redevances par exemple)',NULL,NULL,1),(1026,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4911','1021','Produits financiers',NULL,NULL,1),(1027,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49110','1026','Intérêts courus et non échus sur prêts et débits',NULL,NULL,1),(1028,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','49111','1026','Autres produits financiers',NULL,NULL,1),(1029,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','492','1019','Charges à imputer (à subdiviser par catégorie de charges)',NULL,NULL,1),(1030,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','493','1019','Produits à reporter',NULL,NULL,1),(1031,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4930','1030','Produits d\'exploitation à reporter',NULL,NULL,1),(1032,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4931','1030','Produits financiers à reporter',NULL,NULL,1),(1033,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','499','1019','Comptes d\'attente',NULL,NULL,1),(1034,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4990','1033','Compte d\'attente',NULL,NULL,1),(1035,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4991','1033','Compte de répartition périodique des charges',NULL,NULL,1),(1036,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4999','1033','Transferts d\'exercice',NULL,NULL,1),(1037,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','50','1355','Actions propres',NULL,NULL,1),(1038,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','51','1355','Actions et parts',NULL,NULL,1),(1039,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','510','1038','Valeur d\'acquisition',NULL,NULL,1),(1040,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','511','1038','Montants non appelés',NULL,NULL,1),(1041,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','519','1038','Réductions de valeur actées',NULL,NULL,1),(1042,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','52','1355','Titres à revenus fixes',NULL,NULL,1),(1043,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','520','1042','Valeur d\'acquisition',NULL,NULL,1),(1044,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','529','1042','Réductions de valeur actées',NULL,NULL,1),(1045,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','53','1355','Dépots à terme',NULL,NULL,1),(1046,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','530','1045','De plus d\'un an',NULL,NULL,1),(1047,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','531','1045','De plus d\'un mois et à un an au plus',NULL,NULL,1),(1048,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','532','1045','d\'un mois au plus',NULL,NULL,1),(1049,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','539','1045','Réductions de valeur actées',NULL,NULL,1),(1050,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','54','1355','Valeurs échues à l\'encaissement',NULL,NULL,1),(1051,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','540','1050','Chèques à encaisser',NULL,NULL,1),(1052,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','541','1050','Coupons à encaisser',NULL,NULL,1),(1053,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','55','1355','Etablissements de crédit - Comptes ouverts auprès des divers établissements.',NULL,NULL,1),(1054,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','550','1053','Comptes courants',NULL,NULL,1),(1055,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','551','1053','Chèques émis',NULL,NULL,1),(1056,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','559','1053','Réductions de valeur actées',NULL,NULL,1),(1057,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','56','1355','Office des chèques postaux',NULL,NULL,1),(1058,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','560','1057','Compte courant',NULL,NULL,1),(1059,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','561','1057','Chèques émis',NULL,NULL,1),(1060,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','57','1355','Caisses',NULL,NULL,1),(1061,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','570','1060','à 577 Caisses - espèces ( 0 - centrale ; 7 - succursales et agences)',NULL,NULL,1),(1062,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','578','1060','Caisses - timbres ( 0 - fiscaux ; 1 - postaux)',NULL,NULL,1),(1063,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','58','1355','Virements internes',NULL,NULL,1),(1064,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','60','1356','Approvisionnements et marchandises',NULL,NULL,1),(1065,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','600','1064','Achats de matières premières',NULL,NULL,1),(1066,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','601','1064','Achats de fournitures',NULL,NULL,1),(1067,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','602','1064','Achats de services, travaux et études',NULL,NULL,1),(1068,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','603','1064','Sous-traitances générales',NULL,NULL,1),(1069,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','604','1064','Achats de marchandises',NULL,NULL,1),(1070,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','605','1064','Achats d\'immeubles destinés à la revente',NULL,NULL,1),(1071,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','608','1064','Remises , ristournes et rabais obtenus sur achats',NULL,NULL,1),(1072,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','609','1064','Variations de stocks',NULL,NULL,1),(1073,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6090','1072','De matières premières',NULL,NULL,1),(1074,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6091','1072','De fournitures',NULL,NULL,1),(1075,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6094','1072','De marchandises',NULL,NULL,1),(1076,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6095','1072','d\'immeubles destinés à la vente',NULL,NULL,1),(1077,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61','1356','Services et biens divers',NULL,NULL,1),(1078,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','610','1077','Loyers et charges locatives',NULL,NULL,1),(1079,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6100','1078','Loyers divers',NULL,NULL,1),(1080,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6101','1078','Charges locatives (assurances, frais de confort,etc)',NULL,NULL,1),(1081,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','611','1077','Entretien et réparation (fournitures et prestations)',NULL,NULL,1),(1082,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','612','1077','Fournitures faites à l\'entreprise',NULL,NULL,1),(1083,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6120','1082','Eau, gaz, électricité, vapeur',NULL,NULL,1),(1084,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61200','1083','Eau',NULL,NULL,1),(1085,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61201','1083','Gaz',NULL,NULL,1),(1086,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61202','1083','Electricité',NULL,NULL,1),(1087,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61203','1083','Vapeur',NULL,NULL,1),(1088,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6121','1082','Téléphone, télégrammes, télex, téléfax, frais postaux',NULL,NULL,1),(1089,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61210','1088','Téléphone',NULL,NULL,1),(1090,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61211','1088','Télégrammes',NULL,NULL,1),(1091,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61212','1088','Télex et téléfax',NULL,NULL,1),(1092,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61213','1088','Frais postaux',NULL,NULL,1),(1093,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6122','1082','Livres, bibliothèque',NULL,NULL,1),(1094,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6123','1082','Imprimés et fournitures de bureau (si non comptabilisé au 601)',NULL,NULL,1),(1095,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','613','1077','Rétributions de tiers',NULL,NULL,1),(1096,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6130','1095','Redevances et royalties',NULL,NULL,1),(1097,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61300','1096','Redevances pour brevets, licences, marques et accessoires',NULL,NULL,1),(1098,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61301','1096','Autres redevances (procédés de fabrication)',NULL,NULL,1),(1099,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6131','1095','Assurances non relatives au personnel',NULL,NULL,1),(1100,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61310','1099','Assurance incendie',NULL,NULL,1),(1101,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61311','1099','Assurance vol',NULL,NULL,1),(1102,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61312','1099','Assurance autos',NULL,NULL,1),(1103,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61313','1099','Assurance crédit',NULL,NULL,1),(1104,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61314','1099','Assurances frais généraux',NULL,NULL,1),(1105,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6132','1095','Divers',NULL,NULL,1),(1106,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61320','1105','Commissions aux tiers',NULL,NULL,1),(1107,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61321','1105','Honoraires d\'avocats, d\'experts, etc',NULL,NULL,1),(1108,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61322','1105','Cotisations aux groupements professionnels',NULL,NULL,1),(1109,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61323','1105','Dons, libéralités, etc',NULL,NULL,1),(1110,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61324','1105','Frais de contentieux',NULL,NULL,1),(1111,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61325','1105','Publications légales',NULL,NULL,1),(1112,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6133','1095','Transports et déplacements',NULL,NULL,1),(1113,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61330','1112','Transports de personnel',NULL,NULL,1),(1114,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','61331','1112','Voyages, déplacements et représentations',NULL,NULL,1),(1115,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6134','1095','Personnel intérimaire',NULL,NULL,1),(1116,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','614','1077','Annonces, publicité, propagande et documentation',NULL,NULL,1),(1117,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6140','1116','Annonces et insertions',NULL,NULL,1),(1118,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6141','1116','Catalogues et imprimés',NULL,NULL,1),(1119,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6142','1116','Echantillons',NULL,NULL,1),(1120,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6143','1116','Foires et expositions',NULL,NULL,1),(1121,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6144','1116','Primes',NULL,NULL,1),(1122,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6145','1116','Cadeaux à la clientèle',NULL,NULL,1),(1123,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6146','1116','Missions et réceptions',NULL,NULL,1),(1124,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6147','1116','Documentation',NULL,NULL,1),(1125,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','615','1077','Sous-traitants',NULL,NULL,1),(1126,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6150','1125','Sous-traitants pour activités propres',NULL,NULL,1),(1127,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6151','1125','Sous-traitants d\'associations momentanées (coparticipants)',NULL,NULL,1),(1128,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6152','1125','Quote-part bénéficiaire des coparticipants',NULL,NULL,1),(1129,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','617','1077','Personnel intérimaire et personnes mises à la disposition de l\'entreprise',NULL,NULL,1),(1130,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','618','1077','Rémunérations, primes pour assurances extralégales, pensions de retraite et de survie des administrateurs, gérants et associés actifs qui ne sont pas attribuées en vertu d\'un contrat de travail',NULL,NULL,1),(1131,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','62','1356','Rémunérations, charges sociales et pensions',NULL,NULL,1),(1132,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','620','1131','Rémunérations et avantages sociaux directs',NULL,NULL,1),(1133,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6200','1132','Administrateurs ou gérants',NULL,NULL,1),(1134,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6201','1132','Personnel de direction',NULL,NULL,1),(1135,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6202','1132','Employés',NULL,NULL,1),(1136,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6203','1132','Ouvriers',NULL,NULL,1),(1137,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6204','1132','Autres membres du personnel',NULL,NULL,1),(1138,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','621','1131','Cotisations patronales d\'assurances sociales',NULL,NULL,1),(1139,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6210','1138','Sur salaires',NULL,NULL,1),(1140,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6211','1138','Sur appointements et commissions',NULL,NULL,1),(1141,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','622','1131','Primes patronales pour assurances extralégales',NULL,NULL,1),(1142,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','623','1131','Autres frais de personnel',NULL,NULL,1),(1143,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6230','1142','Assurances du personnel',NULL,NULL,1),(1144,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','62300','1143','Assurances loi, responsabilité civile, chemin du travail',NULL,NULL,1),(1145,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','62301','1143','Assurance salaire garanti',NULL,NULL,1),(1146,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','62302','1143','Assurances individuelles',NULL,NULL,1),(1147,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6231','1142','Charges sociales diverses',NULL,NULL,1),(1148,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','62310','1147','Jours fériés payés',NULL,NULL,1),(1149,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','62311','1147','Salaire hebdomadaire garanti',NULL,NULL,1),(1150,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','62312','1147','Allocations familiales complémentaires',NULL,NULL,1),(1151,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6232','1142','Charges sociales des administrateurs, gérants et commissaires',NULL,NULL,1),(1152,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','62320','1151','Allocations familiales complémentaires pour non salariés',NULL,NULL,1),(1153,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','62321','1151','Lois sociales pour indépendants',NULL,NULL,1),(1154,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','62322','1151','Divers',NULL,NULL,1),(1155,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','624','1131','Pensions de retraite et de survie',NULL,NULL,1),(1156,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6240','1155','Administrateurs et gérants',NULL,NULL,1),(1157,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6241','1155','Personnel',NULL,NULL,1),(1158,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','625','1131','Provision pour pécule de vacances',NULL,NULL,1),(1159,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6250','1158','Dotations',NULL,NULL,1),(1160,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6251','1158','Utilisations et reprises',NULL,NULL,1),(1161,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','63','1356','Amortissements, réductions de valeur et provisions pour risques et charges',NULL,NULL,1),(1162,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','630','1161','Dotations aux amortissements et aux réductions de valeur sur immobilisations',NULL,NULL,1),(1163,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6300','1162','Dotations aux amortissements sur frais d\'établissement',NULL,NULL,1),(1164,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6301','1162','Dotations aux amortissements sur immobilisations incorporelles',NULL,NULL,1),(1165,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6302','1162','Dotations aux amortissements sur immobilisations corporelles',NULL,NULL,1),(1166,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6308','1162','Dotations aux réductions de valeur sur immobilisations incorporelles',NULL,NULL,1),(1167,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6309','1162','Dotations aux réductions de valeur sur immobilisations corporelles',NULL,NULL,1),(1168,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','631','1161','Réductions de valeur sur stocks',NULL,NULL,1),(1169,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6310','1168','Dotations',NULL,NULL,1),(1170,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6311','1168','Reprises',NULL,NULL,1),(1171,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','632','1161','Réductions de valeur sur commandes en cours d\'exécution',NULL,NULL,1),(1172,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6320','1171','Dotations',NULL,NULL,1),(1173,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6321','1171','Reprises',NULL,NULL,1),(1174,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','633','1161','Réductions de valeur sur créances commerciales à plus d\'un an',NULL,NULL,1),(1175,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6330','1174','Dotations',NULL,NULL,1),(1176,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6331','1174','Reprises',NULL,NULL,1),(1177,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','634','1161','Réductions de valeur sur créances commerciales à un an au plus',NULL,NULL,1),(1178,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6340','1177','Dotations',NULL,NULL,1),(1179,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6341','1177','Reprises',NULL,NULL,1),(1180,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','635','1161','Provisions pour pensions et obligations similaires',NULL,NULL,1),(1181,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6350','1180','Dotations',NULL,NULL,1),(1182,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6351','1180','Utilisations et reprises',NULL,NULL,1),(1183,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','636','11613','Provisions pour grosses réparations et gros entretiens',NULL,NULL,1),(1184,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6360','1183','Dotations',NULL,NULL,1),(1185,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6361','1183','Utilisations et reprises',NULL,NULL,1),(1186,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','637','1161','Provisions pour autres risques et charges',NULL,NULL,1),(1187,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6370','1186','Dotations',NULL,NULL,1),(1188,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6371','1186','Utilisations et reprises',NULL,NULL,1),(1189,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','64','1356','Autres charges d\'exploitation',NULL,NULL,1),(1190,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','640','1189','Charges fiscales d\'exploitation',NULL,NULL,1),(1191,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6400','1190','Taxes et impôts directs',NULL,NULL,1),(1192,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','64000','1191','Taxes sur autos et camions',NULL,NULL,1),(1193,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6401','1190','Taxes et impôts indirects',NULL,NULL,1),(1194,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','64010','1193','Timbres fiscaux pris en charge par la firme',NULL,NULL,1),(1195,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','64011','1193','Droits d\'enregistrement',NULL,NULL,1),(1196,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','64012','1193','T.V.A. non déductible',NULL,NULL,1),(1197,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6402','1190','Impôts provinciaux et communaux',NULL,NULL,1),(1198,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','64020','1197','Taxe sur la force motrice',NULL,NULL,1),(1199,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','64021','1197','Taxe sur le personnel occupé',NULL,NULL,1),(1200,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6403','1190','Taxes diverses',NULL,NULL,1),(1201,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','641','1189','Moins-values sur réalisations courantes d\'immobilisations corporelles',NULL,NULL,1),(1202,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','642','1189','Moins-values sur réalisations de créances commerciales',NULL,NULL,1),(1203,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','643','1189','à 648 Charges d\'exploitations diverses',NULL,NULL,1),(1204,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','649','1189','Charges d\'exploitation portées à l\'actif au titre de restructuration',NULL,NULL,1),(1205,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','65','1356','Charges financières',NULL,NULL,1),(1206,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','650','1205','Charges des dettes',NULL,NULL,1),(1207,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6500','1206','Intérêts, commissions et frais afférents aux dettes',NULL,NULL,1),(1208,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6501','1206','Amortissements des agios et frais d\'émission d\'emprunts',NULL,NULL,1),(1209,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6502','1206','Autres charges de dettes',NULL,NULL,1),(1210,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6503','1206','Intérêts intercalaires portés à l\'actif',NULL,NULL,1),(1211,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','651','1205','Réductions de valeur sur actifs circulants',NULL,NULL,1),(1212,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6510','1211','Dotations',NULL,NULL,1),(1213,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6511','1211','Reprises',NULL,NULL,1),(1214,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','652','1205','Moins-values sur réalisation d\'actifs circulants',NULL,NULL,1),(1215,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','653','1205','Charges d\'escompte de créances',NULL,NULL,1),(1216,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','654','1205','Différences de change',NULL,NULL,1),(1217,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','655','1205','Ecarts de conversion des devises',NULL,NULL,1),(1218,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','656','1205','Frais de banques, de chèques postaux',NULL,NULL,1),(1219,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','657','1205','Commissions sur ouvertures de crédit, cautions et avals',NULL,NULL,1),(1220,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','658','1205','Frais de vente des titres',NULL,NULL,1),(1221,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','66','1356','Charges exceptionnelles',NULL,NULL,1),(1222,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','660','1221','Amortissements et réductions de valeur exceptionnels',NULL,NULL,1),(1223,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6600','1222','Sur frais d\'établissement',NULL,NULL,1),(1224,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6601','1222','Sur immobilisations incorporelles',NULL,NULL,1),(1225,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6602','1222','Sur immobilisations corporelles',NULL,NULL,1),(1226,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','661','1221','Réductions de valeur sur immobilisations financières',NULL,NULL,1),(1227,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','662','1221','Provisions pour risques et charges exceptionnels',NULL,NULL,1),(1228,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','663','1221','Moins-values sur réalisation d\'actifs immobilisés',NULL,NULL,1),(1229,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6630','1228','Sur immobilisations incorporelles',NULL,NULL,1),(1230,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6631','1228','Sur immobilisations corporelles',NULL,NULL,1),(1231,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6632','1228','Sur immobilisations détenues en location-financement et droits similaires',NULL,NULL,1),(1232,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6633','1228','Sur immobilisations financières',NULL,NULL,1),(1233,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6634','1228','Sur immeubles acquis ou construits en vue de la revente',NULL,NULL,1),(1234,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','664','1221','à 668 Autres charges exceptionnelles',NULL,NULL,1),(1235,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','664','1221','Pénalités et amendes diverses',NULL,NULL,1),(1236,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','665','1221','Différence de charge',NULL,NULL,1),(1237,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','669','1221','Charges exceptionnelles transférées à l\'actif en frais de restructuration',NULL,NULL,1),(1238,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','67','1356','Impôts sur le résultat',NULL,NULL,1),(1239,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','670','1238','Impôts belges sur le résultat de l\'exercice',NULL,NULL,1),(1240,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6700','1239','Impôts et précomptes dus ou versés',NULL,NULL,1),(1241,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6701','1239','Excédent de versements d\'impôts et précomptes porté à l\'actif',NULL,NULL,1),(1242,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6702','1239','Charges fiscales estimées',NULL,NULL,1),(1243,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','671','1238','Impôts belges sur le résultat d\'exercices antérieurs',NULL,NULL,1),(1244,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6710','1243','Suppléments d\'impôts dus ou versés',NULL,NULL,1),(1245,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6711','1243','Suppléments d\'impôts estimés',NULL,NULL,1),(1246,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6712','1243','Provisions fiscales constituées',NULL,NULL,1),(1247,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','672','1238','Impôts étrangers sur le résultat de l\'exercice',NULL,NULL,1),(1248,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','673','1238','Impôts étrangers sur le résultat d\'exercices antérieurs',NULL,NULL,1),(1249,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','68','1356','Transferts aux réserves immunisées',NULL,NULL,1),(1250,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','69','1356','Affectation des résultats',NULL,NULL,1),(1251,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','690','1250','Perte reportée de l\'exercice précédent',NULL,NULL,1),(1252,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','691','1250','Dotation à la réserve légale',NULL,NULL,1),(1253,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','692','1250','Dotation aux autres réserves',NULL,NULL,1),(1254,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','693','1250','Bénéfice à reporter',NULL,NULL,1),(1255,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','694','1250','Rémunération du capital',NULL,NULL,1),(1256,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','695','1250','Administrateurs ou gérants',NULL,NULL,1),(1257,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','696','1250','Autres allocataires',NULL,NULL,1),(1258,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','70','1357','Chiffre d\'affaires',NULL,NULL,1),(1260,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','700','1258','Ventes de marchandises',NULL,NULL,1),(1261,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7000','1260','Ventes en Belgique',NULL,NULL,1),(1262,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7001','1260','Ventes dans les pays membres de la C.E.E.',NULL,NULL,1),(1263,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7002','1260','Ventes à l\'exportation',NULL,NULL,1),(1264,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','701','1258','Ventes de produits finis',NULL,NULL,1),(1265,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7010','1264','Ventes en Belgique',NULL,NULL,1),(1266,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7011','1264','Ventes dans les pays membres de la C.E.E.',NULL,NULL,1),(1267,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7012','1264','Ventes à l\'exportation',NULL,NULL,1),(1268,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','702','1258','Ventes de déchets et rebuts',NULL,NULL,1),(1269,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7020','1268','Ventes en Belgique',NULL,NULL,1),(1270,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7021','1268','Ventes dans les pays membres de la C.E.E.',NULL,NULL,1),(1271,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7022','1268','Ventes à l\'exportation',NULL,NULL,1),(1272,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','703','1258','Ventes d\'emballages récupérables',NULL,NULL,1),(1273,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','704','1258','Facturations des travaux en cours (associations momentanées)',NULL,NULL,1),(1274,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','705','1258','Prestations de services',NULL,NULL,1),(1275,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7050','1274','Prestations de services en Belgique',NULL,NULL,1),(1276,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7051','1274','Prestations de services dans les pays membres de la C.E.E.',NULL,NULL,1),(1277,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7052','1274','Prestations de services en vue de l\'exportation',NULL,NULL,1),(1278,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','706','1258','Pénalités et dédits obtenus par l\'entreprise',NULL,NULL,1),(1279,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','708','1258','Remises, ristournes et rabais accordés',NULL,NULL,1),(1280,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7080','1279','Sur ventes de marchandises',NULL,NULL,1),(1281,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7081','1279','Sur ventes de produits finis',NULL,NULL,1),(1282,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7082','1279','Sur ventes de déchets et rebuts',NULL,NULL,1),(1283,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7083','1279','Sur prestations de services',NULL,NULL,1),(1284,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7084','1279','Mali sur travaux facturés aux associations momentanées',NULL,NULL,1),(1285,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','71','1357','Variation des stocks et des commandes en cours d\'exécution',NULL,NULL,1),(1286,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','712','1285','Des en cours de fabrication',NULL,NULL,1),(1287,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','713','1285','Des produits finis',NULL,NULL,1),(1288,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','715','1285','Des immeubles construits destinés à la vente',NULL,NULL,1),(1289,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','717','1285','Des commandes en cours d\'exécution',NULL,NULL,1),(1290,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7170','1289','Commandes en cours - Coût de revient',NULL,NULL,1),(1291,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','71700','1290','Coût des commandes en cours d\'exécution',NULL,NULL,1),(1292,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','71701','1290','Coût des travaux en cours des associations momentanées',NULL,NULL,1),(1293,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7171','1289','Bénéfices portés en compte sur commandes en cours',NULL,NULL,1),(1294,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','71710','1293','Sur commandes en cours d\'exécution',NULL,NULL,1),(1295,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','71711','1293','Sur travaux en cours des associations momentanées',NULL,NULL,1),(1296,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','72','1357','Production immobilisée',NULL,NULL,1),(1297,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','720','1296','En frais d\'établissement',NULL,NULL,1),(1298,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','721','1296','En immobilisations incorporelles',NULL,NULL,1),(1299,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','722','1296','En immobilisations corporelles',NULL,NULL,1),(1300,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','723','1296','En immobilisations en cours',NULL,NULL,1),(1301,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','74','1357','Autres produits d\'exploitation',NULL,NULL,1),(1302,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','740','1301','Subsides d\'exploitation et montants compensatoires',NULL,NULL,1),(1303,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','741','1301','Plus-values sur réalisations courantes d\'immobilisations corporelles',NULL,NULL,1),(1304,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','742','1301','Plus-values sur réalisations de créances commerciales',NULL,NULL,1),(1305,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','743','1301','à 749 Produits d\'exploitation divers',NULL,NULL,1),(1306,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','743','1301','Produits de services exploités dans l\'intérêt du personnel',NULL,NULL,1),(1307,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','744','1301','Commissions et courtages',NULL,NULL,1),(1308,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','745','1301','Redevances pour brevets et licences',NULL,NULL,1),(1309,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','746','1301','Prestations de services (transports, études, etc)',NULL,NULL,1),(1310,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','747','1301','Revenus des immeubles affectés aux activités non professionnelles',NULL,NULL,1),(1311,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','748','1301','Locations diverses à caractère professionnel',NULL,NULL,1),(1312,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','749','1301','Produits divers',NULL,NULL,1),(1313,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7490','1312','Bonis sur reprises d\'emballages consignés',NULL,NULL,1),(1314,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7491','1312','Bonis sur travaux en associations momentanées',NULL,NULL,1),(1315,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','75','1357','Produits financiers',NULL,NULL,1),(1316,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','750','1315','Produits des immobilisations financières',NULL,NULL,1),(1317,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7500','1316','Revenus des actions',NULL,NULL,1),(1318,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7501','1316','Revenus des obligations',NULL,NULL,1),(1319,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7502','1316','Revenus des créances à plus d\'un an',NULL,NULL,1),(1320,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','751','1315','Produits des actifs circulants',NULL,NULL,1),(1321,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','752','1315','Plus-values sur réalisations d\'actifs circulants',NULL,NULL,1),(1322,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','753','1315','Subsides en capital et en intérêts',NULL,NULL,1),(1323,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','754','1315','Différences de change',NULL,NULL,1),(1324,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','755','1315','Ecarts de conversion des devises',NULL,NULL,1),(1325,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','756','1315','à 759 Produits financiers divers',NULL,NULL,1),(1326,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','756','1315','Produits des autres créances',NULL,NULL,1),(1327,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','757','1315','Escomptes obtenus',NULL,NULL,1),(1328,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','76','1357','Produits exceptionnels',NULL,NULL,1),(1329,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','760','1328','Reprises d\'amortissements et de réductions de valeur',NULL,NULL,1),(1330,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7600','1329','Sur immobilisations incorporelles',NULL,NULL,1),(1331,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7601','1329','Sur immobilisations corporelles',NULL,NULL,1),(1332,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','761','1328','Reprises de réductions de valeur sur immobilisations financières',NULL,NULL,1),(1333,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','762','1328','Reprises de provisions pour risques et charges exceptionnelles',NULL,NULL,1),(1334,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','763','1328','Plus-values sur réalisation d\'actifs immobilisés',NULL,NULL,1),(1335,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7630','1334','Sur immobilisations incorporelles',NULL,NULL,1),(1336,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7631','1334','Sur immobilisations corporelles',NULL,NULL,1),(1337,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7632','1334','Sur immobilisations financières',NULL,NULL,1),(1338,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','764','1328','Autres produits exceptionnels',NULL,NULL,1),(1339,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','77','1357','Régularisations d\'impôts et reprises de provisions fiscales',NULL,NULL,1),(1340,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','771','1339','Impôts belges sur le résultat',NULL,NULL,1),(1341,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7710','1340','Régularisations d\'impôts dus ou versés',NULL,NULL,1),(1342,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7711','1340','Régularisations d\'impôts estimés',NULL,NULL,1),(1343,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7712','1340','Reprises de provisions fiscales',NULL,NULL,1),(1344,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','773','1339','Impôts étrangers sur le résultat',NULL,NULL,1),(1345,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','79','1357','Affectation aux résultats',NULL,NULL,1),(1346,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','790','1345','Bénéfice reporté de l\'exercice précédent',NULL,NULL,1),(1347,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','791','1345','Prélèvement sur le capital et les primes d\'émission',NULL,NULL,1),(1348,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','792','1345','Prélèvement sur les réserves',NULL,NULL,1),(1349,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','793','1345','Perte à reporter',NULL,NULL,1),(1350,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','794','1345','Intervention d\'associés (ou du propriétaire) dans la perte',NULL,NULL,1),(1351,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CAPIT','XXXXXX','1','','Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',NULL,NULL,1),(1352,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','IMMO','XXXXXX','2','','Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',NULL,NULL,1),(1353,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','STOCK','XXXXXX','3','','Stock et commandes en cours d\'exécution',NULL,NULL,1),(1354,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','TIERS','XXXXXX','4','','Créances et dettes à un an au plus',NULL,NULL,1),(1355,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','FINAN','XXXXXX','5','','Placement de trésorerie et de valeurs disponibles',NULL,NULL,1),(1356,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','CHARGE','XXXXXX','6','','Charges',NULL,NULL,1),(1357,1,NULL,'2016-01-22 17:28:16','PCMN-BASE','PROD','XXXXXX','7','','Produits',NULL,NULL,1),(1401,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CAPIT','XXXXXX','1','','Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',NULL,NULL,1),(1402,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','IMMO','XXXXXX','2','','Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',NULL,NULL,1),(1403,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','STOCK','XXXXXX','3','','Stock et commandes en cours d\'exécution',NULL,NULL,1),(1404,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','TIERS','XXXXXX','4','','Créances et dettes à un an au plus',NULL,NULL,1),(1405,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','FINAN','XXXXXX','5','','Placement de trésorerie et de valeurs disponibles',NULL,NULL,1),(1406,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','CHARGE','XXXXXX','6','','Charges',NULL,NULL,1),(1407,1,NULL,'2016-01-22 17:28:15','PCG99-ABREGE','PROD','XXXXXX','7','','Produits',NULL,NULL,1),(1501,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CAPIT','XXXXXX','1','','Fonds propres, provisions pour risques et charges et dettes à plus d\'un an',NULL,NULL,1),(1502,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','IMMO','XXXXXX','2','','Frais d\'établissement. Actifs immobilisés et créances à plus d\'un an',NULL,NULL,1),(1503,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','STOCK','XXXXXX','3','','Stock et commandes en cours d\'exécution',NULL,NULL,1),(1504,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','TIERS','XXXXXX','4','','Créances et dettes à un an au plus',NULL,NULL,1),(1505,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','FINAN','XXXXXX','5','','Placement de trésorerie et de valeurs disponibles',NULL,NULL,1),(1506,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','CHARGE','XXXXXX','6','','Charges',NULL,NULL,1),(1507,1,NULL,'2016-01-22 17:28:15','PCG99-BASE','PROD','XXXXXX','7','','Produits',NULL,NULL,1),(4001,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1','','Financiación básica',NULL,NULL,1),(4002,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2','','Activo no corriente',NULL,NULL,1),(4003,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','3','','Existencias',NULL,NULL,1),(4004,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4','','Acreedores y deudores por operaciones comerciales',NULL,NULL,1),(4005,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5','','Cuentas financieras',NULL,NULL,1),(4006,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6','','Compras y gastos',NULL,NULL,1),(4007,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7','','Ventas e ingresos',NULL,NULL,1),(4008,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','10','4001','CAPITAL',NULL,NULL,1),(4009,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','100','4008','Capital social',NULL,NULL,1),(4010,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','101','4008','Fondo social',NULL,NULL,1),(4011,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','CAPITAL','102','4008','Capital',NULL,NULL,1),(4012,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','103','4008','Socios por desembolsos no exigidos',NULL,NULL,1),(4013,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1030','4012','Socios por desembolsos no exigidos capital social',NULL,NULL,1),(4014,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1034','4012','Socios por desembolsos no exigidos capital pendiente de inscripción',NULL,NULL,1),(4015,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','104','4008','Socios por aportaciones no dineradas pendientes',NULL,NULL,1),(4016,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1040','4015','Socios por aportaciones no dineradas pendientes capital social',NULL,NULL,1),(4017,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1044','4015','Socios por aportaciones no dineradas pendientes capital pendiente de inscripción',NULL,NULL,1),(4018,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','108','4008','Acciones o participaciones propias en situaciones especiales',NULL,NULL,1),(4019,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','109','4008','Acciones o participaciones propias para reducción de capital',NULL,NULL,1),(4020,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','11','4001','Reservas y otros instrumentos de patrimonio',NULL,NULL,1),(4021,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','110','4020','Prima de emisión o asunción',NULL,NULL,1),(4022,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','111','4020','Otros instrumentos de patrimonio neto',NULL,NULL,1),(4023,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1110','4022','Patrimonio neto por emisión de instrumentos financieros compuestos',NULL,NULL,1),(4024,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1111','4022','Resto de instrumentos de patrimoio neto',NULL,NULL,1),(4025,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','112','4020','Reserva legal',NULL,NULL,1),(4026,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','113','4020','Reservas voluntarias',NULL,NULL,1),(4027,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','114','4020','Reservas especiales',NULL,NULL,1),(4028,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1140','4027','Reservas para acciones o participaciones de la sociedad dominante',NULL,NULL,1),(4029,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1141','4027','Reservas estatutarias',NULL,NULL,1),(4030,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1142','4027','Reservas por capital amortizado',NULL,NULL,1),(4031,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1143','4027','Reservas por fondo de comercio',NULL,NULL,1),(4032,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1144','4028','Reservas por acciones propias aceptadas en garantía',NULL,NULL,1),(4033,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','115','4020','Reservas por pérdidas y ganancias actuariales y otros ajustes',NULL,NULL,1),(4034,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','118','4020','Aportaciones de socios o propietarios',NULL,NULL,1),(4035,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','119','4020','Diferencias por ajuste del capital a euros',NULL,NULL,1),(4036,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','12','4001','Resultados pendientes de aplicación',NULL,NULL,1),(4037,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','120','4036','Remanente',NULL,NULL,1),(4038,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','121','4036','Resultados negativos de ejercicios anteriores',NULL,NULL,1),(4039,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','129','4036','Resultado del ejercicio',NULL,NULL,1),(4040,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','13','4001','Subvenciones, donaciones y ajustes por cambio de valor',NULL,NULL,1),(4041,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','130','4040','Subvenciones oficiales de capital',NULL,NULL,1),(4042,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','131','4040','Donaciones y legados de capital',NULL,NULL,1),(4043,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','132','4040','Otras subvenciones, donaciones y legados',NULL,NULL,1),(4044,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','133','4040','Ajustes por valoración en activos financieros disponibles para la venta',NULL,NULL,1),(4045,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','134','4040','Operaciones de cobertura',NULL,NULL,1),(4046,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1340','4045','Cobertura de flujos de efectivo',NULL,NULL,1),(4047,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1341','4045','Cobertura de una inversión neta en un negocio extranjero',NULL,NULL,1),(4048,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','135','4040','Diferencias de conversión',NULL,NULL,1),(4049,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','136','4040','Ajustes por valoración en activos no corrientes y grupos enajenables de elementos mantenidos para la venta',NULL,NULL,1),(4050,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','137','4040','Ingresos fiscales a distribuir en varios ejercicios',NULL,NULL,1),(4051,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1370','4050','Ingresos fiscales por diferencias permanentes a distribuir en varios ejercicios',NULL,NULL,1),(4052,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1371','4050','Ingresos fiscales por deducciones y bonificaciones a distribuir en varios ejercicios',NULL,NULL,1),(4053,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','14','4001','Provisiones',NULL,NULL,1),(4054,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','141','4053','Provisión para impuestos',NULL,NULL,1),(4055,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','142','4053','Provisión para otras responsabilidades',NULL,NULL,1),(4056,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','143','4053','Provisión por desmantelamiento, retiro o rehabilitación del inmovilizado',NULL,NULL,1),(4057,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','145','4053','Provisión para actuaciones medioambientales',NULL,NULL,1),(4058,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','15','4001','Deudas a largo plazo con características especiales',NULL,NULL,1),(4059,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','150','4058','Acciones o participaciones a largo plazo consideradas como pasivos financieros',NULL,NULL,1),(4060,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','153','4058','Desembolsos no exigidos por acciones o participaciones consideradas como pasivos financieros',NULL,NULL,1),(4061,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1533','4060','Desembolsos no exigidos empresas del grupo',NULL,NULL,1),(4062,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1534','4060','Desembolsos no exigidos empresas asociadas',NULL,NULL,1),(4063,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1535','4060','Desembolsos no exigidos otras partes vinculadas',NULL,NULL,1),(4064,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1536','4060','Otros desembolsos no exigidos',NULL,NULL,1),(4065,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','154','4058','Aportaciones no dinerarias pendientes por acciones o participaciones consideradas como pasivos financieros',NULL,NULL,1),(4066,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1543','4065','Aportaciones no dinerarias pendientes empresas del grupo',NULL,NULL,1),(4067,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1544','4065','Aportaciones no dinerarias pendientes empresas asociadas',NULL,NULL,1),(4068,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1545','4065','Aportaciones no dinerarias pendientes otras partes vinculadas',NULL,NULL,1),(4069,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1546','4065','Otras aportaciones no dinerarias pendientes',NULL,NULL,1),(4070,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','16','4001','Deudas a largo plazo con partes vinculadas',NULL,NULL,1),(4071,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','160','4070','Deudas a largo plazo con entidades de crédito vinculadas',NULL,NULL,1),(4072,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1603','4071','Deudas a largo plazo con entidades de crédito empresas del grupo',NULL,NULL,1),(4073,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1604','4071','Deudas a largo plazo con entidades de crédito empresas asociadas',NULL,NULL,1),(4074,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1605','4071','Deudas a largo plazo con otras entidades de crédito vinculadas',NULL,NULL,1),(4075,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','161','4070','Proveedores de inmovilizado a largo plazo partes vinculadas',NULL,NULL,1),(4076,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1613','4075','Proveedores de inmovilizado a largo plazo empresas del grupo',NULL,NULL,1),(4077,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1614','4075','Proveedores de inmovilizado a largo plazo empresas asociadas',NULL,NULL,1),(4078,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1615','4075','Proveedores de inmovilizado a largo plazo otras partes vinculadas',NULL,NULL,1),(4079,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','162','4070','Acreedores por arrendamiento financiero a largo plazo partes vinculadas',NULL,NULL,1),(4080,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1623','4079','Acreedores por arrendamiento financiero a largo plazo empresas del grupo',NULL,NULL,1),(4081,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1624','4080','Acreedores por arrendamiento financiero a largo plazo empresas asociadas',NULL,NULL,1),(4082,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1625','4080','Acreedores por arrendamiento financiero a largo plazo otras partes vinculadas',NULL,NULL,1),(4083,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','163','4070','Otras deudas a largo plazo con partes vinculadas',NULL,NULL,1),(4084,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1633','4083','Otras deudas a largo plazo empresas del grupo',NULL,NULL,1),(4085,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1634','4083','Otras deudas a largo plazo empresas asociadas',NULL,NULL,1),(4086,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','1635','4083','Otras deudas a largo plazo otras partes vinculadas',NULL,NULL,1),(4087,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','17','4001','Deudas a largo plazo por préstamos recibidos empresitos y otros conceptos',NULL,NULL,1),(4088,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','170','4087','Deudas a largo plazo con entidades de crédito',NULL,NULL,1),(4089,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','171','4087','Deudas a largo plazo',NULL,NULL,1),(4090,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','172','4087','Deudas a largo plazo transformables en suvbenciones donaciones y legados',NULL,NULL,1),(4091,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','173','4087','Proveedores de inmovilizado a largo plazo',NULL,NULL,1),(4092,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','174','4087','Acreedores por arrendamiento financiero a largo plazo',NULL,NULL,1),(4093,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','175','4087','Efectos a pagar a largo plazo',NULL,NULL,1),(4094,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','176','4087','Pasivos por derivados financieros a largo plazo',NULL,NULL,1),(4095,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','177','4087','Obligaciones y bonos',NULL,NULL,1),(4096,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','179','4087','Deudas representadas en otros valores negociables',NULL,NULL,1),(4097,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','18','4001','Pasivos por fianzas garantias y otros conceptos a largo plazo',NULL,NULL,1),(4098,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','180','4097','Fianzas recibidas a largo plazo',NULL,NULL,1),(4099,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','181','4097','Anticipos recibidos por ventas o prestaciones de servicios a largo plazo',NULL,NULL,1),(4100,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','185','4097','Depositos recibidos a largo plazo',NULL,NULL,1),(4101,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','19','4001','Situaciones transitorias de financiación',NULL,NULL,1),(4102,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','190','4101','Acciones o participaciones emitidas',NULL,NULL,1),(4103,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','192','4101','Suscriptores de acciones',NULL,NULL,1),(4104,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','194','4101','Capital emitido pendiente de inscripción',NULL,NULL,1),(4105,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','195','4101','Acciones o participaciones emitidas consideradas como pasivos financieros',NULL,NULL,1),(4106,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','197','4101','Suscriptores de acciones consideradas como pasivos financieros',NULL,NULL,1),(4107,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','FINANCIACION','XXXXXX','199','4101','Acciones o participaciones emitidas consideradas como pasivos financieros pendientes de inscripción',NULL,NULL,1),(4108,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','20','4002','Inmovilizaciones intangibles',NULL,NULL,1),(4109,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','200','4108','Investigación',NULL,NULL,1),(4110,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','201','4108','Desarrollo',NULL,NULL,1),(4111,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','202','4108','Concesiones administrativas',NULL,NULL,1),(4112,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','203','4108','Propiedad industrial',NULL,NULL,1),(4113,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','205','4108','Derechos de transpaso',NULL,NULL,1),(4114,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','206','4108','Aplicaciones informáticas',NULL,NULL,1),(4115,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','209','4108','Anticipos para inmovilizaciones intangibles',NULL,NULL,1),(4116,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','21','4002','Inmovilizaciones materiales',NULL,NULL,1),(4117,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','210','4116','Terrenos y bienes naturales',NULL,NULL,1),(4118,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','211','4116','Construcciones',NULL,NULL,1),(4119,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','212','4116','Instalaciones técnicas',NULL,NULL,1),(4120,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','213','4116','Maquinaria',NULL,NULL,1),(4121,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','214','4116','Utillaje',NULL,NULL,1),(4122,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','215','4116','Otras instalaciones',NULL,NULL,1),(4123,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','216','4116','Mobiliario',NULL,NULL,1),(4124,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','217','4116','Equipos para procesos de información',NULL,NULL,1),(4125,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','218','4116','Elementos de transporte',NULL,NULL,1),(4126,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','219','4116','Otro inmovilizado material',NULL,NULL,1),(4127,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','22','4002','Inversiones inmobiliarias',NULL,NULL,1),(4128,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','220','4127','Inversiones en terreons y bienes naturales',NULL,NULL,1),(4129,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','221','4127','Inversiones en construcciones',NULL,NULL,1),(4130,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','23','4002','Inmovilizaciones materiales en curso',NULL,NULL,1),(4131,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','230','4130','Adaptación de terrenos y bienes naturales',NULL,NULL,1),(4132,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','231','4130','Construcciones en curso',NULL,NULL,1),(4133,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','232','4130','Instalaciones técnicas en montaje',NULL,NULL,1),(4134,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','233','4130','Maquinaria en montaje',NULL,NULL,1),(4135,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','237','4130','Equipos para procesos de información en montaje',NULL,NULL,1),(4136,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','239','4130','Anticipos para inmovilizaciones materiales',NULL,NULL,1),(4137,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','24','4002','Inversiones financieras a largo plazo en partes vinculadas',NULL,NULL,1),(4138,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','240','4137','Participaciones a largo plazo en partes vinculadas',NULL,NULL,1),(4139,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2403','4138','Participaciones a largo plazo en empresas del grupo',NULL,NULL,1),(4140,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2404','4138','Participaciones a largo plazo en empresas asociadas',NULL,NULL,1),(4141,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2405','4138','Participaciones a largo plazo en otras partes vinculadas',NULL,NULL,1),(4142,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','241','4137','Valores representativos de deuda a largo plazo de partes vinculadas',NULL,NULL,1),(4143,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2413','4142','Valores representativos de deuda a largo plazo de empresas del grupo',NULL,NULL,1),(4144,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2414','4142','Valores representativos de deuda a largo plazo de empresas asociadas',NULL,NULL,1),(4145,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2415','4142','Valores representativos de deuda a largo plazo de otras partes vinculadas',NULL,NULL,1),(4146,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','242','4137','Créditos a largo plazo a partes vinculadas',NULL,NULL,1),(4147,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2423','4146','Créditos a largo plazo a empresas del grupo',NULL,NULL,1),(4148,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2424','4146','Créditos a largo plazo a empresas asociadas',NULL,NULL,1),(4149,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2425','4146','Créditos a largo plazo a otras partes vinculadas',NULL,NULL,1),(4150,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','249','4137','Desembolsos pendientes sobre participaciones a largo plazo en partes vinculadas',NULL,NULL,1),(4151,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2493','4150','Desembolsos pendientes sobre participaciones a largo plazo en empresas del grupo',NULL,NULL,1),(4152,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2494','4150','Desembolsos pendientes sobre participaciones a largo plazo en empresas asociadas',NULL,NULL,1),(4153,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2495','4150','Desembolsos pendientes sobre participaciones a largo plazo en otras partes vinculadas',NULL,NULL,1),(4154,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','25','4002','Otras inversiones financieras a largo plazo',NULL,NULL,1),(4155,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','250','4154','Inversiones financieras a largo plazo en instrumentos de patrimonio',NULL,NULL,1),(4156,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','251','4154','Valores representativos de deuda a largo plazo',NULL,NULL,1),(4157,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','252','4154','Créditos a largo plazo',NULL,NULL,1),(4158,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','253','4154','Créditos a largo plazo por enajenación de inmovilizado',NULL,NULL,1),(4159,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','254','4154','Créditos a largo plazo al personal',NULL,NULL,1),(4160,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','255','4154','Activos por derivados financieros a largo plazo',NULL,NULL,1),(4161,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','258','4154','Imposiciones a largo plazo',NULL,NULL,1),(4162,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','259','4154','Desembolsos pendientes sobre participaciones en el patrimonio neto a largo plazo',NULL,NULL,1),(4163,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','26','4002','Fianzas y depósitos constituidos a largo plazo',NULL,NULL,1),(4164,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','260','4163','Fianzas constituidas a largo plazo',NULL,NULL,1),(4165,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','261','4163','Depósitos constituidos a largo plazo',NULL,NULL,1),(4166,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','28','4002','Amortización acumulada del inmovilizado',NULL,NULL,1),(4167,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','280','4166','Amortización acumulado del inmovilizado intangible',NULL,NULL,1),(4168,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2800','4167','Amortización acumulada de investigación',NULL,NULL,1),(4169,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2801','4167','Amortización acumulada de desarrollo',NULL,NULL,1),(4170,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2802','4167','Amortización acumulada de concesiones administrativas',NULL,NULL,1),(4171,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2803','4167','Amortización acumulada de propiedad industrial',NULL,NULL,1),(4172,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2805','4167','Amortización acumulada de derechos de transpaso',NULL,NULL,1),(4173,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2806','4167','Amortización acumulada de aplicaciones informáticas',NULL,NULL,1),(4174,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','281','4166','Amortización acumulado del inmovilizado material',NULL,NULL,1),(4175,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2811','4174','Amortización acumulada de construcciones',NULL,NULL,1),(4176,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2812','4174','Amortización acumulada de instalaciones técnicas',NULL,NULL,1),(4177,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2813','4174','Amortización acumulada de maquinaria',NULL,NULL,1),(4178,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2814','4174','Amortización acumulada de utillaje',NULL,NULL,1),(4179,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2815','4174','Amortización acumulada de otras instalaciones',NULL,NULL,1),(4180,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2816','4174','Amortización acumulada de mobiliario',NULL,NULL,1),(4181,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2817','4174','Amortización acumulada de equipos para proceso de información',NULL,NULL,1),(4182,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2818','4174','Amortización acumulada de elementos de transporte',NULL,NULL,1),(4183,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2819','4175','Amortización acumulada de otro inmovilizado material',NULL,NULL,1),(4184,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','282','4166','Amortización acumulada de las inversiones inmobiliarias',NULL,NULL,1),(4185,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','29','4002','Deterioro de valor de activos no corrientes',NULL,NULL,1),(4186,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','290','4185','Deterioro de valor del inmovilizado intangible',NULL,NULL,1),(4187,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2900','4186','Deterioro de valor de investigación',NULL,NULL,1),(4188,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2901','4186','Deterioro de valor de desarrollo',NULL,NULL,1),(4189,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2902','4186','Deterioro de valor de concesiones administrativas',NULL,NULL,1),(4190,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2903','4186','Deterioro de valor de propiedad industrial',NULL,NULL,1),(4191,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2905','4186','Deterioro de valor de derechos de transpaso',NULL,NULL,1),(4192,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2906','4186','Deterioro de valor de aplicaciones informáticas',NULL,NULL,1),(4193,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','291','4185','Deterioro de valor del inmovilizado material',NULL,NULL,1),(4194,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2910','4193','Deterioro de valor de terrenos y bienes naturales',NULL,NULL,1),(4195,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2911','4193','Deterioro de valor de construcciones',NULL,NULL,1),(4196,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2912','4193','Deterioro de valor de instalaciones técnicas',NULL,NULL,1),(4197,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2913','4193','Deterioro de valor de maquinaria',NULL,NULL,1),(4198,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2914','4193','Deterioro de valor de utillajes',NULL,NULL,1),(4199,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2915','4194','Deterioro de valor de otras instalaciones',NULL,NULL,1),(4200,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2916','4194','Deterioro de valor de mobiliario',NULL,NULL,1),(4201,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2917','4194','Deterioro de valor de equipos para proceso de información',NULL,NULL,1),(4202,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2918','4194','Deterioro de valor de elementos de transporte',NULL,NULL,1),(4203,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2919','4194','Deterioro de valor de otro inmovilizado material',NULL,NULL,1),(4204,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','292','4185','Deterioro de valor de las inversiones inmobiliarias',NULL,NULL,1),(4205,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2920','4204','Deterioro de valor de terrenos y bienes naturales',NULL,NULL,1),(4206,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2921','4204','Deterioro de valor de construcciones',NULL,NULL,1),(4207,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','293','4185','Deterioro de valor de participaciones a largo plazo en partes vinculadas',NULL,NULL,1),(4208,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2933','4207','Deterioro de valor de participaciones a largo plazo en empresas del grupo',NULL,NULL,1),(4209,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2934','4207','Deterioro de valor de sobre participaciones a largo plazo en empresas asociadas',NULL,NULL,1),(4210,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2935','4207','Deterioro de valor de sobre participaciones a largo plazo en otras partes vinculadas',NULL,NULL,1),(4211,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','294','4185','Deterioro de valor de valores representativos de deuda a largo plazo en partes vinculadas',NULL,NULL,1),(4212,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2943','4211','Deterioro de valor de valores representativos de deuda a largo plazo en empresas del grupo',NULL,NULL,1),(4213,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2944','4211','Deterioro de valor de valores representativos de deuda a largo plazo en empresas asociadas',NULL,NULL,1),(4214,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2945','4211','Deterioro de valor de valores representativos de deuda a largo plazo en otras partes vinculadas',NULL,NULL,1),(4215,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','295','4185','Deterioro de valor de créditos a largo plazo a partes vinculadas',NULL,NULL,1),(4216,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2953','4215','Deterioro de valor de créditos a largo plazo a empresas del grupo',NULL,NULL,1),(4217,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2954','4215','Deterioro de valor de créditos a largo plazo a empresas asociadas',NULL,NULL,1),(4218,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','2955','4215','Deterioro de valor de créditos a largo plazo a otras partes vinculadas',NULL,NULL,1),(4219,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','296','4185','Deterioro de valor de participaciones en el patrimonio netoa largo plazo',NULL,NULL,1),(4220,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','297','4185','Deterioro de valor de valores representativos de deuda a largo plazo',NULL,NULL,1),(4221,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACTIVO','XXXXXX','298','4185','Deterioro de valor de créditos a largo plazo',NULL,NULL,1),(4222,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','30','4003','Comerciales',NULL,NULL,1),(4223,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','300','4222','Mercaderías A',NULL,NULL,1),(4224,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','301','4222','Mercaderías B',NULL,NULL,1),(4225,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','31','4003','Materias primas',NULL,NULL,1),(4226,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','310','4225','Materias primas A',NULL,NULL,1),(4227,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','311','4225','Materias primas B',NULL,NULL,1),(4228,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','32','4003','Otros aprovisionamientos',NULL,NULL,1),(4229,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','320','4228','Elementos y conjuntos incorporables',NULL,NULL,1),(4230,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','321','4228','Combustibles',NULL,NULL,1),(4231,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','322','4228','Repuestos',NULL,NULL,1),(4232,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','325','4228','Materiales diversos',NULL,NULL,1),(4233,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','326','4228','Embalajes',NULL,NULL,1),(4234,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','327','4228','Envases',NULL,NULL,1),(4235,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','328','4229','Material de oficina',NULL,NULL,1),(4236,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','33','4003','Productos en curso',NULL,NULL,1),(4237,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','330','4236','Productos en curos A',NULL,NULL,1),(4238,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','331','4236','Productos en curso B',NULL,NULL,1),(4239,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','34','4003','Productos semiterminados',NULL,NULL,1),(4240,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','340','4239','Productos semiterminados A',NULL,NULL,1),(4241,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','341','4239','Productos semiterminados B',NULL,NULL,1),(4242,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','35','4003','Productos terminados',NULL,NULL,1),(4243,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','350','4242','Productos terminados A',NULL,NULL,1),(4244,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','351','4242','Productos terminados B',NULL,NULL,1),(4245,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','36','4003','Subproductos, residuos y materiales recuperados',NULL,NULL,1),(4246,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','360','4245','Subproductos A',NULL,NULL,1),(4247,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','361','4245','Subproductos B',NULL,NULL,1),(4248,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','365','4245','Residuos A',NULL,NULL,1),(4249,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','366','4245','Residuos B',NULL,NULL,1),(4250,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','368','4245','Materiales recuperados A',NULL,NULL,1),(4251,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','369','4245','Materiales recuperados B',NULL,NULL,1),(4252,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','39','4003','Deterioro de valor de las existencias',NULL,NULL,1),(4253,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','390','4252','Deterioro de valor de las mercaderías',NULL,NULL,1),(4254,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','391','4252','Deterioro de valor de las materias primas',NULL,NULL,1),(4255,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','392','4252','Deterioro de valor de otros aprovisionamientos',NULL,NULL,1),(4256,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','393','4252','Deterioro de valor de los productos en curso',NULL,NULL,1),(4257,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','394','4252','Deterioro de valor de los productos semiterminados',NULL,NULL,1),(4258,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','395','4252','Deterioro de valor de los productos terminados',NULL,NULL,1),(4259,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','EXISTENCIAS','XXXXXX','396','4252','Deterioro de valor de los subproductos, residuos y materiales recuperados',NULL,NULL,1),(4260,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','PROVEEDORES','40','4004','Proveedores',NULL,NULL,1),(4261,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','PROVEEDORES','400','4260','Proveedores',NULL,NULL,1),(4262,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4000','4261','Proveedores euros',NULL,NULL,1),(4263,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4004','4261','Proveedores moneda extranjera',NULL,NULL,1),(4264,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4009','4261','Proveedores facturas pendientes de recibir o formalizar',NULL,NULL,1),(4265,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','401','4260','Proveedores efectos comerciales a pagar',NULL,NULL,1),(4266,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','403','4260','Proveedores empresas del grupo',NULL,NULL,1),(4267,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4030','4266','Proveedores empresas del grupo euros',NULL,NULL,1),(4268,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4031','4266','Efectos comerciales a pagar empresas del grupo',NULL,NULL,1),(4269,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4034','4266','Proveedores empresas del grupo moneda extranjera',NULL,NULL,1),(4270,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4036','4266','Envases y embalajes a devolver a proveedores empresas del grupo',NULL,NULL,1),(4271,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4039','4266','Proveedores empresas del grupo facturas pendientes de recibir o de formalizar',NULL,NULL,1),(4272,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','404','4260','Proveedores empresas asociadas',NULL,NULL,1),(4273,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','405','4260','Proveedores otras partes vinculadas',NULL,NULL,1),(4274,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','406','4260','Envases y embalajes a devolver a proveedores',NULL,NULL,1),(4275,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','407','4260','Anticipos a proveedores',NULL,NULL,1),(4276,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','41','4004','Acreedores varios',NULL,NULL,1),(4277,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','410','4276','Acreedores por prestaciones de servicios',NULL,NULL,1),(4278,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4100','4277','Acreedores por prestaciones de servicios euros',NULL,NULL,1),(4279,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4104','4277','Acreedores por prestaciones de servicios moneda extranjera',NULL,NULL,1),(4280,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4109','4277','Acreedores por prestaciones de servicios facturas pendientes de recibir o formalizar',NULL,NULL,1),(4281,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','411','4276','Acreedores efectos comerciales a pagar',NULL,NULL,1),(4282,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','419','4276','Acreedores por operaciones en común',NULL,NULL,1),(4283,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','CLIENTES','43','4004','Clientes',NULL,NULL,1),(4284,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','CLIENTES','430','4283','Clientes',NULL,NULL,1),(4285,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4300','4284','Clientes euros',NULL,NULL,1),(4286,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4304','4284','Clientes moneda extranjera',NULL,NULL,1),(4287,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4309','4284','Clientes facturas pendientes de formalizar',NULL,NULL,1),(4288,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','431','4283','Clientes efectos comerciales a cobrar',NULL,NULL,1),(4289,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4310','4288','Efectos comerciales en cartera',NULL,NULL,1),(4290,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4311','4288','Efectos comerciales descontados',NULL,NULL,1),(4291,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4312','4288','Efectos comerciales en gestión de cobro',NULL,NULL,1),(4292,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4315','4288','Efectos comerciales impagados',NULL,NULL,1),(4293,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','432','4283','Clientes operaciones de factoring',NULL,NULL,1),(4294,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','433','4283','Clientes empresas del grupo',NULL,NULL,1),(4295,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4330','4294','Clientes empresas del grupo euros',NULL,NULL,1),(4296,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4331','4294','Efectos comerciales a cobrar empresas del grupo',NULL,NULL,1),(4297,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4332','4294','Clientes empresas del grupo operaciones de factoring',NULL,NULL,1),(4298,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4334','4294','Clientes empresas del grupo moneda extranjera',NULL,NULL,1),(4299,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4336','4294','Clientes empresas del grupo dudoso cobro',NULL,NULL,1),(4300,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4337','4294','Envases y embalajes a devolver a clientes empresas del grupo',NULL,NULL,1),(4301,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4339','4294','Clientes empresas del grupo facturas pendientes de formalizar',NULL,NULL,1),(4302,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','434','4283','Clientes empresas asociadas',NULL,NULL,1),(4303,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','435','4283','Clientes otras partes vinculadas',NULL,NULL,1),(4304,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','436','4283','Clientes de dudoso cobro',NULL,NULL,1),(4305,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','437','4283','Envases y embalajes a devolver por clientes',NULL,NULL,1),(4306,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','438','4283','Anticipos de clientes',NULL,NULL,1),(4307,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','44','4004','Deudores varios',NULL,NULL,1),(4308,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','440','4307','Deudores',NULL,NULL,1),(4309,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4400','4308','Deudores euros',NULL,NULL,1),(4310,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4404','4308','Deudores moneda extranjera',NULL,NULL,1),(4311,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4409','4308','Deudores facturas pendientes de formalizar',NULL,NULL,1),(4312,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','441','4307','Deudores efectos comerciales a cobrar',NULL,NULL,1),(4313,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4410','4312','Deudores efectos comerciales en cartera',NULL,NULL,1),(4314,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4411','4312','Deudores efectos comerciales descontados',NULL,NULL,1),(4315,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4412','4312','Deudores efectos comerciales en gestión de cobro',NULL,NULL,1),(4316,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4415','4312','Deudores efectos comerciales impagados',NULL,NULL,1),(4317,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','446','4307','Deudores de dusoso cobro',NULL,NULL,1),(4318,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','449','4307','Deudores por operaciones en común',NULL,NULL,1),(4319,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','46','4004','Personal',NULL,NULL,1),(4320,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','460','4319','Anticipos de renumeraciones',NULL,NULL,1),(4321,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','465','4319','Renumeraciones pendientes de pago',NULL,NULL,1),(4322,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','47','4004','Administraciones Públicas',NULL,NULL,1),(4323,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','470','4322','Hacienda Pública deudora por diversos conceptos',NULL,NULL,1),(4324,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4700','4323','Hacienda Pública deudora por IVA',NULL,NULL,1),(4325,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4708','4323','Hacienda Pública deudora por subvenciones concedidas',NULL,NULL,1),(4326,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4709','4323','Hacienda Pública deudora por devolución de impuestos',NULL,NULL,1),(4327,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','471','4322','Organismos de la Seguridad Social deudores',NULL,NULL,1),(4328,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','472','4322','Hacienda Pública IVA soportado',NULL,NULL,1),(4329,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','473','4322','Hacienda Pública retenciones y pagos a cuenta',NULL,NULL,1),(4330,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','474','4322','Activos por impuesto diferido',NULL,NULL,1),(4331,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4740','4330','Activos por diferencias temporarias deducibles',NULL,NULL,1),(4332,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4742','4330','Derechos por deducciones y bonificaciones pendientes de aplicar',NULL,NULL,1),(4333,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4745','4330','Crédito por pérdidasa compensar del ejercicio',NULL,NULL,1),(4334,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','475','4322','Hacienda Pública acreedora por conceptos fiscales',NULL,NULL,1),(4335,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4750','4334','Hacienda Pública acreedora por IVA',NULL,NULL,1),(4336,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4751','4334','Hacienda Pública acreedora por retenciones practicadas',NULL,NULL,1),(4337,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4752','4334','Hacienda Pública acreedora por impuesto sobre sociedades',NULL,NULL,1),(4338,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4758','4334','Hacienda Pública acreedora por subvenciones a integrar',NULL,NULL,1),(4339,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','476','4322','Organismos de la Seguridad Social acreedores',NULL,NULL,1),(4340,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','477','4322','Hacienda Pública IVA repercutido',NULL,NULL,1),(4341,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','479','4322','Pasivos por diferencias temporarias imponibles',NULL,NULL,1),(4342,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','48','4004','Ajustes por periodificación',NULL,NULL,1),(4343,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','480','4342','Gastos anticipados',NULL,NULL,1),(4344,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','485','4342','Ingresos anticipados',NULL,NULL,1),(4345,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','49','4004','Deterioro de valor de créditos comerciales y provisiones a corto plazo',NULL,NULL,1),(4346,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','490','4345','Deterioro de valor de créditos por operaciones comerciales',NULL,NULL,1),(4347,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','493','4345','Deterioro de valor de créditos por operaciones comerciales con partes vinculadas',NULL,NULL,1),(4348,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4933','4347','Deterioro de valor de créditos por operaciones comerciales con empresas del grupo',NULL,NULL,1),(4349,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4934','4347','Deterioro de valor de créditos por operaciones comerciales con empresas asociadas',NULL,NULL,1),(4350,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4935','4347','Deterioro de valor de créditos por operaciones comerciales con otras partes vinculadas',NULL,NULL,1),(4351,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','499','4345','Provisiones por operaciones comerciales',NULL,NULL,1),(4352,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4994','4351','Provisión para contratos anerosos',NULL,NULL,1),(4353,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','ACREEDORES_DEUDORES','XXXXXX','4999','4351','Provisión para otras operaciones comerciales',NULL,NULL,1),(4354,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','50','4005','Emprésitos deudas con características especiales y otras emisiones análogas a corto plazo',NULL,NULL,1),(4355,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','500','4354','Obligaciones y bonos a corto plazo',NULL,NULL,1),(4356,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','502','4354','Acciones o participaciones a corto plazo consideradas como pasivos financieros',NULL,NULL,1),(4357,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','505','4354','Deudas representadas en otros valores negociables a corto plazo',NULL,NULL,1),(4358,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','506','4354','Intereses a corto plazo de emprésitos y otras emisiones analógicas',NULL,NULL,1),(4359,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','507','4354','Dividendos de acciones o participaciones consideradas como pasivos financieros',NULL,NULL,1),(4360,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','509','4354','Valores negociables amortizados',NULL,NULL,1),(4361,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5090','4360','Obligaciones y bonos amortizados',NULL,NULL,1),(4362,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5095','4360','Otros valores negociables amortizados',NULL,NULL,1),(4363,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','51','4005','Deudas a corto plazo con partes vinculadas',NULL,NULL,1),(4364,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','510','4363','Deudas a corto plazo con entidades de crédito vinculadas',NULL,NULL,1),(4365,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5103','4364','Deudas a corto plazo con entidades de crédito empresas del grupo',NULL,NULL,1),(4366,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5104','4364','Deudas a corto plazo con entidades de crédito empresas asociadas',NULL,NULL,1),(4367,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5105','4364','Deudas a corto plazo con otras entidades de crédito vinculadas',NULL,NULL,1),(4368,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','511','4363','Proveedores de inmovilizado a corto plazo partes vinculadas',NULL,NULL,1),(4369,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5113','4368','Proveedores de inmovilizado a corto plazo empresas del grupo',NULL,NULL,1),(4370,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5114','4368','Proveedores de inmovilizado a corto plazo empresas asociadas',NULL,NULL,1),(4371,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5115','4368','Proveedores de inmovilizado a corto plazo otras partes vinculadas',NULL,NULL,1),(4372,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','512','4363','Acreedores por arrendamiento financiero a corto plazo partes vinculadas',NULL,NULL,1),(4373,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5123','4372','Acreedores por arrendamiento financiero a corto plazo empresas del grupo',NULL,NULL,1),(4374,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5124','4372','Acreedores por arrendamiento financiero a corto plazo empresas asociadas',NULL,NULL,1),(4375,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5125','4372','Acreedores por arrendamiento financiero a corto plazo otras partes vinculadas',NULL,NULL,1),(4376,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','513','4363','Otras deudas a corto plazo con partes vinculadas',NULL,NULL,1),(4377,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5133','4376','Otras deudas a corto plazo con empresas del grupo',NULL,NULL,1),(4378,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5134','4376','Otras deudas a corto plazo con empresas asociadas',NULL,NULL,1),(4379,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5135','4376','Otras deudas a corto plazo con partes vinculadas',NULL,NULL,1),(4380,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','514','4363','Intereses a corto plazo con partes vinculadas',NULL,NULL,1),(4381,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5143','4380','Intereses a corto plazo empresas del grupo',NULL,NULL,1),(4382,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5144','4380','Intereses a corto plazo empresas asociadas',NULL,NULL,1),(4383,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5145','4380','Intereses deudas a corto plazo partes vinculadas',NULL,NULL,1),(4384,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','52','4005','Deudas a corto plazo por préstamos recibidos y otros conceptos',NULL,NULL,1),(4385,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','520','4384','Deudas a corto plazo con entidades de crédito',NULL,NULL,1),(4386,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5200','4385','Préstamos a corto plazo de entidades de crédito',NULL,NULL,1),(4387,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5201','4385','Deudas a corto plazo por crédito dispuesto',NULL,NULL,1),(4388,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5208','4385','Deudas por efectos descontados',NULL,NULL,1),(4389,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5209','4385','Deudas por operaciones de factoring',NULL,NULL,1),(4390,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','521','4384','Deudas a corto plazo',NULL,NULL,1),(4391,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','522','4384','Deudas a corto plazo transformables en subvenciones donaciones y legados',NULL,NULL,1),(4392,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','523','4384','Proveedores de inmovilizado a corto plazo',NULL,NULL,1),(4393,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','526','4384','Dividendo activo a pagar',NULL,NULL,1),(4394,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','527','4384','Intereses a corto plazo de deudas con entidades de crédito',NULL,NULL,1),(4395,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','528','4384','Intereses a corto plazo de deudas',NULL,NULL,1),(4396,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','529','4384','Provisiones a corto plazo',NULL,NULL,1),(4397,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5291','4396','Provisión a corto plazo para impuestos',NULL,NULL,1),(4398,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5292','4396','Provisión a corto plazo para otras responsabilidades',NULL,NULL,1),(4399,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5293','4396','Provisión a corto plazo por desmantelamiento retiro o rehabilitación del inmovilizado',NULL,NULL,1),(4400,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5295','4396','Provisión a corto plazo para actuaciones medioambientales',NULL,NULL,1),(4401,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','53','4005','Inversiones financieras a corto plazo en partes vinculadas',NULL,NULL,1),(4402,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','530','4401','Participaciones a corto plazo en partes vinculadas',NULL,NULL,1),(4403,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5303','4402','Participaciones a corto plazo en empresas del grupo',NULL,NULL,1),(4404,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5304','4402','Participaciones a corto plazo en empresas asociadas',NULL,NULL,1),(4405,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5305','4402','Participaciones a corto plazo en otras partes vinculadas',NULL,NULL,1),(4406,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','531','4401','Valores representativos de deuda a corto plazo de partes vinculadas',NULL,NULL,1),(4407,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5313','4406','Valores representativos de deuda a corto plazo de empresas del grupo',NULL,NULL,1),(4408,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5314','4406','Valores representativos de deuda a corto plazo de empresas asociadas',NULL,NULL,1),(4409,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5315','4406','Valores representativos de deuda a corto plazo de otras partes vinculadas',NULL,NULL,1),(4410,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','532','4401','Créditos a corto plazo a partes vinculadas',NULL,NULL,1),(4411,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5323','4410','Créditos a corto plazo a empresas del grupo',NULL,NULL,1),(4412,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5324','4410','Créditos a corto plazo a empresas asociadas',NULL,NULL,1),(4413,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5325','4410','Créditos a corto plazo a otras partes vinculadas',NULL,NULL,1),(4414,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','533','4401','Intereses a corto plazo de valores representativos de deuda de partes vinculadas',NULL,NULL,1),(4415,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5333','4414','Intereses a corto plazo de valores representativos de deuda en empresas del grupo',NULL,NULL,1),(4416,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5334','4414','Intereses a corto plazo de valores representativos de deuda en empresas asociadas',NULL,NULL,1),(4417,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5335','4414','Intereses a corto plazo de valores representativos de deuda en otras partes vinculadas',NULL,NULL,1),(4418,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','534','4401','Intereses a corto plazo de créditos a partes vinculadas',NULL,NULL,1),(4419,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5343','4418','Intereses a corto plazo de créditos a empresas del grupo',NULL,NULL,1),(4420,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5344','4418','Intereses a corto plazo de créditos a empresas asociadas',NULL,NULL,1),(4421,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5345','4418','Intereses a corto plazo de créditos a otras partes vinculadas',NULL,NULL,1),(4422,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','535','4401','Dividendo a cobrar de inversiones financieras en partes vinculadas',NULL,NULL,1),(4423,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5353','4422','Dividendo a cobrar de empresas del grupo',NULL,NULL,1),(4424,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5354','4422','Dividendo a cobrar de empresas asociadas',NULL,NULL,1),(4425,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5355','4422','Dividendo a cobrar de otras partes vinculadas',NULL,NULL,1),(4426,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','539','4401','Desembolsos pendientes sobre participaciones a corto plazo en partes vinculadas',NULL,NULL,1),(4427,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5393','4426','Desembolsos pendientes sobre participaciones a corto plazo en empresas del grupo',NULL,NULL,1),(4428,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5394','4426','Desembolsos pendientes sobre participaciones a corto plazo en empresas asociadas',NULL,NULL,1),(4429,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5395','4426','Desembolsos pendientes sobre participaciones a corto plazo en otras partes vinculadas',NULL,NULL,1),(4430,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','54','4005','Otras inversiones financieras a corto plazo',NULL,NULL,1),(4431,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','540','4430','Inversiones financieras a corto plazo en instrumentos de patrimonio',NULL,NULL,1),(4432,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','541','4430','Valores representativos de deuda a corto plazo',NULL,NULL,1),(4433,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','542','4430','Créditos a corto plazo',NULL,NULL,1),(4434,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','543','4430','Créditos a corto plazo por enejenación de inmovilizado',NULL,NULL,1),(4435,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','544','4430','Créditos a corto plazo al personal',NULL,NULL,1),(4436,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','545','4430','Dividendo a cobrar',NULL,NULL,1),(4437,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','546','4430','Intereses a corto plazo de valores reprsentativos de deuda',NULL,NULL,1),(4438,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','547','4430','Intereses a corto plazo de créditos',NULL,NULL,1),(4439,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','548','4430','Imposiciones a corto plazo',NULL,NULL,1),(4440,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','549','4430','Desembolsos pendientes sobre participaciones en el patrimonio neto a corto plazo',NULL,NULL,1),(4441,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','55','4005','Otras cuentas no bancarias',NULL,NULL,1),(4442,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','550','4441','Titular de la explotación',NULL,NULL,1),(4443,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','551','4441','Cuenta corriente con socios y administradores',NULL,NULL,1),(4444,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','552','4441','Cuenta corriente otras personas y entidades vinculadas',NULL,NULL,1),(4445,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5523','4444','Cuenta corriente con empresas del grupo',NULL,NULL,1),(4446,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5524','4444','Cuenta corriente con empresas asociadas',NULL,NULL,1),(4447,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5525','4444','Cuenta corriente con otras partes vinculadas',NULL,NULL,1),(4448,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','554','4441','Cuenta corriente con uniones temporales de empresas y comunidades de bienes',NULL,NULL,1),(4449,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','555','4441','Partidas pendientes de aplicación',NULL,NULL,1),(4450,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','556','4441','Desembolsos exigidos sobre participaciones en el patrimonio neto',NULL,NULL,1),(4451,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5563','4450','Desembolsos exigidos sobre participaciones empresas del grupo',NULL,NULL,1),(4452,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5564','4450','Desembolsos exigidos sobre participaciones empresas asociadas',NULL,NULL,1),(4453,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5565','4450','Desembolsos exigidos sobre participaciones otras partes vinculadas',NULL,NULL,1),(4454,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5566','4450','Desembolsos exigidos sobre participaciones otras empresas',NULL,NULL,1),(4455,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','557','4441','Dividendo activo a cuenta',NULL,NULL,1),(4456,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','558','4441','Socios por desembolsos exigidos',NULL,NULL,1),(4457,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5580','4456','Socios por desembolsos exigidos sobre acciones o participaciones ordinarias',NULL,NULL,1),(4458,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5585','4456','Socios por desembolsos exigidos sobre acciones o participaciones consideradas como pasivos financieros',NULL,NULL,1),(4459,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','559','4441','Derivados financieros a corto plazo',NULL,NULL,1),(4460,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5590','4459','Activos por derivados financieros a corto plazo',NULL,NULL,1),(4461,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5595','4459','Pasivos por derivados financieros a corto plazo',NULL,NULL,1),(4462,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','56','4005','Finanzas y depósitos recibidos y constituidos a corto plazo y ajustes por periodificación',NULL,NULL,1),(4463,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','560','4462','Finanzas recibidas a corto plazo',NULL,NULL,1),(4464,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','561','4462','Depósitos recibidos a corto plazo',NULL,NULL,1),(4465,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','565','4462','Finanzas constituidas a corto plazo',NULL,NULL,1),(4466,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','566','4462','Depósitos constituidos a corto plazo',NULL,NULL,1),(4467,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','567','4462','Intereses pagados por anticipado',NULL,NULL,1),(4468,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','568','4462','Intereses cobrados a corto plazo',NULL,NULL,1),(4469,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','57','4005','Tesorería',NULL,NULL,1),(4470,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','CAJA','570','4469','Caja euros',NULL,NULL,1),(4471,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','571','4469','Caja moneda extranjera',NULL,NULL,1),(4472,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','BANCOS','572','4469','Bancos e instituciones de crédito cc vista euros',NULL,NULL,1),(4473,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','573','4469','Bancos e instituciones de crédito cc vista moneda extranjera',NULL,NULL,1),(4474,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','574','4469','Bancos e instituciones de crédito cuentas de ahorro euros',NULL,NULL,1),(4475,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','575','4469','Bancos e instituciones de crédito cuentas de ahorro moneda extranjera',NULL,NULL,1),(4476,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','576','4469','Inversiones a corto plazo de gran liquidez',NULL,NULL,1),(4477,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','59','4005','Deterioro del valor de las inversiones financieras a corto plazo',NULL,NULL,1),(4478,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','593','4477','Deterioro del valor de participaciones a corto plazo en partes vinculadas',NULL,NULL,1),(4479,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5933','4478','Deterioro del valor de participaciones a corto plazo en empresas del grupo',NULL,NULL,1),(4480,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5934','4478','Deterioro del valor de participaciones a corto plazo en empresas asociadas',NULL,NULL,1),(4481,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5935','4478','Deterioro del valor de participaciones a corto plazo en otras partes vinculadas',NULL,NULL,1),(4482,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','594','4477','Deterioro del valor de valores representativos de deuda a corto plazo en partes vinculadas',NULL,NULL,1),(4483,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5943','4482','Deterioro del valor de valores representativos de deuda a corto plazo en empresas del grupo',NULL,NULL,1),(4484,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5944','4482','Deterioro del valor de valores representativos de deuda a corto plazo en empresas asociadas',NULL,NULL,1),(4485,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5945','4482','Deterioro del valor de valores representativos de deuda a corto plazo en otras partes vinculadas',NULL,NULL,1),(4486,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','595','4477','Deterioro del valor de créditos a corto plazo en partes vinculadas',NULL,NULL,1),(4487,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5953','4486','Deterioro del valor de créditos a corto plazo en empresas del grupo',NULL,NULL,1),(4488,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5954','4486','Deterioro del valor de créditos a corto plazo en empresas asociadas',NULL,NULL,1),(4489,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','5955','4486','Deterioro del valor de créditos a corto plazo en otras partes vinculadas',NULL,NULL,1),(4490,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','596','4477','Deterioro del valor de participaciones a corto plazo',NULL,NULL,1),(4491,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','597','4477','Deterioro del valor de valores representativos de deuda a corto plazo',NULL,NULL,1),(4492,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','CUENTAS_FINANCIERAS','XXXXXX','598','4477','Deterioro de valor de créditos a corto plazo',NULL,NULL,1),(4493,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','60','4006','Compras',NULL,NULL,1),(4494,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','COMPRAS','600','4493','Compras de mercaderías',NULL,NULL,1),(4495,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','COMPRAS','601','4493','Compras de materias primas',NULL,NULL,1),(4496,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','602','4493','Compras de otros aprovisionamientos',NULL,NULL,1),(4497,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','606','4493','Descuentos sobre compras por pronto pago',NULL,NULL,1),(4498,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6060','4497','Descuentos sobre compras por pronto pago de mercaderías',NULL,NULL,1),(4499,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6061','4497','Descuentos sobre compras por pronto pago de materias primas',NULL,NULL,1),(4500,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6062','4497','Descuentos sobre compras por pronto pago de otros aprovisionamientos',NULL,NULL,1),(4501,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','COMPRAS','607','4493','Trabajos realizados por otras empresas',NULL,NULL,1),(4502,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','608','4493','Devoluciones de compras y operaciones similares',NULL,NULL,1),(4503,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6080','4502','Devoluciones de compras de mercaderías',NULL,NULL,1),(4504,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6081','4502','Devoluciones de compras de materias primas',NULL,NULL,1),(4505,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6082','4502','Devoluciones de compras de otros aprovisionamientos',NULL,NULL,1),(4506,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','609','4493','Rappels por compras',NULL,NULL,1),(4507,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6090','4506','Rappels por compras de mercaderías',NULL,NULL,1),(4508,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6091','4506','Rappels por compras de materias primas',NULL,NULL,1),(4509,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6092','4506','Rappels por compras de otros aprovisionamientos',NULL,NULL,1),(4510,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','61','4006','Variación de existencias',NULL,NULL,1),(4511,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','610','4510','Variación de existencias de mercaderías',NULL,NULL,1),(4512,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','611','4510','Variación de existencias de materias primas',NULL,NULL,1),(4513,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','612','4510','Variación de existencias de otros aprovisionamientos',NULL,NULL,1),(4514,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','62','4006','Servicios exteriores',NULL,NULL,1),(4515,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','620','4514','Gastos en investigación y desarrollo del ejercicio',NULL,NULL,1),(4516,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','621','4514','Arrendamientos y cánones',NULL,NULL,1),(4517,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','622','4514','Reparaciones y conservación',NULL,NULL,1),(4518,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','623','4514','Servicios profesionales independientes',NULL,NULL,1),(4519,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','624','4514','Transportes',NULL,NULL,1),(4520,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','625','4514','Primas de seguros',NULL,NULL,1),(4521,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','626','4514','Servicios bancarios y similares',NULL,NULL,1),(4522,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','627','4514','Publicidad, propaganda y relaciones públicas',NULL,NULL,1),(4523,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','628','4514','Suministros',NULL,NULL,1),(4524,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','629','4514','Otros servicios',NULL,NULL,1),(4525,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','63','4006','Tributos',NULL,NULL,1),(4526,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','630','4525','Impuesto sobre benecifios',NULL,NULL,1),(4527,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6300','4526','Impuesto corriente',NULL,NULL,1),(4528,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6301','4526','Impuesto diferido',NULL,NULL,1),(4529,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','631','4525','Otros tributos',NULL,NULL,1),(4530,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','633','4525','Ajustes negativos en la imposición sobre beneficios',NULL,NULL,1),(4531,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','634','4525','Ajustes negativos en la imposición indirecta',NULL,NULL,1),(4532,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6341','4531','Ajustes negativos en IVA de activo corriente',NULL,NULL,1),(4533,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6342','4531','Ajustes negativos en IVA de inversiones',NULL,NULL,1),(4534,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','636','4525','Devolución de impuestos',NULL,NULL,1),(4535,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','638','4525','Ajustes positivos en la imposición sobre beneficios',NULL,NULL,1),(4536,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','639','4525','Ajustes positivos en la imposición directa',NULL,NULL,1),(4537,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6391','4536','Ajustes positivos en IVA de activo corriente',NULL,NULL,1),(4538,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6392','4536','Ajustes positivos en IVA de inversiones',NULL,NULL,1),(4539,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','64','4006','Gastos de personal',NULL,NULL,1),(4540,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','640','4539','Sueldos y salarios',NULL,NULL,1),(4541,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','641','4539','Indemnizaciones',NULL,NULL,1),(4542,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','642','4539','Seguridad social a cargo de la empresa',NULL,NULL,1),(4543,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','649','4539','Otros gastos sociales',NULL,NULL,1),(4544,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','65','4006','Otros gastos de gestión',NULL,NULL,1),(4545,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','650','4544','Pérdidas de créditos comerciales incobrables',NULL,NULL,1),(4546,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','651','4544','Resultados de operaciones en común',NULL,NULL,1),(4547,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6510','4546','Beneficio transferido gestor',NULL,NULL,1),(4548,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6511','4546','Pérdida soportada participe o asociado no gestor',NULL,NULL,1),(4549,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','659','4544','Otras pérdidas en gestión corriente',NULL,NULL,1),(4550,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','66','4006','Gastos financieros',NULL,NULL,1),(4551,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','660','4550','Gastos financieros por actualización de provisiones',NULL,NULL,1),(4552,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','661','4550','Intereses de obligaciones y bonos',NULL,NULL,1),(4553,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6610','4452','Intereses de obligaciones y bonos a largo plazo empresas del grupo',NULL,NULL,1),(4554,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6611','4452','Intereses de obligaciones y bonos a largo plazo empresas asociadas',NULL,NULL,1),(4555,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6612','4452','Intereses de obligaciones y bonos a largo plazo otras partes vinculadas',NULL,NULL,1),(4556,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6613','4452','Intereses de obligaciones y bonos a largo plazo otras empresas',NULL,NULL,1),(4557,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6615','4452','Intereses de obligaciones y bonos a corto plazo empresas del grupo',NULL,NULL,1),(4558,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6616','4452','Intereses de obligaciones y bonos a corto plazo empresas asociadas',NULL,NULL,1),(4559,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6617','4452','Intereses de obligaciones y bonos a corto plazo otras partes vinculadas',NULL,NULL,1),(4560,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6618','4452','Intereses de obligaciones y bonos a corto plazo otras empresas',NULL,NULL,1),(4561,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','662','4550','Intereses de deudas',NULL,NULL,1),(4562,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6620','4561','Intereses de deudas empresas del grupo',NULL,NULL,1),(4563,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6621','4561','Intereses de deudas empresas asociadas',NULL,NULL,1),(4564,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6622','4561','Intereses de deudas otras partes vinculadas',NULL,NULL,1),(4565,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6623','4561','Intereses de deudas con entidades de crédito',NULL,NULL,1),(4566,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6624','4561','Intereses de deudas otras empresas',NULL,NULL,1),(4567,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','663','4550','Pérdidas por valorización de activos y pasivos financieros por su valor razonable',NULL,NULL,1),(4568,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','664','4550','Gastos por dividendos de acciones o participaciones consideradas como pasivos financieros',NULL,NULL,1),(4569,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6640','4568','Dividendos de pasivos empresas del grupo',NULL,NULL,1),(4570,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6641','4568','Dividendos de pasivos empresas asociadas',NULL,NULL,1),(4571,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6642','4568','Dividendos de pasivos otras partes vinculadas',NULL,NULL,1),(4572,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6643','4568','Dividendos de pasivos otras empresas',NULL,NULL,1),(4573,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','665','4550','Intereses por descuento de efectos y operaciones de factoring',NULL,NULL,1),(4574,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6650','4573','Intereses por descuento de efectos en entidades de crédito del grupo',NULL,NULL,1),(4575,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6651','4573','Intereses por descuento de efectos en entidades de crédito asociadas',NULL,NULL,1),(4576,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6652','4573','Intereses por descuento de efectos en entidades de crédito vinculadas',NULL,NULL,1),(4577,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6653','4573','Intereses por descuento de efectos en otras entidades de crédito',NULL,NULL,1),(4578,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6654','4573','Intereses por operaciones de factoring con entidades de crédito del grupo',NULL,NULL,1),(4579,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6655','4573','Intereses por operaciones de factoring con entidades de crédito asociadas',NULL,NULL,1),(4580,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6656','4573','Intereses por operaciones de factoring con otras entidades de crédito vinculadas',NULL,NULL,1),(4581,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6657','4573','Intereses por operaciones de factoring con otras entidades de crédito',NULL,NULL,1),(4582,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','666','4550','Pérdidas en participaciones y valores representativos de deuda',NULL,NULL,1),(4583,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6660','4582','Pérdidas en valores representativos de deuda a largo plazo empresas del grupo',NULL,NULL,1),(4584,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6661','4582','Pérdidas en valores representativos de deuda a largo plazo empresas asociadas',NULL,NULL,1),(4585,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6662','4582','Pérdidas en valores representativos de deuda a largo plazo otras partes vinculadas',NULL,NULL,1),(4586,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6663','4582','Pérdidas en participaciones y valores representativos de deuda a largo plazo otras empresas',NULL,NULL,1),(4587,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6665','4582','Pérdidas en participaciones y valores representativos de deuda a corto plazo empresas del grupo',NULL,NULL,1),(4588,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6666','4582','Pérdidas en participaciones y valores representativos de deuda a corto plazo empresas asociadas',NULL,NULL,1),(4589,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6667','4582','Pérdidas en valores representativos de deuda a corto plazo otras partes vinculadas',NULL,NULL,1),(4590,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6668','4582','Pérdidas en valores representativos de deuda a corto plazo otras empresas',NULL,NULL,1),(4591,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','667','4550','Pérdidas de créditos no comerciales',NULL,NULL,1),(4592,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6670','4591','Pérdidas de créditos a largo plazo empresas del grupo',NULL,NULL,1),(4593,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6671','4591','Pérdidas de créditos a largo plazo empresas asociadas',NULL,NULL,1),(4594,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6672','4591','Pérdidas de créditos a largo plazo otras partes vinculadas',NULL,NULL,1),(4595,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6673','4591','Pérdidas de créditos a largo plazo otras empresas',NULL,NULL,1),(4596,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6675','4591','Pérdidas de créditos a corto plazo empresas del grupo',NULL,NULL,1),(4597,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6676','4591','Pérdidas de créditos a corto plazo empresas asociadas',NULL,NULL,1),(4598,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6677','4591','Pérdidas de créditos a corto plazo otras partes vinculadas',NULL,NULL,1),(4599,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6678','4591','Pérdidas de créditos a corto plazo otras empresas',NULL,NULL,1),(4600,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','668','4550','Diferencias negativas de cambio',NULL,NULL,1),(4601,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','669','4550','Otros gastos financieros',NULL,NULL,1),(4602,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','67','4006','Pérdidas procedentes de activos no corrientes y gastos excepcionales',NULL,NULL,1),(4603,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','670','4602','Pérdidas procedentes del inmovilizado intangible',NULL,NULL,1),(4604,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','671','4602','Pérdidas procedentes del inmovilizado material',NULL,NULL,1),(4605,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','672','4602','Pérdidas procedentes de las inversiones inmobiliarias',NULL,NULL,1),(4607,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','673','4602','Pérdidas procedentes de participaciones a largo plazo en partes vinculadas',NULL,NULL,1),(4608,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6733','4607','Pérdidas procedentes de participaciones a largo plazo empresas del grupo',NULL,NULL,1),(4609,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6734','4607','Pérdidas procedentes de participaciones a largo plazo empresas asociadas',NULL,NULL,1),(4610,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6735','4607','Pérdidas procedentes de participaciones a largo plazo otras partes vinculadas',NULL,NULL,1),(4611,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','675','4602','Pérdidas por operaciones con obligaciones propias',NULL,NULL,1),(4612,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','678','4602','Gastos excepcionales',NULL,NULL,1),(4613,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','68','4006','Dotaciones para amortizaciones',NULL,NULL,1),(4614,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','680','4613','Amortización del inmovilizado intangible',NULL,NULL,1),(4615,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','681','4613','Amortización del inmovilizado material',NULL,NULL,1),(4616,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','682','4613','Amortización de las inversiones inmobiliarias',NULL,NULL,1),(4617,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','69','4006','Pérdidas por deterioro y otras dotaciones',NULL,NULL,1),(4618,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','690','4617','Pérdidas por deterioro del inmovilizado intangible',NULL,NULL,1),(4619,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','691','4617','Pérdidas por deterioro del inmovilizado material',NULL,NULL,1),(4620,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','692','4617','Pérdidas por deterioro de las inversiones inmobiliarias',NULL,NULL,1),(4621,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','693','4617','Pérdidas por deterioro de existencias',NULL,NULL,1),(4622,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6930','4621','Pérdidas por deterioro de productos terminados y en curso de fabricación',NULL,NULL,1),(4623,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6931','4621','Pérdidas por deterioro de mercaderías',NULL,NULL,1),(4624,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6932','4621','Pérdidas por deterioro de materias primas',NULL,NULL,1),(4625,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6933','4621','Pérdidas por deterioro de otros aprovisionamientos',NULL,NULL,1),(4626,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','694','4617','Pérdidas por deterioro de créditos por operaciones comerciales',NULL,NULL,1),(4627,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','695','4617','Dotación a la provisión por operaciones comerciales',NULL,NULL,1),(4628,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6954','4627','Dotación a la provisión por contratos onerosos',NULL,NULL,1),(4629,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6959','4628','Dotación a la provisión para otras operaciones comerciales',NULL,NULL,1),(4630,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','696','4617','Pérdidas por deterioro de participaciones y valores representativos de deuda a largo plazo',NULL,NULL,1),(4631,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6960','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas del grupo',NULL,NULL,1),(4632,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6961','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas asociadas',NULL,NULL,1),(4633,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6962','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras partes vinculadas',NULL,NULL,1),(4634,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6963','4630','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras empresas',NULL,NULL,1),(4635,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6965','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo empresas del grupo',NULL,NULL,1),(4636,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6966','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo empresas asociadas',NULL,NULL,1),(4637,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6967','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo otras partes vinculadas',NULL,NULL,1),(4638,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6968','4630','Pérdidas por deterioro en valores representativos de deuda a largo plazo otras empresas',NULL,NULL,1),(4639,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','697','4617','Pérdidas por deterioro de créditos a largo plazo',NULL,NULL,1),(4640,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6970','4639','Pérdidas por deterioro de créditos a largo plazo empresas del grupo',NULL,NULL,1),(4641,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6971','4639','Pérdidas por deterioro de créditos a largo plazo empresas asociadas',NULL,NULL,1),(4642,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6972','4639','Pérdidas por deterioro de créditos a largo plazo otras partes vinculadas',NULL,NULL,1),(4643,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6973','4639','Pérdidas por deterioro de créditos a largo plazo otras empresas',NULL,NULL,1),(4644,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','698','4617','Pérdidas por deterioro de participaciones y valores representativos de deuda a corto plazo',NULL,NULL,1),(4645,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6980','4644','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas del grupo',NULL,NULL,1),(4646,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6981','4644','Pérdidas por deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas asociadas',NULL,NULL,1),(4647,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6985','4644','Pérdidas por deterioro en valores representativos de deuda a corto plazo empresas del grupo',NULL,NULL,1),(4648,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6986','4644','Pérdidas por deterioro en valores representativos de deuda a corto plazo empresas asociadas',NULL,NULL,1),(4649,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6988','4644','Pérdidas por deterioro en valores representativos de deuda a corto plazo de otras empresas',NULL,NULL,1),(4650,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','699','4617','Pérdidas por deterioro de crédito a corto plazo',NULL,NULL,1),(4651,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6990','4650','Pérdidas por deterioro de crédito a corto plazo empresas del grupo',NULL,NULL,1),(4652,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6991','4650','Pérdidas por deterioro de crédito a corto plazo empresas asociadas',NULL,NULL,1),(4653,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6992','4650','Pérdidas por deterioro de crédito a corto plazo otras partes vinculadas',NULL,NULL,1),(4654,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','COMPRAS_GASTOS','XXXXXX','6993','4650','Pérdidas por deterioro de crédito a corto plazo otras empresas',NULL,NULL,1),(4655,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','70','4007','Ventas',NULL,NULL,1),(4656,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','VENTAS','700','4655','Ventas de mercaderías',NULL,NULL,1),(4657,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','VENTAS','701','4655','Ventas de productos terminados',NULL,NULL,1),(4658,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','702','4655','Ventas de productos semiterminados',NULL,NULL,1),(4659,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','703','4655','Ventas de subproductos y residuos',NULL,NULL,1),(4660,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','704','4655','Ventas de envases y embalajes',NULL,NULL,1),(4661,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','VENTAS','705','4655','Prestaciones de servicios',NULL,NULL,1),(4662,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','706','4655','Descuentos sobre ventas por pronto pago',NULL,NULL,1),(4663,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7060','4662','Descuentos sobre ventas por pronto pago de mercaderías',NULL,NULL,1),(4664,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7061','4662','Descuentos sobre ventas por pronto pago de productos terminados',NULL,NULL,1),(4665,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7062','4662','Descuentos sobre ventas por pronto pago de productos semiterminados',NULL,NULL,1),(4666,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7063','4662','Descuentos sobre ventas por pronto pago de subproductos y residuos',NULL,NULL,1),(4667,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','708','4655','Devoluciones de ventas y operacioes similares',NULL,NULL,1),(4668,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7080','4667','Devoluciones de ventas de mercaderías',NULL,NULL,1),(4669,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7081','4667','Devoluciones de ventas de productos terminados',NULL,NULL,1),(4670,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7082','4667','Devoluciones de ventas de productos semiterminados',NULL,NULL,1),(4671,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7083','4667','Devoluciones de ventas de subproductos y residuos',NULL,NULL,1),(4672,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7084','4667','Devoluciones de ventas de envases y embalajes',NULL,NULL,1),(4673,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','71','4007','Variación de existencias',NULL,NULL,1),(4674,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','710','4673','Variación de existencias de productos en curso',NULL,NULL,1),(4675,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','711','4673','Variación de existencias de productos semiterminados',NULL,NULL,1),(4676,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','712','4673','Variación de existencias de productos terminados',NULL,NULL,1),(4677,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','713','4673','Variación de existencias de subproductos, residuos y materiales recuperados',NULL,NULL,1),(4678,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','73','4007','Trabajos realizados para la empresa',NULL,NULL,1),(4679,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','730','4678','Trabajos realizados para el inmovilizado intangible',NULL,NULL,1),(4680,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','731','4678','Trabajos realizados para el inmovilizado tangible',NULL,NULL,1),(4681,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','732','4678','Trabajos realizados en inversiones inmobiliarias',NULL,NULL,1),(4682,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','733','4678','Trabajos realizados para el inmovilizado material en curso',NULL,NULL,1),(4683,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','74','4007','Subvenciones, donaciones y legados',NULL,NULL,1),(4684,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','740','4683','Subvenciones, donaciones y legados a la explotación',NULL,NULL,1),(4685,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','746','4683','Subvenciones, donaciones y legados de capital transferidos al resultado del ejercicio',NULL,NULL,1),(4686,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','747','4683','Otras subvenciones, donaciones y legados transferidos al resultado del ejercicio',NULL,NULL,1),(4687,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','75','4007','Otros ingresos de gestión',NULL,NULL,1),(4688,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','751','4687','Resultados de operaciones en común',NULL,NULL,1),(4689,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7510','4688','Pérdida transferida gestor',NULL,NULL,1),(4690,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7511','4688','Beneficio atribuido participe o asociado no gestor',NULL,NULL,1),(4691,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','752','4687','Ingreso por arrendamiento',NULL,NULL,1),(4692,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','753','4687','Ingresos de propiedad industrial cedida en explotación',NULL,NULL,1),(4693,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','754','4687','Ingresos por comisiones',NULL,NULL,1),(4694,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','755','4687','Ingresos por servicios al personal',NULL,NULL,1),(4695,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','759','4687','Ingresos por servicios diversos',NULL,NULL,1),(4696,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76','4007','Ingresos financieros',NULL,NULL,1),(4697,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','760','4696','Ingresos de participaciones en instrumentos de patrimonio',NULL,NULL,1),(4698,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7600','4697','Ingresos de participaciones en instrumentos de patrimonio empresas del grupo',NULL,NULL,1),(4699,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7601','4697','Ingresos de participaciones en instrumentos de patrimonio empresas asociadas',NULL,NULL,1),(4700,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7602','4697','Ingresos de participaciones en instrumentos de patrimonio otras partes asociadas',NULL,NULL,1),(4701,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7603','4697','Ingresos de participaciones en instrumentos de patrimonio otras empresas',NULL,NULL,1),(4702,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','761','4696','Ingresos de valores representativos de deuda',NULL,NULL,1),(4703,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7610','4702','Ingresos de valores representativos de deuda empresas del grupo',NULL,NULL,1),(4704,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7611','4702','Ingresos de valores representativos de deuda empresas asociadas',NULL,NULL,1),(4705,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7612','4702','Ingresos de valores representativos de deuda otras partes asociadas',NULL,NULL,1),(4706,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7613','4702','Ingresos de valores representativos de deuda otras empresas',NULL,NULL,1),(4707,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','762','4696','Ingresos de créditos',NULL,NULL,1),(4708,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7620','4707','Ingresos de créditos a largo plazo',NULL,NULL,1),(4709,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76200','4708','Ingresos de crédito a largo plazo empresas del grupo',NULL,NULL,1),(4710,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76201','4708','Ingresos de crédito a largo plazo empresas asociadas',NULL,NULL,1),(4711,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76202','4708','Ingresos de crédito a largo plazo otras partes asociadas',NULL,NULL,1),(4712,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76203','4708','Ingresos de crédito a largo plazo otras empresas',NULL,NULL,1),(4713,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7621','4707','Ingresos de créditos a corto plazo',NULL,NULL,1),(4714,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76210','4713','Ingresos de crédito a corto plazo empresas del grupo',NULL,NULL,1),(4715,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76211','4713','Ingresos de crédito a corto plazo empresas asociadas',NULL,NULL,1),(4716,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76212','4713','Ingresos de crédito a corto plazo otras partes asociadas',NULL,NULL,1),(4717,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','76213','4713','Ingresos de crédito a corto plazo otras empresas',NULL,NULL,1),(4718,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','763','4696','Beneficios por valorización de activos y pasivos financieros por su valor razonable',NULL,NULL,1),(4719,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','766','4696','Beneficios en participaciones y valores representativos de deuda',NULL,NULL,1),(4720,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7660','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo empresas del grupo',NULL,NULL,1),(4721,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7661','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo empresas asociadas',NULL,NULL,1),(4722,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7662','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo otras partes asociadas',NULL,NULL,1),(4723,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7663','4719','Beneficios en participaciones y valores representativos de deuda a largo plazo otras empresas',NULL,NULL,1),(4724,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7665','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo empresas del grupo',NULL,NULL,1),(4725,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7666','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo empresas asociadas',NULL,NULL,1),(4726,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7667','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo otras partes asociadas',NULL,NULL,1),(4727,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7668','4719','Beneficios en participaciones y valores representativos de deuda a corto plazo otras empresas',NULL,NULL,1),(4728,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','768','4696','Diferencias positivas de cambio',NULL,NULL,1),(4729,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','769','4696','Otros ingresos financieros',NULL,NULL,1),(4730,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','77','4007','Beneficios procedentes de activos no corrientes e ingresos excepcionales',NULL,NULL,1),(4731,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','770','4730','Beneficios procedentes del inmovilizado intangible',NULL,NULL,1),(4732,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','771','4730','Beneficios procedentes del inmovilizado material',NULL,NULL,1),(4733,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','772','4730','Beneficios procedentes de las inversiones inmobiliarias',NULL,NULL,1),(4734,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','773','4730','Beneficios procedentes de participaciones a largo plazo en partes vinculadas',NULL,NULL,1),(4735,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7733','4734','Beneficios procedentes de participaciones a largo plazo empresas del grupo',NULL,NULL,1),(4736,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7734','4734','Beneficios procedentes de participaciones a largo plazo empresas asociadas',NULL,NULL,1),(4737,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7735','4734','Beneficios procedentes de participaciones a largo plazo otras partes vinculadas',NULL,NULL,1),(4738,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','775','4730','Beneficios por operaciones con obligaciones propias',NULL,NULL,1),(4739,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','778','4730','Ingresos excepcionales',NULL,NULL,1),(4741,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','79','4007','Excesos y aplicaciones de provisiones y pérdidas por deterioro',NULL,NULL,1),(4742,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','790','4741','Revisión del deterioro del inmovilizado intangible',NULL,NULL,1),(4743,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','791','4741','Revisión del deterioro del inmovilizado material',NULL,NULL,1),(4744,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','792','4741','Revisión del deterioro de las inversiones inmobiliarias',NULL,NULL,1),(4745,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','793','4741','Revisión del deterioro de las existencias',NULL,NULL,1),(4746,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7930','4745','Revisión del deterioro de productos terminados y en curso de fabricación',NULL,NULL,1),(4747,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7931','4745','Revisión del deterioro de mercaderías',NULL,NULL,1),(4748,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7932','4745','Revisión del deterioro de materias primas',NULL,NULL,1),(4749,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7933','4745','Revisión del deterioro de otros aprovisionamientos',NULL,NULL,1),(4750,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','794','4741','Revisión del deterioro de créditos por operaciones comerciales',NULL,NULL,1),(4751,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','795','4741','Exceso de provisiones',NULL,NULL,1),(4752,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7951','4751','Exceso de provisión para impuestos',NULL,NULL,1),(4753,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7952','4751','Exceso de provisión para otras responsabilidades',NULL,NULL,1),(4755,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7954','4751','Exceso de provisión para operaciones comerciales',NULL,NULL,1),(4756,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','79544','4755','Exceso de provisión por contratos onerosos',NULL,NULL,1),(4757,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','79549','4755','Exceso de provisión para otras operaciones comerciales',NULL,NULL,1),(4758,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7955','4751','Exceso de provisión para actuaciones medioambienteales',NULL,NULL,1),(4759,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','796','4741','Revisión del deterioro de participaciones y valores representativos de deuda a largo plazo',NULL,NULL,1),(4760,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7960','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas del grupo',NULL,NULL,1),(4761,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7961','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo empresas asociadas',NULL,NULL,1),(4762,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7962','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras partes vinculadas',NULL,NULL,1),(4763,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7963','4759','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo otras empresas',NULL,NULL,1),(4764,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7965','4759','Revisión del deterioro de valores representativos a largo plazo empresas del grupo',NULL,NULL,1),(4765,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7966','4759','Revisión del deterioro de valores representativos a largo plazo empresas asociadas',NULL,NULL,1),(4766,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7967','4759','Revisión del deterioro de valores representativos a largo otras partes vinculadas',NULL,NULL,1),(4767,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7968','4759','Revisión del deterioro de valores representativos a largo plazo otras empresas',NULL,NULL,1),(4768,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','797','4741','Revisión del deterioro de créditos a largo plazo',NULL,NULL,1),(4769,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7970','4768','Revisión del deterioro de créditos a largo plazo empresas del grupo',NULL,NULL,1),(4770,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7971','4768','Revisión del deterioro de créditos a largo plazo empresas asociadas',NULL,NULL,1),(4771,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7972','4768','Revisión del deterioro de créditos a largo plazo otras partes vinculadas',NULL,NULL,1),(4772,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7973','4768','Revisión del deterioro de créditos a largo plazo otras empresas',NULL,NULL,1),(4773,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','798','4741','Revisión del deterioro de participaciones y valores representativos de deuda a corto plazo',NULL,NULL,1),(4774,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7980','4773','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas del grupo',NULL,NULL,1),(4775,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7981','4773','Revisión del deterioro de participaciones en instrumentos de patrimonio neto a corto plazo empresas asociadas',NULL,NULL,1),(4776,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7985','4773','Revisión del deterioro de valores representativos de deuda a corto plazo empresas del grupo',NULL,NULL,1),(4777,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7986','4773','Revisión del deterioro de valores representativos de deuda a corto plazo empresas asociadas',NULL,NULL,1),(4778,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7987','4773','Revisión del deterioro de valores representativos de deuda a corto plazo otras partes vinculadas',NULL,NULL,1),(4779,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7988','4773','Revisión del deterioro de valores representativos de deuda a corto plazo otras empresas',NULL,NULL,1),(4780,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','799','4741','Revisión del deterioro de créditos a corto plazo',NULL,NULL,1),(4781,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7990','4780','Revisión del deterioro de créditos a corto plazo empresas del grupo',NULL,NULL,1),(4782,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7991','4780','Revisión del deterioro de créditos a corto plazo empresas asociadas',NULL,NULL,1),(4783,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7992','4780','Revisión del deterioro de créditos a corto plazo otras partes vinculadas',NULL,NULL,1),(4784,1,NULL,'2016-01-22 17:28:16','PCG08-PYME','VENTAS_E_INGRESOS','XXXXXX','7993','4780','Revisión del deterioro de créditos a corto plazo otras empresas',NULL,NULL,1); /*!40000 ALTER TABLE `llx_accountingaccount` ENABLE KEYS */; UNLOCK TABLES; @@ -251,8 +251,9 @@ CREATE TABLE `llx_actioncomm` ( PRIMARY KEY (`id`), KEY `idx_actioncomm_fk_soc` (`fk_soc`), KEY `idx_actioncomm_fk_contact` (`fk_contact`), - KEY `idx_actioncomm_fk_element` (`fk_element`) -) ENGINE=InnoDB AUTO_INCREMENT=232 DEFAULT CHARSET=utf8; + KEY `idx_actioncomm_fk_element` (`fk_element`), + KEY `idx_actioncomm_code` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=234 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -261,7 +262,7 @@ CREATE TABLE `llx_actioncomm` ( LOCK TABLES `llx_actioncomm` WRITE; /*!40000 ALTER TABLE `llx_actioncomm` DISABLE KEYS */; -INSERT INTO `llx_actioncomm` VALUES (1,NULL,1,'2010-07-08 14:21:44','2010-07-08 14:21:44',50,NULL,'Company AAA and Co added into Dolibarr','2010-07-08 14:21:44','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company AAA and Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,NULL,1,'2010-07-08 14:23:48','2010-07-08 14:23:48',50,NULL,'Company Belin SARL added into Dolibarr','2010-07-08 14:23:48','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Belin SARL added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,NULL,1,'2010-07-08 22:42:12','2010-07-08 22:42:12',50,NULL,'Company Spanish Comp added into Dolibarr','2010-07-08 22:42:12','2014-12-21 12:50:33',1,NULL,NULL,3,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Spanish Comp added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,NULL,1,'2010-07-08 22:48:18','2010-07-08 22:48:18',50,NULL,'Company Prospector Vaalen added into Dolibarr','2010-07-08 22:48:18','2014-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Prospector Vaalen added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,NULL,1,'2010-07-08 23:22:57','2010-07-08 23:22:57',50,NULL,'Company NoCountry Co added into Dolibarr','2010-07-08 23:22:57','2014-12-21 12:50:33',1,NULL,NULL,5,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company NoCountry Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(6,NULL,1,'2010-07-09 00:15:09','2010-07-09 00:15:09',50,NULL,'Company Swiss customer added into Dolibarr','2010-07-09 00:15:09','2014-12-21 12:50:33',1,NULL,NULL,6,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Swiss customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(7,NULL,1,'2010-07-09 01:24:26','2010-07-09 01:24:26',50,NULL,'Company Generic customer added into Dolibarr','2010-07-09 01:24:26','2014-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Generic customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(8,NULL,1,'2010-07-10 14:54:27','2010-07-10 14:54:27',50,NULL,'Société Client salon ajoutée dans Dolibarr','2010-07-10 14:54:27','2014-12-21 12:50:33',1,NULL,NULL,8,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Client salon ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(9,NULL,1,'2010-07-10 14:54:44','2010-07-10 14:54:44',50,NULL,'Société Client salon invidivdu ajoutée dans Doliba','2010-07-10 14:54:44','2014-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Client salon invidivdu ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,NULL,1,'2010-07-10 14:56:10','2010-07-10 14:56:10',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2010-07-10 14:56:10','2014-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,NULL,1,'2010-07-10 14:58:53','2010-07-10 14:58:53',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2010-07-10 14:58:53','2014-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,NULL,1,'2010-07-10 15:00:55','2010-07-10 15:00:55',50,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr','2010-07-10 15:00:55','2014-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,NULL,1,'2010-07-10 15:13:08','2010-07-10 15:13:08',50,NULL,'Société Smith Vick ajoutée dans Dolibarr','2010-07-10 15:13:08','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Smith Vick ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,NULL,1,'2010-07-10 15:21:00','2010-07-10 16:21:00',5,NULL,'RDV avec mon chef','2010-07-10 15:21:48','2010-07-10 13:21:48',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,1,0,'',3600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(15,NULL,1,'2010-07-10 18:18:16','2010-07-10 18:18:16',50,NULL,'Contrat CONTRAT1 validé dans Dolibarr','2010-07-10 18:18:16','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Contrat CONTRAT1 validé dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,NULL,1,'2010-07-10 18:35:57','2010-07-10 18:35:57',50,NULL,'Société Mon client ajoutée dans Dolibarr','2010-07-10 18:35:57','2014-12-21 12:50:33',1,NULL,NULL,11,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Mon client ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,NULL,1,'2010-07-11 16:18:08','2010-07-11 16:18:08',50,NULL,'Société Dupont Alain ajoutée dans Dolibarr','2010-07-11 16:18:08','2014-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Dupont Alain ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,NULL,1,'2010-07-11 17:11:00','2010-07-11 17:17:00',5,NULL,'Rendez-vous','2010-07-11 17:11:22','2010-07-11 15:11:22',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,1,0,'gfgdfgdf',360,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(19,NULL,1,'2010-07-11 17:13:20','2010-07-11 17:13:20',50,NULL,'Société Vendeur de chips ajoutée dans Dolibarr','2010-07-11 17:13:20','2014-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Vendeur de chips ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(20,NULL,1,'2010-07-11 17:15:42','2010-07-11 17:15:42',50,NULL,'Commande CF1007-0001 validée','2010-07-11 17:15:42','2014-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Commande CF1007-0001 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(21,NULL,1,'2010-07-11 18:47:33','2010-07-11 18:47:33',50,NULL,'Commande CF1007-0002 validée','2010-07-11 18:47:33','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Commande CF1007-0002 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(22,NULL,1,'2010-07-18 11:36:18','2010-07-18 11:36:18',50,NULL,'Proposition PR1007-0003 validée','2010-07-18 11:36:18','2014-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Proposition PR1007-0003 validée\nAuteur: admin',3,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(23,NULL,1,'2011-07-18 20:49:58','2011-07-18 20:49:58',50,NULL,'Invoice FA1007-0002 validated in Dolibarr','2011-07-18 20:49:58','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1007-0002 validated in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(24,NULL,1,'2011-07-28 01:37:00',NULL,1,NULL,'Phone call','2011-07-28 01:37:48','2011-07-27 23:37:48',1,NULL,NULL,NULL,2,0,1,NULL,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(25,NULL,1,'2011-08-01 02:31:24','2011-08-01 02:31:24',50,NULL,'Company mmm added into Dolibarr','2011-08-01 02:31:24','2014-12-21 12:50:33',1,NULL,NULL,15,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company mmm added into Dolibarr\nAuthor: admin',15,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(26,NULL,1,'2011-08-01 02:31:43','2011-08-01 02:31:43',50,NULL,'Company ppp added into Dolibarr','2011-08-01 02:31:43','2014-12-21 12:50:33',1,NULL,NULL,16,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company ppp added into Dolibarr\nAuthor: admin',16,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(27,NULL,1,'2011-08-01 02:41:26','2011-08-01 02:41:26',50,NULL,'Company aaa added into Dolibarr','2011-08-01 02:41:26','2014-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company aaa added into Dolibarr\nAuthor: admin',17,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(28,NULL,1,'2011-08-01 03:34:11','2011-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2011-08-01 03:34:11','2014-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0003 validated in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(29,NULL,1,'2011-08-01 03:34:11','2011-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2011-08-01 03:34:11','2014-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0003 changed to paid in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(30,NULL,1,'2011-08-06 20:33:54','2011-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2011-08-06 20:33:54','2014-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0004 validated in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(31,NULL,1,'2011-08-06 20:33:54','2011-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2011-08-06 20:33:54','2014-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0004 changed to paid in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(38,NULL,1,'2011-08-08 02:41:55','2011-08-08 02:41:55',50,NULL,'Invoice FA1108-0005 validated in Dolibarr','2011-08-08 02:41:55','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0005 validated in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(40,NULL,1,'2011-08-08 02:53:40','2011-08-08 02:53:40',50,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr','2011-08-08 02:53:40','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(41,NULL,1,'2011-08-08 02:54:05','2011-08-08 02:54:05',50,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr','2011-08-08 02:54:05','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(42,NULL,1,'2011-08-08 02:55:04','2011-08-08 02:55:04',50,NULL,'Invoice FA1107-0006 validated in Dolibarr','2011-08-08 02:55:04','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1107-0006 validated in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(43,NULL,1,'2011-08-08 02:55:26','2011-08-08 02:55:26',50,NULL,'Invoice FA1108-0007 validated in Dolibarr','2011-08-08 02:55:26','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0007 validated in Dolibarr\nAuthor: admin',9,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(44,NULL,1,'2011-08-08 02:55:58','2011-08-08 02:55:58',50,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr','2011-08-08 02:55:58','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(45,NULL,1,'2011-08-08 03:04:22','2011-08-08 03:04:22',50,NULL,'Order CO1108-0001 validated','2011-08-08 03:04:22','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CO1108-0001 validated\nAuthor: admin',5,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(46,NULL,1,'2011-08-08 13:59:09','2011-08-08 13:59:09',50,NULL,'Order CO1107-0002 validated','2011-08-08 13:59:10','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CO1107-0002 validated\nAuthor: admin',1,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(47,NULL,1,'2011-08-08 14:24:18','2011-08-08 14:24:18',50,NULL,'Proposal PR1007-0001 validated','2011-08-08 14:24:18','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposal PR1007-0001 validated\nAuthor: admin',1,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(48,NULL,1,'2011-08-08 14:24:24','2011-08-08 14:24:24',50,NULL,'Proposal PR1108-0004 validated','2011-08-08 14:24:24','2014-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposal PR1108-0004 validated\nAuthor: admin',4,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(49,NULL,1,'2011-08-08 15:04:37','2011-08-08 15:04:37',50,NULL,'Order CF1108-0003 validated','2011-08-08 15:04:37','2014-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CF1108-0003 validated\nAuthor: admin',6,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(50,NULL,1,'2012-12-08 17:56:47','2012-12-08 17:56:47',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2012-12-08 17:56:47','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(51,NULL,1,'2012-12-08 17:57:11','2012-12-08 17:57:11',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2012-12-08 17:57:11','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(52,NULL,1,'2012-12-08 17:58:27','2012-12-08 17:58:27',40,NULL,'Facture FA1212-0008 validée dans Dolibarr','2012-12-08 17:58:27','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0008 validée dans Dolibarr\nAuteur: admin',11,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(53,NULL,1,'2012-12-08 18:20:49','2012-12-08 18:20:49',40,NULL,'Facture AV1212-0002 validée dans Dolibarr','2012-12-08 18:20:49','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0002 validée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(54,NULL,1,'2012-12-09 18:35:07','2012-12-09 18:35:07',40,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr','2012-12-09 18:35:07','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(55,NULL,1,'2012-12-09 20:14:42','2012-12-09 20:14:42',40,NULL,'Société doe john ajoutée dans Dolibarr','2012-12-09 20:14:42','2014-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Société doe john ajoutée dans Dolibarr\nAuteur: admin',18,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(56,NULL,1,'2012-12-12 18:54:19','2012-12-12 18:54:19',40,NULL,'Facture FA1212-0009 validée dans Dolibarr','2012-12-12 18:54:19','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0009 validée dans Dolibarr\nAuteur: admin',55,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(121,NULL,1,'2012-12-06 10:00:00',NULL,50,NULL,'aaab','2012-12-21 17:48:08','2012-12-21 16:54:07',3,1,NULL,NULL,NULL,0,3,NULL,NULL,1,0,1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(122,NULL,1,'2012-12-21 18:09:52','2012-12-21 18:09:52',40,NULL,'Facture client FA1007-0001 envoyée par EMail','2012-12-21 18:09:52','2014-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Mail envoyé par Firstname SuperAdminName à laurent@destailleur.fr.\nSujet du mail: Envoi facture FA1007-0001\nCorps du mail:\nVeuillez trouver ci-joint la facture FA1007-0001\r\n\r\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\r\n\r\nhttp://localhost/dolibarrnew/public/paypal/newpayment.php?source=invoice&ref=FA1007-0001&securekey=50c82fab36bb3b6aa83e2a50691803b2\r\n\r\nCordialement',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(123,NULL,1,'2013-01-06 13:13:57','2013-01-06 13:13:57',40,NULL,'Facture 16 validée dans Dolibarr','2013-01-06 13:13:57','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture 16 validée dans Dolibarr\nAuteur: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(124,NULL,1,'2013-01-12 12:23:05','2013-01-12 12:23:05',40,NULL,'Patient aaa ajouté','2013-01-12 12:23:05','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient aaa ajouté\nAuteur: admin',19,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(125,NULL,1,'2013-01-12 12:52:20','2013-01-12 12:52:20',40,NULL,'Patient pppoo ajouté','2013-01-12 12:52:20','2014-12-21 12:50:33',1,NULL,NULL,20,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient pppoo ajouté\nAuteur: admin',20,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(127,NULL,1,'2013-01-19 18:22:48','2013-01-19 18:22:48',40,NULL,'Facture FS1301-0001 validée dans Dolibarr','2013-01-19 18:22:48','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0001 validée dans Dolibarr\nAuteur: admin',148,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(128,NULL,1,'2013-01-19 18:31:10','2013-01-19 18:31:10',40,NULL,'Facture FA6801-0010 validée dans Dolibarr','2013-01-19 18:31:10','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA6801-0010 validée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(129,NULL,1,'2013-01-19 18:31:10','2013-01-19 18:31:10',40,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr','2013-01-19 18:31:10','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(130,NULL,1,'2013-01-19 18:31:58','2013-01-19 18:31:58',40,NULL,'Facture FS1301-0002 validée dans Dolibarr','2013-01-19 18:31:58','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0002 validée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(131,NULL,1,'2013-01-19 18:31:58','2013-01-19 18:31:58',40,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr','2013-01-19 18:31:58','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(132,NULL,1,'2013-01-23 15:07:54','2013-01-23 15:07:54',50,NULL,'Consultation 24 saisie (aaa)','2013-01-23 15:07:54','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Consultation 24 saisie (aaa)\nAuteur: admin',24,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(133,NULL,1,'2013-01-23 16:56:58','2013-01-23 16:56:58',40,NULL,'Patient pa ajouté','2013-01-23 16:56:58','2014-12-21 12:50:33',1,NULL,NULL,21,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient pa ajouté\nAuteur: admin',21,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(134,NULL,1,'2013-01-23 17:34:00',NULL,50,NULL,'bbcv','2013-01-23 17:35:21','2013-01-23 16:35:21',1,NULL,1,2,NULL,0,1,NULL,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(135,NULL,1,'2013-02-12 15:54:00','2013-02-12 15:54:00',40,NULL,'Facture FA1212-0011 validée dans Dolibarr','2013-02-12 15:54:37','2014-12-21 12:50:33',1,1,NULL,7,NULL,0,1,NULL,1,0,0,1,50,NULL,NULL,NULL,'Facture FA1212-0011 validée dans Dolibarr
\r\nAuteur: admin',13,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(136,NULL,1,'2013-02-12 17:06:51','2013-02-12 17:06:51',40,NULL,'Commande CO1107-0003 validée','2013-02-12 17:06:51','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1107-0003 validée\nAuteur: admin',2,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(137,NULL,1,'2013-02-17 16:22:10','2013-02-17 16:22:10',40,NULL,'Proposition PR1302-0009 validée','2013-02-17 16:22:10','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition PR1302-0009 validée\nAuteur: admin',9,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(138,NULL,1,'2013-02-17 16:27:00','2013-02-17 16:27:00',40,NULL,'Facture FA1302-0012 validée dans Dolibarr','2013-02-17 16:27:00','2014-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1302-0012 validée dans Dolibarr\nAuteur: admin',152,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(139,NULL,1,'2013-02-17 16:27:29','2013-02-17 16:27:29',40,NULL,'Proposition PR1302-0010 validée','2013-02-17 16:27:29','2014-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition PR1302-0010 validée\nAuteur: admin',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(140,NULL,1,'2013-02-17 18:27:56','2013-02-17 18:27:56',40,NULL,'Commande CO1107-0004 validée','2013-02-17 18:27:56','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1107-0004 validée\nAuteur: admin',3,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(141,NULL,1,'2013-02-17 18:38:14','2013-02-17 18:38:14',40,NULL,'Commande CO1302-0005 validée','2013-02-17 18:38:14','2014-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1302-0005 validée\nAuteur: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(142,NULL,1,'2013-02-26 22:57:50','2013-02-26 22:57:50',40,NULL,'Company pppp added into Dolibarr','2013-02-26 22:57:50','2014-12-21 12:50:33',1,NULL,NULL,22,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company pppp added into Dolibarr\nAuthor: admin',22,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(143,NULL,1,'2013-02-26 22:58:13','2013-02-26 22:58:13',40,NULL,'Company ttttt added into Dolibarr','2013-02-26 22:58:13','2014-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company ttttt added into Dolibarr\nAuthor: admin',23,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(144,NULL,1,'2013-02-27 10:00:00','2013-02-27 19:20:00',5,NULL,'Rendez-vous','2013-02-27 19:20:53','2013-02-27 18:20:53',1,NULL,NULL,NULL,NULL,0,1,NULL,1,0,0,1,-1,'',33600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(145,NULL,1,'2013-02-27 19:28:00',NULL,2,NULL,'fdsfsd','2013-02-27 19:28:48','2013-02-27 18:29:53',1,1,NULL,NULL,NULL,0,1,NULL,1,0,0,1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(146,NULL,1,'2013-03-06 10:05:07','2013-03-06 10:05:07',40,NULL,'Contrat (PROV3) validé dans Dolibarr','2013-03-06 10:05:07','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Contrat (PROV3) validé dans Dolibarr\nAuteur: admin',3,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(147,NULL,1,'2013-03-06 16:43:37','2013-03-06 16:43:37',40,NULL,'Facture FA1307-0013 validée dans Dolibarr','2013-03-06 16:43:37','2014-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1307-0013 validée dans Dolibarr\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(148,NULL,1,'2013-03-06 16:44:12','2013-03-06 16:44:12',40,NULL,'Facture FA1407-0014 validée dans Dolibarr','2013-03-06 16:44:12','2014-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1407-0014 validée dans Dolibarr\nAuteur: admin',159,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(149,NULL,1,'2013-03-06 16:47:48','2013-03-06 16:47:48',40,NULL,'Facture FA1507-0015 validée dans Dolibarr','2013-03-06 16:47:48','2014-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1507-0015 validée dans Dolibarr\nAuteur: admin',160,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(150,NULL,1,'2013-03-06 16:48:16','2013-03-06 16:48:16',40,NULL,'Facture FA1607-0016 validée dans Dolibarr','2013-03-06 16:48:16','2014-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1607-0016 validée dans Dolibarr\nAuteur: admin',161,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(151,NULL,1,'2013-03-06 17:13:59','2013-03-06 17:13:59',40,NULL,'Société smith smith ajoutée dans Dolibarr','2013-03-06 17:13:59','2014-12-21 12:50:33',1,NULL,NULL,24,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Société smith smith ajoutée dans Dolibarr\nAuteur: admin',24,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(152,NULL,1,'2013-03-08 10:02:22','2013-03-08 10:02:22',40,NULL,'Proposition (PROV12) validée dans Dolibarr','2013-03-08 10:02:22','2014-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition (PROV12) validée dans Dolibarr\nAuteur: admin',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(203,NULL,1,'2013-03-09 19:39:27','2013-03-09 19:39:27',40,'AC_ORDER_SUPPLIER_VALIDATE','Commande CF1303-0004 validée','2013-03-09 19:39:27','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CF1303-0004 validée\nAuteur: admin',13,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(204,NULL,1,'2013-03-10 15:47:37','2013-03-10 15:47:37',40,'AC_COMPANY_CREATE','Patient créé','2013-03-10 15:47:37','2014-12-21 12:50:33',1,NULL,NULL,25,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient créé\nAuteur: admin',25,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(205,NULL,1,'2013-03-10 15:57:32','2013-03-10 15:57:32',40,'AC_COMPANY_CREATE','Tiers créé','2013-03-10 15:57:32','2014-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Tiers créé\nAuteur: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(206,NULL,1,'2013-03-10 15:58:28','2013-03-10 15:58:28',40,'AC_BILL_VALIDATE','Facture FA1303-0017 validée','2013-03-10 15:58:28','2014-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0017 validée\nAuteur: admin',208,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(207,NULL,1,'2013-03-19 09:38:10','2013-03-19 09:38:10',40,'AC_BILL_VALIDATE','Facture FA1303-0018 validée','2013-03-19 09:38:10','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0018 validée\nAuteur: admin',209,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(208,NULL,1,'2013-03-20 14:30:11','2013-03-20 14:30:11',40,'AC_BILL_VALIDATE','Facture FA1107-0019 validée','2013-03-20 14:30:11','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1107-0019 validée\nAuteur: admin',210,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(209,NULL,1,'2013-03-22 09:40:25','2013-03-22 09:40:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2013-03-22 09:40:25','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(210,NULL,1,'2013-03-23 17:16:25','2013-03-23 17:16:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2013-03-23 17:16:25','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(211,NULL,1,'2013-03-23 18:08:27','2013-03-23 18:08:27',40,'AC_BILL_VALIDATE','Facture FA1307-0013 validée','2013-03-23 18:08:27','2014-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1307-0013 validée\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(212,NULL,1,'2013-03-24 15:54:00','2013-03-24 15:54:00',40,'AC_BILL_VALIDATE','Facture FA1212-0021 validée','2013-03-24 15:54:00','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0021 validée\nAuteur: admin',32,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(213,NULL,1,'2013-11-07 01:02:39','2013-11-07 01:02:39',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:02:39','2014-12-21 12:50:33',1,NULL,NULL,27,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',27,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(214,NULL,1,'2013-11-07 01:05:22','2013-11-07 01:05:22',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:05:22','2014-12-21 12:50:33',1,NULL,NULL,28,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',28,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(215,NULL,1,'2013-11-07 01:07:07','2013-11-07 01:07:07',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:07:07','2014-12-21 12:50:33',1,NULL,NULL,29,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',29,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(216,NULL,1,'2013-11-07 01:07:58','2013-11-07 01:07:58',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:07:58','2014-12-21 12:50:33',1,NULL,NULL,30,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',30,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(217,NULL,1,'2013-11-07 01:10:09','2013-11-07 01:10:09',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:10:09','2014-12-21 12:50:33',1,NULL,NULL,31,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',31,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(218,NULL,1,'2013-11-07 01:15:57','2013-11-07 01:15:57',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:15:57','2014-12-21 12:50:33',1,NULL,NULL,32,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',32,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(219,NULL,1,'2013-11-07 01:16:51','2013-11-07 01:16:51',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:16:51','2014-12-21 12:50:33',1,NULL,NULL,33,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',33,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(220,NULL,1,'2014-03-02 17:24:04','2014-03-02 17:24:04',40,'AC_BILL_VALIDATE','Invoice FA1302-0022 validated','2014-03-02 17:24:04','2014-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1302-0022 validated\nAuthor: admin',157,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(221,NULL,1,'2014-03-02 17:24:28','2014-03-02 17:24:28',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2014-03-02 17:24:28','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(222,NULL,1,'2014-03-05 10:00:00','2014-03-05 10:00:00',5,NULL,'RDV John','2014-03-02 19:54:48','2014-03-02 18:55:29',1,1,NULL,NULL,NULL,0,1,0,NULL,0,0,1,-1,NULL,NULL,NULL,'gfdgdfgdf',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(223,NULL,1,'2014-03-13 10:00:00','2014-03-17 00:00:00',50,NULL,'Congress','2014-03-02 19:55:11','2014-03-02 18:55:11',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,1,-1,'',309600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(224,NULL,1,'2014-03-14 10:00:00',NULL,1,NULL,'Call john','2014-03-02 19:55:56','2014-03-02 18:55:56',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,1,0,'',NULL,NULL,'tttt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(225,NULL,1,'2014-03-02 20:11:31','2014-03-02 20:11:31',40,'AC_BILL_UNVALIDATE','Invoice FA1303-0020 go back to draft status','2014-03-02 20:11:31','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 go back to draft status\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(226,NULL,1,'2014-03-02 20:13:39','2014-03-02 20:13:39',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2014-03-02 20:13:39','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(227,NULL,1,'2014-03-03 19:20:10','2014-03-03 19:20:10',40,'AC_BILL_VALIDATE','Invoice FA1212-0023 validated','2014-03-03 19:20:10','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1212-0023 validated\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(228,NULL,1,'2014-03-03 19:20:25','2014-03-03 19:20:25',40,'AC_BILL_CANCEL','Invoice FA1212-0023 canceled in Dolibarr','2014-03-03 19:20:25','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1212-0023 canceled in Dolibarr\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(229,NULL,1,'2014-03-03 19:20:56','2014-03-03 19:20:56',40,'AC_BILL_VALIDATE','Invoice AV1403-0003 validated','2014-03-03 19:20:56','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1403-0003 validated\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(230,NULL,1,'2014-03-03 19:21:29','2014-03-03 19:21:29',40,'AC_BILL_UNVALIDATE','Invoice AV1403-0003 go back to draft status','2014-03-03 19:21:29','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1403-0003 go back to draft status\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(231,NULL,1,'2014-03-03 19:22:16','2014-03-03 19:22:16',40,'AC_BILL_VALIDATE','Invoice AV1303-0003 validated','2014-03-03 19:22:16','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1303-0003 validated\nAuthor: admin',213,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_actioncomm` VALUES (1,NULL,1,'2010-07-08 14:21:44','2010-07-08 14:21:44',50,NULL,'Company AAA and Co added into Dolibarr','2010-07-08 14:21:44','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company AAA and Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,NULL,1,'2010-07-08 14:23:48','2010-07-08 14:23:48',50,NULL,'Company Belin SARL added into Dolibarr','2010-07-08 14:23:48','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Belin SARL added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,NULL,1,'2010-07-08 22:42:12','2010-07-08 22:42:12',50,NULL,'Company Spanish Comp added into Dolibarr','2010-07-08 22:42:12','2014-12-21 12:50:33',1,NULL,NULL,3,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Spanish Comp added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,NULL,1,'2010-07-08 22:48:18','2010-07-08 22:48:18',50,NULL,'Company Prospector Vaalen added into Dolibarr','2010-07-08 22:48:18','2014-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Prospector Vaalen added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,NULL,1,'2010-07-08 23:22:57','2010-07-08 23:22:57',50,NULL,'Company NoCountry Co added into Dolibarr','2010-07-08 23:22:57','2014-12-21 12:50:33',1,NULL,NULL,5,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company NoCountry Co added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(6,NULL,1,'2010-07-09 00:15:09','2010-07-09 00:15:09',50,NULL,'Company Swiss customer added into Dolibarr','2010-07-09 00:15:09','2014-12-21 12:50:33',1,NULL,NULL,6,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Swiss customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(7,NULL,1,'2010-07-09 01:24:26','2010-07-09 01:24:26',50,NULL,'Company Generic customer added into Dolibarr','2010-07-09 01:24:26','2014-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Company Generic customer added into Dolibarr\nAuthor: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(8,NULL,1,'2010-07-10 14:54:27','2010-07-10 14:54:27',50,NULL,'Société Client salon ajoutée dans Dolibarr','2010-07-10 14:54:27','2014-12-21 12:50:33',1,NULL,NULL,8,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Client salon ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(9,NULL,1,'2010-07-10 14:54:44','2010-07-10 14:54:44',50,NULL,'Société Client salon invidivdu ajoutée dans Doliba','2010-07-10 14:54:44','2014-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Client salon invidivdu ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,NULL,1,'2010-07-10 14:56:10','2010-07-10 14:56:10',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2010-07-10 14:56:10','2014-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,NULL,1,'2010-07-10 14:58:53','2010-07-10 14:58:53',50,NULL,'Facture FA1007-0001 validée dans Dolibarr','2010-07-10 14:58:53','2014-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 validée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,NULL,1,'2010-07-10 15:00:55','2010-07-10 15:00:55',50,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr','2010-07-10 15:00:55','2014-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Facture FA1007-0001 passée à payée dans Dolibarr\nAuteur: admin',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,NULL,1,'2010-07-10 15:13:08','2010-07-10 15:13:08',50,NULL,'Société Smith Vick ajoutée dans Dolibarr','2010-07-10 15:13:08','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Smith Vick ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,NULL,1,'2010-07-10 15:21:00','2010-07-10 16:21:00',5,NULL,'RDV avec mon chef','2010-07-10 15:21:48','2010-07-10 13:21:48',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,1,0,'',3600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(15,NULL,1,'2010-07-10 18:18:16','2010-07-10 18:18:16',50,NULL,'Contrat CONTRAT1 validé dans Dolibarr','2010-07-10 18:18:16','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Contrat CONTRAT1 validé dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,NULL,1,'2010-07-10 18:35:57','2010-07-10 18:35:57',50,NULL,'Société Mon client ajoutée dans Dolibarr','2010-07-10 18:35:57','2014-12-21 12:50:33',1,NULL,NULL,11,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Mon client ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,NULL,1,'2010-07-11 16:18:08','2010-07-11 16:18:08',50,NULL,'Société Dupont Alain ajoutée dans Dolibarr','2010-07-11 16:18:08','2014-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Dupont Alain ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,NULL,1,'2010-07-11 17:11:00','2010-07-11 17:17:00',5,NULL,'Rendez-vous','2010-07-11 17:11:22','2010-07-11 15:11:22',1,NULL,NULL,NULL,NULL,0,1,NULL,NULL,0,0,1,0,'gfgdfgdf',360,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(19,NULL,1,'2010-07-11 17:13:20','2010-07-11 17:13:20',50,NULL,'Société Vendeur de chips ajoutée dans Dolibarr','2010-07-11 17:13:20','2014-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Société Vendeur de chips ajoutée dans Dolibarr\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(20,NULL,1,'2010-07-11 17:15:42','2010-07-11 17:15:42',50,NULL,'Commande CF1007-0001 validée','2010-07-11 17:15:42','2014-12-21 12:50:33',1,NULL,NULL,13,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Commande CF1007-0001 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(21,NULL,1,'2010-07-11 18:47:33','2010-07-11 18:47:33',50,NULL,'Commande CF1007-0002 validée','2010-07-11 18:47:33','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Commande CF1007-0002 validée\nAuteur: admin',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(22,NULL,1,'2010-07-18 11:36:18','2010-07-18 11:36:18',50,NULL,'Proposition PR1007-0003 validée','2010-07-18 11:36:18','2014-12-21 12:50:33',1,NULL,NULL,4,NULL,0,1,NULL,1,0,0,1,100,'',NULL,NULL,'Proposition PR1007-0003 validée\nAuteur: admin',3,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(23,NULL,1,'2011-07-18 20:49:58','2011-07-18 20:49:58',50,NULL,'Invoice FA1007-0002 validated in Dolibarr','2011-07-18 20:49:58','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1007-0002 validated in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(24,NULL,1,'2011-07-28 01:37:00',NULL,1,NULL,'Phone call','2011-07-28 01:37:48','2011-07-27 23:37:48',1,NULL,NULL,NULL,2,0,1,NULL,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(25,NULL,1,'2011-08-01 02:31:24','2011-08-01 02:31:24',50,NULL,'Company mmm added into Dolibarr','2011-08-01 02:31:24','2014-12-21 12:50:33',1,NULL,NULL,15,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company mmm added into Dolibarr\nAuthor: admin',15,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(26,NULL,1,'2011-08-01 02:31:43','2011-08-01 02:31:43',50,NULL,'Company ppp added into Dolibarr','2011-08-01 02:31:43','2014-12-21 12:50:33',1,NULL,NULL,16,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company ppp added into Dolibarr\nAuthor: admin',16,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(27,NULL,1,'2011-08-01 02:41:26','2011-08-01 02:41:26',50,NULL,'Company aaa added into Dolibarr','2011-08-01 02:41:26','2014-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company aaa added into Dolibarr\nAuthor: admin',17,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(28,NULL,1,'2011-08-01 03:34:11','2011-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2011-08-01 03:34:11','2014-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0003 validated in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(29,NULL,1,'2011-08-01 03:34:11','2011-08-01 03:34:11',50,NULL,'Invoice FA1108-0003 validated in Dolibarr','2011-08-01 03:34:11','2014-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0003 changed to paid in Dolibarr\nAuthor: admin',5,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(30,NULL,1,'2011-08-06 20:33:54','2011-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2011-08-06 20:33:54','2014-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0004 validated in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(31,NULL,1,'2011-08-06 20:33:54','2011-08-06 20:33:54',50,NULL,'Invoice FA1108-0004 validated in Dolibarr','2011-08-06 20:33:54','2014-12-21 12:50:33',1,NULL,NULL,7,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0004 changed to paid in Dolibarr\nAuthor: admin',6,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(38,NULL,1,'2011-08-08 02:41:55','2011-08-08 02:41:55',50,NULL,'Invoice FA1108-0005 validated in Dolibarr','2011-08-08 02:41:55','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0005 validated in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(40,NULL,1,'2011-08-08 02:53:40','2011-08-08 02:53:40',50,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr','2011-08-08 02:53:40','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0005 changed to paid in Dolibarr\nAuthor: admin',8,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(41,NULL,1,'2011-08-08 02:54:05','2011-08-08 02:54:05',50,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr','2011-08-08 02:54:05','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1007-0002 changed to paid in Dolibarr\nAuthor: admin',2,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(42,NULL,1,'2011-08-08 02:55:04','2011-08-08 02:55:04',50,NULL,'Invoice FA1107-0006 validated in Dolibarr','2011-08-08 02:55:04','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1107-0006 validated in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(43,NULL,1,'2011-08-08 02:55:26','2011-08-08 02:55:26',50,NULL,'Invoice FA1108-0007 validated in Dolibarr','2011-08-08 02:55:26','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1108-0007 validated in Dolibarr\nAuthor: admin',9,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(44,NULL,1,'2011-08-08 02:55:58','2011-08-08 02:55:58',50,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr','2011-08-08 02:55:58','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1107-0006 changed to paid in Dolibarr\nAuthor: admin',3,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(45,NULL,1,'2011-08-08 03:04:22','2011-08-08 03:04:22',50,NULL,'Order CO1108-0001 validated','2011-08-08 03:04:22','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CO1108-0001 validated\nAuthor: admin',5,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(46,NULL,1,'2011-08-08 13:59:09','2011-08-08 13:59:09',50,NULL,'Order CO1107-0002 validated','2011-08-08 13:59:10','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CO1107-0002 validated\nAuthor: admin',1,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(47,NULL,1,'2011-08-08 14:24:18','2011-08-08 14:24:18',50,NULL,'Proposal PR1007-0001 validated','2011-08-08 14:24:18','2014-12-21 12:50:33',1,NULL,NULL,2,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposal PR1007-0001 validated\nAuthor: admin',1,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(48,NULL,1,'2011-08-08 14:24:24','2011-08-08 14:24:24',50,NULL,'Proposal PR1108-0004 validated','2011-08-08 14:24:24','2014-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposal PR1108-0004 validated\nAuthor: admin',4,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(49,NULL,1,'2011-08-08 15:04:37','2011-08-08 15:04:37',50,NULL,'Order CF1108-0003 validated','2011-08-08 15:04:37','2014-12-21 12:50:33',1,NULL,NULL,17,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Order CF1108-0003 validated\nAuthor: admin',6,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(50,NULL,1,'2012-12-08 17:56:47','2012-12-08 17:56:47',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2012-12-08 17:56:47','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(51,NULL,1,'2012-12-08 17:57:11','2012-12-08 17:57:11',40,NULL,'Facture AV1212-0001 validée dans Dolibarr','2012-12-08 17:57:11','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0001 validée dans Dolibarr\nAuteur: admin',10,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(52,NULL,1,'2012-12-08 17:58:27','2012-12-08 17:58:27',40,NULL,'Facture FA1212-0008 validée dans Dolibarr','2012-12-08 17:58:27','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0008 validée dans Dolibarr\nAuteur: admin',11,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(53,NULL,1,'2012-12-08 18:20:49','2012-12-08 18:20:49',40,NULL,'Facture AV1212-0002 validée dans Dolibarr','2012-12-08 18:20:49','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0002 validée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(54,NULL,1,'2012-12-09 18:35:07','2012-12-09 18:35:07',40,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr','2012-12-09 18:35:07','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture AV1212-0002 passée à payée dans Dolibarr\nAuteur: admin',12,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(55,NULL,1,'2012-12-09 20:14:42','2012-12-09 20:14:42',40,NULL,'Société doe john ajoutée dans Dolibarr','2012-12-09 20:14:42','2014-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Société doe john ajoutée dans Dolibarr\nAuteur: admin',18,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(56,NULL,1,'2012-12-12 18:54:19','2012-12-12 18:54:19',40,NULL,'Facture FA1212-0009 validée dans Dolibarr','2012-12-12 18:54:19','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0009 validée dans Dolibarr\nAuteur: admin',55,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(121,NULL,1,'2012-12-06 10:00:00',NULL,50,NULL,'aaab','2012-12-21 17:48:08','2012-12-21 16:54:07',3,1,NULL,NULL,NULL,0,3,NULL,NULL,1,0,1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(122,NULL,1,'2012-12-21 18:09:52','2012-12-21 18:09:52',40,NULL,'Facture client FA1007-0001 envoyée par EMail','2012-12-21 18:09:52','2014-12-21 12:50:33',1,NULL,NULL,9,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Mail envoyé par Firstname SuperAdminName à laurent@destailleur.fr.\nSujet du mail: Envoi facture FA1007-0001\nCorps du mail:\nVeuillez trouver ci-joint la facture FA1007-0001\r\n\r\nVous pouvez cliquer sur le lien sécurisé ci-dessous pour effectuer votre paiement via Paypal\r\n\r\nhttp://localhost/dolibarrnew/public/paypal/newpayment.php?source=invoice&ref=FA1007-0001&securekey=50c82fab36bb3b6aa83e2a50691803b2\r\n\r\nCordialement',1,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(123,NULL,1,'2013-01-06 13:13:57','2013-01-06 13:13:57',40,NULL,'Facture 16 validée dans Dolibarr','2013-01-06 13:13:57','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture 16 validée dans Dolibarr\nAuteur: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(124,NULL,1,'2013-01-12 12:23:05','2013-01-12 12:23:05',40,NULL,'Patient aaa ajouté','2013-01-12 12:23:05','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient aaa ajouté\nAuteur: admin',19,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(125,NULL,1,'2013-01-12 12:52:20','2013-01-12 12:52:20',40,NULL,'Patient pppoo ajouté','2013-01-12 12:52:20','2014-12-21 12:50:33',1,NULL,NULL,20,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient pppoo ajouté\nAuteur: admin',20,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(127,NULL,1,'2013-01-19 18:22:48','2013-01-19 18:22:48',40,NULL,'Facture FS1301-0001 validée dans Dolibarr','2013-01-19 18:22:48','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0001 validée dans Dolibarr\nAuteur: admin',148,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(128,NULL,1,'2013-01-19 18:31:10','2013-01-19 18:31:10',40,NULL,'Facture FA6801-0010 validée dans Dolibarr','2013-01-19 18:31:10','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA6801-0010 validée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(129,NULL,1,'2013-01-19 18:31:10','2013-01-19 18:31:10',40,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr','2013-01-19 18:31:10','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA6801-0010 passée à payée dans Dolibarr\nAuteur: admin',150,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(130,NULL,1,'2013-01-19 18:31:58','2013-01-19 18:31:58',40,NULL,'Facture FS1301-0002 validée dans Dolibarr','2013-01-19 18:31:58','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0002 validée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(131,NULL,1,'2013-01-19 18:31:58','2013-01-19 18:31:58',40,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr','2013-01-19 18:31:58','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FS1301-0002 passée à payée dans Dolibarr\nAuteur: admin',151,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(132,NULL,1,'2013-01-23 15:07:54','2013-01-23 15:07:54',50,NULL,'Consultation 24 saisie (aaa)','2013-01-23 15:07:54','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Consultation 24 saisie (aaa)\nAuteur: admin',24,'cabinetmed_cons',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(133,NULL,1,'2013-01-23 16:56:58','2013-01-23 16:56:58',40,NULL,'Patient pa ajouté','2013-01-23 16:56:58','2014-12-21 12:50:33',1,NULL,NULL,21,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient pa ajouté\nAuteur: admin',21,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(134,NULL,1,'2013-01-23 17:34:00',NULL,50,NULL,'bbcv','2013-01-23 17:35:21','2013-01-23 16:35:21',1,NULL,1,2,NULL,0,1,NULL,NULL,0,0,1,-1,'',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(135,NULL,1,'2013-02-12 15:54:00','2013-02-12 15:54:00',40,NULL,'Facture FA1212-0011 validée dans Dolibarr','2013-02-12 15:54:37','2014-12-21 12:50:33',1,1,NULL,7,NULL,0,1,NULL,1,0,0,1,50,NULL,NULL,NULL,'Facture FA1212-0011 validée dans Dolibarr
\r\nAuteur: admin',13,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(136,NULL,1,'2013-02-12 17:06:51','2013-02-12 17:06:51',40,NULL,'Commande CO1107-0003 validée','2013-02-12 17:06:51','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1107-0003 validée\nAuteur: admin',2,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(137,NULL,1,'2013-02-17 16:22:10','2013-02-17 16:22:10',40,NULL,'Proposition PR1302-0009 validée','2013-02-17 16:22:10','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition PR1302-0009 validée\nAuteur: admin',9,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(138,NULL,1,'2013-02-17 16:27:00','2013-02-17 16:27:00',40,NULL,'Facture FA1302-0012 validée dans Dolibarr','2013-02-17 16:27:00','2014-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1302-0012 validée dans Dolibarr\nAuteur: admin',152,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(139,NULL,1,'2013-02-17 16:27:29','2013-02-17 16:27:29',40,NULL,'Proposition PR1302-0010 validée','2013-02-17 16:27:29','2014-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition PR1302-0010 validée\nAuteur: admin',11,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(140,NULL,1,'2013-02-17 18:27:56','2013-02-17 18:27:56',40,NULL,'Commande CO1107-0004 validée','2013-02-17 18:27:56','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1107-0004 validée\nAuteur: admin',3,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(141,NULL,1,'2013-02-17 18:38:14','2013-02-17 18:38:14',40,NULL,'Commande CO1302-0005 validée','2013-02-17 18:38:14','2014-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CO1302-0005 validée\nAuteur: admin',7,'order',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(142,NULL,1,'2013-02-26 22:57:50','2013-02-26 22:57:50',40,NULL,'Company pppp added into Dolibarr','2013-02-26 22:57:50','2014-12-21 12:50:33',1,NULL,NULL,22,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company pppp added into Dolibarr\nAuthor: admin',22,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(143,NULL,1,'2013-02-26 22:58:13','2013-02-26 22:58:13',40,NULL,'Company ttttt added into Dolibarr','2013-02-26 22:58:13','2014-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Company ttttt added into Dolibarr\nAuthor: admin',23,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(144,NULL,1,'2013-02-27 10:00:00','2013-02-27 19:20:00',5,NULL,'Rendez-vous','2013-02-27 19:20:53','2013-02-27 18:20:53',1,NULL,NULL,NULL,NULL,0,1,NULL,1,0,0,1,-1,'',33600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(145,NULL,1,'2013-02-27 19:28:00',NULL,2,NULL,'fdsfsd','2013-02-27 19:28:48','2013-02-27 18:29:53',1,1,NULL,NULL,NULL,0,1,NULL,1,0,0,1,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(146,NULL,1,'2013-03-06 10:05:07','2013-03-06 10:05:07',40,NULL,'Contrat (PROV3) validé dans Dolibarr','2013-03-06 10:05:07','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Contrat (PROV3) validé dans Dolibarr\nAuteur: admin',3,'contract',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(147,NULL,1,'2013-03-06 16:43:37','2013-03-06 16:43:37',40,NULL,'Facture FA1307-0013 validée dans Dolibarr','2013-03-06 16:43:37','2014-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1307-0013 validée dans Dolibarr\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(148,NULL,1,'2013-03-06 16:44:12','2013-03-06 16:44:12',40,NULL,'Facture FA1407-0014 validée dans Dolibarr','2013-03-06 16:44:12','2014-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1407-0014 validée dans Dolibarr\nAuteur: admin',159,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(149,NULL,1,'2013-03-06 16:47:48','2013-03-06 16:47:48',40,NULL,'Facture FA1507-0015 validée dans Dolibarr','2013-03-06 16:47:48','2014-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1507-0015 validée dans Dolibarr\nAuteur: admin',160,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(150,NULL,1,'2013-03-06 16:48:16','2013-03-06 16:48:16',40,NULL,'Facture FA1607-0016 validée dans Dolibarr','2013-03-06 16:48:16','2014-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1607-0016 validée dans Dolibarr\nAuteur: admin',161,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(151,NULL,1,'2013-03-06 17:13:59','2013-03-06 17:13:59',40,NULL,'Société smith smith ajoutée dans Dolibarr','2013-03-06 17:13:59','2014-12-21 12:50:33',1,NULL,NULL,24,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Société smith smith ajoutée dans Dolibarr\nAuteur: admin',24,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(152,NULL,1,'2013-03-08 10:02:22','2013-03-08 10:02:22',40,NULL,'Proposition (PROV12) validée dans Dolibarr','2013-03-08 10:02:22','2014-12-21 12:50:33',1,NULL,NULL,23,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Proposition (PROV12) validée dans Dolibarr\nAuteur: admin',12,'propal',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(203,NULL,1,'2013-03-09 19:39:27','2013-03-09 19:39:27',40,'AC_ORDER_SUPPLIER_VALIDATE','Commande CF1303-0004 validée','2013-03-09 19:39:27','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Commande CF1303-0004 validée\nAuteur: admin',13,'order_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(204,NULL,1,'2013-03-10 15:47:37','2013-03-10 15:47:37',40,'AC_COMPANY_CREATE','Patient créé','2013-03-10 15:47:37','2014-12-21 12:50:33',1,NULL,NULL,25,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Patient créé\nAuteur: admin',25,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(205,NULL,1,'2013-03-10 15:57:32','2013-03-10 15:57:32',40,'AC_COMPANY_CREATE','Tiers créé','2013-03-10 15:57:32','2014-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Tiers créé\nAuteur: admin',26,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(206,NULL,1,'2013-03-10 15:58:28','2013-03-10 15:58:28',40,'AC_BILL_VALIDATE','Facture FA1303-0017 validée','2013-03-10 15:58:28','2014-12-21 12:50:33',1,NULL,NULL,26,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0017 validée\nAuteur: admin',208,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(207,NULL,1,'2013-03-19 09:38:10','2013-03-19 09:38:10',40,'AC_BILL_VALIDATE','Facture FA1303-0018 validée','2013-03-19 09:38:10','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0018 validée\nAuteur: admin',209,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(208,NULL,1,'2013-03-20 14:30:11','2013-03-20 14:30:11',40,'AC_BILL_VALIDATE','Facture FA1107-0019 validée','2013-03-20 14:30:11','2014-12-21 12:50:33',1,NULL,NULL,10,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1107-0019 validée\nAuteur: admin',210,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(209,NULL,1,'2013-03-22 09:40:25','2013-03-22 09:40:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2013-03-22 09:40:25','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(210,NULL,1,'2013-03-23 17:16:25','2013-03-23 17:16:25',40,'AC_BILL_VALIDATE','Facture FA1303-0020 validée','2013-03-23 17:16:25','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1303-0020 validée\nAuteur: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(211,NULL,1,'2013-03-23 18:08:27','2013-03-23 18:08:27',40,'AC_BILL_VALIDATE','Facture FA1307-0013 validée','2013-03-23 18:08:27','2014-12-21 12:50:33',1,NULL,NULL,12,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1307-0013 validée\nAuteur: admin',158,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(212,NULL,1,'2013-03-24 15:54:00','2013-03-24 15:54:00',40,'AC_BILL_VALIDATE','Facture FA1212-0021 validée','2013-03-24 15:54:00','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,NULL,1,0,0,1,-1,'',NULL,NULL,'Facture FA1212-0021 validée\nAuteur: admin',32,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(213,NULL,1,'2013-11-07 01:02:39','2013-11-07 01:02:39',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:02:39','2014-12-21 12:50:33',1,NULL,NULL,27,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',27,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(214,NULL,1,'2013-11-07 01:05:22','2013-11-07 01:05:22',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:05:22','2014-12-21 12:50:33',1,NULL,NULL,28,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',28,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(215,NULL,1,'2013-11-07 01:07:07','2013-11-07 01:07:07',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:07:07','2014-12-21 12:50:33',1,NULL,NULL,29,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',29,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(216,NULL,1,'2013-11-07 01:07:58','2013-11-07 01:07:58',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:07:58','2014-12-21 12:50:33',1,NULL,NULL,30,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',30,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(217,NULL,1,'2013-11-07 01:10:09','2013-11-07 01:10:09',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:10:09','2014-12-21 12:50:33',1,NULL,NULL,31,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',31,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(218,NULL,1,'2013-11-07 01:15:57','2013-11-07 01:15:57',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:15:57','2014-12-21 12:50:33',1,NULL,NULL,32,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',32,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(219,NULL,1,'2013-11-07 01:16:51','2013-11-07 01:16:51',40,'AC_COMPANY_CREATE','Third party created','2013-11-07 01:16:51','2014-12-21 12:50:33',1,NULL,NULL,33,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Third party created\nAuthor: admin',33,'societe',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(220,NULL,1,'2014-03-02 17:24:04','2014-03-02 17:24:04',40,'AC_BILL_VALIDATE','Invoice FA1302-0022 validated','2014-03-02 17:24:04','2014-12-21 12:50:33',1,NULL,NULL,18,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1302-0022 validated\nAuthor: admin',157,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(221,NULL,1,'2014-03-02 17:24:28','2014-03-02 17:24:28',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2014-03-02 17:24:28','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(222,NULL,1,'2014-03-05 10:00:00','2014-03-05 10:00:00',5,NULL,'RDV John','2014-03-02 19:54:48','2014-03-02 18:55:29',1,1,NULL,NULL,NULL,0,1,0,NULL,0,0,1,-1,NULL,NULL,NULL,'gfdgdfgdf',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(223,NULL,1,'2014-03-13 10:00:00','2014-03-17 00:00:00',50,NULL,'Congress','2014-03-02 19:55:11','2014-03-02 18:55:11',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,1,-1,'',309600,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(224,NULL,1,'2014-03-14 10:00:00',NULL,1,NULL,'Call john','2014-03-02 19:55:56','2014-03-02 18:55:56',1,NULL,NULL,NULL,NULL,0,1,0,NULL,0,0,1,0,'',NULL,NULL,'tttt',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(225,NULL,1,'2014-03-02 20:11:31','2014-03-02 20:11:31',40,'AC_BILL_UNVALIDATE','Invoice FA1303-0020 go back to draft status','2014-03-02 20:11:31','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 go back to draft status\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(226,NULL,1,'2014-03-02 20:13:39','2014-03-02 20:13:39',40,'AC_BILL_VALIDATE','Invoice FA1303-0020 validated','2014-03-02 20:13:39','2014-12-21 12:50:33',1,NULL,NULL,19,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1303-0020 validated\nAuthor: admin',211,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(227,NULL,1,'2014-03-03 19:20:10','2014-03-03 19:20:10',40,'AC_BILL_VALIDATE','Invoice FA1212-0023 validated','2014-03-03 19:20:10','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1212-0023 validated\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(228,NULL,1,'2014-03-03 19:20:25','2014-03-03 19:20:25',40,'AC_BILL_CANCEL','Invoice FA1212-0023 canceled in Dolibarr','2014-03-03 19:20:25','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice FA1212-0023 canceled in Dolibarr\nAuthor: admin',33,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(229,NULL,1,'2014-03-03 19:20:56','2014-03-03 19:20:56',40,'AC_BILL_VALIDATE','Invoice AV1403-0003 validated','2014-03-03 19:20:56','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1403-0003 validated\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(230,NULL,1,'2014-03-03 19:21:29','2014-03-03 19:21:29',40,'AC_BILL_UNVALIDATE','Invoice AV1403-0003 go back to draft status','2014-03-03 19:21:29','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1403-0003 go back to draft status\nAuthor: admin',212,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(231,NULL,1,'2014-03-03 19:22:16','2014-03-03 19:22:16',40,'AC_BILL_VALIDATE','Invoice AV1303-0003 validated','2014-03-03 19:22:16','2014-12-21 12:50:33',1,NULL,NULL,1,NULL,0,1,0,1,0,0,1,-1,'',NULL,NULL,'Invoice AV1303-0003 validated\nAuthor: admin',213,'invoice',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(232,NULL,1,'2016-01-22 18:54:39','2016-01-22 18:54:39',40,'AC_OTH_AUTO','Invoice 16 validated','2016-01-22 18:54:39','2016-01-22 17:54:39',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(233,NULL,1,'2016-01-22 18:54:46','2016-01-22 18:54:46',40,'AC_OTH_AUTO','Invoice 16 validated','2016-01-22 18:54:46','2016-01-22 17:54:46',12,NULL,NULL,1,NULL,0,12,0,NULL,0,0,1,-1,'',NULL,NULL,'Invoice 16 validated\nAuthor: admin',16,'invoice_supplier',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_actioncomm` ENABLE KEYS */; UNLOCK TABLES; @@ -309,7 +310,7 @@ CREATE TABLE `llx_actioncomm_resources` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_actioncomm_resources` (`fk_actioncomm`,`element_type`,`fk_element`), KEY `idx_actioncomm_resources_fk_element` (`fk_element`) -) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -318,7 +319,7 @@ CREATE TABLE `llx_actioncomm_resources` ( LOCK TABLES `llx_actioncomm_resources` WRITE; /*!40000 ALTER TABLE `llx_actioncomm_resources` DISABLE KEYS */; -INSERT INTO `llx_actioncomm_resources` VALUES (1,1,'user',1,NULL,NULL,1),(2,2,'user',1,NULL,NULL,1),(3,3,'user',1,NULL,NULL,1),(4,4,'user',1,NULL,NULL,1),(5,5,'user',1,NULL,NULL,1),(6,6,'user',1,NULL,NULL,1),(7,7,'user',1,NULL,NULL,1),(8,8,'user',1,NULL,NULL,1),(9,9,'user',1,NULL,NULL,1),(10,10,'user',1,NULL,NULL,1),(11,11,'user',1,NULL,NULL,1),(12,12,'user',1,NULL,NULL,1),(13,13,'user',1,NULL,NULL,1),(14,14,'user',1,NULL,NULL,1),(15,15,'user',1,NULL,NULL,1),(16,16,'user',1,NULL,NULL,1),(17,17,'user',1,NULL,NULL,1),(18,18,'user',1,NULL,NULL,1),(19,19,'user',1,NULL,NULL,1),(20,20,'user',1,NULL,NULL,1),(21,21,'user',1,NULL,NULL,1),(22,22,'user',1,NULL,NULL,1),(23,23,'user',1,NULL,NULL,1),(24,24,'user',1,NULL,NULL,1),(25,25,'user',1,NULL,NULL,1),(26,26,'user',1,NULL,NULL,1),(27,27,'user',1,NULL,NULL,1),(28,28,'user',1,NULL,NULL,1),(29,29,'user',1,NULL,NULL,1),(30,30,'user',1,NULL,NULL,1),(31,31,'user',1,NULL,NULL,1),(32,38,'user',1,NULL,NULL,1),(33,40,'user',1,NULL,NULL,1),(34,41,'user',1,NULL,NULL,1),(35,42,'user',1,NULL,NULL,1),(36,43,'user',1,NULL,NULL,1),(37,44,'user',1,NULL,NULL,1),(38,45,'user',1,NULL,NULL,1),(39,46,'user',1,NULL,NULL,1),(40,47,'user',1,NULL,NULL,1),(41,48,'user',1,NULL,NULL,1),(42,49,'user',1,NULL,NULL,1),(43,50,'user',1,NULL,NULL,1),(44,51,'user',1,NULL,NULL,1),(45,52,'user',1,NULL,NULL,1),(46,53,'user',1,NULL,NULL,1),(47,54,'user',1,NULL,NULL,1),(48,55,'user',1,NULL,NULL,1),(49,56,'user',1,NULL,NULL,1),(50,121,'user',3,NULL,NULL,1),(51,122,'user',1,NULL,NULL,1),(52,123,'user',1,NULL,NULL,1),(53,124,'user',1,NULL,NULL,1),(54,125,'user',1,NULL,NULL,1),(55,127,'user',1,NULL,NULL,1),(56,128,'user',1,NULL,NULL,1),(57,129,'user',1,NULL,NULL,1),(58,130,'user',1,NULL,NULL,1),(59,131,'user',1,NULL,NULL,1),(60,132,'user',1,NULL,NULL,1),(61,133,'user',1,NULL,NULL,1),(62,134,'user',1,NULL,NULL,1),(63,135,'user',1,NULL,NULL,1),(64,136,'user',1,NULL,NULL,1),(65,137,'user',1,NULL,NULL,1),(66,138,'user',1,NULL,NULL,1),(67,139,'user',1,NULL,NULL,1),(68,140,'user',1,NULL,NULL,1),(69,141,'user',1,NULL,NULL,1),(70,142,'user',1,NULL,NULL,1),(71,143,'user',1,NULL,NULL,1),(72,144,'user',1,NULL,NULL,1),(73,145,'user',1,NULL,NULL,1),(74,146,'user',1,NULL,NULL,1),(75,147,'user',1,NULL,NULL,1),(76,148,'user',1,NULL,NULL,1),(77,149,'user',1,NULL,NULL,1),(78,150,'user',1,NULL,NULL,1),(79,151,'user',1,NULL,NULL,1),(80,152,'user',1,NULL,NULL,1),(81,203,'user',1,NULL,NULL,1),(82,204,'user',1,NULL,NULL,1),(83,205,'user',1,NULL,NULL,1),(84,206,'user',1,NULL,NULL,1),(85,207,'user',1,NULL,NULL,1),(86,208,'user',1,NULL,NULL,1),(87,209,'user',1,NULL,NULL,1),(88,210,'user',1,NULL,NULL,1),(89,211,'user',1,NULL,NULL,1),(90,212,'user',1,NULL,NULL,1),(91,213,'user',1,NULL,NULL,1),(92,214,'user',1,NULL,NULL,1),(93,215,'user',1,NULL,NULL,1),(94,216,'user',1,NULL,NULL,1),(95,217,'user',1,NULL,NULL,1),(96,218,'user',1,NULL,NULL,1),(97,219,'user',1,NULL,NULL,1),(98,220,'user',1,NULL,NULL,1),(99,221,'user',1,NULL,NULL,1),(100,222,'user',1,NULL,NULL,1),(101,223,'user',1,NULL,NULL,1),(102,224,'user',1,NULL,NULL,1),(103,225,'user',1,NULL,NULL,1),(104,226,'user',1,NULL,NULL,1),(105,227,'user',1,NULL,NULL,1),(106,228,'user',1,NULL,NULL,1),(107,229,'user',1,NULL,NULL,1),(108,230,'user',1,NULL,NULL,1),(109,231,'user',1,NULL,NULL,1); +INSERT INTO `llx_actioncomm_resources` VALUES (1,1,'user',1,NULL,NULL,1),(2,2,'user',1,NULL,NULL,1),(3,3,'user',1,NULL,NULL,1),(4,4,'user',1,NULL,NULL,1),(5,5,'user',1,NULL,NULL,1),(6,6,'user',1,NULL,NULL,1),(7,7,'user',1,NULL,NULL,1),(8,8,'user',1,NULL,NULL,1),(9,9,'user',1,NULL,NULL,1),(10,10,'user',1,NULL,NULL,1),(11,11,'user',1,NULL,NULL,1),(12,12,'user',1,NULL,NULL,1),(13,13,'user',1,NULL,NULL,1),(14,14,'user',1,NULL,NULL,1),(15,15,'user',1,NULL,NULL,1),(16,16,'user',1,NULL,NULL,1),(17,17,'user',1,NULL,NULL,1),(18,18,'user',1,NULL,NULL,1),(19,19,'user',1,NULL,NULL,1),(20,20,'user',1,NULL,NULL,1),(21,21,'user',1,NULL,NULL,1),(22,22,'user',1,NULL,NULL,1),(23,23,'user',1,NULL,NULL,1),(24,24,'user',1,NULL,NULL,1),(25,25,'user',1,NULL,NULL,1),(26,26,'user',1,NULL,NULL,1),(27,27,'user',1,NULL,NULL,1),(28,28,'user',1,NULL,NULL,1),(29,29,'user',1,NULL,NULL,1),(30,30,'user',1,NULL,NULL,1),(31,31,'user',1,NULL,NULL,1),(32,38,'user',1,NULL,NULL,1),(33,40,'user',1,NULL,NULL,1),(34,41,'user',1,NULL,NULL,1),(35,42,'user',1,NULL,NULL,1),(36,43,'user',1,NULL,NULL,1),(37,44,'user',1,NULL,NULL,1),(38,45,'user',1,NULL,NULL,1),(39,46,'user',1,NULL,NULL,1),(40,47,'user',1,NULL,NULL,1),(41,48,'user',1,NULL,NULL,1),(42,49,'user',1,NULL,NULL,1),(43,50,'user',1,NULL,NULL,1),(44,51,'user',1,NULL,NULL,1),(45,52,'user',1,NULL,NULL,1),(46,53,'user',1,NULL,NULL,1),(47,54,'user',1,NULL,NULL,1),(48,55,'user',1,NULL,NULL,1),(49,56,'user',1,NULL,NULL,1),(50,121,'user',3,NULL,NULL,1),(51,122,'user',1,NULL,NULL,1),(52,123,'user',1,NULL,NULL,1),(53,124,'user',1,NULL,NULL,1),(54,125,'user',1,NULL,NULL,1),(55,127,'user',1,NULL,NULL,1),(56,128,'user',1,NULL,NULL,1),(57,129,'user',1,NULL,NULL,1),(58,130,'user',1,NULL,NULL,1),(59,131,'user',1,NULL,NULL,1),(60,132,'user',1,NULL,NULL,1),(61,133,'user',1,NULL,NULL,1),(62,134,'user',1,NULL,NULL,1),(63,135,'user',1,NULL,NULL,1),(64,136,'user',1,NULL,NULL,1),(65,137,'user',1,NULL,NULL,1),(66,138,'user',1,NULL,NULL,1),(67,139,'user',1,NULL,NULL,1),(68,140,'user',1,NULL,NULL,1),(69,141,'user',1,NULL,NULL,1),(70,142,'user',1,NULL,NULL,1),(71,143,'user',1,NULL,NULL,1),(72,144,'user',1,NULL,NULL,1),(73,145,'user',1,NULL,NULL,1),(74,146,'user',1,NULL,NULL,1),(75,147,'user',1,NULL,NULL,1),(76,148,'user',1,NULL,NULL,1),(77,149,'user',1,NULL,NULL,1),(78,150,'user',1,NULL,NULL,1),(79,151,'user',1,NULL,NULL,1),(80,152,'user',1,NULL,NULL,1),(81,203,'user',1,NULL,NULL,1),(82,204,'user',1,NULL,NULL,1),(83,205,'user',1,NULL,NULL,1),(84,206,'user',1,NULL,NULL,1),(85,207,'user',1,NULL,NULL,1),(86,208,'user',1,NULL,NULL,1),(87,209,'user',1,NULL,NULL,1),(88,210,'user',1,NULL,NULL,1),(89,211,'user',1,NULL,NULL,1),(90,212,'user',1,NULL,NULL,1),(91,213,'user',1,NULL,NULL,1),(92,214,'user',1,NULL,NULL,1),(93,215,'user',1,NULL,NULL,1),(94,216,'user',1,NULL,NULL,1),(95,217,'user',1,NULL,NULL,1),(96,218,'user',1,NULL,NULL,1),(97,219,'user',1,NULL,NULL,1),(98,220,'user',1,NULL,NULL,1),(99,221,'user',1,NULL,NULL,1),(100,222,'user',1,NULL,NULL,1),(101,223,'user',1,NULL,NULL,1),(102,224,'user',1,NULL,NULL,1),(103,225,'user',1,NULL,NULL,1),(104,226,'user',1,NULL,NULL,1),(105,227,'user',1,NULL,NULL,1),(106,228,'user',1,NULL,NULL,1),(107,229,'user',1,NULL,NULL,1),(108,230,'user',1,NULL,NULL,1),(109,231,'user',1,NULL,NULL,1),(110,232,'user',12,'0',0,0),(111,233,'user',12,'0',0,0); /*!40000 ALTER TABLE `llx_actioncomm_resources` ENABLE KEYS */; UNLOCK TABLES; @@ -382,7 +383,7 @@ CREATE TABLE `llx_adherent` ( LOCK TABLES `llx_adherent` WRITE; /*!40000 ALTER TABLE `llx_adherent` DISABLE KEYS */; -INSERT INTO `llx_adherent` VALUES (1,1,NULL,NULL,'Smith','Vick','vsmith','vsx1n8tf',2,'phy',NULL,10,NULL,NULL,NULL,NULL,'102','vsmith@email.com',NULL,NULL,NULL,NULL,'1960-07-07',NULL,1,0,'2012-07-09 00:00:00',NULL,NULL,'2010-07-10 15:12:56','2010-07-08 23:50:00','2013-03-20 13:30:11',1,1,1,NULL,NULL),(2,1,NULL,NULL,'Pierre','Curie','pcurie','pcuriedolibarr',2,'phy',NULL,12,NULL,NULL,NULL,NULL,'1','pcurie@example.com','',NULL,NULL,NULL,'1972-07-08',NULL,1,1,'2017-07-17 00:00:00',NULL,NULL,'2010-07-10 15:03:32','2010-07-10 15:03:09','2015-10-03 09:08:58',1,1,1,NULL,NULL),(3,1,NULL,NULL,'john','doe','john','8bs6gty5',2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,'1','johndoe@email.com',NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,NULL,'2011-07-18 21:28:00','2011-07-18 21:10:09','2015-10-03 09:28:46',1,1,1,NULL,NULL),(4,1,NULL,NULL,'smith','smith','Smith','s6hjp10f',2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,'11','smith@email.com',NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,NULL,'2011-07-18 21:27:52','2011-07-18 21:27:44','2015-10-03 09:40:27',1,1,1,NULL,NULL); +INSERT INTO `llx_adherent` VALUES (1,1,NULL,NULL,'Smith','Vick','vsmith','vsx1n8tf',2,'phy',NULL,10,NULL,NULL,NULL,NULL,'102','vsmith@email.com',NULL,NULL,NULL,NULL,'1960-07-07',NULL,1,0,'2012-07-09 00:00:00',NULL,NULL,'2010-07-10 15:12:56','2010-07-08 23:50:00','2013-03-20 13:30:11',1,1,1,NULL,NULL),(2,1,NULL,NULL,'Curie','Pierre','pcurie','pcuriedolibarr',2,'phy',NULL,12,NULL,NULL,NULL,NULL,'1','pcurie@example.com','',NULL,NULL,NULL,'1972-07-08',NULL,1,1,'2017-07-17 00:00:00',NULL,NULL,'2010-07-10 15:03:32','2010-07-10 15:03:09','2015-10-05 19:57:57',1,12,1,NULL,NULL),(3,1,NULL,NULL,'john','doe','john','8bs6gty5',2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,'1','johndoe@email.com',NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,NULL,'2011-07-18 21:28:00','2011-07-18 21:10:09','2015-10-03 09:28:46',1,1,1,NULL,NULL),(4,1,NULL,NULL,'smith','smith','Smith','s6hjp10f',2,'phy',NULL,NULL,NULL,NULL,NULL,NULL,'11','smith@email.com',NULL,NULL,NULL,NULL,NULL,NULL,1,0,NULL,NULL,NULL,'2011-07-18 21:27:52','2011-07-18 21:27:44','2015-10-03 09:40:27',1,1,1,NULL,NULL); /*!40000 ALTER TABLE `llx_adherent` ENABLE KEYS */; UNLOCK TABLES; @@ -475,100 +476,6 @@ LOCK TABLES `llx_adherent_type_extrafields` WRITE; /*!40000 ALTER TABLE `llx_adherent_type_extrafields` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_advanced_extrafields` --- - -DROP TABLE IF EXISTS `llx_advanced_extrafields`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_advanced_extrafields` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `entity` int(11) NOT NULL DEFAULT '1', - `elementtype` varchar(64) NOT NULL, - `name` varchar(64) NOT NULL, - `label` varchar(64) NOT NULL, - `format` varchar(8) NOT NULL, - `fieldsize` int(11) DEFAULT NULL, - `maxlength` int(11) DEFAULT NULL, - `options` varchar(255) DEFAULT NULL, - `rang` int(11) DEFAULT NULL, - PRIMARY KEY (`rowid`), - UNIQUE KEY `idx_advanced_extrafields_name` (`elementtype`,`entity`,`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_advanced_extrafields` --- - -LOCK TABLES `llx_advanced_extrafields` WRITE; -/*!40000 ALTER TABLE `llx_advanced_extrafields` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_advanced_extrafields` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_advanced_extrafields_options` --- - -DROP TABLE IF EXISTS `llx_advanced_extrafields_options`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_advanced_extrafields_options` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `fk_extrafields` int(11) NOT NULL, - `value` varchar(255) NOT NULL, - `rang` int(11) DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_advanced_extrafields_options_fk_advanced_extrafields` (`fk_extrafields`), - CONSTRAINT `fk_advanced_extrafields_options_fk_advanced_extrafields` FOREIGN KEY (`fk_extrafields`) REFERENCES `llx_advanced_extrafields` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_advanced_extrafields_options` --- - -LOCK TABLES `llx_advanced_extrafields_options` WRITE; -/*!40000 ALTER TABLE `llx_advanced_extrafields_options` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_advanced_extrafields_options` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_advanced_extrafields_values` --- - -DROP TABLE IF EXISTS `llx_advanced_extrafields_values`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_advanced_extrafields_values` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `entity` int(11) NOT NULL DEFAULT '1', - `datec` datetime DEFAULT NULL, - `datem` datetime DEFAULT NULL, - `fk_element` int(11) NOT NULL, - `fk_extrafields` int(11) NOT NULL, - `value` varchar(255) DEFAULT NULL, - `fk_user_create` int(11) DEFAULT NULL, - `fk_user_modif` int(11) DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_advanced_extrafields_values_fk_advanced_extrafields` (`fk_extrafields`,`entity`), - CONSTRAINT `fk_advanced_extrafields_values_fk_advanced_extrafields` FOREIGN KEY (`fk_extrafields`) REFERENCES `llx_advanced_extrafields` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_advanced_extrafields_values` --- - -LOCK TABLES `llx_advanced_extrafields_values` WRITE; -/*!40000 ALTER TABLE `llx_advanced_extrafields_values` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_advanced_extrafields_values` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_askpricesupplier` -- @@ -759,7 +666,7 @@ CREATE TABLE `llx_bank` ( KEY `idx_bank_fk_account` (`fk_account`), KEY `idx_bank_rappro` (`rappro`), KEY `idx_bank_num_releve` (`num_releve`) -) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -768,7 +675,7 @@ CREATE TABLE `llx_bank` ( LOCK TABLES `llx_bank` WRITE; /*!40000 ALTER TABLE `llx_bank` DISABLE KEYS */; -INSERT INTO `llx_bank` VALUES (1,'2010-07-08 23:56:14','2013-03-07 21:28:51','2010-07-08','2010-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL),(2,'2010-07-09 00:00:24','2015-10-03 08:44:56','2010-07-09','2010-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(3,'2010-07-10 13:33:42','2015-10-03 08:44:56','2010-07-10','2010-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(5,'2011-07-18 20:50:24','2015-10-03 08:44:56','2011-07-08','2011-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL),(6,'2011-07-18 20:50:47','2015-10-03 08:44:56','2011-07-08','2011-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(8,'2011-08-01 03:34:11','2013-03-07 21:28:51','2011-08-01','2011-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL),(12,'2011-08-05 23:11:37','2013-03-07 21:33:57','2011-08-05','2011-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL),(13,'2011-08-06 20:33:54','2015-10-03 08:44:56','2011-08-06','2011-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(14,'2011-08-08 02:53:40','2015-10-03 08:44:56','2011-08-08','2011-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(15,'2011-08-08 02:55:58','2013-03-07 21:39:20','2011-08-08','2011-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL),(16,'2012-12-09 15:28:44','2012-12-09 14:28:44','2012-12-09','2012-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(17,'2012-12-09 15:28:53','2012-12-09 14:33:07','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(18,'2012-12-09 17:35:55','2012-12-09 16:35:55','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(19,'2012-12-09 17:37:02','2012-12-09 16:37:02','2012-12-09','2012-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(20,'2012-12-09 18:35:07','2012-12-09 17:35:07','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(21,'2012-12-12 18:54:33','2013-03-07 21:28:51','2012-12-12','2012-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL),(22,'2013-03-06 16:48:16','2013-03-06 15:48:16','2013-03-06','2013-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(23,'2013-03-20 14:30:11','2013-03-20 13:30:11','2013-03-20','2013-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(24,'2014-03-02 19:57:58','2014-03-02 18:57:58','2013-07-09','2013-07-09',605.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'111',NULL),(26,'2014-03-02 20:01:39','2014-03-02 19:01:39','2013-03-19','2013-03-19',500.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(27,'2014-03-02 20:02:06','2014-03-02 19:02:06','2013-03-21','2013-03-21',400.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'ABC and Co',NULL),(28,'2014-03-03 19:22:32','2014-03-03 18:22:32','2013-10-03','2013-10-03',-400.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(29,'2014-03-03 19:23:16','2014-03-03 18:23:16','2013-03-10','2013-03-10',-300.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL); +INSERT INTO `llx_bank` VALUES (1,'2010-07-08 23:56:14','2013-03-07 21:28:51','2010-07-08','2010-07-08',2000.00000000,'(Initial balance)',1,NULL,1,'SOLD','201210',NULL,1,NULL,0,NULL,NULL,NULL),(2,'2010-07-09 00:00:24','2015-10-03 08:44:56','2010-07-09','2010-07-09',500.00000000,'(Initial balance)',2,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(3,'2010-07-10 13:33:42','2015-10-03 08:44:56','2010-07-10','2010-07-10',0.00000000,'(Solde initial)',3,NULL,NULL,'SOLD',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(5,'2011-07-18 20:50:24','2015-10-03 08:44:56','2011-07-08','2011-07-08',20.00000000,'(CustomerInvoicePayment)',1,1,NULL,'CB','201107',NULL,1,NULL,0,NULL,NULL,NULL),(6,'2011-07-18 20:50:47','2015-10-03 08:44:56','2011-07-08','2011-07-08',10.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(8,'2011-08-01 03:34:11','2013-03-07 21:28:51','2011-08-01','2011-08-01',5.63000000,'(CustomerInvoicePayment)',1,1,1,'CB','201210',NULL,1,NULL,0,NULL,NULL,NULL),(12,'2011-08-05 23:11:37','2013-03-07 21:33:57','2011-08-05','2011-08-05',-10.00000000,'(SocialContributionPayment)',1,1,1,'VIR','201210',NULL,1,NULL,0,NULL,NULL,NULL),(13,'2011-08-06 20:33:54','2015-10-03 08:44:56','2011-08-06','2011-08-06',5.98000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(14,'2011-08-08 02:53:40','2015-10-03 08:44:56','2011-08-08','2011-08-08',26.10000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(15,'2011-08-08 02:55:58','2013-03-07 21:39:20','2011-08-08','2011-08-08',26.96000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201211',NULL,1,NULL,0,NULL,NULL,NULL),(16,'2012-12-09 15:28:44','2012-12-09 14:28:44','2012-12-09','2012-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(17,'2012-12-09 15:28:53','2012-12-09 14:33:07','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(18,'2012-12-09 17:35:55','2012-12-09 16:35:55','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(19,'2012-12-09 17:37:02','2012-12-09 16:37:02','2012-12-09','2012-12-09',2.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(20,'2012-12-09 18:35:07','2012-12-09 17:35:07','2012-12-09','2012-12-09',-2.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(21,'2012-12-12 18:54:33','2013-03-07 21:28:51','2012-12-12','2012-12-12',1.00000000,'(CustomerInvoicePayment)',1,1,1,'TIP','201210',NULL,1,NULL,0,NULL,NULL,NULL),(22,'2013-03-06 16:48:16','2013-03-06 15:48:16','2013-03-06','2013-03-06',20.00000000,'(SubscriptionPayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(23,'2013-03-20 14:30:11','2013-03-20 13:30:11','2013-03-20','2013-03-20',10.00000000,'(SubscriptionPayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(24,'2014-03-02 19:57:58','2014-03-02 18:57:58','2013-07-09','2013-07-09',605.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'111',NULL),(26,'2014-03-02 20:01:39','2014-03-02 19:01:39','2013-03-19','2013-03-19',500.00000000,'(CustomerInvoicePayment)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(27,'2014-03-02 20:02:06','2014-03-02 19:02:06','2013-03-21','2013-03-21',400.00000000,'(CustomerInvoicePayment)',1,1,NULL,'VIR',NULL,NULL,0,NULL,0,NULL,'ABC and Co',NULL),(28,'2014-03-03 19:22:32','2014-03-03 18:22:32','2013-10-03','2013-10-03',-400.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(29,'2014-03-03 19:23:16','2014-03-03 18:23:16','2013-03-10','2013-03-10',-300.00000000,'(CustomerInvoicePaymentBack)',3,1,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL),(30,'2016-01-22 18:56:34','2016-01-22 17:56:34','2016-01-22','2016-01-22',-900.00000000,'(SupplierInvoicePayment)',1,12,NULL,'LIQ',NULL,NULL,0,NULL,0,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_bank` ENABLE KEYS */; UNLOCK TABLES; @@ -917,7 +824,7 @@ CREATE TABLE `llx_bank_url` ( `type` varchar(24) NOT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_bank_url` (`fk_bank`,`type`) -) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -926,48 +833,10 @@ CREATE TABLE `llx_bank_url` ( LOCK TABLES `llx_bank_url` WRITE; /*!40000 ALTER TABLE `llx_bank_url` DISABLE KEYS */; -INSERT INTO `llx_bank_url` VALUES (3,5,2,'/compta/paiement/card.php?id=','(paiement)','payment'),(4,5,2,'/comm/card.php?socid=','Belin SARL','company'),(5,6,3,'/compta/paiement/card.php?id=','(paiement)','payment'),(6,6,2,'/comm/card.php?socid=','Belin SARL','company'),(9,8,5,'/compta/paiement/card.php?id=','(paiement)','payment'),(10,8,7,'/comm/card.php?socid=','Generic customer','company'),(17,12,4,'/compta/payment_sc/card.php?id=','(paiement)','payment_sc'),(18,12,4,'/compta/charges.php?id=','Assurance Chomage (fff)','sc'),(19,13,6,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(20,13,7,'/dolibarrnew/comm/card.php?socid=','Generic customer','company'),(21,14,8,'/compta/paiement/card.php?id=','(paiement)','payment'),(22,14,2,'/comm/card.php?socid=','Belin SARL','company'),(23,15,9,'/compta/paiement/card.php?id=','(paiement)','payment'),(24,15,10,'/comm/card.php?socid=','Smith Vick','company'),(25,16,17,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(26,16,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(27,17,18,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(28,17,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(29,18,19,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(30,18,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(31,19,20,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(32,19,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(33,20,21,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(34,20,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(35,21,23,'/compta/paiement/card.php?id=','(paiement)','payment'),(36,21,1,'/comm/card.php?socid=','ABC and Co','company'),(37,22,24,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(38,22,12,'/dolibarrnew/comm/card.php?socid=','Dupont Alain','company'),(39,23,25,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(40,23,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(41,24,26,'/compta/paiement/card.php?id=','(paiement)','payment'),(42,24,1,'/comm/card.php?socid=','ABC and Co','company'),(45,26,29,'/compta/paiement/card.php?id=','(paiement)','payment'),(46,26,1,'/comm/card.php?socid=','ABC and Co','company'),(47,27,30,'/compta/paiement/card.php?id=','(paiement)','payment'),(48,27,1,'/comm/card.php?socid=','ABC and Co','company'),(49,28,32,'/dolibarr_new/compta/paiement/card.php?id=','(paiement)','payment'),(50,28,1,'/dolibarr_new/comm/card.php?socid=','ABC and Co','company'),(51,29,33,'/dolibarr_new/compta/paiement/card.php?id=','(paiement)','payment'),(52,29,1,'/dolibarr_new/comm/card.php?socid=','ABC and Co','company'); +INSERT INTO `llx_bank_url` VALUES (3,5,2,'/compta/paiement/card.php?id=','(paiement)','payment'),(4,5,2,'/comm/card.php?socid=','Belin SARL','company'),(5,6,3,'/compta/paiement/card.php?id=','(paiement)','payment'),(6,6,2,'/comm/card.php?socid=','Belin SARL','company'),(9,8,5,'/compta/paiement/card.php?id=','(paiement)','payment'),(10,8,7,'/comm/card.php?socid=','Generic customer','company'),(17,12,4,'/compta/payment_sc/card.php?id=','(paiement)','payment_sc'),(18,12,4,'/compta/charges.php?id=','Assurance Chomage (fff)','sc'),(19,13,6,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(20,13,7,'/dolibarrnew/comm/card.php?socid=','Generic customer','company'),(21,14,8,'/compta/paiement/card.php?id=','(paiement)','payment'),(22,14,2,'/comm/card.php?socid=','Belin SARL','company'),(23,15,9,'/compta/paiement/card.php?id=','(paiement)','payment'),(24,15,10,'/comm/card.php?socid=','Smith Vick','company'),(25,16,17,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(26,16,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(27,17,18,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(28,17,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(29,18,19,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(30,18,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(31,19,20,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(32,19,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(33,20,21,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(34,20,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(35,21,23,'/compta/paiement/card.php?id=','(paiement)','payment'),(36,21,1,'/comm/card.php?socid=','ABC and Co','company'),(37,22,24,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(38,22,12,'/dolibarrnew/comm/card.php?socid=','Dupont Alain','company'),(39,23,25,'/dolibarrnew/compta/paiement/card.php?id=','(paiement)','payment'),(40,23,10,'/dolibarrnew/comm/card.php?socid=','Smith Vick','company'),(41,24,26,'/compta/paiement/card.php?id=','(paiement)','payment'),(42,24,1,'/comm/card.php?socid=','ABC and Co','company'),(45,26,29,'/compta/paiement/card.php?id=','(paiement)','payment'),(46,26,1,'/comm/card.php?socid=','ABC and Co','company'),(47,27,30,'/compta/paiement/card.php?id=','(paiement)','payment'),(48,27,1,'/comm/card.php?socid=','ABC and Co','company'),(49,28,32,'/dolibarr_new/compta/paiement/card.php?id=','(paiement)','payment'),(50,28,1,'/dolibarr_new/comm/card.php?socid=','ABC and Co','company'),(51,29,33,'/dolibarr_new/compta/paiement/card.php?id=','(paiement)','payment'),(52,29,1,'/dolibarr_new/comm/card.php?socid=','ABC and Co','company'),(53,30,1,'/dolibarr_3.8/htdocs/fourn/paiement/card.php?id=','(paiement)','payment_supplier'),(54,30,1,'/dolibarr_3.8/htdocs/fourn/card.php?socid=','Indian SAS','company'); /*!40000 ALTER TABLE `llx_bank_url` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_bookkeeping` --- - -DROP TABLE IF EXISTS `llx_bookkeeping`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_bookkeeping` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `doc_date` date NOT NULL, - `doc_type` varchar(30) NOT NULL, - `doc_ref` varchar(30) NOT NULL, - `fk_doc` int(11) NOT NULL, - `fk_docdet` int(11) NOT NULL, - `code_tiers` varchar(24) DEFAULT NULL, - `numero_compte` varchar(50) DEFAULT NULL, - `label_compte` varchar(128) NOT NULL, - `debit` double NOT NULL, - `credit` double NOT NULL, - `montant` double NOT NULL, - `sens` varchar(1) DEFAULT NULL, - `fk_user_author` int(11) NOT NULL, - `import_key` varchar(14) DEFAULT NULL, - `code_journal` varchar(10) DEFAULT NULL, - `piece_num` int(11) NOT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_bookkeeping` --- - -LOCK TABLES `llx_bookkeeping` WRITE; -/*!40000 ALTER TABLE `llx_bookkeeping` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_bookkeeping` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_bookmark` -- @@ -1058,7 +927,7 @@ CREATE TABLE `llx_boxes` ( KEY `idx_boxes_boxid` (`box_id`), KEY `idx_boxes_fk_user` (`fk_user`), CONSTRAINT `fk_boxes_box_id` FOREIGN KEY (`box_id`) REFERENCES `llx_boxes_def` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=787 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=381 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1067,7 +936,7 @@ CREATE TABLE `llx_boxes` ( LOCK TABLES `llx_boxes` WRITE; /*!40000 ALTER TABLE `llx_boxes` DISABLE KEYS */; -INSERT INTO `llx_boxes` VALUES (12,1,20,0,'A09',0,NULL,NULL),(73,1,21,0,'B16',0,NULL,NULL),(153,1,288,0,'A21',0,NULL,NULL),(154,1,289,0,'A07',0,NULL,NULL),(155,1,290,0,'A17',0,NULL,NULL),(160,1,295,0,'A13',0,NULL,NULL),(161,1,296,0,'A15',0,NULL,NULL),(162,1,297,0,'B12',0,NULL,NULL),(163,1,298,0,'B20',0,NULL,NULL),(164,1,299,0,'B10',0,NULL,NULL),(177,1,309,0,'B18',0,NULL,NULL),(240,1,316,0,'A05',0,NULL,NULL),(241,1,317,0,'B04',0,NULL,NULL),(253,2,323,0,'0',0,NULL,NULL),(304,2,324,0,'0',0,NULL,NULL),(305,2,325,0,'0',0,NULL,NULL),(306,2,326,0,'0',0,NULL,NULL),(307,2,327,0,'0',0,NULL,NULL),(308,2,328,0,'0',0,NULL,NULL),(309,2,329,0,'0',0,NULL,NULL),(310,2,330,0,'0',0,NULL,NULL),(311,2,331,0,'0',0,NULL,NULL),(312,2,332,0,'0',0,NULL,NULL),(313,2,333,0,'0',0,NULL,NULL),(372,1,334,0,'0',0,NULL,NULL),(373,1,335,0,'0',0,NULL,NULL),(374,1,336,0,'0',0,NULL,NULL),(439,1,337,0,'0',0,NULL,NULL),(440,1,338,0,'0',0,NULL,NULL),(441,1,339,0,'0',0,NULL,NULL),(442,1,340,0,'0',0,NULL,NULL),(531,1,341,0,'0',0,NULL,NULL),(532,1,342,0,'0',0,NULL,NULL),(533,1,343,0,'0',0,NULL,NULL),(534,1,344,0,'0',0,NULL,NULL),(535,1,345,0,'0',0,NULL,NULL),(772,1,343,0,'A01',1,NULL,NULL),(773,1,342,0,'A02',1,NULL,NULL),(774,1,335,0,'A03',1,NULL,NULL),(775,1,339,0,'A04',1,NULL,NULL),(776,1,317,0,'A05',1,NULL,NULL),(777,1,299,0,'A06',1,NULL,NULL),(778,1,289,0,'A07',1,NULL,NULL),(779,1,336,0,'B01',1,NULL,NULL),(780,1,341,0,'B02',1,NULL,NULL),(781,1,340,0,'B03',1,NULL,NULL),(782,1,298,0,'B04',1,NULL,NULL),(783,1,295,0,'B05',1,NULL,NULL),(784,1,290,0,'B06',1,NULL,NULL),(785,1,297,0,'B07',1,NULL,NULL),(786,1,20,0,'B08',1,NULL,NULL); +INSERT INTO `llx_boxes` VALUES (253,2,323,0,'0',0,NULL,NULL),(304,2,324,0,'0',0,NULL,NULL),(305,2,325,0,'0',0,NULL,NULL),(306,2,326,0,'0',0,NULL,NULL),(307,2,327,0,'0',0,NULL,NULL),(308,2,328,0,'0',0,NULL,NULL),(309,2,329,0,'0',0,NULL,NULL),(310,2,330,0,'0',0,NULL,NULL),(311,2,331,0,'0',0,NULL,NULL),(312,2,332,0,'0',0,NULL,NULL),(313,2,333,0,'0',0,NULL,NULL),(314,1,347,0,'0',0,NULL,NULL),(315,1,348,0,'0',0,NULL,NULL),(316,1,349,0,'0',0,NULL,NULL),(317,1,350,0,'0',0,NULL,NULL),(323,1,353,0,'0',0,NULL,NULL),(324,1,354,0,'0',0,NULL,NULL),(325,1,355,0,'0',0,NULL,NULL),(326,1,356,0,'0',0,NULL,NULL),(327,1,357,0,'0',0,NULL,NULL),(328,1,358,0,'0',0,NULL,NULL),(335,1,365,0,'0',0,NULL,NULL),(336,1,366,0,'0',0,NULL,NULL),(344,1,374,0,'0',0,NULL,NULL),(346,1,376,0,'0',0,NULL,NULL),(347,1,377,0,'0',0,NULL,NULL),(348,1,378,0,'0',0,NULL,NULL),(349,1,379,0,'0',0,NULL,NULL),(354,1,384,0,'0',0,NULL,NULL),(355,1,385,0,'0',0,NULL,NULL),(356,1,386,0,'0',0,NULL,NULL),(357,1,387,0,'0',0,NULL,NULL),(358,1,388,0,'0',0,NULL,NULL),(359,1,389,0,'0',0,NULL,NULL),(360,1,390,0,'0',0,NULL,NULL),(361,1,391,0,'0',0,NULL,NULL),(362,1,392,0,'0',0,NULL,NULL),(363,1,393,0,'0',0,NULL,NULL),(364,1,394,0,'0',0,NULL,NULL),(365,1,395,0,'0',0,NULL,NULL),(366,1,396,0,'0',0,NULL,NULL),(376,1,387,0,'A01',12,NULL,NULL),(377,1,394,0,'A02',12,NULL,NULL),(378,1,347,0,'A03',12,NULL,NULL),(379,1,385,0,'B01',12,NULL,NULL),(380,1,386,0,'B02',12,NULL,NULL); /*!40000 ALTER TABLE `llx_boxes` ENABLE KEYS */; UNLOCK TABLES; @@ -1086,7 +955,7 @@ CREATE TABLE `llx_boxes_def` ( `note` varchar(130) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_boxes_def` (`file`,`entity`,`note`) -) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=397 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1095,7 +964,7 @@ CREATE TABLE `llx_boxes_def` ( LOCK TABLES `llx_boxes_def` WRITE; /*!40000 ALTER TABLE `llx_boxes_def` DISABLE KEYS */; -INSERT INTO `llx_boxes_def` VALUES (20,'box_actions.php',1,'2010-07-08 11:29:29',NULL),(21,'box_bookmarks.php',1,'2010-07-08 11:30:03',NULL),(188,'box_services_vendus.php',1,'2011-08-05 20:40:27',NULL),(288,'box_clients.php',1,'2012-12-21 17:08:59',NULL),(289,'box_prospect.php',1,'2012-12-21 17:08:59',NULL),(290,'box_contacts.php',1,'2012-12-21 17:08:59',NULL),(295,'box_propales.php',1,'2013-01-02 20:33:16',NULL),(296,'box_contracts.php',1,'2013-01-02 20:33:17',NULL),(297,'box_services_expired.php',1,'2013-01-02 20:33:17',NULL),(298,'box_services_contracts.php',1,'2013-01-02 20:33:17',NULL),(299,'box_commandes.php',1,'2013-01-02 20:33:19',NULL),(309,'box_activity.php',1,'2013-01-16 15:37:16','(WarningUsingThisBoxSlowDown)'),(316,'box_produits.php',1,'2013-01-19 17:16:10',NULL),(317,'box_produits_alerte_stock.php',1,'2013-01-19 17:16:10',NULL),(323,'box_actions.php',2,'2013-03-13 15:29:19',NULL),(324,'box_clients.php',2,'2013-03-13 20:21:35',NULL),(325,'box_prospect.php',2,'2013-03-13 20:21:35',NULL),(326,'box_contacts.php',2,'2013-03-13 20:21:35',NULL),(327,'box_activity.php',2,'2013-03-13 20:21:35','(WarningUsingThisBoxSlowDown)'),(328,'box_propales.php',2,'2013-03-13 20:32:38',NULL),(329,'box_comptes.php',2,'2013-03-13 20:33:09',NULL),(330,'box_factures_imp.php',2,'2013-03-13 20:33:09',NULL),(331,'box_factures.php',2,'2013-03-13 20:33:09',NULL),(332,'box_produits.php',2,'2013-03-13 20:33:09',NULL),(333,'box_produits_alerte_stock.php',2,'2013-03-13 20:33:09',NULL),(334,'box_factures_imp.php',1,'2013-03-20 20:04:28',NULL),(335,'box_factures.php',1,'2013-03-20 20:04:28',NULL),(336,'box_comptes.php',1,'2013-03-20 20:04:28',NULL),(337,'box_fournisseurs.php',1,'2013-03-22 09:24:29',NULL),(338,'box_factures_fourn_imp.php',1,'2013-03-22 09:24:29',NULL),(339,'box_factures_fourn.php',1,'2013-03-22 09:24:29',NULL),(340,'box_supplier_orders.php',1,'2013-03-22 09:24:29',NULL),(341,'box_graph_product_distribution.php',1,'2013-11-06 23:35:12',NULL),(342,'box_graph_orders_permonth.php',1,'2013-11-06 23:35:12',NULL),(343,'box_graph_invoices_permonth.php',1,'2013-11-06 23:35:12',NULL),(344,'box_graph_invoices_supplier_permonth.php',1,'2013-11-06 23:35:12',NULL),(345,'box_graph_orders_supplier_permonth.php',1,'2013-11-06 23:35:12',NULL),(346,'box_googlemaps@google',1,'2013-11-07 00:01:39',NULL); +INSERT INTO `llx_boxes_def` VALUES (188,'box_services_vendus.php',1,'2011-08-05 20:40:27',NULL),(323,'box_actions.php',2,'2013-03-13 15:29:19',NULL),(324,'box_clients.php',2,'2013-03-13 20:21:35',NULL),(325,'box_prospect.php',2,'2013-03-13 20:21:35',NULL),(326,'box_contacts.php',2,'2013-03-13 20:21:35',NULL),(327,'box_activity.php',2,'2013-03-13 20:21:35','(WarningUsingThisBoxSlowDown)'),(328,'box_propales.php',2,'2013-03-13 20:32:38',NULL),(329,'box_comptes.php',2,'2013-03-13 20:33:09',NULL),(330,'box_factures_imp.php',2,'2013-03-13 20:33:09',NULL),(331,'box_factures.php',2,'2013-03-13 20:33:09',NULL),(332,'box_produits.php',2,'2013-03-13 20:33:09',NULL),(333,'box_produits_alerte_stock.php',2,'2013-03-13 20:33:09',NULL),(346,'box_googlemaps@google',1,'2013-11-07 00:01:39',NULL),(347,'box_clients.php',1,'2015-11-15 22:05:57',NULL),(348,'box_prospect.php',1,'2015-11-15 22:05:57',NULL),(349,'box_contacts.php',1,'2015-11-15 22:05:57',NULL),(350,'box_activity.php',1,'2015-11-15 22:05:57','(WarningUsingThisBoxSlowDown)'),(353,'box_graph_invoices_supplier_permonth.php',1,'2015-11-15 22:38:25',NULL),(354,'box_graph_orders_supplier_permonth.php',1,'2015-11-15 22:38:25',NULL),(355,'box_fournisseurs.php',1,'2015-11-15 22:38:25',NULL),(356,'box_factures_fourn_imp.php',1,'2015-11-15 22:38:25',NULL),(357,'box_factures_fourn.php',1,'2015-11-15 22:38:25',NULL),(358,'box_supplier_orders.php',1,'2015-11-15 22:38:25',NULL),(365,'box_commandes.php',1,'2015-11-15 22:38:28',NULL),(366,'box_graph_orders_permonth.php',1,'2015-11-15 22:38:28',NULL),(374,'box_services_contracts.php',1,'2015-11-15 22:38:37',NULL),(376,'box_actions.php',1,'2015-11-15 22:38:40',NULL),(377,'box_project.php',1,'2015-11-15 22:38:44',NULL),(378,'box_task.php',1,'2015-11-15 22:38:44',NULL),(379,'box_members.php',1,'2015-11-15 22:39:17',NULL),(384,'box_factures_imp.php',1,'2015-11-15 22:39:46',NULL),(385,'box_factures.php',1,'2015-11-15 22:39:46',NULL),(386,'box_graph_invoices_permonth.php',1,'2015-11-15 22:39:46',NULL),(387,'box_comptes.php',1,'2015-11-15 22:39:46',NULL),(388,'box_contracts.php',1,'2015-11-15 22:39:52',NULL),(389,'box_services_expired.php',1,'2015-11-15 22:39:52',NULL),(390,'box_ficheinter.php',1,'2015-11-15 22:39:56',NULL),(391,'box_bookmarks.php',1,'2015-11-15 22:40:51',NULL),(392,'box_graph_propales_permonth.php',1,'2015-11-15 22:41:47',NULL),(393,'box_propales.php',1,'2015-11-15 22:41:47',NULL),(394,'box_produits.php',1,'2015-11-15 22:41:47',NULL),(395,'box_produits_alerte_stock.php',1,'2015-11-15 22:41:47',NULL),(396,'box_graph_product_distribution.php',1,'2015-11-15 22:41:47',NULL); /*!40000 ALTER TABLE `llx_boxes_def` ENABLE KEYS */; UNLOCK TABLES; @@ -1116,7 +985,7 @@ CREATE TABLE `llx_c_action_trigger` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_action_trigger_code` (`code`), KEY `idx_action_trigger_rang` (`rang`) -) ENGINE=InnoDB AUTO_INCREMENT=91 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=174 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1125,7 +994,7 @@ CREATE TABLE `llx_c_action_trigger` ( LOCK TABLES `llx_c_action_trigger` WRITE; /*!40000 ALTER TABLE `llx_c_action_trigger` DISABLE KEYS */; -INSERT INTO `llx_c_action_trigger` VALUES (1,'FICHINTER_VALIDATE','Validation fiche intervention','Executed when a intervention is validated','ficheinter',18),(2,'BILL_VALIDATE','Validation facture client','Executed when a customer invoice is approved','facture',6),(3,'ORDER_SUPPLIER_APPROVE','Approbation commande fournisseur','Executed when a supplier order is approved','order_supplier',11),(4,'ORDER_SUPPLIER_REFUSE','Refus commande fournisseur','Executed when a supplier order is refused','order_supplier',12),(5,'ORDER_VALIDATE','Validation commande client','Executed when a customer order is validated','commande',4),(6,'PROPAL_VALIDATE','Validation proposition client','Executed when a commercial proposal is validated','propal',2),(9,'COMPANY_SENTBYMAIL','Mails sent from third party card','Executed when you send email from third party card','societe',1),(10,'COMPANY_CREATE','Third party created','Executed when a third party is created','societe',1),(11,'CONTRACT_VALIDATE','Contract validated','Executed when a contract is validated','contrat',17),(12,'PROPAL_SENTBYMAIL','Commercial proposal sent by mail','Executed when a commercial proposal is sent by mail','propal',3),(13,'ORDER_SENTBYMAIL','Customer order sent by mail','Executed when a customer order is sent by mail ','commande',5),(14,'BILL_PAYED','Customer invoice payed','Executed when a customer invoice is payed','facture',7),(15,'BILL_CANCEL','Customer invoice canceled','Executed when a customer invoice is conceled','facture',8),(16,'BILL_SENTBYMAIL','Customer invoice sent by mail','Executed when a customer invoice is sent by mail','facture',9),(17,'ORDER_SUPPLIER_VALIDATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',10),(18,'ORDER_SUPPLIER_SENTBYMAIL','Supplier order sent by mail','Executed when a supplier order is sent by mail','order_supplier',13),(19,'BILL_SUPPLIER_VALIDATE','Supplier invoice validated','Executed when a supplier invoice is validated','invoice_supplier',14),(20,'BILL_SUPPLIER_PAYED','Supplier invoice payed','Executed when a supplier invoice is payed','invoice_supplier',15),(21,'BILL_SUPPLIER_SENTBYMAIL','Supplier invoice sent by mail','Executed when a supplier invoice is sent by mail','invoice_supplier',16),(22,'SHIPPING_VALIDATE','Shipping validated','Executed when a shipping is validated','shipping',19),(23,'SHIPPING_SENTBYMAIL','Shipping sent by mail','Executed when a shipping is sent by mail','shipping',20),(24,'MEMBER_VALIDATE','Member validated','Executed when a member is validated','member',21),(25,'MEMBER_SUBSCRIPTION','Member subscribed','Executed when a member is subscribed','member',22),(26,'MEMBER_RESILIATE','Member resiliated','Executed when a member is resiliated','member',23),(27,'MEMBER_DELETE','Member deleted','Executed when a member is deleted','member',24),(28,'BILL_UNVALIDATE','Customer invoice unvalidated','Executed when a customer invoice status set back to draft','facture',10),(29,'FICHINTER_SENTBYMAIL','Intervention sent by mail','Executed when a intervention is sent by mail','ficheinter',29),(30,'PROJECT_CREATE','Project creation','Executed when a project is created','project',30),(31,'PROPAL_CLOSE_SIGNED','Customer proposal closed signed','Executed when a customer proposal is closed signed','propal',31),(32,'PROPAL_CLOSE_REFUSED','Customer proposal closed refused','Executed when a customer proposal is closed refused','propal',32),(33,'BILL_SUPPLIER_CANCELED','Supplier invoice cancelled','Executed when a supplier invoice is cancelled','invoice_supplier',33),(34,'MEMBER_MODIFY','Member modified','Executed when a member is modified','member',34),(35,'TASK_CREATE','Task created','Executed when a project task is created','project',35),(36,'TASK_MODIFY','Task modified','Executed when a project task is modified','project',36),(37,'TASK_DELETE','Task deleted','Executed when a project task is deleted','project',37),(38,'FICHINTER_CLASSIFY_BILLED','Intervention set billed','Executed when a intervention is set to billed (when option FICHINTER_CLASSIFY_BILLED is set)','ficheinter',19),(39,'FICHINTER_CLASSIFY_UNBILLED','Intervention set unbilled','Executed when a intervention is set to unbilled (when option FICHINTER_CLASSIFY_BILLED is set)','ficheinter',19),(41,'FICHINTER_REOPEN','Intervention opened','Executed when a intervention is re-opened','ficheinter',19),(42,'PROPAL_CLASSIFY_BILLED','Customer proposal set billed','Executed when a customer proposal is set to billed','propal',2),(48,'ORDER_CLOSE','Customer order classify delivered','Executed when a customer order is set delivered','commande',5),(49,'ORDER_CLASSIFY_BILLED','Customer order classify billed','Executed when a customer order is set to billed','commande',5),(50,'ORDER_CANCEL','Customer order canceled','Executed when a customer order is canceled','commande',5),(90,'BILL_SUPPLIER_UNVALIDATE','Supplier invoice unvalidated','Executed when a supplier invoice status is set back to draft','invoice_supplier',15); +INSERT INTO `llx_c_action_trigger` VALUES (131,'COMPANY_SENTBYMAIL','Mails sent from third party card','Executed when you send email from third party card','societe',1),(132,'COMPANY_CREATE','Third party created','Executed when a third party is created','societe',1),(133,'PROPAL_VALIDATE','Customer proposal validated','Executed when a commercial proposal is validated','propal',2),(134,'PROPAL_SENTBYMAIL','Commercial proposal sent by mail','Executed when a commercial proposal is sent by mail','propal',3),(135,'ORDER_VALIDATE','Customer order validate','Executed when a customer order is validated','commande',4),(136,'ORDER_CLOSE','Customer order classify delivered','Executed when a customer order is set delivered','commande',5),(137,'ORDER_CLASSIFY_BILLED','Customer order classify billed','Executed when a customer order is set to billed','commande',5),(138,'ORDER_CANCEL','Customer order canceled','Executed when a customer order is canceled','commande',5),(139,'ORDER_SENTBYMAIL','Customer order sent by mail','Executed when a customer order is sent by mail ','commande',5),(140,'BILL_VALIDATE','Customer invoice validated','Executed when a customer invoice is approved','facture',6),(141,'BILL_PAYED','Customer invoice payed','Executed when a customer invoice is payed','facture',7),(142,'BILL_CANCEL','Customer invoice canceled','Executed when a customer invoice is conceled','facture',8),(143,'BILL_SENTBYMAIL','Customer invoice sent by mail','Executed when a customer invoice is sent by mail','facture',9),(144,'BILL_UNVALIDATE','Customer invoice unvalidated','Executed when a customer invoice status set back to draft','facture',10),(145,'ORDER_SUPPLIER_VALIDATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',11),(146,'ORDER_SUPPLIER_APPROVE','Supplier order request approved','Executed when a supplier order is approved','order_supplier',12),(147,'ORDER_SUPPLIER_REFUSE','Supplier order request refused','Executed when a supplier order is refused','order_supplier',13),(148,'ORDER_SUPPLIER_SENTBYMAIL','Supplier order sent by mail','Executed when a supplier order is sent by mail','order_supplier',14),(149,'BILL_SUPPLIER_VALIDATE','Supplier invoice validated','Executed when a supplier invoice is validated','invoice_supplier',15),(150,'BILL_SUPPLIER_PAYED','Supplier invoice payed','Executed when a supplier invoice is payed','invoice_supplier',16),(151,'BILL_SUPPLIER_SENTBYMAIL','Supplier invoice sent by mail','Executed when a supplier invoice is sent by mail','invoice_supplier',17),(152,'BILL_SUPPLIER_CANCELED','Supplier invoice cancelled','Executed when a supplier invoice is cancelled','invoice_supplier',17),(153,'CONTRACT_VALIDATE','Contract validated','Executed when a contract is validated','contrat',18),(154,'SHIPPING_VALIDATE','Shipping validated','Executed when a shipping is validated','shipping',20),(155,'SHIPPING_SENTBYMAIL','Shipping sent by mail','Executed when a shipping is sent by mail','shipping',21),(156,'MEMBER_VALIDATE','Member validated','Executed when a member is validated','member',22),(157,'MEMBER_SUBSCRIPTION','Member subscribed','Executed when a member is subscribed','member',23),(158,'MEMBER_RESILIATE','Member resiliated','Executed when a member is resiliated','member',24),(159,'MEMBER_MODIFY','Member modified','Executed when a member is modified','member',24),(160,'MEMBER_DELETE','Member deleted','Executed when a member is deleted','member',25),(161,'FICHINTER_VALIDATE','Intervention validated','Executed when a intervention is validated','ficheinter',19),(162,'FICHINTER_CLASSIFY_BILLED','Intervention set billed','Executed when a intervention is set to billed (when option FICHINTER_CLASSIFY_BILLED is set)','ficheinter',19),(163,'FICHINTER_CLASSIFY_UNBILLED','Intervention set unbilled','Executed when a intervention is set to unbilled (when option FICHINTER_CLASSIFY_BILLED is set)','ficheinter',19),(164,'FICHINTER_REOPEN','Intervention opened','Executed when a intervention is re-opened','ficheinter',19),(165,'FICHINTER_SENTBYMAIL','Intervention sent by mail','Executed when a intervention is sent by mail','ficheinter',19),(166,'PROJECT_CREATE','Project creation','Executed when a project is created','project',30),(167,'PROPAL_CLOSE_SIGNED','Customer proposal closed signed','Executed when a customer proposal is closed signed','propal',2),(168,'PROPAL_CLOSE_REFUSED','Customer proposal closed refused','Executed when a customer proposal is closed refused','propal',2),(169,'PROPAL_CLASSIFY_BILLED','Customer proposal set billed','Executed when a customer proposal is set to billed','propal',2),(170,'TASK_CREATE','Task created','Executed when a project task is created','project',35),(171,'TASK_MODIFY','Task modified','Executed when a project task is modified','project',36),(172,'TASK_DELETE','Task deleted','Executed when a project task is deleted','project',37),(173,'BILL_SUPPLIER_UNVALIDATE','Supplier invoice unvalidated','Executed when a supplier invoice status is set back to draft','invoice_supplier',15); /*!40000 ALTER TABLE `llx_c_action_trigger` ENABLE KEYS */; UNLOCK TABLES; @@ -1213,7 +1082,7 @@ CREATE TABLE `llx_c_barcode_type` ( LOCK TABLES `llx_c_barcode_type` WRITE; /*!40000 ALTER TABLE `llx_c_barcode_type` DISABLE KEYS */; -INSERT INTO `llx_c_barcode_type` VALUES (1,'EAN8',1,'EAN8','0','1234567'),(2,'EAN13',1,'EAN13','0','123456789012'),(3,'UPC',1,'UPC','0','123456789012'),(4,'ISBN',1,'ISBN','0','123456789'),(5,'C39',1,'Code 39','0','1234567890'),(6,'C128',1,'Code 128','0','ABCD1234567890'),(13,'DATAMATRIX',1,'Datamatrix','0','1234567xyz'),(14,'QRCODE',1,'Qr Code','0','www.dolibarr.org'); +INSERT INTO `llx_c_barcode_type` VALUES (1,'EAN8',1,'EAN8','0','1234567'),(2,'EAN13',1,'EAN13','phpbarcode','123456789012'),(3,'UPC',1,'UPC','0','123456789012'),(4,'ISBN',1,'ISBN','0','123456789'),(5,'C39',1,'Code 39','0','1234567890'),(6,'C128',1,'Code 128','tcpdfbarcode','ABCD1234567890'),(13,'DATAMATRIX',1,'Datamatrix','0','1234567xyz'),(14,'QRCODE',1,'Qr Code','0','www.dolibarr.org'); /*!40000 ALTER TABLE `llx_c_barcode_type` ENABLE KEYS */; UNLOCK TABLES; @@ -1247,33 +1116,6 @@ INSERT INTO `llx_c_chargesociales` VALUES (1,'Allocations familiales',1,1,'TAXFA /*!40000 ALTER TABLE `llx_c_chargesociales` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_c_civilite` --- - -DROP TABLE IF EXISTS `llx_c_civilite`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_c_civilite` ( - `rowid` int(11) NOT NULL, - `code` varchar(6) NOT NULL, - `civilite` varchar(50) DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', - `module` varchar(32) DEFAULT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_c_civilite` --- - -LOCK TABLES `llx_c_civilite` WRITE; -/*!40000 ALTER TABLE `llx_c_civilite` DISABLE KEYS */; -INSERT INTO `llx_c_civilite` VALUES (1,'MME','Madame',1,NULL),(3,'MR','Monsieur',1,NULL),(5,'MLE','Mademoiselle',1,NULL),(7,'MTRE','Maître',1,NULL),(8,'DR','Docteur',1,NULL); -/*!40000 ALTER TABLE `llx_c_civilite` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_c_civility` -- @@ -1345,7 +1187,8 @@ CREATE TABLE `llx_c_currencies` ( `label` varchar(64) NOT NULL, `unicode` varchar(32) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', - PRIMARY KEY (`code_iso`) + PRIMARY KEY (`code_iso`), + UNIQUE KEY `uk_c_currencies_code_iso` (`code_iso`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1355,7 +1198,7 @@ CREATE TABLE `llx_c_currencies` ( LOCK TABLES `llx_c_currencies` WRITE; /*!40000 ALTER TABLE `llx_c_currencies` DISABLE KEYS */; -INSERT INTO `llx_c_currencies` VALUES ('AED','United Arab Emirates Dirham',NULL,1),('AFN','Afghanistan Afghani','[1547]',1),('ALL','Albania Leklll','[76,101,107]',1),('ANG','Netherlands Antilles Guilder','[402]',1),('ARP','Pesos argentins',NULL,0),('ARS','Argentino Peso','[36]',1),('ATS','Shiliing autrichiens',NULL,0),('AUD','Australia Dollar','[36]',1),('AWG','Aruba Guilder','[402]',1),('AZN','Azerbaijan New Manat','[1084,1072,1085]',1),('BAM','Bosnia and Herzegovina Convertible Marka','[75,77]',1),('BBD','Barbados Dollar','[36]',1),('BEF','Francs belges',NULL,0),('BGN','Bulgaria Lev','[1083,1074]',1),('BMD','Bermuda Dollar','[36]',1),('BND','Brunei Darussalam Dollar','[36]',1),('BOB','Bolivia Boliviano','[36,98]',1),('BRL','Brazil Real','[82,36]',1),('BSD','Bahamas Dollar','[36]',1),('BWP','Botswana Pula','[80]',1),('BYR','Belarus Ruble','[112,46]',1),('BZD','Belize Dollar','[66,90,36]',1),('CAD','Canada Dollar','[36]',1),('CHF','Switzerland Franc','[67,72,70]',1),('CLP','Chile Peso','[36]',1),('CNY','China Yuan Renminbi','[165]',1),('COP','Colombia Peso','[36]',1),('CRC','Costa Rica Colon','[8353]',1),('CUP','Cuba Peso','[8369]',1),('CZK','Czech Republic Koruna','[75,269]',1),('DEM','Deutsch mark',NULL,0),('DKK','Denmark Krone','[107,114]',1),('DOP','Dominican Republic Peso','[82,68,36]',1),('DZD','Algeria Dinar',NULL,1),('EEK','Estonia Kroon','[107,114]',1),('EGP','Egypt Pound','[163]',1),('ESP','Pesete',NULL,0),('EUR','Euro Member Countries','[8364]',1),('FIM','Mark finlandais',NULL,0),('FJD','Fiji Dollar','[36]',1),('FKP','Falkland Islands (Malvinas) Pound','[163]',1),('FRF','Francs francais',NULL,0),('GBP','United Kingdom Pound','[163]',1),('GGP','Guernsey Pound','[163]',1),('GHC','Ghana Cedis','[162]',1),('GIP','Gibraltar Pound','[163]',1),('GRD','Drachme (grece)',NULL,0),('GTQ','Guatemala Quetzal','[81]',1),('GYD','Guyana Dollar','[36]',1),('hhh','ddd','[]',1),('HKD','Hong Kong Dollar','[36]',1),('HNL','Honduras Lempira','[76]',1),('HRK','Croatia Kuna','[107,110]',1),('HUF','Hungary Forint','[70,116]',1),('IDR','Indonesia Rupiah','[82,112]',1),('IEP','Livres irlandaises',NULL,0),('ILS','Israel Shekel','[8362]',1),('IMP','Isle of Man Pound','[163]',1),('INR','India Rupee',NULL,1),('IRR','Iran Rial','[65020]',1),('ISK','Iceland Krona','[107,114]',1),('ITL','Lires',NULL,0),('JEP','Jersey Pound','[163]',1),('JMD','Jamaica Dollar','[74,36]',1),('JPY','Japan Yen','[165]',1),('KGS','Kyrgyzstan Som','[1083,1074]',1),('KHR','Cambodia Riel','[6107]',1),('KPW','Korea (North) Won','[8361]',1),('KRW','Korea (South) Won','[8361]',1),('KYD','Cayman Islands Dollar','[36]',1),('KZT','Kazakhstan Tenge','[1083,1074]',1),('LAK','Laos Kip','[8365]',1),('LBP','Lebanon Pound','[163]',1),('LKR','Sri Lanka Rupee','[8360]',1),('LRD','Liberia Dollar','[36]',1),('LTL','Lithuania Litas','[76,116]',1),('LUF','Francs luxembourgeois',NULL,0),('LVL','Latvia Lat','[76,115]',1),('MAD','Morocco Dirham',NULL,1),('MKD','Macedonia Denar','[1076,1077,1085]',1),('MNT','Mongolia Tughrik','[8366]',1),('MRO','Mauritania Ouguiya',NULL,1),('MUR','Mauritius Rupee','[8360]',1),('MXN','Mexico Peso','[36]',1),('MXP','Pesos Mexicans',NULL,0),('MYR','Malaysia Ringgit','[82,77]',1),('MZN','Mozambique Metical','[77,84]',1),('NAD','Namibia Dollar','[36]',1),('NGN','Nigeria Naira','[8358]',1),('NIO','Nicaragua Cordoba','[67,36]',1),('NLG','Florins',NULL,0),('NOK','Norway Krone','[107,114]',1),('NPR','Nepal Rupee','[8360]',1),('NZD','New Zealand Dollar','[36]',1),('OMR','Oman Rial','[65020]',1),('PAB','Panama Balboa','[66,47,46]',1),('PEN','Peru Nuevo Sol','[83,47,46]',1),('PHP','Philippines Peso','[8369]',1),('PKR','Pakistan Rupee','[8360]',1),('PLN','Poland Zloty','[122,322]',1),('PTE','Escudos',NULL,0),('PYG','Paraguay Guarani','[71,115]',1),('QAR','Qatar Riyal','[65020]',1),('RON','Romania New Leu','[108,101,105]',1),('RSD','Serbia Dinar','[1044,1080,1085,46]',1),('RUB','Russia Ruble','[1088,1091,1073]',1),('SAR','Saudi Arabia Riyal','[65020]',1),('SBD','Solomon Islands Dollar','[36]',1),('SCR','Seychelles Rupee','[8360]',1),('SEK','Sweden Krona','[107,114]',1),('SGD','Singapore Dollar','[36]',1),('SHP','Saint Helena Pound','[163]',1),('SKK','Couronnes slovaques',NULL,0),('SOS','Somalia Shilling','[83]',1),('SRD','Suriname Dollar','[36]',1),('SUR','Rouble',NULL,0),('SVC','El Salvador Colon','[36]',1),('SYP','Syria Pound','[163]',1),('THB','Thailand Baht','[3647]',1),('TND','Tunisia Dinar',NULL,1),('TRL','Turkey Lira','[84,76]',1),('TRY','Turkey Lira','[8356]',1),('TTD','Trinidad and Tobago Dollar','[84,84,36]',1),('TVD','Tuvalu Dollar','[36]',1),('TWD','Taiwan New Dollar','[78,84,36]',1),('UAH','Ukraine Hryvna','[8372]',1),('USD','United States Dollar','[36]',1),('UYU','Uruguay Peso','[36,85]',1),('UZS','Uzbekistan Som','[1083,1074]',1),('VEF','Venezuela Bolivar Fuerte','[66,115]',1),('VND','Viet Nam Dong','[8363]',1),('XAF','Communaute Financiere Africaine (BEAC) CFA Franc',NULL,1),('XCD','East Caribbean Dollar','[36]',1),('XEU','Ecus',NULL,0),('XOF','Communaute Financiere Africaine (BCEAO) Franc',NULL,1),('YER','Yemen Rial','[65020]',1),('ZAR','South Africa Rand','[82]',1),('ZWD','Zimbabwe Dollar','[90,36]',1); +INSERT INTO `llx_c_currencies` VALUES ('AED','United Arab Emirates Dirham',NULL,1),('AFN','Afghanistan Afghani','[1547]',1),('ALL','Albania Leklll','[76,101,107]',1),('ANG','Netherlands Antilles Guilder','[402]',1),('ARP','Pesos argentins',NULL,0),('ARS','Argentino Peso','[36]',1),('ATS','Shiliing autrichiens',NULL,0),('AUD','Australia Dollar','[36]',1),('AWG','Aruba Guilder','[402]',1),('AZN','Azerbaijan New Manat','[1084,1072,1085]',1),('BAM','Bosnia and Herzegovina Convertible Marka','[75,77]',1),('BBD','Barbados Dollar','[36]',1),('BEF','Francs belges',NULL,0),('BGN','Bulgaria Lev','[1083,1074]',1),('BMD','Bermuda Dollar','[36]',1),('BND','Brunei Darussalam Dollar','[36]',1),('BOB','Bolivia Boliviano','[36,98]',1),('BRL','Brazil Real','[82,36]',1),('BSD','Bahamas Dollar','[36]',1),('BWP','Botswana Pula','[80]',1),('BYR','Belarus Ruble','[112,46]',1),('BZD','Belize Dollar','[66,90,36]',1),('CAD','Canada Dollar','[36]',1),('CHF','Switzerland Franc','[67,72,70]',1),('CLP','Chile Peso','[36]',1),('CNY','China Yuan Renminbi','[165]',1),('COP','Colombia Peso','[36]',1),('CRC','Costa Rica Colon','[8353]',1),('CUP','Cuba Peso','[8369]',1),('CZK','Czech Republic Koruna','[75,269]',1),('DEM','Deutsch mark',NULL,0),('DKK','Denmark Krone','[107,114]',1),('DOP','Dominican Republic Peso','[82,68,36]',1),('DZD','Algeria Dinar',NULL,1),('EEK','Estonia Kroon','[107,114]',1),('EGP','Egypt Pound','[163]',1),('ESP','Pesete',NULL,0),('EUR','Euro Member Countries','[8364]',1),('FIM','Mark finlandais',NULL,0),('FJD','Fiji Dollar','[36]',1),('FKP','Falkland Islands (Malvinas) Pound','[163]',1),('FRF','Francs francais',NULL,0),('GBP','United Kingdom Pound','[163]',1),('GGP','Guernsey Pound','[163]',1),('GHC','Ghana Cedis','[162]',1),('GIP','Gibraltar Pound','[163]',1),('GRD','Drachme (grece)',NULL,0),('GTQ','Guatemala Quetzal','[81]',1),('GYD','Guyana Dollar','[36]',1),('hhh','ddd','[]',1),('HKD','Hong Kong Dollar','[36]',1),('HNL','Honduras Lempira','[76]',1),('HRK','Croatia Kuna','[107,110]',1),('HUF','Hungary Forint','[70,116]',1),('IDR','Indonesia Rupiah','[82,112]',1),('IEP','Livres irlandaises',NULL,0),('ILS','Israel Shekel','[8362]',1),('IMP','Isle of Man Pound','[163]',1),('INR','India Rupee',NULL,1),('IRR','Iran Rial','[65020]',1),('ISK','Iceland Krona','[107,114]',1),('ITL','Lires',NULL,0),('JEP','Jersey Pound','[163]',1),('JMD','Jamaica Dollar','[74,36]',1),('JPY','Japan Yen','[165]',1),('KES','Kenya Shilling',NULL,1),('KGS','Kyrgyzstan Som','[1083,1074]',1),('KHR','Cambodia Riel','[6107]',1),('KPW','Korea (North) Won','[8361]',1),('KRW','Korea (South) Won','[8361]',1),('KYD','Cayman Islands Dollar','[36]',1),('KZT','Kazakhstan Tenge','[1083,1074]',1),('LAK','Laos Kip','[8365]',1),('LBP','Lebanon Pound','[163]',1),('LKR','Sri Lanka Rupee','[8360]',1),('LRD','Liberia Dollar','[36]',1),('LTL','Lithuania Litas','[76,116]',1),('LUF','Francs luxembourgeois',NULL,0),('LVL','Latvia Lat','[76,115]',1),('MAD','Morocco Dirham',NULL,1),('MKD','Macedonia Denar','[1076,1077,1085]',1),('MNT','Mongolia Tughrik','[8366]',1),('MRO','Mauritania Ouguiya',NULL,1),('MUR','Mauritius Rupee','[8360]',1),('MXN','Mexico Peso','[36]',1),('MXP','Pesos Mexicans',NULL,0),('MYR','Malaysia Ringgit','[82,77]',1),('MZN','Mozambique Metical','[77,84]',1),('NAD','Namibia Dollar','[36]',1),('NGN','Nigeria Naira','[8358]',1),('NIO','Nicaragua Cordoba','[67,36]',1),('NLG','Florins',NULL,0),('NOK','Norway Krone','[107,114]',1),('NPR','Nepal Rupee','[8360]',1),('NZD','New Zealand Dollar','[36]',1),('OMR','Oman Rial','[65020]',1),('PAB','Panama Balboa','[66,47,46]',1),('PEN','Peru Nuevo Sol','[83,47,46]',1),('PHP','Philippines Peso','[8369]',1),('PKR','Pakistan Rupee','[8360]',1),('PLN','Poland Zloty','[122,322]',1),('PTE','Escudos',NULL,0),('PYG','Paraguay Guarani','[71,115]',1),('QAR','Qatar Riyal','[65020]',1),('RON','Romania New Leu','[108,101,105]',1),('RSD','Serbia Dinar','[1044,1080,1085,46]',1),('RUB','Russia Ruble','[1088,1091,1073]',1),('SAR','Saudi Arabia Riyal','[65020]',1),('SBD','Solomon Islands Dollar','[36]',1),('SCR','Seychelles Rupee','[8360]',1),('SEK','Sweden Krona','[107,114]',1),('SGD','Singapore Dollar','[36]',1),('SHP','Saint Helena Pound','[163]',1),('SKK','Couronnes slovaques',NULL,0),('SOS','Somalia Shilling','[83]',1),('SRD','Suriname Dollar','[36]',1),('SUR','Rouble',NULL,0),('SVC','El Salvador Colon','[36]',1),('SYP','Syria Pound','[163]',1),('THB','Thailand Baht','[3647]',1),('TND','Tunisia Dinar',NULL,1),('TRL','Turkey Lira','[84,76]',1),('TRY','Turkey Lira','[8356]',1),('TTD','Trinidad and Tobago Dollar','[84,84,36]',1),('TVD','Tuvalu Dollar','[36]',1),('TWD','Taiwan New Dollar','[78,84,36]',1),('UAH','Ukraine Hryvna','[8372]',1),('USD','United States Dollar','[36]',1),('UYU','Uruguay Peso','[36,85]',1),('UZS','Uzbekistan Som','[1083,1074]',1),('VEF','Venezuela Bolivar Fuerte','[66,115]',1),('VND','Viet Nam Dong','[8363]',1),('XAF','Communaute Financiere Africaine (BEAC) CFA Franc',NULL,1),('XCD','East Caribbean Dollar','[36]',1),('XEU','Ecus',NULL,0),('XOF','Communaute Financiere Africaine (BCEAO) Franc',NULL,1),('XPF','Franc pacifique (XPF)',NULL,1),('YER','Yemen Rial','[65020]',1),('ZAR','South Africa Rand','[82]',1),('ZWD','Zimbabwe Dollar','[90,36]',1); /*!40000 ALTER TABLE `llx_c_currencies` ENABLE KEYS */; UNLOCK TABLES; @@ -1378,8 +1221,9 @@ CREATE TABLE `llx_c_departements` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_departements` (`code_departement`,`fk_region`), KEY `idx_departements_fk_region` (`fk_region`), - CONSTRAINT `fk_departements_code_region` FOREIGN KEY (`fk_region`) REFERENCES `llx_c_regions` (`code_region`) -) ENGINE=InnoDB AUTO_INCREMENT=1282 DEFAULT CHARSET=utf8; + CONSTRAINT `fk_departements_code_region` FOREIGN KEY (`fk_region`) REFERENCES `llx_c_regions` (`code_region`), + CONSTRAINT `fk_departements_fk_region` FOREIGN KEY (`fk_region`) REFERENCES `llx_c_regions` (`code_region`) +) ENGINE=InnoDB AUTO_INCREMENT=1927 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1388,7 +1232,7 @@ CREATE TABLE `llx_c_departements` ( LOCK TABLES `llx_c_departements` WRITE; /*!40000 ALTER TABLE `llx_c_departements` DISABLE KEYS */; -INSERT INTO `llx_c_departements` VALUES (1,'0',0,'0',0,'-','-',1),(2,'01',82,'01053',5,'AIN','Ain',1),(3,'02',22,'02408',5,'AISNE','Aisne',1),(4,'03',83,'03190',5,'ALLIER','Allier',1),(5,'04',93,'04070',4,'ALPES-DE-HAUTE-PROVENCE','Alpes-de-Haute-Provence',1),(6,'05',93,'05061',4,'HAUTES-ALPES','Hautes-Alpes',1),(7,'06',93,'06088',4,'ALPES-MARITIMES','Alpes-Maritimes',1),(8,'07',82,'07186',5,'ARDECHE','Ardèche',1),(9,'08',21,'08105',4,'ARDENNES','Ardennes',1),(10,'09',73,'09122',5,'ARIEGE','Ariège',1),(11,'10',21,'10387',5,'AUBE','Aube',1),(12,'11',91,'11069',5,'AUDE','Aude',1),(13,'12',73,'12202',5,'AVEYRON','Aveyron',1),(14,'13',93,'13055',4,'BOUCHES-DU-RHONE','Bouches-du-Rhône',1),(15,'14',25,'14118',2,'CALVADOS','Calvados',1),(16,'15',83,'15014',2,'CANTAL','Cantal',1),(17,'16',54,'16015',3,'CHARENTE','Charente',1),(18,'17',54,'17300',3,'CHARENTE-MARITIME','Charente-Maritime',1),(19,'18',24,'18033',2,'CHER','Cher',1),(20,'19',74,'19272',3,'CORREZE','Corrèze',1),(21,'2A',94,'2A004',3,'CORSE-DU-SUD','Corse-du-Sud',1),(22,'2B',94,'2B033',3,'HAUTE-CORSE','Haute-Corse',1),(23,'21',26,'21231',3,'COTE-D\'OR','Côte-d\'Or',1),(24,'22',53,'22278',4,'COTES-D\'ARMOR','Côtes-d\'Armor',1),(25,'23',74,'23096',3,'CREUSE','Creuse',1),(26,'24',72,'24322',3,'DORDOGNE','Dordogne',1),(27,'25',43,'25056',2,'DOUBS','Doubs',1),(28,'26',82,'26362',3,'DROME','Drôme',1),(29,'27',23,'27229',5,'EURE','Eure',1),(30,'28',24,'28085',1,'EURE-ET-LOIR','Eure-et-Loir',1),(31,'29',53,'29232',2,'FINISTERE','Finistère',1),(32,'30',91,'30189',2,'GARD','Gard',1),(33,'31',73,'31555',3,'HAUTE-GARONNE','Haute-Garonne',1),(34,'32',73,'32013',2,'GERS','Gers',1),(35,'33',72,'33063',3,'GIRONDE','Gironde',1),(36,'34',91,'34172',5,'HERAULT','Hérault',1),(37,'35',53,'35238',1,'ILLE-ET-VILAINE','Ille-et-Vilaine',1),(38,'36',24,'36044',5,'INDRE','Indre',1),(39,'37',24,'37261',1,'INDRE-ET-LOIRE','Indre-et-Loire',1),(40,'38',82,'38185',5,'ISERE','Isère',1),(41,'39',43,'39300',2,'JURA','Jura',1),(42,'40',72,'40192',4,'LANDES','Landes',1),(43,'41',24,'41018',0,'LOIR-ET-CHER','Loir-et-Cher',1),(44,'42',82,'42218',3,'LOIRE','Loire',1),(45,'43',83,'43157',3,'HAUTE-LOIRE','Haute-Loire',1),(46,'44',52,'44109',3,'LOIRE-ATLANTIQUE','Loire-Atlantique',1),(47,'45',24,'45234',2,'LOIRET','Loiret',1),(48,'46',73,'46042',2,'LOT','Lot',1),(49,'47',72,'47001',0,'LOT-ET-GARONNE','Lot-et-Garonne',1),(50,'48',91,'48095',3,'LOZERE','Lozère',1),(51,'49',52,'49007',0,'MAINE-ET-LOIRE','Maine-et-Loire',1),(52,'50',25,'50502',3,'MANCHE','Manche',1),(53,'51',21,'51108',3,'MARNE','Marne',1),(54,'52',21,'52121',3,'HAUTE-MARNE','Haute-Marne',1),(55,'53',52,'53130',3,'MAYENNE','Mayenne',1),(56,'54',41,'54395',0,'MEURTHE-ET-MOSELLE','Meurthe-et-Moselle',1),(57,'55',41,'55029',3,'MEUSE','Meuse',1),(58,'56',53,'56260',2,'MORBIHAN','Morbihan',1),(59,'57',41,'57463',3,'MOSELLE','Moselle',1),(60,'58',26,'58194',3,'NIEVRE','Nièvre',1),(61,'59',31,'59350',2,'NORD','Nord',1),(62,'60',22,'60057',5,'OISE','Oise',1),(63,'61',25,'61001',5,'ORNE','Orne',1),(64,'62',31,'62041',2,'PAS-DE-CALAIS','Pas-de-Calais',1),(65,'63',83,'63113',2,'PUY-DE-DOME','Puy-de-Dôme',1),(66,'64',72,'64445',4,'PYRENEES-ATLANTIQUES','Pyrénées-Atlantiques',1),(67,'65',73,'65440',4,'HAUTES-PYRENEES','Hautes-Pyrénées',1),(68,'66',91,'66136',4,'PYRENEES-ORIENTALES','Pyrénées-Orientales',1),(69,'67',42,'67482',2,'BAS-RHIN','Bas-Rhin',1),(70,'68',42,'68066',2,'HAUT-RHIN','Haut-Rhin',1),(71,'69',82,'69123',2,'RHONE','Rhône',1),(72,'70',43,'70550',3,'HAUTE-SAONE','Haute-Saône',1),(73,'71',26,'71270',0,'SAONE-ET-LOIRE','Saône-et-Loire',1),(74,'72',52,'72181',3,'SARTHE','Sarthe',1),(75,'73',82,'73065',3,'SAVOIE','Savoie',1),(76,'74',82,'74010',3,'HAUTE-SAVOIE','Haute-Savoie',1),(77,'75',11,'75056',0,'PARIS','Paris',1),(78,'76',23,'76540',3,'SEINE-MARITIME','Seine-Maritime',1),(79,'77',11,'77288',0,'SEINE-ET-MARNE','Seine-et-Marne',1),(80,'78',11,'78646',4,'YVELINES','Yvelines',1),(81,'79',54,'79191',4,'DEUX-SEVRES','Deux-Sèvres',1),(82,'80',22,'80021',3,'SOMME','Somme',1),(83,'81',73,'81004',2,'TARN','Tarn',1),(84,'82',73,'82121',0,'TARN-ET-GARONNE','Tarn-et-Garonne',1),(85,'83',93,'83137',2,'VAR','Var',1),(86,'84',93,'84007',0,'VAUCLUSE','Vaucluse',1),(87,'85',52,'85191',3,'VENDEE','Vendée',1),(88,'86',54,'86194',3,'VIENNE','Vienne',1),(89,'87',74,'87085',3,'HAUTE-VIENNE','Haute-Vienne',1),(90,'88',41,'88160',4,'VOSGES','Vosges',1),(91,'89',26,'89024',5,'YONNE','Yonne',1),(92,'90',43,'90010',0,'TERRITOIRE DE BELFORT','Territoire de Belfort',1),(93,'91',11,'91228',5,'ESSONNE','Essonne',1),(94,'92',11,'92050',4,'HAUTS-DE-SEINE','Hauts-de-Seine',1),(95,'93',11,'93008',3,'SEINE-SAINT-DENIS','Seine-Saint-Denis',1),(96,'94',11,'94028',2,'VAL-DE-MARNE','Val-de-Marne',1),(97,'95',11,'95500',2,'VAL-D\'OISE','Val-d\'Oise',1),(98,'971',1,'97105',3,'GUADELOUPE','Guadeloupe',1),(99,'972',2,'97209',3,'MARTINIQUE','Martinique',1),(100,'973',3,'97302',3,'GUYANE','Guyane',1),(101,'974',4,'97411',3,'REUNION','Réunion',1),(102,'01',201,'',1,'ANVERS','Anvers',1),(103,'02',203,'',3,'BRUXELLES-CAPITALE','Bruxelles-Capitale',1),(104,'03',202,'',2,'BRABANT-WALLON','Brabant-Wallon',1),(105,'04',201,'',1,'BRABANT-FLAMAND','Brabant-Flamand',1),(106,'05',201,'',1,'FLANDRE-OCCIDENTALE','Flandre-Occidentale',1),(107,'06',201,'',1,'FLANDRE-ORIENTALE','Flandre-Orientale',1),(108,'07',202,'',2,'HAINAUT','Hainaut',1),(109,'08',201,'',2,'LIEGE','Liège',1),(110,'09',202,'',1,'LIMBOURG','Limbourg',1),(111,'10',202,'',2,'LUXEMBOURG','Luxembourg',1),(112,'11',201,'',2,'NAMUR','Namur',1),(113,'NSW',2801,'',1,'','New South Wales',1),(114,'VIC',2801,'',1,'','Victoria',1),(115,'QLD',2801,'',1,'','Queensland',1),(116,'SA',2801,'',1,'','South Australia',1),(117,'ACT',2801,'',1,'','Australia Capital Territory',1),(118,'TAS',2801,'',1,'','Tasmania',1),(119,'WA',2801,'',1,'','Western Australia',1),(120,'NT',2801,'',1,'','Northern Territory',1),(121,'VI',419,'',19,'ALAVA','Álava',1),(122,'AB',404,'',4,'ALBACETE','Albacete',1),(123,'A',411,'',11,'ALICANTE','Alicante',1),(124,'AL',401,'',1,'ALMERIA','Almería',1),(125,'AV',403,'',3,'AVILA','Avila',1),(126,'BA',412,'',12,'BADAJOZ','Badajoz',1),(127,'PM',414,'',14,'ISLAS BALEARES','Islas Baleares',1),(128,'B',406,'',6,'BARCELONA','Barcelona',1),(129,'BU',403,'',8,'BURGOS','Burgos',1),(130,'CC',412,'',12,'CACERES','Cáceres',1),(131,'CA',401,'',1,'CADIz','Cádiz',1),(132,'CS',411,'',11,'CASTELLON','Castellón',1),(133,'CR',404,'',4,'CIUDAD REAL','Ciudad Real',1),(134,'CO',401,'',1,'CORDOBA','Córdoba',1),(135,'C',413,'',13,'LA CORUÑA','La Coruña',1),(136,'CU',404,'',4,'CUENCA','Cuenca',1),(137,'GI',406,'',6,'GERONA','Gerona',1),(138,'GR',401,'',1,'GRANADA','Granada',1),(139,'GU',404,'',4,'GUADALAJARA','Guadalajara',1),(140,'SS',419,'',19,'GUIPUZCOA','Guipúzcoa',1),(141,'H',401,'',1,'HUELVA','Huelva',1),(142,'HU',402,'',2,'HUESCA','Huesca',1),(143,'J',401,'',1,'JAEN','Jaén',1),(144,'LE',403,'',3,'LEON','León',1),(145,'L',406,'',6,'LERIDA','Lérida',1),(146,'LO',415,'',15,'LA RIOJA','La Rioja',1),(147,'LU',413,'',13,'LUGO','Lugo',1),(148,'M',416,'',16,'MADRID','Madrid',1),(149,'MA',401,'',1,'MALAGA','Málaga',1),(150,'MU',417,'',17,'MURCIA','Murcia',1),(151,'NA',408,'',8,'NAVARRA','Navarra',1),(152,'OR',413,'',13,'ORENSE','Orense',1),(153,'O',418,'',18,'ASTURIAS','Asturias',1),(154,'P',403,'',3,'PALENCIA','Palencia',1),(155,'GC',405,'',5,'LAS PALMAS','Las Palmas',1),(156,'PO',413,'',13,'PONTEVEDRA','Pontevedra',1),(157,'SA',403,'',3,'SALAMANCA','Salamanca',1),(158,'TF',405,'',5,'STA. CRUZ DE TENERIFE','Sta. Cruz de Tenerife',1),(159,'S',410,'',10,'CANTABRIA','Cantabria',1),(160,'SG',403,'',3,'SEGOVIA','Segovia',1),(161,'SE',401,'',1,'SEVILLA','Sevilla',1),(162,'SO',403,'',3,'SORIA','Soria',1),(163,'T',406,'',6,'TARRAGONA','Tarragona',1),(164,'TE',402,'',2,'TERUEL','Teruel',1),(165,'TO',404,'',5,'TOLEDO','Toledo',1),(166,'V',411,'',11,'VALENCIA','Valencia',1),(167,'VA',403,'',3,'VALLADOLID','Valladolid',1),(168,'BI',419,'',19,'VIZCAYA','Vizcaya',1),(169,'ZA',403,'',3,'ZAMORA','Zamora',1),(170,'Z',402,'',1,'ZARAGOZA','Zaragoza',1),(171,'CE',407,'',7,'CEUTA','Ceuta',1),(172,'ML',409,'',9,'MELILLA','Melilla',1),(174,'AG',601,NULL,NULL,'ARGOVIE','Argovie',1),(175,'AI',601,NULL,NULL,'APPENZELL RHODES INTERIEURES','Appenzell Rhodes intérieures',1),(176,'AR',601,NULL,NULL,'APPENZELL RHODES EXTERIEURES','Appenzell Rhodes extérieures',1),(177,'BE',601,NULL,NULL,'BERNE','Berne',1),(178,'BL',601,NULL,NULL,'BALE CAMPAGNE','Bâle Campagne',1),(179,'BS',601,NULL,NULL,'BALE VILLE','Bâle Ville',1),(180,'FR',601,NULL,NULL,'FRIBOURG','Fribourg',1),(181,'GE',601,NULL,NULL,'GENEVE','Genève',1),(182,'GL',601,NULL,NULL,'GLARIS','Glaris',1),(183,'GR',601,NULL,NULL,'GRISONS','Grisons',1),(184,'JU',601,NULL,NULL,'JURA','Jura',1),(185,'LU',601,NULL,NULL,'LUCERNE','Lucerne',1),(186,'NE',601,NULL,NULL,'NEUCHATEL','Neuchâtel',1),(187,'NW',601,NULL,NULL,'NIDWALD','Nidwald',1),(188,'OW',601,NULL,NULL,'OBWALD','Obwald',1),(189,'SG',601,NULL,NULL,'SAINT-GALL','Saint-Gall',1),(190,'SH',601,NULL,NULL,'SCHAFFHOUSE','Schaffhouse',1),(191,'SO',601,NULL,NULL,'SOLEURE','Soleure',1),(192,'SZ',601,NULL,NULL,'SCHWYZ','Schwyz',1),(193,'TG',601,NULL,NULL,'THURGOVIE','Thurgovie',1),(194,'TI',601,NULL,NULL,'TESSIN','Tessin',1),(195,'UR',601,NULL,NULL,'URI','Uri',1),(196,'VD',601,NULL,NULL,'VAUD','Vaud',1),(197,'VS',601,NULL,NULL,'VALAIS','Valais',1),(198,'ZG',601,NULL,NULL,'ZUG','Zug',1),(199,'ZH',601,NULL,NULL,'ZURICH','Zürich',1),(200,'AL',1101,'',0,'ALABAMA','Alabama',1),(201,'AK',1101,'',0,'ALASKA','Alaska',1),(202,'AZ',1101,'',0,'ARIZONA','Arizona',1),(203,'AR',1101,'',0,'ARKANSAS','Arkansas',1),(204,'CA',1101,'',0,'CALIFORNIA','California',1),(205,'CO',1101,'',0,'COLORADO','Colorado',1),(206,'CT',1101,'',0,'CONNECTICUT','Connecticut',1),(207,'DE',1101,'',0,'DELAWARE','Delaware',1),(208,'FL',1101,'',0,'FLORIDA','Florida',1),(209,'GA',1101,'',0,'GEORGIA','Georgia',1),(210,'HI',1101,'',0,'HAWAII','Hawaii',1),(211,'ID',1101,'',0,'IDAHO','Idaho',1),(212,'IL',1101,'',0,'ILLINOIS','Illinois',1),(213,'IN',1101,'',0,'INDIANA','Indiana',1),(214,'IA',1101,'',0,'IOWA','Iowa',1),(215,'KS',1101,'',0,'KANSAS','Kansas',1),(216,'KY',1101,'',0,'KENTUCKY','Kentucky',1),(217,'LA',1101,'',0,'LOUISIANA','Louisiana',1),(218,'ME',1101,'',0,'MAINE','Maine',1),(219,'MD',1101,'',0,'MARYLAND','Maryland',1),(220,'MA',1101,'',0,'MASSACHUSSETTS','Massachusetts',1),(221,'MI',1101,'',0,'MICHIGAN','Michigan',1),(222,'MN',1101,'',0,'MINNESOTA','Minnesota',1),(223,'MS',1101,'',0,'MISSISSIPPI','Mississippi',1),(224,'MO',1101,'',0,'MISSOURI','Missouri',1),(225,'MT',1101,'',0,'MONTANA','Montana',1),(226,'NE',1101,'',0,'NEBRASKA','Nebraska',1),(227,'NV',1101,'',0,'NEVADA','Nevada',1),(228,'NH',1101,'',0,'NEW HAMPSHIRE','New Hampshire',1),(229,'NJ',1101,'',0,'NEW JERSEY','New Jersey',1),(230,'NM',1101,'',0,'NEW MEXICO','New Mexico',1),(231,'NY',1101,'',0,'NEW YORK','New York',1),(232,'NC',1101,'',0,'NORTH CAROLINA','North Carolina',1),(233,'ND',1101,'',0,'NORTH DAKOTA','North Dakota',1),(234,'OH',1101,'',0,'OHIO','Ohio',1),(235,'OK',1101,'',0,'OKLAHOMA','Oklahoma',1),(236,'OR',1101,'',0,'OREGON','Oregon',1),(237,'PA',1101,'',0,'PENNSYLVANIA','Pennsylvania',1),(238,'RI',1101,'',0,'RHODE ISLAND','Rhode Island',1),(239,'SC',1101,'',0,'SOUTH CAROLINA','South Carolina',1),(240,'SD',1101,'',0,'SOUTH DAKOTA','South Dakota',1),(241,'TN',1101,'',0,'TENNESSEE','Tennessee',1),(242,'TX',1101,'',0,'TEXAS','Texas',1),(243,'UT',1101,'',0,'UTAH','Utah',1),(244,'VT',1101,'',0,'VERMONT','Vermont',1),(245,'VA',1101,'',0,'VIRGINIA','Virginia',1),(246,'WA',1101,'',0,'WASHINGTON','Washington',1),(247,'WV',1101,'',0,'WEST VIRGINIA','West Virginia',1),(248,'WI',1101,'',0,'WISCONSIN','Wisconsin',1),(249,'WY',1101,'',0,'WYOMING','Wyoming',1),(250,'SS',8601,NULL,NULL,NULL,'San Salvador',1),(251,'SA',8603,NULL,NULL,NULL,'Santa Ana',1),(252,'AH',8603,NULL,NULL,NULL,'Ahuachapan',1),(253,'SO',8603,NULL,NULL,NULL,'Sonsonate',1),(254,'US',8602,NULL,NULL,NULL,'Usulutan',1),(255,'SM',8602,NULL,NULL,NULL,'San Miguel',1),(256,'MO',8602,NULL,NULL,NULL,'Morazan',1),(257,'LU',8602,NULL,NULL,NULL,'La Union',1),(258,'LL',8601,NULL,NULL,NULL,'La Libertad',1),(259,'CH',8601,NULL,NULL,NULL,'Chalatenango',1),(260,'CA',8601,NULL,NULL,NULL,'Cabañas',1),(261,'LP',8601,NULL,NULL,NULL,'La Paz',1),(262,'SV',8601,NULL,NULL,NULL,'San Vicente',1),(263,'CU',8601,NULL,NULL,NULL,'Cuscatlan',1),(264,'2301',2301,'',0,'CATAMARCA','Catamarca',1),(265,'2302',2301,'',0,'JUJUY','Jujuy',1),(266,'2303',2301,'',0,'TUCAMAN','Tucamán',1),(267,'2304',2301,'',0,'SANTIAGO DEL ESTERO','Santiago del Estero',1),(268,'2305',2301,'',0,'SALTA','Salta',1),(269,'2306',2302,'',0,'CHACO','Chaco',1),(270,'2307',2302,'',0,'CORRIENTES','Corrientes',1),(271,'2308',2302,'',0,'ENTRE RIOS','Entre Ríos',1),(272,'2309',2302,'',0,'FORMOSA MISIONES','Formosa Misiones',1),(273,'2310',2302,'',0,'SANTA FE','Santa Fe',1),(274,'2311',2303,'',0,'LA RIOJA','La Rioja',1),(275,'2312',2303,'',0,'MENDOZA','Mendoza',1),(276,'2313',2303,'',0,'SAN JUAN','San Juan',1),(277,'2314',2303,'',0,'SAN LUIS','San Luis',1),(278,'2315',2304,'',0,'CORDOBA','Córdoba',1),(279,'2316',2304,'',0,'BUENOS AIRES','Buenos Aires',1),(280,'2317',2304,'',0,'CABA','Caba',1),(281,'2318',2305,'',0,'LA PAMPA','La Pampa',1),(282,'2319',2305,'',0,'NEUQUEN','Neuquén',1),(283,'2320',2305,'',0,'RIO NEGRO','Río Negro',1),(284,'2321',2305,'',0,'CHUBUT','Chubut',1),(285,'2322',2305,'',0,'SANTA CRUZ','Santa Cruz',1),(286,'2323',2305,'',0,'TIERRA DEL FUEGO','Tierra del Fuego',1),(287,'2324',2305,'',0,'ISLAS MALVINAS','Islas Malvinas',1),(288,'2325',2305,'',0,'ANTARTIDA','Antártida',1),(289,'AN',11701,NULL,0,'AN','Andaman & Nicobar',1),(290,'AP',11701,NULL,0,'AP','Andhra Pradesh',1),(291,'AR',11701,NULL,0,'AR','Arunachal Pradesh',1),(292,'AS',11701,NULL,0,'AS','Assam',1),(293,'BR',11701,NULL,0,'BR','Bihar',1),(294,'CG',11701,NULL,0,'CG','Chattisgarh',1),(295,'CH',11701,NULL,0,'CH','Chandigarh',1),(296,'DD',11701,NULL,0,'DD','Daman & Diu',1),(297,'DL',11701,NULL,0,'DL','Delhi',1),(298,'DN',11701,NULL,0,'DN','Dadra and Nagar Haveli',1),(299,'GA',11701,NULL,0,'GA','Goa',1),(300,'GJ',11701,NULL,0,'GJ','Gujarat',1),(301,'HP',11701,NULL,0,'HP','Himachal Pradesh',1),(302,'HR',11701,NULL,0,'HR','Haryana',1),(303,'JH',11701,NULL,0,'JH','Jharkhand',1),(304,'JK',11701,NULL,0,'JK','Jammu & Kashmir',1),(305,'KA',11701,NULL,0,'KA','Karnataka',1),(306,'KL',11701,NULL,0,'KL','Kerala',1),(307,'LD',11701,NULL,0,'LD','Lakshadweep',1),(308,'MH',11701,NULL,0,'MH','Maharashtra',1),(309,'ML',11701,NULL,0,'ML','Meghalaya',1),(310,'MN',11701,NULL,0,'MN','Manipur',1),(311,'MP',11701,NULL,0,'MP','Madhya Pradesh',1),(312,'MZ',11701,NULL,0,'MZ','Mizoram',1),(313,'NL',11701,NULL,0,'NL','Nagaland',1),(314,'OR',11701,NULL,0,'OR','Orissa',1),(315,'PB',11701,NULL,0,'PB','Punjab',1),(316,'PY',11701,NULL,0,'PY','Puducherry',1),(317,'RJ',11701,NULL,0,'RJ','Rajasthan',1),(318,'SK',11701,NULL,0,'SK','Sikkim',1),(319,'TN',11701,NULL,0,'TN','Tamil Nadu',1),(320,'TR',11701,NULL,0,'TR','Tripura',1),(321,'UL',11701,NULL,0,'UL','Uttarakhand',1),(322,'UP',11701,NULL,0,'UP','Uttar Pradesh',1),(323,'WB',11701,NULL,0,'WB','West Bengal',1),(374,'151',6715,'',0,'151','Arica',1),(375,'152',6715,'',0,'152','Parinacota',1),(376,'011',6701,'',0,'011','Iquique',1),(377,'014',6701,'',0,'014','Tamarugal',1),(378,'021',6702,'',0,'021','Antofagasa',1),(379,'022',6702,'',0,'022','El Loa',1),(380,'023',6702,'',0,'023','Tocopilla',1),(381,'031',6703,'',0,'031','Copiapó',1),(382,'032',6703,'',0,'032','Chañaral',1),(383,'033',6703,'',0,'033','Huasco',1),(384,'041',6704,'',0,'041','Elqui',1),(385,'042',6704,'',0,'042','Choapa',1),(386,'043',6704,'',0,'043','Limarí',1),(387,'051',6705,'',0,'051','Valparaíso',1),(388,'052',6705,'',0,'052','Isla de Pascua',1),(389,'053',6705,'',0,'053','Los Andes',1),(390,'054',6705,'',0,'054','Petorca',1),(391,'055',6705,'',0,'055','Quillota',1),(392,'056',6705,'',0,'056','San Antonio',1),(393,'057',6705,'',0,'057','San Felipe de Aconcagua',1),(394,'058',6705,'',0,'058','Marga Marga',1),(395,'061',6706,'',0,'061','Cachapoal',1),(396,'062',6706,'',0,'062','Cardenal Caro',1),(397,'063',6706,'',0,'063','Colchagua',1),(398,'071',6707,'',0,'071','Talca',1),(399,'072',6707,'',0,'072','Cauquenes',1),(400,'073',6707,'',0,'073','Curicó',1),(401,'074',6707,'',0,'074','Linares',1),(402,'081',6708,'',0,'081','Concepción',1),(403,'082',6708,'',0,'082','Arauco',1),(404,'083',6708,'',0,'083','Biobío',1),(405,'084',6708,'',0,'084','Ñuble',1),(406,'091',6709,'',0,'091','Cautín',1),(407,'092',6709,'',0,'092','Malleco',1),(408,'141',6714,'',0,'141','Valdivia',1),(409,'142',6714,'',0,'142','Ranco',1),(410,'101',6710,'',0,'101','Llanquihue',1),(411,'102',6710,'',0,'102','Chiloé',1),(412,'103',6710,'',0,'103','Osorno',1),(413,'104',6710,'',0,'104','Palena',1),(414,'111',6711,'',0,'111','Coihaique',1),(415,'112',6711,'',0,'112','Aisén',1),(416,'113',6711,'',0,'113','Capitán Prat',1),(417,'114',6711,'',0,'114','General Carrera',1),(418,'121',6712,'',0,'121','Magallanes',1),(419,'122',6712,'',0,'122','Antártica Chilena',1),(420,'123',6712,'',0,'123','Tierra del Fuego',1),(421,'124',6712,'',0,'124','Última Esperanza',1),(422,'131',6713,'',0,'131','Santiago',1),(423,'132',6713,'',0,'132','Cordillera',1),(424,'133',6713,'',0,'133','Chacabuco',1),(425,'134',6713,'',0,'134','Maipo',1),(426,'135',6713,'',0,'135','Melipilla',1),(427,'136',6713,'',0,'136','Talagante',1),(428,'DIF',15401,'',0,'DIF','Distrito Federal',1),(429,'AGS',15401,'',0,'AGS','Aguascalientes',1),(430,'BCN',15401,'',0,'BCN','Baja California Norte',1),(431,'BCS',15401,'',0,'BCS','Baja California Sur',1),(432,'CAM',15401,'',0,'CAM','Campeche',1),(433,'CHP',15401,'',0,'CHP','Chiapas',1),(434,'CHI',15401,'',0,'CHI','Chihuahua',1),(435,'COA',15401,'',0,'COA','Coahuila',1),(436,'COL',15401,'',0,'COL','Colima',1),(437,'DUR',15401,'',0,'DUR','Durango',1),(438,'GTO',15401,'',0,'GTO','Guanajuato',1),(439,'GRO',15401,'',0,'GRO','Guerrero',1),(440,'HGO',15401,'',0,'HGO','Hidalgo',1),(441,'JAL',15401,'',0,'JAL','Jalisco',1),(442,'MEX',15401,'',0,'MEX','México',1),(443,'MIC',15401,'',0,'MIC','Michoacán de Ocampo',1),(444,'MOR',15401,'',0,'MOR','Morelos',1),(445,'NAY',15401,'',0,'NAY','Nayarit',1),(446,'NLE',15401,'',0,'NLE','Nuevo León',1),(447,'OAX',15401,'',0,'OAX','Oaxaca',1),(448,'PUE',15401,'',0,'PUE','Puebla',1),(449,'QRO',15401,'',0,'QRO','Querétaro',1),(451,'ROO',15401,'',0,'ROO','Quintana Roo',1),(452,'SLP',15401,'',0,'SLP','San Luis Potosí',1),(453,'SIN',15401,'',0,'SIN','Sinaloa',1),(454,'SON',15401,'',0,'SON','Sonora',1),(455,'TAB',15401,'',0,'TAB','Tabasco',1),(456,'TAM',15401,'',0,'TAM','Tamaulipas',1),(457,'TLX',15401,'',0,'TLX','Tlaxcala',1),(458,'VER',15401,'',0,'VER','Veracruz',1),(459,'YUC',15401,'',0,'YUC','Yucatán',1),(460,'ZAC',15401,'',0,'ZAC','Zacatecas',1),(461,'ANT',7001,'',0,'ANT','Antioquia',1),(462,'BOL',7001,'',0,'BOL','Bolívar',1),(463,'BOY',7001,'',0,'BOY','Boyacá',1),(464,'CAL',7001,'',0,'CAL','Caldas',1),(465,'CAU',7001,'',0,'CAU','Cauca',1),(466,'CUN',7001,'',0,'CUN','Cundinamarca',1),(467,'HUI',7001,'',0,'HUI','Huila',1),(468,'LAG',7001,'',0,'LAG','La Guajira',1),(469,'MET',7001,'',0,'MET','Meta',1),(470,'NAR',7001,'',0,'NAR','Nariño',1),(471,'NDS',7001,'',0,'NDS','Norte de Santander',1),(472,'SAN',7001,'',0,'SAN','Santander',1),(473,'SUC',7001,'',0,'SUC','Sucre',1),(474,'TOL',7001,'',0,'TOL','Tolima',1),(475,'VAC',7001,'',0,'VAC','Valle del Cauca',1),(476,'RIS',7001,'',0,'RIS','Risalda',1),(477,'ATL',7001,'',0,'ATL','Atlántico',1),(478,'COR',7001,'',0,'COR','Córdoba',1),(479,'SAP',7001,'',0,'SAP','San Andrés, Providencia y Santa Catalina',1),(480,'ARA',7001,'',0,'ARA','Arauca',1),(481,'CAS',7001,'',0,'CAS','Casanare',1),(482,'AMA',7001,'',0,'AMA','Amazonas',1),(483,'CAQ',7001,'',0,'CAQ','Caquetá',1),(484,'CHO',7001,'',0,'CHO','Chocó',1),(485,'GUA',7001,'',0,'GUA','Guainía',1),(486,'GUV',7001,'',0,'GUV','Guaviare',1),(487,'PUT',7001,'',0,'PUT','Putumayo',1),(488,'QUI',7001,'',0,'QUI','Quindío',1),(489,'VAU',7001,'',0,'VAU','Vaupés',1),(490,'BOG',7001,'',0,'BOG','Bogotá',1),(491,'VID',7001,'',0,'VID','Vichada',1),(492,'CES',7001,'',0,'CES','Cesar',1),(493,'MAG',7001,'',0,'MAG','Magdalena',1),(494,'AT',11401,'',0,'AT','Atlántida',1),(495,'CH',11401,'',0,'CH','Choluteca',1),(496,'CL',11401,'',0,'CL','Colón',1),(497,'CM',11401,'',0,'CM','Comayagua',1),(498,'CO',11401,'',0,'CO','Copán',1),(499,'CR',11401,'',0,'CR','Cortés',1),(500,'EP',11401,'',0,'EP','El Paraíso',1),(501,'FM',11401,'',0,'FM','Francisco Morazán',1),(502,'GD',11401,'',0,'GD','Gracias a Dios',1),(503,'IN',11401,'',0,'IN','Intibucá',1),(504,'IB',11401,'',0,'IB','Islas de la Bahía',1),(505,'LP',11401,'',0,'LP','La Paz',1),(506,'LM',11401,'',0,'LM','Lempira',1),(507,'OC',11401,'',0,'OC','Ocotepeque',1),(508,'OL',11401,'',0,'OL','Olancho',1),(509,'SB',11401,'',0,'SB','Santa Bárbara',1),(510,'VL',11401,'',0,'VL','Valle',1),(511,'YO',11401,'',0,'YO','Yoro',1),(512,'DC',11401,'',0,'DC','Distrito Central',1),(652,'CC',4601,'Oistins',0,'CC','Christ Church',1),(655,'SA',4601,'Greenland',0,'SA','Saint Andrew',1),(656,'SG',4601,'Bulkeley',0,'SG','Saint George',1),(657,'JA',4601,'Holetown',0,'JA','Saint James',1),(658,'SJ',4601,'Four Roads',0,'SJ','Saint John',1),(659,'SB',4601,'Bathsheba',0,'SB','Saint Joseph',1),(660,'SL',4601,'Crab Hill',0,'SL','Saint Lucy',1),(661,'SM',4601,'Bridgetown',0,'SM','Saint Michael',1),(662,'SP',4601,'Speightstown',0,'SP','Saint Peter',1),(663,'SC',4601,'Crane',0,'SC','Saint Philip',1),(664,'ST',4601,'Hillaby',0,'ST','Saint Thomas',1),(777,'AG',315,NULL,NULL,NULL,'AGRIGENTO',1),(778,'AL',312,NULL,NULL,NULL,'ALESSANDRIA',1),(779,'AN',310,NULL,NULL,NULL,'ANCONA',1),(780,'AO',319,NULL,NULL,NULL,'AOSTA',1),(781,'AR',316,NULL,NULL,NULL,'AREZZO',1),(782,'AP',310,NULL,NULL,NULL,'ASCOLI PICENO',1),(783,'AT',312,NULL,NULL,NULL,'ASTI',1),(784,'AV',304,NULL,NULL,NULL,'AVELLINO',1),(785,'BA',313,NULL,NULL,NULL,'BARI',1),(786,'BT',313,NULL,NULL,NULL,'BARLETTA-ANDRIA-TRANI',1),(787,'BL',320,NULL,NULL,NULL,'BELLUNO',1),(788,'BN',304,NULL,NULL,NULL,'BENEVENTO',1),(789,'BG',309,NULL,NULL,NULL,'BERGAMO',1),(790,'BI',312,NULL,NULL,NULL,'BIELLA',1),(791,'BO',305,NULL,NULL,NULL,'BOLOGNA',1),(792,'BZ',317,NULL,NULL,NULL,'BOLZANO',1),(793,'BS',309,NULL,NULL,NULL,'BRESCIA',1),(794,'BR',313,NULL,NULL,NULL,'BRINDISI',1),(795,'CA',314,NULL,NULL,NULL,'CAGLIARI',1),(796,'CL',315,NULL,NULL,NULL,'CALTANISSETTA',1),(797,'CB',311,NULL,NULL,NULL,'CAMPOBASSO',1),(798,'CI',314,NULL,NULL,NULL,'CARBONIA-IGLESIAS',1),(799,'CE',304,NULL,NULL,NULL,'CASERTA',1),(800,'CT',315,NULL,NULL,NULL,'CATANIA',1),(801,'CZ',303,NULL,NULL,NULL,'CATANZARO',1),(802,'CH',301,NULL,NULL,NULL,'CHIETI',1),(803,'CO',309,NULL,NULL,NULL,'COMO',1),(804,'CS',303,NULL,NULL,NULL,'COSENZA',1),(805,'CR',309,NULL,NULL,NULL,'CREMONA',1),(806,'KR',303,NULL,NULL,NULL,'CROTONE',1),(807,'CN',312,NULL,NULL,NULL,'CUNEO',1),(808,'EN',315,NULL,NULL,NULL,'ENNA',1),(809,'FM',310,NULL,NULL,NULL,'FERMO',1),(810,'FE',305,NULL,NULL,NULL,'FERRARA',1),(811,'FI',316,NULL,NULL,NULL,'FIRENZE',1),(812,'FG',313,NULL,NULL,NULL,'FOGGIA',1),(813,'FC',305,NULL,NULL,NULL,'FORLI-CESENA',1),(814,'FR',307,NULL,NULL,NULL,'FROSINONE',1),(815,'GE',308,NULL,NULL,NULL,'GENOVA',1),(816,'GO',306,NULL,NULL,NULL,'GORIZIA',1),(817,'GR',316,NULL,NULL,NULL,'GROSSETO',1),(818,'IM',308,NULL,NULL,NULL,'IMPERIA',1),(819,'IS',311,NULL,NULL,NULL,'ISERNIA',1),(820,'SP',308,NULL,NULL,NULL,'LA SPEZIA',1),(821,'AQ',301,NULL,NULL,NULL,'L AQUILA',1),(822,'LT',307,NULL,NULL,NULL,'LATINA',1),(823,'LE',313,NULL,NULL,NULL,'LECCE',1),(824,'LC',309,NULL,NULL,NULL,'LECCO',1),(825,'LI',314,NULL,NULL,NULL,'LIVORNO',1),(826,'LO',309,NULL,NULL,NULL,'LODI',1),(827,'LU',316,NULL,NULL,NULL,'LUCCA',1),(828,'MC',310,NULL,NULL,NULL,'MACERATA',1),(829,'MN',309,NULL,NULL,NULL,'MANTOVA',1),(830,'MS',316,NULL,NULL,NULL,'MASSA-CARRARA',1),(831,'MT',302,NULL,NULL,NULL,'MATERA',1),(832,'VS',314,NULL,NULL,NULL,'MEDIO CAMPIDANO',1),(833,'ME',315,NULL,NULL,NULL,'MESSINA',1),(834,'MI',309,NULL,NULL,NULL,'MILANO',1),(835,'MB',309,NULL,NULL,NULL,'MONZA e BRIANZA',1),(836,'MO',305,NULL,NULL,NULL,'MODENA',1),(837,'NA',304,NULL,NULL,NULL,'NAPOLI',1),(838,'NO',312,NULL,NULL,NULL,'NOVARA',1),(839,'NU',314,NULL,NULL,NULL,'NUORO',1),(840,'OG',314,NULL,NULL,NULL,'OGLIASTRA',1),(841,'OT',314,NULL,NULL,NULL,'OLBIA-TEMPIO',1),(842,'OR',314,NULL,NULL,NULL,'ORISTANO',1),(843,'PD',320,NULL,NULL,NULL,'PADOVA',1),(844,'PA',315,NULL,NULL,NULL,'PALERMO',1),(845,'PR',305,NULL,NULL,NULL,'PARMA',1),(846,'PV',309,NULL,NULL,NULL,'PAVIA',1),(847,'PG',318,NULL,NULL,NULL,'PERUGIA',1),(848,'PU',310,NULL,NULL,NULL,'PESARO e URBINO',1),(849,'PE',301,NULL,NULL,NULL,'PESCARA',1),(850,'PC',305,NULL,NULL,NULL,'PIACENZA',1),(851,'PI',316,NULL,NULL,NULL,'PISA',1),(852,'PT',316,NULL,NULL,NULL,'PISTOIA',1),(853,'PN',306,NULL,NULL,NULL,'PORDENONE',1),(854,'PZ',302,NULL,NULL,NULL,'POTENZA',1),(855,'PO',316,NULL,NULL,NULL,'PRATO',1),(856,'RG',315,NULL,NULL,NULL,'RAGUSA',1),(857,'RA',305,NULL,NULL,NULL,'RAVENNA',1),(858,'RC',303,NULL,NULL,NULL,'REGGIO CALABRIA',1),(859,'RE',305,NULL,NULL,NULL,'REGGIO NELL EMILIA',1),(860,'RI',307,NULL,NULL,NULL,'RIETI',1),(861,'RN',305,NULL,NULL,NULL,'RIMINI',1),(862,'RM',307,NULL,NULL,NULL,'ROMA',1),(863,'RO',320,NULL,NULL,NULL,'ROVIGO',1),(864,'SA',304,NULL,NULL,NULL,'SALERNO',1),(865,'SS',314,NULL,NULL,NULL,'SASSARI',1),(866,'SV',308,NULL,NULL,NULL,'SAVONA',1),(867,'SI',316,NULL,NULL,NULL,'SIENA',1),(868,'SR',315,NULL,NULL,NULL,'SIRACUSA',1),(869,'SO',309,NULL,NULL,NULL,'SONDRIO',1),(870,'TA',313,NULL,NULL,NULL,'TARANTO',1),(871,'TE',301,NULL,NULL,NULL,'TERAMO',1),(872,'TR',318,NULL,NULL,NULL,'TERNI',1),(873,'TO',312,NULL,NULL,NULL,'TORINO',1),(874,'TP',315,NULL,NULL,NULL,'TRAPANI',1),(875,'TN',317,NULL,NULL,NULL,'TRENTO',1),(876,'TV',320,NULL,NULL,NULL,'TREVISO',1),(877,'TS',306,NULL,NULL,NULL,'TRIESTE',1),(878,'UD',306,NULL,NULL,NULL,'UDINE',1),(879,'VA',309,NULL,NULL,NULL,'VARESE',1),(880,'VE',320,NULL,NULL,NULL,'VENEZIA',1),(881,'VB',312,NULL,NULL,NULL,'VERBANO-CUSIO-OSSOLA',1),(882,'VC',312,NULL,NULL,NULL,'VERCELLI',1),(883,'VR',320,NULL,NULL,NULL,'VERONA',1),(884,'VV',303,NULL,NULL,NULL,'VIBO VALENTIA',1),(885,'VI',320,NULL,NULL,NULL,'VICENZA',1),(886,'VT',307,NULL,NULL,NULL,'VITERBO',1),(1036,'VE-L',23201,'',0,'VE-L','Mérida',1),(1037,'VE-T',23201,'',0,'VE-T','Trujillo',1),(1038,'VE-E',23201,'',0,'VE-E','Barinas',1),(1039,'VE-M',23202,'',0,'VE-M','Miranda',1),(1040,'VE-W',23202,'',0,'VE-W','Vargas',1),(1041,'VE-A',23202,'',0,'VE-A','Distrito Capital',1),(1042,'VE-D',23203,'',0,'VE-D','Aragua',1),(1043,'VE-G',23203,'',0,'VE-G','Carabobo',1),(1044,'VE-I',23204,'',0,'VE-I','Falcón',1),(1045,'VE-K',23204,'',0,'VE-K','Lara',1),(1046,'VE-U',23204,'',0,'VE-U','Yaracuy',1),(1047,'VE-F',23205,'',0,'VE-F','Bolívar',1),(1048,'VE-X',23205,'',0,'VE-X','Amazonas',1),(1049,'VE-Y',23205,'',0,'VE-Y','Delta Amacuro',1),(1050,'VE-O',23206,'',0,'VE-O','Nueva Esparta',1),(1051,'VE-Z',23206,'',0,'VE-Z','Dependencias Federales',1),(1052,'VE-C',23207,'',0,'VE-C','Apure',1),(1053,'VE-J',23207,'',0,'VE-J','Guárico',1),(1054,'VE-H',23207,'',0,'VE-H','Cojedes',1),(1055,'VE-P',23207,'',0,'VE-P','Portuguesa',1),(1056,'VE-B',23208,'',0,'VE-B','Anzoátegui',1),(1057,'VE-N',23208,'',0,'VE-N','Monagas',1),(1058,'VE-R',23208,'',0,'VE-R','Sucre',1),(1059,'VE-V',23209,'',0,'VE-V','Zulia',1),(1060,'VE-S',23209,'',0,'VE-S','Táchira',1),(1061,'66',10201,NULL,NULL,NULL,'?????',1),(1062,'00',10205,NULL,NULL,NULL,'?????',1),(1063,'01',10205,NULL,NULL,NULL,'?????',1),(1064,'02',10205,NULL,NULL,NULL,'?????',1),(1065,'03',10205,NULL,NULL,NULL,'??????',1),(1066,'04',10205,NULL,NULL,NULL,'?????',1),(1067,'05',10205,NULL,NULL,NULL,'??????',1),(1068,'06',10203,NULL,NULL,NULL,'??????',1),(1069,'07',10203,NULL,NULL,NULL,'???????????',1),(1070,'08',10203,NULL,NULL,NULL,'??????',1),(1071,'09',10203,NULL,NULL,NULL,'?????',1),(1072,'10',10203,NULL,NULL,NULL,'??????',1),(1073,'11',10203,NULL,NULL,NULL,'??????',1),(1074,'12',10203,NULL,NULL,NULL,'?????????',1),(1075,'13',10206,NULL,NULL,NULL,'????',1),(1076,'14',10206,NULL,NULL,NULL,'?????????',1),(1077,'15',10206,NULL,NULL,NULL,'????????',1),(1078,'16',10206,NULL,NULL,NULL,'???????',1),(1079,'17',10213,NULL,NULL,NULL,'???????',1),(1080,'18',10213,NULL,NULL,NULL,'????????',1),(1081,'19',10213,NULL,NULL,NULL,'??????',1),(1082,'20',10213,NULL,NULL,NULL,'???????',1),(1083,'21',10212,NULL,NULL,NULL,'????????',1),(1084,'22',10212,NULL,NULL,NULL,'??????',1),(1085,'23',10212,NULL,NULL,NULL,'????????',1),(1086,'24',10212,NULL,NULL,NULL,'???????',1),(1087,'25',10212,NULL,NULL,NULL,'????????',1),(1088,'26',10212,NULL,NULL,NULL,'???????',1),(1089,'27',10202,NULL,NULL,NULL,'??????',1),(1090,'28',10202,NULL,NULL,NULL,'?????????',1),(1091,'29',10202,NULL,NULL,NULL,'????????',1),(1092,'30',10202,NULL,NULL,NULL,'??????',1),(1093,'31',10209,NULL,NULL,NULL,'????????',1),(1094,'32',10209,NULL,NULL,NULL,'???????',1),(1095,'33',10209,NULL,NULL,NULL,'????????',1),(1096,'34',10209,NULL,NULL,NULL,'???????',1),(1097,'35',10209,NULL,NULL,NULL,'????????',1),(1098,'36',10211,NULL,NULL,NULL,'???????????????',1),(1099,'37',10211,NULL,NULL,NULL,'?????',1),(1100,'38',10211,NULL,NULL,NULL,'?????',1),(1101,'39',10207,NULL,NULL,NULL,'????????',1),(1102,'40',10207,NULL,NULL,NULL,'???????',1),(1103,'41',10207,NULL,NULL,NULL,'??????????',1),(1104,'42',10207,NULL,NULL,NULL,'?????',1),(1105,'43',10207,NULL,NULL,NULL,'???????',1),(1106,'44',10208,NULL,NULL,NULL,'??????',1),(1107,'45',10208,NULL,NULL,NULL,'??????',1),(1108,'46',10208,NULL,NULL,NULL,'??????',1),(1109,'47',10208,NULL,NULL,NULL,'?????',1),(1110,'48',10208,NULL,NULL,NULL,'????',1),(1111,'49',10210,NULL,NULL,NULL,'??????',1),(1112,'50',10210,NULL,NULL,NULL,'????',1),(1113,'51',10210,NULL,NULL,NULL,'????????',1),(1114,'52',10210,NULL,NULL,NULL,'????????',1),(1115,'53',10210,NULL,NULL,NULL,'???-??????',1),(1116,'54',10210,NULL,NULL,NULL,'??',1),(1117,'55',10210,NULL,NULL,NULL,'?????',1),(1118,'56',10210,NULL,NULL,NULL,'???????',1),(1119,'57',10210,NULL,NULL,NULL,'?????',1),(1120,'58',10210,NULL,NULL,NULL,'?????',1),(1121,'59',10210,NULL,NULL,NULL,'?????',1),(1122,'60',10210,NULL,NULL,NULL,'?????',1),(1123,'61',10210,NULL,NULL,NULL,'?????',1),(1124,'62',10204,NULL,NULL,NULL,'????????',1),(1125,'63',10204,NULL,NULL,NULL,'??????',1),(1126,'64',10204,NULL,NULL,NULL,'???????',1),(1127,'65',10204,NULL,NULL,NULL,'?????',1),(1128,'AL01',1301,'',0,'','Wilaya d\'Adrar',1),(1129,'AL02',1301,'',0,'','Wilaya de Chlef',1),(1130,'AL03',1301,'',0,'','Wilaya de Laghouat',1),(1131,'AL04',1301,'',0,'','Wilaya d\'Oum El Bouaghi',1),(1132,'AL05',1301,'',0,'','Wilaya de Batna',1),(1133,'AL06',1301,'',0,'','Wilaya de Béjaïa',1),(1134,'AL07',1301,'',0,'','Wilaya de Biskra',1),(1135,'AL08',1301,'',0,'','Wilaya de Béchar',1),(1136,'AL09',1301,'',0,'','Wilaya de Blida',1),(1137,'AL11',1301,'',0,'','Wilaya de Bouira',1),(1138,'AL12',1301,'',0,'','Wilaya de Tamanrasset',1),(1139,'AL13',1301,'',0,'','Wilaya de Tébessa',1),(1140,'AL14',1301,'',0,'','Wilaya de Tlemcen',1),(1141,'AL15',1301,'',0,'','Wilaya de Tiaret',1),(1142,'AL16',1301,'',0,'','Wilaya de Tizi Ouzou',1),(1143,'AL17',1301,'',0,'','Wilaya d\'Alger',1),(1144,'AL18',1301,'',0,'','Wilaya de Djelfa',1),(1145,'AL19',1301,'',0,'','Wilaya de Jijel',1),(1146,'AL20',1301,'',0,'','Wilaya de Sétif ',1),(1147,'AL21',1301,'',0,'','Wilaya de Saïda',1),(1148,'AL22',1301,'',0,'','Wilaya de Skikda',1),(1149,'AL23',1301,'',0,'','Wilaya de Sidi Bel Abbès',1),(1150,'AL24',1301,'',0,'','Wilaya d\'Annaba',1),(1151,'AL25',1301,'',0,'','Wilaya de Guelma',1),(1152,'AL26',1301,'',0,'','Wilaya de Constantine',1),(1153,'AL27',1301,'',0,'','Wilaya de Médéa',1),(1154,'AL28',1301,'',0,'','Wilaya de Mostaganem',1),(1155,'AL29',1301,'',0,'','Wilaya de M\'Sila',1),(1156,'AL30',1301,'',0,'','Wilaya de Mascara',1),(1157,'AL31',1301,'',0,'','Wilaya d\'Ouargla',1),(1158,'AL32',1301,'',0,'','Wilaya d\'Oran',1),(1159,'AL33',1301,'',0,'','Wilaya d\'El Bayadh',1),(1160,'AL34',1301,'',0,'','Wilaya d\'Illizi',1),(1161,'AL35',1301,'',0,'','Wilaya de Bordj Bou Arreridj',1),(1162,'AL36',1301,'',0,'','Wilaya de Boumerdès',1),(1163,'AL37',1301,'',0,'','Wilaya d\'El Tarf',1),(1164,'AL38',1301,'',0,'','Wilaya de Tindouf',1),(1165,'AL39',1301,'',0,'','Wilaya de Tissemsilt',1),(1166,'AL40',1301,'',0,'','Wilaya d\'El Oued',1),(1167,'AL41',1301,'',0,'','Wilaya de Khenchela',1),(1168,'AL42',1301,'',0,'','Wilaya de Souk Ahras',1),(1169,'AL43',1301,'',0,'','Wilaya de Tipaza',1),(1170,'AL44',1301,'',0,'','Wilaya de Mila',1),(1171,'AL45',1301,'',0,'','Wilaya d\'Aïn Defla',1),(1172,'AL46',1301,'',0,'','Wilaya de Naâma',1),(1173,'AL47',1301,'',0,'','Wilaya d\'Aïn Témouchent',1),(1174,'AL48',1301,'',0,'','Wilaya de Ghardaia',1),(1175,'AL49',1301,'',0,'','Wilaya de Relizane',1),(1176,'MA',1209,'',0,'','Province de Benslimane',1),(1177,'MA1',1209,'',0,'','Province de Berrechid',1),(1178,'MA2',1209,'',0,'','Province de Khouribga',1),(1179,'MA3',1209,'',0,'','Province de Settat',1),(1180,'MA4',1210,'',0,'','Province d\'El Jadida',1),(1181,'MA5',1210,'',0,'','Province de Safi',1),(1182,'MA6',1210,'',0,'','Province de Sidi Bennour',1),(1183,'MA7',1210,'',0,'','Province de Youssoufia',1),(1184,'MA6B',1205,'',0,'','Préfecture de Fès',1),(1185,'MA7B',1205,'',0,'','Province de Boulemane',1),(1186,'MA8',1205,'',0,'','Province de Moulay Yacoub',1),(1187,'MA9',1205,'',0,'','Province de Sefrou',1),(1188,'MA8A',1202,'',0,'','Province de Kénitra',1),(1189,'MA9A',1202,'',0,'','Province de Sidi Kacem',1),(1190,'MA10',1202,'',0,'','Province de Sidi Slimane',1),(1191,'MA11',1208,'',0,'','Préfecture de Casablanca',1),(1192,'MA12',1208,'',0,'','Préfecture de Mohammédia',1),(1193,'MA13',1208,'',0,'','Province de Médiouna',1),(1194,'MA14',1208,'',0,'','Province de Nouaceur',1),(1195,'MA15',1214,'',0,'','Province d\'Assa-Zag',1),(1196,'MA16',1214,'',0,'','Province d\'Es-Semara',1),(1197,'MA17A',1214,'',0,'','Province de Guelmim',1),(1198,'MA18',1214,'',0,'','Province de Tata',1),(1199,'MA19',1214,'',0,'','Province de Tan-Tan',1),(1200,'MA15',1215,'',0,'','Province de Boujdour',1),(1201,'MA16',1215,'',0,'','Province de Lâayoune',1),(1202,'MA17',1215,'',0,'','Province de Tarfaya',1),(1203,'MA18',1211,'',0,'','Préfecture de Marrakech',1),(1204,'MA19',1211,'',0,'','Province d\'Al Haouz',1),(1205,'MA20',1211,'',0,'','Province de Chichaoua',1),(1206,'MA21',1211,'',0,'','Province d\'El Kelâa des Sraghna',1),(1207,'MA22',1211,'',0,'','Province d\'Essaouira',1),(1208,'MA23',1211,'',0,'','Province de Rehamna',1),(1209,'MA24',1206,'',0,'','Préfecture de Meknès',1),(1210,'MA25',1206,'',0,'','Province d’El Hajeb',1),(1211,'MA26',1206,'',0,'','Province d\'Errachidia',1),(1212,'MA27',1206,'',0,'','Province d’Ifrane',1),(1213,'MA28',1206,'',0,'','Province de Khénifra',1),(1214,'MA29',1206,'',0,'','Province de Midelt',1),(1215,'MA30',1204,'',0,'','Préfecture d\'Oujda-Angad',1),(1216,'MA31',1204,'',0,'','Province de Berkane',1),(1217,'MA32',1204,'',0,'','Province de Driouch',1),(1218,'MA33',1204,'',0,'','Province de Figuig',1),(1219,'MA34',1204,'',0,'','Province de Jerada',1),(1220,'MA35',1204,'',0,'','Province de Nadorgg',1),(1221,'MA36',1204,'',0,'','Province de Taourirt',1),(1222,'MA37',1216,'',0,'','Province d\'Aousserd',1),(1223,'MA38',1216,'',0,'','Province d\'Oued Ed-Dahab',1),(1224,'MA39',1207,'',0,'','Préfecture de Rabat',1),(1225,'MA40',1207,'',0,'','Préfecture de Skhirat-Témara',1),(1226,'MA41',1207,'',0,'','Préfecture de Salé',1),(1227,'MA42',1207,'',0,'','Province de Khémisset',1),(1228,'MA43',1213,'',0,'','Préfecture d\'Agadir Ida-Outanane',1),(1229,'MA44',1213,'',0,'','Préfecture d\'Inezgane-Aït Melloul',1),(1230,'MA45',1213,'',0,'','Province de Chtouka-Aït Baha',1),(1231,'MA46',1213,'',0,'','Province d\'Ouarzazate',1),(1232,'MA47',1213,'',0,'','Province de Sidi Ifni',1),(1233,'MA48',1213,'',0,'','Province de Taroudant',1),(1234,'MA49',1213,'',0,'','Province de Tinghir',1),(1235,'MA50',1213,'',0,'','Province de Tiznit',1),(1236,'MA51',1213,'',0,'','Province de Zagora',1),(1237,'MA52',1212,'',0,'','Province d\'Azilal',1),(1238,'MA53',1212,'',0,'','Province de Beni Mellal',1),(1239,'MA54',1212,'',0,'','Province de Fquih Ben Salah',1),(1240,'MA55',1201,'',0,'','Préfecture de M\'diq-Fnideq',1),(1241,'MA56',1201,'',0,'','Préfecture de Tanger-Asilah',1),(1242,'MA57',1201,'',0,'','Province de Chefchaouen',1),(1243,'MA58',1201,'',0,'','Province de Fahs-Anjra',1),(1244,'MA59',1201,'',0,'','Province de Larache',1),(1245,'MA60',1201,'',0,'','Province d\'Ouezzane',1),(1246,'MA61',1201,'',0,'','Province de Tétouan',1),(1247,'MA62',1203,'',0,'','Province de Guercif',1),(1248,'MA63',1203,'',0,'','Province d\'Al Hoceïma',1),(1249,'MA64',1203,'',0,'','Province de Taounate',1),(1250,'MA65',1203,'',0,'','Province de Taza',1),(1251,'MA6A',1205,'',0,'','Préfecture de Fès',1),(1252,'MA7A',1205,'',0,'','Province de Boulemane',1),(1253,'MA15A',1214,'',0,'','Province d\'Assa-Zag',1),(1254,'MA16A',1214,'',0,'','Province d\'Es-Semara',1),(1255,'MA18A',1211,'',0,'','Préfecture de Marrakech',1),(1256,'MA19A',1214,'',0,'','Province de Tan-Tan',1),(1257,'MA19B',1214,'',0,'','Province de Tan-Tan',1),(1258,'TN01',1001,'',0,'','Ariana',1),(1259,'TN02',1001,'',0,'','Béja',1),(1260,'TN03',1001,'',0,'','Ben Arous',1),(1261,'TN04',1001,'',0,'','Bizerte',1),(1262,'TN05',1001,'',0,'','Gabès',1),(1263,'TN06',1001,'',0,'','Gafsa',1),(1264,'TN07',1001,'',0,'','Jendouba',1),(1265,'TN08',1001,'',0,'','Kairouan',1),(1266,'TN09',1001,'',0,'','Kasserine',1),(1267,'TN10',1001,'',0,'','Kébili',1),(1268,'TN11',1001,'',0,'','La Manouba',1),(1269,'TN12',1001,'',0,'','Le Kef',1),(1270,'TN13',1001,'',0,'','Mahdia',1),(1271,'TN14',1001,'',0,'','Médenine',1),(1272,'TN15',1001,'',0,'','Monastir',1),(1273,'TN16',1001,'',0,'','Nabeul',1),(1274,'TN17',1001,'',0,'','Sfax',1),(1275,'TN18',1001,'',0,'','Sidi Bouzid',1),(1276,'TN19',1001,'',0,'','Siliana',1),(1277,'TN20',1001,'',0,'','Sousse',1),(1278,'TN21',1001,'',0,'','Tataouine',1),(1279,'TN22',1001,'',0,'','Tozeur',1),(1280,'TN23',1001,'',0,'','Tunis',1),(1281,'TN24',1001,'',0,'','Zaghouan',1); +INSERT INTO `llx_c_departements` VALUES (1,'0',0,'0',0,'-','-',1),(2,'01',82,'01053',5,'AIN','Ain',1),(3,'02',22,'02408',5,'AISNE','Aisne',1),(4,'03',83,'03190',5,'ALLIER','Allier',1),(5,'04',93,'04070',4,'ALPES-DE-HAUTE-PROVENCE','Alpes-de-Haute-Provence',1),(6,'05',93,'05061',4,'HAUTES-ALPES','Hautes-Alpes',1),(7,'06',93,'06088',4,'ALPES-MARITIMES','Alpes-Maritimes',1),(8,'07',82,'07186',5,'ARDECHE','Ardèche',1),(9,'08',21,'08105',4,'ARDENNES','Ardennes',1),(10,'09',73,'09122',5,'ARIEGE','Ariège',1),(11,'10',21,'10387',5,'AUBE','Aube',1),(12,'11',91,'11069',5,'AUDE','Aude',1),(13,'12',73,'12202',5,'AVEYRON','Aveyron',1),(14,'13',93,'13055',4,'BOUCHES-DU-RHONE','Bouches-du-Rhône',1),(15,'14',25,'14118',2,'CALVADOS','Calvados',1),(16,'15',83,'15014',2,'CANTAL','Cantal',1),(17,'16',54,'16015',3,'CHARENTE','Charente',1),(18,'17',54,'17300',3,'CHARENTE-MARITIME','Charente-Maritime',1),(19,'18',24,'18033',2,'CHER','Cher',1),(20,'19',74,'19272',3,'CORREZE','Corrèze',1),(21,'2A',94,'2A004',3,'CORSE-DU-SUD','Corse-du-Sud',1),(22,'2B',94,'2B033',3,'HAUTE-CORSE','Haute-Corse',1),(23,'21',26,'21231',3,'COTE-D\'OR','Côte-d\'Or',1),(24,'22',53,'22278',4,'COTES-D\'ARMOR','Côtes-d\'Armor',1),(25,'23',74,'23096',3,'CREUSE','Creuse',1),(26,'24',72,'24322',3,'DORDOGNE','Dordogne',1),(27,'25',43,'25056',2,'DOUBS','Doubs',1),(28,'26',82,'26362',3,'DROME','Drôme',1),(29,'27',23,'27229',5,'EURE','Eure',1),(30,'28',24,'28085',1,'EURE-ET-LOIR','Eure-et-Loir',1),(31,'29',53,'29232',2,'FINISTERE','Finistère',1),(32,'30',91,'30189',2,'GARD','Gard',1),(33,'31',73,'31555',3,'HAUTE-GARONNE','Haute-Garonne',1),(34,'32',73,'32013',2,'GERS','Gers',1),(35,'33',72,'33063',3,'GIRONDE','Gironde',1),(36,'34',91,'34172',5,'HERAULT','Hérault',1),(37,'35',53,'35238',1,'ILLE-ET-VILAINE','Ille-et-Vilaine',1),(38,'36',24,'36044',5,'INDRE','Indre',1),(39,'37',24,'37261',1,'INDRE-ET-LOIRE','Indre-et-Loire',1),(40,'38',82,'38185',5,'ISERE','Isère',1),(41,'39',43,'39300',2,'JURA','Jura',1),(42,'40',72,'40192',4,'LANDES','Landes',1),(43,'41',24,'41018',0,'LOIR-ET-CHER','Loir-et-Cher',1),(44,'42',82,'42218',3,'LOIRE','Loire',1),(45,'43',83,'43157',3,'HAUTE-LOIRE','Haute-Loire',1),(46,'44',52,'44109',3,'LOIRE-ATLANTIQUE','Loire-Atlantique',1),(47,'45',24,'45234',2,'LOIRET','Loiret',1),(48,'46',73,'46042',2,'LOT','Lot',1),(49,'47',72,'47001',0,'LOT-ET-GARONNE','Lot-et-Garonne',1),(50,'48',91,'48095',3,'LOZERE','Lozère',1),(51,'49',52,'49007',0,'MAINE-ET-LOIRE','Maine-et-Loire',1),(52,'50',25,'50502',3,'MANCHE','Manche',1),(53,'51',21,'51108',3,'MARNE','Marne',1),(54,'52',21,'52121',3,'HAUTE-MARNE','Haute-Marne',1),(55,'53',52,'53130',3,'MAYENNE','Mayenne',1),(56,'54',41,'54395',0,'MEURTHE-ET-MOSELLE','Meurthe-et-Moselle',1),(57,'55',41,'55029',3,'MEUSE','Meuse',1),(58,'56',53,'56260',2,'MORBIHAN','Morbihan',1),(59,'57',41,'57463',3,'MOSELLE','Moselle',1),(60,'58',26,'58194',3,'NIEVRE','Nièvre',1),(61,'59',31,'59350',2,'NORD','Nord',1),(62,'60',22,'60057',5,'OISE','Oise',1),(63,'61',25,'61001',5,'ORNE','Orne',1),(64,'62',31,'62041',2,'PAS-DE-CALAIS','Pas-de-Calais',1),(65,'63',83,'63113',2,'PUY-DE-DOME','Puy-de-Dôme',1),(66,'64',72,'64445',4,'PYRENEES-ATLANTIQUES','Pyrénées-Atlantiques',1),(67,'65',73,'65440',4,'HAUTES-PYRENEES','Hautes-Pyrénées',1),(68,'66',91,'66136',4,'PYRENEES-ORIENTALES','Pyrénées-Orientales',1),(69,'67',42,'67482',2,'BAS-RHIN','Bas-Rhin',1),(70,'68',42,'68066',2,'HAUT-RHIN','Haut-Rhin',1),(71,'69',82,'69123',2,'RHONE','Rhône',1),(72,'70',43,'70550',3,'HAUTE-SAONE','Haute-Saône',1),(73,'71',26,'71270',0,'SAONE-ET-LOIRE','Saône-et-Loire',1),(74,'72',52,'72181',3,'SARTHE','Sarthe',1),(75,'73',82,'73065',3,'SAVOIE','Savoie',1),(76,'74',82,'74010',3,'HAUTE-SAVOIE','Haute-Savoie',1),(77,'75',11,'75056',0,'PARIS','Paris',1),(78,'76',23,'76540',3,'SEINE-MARITIME','Seine-Maritime',1),(79,'77',11,'77288',0,'SEINE-ET-MARNE','Seine-et-Marne',1),(80,'78',11,'78646',4,'YVELINES','Yvelines',1),(81,'79',54,'79191',4,'DEUX-SEVRES','Deux-Sèvres',1),(82,'80',22,'80021',3,'SOMME','Somme',1),(83,'81',73,'81004',2,'TARN','Tarn',1),(84,'82',73,'82121',0,'TARN-ET-GARONNE','Tarn-et-Garonne',1),(85,'83',93,'83137',2,'VAR','Var',1),(86,'84',93,'84007',0,'VAUCLUSE','Vaucluse',1),(87,'85',52,'85191',3,'VENDEE','Vendée',1),(88,'86',54,'86194',3,'VIENNE','Vienne',1),(89,'87',74,'87085',3,'HAUTE-VIENNE','Haute-Vienne',1),(90,'88',41,'88160',4,'VOSGES','Vosges',1),(91,'89',26,'89024',5,'YONNE','Yonne',1),(92,'90',43,'90010',0,'TERRITOIRE DE BELFORT','Territoire de Belfort',1),(93,'91',11,'91228',5,'ESSONNE','Essonne',1),(94,'92',11,'92050',4,'HAUTS-DE-SEINE','Hauts-de-Seine',1),(95,'93',11,'93008',3,'SEINE-SAINT-DENIS','Seine-Saint-Denis',1),(96,'94',11,'94028',2,'VAL-DE-MARNE','Val-de-Marne',1),(97,'95',11,'95500',2,'VAL-D\'OISE','Val-d\'Oise',1),(98,'971',1,'97105',3,'GUADELOUPE','Guadeloupe',1),(99,'972',2,'97209',3,'MARTINIQUE','Martinique',1),(100,'973',3,'97302',3,'GUYANE','Guyane',1),(101,'974',4,'97411',3,'REUNION','Réunion',1),(102,'01',201,'',1,'ANVERS','Anvers',1),(103,'02',203,'',3,'BRUXELLES-CAPITALE','Bruxelles-Capitale',1),(104,'03',202,'',2,'BRABANT-WALLON','Brabant-Wallon',1),(105,'04',201,'',1,'BRABANT-FLAMAND','Brabant-Flamand',1),(106,'05',201,'',1,'FLANDRE-OCCIDENTALE','Flandre-Occidentale',1),(107,'06',201,'',1,'FLANDRE-ORIENTALE','Flandre-Orientale',1),(108,'07',202,'',2,'HAINAUT','Hainaut',1),(109,'08',201,'',2,'LIEGE','Liège',1),(110,'09',202,'',1,'LIMBOURG','Limbourg',1),(111,'10',202,'',2,'LUXEMBOURG','Luxembourg',1),(112,'11',201,'',2,'NAMUR','Namur',1),(113,'NSW',2801,'',1,'','New South Wales',1),(114,'VIC',2801,'',1,'','Victoria',1),(115,'QLD',2801,'',1,'','Queensland',1),(116,'SA',2801,'',1,'','South Australia',1),(117,'ACT',2801,'',1,'','Australia Capital Territory',1),(118,'TAS',2801,'',1,'','Tasmania',1),(119,'WA',2801,'',1,'','Western Australia',1),(120,'NT',2801,'',1,'','Northern Territory',1),(121,'VI',419,'',19,'ALAVA','Álava',1),(122,'AB',404,'',4,'ALBACETE','Albacete',1),(123,'A',411,'',11,'ALICANTE','Alicante',1),(124,'AL',401,'',1,'ALMERIA','Almería',1),(125,'AV',403,'',3,'AVILA','Avila',1),(126,'BA',412,'',12,'BADAJOZ','Badajoz',1),(127,'PM',414,'',14,'ISLAS BALEARES','Islas Baleares',1),(128,'B',406,'',6,'BARCELONA','Barcelona',1),(129,'BU',403,'',8,'BURGOS','Burgos',1),(130,'CC',412,'',12,'CACERES','Cáceres',1),(131,'CA',401,'',1,'CADIz','Cádiz',1),(132,'CS',411,'',11,'CASTELLON','Castellón',1),(133,'CR',404,'',4,'CIUDAD REAL','Ciudad Real',1),(134,'CO',401,'',1,'CORDOBA','Córdoba',1),(135,'C',413,'',13,'LA CORUÑA','La Coruña',1),(136,'CU',404,'',4,'CUENCA','Cuenca',1),(137,'GI',406,'',6,'GERONA','Gerona',1),(138,'GR',401,'',1,'GRANADA','Granada',1),(139,'GU',404,'',4,'GUADALAJARA','Guadalajara',1),(140,'SS',419,'',19,'GUIPUZCOA','Guipúzcoa',1),(141,'H',401,'',1,'HUELVA','Huelva',1),(142,'HU',402,'',2,'HUESCA','Huesca',1),(143,'J',401,'',1,'JAEN','Jaén',1),(144,'LE',403,'',3,'LEON','León',1),(145,'L',406,'',6,'LERIDA','Lérida',1),(146,'LO',415,'',15,'LA RIOJA','La Rioja',1),(147,'LU',413,'',13,'LUGO','Lugo',1),(148,'M',416,'',16,'MADRID','Madrid',1),(149,'MA',401,'',1,'MALAGA','Málaga',1),(150,'MU',417,'',17,'MURCIA','Murcia',1),(151,'NA',408,'',8,'NAVARRA','Navarra',1),(152,'OR',413,'',13,'ORENSE','Orense',1),(153,'O',418,'',18,'ASTURIAS','Asturias',1),(154,'P',403,'',3,'PALENCIA','Palencia',1),(155,'GC',405,'',5,'LAS PALMAS','Las Palmas',1),(156,'PO',413,'',13,'PONTEVEDRA','Pontevedra',1),(157,'SA',403,'',3,'SALAMANCA','Salamanca',1),(158,'TF',405,'',5,'STA. CRUZ DE TENERIFE','Sta. Cruz de Tenerife',1),(159,'S',410,'',10,'CANTABRIA','Cantabria',1),(160,'SG',403,'',3,'SEGOVIA','Segovia',1),(161,'SE',401,'',1,'SEVILLA','Sevilla',1),(162,'SO',403,'',3,'SORIA','Soria',1),(163,'T',406,'',6,'TARRAGONA','Tarragona',1),(164,'TE',402,'',2,'TERUEL','Teruel',1),(165,'TO',404,'',5,'TOLEDO','Toledo',1),(166,'V',411,'',11,'VALENCIA','Valencia',1),(167,'VA',403,'',3,'VALLADOLID','Valladolid',1),(168,'BI',419,'',19,'VIZCAYA','Vizcaya',1),(169,'ZA',403,'',3,'ZAMORA','Zamora',1),(170,'Z',402,'',1,'ZARAGOZA','Zaragoza',1),(171,'CE',407,'',7,'CEUTA','Ceuta',1),(172,'ML',409,'',9,'MELILLA','Melilla',1),(174,'AG',601,NULL,NULL,'ARGOVIE','Argovie',1),(175,'AI',601,NULL,NULL,'APPENZELL RHODES INTERIEURES','Appenzell Rhodes intérieures',1),(176,'AR',601,NULL,NULL,'APPENZELL RHODES EXTERIEURES','Appenzell Rhodes extérieures',1),(177,'BE',601,NULL,NULL,'BERNE','Berne',1),(178,'BL',601,NULL,NULL,'BALE CAMPAGNE','Bâle Campagne',1),(179,'BS',601,NULL,NULL,'BALE VILLE','Bâle Ville',1),(180,'FR',601,NULL,NULL,'FRIBOURG','Fribourg',1),(181,'GE',601,NULL,NULL,'GENEVE','Genève',1),(182,'GL',601,NULL,NULL,'GLARIS','Glaris',1),(183,'GR',601,NULL,NULL,'GRISONS','Grisons',1),(184,'JU',601,NULL,NULL,'JURA','Jura',1),(185,'LU',601,NULL,NULL,'LUCERNE','Lucerne',1),(186,'NE',601,NULL,NULL,'NEUCHATEL','Neuchâtel',1),(187,'NW',601,NULL,NULL,'NIDWALD','Nidwald',1),(188,'OW',601,NULL,NULL,'OBWALD','Obwald',1),(189,'SG',601,NULL,NULL,'SAINT-GALL','Saint-Gall',1),(190,'SH',601,NULL,NULL,'SCHAFFHOUSE','Schaffhouse',1),(191,'SO',601,NULL,NULL,'SOLEURE','Soleure',1),(192,'SZ',601,NULL,NULL,'SCHWYZ','Schwyz',1),(193,'TG',601,NULL,NULL,'THURGOVIE','Thurgovie',1),(194,'TI',601,NULL,NULL,'TESSIN','Tessin',1),(195,'UR',601,NULL,NULL,'URI','Uri',1),(196,'VD',601,NULL,NULL,'VAUD','Vaud',1),(197,'VS',601,NULL,NULL,'VALAIS','Valais',1),(198,'ZG',601,NULL,NULL,'ZUG','Zug',1),(199,'ZH',601,NULL,NULL,'ZURICH','Zürich',1),(200,'AL',1101,'',0,'ALABAMA','Alabama',1),(201,'AK',1101,'',0,'ALASKA','Alaska',1),(202,'AZ',1101,'',0,'ARIZONA','Arizona',1),(203,'AR',1101,'',0,'ARKANSAS','Arkansas',1),(204,'CA',1101,'',0,'CALIFORNIA','California',1),(205,'CO',1101,'',0,'COLORADO','Colorado',1),(206,'CT',1101,'',0,'CONNECTICUT','Connecticut',1),(207,'DE',1101,'',0,'DELAWARE','Delaware',1),(208,'FL',1101,'',0,'FLORIDA','Florida',1),(209,'GA',1101,'',0,'GEORGIA','Georgia',1),(210,'HI',1101,'',0,'HAWAII','Hawaii',1),(211,'ID',1101,'',0,'IDAHO','Idaho',1),(212,'IL',1101,'',0,'ILLINOIS','Illinois',1),(213,'IN',1101,'',0,'INDIANA','Indiana',1),(214,'IA',1101,'',0,'IOWA','Iowa',1),(215,'KS',1101,'',0,'KANSAS','Kansas',1),(216,'KY',1101,'',0,'KENTUCKY','Kentucky',1),(217,'LA',1101,'',0,'LOUISIANA','Louisiana',1),(218,'ME',1101,'',0,'MAINE','Maine',1),(219,'MD',1101,'',0,'MARYLAND','Maryland',1),(220,'MA',1101,'',0,'MASSACHUSSETTS','Massachusetts',1),(221,'MI',1101,'',0,'MICHIGAN','Michigan',1),(222,'MN',1101,'',0,'MINNESOTA','Minnesota',1),(223,'MS',1101,'',0,'MISSISSIPPI','Mississippi',1),(224,'MO',1101,'',0,'MISSOURI','Missouri',1),(225,'MT',1101,'',0,'MONTANA','Montana',1),(226,'NE',1101,'',0,'NEBRASKA','Nebraska',1),(227,'NV',1101,'',0,'NEVADA','Nevada',1),(228,'NH',1101,'',0,'NEW HAMPSHIRE','New Hampshire',1),(229,'NJ',1101,'',0,'NEW JERSEY','New Jersey',1),(230,'NM',1101,'',0,'NEW MEXICO','New Mexico',1),(231,'NY',1101,'',0,'NEW YORK','New York',1),(232,'NC',1101,'',0,'NORTH CAROLINA','North Carolina',1),(233,'ND',1101,'',0,'NORTH DAKOTA','North Dakota',1),(234,'OH',1101,'',0,'OHIO','Ohio',1),(235,'OK',1101,'',0,'OKLAHOMA','Oklahoma',1),(236,'OR',1101,'',0,'OREGON','Oregon',1),(237,'PA',1101,'',0,'PENNSYLVANIA','Pennsylvania',1),(238,'RI',1101,'',0,'RHODE ISLAND','Rhode Island',1),(239,'SC',1101,'',0,'SOUTH CAROLINA','South Carolina',1),(240,'SD',1101,'',0,'SOUTH DAKOTA','South Dakota',1),(241,'TN',1101,'',0,'TENNESSEE','Tennessee',1),(242,'TX',1101,'',0,'TEXAS','Texas',1),(243,'UT',1101,'',0,'UTAH','Utah',1),(244,'VT',1101,'',0,'VERMONT','Vermont',1),(245,'VA',1101,'',0,'VIRGINIA','Virginia',1),(246,'WA',1101,'',0,'WASHINGTON','Washington',1),(247,'WV',1101,'',0,'WEST VIRGINIA','West Virginia',1),(248,'WI',1101,'',0,'WISCONSIN','Wisconsin',1),(249,'WY',1101,'',0,'WYOMING','Wyoming',1),(250,'SS',8601,NULL,NULL,NULL,'San Salvador',1),(251,'SA',8603,NULL,NULL,NULL,'Santa Ana',1),(252,'AH',8603,NULL,NULL,NULL,'Ahuachapan',1),(253,'SO',8603,NULL,NULL,NULL,'Sonsonate',1),(254,'US',8602,NULL,NULL,NULL,'Usulutan',1),(255,'SM',8602,NULL,NULL,NULL,'San Miguel',1),(256,'MO',8602,NULL,NULL,NULL,'Morazan',1),(257,'LU',8602,NULL,NULL,NULL,'La Union',1),(258,'LL',8601,NULL,NULL,NULL,'La Libertad',1),(259,'CH',8601,NULL,NULL,NULL,'Chalatenango',1),(260,'CA',8601,NULL,NULL,NULL,'Cabañas',1),(261,'LP',8601,NULL,NULL,NULL,'La Paz',1),(262,'SV',8601,NULL,NULL,NULL,'San Vicente',1),(263,'CU',8601,NULL,NULL,NULL,'Cuscatlan',1),(264,'2301',2301,'',0,'CATAMARCA','Catamarca',1),(265,'2302',2301,'',0,'JUJUY','Jujuy',1),(266,'2303',2301,'',0,'TUCAMAN','Tucamán',1),(267,'2304',2301,'',0,'SANTIAGO DEL ESTERO','Santiago del Estero',1),(268,'2305',2301,'',0,'SALTA','Salta',1),(269,'2306',2302,'',0,'CHACO','Chaco',1),(270,'2307',2302,'',0,'CORRIENTES','Corrientes',1),(271,'2308',2302,'',0,'ENTRE RIOS','Entre Ríos',1),(272,'2309',2302,'',0,'FORMOSA MISIONES','Formosa Misiones',1),(273,'2310',2302,'',0,'SANTA FE','Santa Fe',1),(274,'2311',2303,'',0,'LA RIOJA','La Rioja',1),(275,'2312',2303,'',0,'MENDOZA','Mendoza',1),(276,'2313',2303,'',0,'SAN JUAN','San Juan',1),(277,'2314',2303,'',0,'SAN LUIS','San Luis',1),(278,'2315',2304,'',0,'CORDOBA','Córdoba',1),(279,'2316',2304,'',0,'BUENOS AIRES','Buenos Aires',1),(280,'2317',2304,'',0,'CABA','Caba',1),(281,'2318',2305,'',0,'LA PAMPA','La Pampa',1),(282,'2319',2305,'',0,'NEUQUEN','Neuquén',1),(283,'2320',2305,'',0,'RIO NEGRO','Río Negro',1),(284,'2321',2305,'',0,'CHUBUT','Chubut',1),(285,'2322',2305,'',0,'SANTA CRUZ','Santa Cruz',1),(286,'2323',2305,'',0,'TIERRA DEL FUEGO','Tierra del Fuego',1),(287,'2324',2305,'',0,'ISLAS MALVINAS','Islas Malvinas',1),(288,'2325',2305,'',0,'ANTARTIDA','Antártida',1),(289,'AN',11701,NULL,0,'AN','Andaman & Nicobar',1),(290,'AP',11701,NULL,0,'AP','Andhra Pradesh',1),(291,'AR',11701,NULL,0,'AR','Arunachal Pradesh',1),(292,'AS',11701,NULL,0,'AS','Assam',1),(293,'BR',11701,NULL,0,'BR','Bihar',1),(294,'CG',11701,NULL,0,'CG','Chattisgarh',1),(295,'CH',11701,NULL,0,'CH','Chandigarh',1),(296,'DD',11701,NULL,0,'DD','Daman & Diu',1),(297,'DL',11701,NULL,0,'DL','Delhi',1),(298,'DN',11701,NULL,0,'DN','Dadra and Nagar Haveli',1),(299,'GA',11701,NULL,0,'GA','Goa',1),(300,'GJ',11701,NULL,0,'GJ','Gujarat',1),(301,'HP',11701,NULL,0,'HP','Himachal Pradesh',1),(302,'HR',11701,NULL,0,'HR','Haryana',1),(303,'JH',11701,NULL,0,'JH','Jharkhand',1),(304,'JK',11701,NULL,0,'JK','Jammu & Kashmir',1),(305,'KA',11701,NULL,0,'KA','Karnataka',1),(306,'KL',11701,NULL,0,'KL','Kerala',1),(307,'LD',11701,NULL,0,'LD','Lakshadweep',1),(308,'MH',11701,NULL,0,'MH','Maharashtra',1),(309,'ML',11701,NULL,0,'ML','Meghalaya',1),(310,'MN',11701,NULL,0,'MN','Manipur',1),(311,'MP',11701,NULL,0,'MP','Madhya Pradesh',1),(312,'MZ',11701,NULL,0,'MZ','Mizoram',1),(313,'NL',11701,NULL,0,'NL','Nagaland',1),(314,'OR',11701,NULL,0,'OR','Orissa',1),(315,'PB',11701,NULL,0,'PB','Punjab',1),(316,'PY',11701,NULL,0,'PY','Puducherry',1),(317,'RJ',11701,NULL,0,'RJ','Rajasthan',1),(318,'SK',11701,NULL,0,'SK','Sikkim',1),(319,'TN',11701,NULL,0,'TN','Tamil Nadu',1),(320,'TR',11701,NULL,0,'TR','Tripura',1),(321,'UL',11701,NULL,0,'UL','Uttarakhand',1),(322,'UP',11701,NULL,0,'UP','Uttar Pradesh',1),(323,'WB',11701,NULL,0,'WB','West Bengal',1),(374,'151',6715,'',0,'151','Arica',1),(375,'152',6715,'',0,'152','Parinacota',1),(376,'011',6701,'',0,'011','Iquique',1),(377,'014',6701,'',0,'014','Tamarugal',1),(378,'021',6702,'',0,'021','Antofagasa',1),(379,'022',6702,'',0,'022','El Loa',1),(380,'023',6702,'',0,'023','Tocopilla',1),(381,'031',6703,'',0,'031','Copiapó',1),(382,'032',6703,'',0,'032','Chañaral',1),(383,'033',6703,'',0,'033','Huasco',1),(384,'041',6704,'',0,'041','Elqui',1),(385,'042',6704,'',0,'042','Choapa',1),(386,'043',6704,'',0,'043','Limarí',1),(387,'051',6705,'',0,'051','Valparaíso',1),(388,'052',6705,'',0,'052','Isla de Pascua',1),(389,'053',6705,'',0,'053','Los Andes',1),(390,'054',6705,'',0,'054','Petorca',1),(391,'055',6705,'',0,'055','Quillota',1),(392,'056',6705,'',0,'056','San Antonio',1),(393,'057',6705,'',0,'057','San Felipe de Aconcagua',1),(394,'058',6705,'',0,'058','Marga Marga',1),(395,'061',6706,'',0,'061','Cachapoal',1),(396,'062',6706,'',0,'062','Cardenal Caro',1),(397,'063',6706,'',0,'063','Colchagua',1),(398,'071',6707,'',0,'071','Talca',1),(399,'072',6707,'',0,'072','Cauquenes',1),(400,'073',6707,'',0,'073','Curicó',1),(401,'074',6707,'',0,'074','Linares',1),(402,'081',6708,'',0,'081','Concepción',1),(403,'082',6708,'',0,'082','Arauco',1),(404,'083',6708,'',0,'083','Biobío',1),(405,'084',6708,'',0,'084','Ñuble',1),(406,'091',6709,'',0,'091','Cautín',1),(407,'092',6709,'',0,'092','Malleco',1),(408,'141',6714,'',0,'141','Valdivia',1),(409,'142',6714,'',0,'142','Ranco',1),(410,'101',6710,'',0,'101','Llanquihue',1),(411,'102',6710,'',0,'102','Chiloé',1),(412,'103',6710,'',0,'103','Osorno',1),(413,'104',6710,'',0,'104','Palena',1),(414,'111',6711,'',0,'111','Coihaique',1),(415,'112',6711,'',0,'112','Aisén',1),(416,'113',6711,'',0,'113','Capitán Prat',1),(417,'114',6711,'',0,'114','General Carrera',1),(418,'121',6712,'',0,'121','Magallanes',1),(419,'122',6712,'',0,'122','Antártica Chilena',1),(420,'123',6712,'',0,'123','Tierra del Fuego',1),(421,'124',6712,'',0,'124','Última Esperanza',1),(422,'131',6713,'',0,'131','Santiago',1),(423,'132',6713,'',0,'132','Cordillera',1),(424,'133',6713,'',0,'133','Chacabuco',1),(425,'134',6713,'',0,'134','Maipo',1),(426,'135',6713,'',0,'135','Melipilla',1),(427,'136',6713,'',0,'136','Talagante',1),(428,'DIF',15401,'',0,'DIF','Distrito Federal',1),(429,'AGS',15401,'',0,'AGS','Aguascalientes',1),(430,'BCN',15401,'',0,'BCN','Baja California Norte',1),(431,'BCS',15401,'',0,'BCS','Baja California Sur',1),(432,'CAM',15401,'',0,'CAM','Campeche',1),(433,'CHP',15401,'',0,'CHP','Chiapas',1),(434,'CHI',15401,'',0,'CHI','Chihuahua',1),(435,'COA',15401,'',0,'COA','Coahuila',1),(436,'COL',15401,'',0,'COL','Colima',1),(437,'DUR',15401,'',0,'DUR','Durango',1),(438,'GTO',15401,'',0,'GTO','Guanajuato',1),(439,'GRO',15401,'',0,'GRO','Guerrero',1),(440,'HGO',15401,'',0,'HGO','Hidalgo',1),(441,'JAL',15401,'',0,'JAL','Jalisco',1),(442,'MEX',15401,'',0,'MEX','México',1),(443,'MIC',15401,'',0,'MIC','Michoacán de Ocampo',1),(444,'MOR',15401,'',0,'MOR','Morelos',1),(445,'NAY',15401,'',0,'NAY','Nayarit',1),(446,'NLE',15401,'',0,'NLE','Nuevo León',1),(447,'OAX',15401,'',0,'OAX','Oaxaca',1),(448,'PUE',15401,'',0,'PUE','Puebla',1),(449,'QRO',15401,'',0,'QRO','Querétaro',1),(451,'ROO',15401,'',0,'ROO','Quintana Roo',1),(452,'SLP',15401,'',0,'SLP','San Luis Potosí',1),(453,'SIN',15401,'',0,'SIN','Sinaloa',1),(454,'SON',15401,'',0,'SON','Sonora',1),(455,'TAB',15401,'',0,'TAB','Tabasco',1),(456,'TAM',15401,'',0,'TAM','Tamaulipas',1),(457,'TLX',15401,'',0,'TLX','Tlaxcala',1),(458,'VER',15401,'',0,'VER','Veracruz',1),(459,'YUC',15401,'',0,'YUC','Yucatán',1),(460,'ZAC',15401,'',0,'ZAC','Zacatecas',1),(461,'ANT',7001,'',0,'ANT','Antioquia',1),(462,'BOL',7001,'',0,'BOL','Bolívar',1),(463,'BOY',7001,'',0,'BOY','Boyacá',1),(464,'CAL',7001,'',0,'CAL','Caldas',1),(465,'CAU',7001,'',0,'CAU','Cauca',1),(466,'CUN',7001,'',0,'CUN','Cundinamarca',1),(467,'HUI',7001,'',0,'HUI','Huila',1),(468,'LAG',7001,'',0,'LAG','La Guajira',1),(469,'MET',7001,'',0,'MET','Meta',1),(470,'NAR',7001,'',0,'NAR','Nariño',1),(471,'NDS',7001,'',0,'NDS','Norte de Santander',1),(472,'SAN',7001,'',0,'SAN','Santander',1),(473,'SUC',7001,'',0,'SUC','Sucre',1),(474,'TOL',7001,'',0,'TOL','Tolima',1),(475,'VAC',7001,'',0,'VAC','Valle del Cauca',1),(476,'RIS',7001,'',0,'RIS','Risalda',1),(477,'ATL',7001,'',0,'ATL','Atlántico',1),(478,'COR',7001,'',0,'COR','Córdoba',1),(479,'SAP',7001,'',0,'SAP','San Andrés, Providencia y Santa Catalina',1),(480,'ARA',7001,'',0,'ARA','Arauca',1),(481,'CAS',7001,'',0,'CAS','Casanare',1),(482,'AMA',7001,'',0,'AMA','Amazonas',1),(483,'CAQ',7001,'',0,'CAQ','Caquetá',1),(484,'CHO',7001,'',0,'CHO','Chocó',1),(485,'GUA',7001,'',0,'GUA','Guainía',1),(486,'GUV',7001,'',0,'GUV','Guaviare',1),(487,'PUT',7001,'',0,'PUT','Putumayo',1),(488,'QUI',7001,'',0,'QUI','Quindío',1),(489,'VAU',7001,'',0,'VAU','Vaupés',1),(490,'BOG',7001,'',0,'BOG','Bogotá',1),(491,'VID',7001,'',0,'VID','Vichada',1),(492,'CES',7001,'',0,'CES','Cesar',1),(493,'MAG',7001,'',0,'MAG','Magdalena',1),(494,'AT',11401,'',0,'AT','Atlántida',1),(495,'CH',11401,'',0,'CH','Choluteca',1),(496,'CL',11401,'',0,'CL','Colón',1),(497,'CM',11401,'',0,'CM','Comayagua',1),(498,'CO',11401,'',0,'CO','Copán',1),(499,'CR',11401,'',0,'CR','Cortés',1),(500,'EP',11401,'',0,'EP','El Paraíso',1),(501,'FM',11401,'',0,'FM','Francisco Morazán',1),(502,'GD',11401,'',0,'GD','Gracias a Dios',1),(503,'IN',11401,'',0,'IN','Intibucá',1),(504,'IB',11401,'',0,'IB','Islas de la Bahía',1),(505,'LP',11401,'',0,'LP','La Paz',1),(506,'LM',11401,'',0,'LM','Lempira',1),(507,'OC',11401,'',0,'OC','Ocotepeque',1),(508,'OL',11401,'',0,'OL','Olancho',1),(509,'SB',11401,'',0,'SB','Santa Bárbara',1),(510,'VL',11401,'',0,'VL','Valle',1),(511,'YO',11401,'',0,'YO','Yoro',1),(512,'DC',11401,'',0,'DC','Distrito Central',1),(652,'CC',4601,'Oistins',0,'CC','Christ Church',1),(655,'SA',4601,'Greenland',0,'SA','Saint Andrew',1),(656,'SG',4601,'Bulkeley',0,'SG','Saint George',1),(657,'JA',4601,'Holetown',0,'JA','Saint James',1),(658,'SJ',4601,'Four Roads',0,'SJ','Saint John',1),(659,'SB',4601,'Bathsheba',0,'SB','Saint Joseph',1),(660,'SL',4601,'Crab Hill',0,'SL','Saint Lucy',1),(661,'SM',4601,'Bridgetown',0,'SM','Saint Michael',1),(662,'SP',4601,'Speightstown',0,'SP','Saint Peter',1),(663,'SC',4601,'Crane',0,'SC','Saint Philip',1),(664,'ST',4601,'Hillaby',0,'ST','Saint Thomas',1),(777,'AG',315,NULL,NULL,NULL,'AGRIGENTO',1),(778,'AL',312,NULL,NULL,NULL,'ALESSANDRIA',1),(779,'AN',310,NULL,NULL,NULL,'ANCONA',1),(780,'AO',319,NULL,NULL,NULL,'AOSTA',1),(781,'AR',316,NULL,NULL,NULL,'AREZZO',1),(782,'AP',310,NULL,NULL,NULL,'ASCOLI PICENO',1),(783,'AT',312,NULL,NULL,NULL,'ASTI',1),(784,'AV',304,NULL,NULL,NULL,'AVELLINO',1),(785,'BA',313,NULL,NULL,NULL,'BARI',1),(786,'BT',313,NULL,NULL,NULL,'BARLETTA-ANDRIA-TRANI',1),(787,'BL',320,NULL,NULL,NULL,'BELLUNO',1),(788,'BN',304,NULL,NULL,NULL,'BENEVENTO',1),(789,'BG',309,NULL,NULL,NULL,'BERGAMO',1),(790,'BI',312,NULL,NULL,NULL,'BIELLA',1),(791,'BO',305,NULL,NULL,NULL,'BOLOGNA',1),(792,'BZ',317,NULL,NULL,NULL,'BOLZANO',1),(793,'BS',309,NULL,NULL,NULL,'BRESCIA',1),(794,'BR',313,NULL,NULL,NULL,'BRINDISI',1),(795,'CA',314,NULL,NULL,NULL,'CAGLIARI',1),(796,'CL',315,NULL,NULL,NULL,'CALTANISSETTA',1),(797,'CB',311,NULL,NULL,NULL,'CAMPOBASSO',1),(798,'CI',314,NULL,NULL,NULL,'CARBONIA-IGLESIAS',1),(799,'CE',304,NULL,NULL,NULL,'CASERTA',1),(800,'CT',315,NULL,NULL,NULL,'CATANIA',1),(801,'CZ',303,NULL,NULL,NULL,'CATANZARO',1),(802,'CH',301,NULL,NULL,NULL,'CHIETI',1),(803,'CO',309,NULL,NULL,NULL,'COMO',1),(804,'CS',303,NULL,NULL,NULL,'COSENZA',1),(805,'CR',309,NULL,NULL,NULL,'CREMONA',1),(806,'KR',303,NULL,NULL,NULL,'CROTONE',1),(807,'CN',312,NULL,NULL,NULL,'CUNEO',1),(808,'EN',315,NULL,NULL,NULL,'ENNA',1),(809,'FM',310,NULL,NULL,NULL,'FERMO',1),(810,'FE',305,NULL,NULL,NULL,'FERRARA',1),(811,'FI',316,NULL,NULL,NULL,'FIRENZE',1),(812,'FG',313,NULL,NULL,NULL,'FOGGIA',1),(813,'FC',305,NULL,NULL,NULL,'FORLI-CESENA',1),(814,'FR',307,NULL,NULL,NULL,'FROSINONE',1),(815,'GE',308,NULL,NULL,NULL,'GENOVA',1),(816,'GO',306,NULL,NULL,NULL,'GORIZIA',1),(817,'GR',316,NULL,NULL,NULL,'GROSSETO',1),(818,'IM',308,NULL,NULL,NULL,'IMPERIA',1),(819,'IS',311,NULL,NULL,NULL,'ISERNIA',1),(820,'SP',308,NULL,NULL,NULL,'LA SPEZIA',1),(821,'AQ',301,NULL,NULL,NULL,'L AQUILA',1),(822,'LT',307,NULL,NULL,NULL,'LATINA',1),(823,'LE',313,NULL,NULL,NULL,'LECCE',1),(824,'LC',309,NULL,NULL,NULL,'LECCO',1),(825,'LI',314,NULL,NULL,NULL,'LIVORNO',1),(826,'LO',309,NULL,NULL,NULL,'LODI',1),(827,'LU',316,NULL,NULL,NULL,'LUCCA',1),(828,'MC',310,NULL,NULL,NULL,'MACERATA',1),(829,'MN',309,NULL,NULL,NULL,'MANTOVA',1),(830,'MS',316,NULL,NULL,NULL,'MASSA-CARRARA',1),(831,'MT',302,NULL,NULL,NULL,'MATERA',1),(832,'VS',314,NULL,NULL,NULL,'MEDIO CAMPIDANO',1),(833,'ME',315,NULL,NULL,NULL,'MESSINA',1),(834,'MI',309,NULL,NULL,NULL,'MILANO',1),(835,'MB',309,NULL,NULL,NULL,'MONZA e BRIANZA',1),(836,'MO',305,NULL,NULL,NULL,'MODENA',1),(837,'NA',304,NULL,NULL,NULL,'NAPOLI',1),(838,'NO',312,NULL,NULL,NULL,'NOVARA',1),(839,'NU',314,NULL,NULL,NULL,'NUORO',1),(840,'OG',314,NULL,NULL,NULL,'OGLIASTRA',1),(841,'OT',314,NULL,NULL,NULL,'OLBIA-TEMPIO',1),(842,'OR',314,NULL,NULL,NULL,'ORISTANO',1),(843,'PD',320,NULL,NULL,NULL,'PADOVA',1),(844,'PA',315,NULL,NULL,NULL,'PALERMO',1),(845,'PR',305,NULL,NULL,NULL,'PARMA',1),(846,'PV',309,NULL,NULL,NULL,'PAVIA',1),(847,'PG',318,NULL,NULL,NULL,'PERUGIA',1),(848,'PU',310,NULL,NULL,NULL,'PESARO e URBINO',1),(849,'PE',301,NULL,NULL,NULL,'PESCARA',1),(850,'PC',305,NULL,NULL,NULL,'PIACENZA',1),(851,'PI',316,NULL,NULL,NULL,'PISA',1),(852,'PT',316,NULL,NULL,NULL,'PISTOIA',1),(853,'PN',306,NULL,NULL,NULL,'PORDENONE',1),(854,'PZ',302,NULL,NULL,NULL,'POTENZA',1),(855,'PO',316,NULL,NULL,NULL,'PRATO',1),(856,'RG',315,NULL,NULL,NULL,'RAGUSA',1),(857,'RA',305,NULL,NULL,NULL,'RAVENNA',1),(858,'RC',303,NULL,NULL,NULL,'REGGIO CALABRIA',1),(859,'RE',305,NULL,NULL,NULL,'REGGIO NELL EMILIA',1),(860,'RI',307,NULL,NULL,NULL,'RIETI',1),(861,'RN',305,NULL,NULL,NULL,'RIMINI',1),(862,'RM',307,NULL,NULL,NULL,'ROMA',1),(863,'RO',320,NULL,NULL,NULL,'ROVIGO',1),(864,'SA',304,NULL,NULL,NULL,'SALERNO',1),(865,'SS',314,NULL,NULL,NULL,'SASSARI',1),(866,'SV',308,NULL,NULL,NULL,'SAVONA',1),(867,'SI',316,NULL,NULL,NULL,'SIENA',1),(868,'SR',315,NULL,NULL,NULL,'SIRACUSA',1),(869,'SO',309,NULL,NULL,NULL,'SONDRIO',1),(870,'TA',313,NULL,NULL,NULL,'TARANTO',1),(871,'TE',301,NULL,NULL,NULL,'TERAMO',1),(872,'TR',318,NULL,NULL,NULL,'TERNI',1),(873,'TO',312,NULL,NULL,NULL,'TORINO',1),(874,'TP',315,NULL,NULL,NULL,'TRAPANI',1),(875,'TN',317,NULL,NULL,NULL,'TRENTO',1),(876,'TV',320,NULL,NULL,NULL,'TREVISO',1),(877,'TS',306,NULL,NULL,NULL,'TRIESTE',1),(878,'UD',306,NULL,NULL,NULL,'UDINE',1),(879,'VA',309,NULL,NULL,NULL,'VARESE',1),(880,'VE',320,NULL,NULL,NULL,'VENEZIA',1),(881,'VB',312,NULL,NULL,NULL,'VERBANO-CUSIO-OSSOLA',1),(882,'VC',312,NULL,NULL,NULL,'VERCELLI',1),(883,'VR',320,NULL,NULL,NULL,'VERONA',1),(884,'VV',303,NULL,NULL,NULL,'VIBO VALENTIA',1),(885,'VI',320,NULL,NULL,NULL,'VICENZA',1),(886,'VT',307,NULL,NULL,NULL,'VITERBO',1),(1036,'VE-L',23201,'',0,'VE-L','Mérida',1),(1037,'VE-T',23201,'',0,'VE-T','Trujillo',1),(1038,'VE-E',23201,'',0,'VE-E','Barinas',1),(1039,'VE-M',23202,'',0,'VE-M','Miranda',1),(1040,'VE-W',23202,'',0,'VE-W','Vargas',1),(1041,'VE-A',23202,'',0,'VE-A','Distrito Capital',1),(1042,'VE-D',23203,'',0,'VE-D','Aragua',1),(1043,'VE-G',23203,'',0,'VE-G','Carabobo',1),(1044,'VE-I',23204,'',0,'VE-I','Falcón',1),(1045,'VE-K',23204,'',0,'VE-K','Lara',1),(1046,'VE-U',23204,'',0,'VE-U','Yaracuy',1),(1047,'VE-F',23205,'',0,'VE-F','Bolívar',1),(1048,'VE-X',23205,'',0,'VE-X','Amazonas',1),(1049,'VE-Y',23205,'',0,'VE-Y','Delta Amacuro',1),(1050,'VE-O',23206,'',0,'VE-O','Nueva Esparta',1),(1051,'VE-Z',23206,'',0,'VE-Z','Dependencias Federales',1),(1052,'VE-C',23207,'',0,'VE-C','Apure',1),(1053,'VE-J',23207,'',0,'VE-J','Guárico',1),(1054,'VE-H',23207,'',0,'VE-H','Cojedes',1),(1055,'VE-P',23207,'',0,'VE-P','Portuguesa',1),(1056,'VE-B',23208,'',0,'VE-B','Anzoátegui',1),(1057,'VE-N',23208,'',0,'VE-N','Monagas',1),(1058,'VE-R',23208,'',0,'VE-R','Sucre',1),(1059,'VE-V',23209,'',0,'VE-V','Zulia',1),(1060,'VE-S',23209,'',0,'VE-S','Táchira',1),(1061,'66',10201,NULL,NULL,NULL,'?????',1),(1062,'00',10205,NULL,NULL,NULL,'?????',1),(1063,'01',10205,NULL,NULL,NULL,'?????',1),(1064,'02',10205,NULL,NULL,NULL,'?????',1),(1065,'03',10205,NULL,NULL,NULL,'??????',1),(1066,'04',10205,NULL,NULL,NULL,'?????',1),(1067,'05',10205,NULL,NULL,NULL,'??????',1),(1068,'06',10203,NULL,NULL,NULL,'??????',1),(1069,'07',10203,NULL,NULL,NULL,'???????????',1),(1070,'08',10203,NULL,NULL,NULL,'??????',1),(1071,'09',10203,NULL,NULL,NULL,'?????',1),(1072,'10',10203,NULL,NULL,NULL,'??????',1),(1073,'11',10203,NULL,NULL,NULL,'??????',1),(1074,'12',10203,NULL,NULL,NULL,'?????????',1),(1075,'13',10206,NULL,NULL,NULL,'????',1),(1076,'14',10206,NULL,NULL,NULL,'?????????',1),(1077,'15',10206,NULL,NULL,NULL,'????????',1),(1078,'16',10206,NULL,NULL,NULL,'???????',1),(1079,'17',10213,NULL,NULL,NULL,'???????',1),(1080,'18',10213,NULL,NULL,NULL,'????????',1),(1081,'19',10213,NULL,NULL,NULL,'??????',1),(1082,'20',10213,NULL,NULL,NULL,'???????',1),(1083,'21',10212,NULL,NULL,NULL,'????????',1),(1084,'22',10212,NULL,NULL,NULL,'??????',1),(1085,'23',10212,NULL,NULL,NULL,'????????',1),(1086,'24',10212,NULL,NULL,NULL,'???????',1),(1087,'25',10212,NULL,NULL,NULL,'????????',1),(1088,'26',10212,NULL,NULL,NULL,'???????',1),(1089,'27',10202,NULL,NULL,NULL,'??????',1),(1090,'28',10202,NULL,NULL,NULL,'?????????',1),(1091,'29',10202,NULL,NULL,NULL,'????????',1),(1092,'30',10202,NULL,NULL,NULL,'??????',1),(1093,'31',10209,NULL,NULL,NULL,'????????',1),(1094,'32',10209,NULL,NULL,NULL,'???????',1),(1095,'33',10209,NULL,NULL,NULL,'????????',1),(1096,'34',10209,NULL,NULL,NULL,'???????',1),(1097,'35',10209,NULL,NULL,NULL,'????????',1),(1098,'36',10211,NULL,NULL,NULL,'???????????????',1),(1099,'37',10211,NULL,NULL,NULL,'?????',1),(1100,'38',10211,NULL,NULL,NULL,'?????',1),(1101,'39',10207,NULL,NULL,NULL,'????????',1),(1102,'40',10207,NULL,NULL,NULL,'???????',1),(1103,'41',10207,NULL,NULL,NULL,'??????????',1),(1104,'42',10207,NULL,NULL,NULL,'?????',1),(1105,'43',10207,NULL,NULL,NULL,'???????',1),(1106,'44',10208,NULL,NULL,NULL,'??????',1),(1107,'45',10208,NULL,NULL,NULL,'??????',1),(1108,'46',10208,NULL,NULL,NULL,'??????',1),(1109,'47',10208,NULL,NULL,NULL,'?????',1),(1110,'48',10208,NULL,NULL,NULL,'????',1),(1111,'49',10210,NULL,NULL,NULL,'??????',1),(1112,'50',10210,NULL,NULL,NULL,'????',1),(1113,'51',10210,NULL,NULL,NULL,'????????',1),(1114,'52',10210,NULL,NULL,NULL,'????????',1),(1115,'53',10210,NULL,NULL,NULL,'???-??????',1),(1116,'54',10210,NULL,NULL,NULL,'??',1),(1117,'55',10210,NULL,NULL,NULL,'?????',1),(1118,'56',10210,NULL,NULL,NULL,'???????',1),(1119,'57',10210,NULL,NULL,NULL,'?????',1),(1120,'58',10210,NULL,NULL,NULL,'?????',1),(1121,'59',10210,NULL,NULL,NULL,'?????',1),(1122,'60',10210,NULL,NULL,NULL,'?????',1),(1123,'61',10210,NULL,NULL,NULL,'?????',1),(1124,'62',10204,NULL,NULL,NULL,'????????',1),(1125,'63',10204,NULL,NULL,NULL,'??????',1),(1126,'64',10204,NULL,NULL,NULL,'???????',1),(1127,'65',10204,NULL,NULL,NULL,'?????',1),(1128,'AL01',1301,'',0,'','Wilaya d\'Adrar',1),(1129,'AL02',1301,'',0,'','Wilaya de Chlef',1),(1130,'AL03',1301,'',0,'','Wilaya de Laghouat',1),(1131,'AL04',1301,'',0,'','Wilaya d\'Oum El Bouaghi',1),(1132,'AL05',1301,'',0,'','Wilaya de Batna',1),(1133,'AL06',1301,'',0,'','Wilaya de Béjaïa',1),(1134,'AL07',1301,'',0,'','Wilaya de Biskra',1),(1135,'AL08',1301,'',0,'','Wilaya de Béchar',1),(1136,'AL09',1301,'',0,'','Wilaya de Blida',1),(1137,'AL11',1301,'',0,'','Wilaya de Bouira',1),(1138,'AL12',1301,'',0,'','Wilaya de Tamanrasset',1),(1139,'AL13',1301,'',0,'','Wilaya de Tébessa',1),(1140,'AL14',1301,'',0,'','Wilaya de Tlemcen',1),(1141,'AL15',1301,'',0,'','Wilaya de Tiaret',1),(1142,'AL16',1301,'',0,'','Wilaya de Tizi Ouzou',1),(1143,'AL17',1301,'',0,'','Wilaya d\'Alger',1),(1144,'AL18',1301,'',0,'','Wilaya de Djelfa',1),(1145,'AL19',1301,'',0,'','Wilaya de Jijel',1),(1146,'AL20',1301,'',0,'','Wilaya de Sétif ',1),(1147,'AL21',1301,'',0,'','Wilaya de Saïda',1),(1148,'AL22',1301,'',0,'','Wilaya de Skikda',1),(1149,'AL23',1301,'',0,'','Wilaya de Sidi Bel Abbès',1),(1150,'AL24',1301,'',0,'','Wilaya d\'Annaba',1),(1151,'AL25',1301,'',0,'','Wilaya de Guelma',1),(1152,'AL26',1301,'',0,'','Wilaya de Constantine',1),(1153,'AL27',1301,'',0,'','Wilaya de Médéa',1),(1154,'AL28',1301,'',0,'','Wilaya de Mostaganem',1),(1155,'AL29',1301,'',0,'','Wilaya de M\'Sila',1),(1156,'AL30',1301,'',0,'','Wilaya de Mascara',1),(1157,'AL31',1301,'',0,'','Wilaya d\'Ouargla',1),(1158,'AL32',1301,'',0,'','Wilaya d\'Oran',1),(1159,'AL33',1301,'',0,'','Wilaya d\'El Bayadh',1),(1160,'AL34',1301,'',0,'','Wilaya d\'Illizi',1),(1161,'AL35',1301,'',0,'','Wilaya de Bordj Bou Arreridj',1),(1162,'AL36',1301,'',0,'','Wilaya de Boumerdès',1),(1163,'AL37',1301,'',0,'','Wilaya d\'El Tarf',1),(1164,'AL38',1301,'',0,'','Wilaya de Tindouf',1),(1165,'AL39',1301,'',0,'','Wilaya de Tissemsilt',1),(1166,'AL40',1301,'',0,'','Wilaya d\'El Oued',1),(1167,'AL41',1301,'',0,'','Wilaya de Khenchela',1),(1168,'AL42',1301,'',0,'','Wilaya de Souk Ahras',1),(1169,'AL43',1301,'',0,'','Wilaya de Tipaza',1),(1170,'AL44',1301,'',0,'','Wilaya de Mila',1),(1171,'AL45',1301,'',0,'','Wilaya d\'Aïn Defla',1),(1172,'AL46',1301,'',0,'','Wilaya de Naâma',1),(1173,'AL47',1301,'',0,'','Wilaya d\'Aïn Témouchent',1),(1174,'AL48',1301,'',0,'','Wilaya de Ghardaia',1),(1175,'AL49',1301,'',0,'','Wilaya de Relizane',1),(1176,'MA',1209,'',0,'','Province de Benslimane',1),(1177,'MA1',1209,'',0,'','Province de Berrechid',1),(1178,'MA2',1209,'',0,'','Province de Khouribga',1),(1179,'MA3',1209,'',0,'','Province de Settat',1),(1180,'MA4',1210,'',0,'','Province d\'El Jadida',1),(1181,'MA5',1210,'',0,'','Province de Safi',1),(1182,'MA6',1210,'',0,'','Province de Sidi Bennour',1),(1183,'MA7',1210,'',0,'','Province de Youssoufia',1),(1184,'MA6B',1205,'',0,'','Préfecture de Fès',1),(1185,'MA7B',1205,'',0,'','Province de Boulemane',1),(1186,'MA8',1205,'',0,'','Province de Moulay Yacoub',1),(1187,'MA9',1205,'',0,'','Province de Sefrou',1),(1188,'MA8A',1202,'',0,'','Province de Kénitra',1),(1189,'MA9A',1202,'',0,'','Province de Sidi Kacem',1),(1190,'MA10',1202,'',0,'','Province de Sidi Slimane',1),(1191,'MA11',1208,'',0,'','Préfecture de Casablanca',1),(1192,'MA12',1208,'',0,'','Préfecture de Mohammédia',1),(1193,'MA13',1208,'',0,'','Province de Médiouna',1),(1194,'MA14',1208,'',0,'','Province de Nouaceur',1),(1195,'MA15',1214,'',0,'','Province d\'Assa-Zag',1),(1196,'MA16',1214,'',0,'','Province d\'Es-Semara',1),(1197,'MA17A',1214,'',0,'','Province de Guelmim',1),(1198,'MA18',1214,'',0,'','Province de Tata',1),(1199,'MA19',1214,'',0,'','Province de Tan-Tan',1),(1200,'MA15',1215,'',0,'','Province de Boujdour',1),(1201,'MA16',1215,'',0,'','Province de Lâayoune',1),(1202,'MA17',1215,'',0,'','Province de Tarfaya',1),(1203,'MA18',1211,'',0,'','Préfecture de Marrakech',1),(1204,'MA19',1211,'',0,'','Province d\'Al Haouz',1),(1205,'MA20',1211,'',0,'','Province de Chichaoua',1),(1206,'MA21',1211,'',0,'','Province d\'El Kelâa des Sraghna',1),(1207,'MA22',1211,'',0,'','Province d\'Essaouira',1),(1208,'MA23',1211,'',0,'','Province de Rehamna',1),(1209,'MA24',1206,'',0,'','Préfecture de Meknès',1),(1210,'MA25',1206,'',0,'','Province d’El Hajeb',1),(1211,'MA26',1206,'',0,'','Province d\'Errachidia',1),(1212,'MA27',1206,'',0,'','Province d’Ifrane',1),(1213,'MA28',1206,'',0,'','Province de Khénifra',1),(1214,'MA29',1206,'',0,'','Province de Midelt',1),(1215,'MA30',1204,'',0,'','Préfecture d\'Oujda-Angad',1),(1216,'MA31',1204,'',0,'','Province de Berkane',1),(1217,'MA32',1204,'',0,'','Province de Driouch',1),(1218,'MA33',1204,'',0,'','Province de Figuig',1),(1219,'MA34',1204,'',0,'','Province de Jerada',1),(1220,'MA35',1204,'',0,'','Province de Nadorgg',1),(1221,'MA36',1204,'',0,'','Province de Taourirt',1),(1222,'MA37',1216,'',0,'','Province d\'Aousserd',1),(1223,'MA38',1216,'',0,'','Province d\'Oued Ed-Dahab',1),(1224,'MA39',1207,'',0,'','Préfecture de Rabat',1),(1225,'MA40',1207,'',0,'','Préfecture de Skhirat-Témara',1),(1226,'MA41',1207,'',0,'','Préfecture de Salé',1),(1227,'MA42',1207,'',0,'','Province de Khémisset',1),(1228,'MA43',1213,'',0,'','Préfecture d\'Agadir Ida-Outanane',1),(1229,'MA44',1213,'',0,'','Préfecture d\'Inezgane-Aït Melloul',1),(1230,'MA45',1213,'',0,'','Province de Chtouka-Aït Baha',1),(1231,'MA46',1213,'',0,'','Province d\'Ouarzazate',1),(1232,'MA47',1213,'',0,'','Province de Sidi Ifni',1),(1233,'MA48',1213,'',0,'','Province de Taroudant',1),(1234,'MA49',1213,'',0,'','Province de Tinghir',1),(1235,'MA50',1213,'',0,'','Province de Tiznit',1),(1236,'MA51',1213,'',0,'','Province de Zagora',1),(1237,'MA52',1212,'',0,'','Province d\'Azilal',1),(1238,'MA53',1212,'',0,'','Province de Beni Mellal',1),(1239,'MA54',1212,'',0,'','Province de Fquih Ben Salah',1),(1240,'MA55',1201,'',0,'','Préfecture de M\'diq-Fnideq',1),(1241,'MA56',1201,'',0,'','Préfecture de Tanger-Asilah',1),(1242,'MA57',1201,'',0,'','Province de Chefchaouen',1),(1243,'MA58',1201,'',0,'','Province de Fahs-Anjra',1),(1244,'MA59',1201,'',0,'','Province de Larache',1),(1245,'MA60',1201,'',0,'','Province d\'Ouezzane',1),(1246,'MA61',1201,'',0,'','Province de Tétouan',1),(1247,'MA62',1203,'',0,'','Province de Guercif',1),(1248,'MA63',1203,'',0,'','Province d\'Al Hoceïma',1),(1249,'MA64',1203,'',0,'','Province de Taounate',1),(1250,'MA65',1203,'',0,'','Province de Taza',1),(1251,'MA6A',1205,'',0,'','Préfecture de Fès',1),(1252,'MA7A',1205,'',0,'','Province de Boulemane',1),(1253,'MA15A',1214,'',0,'','Province d\'Assa-Zag',1),(1254,'MA16A',1214,'',0,'','Province d\'Es-Semara',1),(1255,'MA18A',1211,'',0,'','Préfecture de Marrakech',1),(1256,'MA19A',1214,'',0,'','Province de Tan-Tan',1),(1257,'MA19B',1214,'',0,'','Province de Tan-Tan',1),(1258,'TN01',1001,'',0,'','Ariana',1),(1259,'TN02',1001,'',0,'','Béja',1),(1260,'TN03',1001,'',0,'','Ben Arous',1),(1261,'TN04',1001,'',0,'','Bizerte',1),(1262,'TN05',1001,'',0,'','Gabès',1),(1263,'TN06',1001,'',0,'','Gafsa',1),(1264,'TN07',1001,'',0,'','Jendouba',1),(1265,'TN08',1001,'',0,'','Kairouan',1),(1266,'TN09',1001,'',0,'','Kasserine',1),(1267,'TN10',1001,'',0,'','Kébili',1),(1268,'TN11',1001,'',0,'','La Manouba',1),(1269,'TN12',1001,'',0,'','Le Kef',1),(1270,'TN13',1001,'',0,'','Mahdia',1),(1271,'TN14',1001,'',0,'','Médenine',1),(1272,'TN15',1001,'',0,'','Monastir',1),(1273,'TN16',1001,'',0,'','Nabeul',1),(1274,'TN17',1001,'',0,'','Sfax',1),(1275,'TN18',1001,'',0,'','Sidi Bouzid',1),(1276,'TN19',1001,'',0,'','Siliana',1),(1277,'TN20',1001,'',0,'','Sousse',1),(1278,'TN21',1001,'',0,'','Tataouine',1),(1279,'TN22',1001,'',0,'','Tozeur',1),(1280,'TN23',1001,'',0,'','Tunis',1),(1281,'TN24',1001,'',0,'','Zaghouan',1),(1287,'976',6,'97601',3,'MAYOTTE','Mayotte',1),(1513,'ON',1401,'',1,'','Ontario',1),(1514,'QC',1401,'',1,'','Quebec',1),(1515,'NS',1401,'',1,'','Nova Scotia',1),(1516,'NB',1401,'',1,'','New Brunswick',1),(1517,'MB',1401,'',1,'','Manitoba',1),(1518,'BC',1401,'',1,'','British Columbia',1),(1519,'PE',1401,'',1,'','Prince Edward Island',1),(1520,'SK',1401,'',1,'','Saskatchewan',1),(1521,'AB',1401,'',1,'','Alberta',1),(1522,'NL',1401,'',1,'','Newfoundland and Labrador',1),(1575,'BW',501,NULL,NULL,'BADEN-WÜRTTEMBERG','Baden-Württemberg',1),(1576,'BY',501,NULL,NULL,'BAYERN','Bayern',1),(1577,'BE',501,NULL,NULL,'BERLIN','Berlin',1),(1578,'BB',501,NULL,NULL,'BRANDENBURG','Brandenburg',1),(1579,'HB',501,NULL,NULL,'BREMEN','Bremen',1),(1580,'HH',501,NULL,NULL,'HAMBURG','Hamburg',1),(1581,'HE',501,NULL,NULL,'HESSEN','Hessen',1),(1582,'MV',501,NULL,NULL,'MECKLENBURG-VORPOMMERN','Mecklenburg-Vorpommern',1),(1583,'NI',501,NULL,NULL,'NIEDERSACHSEN','Niedersachsen',1),(1584,'NW',501,NULL,NULL,'NORDRHEIN-WESTFALEN','Nordrhein-Westfalen',1),(1585,'RP',501,NULL,NULL,'RHEINLAND-PFALZ','Rheinland-Pfalz',1),(1586,'SL',501,NULL,NULL,'SAARLAND','Saarland',1),(1587,'SN',501,NULL,NULL,'SACHSEN','Sachsen',1),(1588,'ST',501,NULL,NULL,'SACHSEN-ANHALT','Sachsen-Anhalt',1),(1589,'SH',501,NULL,NULL,'SCHLESWIG-HOLSTEIN','Schleswig-Holstein',1),(1590,'TH',501,NULL,NULL,'THÜRINGEN','Thüringen',1),(1592,'67',10205,'',0,'','Δράμα',1),(1684,'701',701,NULL,0,NULL,'Bedfordshire',1),(1685,'702',701,NULL,0,NULL,'Berkshire',1),(1686,'703',701,NULL,0,NULL,'Bristol, City of',1),(1687,'704',701,NULL,0,NULL,'Buckinghamshire',1),(1688,'705',701,NULL,0,NULL,'Cambridgeshire',1),(1689,'706',701,NULL,0,NULL,'Cheshire',1),(1690,'707',701,NULL,0,NULL,'Cleveland',1),(1691,'708',701,NULL,0,NULL,'Cornwall',1),(1692,'709',701,NULL,0,NULL,'Cumberland',1),(1693,'710',701,NULL,0,NULL,'Cumbria',1),(1694,'711',701,NULL,0,NULL,'Derbyshire',1),(1695,'712',701,NULL,0,NULL,'Devon',1),(1696,'713',701,NULL,0,NULL,'Dorset',1),(1697,'714',701,NULL,0,NULL,'Co. Durham',1),(1698,'715',701,NULL,0,NULL,'East Riding of Yorkshire',1),(1699,'716',701,NULL,0,NULL,'East Sussex',1),(1700,'717',701,NULL,0,NULL,'Essex',1),(1701,'718',701,NULL,0,NULL,'Gloucestershire',1),(1702,'719',701,NULL,0,NULL,'Greater Manchester',1),(1703,'720',701,NULL,0,NULL,'Hampshire',1),(1704,'721',701,NULL,0,NULL,'Hertfordshire',1),(1705,'722',701,NULL,0,NULL,'Hereford and Worcester',1),(1706,'723',701,NULL,0,NULL,'Herefordshire',1),(1707,'724',701,NULL,0,NULL,'Huntingdonshire',1),(1708,'725',701,NULL,0,NULL,'Isle of Man',1),(1709,'726',701,NULL,0,NULL,'Isle of Wight',1),(1710,'727',701,NULL,0,NULL,'Jersey',1),(1711,'728',701,NULL,0,NULL,'Kent',1),(1712,'729',701,NULL,0,NULL,'Lancashire',1),(1713,'730',701,NULL,0,NULL,'Leicestershire',1),(1714,'731',701,NULL,0,NULL,'Lincolnshire',1),(1715,'732',701,NULL,0,NULL,'London - City of London',1),(1716,'733',701,NULL,0,NULL,'Merseyside',1),(1717,'734',701,NULL,0,NULL,'Middlesex',1),(1718,'735',701,NULL,0,NULL,'Norfolk',1),(1719,'736',701,NULL,0,NULL,'North Yorkshire',1),(1720,'737',701,NULL,0,NULL,'North Riding of Yorkshire',1),(1721,'738',701,NULL,0,NULL,'Northamptonshire',1),(1722,'739',701,NULL,0,NULL,'Northumberland',1),(1723,'740',701,NULL,0,NULL,'Nottinghamshire',1),(1724,'741',701,NULL,0,NULL,'Oxfordshire',1),(1725,'742',701,NULL,0,NULL,'Rutland',1),(1726,'743',701,NULL,0,NULL,'Shropshire',1),(1727,'744',701,NULL,0,NULL,'Somerset',1),(1728,'745',701,NULL,0,NULL,'Staffordshire',1),(1729,'746',701,NULL,0,NULL,'Suffolk',1),(1730,'747',701,NULL,0,NULL,'Surrey',1),(1731,'748',701,NULL,0,NULL,'Sussex',1),(1732,'749',701,NULL,0,NULL,'Tyne and Wear',1),(1733,'750',701,NULL,0,NULL,'Warwickshire',1),(1734,'751',701,NULL,0,NULL,'West Midlands',1),(1735,'752',701,NULL,0,NULL,'West Sussex',1),(1736,'753',701,NULL,0,NULL,'West Yorkshire',1),(1737,'754',701,NULL,0,NULL,'West Riding of Yorkshire',1),(1738,'755',701,NULL,0,NULL,'Wiltshire',1),(1739,'756',701,NULL,0,NULL,'Worcestershire',1),(1740,'757',701,NULL,0,NULL,'Yorkshire',1),(1741,'758',702,NULL,0,NULL,'Anglesey',1),(1742,'759',702,NULL,0,NULL,'Breconshire',1),(1743,'760',702,NULL,0,NULL,'Caernarvonshire',1),(1744,'761',702,NULL,0,NULL,'Cardiganshire',1),(1745,'762',702,NULL,0,NULL,'Carmarthenshire',1),(1746,'763',702,NULL,0,NULL,'Ceredigion',1),(1747,'764',702,NULL,0,NULL,'Denbighshire',1),(1748,'765',702,NULL,0,NULL,'Flintshire',1),(1749,'766',702,NULL,0,NULL,'Glamorgan',1),(1750,'767',702,NULL,0,NULL,'Gwent',1),(1751,'768',702,NULL,0,NULL,'Gwynedd',1),(1752,'769',702,NULL,0,NULL,'Merionethshire',1),(1753,'770',702,NULL,0,NULL,'Monmouthshire',1),(1754,'771',702,NULL,0,NULL,'Mid Glamorgan',1),(1755,'772',702,NULL,0,NULL,'Montgomeryshire',1),(1756,'773',702,NULL,0,NULL,'Pembrokeshire',1),(1757,'774',702,NULL,0,NULL,'Powys',1),(1758,'775',702,NULL,0,NULL,'Radnorshire',1),(1759,'776',702,NULL,0,NULL,'South Glamorgan',1),(1760,'777',703,NULL,0,NULL,'Aberdeen, City of',1),(1761,'778',703,NULL,0,NULL,'Angus',1),(1762,'779',703,NULL,0,NULL,'Argyll',1),(1763,'780',703,NULL,0,NULL,'Ayrshire',1),(1764,'781',703,NULL,0,NULL,'Banffshire',1),(1765,'782',703,NULL,0,NULL,'Berwickshire',1),(1766,'783',703,NULL,0,NULL,'Bute',1),(1767,'784',703,NULL,0,NULL,'Caithness',1),(1768,'785',703,NULL,0,NULL,'Clackmannanshire',1),(1769,'786',703,NULL,0,NULL,'Dumfriesshire',1),(1770,'787',703,NULL,0,NULL,'Dumbartonshire',1),(1771,'788',703,NULL,0,NULL,'Dundee, City of',1),(1772,'789',703,NULL,0,NULL,'East Lothian',1),(1773,'790',703,NULL,0,NULL,'Fife',1),(1774,'791',703,NULL,0,NULL,'Inverness',1),(1775,'792',703,NULL,0,NULL,'Kincardineshire',1),(1776,'793',703,NULL,0,NULL,'Kinross-shire',1),(1777,'794',703,NULL,0,NULL,'Kirkcudbrightshire',1),(1778,'795',703,NULL,0,NULL,'Lanarkshire',1),(1779,'796',703,NULL,0,NULL,'Midlothian',1),(1780,'797',703,NULL,0,NULL,'Morayshire',1),(1781,'798',703,NULL,0,NULL,'Nairnshire',1),(1782,'799',703,NULL,0,NULL,'Orkney',1),(1783,'800',703,NULL,0,NULL,'Peebleshire',1),(1784,'801',703,NULL,0,NULL,'Perthshire',1),(1785,'802',703,NULL,0,NULL,'Renfrewshire',1),(1786,'803',703,NULL,0,NULL,'Ross & Cromarty',1),(1787,'804',703,NULL,0,NULL,'Roxburghshire',1),(1788,'805',703,NULL,0,NULL,'Selkirkshire',1),(1789,'806',703,NULL,0,NULL,'Shetland',1),(1790,'807',703,NULL,0,NULL,'Stirlingshire',1),(1791,'808',703,NULL,0,NULL,'Sutherland',1),(1792,'809',703,NULL,0,NULL,'West Lothian',1),(1793,'810',703,NULL,0,NULL,'Wigtownshire',1),(1794,'811',704,NULL,0,NULL,'Antrim',1),(1795,'812',704,NULL,0,NULL,'Armagh',1),(1796,'813',704,NULL,0,NULL,'Co. Down',1),(1797,'814',704,NULL,0,NULL,'Co. Fermanagh',1),(1798,'815',704,NULL,0,NULL,'Co. Londonderry',1),(1849,'GR',1701,NULL,NULL,NULL,'Groningen',1),(1850,'FR',1701,NULL,NULL,NULL,'Friesland',1),(1851,'DR',1701,NULL,NULL,NULL,'Drenthe',1),(1852,'OV',1701,NULL,NULL,NULL,'Overijssel',1),(1853,'GD',1701,NULL,NULL,NULL,'Gelderland',1),(1854,'FL',1701,NULL,NULL,NULL,'Flevoland',1),(1855,'UT',1701,NULL,NULL,NULL,'Utrecht',1),(1856,'NH',1701,NULL,NULL,NULL,'Noord-Holland',1),(1857,'ZH',1701,NULL,NULL,NULL,'Zuid-Holland',1),(1858,'ZL',1701,NULL,NULL,NULL,'Zeeland',1),(1859,'NB',1701,NULL,NULL,NULL,'Noord-Brabant',1),(1860,'LB',1701,NULL,NULL,NULL,'Limburg',1),(1900,'AC',5601,'ACRE',0,'AC','Acre',1),(1901,'AL',5601,'ALAGOAS',0,'AL','Alagoas',1),(1902,'AP',5601,'AMAPA',0,'AP','Amapá',1),(1903,'AM',5601,'AMAZONAS',0,'AM','Amazonas',1),(1904,'BA',5601,'BAHIA',0,'BA','Bahia',1),(1905,'CE',5601,'CEARA',0,'CE','Ceará',1),(1906,'ES',5601,'ESPIRITO SANTO',0,'ES','Espirito Santo',1),(1907,'GO',5601,'GOIAS',0,'GO','Goiás',1),(1908,'MA',5601,'MARANHAO',0,'MA','Maranhão',1),(1909,'MT',5601,'MATO GROSSO',0,'MT','Mato Grosso',1),(1910,'MS',5601,'MATO GROSSO DO SUL',0,'MS','Mato Grosso do Sul',1),(1911,'MG',5601,'MINAS GERAIS',0,'MG','Minas Gerais',1),(1912,'PA',5601,'PARA',0,'PA','Pará',1),(1913,'PB',5601,'PARAIBA',0,'PB','Paraiba',1),(1914,'PR',5601,'PARANA',0,'PR','Paraná',1),(1915,'PE',5601,'PERNAMBUCO',0,'PE','Pernambuco',1),(1916,'PI',5601,'PIAUI',0,'PI','Piauí',1),(1917,'RJ',5601,'RIO DE JANEIRO',0,'RJ','Rio de Janeiro',1),(1918,'RN',5601,'RIO GRANDE DO NORTE',0,'RN','Rio Grande do Norte',1),(1919,'RS',5601,'RIO GRANDE DO SUL',0,'RS','Rio Grande do Sul',1),(1920,'RO',5601,'RONDONIA',0,'RO','Rondônia',1),(1921,'RR',5601,'RORAIMA',0,'RR','Roraima',1),(1922,'SC',5601,'SANTA CATARINA',0,'SC','Santa Catarina',1),(1923,'SE',5601,'SERGIPE',0,'SE','Sergipe',1),(1924,'SP',5601,'SAO PAULO',0,'SP','Sao Paulo',1),(1925,'TO',5601,'TOCANTINS',0,'TO','Tocantins',1),(1926,'DF',5601,'DISTRITO FEDERAL',0,'DF','Distrito Federal',1); /*!40000 ALTER TABLE `llx_c_departements` ENABLE KEYS */; UNLOCK TABLES; @@ -1538,7 +1382,7 @@ CREATE TABLE `llx_c_forme_juridique` ( `module` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_forme_juridique` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=100009 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=100201 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1547,7 +1391,7 @@ CREATE TABLE `llx_c_forme_juridique` ( LOCK TABLES `llx_c_forme_juridique` WRITE; /*!40000 ALTER TABLE `llx_c_forme_juridique` DISABLE KEYS */; -INSERT INTO `llx_c_forme_juridique` VALUES (399,0,0,'-',0,1,NULL),(400,2301,23,'Monotributista',0,1,NULL),(401,2302,23,'Sociedad Civil',0,1,NULL),(402,2303,23,'Sociedades Comerciales',0,1,NULL),(403,2304,23,'Sociedades de Hecho',0,1,NULL),(404,2305,23,'Sociedades Irregulares',0,1,NULL),(405,2306,23,'Sociedad Colectiva',0,1,NULL),(406,2307,23,'Sociedad en Comandita Simple',0,1,NULL),(407,2308,23,'Sociedad de Capital e Industria',0,1,NULL),(408,2309,23,'Sociedad Accidental o en participación',0,1,NULL),(409,2310,23,'Sociedad de Responsabilidad Limitada',0,1,NULL),(410,2311,23,'Sociedad Anónima',0,1,NULL),(411,2312,23,'Sociedad Anónima con Participación Estatal Mayoritaria',0,1,NULL),(412,2313,23,'Sociedad en Comandita por Acciones (arts. 315 a 324, LSC)',0,1,NULL),(413,11,1,'Artisan Commerçant (EI)',0,1,NULL),(414,12,1,'Commerçant (EI)',0,1,NULL),(415,13,1,'Artisan (EI)',0,1,NULL),(416,14,1,'Officier public ou ministériel',0,1,NULL),(417,15,1,'Profession libérale (EI)',0,1,NULL),(418,16,1,'Exploitant agricole',0,1,NULL),(419,17,1,'Agent commercial',0,1,NULL),(420,18,1,'Associé Gérant de société',0,1,NULL),(421,19,1,'Personne physique',0,1,NULL),(422,21,1,'Indivision',0,1,NULL),(423,22,1,'Société créée de fait',0,1,NULL),(424,23,1,'Société en participation',0,1,NULL),(425,27,1,'Paroisse hors zone concordataire',0,1,NULL),(426,29,1,'Groupement de droit privé non doté de la personnalité morale',0,1,NULL),(427,31,1,'Personne morale de droit étranger, immatriculée au RCS',0,1,NULL),(428,32,1,'Personne morale de droit étranger, non immatriculée au RCS',0,1,NULL),(429,35,1,'Régime auto-entrepreneur',0,1,NULL),(430,41,1,'Établissement public ou régie à caractère industriel ou commercial',0,1,NULL),(431,51,1,'Société coopérative commerciale particulière',0,1,NULL),(432,52,1,'Société en nom collectif',0,1,NULL),(433,53,1,'Société en commandite',0,1,NULL),(434,54,1,'Société à responsabilité limitée (SARL)',0,1,NULL),(435,55,1,'Société anonyme à conseil d administration',0,1,NULL),(436,56,1,'Société anonyme à directoire',0,1,NULL),(437,57,1,'Société par actions simplifiée',0,1,NULL),(438,58,1,'Entreprise Unipersonnelle à Responsabilité Limitée (EURL)',0,1,NULL),(439,61,1,'Caisse d\'épargne et de prévoyance',0,1,NULL),(440,62,1,'Groupement d\'intérêt économique (GIE)',0,1,NULL),(441,63,1,'Société coopérative agricole',0,1,NULL),(442,64,1,'Société non commerciale d assurances',0,1,NULL),(443,65,1,'Société civile',0,1,NULL),(444,69,1,'Personnes de droit privé inscrites au RCS',0,1,NULL),(445,71,1,'Administration de l état',0,1,NULL),(446,72,1,'Collectivité territoriale',0,1,NULL),(447,73,1,'Établissement public administratif',0,1,NULL),(448,74,1,'Personne morale de droit public administratif',0,1,NULL),(449,81,1,'Organisme gérant régime de protection social à adhésion obligatoire',0,1,NULL),(450,82,1,'Organisme mutualiste',0,1,NULL),(451,83,1,'Comité d entreprise',0,1,NULL),(452,84,1,'Organisme professionnel',0,1,NULL),(453,85,1,'Organisme de retraite à adhésion non obligatoire',0,1,NULL),(454,91,1,'Syndicat de propriétaires',0,1,NULL),(455,92,1,'Association loi 1901 ou assimilé',0,1,NULL),(456,93,1,'Fondation',0,1,NULL),(457,99,1,'Personne morale de droit privé',0,1,NULL),(458,200,2,'Indépendant',0,1,NULL),(459,201,2,'SPRL - Société à responsabilité limitée',0,1,NULL),(460,202,2,'SA - Société Anonyme',0,1,NULL),(461,203,2,'SCRL - Société coopérative à responsabilité limitée',0,1,NULL),(462,204,2,'ASBL - Association sans but Lucratif',0,1,NULL),(463,205,2,'SCRI - Société coopérative à responsabilité illimitée',0,1,NULL),(464,206,2,'SCS - Société en commandite simple',0,1,NULL),(465,207,2,'SCA - Société en commandite par action',0,1,NULL),(466,208,2,'SNC - Société en nom collectif',0,1,NULL),(467,209,2,'GIE - Groupement d intérêt économique',0,1,NULL),(468,210,2,'GEIE - Groupement européen d intérêt économique',0,1,NULL),(469,500,5,'Limited liability corporation (GmbH)',0,1,NULL),(470,501,5,'Stock corporation (AG)',0,1,NULL),(471,502,5,'Partnerships general or limited (GmbH & CO. KG)',0,1,NULL),(472,503,5,'Sole proprietor / Private business',0,1,NULL),(473,301,3,'Società semplice',0,1,NULL),(474,302,3,'Società in nome collettivo s.n.c.',0,1,NULL),(475,303,3,'Società in accomandita semplice s.a.s.',0,1,NULL),(476,304,3,'Società per azioni s.p.a.',0,1,NULL),(477,305,3,'Società a responsabilità limitata s.r.l.',0,1,NULL),(478,306,3,'Società in accomandita per azioni s.a.p.a.',0,1,NULL),(479,307,3,'Società cooperativa',0,1,NULL),(480,308,3,'Società consortile',0,1,NULL),(481,309,3,'Società europea',0,1,NULL),(482,310,3,'Società cooperativa europea',0,1,NULL),(483,311,3,'Società unipersonale',0,1,NULL),(484,312,3,'Società di professionisti',0,1,NULL),(485,313,3,'Società di fatto',0,1,NULL),(486,314,3,'Società occulta',0,1,NULL),(487,315,3,'Società apparente',0,1,NULL),(488,316,3,'Impresa individuale ',0,1,NULL),(489,317,3,'Impresa coniugale',0,1,NULL),(490,318,3,'Impresa familiare',0,1,NULL),(491,600,6,'Raison Individuelle',0,1,NULL),(492,601,6,'Société Simple',0,1,NULL),(493,602,6,'Société en nom collectif',0,1,NULL),(494,603,6,'Société en commandite',0,1,NULL),(495,604,6,'Société anonyme (SA)',0,1,NULL),(496,605,6,'Société en commandite par actions',0,1,NULL),(497,606,6,'Société à responsabilité limitée (SARL)',0,1,NULL),(498,607,6,'Société coopérative',0,1,NULL),(499,608,6,'Association',0,1,NULL),(500,609,6,'Fondation',0,1,NULL),(501,700,7,'Sole Trader',0,1,NULL),(502,701,7,'Partnership',0,1,NULL),(503,702,7,'Private Limited Company by shares (LTD)',0,1,NULL),(504,703,7,'Public Limited Company',0,1,NULL),(505,704,7,'Workers Cooperative',0,1,NULL),(506,705,7,'Limited Liability Partnership',0,1,NULL),(507,706,7,'Franchise',0,1,NULL),(508,1000,10,'Société à responsabilité limitée (SARL)',0,1,NULL),(509,1001,10,'Société en Nom Collectif (SNC)',0,1,NULL),(510,1002,10,'Société en Commandite Simple (SCS)',0,1,NULL),(511,1003,10,'société en participation',0,1,NULL),(512,1004,10,'Société Anonyme (SA)',0,1,NULL),(513,1005,10,'Société Unipersonnelle à Responsabilité Limitée (SUARL)',0,1,NULL),(514,1006,10,'Groupement d\'intérêt économique (GEI)',0,1,NULL),(515,1007,10,'Groupe de sociétés',0,1,NULL),(516,401,4,'Empresario Individual',0,1,NULL),(517,402,4,'Comunidad de Bienes',0,1,NULL),(518,403,4,'Sociedad Civil',0,1,NULL),(519,404,4,'Sociedad Colectiva',0,1,NULL),(520,405,4,'Sociedad Limitada',0,1,NULL),(521,406,4,'Sociedad Anónima',0,1,NULL),(522,407,4,'Sociedad Comandataria por Acciones',0,1,NULL),(523,408,4,'Sociedad Comandataria Simple',0,1,NULL),(524,409,4,'Sociedad Laboral',0,1,NULL),(525,410,4,'Sociedad Cooperativa',0,1,NULL),(526,411,4,'Sociedad de Garantía Recíproca',0,1,NULL),(527,412,4,'Entidad de Capital-Riesgo',0,1,NULL),(528,413,4,'Agrupación de Interés Económico',0,1,NULL),(529,414,4,'Sociedad de Inversión Mobiliaria',0,1,NULL),(530,415,4,'Agrupación sin Ánimo de Lucro',0,1,NULL),(531,15201,152,'Mauritius Private Company Limited By Shares',0,1,NULL),(532,15202,152,'Mauritius Company Limited By Guarantee',0,1,NULL),(533,15203,152,'Mauritius Public Company Limited By Shares',0,1,NULL),(534,15204,152,'Mauritius Foreign Company',0,1,NULL),(535,15205,152,'Mauritius GBC1 (Offshore Company)',0,1,NULL),(536,15206,152,'Mauritius GBC2 (International Company)',0,1,NULL),(537,15207,152,'Mauritius General Partnership',0,1,NULL),(538,15208,152,'Mauritius Limited Partnership',0,1,NULL),(539,15209,152,'Mauritius Sole Proprietorship',0,1,NULL),(540,15210,152,'Mauritius Trusts',0,1,NULL),(541,15401,154,'Sociedad en nombre colectivo',0,1,NULL),(542,15402,154,'Sociedad en comandita simple',0,1,NULL),(543,15403,154,'Sociedad de responsabilidad limitada',0,1,NULL),(544,15404,154,'Sociedad anónima',0,1,NULL),(545,15405,154,'Sociedad en comandita por acciones',0,1,NULL),(546,15406,154,'Sociedad cooperativa',0,1,NULL),(100001,100001,1,'Etudiant',0,0,'cabinetmed'),(100002,100002,1,'Retraité',0,0,'cabinetmed'),(100003,100003,1,'Artisan',0,0,'cabinetmed'),(100004,100004,1,'Femme de ménage',0,0,'cabinetmed'),(100005,100005,1,'Professeur',0,0,'cabinetmed'),(100006,100006,1,'Profession libérale',0,0,'cabinetmed'),(100007,100007,1,'Informaticien',0,0,'cabinetmed'),(100008,60,1,'Entreprise Individuelle à Responsabilité Limitée (EIRL)',0,1,NULL); +INSERT INTO `llx_c_forme_juridique` VALUES (100009,0,0,'-',0,1,NULL),(100010,2301,23,'Monotributista',0,1,NULL),(100011,2302,23,'Sociedad Civil',0,1,NULL),(100012,2303,23,'Sociedades Comerciales',0,1,NULL),(100013,2304,23,'Sociedades de Hecho',0,1,NULL),(100014,2305,23,'Sociedades Irregulares',0,1,NULL),(100015,2306,23,'Sociedad Colectiva',0,1,NULL),(100016,2307,23,'Sociedad en Comandita Simple',0,1,NULL),(100017,2308,23,'Sociedad de Capital e Industria',0,1,NULL),(100018,2309,23,'Sociedad Accidental o en participación',0,1,NULL),(100019,2310,23,'Sociedad de Responsabilidad Limitada',0,1,NULL),(100020,2311,23,'Sociedad Anónima',0,1,NULL),(100021,2312,23,'Sociedad Anónima con Participación Estatal Mayoritaria',0,1,NULL),(100022,2313,23,'Sociedad en Comandita por Acciones (arts. 315 a 324, LSC)',0,1,NULL),(100023,11,1,'Artisan Commerçant (EI)',0,1,NULL),(100024,12,1,'Commerçant (EI)',0,1,NULL),(100025,13,1,'Artisan (EI)',0,1,NULL),(100026,14,1,'Officier public ou ministériel',0,1,NULL),(100027,15,1,'Profession libérale (EI)',0,1,NULL),(100028,16,1,'Exploitant agricole',0,1,NULL),(100029,17,1,'Agent commercial',0,1,NULL),(100030,18,1,'Associé Gérant de société',0,1,NULL),(100031,19,1,'Personne physique',0,1,NULL),(100032,21,1,'Indivision',0,1,NULL),(100033,22,1,'Société créée de fait',0,1,NULL),(100034,23,1,'Société en participation',0,1,NULL),(100035,27,1,'Paroisse hors zone concordataire',0,1,NULL),(100036,29,1,'Groupement de droit privé non doté de la personnalité morale',0,1,NULL),(100037,31,1,'Personne morale de droit étranger, immatriculée au RCS',0,1,NULL),(100038,32,1,'Personne morale de droit étranger, non immatriculée au RCS',0,1,NULL),(100039,35,1,'Régime auto-entrepreneur',0,1,NULL),(100040,41,1,'Etablissement public ou régie à caractère industriel ou commercial',0,1,NULL),(100041,51,1,'Société coopérative commerciale particulière',0,1,NULL),(100042,52,1,'Société en nom collectif',0,1,NULL),(100043,53,1,'Société en commandite',0,1,NULL),(100044,54,1,'Société à responsabilité limitée (SARL)',0,1,NULL),(100045,55,1,'Société anonyme à conseil d administration',0,1,NULL),(100046,56,1,'Société anonyme à directoire',0,1,NULL),(100047,57,1,'Société par actions simplifiée (SAS)',0,1,NULL),(100048,58,1,'Entreprise Unipersonnelle à Responsabilité Limitée (EURL)',0,1,NULL),(100049,59,1,'Société par actions simplifiée unipersonnelle (SASU)',0,1,NULL),(100050,60,1,'Entreprise Individuelle à Responsabilité Limitée (EIRL)',0,1,NULL),(100051,61,1,'Caisse d\'épargne et de prévoyance',0,1,NULL),(100052,62,1,'Groupement d\'intérêt économique (GIE)',0,1,NULL),(100053,63,1,'Société coopérative agricole',0,1,NULL),(100054,64,1,'Société non commerciale d assurances',0,1,NULL),(100055,65,1,'Société civile',0,1,NULL),(100056,69,1,'Personnes de droit privé inscrites au RCS',0,1,NULL),(100057,71,1,'Administration de l état',0,1,NULL),(100058,72,1,'Collectivité territoriale',0,1,NULL),(100059,73,1,'Etablissement public administratif',0,1,NULL),(100060,74,1,'Personne morale de droit public administratif',0,1,NULL),(100061,81,1,'Organisme gérant régime de protection social à adhésion obligatoire',0,1,NULL),(100062,82,1,'Organisme mutualiste',0,1,NULL),(100063,83,1,'Comité d entreprise',0,1,NULL),(100064,84,1,'Organisme professionnel',0,1,NULL),(100065,85,1,'Organisme de retraite à adhésion non obligatoire',0,1,NULL),(100066,91,1,'Syndicat de propriétaires',0,1,NULL),(100067,92,1,'Association loi 1901 ou assimilé',0,1,NULL),(100068,93,1,'Fondation',0,1,NULL),(100069,99,1,'Personne morale de droit privé',0,1,NULL),(100070,200,2,'Indépendant',0,1,NULL),(100071,201,2,'SPRL - Société à responsabilité limitée',0,1,NULL),(100072,202,2,'SA - Société Anonyme',0,1,NULL),(100073,203,2,'SCRL - Société coopérative à responsabilité limitée',0,1,NULL),(100074,204,2,'ASBL - Association sans but Lucratif',0,1,NULL),(100075,205,2,'SCRI - Société coopérative à responsabilité illimitée',0,1,NULL),(100076,206,2,'SCS - Société en commandite simple',0,1,NULL),(100077,207,2,'SCA - Société en commandite par action',0,1,NULL),(100078,208,2,'SNC - Société en nom collectif',0,1,NULL),(100079,209,2,'GIE - Groupement d intérêt économique',0,1,NULL),(100080,210,2,'GEIE - Groupement européen d intérêt économique',0,1,NULL),(100081,220,2,'Eenmanszaak',0,1,NULL),(100082,221,2,'BVBA - Besloten vennootschap met beperkte aansprakelijkheid',0,1,NULL),(100083,222,2,'NV - Naamloze Vennootschap',0,1,NULL),(100084,223,2,'CVBA - Coöperatieve vennootschap met beperkte aansprakelijkheid',0,1,NULL),(100085,224,2,'VZW - Vereniging zonder winstoogmerk',0,1,NULL),(100086,225,2,'CVOA - Coöperatieve vennootschap met onbeperkte aansprakelijkheid ',0,1,NULL),(100087,226,2,'GCV - Gewone commanditaire vennootschap',0,1,NULL),(100088,227,2,'Comm.VA - Commanditaire vennootschap op aandelen',0,1,NULL),(100089,228,2,'VOF - Vennootschap onder firma',0,1,NULL),(100090,229,2,'VS0 - Vennootschap met sociaal oogmerk',0,1,NULL),(100091,500,5,'GmbH - Gesellschaft mit beschränkter Haftung',0,1,NULL),(100092,501,5,'AG - Aktiengesellschaft ',0,1,NULL),(100093,502,5,'GmbH&Co. KG - Gesellschaft mit beschränkter Haftung & Compagnie Kommanditgesellschaft',0,1,NULL),(100094,503,5,'Gewerbe - Personengesellschaft',0,1,NULL),(100095,504,5,'UG - Unternehmergesellschaft -haftungsbeschränkt-',0,1,NULL),(100096,505,5,'GbR - Gesellschaft des bürgerlichen Rechts',0,1,NULL),(100097,506,5,'KG - Kommanditgesellschaft',0,1,NULL),(100098,507,5,'Ltd. - Limited Company',0,1,NULL),(100099,508,5,'OHG - Offene Handelsgesellschaft',0,1,NULL),(100100,10201,102,'Ατομική επιχείρηση',0,1,NULL),(100101,10202,102,'Εταιρική επιχείρηση',0,1,NULL),(100102,10203,102,'Ομόρρυθμη Εταιρεία Ο.Ε',0,1,NULL),(100103,10204,102,'Ετερόρρυθμη Εταιρεία Ε.Ε',0,1,NULL),(100104,10205,102,'Εταιρεία Περιορισμένης Ευθύνης Ε.Π.Ε',0,1,NULL),(100105,10206,102,'Ανώνυμη Εταιρεία Α.Ε',0,1,NULL),(100106,10207,102,'Ανώνυμη ναυτιλιακή εταιρεία Α.Ν.Ε',0,1,NULL),(100107,10208,102,'Συνεταιρισμός',0,1,NULL),(100108,10209,102,'Συμπλοιοκτησία',0,1,NULL),(100109,301,3,'Società semplice',0,1,NULL),(100110,302,3,'Società in nome collettivo s.n.c.',0,1,NULL),(100111,303,3,'Società in accomandita semplice s.a.s.',0,1,NULL),(100112,304,3,'Società per azioni s.p.a.',0,1,NULL),(100113,305,3,'Società a responsabilità limitata s.r.l.',0,1,NULL),(100114,306,3,'Società in accomandita per azioni s.a.p.a.',0,1,NULL),(100115,307,3,'Società cooperativa a r.l.',0,1,NULL),(100116,308,3,'Società consortile',0,1,NULL),(100117,309,3,'Società europea',0,1,NULL),(100118,310,3,'Società cooperativa europea',0,1,NULL),(100119,311,3,'Società unipersonale',0,1,NULL),(100120,312,3,'Società di professionisti',0,1,NULL),(100121,313,3,'Società di fatto',0,1,NULL),(100122,315,3,'Società apparente',0,1,NULL),(100123,316,3,'Impresa individuale ',0,1,NULL),(100124,317,3,'Impresa coniugale',0,1,NULL),(100125,318,3,'Impresa familiare',0,1,NULL),(100126,319,3,'Consorzio cooperativo',0,1,NULL),(100127,320,3,'Società cooperativa sociale',0,1,NULL),(100128,321,3,'Società cooperativa di consumo',0,1,NULL),(100129,322,3,'Società cooperativa agricola',0,1,NULL),(100130,323,3,'A.T.I. Associazione temporanea di imprese',0,1,NULL),(100131,324,3,'R.T.I. Raggruppamento temporaneo di imprese',0,1,NULL),(100132,325,3,'Studio associato',0,1,NULL),(100133,600,6,'Raison Individuelle',0,1,NULL),(100134,601,6,'Société Simple',0,1,NULL),(100135,602,6,'Société en nom collectif',0,1,NULL),(100136,603,6,'Société en commandite',0,1,NULL),(100137,604,6,'Société anonyme (SA)',0,1,NULL),(100138,605,6,'Société en commandite par actions',0,1,NULL),(100139,606,6,'Société à responsabilité limitée (SARL)',0,1,NULL),(100140,607,6,'Société coopérative',0,1,NULL),(100141,608,6,'Association',0,1,NULL),(100142,609,6,'Fondation',0,1,NULL),(100143,700,7,'Sole Trader',0,1,NULL),(100144,701,7,'Partnership',0,1,NULL),(100145,702,7,'Private Limited Company by shares (LTD)',0,1,NULL),(100146,703,7,'Public Limited Company',0,1,NULL),(100147,704,7,'Workers Cooperative',0,1,NULL),(100148,705,7,'Limited Liability Partnership',0,1,NULL),(100149,706,7,'Franchise',0,1,NULL),(100150,1000,10,'Société à responsabilité limitée (SARL)',0,1,NULL),(100151,1001,10,'Société en Nom Collectif (SNC)',0,1,NULL),(100152,1002,10,'Société en Commandite Simple (SCS)',0,1,NULL),(100153,1003,10,'société en participation',0,1,NULL),(100154,1004,10,'Société Anonyme (SA)',0,1,NULL),(100155,1005,10,'Société Unipersonnelle à Responsabilité Limitée (SUARL)',0,1,NULL),(100156,1006,10,'Groupement d\'intérêt économique (GEI)',0,1,NULL),(100157,1007,10,'Groupe de sociétés',0,1,NULL),(100158,1701,17,'Eenmanszaak',0,1,NULL),(100159,1702,17,'Maatschap',0,1,NULL),(100160,1703,17,'Vennootschap onder firma',0,1,NULL),(100161,1704,17,'Commanditaire vennootschap',0,1,NULL),(100162,1705,17,'Besloten vennootschap (BV)',0,1,NULL),(100163,1706,17,'Naamloze Vennootschap (NV)',0,1,NULL),(100164,1707,17,'Vereniging',0,1,NULL),(100165,1708,17,'Stichting',0,1,NULL),(100166,1709,17,'Coöperatie met beperkte aansprakelijkheid (BA)',0,1,NULL),(100167,1710,17,'Coöperatie met uitgesloten aansprakelijkheid (UA)',0,1,NULL),(100168,1711,17,'Coöperatie met wettelijke aansprakelijkheid (WA)',0,1,NULL),(100169,1712,17,'Onderlinge waarborgmaatschappij',0,1,NULL),(100170,401,4,'Empresario Individual',0,1,NULL),(100171,402,4,'Comunidad de Bienes',0,1,NULL),(100172,403,4,'Sociedad Civil',0,1,NULL),(100173,404,4,'Sociedad Colectiva',0,1,NULL),(100174,405,4,'Sociedad Limitada',0,1,NULL),(100175,406,4,'Sociedad Anónima',0,1,NULL),(100176,407,4,'Sociedad Comanditaria por Acciones',0,1,NULL),(100177,408,4,'Sociedad Comanditaria Simple',0,1,NULL),(100178,409,4,'Sociedad Laboral',0,1,NULL),(100179,410,4,'Sociedad Cooperativa',0,1,NULL),(100180,411,4,'Sociedad de Garantía Recíproca',0,1,NULL),(100181,412,4,'Entidad de Capital-Riesgo',0,1,NULL),(100182,413,4,'Agrupación de Interés Económico',0,1,NULL),(100183,414,4,'Sociedad de Inversión Mobiliaria',0,1,NULL),(100184,415,4,'Agrupación sin Ánimo de Lucro',0,1,NULL),(100185,15201,152,'Mauritius Private Company Limited By Shares',0,1,NULL),(100186,15202,152,'Mauritius Company Limited By Guarantee',0,1,NULL),(100187,15203,152,'Mauritius Public Company Limited By Shares',0,1,NULL),(100188,15204,152,'Mauritius Foreign Company',0,1,NULL),(100189,15205,152,'Mauritius GBC1 (Offshore Company)',0,1,NULL),(100190,15206,152,'Mauritius GBC2 (International Company)',0,1,NULL),(100191,15207,152,'Mauritius General Partnership',0,1,NULL),(100192,15208,152,'Mauritius Limited Partnership',0,1,NULL),(100193,15209,152,'Mauritius Sole Proprietorship',0,1,NULL),(100194,15210,152,'Mauritius Trusts',0,1,NULL),(100195,15401,154,'Sociedad en nombre colectivo',0,1,NULL),(100196,15402,154,'Sociedad en comandita simple',0,1,NULL),(100197,15403,154,'Sociedad de responsabilidad limitada',0,1,NULL),(100198,15404,154,'Sociedad anónima',0,1,NULL),(100199,15405,154,'Sociedad en comandita por acciones',0,1,NULL),(100200,15406,154,'Sociedad cooperativa',0,1,NULL); /*!40000 ALTER TABLE `llx_c_forme_juridique` ENABLE KEYS */; UNLOCK TABLES; @@ -1578,7 +1422,7 @@ CREATE TABLE `llx_c_holiday_types` ( LOCK TABLES `llx_c_holiday_types` WRITE; /*!40000 ALTER TABLE `llx_c_holiday_types` DISABLE KEYS */; -INSERT INTO `llx_c_holiday_types` VALUES (1,'LEAVE_SICK','Sick leave',0,0,0.00000,NULL,1),(2,'LEAVE_OTHER','Other leave',0,0,0.00000,NULL,1),(3,'LEAVE_PAID','Paid vacation',1,7,0.00000,NULL,0),(4,'LEAVE_RTT_FR','RTT',1,7,0.83000,1,1),(5,'LEAVE_PAID_FR','Paid vacation',1,30,2.08334,1,1),(9,'LEAVE_RTT','RTT',1,7,0.83000,1,1); +INSERT INTO `llx_c_holiday_types` VALUES (1,'LEAVE_SICK','Sick leave',0,0,0.00000,NULL,1),(2,'LEAVE_OTHER','Other leave',0,0,0.00000,NULL,1),(3,'LEAVE_PAID','Paid vacation',1,7,0.00000,NULL,0),(4,'LEAVE_RTT_FR','RTT',1,7,0.83000,1,1),(5,'LEAVE_PAID_FR','Paid vacation',1,30,2.08334,1,1); /*!40000 ALTER TABLE `llx_c_holiday_types` ENABLE KEYS */; UNLOCK TABLES; @@ -1666,35 +1510,6 @@ INSERT INTO `llx_c_input_reason` VALUES (1,'SRC_INTE','Web site',1,NULL),(2,'SRC /*!40000 ALTER TABLE `llx_c_input_reason` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_c_lead_status` --- - -DROP TABLE IF EXISTS `llx_c_lead_status`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_c_lead_status` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(10) DEFAULT NULL, - `label` varchar(50) DEFAULT NULL, - `position` int(11) DEFAULT NULL, - `percent` double(5,2) DEFAULT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', - PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_c_lead_status_code` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_c_lead_status` --- - -LOCK TABLES `llx_c_lead_status` WRITE; -/*!40000 ALTER TABLE `llx_c_lead_status` DISABLE KEYS */; -INSERT INTO `llx_c_lead_status` VALUES (1,'PROSP','Prospection',10,0.00,1),(2,'QUAL','Qualification',20,20.00,1),(3,'PROPO','Proposal',30,40.00,1),(4,'NEGO','Negotiation',40,60.00,1),(5,'PENDING','Pending',50,50.00,0),(6,'WON','Won',60,100.00,1),(7,'LOST','Lost',70,0.00,1); -/*!40000 ALTER TABLE `llx_c_lead_status` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_c_methode_commande_fournisseur` -- @@ -1748,7 +1563,7 @@ CREATE TABLE `llx_c_paiement` ( LOCK TABLES `llx_c_paiement` WRITE; /*!40000 ALTER TABLE `llx_c_paiement` DISABLE KEYS */; -INSERT INTO `llx_c_paiement` VALUES (0,'','-',3,1,NULL,NULL),(1,'TIP','TIP',2,1,NULL,NULL),(2,'VIR','Virement',2,1,NULL,NULL),(3,'PRE','Prélèvement',2,1,NULL,NULL),(4,'LIQ','Espèces',2,1,NULL,NULL),(6,'CB','Carte Bancaire',2,1,NULL,NULL),(7,'CHQ','Chèque',2,1,NULL,NULL),(50,'VAD','Paiement en ligne',2,0,NULL,NULL),(51,'TRA','Traite',2,0,NULL,NULL),(52,'LCR','LCR',2,0,NULL,NULL),(53,'FAC','Factor',2,0,NULL,NULL),(54,'PRO','Proforma',2,0,NULL,NULL); +INSERT INTO `llx_c_paiement` VALUES (0,'','-',3,1,NULL,NULL),(1,'TIP','TIP',2,0,NULL,NULL),(2,'VIR','Virement',2,1,NULL,NULL),(3,'PRE','Prélèvement',2,1,NULL,NULL),(4,'LIQ','Espèces',2,1,NULL,NULL),(6,'CB','Carte Bancaire',2,1,NULL,NULL),(7,'CHQ','Chèque',2,1,NULL,NULL),(50,'VAD','Paiement en ligne',2,0,NULL,NULL),(51,'TRA','Traite',2,0,NULL,NULL),(52,'LCR','LCR',2,0,NULL,NULL),(53,'FAC','Factor',2,0,NULL,NULL); /*!40000 ALTER TABLE `llx_c_paiement` ENABLE KEYS */; UNLOCK TABLES; @@ -1810,7 +1625,7 @@ CREATE TABLE `llx_c_payment_term` ( LOCK TABLES `llx_c_payment_term` WRITE; /*!40000 ALTER TABLE `llx_c_payment_term` DISABLE KEYS */; -INSERT INTO `llx_c_payment_term` VALUES (1,'RECEP',1,1,'A réception','Réception de facture',0,0,NULL,NULL),(2,'30D',2,1,'30 jours','Réglement à 30 jours',0,30,NULL,NULL),(3,'30DENDMONTH',3,1,'30 jours fin de mois','Réglement à 30 jours fin de mois',1,30,NULL,NULL),(4,'60D',4,1,'60 jours','Réglement à 60 jours',0,60,NULL,NULL),(5,'60DENDMONTH',5,1,'60 jours fin de mois','Réglement à 60 jours fin de mois',1,60,NULL,NULL); +INSERT INTO `llx_c_payment_term` VALUES (1,'RECEP',1,1,'A réception','Réception de facture',0,0,NULL,NULL),(2,'30D',2,1,'30 jours','Réglement à 30 jours',0,30,NULL,NULL),(3,'30DENDMONTH',3,1,'30 jours fin de mois','Réglement à 30 jours fin de mois',1,30,NULL,NULL),(4,'60D',4,1,'60 jours','Réglement à 60 jours',0,60,NULL,NULL),(5,'60DENDMONTH',5,1,'60 jours fin de mois','Réglement à 60 jours fin de mois',1,60,NULL,NULL),(6,'PT_ORDER',6,1,'A réception de commande','A réception de commande',0,0,NULL,NULL),(7,'PT_DELIVERY',7,1,'Livraison','Règlement à la livraison',0,0,NULL,NULL),(8,'PT_5050',8,1,'50 et 50','Règlement 50% à la commande, 50% à la livraison',0,0,NULL,NULL); /*!40000 ALTER TABLE `llx_c_payment_term` ENABLE KEYS */; UNLOCK TABLES; @@ -1996,7 +1811,7 @@ CREATE TABLE `llx_c_regions` ( UNIQUE KEY `uk_code_region` (`code_region`), KEY `idx_c_regions_fk_pays` (`fk_pays`), CONSTRAINT `fk_c_regions_fk_pays` FOREIGN KEY (`fk_pays`) REFERENCES `llx_c_pays` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=23210 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=23334 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2005,7 +1820,7 @@ CREATE TABLE `llx_c_regions` ( LOCK TABLES `llx_c_regions` WRITE; /*!40000 ALTER TABLE `llx_c_regions` DISABLE KEYS */; -INSERT INTO `llx_c_regions` VALUES (1,0,0,'0',0,'-',1),(101,1,1,'97105',3,'Guadeloupe',1),(102,2,1,'97209',3,'Martinique',1),(103,3,1,'97302',3,'Guyane',1),(104,4,1,'97411',3,'Réunion',1),(105,11,1,'75056',1,'Île-de-France',1),(106,21,1,'51108',0,'Champagne-Ardenne',1),(107,22,1,'80021',0,'Picardie',1),(108,23,1,'76540',0,'Haute-Normandie',1),(109,24,1,'45234',2,'Centre',1),(110,25,1,'14118',0,'Basse-Normandie',1),(111,26,1,'21231',0,'Bourgogne',1),(112,31,1,'59350',2,'Nord-Pas-de-Calais',1),(113,41,1,'57463',0,'Lorraine',1),(114,42,1,'67482',1,'Alsace',1),(115,43,1,'25056',0,'Franche-Comté',1),(116,52,1,'44109',4,'Pays de la Loire',1),(117,53,1,'35238',0,'Bretagne',1),(118,54,1,'86194',2,'Poitou-Charentes',1),(119,72,1,'33063',1,'Aquitaine',1),(120,73,1,'31555',0,'Midi-Pyrénées',1),(121,74,1,'87085',2,'Limousin',1),(122,82,1,'69123',2,'Rhône-Alpes',1),(123,83,1,'63113',1,'Auvergne',1),(124,91,1,'34172',2,'Languedoc-Roussillon',1),(125,93,1,'13055',0,'Provence-Alpes-Côte d\'Azur',1),(126,94,1,'2A004',0,'Corse',1),(201,201,2,'',1,'Flandre',1),(202,202,2,'',2,'Wallonie',1),(203,203,2,'',3,'Bruxelles-Capitale',1),(301,301,3,NULL,1,'Abruzzo',1),(302,302,3,NULL,1,'Basilicata',1),(303,303,3,NULL,1,'Calabria',1),(304,304,3,NULL,1,'Campania',1),(305,305,3,NULL,1,'Emilia-Romagna',1),(306,306,3,NULL,1,'Friuli-Venezia Giulia',1),(307,307,3,NULL,1,'Lazio',1),(308,308,3,NULL,1,'Liguria',1),(309,309,3,NULL,1,'Lombardia',1),(310,310,3,NULL,1,'Marche',1),(311,311,3,NULL,1,'Molise',1),(312,312,3,NULL,1,'Piemonte',1),(313,313,3,NULL,1,'Puglia',1),(314,314,3,NULL,1,'Sardegna',1),(315,315,3,NULL,1,'Sicilia',1),(316,316,3,NULL,1,'Toscana',1),(317,317,3,NULL,1,'Trentino-Alto Adige',1),(318,318,3,NULL,1,'Umbria',1),(319,319,3,NULL,1,'Valle d Aosta',1),(320,320,3,NULL,1,'Veneto',1),(401,401,4,'',0,'Andalucia',1),(402,402,4,'',0,'Aragón',1),(403,403,4,'',0,'Castilla y León',1),(404,404,4,'',0,'Castilla la Mancha',1),(405,405,4,'',0,'Canarias',1),(406,406,4,'',0,'Cataluña',1),(407,407,4,'',0,'Comunidad de Ceuta',1),(408,408,4,'',0,'Comunidad Foral de Navarra',1),(409,409,4,'',0,'Comunidad de Melilla',1),(410,410,4,'',0,'Cantabria',1),(411,411,4,'',0,'Comunidad Valenciana',1),(412,412,4,'',0,'Extemadura',1),(413,413,4,'',0,'Galicia',1),(414,414,4,'',0,'Islas Baleares',1),(415,415,4,'',0,'La Rioja',1),(416,416,4,'',0,'Comunidad de Madrid',1),(417,417,4,'',0,'Región de Murcia',1),(418,418,4,'',0,'Principado de Asturias',1),(419,419,4,'',0,'Pais Vasco',1),(601,601,6,'',1,'Cantons',1),(1001,1001,10,'',0,'Ariana',1),(1002,1002,10,'',0,'Béja',1),(1003,1003,10,'',0,'Ben Arous',1),(1004,1004,10,'',0,'Bizerte',1),(1005,1005,10,'',0,'Gabès',1),(1006,1006,10,'',0,'Gafsa',1),(1007,1007,10,'',0,'Jendouba',1),(1008,1008,10,'',0,'Kairouan',1),(1009,1009,10,'',0,'Kasserine',1),(1010,1010,10,'',0,'Kébili',1),(1011,1011,10,'',0,'La Manouba',1),(1012,1012,10,'',0,'Le Kef',1),(1013,1013,10,'',0,'Mahdia',1),(1014,1014,10,'',0,'Médenine',1),(1015,1015,10,'',0,'Monastir',1),(1016,1016,10,'',0,'Nabeul',1),(1017,1017,10,'',0,'Sfax',1),(1018,1018,10,'',0,'Sidi Bouzid',1),(1019,1019,10,'',0,'Siliana',1),(1020,1020,10,'',0,'Sousse',1),(1021,1021,10,'',0,'Tataouine',1),(1022,1022,10,'',0,'Tozeur',1),(1023,1023,10,'',0,'Tunis',1),(1024,1024,10,'',0,'Zaghouan',1),(1101,1101,11,'',0,'United-States',1),(1201,1201,12,'',0,'Tanger-Tétouan',1),(1202,1202,12,'',0,'Gharb-Chrarda-Beni Hssen',1),(1203,1203,12,'',0,'Taza-Al Hoceima-Taounate',1),(1204,1204,12,'',0,'L\'Oriental',1),(1205,1205,12,'',0,'Fès-Boulemane',1),(1206,1206,12,'',0,'Meknès-Tafialet',1),(1207,1207,12,'',0,'Rabat-Salé-Zemour-Zaër',1),(1208,1208,12,'',0,'Grand Cassablanca',1),(1209,1209,12,'',0,'Chaouia-Ouardigha',1),(1210,1210,12,'',0,'Doukahla-Adba',1),(1211,1211,12,'',0,'Marrakech-Tensift-Al Haouz',1),(1212,1212,12,'',0,'Tadla-Azilal',1),(1213,1213,12,'',0,'Sous-Massa-Drâa',1),(1214,1214,12,'',0,'Guelmim-Es Smara',1),(1215,1215,12,'',0,'Laâyoune-Boujdour-Sakia el Hamra',1),(1216,1216,12,'',0,'Oued Ed-Dahab Lagouira',1),(1301,1301,13,'',0,'Algerie',1),(2301,2301,23,'',0,'Norte',1),(2302,2302,23,'',0,'Litoral',1),(2303,2303,23,'',0,'Cuyana',1),(2304,2304,23,'',0,'Central',1),(2305,2305,23,'',0,'Patagonia',1),(2801,2801,28,'',0,'Australia',1),(4601,4601,46,'',0,'Barbados',1),(6701,6701,67,NULL,NULL,'Tarapacá',1),(6702,6702,67,NULL,NULL,'Antofagasta',1),(6703,6703,67,NULL,NULL,'Atacama',1),(6704,6704,67,NULL,NULL,'Coquimbo',1),(6705,6705,67,NULL,NULL,'Valparaíso',1),(6706,6706,67,NULL,NULL,'General Bernardo O Higgins',1),(6707,6707,67,NULL,NULL,'Maule',1),(6708,6708,67,NULL,NULL,'Biobío',1),(6709,6709,67,NULL,NULL,'Raucanía',1),(6710,6710,67,NULL,NULL,'Los Lagos',1),(6711,6711,67,NULL,NULL,'Aysén General Carlos Ibáñez del Campo',1),(6712,6712,67,NULL,NULL,'Magallanes y Antártica Chilena',1),(6713,6713,67,NULL,NULL,'Santiago',1),(6714,6714,67,NULL,NULL,'Los Ríos',1),(6715,6715,67,NULL,NULL,'Arica y Parinacota',1),(7001,7001,70,'',0,'Colombie',1),(8601,8601,86,NULL,NULL,'Central',1),(8602,8602,86,NULL,NULL,'Oriental',1),(8603,8603,86,NULL,NULL,'Occidental',1),(10201,10201,102,NULL,NULL,'??????',1),(10202,10202,102,NULL,NULL,'?????? ??????',1),(10203,10203,102,NULL,NULL,'???????? ?????????',1),(10204,10204,102,NULL,NULL,'?????',1),(10205,10205,102,NULL,NULL,'????????? ????????? ??? ?????',1),(10206,10206,102,NULL,NULL,'???????',1),(10207,10207,102,NULL,NULL,'????? ?????',1),(10208,10208,102,NULL,NULL,'?????? ??????',1),(10209,10209,102,NULL,NULL,'????????????',1),(10210,10210,102,NULL,NULL,'????? ??????',1),(10211,10211,102,NULL,NULL,'?????? ??????',1),(10212,10212,102,NULL,NULL,'????????',1),(10213,10213,102,NULL,NULL,'?????? ?????????',1),(11401,11401,114,'',0,'Honduras',1),(11701,11701,117,'',0,'India',1),(15201,15201,152,'',0,'Rivière Noire',1),(15202,15202,152,'',0,'Flacq',1),(15203,15203,152,'',0,'Grand Port',1),(15204,15204,152,'',0,'Moka',1),(15205,15205,152,'',0,'Pamplemousses',1),(15206,15206,152,'',0,'Plaines Wilhems',1),(15207,15207,152,'',0,'Port-Louis',1),(15208,15208,152,'',0,'Rivière du Rempart',1),(15209,15209,152,'',0,'Savanne',1),(15210,15210,152,'',0,'Rodrigues',1),(15211,15211,152,'',0,'Les îles Agaléga',1),(15212,15212,152,'',0,'Les écueils des Cargados Carajos',1),(15401,15401,154,'',0,'Mexique',1),(23201,23201,232,'',0,'Los Andes',1),(23202,23202,232,'',0,'Capital',1),(23203,23203,232,'',0,'Central',1),(23204,23204,232,'',0,'Cento Occidental',1),(23205,23205,232,'',0,'Guayana',1),(23206,23206,232,'',0,'Insular',1),(23207,23207,232,'',0,'Los Llanos',1),(23208,23208,232,'',0,'Nor-Oriental',1),(23209,23209,232,'',0,'Zuliana',1); +INSERT INTO `llx_c_regions` VALUES (1,0,0,'0',0,'-',1),(101,1,1,'97105',3,'Guadeloupe',1),(102,2,1,'97209',3,'Martinique',1),(103,3,1,'97302',3,'Guyane',1),(104,4,1,'97411',3,'Réunion',1),(105,11,1,'75056',1,'Île-de-France',1),(106,21,1,'51108',0,'Champagne-Ardenne',1),(107,22,1,'80021',0,'Picardie',1),(108,23,1,'76540',0,'Haute-Normandie',1),(109,24,1,'45234',2,'Centre',1),(110,25,1,'14118',0,'Basse-Normandie',1),(111,26,1,'21231',0,'Bourgogne',1),(112,31,1,'59350',2,'Nord-Pas-de-Calais',1),(113,41,1,'57463',0,'Lorraine',1),(114,42,1,'67482',1,'Alsace',1),(115,43,1,'25056',0,'Franche-Comté',1),(116,52,1,'44109',4,'Pays de la Loire',1),(117,53,1,'35238',0,'Bretagne',1),(118,54,1,'86194',2,'Poitou-Charentes',1),(119,72,1,'33063',1,'Aquitaine',1),(120,73,1,'31555',0,'Midi-Pyrénées',1),(121,74,1,'87085',2,'Limousin',1),(122,82,1,'69123',2,'Rhône-Alpes',1),(123,83,1,'63113',1,'Auvergne',1),(124,91,1,'34172',2,'Languedoc-Roussillon',1),(125,93,1,'13055',0,'Provence-Alpes-Côte d\'Azur',1),(126,94,1,'2A004',0,'Corse',1),(201,201,2,'',1,'Flandre',1),(202,202,2,'',2,'Wallonie',1),(203,203,2,'',3,'Bruxelles-Capitale',1),(301,301,3,NULL,1,'Abruzzo',1),(302,302,3,NULL,1,'Basilicata',1),(303,303,3,NULL,1,'Calabria',1),(304,304,3,NULL,1,'Campania',1),(305,305,3,NULL,1,'Emilia-Romagna',1),(306,306,3,NULL,1,'Friuli-Venezia Giulia',1),(307,307,3,NULL,1,'Lazio',1),(308,308,3,NULL,1,'Liguria',1),(309,309,3,NULL,1,'Lombardia',1),(310,310,3,NULL,1,'Marche',1),(311,311,3,NULL,1,'Molise',1),(312,312,3,NULL,1,'Piemonte',1),(313,313,3,NULL,1,'Puglia',1),(314,314,3,NULL,1,'Sardegna',1),(315,315,3,NULL,1,'Sicilia',1),(316,316,3,NULL,1,'Toscana',1),(317,317,3,NULL,1,'Trentino-Alto Adige',1),(318,318,3,NULL,1,'Umbria',1),(319,319,3,NULL,1,'Valle d Aosta',1),(320,320,3,NULL,1,'Veneto',1),(401,401,4,'',0,'Andalucia',1),(402,402,4,'',0,'Aragón',1),(403,403,4,'',0,'Castilla y León',1),(404,404,4,'',0,'Castilla la Mancha',1),(405,405,4,'',0,'Canarias',1),(406,406,4,'',0,'Cataluña',1),(407,407,4,'',0,'Comunidad de Ceuta',1),(408,408,4,'',0,'Comunidad Foral de Navarra',1),(409,409,4,'',0,'Comunidad de Melilla',1),(410,410,4,'',0,'Cantabria',1),(411,411,4,'',0,'Comunidad Valenciana',1),(412,412,4,'',0,'Extemadura',1),(413,413,4,'',0,'Galicia',1),(414,414,4,'',0,'Islas Baleares',1),(415,415,4,'',0,'La Rioja',1),(416,416,4,'',0,'Comunidad de Madrid',1),(417,417,4,'',0,'Región de Murcia',1),(418,418,4,'',0,'Principado de Asturias',1),(419,419,4,'',0,'Pais Vasco',1),(601,601,6,'',1,'Cantons',1),(1001,1001,10,'',0,'Ariana',1),(1002,1002,10,'',0,'Béja',1),(1003,1003,10,'',0,'Ben Arous',1),(1004,1004,10,'',0,'Bizerte',1),(1005,1005,10,'',0,'Gabès',1),(1006,1006,10,'',0,'Gafsa',1),(1007,1007,10,'',0,'Jendouba',1),(1008,1008,10,'',0,'Kairouan',1),(1009,1009,10,'',0,'Kasserine',1),(1010,1010,10,'',0,'Kébili',1),(1011,1011,10,'',0,'La Manouba',1),(1012,1012,10,'',0,'Le Kef',1),(1013,1013,10,'',0,'Mahdia',1),(1014,1014,10,'',0,'Médenine',1),(1015,1015,10,'',0,'Monastir',1),(1016,1016,10,'',0,'Nabeul',1),(1017,1017,10,'',0,'Sfax',1),(1018,1018,10,'',0,'Sidi Bouzid',1),(1019,1019,10,'',0,'Siliana',1),(1020,1020,10,'',0,'Sousse',1),(1021,1021,10,'',0,'Tataouine',1),(1022,1022,10,'',0,'Tozeur',1),(1023,1023,10,'',0,'Tunis',1),(1024,1024,10,'',0,'Zaghouan',1),(1101,1101,11,'',0,'United-States',1),(1201,1201,12,'',0,'Tanger-Tétouan',1),(1202,1202,12,'',0,'Gharb-Chrarda-Beni Hssen',1),(1203,1203,12,'',0,'Taza-Al Hoceima-Taounate',1),(1204,1204,12,'',0,'L\'Oriental',1),(1205,1205,12,'',0,'Fès-Boulemane',1),(1206,1206,12,'',0,'Meknès-Tafialet',1),(1207,1207,12,'',0,'Rabat-Salé-Zemour-Zaër',1),(1208,1208,12,'',0,'Grand Cassablanca',1),(1209,1209,12,'',0,'Chaouia-Ouardigha',1),(1210,1210,12,'',0,'Doukahla-Adba',1),(1211,1211,12,'',0,'Marrakech-Tensift-Al Haouz',1),(1212,1212,12,'',0,'Tadla-Azilal',1),(1213,1213,12,'',0,'Sous-Massa-Drâa',1),(1214,1214,12,'',0,'Guelmim-Es Smara',1),(1215,1215,12,'',0,'Laâyoune-Boujdour-Sakia el Hamra',1),(1216,1216,12,'',0,'Oued Ed-Dahab Lagouira',1),(1301,1301,13,'',0,'Algerie',1),(2301,2301,23,'',0,'Norte',1),(2302,2302,23,'',0,'Litoral',1),(2303,2303,23,'',0,'Cuyana',1),(2304,2304,23,'',0,'Central',1),(2305,2305,23,'',0,'Patagonia',1),(2801,2801,28,'',0,'Australia',1),(4601,4601,46,'',0,'Barbados',1),(6701,6701,67,NULL,NULL,'Tarapacá',1),(6702,6702,67,NULL,NULL,'Antofagasta',1),(6703,6703,67,NULL,NULL,'Atacama',1),(6704,6704,67,NULL,NULL,'Coquimbo',1),(6705,6705,67,NULL,NULL,'Valparaíso',1),(6706,6706,67,NULL,NULL,'General Bernardo O Higgins',1),(6707,6707,67,NULL,NULL,'Maule',1),(6708,6708,67,NULL,NULL,'Biobío',1),(6709,6709,67,NULL,NULL,'Raucanía',1),(6710,6710,67,NULL,NULL,'Los Lagos',1),(6711,6711,67,NULL,NULL,'Aysén General Carlos Ibáñez del Campo',1),(6712,6712,67,NULL,NULL,'Magallanes y Antártica Chilena',1),(6713,6713,67,NULL,NULL,'Santiago',1),(6714,6714,67,NULL,NULL,'Los Ríos',1),(6715,6715,67,NULL,NULL,'Arica y Parinacota',1),(7001,7001,70,'',0,'Colombie',1),(8601,8601,86,NULL,NULL,'Central',1),(8602,8602,86,NULL,NULL,'Oriental',1),(8603,8603,86,NULL,NULL,'Occidental',1),(10201,10201,102,NULL,NULL,'??????',1),(10202,10202,102,NULL,NULL,'?????? ??????',1),(10203,10203,102,NULL,NULL,'???????? ?????????',1),(10204,10204,102,NULL,NULL,'?????',1),(10205,10205,102,NULL,NULL,'????????? ????????? ??? ?????',1),(10206,10206,102,NULL,NULL,'???????',1),(10207,10207,102,NULL,NULL,'????? ?????',1),(10208,10208,102,NULL,NULL,'?????? ??????',1),(10209,10209,102,NULL,NULL,'????????????',1),(10210,10210,102,NULL,NULL,'????? ??????',1),(10211,10211,102,NULL,NULL,'?????? ??????',1),(10212,10212,102,NULL,NULL,'????????',1),(10213,10213,102,NULL,NULL,'?????? ?????????',1),(11401,11401,114,'',0,'Honduras',1),(11701,11701,117,'',0,'India',1),(15201,15201,152,'',0,'Rivière Noire',1),(15202,15202,152,'',0,'Flacq',1),(15203,15203,152,'',0,'Grand Port',1),(15204,15204,152,'',0,'Moka',1),(15205,15205,152,'',0,'Pamplemousses',1),(15206,15206,152,'',0,'Plaines Wilhems',1),(15207,15207,152,'',0,'Port-Louis',1),(15208,15208,152,'',0,'Rivière du Rempart',1),(15209,15209,152,'',0,'Savanne',1),(15210,15210,152,'',0,'Rodrigues',1),(15211,15211,152,'',0,'Les îles Agaléga',1),(15212,15212,152,'',0,'Les écueils des Cargados Carajos',1),(15401,15401,154,'',0,'Mexique',1),(23201,23201,232,'',0,'Los Andes',1),(23202,23202,232,'',0,'Capital',1),(23203,23203,232,'',0,'Central',1),(23204,23204,232,'',0,'Cento Occidental',1),(23205,23205,232,'',0,'Guayana',1),(23206,23206,232,'',0,'Insular',1),(23207,23207,232,'',0,'Los Llanos',1),(23208,23208,232,'',0,'Nor-Oriental',1),(23209,23209,232,'',0,'Zuliana',1),(23215,6,1,'97601',3,'Mayotte',1),(23280,420,4,'',0,'Otros',1),(23281,501,5,'',0,'Deutschland',1),(23296,701,7,'',0,'England',1),(23297,702,7,'',0,'Wales',1),(23298,703,7,'',0,'Scotland',1),(23299,704,7,'',0,'Northern Ireland',1),(23325,1401,14,'',0,'Canada',1),(23326,1701,17,'',0,'Provincies van Nederland ',1),(23333,5601,56,'',0,'Brasil',1); /*!40000 ALTER TABLE `llx_c_regions` ENABLE KEYS */; UNLOCK TABLES; @@ -2025,7 +1840,7 @@ CREATE TABLE `llx_c_revenuestamp` ( `accountancy_code_sell` varchar(32) DEFAULT NULL, `accountancy_code_buy` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=105 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2034,7 +1849,7 @@ CREATE TABLE `llx_c_revenuestamp` ( LOCK TABLES `llx_c_revenuestamp` WRITE; /*!40000 ALTER TABLE `llx_c_revenuestamp` DISABLE KEYS */; -INSERT INTO `llx_c_revenuestamp` VALUES (101,10,0.6,'Timbre fiscal1',1,'aa','bb'),(103,30,10,'111',1,'1111','1111'),(104,10,5,'fdsf',1,'dfd',NULL); +INSERT INTO `llx_c_revenuestamp` VALUES (101,10,0.4,'Revenue stamp tunisia',1,NULL,NULL); /*!40000 ALTER TABLE `llx_c_revenuestamp` ENABLE KEYS */; UNLOCK TABLES; @@ -2068,32 +1883,6 @@ INSERT INTO `llx_c_shipment_mode` VALUES (1,'2010-10-09 23:43:16','CATCH','Catch /*!40000 ALTER TABLE `llx_c_shipment_mode` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_c_source` --- - -DROP TABLE IF EXISTS `llx_c_source`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_c_source` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(30) NOT NULL, - `label` varchar(60) NOT NULL, - `active` tinyint(4) NOT NULL DEFAULT '1', - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_c_source` --- - -LOCK TABLES `llx_c_source` WRITE; -/*!40000 ALTER TABLE `llx_c_source` DISABLE KEYS */; -INSERT INTO `llx_c_source` VALUES (1,'SRC_00','Proposition commerciale',1),(2,'SRC_01','Internet',1),(3,'SRC_02','Campagne courrier',1),(4,'SRC_03','Campagne téléphone',1),(5,'SRC_04','Campagne fax',1),(6,'SRC_05','Commercial',1),(7,'SRC_06','Magasin',1); -/*!40000 ALTER TABLE `llx_c_source` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_c_stcomm` -- @@ -2118,7 +1907,7 @@ CREATE TABLE `llx_c_stcomm` ( LOCK TABLES `llx_c_stcomm` WRITE; /*!40000 ALTER TABLE `llx_c_stcomm` DISABLE KEYS */; -INSERT INTO `llx_c_stcomm` VALUES (-1,'ST_NO','Ne pas contacter',1,NULL),(0,'ST_NEVER','Jamais contacté',1,NULL),(1,'ST_TODO','A contacter',1,NULL),(2,'ST_PEND','Contact en cours',1,NULL),(3,'ST_DONE','Contactée',1,NULL); +INSERT INTO `llx_c_stcomm` VALUES (-1,'ST_NO','Do not contact',1,NULL),(0,'ST_NEVER','Never contacted',1,NULL),(1,'ST_TODO','To contact',1,NULL),(2,'ST_PEND','Contact in progress',1,NULL),(3,'ST_DONE','Contacted',1,NULL); /*!40000 ALTER TABLE `llx_c_stcomm` ENABLE KEYS */; UNLOCK TABLES; @@ -2144,7 +1933,7 @@ CREATE TABLE `llx_c_tva` ( `accountancy_code_buy` varchar(32) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_c_tva_id` (`fk_pays`,`taux`,`recuperableonly`) -) ENGINE=InnoDB AUTO_INCREMENT=2463 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2469 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2153,7 +1942,7 @@ CREATE TABLE `llx_c_tva` ( LOCK TABLES `llx_c_tva` WRITE; /*!40000 ALTER TABLE `llx_c_tva` DISABLE KEYS */; -INSERT INTO `llx_c_tva` VALUES (11,1,20,'0','0','0','0',0,'VAT standard rate (France hors DOM-TOM)',1,NULL,NULL),(12,1,8.5,'0','0','0','0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL),(13,1,8.5,'0','0','0','0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL),(14,1,5.5,'0','0','0','0',0,'VAT reduced rate (France hors DOM-TOM)',1,NULL,NULL),(15,1,0,'0','0','0','0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(16,1,2.1,'0','0','0','0',0,'VAT super-reduced rate',1,NULL,NULL),(21,2,21,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(22,2,6,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(23,2,0,'0','0','0','0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(24,2,12,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(31,3,20,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(32,3,10,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(33,3,4,'0','0','0','0',0,'VAT super-reduced rate',1,NULL,NULL),(34,3,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(41,4,21,'5.2','3','-19','5',0,'VAT standard rate',1,NULL,NULL),(42,4,10,'1.4','3','-19','5',0,'VAT reduced rate',1,NULL,NULL),(43,4,4,'0.5','3','-19','5',0,'VAT super-reduced rate',1,NULL,NULL),(44,4,0,'0','3','-19','5',0,'VAT Rate 0',1,NULL,NULL),(51,5,19,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(52,5,7,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(53,5,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(61,6,7.6,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(62,6,3.6,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(63,6,2.4,'0','0','0','0',0,'VAT super-reduced rate',1,NULL,NULL),(64,6,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(71,7,20,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(72,7,17.5,'0','0','0','0',0,'VAT standard rate before 2011',1,NULL,NULL),(73,7,5,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(74,7,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(91,9,17,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(92,9,13,'0','0','0','0',0,'VAT reduced rate 0',1,NULL,NULL),(93,9,3,'0','0','0','0',0,'VAT super reduced rate 0',1,NULL,NULL),(94,9,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(101,10,6,'0','0','0','0',0,'VAT 6%',1,NULL,NULL),(102,10,12,'1','4','0','0',0,'VAT 12%',1,NULL,NULL),(103,10,18,'0','0','0','0',0,'VAT 18%',1,NULL,NULL),(104,10,7.5,'1','4','0','0',0,'VAT 6% Majoré à 25% (7.5%)',1,NULL,NULL),(105,10,15,'1','4','0','0',0,'VAT 12% Majoré à 25% (15%)',1,NULL,NULL),(106,10,22.5,'1','4','0','0',0,'VAT 18% Majoré à 25% (22.5%)',1,NULL,NULL),(107,10,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(111,11,0,'0','0','0','0',0,'No Sales Tax',1,NULL,NULL),(112,11,4,'0','0','0','0',0,'Sales Tax 4%',1,NULL,NULL),(113,11,6,'0','0','0','0',0,'Sales Tax 6%',1,NULL,NULL),(121,12,20,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(122,12,14,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(123,12,10,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(124,12,7,'0','0','0','0',0,'VAT super-reduced rate',1,NULL,NULL),(125,12,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(141,14,7,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(142,14,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(143,14,5,'9.975','1','0','0',0,'TPS and TVQ rate',1,NULL,NULL),(171,17,19,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(172,17,6,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(173,17,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(201,20,25,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(202,20,12,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(203,20,6,'0','0','0','0',0,'VAT super-reduced rate',1,NULL,NULL),(204,20,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(211,21,0,'0','0','0','0',0,'IVA Rate 0',1,NULL,NULL),(212,21,18,'7.5','2','0','0',0,'IVA standard rate',1,NULL,NULL),(231,23,21,'0','0','0','0',0,'IVA standard rate',1,NULL,NULL),(232,23,10.5,'0','0','0','0',0,'IVA reduced rate',1,NULL,NULL),(233,23,0,'0','0','0','0',0,'IVA Rate 0',1,NULL,NULL),(251,25,20,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(252,25,12,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(253,25,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(254,25,5,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(271,27,20,'0','0','0','0',0,'VAT standard rate (France hors DOM-TOM)',1,NULL,NULL),(272,27,8.5,'0','0','0','0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL),(273,27,8.5,'0','0','0','0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL),(274,27,5.5,'0','0','0','0',0,'VAT reduced rate (France hors DOM-TOM)',0,NULL,NULL),(275,27,0,'0','0','0','0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(276,27,2.1,'0','0','0','0',0,'VAT super-reduced rate',1,NULL,NULL),(277,27,7,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(281,28,10,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(282,28,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(411,41,20,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(412,41,10,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(413,41,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(461,46,0,'0','0','0','0',0,'No VAT',1,NULL,NULL),(462,46,15,'0','0','0','0',0,'VAT 15%',1,NULL,NULL),(463,46,7.5,'0','0','0','0',0,'VAT 7.5%',1,NULL,NULL),(591,59,20,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(592,59,7,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(593,59,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(671,67,19,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(672,67,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(801,80,25,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(802,80,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(861,86,13,'0','0','0','0',0,'IVA 13',1,NULL,NULL),(862,86,0,'0','0','0','0',0,'SIN IVA',1,NULL,NULL),(1141,114,0,'0','0','0','0',0,'No ISV',1,NULL,NULL),(1142,114,12,'0','0','0','0',0,'ISV 12%',1,NULL,NULL),(1161,116,25.5,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(1162,116,7,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(1163,116,0,'0','0','0','0',0,'VAT rate 0',1,NULL,NULL),(1171,117,12.5,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(1172,117,4,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(1173,117,1,'0','0','0','0',0,'VAT super-reduced rate',1,NULL,NULL),(1174,117,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(1231,123,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(1232,123,5,'0','0','0','0',0,'VAT Rate 5',1,NULL,NULL),(1401,140,15,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(1402,140,12,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(1403,140,6,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(1404,140,3,'0','0','0','0',0,'VAT super-reduced rate',1,NULL,NULL),(1405,140,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(1521,152,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(1522,152,15,'0','0','0','0',0,'VAT Rate 15',1,NULL,NULL),(1541,154,0,'0','0','0','0',0,'No VAT',1,NULL,NULL),(1542,154,16,'0','0','0','0',0,'VAT 16%',1,NULL,NULL),(1543,154,10,'0','0','0','0',0,'VAT Frontero',1,NULL,NULL),(1662,166,15,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(1663,166,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(1731,173,25,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(1732,173,14,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(1733,173,8,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(1734,173,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(1841,184,20,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(1842,184,7,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(1843,184,3,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(1844,184,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(1881,188,24,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(1882,188,9,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(1883,188,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(1884,188,5,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(1931,193,0,'0','0','0','0',0,'No VAT in SPM',1,NULL,NULL),(2011,201,19,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(2012,201,10,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(2013,201,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(2021,202,20,'0','0','0','0',0,'VAT standard rate',1,NULL,NULL),(2022,202,8.5,'0','0','0','0',0,'VAT reduced rate',1,NULL,NULL),(2023,202,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(2131,213,5,NULL,'0',NULL,'0',0,'VAT 5%',1,NULL,NULL),(2321,232,0,'0','0','0','0',0,'No VAT',1,NULL,NULL),(2322,232,12,'0','0','0','0',0,'VAT 12%',1,NULL,NULL),(2323,232,8,'0','0','0','0',0,'VAT 8%',1,NULL,NULL),(2461,246,0,'0','0','0','0',0,'VAT Rate 0',1,NULL,NULL),(2462,4,15,'0','0','0','0',0,'aaaa',1,NULL,NULL); +INSERT INTO `llx_c_tva` VALUES (11,1,20,NULL,'0',NULL,'0',0,'VAT standard rate (France hors DOM-TOM)',1,NULL,NULL),(12,1,8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL),(13,1,8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL),(14,1,5.5,NULL,'0',NULL,'0',0,'VAT reduced rate (France hors DOM-TOM)',1,NULL,NULL),(15,1,0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(16,1,2.1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(17,1,10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(21,2,21,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(22,2,6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(23,2,0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(24,2,12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(31,3,21,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(32,3,10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(33,3,4,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(34,3,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(41,4,21,'5.2','3','-19:-15:-9','5',0,'VAT standard rate',1,NULL,NULL),(42,4,10,'1.4','3','-19:-15:-9','5',0,'VAT reduced rate',1,NULL,NULL),(43,4,4,'0.5','3','-19:-15:-9','5',0,'VAT super-reduced rate',1,NULL,NULL),(44,4,0,'0','3','-19:-15:-9','5',0,'VAT Rate 0',1,NULL,NULL),(51,5,19,NULL,'0',NULL,'0',0,'allgemeine Ust.',1,NULL,NULL),(52,5,7,NULL,'0',NULL,'0',0,'ermäßigte USt.',1,NULL,NULL),(53,5,0,NULL,'0',NULL,'0',0,'keine USt.',1,NULL,NULL),(54,5,5.5,NULL,'0',NULL,'0',0,'USt. Forst',0,NULL,NULL),(55,5,10.7,NULL,'0',NULL,'0',0,'USt. Landwirtschaft',0,NULL,NULL),(61,6,8,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(62,6,3.8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(63,6,2.5,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(64,6,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(71,7,20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(72,7,17.5,NULL,'0',NULL,'0',0,'VAT standard rate before 2011',1,NULL,NULL),(73,7,5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(74,7,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(81,8,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(82,8,23,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(83,8,13.5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(84,8,9,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(85,8,4.8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(91,9,17,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(92,9,13,NULL,'0',NULL,'0',0,'VAT reduced rate 0',1,NULL,NULL),(93,9,3,NULL,'0',NULL,'0',0,'VAT super reduced rate 0',1,NULL,NULL),(94,9,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(101,10,6,'1','4','0','0',0,'VAT 6%',1,NULL,NULL),(102,10,12,'1','4','0','0',0,'VAT 12%',1,NULL,NULL),(103,10,18,'1','4','0','0',0,'VAT 18%',1,NULL,NULL),(104,10,7.5,'1','4','0','0',0,'VAT 6% Majoré à 25% (7.5%)',1,NULL,NULL),(105,10,15,'1','4','0','0',0,'VAT 12% Majoré à 25% (15%)',1,NULL,NULL),(106,10,22.5,'1','4','0','0',0,'VAT 18% Majoré à 25% (22.5%)',1,NULL,NULL),(107,10,0,'1','4','0','0',0,'VAT Rate 0',1,NULL,NULL),(111,11,0,NULL,'0',NULL,'0',0,'No Sales Tax',1,NULL,NULL),(112,11,4,NULL,'0',NULL,'0',0,'Sales Tax 4%',1,NULL,NULL),(113,11,6,NULL,'0',NULL,'0',0,'Sales Tax 6%',1,NULL,NULL),(121,12,20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(122,12,14,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(123,12,10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(124,12,7,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(125,12,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(141,14,7,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(142,14,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(143,14,5,'9.975','1',NULL,'0',0,'GST/TPS and PST/TVQ rate for Province',1,NULL,NULL),(171,17,19,NULL,'0',NULL,'0',0,'Algemeen BTW tarief',1,NULL,NULL),(172,17,6,NULL,'0',NULL,'0',0,'Verlaagd BTW tarief',1,NULL,NULL),(173,17,0,NULL,'0',NULL,'0',0,'0 BTW tarief',1,NULL,NULL),(174,17,21,NULL,'0',NULL,'0',0,'Algemeen BTW tarief (vanaf 1 oktober 2012)',0,NULL,NULL),(201,20,25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(202,20,12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(203,20,6,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(204,20,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(211,21,0,'0','0','0','0',0,'IVA Rate 0',1,NULL,NULL),(212,21,18,'7.5','2','0','0',0,'IVA standard rate',1,NULL,NULL),(221,22,18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(222,22,10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(223,22,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(231,23,21,NULL,'0',NULL,'0',0,'IVA standard rate',1,NULL,NULL),(232,23,10.5,NULL,'0',NULL,'0',0,'IVA reduced rate',1,NULL,NULL),(233,23,0,NULL,'0',NULL,'0',0,'IVA Rate 0',1,NULL,NULL),(241,24,19.25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(242,24,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(251,25,23,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(252,25,13,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(253,25,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(254,25,6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(261,26,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(271,27,19.6,NULL,'0',NULL,'0',0,'VAT standard rate (France hors DOM-TOM)',1,NULL,NULL),(272,27,8.5,NULL,'0',NULL,'0',0,'VAT standard rate (DOM sauf Guyane et Saint-Martin)',0,NULL,NULL),(273,27,8.5,NULL,'0',NULL,'0',1,'VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0,NULL,NULL),(274,27,5.5,NULL,'0',NULL,'0',0,'VAT reduced rate (France hors DOM-TOM)',0,NULL,NULL),(275,27,0,NULL,'0',NULL,'0',0,'VAT Rate 0 ou non applicable',1,NULL,NULL),(276,27,2.1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(277,27,7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(281,28,10,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(282,28,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(411,41,20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(412,41,10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(413,41,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(461,46,0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(462,46,15,NULL,'0',NULL,'0',0,'VAT 15%',1,NULL,NULL),(463,46,7.5,NULL,'0',NULL,'0',0,'VAT 7.5%',1,NULL,NULL),(561,56,0,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(591,59,20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(592,59,7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(593,59,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(671,67,19,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(672,67,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(801,80,25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(802,80,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(861,86,13,NULL,'0',NULL,'0',0,'IVA 13',1,NULL,NULL),(862,86,0,NULL,'0',NULL,'0',0,'SIN IVA',1,NULL,NULL),(1141,114,0,NULL,'0',NULL,'0',0,'No ISV',1,NULL,NULL),(1142,114,12,NULL,'0',NULL,'0',0,'ISV 12%',1,NULL,NULL),(1161,116,25.5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1162,116,7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1163,116,0,NULL,'0',NULL,'0',0,'VAT rate 0',1,NULL,NULL),(1171,117,12.5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1172,117,4,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1173,117,1,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(1174,117,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1231,123,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1232,123,5,NULL,'0',NULL,'0',0,'VAT Rate 5',1,NULL,NULL),(1401,140,15,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1402,140,12,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1403,140,6,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1404,140,3,NULL,'0',NULL,'0',0,'VAT super-reduced rate',1,NULL,NULL),(1405,140,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1511,151,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1512,151,14,NULL,'0',NULL,'0',0,'VAT Rate 14',1,NULL,NULL),(1521,152,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1522,152,15,NULL,'0',NULL,'0',0,'VAT Rate 15',1,NULL,NULL),(1541,154,0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(1542,154,16,NULL,'0',NULL,'0',0,'VAT 16%',1,NULL,NULL),(1543,154,10,NULL,'0',NULL,'0',0,'VAT Frontero',1,NULL,NULL),(1662,166,15,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1663,166,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1692,169,5,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1693,169,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1731,173,25,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1732,173,14,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1733,173,8,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1734,173,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1811,181,18,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1812,181,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1841,184,20,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1842,184,7,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1843,184,3,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1844,184,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1881,188,24,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(1882,188,9,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1883,188,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(1884,188,5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(1931,193,0,NULL,'0',NULL,'0',0,'No VAT in SPM',1,NULL,NULL),(2011,201,19,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(2012,201,10,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(2013,201,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2021,202,22,NULL,'0',NULL,'0',0,'VAT standard rate',1,NULL,NULL),(2022,202,9.5,NULL,'0',NULL,'0',0,'VAT reduced rate',1,NULL,NULL),(2023,202,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2051,205,0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(2052,205,14,NULL,'0',NULL,'0',0,'VAT 14%',1,NULL,NULL),(2131,213,5,NULL,'0',NULL,'0',0,'VAT 5%',1,NULL,NULL),(2261,226,20,NULL,'0',NULL,'0',0,'VAT standart rate',1,NULL,NULL),(2262,226,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2321,232,0,NULL,'0',NULL,'0',0,'No VAT',1,NULL,NULL),(2322,232,12,NULL,'0',NULL,'0',0,'VAT 12%',1,NULL,NULL),(2323,232,8,NULL,'0',NULL,'0',0,'VAT 8%',1,NULL,NULL),(2461,246,0,NULL,'0',NULL,'0',0,'VAT Rate 0',1,NULL,NULL),(2462,102,23,'0','0','0','0',0,'Κανονικός Φ.Π.Α.',1,NULL,NULL),(2463,102,0,'0','0','0','0',0,'Μηδενικό Φ.Π.Α.',1,NULL,NULL),(2464,102,13,'0','0','0','0',0,'Μειωμένος Φ.Π.Α.',1,NULL,NULL),(2465,102,6.5,'0','0','0','0',0,'Υπερμειωμένος Φ.Π.Α.',1,NULL,NULL),(2466,102,16,'0','0','0','0',0,'Νήσων κανονικός Φ.Π.Α.',1,NULL,NULL),(2467,102,9,'0','0','0','0',0,'Νήσων μειωμένος Φ.Π.Α.',1,NULL,NULL),(2468,102,5,'0','0','0','0',0,'Νήσων υπερμειωμένος Φ.Π.Α.',1,NULL,NULL); /*!40000 ALTER TABLE `llx_c_tva` ENABLE KEYS */; UNLOCK TABLES; @@ -2267,7 +2056,7 @@ CREATE TABLE `llx_c_typent` ( LOCK TABLES `llx_c_typent` WRITE; /*!40000 ALTER TABLE `llx_c_typent` DISABLE KEYS */; -INSERT INTO `llx_c_typent` VALUES (0,'TE_UNKNOWN','-',NULL,1,NULL),(1,'TE_STARTUP','Start-up',NULL,1,NULL),(2,'TE_GROUP','Grand groupe',NULL,1,NULL),(3,'TE_MEDIUM','PME/PMI',NULL,1,NULL),(4,'TE_SMALL','TPE',NULL,1,NULL),(5,'TE_ADMIN','Administration',NULL,1,NULL),(6,'TE_WHOLE','Grossiste',NULL,1,NULL),(7,'TE_RETAIL','Revendeur',NULL,1,NULL),(8,'TE_PRIVATE','Particulier',NULL,1,NULL),(100,'TE_OTHER','Autres',NULL,1,NULL),(101,'TE_HOMME','Homme',NULL,0,'cabinetmed'),(102,'TE_FEMME','Femme',NULL,0,'cabinetmed'); +INSERT INTO `llx_c_typent` VALUES (0,'TE_UNKNOWN','-',NULL,1,NULL),(1,'TE_STARTUP','Start-up',NULL,0,NULL),(2,'TE_GROUP','Grand groupe',NULL,1,NULL),(3,'TE_MEDIUM','PME/PMI',NULL,1,NULL),(4,'TE_SMALL','TPE',NULL,1,NULL),(5,'TE_ADMIN','Administration',NULL,1,NULL),(6,'TE_WHOLE','Grossiste',NULL,0,NULL),(7,'TE_RETAIL','Revendeur',NULL,0,NULL),(8,'TE_PRIVATE','Particulier',NULL,1,NULL),(100,'TE_OTHER','Autres',NULL,1,NULL),(231,'TE_A_RI','Responsable Inscripto',23,0,NULL),(232,'TE_B_RNI','Responsable No Inscripto',23,0,NULL),(233,'TE_C_FE','Consumidor Final/Exento',23,0,NULL); /*!40000 ALTER TABLE `llx_c_typent` ENABLE KEYS */; UNLOCK TABLES; @@ -2354,7 +2143,7 @@ CREATE TABLE `llx_categorie` ( UNIQUE KEY `uk_categorie_ref` (`entity`,`fk_parent`,`label`,`type`), KEY `idx_categorie_type` (`type`), KEY `idx_categorie_label` (`label`) -) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2363,7 +2152,7 @@ CREATE TABLE `llx_categorie` ( LOCK TABLES `llx_categorie` WRITE; /*!40000 ALTER TABLE `llx_categorie` DISABLE KEYS */; -INSERT INTO `llx_categorie` VALUES (1,0,'MySupplierCategory',1,1,'This is description of category MyCategory for suppliers
',NULL,0,NULL),(2,0,'MyCategory',1,1,'This is description of MyCategory for customer and prospects
',NULL,0,NULL),(3,7,'Hot products',1,1,'This is description of hot products
',NULL,0,NULL),(4,0,'Cold products',1,1,'This is a description of cold products
',NULL,0,NULL),(5,7,'ChildChild 2a x',0,1,'
',NULL,0,NULL),(6,7,'ChildChild 2a',0,1,'
',NULL,0,NULL),(7,9,'Child 2',0,1,'
',NULL,0,NULL),(8,7,'ChildChild 2b',0,1,'
',NULL,0,NULL),(9,0,'Parent',0,1,'
',NULL,0,NULL),(10,0,'XL Cutomers',0,1,'
',NULL,0,NULL),(11,9,'Child 1',0,1,'',NULL,0,NULL),(12,0,'cccc',2,1,'',NULL,0,NULL),(13,0,'ccc2',2,1,'gdfgdfgdf',NULL,0,NULL),(14,0,'ccc3',2,1,'',NULL,0,NULL),(15,13,'ccc2a',2,1,'',NULL,0,NULL),(16,15,'ccc2a1',2,1,'desc,b,nb,fhgfg hf',NULL,0,NULL),(17,0,'MyTag1',4,1,'',NULL,0,NULL),(18,0,'MyTag2',4,1,'',NULL,0,NULL),(19,17,'MyTag3',4,1,'',NULL,0,NULL); +INSERT INTO `llx_categorie` VALUES (1,0,'Preferred Partners',1,1,'This category is used to tag suppliers that are Prefered Partners',NULL,0,NULL),(2,0,'MyCategory',1,1,'This is description of MyCategory for customer and prospects
',NULL,0,NULL),(3,7,'Hot products',1,1,'This is description of hot products
',NULL,0,NULL),(4,0,'Cold products',1,1,'This is a description of cold products
',NULL,0,NULL),(5,7,'Bio Fairtrade',0,1,'',NULL,0,NULL),(6,7,'Bio AB',0,1,'',NULL,0,NULL),(7,9,'Bio',0,1,'This product is a BIO product',NULL,0,NULL),(8,7,'Bio Dynamic',0,1,'',NULL,0,NULL),(9,0,'High Quality Product',0,1,'Label dedicated for High quality products',NULL,0,NULL),(10,0,'Reserved for VIP',0,1,'Product of thi category are reserved to VIP customers',NULL,0,NULL),(11,9,'ISO',0,1,'Product of this category has an ISO label',NULL,0,NULL),(12,0,'VIP',2,1,'',NULL,0,NULL),(13,0,'Region North',2,1,'Customer of North Region',NULL,0,NULL),(14,0,'Regular customer',2,1,'',NULL,0,NULL),(15,13,'Region North A',2,1,'',NULL,0,NULL),(16,15,'Region North A1',2,1,'Region North A - Part 1',NULL,0,NULL),(17,0,'MyTag1',4,1,'',NULL,0,NULL),(18,0,'MyTag2',4,1,'',NULL,0,NULL),(19,17,'MySubTag1',4,1,'',NULL,0,NULL),(20,13,'Region North B',2,1,'',NULL,0,NULL),(21,0,'Region South',2,1,'',NULL,0,NULL),(22,21,'Region South A',2,1,'',NULL,0,NULL),(23,21,'Region South B',2,1,'',NULL,0,NULL),(24,0,'Limited Edition',0,1,'This is a limited edition',NULL,0,NULL),(25,0,'Imported products',0,1,'For product we have to import from another country',NULL,0,NULL); /*!40000 ALTER TABLE `llx_categorie` ENABLE KEYS */; UNLOCK TABLES; @@ -2417,6 +2206,7 @@ CREATE TABLE `llx_categorie_contact` ( LOCK TABLES `llx_categorie_contact` WRITE; /*!40000 ALTER TABLE `llx_categorie_contact` DISABLE KEYS */; +INSERT INTO `llx_categorie_contact` VALUES (18,3,NULL),(18,6,NULL),(19,6,NULL); /*!40000 ALTER TABLE `llx_categorie_contact` ENABLE KEYS */; UNLOCK TABLES; @@ -2445,7 +2235,7 @@ CREATE TABLE `llx_categorie_fournisseur` ( LOCK TABLES `llx_categorie_fournisseur` WRITE; /*!40000 ALTER TABLE `llx_categorie_fournisseur` DISABLE KEYS */; -INSERT INTO `llx_categorie_fournisseur` VALUES (1,2,NULL),(9,2,NULL); +INSERT INTO `llx_categorie_fournisseur` VALUES (1,2,NULL),(1,10,NULL),(9,2,NULL); /*!40000 ALTER TABLE `llx_categorie_fournisseur` ENABLE KEYS */; UNLOCK TABLES; @@ -2530,7 +2320,7 @@ CREATE TABLE `llx_categorie_product` ( LOCK TABLES `llx_categorie_product` WRITE; /*!40000 ALTER TABLE `llx_categorie_product` DISABLE KEYS */; -INSERT INTO `llx_categorie_product` VALUES (5,1,NULL),(5,2,NULL),(5,3,NULL),(6,2,NULL),(6,3,NULL); +INSERT INTO `llx_categorie_product` VALUES (5,2,NULL),(6,2,NULL),(8,4,NULL),(9,5,NULL),(10,3,NULL),(10,4,NULL),(24,1,NULL),(24,11,NULL),(25,10,NULL); /*!40000 ALTER TABLE `llx_categorie_product` ENABLE KEYS */; UNLOCK TABLES; @@ -2559,7 +2349,7 @@ CREATE TABLE `llx_categorie_societe` ( LOCK TABLES `llx_categorie_societe` WRITE; /*!40000 ALTER TABLE `llx_categorie_societe` DISABLE KEYS */; -INSERT INTO `llx_categorie_societe` VALUES (2,2,NULL),(2,19,NULL),(10,4,NULL); +INSERT INTO `llx_categorie_societe` VALUES (2,2,NULL),(2,19,NULL),(10,4,NULL),(12,10,NULL); /*!40000 ALTER TABLE `llx_categorie_societe` ENABLE KEYS */; UNLOCK TABLES; @@ -2698,7 +2488,7 @@ CREATE TABLE `llx_commande` ( LOCK TABLES `llx_commande` WRITE; /*!40000 ALTER TABLE `llx_commande` DISABLE KEYS */; -INSERT INTO `llx_commande` VALUES (1,'2012-12-08 13:11:07',1,NULL,'CO1107-0002',1,NULL,NULL,'','2011-07-20 15:23:12','2011-08-08 13:59:09',NULL,'2011-07-20',1,NULL,1,NULL,NULL,1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','',0,NULL,NULL,1,1,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2013-02-12 16:06:51',1,NULL,'CO1107-0003',1,NULL,NULL,'','2011-07-20 23:20:12','2013-02-12 17:06:51',NULL,'2011-07-21',1,NULL,1,NULL,NULL,1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2013-02-17 17:27:56',1,NULL,'CO1107-0004',1,NULL,NULL,'','2011-07-20 23:22:53','2013-02-17 18:27:56',NULL,'2011-07-21',1,NULL,1,NULL,NULL,1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,30.00000000,30.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'2012-12-08 13:11:07',1,NULL,'CO1108-0001',1,NULL,NULL,'','2011-08-08 03:04:11','2011-08-08 03:04:21',NULL,'2011-08-08',1,NULL,1,NULL,NULL,2,0,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(6,'2013-02-17 15:22:14',19,NULL,'(PROV6)',1,NULL,NULL,'','2013-02-17 16:22:14',NULL,NULL,'2013-02-17',1,NULL,NULL,NULL,NULL,0,0,0,NULL,0,11.76000000,0.00000000,0.00000000,60.00000000,71.76000000,'','','',0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_commande` VALUES (1,'2016-01-22 17:36:10',1,NULL,'CO1107-0002',1,NULL,NULL,'','2011-07-20 15:23:12','2011-08-08 13:59:09',NULL,'2011-07-20',1,NULL,1,NULL,NULL,1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,1,1,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2013-02-12 16:06:51',1,NULL,'CO1107-0003',1,NULL,NULL,'','2011-07-20 23:20:12','2013-02-12 17:06:51',NULL,'2011-07-21',1,NULL,1,NULL,NULL,1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2013-02-17 17:27:56',1,NULL,'CO1107-0004',1,NULL,NULL,'','2011-07-20 23:22:53','2013-02-17 18:27:56',NULL,'2011-07-21',1,NULL,1,NULL,NULL,1,0,0,NULL,0,0.00000000,0.00000000,0.00000000,30.00000000,30.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'2012-12-08 13:11:07',1,NULL,'CO1108-0001',1,NULL,NULL,'','2011-08-08 03:04:11','2011-08-08 03:04:21',NULL,'2011-08-08',1,NULL,1,NULL,NULL,2,0,0,NULL,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,'','','einstein',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(6,'2016-01-22 17:36:05',19,NULL,'(PROV6)',1,NULL,NULL,'','2013-02-17 16:22:14',NULL,NULL,'2013-02-17',1,NULL,NULL,NULL,NULL,0,0,0,NULL,0,11.76000000,0.00000000,0.00000000,60.00000000,71.76000000,'','','einstein',0,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_commande` ENABLE KEYS */; UNLOCK TABLES; @@ -2789,7 +2579,7 @@ CREATE TABLE `llx_commande_fournisseur` ( LOCK TABLES `llx_commande_fournisseur` WRITE; /*!40000 ALTER TABLE `llx_commande_fournisseur` DISABLE KEYS */; -INSERT INTO `llx_commande_fournisseur` VALUES (1,'2012-12-08 13:11:07',13,'CF1007-0001',1,NULL,NULL,NULL,'2010-07-11 17:13:40','2010-07-11 17:15:42',NULL,NULL,'2010-07-11',1,NULL,1,NULL,NULL,0,5,0,0,0,39.20000000,0.00000000,0.00000000,200.00000000,239.20000000,NULL,NULL,'muscadet',2,0,0,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-12-08 13:11:07',1,'CF1007-0002',1,NULL,NULL,NULL,'2010-07-11 18:46:28','2010-07-11 18:47:33',NULL,NULL,'2010-07-11',1,NULL,1,NULL,NULL,0,3,0,0,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,NULL,NULL,'muscadet',4,0,0,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-12-08 13:11:07',17,'(PROV3)',1,NULL,NULL,NULL,'2011-08-04 23:00:52',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,0,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL),(4,'2012-12-08 13:11:07',17,'(PROV4)',1,NULL,NULL,NULL,'2011-08-04 23:19:32',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,0,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL),(5,'2012-12-08 13:11:07',17,'(PROV5)',1,NULL,NULL,NULL,'2011-08-04 23:22:16',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,0,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL),(6,'2012-12-08 13:11:07',17,'CF1108-0003',1,NULL,NULL,NULL,'2011-08-04 23:22:54','2011-08-08 15:04:37',NULL,NULL,NULL,1,NULL,1,NULL,NULL,0,2,0,0,0,0.98000000,0.00000000,0.00000000,5.00000000,5.98000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL),(7,'2012-12-08 13:11:07',17,'(PROV7)',1,NULL,NULL,NULL,'2011-08-04 23:23:29',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,0,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL),(8,'2012-12-08 13:11:07',17,'(PROV8)',1,NULL,NULL,NULL,'2011-08-04 23:36:10',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,0,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL),(13,'2013-03-09 18:39:41',1,'CF1303-0004',1,NULL,NULL,0,'2013-03-09 19:39:18','2013-03-09 19:39:27','2013-03-09 19:39:32',NULL,'2013-03-09',1,NULL,1,1,NULL,0,3,0,0,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,NULL,NULL,'muscadet',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_commande_fournisseur` VALUES (1,'2012-12-08 13:11:07',13,'CF1007-0001',1,NULL,NULL,NULL,'2010-07-11 17:13:40','2010-07-11 17:15:42',NULL,NULL,'2010-07-11',1,NULL,1,NULL,NULL,0,5,0,0,0,39.20000000,0.00000000,0.00000000,200.00000000,239.20000000,NULL,NULL,'muscadet',2,0,0,NULL,NULL,NULL,NULL,NULL,NULL),(2,'2012-12-08 13:11:07',1,'CF1007-0002',1,NULL,NULL,NULL,'2010-07-11 18:46:28','2010-07-11 18:47:33',NULL,NULL,'2010-07-11',1,NULL,1,NULL,NULL,0,3,0,0,0,0.00000000,0.00000000,0.00000000,200.00000000,200.00000000,NULL,NULL,'muscadet',4,0,0,NULL,NULL,NULL,NULL,NULL,NULL),(3,'2012-12-08 13:11:07',17,'(PROV3)',1,NULL,NULL,NULL,'2011-08-04 23:00:52',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,0,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL),(4,'2012-12-08 13:11:07',17,'(PROV4)',1,NULL,NULL,NULL,'2011-08-04 23:19:32',NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,0,0,0,0,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,'muscadet',0,0,0,NULL,NULL,NULL,NULL,NULL,NULL),(13,'2013-03-09 18:39:41',1,'CF1303-0004',1,NULL,NULL,0,'2013-03-09 19:39:18','2013-03-09 19:39:27','2013-03-09 19:39:32',NULL,'2013-03-09',1,NULL,1,1,NULL,0,3,0,0,0,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,NULL,NULL,'muscadet',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_commande_fournisseur` ENABLE KEYS */; UNLOCK TABLES; @@ -2934,7 +2724,7 @@ CREATE TABLE `llx_commande_fournisseurdet` ( LOCK TABLES `llx_commande_fournisseurdet` WRITE; /*!40000 ALTER TABLE `llx_commande_fournisseurdet` DISABLE KEYS */; -INSERT INTO `llx_commande_fournisseurdet` VALUES (1,1,NULL,NULL,'','','Chips',19.600,0.000,'',0.000,'',10,0,0,20.00000000,200.00000000,39.20000000,0.00000000,0.00000000,239.20000000,0,NULL,NULL,0,NULL,0,0,NULL),(2,2,NULL,4,'ABCD','Decapsuleur','',0.000,0.000,'',0.000,'',20,0,0,10.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0,0,NULL),(3,6,NULL,NULL,'','','ljkljl',19.600,0.000,'',0.000,'',1,0,0,5.00000000,5.00000000,0.98000000,0.00000000,0.00000000,5.98000000,0,NULL,NULL,0,NULL,0,0,NULL),(6,13,NULL,NULL,'','','dfgdf',0.000,0.000,'0',0.000,'0',1,0,0,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0,0,NULL); +INSERT INTO `llx_commande_fournisseurdet` VALUES (1,1,NULL,NULL,'','','Chips',19.600,0.000,'',0.000,'',10,0,0,20.00000000,200.00000000,39.20000000,0.00000000,0.00000000,239.20000000,0,NULL,NULL,0,NULL,0,0,NULL),(2,2,NULL,4,'ABCD','Decapsuleur','',0.000,0.000,'',0.000,'',20,0,0,10.00000000,200.00000000,0.00000000,0.00000000,0.00000000,200.00000000,0,NULL,NULL,0,NULL,0,0,NULL),(6,13,NULL,NULL,'','','dfgdf',0.000,0.000,'0',0.000,'0',1,0,0,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0,0,NULL); /*!40000 ALTER TABLE `llx_commande_fournisseurdet` ENABLE KEYS */; UNLOCK TABLES; @@ -3237,7 +3027,7 @@ CREATE TABLE `llx_const` ( `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_const` (`name`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=5360 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=5612 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3246,7 +3036,7 @@ CREATE TABLE `llx_const` ( LOCK TABLES `llx_const` WRITE; /*!40000 ALTER TABLE `llx_const` DISABLE KEYS */; -INSERT INTO `llx_const` VALUES (5,'SYSLOG_LEVEL',0,'7','chaine',0,'Level of debug info to show','2010-07-08 11:17:57'),(8,'MAIN_UPLOAD_DOC',0,'2048','chaine',0,'Max size for file upload (0 means no upload allowed)','2010-07-08 11:17:57'),(9,'MAIN_SEARCHFORM_SOCIETE',0,'1','yesno',0,'Show form for quick company search','2010-07-08 11:17:57'),(10,'MAIN_SEARCHFORM_CONTACT',0,'1','yesno',0,'Show form for quick contact search','2010-07-08 11:17:57'),(11,'MAIN_SEARCHFORM_PRODUITSERVICE',0,'1','yesno',0,'Show form for quick product search','2010-07-08 11:17:58'),(12,'MAIN_SEARCHFORM_ADHERENT',0,'1','yesno',0,'Show form for quick member search','2010-07-08 11:17:58'),(16,'MAIN_SIZE_LISTE_LIMIT',0,'25','chaine',0,'Longueur maximum des listes','2010-07-08 11:17:58'),(17,'MAIN_SHOW_WORKBOARD',0,'1','yesno',0,'Affichage tableau de bord de travail Dolibarr','2010-07-08 11:17:58'),(29,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',1,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2010-07-08 11:17:58'),(33,'SOCIETE_NOLIST_COURRIER',0,'1','yesno',0,'Liste les fichiers du repertoire courrier','2010-07-08 11:17:58'),(35,'SOCIETE_CODECOMPTA_ADDON',1,'mod_codecompta_panicum','yesno',0,'Module to control third parties codes','2010-07-08 11:17:58'),(36,'ADHERENT_MAIL_REQUIRED',1,'1','yesno',0,'EMail required to create a new member','2010-07-08 11:17:58'),(37,'ADHERENT_MAIL_FROM',1,'adherents@domain.com','chaine',0,'Sender EMail for automatic emails','2010-07-08 11:17:58'),(38,'ADHERENT_MAIL_RESIL',1,'Your subscription has been resiliated.\r\nWe hope to see you soon again','texte',0,'Mail resiliation','2010-07-08 11:17:58'),(39,'ADHERENT_MAIL_VALID',1,'Your subscription has been validated.\r\nThis is a remind of your personal information :\r\n\r\n%INFOS%\r\n\r\n','texte',0,'Mail de validation','2010-07-08 11:17:59'),(40,'ADHERENT_MAIL_COTIS',1,'Hello %PRENOM%,\r\nThanks for your subscription.\r\nThis email confirms that your subscription has been received and processed.\r\n\r\n','texte',0,'Mail de validation de cotisation','2010-07-08 11:17:59'),(41,'ADHERENT_MAIL_VALID_SUBJECT',1,'Your subscription has been validated','chaine',0,'Sujet du mail de validation','2010-07-08 11:17:59'),(42,'ADHERENT_MAIL_RESIL_SUBJECT',1,'Resiliating your subscription','chaine',0,'Sujet du mail de resiliation','2010-07-08 11:17:59'),(43,'ADHERENT_MAIL_COTIS_SUBJECT',1,'Receipt of your subscription','chaine',0,'Sujet du mail de validation de cotisation','2010-07-08 11:17:59'),(44,'MAILING_EMAIL_FROM',1,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2010-07-08 11:17:59'),(45,'ADHERENT_USE_MAILMAN',1,'0','yesno',0,'Utilisation de Mailman','2010-07-08 11:17:59'),(46,'ADHERENT_MAILMAN_UNSUB_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%','chaine',0,'Url de desinscription aux listes mailman','2010-07-08 11:17:59'),(47,'ADHERENT_MAILMAN_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%','chaine',0,'Url pour les inscriptions mailman','2010-07-08 11:17:59'),(48,'ADHERENT_MAILMAN_LISTS',1,'test-test,test-test2','chaine',0,'Listes auxquelles inscrire les nouveaux adherents','2010-07-08 11:17:59'),(49,'ADHERENT_MAILMAN_ADMINPW',1,'','chaine',0,'Mot de passe Admin des liste mailman','2010-07-08 11:17:59'),(50,'ADHERENT_MAILMAN_SERVER',1,'lists.domain.com','chaine',0,'Serveur hebergeant les interfaces d Admin des listes mailman','2010-07-08 11:17:59'),(51,'ADHERENT_MAILMAN_LISTS_COTISANT',1,'','chaine',0,'Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement','2010-07-08 11:17:59'),(52,'ADHERENT_USE_SPIP',1,'0','yesno',0,'Utilisation de SPIP ?','2010-07-08 11:17:59'),(53,'ADHERENT_USE_SPIP_AUTO',1,'0','yesno',0,'Utilisation de SPIP automatiquement','2010-07-08 11:17:59'),(54,'ADHERENT_SPIP_USER',1,'user','chaine',0,'user spip','2010-07-08 11:17:59'),(55,'ADHERENT_SPIP_PASS',1,'pass','chaine',0,'Pass de connection','2010-07-08 11:17:59'),(56,'ADHERENT_SPIP_SERVEUR',1,'localhost','chaine',0,'serveur spip','2010-07-08 11:17:59'),(57,'ADHERENT_SPIP_DB',1,'spip','chaine',0,'db spip','2010-07-08 11:17:59'),(58,'ADHERENT_CARD_HEADER_TEXT',1,'%ANNEE%','chaine',0,'Texte imprime sur le haut de la carte adherent','2010-07-08 11:17:59'),(59,'ADHERENT_CARD_FOOTER_TEXT',1,'Association AZERTY','chaine',0,'Texte imprime sur le bas de la carte adherent','2010-07-08 11:17:59'),(61,'FCKEDITOR_ENABLE_USER',1,'1','yesno',0,'Activation fckeditor sur notes utilisateurs','2010-07-08 11:17:59'),(62,'FCKEDITOR_ENABLE_SOCIETE',1,'1','yesno',0,'Activation fckeditor sur notes societe','2010-07-08 11:17:59'),(63,'FCKEDITOR_ENABLE_PRODUCTDESC',1,'1','yesno',0,'Activation fckeditor sur notes produits','2010-07-08 11:17:59'),(64,'FCKEDITOR_ENABLE_MEMBER',1,'1','yesno',0,'Activation fckeditor sur notes adherent','2010-07-08 11:17:59'),(65,'FCKEDITOR_ENABLE_MAILING',1,'1','yesno',0,'Activation fckeditor sur emailing','2010-07-08 11:17:59'),(67,'DON_ADDON_MODEL',1,'html_cerfafr','chaine',0,'','2010-07-08 11:18:00'),(68,'PROPALE_ADDON',1,'mod_propale_marbre','chaine',0,'','2010-07-08 11:18:00'),(69,'PROPALE_ADDON_PDF',1,'azur','chaine',0,'','2010-07-08 11:18:00'),(70,'COMMANDE_ADDON',1,'mod_commande_marbre','chaine',0,'','2010-07-08 11:18:00'),(71,'COMMANDE_ADDON_PDF',1,'einstein','chaine',0,'','2010-07-08 11:18:00'),(72,'COMMANDE_SUPPLIER_ADDON',1,'mod_commande_fournisseur_muguet','chaine',0,'','2010-07-08 11:18:00'),(73,'COMMANDE_SUPPLIER_ADDON_PDF',1,'muscadet','chaine',0,'','2010-07-08 11:18:00'),(74,'EXPEDITION_ADDON',1,'enlevement','chaine',0,'','2010-07-08 11:18:00'),(76,'FICHEINTER_ADDON',1,'pacific','chaine',0,'','2010-07-08 11:18:00'),(77,'FICHEINTER_ADDON_PDF',1,'soleil','chaine',0,'','2010-07-08 11:18:00'),(79,'FACTURE_ADDON_PDF',1,'crabe','chaine',0,'','2010-07-08 11:18:00'),(80,'PROPALE_VALIDITY_DURATION',1,'15','chaine',0,'Durée de validitée des propales','2010-07-08 11:18:00'),(230,'COMPANY_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2010-07-08 11:26:20'),(238,'LIVRAISON_ADDON_PDF',1,'typhon','chaine',0,'Nom du gestionnaire de generation des commandes en PDF','2010-07-08 11:26:27'),(239,'LIVRAISON_ADDON_NUMBER',1,'mod_livraison_jade','chaine',0,'Nom du gestionnaire de numerotation des bons de livraison','2013-03-20 13:17:36'),(242,'MAIN_SUBMODULE_EXPEDITION',1,'1','chaine',0,'','2010-07-08 11:26:34'),(245,'FACTURE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2010-07-08 11:28:53'),(249,'DON_FORM',1,'fsfe.fr.php','chaine',0,'Nom du gestionnaire de formulaire de dons','2010-07-08 11:29:00'),(252,'MAIN_MODULE_ADHERENT',1,'1',NULL,0,NULL,'2010-07-08 11:29:05'),(253,'ADHERENT_BANK_USE_AUTO',1,'','yesno',0,'Insertion automatique des cotisation dans le compte banquaire','2010-07-08 11:29:05'),(254,'ADHERENT_BANK_ACCOUNT',1,'','chaine',0,'ID du Compte banquaire utilise','2010-07-08 11:29:05'),(255,'ADHERENT_BANK_CATEGORIE',1,'','chaine',0,'ID de la categorie banquaire des cotisations','2010-07-08 11:29:05'),(256,'ADHERENT_ETIQUETTE_TYPE',1,'L7163','chaine',0,'Type d etiquette (pour impression de planche d etiquette)','2010-07-08 11:29:05'),(260,'MAIN_MODULE_STOCK',1,'1',NULL,0,NULL,'2010-07-08 11:29:18'),(269,'PROJECT_ADDON_PDF',1,'baleine','chaine',0,'Nom du gestionnaire de generation des projets en PDF','2010-07-08 11:29:33'),(270,'PROJECT_ADDON',1,'mod_project_simple','chaine',0,'Nom du gestionnaire de numerotation des projets','2010-07-08 11:29:33'),(271,'MAIN_MODULE_MAILING',1,'1',NULL,0,NULL,'2010-07-08 11:29:37'),(272,'MAIN_MODULE_EXPORT',1,'1',NULL,0,NULL,'2010-07-08 11:29:41'),(273,'MAIN_MODULE_IMPORT',1,'1',NULL,0,NULL,'2010-07-08 11:29:45'),(274,'MAIN_MODULE_CATEGORIE',1,'1',NULL,0,NULL,'2010-07-08 11:29:59'),(275,'MAIN_MODULE_BOOKMARK',1,'1',NULL,0,NULL,'2010-07-08 11:30:03'),(276,'MAIN_MODULE_WEBSERVICES',1,'1',NULL,0,NULL,'2010-07-08 11:30:30'),(278,'MAIN_MODULE_GEOIPMAXMIND',1,'1',NULL,0,NULL,'2010-07-08 11:30:36'),(279,'MAIN_MODULE_EXTERNALRSS',1,'1',NULL,0,NULL,'2010-07-08 11:30:38'),(292,'MAIN_MODULE_FCKEDITOR',1,'1',NULL,0,NULL,'2010-07-08 11:56:27'),(368,'STOCK_USERSTOCK_AUTOCREATE',1,'1','chaine',0,'','2010-07-08 22:44:59'),(369,'EXPEDITION_ADDON_PDF',1,'merou','chaine',0,'','2010-07-08 22:58:07'),(370,'MAIN_SUBMODULE_LIVRAISON',1,'1','chaine',0,'','2010-07-08 23:00:29'),(377,'FACTURE_ADDON',1,'mod_facture_terre','chaine',0,'','2010-07-08 23:08:12'),(380,'ADHERENT_CARD_TEXT',1,'%TYPE% n° %ID%\r\n%PRENOM% %NOM%\r\n<%EMAIL%>\r\n%ADRESSE%\r\n%CP% %VILLE%\r\n%PAYS%','',0,'Texte imprime sur la carte adherent','2010-07-08 23:14:46'),(381,'ADHERENT_CARD_TEXT_RIGHT',1,'aaa','',0,'','2010-07-08 23:14:55'),(384,'PRODUIT_SOUSPRODUITS',1,'1','chaine',0,'','2010-07-08 23:22:12'),(385,'PRODUIT_USE_SEARCH_TO_SELECT',1,'1','chaine',0,'','2010-07-08 23:22:19'),(386,'STOCK_CALCULATE_ON_SHIPMENT',1,'1','chaine',0,'','2010-07-08 23:23:21'),(387,'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER',1,'1','chaine',0,'','2010-07-08 23:23:26'),(392,'MAIN_AGENDA_XCAL_EXPORTKEY',1,'dolibarr','chaine',0,'','2010-07-08 23:27:50'),(393,'MAIN_AGENDA_EXPORT_PAST_DELAY',1,'100','chaine',0,'','2010-07-08 23:27:50'),(523,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(524,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(525,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(526,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',1,'1','chaine',0,'','2010-07-10 12:48:49'),(527,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(528,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',1,'1','chaine',0,'','2010-07-10 12:48:49'),(529,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(530,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',1,'1','chaine',0,'','2010-07-10 12:48:49'),(531,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',1,'1','chaine',0,'','2010-07-10 12:48:49'),(532,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',1,'1','chaine',0,'','2010-07-10 12:48:49'),(533,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:50'),(534,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:50'),(602,'MAIN_MODULE_PROJET',1,'1',NULL,0,NULL,'2010-07-11 13:26:54'),(610,'CASHDESK_ID_THIRDPARTY',1,'7','chaine',0,'','2010-07-11 17:08:18'),(611,'CASHDESK_ID_BANKACCOUNT_CASH',1,'3','chaine',0,'','2010-07-11 17:08:18'),(612,'CASHDESK_ID_BANKACCOUNT_CHEQUE',1,'1','chaine',0,'','2010-07-11 17:08:18'),(613,'CASHDESK_ID_BANKACCOUNT_CB',1,'1','chaine',0,'','2010-07-11 17:08:18'),(614,'CASHDESK_ID_WAREHOUSE',1,'2','chaine',0,'','2010-07-11 17:08:18'),(660,'LDAP_USER_DN',1,'ou=users,dc=my-domain,dc=com','chaine',0,NULL,'2010-07-18 10:25:27'),(661,'LDAP_GROUP_DN',1,'ou=groups,dc=my-domain,dc=com','chaine',0,NULL,'2010-07-18 10:25:27'),(662,'LDAP_FILTER_CONNECTION',1,'&(objectClass=user)(objectCategory=person)','chaine',0,NULL,'2010-07-18 10:25:27'),(663,'LDAP_FIELD_LOGIN',1,'uid','chaine',0,NULL,'2010-07-18 10:25:27'),(664,'LDAP_FIELD_FULLNAME',1,'cn','chaine',0,NULL,'2010-07-18 10:25:27'),(665,'LDAP_FIELD_NAME',1,'sn','chaine',0,NULL,'2010-07-18 10:25:27'),(666,'LDAP_FIELD_FIRSTNAME',1,'givenname','chaine',0,NULL,'2010-07-18 10:25:27'),(667,'LDAP_FIELD_MAIL',1,'mail','chaine',0,NULL,'2010-07-18 10:25:27'),(668,'LDAP_FIELD_PHONE',1,'telephonenumber','chaine',0,NULL,'2010-07-18 10:25:27'),(669,'LDAP_FIELD_FAX',1,'facsimiletelephonenumber','chaine',0,NULL,'2010-07-18 10:25:27'),(670,'LDAP_FIELD_MOBILE',1,'mobile','chaine',0,NULL,'2010-07-18 10:25:27'),(671,'LDAP_SERVER_TYPE',1,'openldap','chaine',0,'','2010-07-18 10:25:46'),(672,'LDAP_SERVER_PROTOCOLVERSION',1,'3','chaine',0,'','2010-07-18 10:25:47'),(673,'LDAP_SERVER_HOST',1,'localhost','chaine',0,'','2010-07-18 10:25:47'),(674,'LDAP_SERVER_PORT',1,'389','chaine',0,'','2010-07-18 10:25:47'),(675,'LDAP_SERVER_USE_TLS',1,'0','chaine',0,'','2010-07-18 10:25:47'),(676,'LDAP_SYNCHRO_ACTIVE',1,'dolibarr2ldap','chaine',0,'','2010-07-18 10:25:47'),(677,'LDAP_CONTACT_ACTIVE',1,'1','chaine',0,'','2010-07-18 10:25:47'),(678,'LDAP_MEMBER_ACTIVE',1,'1','chaine',0,'','2010-07-18 10:25:47'),(807,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',1,'1','chaine',0,NULL,'2011-07-18 17:27:52'),(808,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',1,'1','chaine',0,NULL,'2011-07-18 17:27:52'),(834,'MAIN_MODULE_CASHDESK',1,'1',NULL,0,NULL,'2011-07-18 17:30:24'),(969,'MAIN_MODULE_PRELEVEMENT',1,'1',NULL,0,NULL,'2011-07-18 18:01:59'),(973,'MAIN_MODULE_WORKFLOW',1,'1',NULL,0,NULL,'2011-07-18 18:02:20'),(974,'MAIN_MODULE_WORKFLOW_TRIGGERS',1,'1','chaine',0,NULL,'2011-07-18 18:02:20'),(975,'WORKFLOW_PROPAL_AUTOCREATE_ORDER',1,'1','chaine',0,'','2011-07-18 18:02:24'),(978,'MAIN_MODULE_NOTIFICATION',1,'1',NULL,0,NULL,'2011-07-18 18:03:06'),(979,'PRELEVEMENT_USER',1,'1','chaine',0,'','2011-07-18 18:05:50'),(980,'PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR',1,'1234567','chaine',0,'','2011-07-18 18:05:50'),(981,'PRELEVEMENT_ID_BANKACCOUNT',1,'1','chaine',0,'','2011-07-18 18:05:50'),(983,'FACTURE_RIB_NUMBER',1,'1','chaine',0,'','2011-07-18 18:35:14'),(984,'FACTURE_CHQ_NUMBER',1,'1','chaine',0,'','2011-07-18 18:35:14'),(1016,'GOOGLE_DUPLICATE_INTO_GCAL',1,'1','chaine',0,'','2011-07-18 21:40:20'),(1018,'MAIN_MODULE_SYSLOG',0,'1',NULL,0,NULL,'2011-07-20 11:36:47'),(1138,'MAIN_VERSION_LAST_INSTALL',0,'3.1.0-beta','chaine',0,'Dolibarr version when install','2011-07-28 23:05:02'),(1152,'SOCIETE_CODECLIENT_ADDON',1,'mod_codeclient_monkey','chaine',0,'','2011-07-29 20:50:02'),(1231,'MAIN_UPLOAD_DOC',1,'2048','chaine',0,'','2011-07-29 21:04:00'),(1234,'MAIN_UMASK',1,'0664','chaine',0,'','2011-07-29 21:04:11'),(1240,'MAIN_LOGEVENTS_USER_LOGIN',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1241,'MAIN_LOGEVENTS_USER_LOGIN_FAILED',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1242,'MAIN_LOGEVENTS_USER_LOGOUT',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1243,'MAIN_LOGEVENTS_USER_CREATE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1244,'MAIN_LOGEVENTS_USER_MODIFY',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1245,'MAIN_LOGEVENTS_USER_NEW_PASSWORD',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1246,'MAIN_LOGEVENTS_USER_ENABLEDISABLE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1247,'MAIN_LOGEVENTS_USER_DELETE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1248,'MAIN_LOGEVENTS_GROUP_CREATE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1249,'MAIN_LOGEVENTS_GROUP_MODIFY',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1250,'MAIN_LOGEVENTS_GROUP_DELETE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1251,'MAIN_BOXES_MAXLINES',1,'5','',0,'','2011-07-29 21:05:42'),(1379,'CABINETMED_RHEUMATOLOGY_ON',1,'1','chaine',1,'Enable features for rheumatology','2011-08-01 21:47:53'),(1482,'EXPEDITION_ADDON_NUMBER',1,'mod_expedition_safor','chaine',0,'Nom du gestionnaire de numerotation des expeditions','2011-08-05 17:53:11'),(1490,'CONTRACT_ADDON',1,'mod_contract_serpis','chaine',0,'Nom du gestionnaire de numerotation des contrats','2011-08-05 18:11:58'),(1677,'COMMANDE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/orders','chaine',0,NULL,'2012-12-08 13:11:02'),(1698,'PRODUCT_CODEPRODUCT_ADDON',1,'mod_codeproduct_leopard','yesno',0,'Module to control product codes','2012-12-08 13:11:25'),(1718,'MAIN_MODULE_TAX',1,'1',NULL,0,NULL,'2012-12-08 13:12:41'),(1719,'ACCOUNTING_USEDICTTOEDIT',1,'1','chaine',1,'','2012-12-08 13:15:00'),(1724,'PROPALE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2012-12-08 13:17:14'),(1730,'OPENSTREETMAP_ENABLE_MAPS',1,'1','chaine',0,'','2012-12-08 13:22:47'),(1731,'OPENSTREETMAP_ENABLE_MAPS_CONTACTS',1,'1','chaine',0,'','2012-12-08 13:22:47'),(1732,'OPENSTREETMAP_ENABLE_MAPS_MEMBERS',1,'1','chaine',0,'','2012-12-08 13:22:47'),(1733,'OPENSTREETMAP_MAPS_ZOOM_LEVEL',1,'15','chaine',0,'','2012-12-08 13:22:47'),(1737,'MAIN_INFO_SOCIETE_COUNTRY',2,'1:FR:France','chaine',0,'','2013-02-26 21:56:28'),(1738,'MAIN_INFO_SOCIETE_NOM',2,'aaa','chaine',0,'','2012-12-08 14:08:14'),(1739,'MAIN_INFO_SOCIETE_STATE',2,'0','chaine',0,'','2013-02-27 14:20:27'),(1740,'MAIN_MONNAIE',2,'EUR','chaine',0,'','2012-12-08 14:08:14'),(1741,'MAIN_LANG_DEFAULT',2,'auto','chaine',0,'','2012-12-08 14:08:14'),(1742,'MAIN_MAIL_EMAIL_FROM',2,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2012-12-08 14:08:14'),(1743,'MAIN_MENU_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2013-02-11 19:43:54'),(1744,'MAIN_MENUFRONT_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2013-02-11 19:43:54'),(1745,'MAIN_MENU_SMARTPHONE',2,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2012-12-08 14:08:14'),(1746,'MAIN_MENUFRONT_SMARTPHONE',2,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2012-12-08 14:08:14'),(1747,'MAIN_THEME',2,'eldy','chaine',0,'Default theme','2012-12-08 14:08:14'),(1748,'MAIN_DELAY_ACTIONS_TODO',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2012-12-08 14:08:14'),(1749,'MAIN_DELAY_ORDERS_TO_PROCESS',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2012-12-08 14:08:14'),(1750,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2012-12-08 14:08:14'),(1751,'MAIN_DELAY_PROPALS_TO_CLOSE',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2012-12-08 14:08:14'),(1752,'MAIN_DELAY_PROPALS_TO_BILL',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2012-12-08 14:08:14'),(1753,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2012-12-08 14:08:14'),(1754,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2012-12-08 14:08:14'),(1755,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2012-12-08 14:08:14'),(1756,'MAIN_DELAY_RUNNING_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2012-12-08 14:08:14'),(1757,'MAIN_DELAY_MEMBERS',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2012-12-08 14:08:14'),(1758,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',2,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2012-12-08 14:08:14'),(1759,'MAILING_EMAIL_FROM',2,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2012-12-08 14:08:14'),(1760,'MAIN_INFO_SOCIETE_COUNTRY',3,'1:FR:France','chaine',0,'','2013-02-26 21:56:28'),(1761,'MAIN_INFO_SOCIETE_NOM',3,'bbb','chaine',0,'','2012-12-08 14:08:20'),(1762,'MAIN_INFO_SOCIETE_STATE',3,'0','chaine',0,'','2013-02-27 14:20:27'),(1763,'MAIN_MONNAIE',3,'EUR','chaine',0,'','2012-12-08 14:08:20'),(1764,'MAIN_LANG_DEFAULT',3,'auto','chaine',0,'','2012-12-08 14:08:20'),(1765,'MAIN_MAIL_EMAIL_FROM',3,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2012-12-08 14:08:20'),(1766,'MAIN_MENU_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2013-02-11 19:43:54'),(1767,'MAIN_MENUFRONT_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2013-02-11 19:43:54'),(1768,'MAIN_MENU_SMARTPHONE',3,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2012-12-08 14:08:20'),(1769,'MAIN_MENUFRONT_SMARTPHONE',3,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2012-12-08 14:08:20'),(1770,'MAIN_THEME',3,'eldy','chaine',0,'Default theme','2012-12-08 14:08:20'),(1771,'MAIN_DELAY_ACTIONS_TODO',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2012-12-08 14:08:20'),(1772,'MAIN_DELAY_ORDERS_TO_PROCESS',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2012-12-08 14:08:20'),(1773,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2012-12-08 14:08:20'),(1774,'MAIN_DELAY_PROPALS_TO_CLOSE',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2012-12-08 14:08:20'),(1775,'MAIN_DELAY_PROPALS_TO_BILL',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2012-12-08 14:08:20'),(1776,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2012-12-08 14:08:20'),(1777,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2012-12-08 14:08:20'),(1778,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2012-12-08 14:08:20'),(1779,'MAIN_DELAY_RUNNING_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2012-12-08 14:08:20'),(1780,'MAIN_DELAY_MEMBERS',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2012-12-08 14:08:20'),(1781,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',3,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2012-12-08 14:08:20'),(1782,'MAILING_EMAIL_FROM',3,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2012-12-08 14:08:20'),(1803,'SYSLOG_FILE',1,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2012-12-08 14:15:08'),(1804,'SYSLOG_HANDLERS',1,'[\"mod_syslog_file\"]','chaine',0,'','2012-12-08 14:15:08'),(1805,'MAIN_MODULE_SKINCOLOREDITOR',3,'1',NULL,0,NULL,'2012-12-08 14:35:40'),(1806,'MAIN_MODULE_SKINCOLOREDITOR_TABS_0',3,'user:+tabskincoloreditors:ColorEditor:skincoloreditor@skincoloreditor:/skincoloreditor/usercolors.php?id=__ID__','chaine',0,NULL,'2012-12-08 14:35:40'),(1867,'MAIN_MODULE_PAYPAL',1,'1',NULL,0,NULL,'2012-12-11 22:53:56'),(1922,'PAYPAL_API_SANDBOX',1,'1','chaine',0,'','2012-12-12 12:11:05'),(1923,'PAYPAL_API_USER',1,'seller_1355312017_biz_api1.nltechno.com','chaine',0,'','2012-12-12 12:11:05'),(1924,'PAYPAL_API_PASSWORD',1,'1355312040','chaine',0,'','2012-12-12 12:11:05'),(1925,'PAYPAL_API_SIGNATURE',1,'AXqqdsWBzvfn0q5iNmbuiDv1y.3EAXIMWyl4C5KvDReR9HDwwAd6dQ4Q','chaine',0,'','2012-12-12 12:11:05'),(1926,'PAYPAL_API_INTEGRAL_OR_PAYPALONLY',1,'integral','chaine',0,'','2012-12-12 12:11:05'),(1927,'PAYPAL_SECURITY_TOKEN',1,'50c82fab36bb3b6aa83e2a50691803b2','chaine',0,'','2012-12-12 12:11:05'),(1928,'PAYPAL_SECURITY_TOKEN_UNIQUE',1,'0','chaine',0,'','2012-12-12 12:11:05'),(1929,'PAYPAL_ADD_PAYMENT_URL',1,'1','chaine',0,'','2012-12-12 12:11:05'),(1980,'MAIN_PDF_FORMAT',1,'EUA4','chaine',0,'','2012-12-12 19:58:05'),(1981,'MAIN_PROFID1_IN_ADDRESS',1,'0','chaine',0,'','2012-12-12 19:58:05'),(1982,'MAIN_PROFID2_IN_ADDRESS',1,'0','chaine',0,'','2012-12-12 19:58:05'),(1983,'MAIN_PROFID3_IN_ADDRESS',1,'0','chaine',0,'','2012-12-12 19:58:05'),(1984,'MAIN_PROFID4_IN_ADDRESS',1,'0','chaine',0,'','2012-12-12 19:58:05'),(1985,'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',1,'0','chaine',0,'','2012-12-12 19:58:05'),(1990,'MAIN_SMS_SENDMODE',1,'ovh','chaine',0,'This is to enable OVH SMS engine','2012-12-17 21:19:01'),(2040,'MAIN_MAIL_SMTP_PORT',1,'465','chaine',0,'','2015-07-19 13:41:06'),(2041,'MAIN_MAIL_SMTP_SERVER',1,'smtp.mail.com','chaine',0,'','2015-07-19 13:41:06'),(2044,'MAIN_MAIL_EMAIL_TLS',1,'1','chaine',0,'','2015-07-19 13:41:06'),(2251,'FCKEDITOR_TEST',1,'Test
\r\n\"\"fdfs','chaine',0,'','2012-12-19 19:12:24'),(2293,'SYSTEMTOOLS_MYSQLDUMP',1,'/usr/bin/mysqldump','chaine',0,'','2012-12-27 02:02:00'),(2305,'MAIN_MODULE_PROPALE',1,'1',NULL,0,NULL,'2013-01-02 20:33:16'),(2307,'MAIN_MODULE_CONTRAT',1,'1',NULL,0,NULL,'2013-01-02 20:33:17'),(2310,'MAIN_MODULE_EXPEDITION',1,'1',NULL,0,NULL,'2013-01-02 20:33:18'),(2315,'MAIN_MODULE_FICHEINTER',1,'1',NULL,0,NULL,'2013-01-02 20:33:21'),(2786,'MAIN_SOAP_DEBUG',1,'1','chaine',1,'','2013-01-13 12:37:21'),(2835,'MAIN_USE_CONNECT_TIMEOUT',1,'10','chaine',0,'','2013-01-16 19:28:50'),(2836,'MAIN_USE_RESPONSE_TIMEOUT',1,'30','chaine',0,'','2013-01-16 19:28:50'),(2837,'MAIN_PROXY_USE',1,'0','chaine',0,'','2013-01-16 19:28:50'),(2838,'MAIN_PROXY_HOST',1,'localhost','chaine',0,'','2013-01-16 19:28:50'),(2839,'MAIN_PROXY_PORT',1,'8080','chaine',0,'','2013-01-16 19:28:50'),(2840,'MAIN_PROXY_USER',1,'aaa','chaine',0,'','2013-01-16 19:28:50'),(2841,'MAIN_PROXY_PASS',1,'bbb','chaine',0,'','2013-01-16 19:28:50'),(2848,'OVHSMS_NICK',1,'BN196-OVH','chaine',0,'','2013-01-16 19:32:36'),(2849,'OVHSMS_PASS',1,'bigone-10','chaine',0,'','2013-01-16 19:32:36'),(2850,'OVHSMS_SOAPURL',1,'https://www.ovh.com/soapi/soapi-re-1.55.wsdl','chaine',0,'','2013-01-16 19:32:36'),(2854,'THEME_ELDY_RGB',1,'bfbf00','chaine',0,'','2013-01-18 10:02:53'),(2855,'THEME_ELDY_ENABLE_PERSONALIZED',1,'0','chaine',0,'','2013-01-18 10:02:55'),(2858,'MAIN_SESSION_TIMEOUT',1,'2000','chaine',0,'','2013-01-19 17:01:53'),(2862,'TICKET_ADDON',1,'mod_ticket_avenc','chaine',0,'Nom du gestionnaire de numerotation des tickets','2013-01-19 17:16:10'),(2866,'MAIN_MODULE_PRODUCT',1,'1',NULL,0,NULL,'2013-01-19 17:16:10'),(2867,'FACSIM_ADDON',1,'mod_facsim_alcoy','chaine',0,'','2013-01-19 17:16:25'),(2868,'POS_SERVICES',1,'0','chaine',0,'','2013-01-19 17:16:51'),(2869,'POS_USE_TICKETS',1,'1','chaine',0,'','2013-01-19 17:16:51'),(2870,'POS_MAX_TTC',1,'100','chaine',0,'','2013-01-19 17:16:51'),(3190,'MAIN_MODULE_HOLIDAY',2,'1',NULL,0,NULL,'2013-02-01 08:52:34'),(3191,'MAIN_MODULE_HOLIDAY_TABS_0',2,'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->write:/holiday/index.php?mainmenu=holiday&id=__ID__','chaine',0,NULL,'2013-02-01 08:52:34'),(3195,'INVOICE_SUPPLIER_ADDON_PDF',1,'canelle','chaine',0,'','2013-02-10 19:50:27'),(3199,'MAIN_FORCE_RELOAD_PAGE',1,'1','chaine',0,NULL,'2013-02-12 16:22:55'),(3217,'MAIN_PDF_TITLE_BACKGROUND_COLOR',1,'240,240,240','chaine',1,'','2013-02-13 15:18:02'),(3223,'OVH_THIRDPARTY_IMPORT',1,'2','chaine',0,'','2013-02-13 16:20:18'),(3241,'COMPANY_USE_SEARCH_TO_SELECT',1,'2','chaine',0,'','2013-02-17 14:33:39'),(3409,'AGENDA_USE_EVENT_TYPE',1,'1','chaine',0,'','2013-02-27 18:12:24'),(3886,'MAIN_REMOVE_INSTALL_WARNING',1,'1','chaine',1,'','2013-03-02 18:32:50'),(4013,'MAIN_DELAY_ACTIONS_TODO',1,'7','chaine',0,'','2013-03-06 08:59:12'),(4014,'MAIN_DELAY_PROPALS_TO_CLOSE',1,'31','chaine',0,'','2013-03-06 08:59:12'),(4015,'MAIN_DELAY_PROPALS_TO_BILL',1,'7','chaine',0,'','2013-03-06 08:59:12'),(4016,'MAIN_DELAY_ORDERS_TO_PROCESS',1,'2','chaine',0,'','2013-03-06 08:59:12'),(4017,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',1,'31','chaine',0,'','2013-03-06 08:59:12'),(4018,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',1,'7','chaine',0,'','2013-03-06 08:59:12'),(4019,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',1,'2','chaine',0,'','2013-03-06 08:59:12'),(4020,'MAIN_DELAY_RUNNING_SERVICES',1,'-15','chaine',0,'','2013-03-06 08:59:12'),(4021,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',1,'62','chaine',0,'','2013-03-06 08:59:13'),(4022,'MAIN_DELAY_MEMBERS',1,'31','chaine',0,'','2013-03-06 08:59:13'),(4023,'MAIN_DISABLE_METEO',1,'0','chaine',0,'','2013-03-06 08:59:13'),(4044,'ADHERENT_VAT_FOR_SUBSCRIPTIONS',1,'0','',0,'','2013-03-06 16:06:38'),(4047,'ADHERENT_BANK_USE',1,'bankviainvoice','',0,'','2013-03-06 16:12:30'),(4049,'PHPSANE_SCANIMAGE',1,'/usr/bin/scanimage','chaine',0,'','2013-03-06 21:54:13'),(4050,'PHPSANE_PNMTOJPEG',1,'/usr/bin/pnmtojpeg','chaine',0,'','2013-03-06 21:54:13'),(4051,'PHPSANE_PNMTOTIFF',1,'/usr/bin/pnmtotiff','chaine',0,'','2013-03-06 21:54:13'),(4052,'PHPSANE_OCR',1,'/usr/bin/gocr','chaine',0,'','2013-03-06 21:54:13'),(4548,'ECM_AUTO_TREE_ENABLED',1,'1','chaine',0,'','2013-03-10 15:57:21'),(4555,'WEBSERVICES_KEY',1,'dolibarrkey','chaine',0,'','2013-03-13 10:19:31'),(4579,'MAIN_MODULE_AGENDA',2,'1',NULL,0,NULL,'2013-03-13 15:29:19'),(4580,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4581,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4582,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4583,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4584,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4585,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4586,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4587,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4588,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4589,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4590,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4591,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4592,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4593,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4594,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4595,'MAIN_MODULE_GOOGLE',2,'1',NULL,0,NULL,'2013-03-13 15:29:47'),(4596,'MAIN_MODULE_GOOGLE_TABS_0',2,'agenda:+gcal:MenuAgendaGoogle:google@google:$conf->google->enabled && $conf->global->GOOGLE_ENABLE_AGENDA:/google/index.php','chaine',0,NULL,'2013-03-13 15:29:47'),(4597,'MAIN_MODULE_GOOGLE_TABS_1',2,'user:+gsetup:GoogleUserConf:google@google:$conf->google->enabled && $conf->global->GOOGLE_DUPLICATE_INTO_GCAL:/google/admin/google_calsync_user.php?id=__ID__','chaine',0,NULL,'2013-03-13 15:29:47'),(4598,'MAIN_MODULE_GOOGLE_TRIGGERS',2,'1','chaine',0,NULL,'2013-03-13 15:29:47'),(4599,'MAIN_MODULE_GOOGLE_HOOKS',2,'[\"toprightmenu\"]','chaine',0,NULL,'2013-03-13 15:29:47'),(4688,'GOOGLE_ENABLE_AGENDA',2,'1','chaine',0,'','2013-03-13 15:36:29'),(4689,'GOOGLE_AGENDA_NAME1',2,'eldy','chaine',0,'','2013-03-13 15:36:29'),(4690,'GOOGLE_AGENDA_SRC1',2,'eldy10@mail.com','chaine',0,'','2013-03-13 15:36:29'),(4691,'GOOGLE_AGENDA_COLOR1',2,'BE6D00','chaine',0,'','2013-03-13 15:36:29'),(4692,'GOOGLE_AGENDA_COLOR2',2,'7A367A','chaine',0,'','2013-03-13 15:36:29'),(4693,'GOOGLE_AGENDA_COLOR3',2,'7A367A','chaine',0,'','2013-03-13 15:36:29'),(4694,'GOOGLE_AGENDA_COLOR4',2,'7A367A','chaine',0,'','2013-03-13 15:36:29'),(4695,'GOOGLE_AGENDA_COLOR5',2,'7A367A','chaine',0,'','2013-03-13 15:36:29'),(4696,'GOOGLE_AGENDA_TIMEZONE',2,'Europe/Paris','chaine',0,'','2013-03-13 15:36:29'),(4697,'GOOGLE_AGENDA_NB',2,'5','chaine',0,'','2013-03-13 15:36:29'),(4698,'MAIN_DISABLE_ALL_MAILS',1,'0','chaine',0,'','2013-03-13 17:22:24'),(4699,'MAIN_MAIL_SENDMODE',1,'mail','chaine',0,'','2015-07-19 13:41:06'),(4700,'MAIN_MAIL_SMTPS_ID',1,'eldy10@mail.com','chaine',0,'','2015-07-19 13:41:06'),(4701,'MAIN_MAIL_SMTPS_PW',1,'bidonge','chaine',0,'','2015-07-19 13:41:06'),(4711,'GOOGLE_ENABLE_AGENDA',1,'1','chaine',0,'','2013-03-13 19:37:38'),(4712,'GOOGLE_AGENDA_NAME1',1,'asso master','chaine',0,'','2013-03-13 19:37:38'),(4713,'GOOGLE_AGENDA_SRC1',1,'assodolibarr@mail.com','chaine',0,'','2013-03-13 19:37:38'),(4714,'GOOGLE_AGENDA_COLOR1',1,'1B887A','chaine',0,'','2013-03-13 19:37:38'),(4715,'GOOGLE_AGENDA_COLOR2',1,'7A367A','chaine',0,'','2013-03-13 19:37:38'),(4716,'GOOGLE_AGENDA_COLOR3',1,'7A367A','chaine',0,'','2013-03-13 19:37:38'),(4717,'GOOGLE_AGENDA_COLOR4',1,'7A367A','chaine',0,'','2013-03-13 19:37:38'),(4718,'GOOGLE_AGENDA_COLOR5',1,'7A367A','chaine',0,'','2013-03-13 19:37:38'),(4719,'GOOGLE_AGENDA_TIMEZONE',1,'Europe/Paris','chaine',0,'','2013-03-13 19:37:38'),(4720,'GOOGLE_AGENDA_NB',1,'5','chaine',0,'','2013-03-13 19:37:38'),(4725,'SOCIETE_CODECLIENT_ADDON',2,'mod_codeclient_leopard','chaine',0,'Module to control third parties codes','2013-03-13 20:21:35'),(4726,'SOCIETE_CODECOMPTA_ADDON',2,'mod_codecompta_panicum','chaine',0,'Module to control third parties codes','2013-03-13 20:21:35'),(4727,'SOCIETE_FISCAL_MONTH_START',2,'','chaine',0,'Mettre le numero du mois du debut d\\\'annee fiscale, ex: 9 pour septembre','2013-03-13 20:21:35'),(4728,'MAIN_SEARCHFORM_SOCIETE',2,'1','yesno',0,'Show form for quick company search','2013-03-13 20:21:35'),(4729,'MAIN_SEARCHFORM_CONTACT',2,'1','yesno',0,'Show form for quick contact search','2013-03-13 20:21:35'),(4730,'COMPANY_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2013-03-13 20:21:35'),(4743,'MAIN_MODULE_CLICKTODIAL',2,'1',NULL,0,NULL,'2013-03-13 20:30:28'),(4744,'MAIN_MODULE_NOTIFICATION',2,'1',NULL,0,NULL,'2013-03-13 20:30:34'),(4745,'MAIN_MODULE_WEBSERVICES',2,'1',NULL,0,NULL,'2013-03-13 20:30:41'),(4746,'MAIN_MODULE_PROPALE',2,'1',NULL,0,NULL,'2013-03-13 20:32:38'),(4747,'PROPALE_ADDON_PDF',2,'azur','chaine',0,'Nom du gestionnaire de generation des propales en PDF','2013-03-13 20:32:38'),(4748,'PROPALE_ADDON',2,'mod_propale_marbre','chaine',0,'Nom du gestionnaire de numerotation des propales','2013-03-13 20:32:38'),(4749,'PROPALE_VALIDITY_DURATION',2,'15','chaine',0,'Duration of validity of business proposals','2013-03-13 20:32:38'),(4750,'PROPALE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2013-03-13 20:32:38'),(4752,'MAIN_MODULE_TAX',2,'1',NULL,0,NULL,'2013-03-13 20:32:47'),(4753,'MAIN_MODULE_DON',2,'1',NULL,0,NULL,'2013-03-13 20:32:54'),(4754,'DON_ADDON_MODEL',2,'html_cerfafr','chaine',0,'Nom du gestionnaire de generation de recu de dons','2013-03-13 20:32:54'),(4755,'POS_USE_TICKETS',2,'1','chaine',0,'','2013-03-13 20:33:09'),(4756,'POS_MAX_TTC',2,'100','chaine',0,'','2013-03-13 20:33:09'),(4757,'MAIN_MODULE_POS',2,'1',NULL,0,NULL,'2013-03-13 20:33:09'),(4758,'TICKET_ADDON',2,'mod_ticket_avenc','chaine',0,'Nom du gestionnaire de numerotation des tickets','2013-03-13 20:33:09'),(4759,'MAIN_MODULE_BANQUE',2,'1',NULL,0,NULL,'2013-03-13 20:33:09'),(4760,'MAIN_MODULE_FACTURE',2,'1',NULL,0,NULL,'2013-03-13 20:33:09'),(4761,'FACTURE_ADDON_PDF',2,'crabe','chaine',0,'Name of PDF model of invoice','2013-03-13 20:33:09'),(4762,'FACTURE_ADDON',2,'mod_facture_terre','chaine',0,'Name of numbering numerotation rules of invoice','2013-03-13 20:33:09'),(4763,'FACTURE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2013-03-13 20:33:09'),(4764,'MAIN_MODULE_SOCIETE',2,'1',NULL,0,NULL,'2013-03-13 20:33:09'),(4765,'MAIN_MODULE_PRODUCT',2,'1',NULL,0,NULL,'2013-03-13 20:33:09'),(4766,'PRODUCT_CODEPRODUCT_ADDON',2,'mod_codeproduct_leopard','chaine',0,'Module to control product codes','2013-03-13 20:33:09'),(4767,'MAIN_SEARCHFORM_PRODUITSERVICE',2,'1','yesno',0,'Show form for quick product search','2013-03-13 20:33:09'),(4772,'FACSIM_ADDON',2,'mod_facsim_alcoy','chaine',0,'','2013-03-13 20:33:32'),(4773,'MAIN_MODULE_MAILING',2,'1',NULL,0,NULL,'2013-03-13 20:33:37'),(4774,'MAIN_MODULE_OPENSURVEY',2,'1',NULL,0,NULL,'2013-03-13 20:33:42'),(4782,'AGENDA_USE_EVENT_TYPE',2,'1','chaine',0,'','2013-03-13 20:53:36'),(4884,'AGENDA_DISABLE_EXT',2,'1','chaine',0,'','2013-03-13 22:03:40'),(4919,'MAIN_MODULE_COMPTABILITE',1,'1',NULL,0,NULL,'2013-03-20 20:04:28'),(4922,'MAIN_MODULE_BANQUE',1,'1',NULL,0,NULL,'2013-03-20 20:04:28'),(4928,'COMMANDE_SUPPLIER_ADDON_NUMBER',1,'mod_commande_fournisseur_muguet','chaine',0,'Nom du gestionnaire de numerotation des commandes fournisseur','2013-03-22 09:24:29'),(4929,'INVOICE_SUPPLIER_ADDON_NUMBER',1,'mod_facture_fournisseur_cactus','chaine',0,'Nom du gestionnaire de numerotation des factures fournisseur','2013-03-22 09:24:29'),(5001,'MAIN_CRON_KEY',0,'bc54582fe30d5d4a830c6f582ec28810','chaine',0,'','2013-03-23 17:54:53'),(5009,'CRON_KEY',0,'2c2e755c20be2014098f629865598006','chaine',0,'','2013-03-23 18:06:24'),(5075,'MAIN_MENU_STANDARD',1,'eldy_menu.php','chaine',0,'','2013-03-24 02:51:13'),(5076,'MAIN_MENU_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2013-03-24 02:51:13'),(5077,'MAIN_MENUFRONT_STANDARD',1,'eldy_menu.php','chaine',0,'','2013-03-24 02:51:13'),(5078,'MAIN_MENUFRONT_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2013-03-24 02:51:13'),(5137,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',1,'1','chaine',0,NULL,'2013-09-08 23:06:08'),(5139,'SOCIETE_ADD_REF_IN_LIST',1,'','yesno',0,'Display customer ref into select list','2013-09-08 23:06:08'),(5150,'PROJECT_TASK_ADDON_PDF',1,'','chaine',0,'Name of PDF/ODT tasks manager class','2013-09-08 23:06:14'),(5151,'PROJECT_TASK_ADDON',1,'mod_task_simple','chaine',0,'Name of Numbering Rule task manager class','2013-09-08 23:06:14'),(5152,'PROJECT_TASK_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/tasks','chaine',0,'','2013-09-08 23:06:14'),(5164,'MAIN_AGENDA_ACTIONAUTO_COMPANY_SENTBYMAIL',1,'1','chaine',0,NULL,'2013-11-06 23:35:12'),(5195,'GOOGLE_DUPLICATE_INTO_THIRDPARTIES',1,'1','chaine',0,'','2013-11-07 00:02:34'),(5196,'GOOGLE_DUPLICATE_INTO_CONTACTS',1,'0','chaine',0,'','2013-11-07 00:02:34'),(5197,'GOOGLE_DUPLICATE_INTO_MEMBERS',1,'0','chaine',0,'','2013-11-07 00:02:34'),(5198,'GOOGLE_CONTACT_LOGIN',1,'eldy10@mail.com','chaine',0,'','2013-11-07 00:02:34'),(5199,'GOOGLE_CONTACT_PASSWORD',1,'bidonge','chaine',0,'','2013-11-07 00:02:34'),(5200,'GOOGLE_TAG_PREFIX',1,'Dolibarr (Thirdparties)','chaine',0,'','2013-11-07 00:02:34'),(5201,'GOOGLE_TAG_PREFIX_CONTACTS',1,'Dolibarr (Contacts/Addresses)','chaine',0,'','2013-11-07 00:02:34'),(5202,'GOOGLE_TAG_PREFIX_MEMBERS',1,'Dolibarr (Members)','chaine',0,'','2013-11-07 00:02:34'),(5203,'MODULE_GOOGLE_DEBUG',1,'1','chaine',1,'','2013-11-07 00:16:31'),(5235,'MAIN_FEATURES_LEVEL',0,'0','chaine',1,'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development','2014-03-02 15:22:27'),(5237,'MAIN_MODULE_GRAVATAR',1,'1',NULL,0,NULL,'2014-03-02 15:37:37'),(5239,'BOOKMARKS_SHOW_IN_MENU',1,'10','chaine',0,'','2014-03-02 15:42:26'),(5271,'DONATION_ART200',1,'','yesno',0,'Option Française - Eligibilité Art200 du CGI','2014-12-21 12:51:28'),(5272,'DONATION_ART238',1,'','yesno',0,'Option Française - Eligibilité Art238 bis du CGI','2014-12-21 12:51:28'),(5273,'DONATION_ART885',1,'','yesno',0,'Option Française - Eligibilité Art885-0 V bis du CGI','2014-12-21 12:51:28'),(5274,'DONATION_MESSAGE',1,'Thank you','chaine',0,'Message affiché sur le récépissé de versements ou dons','2014-12-21 12:51:28'),(5278,'PRODUCT_USE_OLD_PATH_FOR_PHOTO',0,'1','chaine',1,'Use old path for products images','2015-07-19 13:40:55'),(5282,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_UNVALIDATE',1,'1','chaine',0,NULL,'2015-07-19 13:41:20'),(5288,'DONATION_ACCOUNTINGACCOUNT',1,'7581','chaine',0,'Compte comptable de remise des versements ou dons','2015-07-19 13:41:21'),(5300,'MAIN_MODULE_AGENDA',1,'1',NULL,0,NULL,'2015-10-03 08:46:14'),(5301,'MAIN_MODULE_BARCODE',1,'1',NULL,0,NULL,'2015-10-03 08:46:14'),(5302,'MAIN_MODULE_CRON',1,'1',NULL,0,NULL,'2015-10-03 08:46:14'),(5303,'MAIN_MODULE_COMMANDE',1,'1',NULL,0,NULL,'2015-10-03 08:46:15'),(5304,'MAIN_MODULE_DEPLACEMENT',1,'1',NULL,0,NULL,'2015-10-03 08:46:15'),(5305,'MAIN_MODULE_DON',1,'1',NULL,0,NULL,'2015-10-03 08:46:15'),(5306,'MAIN_MODULE_ECM',1,'1',NULL,0,NULL,'2015-10-03 08:46:15'),(5307,'MAIN_MODULE_FACTURE',1,'1',NULL,0,NULL,'2015-10-03 08:46:15'),(5308,'MAIN_MODULE_FOURNISSEUR',1,'1',NULL,0,NULL,'2015-10-03 08:46:15'),(5309,'MAIN_MODULE_HOLIDAY',1,'1',NULL,0,NULL,'2015-10-03 08:46:15'),(5310,'MAIN_MODULE_HOLIDAY_TABS_0',1,'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->read:/holiday/list.php?mainmenu=holiday&id=__ID__','chaine',0,NULL,'2015-10-03 08:46:15'),(5311,'MAIN_MODULE_OPENSURVEY',1,'1',NULL,0,NULL,'2015-10-03 08:46:16'),(5312,'MAIN_MODULE_SOCIETE',1,'1',NULL,0,NULL,'2015-10-03 08:46:16'),(5313,'MAIN_MODULE_SERVICE',1,'1',NULL,0,NULL,'2015-10-03 08:46:16'),(5314,'MAIN_MODULE_USER',0,'1',NULL,0,NULL,'2015-10-03 08:46:16'),(5315,'MAIN_VERSION_LAST_UPGRADE',0,'3.8.1','chaine',0,'Dolibarr version for last upgrade','2015-10-03 08:46:18'),(5317,'INVOICE_CAN_ALWAYS_BE_REMOVED',1,'1','chaine',1,'','2015-10-03 09:25:30'),(5318,'MAIN_INFO_SOCIETE_COUNTRY',1,'1:FR:France','chaine',0,'','2015-10-03 10:11:01'),(5319,'MAIN_INFO_SOCIETE_NOM',1,'MyBigCompany','chaine',0,'','2015-10-03 10:11:01'),(5320,'MAIN_INFO_SOCIETE_ADDRESS',1,'21 Jump street','chaine',0,'','2015-10-03 10:11:01'),(5321,'MAIN_INFO_SOCIETE_TOWN',1,'MyTown','chaine',0,'','2015-10-03 10:11:01'),(5322,'MAIN_INFO_SOCIETE_ZIP',1,'75500','chaine',0,'','2015-10-03 10:11:01'),(5323,'MAIN_INFO_SOCIETE_STATE',1,'0','chaine',0,'','2015-10-03 10:11:01'),(5324,'MAIN_MONNAIE',1,'EUR','chaine',0,'','2015-10-03 10:11:01'),(5325,'MAIN_INFO_SOCIETE_TEL',1,'09123123','chaine',0,'','2015-10-03 10:11:01'),(5326,'MAIN_INFO_SOCIETE_FAX',1,'09123124','chaine',0,'','2015-10-03 10:11:01'),(5327,'MAIN_INFO_SOCIETE_MAIL',1,'myemail@mybigcompany.com','chaine',0,'','2015-10-03 10:11:01'),(5328,'MAIN_INFO_SOCIETE_WEB',1,'http://www.dolibarr.org','chaine',0,'','2015-10-03 10:11:01'),(5329,'MAIN_INFO_SOCIETE_NOTE',1,'This is note about my company','chaine',0,'','2015-10-03 10:11:01'),(5330,'MAIN_INFO_SOCIETE_LOGO',1,'mybigcompany.png','chaine',0,'','2015-10-03 10:11:01'),(5331,'MAIN_INFO_SOCIETE_LOGO_SMALL',1,'mybigcompany_small.png','chaine',0,'','2015-10-03 10:11:01'),(5332,'MAIN_INFO_SOCIETE_LOGO_MINI',1,'mybigcompany_mini.png','chaine',0,'','2015-10-03 10:11:01'),(5333,'MAIN_INFO_CAPITAL',1,'10000','chaine',0,'','2015-10-03 10:11:01'),(5334,'MAIN_INFO_SOCIETE_FORME_JURIDIQUE',1,'0','chaine',0,'','2015-10-03 10:11:01'),(5335,'MAIN_INFO_TVAINTRA',1,'FR1234567','chaine',0,'','2015-10-03 10:11:01'),(5336,'SOCIETE_FISCAL_MONTH_START',1,'1','chaine',0,'','2015-10-03 10:11:01'),(5337,'FACTURE_TVAOPTION',1,'1','chaine',0,'','2015-10-03 10:11:01'),(5338,'MAIN_LANG_DEFAULT',1,'en_US','chaine',0,'','2015-10-03 10:11:33'),(5339,'MAIN_MULTILANGS',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5340,'MAIN_SIZE_LISTE_LIMIT',1,'25','chaine',0,'','2015-10-03 10:11:33'),(5341,'MAIN_DISABLE_JAVASCRIPT',1,'0','chaine',0,'','2015-10-03 10:11:33'),(5342,'MAIN_BUTTON_HIDE_UNAUTHORIZED',1,'0','chaine',0,'','2015-10-03 10:11:33'),(5343,'MAIN_START_WEEK',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5344,'MAIN_DEFAULT_WORKING_DAYS',1,'1-5','chaine',0,'','2015-10-03 10:11:33'),(5345,'MAIN_DEFAULT_WORKING_HOURS',1,'9-18','chaine',0,'','2015-10-03 10:11:33'),(5346,'MAIN_SHOW_LOGO',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5347,'MAIN_FIRSTNAME_NAME_POSITION',1,'0','chaine',0,'','2015-10-03 10:11:33'),(5348,'MAIN_THEME',1,'eldy','chaine',0,'','2015-10-03 10:11:33'),(5349,'MAIN_SEARCHFORM_CONTACT',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5350,'MAIN_SEARCHFORM_SOCIETE',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5351,'MAIN_SEARCHFORM_PRODUITSERVICE',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5352,'MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER',1,'0','chaine',0,'','2015-10-03 10:11:33'),(5353,'MAIN_SEARCHFORM_ADHERENT',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5354,'MAIN_SEARCHFORM_PROJECT',1,'0','chaine',0,'','2015-10-03 10:11:33'),(5355,'MAIN_HELPCENTER_DISABLELINK',0,'1','chaine',0,'','2015-10-03 10:11:33'),(5356,'MAIN_HOME',1,'__(NoteSomeFeaturesAreDisabled)__
\r\n
\r\n__(SomeTranslationAreUncomplete)__
','chaine',0,'','2015-10-03 10:11:33'),(5357,'MAIN_HELP_DISABLELINK',0,'0','chaine',0,'','2015-10-03 10:11:33'),(5358,'MAIN_BUGTRACK_ENABLELINK',1,'0','chaine',0,'','2015-10-03 10:11:33'),(5359,'THEME_ELDY_USE_HOVER',1,'1','chaine',0,'','2015-10-03 10:11:33'); +INSERT INTO `llx_const` VALUES (5,'SYSLOG_LEVEL',0,'7','chaine',0,'Level of debug info to show','2010-07-08 11:17:57'),(8,'MAIN_UPLOAD_DOC',0,'2048','chaine',0,'Max size for file upload (0 means no upload allowed)','2010-07-08 11:17:57'),(9,'MAIN_SEARCHFORM_SOCIETE',0,'1','yesno',0,'Show form for quick company search','2010-07-08 11:17:57'),(10,'MAIN_SEARCHFORM_CONTACT',0,'1','yesno',0,'Show form for quick contact search','2010-07-08 11:17:57'),(11,'MAIN_SEARCHFORM_PRODUITSERVICE',0,'1','yesno',0,'Show form for quick product search','2010-07-08 11:17:58'),(12,'MAIN_SEARCHFORM_ADHERENT',0,'1','yesno',0,'Show form for quick member search','2010-07-08 11:17:58'),(16,'MAIN_SIZE_LISTE_LIMIT',0,'25','chaine',0,'Longueur maximum des listes','2010-07-08 11:17:58'),(17,'MAIN_SHOW_WORKBOARD',0,'1','yesno',0,'Affichage tableau de bord de travail Dolibarr','2010-07-08 11:17:58'),(29,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',1,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2010-07-08 11:17:58'),(33,'SOCIETE_NOLIST_COURRIER',0,'1','yesno',0,'Liste les fichiers du repertoire courrier','2010-07-08 11:17:58'),(35,'SOCIETE_CODECOMPTA_ADDON',1,'mod_codecompta_panicum','yesno',0,'Module to control third parties codes','2010-07-08 11:17:58'),(36,'ADHERENT_MAIL_REQUIRED',1,'1','yesno',0,'EMail required to create a new member','2010-07-08 11:17:58'),(37,'ADHERENT_MAIL_FROM',1,'adherents@domain.com','chaine',0,'Sender EMail for automatic emails','2010-07-08 11:17:58'),(38,'ADHERENT_MAIL_RESIL',1,'Your subscription has been resiliated.\r\nWe hope to see you soon again','texte',0,'Mail resiliation','2010-07-08 11:17:58'),(39,'ADHERENT_MAIL_VALID',1,'Your subscription has been validated.\r\nThis is a remind of your personal information :\r\n\r\n%INFOS%\r\n\r\n','texte',0,'Mail de validation','2010-07-08 11:17:59'),(40,'ADHERENT_MAIL_COTIS',1,'Hello %PRENOM%,\r\nThanks for your subscription.\r\nThis email confirms that your subscription has been received and processed.\r\n\r\n','texte',0,'Mail de validation de cotisation','2010-07-08 11:17:59'),(41,'ADHERENT_MAIL_VALID_SUBJECT',1,'Your subscription has been validated','chaine',0,'Sujet du mail de validation','2010-07-08 11:17:59'),(42,'ADHERENT_MAIL_RESIL_SUBJECT',1,'Resiliating your subscription','chaine',0,'Sujet du mail de resiliation','2010-07-08 11:17:59'),(43,'ADHERENT_MAIL_COTIS_SUBJECT',1,'Receipt of your subscription','chaine',0,'Sujet du mail de validation de cotisation','2010-07-08 11:17:59'),(44,'MAILING_EMAIL_FROM',1,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2010-07-08 11:17:59'),(45,'ADHERENT_USE_MAILMAN',1,'0','yesno',0,'Utilisation de Mailman','2010-07-08 11:17:59'),(46,'ADHERENT_MAILMAN_UNSUB_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&user=%EMAIL%','chaine',0,'Url de desinscription aux listes mailman','2010-07-08 11:17:59'),(47,'ADHERENT_MAILMAN_URL',1,'http://lists.domain.com/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%MAILMAN_ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%','chaine',0,'Url pour les inscriptions mailman','2010-07-08 11:17:59'),(48,'ADHERENT_MAILMAN_LISTS',1,'test-test,test-test2','chaine',0,'Listes auxquelles inscrire les nouveaux adherents','2010-07-08 11:17:59'),(49,'ADHERENT_MAILMAN_ADMINPW',1,'','chaine',0,'Mot de passe Admin des liste mailman','2010-07-08 11:17:59'),(50,'ADHERENT_MAILMAN_SERVER',1,'lists.domain.com','chaine',0,'Serveur hebergeant les interfaces d Admin des listes mailman','2010-07-08 11:17:59'),(51,'ADHERENT_MAILMAN_LISTS_COTISANT',1,'','chaine',0,'Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement','2010-07-08 11:17:59'),(52,'ADHERENT_USE_SPIP',1,'0','yesno',0,'Utilisation de SPIP ?','2010-07-08 11:17:59'),(53,'ADHERENT_USE_SPIP_AUTO',1,'0','yesno',0,'Utilisation de SPIP automatiquement','2010-07-08 11:17:59'),(54,'ADHERENT_SPIP_USER',1,'user','chaine',0,'user spip','2010-07-08 11:17:59'),(55,'ADHERENT_SPIP_PASS',1,'pass','chaine',0,'Pass de connection','2010-07-08 11:17:59'),(56,'ADHERENT_SPIP_SERVEUR',1,'localhost','chaine',0,'serveur spip','2010-07-08 11:17:59'),(57,'ADHERENT_SPIP_DB',1,'spip','chaine',0,'db spip','2010-07-08 11:17:59'),(58,'ADHERENT_CARD_HEADER_TEXT',1,'%ANNEE%','chaine',0,'Texte imprime sur le haut de la carte adherent','2010-07-08 11:17:59'),(59,'ADHERENT_CARD_FOOTER_TEXT',1,'Association AZERTY','chaine',0,'Texte imprime sur le bas de la carte adherent','2010-07-08 11:17:59'),(61,'FCKEDITOR_ENABLE_USER',1,'1','yesno',0,'Activation fckeditor sur notes utilisateurs','2010-07-08 11:17:59'),(62,'FCKEDITOR_ENABLE_SOCIETE',1,'1','yesno',0,'Activation fckeditor sur notes societe','2010-07-08 11:17:59'),(63,'FCKEDITOR_ENABLE_PRODUCTDESC',1,'1','yesno',0,'Activation fckeditor sur notes produits','2010-07-08 11:17:59'),(64,'FCKEDITOR_ENABLE_MEMBER',1,'1','yesno',0,'Activation fckeditor sur notes adherent','2010-07-08 11:17:59'),(65,'FCKEDITOR_ENABLE_MAILING',1,'1','yesno',0,'Activation fckeditor sur emailing','2010-07-08 11:17:59'),(67,'DON_ADDON_MODEL',1,'html_cerfafr','chaine',0,'','2010-07-08 11:18:00'),(68,'PROPALE_ADDON',1,'mod_propale_marbre','chaine',0,'','2010-07-08 11:18:00'),(69,'PROPALE_ADDON_PDF',1,'azur','chaine',0,'','2010-07-08 11:18:00'),(70,'COMMANDE_ADDON',1,'mod_commande_marbre','chaine',0,'','2010-07-08 11:18:00'),(71,'COMMANDE_ADDON_PDF',1,'einstein','chaine',0,'','2010-07-08 11:18:00'),(72,'COMMANDE_SUPPLIER_ADDON',1,'mod_commande_fournisseur_muguet','chaine',0,'','2010-07-08 11:18:00'),(73,'COMMANDE_SUPPLIER_ADDON_PDF',1,'muscadet','chaine',0,'','2010-07-08 11:18:00'),(74,'EXPEDITION_ADDON',1,'enlevement','chaine',0,'','2010-07-08 11:18:00'),(76,'FICHEINTER_ADDON',1,'pacific','chaine',0,'','2010-07-08 11:18:00'),(77,'FICHEINTER_ADDON_PDF',1,'soleil','chaine',0,'','2010-07-08 11:18:00'),(79,'FACTURE_ADDON_PDF',1,'crabe','chaine',0,'','2010-07-08 11:18:00'),(80,'PROPALE_VALIDITY_DURATION',1,'15','chaine',0,'Durée de validitée des propales','2010-07-08 11:18:00'),(230,'COMPANY_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2010-07-08 11:26:20'),(238,'LIVRAISON_ADDON_PDF',1,'typhon','chaine',0,'Nom du gestionnaire de generation des commandes en PDF','2010-07-08 11:26:27'),(239,'LIVRAISON_ADDON_NUMBER',1,'mod_livraison_jade','chaine',0,'Nom du gestionnaire de numerotation des bons de livraison','2013-03-20 13:17:36'),(242,'MAIN_SUBMODULE_EXPEDITION',1,'1','chaine',0,'','2010-07-08 11:26:34'),(245,'FACTURE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2010-07-08 11:28:53'),(249,'DON_FORM',1,'fsfe.fr.php','chaine',0,'Nom du gestionnaire de formulaire de dons','2010-07-08 11:29:00'),(253,'ADHERENT_BANK_USE_AUTO',1,'','yesno',0,'Insertion automatique des cotisation dans le compte banquaire','2010-07-08 11:29:05'),(254,'ADHERENT_BANK_ACCOUNT',1,'','chaine',0,'ID du Compte banquaire utilise','2010-07-08 11:29:05'),(255,'ADHERENT_BANK_CATEGORIE',1,'','chaine',0,'ID de la categorie banquaire des cotisations','2010-07-08 11:29:05'),(256,'ADHERENT_ETIQUETTE_TYPE',1,'L7163','chaine',0,'Type d etiquette (pour impression de planche d etiquette)','2010-07-08 11:29:05'),(269,'PROJECT_ADDON_PDF',1,'baleine','chaine',0,'Nom du gestionnaire de generation des projets en PDF','2010-07-08 11:29:33'),(270,'PROJECT_ADDON',1,'mod_project_simple','chaine',0,'Nom du gestionnaire de numerotation des projets','2010-07-08 11:29:33'),(368,'STOCK_USERSTOCK_AUTOCREATE',1,'1','chaine',0,'','2010-07-08 22:44:59'),(369,'EXPEDITION_ADDON_PDF',1,'merou','chaine',0,'','2010-07-08 22:58:07'),(370,'MAIN_SUBMODULE_LIVRAISON',1,'1','chaine',0,'','2010-07-08 23:00:29'),(377,'FACTURE_ADDON',1,'mod_facture_terre','chaine',0,'','2010-07-08 23:08:12'),(380,'ADHERENT_CARD_TEXT',1,'%TYPE% n° %ID%\r\n%PRENOM% %NOM%\r\n<%EMAIL%>\r\n%ADRESSE%\r\n%CP% %VILLE%\r\n%PAYS%','',0,'Texte imprime sur la carte adherent','2010-07-08 23:14:46'),(381,'ADHERENT_CARD_TEXT_RIGHT',1,'aaa','',0,'','2010-07-08 23:14:55'),(384,'PRODUIT_SOUSPRODUITS',1,'1','chaine',0,'','2010-07-08 23:22:12'),(385,'PRODUIT_USE_SEARCH_TO_SELECT',1,'1','chaine',0,'','2010-07-08 23:22:19'),(386,'STOCK_CALCULATE_ON_SHIPMENT',1,'1','chaine',0,'','2010-07-08 23:23:21'),(387,'STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER',1,'1','chaine',0,'','2010-07-08 23:23:26'),(392,'MAIN_AGENDA_XCAL_EXPORTKEY',1,'dolibarr','chaine',0,'','2010-07-08 23:27:50'),(393,'MAIN_AGENDA_EXPORT_PAST_DELAY',1,'100','chaine',0,'','2010-07-08 23:27:50'),(523,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(524,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(525,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(526,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',1,'1','chaine',0,'','2010-07-10 12:48:49'),(527,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(528,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',1,'1','chaine',0,'','2010-07-10 12:48:49'),(529,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:49'),(530,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',1,'1','chaine',0,'','2010-07-10 12:48:49'),(531,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',1,'1','chaine',0,'','2010-07-10 12:48:49'),(532,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',1,'1','chaine',0,'','2010-07-10 12:48:49'),(533,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:50'),(534,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',1,'1','chaine',0,'','2010-07-10 12:48:50'),(610,'CASHDESK_ID_THIRDPARTY',1,'7','chaine',0,'','2010-07-11 17:08:18'),(611,'CASHDESK_ID_BANKACCOUNT_CASH',1,'3','chaine',0,'','2010-07-11 17:08:18'),(612,'CASHDESK_ID_BANKACCOUNT_CHEQUE',1,'1','chaine',0,'','2010-07-11 17:08:18'),(613,'CASHDESK_ID_BANKACCOUNT_CB',1,'1','chaine',0,'','2010-07-11 17:08:18'),(614,'CASHDESK_ID_WAREHOUSE',1,'2','chaine',0,'','2010-07-11 17:08:18'),(660,'LDAP_USER_DN',1,'ou=users,dc=my-domain,dc=com','chaine',0,NULL,'2010-07-18 10:25:27'),(661,'LDAP_GROUP_DN',1,'ou=groups,dc=my-domain,dc=com','chaine',0,NULL,'2010-07-18 10:25:27'),(662,'LDAP_FILTER_CONNECTION',1,'&(objectClass=user)(objectCategory=person)','chaine',0,NULL,'2010-07-18 10:25:27'),(663,'LDAP_FIELD_LOGIN',1,'uid','chaine',0,NULL,'2010-07-18 10:25:27'),(664,'LDAP_FIELD_FULLNAME',1,'cn','chaine',0,NULL,'2010-07-18 10:25:27'),(665,'LDAP_FIELD_NAME',1,'sn','chaine',0,NULL,'2010-07-18 10:25:27'),(666,'LDAP_FIELD_FIRSTNAME',1,'givenname','chaine',0,NULL,'2010-07-18 10:25:27'),(667,'LDAP_FIELD_MAIL',1,'mail','chaine',0,NULL,'2010-07-18 10:25:27'),(668,'LDAP_FIELD_PHONE',1,'telephonenumber','chaine',0,NULL,'2010-07-18 10:25:27'),(669,'LDAP_FIELD_FAX',1,'facsimiletelephonenumber','chaine',0,NULL,'2010-07-18 10:25:27'),(670,'LDAP_FIELD_MOBILE',1,'mobile','chaine',0,NULL,'2010-07-18 10:25:27'),(671,'LDAP_SERVER_TYPE',1,'openldap','chaine',0,'','2010-07-18 10:25:46'),(672,'LDAP_SERVER_PROTOCOLVERSION',1,'3','chaine',0,'','2010-07-18 10:25:47'),(673,'LDAP_SERVER_HOST',1,'localhost','chaine',0,'','2010-07-18 10:25:47'),(674,'LDAP_SERVER_PORT',1,'389','chaine',0,'','2010-07-18 10:25:47'),(675,'LDAP_SERVER_USE_TLS',1,'0','chaine',0,'','2010-07-18 10:25:47'),(676,'LDAP_SYNCHRO_ACTIVE',1,'dolibarr2ldap','chaine',0,'','2010-07-18 10:25:47'),(677,'LDAP_CONTACT_ACTIVE',1,'1','chaine',0,'','2010-07-18 10:25:47'),(678,'LDAP_MEMBER_ACTIVE',1,'1','chaine',0,'','2010-07-18 10:25:47'),(807,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',1,'1','chaine',0,NULL,'2011-07-18 17:27:52'),(808,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',1,'1','chaine',0,NULL,'2011-07-18 17:27:52'),(974,'MAIN_MODULE_WORKFLOW_TRIGGERS',1,'1','chaine',0,NULL,'2011-07-18 18:02:20'),(975,'WORKFLOW_PROPAL_AUTOCREATE_ORDER',1,'1','chaine',0,'','2011-07-18 18:02:24'),(979,'PRELEVEMENT_USER',1,'1','chaine',0,'','2011-07-18 18:05:50'),(980,'PRELEVEMENT_NUMERO_NATIONAL_EMETTEUR',1,'1234567','chaine',0,'','2011-07-18 18:05:50'),(981,'PRELEVEMENT_ID_BANKACCOUNT',1,'1','chaine',0,'','2011-07-18 18:05:50'),(983,'FACTURE_RIB_NUMBER',1,'1','chaine',0,'','2011-07-18 18:35:14'),(984,'FACTURE_CHQ_NUMBER',1,'1','chaine',0,'','2011-07-18 18:35:14'),(1016,'GOOGLE_DUPLICATE_INTO_GCAL',1,'1','chaine',0,'','2011-07-18 21:40:20'),(1152,'SOCIETE_CODECLIENT_ADDON',1,'mod_codeclient_monkey','chaine',0,'','2011-07-29 20:50:02'),(1231,'MAIN_UPLOAD_DOC',1,'2048','chaine',0,'','2011-07-29 21:04:00'),(1234,'MAIN_UMASK',1,'0664','chaine',0,'','2011-07-29 21:04:11'),(1240,'MAIN_LOGEVENTS_USER_LOGIN',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1241,'MAIN_LOGEVENTS_USER_LOGIN_FAILED',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1242,'MAIN_LOGEVENTS_USER_LOGOUT',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1243,'MAIN_LOGEVENTS_USER_CREATE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1244,'MAIN_LOGEVENTS_USER_MODIFY',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1245,'MAIN_LOGEVENTS_USER_NEW_PASSWORD',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1246,'MAIN_LOGEVENTS_USER_ENABLEDISABLE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1247,'MAIN_LOGEVENTS_USER_DELETE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1248,'MAIN_LOGEVENTS_GROUP_CREATE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1249,'MAIN_LOGEVENTS_GROUP_MODIFY',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1250,'MAIN_LOGEVENTS_GROUP_DELETE',1,'1','chaine',0,'','2011-07-29 21:05:01'),(1251,'MAIN_BOXES_MAXLINES',1,'5','',0,'','2011-07-29 21:05:42'),(1482,'EXPEDITION_ADDON_NUMBER',1,'mod_expedition_safor','chaine',0,'Nom du gestionnaire de numerotation des expeditions','2011-08-05 17:53:11'),(1490,'CONTRACT_ADDON',1,'mod_contract_serpis','chaine',0,'Nom du gestionnaire de numerotation des contrats','2011-08-05 18:11:58'),(1677,'COMMANDE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/orders','chaine',0,NULL,'2012-12-08 13:11:02'),(1698,'PRODUCT_CODEPRODUCT_ADDON',1,'mod_codeproduct_leopard','yesno',0,'Module to control product codes','2012-12-08 13:11:25'),(1719,'ACCOUNTING_USEDICTTOEDIT',1,'1','chaine',1,'','2012-12-08 13:15:00'),(1724,'PROPALE_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2012-12-08 13:17:14'),(1730,'OPENSTREETMAP_ENABLE_MAPS',1,'1','chaine',0,'','2012-12-08 13:22:47'),(1731,'OPENSTREETMAP_ENABLE_MAPS_CONTACTS',1,'1','chaine',0,'','2012-12-08 13:22:47'),(1732,'OPENSTREETMAP_ENABLE_MAPS_MEMBERS',1,'1','chaine',0,'','2012-12-08 13:22:47'),(1733,'OPENSTREETMAP_MAPS_ZOOM_LEVEL',1,'15','chaine',0,'','2012-12-08 13:22:47'),(1737,'MAIN_INFO_SOCIETE_COUNTRY',2,'1:FR:France','chaine',0,'','2013-02-26 21:56:28'),(1738,'MAIN_INFO_SOCIETE_NOM',2,'aaa','chaine',0,'','2012-12-08 14:08:14'),(1739,'MAIN_INFO_SOCIETE_STATE',2,'0','chaine',0,'','2013-02-27 14:20:27'),(1740,'MAIN_MONNAIE',2,'EUR','chaine',0,'','2012-12-08 14:08:14'),(1741,'MAIN_LANG_DEFAULT',2,'auto','chaine',0,'','2012-12-08 14:08:14'),(1742,'MAIN_MAIL_EMAIL_FROM',2,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2012-12-08 14:08:14'),(1743,'MAIN_MENU_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2013-02-11 19:43:54'),(1744,'MAIN_MENUFRONT_STANDARD',2,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2013-02-11 19:43:54'),(1745,'MAIN_MENU_SMARTPHONE',2,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2012-12-08 14:08:14'),(1746,'MAIN_MENUFRONT_SMARTPHONE',2,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2012-12-08 14:08:14'),(1747,'MAIN_THEME',2,'eldy','chaine',0,'Default theme','2012-12-08 14:08:14'),(1748,'MAIN_DELAY_ACTIONS_TODO',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2012-12-08 14:08:14'),(1749,'MAIN_DELAY_ORDERS_TO_PROCESS',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2012-12-08 14:08:14'),(1750,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2012-12-08 14:08:14'),(1751,'MAIN_DELAY_PROPALS_TO_CLOSE',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2012-12-08 14:08:14'),(1752,'MAIN_DELAY_PROPALS_TO_BILL',2,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2012-12-08 14:08:14'),(1753,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2012-12-08 14:08:14'),(1754,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',2,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2012-12-08 14:08:14'),(1755,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2012-12-08 14:08:14'),(1756,'MAIN_DELAY_RUNNING_SERVICES',2,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2012-12-08 14:08:14'),(1757,'MAIN_DELAY_MEMBERS',2,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2012-12-08 14:08:14'),(1758,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',2,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2012-12-08 14:08:14'),(1759,'MAILING_EMAIL_FROM',2,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2012-12-08 14:08:14'),(1760,'MAIN_INFO_SOCIETE_COUNTRY',3,'1:FR:France','chaine',0,'','2013-02-26 21:56:28'),(1761,'MAIN_INFO_SOCIETE_NOM',3,'bbb','chaine',0,'','2012-12-08 14:08:20'),(1762,'MAIN_INFO_SOCIETE_STATE',3,'0','chaine',0,'','2013-02-27 14:20:27'),(1763,'MAIN_MONNAIE',3,'EUR','chaine',0,'','2012-12-08 14:08:20'),(1764,'MAIN_LANG_DEFAULT',3,'auto','chaine',0,'','2012-12-08 14:08:20'),(1765,'MAIN_MAIL_EMAIL_FROM',3,'dolibarr-robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2012-12-08 14:08:20'),(1766,'MAIN_MENU_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs internes','2013-02-11 19:43:54'),(1767,'MAIN_MENUFRONT_STANDARD',3,'eldy_menu.php','chaine',0,'Module de gestion de la barre de menu du haut pour utilisateurs externes','2013-02-11 19:43:54'),(1768,'MAIN_MENU_SMARTPHONE',3,'iphone_backoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs internes','2012-12-08 14:08:20'),(1769,'MAIN_MENUFRONT_SMARTPHONE',3,'iphone_frontoffice.php','chaine',0,'Module de gestion de la barre de menu smartphone pour utilisateurs externes','2012-12-08 14:08:20'),(1770,'MAIN_THEME',3,'eldy','chaine',0,'Default theme','2012-12-08 14:08:20'),(1771,'MAIN_DELAY_ACTIONS_TODO',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur actions planifiées non réalisées','2012-12-08 14:08:20'),(1772,'MAIN_DELAY_ORDERS_TO_PROCESS',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes clients non traitées','2012-12-08 14:08:20'),(1773,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur commandes fournisseurs non traitées','2012-12-08 14:08:20'),(1774,'MAIN_DELAY_PROPALS_TO_CLOSE',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales à cloturer','2012-12-08 14:08:20'),(1775,'MAIN_DELAY_PROPALS_TO_BILL',3,'7','chaine',0,'Tolérance de retard avant alerte (en jours) sur propales non facturées','2012-12-08 14:08:20'),(1776,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures client impayées','2012-12-08 14:08:20'),(1777,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',3,'2','chaine',0,'Tolérance de retard avant alerte (en jours) sur factures fournisseur impayées','2012-12-08 14:08:20'),(1778,'MAIN_DELAY_NOT_ACTIVATED_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services à activer','2012-12-08 14:08:20'),(1779,'MAIN_DELAY_RUNNING_SERVICES',3,'0','chaine',0,'Tolérance de retard avant alerte (en jours) sur services expirés','2012-12-08 14:08:20'),(1780,'MAIN_DELAY_MEMBERS',3,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur cotisations adhérent en retard','2012-12-08 14:08:20'),(1781,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',3,'62','chaine',0,'Tolérance de retard avant alerte (en jours) sur rapprochements bancaires à faire','2012-12-08 14:08:20'),(1782,'MAILING_EMAIL_FROM',3,'dolibarr@domain.com','chaine',0,'EMail emmetteur pour les envois d emailings','2012-12-08 14:08:20'),(1803,'SYSLOG_FILE',1,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'','2012-12-08 14:15:08'),(1804,'SYSLOG_HANDLERS',1,'[\"mod_syslog_file\"]','chaine',0,'','2012-12-08 14:15:08'),(1805,'MAIN_MODULE_SKINCOLOREDITOR',3,'1',NULL,0,NULL,'2012-12-08 14:35:40'),(1806,'MAIN_MODULE_SKINCOLOREDITOR_TABS_0',3,'user:+tabskincoloreditors:ColorEditor:skincoloreditor@skincoloreditor:/skincoloreditor/usercolors.php?id=__ID__','chaine',0,NULL,'2012-12-08 14:35:40'),(1922,'PAYPAL_API_SANDBOX',1,'1','chaine',0,'','2012-12-12 12:11:05'),(1923,'PAYPAL_API_USER',1,'seller_1355312017_biz_api1.nltechno.com','chaine',0,'','2012-12-12 12:11:05'),(1924,'PAYPAL_API_PASSWORD',1,'1355312040','chaine',0,'','2012-12-12 12:11:05'),(1925,'PAYPAL_API_SIGNATURE',1,'AXqqdsWBzvfn0q5iNmbuiDv1y.3EAXIMWyl4C5KvDReR9HDwwAd6dQ4Q','chaine',0,'','2012-12-12 12:11:05'),(1926,'PAYPAL_API_INTEGRAL_OR_PAYPALONLY',1,'integral','chaine',0,'','2012-12-12 12:11:05'),(1927,'PAYPAL_SECURITY_TOKEN',1,'50c82fab36bb3b6aa83e2a50691803b2','chaine',0,'','2012-12-12 12:11:05'),(1928,'PAYPAL_SECURITY_TOKEN_UNIQUE',1,'0','chaine',0,'','2012-12-12 12:11:05'),(1929,'PAYPAL_ADD_PAYMENT_URL',1,'1','chaine',0,'','2012-12-12 12:11:05'),(1980,'MAIN_PDF_FORMAT',1,'EUA4','chaine',0,'','2012-12-12 19:58:05'),(1981,'MAIN_PROFID1_IN_ADDRESS',1,'0','chaine',0,'','2012-12-12 19:58:05'),(1982,'MAIN_PROFID2_IN_ADDRESS',1,'0','chaine',0,'','2012-12-12 19:58:05'),(1983,'MAIN_PROFID3_IN_ADDRESS',1,'0','chaine',0,'','2012-12-12 19:58:05'),(1984,'MAIN_PROFID4_IN_ADDRESS',1,'0','chaine',0,'','2012-12-12 19:58:05'),(1985,'MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',1,'0','chaine',0,'','2012-12-12 19:58:05'),(1990,'MAIN_SMS_SENDMODE',1,'ovh','chaine',0,'This is to enable OVH SMS engine','2012-12-17 21:19:01'),(2040,'MAIN_MAIL_SMTP_PORT',1,'465','chaine',0,'','2015-07-19 13:41:06'),(2041,'MAIN_MAIL_SMTP_SERVER',1,'smtp.mail.com','chaine',0,'','2015-07-19 13:41:06'),(2044,'MAIN_MAIL_EMAIL_TLS',1,'1','chaine',0,'','2015-07-19 13:41:06'),(2251,'FCKEDITOR_TEST',1,'Test
\r\n\"\"fdfs','chaine',0,'','2012-12-19 19:12:24'),(2293,'SYSTEMTOOLS_MYSQLDUMP',1,'/usr/bin/mysqldump','chaine',0,'','2012-12-27 02:02:00'),(2835,'MAIN_USE_CONNECT_TIMEOUT',1,'10','chaine',0,'','2013-01-16 19:28:50'),(2836,'MAIN_USE_RESPONSE_TIMEOUT',1,'30','chaine',0,'','2013-01-16 19:28:50'),(2837,'MAIN_PROXY_USE',1,'0','chaine',0,'','2013-01-16 19:28:50'),(2838,'MAIN_PROXY_HOST',1,'localhost','chaine',0,'','2013-01-16 19:28:50'),(2839,'MAIN_PROXY_PORT',1,'8080','chaine',0,'','2013-01-16 19:28:50'),(2840,'MAIN_PROXY_USER',1,'aaa','chaine',0,'','2013-01-16 19:28:50'),(2841,'MAIN_PROXY_PASS',1,'bbb','chaine',0,'','2013-01-16 19:28:50'),(2848,'OVHSMS_NICK',1,'BN196-OVH','chaine',0,'','2013-01-16 19:32:36'),(2849,'OVHSMS_PASS',1,'bigone-10','chaine',0,'','2013-01-16 19:32:36'),(2850,'OVHSMS_SOAPURL',1,'https://www.ovh.com/soapi/soapi-re-1.55.wsdl','chaine',0,'','2013-01-16 19:32:36'),(2854,'THEME_ELDY_RGB',1,'bfbf00','chaine',0,'','2013-01-18 10:02:53'),(2855,'THEME_ELDY_ENABLE_PERSONALIZED',1,'0','chaine',0,'','2013-01-18 10:02:55'),(2858,'MAIN_SESSION_TIMEOUT',1,'2000','chaine',0,'','2013-01-19 17:01:53'),(2862,'TICKET_ADDON',1,'mod_ticket_avenc','chaine',0,'Nom du gestionnaire de numerotation des tickets','2013-01-19 17:16:10'),(2867,'FACSIM_ADDON',1,'mod_facsim_alcoy','chaine',0,'','2013-01-19 17:16:25'),(2868,'POS_SERVICES',1,'0','chaine',0,'','2013-01-19 17:16:51'),(2869,'POS_USE_TICKETS',1,'1','chaine',0,'','2013-01-19 17:16:51'),(2870,'POS_MAX_TTC',1,'100','chaine',0,'','2013-01-19 17:16:51'),(3190,'MAIN_MODULE_HOLIDAY',2,'1',NULL,0,NULL,'2013-02-01 08:52:34'),(3191,'MAIN_MODULE_HOLIDAY_TABS_0',2,'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->write:/holiday/index.php?mainmenu=holiday&id=__ID__','chaine',0,NULL,'2013-02-01 08:52:34'),(3195,'INVOICE_SUPPLIER_ADDON_PDF',1,'canelle','chaine',0,'','2013-02-10 19:50:27'),(3199,'MAIN_FORCE_RELOAD_PAGE',1,'1','chaine',0,NULL,'2013-02-12 16:22:55'),(3217,'MAIN_PDF_TITLE_BACKGROUND_COLOR',1,'240,240,240','chaine',1,'','2013-02-13 15:18:02'),(3223,'OVH_THIRDPARTY_IMPORT',1,'2','chaine',0,'','2013-02-13 16:20:18'),(3241,'COMPANY_USE_SEARCH_TO_SELECT',1,'2','chaine',0,'','2013-02-17 14:33:39'),(3409,'AGENDA_USE_EVENT_TYPE',1,'1','chaine',0,'','2013-02-27 18:12:24'),(3886,'MAIN_REMOVE_INSTALL_WARNING',1,'1','chaine',1,'','2013-03-02 18:32:50'),(4013,'MAIN_DELAY_ACTIONS_TODO',1,'7','chaine',0,'','2013-03-06 08:59:12'),(4014,'MAIN_DELAY_PROPALS_TO_CLOSE',1,'31','chaine',0,'','2013-03-06 08:59:12'),(4015,'MAIN_DELAY_PROPALS_TO_BILL',1,'7','chaine',0,'','2013-03-06 08:59:12'),(4016,'MAIN_DELAY_ORDERS_TO_PROCESS',1,'2','chaine',0,'','2013-03-06 08:59:12'),(4017,'MAIN_DELAY_CUSTOMER_BILLS_UNPAYED',1,'31','chaine',0,'','2013-03-06 08:59:12'),(4018,'MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS',1,'7','chaine',0,'','2013-03-06 08:59:12'),(4019,'MAIN_DELAY_SUPPLIER_BILLS_TO_PAY',1,'2','chaine',0,'','2013-03-06 08:59:12'),(4020,'MAIN_DELAY_RUNNING_SERVICES',1,'-15','chaine',0,'','2013-03-06 08:59:12'),(4021,'MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE',1,'62','chaine',0,'','2013-03-06 08:59:13'),(4022,'MAIN_DELAY_MEMBERS',1,'31','chaine',0,'','2013-03-06 08:59:13'),(4023,'MAIN_DISABLE_METEO',1,'0','chaine',0,'','2013-03-06 08:59:13'),(4044,'ADHERENT_VAT_FOR_SUBSCRIPTIONS',1,'0','',0,'','2013-03-06 16:06:38'),(4047,'ADHERENT_BANK_USE',1,'bankviainvoice','',0,'','2013-03-06 16:12:30'),(4049,'PHPSANE_SCANIMAGE',1,'/usr/bin/scanimage','chaine',0,'','2013-03-06 21:54:13'),(4050,'PHPSANE_PNMTOJPEG',1,'/usr/bin/pnmtojpeg','chaine',0,'','2013-03-06 21:54:13'),(4051,'PHPSANE_PNMTOTIFF',1,'/usr/bin/pnmtotiff','chaine',0,'','2013-03-06 21:54:13'),(4052,'PHPSANE_OCR',1,'/usr/bin/gocr','chaine',0,'','2013-03-06 21:54:13'),(4548,'ECM_AUTO_TREE_ENABLED',1,'1','chaine',0,'','2013-03-10 15:57:21'),(4555,'WEBSERVICES_KEY',1,'dolibarrkey','chaine',0,'','2013-03-13 10:19:31'),(4579,'MAIN_MODULE_AGENDA',2,'1',NULL,0,NULL,'2013-03-13 15:29:19'),(4580,'MAIN_AGENDA_ACTIONAUTO_COMPANY_CREATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4581,'MAIN_AGENDA_ACTIONAUTO_CONTRACT_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4582,'MAIN_AGENDA_ACTIONAUTO_PROPAL_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4583,'MAIN_AGENDA_ACTIONAUTO_PROPAL_SENTBYMAIL',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4584,'MAIN_AGENDA_ACTIONAUTO_ORDER_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4585,'MAIN_AGENDA_ACTIONAUTO_ORDER_SENTBYMAIL',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4586,'MAIN_AGENDA_ACTIONAUTO_BILL_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4587,'MAIN_AGENDA_ACTIONAUTO_BILL_PAYED',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4588,'MAIN_AGENDA_ACTIONAUTO_BILL_CANCEL',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4589,'MAIN_AGENDA_ACTIONAUTO_BILL_SENTBYMAIL',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4590,'MAIN_AGENDA_ACTIONAUTO_ORDER_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4591,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4592,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_VALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4593,'MAIN_AGENDA_ACTIONAUTO_SHIPPING_SENTBYMAIL',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4594,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',2,'1','chaine',0,NULL,'2013-03-13 15:29:19'),(4595,'MAIN_MODULE_GOOGLE',2,'1',NULL,0,NULL,'2013-03-13 15:29:47'),(4596,'MAIN_MODULE_GOOGLE_TABS_0',2,'agenda:+gcal:MenuAgendaGoogle:google@google:$conf->google->enabled && $conf->global->GOOGLE_ENABLE_AGENDA:/google/index.php','chaine',0,NULL,'2013-03-13 15:29:47'),(4597,'MAIN_MODULE_GOOGLE_TABS_1',2,'user:+gsetup:GoogleUserConf:google@google:$conf->google->enabled && $conf->global->GOOGLE_DUPLICATE_INTO_GCAL:/google/admin/google_calsync_user.php?id=__ID__','chaine',0,NULL,'2013-03-13 15:29:47'),(4598,'MAIN_MODULE_GOOGLE_TRIGGERS',2,'1','chaine',0,NULL,'2013-03-13 15:29:47'),(4599,'MAIN_MODULE_GOOGLE_HOOKS',2,'[\"toprightmenu\"]','chaine',0,NULL,'2013-03-13 15:29:47'),(4688,'GOOGLE_ENABLE_AGENDA',2,'1','chaine',0,'','2013-03-13 15:36:29'),(4689,'GOOGLE_AGENDA_NAME1',2,'eldy','chaine',0,'','2013-03-13 15:36:29'),(4690,'GOOGLE_AGENDA_SRC1',2,'eldy10@mail.com','chaine',0,'','2013-03-13 15:36:29'),(4691,'GOOGLE_AGENDA_COLOR1',2,'BE6D00','chaine',0,'','2013-03-13 15:36:29'),(4692,'GOOGLE_AGENDA_COLOR2',2,'7A367A','chaine',0,'','2013-03-13 15:36:29'),(4693,'GOOGLE_AGENDA_COLOR3',2,'7A367A','chaine',0,'','2013-03-13 15:36:29'),(4694,'GOOGLE_AGENDA_COLOR4',2,'7A367A','chaine',0,'','2013-03-13 15:36:29'),(4695,'GOOGLE_AGENDA_COLOR5',2,'7A367A','chaine',0,'','2013-03-13 15:36:29'),(4696,'GOOGLE_AGENDA_TIMEZONE',2,'Europe/Paris','chaine',0,'','2013-03-13 15:36:29'),(4697,'GOOGLE_AGENDA_NB',2,'5','chaine',0,'','2013-03-13 15:36:29'),(4698,'MAIN_DISABLE_ALL_MAILS',1,'0','chaine',0,'','2013-03-13 17:22:24'),(4699,'MAIN_MAIL_SENDMODE',1,'mail','chaine',0,'','2015-07-19 13:41:06'),(4700,'MAIN_MAIL_SMTPS_ID',1,'eldy10@mail.com','chaine',0,'','2015-07-19 13:41:06'),(4701,'MAIN_MAIL_SMTPS_PW',1,'bidonge','chaine',0,'','2015-07-19 13:41:06'),(4711,'GOOGLE_ENABLE_AGENDA',1,'1','chaine',0,'','2013-03-13 19:37:38'),(4712,'GOOGLE_AGENDA_NAME1',1,'asso master','chaine',0,'','2013-03-13 19:37:38'),(4713,'GOOGLE_AGENDA_SRC1',1,'assodolibarr@mail.com','chaine',0,'','2013-03-13 19:37:38'),(4714,'GOOGLE_AGENDA_COLOR1',1,'1B887A','chaine',0,'','2013-03-13 19:37:38'),(4715,'GOOGLE_AGENDA_COLOR2',1,'7A367A','chaine',0,'','2013-03-13 19:37:38'),(4716,'GOOGLE_AGENDA_COLOR3',1,'7A367A','chaine',0,'','2013-03-13 19:37:38'),(4717,'GOOGLE_AGENDA_COLOR4',1,'7A367A','chaine',0,'','2013-03-13 19:37:38'),(4718,'GOOGLE_AGENDA_COLOR5',1,'7A367A','chaine',0,'','2013-03-13 19:37:38'),(4719,'GOOGLE_AGENDA_TIMEZONE',1,'Europe/Paris','chaine',0,'','2013-03-13 19:37:38'),(4720,'GOOGLE_AGENDA_NB',1,'5','chaine',0,'','2013-03-13 19:37:38'),(4725,'SOCIETE_CODECLIENT_ADDON',2,'mod_codeclient_leopard','chaine',0,'Module to control third parties codes','2013-03-13 20:21:35'),(4726,'SOCIETE_CODECOMPTA_ADDON',2,'mod_codecompta_panicum','chaine',0,'Module to control third parties codes','2013-03-13 20:21:35'),(4727,'SOCIETE_FISCAL_MONTH_START',2,'','chaine',0,'Mettre le numero du mois du debut d\\\'annee fiscale, ex: 9 pour septembre','2013-03-13 20:21:35'),(4728,'MAIN_SEARCHFORM_SOCIETE',2,'1','yesno',0,'Show form for quick company search','2013-03-13 20:21:35'),(4729,'MAIN_SEARCHFORM_CONTACT',2,'1','yesno',0,'Show form for quick contact search','2013-03-13 20:21:35'),(4730,'COMPANY_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/thirdparties','chaine',0,NULL,'2013-03-13 20:21:35'),(4743,'MAIN_MODULE_CLICKTODIAL',2,'1',NULL,0,NULL,'2013-03-13 20:30:28'),(4744,'MAIN_MODULE_NOTIFICATION',2,'1',NULL,0,NULL,'2013-03-13 20:30:34'),(4745,'MAIN_MODULE_WEBSERVICES',2,'1',NULL,0,NULL,'2013-03-13 20:30:41'),(4746,'MAIN_MODULE_PROPALE',2,'1',NULL,0,NULL,'2013-03-13 20:32:38'),(4747,'PROPALE_ADDON_PDF',2,'azur','chaine',0,'Nom du gestionnaire de generation des propales en PDF','2013-03-13 20:32:38'),(4748,'PROPALE_ADDON',2,'mod_propale_marbre','chaine',0,'Nom du gestionnaire de numerotation des propales','2013-03-13 20:32:38'),(4749,'PROPALE_VALIDITY_DURATION',2,'15','chaine',0,'Duration of validity of business proposals','2013-03-13 20:32:38'),(4750,'PROPALE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/proposals','chaine',0,NULL,'2013-03-13 20:32:38'),(4752,'MAIN_MODULE_TAX',2,'1',NULL,0,NULL,'2013-03-13 20:32:47'),(4753,'MAIN_MODULE_DON',2,'1',NULL,0,NULL,'2013-03-13 20:32:54'),(4754,'DON_ADDON_MODEL',2,'html_cerfafr','chaine',0,'Nom du gestionnaire de generation de recu de dons','2013-03-13 20:32:54'),(4755,'POS_USE_TICKETS',2,'1','chaine',0,'','2013-03-13 20:33:09'),(4756,'POS_MAX_TTC',2,'100','chaine',0,'','2013-03-13 20:33:09'),(4757,'MAIN_MODULE_POS',2,'1',NULL,0,NULL,'2013-03-13 20:33:09'),(4758,'TICKET_ADDON',2,'mod_ticket_avenc','chaine',0,'Nom du gestionnaire de numerotation des tickets','2013-03-13 20:33:09'),(4759,'MAIN_MODULE_BANQUE',2,'1',NULL,0,NULL,'2013-03-13 20:33:09'),(4760,'MAIN_MODULE_FACTURE',2,'1',NULL,0,NULL,'2013-03-13 20:33:09'),(4761,'FACTURE_ADDON_PDF',2,'crabe','chaine',0,'Name of PDF model of invoice','2013-03-13 20:33:09'),(4762,'FACTURE_ADDON',2,'mod_facture_terre','chaine',0,'Name of numbering numerotation rules of invoice','2013-03-13 20:33:09'),(4763,'FACTURE_ADDON_PDF_ODT_PATH',2,'DOL_DATA_ROOT/doctemplates/invoices','chaine',0,NULL,'2013-03-13 20:33:09'),(4764,'MAIN_MODULE_SOCIETE',2,'1',NULL,0,NULL,'2013-03-13 20:33:09'),(4765,'MAIN_MODULE_PRODUCT',2,'1',NULL,0,NULL,'2013-03-13 20:33:09'),(4766,'PRODUCT_CODEPRODUCT_ADDON',2,'mod_codeproduct_leopard','chaine',0,'Module to control product codes','2013-03-13 20:33:09'),(4767,'MAIN_SEARCHFORM_PRODUITSERVICE',2,'1','yesno',0,'Show form for quick product search','2013-03-13 20:33:09'),(4772,'FACSIM_ADDON',2,'mod_facsim_alcoy','chaine',0,'','2013-03-13 20:33:32'),(4773,'MAIN_MODULE_MAILING',2,'1',NULL,0,NULL,'2013-03-13 20:33:37'),(4774,'MAIN_MODULE_OPENSURVEY',2,'1',NULL,0,NULL,'2013-03-13 20:33:42'),(4782,'AGENDA_USE_EVENT_TYPE',2,'1','chaine',0,'','2013-03-13 20:53:36'),(4884,'AGENDA_DISABLE_EXT',2,'1','chaine',0,'','2013-03-13 22:03:40'),(4928,'COMMANDE_SUPPLIER_ADDON_NUMBER',1,'mod_commande_fournisseur_muguet','chaine',0,'Nom du gestionnaire de numerotation des commandes fournisseur','2013-03-22 09:24:29'),(4929,'INVOICE_SUPPLIER_ADDON_NUMBER',1,'mod_facture_fournisseur_cactus','chaine',0,'Nom du gestionnaire de numerotation des factures fournisseur','2013-03-22 09:24:29'),(5001,'MAIN_CRON_KEY',0,'bc54582fe30d5d4a830c6f582ec28810','chaine',0,'','2013-03-23 17:54:53'),(5009,'CRON_KEY',0,'2c2e755c20be2014098f629865598006','chaine',0,'','2013-03-23 18:06:24'),(5075,'MAIN_MENU_STANDARD',1,'eldy_menu.php','chaine',0,'','2013-03-24 02:51:13'),(5076,'MAIN_MENU_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2013-03-24 02:51:13'),(5077,'MAIN_MENUFRONT_STANDARD',1,'eldy_menu.php','chaine',0,'','2013-03-24 02:51:13'),(5078,'MAIN_MENUFRONT_SMARTPHONE',1,'eldy_menu.php','chaine',0,'','2013-03-24 02:51:13'),(5137,'MAIN_AGENDA_ACTIONAUTO_BILL_UNVALIDATE',1,'1','chaine',0,NULL,'2013-09-08 23:06:08'),(5139,'SOCIETE_ADD_REF_IN_LIST',1,'','yesno',0,'Display customer ref into select list','2013-09-08 23:06:08'),(5150,'PROJECT_TASK_ADDON_PDF',1,'','chaine',0,'Name of PDF/ODT tasks manager class','2013-09-08 23:06:14'),(5151,'PROJECT_TASK_ADDON',1,'mod_task_simple','chaine',0,'Name of Numbering Rule task manager class','2013-09-08 23:06:14'),(5152,'PROJECT_TASK_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/tasks','chaine',0,'','2013-09-08 23:06:14'),(5164,'MAIN_AGENDA_ACTIONAUTO_COMPANY_SENTBYMAIL',1,'1','chaine',0,NULL,'2013-11-06 23:35:12'),(5195,'GOOGLE_DUPLICATE_INTO_THIRDPARTIES',1,'1','chaine',0,'','2013-11-07 00:02:34'),(5196,'GOOGLE_DUPLICATE_INTO_CONTACTS',1,'0','chaine',0,'','2013-11-07 00:02:34'),(5197,'GOOGLE_DUPLICATE_INTO_MEMBERS',1,'0','chaine',0,'','2013-11-07 00:02:34'),(5198,'GOOGLE_CONTACT_LOGIN',1,'eldy10@mail.com','chaine',0,'','2013-11-07 00:02:34'),(5199,'GOOGLE_CONTACT_PASSWORD',1,'bidonge','chaine',0,'','2013-11-07 00:02:34'),(5200,'GOOGLE_TAG_PREFIX',1,'Dolibarr (Thirdparties)','chaine',0,'','2013-11-07 00:02:34'),(5201,'GOOGLE_TAG_PREFIX_CONTACTS',1,'Dolibarr (Contacts/Addresses)','chaine',0,'','2013-11-07 00:02:34'),(5202,'GOOGLE_TAG_PREFIX_MEMBERS',1,'Dolibarr (Members)','chaine',0,'','2013-11-07 00:02:34'),(5235,'MAIN_FEATURES_LEVEL',0,'0','chaine',1,'Level of features to show (0=stable only, 1=stable+experimental, 2=stable+experimental+development','2014-03-02 15:22:27'),(5239,'BOOKMARKS_SHOW_IN_MENU',1,'10','chaine',0,'','2014-03-02 15:42:26'),(5271,'DONATION_ART200',1,'','yesno',0,'Option Française - Eligibilité Art200 du CGI','2014-12-21 12:51:28'),(5272,'DONATION_ART238',1,'','yesno',0,'Option Française - Eligibilité Art238 bis du CGI','2014-12-21 12:51:28'),(5273,'DONATION_ART885',1,'','yesno',0,'Option Française - Eligibilité Art885-0 V bis du CGI','2014-12-21 12:51:28'),(5274,'DONATION_MESSAGE',1,'Thank you','chaine',0,'Message affiché sur le récépissé de versements ou dons','2014-12-21 12:51:28'),(5282,'MAIN_AGENDA_ACTIONAUTO_BILL_SUPPLIER_UNVALIDATE',1,'1','chaine',0,NULL,'2015-07-19 13:41:20'),(5288,'DONATION_ACCOUNTINGACCOUNT',1,'7581','chaine',0,'Compte comptable de remise des versements ou dons','2015-07-19 13:41:21'),(5317,'INVOICE_CAN_ALWAYS_BE_REMOVED',1,'1','chaine',1,'','2015-10-03 09:25:30'),(5338,'MAIN_LANG_DEFAULT',1,'en_US','chaine',0,'','2015-10-03 10:11:33'),(5339,'MAIN_MULTILANGS',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5340,'MAIN_SIZE_LISTE_LIMIT',1,'25','chaine',0,'','2015-10-03 10:11:33'),(5341,'MAIN_DISABLE_JAVASCRIPT',1,'0','chaine',0,'','2015-10-03 10:11:33'),(5342,'MAIN_BUTTON_HIDE_UNAUTHORIZED',1,'0','chaine',0,'','2015-10-03 10:11:33'),(5343,'MAIN_START_WEEK',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5344,'MAIN_DEFAULT_WORKING_DAYS',1,'1-5','chaine',0,'','2015-10-03 10:11:33'),(5345,'MAIN_DEFAULT_WORKING_HOURS',1,'9-18','chaine',0,'','2015-10-03 10:11:33'),(5346,'MAIN_SHOW_LOGO',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5347,'MAIN_FIRSTNAME_NAME_POSITION',1,'0','chaine',0,'','2015-10-03 10:11:33'),(5348,'MAIN_THEME',1,'eldy','chaine',0,'','2015-10-03 10:11:33'),(5349,'MAIN_SEARCHFORM_CONTACT',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5350,'MAIN_SEARCHFORM_SOCIETE',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5351,'MAIN_SEARCHFORM_PRODUITSERVICE',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5352,'MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER',1,'0','chaine',0,'','2015-10-03 10:11:33'),(5353,'MAIN_SEARCHFORM_ADHERENT',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5354,'MAIN_SEARCHFORM_PROJECT',1,'0','chaine',0,'','2015-10-03 10:11:33'),(5355,'MAIN_HELPCENTER_DISABLELINK',0,'1','chaine',0,'','2015-10-03 10:11:33'),(5356,'MAIN_HOME',1,'__(NoteSomeFeaturesAreDisabled)__
\r\n
\r\n__(SomeTranslationAreUncomplete)__
','chaine',0,'','2015-10-03 10:11:33'),(5357,'MAIN_HELP_DISABLELINK',0,'0','chaine',0,'','2015-10-03 10:11:33'),(5358,'MAIN_BUGTRACK_ENABLELINK',1,'0','chaine',0,'','2015-10-03 10:11:33'),(5359,'THEME_ELDY_USE_HOVER',1,'1','chaine',0,'','2015-10-03 10:11:33'),(5394,'FCKEDITOR_ENABLE_DETAILS',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2015-11-04 15:27:44'),(5395,'FCKEDITOR_ENABLE_USERSIGN',1,'1','yesno',0,'WYSIWIG for user signature','2015-11-04 15:27:44'),(5396,'FCKEDITOR_ENABLE_MAIL',1,'1','yesno',0,'WYSIWIG for products details lines for all entities','2015-11-04 15:27:44'),(5398,'CATEGORIE_RECURSIV_ADD',1,'','yesno',0,'Affect parent categories','2015-11-04 15:27:46'),(5403,'MAIN_MODULE_FCKEDITOR',1,'1',NULL,0,NULL,'2015-11-04 15:41:40'),(5404,'MAIN_MODULE_CATEGORIE',1,'1',NULL,0,NULL,'2015-11-04 15:41:43'),(5410,'MAIN_MODULE_PRODUCTBATCH',1,'1',NULL,0,NULL,'2015-11-15 22:38:28'),(5412,'MAIN_MODULE_STOCK',1,'1',NULL,0,NULL,'2015-11-15 22:38:28'),(5414,'MAIN_MODULE_EXPEDITION',1,'1',NULL,0,NULL,'2015-11-15 22:38:28'),(5415,'EXPEDITION_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/shipment','chaine',0,NULL,'2015-11-15 22:38:28'),(5416,'LIVRAISON_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/delivery','chaine',0,NULL,'2015-11-15 22:38:28'),(5419,'MAIN_MODULE_CASHDESK',1,'1',NULL,0,NULL,'2015-11-15 22:38:33'),(5426,'MAIN_MODULE_PROJET',1,'1',NULL,0,NULL,'2015-11-15 22:38:44'),(5427,'PROJECT_ADDON_PDF_ODT_PATH',1,'DOL_DATA_ROOT/doctemplates/projects','chaine',0,NULL,'2015-11-15 22:38:44'),(5428,'PROJECT_USE_OPPORTUNIES',1,'1','chaine',0,NULL,'2015-11-15 22:38:44'),(5430,'MAIN_MODULE_EXPORT',1,'1',NULL,0,NULL,'2015-11-15 22:38:56'),(5431,'MAIN_MODULE_IMPORT',1,'1',NULL,0,NULL,'2015-11-15 22:38:58'),(5432,'MAIN_MODULE_MAILING',1,'1',NULL,0,NULL,'2015-11-15 22:39:00'),(5433,'MAIN_MODULE_EXPENSEREPORT',1,'1',NULL,0,NULL,'2015-11-15 22:39:05'),(5434,'EXPENSEREPORT_ADDON_PDF',1,'standard','chaine',0,'Name of manager to build PDF expense reports documents','2015-11-15 22:39:05'),(5435,'MAIN_MODULE_SALARIES',1,'1',NULL,0,NULL,'2015-11-15 22:39:08'),(5436,'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',1,'421','chaine',0,NULL,'2015-11-15 22:39:08'),(5437,'SALARIES_ACCOUNTING_ACCOUNT_CHARGE',1,'641','chaine',0,NULL,'2015-11-15 22:39:08'),(5440,'MAIN_MODULE_ADHERENT',1,'1',NULL,0,NULL,'2015-11-15 22:39:17'),(5441,'ADHERENT_ETIQUETTE_TEXT',1,'%FULLNAME%\n%ADDRESS%\n%ZIP% %TOWN%\n%COUNTRY%','texte',0,'Text to print on member address sheets','2015-11-15 22:39:17'),(5442,'MAIN_MODULE_TAX',1,'1',NULL,0,NULL,'2015-11-15 22:39:22'),(5443,'MAIN_MODULE_PRELEVEMENT',1,'1',NULL,0,NULL,'2015-11-15 22:39:33'),(5449,'MAIN_MODULE_COMPTABILITE',1,'1',NULL,0,NULL,'2015-11-15 22:39:46'),(5452,'MAIN_MODULE_BANQUE',1,'1',NULL,0,NULL,'2015-11-15 22:39:46'),(5453,'MAIN_MODULE_CONTRAT',1,'1',NULL,0,NULL,'2015-11-15 22:39:52'),(5455,'MAIN_MODULE_FICHEINTER',1,'1',NULL,0,NULL,'2015-11-15 22:39:56'),(5458,'MAIN_MODULE_BOOKMARK',1,'1',NULL,0,NULL,'2015-11-15 22:40:51'),(5459,'MAIN_MODULE_PAYPAL',1,'1',NULL,0,NULL,'2015-11-15 22:41:02'),(5460,'MAIN_MODULE_MARGIN',1,'1',NULL,0,NULL,'2015-11-15 22:41:47'),(5461,'MAIN_MODULE_MARGIN_TABS_0',1,'product:+margin:Margins:margins:$user->rights->margins->liretous:/margin/tabs/productMargins.php?id=__ID__','chaine',0,NULL,'2015-11-15 22:41:47'),(5462,'MAIN_MODULE_MARGIN_TABS_1',1,'thirdparty:+margin:Margins:margins:empty($user->societe_id) && $user->rights->margins->liretous && ($object->client > 0):/margin/tabs/thirdpartyMargins.php?socid=__ID__','chaine',0,NULL,'2015-11-15 22:41:47'),(5463,'MAIN_MODULE_PROPALE',1,'1',NULL,0,NULL,'2015-11-15 22:41:47'),(5465,'MAIN_MODULE_PRODUCT',1,'1',NULL,0,NULL,'2015-11-15 22:41:47'),(5479,'MAIN_VERSION_LAST_UPGRADE',0,'3.8.3','chaine',0,'Dolibarr version for last upgrade','2016-01-10 16:45:35'),(5481,'DISPLAY_MARK_RATES',1,'1','chaine',0,'','2016-01-10 16:46:26'),(5482,'MARGIN_TYPE',1,'1','chaine',0,'','2016-01-10 16:46:30'),(5483,'GENBARCODE_BARCODETYPE_THIRDPARTY',1,'6','chaine',0,'','2016-01-16 15:49:43'),(5484,'PRODUIT_DEFAULT_BARCODE_TYPE',1,'2','chaine',0,'','2016-01-16 15:49:46'),(5539,'PRODUCT_USE_OLD_PATH_FOR_PHOTO',0,'0','chaine',1,'Use old path for products images','2016-01-22 13:34:23'),(5540,'MAIN_SOAP_DEBUG',1,'0','chaine',1,'','2016-01-22 13:34:57'),(5541,'MODULE_GOOGLE_DEBUG',1,'0','chaine',1,'','2016-01-22 13:34:57'),(5543,'MAIN_MAIL_DEBUG',1,'1','chaine',1,'','2016-01-22 13:35:24'),(5544,'MAIN_MODULE_AGENDA',1,'1',NULL,0,NULL,'2016-01-22 17:26:42'),(5545,'MAIN_MODULE_BARCODE',1,'1',NULL,0,NULL,'2016-01-22 17:26:42'),(5546,'MAIN_MODULE_COMMANDE',1,'1',NULL,0,NULL,'2016-01-22 17:26:42'),(5547,'MAIN_MODULE_DON',1,'1',NULL,0,NULL,'2016-01-22 17:26:43'),(5548,'MAIN_MODULE_ECM',1,'1',NULL,0,NULL,'2016-01-22 17:26:43'),(5549,'MAIN_MODULE_FACTURE',1,'1',NULL,0,NULL,'2016-01-22 17:26:43'),(5550,'MAIN_MODULE_FOURNISSEUR',1,'1',NULL,0,NULL,'2016-01-22 17:26:43'),(5551,'MAIN_MODULE_HOLIDAY',1,'1',NULL,0,NULL,'2016-01-22 17:26:43'),(5552,'MAIN_MODULE_HOLIDAY_TABS_0',1,'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->read:/holiday/list.php?mainmenu=holiday&id=__ID__','chaine',0,NULL,'2016-01-22 17:26:43'),(5553,'MAIN_MODULE_OPENSURVEY',1,'1',NULL,0,NULL,'2016-01-22 17:26:43'),(5554,'MAIN_MODULE_SOCIETE',1,'1',NULL,0,NULL,'2016-01-22 17:26:43'),(5555,'MAIN_MODULE_SERVICE',1,'1',NULL,0,NULL,'2016-01-22 17:26:43'),(5560,'MAILING_LIMIT_SENDBYWEB',0,'25','chaine',1,'Number of targets to defined packet size when sending mass email','2016-01-22 17:28:18'),(5561,'SYSLOG_HANDLERS',0,'[\"mod_syslog_file\"]','chaine',0,'Which logger to use','2016-01-22 17:28:18'),(5562,'SYSLOG_FILE',0,'DOL_DATA_ROOT/dolibarr.log','chaine',0,'Directory where to write log file','2016-01-22 17:28:18'),(5568,'MAIN_MAIL_EMAIL_FROM',1,'robot@domain.com','chaine',0,'EMail emetteur pour les emails automatiques Dolibarr','2016-01-22 17:28:18'),(5586,'MAIN_DELAY_EXPENSEREPORTS_TO_PAY',1,'31','chaine',0,'Tolérance de retard avant alerte (en jours) sur les notes de frais impayées','2016-01-22 17:28:18'),(5587,'MAIN_FIX_FOR_BUGGED_MTA',1,'1','chaine',1,'Set constant to fix email ending from PHP with some linux ike system','2016-01-22 17:28:18'),(5589,'MAIN_MODULE_USER',0,'1',NULL,0,NULL,'2016-01-22 17:28:42'),(5590,'MAIN_VERSION_LAST_INSTALL',0,'3.8.3','chaine',0,'Dolibarr version when install','2016-01-22 17:28:42'),(5592,'MAIN_INFO_SOCIETE_COUNTRY',1,'1:FR:France','chaine',0,'','2016-01-22 17:33:49'),(5593,'MAIN_INFO_SOCIETE_NOM',1,'MyBigCompany','chaine',0,'','2016-01-22 17:33:49'),(5594,'MAIN_INFO_SOCIETE_ADDRESS',1,'21 Jump street','chaine',0,'','2016-01-22 17:33:49'),(5595,'MAIN_INFO_SOCIETE_TOWN',1,'MyTown','chaine',0,'','2016-01-22 17:33:49'),(5596,'MAIN_INFO_SOCIETE_ZIP',1,'75500','chaine',0,'','2016-01-22 17:33:49'),(5597,'MAIN_INFO_SOCIETE_STATE',1,'0','chaine',0,'','2016-01-22 17:33:49'),(5598,'MAIN_MONNAIE',1,'EUR','chaine',0,'','2016-01-22 17:33:49'),(5599,'MAIN_INFO_SOCIETE_TEL',1,'09123123','chaine',0,'','2016-01-22 17:33:49'),(5600,'MAIN_INFO_SOCIETE_FAX',1,'09123124','chaine',0,'','2016-01-22 17:33:49'),(5601,'MAIN_INFO_SOCIETE_MAIL',1,'myemail@mybigcompany.com','chaine',0,'','2016-01-22 17:33:49'),(5602,'MAIN_INFO_SOCIETE_WEB',1,'http://www.dolibarr.org','chaine',0,'','2016-01-22 17:33:49'),(5603,'MAIN_INFO_SOCIETE_NOTE',1,'This is note about my company','chaine',0,'','2016-01-22 17:33:49'),(5604,'MAIN_INFO_SOCIETE_LOGO',1,'mybigcompany.png','chaine',0,'','2016-01-22 17:33:49'),(5605,'MAIN_INFO_SOCIETE_LOGO_SMALL',1,'mybigcompany_small.png','chaine',0,'','2016-01-22 17:33:49'),(5606,'MAIN_INFO_SOCIETE_LOGO_MINI',1,'mybigcompany_mini.png','chaine',0,'','2016-01-22 17:33:49'),(5607,'MAIN_INFO_CAPITAL',1,'10000','chaine',0,'','2016-01-22 17:33:49'),(5608,'MAIN_INFO_SOCIETE_FORME_JURIDIQUE',1,'0','chaine',0,'','2016-01-22 17:33:49'),(5609,'MAIN_INFO_TVAINTRA',1,'FR1234567','chaine',0,'','2016-01-22 17:33:49'),(5610,'SOCIETE_FISCAL_MONTH_START',1,'1','chaine',0,'','2016-01-22 17:33:49'),(5611,'FACTURE_TVAOPTION',1,'1','chaine',0,'','2016-01-22 17:33:49'); /*!40000 ALTER TABLE `llx_const` ENABLE KEYS */; UNLOCK TABLES; @@ -3313,7 +3103,8 @@ CREATE TABLE `llx_contrat_extrafields` ( `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `fk_object` int(11) NOT NULL, `import_key` varchar(14) DEFAULT NULL, - PRIMARY KEY (`rowid`) + PRIMARY KEY (`rowid`), + KEY `idx_contrat_extrafields` (`fk_object`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -3614,7 +3405,7 @@ CREATE TABLE `llx_document_model` ( `description` text, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_document_model` (`nom`,`type`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=236 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=269 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3623,63 +3414,10 @@ CREATE TABLE `llx_document_model` ( LOCK TABLES `llx_document_model` WRITE; /*!40000 ALTER TABLE `llx_document_model` DISABLE KEYS */; -INSERT INTO `llx_document_model` VALUES (9,'merou',1,'shipping',NULL,NULL),(15,'fsfe.fr.php',1,'donation',NULL,NULL),(21,'baleine',1,'project',NULL,NULL),(174,'azur',1,'propal',NULL,NULL),(175,'rouget',1,'shipping',NULL,NULL),(176,'typhon',1,'delivery',NULL,NULL),(178,'soleil',1,'ficheinter',NULL,NULL),(181,'generic_invoice_odt',1,'invoice','ODT templates','FACTURE_ADDON_PDF_ODT_PATH'),(193,'canelle2',1,'invoice_supplier','canelle2',NULL),(195,'canelle',1,'invoice_supplier','canelle',NULL),(198,'azur',2,'propal',NULL,NULL),(199,'html_cerfafr',2,'donation',NULL,NULL),(200,'crabe',2,'invoice',NULL,NULL),(201,'generic_odt',1,'company','ODT templates','COMPANY_ADDON_PDF_ODT_PATH'),(232,'einstein',1,'order',NULL,NULL),(233,'html_cerfafr',1,'donation',NULL,NULL),(234,'crabe',1,'invoice',NULL,NULL),(235,'muscadet',1,'order_supplier',NULL,NULL); +INSERT INTO `llx_document_model` VALUES (9,'merou',1,'shipping',NULL,NULL),(15,'fsfe.fr.php',1,'donation',NULL,NULL),(181,'generic_invoice_odt',1,'invoice','ODT templates','FACTURE_ADDON_PDF_ODT_PATH'),(193,'canelle2',1,'invoice_supplier','canelle2',NULL),(195,'canelle',1,'invoice_supplier','canelle',NULL),(198,'azur',2,'propal',NULL,NULL),(199,'html_cerfafr',2,'donation',NULL,NULL),(200,'crabe',2,'invoice',NULL,NULL),(201,'generic_odt',1,'company','ODT templates','COMPANY_ADDON_PDF_ODT_PATH'),(246,'rouget',1,'shipping',NULL,NULL),(247,'typhon',1,'delivery',NULL,NULL),(250,'baleine',1,'project',NULL,NULL),(251,'standard',1,'deplacement',NULL,NULL),(255,'soleil',1,'ficheinter',NULL,NULL),(256,'azur',1,'propal',NULL,NULL),(265,'einstein',1,'order',NULL,NULL),(266,'html_cerfafr',1,'donation',NULL,NULL),(267,'crabe',1,'invoice',NULL,NULL),(268,'muscadet',1,'order_supplier',NULL,NULL); /*!40000 ALTER TABLE `llx_document_model` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_dolicloud_emailstemplates` --- - -DROP TABLE IF EXISTS `llx_dolicloud_emailstemplates`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_dolicloud_emailstemplates` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `emailtype` varchar(128) NOT NULL, - `lang` varchar(12) NOT NULL, - `topic` varchar(256) NOT NULL, - `content` text NOT NULL, - PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_dolicloud_emailstemplates` (`emailtype`,`lang`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_dolicloud_emailstemplates` --- - -LOCK TABLES `llx_dolicloud_emailstemplates` WRITE; -/*!40000 ALTER TABLE `llx_dolicloud_emailstemplates` DISABLE KEYS */; -INSERT INTO `llx_dolicloud_emailstemplates` VALUES (1,'PasswordAssistance','en_US','DoliCloud (online Dolibarr ERP & CRM) - Password assistance: how to reset your password','\n

Dear ${person.firstName},

\n

\n To continue the password reset process for the account ${person.email}\n click on the link below.
\n

\n

${resetPasswordLink}

\n

Note that this process is to reset the password for your dashboard, not for your application login. You may find more information on all different user/password reset process onto the following page.\n

\n

If clicking doesn\'t seem to work, you can copy and paste the link into your browser\'s\n address window, or retype it there. Once you have returned to our site, we will give instructions for resetting your password.

\n

If you did not request to have your password reset you can safely ignore this email.\n It is likely another user entered your email address by mistake while trying to reset a password. Rest assured your customer account is safe.

\n

We will never e-mail you and ask you to disclose or verify your password, credit card, or banking account number. \n If you receive a suspicious e-mail with a link to update your account information,\n do not click on the link - instead, report the e-mail to us for investigation.

\n

\n Sincerly,
\n The DoliCloud Team
\n -----------------------------------------
\n EMail: support@dolicloud.com
\n Web: http://www.dolicloud.com\n

\n '),(2,'InstanceDeployed','en_US','Welcome to DoliCloud (online Dolibarr ERP & CRM) - Your instance is ready',' \n

Hello ${person.firstName},

\n

\n We are delighted to welcome you as a user of DoliCloud, the Ondemand service of Dolibarr ERP & CRM.\n

\n

\n Your ${appPackage.name} is installed, setup and ready for you.\n Here are the details you need to get started:\n

\n
Your Dolibarr ERP & CRM :\n
    \n
  • URL: ${appInstance.url}
  • \n
  • Login: ${appPackage.defaultUser}
  • \n
  • Password: ${appInstance.defaultPassword}
  • \n
\n
Your Dolicloud dashboard :\n \n \n
\n Sincerly,
\n The DoliCloud Team
\n -----------------------------------------
\n EMail: support@dolicloud.com
\n Web: http://www.dolicloud.com\n \n '),(3,'InvoiceFailure','en_US','DoliCloud (online Dolibarr ERP & CRM) - Invoice Payment Failure',' \n

Dear DoliCloud Customer,

\n

\n An attempt to take payment for invoice(s) owed has failed. Please update your payment method, or contact your bank or payment method provider.
\n Should failure to take this payment continue, access to our service will be discontinued, and any data you have with us maybe lost.
\n
\nPlease login to your Dolicloud dashboard to update and fix your credit card or paypal information as soon as possible to prevent any interuptions in service.
\nRemind: Your DoliCloud dashboard login is ${person.email}
\n

\n

\n The error we received from your bank was:
\n ${invoice.notes.collect{ it }.join(\' \')}\n


\n\n Sincerly,
\n The DoliCloud Team
\n -----------------------------------------
\n EMail: support@dolicloud.com
\n Web: http://www.dolicloud.com\n \n '),(4,'CustomerInstanceClosed','en_US','DoliCloud (online Dolibarr ERP & CRM) - Account Closure',' \n

Dear Customer,

\n

\n We wish to inform you your account has now been closed. We are sorry to see you got, but thank you for your custom.\n We hope you will a customer of ours in the future.
\nIf you think this is an error, please contact us at support@dolicloud.com\n


\n Sincerly,
\n The DoliCloud Team
\n -----------------------------------------
\n EMail: support@dolicloud.com
\n Web: http://www.dolicloud.com\n \n '),(5,'CustomerInstanceClosureRequested','en_US','DoliCloud (online Dolibarr ERP & CRM) - Customer Account Closure Requested Confirmation','

Dear Customer,

We are sorry to see you go, and appreciate the custom you have given us.

The closure of your account will be executed at the end of your current trialing or billing period (${customerAccount.nextBillingDate.format(\'dd MMM yyyy\')}). Once the closure is complete your instance and its related data will be destroyed and unretrievable.
If you change your mind before that date you can halt the closure process, and continue being our customer. For this, go to your Dolicloud dashboard.
Remind: Your DoliCloud dashboard login is ${person.email}


Sincerly,
The DoliCloud Team
-----------------------------------------
EMail: support@dolicloud.com
Web: http://www.dolicloud.com '),(6,'CreditCardExpiring','en_US','DoliCloud (online Dolibarr ERP & CRM) - Urgent: Your credit card is expiring',' \n

Dear Customer,

\n

\n We wish to inform you that your payment method will soon expire.
\n \n Please login to your Dolicloud dashboard to update your credit card information as soon as possible to prevent any interuptions in service.
\nRemind: Your DoliCloud dashboard login is ${person.email}
\n

\n

If you have any questions relating to the above please do not hesitate get in touch.

\n
\n\n Sincerly,
\n The DoliCloud Team
\n -----------------------------------------
\n EMail: support@dolicloud.com
\n Web: http://www.dolicloud.com\n \n '),(7,'GentleTrialExpiringReminder','en_US','DoliCloud (online Dolibarr ERP & CRM) - Your Trial will soon expire',' \n

Hello ${person.firstName},

\n

\n Just a quick reminder that trial of your online Dolibarr ERP & CRM will expire soon. If you wish to continue using this service, please login to your DoliCloud console to add a payment method (credit card or paypal accepted).\n

\n

\nFor this, click to go on your DoliCloud dashboard: https://www.on.dolicloud.com/
\nRemind: Your DoliCloud dashboard login is ${person.email}
\n

\n
\n Sincerly,
\n The DoliCloud Team
\n -----------------------------------------
\n EMail: support@dolicloud.com
\n Web: http://www.dolicloud.com\n \n '),(8,'ChannelPartnerCreated','en_US','Channel Partner Created',' \n

Hello ${person.firstName},

\n

\n We are delighted to welcome you as a Channel Partner of ${appProvider.name}.\n

\n

\n Your account has been setup for you.\n Here are the details you need to get started:\n

\n
    \n
  • Login link: ${serverURL}
  • \n
  • Username: ${person.email}
  • \n
  • Temporary Password: ${person.tmpPassword}
  • \n
\n

\n Sincerly,
\n The ${appProvider.name} Team\n

\n \n '),(9,'CustomerAccountSuspended','en_US','DoliCloud (online Dolibarr ERP & CRM) - Account Suspension','\n

Dear Customer,

\n

We wish to inform you your account has been suspended. This is likely due to a payment problem. If you wish to engage with us in addressing this send an email to support@dolicloud.com


\n Sincerly,
\n The DoliCloud Team
\n ==========================================
\n EMail: support@dolicloud.com
\n Web: http://www.dolicloud.com\n \n '),(10,'CustomerInstanceUpdated','en_US','DoliCloud (online Dolibarr ERP & CRM) - Instance upgrade','\n

Dear Customer,

\n

We wish to inform you your instance has been upgraded to last stable version. If you experience problem after this upgrade, you can contact us at support@dolicloud.com


\n Sincerly,
\n The DoliCloud Team
\n ==========================================
\n EMail: support@dolicloud.com
\n Web: http://www.dolicloud.com\n \n '); -/*!40000 ALTER TABLE `llx_dolicloud_emailstemplates` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_domain` --- - -DROP TABLE IF EXISTS `llx_domain`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_domain` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `datec` datetime DEFAULT NULL, - `label` varchar(255) DEFAULT NULL, - `note` text, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_domain` --- - -LOCK TABLES `llx_domain` WRITE; -/*!40000 ALTER TABLE `llx_domain` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_domain` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_don` -- @@ -3793,7 +3531,7 @@ CREATE TABLE `llx_ecm_directories` ( LOCK TABLES `llx_ecm_directories` WRITE; /*!40000 ALTER TABLE `llx_ecm_directories` DISABLE KEYS */; -INSERT INTO `llx_ecm_directories` VALUES (1,'Répertoire_1',1,0,'',1,NULL,NULL,'2010-07-11 16:27:26','2010-07-11 14:27:44',1,NULL,NULL),(2,'dddd',1,0,'',3,NULL,NULL,'2013-02-20 19:11:05','2013-02-20 18:11:05',1,NULL,NULL),(3,'bbb',1,2,'',0,NULL,NULL,'2013-02-20 19:11:05','2013-02-20 18:11:06',1,NULL,NULL),(4,'aaa',1,2,'',1,NULL,NULL,'2013-02-20 19:11:05','2013-02-20 18:11:06',1,NULL,NULL),(5,'gggggg',1,0,'',2,NULL,NULL,'2013-02-20 19:11:05','2013-02-20 18:11:05',1,NULL,NULL),(6,'mmm',1,0,'',0,NULL,NULL,'2013-02-20 19:11:05','2013-02-20 18:11:05',1,NULL,NULL),(7,'aaa',1,0,'',1,NULL,NULL,'2013-02-20 19:11:05','2013-02-20 18:11:05',1,NULL,NULL); +INSERT INTO `llx_ecm_directories` VALUES (1,'Répertoire_1',1,0,'',0,NULL,NULL,'2010-07-11 16:27:26','2016-01-22 16:31:26',1,NULL,NULL),(2,'dddd',1,0,'',0,NULL,NULL,'2013-02-20 19:11:05','2016-01-22 16:31:26',1,NULL,NULL),(3,'bbb',1,2,'',0,NULL,NULL,'2013-02-20 19:11:05','2013-02-20 18:11:06',1,NULL,NULL),(4,'aaa',1,2,'',0,NULL,NULL,'2013-02-20 19:11:05','2016-01-22 16:31:26',1,NULL,NULL),(5,'gggggg',1,0,'',0,NULL,NULL,'2013-02-20 19:11:05','2016-01-22 16:31:26',1,NULL,NULL),(6,'mmm',1,0,'',0,NULL,NULL,'2013-02-20 19:11:05','2013-02-20 18:11:05',1,NULL,NULL),(7,'aaa',1,0,'',0,NULL,NULL,'2013-02-20 19:11:05','2016-01-22 16:31:26',1,NULL,NULL); /*!40000 ALTER TABLE `llx_ecm_directories` ENABLE KEYS */; UNLOCK TABLES; @@ -3887,7 +3625,7 @@ CREATE TABLE `llx_element_element` ( PRIMARY KEY (`rowid`), UNIQUE KEY `idx_element_element_idx1` (`fk_source`,`sourcetype`,`fk_target`,`targettype`), KEY `idx_element_element_fk_target` (`fk_target`) -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -3896,7 +3634,7 @@ CREATE TABLE `llx_element_element` ( LOCK TABLES `llx_element_element` WRITE; /*!40000 ALTER TABLE `llx_element_element` DISABLE KEYS */; -INSERT INTO `llx_element_element` VALUES (7,1,'shipping',154,'facture'),(8,1,'shipping',155,'facture'),(9,1,'shipping',156,'facture'),(1,2,'contrat',2,'facture'),(2,2,'propal',1,'commande'),(3,5,'commande',1,'shipping'),(4,9,'propal',6,'commande'); +INSERT INTO `llx_element_element` VALUES (1,2,'contrat',2,'facture'),(2,2,'propal',1,'commande'),(3,5,'commande',1,'shipping'); /*!40000 ALTER TABLE `llx_element_element` ENABLE KEYS */; UNLOCK TABLES; @@ -3927,35 +3665,6 @@ LOCK TABLES `llx_element_lock` WRITE; /*!40000 ALTER TABLE `llx_element_lock` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_element_rang` --- - -DROP TABLE IF EXISTS `llx_element_rang`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_element_rang` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_parent` int(11) NOT NULL, - `parenttype` varchar(16) NOT NULL, - `fk_child` int(11) NOT NULL, - `childtype` varchar(16) NOT NULL, - `rang` int(11) DEFAULT '0', - PRIMARY KEY (`rowid`), - UNIQUE KEY `idx_element_rang_idx1` (`fk_parent`,`parenttype`,`fk_child`,`childtype`), - KEY `idx_element_rang_fk_parent` (`fk_parent`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_element_rang` --- - -LOCK TABLES `llx_element_rang` WRITE; -/*!40000 ALTER TABLE `llx_element_rang` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_element_rang` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_element_resources` -- @@ -4016,39 +3725,6 @@ LOCK TABLES `llx_element_tag` WRITE; /*!40000 ALTER TABLE `llx_element_tag` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_entity` --- - -DROP TABLE IF EXISTS `llx_entity`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_entity` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `label` varchar(255) NOT NULL, - `description` text, - `datec` datetime DEFAULT NULL, - `fk_user_creat` int(11) DEFAULT NULL, - `options` text, - `visible` tinyint(4) NOT NULL DEFAULT '1', - `active` tinyint(4) NOT NULL DEFAULT '1', - PRIMARY KEY (`rowid`), - KEY `idx_entity_fk_user_creat` (`fk_user_creat`), - CONSTRAINT `fk_entity_fk_user_creat` FOREIGN KEY (`fk_user_creat`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_entity` --- - -LOCK TABLES `llx_entity` WRITE; -/*!40000 ALTER TABLE `llx_entity` DISABLE KEYS */; -INSERT INTO `llx_entity` VALUES (1,'2012-12-08 14:07:29','Master entity','Master entity, can not be deleted','2012-12-08 15:07:29',1,NULL,1,1),(2,'2012-12-08 14:08:27','aaa','','2012-12-08 15:08:14',1,'{\"referent\":null,\"sharings\":{\"product\":null,\"societe\":null,\"category\":null}}',1,1),(3,'2012-12-08 14:08:26','bbb','','2012-12-08 15:08:20',1,'{\"referent\":null,\"sharings\":{\"product\":null,\"societe\":null,\"category\":null}}',1,1); -/*!40000 ALTER TABLE `llx_entity` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_entrepot` -- @@ -4075,7 +3751,7 @@ CREATE TABLE `llx_entrepot` ( `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_entrepot_label` (`label`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4084,7 +3760,7 @@ CREATE TABLE `llx_entrepot` ( LOCK TABLES `llx_entrepot` WRITE; /*!40000 ALTER TABLE `llx_entrepot` DISABLE KEYS */; -INSERT INTO `llx_entrepot` VALUES (1,'2010-07-09 00:31:22','2010-07-08 22:40:36','WAREHOUSEHOUSTON',1,'Warehouse located at Houston','Warehouse houston','','','Houston',NULL,11,1,NULL,1,NULL),(2,'2010-07-09 00:41:03','2010-07-08 22:41:03','WAREHOUSEPARIS',1,'
','Warehouse Paris','','75000','Paris',NULL,1,1,NULL,1,NULL),(3,'2010-07-11 16:18:59','2010-07-11 14:18:59','Stock personnel Dupont',1,'Cet entrepôt représente le stock personnel de Alain Dupont','','','','',NULL,0,1,NULL,1,NULL),(4,'2013-01-23 17:52:27','2013-01-23 16:52:27','Stock personnel aaa',1,'Cet entrepôt représente le stock personnel de aaa','','','','',NULL,81,1,NULL,1,NULL),(5,'2013-01-23 17:52:37','2013-01-23 16:52:37','Stock personnel bbb',1,'Cet entrepôt représente le stock personnel de bbb','','','','',NULL,81,1,NULL,1,NULL),(6,'2013-02-16 20:22:40','2013-02-16 19:22:40','Stock personnel aaab',1,'Cet entrepôt représente le stock personnel de aaab','','','','',NULL,1,1,NULL,1,NULL),(7,'2013-02-16 20:48:15','2013-02-16 19:48:15','Stock personnel zzz',1,'Cet entrepôt représente le stock personnel de zzz','','','','',NULL,1,1,NULL,1,NULL),(8,'2013-02-16 20:50:07','2013-02-16 19:50:07','Stock personnel zzzg',1,'Cet entrepôt représente le stock personnel de zzzg','','','','',NULL,1,1,NULL,1,NULL),(9,'2015-10-03 11:47:41','2015-10-03 09:47:41','Personal stock Marie Curie',1,'This warehouse represents personal stock of Marie Curie','','','','',NULL,1,1,NULL,1,NULL); +INSERT INTO `llx_entrepot` VALUES (1,'2010-07-09 00:31:22','2010-07-08 22:40:36','WAREHOUSEHOUSTON',1,'Warehouse located at Houston','Warehouse houston','','','Houston',NULL,11,1,NULL,1,NULL),(2,'2010-07-09 00:41:03','2010-07-08 22:41:03','WAREHOUSEPARIS',1,'
','Warehouse Paris','','75000','Paris',NULL,1,1,NULL,1,NULL),(3,'2010-07-11 16:18:59','2010-07-11 14:18:59','Stock personnel Dupont',1,'Cet entrepôt représente le stock personnel de Alain Dupont','','','','',NULL,0,1,NULL,1,NULL),(4,'2013-01-23 17:52:27','2013-01-23 16:52:27','Stock personnel aaa',1,'Cet entrepôt représente le stock personnel de aaa','','','','',NULL,81,1,NULL,1,NULL),(5,'2013-01-23 17:52:37','2013-01-23 16:52:37','Stock personnel bbb',1,'Cet entrepôt représente le stock personnel de bbb','','','','',NULL,81,1,NULL,1,NULL),(6,'2013-02-16 20:22:40','2013-02-16 19:22:40','Stock personnel aaab',1,'Cet entrepôt représente le stock personnel de aaab','','','','',NULL,1,1,NULL,1,NULL),(7,'2013-02-16 20:48:15','2013-02-16 19:48:15','Stock personnel zzz',1,'Cet entrepôt représente le stock personnel de zzz','','','','',NULL,1,1,NULL,1,NULL),(8,'2013-02-16 20:50:07','2013-02-16 19:50:07','Stock personnel zzzg',1,'Cet entrepôt représente le stock personnel de zzzg','','','','',NULL,1,1,NULL,1,NULL),(9,'2015-10-03 11:47:41','2015-10-03 09:47:41','Personal stock Marie Curie',1,'This warehouse represents personal stock of Marie Curie','','','','',NULL,1,1,NULL,1,NULL),(10,'2015-10-05 09:07:52','2015-10-05 07:07:52','Personal stock Alex Theceo',1,'This warehouse represents personal stock of Alex Theceo','','','','',NULL,1,1,NULL,1,NULL),(11,'2015-10-05 09:09:46','2015-10-05 07:09:46','Personal stock Alice theceo',1,'This warehouse represents personal stock of Alice theceo','','','','',NULL,1,1,NULL,1,NULL),(12,'2015-10-05 21:29:35','2015-10-05 19:29:35','Personal stock Charly Commery',1,'This warehouse represents personal stock of Charly Commery','','','','',NULL,1,1,NULL,11,NULL),(13,'2015-10-05 21:33:33','2015-10-05 19:33:33','Personal stock Sam Scientol',1,'This warehouse represents personal stock of Sam Scientol','','','','',NULL,1,1,NULL,11,NULL),(14,'2015-10-05 21:45:43','2015-10-05 19:45:43','Personal stock aaa',1,'This warehouse represents personal stock of aaa','','','','',NULL,1,1,NULL,12,NULL),(15,'2015-10-05 22:47:52','2015-10-05 20:47:52','Personal stock cc1',1,'This warehouse represents personal stock of cc1','','','','',NULL,1,1,NULL,12,NULL),(16,'2015-10-05 22:48:39','2015-10-05 20:48:39','Personal stock cc2',1,'This warehouse represents personal stock of cc2','','','','',NULL,1,1,NULL,11,NULL),(17,'2015-10-05 23:13:00','2015-10-05 21:13:00','Personal stock aaa aaa',1,'This warehouse represents personal stock of aaa aaa','','','','',NULL,1,1,NULL,12,NULL),(18,'2016-01-22 17:27:02','2016-01-22 16:27:02','Personal stock Laurent Destailleur',1,'This warehouse represents personal stock of Laurent Destailleur','','','','',NULL,1,1,NULL,12,NULL); /*!40000 ALTER TABLE `llx_entrepot` ENABLE KEYS */; UNLOCK TABLES; @@ -4133,7 +3809,7 @@ CREATE TABLE `llx_events` ( `fk_object` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), KEY `idx_events_dateevent` (`dateevent`) -) ENGINE=InnoDB AUTO_INCREMENT=591 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=741 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4142,7 +3818,7 @@ CREATE TABLE `llx_events` ( LOCK TABLES `llx_events` WRITE; /*!40000 ALTER TABLE `llx_events` DISABLE KEYS */; -INSERT INTO `llx_events` VALUES (30,'2011-07-18 18:23:06','USER_LOGOUT',1,'2011-07-18 20:23:06',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(31,'2011-07-18 18:23:12','USER_LOGIN_FAILED',1,'2011-07-18 20:23:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(32,'2011-07-18 18:23:17','USER_LOGIN',1,'2011-07-18 20:23:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(33,'2011-07-18 20:10:51','USER_LOGIN_FAILED',1,'2011-07-18 22:10:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(34,'2011-07-18 20:10:55','USER_LOGIN',1,'2011-07-18 22:10:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(35,'2011-07-18 21:18:57','USER_LOGIN',1,'2011-07-18 23:18:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(36,'2011-07-20 10:34:10','USER_LOGIN',1,'2011-07-20 12:34:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(37,'2011-07-20 12:36:44','USER_LOGIN',1,'2011-07-20 14:36:44',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(38,'2011-07-20 13:20:51','USER_LOGIN_FAILED',1,'2011-07-20 15:20:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(39,'2011-07-20 13:20:54','USER_LOGIN',1,'2011-07-20 15:20:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(40,'2011-07-20 15:03:46','USER_LOGIN_FAILED',1,'2011-07-20 17:03:46',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(41,'2011-07-20 15:03:55','USER_LOGIN',1,'2011-07-20 17:03:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(42,'2011-07-20 18:05:05','USER_LOGIN_FAILED',1,'2011-07-20 20:05:05',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(43,'2011-07-20 18:05:08','USER_LOGIN',1,'2011-07-20 20:05:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(44,'2011-07-20 21:08:53','USER_LOGIN_FAILED',1,'2011-07-20 23:08:53',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(45,'2011-07-20 21:08:56','USER_LOGIN',1,'2011-07-20 23:08:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(46,'2011-07-21 01:26:12','USER_LOGIN',1,'2011-07-21 03:26:12',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(47,'2011-07-21 22:35:45','USER_LOGIN_FAILED',1,'2011-07-22 00:35:45',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(48,'2011-07-21 22:35:49','USER_LOGIN',1,'2011-07-22 00:35:49',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(49,'2011-07-26 23:09:47','USER_LOGIN_FAILED',1,'2011-07-27 01:09:47',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(50,'2011-07-26 23:09:50','USER_LOGIN',1,'2011-07-27 01:09:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(51,'2011-07-27 17:02:27','USER_LOGIN_FAILED',1,'2011-07-27 19:02:27',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(52,'2011-07-27 17:02:32','USER_LOGIN',1,'2011-07-27 19:02:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(53,'2011-07-27 23:33:37','USER_LOGIN_FAILED',1,'2011-07-28 01:33:37',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(54,'2011-07-27 23:33:41','USER_LOGIN',1,'2011-07-28 01:33:41',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(55,'2011-07-28 18:20:36','USER_LOGIN_FAILED',1,'2011-07-28 20:20:36',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(56,'2011-07-28 18:20:38','USER_LOGIN',1,'2011-07-28 20:20:38',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(57,'2011-07-28 20:13:30','USER_LOGIN_FAILED',1,'2011-07-28 22:13:30',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(58,'2011-07-28 20:13:34','USER_LOGIN',1,'2011-07-28 22:13:34',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(59,'2011-07-28 20:22:51','USER_LOGIN',1,'2011-07-28 22:22:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(60,'2011-07-28 23:05:06','USER_LOGIN',1,'2011-07-29 01:05:06',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(61,'2011-07-29 20:15:50','USER_LOGIN_FAILED',1,'2011-07-29 22:15:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(62,'2011-07-29 20:15:53','USER_LOGIN',1,'2011-07-29 22:15:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(68,'2011-07-29 20:51:01','USER_LOGOUT',1,'2011-07-29 22:51:01',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(69,'2011-07-29 20:51:05','USER_LOGIN',1,'2011-07-29 22:51:05',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(70,'2011-07-30 08:46:20','USER_LOGIN_FAILED',1,'2011-07-30 10:46:20',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(71,'2011-07-30 08:46:38','USER_LOGIN_FAILED',1,'2011-07-30 10:46:38',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(72,'2011-07-30 08:46:42','USER_LOGIN',1,'2011-07-30 10:46:42',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(73,'2011-07-30 10:05:12','USER_LOGIN_FAILED',1,'2011-07-30 12:05:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(74,'2011-07-30 10:05:15','USER_LOGIN',1,'2011-07-30 12:05:15',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(75,'2011-07-30 12:15:46','USER_LOGIN',1,'2011-07-30 14:15:46',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(76,'2011-07-31 22:19:30','USER_LOGIN',1,'2011-08-01 00:19:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(77,'2011-07-31 23:32:52','USER_LOGIN',1,'2011-08-01 01:32:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(78,'2011-08-01 01:24:50','USER_LOGIN_FAILED',1,'2011-08-01 03:24:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(79,'2011-08-01 01:24:54','USER_LOGIN',1,'2011-08-01 03:24:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(80,'2011-08-01 19:31:36','USER_LOGIN_FAILED',1,'2011-08-01 21:31:35',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(81,'2011-08-01 19:31:39','USER_LOGIN',1,'2011-08-01 21:31:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(82,'2011-08-01 20:01:36','USER_LOGIN',1,'2011-08-01 22:01:36',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(83,'2011-08-01 20:52:54','USER_LOGIN_FAILED',1,'2011-08-01 22:52:54',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(84,'2011-08-01 20:52:58','USER_LOGIN',1,'2011-08-01 22:52:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(85,'2011-08-01 21:17:28','USER_LOGIN_FAILED',1,'2011-08-01 23:17:28',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(86,'2011-08-01 21:17:31','USER_LOGIN',1,'2011-08-01 23:17:31',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(87,'2011-08-04 11:55:17','USER_LOGIN',1,'2011-08-04 13:55:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(88,'2011-08-04 20:19:03','USER_LOGIN_FAILED',1,'2011-08-04 22:19:03',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(89,'2011-08-04 20:19:07','USER_LOGIN',1,'2011-08-04 22:19:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(90,'2011-08-05 17:51:42','USER_LOGIN_FAILED',1,'2011-08-05 19:51:42',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(91,'2011-08-05 17:51:47','USER_LOGIN',1,'2011-08-05 19:51:47',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(92,'2011-08-05 17:56:03','USER_LOGIN',1,'2011-08-05 19:56:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(93,'2011-08-05 17:59:10','USER_LOGIN',1,'2011-08-05 19:59:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL),(94,'2011-08-05 18:01:58','USER_LOGIN',1,'2011-08-05 20:01:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL),(95,'2011-08-05 19:59:56','USER_LOGIN',1,'2011-08-05 21:59:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(96,'2011-08-06 18:33:22','USER_LOGIN',1,'2011-08-06 20:33:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(97,'2011-08-07 00:56:59','USER_LOGIN',1,'2011-08-07 02:56:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(98,'2011-08-07 22:49:14','USER_LOGIN',1,'2011-08-08 00:49:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(99,'2011-08-07 23:05:18','USER_LOGOUT',1,'2011-08-08 01:05:18',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(105,'2011-08-08 00:41:09','USER_LOGIN',1,'2011-08-08 02:41:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(106,'2011-08-08 11:58:55','USER_LOGIN',1,'2011-08-08 13:58:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(107,'2011-08-08 14:35:48','USER_LOGIN',1,'2011-08-08 16:35:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(108,'2011-08-08 14:36:31','USER_LOGOUT',1,'2011-08-08 16:36:31',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(109,'2011-08-08 14:38:28','USER_LOGIN',1,'2011-08-08 16:38:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(110,'2011-08-08 14:39:02','USER_LOGOUT',1,'2011-08-08 16:39:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(111,'2011-08-08 14:39:10','USER_LOGIN',1,'2011-08-08 16:39:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(112,'2011-08-08 14:39:28','USER_LOGOUT',1,'2011-08-08 16:39:28',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(113,'2011-08-08 14:39:37','USER_LOGIN',1,'2011-08-08 16:39:37',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(114,'2011-08-08 14:50:02','USER_LOGOUT',1,'2011-08-08 16:50:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(115,'2011-08-08 14:51:45','USER_LOGIN_FAILED',1,'2011-08-08 16:51:45',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(116,'2011-08-08 14:51:52','USER_LOGIN',1,'2011-08-08 16:51:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(117,'2011-08-08 15:09:54','USER_LOGOUT',1,'2011-08-08 17:09:54',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(118,'2011-08-08 15:10:19','USER_LOGIN_FAILED',1,'2011-08-08 17:10:19',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(119,'2011-08-08 15:10:28','USER_LOGIN',1,'2011-08-08 17:10:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(121,'2011-08-08 15:14:58','USER_LOGOUT',1,'2011-08-08 17:14:58',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(122,'2011-08-08 15:15:00','USER_LOGIN_FAILED',1,'2011-08-08 17:15:00',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(123,'2011-08-08 15:17:57','USER_LOGIN',1,'2011-08-08 17:17:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(124,'2011-08-08 15:35:56','USER_LOGOUT',1,'2011-08-08 17:35:56',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(125,'2011-08-08 15:36:05','USER_LOGIN',1,'2011-08-08 17:36:05',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(126,'2011-08-08 17:32:42','USER_LOGIN',1,'2011-08-08 19:32:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(127,'2012-12-08 13:49:37','USER_LOGOUT',1,'2012-12-08 14:49:37',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(128,'2012-12-08 13:49:42','USER_LOGIN',1,'2012-12-08 14:49:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(129,'2012-12-08 13:50:12','USER_LOGOUT',1,'2012-12-08 14:50:12',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(130,'2012-12-08 13:50:14','USER_LOGIN',1,'2012-12-08 14:50:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(131,'2012-12-08 13:50:17','USER_LOGOUT',1,'2012-12-08 14:50:17',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(132,'2012-12-08 13:52:47','USER_LOGIN',1,'2012-12-08 14:52:47',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(133,'2012-12-08 13:53:08','USER_MODIFY',1,'2012-12-08 14:53:08',1,'User admin modified','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(134,'2012-12-08 14:08:45','USER_LOGOUT',1,'2012-12-08 15:08:45',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(135,'2012-12-08 14:09:09','USER_LOGIN',1,'2012-12-08 15:09:09',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(136,'2012-12-08 14:11:43','USER_LOGOUT',1,'2012-12-08 15:11:43',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(137,'2012-12-08 14:11:45','USER_LOGIN',1,'2012-12-08 15:11:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(138,'2012-12-08 14:22:53','USER_LOGOUT',1,'2012-12-08 15:22:53',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(139,'2012-12-08 14:22:54','USER_LOGIN',1,'2012-12-08 15:22:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(140,'2012-12-08 14:23:10','USER_LOGOUT',1,'2012-12-08 15:23:10',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(141,'2012-12-08 14:23:11','USER_LOGIN',1,'2012-12-08 15:23:11',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(142,'2012-12-08 14:23:49','USER_LOGOUT',1,'2012-12-08 15:23:49',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(143,'2012-12-08 14:23:50','USER_LOGIN',1,'2012-12-08 15:23:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(144,'2012-12-08 14:28:08','USER_LOGOUT',1,'2012-12-08 15:28:08',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(145,'2012-12-08 14:35:15','USER_LOGIN',1,'2012-12-08 15:35:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(146,'2012-12-08 14:35:18','USER_LOGOUT',1,'2012-12-08 15:35:18',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(147,'2012-12-08 14:36:07','USER_LOGIN',1,'2012-12-08 15:36:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(148,'2012-12-08 14:36:09','USER_LOGOUT',1,'2012-12-08 15:36:09',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(149,'2012-12-08 14:36:41','USER_LOGIN',1,'2012-12-08 15:36:41',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(150,'2012-12-08 15:59:13','USER_LOGIN',1,'2012-12-08 16:59:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(151,'2012-12-09 11:49:52','USER_LOGIN',1,'2012-12-09 12:49:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(152,'2012-12-09 13:46:31','USER_LOGIN',1,'2012-12-09 14:46:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(153,'2012-12-09 19:03:14','USER_LOGIN',1,'2012-12-09 20:03:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(154,'2012-12-10 00:16:31','USER_LOGIN',1,'2012-12-10 01:16:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(170,'2012-12-11 22:03:31','USER_LOGIN',1,'2012-12-11 23:03:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(171,'2012-12-12 00:32:39','USER_LOGIN',1,'2012-12-12 01:32:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(172,'2012-12-12 10:49:59','USER_LOGIN',1,'2012-12-12 11:49:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(175,'2012-12-12 10:57:40','USER_MODIFY',1,'2012-12-12 11:57:40',1,'Modification utilisateur admin','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(176,'2012-12-12 13:29:15','USER_LOGIN',1,'2012-12-12 14:29:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(177,'2012-12-12 13:30:15','USER_LOGIN',1,'2012-12-12 14:30:15',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(178,'2012-12-12 13:40:08','USER_LOGOUT',1,'2012-12-12 14:40:08',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(179,'2012-12-12 13:40:10','USER_LOGIN',1,'2012-12-12 14:40:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(180,'2012-12-12 13:40:26','USER_MODIFY',1,'2012-12-12 14:40:26',1,'Modification utilisateur admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(181,'2012-12-12 13:40:34','USER_LOGOUT',1,'2012-12-12 14:40:34',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(182,'2012-12-12 13:42:23','USER_LOGIN',1,'2012-12-12 14:42:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(183,'2012-12-12 13:43:02','USER_NEW_PASSWORD',1,'2012-12-12 14:43:02',NULL,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(184,'2012-12-12 13:43:25','USER_LOGOUT',1,'2012-12-12 14:43:25',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(185,'2012-12-12 13:43:27','USER_LOGIN_FAILED',1,'2012-12-12 14:43:27',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(186,'2012-12-12 13:43:30','USER_LOGIN',1,'2012-12-12 14:43:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(187,'2012-12-12 14:52:11','USER_LOGIN',1,'2012-12-12 15:52:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(188,'2012-12-12 17:53:00','USER_LOGIN_FAILED',1,'2012-12-12 18:53:00',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(189,'2012-12-12 17:53:07','USER_LOGIN_FAILED',1,'2012-12-12 18:53:07',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(190,'2012-12-12 17:53:51','USER_NEW_PASSWORD',1,'2012-12-12 18:53:51',NULL,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(191,'2012-12-12 17:54:00','USER_LOGIN',1,'2012-12-12 18:54:00',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(192,'2012-12-12 17:54:10','USER_NEW_PASSWORD',1,'2012-12-12 18:54:10',1,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(193,'2012-12-12 17:54:10','USER_MODIFY',1,'2012-12-12 18:54:10',1,'Modification utilisateur admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(194,'2012-12-12 18:57:09','USER_LOGIN',1,'2012-12-12 19:57:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(195,'2012-12-12 23:04:08','USER_LOGIN',1,'2012-12-13 00:04:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(196,'2012-12-17 20:03:14','USER_LOGIN',1,'2012-12-17 21:03:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(197,'2012-12-17 21:18:45','USER_LOGIN',1,'2012-12-17 22:18:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(198,'2012-12-17 22:30:08','USER_LOGIN',1,'2012-12-17 23:30:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(199,'2012-12-18 23:32:03','USER_LOGIN',1,'2012-12-19 00:32:03',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(200,'2012-12-19 09:38:03','USER_LOGIN',1,'2012-12-19 10:38:03',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(201,'2012-12-19 11:23:35','USER_LOGIN',1,'2012-12-19 12:23:35',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(202,'2012-12-19 12:46:22','USER_LOGIN',1,'2012-12-19 13:46:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(214,'2012-12-19 19:11:31','USER_LOGIN',1,'2012-12-19 20:11:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(215,'2012-12-21 16:36:57','USER_LOGIN',1,'2012-12-21 17:36:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(216,'2012-12-21 16:38:43','USER_NEW_PASSWORD',1,'2012-12-21 17:38:43',1,'Changement mot de passe de adupont','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(217,'2012-12-21 16:38:43','USER_MODIFY',1,'2012-12-21 17:38:43',1,'Modification utilisateur adupont','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(218,'2012-12-21 16:38:51','USER_LOGOUT',1,'2012-12-21 17:38:51',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(219,'2012-12-21 16:38:55','USER_LOGIN',1,'2012-12-21 17:38:55',3,'(UserLogged,adupont)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(220,'2012-12-21 16:48:18','USER_LOGOUT',1,'2012-12-21 17:48:18',3,'(UserLogoff,adupont)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(221,'2012-12-21 16:48:20','USER_LOGIN',1,'2012-12-21 17:48:20',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(222,'2012-12-26 18:28:18','USER_LOGIN',1,'2012-12-26 19:28:18',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(223,'2012-12-26 20:00:24','USER_LOGIN',1,'2012-12-26 21:00:24',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(224,'2012-12-27 01:10:27','USER_LOGIN',1,'2012-12-27 02:10:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(225,'2012-12-28 19:12:08','USER_LOGIN',1,'2012-12-28 20:12:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(226,'2012-12-28 20:16:58','USER_LOGIN',1,'2012-12-28 21:16:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(227,'2012-12-29 14:35:46','USER_LOGIN',1,'2012-12-29 15:35:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(228,'2012-12-29 14:37:59','USER_LOGOUT',1,'2012-12-29 15:37:59',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(229,'2012-12-29 14:38:00','USER_LOGIN',1,'2012-12-29 15:38:00',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(230,'2012-12-29 17:16:48','USER_LOGIN',1,'2012-12-29 18:16:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(231,'2012-12-31 12:02:59','USER_LOGIN',1,'2012-12-31 13:02:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(232,'2013-01-02 20:32:51','USER_LOGIN',1,'2013-01-02 21:32:51',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0',NULL),(233,'2013-01-02 20:58:59','USER_LOGIN',1,'2013-01-02 21:58:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(234,'2013-01-03 09:25:07','USER_LOGIN',1,'2013-01-03 10:25:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(235,'2013-01-03 19:39:31','USER_LOGIN',1,'2013-01-03 20:39:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(236,'2013-01-04 22:40:19','USER_LOGIN',1,'2013-01-04 23:40:19',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(237,'2013-01-05 12:59:59','USER_LOGIN',1,'2013-01-05 13:59:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(238,'2013-01-05 15:28:52','USER_LOGIN',1,'2013-01-05 16:28:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(239,'2013-01-05 17:02:08','USER_LOGIN',1,'2013-01-05 18:02:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(240,'2013-01-06 12:13:33','USER_LOGIN',1,'2013-01-06 13:13:33',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(241,'2013-01-07 01:21:15','USER_LOGIN',1,'2013-01-07 02:21:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(242,'2013-01-07 01:46:31','USER_LOGOUT',1,'2013-01-07 02:46:31',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(243,'2013-01-07 19:54:50','USER_LOGIN',1,'2013-01-07 20:54:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(244,'2013-01-08 21:55:01','USER_LOGIN',1,'2013-01-08 22:55:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(245,'2013-01-09 11:13:28','USER_LOGIN',1,'2013-01-09 12:13:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(246,'2013-01-10 18:30:46','USER_LOGIN',1,'2013-01-10 19:30:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(247,'2013-01-11 18:03:26','USER_LOGIN',1,'2013-01-11 19:03:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(248,'2013-01-12 11:15:04','USER_LOGIN',1,'2013-01-12 12:15:04',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(249,'2013-01-12 14:42:44','USER_LOGIN',1,'2013-01-12 15:42:44',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(250,'2013-01-13 12:07:17','USER_LOGIN',1,'2013-01-13 13:07:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(251,'2013-01-13 17:37:58','USER_LOGIN',1,'2013-01-13 18:37:58',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(252,'2013-01-13 19:24:21','USER_LOGIN',1,'2013-01-13 20:24:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(253,'2013-01-13 19:29:19','USER_LOGOUT',1,'2013-01-13 20:29:19',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(254,'2013-01-13 21:39:39','USER_LOGIN',1,'2013-01-13 22:39:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(255,'2013-01-14 00:52:21','USER_LOGIN',1,'2013-01-14 01:52:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(256,'2013-01-16 11:34:31','USER_LOGIN',1,'2013-01-16 12:34:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(257,'2013-01-16 15:36:21','USER_LOGIN',1,'2013-01-16 16:36:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(258,'2013-01-16 19:17:36','USER_LOGIN',1,'2013-01-16 20:17:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(259,'2013-01-16 19:48:08','GROUP_CREATE',1,'2013-01-16 20:48:08',1,'Création groupe ggg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(260,'2013-01-16 21:48:53','USER_LOGIN',1,'2013-01-16 22:48:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(261,'2013-01-17 19:55:53','USER_LOGIN',1,'2013-01-17 20:55:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(262,'2013-01-18 09:48:01','USER_LOGIN',1,'2013-01-18 10:48:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(263,'2013-01-18 13:22:36','USER_LOGIN',1,'2013-01-18 14:22:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(264,'2013-01-18 16:10:23','USER_LOGIN',1,'2013-01-18 17:10:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(265,'2013-01-18 17:41:40','USER_LOGIN',1,'2013-01-18 18:41:40',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(266,'2013-01-19 14:33:48','USER_LOGIN',1,'2013-01-19 15:33:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(267,'2013-01-19 16:47:43','USER_LOGIN',1,'2013-01-19 17:47:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(268,'2013-01-19 16:59:43','USER_LOGIN',1,'2013-01-19 17:59:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(269,'2013-01-19 17:00:22','USER_LOGIN',1,'2013-01-19 18:00:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(270,'2013-01-19 17:04:16','USER_LOGOUT',1,'2013-01-19 18:04:16',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(271,'2013-01-19 17:04:18','USER_LOGIN',1,'2013-01-19 18:04:18',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(272,'2013-01-20 00:34:19','USER_LOGIN',1,'2013-01-20 01:34:19',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(273,'2013-01-21 11:54:17','USER_LOGIN',1,'2013-01-21 12:54:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(274,'2013-01-21 13:48:15','USER_LOGIN',1,'2013-01-21 14:48:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(275,'2013-01-21 14:30:22','USER_LOGIN',1,'2013-01-21 15:30:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(276,'2013-01-21 15:10:46','USER_LOGIN',1,'2013-01-21 16:10:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(277,'2013-01-21 17:27:43','USER_LOGIN',1,'2013-01-21 18:27:43',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(278,'2013-01-21 21:48:15','USER_LOGIN',1,'2013-01-21 22:48:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(279,'2013-01-21 21:50:42','USER_LOGIN',1,'2013-01-21 22:50:42',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(280,'2013-01-23 09:28:26','USER_LOGIN',1,'2013-01-23 10:28:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(281,'2013-01-23 13:21:57','USER_LOGIN',1,'2013-01-23 14:21:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(282,'2013-01-23 16:52:00','USER_LOGOUT',1,'2013-01-23 17:52:00',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(283,'2013-01-23 16:52:05','USER_LOGIN_FAILED',1,'2013-01-23 17:52:05',NULL,'Bad value for login or password - login=bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(284,'2013-01-23 16:52:09','USER_LOGIN',1,'2013-01-23 17:52:09',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(285,'2013-01-23 16:52:27','USER_CREATE',1,'2013-01-23 17:52:27',1,'Création utilisateur aaa','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(286,'2013-01-23 16:52:27','USER_NEW_PASSWORD',1,'2013-01-23 17:52:27',1,'Changement mot de passe de aaa','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(287,'2013-01-23 16:52:37','USER_CREATE',1,'2013-01-23 17:52:37',1,'Création utilisateur bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(288,'2013-01-23 16:52:37','USER_NEW_PASSWORD',1,'2013-01-23 17:52:37',1,'Changement mot de passe de bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(289,'2013-01-23 16:53:15','USER_LOGOUT',1,'2013-01-23 17:53:15',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(290,'2013-01-23 16:53:20','USER_LOGIN',1,'2013-01-23 17:53:20',4,'(UserLogged,aaa)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(291,'2013-01-23 19:16:58','USER_LOGIN',1,'2013-01-23 20:16:58',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(292,'2013-01-26 10:54:07','USER_LOGIN',1,'2013-01-26 11:54:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(293,'2013-01-29 10:15:36','USER_LOGIN',1,'2013-01-29 11:15:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(294,'2013-01-30 17:42:50','USER_LOGIN',1,'2013-01-30 18:42:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(295,'2013-02-01 08:49:55','USER_LOGIN',1,'2013-02-01 09:49:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(296,'2013-02-01 08:51:57','USER_LOGOUT',1,'2013-02-01 09:51:57',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(297,'2013-02-01 08:52:39','USER_LOGIN',1,'2013-02-01 09:52:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(298,'2013-02-01 21:03:01','USER_LOGIN',1,'2013-02-01 22:03:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(299,'2013-02-10 19:48:39','USER_LOGIN',1,'2013-02-10 20:48:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(300,'2013-02-10 20:46:48','USER_LOGIN',1,'2013-02-10 21:46:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(301,'2013-02-10 21:39:23','USER_LOGIN',1,'2013-02-10 22:39:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(302,'2013-02-11 19:00:13','USER_LOGIN',1,'2013-02-11 20:00:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(303,'2013-02-11 19:43:44','USER_LOGIN_FAILED',1,'2013-02-11 20:43:44',NULL,'Unknown column \'u.fk_user\' in \'field list\'','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(304,'2013-02-11 19:44:01','USER_LOGIN',1,'2013-02-11 20:44:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(305,'2013-02-12 00:27:35','USER_LOGIN',1,'2013-02-12 01:27:35',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(306,'2013-02-12 00:27:38','USER_LOGOUT',1,'2013-02-12 01:27:38',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(307,'2013-02-12 00:28:07','USER_LOGIN',1,'2013-02-12 01:28:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(308,'2013-02-12 00:28:09','USER_LOGOUT',1,'2013-02-12 01:28:09',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(309,'2013-02-12 00:28:26','USER_LOGIN',1,'2013-02-12 01:28:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(310,'2013-02-12 00:28:30','USER_LOGOUT',1,'2013-02-12 01:28:30',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(311,'2013-02-12 12:42:15','USER_LOGIN',1,'2013-02-12 13:42:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(312,'2013-02-12 13:46:16','USER_LOGIN',1,'2013-02-12 14:46:16',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(313,'2013-02-12 14:54:28','USER_LOGIN',1,'2013-02-12 15:54:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(314,'2013-02-12 16:04:46','USER_LOGIN',1,'2013-02-12 17:04:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(315,'2013-02-13 14:02:43','USER_LOGIN',1,'2013-02-13 15:02:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(316,'2013-02-13 14:48:30','USER_LOGIN',1,'2013-02-13 15:48:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(317,'2013-02-13 17:44:53','USER_LOGIN',1,'2013-02-13 18:44:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(318,'2013-02-15 08:44:36','USER_LOGIN',1,'2013-02-15 09:44:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(319,'2013-02-15 08:53:20','USER_LOGIN',1,'2013-02-15 09:53:20',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(320,'2013-02-16 19:10:28','USER_LOGIN',1,'2013-02-16 20:10:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(321,'2013-02-16 19:22:40','USER_CREATE',1,'2013-02-16 20:22:40',1,'Création utilisateur aaab','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(322,'2013-02-16 19:22:40','USER_NEW_PASSWORD',1,'2013-02-16 20:22:40',1,'Changement mot de passe de aaab','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(323,'2013-02-16 19:48:15','USER_CREATE',1,'2013-02-16 20:48:15',1,'Création utilisateur zzz','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(324,'2013-02-16 19:48:15','USER_NEW_PASSWORD',1,'2013-02-16 20:48:15',1,'Changement mot de passe de zzz','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(325,'2013-02-16 19:50:08','USER_CREATE',1,'2013-02-16 20:50:08',1,'Création utilisateur zzzg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(326,'2013-02-16 19:50:08','USER_NEW_PASSWORD',1,'2013-02-16 20:50:08',1,'Changement mot de passe de zzzg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(327,'2013-02-16 21:20:03','USER_LOGIN',1,'2013-02-16 22:20:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(328,'2013-02-17 14:30:51','USER_LOGIN',1,'2013-02-17 15:30:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(329,'2013-02-17 17:21:22','USER_LOGIN',1,'2013-02-17 18:21:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(330,'2013-02-17 17:48:43','USER_MODIFY',1,'2013-02-17 18:48:43',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(331,'2013-02-17 17:48:47','USER_MODIFY',1,'2013-02-17 18:48:47',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(332,'2013-02-17 17:48:51','USER_MODIFY',1,'2013-02-17 18:48:51',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(333,'2013-02-17 17:48:56','USER_MODIFY',1,'2013-02-17 18:48:56',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(334,'2013-02-18 22:00:01','USER_LOGIN',1,'2013-02-18 23:00:01',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(335,'2013-02-19 08:19:52','USER_LOGIN',1,'2013-02-19 09:19:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(336,'2013-02-19 22:00:52','USER_LOGIN',1,'2013-02-19 23:00:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(337,'2013-02-20 09:34:52','USER_LOGIN',1,'2013-02-20 10:34:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(338,'2013-02-20 13:12:28','USER_LOGIN',1,'2013-02-20 14:12:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(339,'2013-02-20 17:19:44','USER_LOGIN',1,'2013-02-20 18:19:44',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(340,'2013-02-20 19:07:21','USER_MODIFY',1,'2013-02-20 20:07:21',1,'Modification utilisateur adupont','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(341,'2013-02-20 19:47:17','USER_LOGIN',1,'2013-02-20 20:47:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(342,'2013-02-20 19:48:01','USER_MODIFY',1,'2013-02-20 20:48:01',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(343,'2013-02-21 08:27:07','USER_LOGIN',1,'2013-02-21 09:27:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(344,'2013-02-23 13:34:13','USER_LOGIN',1,'2013-02-23 14:34:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(345,'2013-02-24 01:06:41','USER_LOGIN_FAILED',1,'2013-02-24 02:06:41',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(346,'2013-02-24 01:06:45','USER_LOGIN_FAILED',1,'2013-02-24 02:06:45',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(347,'2013-02-24 01:06:55','USER_LOGIN_FAILED',1,'2013-02-24 02:06:55',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(348,'2013-02-24 01:07:03','USER_LOGIN_FAILED',1,'2013-02-24 02:07:03',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(349,'2013-02-24 01:07:21','USER_LOGIN_FAILED',1,'2013-02-24 02:07:21',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(350,'2013-02-24 01:08:12','USER_LOGIN_FAILED',1,'2013-02-24 02:08:12',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(351,'2013-02-24 01:08:42','USER_LOGIN_FAILED',1,'2013-02-24 02:08:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(352,'2013-02-24 01:08:50','USER_LOGIN_FAILED',1,'2013-02-24 02:08:50',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(353,'2013-02-24 01:09:08','USER_LOGIN_FAILED',1,'2013-02-24 02:09:08',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(354,'2013-02-24 01:09:42','USER_LOGIN_FAILED',1,'2013-02-24 02:09:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(355,'2013-02-24 01:09:50','USER_LOGIN_FAILED',1,'2013-02-24 02:09:50',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(356,'2013-02-24 01:10:05','USER_LOGIN_FAILED',1,'2013-02-24 02:10:05',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(357,'2013-02-24 01:10:22','USER_LOGIN_FAILED',1,'2013-02-24 02:10:22',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(358,'2013-02-24 01:10:30','USER_LOGIN_FAILED',1,'2013-02-24 02:10:30',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(359,'2013-02-24 01:10:56','USER_LOGIN_FAILED',1,'2013-02-24 02:10:56',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(360,'2013-02-24 01:11:26','USER_LOGIN_FAILED',1,'2013-02-24 02:11:26',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(361,'2013-02-24 01:12:06','USER_LOGIN_FAILED',1,'2013-02-24 02:12:06',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(362,'2013-02-24 01:21:14','USER_LOGIN_FAILED',1,'2013-02-24 02:21:14',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(363,'2013-02-24 01:21:25','USER_LOGIN_FAILED',1,'2013-02-24 02:21:25',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(364,'2013-02-24 01:21:54','USER_LOGIN_FAILED',1,'2013-02-24 02:21:54',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(365,'2013-02-24 01:22:14','USER_LOGIN_FAILED',1,'2013-02-24 02:22:14',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(366,'2013-02-24 01:22:37','USER_LOGIN_FAILED',1,'2013-02-24 02:22:37',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(367,'2013-02-24 01:23:01','USER_LOGIN_FAILED',1,'2013-02-24 02:23:01',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(368,'2013-02-24 01:23:39','USER_LOGIN_FAILED',1,'2013-02-24 02:23:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(369,'2013-02-24 01:24:04','USER_LOGIN_FAILED',1,'2013-02-24 02:24:04',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(370,'2013-02-24 01:24:39','USER_LOGIN_FAILED',1,'2013-02-24 02:24:39',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(371,'2013-02-24 01:25:01','USER_LOGIN_FAILED',1,'2013-02-24 02:25:01',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(372,'2013-02-24 01:25:12','USER_LOGIN_FAILED',1,'2013-02-24 02:25:12',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(373,'2013-02-24 01:27:30','USER_LOGIN_FAILED',1,'2013-02-24 02:27:30',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(374,'2013-02-24 01:28:00','USER_LOGIN_FAILED',1,'2013-02-24 02:28:00',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(375,'2013-02-24 01:28:35','USER_LOGIN_FAILED',1,'2013-02-24 02:28:35',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(376,'2013-02-24 01:29:03','USER_LOGIN_FAILED',1,'2013-02-24 02:29:03',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(377,'2013-02-24 01:29:55','USER_LOGIN_FAILED',1,'2013-02-24 02:29:55',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(378,'2013-02-24 01:32:40','USER_LOGIN_FAILED',1,'2013-02-24 02:32:40',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(379,'2013-02-24 01:39:33','USER_LOGIN_FAILED',1,'2013-02-24 02:39:33',NULL,'Identifiants login ou mot de passe incorrects - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(380,'2013-02-24 01:39:38','USER_LOGIN_FAILED',1,'2013-02-24 02:39:38',NULL,'Identifiants login ou mot de passe incorrects - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(381,'2013-02-24 01:39:47','USER_LOGIN_FAILED',1,'2013-02-24 02:39:47',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(382,'2013-02-24 01:40:54','USER_LOGIN_FAILED',1,'2013-02-24 02:40:54',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(383,'2013-02-24 01:47:57','USER_LOGIN_FAILED',1,'2013-02-24 02:47:57',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(384,'2013-02-24 01:48:05','USER_LOGIN_FAILED',1,'2013-02-24 02:48:05',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(385,'2013-02-24 01:48:07','USER_LOGIN_FAILED',1,'2013-02-24 02:48:07',NULL,'Unknown column \'u.lastname\' in \'field list\'','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(386,'2013-02-24 01:48:35','USER_LOGIN',1,'2013-02-24 02:48:35',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(387,'2013-02-24 01:56:32','USER_LOGIN',1,'2013-02-24 02:56:32',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL),(388,'2013-02-24 02:05:55','USER_LOGOUT',1,'2013-02-24 03:05:55',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(389,'2013-02-24 02:39:52','USER_LOGIN',1,'2013-02-24 03:39:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(390,'2013-02-24 02:51:10','USER_LOGOUT',1,'2013-02-24 03:51:10',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(391,'2013-02-24 12:46:41','USER_LOGIN',1,'2013-02-24 13:46:41',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(392,'2013-02-24 12:46:52','USER_LOGOUT',1,'2013-02-24 13:46:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(393,'2013-02-24 12:46:56','USER_LOGIN',1,'2013-02-24 13:46:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(394,'2013-02-24 12:47:56','USER_LOGOUT',1,'2013-02-24 13:47:56',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(395,'2013-02-24 12:48:00','USER_LOGIN',1,'2013-02-24 13:48:00',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(396,'2013-02-24 12:48:11','USER_LOGOUT',1,'2013-02-24 13:48:11',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(397,'2013-02-24 12:48:32','USER_LOGIN',1,'2013-02-24 13:48:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(398,'2013-02-24 12:52:22','USER_LOGOUT',1,'2013-02-24 13:52:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(399,'2013-02-24 12:52:27','USER_LOGIN',1,'2013-02-24 13:52:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(400,'2013-02-24 12:52:54','USER_LOGOUT',1,'2013-02-24 13:52:54',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(401,'2013-02-24 12:52:59','USER_LOGIN',1,'2013-02-24 13:52:59',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(402,'2013-02-24 12:55:39','USER_LOGOUT',1,'2013-02-24 13:55:39',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(403,'2013-02-24 12:55:59','USER_LOGIN',1,'2013-02-24 13:55:59',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(404,'2013-02-24 12:56:07','USER_LOGOUT',1,'2013-02-24 13:56:07',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(405,'2013-02-24 12:56:23','USER_LOGIN',1,'2013-02-24 13:56:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(406,'2013-02-24 12:56:46','USER_LOGOUT',1,'2013-02-24 13:56:46',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(407,'2013-02-24 12:58:30','USER_LOGIN',1,'2013-02-24 13:58:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(408,'2013-02-24 12:58:33','USER_LOGOUT',1,'2013-02-24 13:58:33',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(409,'2013-02-24 12:58:51','USER_LOGIN',1,'2013-02-24 13:58:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(410,'2013-02-24 12:58:58','USER_LOGOUT',1,'2013-02-24 13:58:58',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(411,'2013-02-24 13:18:53','USER_LOGIN',1,'2013-02-24 14:18:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(412,'2013-02-24 13:19:52','USER_LOGOUT',1,'2013-02-24 14:19:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(413,'2013-02-24 15:39:31','USER_LOGIN_FAILED',1,'2013-02-24 16:39:31',NULL,'ErrorBadValueForCode - login=admin','127.0.0.1',NULL,NULL),(414,'2013-02-24 15:42:07','USER_LOGIN',1,'2013-02-24 16:42:07',1,'(UserLogged,admin)','127.0.0.1',NULL,NULL),(415,'2013-02-24 15:42:52','USER_LOGOUT',1,'2013-02-24 16:42:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(416,'2013-02-24 16:04:21','USER_LOGIN',1,'2013-02-24 17:04:21',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL),(417,'2013-02-24 16:11:28','USER_LOGIN_FAILED',1,'2013-02-24 17:11:28',NULL,'ErrorBadValueForCode - login=admin','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(418,'2013-02-24 16:11:37','USER_LOGIN',1,'2013-02-24 17:11:37',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(419,'2013-02-24 16:36:52','USER_LOGOUT',1,'2013-02-24 17:36:52',1,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL),(420,'2013-02-24 16:40:37','USER_LOGIN',1,'2013-02-24 17:40:37',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(421,'2013-02-24 16:57:16','USER_LOGIN',1,'2013-02-24 17:57:16',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL),(422,'2013-02-24 17:01:30','USER_LOGOUT',1,'2013-02-24 18:01:30',1,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL),(423,'2013-02-24 17:02:33','USER_LOGIN',1,'2013-02-24 18:02:33',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(424,'2013-02-24 17:14:22','USER_LOGOUT',1,'2013-02-24 18:14:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(425,'2013-02-24 17:15:07','USER_LOGIN_FAILED',1,'2013-02-24 18:15:07',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(426,'2013-02-24 17:15:20','USER_LOGIN',1,'2013-02-24 18:15:20',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(427,'2013-02-24 17:20:14','USER_LOGIN',1,'2013-02-24 18:20:14',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(428,'2013-02-24 17:20:51','USER_LOGIN',1,'2013-02-24 18:20:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(429,'2013-02-24 17:20:54','USER_LOGOUT',1,'2013-02-24 18:20:54',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(430,'2013-02-24 17:21:19','USER_LOGIN',1,'2013-02-24 18:21:19',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(431,'2013-02-24 17:32:35','USER_LOGIN',1,'2013-02-24 18:32:35',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL),(432,'2013-02-24 18:28:48','USER_LOGIN',1,'2013-02-24 19:28:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(433,'2013-02-24 18:29:27','USER_LOGOUT',1,'2013-02-24 19:29:27',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(434,'2013-02-24 18:29:32','USER_LOGIN',1,'2013-02-24 19:29:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(435,'2013-02-24 20:13:13','USER_LOGOUT',1,'2013-02-24 21:13:13',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(436,'2013-02-24 20:13:17','USER_LOGIN',1,'2013-02-24 21:13:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(437,'2013-02-25 08:57:16','USER_LOGIN',1,'2013-02-25 09:57:16',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(438,'2013-02-25 08:57:59','USER_LOGOUT',1,'2013-02-25 09:57:59',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(439,'2013-02-25 09:15:02','USER_LOGIN',1,'2013-02-25 10:15:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(440,'2013-02-25 09:15:50','USER_LOGOUT',1,'2013-02-25 10:15:50',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(441,'2013-02-25 09:15:57','USER_LOGIN',1,'2013-02-25 10:15:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(442,'2013-02-25 09:16:12','USER_LOGOUT',1,'2013-02-25 10:16:12',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(443,'2013-02-25 09:16:19','USER_LOGIN',1,'2013-02-25 10:16:19',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(444,'2013-02-25 09:16:25','USER_LOGOUT',1,'2013-02-25 10:16:25',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(445,'2013-02-25 09:16:39','USER_LOGIN_FAILED',1,'2013-02-25 10:16:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(446,'2013-02-25 09:16:42','USER_LOGIN_FAILED',1,'2013-02-25 10:16:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(447,'2013-02-25 09:16:54','USER_LOGIN_FAILED',1,'2013-02-25 10:16:54',NULL,'Identificadors d'usuari o contrasenya incorrectes - login=gfdg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(448,'2013-02-25 09:17:53','USER_LOGIN',1,'2013-02-25 10:17:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(449,'2013-02-25 09:18:37','USER_LOGOUT',1,'2013-02-25 10:18:37',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(450,'2013-02-25 09:18:41','USER_LOGIN',1,'2013-02-25 10:18:41',4,'(UserLogged,aaa)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(451,'2013-02-25 09:18:47','USER_LOGOUT',1,'2013-02-25 10:18:47',4,'(UserLogoff,aaa)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(452,'2013-02-25 10:05:34','USER_LOGIN',1,'2013-02-25 11:05:34',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(453,'2013-02-26 21:51:40','USER_LOGIN',1,'2013-02-26 22:51:40',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(454,'2013-02-26 23:30:06','USER_LOGIN',1,'2013-02-27 00:30:06',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(455,'2013-02-27 14:13:11','USER_LOGIN',1,'2013-02-27 15:13:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(456,'2013-02-27 18:12:06','USER_LOGIN_FAILED',1,'2013-02-27 19:12:06',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(457,'2013-02-27 18:12:10','USER_LOGIN',1,'2013-02-27 19:12:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(458,'2013-02-27 20:20:08','USER_LOGIN',1,'2013-02-27 21:20:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(459,'2013-03-01 22:12:03','USER_LOGIN',1,'2013-03-01 23:12:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(460,'2013-03-02 11:45:50','USER_LOGIN',1,'2013-03-02 12:45:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(461,'2013-03-02 15:53:51','USER_LOGIN_FAILED',1,'2013-03-02 16:53:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(462,'2013-03-02 15:53:53','USER_LOGIN',1,'2013-03-02 16:53:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(463,'2013-03-02 18:32:32','USER_LOGIN',1,'2013-03-02 19:32:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(464,'2013-03-02 22:59:36','USER_LOGIN',1,'2013-03-02 23:59:36',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(465,'2013-03-03 16:26:26','USER_LOGIN',1,'2013-03-03 17:26:26',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(466,'2013-03-03 22:50:27','USER_LOGIN',1,'2013-03-03 23:50:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(467,'2013-03-04 08:29:27','USER_LOGIN',1,'2013-03-04 09:29:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(468,'2013-03-04 18:27:28','USER_LOGIN',1,'2013-03-04 19:27:28',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; NP06)',NULL),(469,'2013-03-04 19:27:23','USER_LOGIN',1,'2013-03-04 20:27:23',1,'(UserLogged,admin)','192.168.0.254','Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)',NULL),(470,'2013-03-04 19:35:14','USER_LOGIN',1,'2013-03-04 20:35:14',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(471,'2013-03-04 19:55:49','USER_LOGIN',1,'2013-03-04 20:55:49',1,'(UserLogged,admin)','192.168.0.254','Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)',NULL),(472,'2013-03-04 21:16:13','USER_LOGIN',1,'2013-03-04 22:16:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(473,'2013-03-05 10:17:30','USER_LOGIN',1,'2013-03-05 11:17:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(474,'2013-03-05 11:02:43','USER_LOGIN',1,'2013-03-05 12:02:43',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(475,'2013-03-05 23:14:39','USER_LOGIN',1,'2013-03-06 00:14:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(476,'2013-03-06 08:58:57','USER_LOGIN',1,'2013-03-06 09:58:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(477,'2013-03-06 14:29:40','USER_LOGIN',1,'2013-03-06 15:29:40',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(478,'2013-03-06 21:53:02','USER_LOGIN',1,'2013-03-06 22:53:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(479,'2013-03-07 21:14:39','USER_LOGIN',1,'2013-03-07 22:14:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(480,'2013-03-08 00:06:05','USER_LOGIN',1,'2013-03-08 01:06:05',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(481,'2013-03-08 01:38:13','USER_LOGIN',1,'2013-03-08 02:38:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(482,'2013-03-08 08:59:50','USER_LOGIN',1,'2013-03-08 09:59:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(483,'2013-03-09 12:08:51','USER_LOGIN',1,'2013-03-09 13:08:51',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(484,'2013-03-09 15:19:53','USER_LOGIN',1,'2013-03-09 16:19:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(495,'2013-03-09 18:06:21','USER_LOGIN',1,'2013-03-09 19:06:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(496,'2013-03-09 20:01:24','USER_LOGIN',1,'2013-03-09 21:01:24',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(497,'2013-03-09 23:36:45','USER_LOGIN',1,'2013-03-10 00:36:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(498,'2013-03-10 14:37:13','USER_LOGIN',1,'2013-03-10 15:37:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(499,'2013-03-10 17:54:12','USER_LOGIN',1,'2013-03-10 18:54:12',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(500,'2013-03-11 08:57:09','USER_LOGIN',1,'2013-03-11 09:57:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(501,'2013-03-11 22:05:13','USER_LOGIN',1,'2013-03-11 23:05:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(502,'2013-03-12 08:34:27','USER_LOGIN',1,'2013-03-12 09:34:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(503,'2013-03-13 09:11:02','USER_LOGIN',1,'2013-03-13 10:11:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(504,'2013-03-13 10:02:11','USER_LOGIN',1,'2013-03-13 11:02:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(505,'2013-03-13 13:20:58','USER_LOGIN',1,'2013-03-13 14:20:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(506,'2013-03-13 16:19:28','USER_LOGIN',1,'2013-03-13 17:19:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(507,'2013-03-13 18:34:30','USER_LOGIN',1,'2013-03-13 19:34:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(508,'2013-03-14 08:25:02','USER_LOGIN',1,'2013-03-14 09:25:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(509,'2013-03-14 19:15:22','USER_LOGIN',1,'2013-03-14 20:15:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(510,'2013-03-14 21:58:53','USER_LOGIN',1,'2013-03-14 22:58:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(511,'2013-03-14 21:58:59','USER_LOGOUT',1,'2013-03-14 22:58:59',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(512,'2013-03-14 21:59:07','USER_LOGIN',1,'2013-03-14 22:59:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(513,'2013-03-14 22:58:22','USER_LOGOUT',1,'2013-03-14 23:58:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(514,'2013-03-14 23:00:25','USER_LOGIN',1,'2013-03-15 00:00:25',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(515,'2013-03-16 12:14:28','USER_LOGIN',1,'2013-03-16 13:14:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(516,'2013-03-16 16:09:01','USER_LOGIN',1,'2013-03-16 17:09:01',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(517,'2013-03-16 16:57:11','USER_LOGIN',1,'2013-03-16 17:57:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(518,'2013-03-16 19:31:31','USER_LOGIN',1,'2013-03-16 20:31:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(519,'2013-03-17 17:44:39','USER_LOGIN',1,'2013-03-17 18:44:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(520,'2013-03-17 20:40:57','USER_LOGIN',1,'2013-03-17 21:40:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(521,'2013-03-17 23:14:05','USER_LOGIN',1,'2013-03-18 00:14:05',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(522,'2013-03-17 23:28:47','USER_LOGOUT',1,'2013-03-18 00:28:47',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(523,'2013-03-17 23:28:54','USER_LOGIN',1,'2013-03-18 00:28:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(524,'2013-03-18 17:37:30','USER_LOGIN',1,'2013-03-18 18:37:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(525,'2013-03-18 18:11:37','USER_LOGIN',1,'2013-03-18 19:11:37',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(526,'2013-03-19 08:35:08','USER_LOGIN',1,'2013-03-19 09:35:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(527,'2013-03-19 09:20:23','USER_LOGIN',1,'2013-03-19 10:20:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(528,'2013-03-20 13:17:13','USER_LOGIN',1,'2013-03-20 14:17:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(529,'2013-03-20 14:44:31','USER_LOGIN',1,'2013-03-20 15:44:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(530,'2013-03-20 18:24:25','USER_LOGIN',1,'2013-03-20 19:24:25',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(531,'2013-03-20 19:15:54','USER_LOGIN',1,'2013-03-20 20:15:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(532,'2013-03-21 18:40:47','USER_LOGIN',1,'2013-03-21 19:40:47',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(533,'2013-03-21 21:42:24','USER_LOGIN',1,'2013-03-21 22:42:24',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(534,'2013-03-22 08:39:23','USER_LOGIN',1,'2013-03-22 09:39:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(535,'2013-03-23 13:04:55','USER_LOGIN',1,'2013-03-23 14:04:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(536,'2013-03-23 15:47:43','USER_LOGIN',1,'2013-03-23 16:47:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(537,'2013-03-23 22:56:36','USER_LOGIN',1,'2013-03-23 23:56:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(538,'2013-03-24 01:22:32','USER_LOGIN',1,'2013-03-24 02:22:32',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(539,'2013-03-24 14:40:42','USER_LOGIN',1,'2013-03-24 15:40:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(540,'2013-03-24 15:30:26','USER_LOGOUT',1,'2013-03-24 16:30:26',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(541,'2013-03-24 15:30:29','USER_LOGIN',1,'2013-03-24 16:30:29',2,'(UserLogged,demo)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(542,'2013-03-24 15:49:40','USER_LOGOUT',1,'2013-03-24 16:49:40',2,'(UserLogoff,demo)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(543,'2013-03-24 15:49:48','USER_LOGIN',1,'2013-03-24 16:49:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(544,'2013-03-24 15:52:35','USER_MODIFY',1,'2013-03-24 16:52:35',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(545,'2013-03-24 15:52:52','USER_MODIFY',1,'2013-03-24 16:52:52',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(546,'2013-03-24 15:53:09','USER_MODIFY',1,'2013-03-24 16:53:09',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(547,'2013-03-24 15:53:23','USER_MODIFY',1,'2013-03-24 16:53:23',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(548,'2013-03-24 16:00:04','USER_MODIFY',1,'2013-03-24 17:00:04',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(549,'2013-03-24 16:01:50','USER_MODIFY',1,'2013-03-24 17:01:50',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(550,'2013-03-24 16:10:14','USER_MODIFY',1,'2013-03-24 17:10:14',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(551,'2013-03-24 16:55:13','USER_LOGIN',1,'2013-03-24 17:55:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(552,'2013-03-24 17:44:29','USER_LOGIN',1,'2013-03-24 18:44:29',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(553,'2013-09-08 23:06:26','USER_LOGIN',1,'2013-09-09 01:06:26',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36',NULL),(554,'2013-10-21 22:32:28','USER_LOGIN',1,'2013-10-22 00:32:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36',NULL),(555,'2013-10-21 22:32:48','USER_LOGIN',1,'2013-10-22 00:32:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36',NULL),(556,'2013-11-07 00:01:51','USER_LOGIN',1,'2013-11-07 01:01:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.114 Safari/537.36',NULL),(557,'2014-03-02 15:21:07','USER_LOGIN',1,'2014-03-02 16:21:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(558,'2014-03-02 15:36:53','USER_LOGIN',1,'2014-03-02 16:36:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(559,'2014-03-02 18:54:23','USER_LOGIN',1,'2014-03-02 19:54:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(560,'2014-03-02 19:11:17','USER_LOGIN',1,'2014-03-02 20:11:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(561,'2014-03-03 18:19:24','USER_LOGIN',1,'2014-03-03 19:19:24',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(562,'2014-12-21 12:51:38','USER_LOGIN',1,'2014-12-21 13:51:38',1,'(UserLogged,admin) - TZ=1;TZString=CET;Screen=1920x969','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36',NULL),(563,'2014-12-21 19:52:09','USER_LOGIN',1,'2014-12-21 20:52:09',1,'(UserLogged,admin) - TZ=1;TZString=CET;Screen=1920x969','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36',NULL),(566,'2015-10-03 08:49:43','USER_NEW_PASSWORD',1,'2015-10-03 10:49:43',1,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(567,'2015-10-03 08:49:43','USER_MODIFY',1,'2015-10-03 10:49:43',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(568,'2015-10-03 09:03:12','USER_MODIFY',1,'2015-10-03 11:03:12',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(569,'2015-10-03 09:03:42','USER_MODIFY',1,'2015-10-03 11:03:42',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(570,'2015-10-03 09:07:36','USER_MODIFY',1,'2015-10-03 11:07:36',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(571,'2015-10-03 09:08:58','USER_NEW_PASSWORD',1,'2015-10-03 11:08:58',1,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(572,'2015-10-03 09:08:58','USER_MODIFY',1,'2015-10-03 11:08:58',1,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(573,'2015-10-03 09:09:23','USER_MODIFY',1,'2015-10-03 11:09:23',1,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(574,'2015-10-03 09:11:04','USER_NEW_PASSWORD',1,'2015-10-03 11:11:04',1,'Password change for athestudent','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(575,'2015-10-03 09:11:04','USER_MODIFY',1,'2015-10-03 11:11:04',1,'User athestudent modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(576,'2015-10-03 09:11:53','USER_MODIFY',1,'2015-10-03 11:11:53',1,'User abookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(577,'2015-10-03 09:42:12','USER_LOGIN_FAILED',1,'2015-10-03 11:42:11',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(578,'2015-10-03 09:42:19','USER_LOGIN_FAILED',1,'2015-10-03 11:42:19',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(579,'2015-10-03 09:42:42','USER_LOGIN_FAILED',1,'2015-10-03 11:42:42',NULL,'Bad value for login or password - login=aeinstein','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(580,'2015-10-03 09:43:50','USER_LOGIN',1,'2015-10-03 11:43:50',1,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x788','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(581,'2015-10-03 09:44:44','GROUP_MODIFY',1,'2015-10-03 11:44:44',1,'Group Sale representatives modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(582,'2015-10-03 09:46:25','GROUP_CREATE',1,'2015-10-03 11:46:25',1,'Group Management created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(583,'2015-10-03 09:46:46','GROUP_CREATE',1,'2015-10-03 11:46:46',1,'Group Scientists created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(584,'2015-10-03 09:47:41','USER_CREATE',1,'2015-10-03 11:47:41',1,'User mcurie created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(585,'2015-10-03 09:47:41','USER_NEW_PASSWORD',1,'2015-10-03 11:47:41',1,'Password change for mcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(586,'2015-10-03 09:47:53','USER_MODIFY',1,'2015-10-03 11:47:53',1,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(587,'2015-10-03 09:48:32','USER_DELETE',1,'2015-10-03 11:48:32',1,'User bbb removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(588,'2015-10-03 09:48:52','USER_MODIFY',1,'2015-10-03 11:48:52',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(589,'2015-10-03 10:01:28','USER_MODIFY',1,'2015-10-03 12:01:28',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(590,'2015-10-03 10:01:39','USER_MODIFY',1,'2015-10-03 12:01:39',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL); +INSERT INTO `llx_events` VALUES (30,'2011-07-18 18:23:06','USER_LOGOUT',1,'2011-07-18 20:23:06',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(31,'2011-07-18 18:23:12','USER_LOGIN_FAILED',1,'2011-07-18 20:23:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(32,'2011-07-18 18:23:17','USER_LOGIN',1,'2011-07-18 20:23:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(33,'2011-07-18 20:10:51','USER_LOGIN_FAILED',1,'2011-07-18 22:10:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(34,'2011-07-18 20:10:55','USER_LOGIN',1,'2011-07-18 22:10:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(35,'2011-07-18 21:18:57','USER_LOGIN',1,'2011-07-18 23:18:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(36,'2011-07-20 10:34:10','USER_LOGIN',1,'2011-07-20 12:34:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(37,'2011-07-20 12:36:44','USER_LOGIN',1,'2011-07-20 14:36:44',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(38,'2011-07-20 13:20:51','USER_LOGIN_FAILED',1,'2011-07-20 15:20:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(39,'2011-07-20 13:20:54','USER_LOGIN',1,'2011-07-20 15:20:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(40,'2011-07-20 15:03:46','USER_LOGIN_FAILED',1,'2011-07-20 17:03:46',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(41,'2011-07-20 15:03:55','USER_LOGIN',1,'2011-07-20 17:03:55',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(42,'2011-07-20 18:05:05','USER_LOGIN_FAILED',1,'2011-07-20 20:05:05',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(43,'2011-07-20 18:05:08','USER_LOGIN',1,'2011-07-20 20:05:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(44,'2011-07-20 21:08:53','USER_LOGIN_FAILED',1,'2011-07-20 23:08:53',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(45,'2011-07-20 21:08:56','USER_LOGIN',1,'2011-07-20 23:08:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(46,'2011-07-21 01:26:12','USER_LOGIN',1,'2011-07-21 03:26:12',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(47,'2011-07-21 22:35:45','USER_LOGIN_FAILED',1,'2011-07-22 00:35:45',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(48,'2011-07-21 22:35:49','USER_LOGIN',1,'2011-07-22 00:35:49',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(49,'2011-07-26 23:09:47','USER_LOGIN_FAILED',1,'2011-07-27 01:09:47',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(50,'2011-07-26 23:09:50','USER_LOGIN',1,'2011-07-27 01:09:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(51,'2011-07-27 17:02:27','USER_LOGIN_FAILED',1,'2011-07-27 19:02:27',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(52,'2011-07-27 17:02:32','USER_LOGIN',1,'2011-07-27 19:02:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(53,'2011-07-27 23:33:37','USER_LOGIN_FAILED',1,'2011-07-28 01:33:37',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(54,'2011-07-27 23:33:41','USER_LOGIN',1,'2011-07-28 01:33:41',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(55,'2011-07-28 18:20:36','USER_LOGIN_FAILED',1,'2011-07-28 20:20:36',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(56,'2011-07-28 18:20:38','USER_LOGIN',1,'2011-07-28 20:20:38',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(57,'2011-07-28 20:13:30','USER_LOGIN_FAILED',1,'2011-07-28 22:13:30',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(58,'2011-07-28 20:13:34','USER_LOGIN',1,'2011-07-28 22:13:34',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(59,'2011-07-28 20:22:51','USER_LOGIN',1,'2011-07-28 22:22:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(60,'2011-07-28 23:05:06','USER_LOGIN',1,'2011-07-29 01:05:06',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(61,'2011-07-29 20:15:50','USER_LOGIN_FAILED',1,'2011-07-29 22:15:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(62,'2011-07-29 20:15:53','USER_LOGIN',1,'2011-07-29 22:15:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(68,'2011-07-29 20:51:01','USER_LOGOUT',1,'2011-07-29 22:51:01',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(69,'2011-07-29 20:51:05','USER_LOGIN',1,'2011-07-29 22:51:05',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(70,'2011-07-30 08:46:20','USER_LOGIN_FAILED',1,'2011-07-30 10:46:20',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(71,'2011-07-30 08:46:38','USER_LOGIN_FAILED',1,'2011-07-30 10:46:38',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(72,'2011-07-30 08:46:42','USER_LOGIN',1,'2011-07-30 10:46:42',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(73,'2011-07-30 10:05:12','USER_LOGIN_FAILED',1,'2011-07-30 12:05:12',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(74,'2011-07-30 10:05:15','USER_LOGIN',1,'2011-07-30 12:05:15',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(75,'2011-07-30 12:15:46','USER_LOGIN',1,'2011-07-30 14:15:46',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(76,'2011-07-31 22:19:30','USER_LOGIN',1,'2011-08-01 00:19:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(77,'2011-07-31 23:32:52','USER_LOGIN',1,'2011-08-01 01:32:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(78,'2011-08-01 01:24:50','USER_LOGIN_FAILED',1,'2011-08-01 03:24:50',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(79,'2011-08-01 01:24:54','USER_LOGIN',1,'2011-08-01 03:24:54',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(80,'2011-08-01 19:31:36','USER_LOGIN_FAILED',1,'2011-08-01 21:31:35',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(81,'2011-08-01 19:31:39','USER_LOGIN',1,'2011-08-01 21:31:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(82,'2011-08-01 20:01:36','USER_LOGIN',1,'2011-08-01 22:01:36',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(83,'2011-08-01 20:52:54','USER_LOGIN_FAILED',1,'2011-08-01 22:52:54',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(84,'2011-08-01 20:52:58','USER_LOGIN',1,'2011-08-01 22:52:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(85,'2011-08-01 21:17:28','USER_LOGIN_FAILED',1,'2011-08-01 23:17:28',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(86,'2011-08-01 21:17:31','USER_LOGIN',1,'2011-08-01 23:17:31',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(87,'2011-08-04 11:55:17','USER_LOGIN',1,'2011-08-04 13:55:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(88,'2011-08-04 20:19:03','USER_LOGIN_FAILED',1,'2011-08-04 22:19:03',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(89,'2011-08-04 20:19:07','USER_LOGIN',1,'2011-08-04 22:19:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(90,'2011-08-05 17:51:42','USER_LOGIN_FAILED',1,'2011-08-05 19:51:42',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(91,'2011-08-05 17:51:47','USER_LOGIN',1,'2011-08-05 19:51:47',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(92,'2011-08-05 17:56:03','USER_LOGIN',1,'2011-08-05 19:56:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(93,'2011-08-05 17:59:10','USER_LOGIN',1,'2011-08-05 19:59:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL),(94,'2011-08-05 18:01:58','USER_LOGIN',1,'2011-08-05 20:01:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.100 Safari/534.30',NULL),(95,'2011-08-05 19:59:56','USER_LOGIN',1,'2011-08-05 21:59:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(96,'2011-08-06 18:33:22','USER_LOGIN',1,'2011-08-06 20:33:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(97,'2011-08-07 00:56:59','USER_LOGIN',1,'2011-08-07 02:56:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(98,'2011-08-07 22:49:14','USER_LOGIN',1,'2011-08-08 00:49:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(99,'2011-08-07 23:05:18','USER_LOGOUT',1,'2011-08-08 01:05:18',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(105,'2011-08-08 00:41:09','USER_LOGIN',1,'2011-08-08 02:41:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(106,'2011-08-08 11:58:55','USER_LOGIN',1,'2011-08-08 13:58:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(107,'2011-08-08 14:35:48','USER_LOGIN',1,'2011-08-08 16:35:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(108,'2011-08-08 14:36:31','USER_LOGOUT',1,'2011-08-08 16:36:31',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(109,'2011-08-08 14:38:28','USER_LOGIN',1,'2011-08-08 16:38:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(110,'2011-08-08 14:39:02','USER_LOGOUT',1,'2011-08-08 16:39:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(111,'2011-08-08 14:39:10','USER_LOGIN',1,'2011-08-08 16:39:10',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(112,'2011-08-08 14:39:28','USER_LOGOUT',1,'2011-08-08 16:39:28',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(113,'2011-08-08 14:39:37','USER_LOGIN',1,'2011-08-08 16:39:37',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(114,'2011-08-08 14:50:02','USER_LOGOUT',1,'2011-08-08 16:50:02',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(115,'2011-08-08 14:51:45','USER_LOGIN_FAILED',1,'2011-08-08 16:51:45',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(116,'2011-08-08 14:51:52','USER_LOGIN',1,'2011-08-08 16:51:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(117,'2011-08-08 15:09:54','USER_LOGOUT',1,'2011-08-08 17:09:54',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(118,'2011-08-08 15:10:19','USER_LOGIN_FAILED',1,'2011-08-08 17:10:19',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(119,'2011-08-08 15:10:28','USER_LOGIN',1,'2011-08-08 17:10:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(121,'2011-08-08 15:14:58','USER_LOGOUT',1,'2011-08-08 17:14:58',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(122,'2011-08-08 15:15:00','USER_LOGIN_FAILED',1,'2011-08-08 17:15:00',NULL,'Identifiants login ou mot de passe incorrects - login=','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(123,'2011-08-08 15:17:57','USER_LOGIN',1,'2011-08-08 17:17:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(124,'2011-08-08 15:35:56','USER_LOGOUT',1,'2011-08-08 17:35:56',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(125,'2011-08-08 15:36:05','USER_LOGIN',1,'2011-08-08 17:36:05',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(126,'2011-08-08 17:32:42','USER_LOGIN',1,'2011-08-08 19:32:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20100101 Firefox/5.0',NULL),(127,'2012-12-08 13:49:37','USER_LOGOUT',1,'2012-12-08 14:49:37',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(128,'2012-12-08 13:49:42','USER_LOGIN',1,'2012-12-08 14:49:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(129,'2012-12-08 13:50:12','USER_LOGOUT',1,'2012-12-08 14:50:12',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(130,'2012-12-08 13:50:14','USER_LOGIN',1,'2012-12-08 14:50:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(131,'2012-12-08 13:50:17','USER_LOGOUT',1,'2012-12-08 14:50:17',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(132,'2012-12-08 13:52:47','USER_LOGIN',1,'2012-12-08 14:52:47',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(133,'2012-12-08 13:53:08','USER_MODIFY',1,'2012-12-08 14:53:08',1,'User admin modified','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(134,'2012-12-08 14:08:45','USER_LOGOUT',1,'2012-12-08 15:08:45',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(135,'2012-12-08 14:09:09','USER_LOGIN',1,'2012-12-08 15:09:09',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(136,'2012-12-08 14:11:43','USER_LOGOUT',1,'2012-12-08 15:11:43',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(137,'2012-12-08 14:11:45','USER_LOGIN',1,'2012-12-08 15:11:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(138,'2012-12-08 14:22:53','USER_LOGOUT',1,'2012-12-08 15:22:53',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(139,'2012-12-08 14:22:54','USER_LOGIN',1,'2012-12-08 15:22:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(140,'2012-12-08 14:23:10','USER_LOGOUT',1,'2012-12-08 15:23:10',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(141,'2012-12-08 14:23:11','USER_LOGIN',1,'2012-12-08 15:23:11',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(142,'2012-12-08 14:23:49','USER_LOGOUT',1,'2012-12-08 15:23:49',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(143,'2012-12-08 14:23:50','USER_LOGIN',1,'2012-12-08 15:23:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(144,'2012-12-08 14:28:08','USER_LOGOUT',1,'2012-12-08 15:28:08',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(145,'2012-12-08 14:35:15','USER_LOGIN',1,'2012-12-08 15:35:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(146,'2012-12-08 14:35:18','USER_LOGOUT',1,'2012-12-08 15:35:18',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(147,'2012-12-08 14:36:07','USER_LOGIN',1,'2012-12-08 15:36:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(148,'2012-12-08 14:36:09','USER_LOGOUT',1,'2012-12-08 15:36:09',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(149,'2012-12-08 14:36:41','USER_LOGIN',1,'2012-12-08 15:36:41',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(150,'2012-12-08 15:59:13','USER_LOGIN',1,'2012-12-08 16:59:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(151,'2012-12-09 11:49:52','USER_LOGIN',1,'2012-12-09 12:49:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(152,'2012-12-09 13:46:31','USER_LOGIN',1,'2012-12-09 14:46:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(153,'2012-12-09 19:03:14','USER_LOGIN',1,'2012-12-09 20:03:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(154,'2012-12-10 00:16:31','USER_LOGIN',1,'2012-12-10 01:16:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(170,'2012-12-11 22:03:31','USER_LOGIN',1,'2012-12-11 23:03:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(171,'2012-12-12 00:32:39','USER_LOGIN',1,'2012-12-12 01:32:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(172,'2012-12-12 10:49:59','USER_LOGIN',1,'2012-12-12 11:49:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(175,'2012-12-12 10:57:40','USER_MODIFY',1,'2012-12-12 11:57:40',1,'Modification utilisateur admin','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(176,'2012-12-12 13:29:15','USER_LOGIN',1,'2012-12-12 14:29:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(177,'2012-12-12 13:30:15','USER_LOGIN',1,'2012-12-12 14:30:15',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(178,'2012-12-12 13:40:08','USER_LOGOUT',1,'2012-12-12 14:40:08',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(179,'2012-12-12 13:40:10','USER_LOGIN',1,'2012-12-12 14:40:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(180,'2012-12-12 13:40:26','USER_MODIFY',1,'2012-12-12 14:40:26',1,'Modification utilisateur admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(181,'2012-12-12 13:40:34','USER_LOGOUT',1,'2012-12-12 14:40:34',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(182,'2012-12-12 13:42:23','USER_LOGIN',1,'2012-12-12 14:42:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(183,'2012-12-12 13:43:02','USER_NEW_PASSWORD',1,'2012-12-12 14:43:02',NULL,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(184,'2012-12-12 13:43:25','USER_LOGOUT',1,'2012-12-12 14:43:25',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(185,'2012-12-12 13:43:27','USER_LOGIN_FAILED',1,'2012-12-12 14:43:27',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(186,'2012-12-12 13:43:30','USER_LOGIN',1,'2012-12-12 14:43:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(187,'2012-12-12 14:52:11','USER_LOGIN',1,'2012-12-12 15:52:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11',NULL),(188,'2012-12-12 17:53:00','USER_LOGIN_FAILED',1,'2012-12-12 18:53:00',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(189,'2012-12-12 17:53:07','USER_LOGIN_FAILED',1,'2012-12-12 18:53:07',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(190,'2012-12-12 17:53:51','USER_NEW_PASSWORD',1,'2012-12-12 18:53:51',NULL,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(191,'2012-12-12 17:54:00','USER_LOGIN',1,'2012-12-12 18:54:00',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(192,'2012-12-12 17:54:10','USER_NEW_PASSWORD',1,'2012-12-12 18:54:10',1,'Changement mot de passe de admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(193,'2012-12-12 17:54:10','USER_MODIFY',1,'2012-12-12 18:54:10',1,'Modification utilisateur admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(194,'2012-12-12 18:57:09','USER_LOGIN',1,'2012-12-12 19:57:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(195,'2012-12-12 23:04:08','USER_LOGIN',1,'2012-12-13 00:04:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(196,'2012-12-17 20:03:14','USER_LOGIN',1,'2012-12-17 21:03:14',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(197,'2012-12-17 21:18:45','USER_LOGIN',1,'2012-12-17 22:18:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(198,'2012-12-17 22:30:08','USER_LOGIN',1,'2012-12-17 23:30:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(199,'2012-12-18 23:32:03','USER_LOGIN',1,'2012-12-19 00:32:03',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(200,'2012-12-19 09:38:03','USER_LOGIN',1,'2012-12-19 10:38:03',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(201,'2012-12-19 11:23:35','USER_LOGIN',1,'2012-12-19 12:23:35',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(202,'2012-12-19 12:46:22','USER_LOGIN',1,'2012-12-19 13:46:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(214,'2012-12-19 19:11:31','USER_LOGIN',1,'2012-12-19 20:11:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(215,'2012-12-21 16:36:57','USER_LOGIN',1,'2012-12-21 17:36:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(216,'2012-12-21 16:38:43','USER_NEW_PASSWORD',1,'2012-12-21 17:38:43',1,'Changement mot de passe de adupont','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(217,'2012-12-21 16:38:43','USER_MODIFY',1,'2012-12-21 17:38:43',1,'Modification utilisateur adupont','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(218,'2012-12-21 16:38:51','USER_LOGOUT',1,'2012-12-21 17:38:51',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(219,'2012-12-21 16:38:55','USER_LOGIN',1,'2012-12-21 17:38:55',3,'(UserLogged,adupont)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(220,'2012-12-21 16:48:18','USER_LOGOUT',1,'2012-12-21 17:48:18',3,'(UserLogoff,adupont)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(221,'2012-12-21 16:48:20','USER_LOGIN',1,'2012-12-21 17:48:20',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(222,'2012-12-26 18:28:18','USER_LOGIN',1,'2012-12-26 19:28:18',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(223,'2012-12-26 20:00:24','USER_LOGIN',1,'2012-12-26 21:00:24',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(224,'2012-12-27 01:10:27','USER_LOGIN',1,'2012-12-27 02:10:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(225,'2012-12-28 19:12:08','USER_LOGIN',1,'2012-12-28 20:12:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(226,'2012-12-28 20:16:58','USER_LOGIN',1,'2012-12-28 21:16:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(227,'2012-12-29 14:35:46','USER_LOGIN',1,'2012-12-29 15:35:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(228,'2012-12-29 14:37:59','USER_LOGOUT',1,'2012-12-29 15:37:59',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(229,'2012-12-29 14:38:00','USER_LOGIN',1,'2012-12-29 15:38:00',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(230,'2012-12-29 17:16:48','USER_LOGIN',1,'2012-12-29 18:16:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(231,'2012-12-31 12:02:59','USER_LOGIN',1,'2012-12-31 13:02:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(232,'2013-01-02 20:32:51','USER_LOGIN',1,'2013-01-02 21:32:51',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0',NULL),(233,'2013-01-02 20:58:59','USER_LOGIN',1,'2013-01-02 21:58:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(234,'2013-01-03 09:25:07','USER_LOGIN',1,'2013-01-03 10:25:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(235,'2013-01-03 19:39:31','USER_LOGIN',1,'2013-01-03 20:39:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(236,'2013-01-04 22:40:19','USER_LOGIN',1,'2013-01-04 23:40:19',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(237,'2013-01-05 12:59:59','USER_LOGIN',1,'2013-01-05 13:59:59',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(238,'2013-01-05 15:28:52','USER_LOGIN',1,'2013-01-05 16:28:52',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(239,'2013-01-05 17:02:08','USER_LOGIN',1,'2013-01-05 18:02:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(240,'2013-01-06 12:13:33','USER_LOGIN',1,'2013-01-06 13:13:33',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(241,'2013-01-07 01:21:15','USER_LOGIN',1,'2013-01-07 02:21:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(242,'2013-01-07 01:46:31','USER_LOGOUT',1,'2013-01-07 02:46:31',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(243,'2013-01-07 19:54:50','USER_LOGIN',1,'2013-01-07 20:54:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(244,'2013-01-08 21:55:01','USER_LOGIN',1,'2013-01-08 22:55:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(245,'2013-01-09 11:13:28','USER_LOGIN',1,'2013-01-09 12:13:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(246,'2013-01-10 18:30:46','USER_LOGIN',1,'2013-01-10 19:30:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(247,'2013-01-11 18:03:26','USER_LOGIN',1,'2013-01-11 19:03:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(248,'2013-01-12 11:15:04','USER_LOGIN',1,'2013-01-12 12:15:04',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(249,'2013-01-12 14:42:44','USER_LOGIN',1,'2013-01-12 15:42:44',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(250,'2013-01-13 12:07:17','USER_LOGIN',1,'2013-01-13 13:07:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(251,'2013-01-13 17:37:58','USER_LOGIN',1,'2013-01-13 18:37:58',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(252,'2013-01-13 19:24:21','USER_LOGIN',1,'2013-01-13 20:24:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(253,'2013-01-13 19:29:19','USER_LOGOUT',1,'2013-01-13 20:29:19',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(254,'2013-01-13 21:39:39','USER_LOGIN',1,'2013-01-13 22:39:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(255,'2013-01-14 00:52:21','USER_LOGIN',1,'2013-01-14 01:52:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11',NULL),(256,'2013-01-16 11:34:31','USER_LOGIN',1,'2013-01-16 12:34:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(257,'2013-01-16 15:36:21','USER_LOGIN',1,'2013-01-16 16:36:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(258,'2013-01-16 19:17:36','USER_LOGIN',1,'2013-01-16 20:17:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(259,'2013-01-16 19:48:08','GROUP_CREATE',1,'2013-01-16 20:48:08',1,'Création groupe ggg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(260,'2013-01-16 21:48:53','USER_LOGIN',1,'2013-01-16 22:48:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(261,'2013-01-17 19:55:53','USER_LOGIN',1,'2013-01-17 20:55:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(262,'2013-01-18 09:48:01','USER_LOGIN',1,'2013-01-18 10:48:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(263,'2013-01-18 13:22:36','USER_LOGIN',1,'2013-01-18 14:22:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(264,'2013-01-18 16:10:23','USER_LOGIN',1,'2013-01-18 17:10:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(265,'2013-01-18 17:41:40','USER_LOGIN',1,'2013-01-18 18:41:40',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(266,'2013-01-19 14:33:48','USER_LOGIN',1,'2013-01-19 15:33:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(267,'2013-01-19 16:47:43','USER_LOGIN',1,'2013-01-19 17:47:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(268,'2013-01-19 16:59:43','USER_LOGIN',1,'2013-01-19 17:59:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(269,'2013-01-19 17:00:22','USER_LOGIN',1,'2013-01-19 18:00:22',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(270,'2013-01-19 17:04:16','USER_LOGOUT',1,'2013-01-19 18:04:16',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(271,'2013-01-19 17:04:18','USER_LOGIN',1,'2013-01-19 18:04:18',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(272,'2013-01-20 00:34:19','USER_LOGIN',1,'2013-01-20 01:34:19',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(273,'2013-01-21 11:54:17','USER_LOGIN',1,'2013-01-21 12:54:17',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(274,'2013-01-21 13:48:15','USER_LOGIN',1,'2013-01-21 14:48:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(275,'2013-01-21 14:30:22','USER_LOGIN',1,'2013-01-21 15:30:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(276,'2013-01-21 15:10:46','USER_LOGIN',1,'2013-01-21 16:10:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(277,'2013-01-21 17:27:43','USER_LOGIN',1,'2013-01-21 18:27:43',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(278,'2013-01-21 21:48:15','USER_LOGIN',1,'2013-01-21 22:48:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(279,'2013-01-21 21:50:42','USER_LOGIN',1,'2013-01-21 22:50:42',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17',NULL),(280,'2013-01-23 09:28:26','USER_LOGIN',1,'2013-01-23 10:28:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(281,'2013-01-23 13:21:57','USER_LOGIN',1,'2013-01-23 14:21:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(282,'2013-01-23 16:52:00','USER_LOGOUT',1,'2013-01-23 17:52:00',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(283,'2013-01-23 16:52:05','USER_LOGIN_FAILED',1,'2013-01-23 17:52:05',NULL,'Bad value for login or password - login=bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(284,'2013-01-23 16:52:09','USER_LOGIN',1,'2013-01-23 17:52:09',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(285,'2013-01-23 16:52:27','USER_CREATE',1,'2013-01-23 17:52:27',1,'Création utilisateur aaa','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(286,'2013-01-23 16:52:27','USER_NEW_PASSWORD',1,'2013-01-23 17:52:27',1,'Changement mot de passe de aaa','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(287,'2013-01-23 16:52:37','USER_CREATE',1,'2013-01-23 17:52:37',1,'Création utilisateur bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(288,'2013-01-23 16:52:37','USER_NEW_PASSWORD',1,'2013-01-23 17:52:37',1,'Changement mot de passe de bbb','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(289,'2013-01-23 16:53:15','USER_LOGOUT',1,'2013-01-23 17:53:15',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(290,'2013-01-23 16:53:20','USER_LOGIN',1,'2013-01-23 17:53:20',4,'(UserLogged,aaa)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(291,'2013-01-23 19:16:58','USER_LOGIN',1,'2013-01-23 20:16:58',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(292,'2013-01-26 10:54:07','USER_LOGIN',1,'2013-01-26 11:54:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(293,'2013-01-29 10:15:36','USER_LOGIN',1,'2013-01-29 11:15:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(294,'2013-01-30 17:42:50','USER_LOGIN',1,'2013-01-30 18:42:50',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17',NULL),(295,'2013-02-01 08:49:55','USER_LOGIN',1,'2013-02-01 09:49:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(296,'2013-02-01 08:51:57','USER_LOGOUT',1,'2013-02-01 09:51:57',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(297,'2013-02-01 08:52:39','USER_LOGIN',1,'2013-02-01 09:52:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(298,'2013-02-01 21:03:01','USER_LOGIN',1,'2013-02-01 22:03:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(299,'2013-02-10 19:48:39','USER_LOGIN',1,'2013-02-10 20:48:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(300,'2013-02-10 20:46:48','USER_LOGIN',1,'2013-02-10 21:46:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(301,'2013-02-10 21:39:23','USER_LOGIN',1,'2013-02-10 22:39:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(302,'2013-02-11 19:00:13','USER_LOGIN',1,'2013-02-11 20:00:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(303,'2013-02-11 19:43:44','USER_LOGIN_FAILED',1,'2013-02-11 20:43:44',NULL,'Unknown column \'u.fk_user\' in \'field list\'','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(304,'2013-02-11 19:44:01','USER_LOGIN',1,'2013-02-11 20:44:01',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(305,'2013-02-12 00:27:35','USER_LOGIN',1,'2013-02-12 01:27:35',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(306,'2013-02-12 00:27:38','USER_LOGOUT',1,'2013-02-12 01:27:38',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(307,'2013-02-12 00:28:07','USER_LOGIN',1,'2013-02-12 01:28:07',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(308,'2013-02-12 00:28:09','USER_LOGOUT',1,'2013-02-12 01:28:09',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(309,'2013-02-12 00:28:26','USER_LOGIN',1,'2013-02-12 01:28:26',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(310,'2013-02-12 00:28:30','USER_LOGOUT',1,'2013-02-12 01:28:30',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(311,'2013-02-12 12:42:15','USER_LOGIN',1,'2013-02-12 13:42:15',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',NULL),(312,'2013-02-12 13:46:16','USER_LOGIN',1,'2013-02-12 14:46:16',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(313,'2013-02-12 14:54:28','USER_LOGIN',1,'2013-02-12 15:54:28',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(314,'2013-02-12 16:04:46','USER_LOGIN',1,'2013-02-12 17:04:46',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(315,'2013-02-13 14:02:43','USER_LOGIN',1,'2013-02-13 15:02:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(316,'2013-02-13 14:48:30','USER_LOGIN',1,'2013-02-13 15:48:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(317,'2013-02-13 17:44:53','USER_LOGIN',1,'2013-02-13 18:44:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(318,'2013-02-15 08:44:36','USER_LOGIN',1,'2013-02-15 09:44:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(319,'2013-02-15 08:53:20','USER_LOGIN',1,'2013-02-15 09:53:20',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(320,'2013-02-16 19:10:28','USER_LOGIN',1,'2013-02-16 20:10:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(321,'2013-02-16 19:22:40','USER_CREATE',1,'2013-02-16 20:22:40',1,'Création utilisateur aaab','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(322,'2013-02-16 19:22:40','USER_NEW_PASSWORD',1,'2013-02-16 20:22:40',1,'Changement mot de passe de aaab','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(323,'2013-02-16 19:48:15','USER_CREATE',1,'2013-02-16 20:48:15',1,'Création utilisateur zzz','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(324,'2013-02-16 19:48:15','USER_NEW_PASSWORD',1,'2013-02-16 20:48:15',1,'Changement mot de passe de zzz','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(325,'2013-02-16 19:50:08','USER_CREATE',1,'2013-02-16 20:50:08',1,'Création utilisateur zzzg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(326,'2013-02-16 19:50:08','USER_NEW_PASSWORD',1,'2013-02-16 20:50:08',1,'Changement mot de passe de zzzg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(327,'2013-02-16 21:20:03','USER_LOGIN',1,'2013-02-16 22:20:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(328,'2013-02-17 14:30:51','USER_LOGIN',1,'2013-02-17 15:30:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(329,'2013-02-17 17:21:22','USER_LOGIN',1,'2013-02-17 18:21:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(330,'2013-02-17 17:48:43','USER_MODIFY',1,'2013-02-17 18:48:43',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(331,'2013-02-17 17:48:47','USER_MODIFY',1,'2013-02-17 18:48:47',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(332,'2013-02-17 17:48:51','USER_MODIFY',1,'2013-02-17 18:48:51',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(333,'2013-02-17 17:48:56','USER_MODIFY',1,'2013-02-17 18:48:56',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(334,'2013-02-18 22:00:01','USER_LOGIN',1,'2013-02-18 23:00:01',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(335,'2013-02-19 08:19:52','USER_LOGIN',1,'2013-02-19 09:19:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(336,'2013-02-19 22:00:52','USER_LOGIN',1,'2013-02-19 23:00:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(337,'2013-02-20 09:34:52','USER_LOGIN',1,'2013-02-20 10:34:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(338,'2013-02-20 13:12:28','USER_LOGIN',1,'2013-02-20 14:12:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(339,'2013-02-20 17:19:44','USER_LOGIN',1,'2013-02-20 18:19:44',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(340,'2013-02-20 19:07:21','USER_MODIFY',1,'2013-02-20 20:07:21',1,'Modification utilisateur adupont','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(341,'2013-02-20 19:47:17','USER_LOGIN',1,'2013-02-20 20:47:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(342,'2013-02-20 19:48:01','USER_MODIFY',1,'2013-02-20 20:48:01',1,'Modification utilisateur aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(343,'2013-02-21 08:27:07','USER_LOGIN',1,'2013-02-21 09:27:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(344,'2013-02-23 13:34:13','USER_LOGIN',1,'2013-02-23 14:34:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.69 Safari/537.17',NULL),(345,'2013-02-24 01:06:41','USER_LOGIN_FAILED',1,'2013-02-24 02:06:41',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(346,'2013-02-24 01:06:45','USER_LOGIN_FAILED',1,'2013-02-24 02:06:45',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(347,'2013-02-24 01:06:55','USER_LOGIN_FAILED',1,'2013-02-24 02:06:55',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(348,'2013-02-24 01:07:03','USER_LOGIN_FAILED',1,'2013-02-24 02:07:03',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(349,'2013-02-24 01:07:21','USER_LOGIN_FAILED',1,'2013-02-24 02:07:21',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(350,'2013-02-24 01:08:12','USER_LOGIN_FAILED',1,'2013-02-24 02:08:12',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(351,'2013-02-24 01:08:42','USER_LOGIN_FAILED',1,'2013-02-24 02:08:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(352,'2013-02-24 01:08:50','USER_LOGIN_FAILED',1,'2013-02-24 02:08:50',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(353,'2013-02-24 01:09:08','USER_LOGIN_FAILED',1,'2013-02-24 02:09:08',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(354,'2013-02-24 01:09:42','USER_LOGIN_FAILED',1,'2013-02-24 02:09:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(355,'2013-02-24 01:09:50','USER_LOGIN_FAILED',1,'2013-02-24 02:09:50',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(356,'2013-02-24 01:10:05','USER_LOGIN_FAILED',1,'2013-02-24 02:10:05',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(357,'2013-02-24 01:10:22','USER_LOGIN_FAILED',1,'2013-02-24 02:10:22',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(358,'2013-02-24 01:10:30','USER_LOGIN_FAILED',1,'2013-02-24 02:10:30',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(359,'2013-02-24 01:10:56','USER_LOGIN_FAILED',1,'2013-02-24 02:10:56',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(360,'2013-02-24 01:11:26','USER_LOGIN_FAILED',1,'2013-02-24 02:11:26',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(361,'2013-02-24 01:12:06','USER_LOGIN_FAILED',1,'2013-02-24 02:12:06',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(362,'2013-02-24 01:21:14','USER_LOGIN_FAILED',1,'2013-02-24 02:21:14',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(363,'2013-02-24 01:21:25','USER_LOGIN_FAILED',1,'2013-02-24 02:21:25',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(364,'2013-02-24 01:21:54','USER_LOGIN_FAILED',1,'2013-02-24 02:21:54',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(365,'2013-02-24 01:22:14','USER_LOGIN_FAILED',1,'2013-02-24 02:22:14',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(366,'2013-02-24 01:22:37','USER_LOGIN_FAILED',1,'2013-02-24 02:22:37',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(367,'2013-02-24 01:23:01','USER_LOGIN_FAILED',1,'2013-02-24 02:23:01',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(368,'2013-02-24 01:23:39','USER_LOGIN_FAILED',1,'2013-02-24 02:23:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(369,'2013-02-24 01:24:04','USER_LOGIN_FAILED',1,'2013-02-24 02:24:04',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(370,'2013-02-24 01:24:39','USER_LOGIN_FAILED',1,'2013-02-24 02:24:39',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(371,'2013-02-24 01:25:01','USER_LOGIN_FAILED',1,'2013-02-24 02:25:01',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(372,'2013-02-24 01:25:12','USER_LOGIN_FAILED',1,'2013-02-24 02:25:12',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(373,'2013-02-24 01:27:30','USER_LOGIN_FAILED',1,'2013-02-24 02:27:30',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(374,'2013-02-24 01:28:00','USER_LOGIN_FAILED',1,'2013-02-24 02:28:00',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(375,'2013-02-24 01:28:35','USER_LOGIN_FAILED',1,'2013-02-24 02:28:35',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(376,'2013-02-24 01:29:03','USER_LOGIN_FAILED',1,'2013-02-24 02:29:03',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(377,'2013-02-24 01:29:55','USER_LOGIN_FAILED',1,'2013-02-24 02:29:55',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(378,'2013-02-24 01:32:40','USER_LOGIN_FAILED',1,'2013-02-24 02:32:40',NULL,'Bad value for login or password - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(379,'2013-02-24 01:39:33','USER_LOGIN_FAILED',1,'2013-02-24 02:39:33',NULL,'Identifiants login ou mot de passe incorrects - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(380,'2013-02-24 01:39:38','USER_LOGIN_FAILED',1,'2013-02-24 02:39:38',NULL,'Identifiants login ou mot de passe incorrects - login=aa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(381,'2013-02-24 01:39:47','USER_LOGIN_FAILED',1,'2013-02-24 02:39:47',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(382,'2013-02-24 01:40:54','USER_LOGIN_FAILED',1,'2013-02-24 02:40:54',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(383,'2013-02-24 01:47:57','USER_LOGIN_FAILED',1,'2013-02-24 02:47:57',NULL,'Identifiants login ou mot de passe incorrects - login=lmkm','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(384,'2013-02-24 01:48:05','USER_LOGIN_FAILED',1,'2013-02-24 02:48:05',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(385,'2013-02-24 01:48:07','USER_LOGIN_FAILED',1,'2013-02-24 02:48:07',NULL,'Unknown column \'u.lastname\' in \'field list\'','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(386,'2013-02-24 01:48:35','USER_LOGIN',1,'2013-02-24 02:48:35',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(387,'2013-02-24 01:56:32','USER_LOGIN',1,'2013-02-24 02:56:32',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL),(388,'2013-02-24 02:05:55','USER_LOGOUT',1,'2013-02-24 03:05:55',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(389,'2013-02-24 02:39:52','USER_LOGIN',1,'2013-02-24 03:39:52',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(390,'2013-02-24 02:51:10','USER_LOGOUT',1,'2013-02-24 03:51:10',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(391,'2013-02-24 12:46:41','USER_LOGIN',1,'2013-02-24 13:46:41',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(392,'2013-02-24 12:46:52','USER_LOGOUT',1,'2013-02-24 13:46:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(393,'2013-02-24 12:46:56','USER_LOGIN',1,'2013-02-24 13:46:56',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(394,'2013-02-24 12:47:56','USER_LOGOUT',1,'2013-02-24 13:47:56',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(395,'2013-02-24 12:48:00','USER_LOGIN',1,'2013-02-24 13:48:00',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(396,'2013-02-24 12:48:11','USER_LOGOUT',1,'2013-02-24 13:48:11',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(397,'2013-02-24 12:48:32','USER_LOGIN',1,'2013-02-24 13:48:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(398,'2013-02-24 12:52:22','USER_LOGOUT',1,'2013-02-24 13:52:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(399,'2013-02-24 12:52:27','USER_LOGIN',1,'2013-02-24 13:52:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(400,'2013-02-24 12:52:54','USER_LOGOUT',1,'2013-02-24 13:52:54',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(401,'2013-02-24 12:52:59','USER_LOGIN',1,'2013-02-24 13:52:59',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(402,'2013-02-24 12:55:39','USER_LOGOUT',1,'2013-02-24 13:55:39',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(403,'2013-02-24 12:55:59','USER_LOGIN',1,'2013-02-24 13:55:59',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(404,'2013-02-24 12:56:07','USER_LOGOUT',1,'2013-02-24 13:56:07',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(405,'2013-02-24 12:56:23','USER_LOGIN',1,'2013-02-24 13:56:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(406,'2013-02-24 12:56:46','USER_LOGOUT',1,'2013-02-24 13:56:46',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(407,'2013-02-24 12:58:30','USER_LOGIN',1,'2013-02-24 13:58:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(408,'2013-02-24 12:58:33','USER_LOGOUT',1,'2013-02-24 13:58:33',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(409,'2013-02-24 12:58:51','USER_LOGIN',1,'2013-02-24 13:58:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(410,'2013-02-24 12:58:58','USER_LOGOUT',1,'2013-02-24 13:58:58',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(411,'2013-02-24 13:18:53','USER_LOGIN',1,'2013-02-24 14:18:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(412,'2013-02-24 13:19:52','USER_LOGOUT',1,'2013-02-24 14:19:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(413,'2013-02-24 15:39:31','USER_LOGIN_FAILED',1,'2013-02-24 16:39:31',NULL,'ErrorBadValueForCode - login=admin','127.0.0.1',NULL,NULL),(414,'2013-02-24 15:42:07','USER_LOGIN',1,'2013-02-24 16:42:07',1,'(UserLogged,admin)','127.0.0.1',NULL,NULL),(415,'2013-02-24 15:42:52','USER_LOGOUT',1,'2013-02-24 16:42:52',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(416,'2013-02-24 16:04:21','USER_LOGIN',1,'2013-02-24 17:04:21',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL),(417,'2013-02-24 16:11:28','USER_LOGIN_FAILED',1,'2013-02-24 17:11:28',NULL,'ErrorBadValueForCode - login=admin','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(418,'2013-02-24 16:11:37','USER_LOGIN',1,'2013-02-24 17:11:37',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(419,'2013-02-24 16:36:52','USER_LOGOUT',1,'2013-02-24 17:36:52',1,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1',NULL),(420,'2013-02-24 16:40:37','USER_LOGIN',1,'2013-02-24 17:40:37',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(421,'2013-02-24 16:57:16','USER_LOGIN',1,'2013-02-24 17:57:16',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL),(422,'2013-02-24 17:01:30','USER_LOGOUT',1,'2013-02-24 18:01:30',1,'(UserLogoff,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL),(423,'2013-02-24 17:02:33','USER_LOGIN',1,'2013-02-24 18:02:33',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(424,'2013-02-24 17:14:22','USER_LOGOUT',1,'2013-02-24 18:14:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(425,'2013-02-24 17:15:07','USER_LOGIN_FAILED',1,'2013-02-24 18:15:07',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(426,'2013-02-24 17:15:20','USER_LOGIN',1,'2013-02-24 18:15:20',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(427,'2013-02-24 17:20:14','USER_LOGIN',1,'2013-02-24 18:20:14',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(428,'2013-02-24 17:20:51','USER_LOGIN',1,'2013-02-24 18:20:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(429,'2013-02-24 17:20:54','USER_LOGOUT',1,'2013-02-24 18:20:54',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(430,'2013-02-24 17:21:19','USER_LOGIN',1,'2013-02-24 18:21:19',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(431,'2013-02-24 17:32:35','USER_LOGIN',1,'2013-02-24 18:32:35',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (Linux; U; Android 2.2; en-us; sdk Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 - 2131034114',NULL),(432,'2013-02-24 18:28:48','USER_LOGIN',1,'2013-02-24 19:28:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(433,'2013-02-24 18:29:27','USER_LOGOUT',1,'2013-02-24 19:29:27',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(434,'2013-02-24 18:29:32','USER_LOGIN',1,'2013-02-24 19:29:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7',NULL),(435,'2013-02-24 20:13:13','USER_LOGOUT',1,'2013-02-24 21:13:13',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(436,'2013-02-24 20:13:17','USER_LOGIN',1,'2013-02-24 21:13:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(437,'2013-02-25 08:57:16','USER_LOGIN',1,'2013-02-25 09:57:16',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(438,'2013-02-25 08:57:59','USER_LOGOUT',1,'2013-02-25 09:57:59',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(439,'2013-02-25 09:15:02','USER_LOGIN',1,'2013-02-25 10:15:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(440,'2013-02-25 09:15:50','USER_LOGOUT',1,'2013-02-25 10:15:50',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(441,'2013-02-25 09:15:57','USER_LOGIN',1,'2013-02-25 10:15:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(442,'2013-02-25 09:16:12','USER_LOGOUT',1,'2013-02-25 10:16:12',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(443,'2013-02-25 09:16:19','USER_LOGIN',1,'2013-02-25 10:16:19',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(444,'2013-02-25 09:16:25','USER_LOGOUT',1,'2013-02-25 10:16:25',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(445,'2013-02-25 09:16:39','USER_LOGIN_FAILED',1,'2013-02-25 10:16:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(446,'2013-02-25 09:16:42','USER_LOGIN_FAILED',1,'2013-02-25 10:16:42',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(447,'2013-02-25 09:16:54','USER_LOGIN_FAILED',1,'2013-02-25 10:16:54',NULL,'Identificadors d'usuari o contrasenya incorrectes - login=gfdg','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(448,'2013-02-25 09:17:53','USER_LOGIN',1,'2013-02-25 10:17:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(449,'2013-02-25 09:18:37','USER_LOGOUT',1,'2013-02-25 10:18:37',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(450,'2013-02-25 09:18:41','USER_LOGIN',1,'2013-02-25 10:18:41',4,'(UserLogged,aaa)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(451,'2013-02-25 09:18:47','USER_LOGOUT',1,'2013-02-25 10:18:47',4,'(UserLogoff,aaa)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(452,'2013-02-25 10:05:34','USER_LOGIN',1,'2013-02-25 11:05:34',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(453,'2013-02-26 21:51:40','USER_LOGIN',1,'2013-02-26 22:51:40',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(454,'2013-02-26 23:30:06','USER_LOGIN',1,'2013-02-27 00:30:06',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(455,'2013-02-27 14:13:11','USER_LOGIN',1,'2013-02-27 15:13:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(456,'2013-02-27 18:12:06','USER_LOGIN_FAILED',1,'2013-02-27 19:12:06',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(457,'2013-02-27 18:12:10','USER_LOGIN',1,'2013-02-27 19:12:10',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(458,'2013-02-27 20:20:08','USER_LOGIN',1,'2013-02-27 21:20:08',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(459,'2013-03-01 22:12:03','USER_LOGIN',1,'2013-03-01 23:12:03',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(460,'2013-03-02 11:45:50','USER_LOGIN',1,'2013-03-02 12:45:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(461,'2013-03-02 15:53:51','USER_LOGIN_FAILED',1,'2013-03-02 16:53:51',NULL,'Identifiants login ou mot de passe incorrects - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(462,'2013-03-02 15:53:53','USER_LOGIN',1,'2013-03-02 16:53:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(463,'2013-03-02 18:32:32','USER_LOGIN',1,'2013-03-02 19:32:32',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(464,'2013-03-02 22:59:36','USER_LOGIN',1,'2013-03-02 23:59:36',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(465,'2013-03-03 16:26:26','USER_LOGIN',1,'2013-03-03 17:26:26',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(466,'2013-03-03 22:50:27','USER_LOGIN',1,'2013-03-03 23:50:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(467,'2013-03-04 08:29:27','USER_LOGIN',1,'2013-03-04 09:29:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(468,'2013-03-04 18:27:28','USER_LOGIN',1,'2013-03-04 19:27:28',1,'(UserLogged,admin)','192.168.0.254','Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; NP06)',NULL),(469,'2013-03-04 19:27:23','USER_LOGIN',1,'2013-03-04 20:27:23',1,'(UserLogged,admin)','192.168.0.254','Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)',NULL),(470,'2013-03-04 19:35:14','USER_LOGIN',1,'2013-03-04 20:35:14',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(471,'2013-03-04 19:55:49','USER_LOGIN',1,'2013-03-04 20:55:49',1,'(UserLogged,admin)','192.168.0.254','Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)',NULL),(472,'2013-03-04 21:16:13','USER_LOGIN',1,'2013-03-04 22:16:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(473,'2013-03-05 10:17:30','USER_LOGIN',1,'2013-03-05 11:17:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(474,'2013-03-05 11:02:43','USER_LOGIN',1,'2013-03-05 12:02:43',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(475,'2013-03-05 23:14:39','USER_LOGIN',1,'2013-03-06 00:14:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(476,'2013-03-06 08:58:57','USER_LOGIN',1,'2013-03-06 09:58:57',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(477,'2013-03-06 14:29:40','USER_LOGIN',1,'2013-03-06 15:29:40',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(478,'2013-03-06 21:53:02','USER_LOGIN',1,'2013-03-06 22:53:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(479,'2013-03-07 21:14:39','USER_LOGIN',1,'2013-03-07 22:14:39',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(480,'2013-03-08 00:06:05','USER_LOGIN',1,'2013-03-08 01:06:05',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(481,'2013-03-08 01:38:13','USER_LOGIN',1,'2013-03-08 02:38:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(482,'2013-03-08 08:59:50','USER_LOGIN',1,'2013-03-08 09:59:50',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(483,'2013-03-09 12:08:51','USER_LOGIN',1,'2013-03-09 13:08:51',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(484,'2013-03-09 15:19:53','USER_LOGIN',1,'2013-03-09 16:19:53',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(495,'2013-03-09 18:06:21','USER_LOGIN',1,'2013-03-09 19:06:21',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(496,'2013-03-09 20:01:24','USER_LOGIN',1,'2013-03-09 21:01:24',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(497,'2013-03-09 23:36:45','USER_LOGIN',1,'2013-03-10 00:36:45',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(498,'2013-03-10 14:37:13','USER_LOGIN',1,'2013-03-10 15:37:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(499,'2013-03-10 17:54:12','USER_LOGIN',1,'2013-03-10 18:54:12',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(500,'2013-03-11 08:57:09','USER_LOGIN',1,'2013-03-11 09:57:09',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(501,'2013-03-11 22:05:13','USER_LOGIN',1,'2013-03-11 23:05:13',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(502,'2013-03-12 08:34:27','USER_LOGIN',1,'2013-03-12 09:34:27',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(503,'2013-03-13 09:11:02','USER_LOGIN',1,'2013-03-13 10:11:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(504,'2013-03-13 10:02:11','USER_LOGIN',1,'2013-03-13 11:02:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(505,'2013-03-13 13:20:58','USER_LOGIN',1,'2013-03-13 14:20:58',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(506,'2013-03-13 16:19:28','USER_LOGIN',1,'2013-03-13 17:19:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(507,'2013-03-13 18:34:30','USER_LOGIN',1,'2013-03-13 19:34:30',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(508,'2013-03-14 08:25:02','USER_LOGIN',1,'2013-03-14 09:25:02',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(509,'2013-03-14 19:15:22','USER_LOGIN',1,'2013-03-14 20:15:22',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(510,'2013-03-14 21:58:53','USER_LOGIN',1,'2013-03-14 22:58:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(511,'2013-03-14 21:58:59','USER_LOGOUT',1,'2013-03-14 22:58:59',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(512,'2013-03-14 21:59:07','USER_LOGIN',1,'2013-03-14 22:59:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(513,'2013-03-14 22:58:22','USER_LOGOUT',1,'2013-03-14 23:58:22',1,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(514,'2013-03-14 23:00:25','USER_LOGIN',1,'2013-03-15 00:00:25',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(515,'2013-03-16 12:14:28','USER_LOGIN',1,'2013-03-16 13:14:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(516,'2013-03-16 16:09:01','USER_LOGIN',1,'2013-03-16 17:09:01',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(517,'2013-03-16 16:57:11','USER_LOGIN',1,'2013-03-16 17:57:11',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(518,'2013-03-16 19:31:31','USER_LOGIN',1,'2013-03-16 20:31:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.97 Safari/537.22',NULL),(519,'2013-03-17 17:44:39','USER_LOGIN',1,'2013-03-17 18:44:39',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(520,'2013-03-17 20:40:57','USER_LOGIN',1,'2013-03-17 21:40:57',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(521,'2013-03-17 23:14:05','USER_LOGIN',1,'2013-03-18 00:14:05',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(522,'2013-03-17 23:28:47','USER_LOGOUT',1,'2013-03-18 00:28:47',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(523,'2013-03-17 23:28:54','USER_LOGIN',1,'2013-03-18 00:28:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(524,'2013-03-18 17:37:30','USER_LOGIN',1,'2013-03-18 18:37:30',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(525,'2013-03-18 18:11:37','USER_LOGIN',1,'2013-03-18 19:11:37',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(526,'2013-03-19 08:35:08','USER_LOGIN',1,'2013-03-19 09:35:08',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(527,'2013-03-19 09:20:23','USER_LOGIN',1,'2013-03-19 10:20:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(528,'2013-03-20 13:17:13','USER_LOGIN',1,'2013-03-20 14:17:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(529,'2013-03-20 14:44:31','USER_LOGIN',1,'2013-03-20 15:44:31',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(530,'2013-03-20 18:24:25','USER_LOGIN',1,'2013-03-20 19:24:25',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(531,'2013-03-20 19:15:54','USER_LOGIN',1,'2013-03-20 20:15:54',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(532,'2013-03-21 18:40:47','USER_LOGIN',1,'2013-03-21 19:40:47',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(533,'2013-03-21 21:42:24','USER_LOGIN',1,'2013-03-21 22:42:24',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(534,'2013-03-22 08:39:23','USER_LOGIN',1,'2013-03-22 09:39:23',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(535,'2013-03-23 13:04:55','USER_LOGIN',1,'2013-03-23 14:04:55',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(536,'2013-03-23 15:47:43','USER_LOGIN',1,'2013-03-23 16:47:43',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(537,'2013-03-23 22:56:36','USER_LOGIN',1,'2013-03-23 23:56:36',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(538,'2013-03-24 01:22:32','USER_LOGIN',1,'2013-03-24 02:22:32',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(539,'2013-03-24 14:40:42','USER_LOGIN',1,'2013-03-24 15:40:42',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(540,'2013-03-24 15:30:26','USER_LOGOUT',1,'2013-03-24 16:30:26',1,'(UserLogoff,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(541,'2013-03-24 15:30:29','USER_LOGIN',1,'2013-03-24 16:30:29',2,'(UserLogged,demo)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(542,'2013-03-24 15:49:40','USER_LOGOUT',1,'2013-03-24 16:49:40',2,'(UserLogoff,demo)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(543,'2013-03-24 15:49:48','USER_LOGIN',1,'2013-03-24 16:49:48',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(544,'2013-03-24 15:52:35','USER_MODIFY',1,'2013-03-24 16:52:35',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(545,'2013-03-24 15:52:52','USER_MODIFY',1,'2013-03-24 16:52:52',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(546,'2013-03-24 15:53:09','USER_MODIFY',1,'2013-03-24 16:53:09',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(547,'2013-03-24 15:53:23','USER_MODIFY',1,'2013-03-24 16:53:23',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(548,'2013-03-24 16:00:04','USER_MODIFY',1,'2013-03-24 17:00:04',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(549,'2013-03-24 16:01:50','USER_MODIFY',1,'2013-03-24 17:01:50',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(550,'2013-03-24 16:10:14','USER_MODIFY',1,'2013-03-24 17:10:14',1,'Modification utilisateur zzzg','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(551,'2013-03-24 16:55:13','USER_LOGIN',1,'2013-03-24 17:55:13',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(552,'2013-03-24 17:44:29','USER_LOGIN',1,'2013-03-24 18:44:29',1,'(UserLogged,admin)','::1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',NULL),(553,'2013-09-08 23:06:26','USER_LOGIN',1,'2013-09-09 01:06:26',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36',NULL),(554,'2013-10-21 22:32:28','USER_LOGIN',1,'2013-10-22 00:32:28',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36',NULL),(555,'2013-10-21 22:32:48','USER_LOGIN',1,'2013-10-22 00:32:48',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.66 Safari/537.36',NULL),(556,'2013-11-07 00:01:51','USER_LOGIN',1,'2013-11-07 01:01:51',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.114 Safari/537.36',NULL),(557,'2014-03-02 15:21:07','USER_LOGIN',1,'2014-03-02 16:21:07',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(558,'2014-03-02 15:36:53','USER_LOGIN',1,'2014-03-02 16:36:53',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(559,'2014-03-02 18:54:23','USER_LOGIN',1,'2014-03-02 19:54:23',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(560,'2014-03-02 19:11:17','USER_LOGIN',1,'2014-03-02 20:11:17',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(561,'2014-03-03 18:19:24','USER_LOGIN',1,'2014-03-03 19:19:24',1,'(UserLogged,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36',NULL),(562,'2014-12-21 12:51:38','USER_LOGIN',1,'2014-12-21 13:51:38',1,'(UserLogged,admin) - TZ=1;TZString=CET;Screen=1920x969','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36',NULL),(563,'2014-12-21 19:52:09','USER_LOGIN',1,'2014-12-21 20:52:09',1,'(UserLogged,admin) - TZ=1;TZString=CET;Screen=1920x969','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36',NULL),(566,'2015-10-03 08:49:43','USER_NEW_PASSWORD',1,'2015-10-03 10:49:43',1,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(567,'2015-10-03 08:49:43','USER_MODIFY',1,'2015-10-03 10:49:43',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(568,'2015-10-03 09:03:12','USER_MODIFY',1,'2015-10-03 11:03:12',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(569,'2015-10-03 09:03:42','USER_MODIFY',1,'2015-10-03 11:03:42',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(570,'2015-10-03 09:07:36','USER_MODIFY',1,'2015-10-03 11:07:36',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(571,'2015-10-03 09:08:58','USER_NEW_PASSWORD',1,'2015-10-03 11:08:58',1,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(572,'2015-10-03 09:08:58','USER_MODIFY',1,'2015-10-03 11:08:58',1,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(573,'2015-10-03 09:09:23','USER_MODIFY',1,'2015-10-03 11:09:23',1,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(574,'2015-10-03 09:11:04','USER_NEW_PASSWORD',1,'2015-10-03 11:11:04',1,'Password change for athestudent','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(575,'2015-10-03 09:11:04','USER_MODIFY',1,'2015-10-03 11:11:04',1,'User athestudent modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(576,'2015-10-03 09:11:53','USER_MODIFY',1,'2015-10-03 11:11:53',1,'User abookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(577,'2015-10-03 09:42:12','USER_LOGIN_FAILED',1,'2015-10-03 11:42:11',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(578,'2015-10-03 09:42:19','USER_LOGIN_FAILED',1,'2015-10-03 11:42:19',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(579,'2015-10-03 09:42:42','USER_LOGIN_FAILED',1,'2015-10-03 11:42:42',NULL,'Bad value for login or password - login=aeinstein','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(580,'2015-10-03 09:43:50','USER_LOGIN',1,'2015-10-03 11:43:50',1,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x788','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(581,'2015-10-03 09:44:44','GROUP_MODIFY',1,'2015-10-03 11:44:44',1,'Group Sale representatives modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(582,'2015-10-03 09:46:25','GROUP_CREATE',1,'2015-10-03 11:46:25',1,'Group Management created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(583,'2015-10-03 09:46:46','GROUP_CREATE',1,'2015-10-03 11:46:46',1,'Group Scientists created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(584,'2015-10-03 09:47:41','USER_CREATE',1,'2015-10-03 11:47:41',1,'User mcurie created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(585,'2015-10-03 09:47:41','USER_NEW_PASSWORD',1,'2015-10-03 11:47:41',1,'Password change for mcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(586,'2015-10-03 09:47:53','USER_MODIFY',1,'2015-10-03 11:47:53',1,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(587,'2015-10-03 09:48:32','USER_DELETE',1,'2015-10-03 11:48:32',1,'User bbb removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(588,'2015-10-03 09:48:52','USER_MODIFY',1,'2015-10-03 11:48:52',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(589,'2015-10-03 10:01:28','USER_MODIFY',1,'2015-10-03 12:01:28',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(590,'2015-10-03 10:01:39','USER_MODIFY',1,'2015-10-03 12:01:39',1,'User bookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(591,'2015-10-05 06:32:38','USER_LOGIN_FAILED',1,'2015-10-05 08:32:38',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(592,'2015-10-05 06:32:44','USER_LOGIN',1,'2015-10-05 08:32:44',1,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(593,'2015-10-05 07:07:52','USER_CREATE',1,'2015-10-05 09:07:52',1,'User atheceo created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(594,'2015-10-05 07:07:52','USER_NEW_PASSWORD',1,'2015-10-05 09:07:52',1,'Password change for atheceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(595,'2015-10-05 07:09:08','USER_NEW_PASSWORD',1,'2015-10-05 09:09:08',1,'Password change for aeinstein','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(596,'2015-10-05 07:09:08','USER_MODIFY',1,'2015-10-05 09:09:08',1,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(597,'2015-10-05 07:09:46','USER_CREATE',1,'2015-10-05 09:09:46',1,'User admin created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(598,'2015-10-05 07:09:46','USER_NEW_PASSWORD',1,'2015-10-05 09:09:46',1,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(599,'2015-10-05 07:10:20','USER_MODIFY',1,'2015-10-05 09:10:20',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(600,'2015-10-05 07:10:48','USER_MODIFY',1,'2015-10-05 09:10:48',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(601,'2015-10-05 07:11:22','USER_NEW_PASSWORD',1,'2015-10-05 09:11:22',1,'Password change for bbookkeeper','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(602,'2015-10-05 07:11:22','USER_MODIFY',1,'2015-10-05 09:11:22',1,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(603,'2015-10-05 07:12:37','USER_MODIFY',1,'2015-10-05 09:12:37',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(604,'2015-10-05 07:13:27','USER_MODIFY',1,'2015-10-05 09:13:27',1,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(605,'2015-10-05 07:13:52','USER_MODIFY',1,'2015-10-05 09:13:52',1,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(606,'2015-10-05 07:14:35','USER_LOGOUT',1,'2015-10-05 09:14:35',1,'(UserLogoff,aeinstein)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(607,'2015-10-05 07:14:40','USER_LOGIN_FAILED',1,'2015-10-05 09:14:40',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(608,'2015-10-05 07:14:44','USER_LOGIN_FAILED',1,'2015-10-05 09:14:44',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(609,'2015-10-05 07:14:49','USER_LOGIN',1,'2015-10-05 09:14:49',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(610,'2015-10-05 07:57:18','USER_MODIFY',1,'2015-10-05 09:57:18',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(611,'2015-10-05 08:06:54','USER_LOGOUT',1,'2015-10-05 10:06:54',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(612,'2015-10-05 08:07:03','USER_LOGIN',1,'2015-10-05 10:07:03',11,'(UserLogged,atheceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(613,'2015-10-05 19:18:46','USER_LOGIN',1,'2015-10-05 21:18:46',11,'(UserLogged,atheceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(614,'2015-10-05 19:29:35','USER_CREATE',1,'2015-10-05 21:29:35',11,'User ccommercy created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(615,'2015-10-05 19:29:35','USER_NEW_PASSWORD',1,'2015-10-05 21:29:35',11,'Password change for ccommercy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(616,'2015-10-05 19:30:13','GROUP_CREATE',1,'2015-10-05 21:30:13',11,'Group Commercial created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(617,'2015-10-05 19:31:37','USER_NEW_PASSWORD',1,'2015-10-05 21:31:37',11,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(618,'2015-10-05 19:31:37','USER_MODIFY',1,'2015-10-05 21:31:37',11,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(619,'2015-10-05 19:32:00','USER_MODIFY',1,'2015-10-05 21:32:00',11,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(620,'2015-10-05 19:33:33','USER_CREATE',1,'2015-10-05 21:33:33',11,'User sscientol created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(621,'2015-10-05 19:33:33','USER_NEW_PASSWORD',1,'2015-10-05 21:33:33',11,'Password change for sscientol','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(622,'2015-10-05 19:33:47','USER_NEW_PASSWORD',1,'2015-10-05 21:33:47',11,'Password change for mcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(623,'2015-10-05 19:33:47','USER_MODIFY',1,'2015-10-05 21:33:47',11,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(624,'2015-10-05 19:34:23','USER_NEW_PASSWORD',1,'2015-10-05 21:34:23',11,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(625,'2015-10-05 19:34:23','USER_MODIFY',1,'2015-10-05 21:34:23',11,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(626,'2015-10-05 19:34:42','USER_MODIFY',1,'2015-10-05 21:34:42',11,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(627,'2015-10-05 19:36:06','USER_NEW_PASSWORD',1,'2015-10-05 21:36:06',11,'Password change for ccommercy','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(628,'2015-10-05 19:36:06','USER_MODIFY',1,'2015-10-05 21:36:06',11,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(629,'2015-10-05 19:36:57','USER_NEW_PASSWORD',1,'2015-10-05 21:36:57',11,'Password change for atheceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(630,'2015-10-05 19:36:57','USER_MODIFY',1,'2015-10-05 21:36:57',11,'User atheceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(631,'2015-10-05 19:37:27','USER_LOGOUT',1,'2015-10-05 21:37:27',11,'(UserLogoff,atheceo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(632,'2015-10-05 19:37:35','USER_LOGIN_FAILED',1,'2015-10-05 21:37:35',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(633,'2015-10-05 19:37:39','USER_LOGIN_FAILED',1,'2015-10-05 21:37:39',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(634,'2015-10-05 19:37:44','USER_LOGIN_FAILED',1,'2015-10-05 21:37:44',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(635,'2015-10-05 19:37:49','USER_LOGIN_FAILED',1,'2015-10-05 21:37:49',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(636,'2015-10-05 19:38:12','USER_LOGIN_FAILED',1,'2015-10-05 21:38:12',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(637,'2015-10-05 19:40:48','USER_LOGIN_FAILED',1,'2015-10-05 21:40:48',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(638,'2015-10-05 19:40:55','USER_LOGIN',1,'2015-10-05 21:40:55',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(639,'2015-10-05 19:43:34','USER_MODIFY',1,'2015-10-05 21:43:34',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(640,'2015-10-05 19:45:43','USER_CREATE',1,'2015-10-05 21:45:43',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(641,'2015-10-05 19:45:43','USER_NEW_PASSWORD',1,'2015-10-05 21:45:43',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(642,'2015-10-05 19:46:18','USER_DELETE',1,'2015-10-05 21:46:18',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(643,'2015-10-05 19:47:09','USER_MODIFY',1,'2015-10-05 21:47:09',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(644,'2015-10-05 19:47:22','USER_MODIFY',1,'2015-10-05 21:47:22',12,'User demo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(645,'2015-10-05 19:52:05','USER_MODIFY',1,'2015-10-05 21:52:05',12,'User sscientol modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(646,'2015-10-05 19:52:23','USER_MODIFY',1,'2015-10-05 21:52:23',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(647,'2015-10-05 19:54:54','USER_NEW_PASSWORD',1,'2015-10-05 21:54:54',12,'Password change for zzeceo','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(648,'2015-10-05 19:54:54','USER_MODIFY',1,'2015-10-05 21:54:54',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(649,'2015-10-05 19:57:02','USER_MODIFY',1,'2015-10-05 21:57:02',12,'User zzeceo modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(650,'2015-10-05 19:57:57','USER_NEW_PASSWORD',1,'2015-10-05 21:57:57',12,'Password change for pcurie','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(651,'2015-10-05 19:57:57','USER_MODIFY',1,'2015-10-05 21:57:57',12,'User pcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(652,'2015-10-05 19:59:42','USER_NEW_PASSWORD',1,'2015-10-05 21:59:42',12,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(653,'2015-10-05 19:59:42','USER_MODIFY',1,'2015-10-05 21:59:42',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(654,'2015-10-05 20:00:21','USER_MODIFY',1,'2015-10-05 22:00:21',12,'User adminx modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(655,'2015-10-05 20:05:36','USER_MODIFY',1,'2015-10-05 22:05:36',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(656,'2015-10-05 20:06:25','USER_MODIFY',1,'2015-10-05 22:06:25',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(657,'2015-10-05 20:07:18','USER_MODIFY',1,'2015-10-05 22:07:18',12,'User mcurie modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(658,'2015-10-05 20:07:36','USER_MODIFY',1,'2015-10-05 22:07:36',12,'User aeinstein modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(659,'2015-10-05 20:08:34','USER_MODIFY',1,'2015-10-05 22:08:34',12,'User bbookkeeper modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(660,'2015-10-05 20:47:52','USER_CREATE',1,'2015-10-05 22:47:52',12,'User cc1 created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(661,'2015-10-05 20:47:52','USER_NEW_PASSWORD',1,'2015-10-05 22:47:52',12,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(662,'2015-10-05 20:47:55','USER_LOGOUT',1,'2015-10-05 22:47:55',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(663,'2015-10-05 20:48:08','USER_LOGIN',1,'2015-10-05 22:48:08',11,'(UserLogged,zzeceo) - TZ=1;TZString=Europe/Berlin;Screen=1590x434','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(664,'2015-10-05 20:48:39','USER_CREATE',1,'2015-10-05 22:48:39',11,'User cc2 created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(665,'2015-10-05 20:48:39','USER_NEW_PASSWORD',1,'2015-10-05 22:48:39',11,'Password change for cc2','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(666,'2015-10-05 20:48:59','USER_NEW_PASSWORD',1,'2015-10-05 22:48:59',11,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(667,'2015-10-05 20:48:59','USER_MODIFY',1,'2015-10-05 22:48:59',11,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(668,'2015-10-05 21:06:36','USER_LOGOUT',1,'2015-10-05 23:06:35',11,'(UserLogoff,zzeceo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(669,'2015-10-05 21:06:44','USER_LOGIN_FAILED',1,'2015-10-05 23:06:44',NULL,'Bad value for login or password - login=cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(670,'2015-10-05 21:07:12','USER_LOGIN_FAILED',1,'2015-10-05 23:07:12',NULL,'Bad value for login or password - login=cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(671,'2015-10-05 21:07:19','USER_LOGIN_FAILED',1,'2015-10-05 23:07:19',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(672,'2015-10-05 21:07:27','USER_LOGIN_FAILED',1,'2015-10-05 23:07:27',NULL,'Bad value for login or password - login=admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(673,'2015-10-05 21:07:32','USER_LOGIN',1,'2015-10-05 23:07:32',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(674,'2015-10-05 21:12:28','USER_NEW_PASSWORD',1,'2015-10-05 23:12:28',12,'Password change for cc1','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(675,'2015-10-05 21:12:28','USER_MODIFY',1,'2015-10-05 23:12:28',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(676,'2015-10-05 21:13:00','USER_CREATE',1,'2015-10-05 23:13:00',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(677,'2015-10-05 21:13:00','USER_NEW_PASSWORD',1,'2015-10-05 23:13:00',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(678,'2015-10-05 21:13:40','USER_DELETE',1,'2015-10-05 23:13:40',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(679,'2015-10-05 21:14:47','USER_LOGOUT',1,'2015-10-05 23:14:47',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(680,'2015-10-05 21:14:56','USER_LOGIN',1,'2015-10-05 23:14:56',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(681,'2015-10-05 21:15:56','USER_LOGOUT',1,'2015-10-05 23:15:56',16,'(UserLogoff,cc1)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(682,'2015-10-05 21:16:06','USER_LOGIN',1,'2015-10-05 23:16:06',17,'(UserLogged,cc2) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(683,'2015-10-05 21:37:25','USER_LOGOUT',1,'2015-10-05 23:37:25',17,'(UserLogoff,cc2)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(684,'2015-10-05 21:37:31','USER_LOGIN',1,'2015-10-05 23:37:31',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(685,'2015-10-05 21:43:53','USER_LOGOUT',1,'2015-10-05 23:43:53',16,'(UserLogoff,cc1)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(686,'2015-10-05 21:44:00','USER_LOGIN',1,'2015-10-05 23:44:00',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(687,'2015-10-05 21:46:17','USER_LOGOUT',1,'2015-10-05 23:46:17',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(688,'2015-10-05 21:46:24','USER_LOGIN',1,'2015-10-05 23:46:24',16,'(UserLogged,cc1) - TZ=1;TZString=Europe/Berlin;Screen=1590x767','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',NULL),(689,'2015-11-04 15:17:06','USER_LOGIN',1,'2015-11-04 16:17:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(690,'2015-11-15 22:04:04','USER_LOGIN',1,'2015-11-15 23:04:04',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(691,'2015-11-15 22:23:45','USER_MODIFY',1,'2015-11-15 23:23:45',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(692,'2015-11-15 22:24:22','USER_MODIFY',1,'2015-11-15 23:24:22',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(693,'2015-11-15 22:24:53','USER_MODIFY',1,'2015-11-15 23:24:53',12,'User cc2 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(694,'2015-11-15 22:25:17','USER_MODIFY',1,'2015-11-15 23:25:17',12,'User cc1 modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(695,'2015-11-15 22:45:37','USER_LOGOUT',1,'2015-11-15 23:45:37',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(696,'2015-11-18 13:41:02','USER_LOGIN',1,'2015-11-18 14:41:02',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(697,'2015-11-18 14:23:35','USER_LOGIN',1,'2015-11-18 15:23:35',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(698,'2015-11-18 15:15:46','USER_LOGOUT',1,'2015-11-18 16:15:46',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(699,'2015-11-18 15:15:51','USER_LOGIN',1,'2015-11-18 16:15:51',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(700,'2015-11-30 17:52:08','USER_LOGIN',1,'2015-11-30 18:52:08',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(701,'2016-01-10 16:45:43','USER_LOGIN',1,'2016-01-10 17:45:43',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(702,'2016-01-10 16:45:52','USER_LOGOUT',1,'2016-01-10 17:45:52',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(703,'2016-01-10 16:46:06','USER_LOGIN',1,'2016-01-10 17:46:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(704,'2016-01-16 14:53:47','USER_LOGIN',1,'2016-01-16 15:53:47',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(705,'2016-01-16 15:04:29','USER_LOGOUT',1,'2016-01-16 16:04:29',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(706,'2016-01-16 15:04:40','USER_LOGIN',1,'2016-01-16 16:04:40',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(707,'2016-01-22 09:33:26','USER_LOGIN',1,'2016-01-22 10:33:26',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(708,'2016-01-22 09:35:19','USER_LOGOUT',1,'2016-01-22 10:35:19',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(709,'2016-01-22 09:35:29','USER_LOGIN',1,'2016-01-22 10:35:29',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(710,'2016-01-22 10:47:34','USER_CREATE',1,'2016-01-22 11:47:34',12,'User aaa created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(711,'2016-01-22 10:47:34','USER_NEW_PASSWORD',1,'2016-01-22 11:47:34',12,'Password change for aaa','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(712,'2016-01-22 12:07:56','USER_LOGIN',1,'2016-01-22 13:07:56',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(713,'2016-01-22 12:36:25','USER_NEW_PASSWORD',1,'2016-01-22 13:36:25',12,'Password change for admin','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(714,'2016-01-22 12:36:25','USER_MODIFY',1,'2016-01-22 13:36:25',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(715,'2016-01-22 12:56:32','USER_MODIFY',1,'2016-01-22 13:56:32',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(716,'2016-01-22 12:58:05','USER_MODIFY',1,'2016-01-22 13:58:05',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(717,'2016-01-22 13:01:02','USER_MODIFY',1,'2016-01-22 14:01:02',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(718,'2016-01-22 13:01:18','USER_MODIFY',1,'2016-01-22 14:01:18',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(719,'2016-01-22 13:13:42','USER_MODIFY',1,'2016-01-22 14:13:42',12,'User admin modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(720,'2016-01-22 13:15:20','USER_DELETE',1,'2016-01-22 14:15:20',12,'User aaa removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(721,'2016-01-22 13:19:21','USER_LOGOUT',1,'2016-01-22 14:19:21',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(722,'2016-01-22 13:19:32','USER_LOGIN',1,'2016-01-22 14:19:32',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(723,'2016-01-22 13:19:51','USER_LOGOUT',1,'2016-01-22 14:19:51',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(724,'2016-01-22 13:20:01','USER_LOGIN',1,'2016-01-22 14:20:01',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(725,'2016-01-22 13:28:22','USER_LOGOUT',1,'2016-01-22 14:28:22',12,'(UserLogoff,admin)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(726,'2016-01-22 13:28:35','USER_LOGIN',1,'2016-01-22 14:28:35',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(727,'2016-01-22 13:33:54','USER_LOGOUT',1,'2016-01-22 14:33:54',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(728,'2016-01-22 13:34:05','USER_LOGIN',1,'2016-01-22 14:34:05',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(729,'2016-01-22 13:51:46','USER_MODIFY',1,'2016-01-22 14:51:46',12,'User ccommercy modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36',NULL),(730,'2016-01-22 16:20:12','USER_LOGIN',1,'2016-01-22 17:20:12',2,'(UserLogged,demo) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(731,'2016-01-22 16:20:22','USER_LOGOUT',1,'2016-01-22 17:20:22',2,'(UserLogoff,demo)','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(732,'2016-01-22 16:20:36','USER_LOGIN',1,'2016-01-22 17:20:36',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(733,'2016-01-22 16:27:02','USER_CREATE',1,'2016-01-22 17:27:02',12,'User ldestailleur created','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(734,'2016-01-22 16:27:02','USER_NEW_PASSWORD',1,'2016-01-22 17:27:02',12,'Password change for ldestailleur','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(735,'2016-01-22 16:28:34','USER_MODIFY',1,'2016-01-22 17:28:34',12,'User ldestailleur modified','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(736,'2016-01-22 16:30:01','USER_ENABLEDISABLE',1,'2016-01-22 17:30:01',12,'User cc2 activated','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(737,'2016-01-22 17:11:06','USER_LOGIN',1,'2016-01-22 18:11:06',12,'(UserLogged,admin) - TZ=1;TZString=Europe/Berlin;Screen=1600x790','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(738,'2016-01-22 18:00:02','USER_DELETE',1,'2016-01-22 19:00:02',12,'User zzz removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(739,'2016-01-22 18:01:40','USER_DELETE',1,'2016-01-22 19:01:40',12,'User aaab removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL),(740,'2016-01-22 18:01:52','USER_DELETE',1,'2016-01-22 19:01:52',12,'User zzzg removed','127.0.0.1','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36',NULL); /*!40000 ALTER TABLE `llx_events` ENABLE KEYS */; UNLOCK TABLES; @@ -4203,7 +3879,7 @@ CREATE TABLE `llx_expedition` ( LOCK TABLES `llx_expedition` WRITE; /*!40000 ALTER TABLE `llx_expedition` DISABLE KEYS */; -INSERT INTO `llx_expedition` VALUES (1,'2013-02-17 17:22:51','SH1302-0001',1,NULL,1,NULL,NULL,'2011-08-08 03:05:34',1,'2013-02-17 18:22:51',1,NULL,'2011-08-09 00:00:00',NULL,NULL,'',1,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_expedition` VALUES (1,'2016-01-22 17:33:03','SH1302-0001',1,NULL,1,NULL,NULL,'2011-08-08 03:05:34',1,'2013-02-17 18:22:51',1,NULL,'2011-08-09 00:00:00',NULL,NULL,'',1,NULL,NULL,NULL,0,NULL,0,NULL,NULL,NULL,'merou',NULL,NULL); /*!40000 ALTER TABLE `llx_expedition` ENABLE KEYS */; UNLOCK TABLES; @@ -4339,7 +4015,7 @@ CREATE TABLE `llx_expensereport` ( `fk_bank_account` int(11) DEFAULT NULL, `model_pdf` varchar(50) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4348,6 +4024,7 @@ CREATE TABLE `llx_expensereport` ( LOCK TABLES `llx_expensereport` WRITE; /*!40000 ALTER TABLE `llx_expensereport` DISABLE KEYS */; +INSERT INTO `llx_expensereport` VALUES (1,'ADMIN-ER00002-150101',1,2,NULL,8.33000000,1.67000000,0.00000000,0.00000000,10.00000000,'2015-01-01','2015-01-03','2016-01-22 19:03:37','2016-01-22 19:06:50',NULL,NULL,NULL,'2016-01-22 18:06:50',12,NULL,12,12,NULL,NULL,NULL,2,NULL,0,'Holidays',NULL,NULL,NULL,NULL,NULL,NULL),(2,'(PROV2)',1,NULL,NULL,141.67000000,28.33000000,0.00000000,0.00000000,170.00000000,'2015-02-01','2015-02-28','2016-01-22 19:04:44',NULL,NULL,NULL,NULL,'2016-01-22 18:06:21',12,12,NULL,12,NULL,NULL,NULL,0,NULL,0,'Work on projet X','','',NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_expensereport` ENABLE KEYS */; UNLOCK TABLES; @@ -4384,7 +4061,7 @@ CREATE TABLE `llx_expensereport_det` ( `rang` int(11) DEFAULT '0', `import_key` varchar(14) DEFAULT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -4393,6 +4070,7 @@ CREATE TABLE `llx_expensereport_det` ( LOCK TABLES `llx_expensereport_det` WRITE; /*!40000 ALTER TABLE `llx_expensereport_det` DISABLE KEYS */; +INSERT INTO `llx_expensereport_det` VALUES (1,1,3,1,'',-1,1,10,NULL,20.000,0.000,NULL,0.000,NULL,8.33000000,1.67000000,0.00000000,0.00000000,10.00000000,'2015-01-01',0,0,0,NULL),(2,2,3,4,'',-1,1,20,NULL,20.000,0.000,NULL,0.000,NULL,16.67000000,3.33000000,0.00000000,0.00000000,20.00000000,'2015-01-07',0,0,0,NULL),(3,2,2,5,'Train',-1,1,150,NULL,20.000,0.000,NULL,0.000,NULL,125.00000000,25.00000000,0.00000000,0.00000000,150.00000000,'2015-02-05',0,0,0,NULL); /*!40000 ALTER TABLE `llx_expensereport_det` ENABLE KEYS */; UNLOCK TABLES; @@ -4566,7 +4244,7 @@ CREATE TABLE `llx_facture` ( LOCK TABLES `llx_facture` WRITE; /*!40000 ALTER TABLE `llx_facture` DISABLE KEYS */; -INSERT INTO `llx_facture` VALUES (2,'FA1007-0002',1,NULL,NULL,0,NULL,NULL,2,'2010-07-10 18:20:13','2010-07-10',NULL,'2011-08-08 00:54:05',1,10.00000000,NULL,NULL,0,NULL,NULL,0.10000000,0.00000000,0.00000000,0.00000000,46.00000000,46.10000000,2,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2010-07-10',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'FA1107-0006',1,NULL,NULL,0,NULL,NULL,10,'2011-07-18 20:33:35','2011-07-18',NULL,'2012-12-08 16:39:01',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,15.00000000,15.00000000,2,1,NULL,1,NULL,1,NULL,NULL,1,0,'2011-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'FA1108-0003',1,NULL,NULL,0,NULL,NULL,7,'2011-08-01 03:34:11','2011-08-01',NULL,'2011-08-01 01:34:11',1,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,6,'2011-08-01',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(6,'FA1108-0004',1,NULL,NULL,0,NULL,NULL,7,'2011-08-06 20:33:53','2011-08-06',NULL,'2011-08-06 18:35:13',1,0.00000000,NULL,NULL,0,NULL,NULL,0.98000000,0.00000000,0.00000000,0.00000000,5.00000000,5.98000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,4,'2011-08-06','Cash\nReceived : 6 EUR\nRendu : 0.02 EUR\n\n--------------------------------------',NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(8,'FA1108-0005',1,NULL,NULL,3,NULL,NULL,2,'2011-08-08 02:41:44','2011-08-08',NULL,'2011-08-08 00:53:40',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2011-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(9,'FA1108-0007',1,NULL,NULL,3,NULL,NULL,10,'2011-08-08 02:55:14','2011-08-08',NULL,'2011-08-08 00:55:26',0,0.00000000,NULL,NULL,0,NULL,NULL,1.96000000,0.00000000,0.00000000,0.00000000,10.00000000,11.96000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2011-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,'AV1212-0001',1,NULL,NULL,2,NULL,NULL,10,'2012-12-08 17:45:20','2012-12-08','2012-12-08','2012-12-08 16:57:11',0,0.00000000,NULL,NULL,0,NULL,NULL,-0.63000000,0.00000000,0.00000000,0.00000000,-11.00000000,-11.63000000,1,1,NULL,1,3,NULL,NULL,NULL,0,0,'2012-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,'FA1212-0008',1,NULL,NULL,0,NULL,NULL,10,'2012-12-08 17:58:13','2012-12-08','2012-12-08','2012-12-08 16:58:27',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2012-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,'AV1212-0002',1,NULL,NULL,2,NULL,NULL,10,'2012-12-08 18:20:14','2012-12-08','2012-12-08','2012-12-09 17:35:07',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,-5.00000000,2,1,NULL,1,3,NULL,NULL,NULL,0,0,'2012-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'FA1212-0011',1,NULL,NULL,0,NULL,NULL,7,'2012-12-09 20:04:19','2012-12-09','2013-02-12','2013-02-12 14:54:37',0,0.00000000,NULL,NULL,0,NULL,NULL,2.74000000,0.00000000,0.00000000,0.00000000,14.00000000,16.74000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2012-12-09',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(32,'FA1212-0021',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:34:23','2012-12-11','2013-03-24','2013-03-24 14:54:00',0,0.00000000,NULL,NULL,0,NULL,NULL,90.00000000,0.00000000,0.00000000,0.60000000,520.00000000,610.60000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2012-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(33,'FA1212-0023',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:34:23','2012-12-11','2014-03-03','2014-03-03 18:20:25',0,0.00000000,NULL,NULL,0,'abandon',NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,3,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2012-12-11','This is a comment (private)','This is a comment (public)','',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(55,'FA1212-0009',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:35:51','2012-12-11','2012-12-12','2012-12-12 17:54:19',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2012-12-11','This is a comment (private)','This is a comment (public)','',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(56,'(PROV56)',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:35:52','2012-12-11',NULL,'2012-12-11 08:35:52',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2012-12-11','This is a comment (private)','This is a comment (public)','',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(79,'(PROV79)',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:36:41','2012-12-11',NULL,'2012-12-19 16:56:16',0,0.00000000,NULL,NULL,0,NULL,NULL,7.60000000,0.66000000,-3.00000000,0.00000000,50.00000000,55.26000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2012-12-11','This is a comment (private)','This is a comment (public)','',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(121,'(PROV121)',1,NULL,NULL,0,NULL,NULL,1,'2012-12-19 18:39:38','2012-12-19',NULL,'2012-12-19 17:39:38',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2012-12-19','This is a comment (private)','This is a comment (public)','',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(122,'(PROV122)',1,NULL,NULL,0,NULL,NULL,1,'2012-12-19 18:39:38','2012-12-19',NULL,'2012-12-19 17:39:38',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2012-12-19','This is a comment (private)','This is a comment (public)','',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(146,'(PROV146)',1,NULL,NULL,0,NULL,NULL,1,'2012-12-19 18:48:41','2012-12-19',NULL,'2013-01-18 14:51:01',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2012-12-19','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(147,'(PROV147)',1,NULL,NULL,0,NULL,NULL,1,'2012-12-19 18:48:42','2012-12-19',NULL,'2012-12-19 17:48:42',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2012-12-19','This is a comment (private)','This is a comment (public)','',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(148,'FS1301-0001',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:22:48','2013-01-19','2013-01-19','2013-01-19 17:22:48',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,1,NULL,NULL,NULL,NULL,0,1,'2013-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(149,'(PROV149)',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:30:05','2013-01-19',NULL,'2013-02-13 14:02:53',0,0.00000000,NULL,NULL,0,NULL,NULL,1.96000000,0.00000000,0.00000000,0.00000000,10.00000000,11.96000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,0,0,'2013-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(150,'FA6801-0010',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:31:10','2013-01-19','2013-01-19','2013-01-19 17:31:10',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,1,'2013-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(151,'FS1301-0002',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:31:58','2013-01-19','2013-01-19','2013-01-19 17:31:58',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,1,'2013-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(154,'(PROV154)',1,NULL,NULL,0,NULL,NULL,1,'2013-02-17 18:24:21','2013-02-17',NULL,'2013-02-17 17:24:21',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2013-02-17',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(155,'(PROV155)',1,NULL,NULL,0,NULL,NULL,1,'2013-02-17 18:30:30','2013-02-17',NULL,'2013-02-17 17:30:30',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2013-02-17',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(156,'(PROV156)',1,NULL,NULL,0,NULL,NULL,1,'2013-02-17 18:37:01','2013-02-17',NULL,'2013-02-17 17:37:01',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2013-02-17',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(158,'FA1307-0013',1,NULL,NULL,0,NULL,NULL,12,'2013-03-06 16:43:37','2013-07-18','2013-03-23','2013-03-23 17:23:03',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2013-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(159,'FA1407-0014',1,NULL,NULL,0,NULL,NULL,12,'2013-03-06 16:44:12','2014-07-18','2013-03-06','2013-03-06 15:44:12',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,11.00000000,11.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2014-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(160,'FA1507-0015',1,NULL,NULL,0,NULL,NULL,12,'2013-03-06 16:47:48','2015-07-18','2013-03-06','2013-03-06 15:47:48',0,0.00000000,NULL,NULL,0,NULL,NULL,1.11000000,0.00000000,0.00000000,0.00000000,8.89000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2015-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(161,'FA1607-0016',1,NULL,NULL,0,NULL,NULL,12,'2013-03-06 16:48:16','2016-07-18','2013-03-06','2013-03-06 15:48:16',0,0.00000000,NULL,NULL,0,NULL,NULL,2.22000000,0.00000000,0.00000000,0.00000000,17.78000000,20.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2016-07-18',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(187,'(PROV187)',1,NULL,NULL,0,NULL,NULL,1,'2013-03-09 18:26:56','2013-03-09',NULL,'2013-03-09 17:26:56',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2013-03-09','This is a comment (private)','This is a comment (public)','',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(206,'(PROV206)',1,NULL,NULL,0,NULL,NULL,1,'2013-03-09 18:34:05','2013-03-09',NULL,'2013-03-09 17:34:05',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2013-03-09','This is a comment (private)','This is a comment (public)','',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(207,'(PROV207)',1,NULL,NULL,0,NULL,NULL,1,'2013-03-09 18:34:05','2013-03-09',NULL,'2013-03-10 14:45:36',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,1,0,'2013-03-09','This is a comment (private)','This is a comment (public)','generic_invoice_odt:/var/www/dolibarrnew/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(209,'FA1303-0018',1,NULL,NULL,0,NULL,NULL,19,'2013-03-19 09:37:51','2013-03-19','2013-03-19','2013-03-19 08:38:10',0,0.00000000,NULL,NULL,0,NULL,NULL,-1.25000000,0.00000000,0.00000000,0.00000000,10.00000000,8.75000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2013-03-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(210,'FA1107-0019',1,NULL,NULL,0,NULL,NULL,10,'2013-03-20 14:30:11','2011-07-10','2013-03-20','2013-03-20 13:30:11',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2011-07-10',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(211,'FA1303-0020',1,NULL,NULL,0,NULL,NULL,19,'2013-03-22 09:40:10','2013-03-22','2014-03-02','2014-03-02 19:13:39',0,0.00000000,NULL,NULL,0,NULL,NULL,17.64000000,0.00000000,0.00000000,0.40000000,340.00000000,358.04000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2013-03-22',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(213,'AV1303-0003',1,NULL,NULL,2,NULL,NULL,1,'2014-03-03 19:22:03','2013-03-03','2014-03-03','2014-03-03 18:22:16',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,-1000.00000000,1,1,NULL,1,32,NULL,NULL,NULL,0,0,'2013-03-03',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_facture` VALUES (2,'FA1007-0002',1,NULL,NULL,0,NULL,NULL,2,'2010-07-10 18:20:13','2010-07-10',NULL,'2011-08-08 00:54:05',1,10.00000000,NULL,NULL,0,NULL,NULL,0.10000000,0.00000000,0.00000000,0.00000000,46.00000000,46.10000000,2,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2010-07-10',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'FA1107-0006',1,NULL,NULL,0,NULL,NULL,10,'2011-07-18 20:33:35','2011-07-18',NULL,'2012-12-08 16:39:01',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,15.00000000,15.00000000,2,1,NULL,1,NULL,1,NULL,NULL,1,0,'2011-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'FA1108-0003',1,NULL,NULL,0,NULL,NULL,7,'2011-08-01 03:34:11','2011-08-01',NULL,'2016-01-22 17:43:07',1,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,6,'2011-08-01',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(6,'FA1108-0004',1,NULL,NULL,0,NULL,NULL,7,'2011-08-06 20:33:53','2011-08-06',NULL,'2011-08-06 18:35:13',1,0.00000000,NULL,NULL,0,NULL,NULL,0.98000000,0.00000000,0.00000000,0.00000000,5.00000000,5.98000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,4,'2011-08-06','Cash\nReceived : 6 EUR\nRendu : 0.02 EUR\n\n--------------------------------------',NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(8,'FA1108-0005',1,NULL,NULL,3,NULL,NULL,2,'2011-08-08 02:41:44','2011-08-08',NULL,'2011-08-08 00:53:40',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2011-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(9,'FA1108-0007',1,NULL,NULL,3,NULL,NULL,10,'2011-08-08 02:55:14','2011-08-08',NULL,'2011-08-08 00:55:26',0,0.00000000,NULL,NULL,0,NULL,NULL,1.96000000,0.00000000,0.00000000,0.00000000,10.00000000,11.96000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2011-08-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,'AV1212-0001',1,NULL,NULL,2,NULL,NULL,10,'2012-12-08 17:45:20','2012-12-08','2012-12-08','2012-12-08 16:57:11',0,0.00000000,NULL,NULL,0,NULL,NULL,-0.63000000,0.00000000,0.00000000,0.00000000,-11.00000000,-11.63000000,1,1,NULL,1,3,NULL,NULL,NULL,0,0,'2012-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,'AV1212-0002',1,NULL,NULL,2,NULL,NULL,10,'2012-12-08 18:20:14','2012-12-08','2012-12-08','2012-12-09 17:35:07',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,-5.00000000,2,1,NULL,1,3,NULL,NULL,NULL,0,0,'2012-12-08',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'FA1212-0011',1,NULL,NULL,0,NULL,NULL,7,'2012-12-09 20:04:19','2012-12-09','2013-02-12','2013-02-12 14:54:37',0,0.00000000,NULL,NULL,0,NULL,NULL,2.74000000,0.00000000,0.00000000,0.00000000,14.00000000,16.74000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2012-12-09',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(32,'FA1212-0021',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:34:23','2012-12-11','2013-03-24','2013-03-24 14:54:00',0,0.00000000,NULL,NULL,0,NULL,NULL,90.00000000,0.00000000,0.00000000,0.60000000,520.00000000,610.60000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2012-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(33,'FA1212-0023',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:34:23','2012-12-11','2014-03-03','2016-01-22 17:42:20',0,0.00000000,NULL,NULL,0,'abandon',NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,3,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2012-12-11','This is a comment (private)','This is a comment (public)','crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(55,'FA1212-0009',1,NULL,NULL,0,NULL,NULL,1,'2012-12-11 09:35:51','2012-12-11','2012-12-12','2016-01-22 17:41:49',0,0.00000000,NULL,NULL,0,NULL,NULL,0.24000000,0.00000000,0.00000000,0.00000000,2.48000000,2.72000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2012-12-11','This is a comment (private)','This is a comment (public)','generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(148,'FS1301-0001',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:22:48','2013-01-19','2013-01-19','2013-01-19 17:22:48',0,0.00000000,NULL,NULL,0,NULL,NULL,0.63000000,0.00000000,0.00000000,0.00000000,5.00000000,5.63000000,1,1,NULL,1,NULL,NULL,NULL,NULL,0,1,'2013-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(149,'(PROV149)',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:30:05','2013-01-19',NULL,'2013-02-13 14:02:53',0,0.00000000,NULL,NULL,0,NULL,NULL,1.96000000,0.00000000,0.00000000,0.00000000,10.00000000,11.96000000,0,1,NULL,NULL,NULL,NULL,NULL,NULL,0,0,'2013-01-19',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(150,'FA6801-0010',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:31:10','2013-01-19','2013-01-19','2013-01-19 17:31:10',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,1,'2013-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(151,'FS1301-0002',1,NULL,NULL,0,NULL,NULL,1,'2013-01-19 18:31:58','2013-01-19','2013-01-19','2013-01-19 17:31:58',1,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,2,1,NULL,1,NULL,NULL,NULL,NULL,0,1,'2013-01-19',NULL,NULL,'',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(160,'FA1507-0015',1,NULL,NULL,0,NULL,NULL,12,'2013-03-06 16:47:48','2015-07-18','2013-03-06','2016-01-22 17:44:00',0,0.00000000,NULL,NULL,0,NULL,NULL,1.11000000,0.00000000,0.00000000,0.00000000,8.89000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2015-07-18',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(210,'FA1107-0019',1,NULL,NULL,0,NULL,NULL,10,'2013-03-20 14:30:11','2011-07-10','2013-03-20','2016-01-22 17:43:00',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,10.00000000,10.00000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2011-07-10',NULL,NULL,'generic_invoice_odt:/home/ldestailleur/git/dolibarr_3.8/documents/doctemplates/invoices/template_invoice.odt',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(211,'FA1303-0020',1,NULL,NULL,0,NULL,NULL,19,'2013-03-22 09:40:10','2013-03-22','2014-03-02','2014-03-02 19:13:39',0,0.00000000,NULL,NULL,0,NULL,NULL,17.64000000,0.00000000,0.00000000,0.40000000,340.00000000,358.04000000,1,1,NULL,1,NULL,NULL,NULL,NULL,1,0,'2013-03-22',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL),(213,'AV1303-0003',1,NULL,NULL,2,NULL,NULL,1,'2014-03-03 19:22:03','2013-03-03','2014-03-03','2014-03-03 18:22:16',0,0.00000000,NULL,NULL,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,-1000.00000000,1,1,NULL,1,32,NULL,NULL,NULL,0,0,'2013-03-03',NULL,NULL,'crabe',NULL,NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_facture` ENABLE KEYS */; UNLOCK TABLES; @@ -4665,7 +4343,7 @@ CREATE TABLE `llx_facture_fourn` ( LOCK TABLES `llx_facture_fourn` WRITE; /*!40000 ALTER TABLE `llx_facture_fourn` DISABLE KEYS */; -INSERT INTO `llx_facture_fourn` VALUES (1,'1','aaa',1,NULL,0,17,'2011-08-04 22:21:18','2011-08-04','2015-07-19 13:40:54','',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,16.00000000,3.14000000,19.14000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL),(16,'16','FR70813',1,NULL,0,1,'2012-12-19 15:24:11','2003-04-11','2015-07-19 13:40:54','OVH FR70813',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,829.00000000,162.48000000,991.48000000,1,1,NULL,1,NULL,NULL,NULL,1,NULL,'2003-04-11','','',NULL,NULL,NULL,NULL,NULL),(17,'17','FR81385',1,NULL,0,1,'2013-02-13 17:19:35','2003-06-04','2015-07-19 13:40:54','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','',NULL,NULL,NULL,NULL,NULL),(18,'18','FR81385',1,NULL,0,2,'2013-02-13 17:20:25','2003-06-04','2015-07-19 13:40:54','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','',NULL,NULL,NULL,NULL,NULL),(19,'19','FR813852',1,NULL,0,2,'2013-03-16 17:59:02','2013-03-16','2015-07-19 13:40:54','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_facture_fourn` VALUES (16,'16','FR70813',1,NULL,0,1,'2012-12-19 15:24:11','2003-04-11','2016-01-22 17:54:46','OVH FR70813',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,829.00000000,162.48000000,991.48000000,1,1,NULL,12,NULL,NULL,NULL,1,NULL,'2003-04-11','','',NULL,NULL,NULL,NULL,NULL),(17,'17','FR81385',1,NULL,0,1,'2013-02-13 17:19:35','2003-06-04','2016-01-22 17:56:56','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','','canelle',NULL,NULL,NULL,NULL),(18,'18','FR81385',1,NULL,0,2,'2013-02-13 17:20:25','2003-06-04','2015-07-19 13:40:54','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,'2003-06-04','','',NULL,NULL,NULL,NULL,NULL),(19,'19','FR813852',1,NULL,0,2,'2013-03-16 17:59:02','2013-03-16','2015-07-19 13:40:54','OVH FR81385',0,0.00000000,0.00000000,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,26.00000000,5.10000000,31.10000000,0,1,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_facture_fourn` ENABLE KEYS */; UNLOCK TABLES; @@ -4721,7 +4399,7 @@ CREATE TABLE `llx_facture_fourn_det` ( LOCK TABLES `llx_facture_fourn_det` WRITE; /*!40000 ALTER TABLE `llx_facture_fourn_det` DISABLE KEYS */; -INSERT INTO `llx_facture_fourn_det` VALUES (1,1,NULL,NULL,NULL,NULL,'aaa',10.00000000,11.96000000,1.6,0,19.600,0.000,'',0.000,'',16.00000000,3.14000000,0.00000000,0.00000000,19.14000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(44,16,NULL,NULL,NULL,NULL,'ref :sd.loc.sp.512.6
6 mois - Location de SuperPlan avec la connexion 512kbs
Du 11/04/2003 à 11/10/2003',414.00000000,495.14400000,1,0,19.600,0.000,'',0.000,'',414.00000000,81.14000000,0.00000000,0.00000000,495.14000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(45,16,NULL,NULL,NULL,NULL,'ref :sd.loc.sp.512.6
6 mois - Location de SuperPlan avec la connexion 512kbs
Du 11/10/2003 à 11/04/2004',414.00000000,495.14400000,1,0,19.600,0.000,'',0.000,'',414.00000000,81.14000000,0.00000000,0.00000000,495.14000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(46,16,NULL,NULL,NULL,NULL,'ref :sd.installation.annuel
Frais de mise en service d\'un serveur dédié pour un paiement annuel
',1.00000000,1.19600000,1,0,19.600,0.000,'',0.000,'',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(47,17,NULL,NULL,NULL,NULL,'ref :bk.full250.creation
Création du compte backup ftp 250Mo.
',1.00000000,1.19600000,1,0,19.600,0.000,'',0.000,'',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(48,17,NULL,NULL,NULL,NULL,'ref :bk.full250.12
Redevance pour un backup de 250Mo sur 12 mois
',25.00000000,29.90000000,1,0,19.600,0.000,'',0.000,'',25.00000000,4.90000000,0.00000000,0.00000000,29.90000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(49,18,NULL,NULL,NULL,NULL,'ref :bk.full250.creation
Création du compte backup ftp 250Mo.
',1.00000000,1.19600000,1,0,19.600,0.000,'',0.000,'',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(50,18,NULL,NULL,NULL,NULL,'ref :bk.full250.12
Redevance pour un backup de 250Mo sur 12 mois
',25.00000000,29.90000000,1,0,19.600,0.000,'',0.000,'',25.00000000,4.90000000,0.00000000,0.00000000,29.90000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(51,19,NULL,NULL,NULL,NULL,'ref :bk.full250.creation
Création du compte backup ftp 250Mo.
',1.00000000,1.19600000,1,0,19.600,0.000,'0',0.000,'0',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(52,19,NULL,NULL,NULL,NULL,'ref :bk.full250.12
Redevance pour un backup de 250Mo sur 12 mois
',25.00000000,29.90000000,1,0,19.600,0.000,'0',0.000,'0',25.00000000,4.90000000,0.00000000,0.00000000,29.90000000,0,NULL,NULL,0,NULL,0,0,0,NULL); +INSERT INTO `llx_facture_fourn_det` VALUES (44,16,NULL,NULL,NULL,NULL,'ref :sd.loc.sp.512.6
6 mois - Location de SuperPlan avec la connexion 512kbs
Du 11/04/2003 à 11/10/2003',414.00000000,495.14400000,1,0,19.600,0.000,'',0.000,'',414.00000000,81.14000000,0.00000000,0.00000000,495.14000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(45,16,NULL,NULL,NULL,NULL,'ref :sd.loc.sp.512.6
6 mois - Location de SuperPlan avec la connexion 512kbs
Du 11/10/2003 à 11/04/2004',414.00000000,495.14400000,1,0,19.600,0.000,'',0.000,'',414.00000000,81.14000000,0.00000000,0.00000000,495.14000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(46,16,NULL,NULL,NULL,NULL,'ref :sd.installation.annuel
Frais de mise en service d\'un serveur dédié pour un paiement annuel
',1.00000000,1.19600000,1,0,19.600,0.000,'',0.000,'',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(47,17,NULL,NULL,NULL,NULL,'ref :bk.full250.creation
Création du compte backup ftp 250Mo.
',1.00000000,1.19600000,1,0,19.600,0.000,'',0.000,'',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(48,17,NULL,NULL,NULL,NULL,'ref :bk.full250.12
Redevance pour un backup de 250Mo sur 12 mois
',25.00000000,29.90000000,1,0,19.600,0.000,'',0.000,'',25.00000000,4.90000000,0.00000000,0.00000000,29.90000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(49,18,NULL,NULL,NULL,NULL,'ref :bk.full250.creation
Création du compte backup ftp 250Mo.
',1.00000000,1.19600000,1,0,19.600,0.000,'',0.000,'',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(50,18,NULL,NULL,NULL,NULL,'ref :bk.full250.12
Redevance pour un backup de 250Mo sur 12 mois
',25.00000000,29.90000000,1,0,19.600,0.000,'',0.000,'',25.00000000,4.90000000,0.00000000,0.00000000,29.90000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(51,19,NULL,NULL,NULL,NULL,'ref :bk.full250.creation
Création du compte backup ftp 250Mo.
',1.00000000,1.19600000,1,0,19.600,0.000,'0',0.000,'0',1.00000000,0.20000000,0.00000000,0.00000000,1.20000000,0,NULL,NULL,0,NULL,0,0,0,NULL),(52,19,NULL,NULL,NULL,NULL,'ref :bk.full250.12
Redevance pour un backup de 250Mo sur 12 mois
',25.00000000,29.90000000,1,0,19.600,0.000,'0',0.000,'0',25.00000000,4.90000000,0.00000000,0.00000000,29.90000000,0,NULL,NULL,0,NULL,0,0,0,NULL); /*!40000 ALTER TABLE `llx_facture_fourn_det` ENABLE KEYS */; UNLOCK TABLES; @@ -4894,7 +4572,7 @@ CREATE TABLE `llx_facturedet` ( LOCK TABLES `llx_facturedet` WRITE; /*!40000 ALTER TABLE `llx_facturedet` DISABLE KEYS */; -INSERT INTO `llx_facturedet` VALUES (3,2,NULL,3,NULL,'Service S1',0.000,0.000,'',0.000,'',1,10,4,NULL,40.00000000,36.00000000,36.00000000,0.00000000,0.00000000,0.00000000,36.00000000,1,'2010-07-10 00:00:00',NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(4,2,NULL,NULL,NULL,'Abonnement annuel assurance',1.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.10000000,0.00000000,0.00000000,10.10000000,0,'2010-07-10 00:00:00','2011-07-10 00:00:00',0,NULL,0.00000000,0,0,3,NULL,NULL,NULL,NULL),(11,3,NULL,4,NULL,'afsdfsdfsdfsdf',0.000,0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL),(12,3,NULL,NULL,NULL,'dfdfd',0.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(13,5,NULL,4,NULL,'Decapsuleur',12.500,0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL),(14,6,NULL,4,NULL,'Decapsuleur',19.600,0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.98000000,0.00000000,0.00000000,5.98000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL),(21,8,NULL,NULL,NULL,'dddd',0.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(22,9,NULL,NULL,NULL,'ggg',19.600,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(23,10,NULL,4,NULL,'',12.500,0.000,'',0.000,'',1,0,0,NULL,-5.00000000,NULL,-5.00000000,-0.63000000,0.00000000,0.00000000,-5.63000000,0,NULL,NULL,0,NULL,12.00000000,0,0,1,NULL,NULL,NULL,NULL),(24,10,NULL,1,NULL,'A beatifull pink dress\r\nlkm',0.000,0.000,'',0.000,'',1,0,0,NULL,-6.00000000,NULL,-6.00000000,0.00000000,0.00000000,0.00000000,-6.00000000,0,NULL,NULL,0,0,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(25,11,NULL,4,NULL,'jljk',12.500,0.000,'',0.000,'',1,0,0,NULL,5.00000000,NULL,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(26,12,NULL,1,NULL,'A beatifull pink dress\r\nhfghf',0.000,0.000,'',0.000,'',1,0,0,NULL,-5.00000000,NULL,-5.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,0,NULL,NULL,0,0,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(27,13,NULL,NULL,NULL,'gdfgdf',19.600,0.000,'',0.000,'',1.4,0,0,NULL,10.00000000,NULL,14.00000000,2.74000000,0.00000000,0.00000000,16.74000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(137,33,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(138,33,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(256,55,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(257,55,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(258,56,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(259,56,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(385,79,NULL,NULL,NULL,'hfghfg',10.000,1.400,'',-15.000,'',1,0,0,NULL,10.00000000,NULL,10.00000000,1.00000000,0.14000000,-1.50000000,9.64000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(386,79,NULL,NULL,NULL,'gdfg',15.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,NULL,10.00000000,1.50000000,0.00000000,0.00000000,11.50000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(387,79,NULL,NULL,NULL,'fdsf',21.000,5.200,'',-15.000,'',1,0,0,NULL,10.00000000,NULL,10.00000000,2.10000000,0.52000000,-1.50000000,11.12000000,0,NULL,NULL,0,NULL,0.00000000,0,0,3,NULL,NULL,NULL,NULL),(388,79,NULL,NULL,NULL,'ghfgh',15.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,NULL,10.00000000,1.50000000,0.00000000,0.00000000,11.50000000,0,NULL,NULL,0,NULL,0.00000000,0,0,4,NULL,NULL,NULL,NULL),(389,79,NULL,NULL,NULL,'ghfgh',15.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,NULL,10.00000000,1.50000000,0.00000000,0.00000000,11.50000000,0,NULL,NULL,0,NULL,0.00000000,0,0,5,NULL,NULL,NULL,NULL),(618,121,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(619,121,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(620,122,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(621,122,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(749,146,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(750,146,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(751,147,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(752,147,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(753,13,NULL,2,NULL,'(Pays d\'origine: Albanie)',0.000,0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,0,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(754,148,NULL,11,NULL,'hfghf',0.000,0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(755,148,NULL,4,NULL,'Decapsuleur',12.500,0.000,'',0.000,'',1,0,0,NULL,5.00000000,NULL,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(756,149,NULL,5,NULL,'aaaa',19.600,0.000,'',0.000,'',1,0,0,NULL,10.00000000,NULL,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(757,150,NULL,2,NULL,'Product P1',12.500,0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(758,151,NULL,2,NULL,'Product P1',12.500,0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(761,154,NULL,NULL,NULL,'',0.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL),(762,155,NULL,NULL,NULL,'',0.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL),(763,156,NULL,NULL,NULL,'gfdgdf',0.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL),(768,32,NULL,NULL,NULL,'mlml',18.000,0.000,'',0.000,'',1,0,0,NULL,100.00000000,NULL,100.00000000,18.00000000,0.00000000,0.00000000,118.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,3,NULL,NULL,NULL,NULL),(769,32,NULL,NULL,NULL,'mlkml',18.000,0.000,'',0.000,'',1,0,0,NULL,400.00000000,NULL,400.00000000,72.00000000,0.00000000,0.00000000,472.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,4,NULL,NULL,NULL,NULL),(770,158,NULL,NULL,NULL,'Adhésion/cotisation 2013',0.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,1,'2013-07-18 00:00:00','2014-07-17 00:00:00',0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(771,159,NULL,NULL,NULL,'Adhésion/cotisation 2014',0.000,0.000,'',0.000,'',1,0,0,NULL,11.00000000,NULL,11.00000000,0.00000000,0.00000000,0.00000000,11.00000000,1,'2014-07-18 00:00:00','2015-07-17 00:00:00',0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(772,160,NULL,NULL,NULL,'Adhésion/cotisation 2015',12.500,0.000,'',0.000,'',1,0,0,NULL,8.88889000,NULL,8.89000000,1.11000000,0.00000000,0.00000000,10.00000000,1,'2015-07-18 00:00:00','2016-07-17 00:00:00',0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(773,161,NULL,NULL,NULL,'Adhésion/cotisation 2016',12.500,0.000,'',0.000,'',1,0,0,NULL,17.77778000,NULL,17.78000000,2.22000000,0.00000000,0.00000000,20.00000000,1,'2016-07-18 00:00:00','2017-07-17 00:00:00',0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(776,32,NULL,NULL,NULL,'fsdfsdfds',0.000,0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,5,NULL,NULL,NULL,NULL),(777,32,NULL,NULL,NULL,'fsdfsdfds',0.000,0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,6,NULL,NULL,NULL,NULL),(779,32,NULL,NULL,NULL,'fsdfds',0.000,0.000,'0',0.000,'0',0,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,9,NULL,NULL,0,0,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(780,32,NULL,NULL,NULL,'ffsdf',0.000,0.000,'0',0.000,'0',0,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,9,NULL,NULL,0,NULL,0.00000000,0,1790,1,NULL,NULL,NULL,NULL),(905,187,NULL,NULL,NULL,'Desc',10.000,0.000,'0',0.000,'0',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(906,187,NULL,NULL,NULL,'Desc',10.000,0.000,'0',0.000,'0',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(1014,206,NULL,NULL,NULL,'Desc',10.000,0.000,'0',0.000,'0',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(1015,206,NULL,NULL,NULL,'Desc',10.000,0.000,'0',0.000,'0',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(1016,207,NULL,NULL,NULL,'Desc',10.000,0.000,'0',0.000,'0',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(1017,207,NULL,NULL,NULL,'Desc',10.000,0.000,'0',0.000,'0',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(1019,209,NULL,NULL,NULL,'hfghgf',12.500,0.000,'0',0.000,'0',1,0,0,2,-10.00000000,NULL,-10.00000000,-1.25000000,0.00000000,0.00000000,-11.25000000,0,NULL,NULL,2,NULL,0.00000000,0,0,-1,NULL,NULL,NULL,NULL),(1020,209,NULL,NULL,NULL,'fsdfsd',0.000,0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL),(1021,209,NULL,NULL,NULL,'hfg',0.000,0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(1022,210,NULL,NULL,NULL,'Adhésion/cotisation 2011',0.000,0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,1,'2011-07-10 00:00:00','2012-07-09 00:00:00',0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(1023,211,NULL,NULL,NULL,'Samsung Android x4',0.000,0.000,'0',0.000,'0',1,0,0,NULL,250.00000000,NULL,250.00000000,0.00000000,0.00000000,0.00000000,250.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(1024,211,NULL,1,NULL,'A beatifull pink dress\r\nSize XXL',19.600,0.000,'0',0.000,'0',1,10,0,NULL,100.00000000,NULL,90.00000000,17.64000000,0.00000000,0.00000000,107.64000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(1026,213,NULL,1,NULL,'A beatifull pink dress',0.000,0.000,'0',0.000,'0',10,0,0,NULL,-100.00000000,NULL,-1000.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL); +INSERT INTO `llx_facturedet` VALUES (3,2,NULL,3,NULL,'Service S1',0.000,0.000,'',0.000,'',1,10,4,NULL,40.00000000,36.00000000,36.00000000,0.00000000,0.00000000,0.00000000,36.00000000,1,'2010-07-10 00:00:00',NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(4,2,NULL,NULL,NULL,'Abonnement annuel assurance',1.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.10000000,0.00000000,0.00000000,10.10000000,0,'2010-07-10 00:00:00','2011-07-10 00:00:00',0,NULL,0.00000000,0,0,3,NULL,NULL,NULL,NULL),(11,3,NULL,4,NULL,'afsdfsdfsdfsdf',0.000,0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL),(12,3,NULL,NULL,NULL,'dfdfd',0.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(13,5,NULL,4,NULL,'Decapsuleur',12.500,0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL),(14,6,NULL,4,NULL,'Decapsuleur',19.600,0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,5.00000000,0.98000000,0.00000000,0.00000000,5.98000000,0,NULL,NULL,0,NULL,0.00000000,0,0,0,NULL,NULL,NULL,NULL),(21,8,NULL,NULL,NULL,'dddd',0.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(22,9,NULL,NULL,NULL,'ggg',19.600,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(23,10,NULL,4,NULL,'',12.500,0.000,'',0.000,'',1,0,0,NULL,-5.00000000,NULL,-5.00000000,-0.63000000,0.00000000,0.00000000,-5.63000000,0,NULL,NULL,0,NULL,12.00000000,0,0,1,NULL,NULL,NULL,NULL),(24,10,NULL,1,NULL,'A beatifull pink dress\r\nlkm',0.000,0.000,'',0.000,'',1,0,0,NULL,-6.00000000,NULL,-6.00000000,0.00000000,0.00000000,0.00000000,-6.00000000,0,NULL,NULL,0,0,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(26,12,NULL,1,NULL,'A beatifull pink dress\r\nhfghf',0.000,0.000,'',0.000,'',1,0,0,NULL,-5.00000000,NULL,-5.00000000,0.00000000,0.00000000,0.00000000,-5.00000000,0,NULL,NULL,0,0,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(27,13,NULL,NULL,NULL,'gdfgdf',19.600,0.000,'',0.000,'',1.4,0,0,NULL,10.00000000,NULL,14.00000000,2.74000000,0.00000000,0.00000000,16.74000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(137,33,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(138,33,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(256,55,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(257,55,NULL,NULL,NULL,'Desc',10.000,0.000,'',0.000,'',1,0,0,NULL,1.24000000,NULL,1.24000000,0.12000000,0.00000000,0.00000000,1.36000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(753,13,NULL,2,NULL,'(Pays d\'origine: Albanie)',0.000,0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,0,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(754,148,NULL,11,NULL,'hfghf',0.000,0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(755,148,NULL,4,NULL,'Decapsuleur',12.500,0.000,'',0.000,'',1,0,0,NULL,5.00000000,NULL,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(756,149,NULL,5,NULL,'aaaa',19.600,0.000,'',0.000,'',1,0,0,NULL,10.00000000,NULL,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(757,150,NULL,2,NULL,'Product P1',12.500,0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(758,151,NULL,2,NULL,'Product P1',12.500,0.000,'',0.000,'',1,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(768,32,NULL,NULL,NULL,'mlml',18.000,0.000,'',0.000,'',1,0,0,NULL,100.00000000,NULL,100.00000000,18.00000000,0.00000000,0.00000000,118.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,3,NULL,NULL,NULL,NULL),(769,32,NULL,NULL,NULL,'mlkml',18.000,0.000,'',0.000,'',1,0,0,NULL,400.00000000,NULL,400.00000000,72.00000000,0.00000000,0.00000000,472.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,4,NULL,NULL,NULL,NULL),(772,160,NULL,NULL,NULL,'Adhésion/cotisation 2015',12.500,0.000,'',0.000,'',1,0,0,NULL,8.88889000,NULL,8.89000000,1.11000000,0.00000000,0.00000000,10.00000000,1,'2015-07-18 00:00:00','2016-07-17 00:00:00',0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(776,32,NULL,NULL,NULL,'fsdfsdfds',0.000,0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,5,NULL,NULL,NULL,NULL),(777,32,NULL,NULL,NULL,'fsdfsdfds',0.000,0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,6,NULL,NULL,NULL,NULL),(779,32,NULL,NULL,NULL,'fsdfds',0.000,0.000,'0',0.000,'0',0,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,9,NULL,NULL,0,0,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(780,32,NULL,NULL,NULL,'ffsdf',0.000,0.000,'0',0.000,'0',0,0,0,NULL,0.00000000,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,9,NULL,NULL,0,NULL,0.00000000,0,1790,1,NULL,NULL,NULL,NULL),(1022,210,NULL,NULL,NULL,'Adhésion/cotisation 2011',0.000,0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,NULL,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,1,'2011-07-10 00:00:00','2012-07-09 00:00:00',0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(1023,211,NULL,NULL,NULL,'Samsung Android x4',0.000,0.000,'0',0.000,'0',1,0,0,NULL,250.00000000,NULL,250.00000000,0.00000000,0.00000000,0.00000000,250.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL),(1024,211,NULL,1,NULL,'A beatifull pink dress\r\nSize XXL',19.600,0.000,'0',0.000,'0',1,10,0,NULL,100.00000000,NULL,90.00000000,17.64000000,0.00000000,0.00000000,107.64000000,0,NULL,NULL,0,NULL,0.00000000,0,0,2,NULL,NULL,NULL,NULL),(1026,213,NULL,1,NULL,'A beatifull pink dress',0.000,0.000,'0',0.000,'0',10,0,0,NULL,-100.00000000,NULL,-1000.00000000,0.00000000,0.00000000,0.00000000,-1000.00000000,0,NULL,NULL,0,NULL,0.00000000,0,0,1,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_facturedet` ENABLE KEYS */; UNLOCK TABLES; @@ -5007,7 +4685,7 @@ CREATE TABLE `llx_fichinter` ( UNIQUE KEY `uk_fichinter_ref` (`ref`,`entity`), KEY `idx_fichinter_fk_soc` (`fk_soc`), CONSTRAINT `fk_fichinter_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5016,7 +4694,7 @@ CREATE TABLE `llx_fichinter` ( LOCK TABLES `llx_fichinter` WRITE; /*!40000 ALTER TABLE `llx_fichinter` DISABLE KEYS */; -INSERT INTO `llx_fichinter` VALUES (1,2,1,0,'FI1007-0001',1,'2010-07-08 23:51:54','2010-07-09 01:42:41','2010-07-09 01:51:54',NULL,1,NULL,1,1,51000,NULL,NULL,NULL,'soleil',NULL,NULL),(2,1,NULL,0,'FI1007-0002',1,'2012-12-08 13:11:07','2010-07-11 16:07:51',NULL,NULL,1,NULL,NULL,0,3600,'ferfrefeferf',NULL,NULL,'soleil',NULL,NULL); +INSERT INTO `llx_fichinter` VALUES (1,2,1,0,'FI1007-0001',1,'2016-01-22 17:39:37','2010-07-09 01:42:41','2016-01-22 18:39:37',NULL,1,NULL,12,1,10800,NULL,NULL,NULL,'soleil',NULL,NULL),(2,1,NULL,0,'FI1007-0002',1,'2012-12-08 13:11:07','2010-07-11 16:07:51',NULL,NULL,1,NULL,NULL,0,3600,'ferfrefeferf',NULL,NULL,'soleil',NULL,NULL),(3,2,0,0,'FI1511-0003',1,'2016-01-22 17:38:46','2015-11-18 15:57:34','2016-01-22 18:38:46',NULL,2,NULL,12,1,36000,NULL,NULL,NULL,'soleil',NULL,NULL); /*!40000 ALTER TABLE `llx_fichinter` ENABLE KEYS */; UNLOCK TABLES; @@ -5064,7 +4742,7 @@ CREATE TABLE `llx_fichinterdet` ( PRIMARY KEY (`rowid`), KEY `idx_fichinterdet_fk_fichinter` (`fk_fichinter`), CONSTRAINT `fk_fichinterdet_fk_fichinter` FOREIGN KEY (`fk_fichinter`) REFERENCES `llx_fichinter` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5073,7 +4751,7 @@ CREATE TABLE `llx_fichinterdet` ( LOCK TABLES `llx_fichinterdet` WRITE; /*!40000 ALTER TABLE `llx_fichinterdet` DISABLE KEYS */; -INSERT INTO `llx_fichinterdet` VALUES (1,1,NULL,'2010-07-07 04:00:00','Intervention sur site',3600,0),(2,1,NULL,'2010-07-08 11:00:00','Autre',47400,0),(3,2,NULL,'2010-07-11 05:00:00','Pres',3600,0); +INSERT INTO `llx_fichinterdet` VALUES (1,1,NULL,'2010-07-07 04:00:00','Intervention sur site',3600,0),(2,1,NULL,'2010-07-08 11:00:00','Other actions on client site.',7200,0),(3,2,NULL,'2010-07-11 05:00:00','Pres',3600,0),(5,3,NULL,'2015-11-18 09:00:00','Intervention on building windows 1',32400,0),(6,3,NULL,'2016-01-22 00:00:00','Intervention on building windows 2',3600,0); /*!40000 ALTER TABLE `llx_fichinterdet` ENABLE KEYS */; UNLOCK TABLES; @@ -5103,35 +4781,6 @@ LOCK TABLES `llx_fichinterdet_extrafields` WRITE; /*!40000 ALTER TABLE `llx_fichinterdet_extrafields` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_filemanager_roots` --- - -DROP TABLE IF EXISTS `llx_filemanager_roots`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_filemanager_roots` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `datec` datetime DEFAULT NULL, - `rootlabel` varchar(64) DEFAULT NULL, - `rootpath` text, - `note` text, - `position` int(11) DEFAULT NULL, - `entity` int(11) DEFAULT NULL, - PRIMARY KEY (`rowid`), - UNIQUE KEY `idx_filemanager_root` (`rootlabel`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_filemanager_roots` --- - -LOCK TABLES `llx_filemanager_roots` WRITE; -/*!40000 ALTER TABLE `llx_filemanager_roots` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_filemanager_roots` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_holiday` -- @@ -5168,7 +4817,7 @@ CREATE TABLE `llx_holiday` ( KEY `idx_holiday_fk_user_create` (`fk_user_create`), KEY `idx_holiday_date_create` (`date_create`), KEY `idx_holiday_fk_validator` (`fk_validator`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5177,7 +4826,7 @@ CREATE TABLE `llx_holiday` ( LOCK TABLES `llx_holiday` WRITE; /*!40000 ALTER TABLE `llx_holiday` DISABLE KEYS */; -INSERT INTO `llx_holiday` VALUES (1,1,'2013-02-17 19:06:35','gdf','2013-02-10','2013-02-11',0,3,1,'2013-02-17 19:06:57',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1); +INSERT INTO `llx_holiday` VALUES (1,1,'2013-02-17 19:06:35','gdf','2013-02-10','2013-02-11',0,3,1,'2013-02-17 19:06:57',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1),(2,12,'2016-01-22 19:10:01','','2016-01-04','2016-01-08',0,1,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5),(3,13,'2016-01-22 19:10:29','','2016-01-11','2016-01-13',0,2,11,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,12,5); /*!40000 ALTER TABLE `llx_holiday` ENABLE KEYS */; UNLOCK TABLES; @@ -5203,7 +4852,7 @@ CREATE TABLE `llx_holiday_config` ( LOCK TABLES `llx_holiday_config` WRITE; /*!40000 ALTER TABLE `llx_holiday_config` DISABLE KEYS */; -INSERT INTO `llx_holiday_config` VALUES (1,'userGroup','1'),(2,'lastUpdate','20150719154457'),(3,'nbUser',''),(4,'delayForRequest','31'),(5,'AlertValidatorDelay','0'),(6,'AlertValidatorSolde','0'),(7,'nbHolidayDeducted','1'),(8,'nbHolidayEveryMonth','2.08334'); +INSERT INTO `llx_holiday_config` VALUES (1,'userGroup','1'),(2,'lastUpdate','20160122185906'),(3,'nbUser',''),(4,'delayForRequest','31'),(5,'AlertValidatorDelay','0'),(6,'AlertValidatorSolde','0'),(7,'nbHolidayDeducted','1'),(8,'nbHolidayEveryMonth','2.08334'); /*!40000 ALTER TABLE `llx_holiday_config` ENABLE KEYS */; UNLOCK TABLES; @@ -5250,7 +4899,7 @@ CREATE TABLE `llx_holiday_logs` ( `new_solde` varchar(255) NOT NULL, `fk_type` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=163 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5259,7 +4908,7 @@ CREATE TABLE `llx_holiday_logs` ( LOCK TABLES `llx_holiday_logs` WRITE; /*!40000 ALTER TABLE `llx_holiday_logs` DISABLE KEYS */; -INSERT INTO `llx_holiday_logs` VALUES (1,'2013-01-17 21:03:15',1,1,'Event : Mise à jour mensuelle','0.00','2.08',1),(2,'2013-01-17 21:03:15',1,2,'Event : Mise à jour mensuelle','0.00','2.08',1),(3,'2013-01-17 21:03:15',1,3,'Event : Mise à jour mensuelle','0.00','2.08',1),(4,'2013-02-01 09:53:26',1,1,'Event : Mise à jour mensuelle','2.08','4.16',1),(5,'2013-02-01 09:53:26',1,2,'Event : Mise à jour mensuelle','2.08','4.16',1),(6,'2013-02-01 09:53:26',1,3,'Event : Mise à jour mensuelle','2.08','4.16',1),(7,'2013-02-01 09:53:26',1,1,'Event : Mise à jour mensuelle','4.17','6.25',1),(8,'2013-02-01 09:53:26',1,2,'Event : Mise à jour mensuelle','4.17','6.25',1),(9,'2013-02-01 09:53:26',1,3,'Event : Mise à jour mensuelle','4.17','6.25',1),(10,'2013-02-01 09:53:26',1,4,'Event : Mise à jour mensuelle','0.00','2.08',1),(11,'2013-02-01 09:53:31',1,1,'Event : Mise à jour mensuelle','6.25','8.33',1),(12,'2013-02-01 09:53:31',1,2,'Event : Mise à jour mensuelle','6.25','8.33',1),(13,'2013-02-01 09:53:31',1,3,'Event : Mise à jour mensuelle','6.25','8.33',1),(14,'2013-02-01 09:53:31',1,4,'Event : Mise à jour mensuelle','2.08','4.16',1),(15,'2013-02-01 09:53:31',1,1,'Event : Mise à jour mensuelle','8.33','10.41',1),(16,'2013-02-01 09:53:31',1,2,'Event : Mise à jour mensuelle','8.33','10.41',1),(17,'2013-02-01 09:53:31',1,3,'Event : Mise à jour mensuelle','8.33','10.41',1),(18,'2013-02-01 09:53:31',1,4,'Event : Mise à jour mensuelle','4.17','6.25',1),(19,'2013-02-01 09:53:33',1,1,'Event : Mise à jour mensuelle','10.42','12.50',1),(20,'2013-02-01 09:53:33',1,2,'Event : Mise à jour mensuelle','10.42','12.50',1),(21,'2013-02-01 09:53:33',1,3,'Event : Mise à jour mensuelle','10.42','12.50',1),(22,'2013-02-01 09:53:33',1,4,'Event : Mise à jour mensuelle','6.25','8.33',1),(23,'2013-02-01 09:53:34',1,1,'Event : Mise à jour mensuelle','12.50','14.58',1),(24,'2013-02-01 09:53:34',1,2,'Event : Mise à jour mensuelle','12.50','14.58',1),(25,'2013-02-01 09:53:34',1,3,'Event : Mise à jour mensuelle','12.50','14.58',1),(26,'2013-02-01 09:53:34',1,4,'Event : Mise à jour mensuelle','8.33','10.41',1),(27,'2013-02-01 09:53:34',1,1,'Event : Mise à jour mensuelle','14.58','16.66',1),(28,'2013-02-01 09:53:34',1,2,'Event : Mise à jour mensuelle','14.58','16.66',1),(29,'2013-02-01 09:53:34',1,3,'Event : Mise à jour mensuelle','14.58','16.66',1),(30,'2013-02-01 09:53:34',1,4,'Event : Mise à jour mensuelle','10.42','12.50',1),(31,'2013-02-01 09:53:36',1,1,'Event : Mise à jour mensuelle','16.67','18.75',1),(32,'2013-02-01 09:53:36',1,2,'Event : Mise à jour mensuelle','16.67','18.75',1),(33,'2013-02-01 09:53:36',1,3,'Event : Mise à jour mensuelle','16.67','18.75',1),(34,'2013-02-01 09:53:36',1,4,'Event : Mise à jour mensuelle','12.50','14.58',1),(35,'2013-02-01 09:53:36',1,1,'Event : Mise à jour mensuelle','18.75','20.83',1),(36,'2013-02-01 09:53:36',1,2,'Event : Mise à jour mensuelle','18.75','20.83',1),(37,'2013-02-01 09:53:36',1,3,'Event : Mise à jour mensuelle','18.75','20.83',1),(38,'2013-02-01 09:53:36',1,4,'Event : Mise à jour mensuelle','14.58','16.66',1),(39,'2013-02-01 09:53:37',1,1,'Event : Mise à jour mensuelle','20.83','22.91',1),(40,'2013-02-01 09:53:37',1,2,'Event : Mise à jour mensuelle','20.83','22.91',1),(41,'2013-02-01 09:53:37',1,3,'Event : Mise à jour mensuelle','20.83','22.91',1),(42,'2013-02-01 09:53:37',1,4,'Event : Mise à jour mensuelle','16.67','18.75',1),(43,'2013-02-01 09:53:37',1,1,'Event : Mise à jour mensuelle','22.92','25.00',1),(44,'2013-02-01 09:53:37',1,2,'Event : Mise à jour mensuelle','22.92','25.00',1),(45,'2013-02-01 09:53:37',1,3,'Event : Mise à jour mensuelle','22.92','25.00',1),(46,'2013-02-01 09:53:37',1,4,'Event : Mise à jour mensuelle','18.75','20.83',1),(47,'2013-02-01 09:53:44',1,1,'Event : Mise à jour mensuelle','25.00','27.08',1),(48,'2013-02-01 09:53:44',1,2,'Event : Mise à jour mensuelle','25.00','27.08',1),(49,'2013-02-01 09:53:44',1,3,'Event : Mise à jour mensuelle','25.00','27.08',1),(50,'2013-02-01 09:53:44',1,4,'Event : Mise à jour mensuelle','20.83','22.91',1),(51,'2013-02-01 09:53:47',1,1,'Event : Mise à jour mensuelle','27.08','29.16',1),(52,'2013-02-01 09:53:47',1,2,'Event : Mise à jour mensuelle','27.08','29.16',1),(53,'2013-02-01 09:53:47',1,3,'Event : Mise à jour mensuelle','27.08','29.16',1),(54,'2013-02-01 09:53:47',1,4,'Event : Mise à jour mensuelle','22.92','25.00',1),(55,'2013-02-01 09:53:47',1,1,'Event : Mise à jour mensuelle','29.17','31.25',1),(56,'2013-02-01 09:53:47',1,2,'Event : Mise à jour mensuelle','29.17','31.25',1),(57,'2013-02-01 09:53:47',1,3,'Event : Mise à jour mensuelle','29.17','31.25',1),(58,'2013-02-01 09:53:47',1,4,'Event : Mise à jour mensuelle','25.00','27.08',1),(59,'2013-02-01 09:53:49',1,1,'Event : Mise à jour mensuelle','31.25','33.33',1),(60,'2013-02-01 09:53:49',1,2,'Event : Mise à jour mensuelle','31.25','33.33',1),(61,'2013-02-01 09:53:49',1,3,'Event : Mise à jour mensuelle','31.25','33.33',1),(62,'2013-02-01 09:53:49',1,4,'Event : Mise à jour mensuelle','27.08','29.16',1),(63,'2013-02-01 09:53:52',1,1,'Event : Mise à jour mensuelle','33.33','35.41',1),(64,'2013-02-01 09:53:52',1,2,'Event : Mise à jour mensuelle','33.33','35.41',1),(65,'2013-02-01 09:53:52',1,3,'Event : Mise à jour mensuelle','33.33','35.41',1),(66,'2013-02-01 09:53:52',1,4,'Event : Mise à jour mensuelle','29.17','31.25',1),(67,'2013-02-01 09:53:52',1,1,'Event : Mise à jour mensuelle','35.42','37.50',1),(68,'2013-02-01 09:53:52',1,2,'Event : Mise à jour mensuelle','35.42','37.50',1),(69,'2013-02-01 09:53:52',1,3,'Event : Mise à jour mensuelle','35.42','37.50',1),(70,'2013-02-01 09:53:52',1,4,'Event : Mise à jour mensuelle','31.25','33.33',1),(71,'2013-02-01 09:53:53',1,1,'Event : Mise à jour mensuelle','37.50','39.58',1),(72,'2013-02-01 09:53:53',1,2,'Event : Mise à jour mensuelle','37.50','39.58',1),(73,'2013-02-01 09:53:53',1,3,'Event : Mise à jour mensuelle','37.50','39.58',1),(74,'2013-02-01 09:53:53',1,4,'Event : Mise à jour mensuelle','33.33','35.41',1),(75,'2013-02-01 09:53:54',1,1,'Event : Mise à jour mensuelle','39.58','41.66',1),(76,'2013-02-01 09:53:54',1,2,'Event : Mise à jour mensuelle','39.58','41.66',1),(77,'2013-02-01 09:53:54',1,3,'Event : Mise à jour mensuelle','39.58','41.66',1),(78,'2013-02-01 09:53:54',1,4,'Event : Mise à jour mensuelle','35.42','37.50',1),(79,'2013-02-01 09:53:54',1,1,'Event : Mise à jour mensuelle','41.67','43.75',1),(80,'2013-02-01 09:53:54',1,2,'Event : Mise à jour mensuelle','41.67','43.75',1),(81,'2013-02-01 09:53:54',1,3,'Event : Mise à jour mensuelle','41.67','43.75',1),(82,'2013-02-01 09:53:54',1,4,'Event : Mise à jour mensuelle','37.50','39.58',1),(83,'2013-02-01 09:55:49',1,1,'Event : Mise à jour mensuelle','43.75','45.83',1),(84,'2013-02-01 09:55:49',1,2,'Event : Mise à jour mensuelle','43.75','45.83',1),(85,'2013-02-01 09:55:49',1,3,'Event : Mise à jour mensuelle','43.75','45.83',1),(86,'2013-02-01 09:55:49',1,4,'Event : Mise à jour mensuelle','39.58','41.66',1),(87,'2013-02-01 09:55:56',1,1,'Event : Mise à jour mensuelle','45.83','47.91',1),(88,'2013-02-01 09:55:56',1,2,'Event : Mise à jour mensuelle','45.83','47.91',1),(89,'2013-02-01 09:55:56',1,3,'Event : Mise à jour mensuelle','45.83','47.91',1),(90,'2013-02-01 09:55:56',1,4,'Event : Mise à jour mensuelle','41.67','43.75',1),(91,'2013-02-01 09:56:01',1,1,'Event : Mise à jour mensuelle','47.92','50.00',1),(92,'2013-02-01 09:56:01',1,2,'Event : Mise à jour mensuelle','47.92','50.00',1),(93,'2013-02-01 09:56:01',1,3,'Event : Mise à jour mensuelle','47.92','50.00',1),(94,'2013-02-01 09:56:01',1,4,'Event : Mise à jour mensuelle','43.75','45.83',1),(95,'2013-02-01 09:56:01',1,1,'Event : Mise à jour mensuelle','50.00','52.08',1),(96,'2013-02-01 09:56:01',1,2,'Event : Mise à jour mensuelle','50.00','52.08',1),(97,'2013-02-01 09:56:01',1,3,'Event : Mise à jour mensuelle','50.00','52.08',1),(98,'2013-02-01 09:56:01',1,4,'Event : Mise à jour mensuelle','45.83','47.91',1),(99,'2013-02-01 09:56:03',1,1,'Event : Mise à jour mensuelle','52.08','54.16',1),(100,'2013-02-01 09:56:03',1,2,'Event : Mise à jour mensuelle','52.08','54.16',1),(101,'2013-02-01 09:56:03',1,3,'Event : Mise à jour mensuelle','52.08','54.16',1),(102,'2013-02-01 09:56:03',1,4,'Event : Mise à jour mensuelle','47.92','50.00',1),(103,'2013-02-01 09:56:03',1,1,'Event : Mise à jour mensuelle','54.17','56.25',1),(104,'2013-02-01 09:56:03',1,2,'Event : Mise à jour mensuelle','54.17','56.25',1),(105,'2013-02-01 09:56:03',1,3,'Event : Mise à jour mensuelle','54.17','56.25',1),(106,'2013-02-01 09:56:03',1,4,'Event : Mise à jour mensuelle','50.00','52.08',1),(107,'2013-02-01 09:56:05',1,1,'Event : Mise à jour mensuelle','56.25','58.33',1),(108,'2013-02-01 09:56:05',1,2,'Event : Mise à jour mensuelle','56.25','58.33',1),(109,'2013-02-01 09:56:05',1,3,'Event : Mise à jour mensuelle','56.25','58.33',1),(110,'2013-02-01 09:56:05',1,4,'Event : Mise à jour mensuelle','52.08','54.16',1),(111,'2013-02-01 09:56:06',1,1,'Event : Mise à jour mensuelle','58.33','60.41',1),(112,'2013-02-01 09:56:06',1,2,'Event : Mise à jour mensuelle','58.33','60.41',1),(113,'2013-02-01 09:56:06',1,3,'Event : Mise à jour mensuelle','58.33','60.41',1),(114,'2013-02-01 09:56:06',1,4,'Event : Mise à jour mensuelle','54.17','56.25',1),(115,'2013-02-01 09:56:06',1,1,'Event : Mise à jour mensuelle','60.42','62.50',1),(116,'2013-02-01 09:56:06',1,2,'Event : Mise à jour mensuelle','60.42','62.50',1),(117,'2013-02-01 09:56:06',1,3,'Event : Mise à jour mensuelle','60.42','62.50',1),(118,'2013-02-01 09:56:06',1,4,'Event : Mise à jour mensuelle','56.25','58.33',1),(119,'2013-02-01 09:56:07',1,1,'Event : Mise à jour mensuelle','62.50','64.58',1),(120,'2013-02-01 09:56:07',1,2,'Event : Mise à jour mensuelle','62.50','64.58',1),(121,'2013-02-01 09:56:07',1,3,'Event : Mise à jour mensuelle','62.50','64.58',1),(122,'2013-02-01 09:56:07',1,4,'Event : Mise à jour mensuelle','58.33','60.41',1),(123,'2013-02-01 09:56:07',1,1,'Event : Mise à jour mensuelle','64.58','66.66',1),(124,'2013-02-01 09:56:07',1,2,'Event : Mise à jour mensuelle','64.58','66.66',1),(125,'2013-02-01 09:56:07',1,3,'Event : Mise à jour mensuelle','64.58','66.66',1),(126,'2013-02-01 09:56:07',1,4,'Event : Mise à jour mensuelle','60.42','62.50',1),(127,'2013-02-01 09:56:50',1,1,'Event : Mise à jour mensuelle','66.67','68.75',1),(128,'2013-02-01 09:56:50',1,2,'Event : Mise à jour mensuelle','66.67','68.75',1),(129,'2013-02-01 09:56:50',1,3,'Event : Mise à jour mensuelle','66.67','68.75',1),(130,'2013-02-01 09:56:50',1,4,'Event : Mise à jour mensuelle','62.50','64.58',1),(131,'2013-02-01 09:56:50',1,1,'Event : Mise à jour mensuelle','68.75','70.83',1),(132,'2013-02-01 09:56:50',1,2,'Event : Mise à jour mensuelle','68.75','70.83',1),(133,'2013-02-01 09:56:50',1,3,'Event : Mise à jour mensuelle','68.75','70.83',1),(134,'2013-02-01 09:56:50',1,4,'Event : Mise à jour mensuelle','64.58','66.66',1),(135,'2013-02-17 18:49:21',1,1,'Event : Mise à jour mensuelle','70.83','72.91',1),(136,'2013-02-17 18:49:21',1,2,'Event : Mise à jour mensuelle','70.83','72.91',1),(137,'2013-02-17 18:49:21',1,3,'Event : Mise à jour mensuelle','70.83','72.91',1),(138,'2013-02-17 18:49:21',1,4,'Event : Mise à jour mensuelle','66.67','68.75',1),(139,'2013-02-17 19:06:57',1,1,'Event : Holiday','72.92','71.92',1),(140,'2013-03-01 23:12:31',1,1,'Event : Mise à jour mensuelle','71.92','74.00',1),(141,'2013-03-01 23:12:31',1,2,'Event : Mise à jour mensuelle','72.92','75.00',1),(142,'2013-03-01 23:12:31',1,3,'Event : Mise à jour mensuelle','72.92','75.00',1),(143,'2013-03-01 23:12:31',1,4,'Event : Mise à jour mensuelle','68.75','70.83',1),(144,'2013-03-01 23:12:31',1,5,'Event : Mise à jour mensuelle','0.00','2.08',1),(145,'2015-07-19 15:44:57',1,1,'Monthly update','0','2.08334',4),(146,'2015-07-19 15:44:57',1,2,'Monthly update','0','2.08334',4),(147,'2015-07-19 15:44:57',1,3,'Monthly update','0','2.08334',4),(148,'2015-07-19 15:44:57',1,4,'Monthly update','0','2.08334',4),(149,'2015-07-19 15:44:57',1,5,'Monthly update','0','2.08334',4),(150,'2015-07-19 15:44:57',1,6,'Monthly update','0','2.08334',4),(151,'2015-07-19 15:44:57',1,1,'Monthly update','0','2.08334',5),(152,'2015-07-19 15:44:57',1,2,'Monthly update','0','2.08334',5),(153,'2015-07-19 15:44:57',1,3,'Monthly update','0','2.08334',5),(154,'2015-07-19 15:44:57',1,4,'Monthly update','0','2.08334',5),(155,'2015-07-19 15:44:57',1,5,'Monthly update','0','2.08334',5),(156,'2015-07-19 15:44:57',1,6,'Monthly update','0','2.08334',5),(157,'2015-07-19 15:44:57',1,1,'Monthly update','0','2.08334',9),(158,'2015-07-19 15:44:57',1,2,'Monthly update','0','2.08334',9),(159,'2015-07-19 15:44:57',1,3,'Monthly update','0','2.08334',9),(160,'2015-07-19 15:44:57',1,4,'Monthly update','0','2.08334',9),(161,'2015-07-19 15:44:57',1,5,'Monthly update','0','2.08334',9),(162,'2015-07-19 15:44:57',1,6,'Monthly update','0','2.08334',9); +INSERT INTO `llx_holiday_logs` VALUES (1,'2013-01-17 21:03:15',1,1,'Event : Mise à jour mensuelle','0.00','2.08',1),(2,'2013-01-17 21:03:15',1,2,'Event : Mise à jour mensuelle','0.00','2.08',1),(3,'2013-01-17 21:03:15',1,3,'Event : Mise à jour mensuelle','0.00','2.08',1),(4,'2013-02-01 09:53:26',1,1,'Event : Mise à jour mensuelle','2.08','4.16',1),(5,'2013-02-01 09:53:26',1,2,'Event : Mise à jour mensuelle','2.08','4.16',1),(6,'2013-02-01 09:53:26',1,3,'Event : Mise à jour mensuelle','2.08','4.16',1),(7,'2013-02-01 09:53:26',1,1,'Event : Mise à jour mensuelle','4.17','6.25',1),(8,'2013-02-01 09:53:26',1,2,'Event : Mise à jour mensuelle','4.17','6.25',1),(9,'2013-02-01 09:53:26',1,3,'Event : Mise à jour mensuelle','4.17','6.25',1),(10,'2013-02-01 09:53:26',1,4,'Event : Mise à jour mensuelle','0.00','2.08',1),(11,'2013-02-01 09:53:31',1,1,'Event : Mise à jour mensuelle','6.25','8.33',1),(12,'2013-02-01 09:53:31',1,2,'Event : Mise à jour mensuelle','6.25','8.33',1),(13,'2013-02-01 09:53:31',1,3,'Event : Mise à jour mensuelle','6.25','8.33',1),(14,'2013-02-01 09:53:31',1,4,'Event : Mise à jour mensuelle','2.08','4.16',1),(15,'2013-02-01 09:53:31',1,1,'Event : Mise à jour mensuelle','8.33','10.41',1),(16,'2013-02-01 09:53:31',1,2,'Event : Mise à jour mensuelle','8.33','10.41',1),(17,'2013-02-01 09:53:31',1,3,'Event : Mise à jour mensuelle','8.33','10.41',1),(18,'2013-02-01 09:53:31',1,4,'Event : Mise à jour mensuelle','4.17','6.25',1),(19,'2013-02-01 09:53:33',1,1,'Event : Mise à jour mensuelle','10.42','12.50',1),(20,'2013-02-01 09:53:33',1,2,'Event : Mise à jour mensuelle','10.42','12.50',1),(21,'2013-02-01 09:53:33',1,3,'Event : Mise à jour mensuelle','10.42','12.50',1),(22,'2013-02-01 09:53:33',1,4,'Event : Mise à jour mensuelle','6.25','8.33',1),(23,'2013-02-01 09:53:34',1,1,'Event : Mise à jour mensuelle','12.50','14.58',1),(24,'2013-02-01 09:53:34',1,2,'Event : Mise à jour mensuelle','12.50','14.58',1),(25,'2013-02-01 09:53:34',1,3,'Event : Mise à jour mensuelle','12.50','14.58',1),(26,'2013-02-01 09:53:34',1,4,'Event : Mise à jour mensuelle','8.33','10.41',1),(27,'2013-02-01 09:53:34',1,1,'Event : Mise à jour mensuelle','14.58','16.66',1),(28,'2013-02-01 09:53:34',1,2,'Event : Mise à jour mensuelle','14.58','16.66',1),(29,'2013-02-01 09:53:34',1,3,'Event : Mise à jour mensuelle','14.58','16.66',1),(30,'2013-02-01 09:53:34',1,4,'Event : Mise à jour mensuelle','10.42','12.50',1),(31,'2013-02-01 09:53:36',1,1,'Event : Mise à jour mensuelle','16.67','18.75',1),(32,'2013-02-01 09:53:36',1,2,'Event : Mise à jour mensuelle','16.67','18.75',1),(33,'2013-02-01 09:53:36',1,3,'Event : Mise à jour mensuelle','16.67','18.75',1),(34,'2013-02-01 09:53:36',1,4,'Event : Mise à jour mensuelle','12.50','14.58',1),(35,'2013-02-01 09:53:36',1,1,'Event : Mise à jour mensuelle','18.75','20.83',1),(36,'2013-02-01 09:53:36',1,2,'Event : Mise à jour mensuelle','18.75','20.83',1),(37,'2013-02-01 09:53:36',1,3,'Event : Mise à jour mensuelle','18.75','20.83',1),(38,'2013-02-01 09:53:36',1,4,'Event : Mise à jour mensuelle','14.58','16.66',1),(39,'2013-02-01 09:53:37',1,1,'Event : Mise à jour mensuelle','20.83','22.91',1),(40,'2013-02-01 09:53:37',1,2,'Event : Mise à jour mensuelle','20.83','22.91',1),(41,'2013-02-01 09:53:37',1,3,'Event : Mise à jour mensuelle','20.83','22.91',1),(42,'2013-02-01 09:53:37',1,4,'Event : Mise à jour mensuelle','16.67','18.75',1),(43,'2013-02-01 09:53:37',1,1,'Event : Mise à jour mensuelle','22.92','25.00',1),(44,'2013-02-01 09:53:37',1,2,'Event : Mise à jour mensuelle','22.92','25.00',1),(45,'2013-02-01 09:53:37',1,3,'Event : Mise à jour mensuelle','22.92','25.00',1),(46,'2013-02-01 09:53:37',1,4,'Event : Mise à jour mensuelle','18.75','20.83',1),(47,'2013-02-01 09:53:44',1,1,'Event : Mise à jour mensuelle','25.00','27.08',1),(48,'2013-02-01 09:53:44',1,2,'Event : Mise à jour mensuelle','25.00','27.08',1),(49,'2013-02-01 09:53:44',1,3,'Event : Mise à jour mensuelle','25.00','27.08',1),(50,'2013-02-01 09:53:44',1,4,'Event : Mise à jour mensuelle','20.83','22.91',1),(51,'2013-02-01 09:53:47',1,1,'Event : Mise à jour mensuelle','27.08','29.16',1),(52,'2013-02-01 09:53:47',1,2,'Event : Mise à jour mensuelle','27.08','29.16',1),(53,'2013-02-01 09:53:47',1,3,'Event : Mise à jour mensuelle','27.08','29.16',1),(54,'2013-02-01 09:53:47',1,4,'Event : Mise à jour mensuelle','22.92','25.00',1),(55,'2013-02-01 09:53:47',1,1,'Event : Mise à jour mensuelle','29.17','31.25',1),(56,'2013-02-01 09:53:47',1,2,'Event : Mise à jour mensuelle','29.17','31.25',1),(57,'2013-02-01 09:53:47',1,3,'Event : Mise à jour mensuelle','29.17','31.25',1),(58,'2013-02-01 09:53:47',1,4,'Event : Mise à jour mensuelle','25.00','27.08',1),(59,'2013-02-01 09:53:49',1,1,'Event : Mise à jour mensuelle','31.25','33.33',1),(60,'2013-02-01 09:53:49',1,2,'Event : Mise à jour mensuelle','31.25','33.33',1),(61,'2013-02-01 09:53:49',1,3,'Event : Mise à jour mensuelle','31.25','33.33',1),(62,'2013-02-01 09:53:49',1,4,'Event : Mise à jour mensuelle','27.08','29.16',1),(63,'2013-02-01 09:53:52',1,1,'Event : Mise à jour mensuelle','33.33','35.41',1),(64,'2013-02-01 09:53:52',1,2,'Event : Mise à jour mensuelle','33.33','35.41',1),(65,'2013-02-01 09:53:52',1,3,'Event : Mise à jour mensuelle','33.33','35.41',1),(66,'2013-02-01 09:53:52',1,4,'Event : Mise à jour mensuelle','29.17','31.25',1),(67,'2013-02-01 09:53:52',1,1,'Event : Mise à jour mensuelle','35.42','37.50',1),(68,'2013-02-01 09:53:52',1,2,'Event : Mise à jour mensuelle','35.42','37.50',1),(69,'2013-02-01 09:53:52',1,3,'Event : Mise à jour mensuelle','35.42','37.50',1),(70,'2013-02-01 09:53:52',1,4,'Event : Mise à jour mensuelle','31.25','33.33',1),(71,'2013-02-01 09:53:53',1,1,'Event : Mise à jour mensuelle','37.50','39.58',1),(72,'2013-02-01 09:53:53',1,2,'Event : Mise à jour mensuelle','37.50','39.58',1),(73,'2013-02-01 09:53:53',1,3,'Event : Mise à jour mensuelle','37.50','39.58',1),(74,'2013-02-01 09:53:53',1,4,'Event : Mise à jour mensuelle','33.33','35.41',1),(75,'2013-02-01 09:53:54',1,1,'Event : Mise à jour mensuelle','39.58','41.66',1),(76,'2013-02-01 09:53:54',1,2,'Event : Mise à jour mensuelle','39.58','41.66',1),(77,'2013-02-01 09:53:54',1,3,'Event : Mise à jour mensuelle','39.58','41.66',1),(78,'2013-02-01 09:53:54',1,4,'Event : Mise à jour mensuelle','35.42','37.50',1),(79,'2013-02-01 09:53:54',1,1,'Event : Mise à jour mensuelle','41.67','43.75',1),(80,'2013-02-01 09:53:54',1,2,'Event : Mise à jour mensuelle','41.67','43.75',1),(81,'2013-02-01 09:53:54',1,3,'Event : Mise à jour mensuelle','41.67','43.75',1),(82,'2013-02-01 09:53:54',1,4,'Event : Mise à jour mensuelle','37.50','39.58',1),(83,'2013-02-01 09:55:49',1,1,'Event : Mise à jour mensuelle','43.75','45.83',1),(84,'2013-02-01 09:55:49',1,2,'Event : Mise à jour mensuelle','43.75','45.83',1),(85,'2013-02-01 09:55:49',1,3,'Event : Mise à jour mensuelle','43.75','45.83',1),(86,'2013-02-01 09:55:49',1,4,'Event : Mise à jour mensuelle','39.58','41.66',1),(87,'2013-02-01 09:55:56',1,1,'Event : Mise à jour mensuelle','45.83','47.91',1),(88,'2013-02-01 09:55:56',1,2,'Event : Mise à jour mensuelle','45.83','47.91',1),(89,'2013-02-01 09:55:56',1,3,'Event : Mise à jour mensuelle','45.83','47.91',1),(90,'2013-02-01 09:55:56',1,4,'Event : Mise à jour mensuelle','41.67','43.75',1),(91,'2013-02-01 09:56:01',1,1,'Event : Mise à jour mensuelle','47.92','50.00',1),(92,'2013-02-01 09:56:01',1,2,'Event : Mise à jour mensuelle','47.92','50.00',1),(93,'2013-02-01 09:56:01',1,3,'Event : Mise à jour mensuelle','47.92','50.00',1),(94,'2013-02-01 09:56:01',1,4,'Event : Mise à jour mensuelle','43.75','45.83',1),(95,'2013-02-01 09:56:01',1,1,'Event : Mise à jour mensuelle','50.00','52.08',1),(96,'2013-02-01 09:56:01',1,2,'Event : Mise à jour mensuelle','50.00','52.08',1),(97,'2013-02-01 09:56:01',1,3,'Event : Mise à jour mensuelle','50.00','52.08',1),(98,'2013-02-01 09:56:01',1,4,'Event : Mise à jour mensuelle','45.83','47.91',1),(99,'2013-02-01 09:56:03',1,1,'Event : Mise à jour mensuelle','52.08','54.16',1),(100,'2013-02-01 09:56:03',1,2,'Event : Mise à jour mensuelle','52.08','54.16',1),(101,'2013-02-01 09:56:03',1,3,'Event : Mise à jour mensuelle','52.08','54.16',1),(102,'2013-02-01 09:56:03',1,4,'Event : Mise à jour mensuelle','47.92','50.00',1),(103,'2013-02-01 09:56:03',1,1,'Event : Mise à jour mensuelle','54.17','56.25',1),(104,'2013-02-01 09:56:03',1,2,'Event : Mise à jour mensuelle','54.17','56.25',1),(105,'2013-02-01 09:56:03',1,3,'Event : Mise à jour mensuelle','54.17','56.25',1),(106,'2013-02-01 09:56:03',1,4,'Event : Mise à jour mensuelle','50.00','52.08',1),(107,'2013-02-01 09:56:05',1,1,'Event : Mise à jour mensuelle','56.25','58.33',1),(108,'2013-02-01 09:56:05',1,2,'Event : Mise à jour mensuelle','56.25','58.33',1),(109,'2013-02-01 09:56:05',1,3,'Event : Mise à jour mensuelle','56.25','58.33',1),(110,'2013-02-01 09:56:05',1,4,'Event : Mise à jour mensuelle','52.08','54.16',1),(111,'2013-02-01 09:56:06',1,1,'Event : Mise à jour mensuelle','58.33','60.41',1),(112,'2013-02-01 09:56:06',1,2,'Event : Mise à jour mensuelle','58.33','60.41',1),(113,'2013-02-01 09:56:06',1,3,'Event : Mise à jour mensuelle','58.33','60.41',1),(114,'2013-02-01 09:56:06',1,4,'Event : Mise à jour mensuelle','54.17','56.25',1),(115,'2013-02-01 09:56:06',1,1,'Event : Mise à jour mensuelle','60.42','62.50',1),(116,'2013-02-01 09:56:06',1,2,'Event : Mise à jour mensuelle','60.42','62.50',1),(117,'2013-02-01 09:56:06',1,3,'Event : Mise à jour mensuelle','60.42','62.50',1),(118,'2013-02-01 09:56:06',1,4,'Event : Mise à jour mensuelle','56.25','58.33',1),(119,'2013-02-01 09:56:07',1,1,'Event : Mise à jour mensuelle','62.50','64.58',1),(120,'2013-02-01 09:56:07',1,2,'Event : Mise à jour mensuelle','62.50','64.58',1),(121,'2013-02-01 09:56:07',1,3,'Event : Mise à jour mensuelle','62.50','64.58',1),(122,'2013-02-01 09:56:07',1,4,'Event : Mise à jour mensuelle','58.33','60.41',1),(123,'2013-02-01 09:56:07',1,1,'Event : Mise à jour mensuelle','64.58','66.66',1),(124,'2013-02-01 09:56:07',1,2,'Event : Mise à jour mensuelle','64.58','66.66',1),(125,'2013-02-01 09:56:07',1,3,'Event : Mise à jour mensuelle','64.58','66.66',1),(126,'2013-02-01 09:56:07',1,4,'Event : Mise à jour mensuelle','60.42','62.50',1),(127,'2013-02-01 09:56:50',1,1,'Event : Mise à jour mensuelle','66.67','68.75',1),(128,'2013-02-01 09:56:50',1,2,'Event : Mise à jour mensuelle','66.67','68.75',1),(129,'2013-02-01 09:56:50',1,3,'Event : Mise à jour mensuelle','66.67','68.75',1),(130,'2013-02-01 09:56:50',1,4,'Event : Mise à jour mensuelle','62.50','64.58',1),(131,'2013-02-01 09:56:50',1,1,'Event : Mise à jour mensuelle','68.75','70.83',1),(132,'2013-02-01 09:56:50',1,2,'Event : Mise à jour mensuelle','68.75','70.83',1),(133,'2013-02-01 09:56:50',1,3,'Event : Mise à jour mensuelle','68.75','70.83',1),(134,'2013-02-01 09:56:50',1,4,'Event : Mise à jour mensuelle','64.58','66.66',1),(135,'2013-02-17 18:49:21',1,1,'Event : Mise à jour mensuelle','70.83','72.91',1),(136,'2013-02-17 18:49:21',1,2,'Event : Mise à jour mensuelle','70.83','72.91',1),(137,'2013-02-17 18:49:21',1,3,'Event : Mise à jour mensuelle','70.83','72.91',1),(138,'2013-02-17 18:49:21',1,4,'Event : Mise à jour mensuelle','66.67','68.75',1),(139,'2013-02-17 19:06:57',1,1,'Event : Holiday','72.92','71.92',1),(140,'2013-03-01 23:12:31',1,1,'Event : Mise à jour mensuelle','71.92','74.00',1),(141,'2013-03-01 23:12:31',1,2,'Event : Mise à jour mensuelle','72.92','75.00',1),(142,'2013-03-01 23:12:31',1,3,'Event : Mise à jour mensuelle','72.92','75.00',1),(143,'2013-03-01 23:12:31',1,4,'Event : Mise à jour mensuelle','68.75','70.83',1),(144,'2013-03-01 23:12:31',1,5,'Event : Mise à jour mensuelle','0.00','2.08',1),(145,'2015-07-19 15:44:57',1,1,'Monthly update','0','2.08334',4),(146,'2015-07-19 15:44:57',1,2,'Monthly update','0','2.08334',4),(147,'2015-07-19 15:44:57',1,3,'Monthly update','0','2.08334',4),(148,'2015-07-19 15:44:57',1,4,'Monthly update','0','2.08334',4),(149,'2015-07-19 15:44:57',1,5,'Monthly update','0','2.08334',4),(150,'2015-07-19 15:44:57',1,6,'Monthly update','0','2.08334',4),(151,'2015-07-19 15:44:57',1,1,'Monthly update','0','2.08334',5),(152,'2015-07-19 15:44:57',1,2,'Monthly update','0','2.08334',5),(153,'2015-07-19 15:44:57',1,3,'Monthly update','0','2.08334',5),(154,'2015-07-19 15:44:57',1,4,'Monthly update','0','2.08334',5),(155,'2015-07-19 15:44:57',1,5,'Monthly update','0','2.08334',5),(156,'2015-07-19 15:44:57',1,6,'Monthly update','0','2.08334',5),(157,'2015-07-19 15:44:57',1,1,'Monthly update','0','2.08334',9),(158,'2015-07-19 15:44:57',1,2,'Monthly update','0','2.08334',9),(159,'2015-07-19 15:44:57',1,3,'Monthly update','0','2.08334',9),(160,'2015-07-19 15:44:57',1,4,'Monthly update','0','2.08334',9),(161,'2015-07-19 15:44:57',1,5,'Monthly update','0','2.08334',9),(162,'2015-07-19 15:44:57',1,6,'Monthly update','0','2.08334',9),(163,'2016-01-22 18:59:06',12,1,'Monthly update','0','2.08334',4),(164,'2016-01-22 18:59:06',12,2,'Monthly update','0','2.08334',4),(165,'2016-01-22 18:59:06',12,3,'Monthly update','0','2.08334',4),(166,'2016-01-22 18:59:06',12,4,'Monthly update','0','2.08334',4),(167,'2016-01-22 18:59:06',12,6,'Monthly update','0','2.08334',4),(168,'2016-01-22 18:59:06',12,1,'Monthly update','0','2.08334',5),(169,'2016-01-22 18:59:06',12,2,'Monthly update','0','2.08334',5),(170,'2016-01-22 18:59:06',12,3,'Monthly update','0','2.08334',5),(171,'2016-01-22 18:59:06',12,4,'Monthly update','0','2.08334',5),(172,'2016-01-22 18:59:06',12,6,'Monthly update','0','2.08334',5),(173,'2016-01-22 18:59:06',12,1,'Monthly update','0','2.08334',9),(174,'2016-01-22 18:59:06',12,2,'Monthly update','0','2.08334',9),(175,'2016-01-22 18:59:06',12,3,'Monthly update','0','2.08334',9),(176,'2016-01-22 18:59:06',12,4,'Monthly update','0','2.08334',9),(177,'2016-01-22 18:59:06',12,6,'Monthly update','0','2.08334',9),(178,'2016-01-22 18:59:38',12,18,'Manual update','0','10',5),(179,'2016-01-22 18:59:42',12,16,'Manual update','0','10',5),(180,'2016-01-22 18:59:45',12,12,'Manual update','0','10',5),(181,'2016-01-22 18:59:49',12,1,'Manual update','0','10',5),(182,'2016-01-22 18:59:52',12,2,'Manual update','0','10',5),(183,'2016-01-22 18:59:55',12,3,'Manual update','0','5',5); /*!40000 ALTER TABLE `llx_holiday_logs` ENABLE KEYS */; UNLOCK TABLES; @@ -5283,7 +4932,7 @@ CREATE TABLE `llx_holiday_users` ( LOCK TABLES `llx_holiday_users` WRITE; /*!40000 ALTER TABLE `llx_holiday_users` DISABLE KEYS */; -INSERT INTO `llx_holiday_users` VALUES (0,0,1),(1,74.00334000000001,1),(2,75.00024000000003,1),(3,75.00024000000003,1),(4,70.83356000000002,1),(5,2.08334,1),(6,0,1); +INSERT INTO `llx_holiday_users` VALUES (0,0,1),(1,74.00334000000001,1),(2,75.00024000000003,1),(3,75.00024000000003,1),(4,70.83356000000002,1),(5,2.08334,1),(6,0,1),(18,10,5),(16,10,5),(12,10,5),(1,10,5),(2,10,5),(3,5,5); /*!40000 ALTER TABLE `llx_holiday_users` ENABLE KEYS */; UNLOCK TABLES; @@ -5330,7 +4979,7 @@ CREATE TABLE `llx_links` ( `objecttype` varchar(255) NOT NULL, `objectid` int(11) NOT NULL, PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5339,6 +4988,7 @@ CREATE TABLE `llx_links` ( LOCK TABLES `llx_links` WRITE; /*!40000 ALTER TABLE `llx_links` DISABLE KEYS */; +INSERT INTO `llx_links` VALUES (1,1,'2016-01-16 16:45:35','http://www.dolicloud.com','The DoliCoud service','societe',10),(2,1,'2016-01-16 17:14:35','https://www.dolistore.com/en/tools-documentation/12-SVG-file-for-85cm-x-200cm-rollup.html','Link to rollup file on dolistore.com','product',11),(3,1,'2016-01-22 17:40:23','http://www.nltechno.com','NLtechno portal','societe',10),(4,1,'2016-01-22 18:32:31','https://play.google.com/store/apps/details?id=com.nltechno.dolidroidpro','Link on Google Play','product',5); /*!40000 ALTER TABLE `llx_links` ENABLE KEYS */; UNLOCK TABLES; @@ -5615,7 +5265,7 @@ CREATE TABLE `llx_menu` ( PRIMARY KEY (`rowid`), UNIQUE KEY `idx_menu_uk_menu` (`menu_handler`,`fk_menu`,`position`,`url`,`entity`), KEY `idx_menu_menuhandler_type` (`menu_handler`,`type`) -) ENGINE=InnoDB AUTO_INCREMENT=113729 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=139883 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5624,7 +5274,7 @@ CREATE TABLE `llx_menu` ( LOCK TABLES `llx_menu` WRITE; /*!40000 ALTER TABLE `llx_menu` DISABLE KEYS */; -INSERT INTO `llx_menu` VALUES (19289,'all',1,'cashdesk','top','cashdesk',0,NULL,NULL,100,'/cashdesk/index.php?user=__LOGIN__','pointofsale','CashDeskMenu','cashdesk',NULL,NULL,'1','$conf->cashdesk->enabled',0,'2012-12-08 13:11:09'),(87422,'smartphone',1,NULL,'top','home',0,NULL,NULL,1,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2013-02-24 18:29:15'),(87423,'smartphone',1,NULL,'top','companies',0,NULL,NULL,2,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->societe->enabled || $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(87424,'smartphone',1,NULL,'top','products',0,NULL,NULL,3,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2013-02-24 18:29:15'),(87426,'smartphone',1,NULL,'top','commercial',0,NULL,NULL,5,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87427,'smartphone',1,NULL,'top','accountancy',0,NULL,NULL,6,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->commande->lire || $user->rights->facture->lire','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled',2,'2013-02-24 18:29:15'),(87428,'smartphone',1,NULL,'top','project',0,NULL,NULL,7,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',0,'2013-02-24 18:29:15'),(87429,'smartphone',1,NULL,'top','tools',0,NULL,NULL,8,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled',2,'2013-02-24 18:29:15'),(87432,'smartphone',1,NULL,'top','shop',0,NULL,NULL,11,'/boutique/index.php?mainmenu=shop&leftmenu=','','OSCommerce','shop',-1,'','','! empty($conf->boutique->enabled)',0,'2013-02-24 18:29:15'),(87434,'smartphone',1,NULL,'top','members',0,NULL,NULL,15,'/adherents/index.php?mainmenu=members&leftmenu=','','Members','members',-1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(87435,'smartphone',1,NULL,'top','bank',0,NULL,NULL,6,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',2,'2013-02-24 18:29:15'),(87521,'smartphone',1,NULL,'left','home',87422,NULL,NULL,0,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'','','$user->admin',2,'2013-02-24 18:29:15'),(87522,'smartphone',1,NULL,'left','home',87521,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87523,'smartphone',1,NULL,'left','home',87521,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87524,'smartphone',1,NULL,'left','home',87521,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87525,'smartphone',1,NULL,'left','home',87521,NULL,NULL,5,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87526,'smartphone',1,NULL,'left','home',87521,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87527,'smartphone',1,NULL,'left','home',87521,NULL,NULL,6,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87529,'smartphone',1,NULL,'left','home',87521,NULL,NULL,7,'/admin/perms.php?leftmenu=setup','','Security','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87530,'smartphone',1,NULL,'left','home',87521,NULL,NULL,9,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87531,'smartphone',1,NULL,'left','home',87521,NULL,NULL,8,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87532,'smartphone',1,NULL,'left','home',87521,NULL,NULL,10,'/admin/dict.php?leftmenu=setup','','DictionarySetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87533,'smartphone',1,NULL,'left','home',87521,NULL,NULL,11,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87621,'smartphone',1,NULL,'left','home',87422,NULL,NULL,1,'/admin/system/index.php?leftmenu=system','','SystemInfo','admin',0,'','','$user->admin',2,'2013-02-24 18:29:15'),(87622,'smartphone',1,NULL,'left','home',87621,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=system','','Dolibarr','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87623,'smartphone',1,NULL,'left','home',87622,NULL,NULL,1,'/admin/system/constall.php?leftmenu=system','','AllParameters','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87624,'smartphone',1,NULL,'left','home',87622,NULL,NULL,4,'/admin/system/about.php?leftmenu=system','','About','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87625,'smartphone',1,NULL,'left','home',87621,NULL,NULL,1,'/admin/system/os.php?leftmenu=system','','OS','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87626,'smartphone',1,NULL,'left','home',87621,NULL,NULL,2,'/admin/system/web.php?leftmenu=system','','WebServer','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87627,'smartphone',1,NULL,'left','home',87621,NULL,NULL,3,'/admin/system/phpinfo.php?leftmenu=system','','Php','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87628,'smartphone',1,NULL,'left','home',87622,NULL,NULL,3,'/admin/triggers.php?leftmenu=system','','Triggers','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87629,'smartphone',1,NULL,'left','home',87622,NULL,NULL,2,'/admin/system/modules.php?leftmenu=system','','Modules','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87631,'smartphone',1,NULL,'left','home',87621,NULL,NULL,4,'/admin/system/database.php?leftmenu=system','','Database','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87632,'smartphone',1,NULL,'left','home',87631,NULL,NULL,0,'/admin/system/database-tables.php?leftmenu=system','','Tables','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87721,'smartphone',1,NULL,'left','home',87422,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','SystemTools','admin',0,'','','$user->admin',2,'2013-02-24 18:29:15'),(87722,'smartphone',1,NULL,'left','home',87721,NULL,NULL,0,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87723,'smartphone',1,NULL,'left','home',87721,NULL,NULL,1,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87724,'smartphone',1,NULL,'left','home',87721,NULL,NULL,6,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87725,'smartphone',1,NULL,'left','home',87721,NULL,NULL,3,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','1 && function_exists(\'eaccelerator_info\')',2,'2013-02-24 18:29:15'),(87726,'smartphone',1,NULL,'left','home',87721,NULL,NULL,2,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87727,'smartphone',1,NULL,'left','home',87721,NULL,NULL,4,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87728,'smartphone',1,NULL,'left','home',87721,NULL,NULL,7,'/support/index.php?leftmenu=admintools','_blank','HelpCenter','help',1,'','','1',2,'2013-02-24 18:29:15'),(87729,'smartphone',1,NULL,'left','home',87721,NULL,NULL,5,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87821,'smartphone',1,NULL,'left','home',87422,NULL,NULL,3,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'','','1',2,'2013-02-24 18:29:15'),(87822,'smartphone',1,NULL,'left','home',87821,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','1',2,'2013-02-24 18:29:15'),(87823,'smartphone',1,NULL,'left','home',87822,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser','users',2,'','$user->rights->user->user->creer || $user->admin','1',2,'2013-02-24 18:29:15'),(87824,'smartphone',1,NULL,'left','home',87821,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin','1',2,'2013-02-24 18:29:15'),(87825,'smartphone',1,NULL,'left','home',87824,NULL,NULL,0,'/user/group/card.php?leftmenu=users&action=create','','NewGroup','users',2,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin','1',2,'2013-02-24 18:29:15'),(87921,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,0,'/societe/societe.php','','ThirdParty','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87922,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,0,'/societe/soc.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87924,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,5,'/fourn/list.php?leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(87925,'smartphone',1,NULL,'left','companies',87924,NULL,NULL,0,'/societe/soc.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(87927,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,3,'/comm/prospect/list.php?leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87928,'smartphone',1,NULL,'left','companies',87927,NULL,NULL,0,'/societe/soc.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87930,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,4,'/comm/list.php?leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87931,'smartphone',1,NULL,'left','companies',87930,NULL,NULL,0,'/societe/soc.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88021,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses||Contacts@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88022,'smartphone',1,NULL,'left','companies',88021,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress||NewContact@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88023,'smartphone',1,NULL,'left','companies',88021,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88025,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','Prospects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88026,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','Customers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88027,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','Suppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(88028,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88071,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88072,'smartphone',1,NULL,'left','companies',88071,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88081,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88082,'smartphone',1,NULL,'left','companies',88081,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88121,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,1,'/comm/prospect/index.php?leftmenu=prospects','','Prospects','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88122,'smartphone',1,NULL,'left','commercial',88121,NULL,NULL,0,'/societe/soc.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88123,'smartphone',1,NULL,'left','commercial',88121,NULL,NULL,1,'/comm/prospect/list.php?leftmenu=prospects','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88124,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,0,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=-1','','LastProspectDoNotContact','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88125,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,1,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=0','','LastProspectNeverContacted','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88126,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,2,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=1','','LastProspectToContact','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88127,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,3,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=2','','LastProspectContactInProcess','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88128,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,4,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=3','','LastProspectContactDone','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88129,'smartphone',1,NULL,'left','commercial',88121,NULL,NULL,2,'/contact/list.php?leftmenu=prospects&type=p','','Contacts','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88221,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,2,'/comm/index.php?leftmenu=customers','','Customers','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88222,'smartphone',1,NULL,'left','commercial',88221,NULL,NULL,0,'/societe/soc.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88223,'smartphone',1,NULL,'left','commercial',88221,NULL,NULL,1,'/comm/list.php?leftmenu=customers','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88224,'smartphone',1,NULL,'left','commercial',88221,NULL,NULL,2,'/contact/list.php?leftmenu=customers&type=c','','Contacts','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88321,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,3,'/contact/list.php?leftmenu=contacts','','Contacts','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88322,'smartphone',1,NULL,'left','commercial',88321,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress||NewContact@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88323,'smartphone',1,NULL,'left','commercial',88321,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88331,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','Prospects','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88332,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=c','','Customers','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88333,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=f','','Suppliers','companies',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88334,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=o','','Other','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88521,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,4,'/comm/propal.php?leftmenu=propals','','Prop','propal',0,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2013-02-24 18:29:15'),(88522,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,0,'/societe/societe.php?leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88523,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,1,'/comm/propal.php?viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88524,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,2,'/comm/propal.php?viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88525,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,3,'/comm/propal.php?viewstatut=2,3,4','','PropalStatusClosedShort','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88526,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88621,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2013-02-24 18:29:15'),(88622,'smartphone',1,NULL,'left','commercial',88621,NULL,NULL,0,'/societe/societe.php?leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88623,'smartphone',1,NULL,'left','commercial',88621,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88624,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,2,'/commande/list.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88625,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88626,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,4,'/commande/list.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88627,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,5,'/commande/list.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88628,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,6,'/commande/list.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88629,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,7,'/commande/list.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88630,'smartphone',1,NULL,'left','commercial',88621,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88721,'smartphone',1,NULL,'left','commercial',87424,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','orders',0,'','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2013-02-24 18:29:15'),(88722,'smartphone',1,NULL,'left','commercial',88721,NULL,NULL,0,'/expedition/list.php?leftmenu=sendings','','List','orders',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-02-24 18:29:15'),(88723,'smartphone',1,NULL,'left','commercial',88721,NULL,NULL,1,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','orders',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-02-24 18:29:15'),(88821,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88822,'smartphone',1,NULL,'left','commercial',88821,NULL,NULL,0,'/societe/societe.php?leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88823,'smartphone',1,NULL,'left','commercial',88821,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88824,'smartphone',1,NULL,'left','commercial',88821,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88825,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88826,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88827,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88828,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88921,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2013-02-24 18:29:15'),(88922,'smartphone',1,NULL,'left','commercial',88921,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled && $leftmenu==\"ficheinter\"',2,'2013-02-24 18:29:15'),(88923,'smartphone',1,NULL,'left','commercial',88921,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled && $leftmenu==\"ficheinter\"',2,'2013-02-24 18:29:15'),(89021,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,3,'/fourn/facture/index.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89022,'smartphone',1,NULL,'left','accountancy',89021,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89023,'smartphone',1,NULL,'left','accountancy',89021,NULL,NULL,1,'/fourn/facture/impayees.php?leftmenu=suppliers_bills','','Unpaid','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89024,'smartphone',1,NULL,'left','accountancy',89021,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89121,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89122,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,3,'/compta/clients.php?action=facturer&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89123,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,4,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','Repeatable','bills',1,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89124,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,5,'/compta/facture/impayees.php?action=facturer&leftmenu=customers_bills','','Unpaid','bills',1,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89125,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89131,'smartphone',1,NULL,'left','accountancy',89125,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89132,'smartphone',1,NULL,'left','accountancy',87435,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89133,'smartphone',1,NULL,'left','accountancy',89132,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89134,'smartphone',1,NULL,'left','accountancy',89132,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89135,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89321,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'','$user->rights->commande->lire','$conf->commande->enabled',0,'2013-02-24 18:29:15'),(89421,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,4,'/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'','$user->rights->don->lire','$conf->don->enabled',2,'2013-02-24 18:29:15'),(89422,'smartphone',1,NULL,'left','accountancy',89421,NULL,NULL,0,'/compta/dons/card.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2013-02-24 18:29:15'),(89423,'smartphone',1,NULL,'left','accountancy',89421,NULL,NULL,1,'/compta/dons/list.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2013-02-24 18:29:15'),(89521,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2013-02-24 18:29:15'),(89522,'smartphone',1,NULL,'left','accountancy',89521,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-02-24 18:29:15'),(89523,'smartphone',1,NULL,'left','accountancy',89521,NULL,NULL,2,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-02-24 18:29:15'),(89524,'smartphone',1,NULL,'left','accountancy',89521,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-02-24 18:29:15'),(89621,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuTaxAndDividends','compta',0,'','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2013-02-24 18:29:15'),(89622,'smartphone',1,NULL,'left','accountancy',89621,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2013-02-24 18:29:15'),(89623,'smartphone',1,NULL,'left','accountancy',89622,NULL,NULL,2,'/compta/sociales/charges.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2013-02-24 18:29:15'),(89624,'smartphone',1,NULL,'left','accountancy',89622,NULL,NULL,3,'/compta/charges/index.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2013-02-24 18:29:15'),(89721,'smartphone',1,NULL,'left','accountancy',89621,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2013-02-24 18:29:15'),(89722,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','NewPayment','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89723,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','Payments','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89724,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89725,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89821,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,8,'/compta/ventilation/index.php?leftmenu=ventil','','Ventilation','companies',0,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89822,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,0,'/compta/ventilation/list.php','','ToDispatch','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89823,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,1,'/compta/ventilation/lignes.php','','Dispatched','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89824,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,2,'/compta/param/','','Setup','companies',1,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89825,'smartphone',1,NULL,'left','accountancy',89824,NULL,NULL,0,'/compta/param/comptes/list.php','','List','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89826,'smartphone',1,NULL,'left','accountancy',89824,NULL,NULL,1,'/compta/param/comptes/card.php?action=create','','New','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89827,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,3,'/compta/export/','','Export','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89828,'smartphone',1,NULL,'left','accountancy',89827,NULL,NULL,0,'/compta/export/index.php','','New','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89829,'smartphone',1,NULL,'left','accountancy',89827,NULL,NULL,1,'/compta/export/list.php','','List','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89921,'smartphone',1,NULL,'left','accountancy',87435,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2013-02-24 18:29:15'),(89922,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,1,'/compta/prelevement/demandes.php?status=0&leftmenu=withdraw','','StandingOrderToProcess','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89923,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89924,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89925,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89927,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89928,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(90021,'smartphone',1,NULL,'left','accountancy',87435,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'','$user->rights->banque->lire','$conf->banque->enabled',0,'2013-02-24 18:29:15'),(90022,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,0,'/compta/bank/card.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90023,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,1,'/compta/bank/categ.php?leftmenu=bank','','Rubriques','categories',1,'','$user->rights->banque->configurer','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90024,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,2,'/compta/bank/search.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90025,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90027,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,5,'/compta/bank/virement.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90121,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90122,'smartphone',1,NULL,'left','accountancy',90121,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90123,'smartphone',1,NULL,'left','accountancy',90122,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90124,'smartphone',1,NULL,'left','accountancy',90121,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90125,'smartphone',1,NULL,'left','accountancy',90124,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90126,'smartphone',1,NULL,'left','accountancy',90124,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90221,'smartphone',1,NULL,'left','products',87424,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'','$user->rights->produit->lire','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90222,'smartphone',1,NULL,'left','products',90221,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90223,'smartphone',1,NULL,'left','products',90221,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90224,'smartphone',1,NULL,'left','products',90221,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90321,'smartphone',1,NULL,'left','products',87424,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'','$user->rights->service->lire','$conf->service->enabled',2,'2013-02-24 18:29:15'),(90322,'smartphone',1,NULL,'left','products',90321,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2013-02-24 18:29:15'),(90323,'smartphone',1,NULL,'left','products',90321,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2013-02-24 18:29:15'),(90421,'smartphone',1,NULL,'left','products',87424,NULL,NULL,2,'/product/stats/index.php?leftmenu=stats','','Statistics','main',0,'','$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',2,'2013-02-24 18:29:15'),(90422,'smartphone',1,NULL,'left','products',90421,NULL,NULL,0,'/product/popuprop.php?leftmenu=stats','','Popularity','main',1,'','$user->rights->produit->lire && $user->rights->produit>lire','$conf->propal->enabled',2,'2013-02-24 18:29:15'),(90521,'smartphone',1,NULL,'left','products',87424,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90522,'smartphone',1,NULL,'left','products',90521,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90523,'smartphone',1,NULL,'left','products',90521,NULL,NULL,1,'/product/stock/list.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90524,'smartphone',1,NULL,'left','products',90521,NULL,NULL,2,'/product/stock/valo.php','','EnhancedValue','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90525,'smartphone',1,NULL,'left','products',90521,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90621,'smartphone',1,NULL,'left','products',87424,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2013-02-24 18:29:15'),(90622,'smartphone',1,NULL,'left','products',90621,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2013-02-24 18:29:15'),(91021,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91022,'smartphone',1,NULL,'left','project',91021,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91023,'smartphone',1,NULL,'left','project',91021,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91031,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/index.php?leftmenu=projects&mode=mine','','MyProjects','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91032,'smartphone',1,NULL,'left','project',91031,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create&mode=mine','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91033,'smartphone',1,NULL,'left','project',91031,NULL,NULL,2,'/projet/list.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91121,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91122,'smartphone',1,NULL,'left','project',91121,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91123,'smartphone',1,NULL,'left','project',91121,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91124,'smartphone',1,NULL,'left','project',91121,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91221,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects&mode=mine','','MyActivities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91222,'smartphone',1,NULL,'left','project',91221,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create&mode=mine','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91223,'smartphone',1,NULL,'left','project',91221,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91224,'smartphone',1,NULL,'left','project',91221,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects&mode=mine','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91321,'smartphone',1,NULL,'left','tools',87429,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2013-02-24 18:29:15'),(91322,'smartphone',1,NULL,'left','tools',91321,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2013-02-24 18:29:15'),(91323,'smartphone',1,NULL,'left','tools',91321,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2013-02-24 18:29:15'),(91521,'smartphone',1,NULL,'left','tools',87429,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'','$user->rights->export->lire','$conf->export->enabled',2,'2013-02-24 18:29:15'),(91522,'smartphone',1,NULL,'left','tools',91521,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2013-02-24 18:29:15'),(91551,'smartphone',1,NULL,'left','tools',87429,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'','$user->rights->import->run','$conf->import->enabled',2,'2013-02-24 18:29:15'),(91552,'smartphone',1,NULL,'left','tools',91551,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2013-02-24 18:29:15'),(91621,'smartphone',1,NULL,'left','members',87434,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91622,'smartphone',1,NULL,'left','members',91621,NULL,NULL,0,'/adherents/card.php?action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91623,'smartphone',1,NULL,'left','members',91621,NULL,NULL,1,'/adherents/list.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91624,'smartphone',1,NULL,'left','members',91623,NULL,NULL,2,'/adherents/list.php?statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91625,'smartphone',1,NULL,'left','members',91623,NULL,NULL,3,'/adherents/list.php?statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91626,'smartphone',1,NULL,'left','members',91623,NULL,NULL,4,'/adherents/list.php?statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91627,'smartphone',1,NULL,'left','members',91623,NULL,NULL,5,'/adherents/list.php?statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91628,'smartphone',1,NULL,'left','members',91623,NULL,NULL,6,'/adherents/list.php?statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91721,'smartphone',1,NULL,'left','members',87434,NULL,NULL,1,'/adherents/index.php?leftmenu=accountancy&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91722,'smartphone',1,NULL,'left','members',91721,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91723,'smartphone',1,NULL,'left','members',91721,NULL,NULL,1,'/adherents/cotisations.php?leftmenu=accountancy','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91921,'smartphone',1,NULL,'left','members',87434,NULL,NULL,3,'/adherents/index.php?leftmenu=export&mainmenu=members','','Exports','members',0,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91922,'smartphone',1,NULL,'left','members',91921,NULL,NULL,0,'/exports/index.php?leftmenu=export','','Datas','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled && $conf->export->enabled',2,'2013-02-24 18:29:15'),(91923,'smartphone',1,NULL,'left','members',91921,NULL,NULL,1,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91924,'smartphone',1,NULL,'left','members',91921,NULL,NULL,2,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92121,'smartphone',1,NULL,'left','members',87434,NULL,NULL,5,'/adherents/index.php?leftmenu=setup&mainmenu=members','','Setup','members',0,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92122,'smartphone',1,NULL,'left','members',92121,NULL,NULL,0,'/adherents/type.php?leftmenu=setup','','MembersTypes','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92123,'smartphone',1,NULL,'left','members',92121,NULL,NULL,1,'/adherents/options.php?leftmenu=setup','','MembersAttributes','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92421,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,0,'/compta/index.php?leftmenu=suppliers','','Suppliers','companies',0,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92422,'smartphone',1,NULL,'left','commercial',92421,NULL,NULL,0,'/societe/soc.php?leftmenu=suppliers&action=create&type=f','','NewSupplier','companies',1,'','$user->rights->societe->creer && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92423,'smartphone',1,NULL,'left','commercial',92421,NULL,NULL,1,'/fourn/list.php?leftmenu=suppliers','','List','companies',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92424,'smartphone',1,NULL,'left','commercial',92421,NULL,NULL,2,'/contact/list.php?leftmenu=suppliers&type=f','','Contacts','companies',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92521,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled',2,'2013-02-24 18:29:15'),(92522,'smartphone',1,NULL,'left','commercial',92521,NULL,NULL,0,'/societe/societe.php?leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->commande->enabled && $leftmenu==\"orders_suppliers\"',2,'2013-02-24 18:29:15'),(92523,'smartphone',1,NULL,'left','commercial',92521,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled && $leftmenu==\"orders_suppliers\"',2,'2013-02-24 18:29:15'),(92529,'smartphone',1,NULL,'left','commercial',92521,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled && $leftmenu==\"orders_suppliers\"',2,'2013-02-24 18:29:15'),(92621,'smartphone',1,NULL,'left','members',87434,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(92622,'smartphone',1,NULL,'left','members',92621,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(103094,'all',2,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103096,'all',2,'agenda','left','agenda',103095,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103098,'all',2,'agenda','left','agenda',103097,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103099,'all',2,'agenda','left','agenda',103097,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103100,'all',2,'agenda','left','agenda',103097,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103101,'all',2,'agenda','left','agenda',103097,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103103,'all',2,'agenda','left','agenda',103102,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103104,'all',2,'agenda','left','agenda',103102,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103105,'all',2,'agenda','left','agenda',103102,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103106,'all',2,'agenda','left','agenda',103102,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103107,'all',2,'agenda','left','agenda',103095,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103108,'all',2,'pos','top','pos',0,NULL,NULL,100,'/pos/backend/listefac.php','','POS','pos@pos',NULL,'1','1','1',2,'2013-03-13 20:33:09'),(103109,'all',2,'pos','left','pos',103108,NULL,NULL,100,'/pos/backend/list.php','','Tickets','pos@pos',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103110,'all',2,'pos','left','pos',103109,NULL,NULL,100,'/pos/backend/list.php','','List','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103111,'all',2,'pos','left','pos',103110,NULL,NULL,100,'/pos/backend/list.php?viewstatut=0','','StatusTicketDraft','pos@pos',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103112,'all',2,'pos','left','@pos',103110,NULL,NULL,100,'/pos/backend/list.php?viewstatut=1','','StatusTicketClosed','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103113,'all',2,'pos','left','@pos',103110,NULL,NULL,100,'/pos/backend/list.php?viewstatut=2','','StatusTicketProcessed','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103114,'all',2,'pos','left','@pos',103110,NULL,NULL,100,'/pos/backend/list.php?viewtype=1','','StatusTicketReturned','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103115,'all',2,'pos','left','pos',103108,NULL,NULL,100,'/pos/backend/listefac.php','','Factures','pos@pos',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103116,'all',2,'pos','left','pos',103115,NULL,NULL,100,'/pos/backend/listefac.php','','List','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103117,'all',2,'pos','left','pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewstatut=0','','BillStatusDraft','bills',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103118,'all',2,'pos','left','@pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewstatut=1','','BillStatusValidated','bills',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103119,'all',2,'pos','left','@pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewstatut=2&viewtype=0','','BillStatusPaid','bills',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103120,'all',2,'pos','left','@pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewtype=2','','BillStatusReturned','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103121,'all',2,'pos','left','@pos',103108,NULL,NULL,100,'/pos/frontend/index.php','','POS','main',NULL,NULL,'$user->rights->pos->frontend','1',0,'2013-03-13 20:33:09'),(103122,'all',2,'pos','left','@pos',103121,NULL,NULL,100,'/pos/frontend/index.php','','NewTicket','main',NULL,NULL,'$user->rights->pos->frontend','1',0,'2013-03-13 20:33:09'),(103123,'all',2,'pos','left','@pos',103121,NULL,NULL,101,'/pos/backend/closes.php','','CloseandArching','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103124,'all',2,'pos','left','@pos',103108,NULL,NULL,100,'/pos/backend/terminal/cash.php','','Terminal','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103125,'all',2,'pos','left','@pos',103124,NULL,NULL,100,'/pos/backend/terminal/card.php?action=create','','NewCash','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103126,'all',2,'pos','left','@pos',103124,NULL,NULL,101,'/pos/backend/terminal/cash.php','','List','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103127,'all',2,'pos','left','@pos',103123,NULL,NULL,101,'/pos/backend/closes.php?viewstatut=0','','Arqueo','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103128,'all',2,'pos','left','@pos',103123,NULL,NULL,102,'/pos/backend/closes.php?viewstatut=1','','Closes','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103129,'all',2,'pos','left','@pos',103108,NULL,NULL,102,'/pos/backend/transfers.php','','Transfer','main',NULL,NULL,'$user->rights->pos->transfer','1',0,'2013-03-13 20:33:09'),(103130,'all',2,'pos','left','@pos',103108,NULL,NULL,102,'/pos/backend/resultat/index.php','','Rapport','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103131,'all',2,'pos','left','@pos',103130,NULL,NULL,102,'/pos/backend/resultat/casoc.php','','ReportsCustomer','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103132,'all',2,'pos','left','@pos',103130,NULL,NULL,102,'/pos/backend/resultat/causer.php','','ReportsUser','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103133,'all',2,'pos','left','@pos',103130,NULL,NULL,102,'/pos/backend/resultat/sellsjournal.php','','ReportsSells','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys','opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey','opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey','opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List','opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(108504,'all',1,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-10-03 08:46:14'),(108505,'all',1,'agenda','left','agenda',108504,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-10-03 08:46:14'),(108506,'all',1,'agenda','left','agenda',108505,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2015-10-03 08:46:14'),(108507,'all',1,'agenda','left','agenda',108505,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-10-03 08:46:14'),(108508,'all',1,'agenda','left','agenda',108507,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-10-03 08:46:14'),(108509,'all',1,'agenda','left','agenda',108507,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-10-03 08:46:14'),(108510,'all',1,'agenda','left','agenda',108507,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-10-03 08:46:14'),(108511,'all',1,'agenda','left','agenda',108507,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-10-03 08:46:14'),(108512,'all',1,'agenda','left','agenda',108505,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-10-03 08:46:14'),(108513,'all',1,'agenda','left','agenda',108512,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-10-03 08:46:14'),(108514,'all',1,'agenda','left','agenda',108512,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2015-10-03 08:46:14'),(108515,'all',1,'agenda','left','agenda',108512,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-10-03 08:46:14'),(108516,'all',1,'agenda','left','agenda',108512,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2015-10-03 08:46:14'),(108517,'all',1,'agenda','left','agenda',108505,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2015-10-03 08:46:14'),(108518,'all',1,'barcode','left','tools',-1,NULL,'tools',200,'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint','','BarCodePrintsheet','products',NULL,'barcodeprint','($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled',2,'2015-10-03 08:46:14'),(108519,'all',1,'barcode','left','home',-1,'modulesadmintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=modulesadmintools','','MassBarcodeInit','products',NULL,NULL,'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled && $leftmenu==\"modulesadmintools\"',0,'2015-10-03 08:46:14'),(108520,'all',1,'cron','left','home',-1,'modulesadmintools','home',200,'/cron/list.php?status=-1','','CronList','cron',NULL,NULL,'$user->rights->cron->read','$leftmenu==\'modulesadmintools\'',2,'2015-10-03 08:46:15'),(108521,'all',1,'ecm','top','ecm',0,NULL,NULL,100,'/ecm/index.php','','MenuECM','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2015-10-03 08:46:15'),(108522,'all',1,'ecm','left','ecm',-1,NULL,'ecm',101,'/ecm/index.php?mainmenu=ecm&leftmenu=ecm','','ECMArea','ecm',NULL,'ecm','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2015-10-03 08:46:15'),(108523,'all',1,'ecm','left','ecm',-1,'ecm','ecm',102,'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsManual','ecm',NULL,'ecm_manual','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2015-10-03 08:46:15'),(108524,'all',1,'ecm','left','ecm',-1,'ecm','ecm',103,'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsAuto','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2015-10-03 08:46:15'),(108525,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2015-10-03 08:46:16'),(108526,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',210,'/opensurvey/wizard/index.php','','NewSurvey','opensurvey',NULL,'opensurvey_new','$user->rights->opensurvey->write','$conf->opensurvey->enabled',0,'2015-10-03 08:46:16'),(108527,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2015-10-03 08:46:16'),(108528,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2015-10-03 08:46:16'),(108529,'auguria',1,'societe|fournisseur','top','companies',0,NULL,NULL,20,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)',2,'2015-10-03 08:46:16'),(108530,'auguria',1,'product|service','top','products',0,NULL,NULL,30,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2015-10-03 08:46:16'),(108532,'auguria',1,'propal|commande|fournisseur|contrat|ficheinter','top','commercial',0,NULL,NULL,40,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->propal->enabled || $conf->commande->enabled || $conf->fournisseur->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled',2,'2015-10-03 08:46:16'),(108533,'auguria',1,'comptabilite|accounting|facture|deplacement|don|tax|salaries|loa','top','accountancy',0,NULL,NULL,50,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->deplacement->lire || $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $u','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->loan->enabled',2,'2015-10-03 08:46:16'),(108534,'auguria',1,'projet','top','project',0,NULL,NULL,70,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(108535,'auguria',1,'mailing|export|import|opensurvey','top','tools',0,NULL,NULL,90,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled',2,'2015-10-03 08:46:16'),(108540,'auguria',1,'adherent','top','members',0,NULL,NULL,110,'/adherents/index.php?mainmenu=members&leftmenu=','','Members','members',-1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2015-10-03 08:46:16'),(108541,'auguria',1,'banque|prelevement','top','bank',0,NULL,NULL,60,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',0,'2015-10-03 08:46:16'),(108542,'auguria',1,'hrm','top','hrm',0,NULL,NULL,80,'/compta/hrm.php?mainmenu=hrm&leftmenu=','','HRM','holiday',-1,'','$user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire','$conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled',0,'2015-10-03 08:46:16'),(108627,'auguria',1,'','left','home',108528,NULL,NULL,0,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2015-10-03 08:46:16'),(108628,'auguria',1,'','left','home',108627,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108629,'auguria',1,'','left','home',108627,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108630,'auguria',1,'','left','home',108627,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108631,'auguria',1,'','left','home',108627,NULL,NULL,6,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108632,'auguria',1,'','left','home',108627,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108633,'auguria',1,'','left','home',108627,NULL,NULL,7,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108634,'auguria',1,'','left','home',108627,NULL,NULL,10,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108635,'auguria',1,'','left','home',108627,NULL,NULL,8,'/admin/security_other.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108636,'auguria',1,'','left','home',108627,NULL,NULL,11,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108637,'auguria',1,'','left','home',108627,NULL,NULL,9,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108638,'auguria',1,'','left','home',108627,NULL,NULL,13,'/admin/dict.php?leftmenu=setup','','Dictionary','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108639,'auguria',1,'','left','home',108627,NULL,NULL,14,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108640,'auguria',1,'','left','home',108627,NULL,NULL,12,'/admin/sms.php?leftmenu=setup','','SMS','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108641,'auguria',1,'','left','home',108627,NULL,NULL,4,'/admin/translation.php?leftmenu=setup','','Translation','admin',1,'','','$leftmenu==\"setup\"',2,'2015-10-03 08:46:16'),(108728,'auguria',1,'','left','home',108827,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr','admin',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108729,'auguria',1,'','left','home',108728,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules','admin',2,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108730,'auguria',1,'','left','home',108728,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers','admin',2,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108732,'auguria',1,'','left','home',108827,NULL,NULL,1,'/admin/system/browser.php?leftmenu=admintools','','InfoBrowser','admin',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108733,'auguria',1,'','left','home',108827,NULL,NULL,2,'/admin/system/os.php?leftmenu=admintools','','InfoOS','admin',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108734,'auguria',1,'','left','home',108827,NULL,NULL,3,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer','admin',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108735,'auguria',1,'','left','home',108827,NULL,NULL,4,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP','admin',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108737,'auguria',1,'','left','home',108827,NULL,NULL,5,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase','admin',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108827,'auguria',1,'','left','home',108528,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','SystemTools','admin',0,'admintools','','$user->admin',2,'2015-10-03 08:46:16'),(108828,'auguria',1,'','left','home',108827,NULL,NULL,6,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108829,'auguria',1,'','left','home',108827,NULL,NULL,7,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108832,'auguria',1,'','left','home',108827,NULL,NULL,8,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108833,'auguria',1,'','left','home',108827,NULL,NULL,9,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\"admintools\" && function_exists(\"eaccelerator_info\")',2,'2015-10-03 08:46:16'),(108834,'auguria',1,'','left','home',108827,NULL,NULL,10,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108835,'auguria',1,'','left','home',108827,NULL,NULL,11,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108836,'auguria',1,'','left','home',108827,NULL,NULL,12,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108837,'auguria',1,'','left','home',108827,NULL,NULL,13,'/support/index.php?leftmenu=admintools','_blank','HelpCenter','help',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108838,'auguria',1,'','left','home',108827,NULL,NULL,14,'/admin/system/about.php?leftmenu=admintools','','About','admin',1,'','','$leftmenu==\"admintools\"',2,'2015-10-03 08:46:16'),(108927,'auguria',1,'','left','home',108528,NULL,NULL,4,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2015-10-03 08:46:16'),(108928,'auguria',1,'','left','home',108927,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\"users\"',2,'2015-10-03 08:46:16'),(108929,'auguria',1,'','left','home',108928,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser','users',2,'','$user->rights->user->user->creer || $user->admin','$leftmenu==\"users\"',2,'2015-10-03 08:46:16'),(108930,'auguria',1,'','left','home',108927,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin','$leftmenu==\"users\"',2,'2015-10-03 08:46:16'),(108931,'auguria',1,'','left','home',108930,NULL,NULL,0,'/user/group/card.php?leftmenu=users&action=create','','NewGroup','users',2,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin','$leftmenu==\"users\"',2,'2015-10-03 08:46:16'),(109027,'auguria',1,'','left','companies',108529,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2015-10-03 08:46:16'),(109028,'auguria',1,'','left','companies',109027,NULL,NULL,0,'/societe/soc.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2015-10-03 08:46:16'),(109030,'auguria',1,'','left','companies',109027,NULL,NULL,5,'/fourn/list.php?leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2015-10-03 08:46:16'),(109031,'auguria',1,'','left','companies',109030,NULL,NULL,0,'/societe/soc.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2015-10-03 08:46:16'),(109033,'auguria',1,'','left','companies',109027,NULL,NULL,3,'/comm/prospect/list.php?leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2015-10-03 08:46:16'),(109034,'auguria',1,'','left','companies',109033,NULL,NULL,0,'/societe/soc.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2015-10-03 08:46:16'),(109036,'auguria',1,'','left','companies',109027,NULL,NULL,4,'/comm/list.php?leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2015-10-03 08:46:16'),(109037,'auguria',1,'','left','companies',109036,NULL,NULL,0,'/societe/soc.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2015-10-03 08:46:16'),(109127,'auguria',1,'','left','companies',108529,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2015-10-03 08:46:16'),(109128,'auguria',1,'','left','companies',109127,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2015-10-03 08:46:16'),(109129,'auguria',1,'','left','companies',109127,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2015-10-03 08:46:16'),(109131,'auguria',1,'','left','companies',109129,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','ThirdPartyProspects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2015-10-03 08:46:16'),(109132,'auguria',1,'','left','companies',109129,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','ThirdPartyCustomers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2015-10-03 08:46:16'),(109133,'auguria',1,'','left','companies',109129,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','ThirdPartySuppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2015-10-03 08:46:16'),(109134,'auguria',1,'','left','companies',109129,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2015-10-03 08:46:16'),(109177,'auguria',1,'','left','companies',108529,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2015-10-03 08:46:16'),(109178,'auguria',1,'','left','companies',109177,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2015-10-03 08:46:16'),(109187,'auguria',1,'','left','companies',108529,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2015-10-03 08:46:16'),(109188,'auguria',1,'','left','companies',109187,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2015-10-03 08:46:16'),(109197,'auguria',1,'','left','companies',108529,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=4','','ContactCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2015-10-03 08:46:16'),(109198,'auguria',1,'','left','companies',109197,NULL,NULL,0,'/categories/card.php?action=create&type=4','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2015-10-03 08:46:16'),(109627,'auguria',1,'','left','commercial',108532,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2015-10-03 08:46:16'),(109628,'auguria',1,'','left','commercial',109627,NULL,NULL,0,'/comm/propal.php?action=create&leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2015-10-03 08:46:16'),(109629,'auguria',1,'','left','commercial',109627,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2015-10-03 08:46:16'),(109630,'auguria',1,'','left','commercial',109629,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2015-10-03 08:46:16'),(109631,'auguria',1,'','left','commercial',109629,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2015-10-03 08:46:16'),(109632,'auguria',1,'','left','commercial',109629,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&viewstatut=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2015-10-03 08:46:16'),(109633,'auguria',1,'','left','commercial',109629,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&viewstatut=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2015-10-03 08:46:16'),(109634,'auguria',1,'','left','commercial',109629,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&viewstatut=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2015-10-03 08:46:16'),(109637,'auguria',1,'','left','commercial',109627,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2015-10-03 08:46:16'),(109727,'auguria',1,'','left','commercial',108532,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2015-10-03 08:46:16'),(109728,'auguria',1,'','left','commercial',109727,NULL,NULL,0,'/commande/card.php?action=create&leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2015-10-03 08:46:16'),(109729,'auguria',1,'','left','commercial',109727,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2015-10-03 08:46:16'),(109730,'auguria',1,'','left','commercial',109729,NULL,NULL,2,'/commande/list.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2015-10-03 08:46:16'),(109731,'auguria',1,'','left','commercial',109729,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2015-10-03 08:46:16'),(109732,'auguria',1,'','left','commercial',109729,NULL,NULL,4,'/commande/list.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2015-10-03 08:46:16'),(109733,'auguria',1,'','left','commercial',109729,NULL,NULL,5,'/commande/list.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2015-10-03 08:46:16'),(109734,'auguria',1,'','left','commercial',109729,NULL,NULL,6,'/commande/list.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2015-10-03 08:46:16'),(109735,'auguria',1,'','left','commercial',109729,NULL,NULL,7,'/commande/list.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2015-10-03 08:46:16'),(109736,'auguria',1,'','left','commercial',109727,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2015-10-03 08:46:16'),(109827,'auguria',1,'','left','commercial',108530,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2015-10-03 08:46:16'),(109828,'auguria',1,'','left','commercial',109827,NULL,NULL,0,'/expedition/card.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2015-10-03 08:46:16'),(109829,'auguria',1,'','left','commercial',109827,NULL,NULL,1,'/expedition/list.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2015-10-03 08:46:16'),(109830,'auguria',1,'','left','commercial',109827,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2015-10-03 08:46:16'),(109927,'auguria',1,'','left','commercial',108532,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2015-10-03 08:46:16'),(109928,'auguria',1,'','left','commercial',109927,NULL,NULL,0,'/contrat/card.php?&action=create&leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2015-10-03 08:46:16'),(109929,'auguria',1,'','left','commercial',109927,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2015-10-03 08:46:16'),(109930,'auguria',1,'','left','commercial',109927,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2015-10-03 08:46:16'),(109931,'auguria',1,'','left','commercial',109930,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2015-10-03 08:46:16'),(109932,'auguria',1,'','left','commercial',109930,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2015-10-03 08:46:16'),(109933,'auguria',1,'','left','commercial',109930,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2015-10-03 08:46:16'),(109934,'auguria',1,'','left','commercial',109930,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2015-10-03 08:46:16'),(110027,'auguria',1,'','left','commercial',108532,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2015-10-03 08:46:16'),(110028,'auguria',1,'','left','commercial',110027,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2015-10-03 08:46:16'),(110029,'auguria',1,'','left','commercial',110027,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2015-10-03 08:46:16'),(110127,'auguria',1,'','left','accountancy',108533,NULL,NULL,3,'/fourn/facture/list.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2015-10-03 08:46:16'),(110128,'auguria',1,'','left','accountancy',110127,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->fournisseur->enabled',2,'2015-10-03 08:46:16'),(110129,'auguria',1,'','left','accountancy',110127,NULL,NULL,1,'/fourn/facture/impayees.php?leftmenu=suppliers_bills','','Unpaid','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2015-10-03 08:46:16'),(110130,'auguria',1,'','left','accountancy',110127,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2015-10-03 08:46:16'),(110131,'auguria',1,'','left','accountancy',110127,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2015-10-03 08:46:16'),(110227,'auguria',1,'','left','accountancy',108533,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2015-10-03 08:46:16'),(110228,'auguria',1,'','left','accountancy',110227,NULL,NULL,3,'/compta/facture.php?action=create&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2015-10-03 08:46:16'),(110229,'auguria',1,'','left','accountancy',110227,NULL,NULL,5,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','ListOfTemplates','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2015-10-03 08:46:16'),(110230,'auguria',1,'','left','accountancy',110227,NULL,NULL,7,'/compta/facture/mergepdftool.php?action=facturer&leftmenu=customers_bills','','MergingPDFTool','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2015-10-03 08:46:16'),(110231,'auguria',1,'','left','accountancy',110227,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2015-10-03 08:46:16'),(110232,'auguria',1,'','left','accountancy',110227,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2015-10-03 08:46:16'),(110237,'auguria',1,'','left','accountancy',110231,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2015-10-03 08:46:16'),(110238,'auguria',1,'','left','accountancy',108541,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->banque->lire','! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)',2,'2015-10-03 08:46:16'),(110239,'auguria',1,'','left','accountancy',110238,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit','compta',1,'','$user->rights->banque->lire','! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)',2,'2015-10-03 08:46:16'),(110240,'auguria',1,'','left','accountancy',110238,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List','bills',1,'','$user->rights->banque->lire','! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)',2,'2015-10-03 08:46:16'),(110241,'auguria',1,'','left','accountancy',110227,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2015-10-03 08:46:16'),(110247,'auguria',1,'','left','accountancy',110232,NULL,NULL,1,'/compta/facture/list.php?leftmenu=customers_bills&search_status=0','','BillShortStatusDraft','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2015-10-03 08:46:16'),(110248,'auguria',1,'','left','accountancy',110232,NULL,NULL,2,'/compta/facture/list.php?leftmenu=customers_bills&search_status=1','','BillShortStatusNotPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2015-10-03 08:46:16'),(110249,'auguria',1,'','left','accountancy',110232,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills&search_status=2','','BillShortStatusPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2015-10-03 08:46:16'),(110250,'auguria',1,'','left','accountancy',110232,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills&search_status=3','','BillShortStatusCanceled','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2015-10-03 08:46:16'),(110427,'auguria',1,'','left','accountancy',108533,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2015-10-03 08:46:16'),(110527,'auguria',1,'','left','accountancy',108533,NULL,NULL,4,'/don/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2015-10-03 08:46:16'),(110528,'auguria',1,'','left','accountancy',110527,NULL,NULL,0,'/don/card.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2015-10-03 08:46:16'),(110529,'auguria',1,'','left','accountancy',110527,NULL,NULL,1,'/don/list.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2015-10-03 08:46:16'),(110627,'auguria',1,'','left','accountancy',108542,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2015-10-03 08:46:17'),(110628,'auguria',1,'','left','accountancy',110627,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled',0,'2015-10-03 08:46:17'),(110629,'auguria',1,'','left','accountancy',110627,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2015-10-03 08:46:17'),(110630,'auguria',1,'','left','accountancy',110627,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2015-10-03 08:46:17'),(110727,'auguria',1,'','left','accountancy',108533,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuSpecialExpenses','compta',0,'tax','(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && $user->rights->salaries->read)','$conf->tax->enabled || $conf->salaries->enabled',0,'2015-10-03 08:46:16'),(110737,'auguria',1,'','left','accountancy',110727,NULL,NULL,1,'/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy','','Salaries','salaries',1,'tax_sal','$user->rights->salaries->read','$conf->salaries->enabled',0,'2015-10-03 08:46:16'),(110738,'auguria',1,'','left','accountancy',110737,NULL,NULL,2,'/compta/salaries/card.php?leftmenu=tax_salary&action=create','','NewPayment','companies',2,'','$user->rights->salaries->write','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2015-10-03 08:46:16'),(110739,'auguria',1,'','left','accountancy',110737,NULL,NULL,3,'/compta/salaries/index.php?leftmenu=tax_salary','','Payments','companies',2,'','$user->rights->salaries->read','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2015-10-03 08:46:16'),(110747,'auguria',1,'','left','accountancy',110727,NULL,NULL,1,'/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy','','Loans','loan',1,'tax_loan','$user->rights->loan->read','$conf->loan->enabled',0,'2015-10-03 08:46:16'),(110748,'auguria',1,'','left','accountancy',110747,NULL,NULL,2,'/loan/card.php?leftmenu=tax_loan&action=create','','NewLoan','loan',2,'','$user->rights->loan->write','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2015-10-03 08:46:16'),(110749,'auguria',1,'','left','accountancy',110747,NULL,NULL,3,'/loan/index.php?leftmenu=tax_loan','','Payments','companies',2,'','$user->rights->loan->read','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2015-10-03 08:46:16'),(110750,'auguria',1,'','left','accountancy',110747,NULL,NULL,4,'/loan/calc.php?leftmenu=tax_loan','','Calculator','companies',2,'','$user->rights->loan->calc','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2015-10-03 08:46:16'),(110777,'auguria',1,'','left','accountancy',110727,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2015-10-03 08:46:16'),(110778,'auguria',1,'','left','accountancy',110777,NULL,NULL,2,'/compta/sociales/charges.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2015-10-03 08:46:16'),(110779,'auguria',1,'','left','accountancy',110777,NULL,NULL,3,'/compta/charges/index.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2015-10-03 08:46:16'),(110827,'auguria',1,'','left','accountancy',110727,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'tax_vat','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2015-10-03 08:46:16'),(110828,'auguria',1,'','left','accountancy',110827,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','NewPayment','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2015-10-03 08:46:16'),(110829,'auguria',1,'','left','accountancy',110827,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','Payments','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2015-10-03 08:46:16'),(110830,'auguria',1,'','left','accountancy',110827,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2015-10-03 08:46:16'),(110831,'auguria',1,'','left','accountancy',110827,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2015-10-03 08:46:16'),(110927,'auguria',1,'','left','accountancy',108533,NULL,NULL,8,'/accountancy/customer/index.php?leftmenu=ventil_customer','','CustomersVentilation','accountancy',0,'ventil_customer','$user->rights->accounting->ventilation->read','$conf->accounting->enabled',0,'2015-10-03 08:46:16'),(110928,'auguria',1,'','left','accountancy',110927,NULL,NULL,0,'/accountancy/customer/list.php','','ToDispatch','accountancy',1,'','$user->rights->accounting->ventilation->dispatch','$conf->accounting->enabled && $leftmenu==\"ventil_customer\"',0,'2015-10-03 08:46:16'),(110929,'auguria',1,'','left','accountancy',110927,NULL,NULL,1,'/accountancy/customer/lines.php','','Dispatched','accountancy',1,'','$user->rights->accounting->ventilation->read','$conf->accounting->enabled && $leftmenu==\"ventil_customer\"',0,'2015-10-03 08:46:16'),(110937,'auguria',1,'','left','accountancy',108533,NULL,NULL,9,'/accountancy/supplier/index.php?leftmenu=ventil_supplier','','SuppliersVentilation','accountancy',0,'ventil_supplier','$user->rights->accounting->ventilation->read','$conf->accounting->enabled && $conf->fournisseur->enabled',0,'2015-10-03 08:46:16'),(110938,'auguria',1,'','left','accountancy',110937,NULL,NULL,0,'/accountancy/supplier/list.php','','ToDispatch','accountancy',1,'','$user->rights->accounting->ventilation->dispatch','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"ventil_supplier\"',0,'2015-10-03 08:46:16'),(110939,'auguria',1,'','left','accountancy',110937,NULL,NULL,1,'/accountancy/supplier/lines.php','','Dispatched','accountancy',1,'','$user->rights->accounting->ventilation->read','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"ventil_supplier\"',0,'2015-10-03 08:46:16'),(111027,'auguria',1,'','left','accountancy',108541,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2015-10-03 08:46:16'),(111029,'auguria',1,'','left','accountancy',111027,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2015-10-03 08:46:16'),(111030,'auguria',1,'','left','accountancy',111027,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2015-10-03 08:46:16'),(111031,'auguria',1,'','left','accountancy',111027,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2015-10-03 08:46:16'),(111033,'auguria',1,'','left','accountancy',111027,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2015-10-03 08:46:16'),(111034,'auguria',1,'','left','accountancy',111027,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2015-10-03 08:46:16'),(111127,'auguria',1,'','left','accountancy',108541,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2015-10-03 08:46:16'),(111128,'auguria',1,'','left','accountancy',111127,NULL,NULL,0,'/compta/bank/card.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2015-10-03 08:46:16'),(111129,'auguria',1,'','left','accountancy',111127,NULL,NULL,1,'/compta/bank/categ.php?leftmenu=bank','','Rubriques','categories',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2015-10-03 08:46:16'),(111130,'auguria',1,'','left','accountancy',111127,NULL,NULL,2,'/compta/bank/search.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2015-10-03 08:46:16'),(111131,'auguria',1,'','left','accountancy',111127,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2015-10-03 08:46:16'),(111133,'auguria',1,'','left','accountancy',111127,NULL,NULL,5,'/compta/bank/virement.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2015-10-03 08:46:16'),(111227,'auguria',1,'','left','accountancy',108533,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'ca','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2015-10-03 08:46:16'),(111228,'auguria',1,'','left','accountancy',111227,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu==\"ca\"',0,'2015-10-03 08:46:16'),(111229,'auguria',1,'','left','accountancy',111228,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu==\"ca\"',0,'2015-10-03 08:46:16'),(111230,'auguria',1,'','left','accountancy',111227,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu==\"ca\"',0,'2015-10-03 08:46:16'),(111231,'auguria',1,'','left','accountancy',111230,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu==\"ca\"',0,'2015-10-03 08:46:16'),(111232,'auguria',1,'','left','accountancy',111230,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu==\"ca\"',0,'2015-10-03 08:46:16'),(111233,'auguria',1,'','left','accountancy',111227,NULL,NULL,1,'/compta/journal/sellsjournal.php?leftmenu=ca','','SellsJournal','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2015-10-03 08:46:16'),(111234,'auguria',1,'','left','accountancy',111227,NULL,NULL,1,'/compta/journal/purchasesjournal.php?leftmenu=ca','','PurchasesJournal','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2015-10-03 08:46:16'),(111235,'auguria',1,'','left','accountancy',111230,NULL,NULL,1,'/compta/stats/cabyprodserv.php?leftmenu=ca','','ByProductsAndServices','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu==\"ca\"',0,'2015-10-03 08:46:16'),(111247,'auguria',1,'','left','accountancy',108533,NULL,NULL,12,'/accountancy/bookkeeping/list.php?leftmenu=bookkeeping','','Bookkeeping','accountancy',0,'bookkeeping','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2015-10-03 08:46:16'),(111248,'auguria',1,'','left','accountancy',111247,NULL,NULL,0,'/accountancy/bookkeeping/listbyyear.php','','ByYear','accountancy',1,'','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled && $leftmenu==\"bookkeeping\"',0,'2015-10-03 08:46:16'),(111249,'auguria',1,'','left','accountancy',111247,NULL,NULL,1,'/accountancy/bookkeeping/balancebymonth.php','','AccountBalanceByMonth','accountancy',1,'','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled && $leftmenu==\"bookkeeping\"',0,'2015-10-03 08:46:16'),(111277,'auguria',1,'','left','home',108533,NULL,NULL,20,'/accountancy/admin/fiscalyear.php?leftmenu=setup','','Fiscalyear','accountancy',1,'','$user->rights->accounting->fiscalyear','$conf->accounting->enabled',2,'2015-10-03 08:46:16'),(111278,'auguria',1,'','left','home',108533,NULL,NULL,21,'/accountancy/admin/account.php?mainmenu=accountancy','','Chartofaccounts','accountancy',1,'','$user->rights->accounting->chartofaccount','$conf->accounting->enabled',2,'2015-10-03 08:46:16'),(111327,'auguria',1,'','left','products',108530,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2015-10-03 08:46:16'),(111328,'auguria',1,'','left','products',111327,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2015-10-03 08:46:16'),(111329,'auguria',1,'','left','products',111327,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2015-10-03 08:46:16'),(111330,'auguria',1,'','left','products',111327,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2015-10-03 08:46:16'),(111331,'auguria',1,'','left','products',111327,NULL,NULL,6,'/product/popuprop.php?leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2015-10-03 08:46:16'),(111332,'auguria',1,'','left','products',111327,NULL,NULL,5,'/product/reassortlot.php?type=0','','StocksByLotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2015-10-03 08:46:16'),(111427,'auguria',1,'','left','products',108530,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2015-10-03 08:46:16'),(111428,'auguria',1,'','left','products',111427,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2015-10-03 08:46:16'),(111429,'auguria',1,'','left','products',111427,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2015-10-03 08:46:16'),(111430,'auguria',1,'','left','products',111427,NULL,NULL,5,'/product/popuprop.php?leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2015-10-03 08:46:16'),(111627,'auguria',1,'','left','products',108530,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2015-10-03 08:46:16'),(111628,'auguria',1,'','left','products',111627,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2015-10-03 08:46:16'),(111629,'auguria',1,'','left','products',111627,NULL,NULL,1,'/product/stock/list.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2015-10-03 08:46:16'),(111631,'auguria',1,'','left','products',111627,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2015-10-03 08:46:16'),(111632,'auguria',1,'','left','products',111627,NULL,NULL,4,'/product/stock/replenish.php','','Replenishments','stocks',1,'','$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire','$conf->stock->enabled && $conf->fournisseur->enabled',2,'2015-10-03 08:46:16'),(111633,'auguria',1,'','left','products',111627,NULL,NULL,5,'/product/stock/massstockmove.php','','StockTransfer','stocks',1,'','$user->rights->stock->mouvement->creer','$conf->stock->enabled',2,'2015-10-03 08:46:16'),(111727,'auguria',1,'','left','products',108530,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2015-10-03 08:46:16'),(111728,'auguria',1,'','left','products',111727,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2015-10-03 08:46:16'),(112127,'auguria',1,'','left','project',108534,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112128,'auguria',1,'','left','project',112127,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112129,'auguria',1,'','left','project',112127,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112137,'auguria',1,'','left','project',108534,NULL,NULL,0,'/projet/index.php?leftmenu=projects&mode=mine','','MyProjects','projects',0,'myprojects','$user->rights->projet->lire','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112138,'auguria',1,'','left','project',112137,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create&mode=mine','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112139,'auguria',1,'','left','project',112137,NULL,NULL,2,'/projet/list.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112227,'auguria',1,'','left','project',108534,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112228,'auguria',1,'','left','project',112227,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112229,'auguria',1,'','left','project',112227,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112230,'auguria',1,'','left','project',112227,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112327,'auguria',1,'','left','project',108534,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects&mode=mine','','MyActivities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112328,'auguria',1,'','left','project',112327,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create&mode=mine','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112329,'auguria',1,'','left','project',112327,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112330,'auguria',1,'','left','project',112327,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects&mode=mine','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2015-10-03 08:46:16'),(112427,'auguria',1,'','left','tools',108535,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2015-10-03 08:46:16'),(112428,'auguria',1,'','left','tools',112427,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2015-10-03 08:46:16'),(112429,'auguria',1,'','left','tools',112427,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2015-10-03 08:46:16'),(112627,'auguria',1,'','left','tools',108535,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2015-10-03 08:46:16'),(112628,'auguria',1,'','left','tools',112627,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2015-10-03 08:46:16'),(112657,'auguria',1,'','left','tools',108535,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2015-10-03 08:46:16'),(112658,'auguria',1,'','left','tools',112657,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2015-10-03 08:46:16'),(112727,'auguria',1,'','left','members',108540,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2015-10-03 08:46:16'),(112728,'auguria',1,'','left','members',112727,NULL,NULL,0,'/adherents/card.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2015-10-03 08:46:16'),(112729,'auguria',1,'','left','members',112727,NULL,NULL,1,'/adherents/list.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2015-10-03 08:46:16'),(112730,'auguria',1,'','left','members',112729,NULL,NULL,2,'/adherents/list.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2015-10-03 08:46:16'),(112731,'auguria',1,'','left','members',112729,NULL,NULL,3,'/adherents/list.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2015-10-03 08:46:16'),(112732,'auguria',1,'','left','members',112729,NULL,NULL,4,'/adherents/list.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2015-10-03 08:46:16'),(112733,'auguria',1,'','left','members',112729,NULL,NULL,5,'/adherents/list.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2015-10-03 08:46:16'),(112734,'auguria',1,'','left','members',112729,NULL,NULL,6,'/adherents/list.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2015-10-03 08:46:16'),(112735,'auguria',1,'','left','members',112727,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2015-10-03 08:46:17'),(112827,'auguria',1,'','left','members',108540,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2015-10-03 08:46:17'),(112828,'auguria',1,'','left','members',112827,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2015-10-03 08:46:17'),(112829,'auguria',1,'','left','members',112827,NULL,NULL,1,'/adherents/cotisations.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2015-10-03 08:46:17'),(112830,'auguria',1,'','left','members',112827,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2015-10-03 08:46:17'),(113027,'auguria',1,'','left','members',108540,NULL,NULL,3,'/adherents/index.php?leftmenu=export&mainmenu=members','','Exports','members',0,'export','$user->rights->adherent->export','$conf->adherent->enabled',2,'2015-10-03 08:46:17'),(113028,'auguria',1,'','left','members',113027,NULL,NULL,0,'/exports/index.php?leftmenu=export','','Datas','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled && $conf->export->enabled',2,'2015-10-03 08:46:17'),(113029,'auguria',1,'','left','members',113027,NULL,NULL,1,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2015-10-03 08:46:17'),(113030,'auguria',1,'','left','members',113027,NULL,NULL,2,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2015-10-03 08:46:17'),(113227,'auguria',1,'','left','members',108540,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2015-10-03 08:46:17'),(113228,'auguria',1,'','left','members',113227,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2015-10-03 08:46:17'),(113229,'auguria',1,'','left','members',113227,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2015-10-03 08:46:17'),(113527,'auguria',1,'','left','hrm',108542,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','CPTitreMenu','holiday',0,'hrm','$user->rights->holiday->write','$conf->holiday->enabled',0,'2015-10-03 08:46:17'),(113528,'auguria',1,'','left','hrm',113527,NULL,NULL,1,'/holiday/card.php?&action=request','','MenuAddCP','holiday',1,'','$user->rights->holiday->write','$conf->holiday->enabled',0,'2015-10-03 08:46:17'),(113529,'auguria',1,'','left','hrm',113527,NULL,NULL,2,'/holiday/define_holiday.php?&action=request','','MenuConfCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2015-10-03 08:46:17'),(113530,'auguria',1,'','left','hrm',113527,NULL,NULL,3,'/holiday/view_log.php?&action=request','','MenuLogCP','holiday',1,'','$user->rights->holiday->view_log','$conf->holiday->enabled',0,'2015-10-03 08:46:17'),(113531,'auguria',1,'','left','hrm',113527,NULL,NULL,4,'/holiday/month_report.php?&action=request','','MenuReportMonth','holiday',1,'','$user->rights->holiday->month_report','$conf->holiday->enabled',0,'2015-10-03 08:46:17'),(113627,'auguria',1,'','left','commercial',108532,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->fournisseur->enabled',2,'2015-10-03 08:46:16'),(113628,'auguria',1,'','left','commercial',113627,NULL,NULL,0,'/fourn/commande/card.php?action=create&leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->fournisseur->enabled',2,'2015-10-03 08:46:16'),(113629,'auguria',1,'','left','commercial',113627,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->fournisseur->enabled',2,'2015-10-03 08:46:16'),(113635,'auguria',1,'','left','commercial',113627,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->fournisseur->enabled',2,'2015-10-03 08:46:16'),(113727,'auguria',1,'','left','members',108540,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2015-10-03 08:46:17'),(113728,'auguria',1,'','left','members',113727,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2015-10-03 08:46:17'); +INSERT INTO `llx_menu` VALUES (87422,'smartphone',1,NULL,'top','home',0,NULL,NULL,1,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2013-02-24 18:29:15'),(87423,'smartphone',1,NULL,'top','companies',0,NULL,NULL,2,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->societe->enabled || $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(87424,'smartphone',1,NULL,'top','products',0,NULL,NULL,3,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2013-02-24 18:29:15'),(87426,'smartphone',1,NULL,'top','commercial',0,NULL,NULL,5,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87427,'smartphone',1,NULL,'top','accountancy',0,NULL,NULL,6,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->commande->lire || $user->rights->facture->lire','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled',2,'2013-02-24 18:29:15'),(87428,'smartphone',1,NULL,'top','project',0,NULL,NULL,7,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',0,'2013-02-24 18:29:15'),(87429,'smartphone',1,NULL,'top','tools',0,NULL,NULL,8,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled',2,'2013-02-24 18:29:15'),(87432,'smartphone',1,NULL,'top','shop',0,NULL,NULL,11,'/boutique/index.php?mainmenu=shop&leftmenu=','','OSCommerce','shop',-1,'','','! empty($conf->boutique->enabled)',0,'2013-02-24 18:29:15'),(87434,'smartphone',1,NULL,'top','members',0,NULL,NULL,15,'/adherents/index.php?mainmenu=members&leftmenu=','','Members','members',-1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(87435,'smartphone',1,NULL,'top','bank',0,NULL,NULL,6,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',2,'2013-02-24 18:29:15'),(87521,'smartphone',1,NULL,'left','home',87422,NULL,NULL,0,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'','','$user->admin',2,'2013-02-24 18:29:15'),(87522,'smartphone',1,NULL,'left','home',87521,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87523,'smartphone',1,NULL,'left','home',87521,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87524,'smartphone',1,NULL,'left','home',87521,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87525,'smartphone',1,NULL,'left','home',87521,NULL,NULL,5,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87526,'smartphone',1,NULL,'left','home',87521,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87527,'smartphone',1,NULL,'left','home',87521,NULL,NULL,6,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87529,'smartphone',1,NULL,'left','home',87521,NULL,NULL,7,'/admin/perms.php?leftmenu=setup','','Security','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87530,'smartphone',1,NULL,'left','home',87521,NULL,NULL,9,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87531,'smartphone',1,NULL,'left','home',87521,NULL,NULL,8,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87532,'smartphone',1,NULL,'left','home',87521,NULL,NULL,10,'/admin/dict.php?leftmenu=setup','','DictionarySetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87533,'smartphone',1,NULL,'left','home',87521,NULL,NULL,11,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87621,'smartphone',1,NULL,'left','home',87422,NULL,NULL,1,'/admin/system/index.php?leftmenu=system','','SystemInfo','admin',0,'','','$user->admin',2,'2013-02-24 18:29:15'),(87622,'smartphone',1,NULL,'left','home',87621,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=system','','Dolibarr','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87623,'smartphone',1,NULL,'left','home',87622,NULL,NULL,1,'/admin/system/constall.php?leftmenu=system','','AllParameters','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87624,'smartphone',1,NULL,'left','home',87622,NULL,NULL,4,'/admin/system/about.php?leftmenu=system','','About','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87625,'smartphone',1,NULL,'left','home',87621,NULL,NULL,1,'/admin/system/os.php?leftmenu=system','','OS','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87626,'smartphone',1,NULL,'left','home',87621,NULL,NULL,2,'/admin/system/web.php?leftmenu=system','','WebServer','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87627,'smartphone',1,NULL,'left','home',87621,NULL,NULL,3,'/admin/system/phpinfo.php?leftmenu=system','','Php','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87628,'smartphone',1,NULL,'left','home',87622,NULL,NULL,3,'/admin/triggers.php?leftmenu=system','','Triggers','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87629,'smartphone',1,NULL,'left','home',87622,NULL,NULL,2,'/admin/system/modules.php?leftmenu=system','','Modules','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87631,'smartphone',1,NULL,'left','home',87621,NULL,NULL,4,'/admin/system/database.php?leftmenu=system','','Database','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87632,'smartphone',1,NULL,'left','home',87631,NULL,NULL,0,'/admin/system/database-tables.php?leftmenu=system','','Tables','admin',2,'','','1',2,'2013-02-24 18:29:15'),(87721,'smartphone',1,NULL,'left','home',87422,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','SystemTools','admin',0,'','','$user->admin',2,'2013-02-24 18:29:15'),(87722,'smartphone',1,NULL,'left','home',87721,NULL,NULL,0,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87723,'smartphone',1,NULL,'left','home',87721,NULL,NULL,1,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87724,'smartphone',1,NULL,'left','home',87721,NULL,NULL,6,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87725,'smartphone',1,NULL,'left','home',87721,NULL,NULL,3,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','1 && function_exists(\'eaccelerator_info\')',2,'2013-02-24 18:29:15'),(87726,'smartphone',1,NULL,'left','home',87721,NULL,NULL,2,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87727,'smartphone',1,NULL,'left','home',87721,NULL,NULL,4,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87728,'smartphone',1,NULL,'left','home',87721,NULL,NULL,7,'/support/index.php?leftmenu=admintools','_blank','HelpCenter','help',1,'','','1',2,'2013-02-24 18:29:15'),(87729,'smartphone',1,NULL,'left','home',87721,NULL,NULL,5,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','1',2,'2013-02-24 18:29:15'),(87821,'smartphone',1,NULL,'left','home',87422,NULL,NULL,3,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'','','1',2,'2013-02-24 18:29:15'),(87822,'smartphone',1,NULL,'left','home',87821,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','1',2,'2013-02-24 18:29:15'),(87823,'smartphone',1,NULL,'left','home',87822,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser','users',2,'','$user->rights->user->user->creer || $user->admin','1',2,'2013-02-24 18:29:15'),(87824,'smartphone',1,NULL,'left','home',87821,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin','1',2,'2013-02-24 18:29:15'),(87825,'smartphone',1,NULL,'left','home',87824,NULL,NULL,0,'/user/group/card.php?leftmenu=users&action=create','','NewGroup','users',2,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin','1',2,'2013-02-24 18:29:15'),(87921,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,0,'/societe/societe.php','','ThirdParty','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87922,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,0,'/societe/soc.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87924,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,5,'/fourn/list.php?leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(87925,'smartphone',1,NULL,'left','companies',87924,NULL,NULL,0,'/societe/soc.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(87927,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,3,'/comm/prospect/list.php?leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87928,'smartphone',1,NULL,'left','companies',87927,NULL,NULL,0,'/societe/soc.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87930,'smartphone',1,NULL,'left','companies',87921,NULL,NULL,4,'/comm/list.php?leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(87931,'smartphone',1,NULL,'left','companies',87930,NULL,NULL,0,'/societe/soc.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88021,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses||Contacts@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88022,'smartphone',1,NULL,'left','companies',88021,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress||NewContact@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88023,'smartphone',1,NULL,'left','companies',88021,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88025,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','Prospects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88026,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','Customers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88027,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','Suppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(88028,'smartphone',1,NULL,'left','companies',88023,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(88071,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88072,'smartphone',1,NULL,'left','companies',88071,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88081,'smartphone',1,NULL,'left','companies',87423,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88082,'smartphone',1,NULL,'left','companies',88081,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(88121,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,1,'/comm/prospect/index.php?leftmenu=prospects','','Prospects','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88122,'smartphone',1,NULL,'left','commercial',88121,NULL,NULL,0,'/societe/soc.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88123,'smartphone',1,NULL,'left','commercial',88121,NULL,NULL,1,'/comm/prospect/list.php?leftmenu=prospects','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88124,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,0,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=-1','','LastProspectDoNotContact','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88125,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,1,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=0','','LastProspectNeverContacted','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88126,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,2,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=1','','LastProspectToContact','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88127,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,3,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=2','','LastProspectContactInProcess','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88128,'smartphone',1,NULL,'left','commercial',88123,NULL,NULL,4,'/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&stcomm=3','','LastProspectContactDone','companies',2,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88129,'smartphone',1,NULL,'left','commercial',88121,NULL,NULL,2,'/contact/list.php?leftmenu=prospects&type=p','','Contacts','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88221,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,2,'/comm/index.php?leftmenu=customers','','Customers','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88222,'smartphone',1,NULL,'left','commercial',88221,NULL,NULL,0,'/societe/soc.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88223,'smartphone',1,NULL,'left','commercial',88221,NULL,NULL,1,'/comm/list.php?leftmenu=customers','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88224,'smartphone',1,NULL,'left','commercial',88221,NULL,NULL,2,'/contact/list.php?leftmenu=customers&type=c','','Contacts','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88321,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,3,'/contact/list.php?leftmenu=contacts','','Contacts','companies',0,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88322,'smartphone',1,NULL,'left','commercial',88321,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress||NewContact@$conf->global->SOCIETE_ADDRESSES_MANAGEMENT','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88323,'smartphone',1,NULL,'left','commercial',88321,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',0,'2013-02-24 18:29:15'),(88331,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','Prospects','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88332,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=c','','Customers','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88333,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=f','','Suppliers','companies',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88334,'smartphone',1,NULL,'left','commercial',88323,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=o','','Other','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled && $leftmenu==\"prospects\"',0,'2013-02-24 18:29:15'),(88521,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,4,'/comm/propal.php?leftmenu=propals','','Prop','propal',0,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2013-02-24 18:29:15'),(88522,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,0,'/societe/societe.php?leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88523,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,1,'/comm/propal.php?viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88524,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,2,'/comm/propal.php?viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88525,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,3,'/comm/propal.php?viewstatut=2,3,4','','PropalStatusClosedShort','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88526,'smartphone',1,NULL,'left','commercial',88521,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2013-02-24 18:29:15'),(88621,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2013-02-24 18:29:15'),(88622,'smartphone',1,NULL,'left','commercial',88621,NULL,NULL,0,'/societe/societe.php?leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88623,'smartphone',1,NULL,'left','commercial',88621,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88624,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,2,'/commande/list.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88625,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88626,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,4,'/commande/list.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88627,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,5,'/commande/list.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88628,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,6,'/commande/list.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88629,'smartphone',1,NULL,'left','commercial',88623,NULL,NULL,7,'/commande/list.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88630,'smartphone',1,NULL,'left','commercial',88621,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2013-02-24 18:29:15'),(88721,'smartphone',1,NULL,'left','commercial',87424,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','orders',0,'','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2013-02-24 18:29:15'),(88722,'smartphone',1,NULL,'left','commercial',88721,NULL,NULL,0,'/expedition/list.php?leftmenu=sendings','','List','orders',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-02-24 18:29:15'),(88723,'smartphone',1,NULL,'left','commercial',88721,NULL,NULL,1,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','orders',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2013-02-24 18:29:15'),(88821,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88822,'smartphone',1,NULL,'left','commercial',88821,NULL,NULL,0,'/societe/societe.php?leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88823,'smartphone',1,NULL,'left','commercial',88821,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88824,'smartphone',1,NULL,'left','commercial',88821,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2013-02-24 18:29:15'),(88825,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88826,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88827,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88828,'smartphone',1,NULL,'left','commercial',88824,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2013-02-24 18:29:15'),(88921,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2013-02-24 18:29:15'),(88922,'smartphone',1,NULL,'left','commercial',88921,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled && $leftmenu==\"ficheinter\"',2,'2013-02-24 18:29:15'),(88923,'smartphone',1,NULL,'left','commercial',88921,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled && $leftmenu==\"ficheinter\"',2,'2013-02-24 18:29:15'),(89021,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,3,'/fourn/facture/index.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89022,'smartphone',1,NULL,'left','accountancy',89021,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89023,'smartphone',1,NULL,'left','accountancy',89021,NULL,NULL,1,'/fourn/facture/impayees.php?leftmenu=suppliers_bills','','Unpaid','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89024,'smartphone',1,NULL,'left','accountancy',89021,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(89121,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89122,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,3,'/compta/clients.php?action=facturer&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89123,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,4,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','Repeatable','bills',1,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89124,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,5,'/compta/facture/impayees.php?action=facturer&leftmenu=customers_bills','','Unpaid','bills',1,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89125,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89131,'smartphone',1,NULL,'left','accountancy',89125,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->societe->enabled',2,'2013-02-24 18:29:15'),(89132,'smartphone',1,NULL,'left','accountancy',87435,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89133,'smartphone',1,NULL,'left','accountancy',89132,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89134,'smartphone',1,NULL,'left','accountancy',89132,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89135,'smartphone',1,NULL,'left','accountancy',89121,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled && $conf->banque->enabled',2,'2013-02-24 18:29:15'),(89321,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'','$user->rights->commande->lire','$conf->commande->enabled',0,'2013-02-24 18:29:15'),(89421,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,4,'/compta/dons/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'','$user->rights->don->lire','$conf->don->enabled',2,'2013-02-24 18:29:15'),(89422,'smartphone',1,NULL,'left','accountancy',89421,NULL,NULL,0,'/compta/dons/card.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2013-02-24 18:29:15'),(89423,'smartphone',1,NULL,'left','accountancy',89421,NULL,NULL,1,'/compta/dons/list.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2013-02-24 18:29:15'),(89521,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2013-02-24 18:29:15'),(89522,'smartphone',1,NULL,'left','accountancy',89521,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-02-24 18:29:15'),(89523,'smartphone',1,NULL,'left','accountancy',89521,NULL,NULL,2,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-02-24 18:29:15'),(89524,'smartphone',1,NULL,'left','accountancy',89521,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled && $leftmenu==\"tripsandexpenses\"',0,'2013-02-24 18:29:15'),(89621,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuTaxAndDividends','compta',0,'','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2013-02-24 18:29:15'),(89622,'smartphone',1,NULL,'left','accountancy',89621,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2013-02-24 18:29:15'),(89623,'smartphone',1,NULL,'left','accountancy',89622,NULL,NULL,2,'/compta/sociales/charges.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2013-02-24 18:29:15'),(89624,'smartphone',1,NULL,'left','accountancy',89622,NULL,NULL,3,'/compta/charges/index.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2013-02-24 18:29:15'),(89721,'smartphone',1,NULL,'left','accountancy',89621,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2013-02-24 18:29:15'),(89722,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','NewPayment','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89723,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','Payments','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89724,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89725,'smartphone',1,NULL,'left','accountancy',89721,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2013-02-24 18:29:15'),(89821,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,8,'/compta/ventilation/index.php?leftmenu=ventil','','Ventilation','companies',0,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89822,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,0,'/compta/ventilation/list.php','','ToDispatch','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89823,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,1,'/compta/ventilation/lignes.php','','Dispatched','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89824,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,2,'/compta/param/','','Setup','companies',1,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89825,'smartphone',1,NULL,'left','accountancy',89824,NULL,NULL,0,'/compta/param/comptes/list.php','','List','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89826,'smartphone',1,NULL,'left','accountancy',89824,NULL,NULL,1,'/compta/param/comptes/card.php?action=create','','New','companies',2,'','$user->rights->compta->ventilation->parametrer','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89827,'smartphone',1,NULL,'left','accountancy',89821,NULL,NULL,3,'/compta/export/','','Export','companies',1,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89828,'smartphone',1,NULL,'left','accountancy',89827,NULL,NULL,0,'/compta/export/index.php','','New','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89829,'smartphone',1,NULL,'left','accountancy',89827,NULL,NULL,1,'/compta/export/list.php','','List','companies',2,'','$user->rights->compta->ventilation->lire','$conf->comptabilite->enabled && $conf->global->FACTURE_VENTILATION',0,'2013-02-24 18:29:15'),(89921,'smartphone',1,NULL,'left','accountancy',87435,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2013-02-24 18:29:15'),(89922,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,1,'/compta/prelevement/demandes.php?status=0&leftmenu=withdraw','','StandingOrderToProcess','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89923,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89924,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89925,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89927,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(89928,'smartphone',1,NULL,'left','accountancy',89921,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2013-02-24 18:29:15'),(90021,'smartphone',1,NULL,'left','accountancy',87435,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'','$user->rights->banque->lire','$conf->banque->enabled',0,'2013-02-24 18:29:15'),(90022,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,0,'/compta/bank/card.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90023,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,1,'/compta/bank/categ.php?leftmenu=bank','','Rubriques','categories',1,'','$user->rights->banque->configurer','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90024,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,2,'/compta/bank/search.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90025,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90027,'smartphone',1,NULL,'left','accountancy',90021,NULL,NULL,5,'/compta/bank/virement.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && $leftmenu==bank',0,'2013-02-24 18:29:15'),(90121,'smartphone',1,NULL,'left','accountancy',87427,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90122,'smartphone',1,NULL,'left','accountancy',90121,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90123,'smartphone',1,NULL,'left','accountancy',90122,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90124,'smartphone',1,NULL,'left','accountancy',90121,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90125,'smartphone',1,NULL,'left','accountancy',90124,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90126,'smartphone',1,NULL,'left','accountancy',90124,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2013-02-24 18:29:15'),(90221,'smartphone',1,NULL,'left','products',87424,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'','$user->rights->produit->lire','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90222,'smartphone',1,NULL,'left','products',90221,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90223,'smartphone',1,NULL,'left','products',90221,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90224,'smartphone',1,NULL,'left','products',90221,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2013-02-24 18:29:15'),(90321,'smartphone',1,NULL,'left','products',87424,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'','$user->rights->service->lire','$conf->service->enabled',2,'2013-02-24 18:29:15'),(90322,'smartphone',1,NULL,'left','products',90321,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2013-02-24 18:29:15'),(90323,'smartphone',1,NULL,'left','products',90321,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2013-02-24 18:29:15'),(90421,'smartphone',1,NULL,'left','products',87424,NULL,NULL,2,'/product/stats/index.php?leftmenu=stats','','Statistics','main',0,'','$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',2,'2013-02-24 18:29:15'),(90422,'smartphone',1,NULL,'left','products',90421,NULL,NULL,0,'/product/popuprop.php?leftmenu=stats','','Popularity','main',1,'','$user->rights->produit->lire && $user->rights->produit>lire','$conf->propal->enabled',2,'2013-02-24 18:29:15'),(90521,'smartphone',1,NULL,'left','products',87424,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90522,'smartphone',1,NULL,'left','products',90521,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90523,'smartphone',1,NULL,'left','products',90521,NULL,NULL,1,'/product/stock/list.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90524,'smartphone',1,NULL,'left','products',90521,NULL,NULL,2,'/product/stock/valo.php','','EnhancedValue','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90525,'smartphone',1,NULL,'left','products',90521,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2013-02-24 18:29:15'),(90621,'smartphone',1,NULL,'left','products',87424,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2013-02-24 18:29:15'),(90622,'smartphone',1,NULL,'left','products',90621,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2013-02-24 18:29:15'),(91021,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91022,'smartphone',1,NULL,'left','project',91021,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91023,'smartphone',1,NULL,'left','project',91021,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91031,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/index.php?leftmenu=projects&mode=mine','','MyProjects','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91032,'smartphone',1,NULL,'left','project',91031,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create&mode=mine','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91033,'smartphone',1,NULL,'left','project',91031,NULL,NULL,2,'/projet/list.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91121,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91122,'smartphone',1,NULL,'left','project',91121,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91123,'smartphone',1,NULL,'left','project',91121,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91124,'smartphone',1,NULL,'left','project',91121,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91221,'smartphone',1,NULL,'left','project',87428,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects&mode=mine','','MyActivities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91222,'smartphone',1,NULL,'left','project',91221,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create&mode=mine','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91223,'smartphone',1,NULL,'left','project',91221,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91224,'smartphone',1,NULL,'left','project',91221,NULL,NULL,3,'/projet/activity/list.php?leftmenu=projects&mode=mine','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2013-02-24 18:29:15'),(91321,'smartphone',1,NULL,'left','tools',87429,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2013-02-24 18:29:15'),(91322,'smartphone',1,NULL,'left','tools',91321,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2013-02-24 18:29:15'),(91323,'smartphone',1,NULL,'left','tools',91321,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2013-02-24 18:29:15'),(91521,'smartphone',1,NULL,'left','tools',87429,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'','$user->rights->export->lire','$conf->export->enabled',2,'2013-02-24 18:29:15'),(91522,'smartphone',1,NULL,'left','tools',91521,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2013-02-24 18:29:15'),(91551,'smartphone',1,NULL,'left','tools',87429,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'','$user->rights->import->run','$conf->import->enabled',2,'2013-02-24 18:29:15'),(91552,'smartphone',1,NULL,'left','tools',91551,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2013-02-24 18:29:15'),(91621,'smartphone',1,NULL,'left','members',87434,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91622,'smartphone',1,NULL,'left','members',91621,NULL,NULL,0,'/adherents/card.php?action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91623,'smartphone',1,NULL,'left','members',91621,NULL,NULL,1,'/adherents/list.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91624,'smartphone',1,NULL,'left','members',91623,NULL,NULL,2,'/adherents/list.php?statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91625,'smartphone',1,NULL,'left','members',91623,NULL,NULL,3,'/adherents/list.php?statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91626,'smartphone',1,NULL,'left','members',91623,NULL,NULL,4,'/adherents/list.php?statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91627,'smartphone',1,NULL,'left','members',91623,NULL,NULL,5,'/adherents/list.php?statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91628,'smartphone',1,NULL,'left','members',91623,NULL,NULL,6,'/adherents/list.php?statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91721,'smartphone',1,NULL,'left','members',87434,NULL,NULL,1,'/adherents/index.php?leftmenu=accountancy&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91722,'smartphone',1,NULL,'left','members',91721,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91723,'smartphone',1,NULL,'left','members',91721,NULL,NULL,1,'/adherents/cotisations.php?leftmenu=accountancy','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91921,'smartphone',1,NULL,'left','members',87434,NULL,NULL,3,'/adherents/index.php?leftmenu=export&mainmenu=members','','Exports','members',0,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91922,'smartphone',1,NULL,'left','members',91921,NULL,NULL,0,'/exports/index.php?leftmenu=export','','Datas','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled && $conf->export->enabled',2,'2013-02-24 18:29:15'),(91923,'smartphone',1,NULL,'left','members',91921,NULL,NULL,1,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(91924,'smartphone',1,NULL,'left','members',91921,NULL,NULL,2,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92121,'smartphone',1,NULL,'left','members',87434,NULL,NULL,5,'/adherents/index.php?leftmenu=setup&mainmenu=members','','Setup','members',0,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92122,'smartphone',1,NULL,'left','members',92121,NULL,NULL,0,'/adherents/type.php?leftmenu=setup','','MembersTypes','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92123,'smartphone',1,NULL,'left','members',92121,NULL,NULL,1,'/adherents/options.php?leftmenu=setup','','MembersAttributes','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2013-02-24 18:29:15'),(92421,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,0,'/compta/index.php?leftmenu=suppliers','','Suppliers','companies',0,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92422,'smartphone',1,NULL,'left','commercial',92421,NULL,NULL,0,'/societe/soc.php?leftmenu=suppliers&action=create&type=f','','NewSupplier','companies',1,'','$user->rights->societe->creer && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92423,'smartphone',1,NULL,'left','commercial',92421,NULL,NULL,1,'/fourn/list.php?leftmenu=suppliers','','List','companies',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92424,'smartphone',1,NULL,'left','commercial',92421,NULL,NULL,2,'/contact/list.php?leftmenu=suppliers&type=f','','Contacts','companies',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->fournisseur->enabled',2,'2013-02-24 18:29:15'),(92521,'smartphone',1,NULL,'left','commercial',87426,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled',2,'2013-02-24 18:29:15'),(92522,'smartphone',1,NULL,'left','commercial',92521,NULL,NULL,0,'/societe/societe.php?leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->commande->enabled && $leftmenu==\"orders_suppliers\"',2,'2013-02-24 18:29:15'),(92523,'smartphone',1,NULL,'left','commercial',92521,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled && $leftmenu==\"orders_suppliers\"',2,'2013-02-24 18:29:15'),(92529,'smartphone',1,NULL,'left','commercial',92521,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->commande->enabled && $leftmenu==\"orders_suppliers\"',2,'2013-02-24 18:29:15'),(92621,'smartphone',1,NULL,'left','members',87434,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(92622,'smartphone',1,NULL,'left','members',92621,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2013-02-24 18:29:15'),(103094,'all',2,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103095,'all',2,'agenda','left','agenda',103094,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103096,'all',2,'agenda','left','agenda',103095,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103097,'all',2,'agenda','left','agenda',103095,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Calendar','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103098,'all',2,'agenda','left','agenda',103097,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103099,'all',2,'agenda','left','agenda',103097,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103100,'all',2,'agenda','left','agenda',103097,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103101,'all',2,'agenda','left','agenda',103097,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103102,'all',2,'agenda','left','agenda',103095,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103103,'all',2,'agenda','left','agenda',103102,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103104,'all',2,'agenda','left','agenda',103102,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103105,'all',2,'agenda','left','agenda',103102,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103106,'all',2,'agenda','left','agenda',103102,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2013-03-13 15:29:19'),(103107,'all',2,'agenda','left','agenda',103095,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2013-03-13 15:29:19'),(103108,'all',2,'pos','top','pos',0,NULL,NULL,100,'/pos/backend/listefac.php','','POS','pos@pos',NULL,'1','1','1',2,'2013-03-13 20:33:09'),(103109,'all',2,'pos','left','pos',103108,NULL,NULL,100,'/pos/backend/list.php','','Tickets','pos@pos',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103110,'all',2,'pos','left','pos',103109,NULL,NULL,100,'/pos/backend/list.php','','List','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103111,'all',2,'pos','left','pos',103110,NULL,NULL,100,'/pos/backend/list.php?viewstatut=0','','StatusTicketDraft','pos@pos',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103112,'all',2,'pos','left','@pos',103110,NULL,NULL,100,'/pos/backend/list.php?viewstatut=1','','StatusTicketClosed','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103113,'all',2,'pos','left','@pos',103110,NULL,NULL,100,'/pos/backend/list.php?viewstatut=2','','StatusTicketProcessed','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103114,'all',2,'pos','left','@pos',103110,NULL,NULL,100,'/pos/backend/list.php?viewtype=1','','StatusTicketReturned','main',NULL,NULL,'$user->rights->pos->backend','$conf->global->POS_USE_TICKETS',0,'2013-03-13 20:33:09'),(103115,'all',2,'pos','left','pos',103108,NULL,NULL,100,'/pos/backend/listefac.php','','Factures','pos@pos',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103116,'all',2,'pos','left','pos',103115,NULL,NULL,100,'/pos/backend/listefac.php','','List','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103117,'all',2,'pos','left','pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewstatut=0','','BillStatusDraft','bills',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103118,'all',2,'pos','left','@pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewstatut=1','','BillStatusValidated','bills',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103119,'all',2,'pos','left','@pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewstatut=2&viewtype=0','','BillStatusPaid','bills',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103120,'all',2,'pos','left','@pos',103116,NULL,NULL,100,'/pos/backend/listefac.php?viewtype=2','','BillStatusReturned','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103121,'all',2,'pos','left','@pos',103108,NULL,NULL,100,'/pos/frontend/index.php','','POS','main',NULL,NULL,'$user->rights->pos->frontend','1',0,'2013-03-13 20:33:09'),(103122,'all',2,'pos','left','@pos',103121,NULL,NULL,100,'/pos/frontend/index.php','','NewTicket','main',NULL,NULL,'$user->rights->pos->frontend','1',0,'2013-03-13 20:33:09'),(103123,'all',2,'pos','left','@pos',103121,NULL,NULL,101,'/pos/backend/closes.php','','CloseandArching','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103124,'all',2,'pos','left','@pos',103108,NULL,NULL,100,'/pos/backend/terminal/cash.php','','Terminal','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103125,'all',2,'pos','left','@pos',103124,NULL,NULL,100,'/pos/backend/terminal/card.php?action=create','','NewCash','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103126,'all',2,'pos','left','@pos',103124,NULL,NULL,101,'/pos/backend/terminal/cash.php','','List','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103127,'all',2,'pos','left','@pos',103123,NULL,NULL,101,'/pos/backend/closes.php?viewstatut=0','','Arqueo','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103128,'all',2,'pos','left','@pos',103123,NULL,NULL,102,'/pos/backend/closes.php?viewstatut=1','','Closes','main',NULL,NULL,'$user->rights->pos->backend','1',0,'2013-03-13 20:33:09'),(103129,'all',2,'pos','left','@pos',103108,NULL,NULL,102,'/pos/backend/transfers.php','','Transfer','main',NULL,NULL,'$user->rights->pos->transfer','1',0,'2013-03-13 20:33:09'),(103130,'all',2,'pos','left','@pos',103108,NULL,NULL,102,'/pos/backend/resultat/index.php','','Rapport','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103131,'all',2,'pos','left','@pos',103130,NULL,NULL,102,'/pos/backend/resultat/casoc.php','','ReportsCustomer','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103132,'all',2,'pos','left','@pos',103130,NULL,NULL,102,'/pos/backend/resultat/causer.php','','ReportsUser','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103133,'all',2,'pos','left','@pos',103130,NULL,NULL,102,'/pos/backend/resultat/sellsjournal.php','','ReportsSells','main',NULL,NULL,'$user->rights->pos->stats','1',0,'2013-03-13 20:33:09'),(103134,'all',2,'opensurvey','top','opensurvey',0,NULL,NULL,200,'/opensurvey/index.php','','Surveys','opensurvey',NULL,NULL,'$user->rights->opensurvey->survey->read','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103135,'all',2,'opensurvey','left','opensurvey',-1,NULL,'opensurvey',200,'/opensurvey/index.php?mainmenu=opensurvey&leftmenu=opensurvey','','Survey','opensurvey@opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103136,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',210,'/opensurvey/public/index.php','_blank','NewSurvey','opensurvey@opensurvey',NULL,'opensurvey_new','','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(103137,'all',2,'opensurvey','left','opensurvey',-1,'opensurvey','opensurvey',220,'/opensurvey/list.php','','List','opensurvey@opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2013-03-13 20:33:42'),(124179,'all',1,'cashdesk','top','cashdesk',0,NULL,NULL,100,'/cashdesk/index.php?user=__LOGIN__','pointofsale','CashDeskMenu','cashdesk',NULL,NULL,'$user->rights->cashdesk->use','$conf->cashdesk->enabled',0,'2015-11-15 22:38:33'),(124197,'all',1,'expensereport','left','hrm',-1,NULL,'hrm',100,'/expensereport/index.php','','TripsAndExpenses','trips',NULL,'expensereport','$user->rights->expensereport->lire','$conf->expensereport->enabled',2,'2015-11-15 22:39:05'),(124198,'all',1,'expensereport','left','hrm',-1,'expensereport','hrm',100,'/expensereport/card.php?action=create','','New','trips',NULL,'expensereport_detailnew','$user->rights->expensereport->creer','$conf->expensereport->enabled',2,'2015-11-15 22:39:05'),(124199,'all',1,'expensereport','left','hrm',-1,'expensereport','hrm',100,'/expensereport/list.php','','List','trips',NULL,'expensereport_detaillist','$user->rights->expensereport->lire','$conf->expensereport->enabled',2,'2015-11-15 22:39:05'),(124200,'all',1,'expensereport','left','hrm',-1,'expensereport_detaillist','hrm',100,'/expensereport/list.php?search_status=2','','ListToApprove','trips',NULL,'expensereport_detaillist_approve','$user->rights->expensereport->approve','$conf->expensereport->enabled',2,'2015-11-15 22:39:05'),(124201,'all',1,'expensereport','left','hrm',-1,'expensereport','hrm',100,'/expensereport/stats/index.php','','Statistics','trips',NULL,'expensereport_detail','$user->rights->expensereport->lire','$conf->expensereport->enabled',2,'2015-11-15 22:39:05'),(124202,'all',1,'expensereport','left','hrm',-1,'expensereport','hrm',100,'/expensereport/export_csv.php','','ExportTripCSV','expensereport',NULL,'expensereport_detail','$user->rights->expensereport->lire','$conf->global->DEPLACEMENT_TO_CLEAN',2,'2015-11-15 22:39:05'),(124203,'all',1,'expensereport','left','hrm',-1,'expensereport','hrm',100,'/expensereport/synchro_compta.php','','Synchro_Compta','expensereport',NULL,'expensereport_detail','$user->rights->expensereport->lire','$conf->global->DEPLACEMENT_TO_CLEAN',2,'2015-11-15 22:39:05'),(124210,'all',1,'margins','left','accountancy',-1,NULL,'accountancy',100,'/margin/index.php','','Margins','margins',NULL,'margins','$user->rights->margins->liretous','$conf->margin->enabled',2,'2015-11-15 22:41:47'),(134659,'all',1,'agenda','top','agenda',0,NULL,NULL,100,'/comm/action/index.php','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2016-01-22 17:26:42'),(134660,'all',1,'agenda','left','agenda',134659,NULL,NULL,100,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Actions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2016-01-22 17:26:42'),(134661,'all',1,'agenda','left','agenda',134660,NULL,NULL,101,'/comm/action/card.php?mainmenu=agenda&leftmenu=agenda&action=create','','NewAction','commercial',NULL,NULL,'($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)','$conf->agenda->enabled',2,'2016-01-22 17:26:42'),(134662,'all',1,'agenda','left','agenda',134660,NULL,NULL,102,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda','','Agenda','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2016-01-22 17:26:42'),(134663,'all',1,'agenda','left','agenda',134662,NULL,NULL,103,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2016-01-22 17:26:42'),(134664,'all',1,'agenda','left','agenda',134662,NULL,NULL,104,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2016-01-22 17:26:42'),(134665,'all',1,'agenda','left','agenda',134662,NULL,NULL,105,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2016-01-22 17:26:42'),(134666,'all',1,'agenda','left','agenda',134662,NULL,NULL,106,'/comm/action/index.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2016-01-22 17:26:42'),(134667,'all',1,'agenda','left','agenda',134660,NULL,NULL,112,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda','','List','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2016-01-22 17:26:42'),(134668,'all',1,'agenda','left','agenda',134667,NULL,NULL,113,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo&filter=mine','','MenuToDoMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2016-01-22 17:26:42'),(134669,'all',1,'agenda','left','agenda',134667,NULL,NULL,114,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done&filter=mine','','MenuDoneMyActions','agenda',NULL,NULL,'$user->rights->agenda->myactions->read','$conf->agenda->enabled',2,'2016-01-22 17:26:42'),(134670,'all',1,'agenda','left','agenda',134667,NULL,NULL,115,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=todo','','MenuToDoActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2016-01-22 17:26:42'),(134671,'all',1,'agenda','left','agenda',134667,NULL,NULL,116,'/comm/action/listactions.php?mainmenu=agenda&leftmenu=agenda&status=done','','MenuDoneActions','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$user->rights->agenda->allactions->read',2,'2016-01-22 17:26:42'),(134672,'all',1,'agenda','left','agenda',134660,NULL,NULL,120,'/comm/action/rapport/index.php?mainmenu=agenda&leftmenu=agenda','','Reportings','agenda',NULL,NULL,'$user->rights->agenda->allactions->read','$conf->agenda->enabled',2,'2016-01-22 17:26:42'),(134673,'all',1,'barcode','left','tools',-1,NULL,'tools',200,'/barcode/printsheet.php?mainmenu=tools&leftmenu=barcodeprint','','BarCodePrintsheet','products',NULL,'barcodeprint','($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->lire_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled',2,'2016-01-22 17:26:42'),(134674,'all',1,'barcode','left','home',-1,'modulesadmintools','home',300,'/barcode/codeinit.php?mainmenu=home&leftmenu=modulesadmintools','','MassBarcodeInit','products',NULL,NULL,'($conf->global->MAIN_USE_ADVANCED_PERMS && $user->rights->barcode->creer_advance) || (! $conf->global->MAIN_USE_ADVANCED_PERMS)','$conf->barcode->enabled && $leftmenu==\"modulesadmintools\"',0,'2016-01-22 17:26:42'),(134675,'all',1,'ecm','top','ecm',0,NULL,NULL,100,'/ecm/index.php','','MenuECM','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup','$conf->ecm->enabled',2,'2016-01-22 17:26:43'),(134676,'all',1,'ecm','left','ecm',-1,NULL,'ecm',101,'/ecm/index.php?mainmenu=ecm&leftmenu=ecm','','ECMArea','ecm',NULL,'ecm','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2016-01-22 17:26:43'),(134677,'all',1,'ecm','left','ecm',-1,'ecm','ecm',102,'/ecm/index.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsManual','ecm',NULL,'ecm_manual','$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2016-01-22 17:26:43'),(134678,'all',1,'ecm','left','ecm',-1,'ecm','ecm',103,'/ecm/index_auto.php?action=file_manager&mainmenu=ecm&leftmenu=ecm','','ECMSectionsAuto','ecm',NULL,NULL,'$user->rights->ecm->read || $user->rights->ecm->upload','$user->rights->ecm->read || $user->rights->ecm->upload',2,'2016-01-22 17:26:43'),(134679,'all',1,'opensurvey','left','tools',-1,NULL,'tools',200,'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey','','Survey','opensurvey',NULL,'opensurvey','','$conf->opensurvey->enabled',0,'2016-01-22 17:26:43'),(134680,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',210,'/opensurvey/wizard/index.php','','NewSurvey','opensurvey',NULL,'opensurvey_new','$user->rights->opensurvey->write','$conf->opensurvey->enabled',0,'2016-01-22 17:26:43'),(134681,'all',1,'opensurvey','left','tools',-1,'opensurvey','tools',220,'/opensurvey/list.php','','List','opensurvey',NULL,'opensurvey_list','','$conf->opensurvey->enabled',0,'2016-01-22 17:26:43'),(134682,'auguria',1,'','top','home',0,NULL,NULL,10,'/index.php?mainmenu=home&leftmenu=','','Home','',-1,'','','1',2,'2016-01-22 17:26:44'),(134683,'auguria',1,'societe|fournisseur','top','companies',0,NULL,NULL,20,'/societe/index.php?mainmenu=companies&leftmenu=','','ThirdParties','companies',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)',2,'2016-01-22 17:26:44'),(134684,'auguria',1,'product|service','top','products',0,NULL,NULL,30,'/product/index.php?mainmenu=products&leftmenu=','','Products/Services','products',-1,'','$user->rights->produit->lire||$user->rights->service->lire','$conf->product->enabled || $conf->service->enabled',0,'2016-01-22 17:26:44'),(134686,'auguria',1,'propal|commande|fournisseur|contrat|ficheinter','top','commercial',0,NULL,NULL,40,'/comm/index.php?mainmenu=commercial&leftmenu=','','Commercial','commercial',-1,'','$user->rights->societe->lire || $user->rights->societe->contact->lire','$conf->propal->enabled || $conf->commande->enabled || $conf->fournisseur->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled',2,'2016-01-22 17:26:44'),(134687,'auguria',1,'comptabilite|accounting|facture|deplacement|don|tax|salaries|loa','top','accountancy',0,NULL,NULL,50,'/compta/index.php?mainmenu=accountancy&leftmenu=','','MenuFinancial','compta',-1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->deplacement->lire || $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $u','$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->loan->enabled',2,'2016-01-22 17:26:44'),(134688,'auguria',1,'projet','top','project',0,NULL,NULL,70,'/projet/index.php?mainmenu=project&leftmenu=','','Projects','projects',-1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(134689,'auguria',1,'mailing|export|import|opensurvey','top','tools',0,NULL,NULL,90,'/core/tools.php?mainmenu=tools&leftmenu=','','Tools','other',-1,'','$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read','$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled',2,'2016-01-22 17:26:44'),(134694,'auguria',1,'adherent','top','members',0,NULL,NULL,110,'/adherents/index.php?mainmenu=members&leftmenu=','','Members','members',-1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(134695,'auguria',1,'banque|prelevement','top','bank',0,NULL,NULL,60,'/compta/bank/index.php?mainmenu=bank&leftmenu=bank','','MenuBankCash','banks',-1,'','$user->rights->banque->lire || $user->rights->prelevement->bons->lire','$conf->banque->enabled || $conf->prelevement->enabled',0,'2016-01-22 17:26:44'),(134696,'auguria',1,'hrm','top','hrm',0,NULL,NULL,80,'/compta/hrm.php?mainmenu=hrm&leftmenu=','','HRM','holiday',-1,'','$user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire','$conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled',0,'2016-01-22 17:26:44'),(134781,'auguria',1,'','left','home',134682,NULL,NULL,0,'/admin/index.php?leftmenu=setup','','Setup','admin',0,'setup','','$user->admin',2,'2016-01-22 17:26:44'),(134782,'auguria',1,'','left','home',134781,NULL,NULL,1,'/admin/company.php?leftmenu=setup','','MenuCompanySetup','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134783,'auguria',1,'','left','home',134781,NULL,NULL,4,'/admin/ihm.php?leftmenu=setup','','GUISetup','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134784,'auguria',1,'','left','home',134781,NULL,NULL,2,'/admin/modules.php?leftmenu=setup','','Modules','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134785,'auguria',1,'','left','home',134781,NULL,NULL,6,'/admin/boxes.php?leftmenu=setup','','Boxes','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134786,'auguria',1,'','left','home',134781,NULL,NULL,3,'/admin/menus.php?leftmenu=setup','','Menus','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134787,'auguria',1,'','left','home',134781,NULL,NULL,7,'/admin/delais.php?leftmenu=setup','','Alerts','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134788,'auguria',1,'','left','home',134781,NULL,NULL,10,'/admin/pdf.php?leftmenu=setup','','PDF','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134789,'auguria',1,'','left','home',134781,NULL,NULL,8,'/admin/security_other.php?leftmenu=setup','','Security','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134790,'auguria',1,'','left','home',134781,NULL,NULL,11,'/admin/mails.php?leftmenu=setup','','Emails','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134791,'auguria',1,'','left','home',134781,NULL,NULL,9,'/admin/limits.php?leftmenu=setup','','MenuLimits','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134792,'auguria',1,'','left','home',134781,NULL,NULL,13,'/admin/dict.php?leftmenu=setup','','Dictionary','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134793,'auguria',1,'','left','home',134781,NULL,NULL,14,'/admin/const.php?leftmenu=setup','','OtherSetup','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134794,'auguria',1,'','left','home',134781,NULL,NULL,12,'/admin/sms.php?leftmenu=setup','','SMS','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134795,'auguria',1,'','left','home',134781,NULL,NULL,4,'/admin/translation.php?leftmenu=setup','','Translation','admin',1,'','','$leftmenu==\"setup\"',2,'2016-01-22 17:26:44'),(134882,'auguria',1,'','left','home',134981,NULL,NULL,0,'/admin/system/dolibarr.php?leftmenu=admintools','','InfoDolibarr','admin',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134883,'auguria',1,'','left','home',134882,NULL,NULL,2,'/admin/system/modules.php?leftmenu=admintools','','Modules','admin',2,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134884,'auguria',1,'','left','home',134882,NULL,NULL,3,'/admin/triggers.php?leftmenu=admintools','','Triggers','admin',2,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134886,'auguria',1,'','left','home',134981,NULL,NULL,1,'/admin/system/browser.php?leftmenu=admintools','','InfoBrowser','admin',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134887,'auguria',1,'','left','home',134981,NULL,NULL,2,'/admin/system/os.php?leftmenu=admintools','','InfoOS','admin',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134888,'auguria',1,'','left','home',134981,NULL,NULL,3,'/admin/system/web.php?leftmenu=admintools','','InfoWebServer','admin',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134889,'auguria',1,'','left','home',134981,NULL,NULL,4,'/admin/system/phpinfo.php?leftmenu=admintools','','InfoPHP','admin',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134891,'auguria',1,'','left','home',134981,NULL,NULL,5,'/admin/system/database.php?leftmenu=admintools','','InfoDatabase','admin',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134981,'auguria',1,'','left','home',134682,NULL,NULL,2,'/admin/tools/index.php?leftmenu=admintools','','SystemTools','admin',0,'admintools','','$user->admin',2,'2016-01-22 17:26:44'),(134982,'auguria',1,'','left','home',134981,NULL,NULL,6,'/admin/tools/dolibarr_export.php?leftmenu=admintools','','Backup','admin',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134983,'auguria',1,'','left','home',134981,NULL,NULL,7,'/admin/tools/dolibarr_import.php?leftmenu=admintools','','Restore','admin',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134986,'auguria',1,'','left','home',134981,NULL,NULL,8,'/admin/tools/update.php?leftmenu=admintools','','MenuUpgrade','admin',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134987,'auguria',1,'','left','home',134981,NULL,NULL,9,'/admin/tools/eaccelerator.php?leftmenu=admintools','','EAccelerator','admin',1,'','','$leftmenu==\"admintools\" && function_exists(\"eaccelerator_info\")',2,'2016-01-22 17:26:44'),(134988,'auguria',1,'','left','home',134981,NULL,NULL,10,'/admin/tools/listevents.php?leftmenu=admintools','','Audit','admin',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134989,'auguria',1,'','left','home',134981,NULL,NULL,11,'/admin/tools/listsessions.php?leftmenu=admintools','','Sessions','admin',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134990,'auguria',1,'','left','home',134981,NULL,NULL,12,'/admin/tools/purge.php?leftmenu=admintools','','Purge','admin',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134991,'auguria',1,'','left','home',134981,NULL,NULL,13,'/support/index.php?leftmenu=admintools','_blank','HelpCenter','help',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(134992,'auguria',1,'','left','home',134981,NULL,NULL,14,'/admin/system/about.php?leftmenu=admintools','','About','admin',1,'','','$leftmenu==\"admintools\"',2,'2016-01-22 17:26:44'),(135081,'auguria',1,'','left','home',134682,NULL,NULL,4,'/user/home.php?leftmenu=users','','MenuUsersAndGroups','users',0,'users','','1',2,'2016-01-22 17:26:44'),(135082,'auguria',1,'','left','home',135081,NULL,NULL,0,'/user/index.php?leftmenu=users','','Users','users',1,'','$user->rights->user->user->lire || $user->admin','$leftmenu==\"users\"',2,'2016-01-22 17:26:44'),(135083,'auguria',1,'','left','home',135082,NULL,NULL,0,'/user/card.php?leftmenu=users&action=create','','NewUser','users',2,'','$user->rights->user->user->creer || $user->admin','$leftmenu==\"users\"',2,'2016-01-22 17:26:44'),(135084,'auguria',1,'','left','home',135081,NULL,NULL,1,'/user/group/index.php?leftmenu=users','','Groups','users',1,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->read:$user->rights->user->user->lire) || $user->admin','$leftmenu==\"users\"',2,'2016-01-22 17:26:44'),(135085,'auguria',1,'','left','home',135084,NULL,NULL,0,'/user/group/card.php?leftmenu=users&action=create','','NewGroup','users',2,'','($conf->global->MAIN_USE_ADVANCED_PERMS?$user->rights->user->group_advance->write:$user->rights->user->user->creer) || $user->admin','$leftmenu==\"users\"',2,'2016-01-22 17:26:44'),(135181,'auguria',1,'','left','companies',134683,NULL,NULL,0,'/societe/index.php?leftmenu=thirdparties','','ThirdParty','companies',0,'thirdparties','$user->rights->societe->lire','$conf->societe->enabled',2,'2016-01-22 17:26:44'),(135182,'auguria',1,'','left','companies',135181,NULL,NULL,0,'/societe/soc.php?action=create','','MenuNewThirdParty','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2016-01-22 17:26:44'),(135183,'auguria',1,'','left','companies',135181,NULL,NULL,0,'/societe/list.php?action=create','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2016-01-22 17:26:44'),(135184,'auguria',1,'','left','companies',135181,NULL,NULL,5,'/fourn/list.php?leftmenu=suppliers','','ListSuppliersShort','suppliers',1,'','$user->rights->societe->lire && $user->rights->fournisseur->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2016-01-22 17:26:44'),(135185,'auguria',1,'','left','companies',135184,NULL,NULL,0,'/societe/soc.php?leftmenu=supplier&action=create&type=f','','NewSupplier','suppliers',2,'','$user->rights->societe->creer','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2016-01-22 17:26:44'),(135187,'auguria',1,'','left','companies',135181,NULL,NULL,3,'/comm/prospect/list.php?leftmenu=prospects','','ListProspectsShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2016-01-22 17:26:44'),(135188,'auguria',1,'','left','companies',135187,NULL,NULL,0,'/societe/soc.php?leftmenu=prospects&action=create&type=p','','MenuNewProspect','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2016-01-22 17:26:44'),(135190,'auguria',1,'','left','companies',135181,NULL,NULL,4,'/comm/list.php?leftmenu=customers','','ListCustomersShort','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2016-01-22 17:26:44'),(135191,'auguria',1,'','left','companies',135190,NULL,NULL,0,'/societe/soc.php?leftmenu=customers&action=create&type=c','','MenuNewCustomer','companies',2,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2016-01-22 17:26:44'),(135281,'auguria',1,'','left','companies',134683,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','ContactsAddresses','companies',0,'contacts','$user->rights->societe->lire','$conf->societe->enabled',2,'2016-01-22 17:26:44'),(135282,'auguria',1,'','left','companies',135281,NULL,NULL,0,'/contact/card.php?leftmenu=contacts&action=create','','NewContactAddress','companies',1,'','$user->rights->societe->creer','$conf->societe->enabled',2,'2016-01-22 17:26:44'),(135283,'auguria',1,'','left','companies',135281,NULL,NULL,1,'/contact/list.php?leftmenu=contacts','','List','companies',1,'','$user->rights->societe->lire','$conf->societe->enabled',2,'2016-01-22 17:26:44'),(135285,'auguria',1,'','left','companies',135283,NULL,NULL,1,'/contact/list.php?leftmenu=contacts&type=p','','ThirdPartyProspects','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2016-01-22 17:26:44'),(135286,'auguria',1,'','left','companies',135283,NULL,NULL,2,'/contact/list.php?leftmenu=contacts&type=c','','ThirdPartyCustomers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2016-01-22 17:26:44'),(135287,'auguria',1,'','left','companies',135283,NULL,NULL,3,'/contact/list.php?leftmenu=contacts&type=f','','ThirdPartySuppliers','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled && $conf->fournisseur->enabled',2,'2016-01-22 17:26:44'),(135288,'auguria',1,'','left','companies',135283,NULL,NULL,4,'/contact/list.php?leftmenu=contacts&type=o','','Others','companies',2,'','$user->rights->societe->contact->lire','$conf->societe->enabled',2,'2016-01-22 17:26:44'),(135331,'auguria',1,'','left','companies',134683,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=1','','SuppliersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2016-01-22 17:26:44'),(135332,'auguria',1,'','left','companies',135331,NULL,NULL,0,'/categories/card.php?action=create&type=1','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2016-01-22 17:26:44'),(135341,'auguria',1,'','left','companies',134683,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=2','','CustomersProspectsCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2016-01-22 17:26:44'),(135342,'auguria',1,'','left','companies',135341,NULL,NULL,0,'/categories/card.php?action=create&type=2','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->fournisseur->enabled && $conf->categorie->enabled',2,'2016-01-22 17:26:44'),(135351,'auguria',1,'','left','companies',134683,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=4','','ContactCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->societe->enabled && $conf->categorie->enabled',2,'2016-01-22 17:26:44'),(135352,'auguria',1,'','left','companies',135351,NULL,NULL,0,'/categories/card.php?action=create&type=4','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->societe->enabled && $conf->categorie->enabled',2,'2016-01-22 17:26:44'),(135781,'auguria',1,'','left','commercial',134686,NULL,NULL,4,'/comm/propal/index.php?leftmenu=propals','','Prop','propal',0,'propals','$user->rights->propale->lire','$conf->propal->enabled',2,'2016-01-22 17:26:44'),(135782,'auguria',1,'','left','commercial',135781,NULL,NULL,0,'/comm/propal.php?action=create&leftmenu=propals','','NewPropal','propal',1,'','$user->rights->propale->creer','$conf->propal->enabled',2,'2016-01-22 17:26:44'),(135783,'auguria',1,'','left','commercial',135781,NULL,NULL,1,'/comm/propal/list.php?leftmenu=propals','','List','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2016-01-22 17:26:44'),(135784,'auguria',1,'','left','commercial',135783,NULL,NULL,2,'/comm/propal/list.php?leftmenu=propals&viewstatut=0','','PropalsDraft','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2016-01-22 17:26:44'),(135785,'auguria',1,'','left','commercial',135783,NULL,NULL,3,'/comm/propal/list.php?leftmenu=propals&viewstatut=1','','PropalsOpened','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2016-01-22 17:26:44'),(135786,'auguria',1,'','left','commercial',135783,NULL,NULL,4,'/comm/propal/list.php?leftmenu=propals&viewstatut=2','','PropalStatusSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2016-01-22 17:26:44'),(135787,'auguria',1,'','left','commercial',135783,NULL,NULL,5,'/comm/propal/list.php?leftmenu=propals&viewstatut=3','','PropalStatusNotSigned','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2016-01-22 17:26:44'),(135788,'auguria',1,'','left','commercial',135783,NULL,NULL,6,'/comm/propal/list.php?leftmenu=propals&viewstatut=4','','PropalStatusBilled','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled && $leftmenu==\"propals\"',2,'2016-01-22 17:26:44'),(135791,'auguria',1,'','left','commercial',135781,NULL,NULL,4,'/comm/propal/stats/index.php?leftmenu=propals','','Statistics','propal',1,'','$user->rights->propale->lire','$conf->propal->enabled',2,'2016-01-22 17:26:44'),(135881,'auguria',1,'','left','commercial',134686,NULL,NULL,5,'/commande/index.php?leftmenu=orders','','CustomersOrders','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',2,'2016-01-22 17:26:44'),(135882,'auguria',1,'','left','commercial',135881,NULL,NULL,0,'/commande/card.php?action=create&leftmenu=orders','','NewOrder','orders',1,'','$user->rights->commande->creer','$conf->commande->enabled',2,'2016-01-22 17:26:44'),(135883,'auguria',1,'','left','commercial',135881,NULL,NULL,1,'/commande/list.php?leftmenu=orders','','List','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2016-01-22 17:26:44'),(135884,'auguria',1,'','left','commercial',135883,NULL,NULL,2,'/commande/list.php?leftmenu=orders&viewstatut=0','','StatusOrderDraftShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2016-01-22 17:26:44'),(135885,'auguria',1,'','left','commercial',135883,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=1','','StatusOrderValidated','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2016-01-22 17:26:44'),(135886,'auguria',1,'','left','commercial',135883,NULL,NULL,4,'/commande/list.php?leftmenu=orders&viewstatut=2','','StatusOrderOnProcessShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2016-01-22 17:26:44'),(135887,'auguria',1,'','left','commercial',135883,NULL,NULL,5,'/commande/list.php?leftmenu=orders&viewstatut=3','','StatusOrderToBill','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2016-01-22 17:26:44'),(135888,'auguria',1,'','left','commercial',135883,NULL,NULL,6,'/commande/list.php?leftmenu=orders&viewstatut=4','','StatusOrderProcessed','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2016-01-22 17:26:44'),(135889,'auguria',1,'','left','commercial',135883,NULL,NULL,7,'/commande/list.php?leftmenu=orders&viewstatut=-1','','StatusOrderCanceledShort','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled && $leftmenu==\"orders\"',2,'2016-01-22 17:26:44'),(135890,'auguria',1,'','left','commercial',135881,NULL,NULL,4,'/commande/stats/index.php?leftmenu=orders','','Statistics','orders',1,'','$user->rights->commande->lire','$conf->commande->enabled',2,'2016-01-22 17:26:44'),(135981,'auguria',1,'','left','commercial',134684,NULL,NULL,6,'/expedition/index.php?leftmenu=sendings','','Shipments','sendings',0,'sendings','$user->rights->expedition->lire','$conf->expedition->enabled',2,'2016-01-22 17:26:44'),(135982,'auguria',1,'','left','commercial',135981,NULL,NULL,0,'/expedition/card.php?action=create2&leftmenu=sendings','','NewSending','sendings',1,'','$user->rights->expedition->creer','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2016-01-22 17:26:44'),(135983,'auguria',1,'','left','commercial',135981,NULL,NULL,1,'/expedition/list.php?leftmenu=sendings','','List','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2016-01-22 17:26:44'),(135984,'auguria',1,'','left','commercial',135981,NULL,NULL,2,'/expedition/stats/index.php?leftmenu=sendings','','Statistics','sendings',1,'','$user->rights->expedition->lire','$conf->expedition->enabled && $leftmenu==\"sendings\"',2,'2016-01-22 17:26:44'),(136081,'auguria',1,'','left','commercial',134686,NULL,NULL,7,'/contrat/index.php?leftmenu=contracts','','Contracts','contracts',0,'contracts','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2016-01-22 17:26:44'),(136082,'auguria',1,'','left','commercial',136081,NULL,NULL,0,'/contrat/card.php?&action=create&leftmenu=contracts','','NewContract','contracts',1,'','$user->rights->contrat->creer','$conf->contrat->enabled',2,'2016-01-22 17:26:44'),(136083,'auguria',1,'','left','commercial',136081,NULL,NULL,1,'/contrat/list.php?leftmenu=contracts','','List','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2016-01-22 17:26:44'),(136084,'auguria',1,'','left','commercial',136081,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts','','MenuServices','contracts',1,'','$user->rights->contrat->lire','$conf->contrat->enabled',2,'2016-01-22 17:26:44'),(136085,'auguria',1,'','left','commercial',136084,NULL,NULL,0,'/contrat/services.php?leftmenu=contracts&mode=0','','MenuInactiveServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2016-01-22 17:26:44'),(136086,'auguria',1,'','left','commercial',136084,NULL,NULL,1,'/contrat/services.php?leftmenu=contracts&mode=4','','MenuRunningServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2016-01-22 17:26:44'),(136087,'auguria',1,'','left','commercial',136084,NULL,NULL,2,'/contrat/services.php?leftmenu=contracts&mode=4&filter=expired','','MenuExpiredServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2016-01-22 17:26:44'),(136088,'auguria',1,'','left','commercial',136084,NULL,NULL,3,'/contrat/services.php?leftmenu=contracts&mode=5','','MenuClosedServices','contracts',2,'','$user->rights->contrat->lire','$conf->contrat->enabled&&$leftmenu==\"contracts\"',2,'2016-01-22 17:26:44'),(136181,'auguria',1,'','left','commercial',134686,NULL,NULL,8,'/fichinter/list.php?leftmenu=ficheinter','','Interventions','interventions',0,'ficheinter','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2016-01-22 17:26:44'),(136182,'auguria',1,'','left','commercial',136181,NULL,NULL,0,'/fichinter/card.php?action=create&leftmenu=ficheinter','','NewIntervention','interventions',1,'','$user->rights->ficheinter->creer','$conf->ficheinter->enabled',2,'2016-01-22 17:26:44'),(136183,'auguria',1,'','left','commercial',136181,NULL,NULL,1,'/fichinter/list.php?leftmenu=ficheinter','','List','interventions',1,'','$user->rights->ficheinter->lire','$conf->ficheinter->enabled',2,'2016-01-22 17:26:44'),(136281,'auguria',1,'','left','accountancy',134687,NULL,NULL,3,'/fourn/facture/list.php?leftmenu=suppliers_bills','','BillsSuppliers','bills',0,'supplier_bills','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2016-01-22 17:26:44'),(136282,'auguria',1,'','left','accountancy',136281,NULL,NULL,0,'/fourn/facture/card.php?action=create&leftmenu=suppliers_bills','','NewBill','bills',1,'','$user->rights->fournisseur->facture->creer','$conf->fournisseur->enabled',2,'2016-01-22 17:26:44'),(136283,'auguria',1,'','left','accountancy',136281,NULL,NULL,1,'/fourn/facture/impayees.php?leftmenu=suppliers_bills','','Unpaid','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2016-01-22 17:26:44'),(136284,'auguria',1,'','left','accountancy',136281,NULL,NULL,2,'/fourn/facture/paiement.php?leftmenu=suppliers_bills','','Payments','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2016-01-22 17:26:44'),(136285,'auguria',1,'','left','accountancy',136281,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier','','Statistics','bills',1,'','$user->rights->fournisseur->facture->lire','$conf->fournisseur->enabled',2,'2016-01-22 17:26:44'),(136381,'auguria',1,'','left','accountancy',134687,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills','','BillsCustomers','bills',0,'customer_bills','$user->rights->facture->lire','$conf->facture->enabled',2,'2016-01-22 17:26:44'),(136382,'auguria',1,'','left','accountancy',136381,NULL,NULL,3,'/compta/facture.php?action=create&leftmenu=customers_bills','','NewBill','bills',1,'','$user->rights->facture->creer','$conf->facture->enabled',2,'2016-01-22 17:26:44'),(136383,'auguria',1,'','left','accountancy',136381,NULL,NULL,5,'/compta/facture/fiche-rec.php?leftmenu=customers_bills','','ListOfTemplates','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2016-01-22 17:26:44'),(136384,'auguria',1,'','left','accountancy',136381,NULL,NULL,7,'/compta/facture/mergepdftool.php?action=facturer&leftmenu=customers_bills','','MergingPDFTool','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2016-01-22 17:26:44'),(136385,'auguria',1,'','left','accountancy',136381,NULL,NULL,6,'/compta/paiement/list.php?leftmenu=customers_bills','','Payments','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2016-01-22 17:26:44'),(136386,'auguria',1,'','left','accountancy',136381,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills','','List','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2016-01-22 17:26:44'),(136391,'auguria',1,'','left','accountancy',136385,NULL,NULL,1,'/compta/paiement/rapport.php?leftmenu=customers_bills','','Reportings','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2016-01-22 17:26:44'),(136392,'auguria',1,'','left','accountancy',134695,NULL,NULL,9,'/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank','','MenuChequeDeposits','bills',0,'checks','$user->rights->banque->lire','! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)',2,'2016-01-22 17:26:44'),(136393,'auguria',1,'','left','accountancy',136392,NULL,NULL,0,'/compta/paiement/cheque/card.php?leftmenu=checks&action=new','','NewCheckDeposit','compta',1,'','$user->rights->banque->lire','! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)',2,'2016-01-22 17:26:44'),(136394,'auguria',1,'','left','accountancy',136392,NULL,NULL,1,'/compta/paiement/cheque/list.php?leftmenu=checks','','List','bills',1,'','$user->rights->banque->lire','! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)',2,'2016-01-22 17:26:44'),(136395,'auguria',1,'','left','accountancy',136381,NULL,NULL,8,'/compta/facture/stats/index.php?leftmenu=customers_bills','','Statistics','bills',1,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2016-01-22 17:26:44'),(136401,'auguria',1,'','left','accountancy',136386,NULL,NULL,1,'/compta/facture/list.php?leftmenu=customers_bills&search_status=0','','BillShortStatusDraft','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2016-01-22 17:26:44'),(136402,'auguria',1,'','left','accountancy',136386,NULL,NULL,2,'/compta/facture/list.php?leftmenu=customers_bills&search_status=1','','BillShortStatusNotPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2016-01-22 17:26:44'),(136403,'auguria',1,'','left','accountancy',136386,NULL,NULL,3,'/compta/facture/list.php?leftmenu=customers_bills&search_status=2','','BillShortStatusPaid','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2016-01-22 17:26:44'),(136404,'auguria',1,'','left','accountancy',136386,NULL,NULL,4,'/compta/facture/list.php?leftmenu=customers_bills&search_status=3','','BillShortStatusCanceled','bills',2,'','$user->rights->facture->lire','$conf->facture->enabled',2,'2016-01-22 17:26:44'),(136581,'auguria',1,'','left','accountancy',134687,NULL,NULL,3,'/commande/list.php?leftmenu=orders&viewstatut=3','','MenuOrdersToBill','orders',0,'orders','$user->rights->commande->lire','$conf->commande->enabled',0,'2016-01-22 17:26:44'),(136681,'auguria',1,'','left','accountancy',134687,NULL,NULL,4,'/don/index.php?leftmenu=donations&mainmenu=accountancy','','Donations','donations',0,'donations','$user->rights->don->lire','$conf->don->enabled',2,'2016-01-22 17:26:44'),(136682,'auguria',1,'','left','accountancy',136681,NULL,NULL,0,'/don/card.php?leftmenu=donations&mainmenu=accountancy&action=create','','NewDonation','donations',1,'','$user->rights->don->creer','$conf->don->enabled && $leftmenu==\"donations\"',2,'2016-01-22 17:26:44'),(136683,'auguria',1,'','left','accountancy',136681,NULL,NULL,1,'/don/list.php?leftmenu=donations&mainmenu=accountancy','','List','donations',1,'','$user->rights->don->lire','$conf->don->enabled && $leftmenu==\"donations\"',2,'2016-01-22 17:26:44'),(136781,'auguria',1,'','left','accountancy',134696,NULL,NULL,5,'/compta/deplacement/index.php?leftmenu=tripsandexpenses','','TripsAndExpenses','trips',0,'tripsandexpenses','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2016-01-22 17:26:44'),(136782,'auguria',1,'','left','accountancy',136781,NULL,NULL,1,'/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses','','New','trips',1,'','$user->rights->deplacement->creer','$conf->deplacement->enabled',0,'2016-01-22 17:26:44'),(136783,'auguria',1,'','left','accountancy',136781,NULL,NULL,2,'/compta/deplacement/list.php?leftmenu=tripsandexpenses','','List','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2016-01-22 17:26:44'),(136784,'auguria',1,'','left','accountancy',136781,NULL,NULL,2,'/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses','','Statistics','trips',1,'','$user->rights->deplacement->lire','$conf->deplacement->enabled',0,'2016-01-22 17:26:44'),(136881,'auguria',1,'','left','accountancy',134687,NULL,NULL,6,'/compta/charges/index.php?leftmenu=tax&mainmenu=accountancy','','MenuSpecialExpenses','compta',0,'tax','(! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) || (! empty($conf->salaries->enabled) && $user->rights->salaries->read)','$conf->tax->enabled || $conf->salaries->enabled',0,'2016-01-22 17:26:44'),(136891,'auguria',1,'','left','accountancy',136881,NULL,NULL,1,'/compta/salaries/index.php?leftmenu=tax_salary&mainmenu=accountancy','','Salaries','salaries',1,'tax_sal','$user->rights->salaries->read','$conf->salaries->enabled',0,'2016-01-22 17:26:44'),(136892,'auguria',1,'','left','accountancy',136891,NULL,NULL,2,'/compta/salaries/card.php?leftmenu=tax_salary&action=create','','NewPayment','companies',2,'','$user->rights->salaries->write','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2016-01-22 17:26:44'),(136893,'auguria',1,'','left','accountancy',136891,NULL,NULL,3,'/compta/salaries/index.php?leftmenu=tax_salary','','Payments','companies',2,'','$user->rights->salaries->read','$conf->salaries->enabled && $leftmenu==\"tax_salary\"',0,'2016-01-22 17:26:44'),(136901,'auguria',1,'','left','accountancy',136881,NULL,NULL,1,'/loan/index.php?leftmenu=tax_loan&mainmenu=accountancy','','Loans','loan',1,'tax_loan','$user->rights->loan->read','$conf->loan->enabled',0,'2016-01-22 17:26:44'),(136902,'auguria',1,'','left','accountancy',136901,NULL,NULL,2,'/loan/card.php?leftmenu=tax_loan&action=create','','NewLoan','loan',2,'','$user->rights->loan->write','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2016-01-22 17:26:44'),(136903,'auguria',1,'','left','accountancy',136901,NULL,NULL,3,'/loan/index.php?leftmenu=tax_loan','','Payments','companies',2,'','$user->rights->loan->read','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2016-01-22 17:26:44'),(136904,'auguria',1,'','left','accountancy',136901,NULL,NULL,4,'/loan/calc.php?leftmenu=tax_loan','','Calculator','companies',2,'','$user->rights->loan->calc','$conf->loan->enabled && $leftmenu==\"tax_loan\"',0,'2016-01-22 17:26:44'),(136931,'auguria',1,'','left','accountancy',136881,NULL,NULL,1,'/compta/sociales/index.php?leftmenu=tax_social','','SocialContributions','',1,'tax_social','$user->rights->tax->charges->lire','$conf->tax->enabled',0,'2016-01-22 17:26:44'),(136932,'auguria',1,'','left','accountancy',136931,NULL,NULL,2,'/compta/sociales/charges.php?leftmenu=tax_social&action=create','','MenuNewSocialContribution','',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2016-01-22 17:26:44'),(136933,'auguria',1,'','left','accountancy',136931,NULL,NULL,3,'/compta/charges/index.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly','','Payments','',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && $leftmenu==\"tax_social\"',0,'2016-01-22 17:26:44'),(136981,'auguria',1,'','left','accountancy',136881,NULL,NULL,7,'/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy','','VAT','companies',1,'tax_vat','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)',0,'2016-01-22 17:26:44'),(136982,'auguria',1,'','left','accountancy',136981,NULL,NULL,0,'/compta/tva/card.php?leftmenu=tax_vat&action=create','','NewPayment','companies',2,'','$user->rights->tax->charges->creer','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2016-01-22 17:26:44'),(136983,'auguria',1,'','left','accountancy',136981,NULL,NULL,1,'/compta/tva/reglement.php?leftmenu=tax_vat','','Payments','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2016-01-22 17:26:44'),(136984,'auguria',1,'','left','accountancy',136981,NULL,NULL,2,'/compta/tva/clients.php?leftmenu=tax_vat','','ReportByCustomers','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2016-01-22 17:26:44'),(136985,'auguria',1,'','left','accountancy',136981,NULL,NULL,3,'/compta/tva/quadri_detail.php?leftmenu=tax_vat','','ReportByQuarter','companies',2,'','$user->rights->tax->charges->lire','$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu==\"tax_vat\"',0,'2016-01-22 17:26:44'),(137081,'auguria',1,'','left','accountancy',134687,NULL,NULL,8,'/accountancy/customer/index.php?leftmenu=ventil_customer','','CustomersVentilation','accountancy',0,'ventil_customer','$user->rights->accounting->ventilation->read','$conf->accounting->enabled',0,'2016-01-22 17:26:44'),(137082,'auguria',1,'','left','accountancy',137081,NULL,NULL,0,'/accountancy/customer/list.php','','ToDispatch','accountancy',1,'','$user->rights->accounting->ventilation->dispatch','$conf->accounting->enabled && $leftmenu==\"ventil_customer\"',0,'2016-01-22 17:26:44'),(137083,'auguria',1,'','left','accountancy',137081,NULL,NULL,1,'/accountancy/customer/lines.php','','Dispatched','accountancy',1,'','$user->rights->accounting->ventilation->read','$conf->accounting->enabled && $leftmenu==\"ventil_customer\"',0,'2016-01-22 17:26:44'),(137091,'auguria',1,'','left','accountancy',134687,NULL,NULL,9,'/accountancy/supplier/index.php?leftmenu=ventil_supplier','','SuppliersVentilation','accountancy',0,'ventil_supplier','$user->rights->accounting->ventilation->read','$conf->accounting->enabled && $conf->fournisseur->enabled',0,'2016-01-22 17:26:44'),(137092,'auguria',1,'','left','accountancy',137091,NULL,NULL,0,'/accountancy/supplier/list.php','','ToDispatch','accountancy',1,'','$user->rights->accounting->ventilation->dispatch','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"ventil_supplier\"',0,'2016-01-22 17:26:44'),(137093,'auguria',1,'','left','accountancy',137091,NULL,NULL,1,'/accountancy/supplier/lines.php','','Dispatched','accountancy',1,'','$user->rights->accounting->ventilation->read','$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu==\"ventil_supplier\"',0,'2016-01-22 17:26:44'),(137181,'auguria',1,'','left','accountancy',134695,NULL,NULL,9,'/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank','','StandingOrders','withdrawals',0,'withdraw','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled',2,'2016-01-22 17:26:44'),(137183,'auguria',1,'','left','accountancy',137181,NULL,NULL,0,'/compta/prelevement/create.php?leftmenu=withdraw','','NewStandingOrder','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2016-01-22 17:26:44'),(137184,'auguria',1,'','left','accountancy',137181,NULL,NULL,2,'/compta/prelevement/bons.php?leftmenu=withdraw','','WithdrawalsReceipts','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2016-01-22 17:26:44'),(137185,'auguria',1,'','left','accountancy',137181,NULL,NULL,3,'/compta/prelevement/list.php?leftmenu=withdraw','','WithdrawalsLines','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2016-01-22 17:26:44'),(137187,'auguria',1,'','left','accountancy',137181,NULL,NULL,5,'/compta/prelevement/rejets.php?leftmenu=withdraw','','Rejects','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2016-01-22 17:26:44'),(137188,'auguria',1,'','left','accountancy',137181,NULL,NULL,6,'/compta/prelevement/stats.php?leftmenu=withdraw','','Statistics','withdrawals',1,'','$user->rights->prelevement->bons->lire','$conf->prelevement->enabled && $leftmenu==\"withdraw\"',2,'2016-01-22 17:26:44'),(137281,'auguria',1,'','left','accountancy',134695,NULL,NULL,1,'/compta/bank/index.php?leftmenu=bank&mainmenu=bank','','MenuBankCash','banks',0,'bank','$user->rights->banque->lire','$conf->banque->enabled',0,'2016-01-22 17:26:44'),(137282,'auguria',1,'','left','accountancy',137281,NULL,NULL,0,'/compta/bank/card.php?action=create&leftmenu=bank','','MenuNewFinancialAccount','banks',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2016-01-22 17:26:44'),(137283,'auguria',1,'','left','accountancy',137281,NULL,NULL,1,'/compta/bank/categ.php?leftmenu=bank','','Rubriques','categories',1,'','$user->rights->banque->configurer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2016-01-22 17:26:44'),(137284,'auguria',1,'','left','accountancy',137281,NULL,NULL,2,'/compta/bank/search.php?leftmenu=bank','','ListTransactions','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2016-01-22 17:26:44'),(137285,'auguria',1,'','left','accountancy',137281,NULL,NULL,3,'/compta/bank/budget.php?leftmenu=bank','','ListTransactionsByCategory','banks',1,'','$user->rights->banque->lire','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2016-01-22 17:26:44'),(137287,'auguria',1,'','left','accountancy',137281,NULL,NULL,5,'/compta/bank/virement.php?leftmenu=bank','','BankTransfers','banks',1,'','$user->rights->banque->transfer','$conf->banque->enabled && ($leftmenu==\"bank\" || $leftmenu==\"checks\" || $leftmenu==\"withdraw\")',0,'2016-01-22 17:26:44'),(137381,'auguria',1,'','left','accountancy',134687,NULL,NULL,11,'/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy','','Reportings','main',0,'ca','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled',0,'2016-01-22 17:26:44'),(137382,'auguria',1,'','left','accountancy',137381,NULL,NULL,0,'/compta/resultat/index.php?leftmenu=ca','','ReportInOut','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu==\"ca\"',0,'2016-01-22 17:26:44'),(137383,'auguria',1,'','left','accountancy',137382,NULL,NULL,0,'/compta/resultat/clientfourn.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu==\"ca\"',0,'2016-01-22 17:26:44'),(137384,'auguria',1,'','left','accountancy',137381,NULL,NULL,1,'/compta/stats/index.php?leftmenu=ca','','ReportTurnover','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu==\"ca\"',0,'2016-01-22 17:26:44'),(137385,'auguria',1,'','left','accountancy',137384,NULL,NULL,0,'/compta/stats/casoc.php?leftmenu=ca','','ByCompanies','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu==\"ca\"',0,'2016-01-22 17:26:44'),(137386,'auguria',1,'','left','accountancy',137384,NULL,NULL,1,'/compta/stats/cabyuser.php?leftmenu=ca','','ByUsers','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu==\"ca\"',0,'2016-01-22 17:26:44'),(137387,'auguria',1,'','left','accountancy',137381,NULL,NULL,1,'/compta/journal/sellsjournal.php?leftmenu=ca','','SellsJournal','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2016-01-22 17:26:44'),(137388,'auguria',1,'','left','accountancy',137381,NULL,NULL,1,'/compta/journal/purchasesjournal.php?leftmenu=ca','','PurchasesJournal','main',1,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled && $leftmenu==\"ca\"',0,'2016-01-22 17:26:44'),(137389,'auguria',1,'','left','accountancy',137384,NULL,NULL,1,'/compta/stats/cabyprodserv.php?leftmenu=ca','','ByProductsAndServices','main',2,'','$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire','$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu==\"ca\"',0,'2016-01-22 17:26:44'),(137401,'auguria',1,'','left','accountancy',134687,NULL,NULL,12,'/accountancy/bookkeeping/list.php?leftmenu=bookkeeping','','Bookkeeping','accountancy',0,'bookkeeping','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled',0,'2016-01-22 17:26:44'),(137402,'auguria',1,'','left','accountancy',137401,NULL,NULL,0,'/accountancy/bookkeeping/listbyyear.php','','ByYear','accountancy',1,'','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled && $leftmenu==\"bookkeeping\"',0,'2016-01-22 17:26:44'),(137403,'auguria',1,'','left','accountancy',137401,NULL,NULL,1,'/accountancy/bookkeeping/balancebymonth.php','','AccountBalanceByMonth','accountancy',1,'','$user->rights->accounting->mouvements->lire','$conf->accounting->enabled && $leftmenu==\"bookkeeping\"',0,'2016-01-22 17:26:44'),(137431,'auguria',1,'','left','home',134687,NULL,NULL,20,'/accountancy/admin/fiscalyear.php?leftmenu=setup','','Fiscalyear','accountancy',1,'','$user->rights->accounting->fiscalyear','$conf->accounting->enabled',2,'2016-01-22 17:26:44'),(137432,'auguria',1,'','left','home',134687,NULL,NULL,21,'/accountancy/admin/account.php?mainmenu=accountancy','','Chartofaccounts','accountancy',1,'','$user->rights->accounting->chartofaccount','$conf->accounting->enabled',2,'2016-01-22 17:26:44'),(137481,'auguria',1,'','left','products',134684,NULL,NULL,0,'/product/index.php?leftmenu=product&type=0','','Products','products',0,'product','$user->rights->produit->lire','$conf->product->enabled',2,'2016-01-22 17:26:44'),(137482,'auguria',1,'','left','products',137481,NULL,NULL,0,'/product/card.php?leftmenu=product&action=create&type=0','','NewProduct','products',1,'','$user->rights->produit->creer','$conf->product->enabled',2,'2016-01-22 17:26:44'),(137483,'auguria',1,'','left','products',137481,NULL,NULL,1,'/product/list.php?leftmenu=product&type=0','','List','products',1,'','$user->rights->produit->lire','$conf->product->enabled',2,'2016-01-22 17:26:44'),(137484,'auguria',1,'','left','products',137481,NULL,NULL,4,'/product/reassort.php?type=0','','Stocks','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->product->enabled',2,'2016-01-22 17:26:44'),(137485,'auguria',1,'','left','products',137481,NULL,NULL,6,'/product/popuprop.php?leftmenu=stats&type=0','','Statistics','main',1,'','$user->rights->produit->lire','$conf->propal->enabled',2,'2016-01-22 17:26:44'),(137486,'auguria',1,'','left','products',137481,NULL,NULL,5,'/product/reassortlot.php?type=0','','StocksByLotSerial','products',1,'','$user->rights->produit->lire && $user->rights->stock->lire','$conf->productbatch->enabled',2,'2016-01-22 17:26:44'),(137581,'auguria',1,'','left','products',134684,NULL,NULL,1,'/product/index.php?leftmenu=service&type=1','','Services','products',0,'service','$user->rights->service->lire','$conf->service->enabled',2,'2016-01-22 17:26:44'),(137582,'auguria',1,'','left','products',137581,NULL,NULL,0,'/product/card.php?leftmenu=service&action=create&type=1','','NewService','products',1,'','$user->rights->service->creer','$conf->service->enabled',2,'2016-01-22 17:26:44'),(137583,'auguria',1,'','left','products',137581,NULL,NULL,1,'/product/list.php?leftmenu=service&type=1','','List','products',1,'','$user->rights->service->lire','$conf->service->enabled',2,'2016-01-22 17:26:44'),(137584,'auguria',1,'','left','products',137581,NULL,NULL,5,'/product/popuprop.php?leftmenu=stats&type=1','','Statistics','main',1,'','$user->rights->service->lire','$conf->propal->enabled',2,'2016-01-22 17:26:44'),(137781,'auguria',1,'','left','products',134684,NULL,NULL,3,'/product/stock/index.php?leftmenu=stock','','Stock','stocks',0,'stock','$user->rights->stock->lire','$conf->stock->enabled',2,'2016-01-22 17:26:44'),(137782,'auguria',1,'','left','products',137781,NULL,NULL,0,'/product/stock/card.php?action=create','','MenuNewWarehouse','stocks',1,'','$user->rights->stock->creer','$conf->stock->enabled',2,'2016-01-22 17:26:44'),(137783,'auguria',1,'','left','products',137781,NULL,NULL,1,'/product/stock/list.php','','List','stocks',1,'','$user->rights->stock->lire','$conf->stock->enabled',2,'2016-01-22 17:26:44'),(137785,'auguria',1,'','left','products',137781,NULL,NULL,3,'/product/stock/mouvement.php','','Movements','stocks',1,'','$user->rights->stock->mouvement->lire','$conf->stock->enabled',2,'2016-01-22 17:26:44'),(137786,'auguria',1,'','left','products',137781,NULL,NULL,4,'/product/stock/replenish.php','','Replenishments','stocks',1,'','$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire','$conf->stock->enabled && $conf->fournisseur->enabled',2,'2016-01-22 17:26:44'),(137787,'auguria',1,'','left','products',137781,NULL,NULL,5,'/product/stock/massstockmove.php','','StockTransfer','stocks',1,'','$user->rights->stock->mouvement->creer','$conf->stock->enabled',2,'2016-01-22 17:26:44'),(137881,'auguria',1,'','left','products',134684,NULL,NULL,4,'/categories/index.php?leftmenu=cat&type=0','','Categories','categories',0,'cat','$user->rights->categorie->lire','$conf->categorie->enabled',2,'2016-01-22 17:26:44'),(137882,'auguria',1,'','left','products',137881,NULL,NULL,0,'/categories/card.php?action=create&type=0','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->categorie->enabled',2,'2016-01-22 17:26:44'),(138281,'auguria',1,'','left','project',134688,NULL,NULL,0,'/projet/index.php?leftmenu=projects','','Projects','projects',0,'projects','$user->rights->projet->lire','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138282,'auguria',1,'','left','project',138281,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138283,'auguria',1,'','left','project',138281,NULL,NULL,2,'/projet/list.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138291,'auguria',1,'','left','project',134688,NULL,NULL,0,'/projet/index.php?leftmenu=projects&mode=mine','','MyProjects','projects',0,'myprojects','$user->rights->projet->lire','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138292,'auguria',1,'','left','project',138291,NULL,NULL,1,'/projet/card.php?leftmenu=projects&action=create&mode=mine','','NewProject','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138293,'auguria',1,'','left','project',138291,NULL,NULL,2,'/projet/list.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138381,'auguria',1,'','left','project',134688,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects','','Activities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138382,'auguria',1,'','left','project',138381,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138383,'auguria',1,'','left','project',138381,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138384,'auguria',1,'','left','project',138381,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138481,'auguria',1,'','left','project',134688,NULL,NULL,0,'/projet/activity/index.php?leftmenu=projects&mode=mine','','MyActivities','projects',0,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138482,'auguria',1,'','left','project',138481,NULL,NULL,1,'/projet/tasks.php?leftmenu=projects&action=create&mode=mine','','NewTask','projects',1,'','$user->rights->projet->creer','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138483,'auguria',1,'','left','project',138481,NULL,NULL,2,'/projet/tasks/index.php?leftmenu=projects&mode=mine','','List','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138484,'auguria',1,'','left','project',138481,NULL,NULL,3,'/projet/activity/perweek.php?leftmenu=projects&mode=mine','','NewTimeSpent','projects',1,'','$user->rights->projet->lire','$conf->projet->enabled',2,'2016-01-22 17:26:44'),(138581,'auguria',1,'','left','tools',134689,NULL,NULL,0,'/comm/mailing/index.php?leftmenu=mailing','','EMailings','mails',0,'mailing','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2016-01-22 17:26:44'),(138582,'auguria',1,'','left','tools',138581,NULL,NULL,0,'/comm/mailing/card.php?leftmenu=mailing&action=create','','NewMailing','mails',1,'','$user->rights->mailing->creer','$conf->mailing->enabled',0,'2016-01-22 17:26:44'),(138583,'auguria',1,'','left','tools',138581,NULL,NULL,1,'/comm/mailing/list.php?leftmenu=mailing','','List','mails',1,'','$user->rights->mailing->lire','$conf->mailing->enabled',0,'2016-01-22 17:26:44'),(138781,'auguria',1,'','left','tools',134689,NULL,NULL,2,'/exports/index.php?leftmenu=export','','FormatedExport','exports',0,'export','$user->rights->export->lire','$conf->export->enabled',2,'2016-01-22 17:26:44'),(138782,'auguria',1,'','left','tools',138781,NULL,NULL,0,'/exports/export.php?leftmenu=export','','NewExport','exports',1,'','$user->rights->export->creer','$conf->export->enabled',2,'2016-01-22 17:26:44'),(138811,'auguria',1,'','left','tools',134689,NULL,NULL,2,'/imports/index.php?leftmenu=import','','FormatedImport','exports',0,'import','$user->rights->import->run','$conf->import->enabled',2,'2016-01-22 17:26:44'),(138812,'auguria',1,'','left','tools',138811,NULL,NULL,0,'/imports/import.php?leftmenu=import','','NewImport','exports',1,'','$user->rights->import->run','$conf->import->enabled',2,'2016-01-22 17:26:44'),(138881,'auguria',1,'','left','members',134694,NULL,NULL,0,'/adherents/index.php?leftmenu=members&mainmenu=members','','Members','members',0,'members','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(138882,'auguria',1,'','left','members',138881,NULL,NULL,0,'/adherents/card.php?leftmenu=members&action=create','','NewMember','members',1,'','$user->rights->adherent->creer','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(138883,'auguria',1,'','left','members',138881,NULL,NULL,1,'/adherents/list.php','','List','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(138884,'auguria',1,'','left','members',138883,NULL,NULL,2,'/adherents/list.php?leftmenu=members&statut=-1','','MenuMembersToValidate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(138885,'auguria',1,'','left','members',138883,NULL,NULL,3,'/adherents/list.php?leftmenu=members&statut=1','','MenuMembersValidated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(138886,'auguria',1,'','left','members',138883,NULL,NULL,4,'/adherents/list.php?leftmenu=members&statut=1&filter=outofdate','','MenuMembersNotUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(138887,'auguria',1,'','left','members',138883,NULL,NULL,5,'/adherents/list.php?leftmenu=members&statut=1&filter=uptodate','','MenuMembersUpToDate','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(138888,'auguria',1,'','left','members',138883,NULL,NULL,6,'/adherents/list.php?leftmenu=members&statut=0','','MenuMembersResiliated','members',2,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(138889,'auguria',1,'','left','members',138881,NULL,NULL,7,'/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(138981,'auguria',1,'','left','members',134694,NULL,NULL,1,'/adherents/index.php?leftmenu=members&mainmenu=members','','Subscriptions','compta',0,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(138982,'auguria',1,'','left','members',138981,NULL,NULL,0,'/adherents/list.php?statut=-1&leftmenu=accountancy&mainmenu=members','','NewSubscription','compta',1,'','$user->rights->adherent->cotisation->creer','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(138983,'auguria',1,'','left','members',138981,NULL,NULL,1,'/adherents/cotisations.php?leftmenu=members','','List','compta',1,'','$user->rights->adherent->cotisation->lire','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(138984,'auguria',1,'','left','members',138981,NULL,NULL,7,'/adherents/stats/index.php?leftmenu=members','','MenuMembersStats','members',1,'','$user->rights->adherent->lire','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(139181,'auguria',1,'','left','members',134694,NULL,NULL,3,'/adherents/index.php?leftmenu=export&mainmenu=members','','Exports','members',0,'export','$user->rights->adherent->export','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(139182,'auguria',1,'','left','members',139181,NULL,NULL,0,'/exports/index.php?leftmenu=export','','Datas','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled && $conf->export->enabled',2,'2016-01-22 17:26:44'),(139183,'auguria',1,'','left','members',139181,NULL,NULL,1,'/adherents/htpasswd.php?leftmenu=export','','Filehtpasswd','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(139184,'auguria',1,'','left','members',139181,NULL,NULL,2,'/adherents/cartes/carte.php?leftmenu=export','','MembersCards','members',1,'','$user->rights->adherent->export','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(139381,'auguria',1,'','left','members',134694,NULL,NULL,5,'/adherents/type.php?leftmenu=setup&mainmenu=members','','MembersTypes','members',0,'setup','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(139382,'auguria',1,'','left','members',139381,NULL,NULL,0,'/adherents/type.php?leftmenu=setup&mainmenu=members&action=create','','New','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(139383,'auguria',1,'','left','members',139381,NULL,NULL,1,'/adherents/type.php?leftmenu=setup&mainmenu=members','','List','members',1,'','$user->rights->adherent->configurer','$conf->adherent->enabled',2,'2016-01-22 17:26:44'),(139681,'auguria',1,'','left','hrm',134696,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','CPTitreMenu','holiday',0,'hrm','$user->rights->holiday->read','$conf->holiday->enabled',0,'2016-01-22 17:26:44'),(139682,'auguria',1,'','left','hrm',139681,NULL,NULL,1,'/holiday/card.php?&action=request','','MenuAddCP','holiday',1,'','$user->rights->holiday->write','$conf->holiday->enabled',0,'2016-01-22 17:26:44'),(139683,'auguria',1,'','left','hrm',139681,NULL,NULL,1,'/holiday/list.php?&leftmenu=hrm','','List','holiday',1,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2016-01-22 17:26:44'),(139684,'auguria',1,'','left','hrm',139683,NULL,NULL,1,'/holiday/list.php?select_statut=2&leftmenu=hrm','','ListToApprove','trips',2,'','$user->rights->holiday->read','$conf->holiday->enabled',0,'2016-01-22 17:26:44'),(139685,'auguria',1,'','left','hrm',139681,NULL,NULL,2,'/holiday/define_holiday.php?&action=request','','MenuConfCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2016-01-22 17:26:44'),(139686,'auguria',1,'','left','hrm',139681,NULL,NULL,3,'/holiday/view_log.php?&action=request','','MenuLogCP','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2016-01-22 17:26:44'),(139687,'auguria',1,'','left','hrm',139681,NULL,NULL,4,'/holiday/month_report.php?&action=request','','MenuReportMonth','holiday',1,'','$user->rights->holiday->define_holiday','$conf->holiday->enabled',0,'2016-01-22 17:26:44'),(139781,'auguria',1,'','left','commercial',134686,NULL,NULL,6,'/fourn/commande/index.php?leftmenu=orders_suppliers','','SuppliersOrders','orders',0,'orders_suppliers','$user->rights->fournisseur->commande->lire','$conf->fournisseur->enabled',2,'2016-01-22 17:26:44'),(139782,'auguria',1,'','left','commercial',139781,NULL,NULL,0,'/fourn/commande/card.php?action=create&leftmenu=orders_suppliers','','NewOrder','orders',1,'','$user->rights->fournisseur->commande->creer','$conf->fournisseur->enabled',2,'2016-01-22 17:26:44'),(139783,'auguria',1,'','left','commercial',139781,NULL,NULL,1,'/fourn/commande/list.php?leftmenu=orders_suppliers&viewstatut=0','','List','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->fournisseur->enabled',2,'2016-01-22 17:26:44'),(139789,'auguria',1,'','left','commercial',139781,NULL,NULL,7,'/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier','','Statistics','orders',1,'','$user->rights->fournisseur->commande->lire','$conf->fournisseur->enabled',2,'2016-01-22 17:26:44'),(139881,'auguria',1,'','left','members',134694,NULL,NULL,3,'/categories/index.php?leftmenu=cat&type=3','','MembersCategoriesShort','categories',0,'cat','$user->rights->categorie->lire','$conf->adherent->enabled && $conf->categorie->enabled',2,'2016-01-22 17:26:44'),(139882,'auguria',1,'','left','members',139881,NULL,NULL,0,'/categories/card.php?action=create&type=3','','NewCategory','categories',1,'','$user->rights->categorie->creer','$conf->adherent->enabled && $conf->categorie->enabled',2,'2016-01-22 17:26:44'); /*!40000 ALTER TABLE `llx_menu` ENABLE KEYS */; UNLOCK TABLES; @@ -5661,42 +5311,6 @@ INSERT INTO `llx_milestone` VALUES (2,779,'facture','azerty',NULL,0,'2013-03-09 /*!40000 ALTER TABLE `llx_milestone` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_monitoring_probes` --- - -DROP TABLE IF EXISTS `llx_monitoring_probes`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_monitoring_probes` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `title` varchar(64) NOT NULL, - `groupname` varchar(64) DEFAULT NULL, - `url` varchar(250) NOT NULL, - `useproxy` int(11) DEFAULT '0', - `checkkey` varchar(250) DEFAULT NULL, - `maxval` int(11) DEFAULT NULL, - `frequency` int(11) DEFAULT '60', - `active` int(11) DEFAULT '1', - `status` int(11) DEFAULT '0', - `lastreset` datetime DEFAULT NULL, - `oldesterrortext` text, - `oldesterrordate` datetime DEFAULT NULL, - PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_monitoring_probes` (`title`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_monitoring_probes` --- - -LOCK TABLES `llx_monitoring_probes` WRITE; -/*!40000 ALTER TABLE `llx_monitoring_probes` DISABLE KEYS */; -INSERT INTO `llx_monitoring_probes` VALUES (1,'aaa',NULL,'http://www.chiensderace.com',0,'chiens',1000,10,1,1,'2011-04-20 23:46:41',NULL,NULL),(2,'ChatsDeRace',NULL,'http://www.chatsderace.com',0,'chats',1000,5,1,1,'2011-04-20 23:46:41',NULL,NULL); -/*!40000 ALTER TABLE `llx_monitoring_probes` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_notify` -- @@ -5823,7 +5437,7 @@ CREATE TABLE `llx_opensurvey_sondage` ( LOCK TABLES `llx_opensurvey_sondage` WRITE; /*!40000 ALTER TABLE `llx_opensurvey_sondage` DISABLE KEYS */; -INSERT INTO `llx_opensurvey_sondage` VALUES ('m4467s2mtk6khmxc','m4467s2mtk6khmxci2ysw682','fdffdshfghfj jhgjgh','aaa@aaa.com','fdfds',0,'fdffds','2013-03-07 00:00:00','D+',1,1,'dolibarr','2015-10-03 08:45:33',1,1,1,NULL); +INSERT INTO `llx_opensurvey_sondage` VALUES ('m4467s2mtk6khmxc','m4467s2mtk6khmxci2ysw682','fdffdshfghfj jhgjgh','aaa@aaa.com','fdfds',0,'fdffds','2013-03-07 00:00:00','D',1,1,'dolibarr','2015-11-04 15:23:21',1,1,1,NULL); /*!40000 ALTER TABLE `llx_opensurvey_sondage` ENABLE KEYS */; UNLOCK TABLES; @@ -5936,7 +5550,7 @@ CREATE TABLE `llx_paiement_facture` ( KEY `idx_paiement_facture_fk_paiement` (`fk_paiement`), CONSTRAINT `fk_paiement_facture_fk_facture` FOREIGN KEY (`fk_facture`) REFERENCES `llx_facture` (`rowid`), CONSTRAINT `fk_paiement_facture_fk_paiement` FOREIGN KEY (`fk_paiement`) REFERENCES `llx_paiement` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -5945,7 +5559,7 @@ CREATE TABLE `llx_paiement_facture` ( LOCK TABLES `llx_paiement_facture` WRITE; /*!40000 ALTER TABLE `llx_paiement_facture` DISABLE KEYS */; -INSERT INTO `llx_paiement_facture` VALUES (2,2,2,20.00000000),(3,3,2,10.00000000),(5,5,5,5.63000000),(6,6,6,5.98000000),(9,8,2,16.10000000),(10,8,8,10.00000000),(11,9,3,15.00000000),(12,9,9,11.96000000),(20,17,11,2.00000000),(21,18,12,-2.00000000),(22,19,10,-1.00000000),(23,19,12,-1.00000000),(24,20,9,1.00000000),(25,20,11,1.00000000),(26,21,12,-2.00000000),(28,23,55,1.00000000),(29,24,161,20.00000000),(30,25,210,10.00000000),(31,26,32,600.00000000),(32,26,148,5.00000000),(36,29,32,500.00000000),(37,30,32,400.00000000),(39,32,213,-400.00000000),(40,33,213,-300.00000000); +INSERT INTO `llx_paiement_facture` VALUES (2,2,2,20.00000000),(3,3,2,10.00000000),(5,5,5,5.63000000),(6,6,6,5.98000000),(9,8,2,16.10000000),(10,8,8,10.00000000),(11,9,3,15.00000000),(12,9,9,11.96000000),(24,20,9,1.00000000),(31,26,32,600.00000000),(36,29,32,500.00000000),(37,30,32,400.00000000); /*!40000 ALTER TABLE `llx_paiement_facture` ENABLE KEYS */; UNLOCK TABLES; @@ -6003,7 +5617,7 @@ CREATE TABLE `llx_paiementfourn` ( `fk_bank` int(11) NOT NULL, `statut` smallint(6) NOT NULL DEFAULT '0', PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6012,6 +5626,7 @@ CREATE TABLE `llx_paiementfourn` ( LOCK TABLES `llx_paiementfourn` WRITE; /*!40000 ALTER TABLE `llx_paiementfourn` DISABLE KEYS */; +INSERT INTO `llx_paiementfourn` VALUES (1,'2016-01-22 17:56:34','2016-01-22 18:56:34','2016-01-22 12:00:00',900,12,4,'','',30,0); /*!40000 ALTER TABLE `llx_paiementfourn` ENABLE KEYS */; UNLOCK TABLES; @@ -6031,7 +5646,7 @@ CREATE TABLE `llx_paiementfourn_facturefourn` ( UNIQUE KEY `uk_paiementfourn_facturefourn` (`fk_paiementfourn`,`fk_facturefourn`), KEY `idx_paiementfourn_facturefourn_fk_facture` (`fk_facturefourn`), KEY `idx_paiementfourn_facturefourn_fk_paiement` (`fk_paiementfourn`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6040,6 +5655,7 @@ CREATE TABLE `llx_paiementfourn_facturefourn` ( LOCK TABLES `llx_paiementfourn_facturefourn` WRITE; /*!40000 ALTER TABLE `llx_paiementfourn_facturefourn` DISABLE KEYS */; +INSERT INTO `llx_paiementfourn_facturefourn` VALUES (1,1,16,900); /*!40000 ALTER TABLE `llx_paiementfourn_facturefourn` ENABLE KEYS */; UNLOCK TABLES; @@ -6189,187 +5805,6 @@ LOCK TABLES `llx_payment_salary` WRITE; /*!40000 ALTER TABLE `llx_payment_salary` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_pos_cash` --- - -DROP TABLE IF EXISTS `llx_pos_cash`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_pos_cash` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', - `code` varchar(3) DEFAULT NULL, - `name` varchar(30) DEFAULT NULL, - `tactil` tinyint(4) NOT NULL DEFAULT '0', - `fk_paycash` int(11) DEFAULT NULL, - `fk_modepaycash` int(11) DEFAULT NULL, - `fk_paybank` int(11) DEFAULT NULL, - `fk_modepaybank` int(11) DEFAULT NULL, - `fk_warehouse` int(11) DEFAULT NULL, - `fk_device` int(11) DEFAULT NULL, - `fk_soc` int(11) DEFAULT NULL, - `is_used` tinyint(4) DEFAULT '0', - `fk_user_u` int(11) DEFAULT NULL, - `fk_user_c` int(11) DEFAULT NULL, - `fk_user_m` int(11) DEFAULT NULL, - `datec` datetime DEFAULT NULL, - `datea` datetime DEFAULT NULL, - `is_closed` tinyint(4) DEFAULT '0', - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_pos_cash` --- - -LOCK TABLES `llx_pos_cash` WRITE; -/*!40000 ALTER TABLE `llx_pos_cash` DISABLE KEYS */; -INSERT INTO `llx_pos_cash` VALUES (1,1,'aaa','aaa',0,3,1,1,1,1,NULL,1,0,0,1,NULL,'2013-01-19 18:18:39','2013-01-19 18:18:39',0); -/*!40000 ALTER TABLE `llx_pos_cash` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_pos_control_cash` --- - -DROP TABLE IF EXISTS `llx_pos_control_cash`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_pos_control_cash` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', - `fk_cash` int(11) DEFAULT NULL, - `fk_user` int(11) DEFAULT NULL, - `date_c` datetime DEFAULT NULL, - `type_control` tinyint(4) DEFAULT '0', - `amount_teor` double(24,8) DEFAULT NULL, - `amount_real` double(24,8) DEFAULT NULL, - `amount_diff` double(24,8) DEFAULT NULL, - `amount_mov_out` double(24,8) DEFAULT NULL, - `amount_mov_int` double(24,8) DEFAULT NULL, - `amount_next_day` double(24,8) DEFAULT NULL, - `comment` text, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_pos_control_cash` --- - -LOCK TABLES `llx_pos_control_cash` WRITE; -/*!40000 ALTER TABLE `llx_pos_control_cash` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_pos_control_cash` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_pos_facture` --- - -DROP TABLE IF EXISTS `llx_pos_facture`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_pos_facture` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_cash` int(11) NOT NULL, - `fk_facture` int(11) NOT NULL, - `fk_control_cash` int(11) DEFAULT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_pos_facture` --- - -LOCK TABLES `llx_pos_facture` WRITE; -/*!40000 ALTER TABLE `llx_pos_facture` DISABLE KEYS */; -INSERT INTO `llx_pos_facture` VALUES (1,1,148,NULL),(2,1,149,NULL),(3,1,150,NULL),(4,1,151,NULL); -/*!40000 ALTER TABLE `llx_pos_facture` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_pos_moviments` --- - -DROP TABLE IF EXISTS `llx_pos_moviments`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_pos_moviments` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) NOT NULL DEFAULT '1', - `fk_cash` int(11) DEFAULT NULL, - `fk_user` int(11) DEFAULT NULL, - `date_m` datetime DEFAULT NULL, - `amount` double(24,8) DEFAULT NULL, - `type` tinyint(4) DEFAULT NULL, - `comment` text, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_pos_moviments` --- - -LOCK TABLES `llx_pos_moviments` WRITE; -/*!40000 ALTER TABLE `llx_pos_moviments` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_pos_moviments` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_pos_ticketdet` --- - -DROP TABLE IF EXISTS `llx_pos_ticketdet`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_pos_ticketdet` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `fk_ticket` int(11) NOT NULL, - `fk_parent_line` int(11) DEFAULT NULL, - `fk_product` int(11) DEFAULT NULL, - `description` text, - `tva_tx` double(6,3) DEFAULT NULL, - `localtax1_tx` double(6,3) DEFAULT '0.000', - `localtax2_tx` double(6,3) DEFAULT '0.000', - `qty` double DEFAULT NULL, - `remise_percent` double DEFAULT '0', - `remise` double DEFAULT '0', - `fk_remise_except` int(11) DEFAULT NULL, - `subprice` double(24,8) DEFAULT NULL, - `price` double(24,8) DEFAULT NULL, - `total_ht` double(24,8) DEFAULT NULL, - `total_tva` double(24,8) DEFAULT NULL, - `total_localtax1` double(24,8) DEFAULT '0.00000000', - `total_localtax2` double(24,8) DEFAULT '0.00000000', - `total_ttc` double(24,8) DEFAULT NULL, - `product_type` int(11) DEFAULT '0', - `date_start` datetime DEFAULT NULL, - `date_end` datetime DEFAULT NULL, - `info_bits` int(11) DEFAULT '0', - `fk_code_ventilation` int(11) NOT NULL DEFAULT '0', - `fk_export_compta` int(11) NOT NULL DEFAULT '0', - `rang` int(11) DEFAULT '0', - `import_key` varchar(14) DEFAULT NULL, - PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_fk_remise_except` (`fk_remise_except`,`fk_ticket`), - KEY `idx_ticketdet_fk_ticket` (`fk_ticket`), - KEY `idx_ticketdet_fk_product` (`fk_product`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_pos_ticketdet` --- - -LOCK TABLES `llx_pos_ticketdet` WRITE; -/*!40000 ALTER TABLE `llx_pos_ticketdet` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_pos_ticketdet` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_prelevement_bons` -- @@ -6528,36 +5963,6 @@ LOCK TABLES `llx_prelevement_rejet` WRITE; /*!40000 ALTER TABLE `llx_prelevement_rejet` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_printer_ipp` --- - -DROP TABLE IF EXISTS `llx_printer_ipp`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_printer_ipp` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `datec` datetime DEFAULT NULL, - `printer_name` text NOT NULL, - `printer_location` text NOT NULL, - `printer_uri` varchar(256) NOT NULL, - `copy` int(11) NOT NULL DEFAULT '1', - `module` varchar(16) NOT NULL, - `login` varchar(32) NOT NULL, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_printer_ipp` --- - -LOCK TABLES `llx_printer_ipp` WRITE; -/*!40000 ALTER TABLE `llx_printer_ipp` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_printer_ipp` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_printing` -- @@ -6662,6 +6067,7 @@ CREATE TABLE `llx_product` ( KEY `idx_product_fk_user_author` (`fk_user_author`), KEY `idx_product_fk_barcode_type` (`fk_barcode_type`), KEY `fk_product_fk_unit` (`fk_unit`), + KEY `idx_product_seuil_stock_alerte` (`seuil_stock_alerte`), CONSTRAINT `fk_product_barcode_type` FOREIGN KEY (`fk_barcode_type`) REFERENCES `llx_c_barcode_type` (`rowid`), CONSTRAINT `fk_product_fk_country` FOREIGN KEY (`fk_country`) REFERENCES `llx_c_country` (`rowid`), CONSTRAINT `fk_product_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) @@ -6674,7 +6080,7 @@ CREATE TABLE `llx_product` ( LOCK TABLES `llx_product` WRITE; /*!40000 ALTER TABLE `llx_product` DISABLE KEYS */; -INSERT INTO `llx_product` VALUES (1,'2010-07-08 14:33:17','2014-12-21 12:51:04',0,0,'PIDRESS',1,NULL,'Pink dress','A beatifull pink dress','',NULL,NULL,100.00000000,112.50000000,90.00000000,101.25000000,'HT',12.500,0,0.000,0.000,1,NULL,1,1,0,0,'',20,NULL,NULL,NULL,'','',NULL,100,0,NULL,0,NULL,0,NULL,0,2,0.00000000,NULL,NULL,NULL,1,0,NULL,0,NULL,NULL),(2,'2010-07-09 00:30:01','2014-12-21 12:51:04',0,0,'Product_P1',1,NULL,'Product P1','','','',32,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,NULL,1,1,0,0,'',NULL,NULL,NULL,NULL,'','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,998,0.00000000,NULL,NULL,NULL,0,0,NULL,0,NULL,NULL),(3,'2010-07-09 00:30:25','2014-12-21 12:51:04',0,0,'Service_S1',1,NULL,'Service S1','','',NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,NULL,1,1,0,1,'1m',NULL,NULL,NULL,NULL,'','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,NULL,0,0,NULL,0,NULL,NULL),(4,'2010-07-10 14:44:06','2014-12-21 12:51:04',0,0,'DECAP',1,NULL,'Decapsuleur','','',NULL,NULL,5.00000000,5.62500000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,NULL,1,1,0,0,'',NULL,NULL,NULL,NULL,'','',NULL,2,-3,NULL,0,NULL,0,NULL,0,1001,10.00000000,NULL,NULL,NULL,1,0,NULL,0,NULL,NULL),(5,'2011-07-20 23:11:38','2014-12-21 12:51:04',0,0,'aaaa',1,NULL,'aaaa','cccc','bbbb','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,NULL,1,1,0,0,'',NULL,NULL,NULL,NULL,'','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',1,0,NULL,0,NULL,NULL),(6,'2011-07-29 22:16:44','2014-12-21 12:51:04',0,0,'Copy_of_aaaa',1,NULL,'aaaa','cccc','bbbb','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,NULL,0,1,0,0,'',NULL,NULL,NULL,NULL,'','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',1,0,NULL,0,NULL,NULL),(7,'2011-07-29 22:31:21','2014-12-21 12:51:04',0,0,'Copy_of_Copy_of_aaaa',1,NULL,'aaaa','cccc','bbbb','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,NULL,0,0,0,0,'',NULL,NULL,NULL,NULL,'','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',1,0,NULL,0,NULL,NULL),(8,'2011-07-29 22:46:54','2014-12-21 12:51:04',0,0,'Copy_of_Copy_of_Copy_of_aaaa',1,NULL,'aaaa','cccc','bbbb','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,NULL,0,0,0,0,'',NULL,NULL,NULL,NULL,'','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',1,0,NULL,0,NULL,NULL),(10,'2008-12-31 00:00:00','2014-12-21 12:51:04',0,0,'PR123456',1,NULL,'My product','This is a description example for record','Some note',NULL,NULL,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,0.000,NULL,NULL,0,0,0,0,'1y',0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,NULL,NULL,0,'20110729232310',0,NULL,NULL),(11,'2013-01-13 20:24:42','2014-12-21 12:51:04',0,0,'gh',1,NULL,'hfghf','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,0,0.000,0.000,1,NULL,1,1,0,0,'',NULL,NULL,NULL,NULL,'','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,-1,0.00000000,NULL,NULL,'',1,0,NULL,0,NULL,NULL); +INSERT INTO `llx_product` VALUES (1,'2010-07-08 14:33:17','2016-01-16 16:30:35',0,0,'PINKDRESS',1,NULL,'Pink dress','A beatifull pink dress','','',NULL,100.00000000,112.50000000,90.00000000,101.25000000,'HT',12.500,0,0.000,0.000,1,NULL,1,1,0,0,'',NULL,NULL,'123456789066',2,'701PINKDRESS','601PINKDRESS',NULL,670,-3,NULL,0,NULL,0,NULL,0,2,0.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL),(2,'2010-07-09 00:30:01','2016-01-16 16:37:14',0,0,'PEARPIE',1,NULL,'Pear Pie','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,NULL,1,1,0,0,'',NULL,NULL,'123456789077',2,'','',NULL,NULL,0,NULL,0,NULL,0,NULL,0,998,0.00000000,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL),(3,'2010-07-09 00:30:25','2016-01-16 16:40:03',0,0,'CAKECONTRIB',1,NULL,'Cake making contribution','','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,NULL,1,1,0,1,'1m',NULL,NULL,'123456789088',2,'701CAKEM','601CAKEM',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.00000000,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(4,'2010-07-10 14:44:06','2016-01-16 15:58:20',0,0,'APPLEPIE',1,NULL,'Apple Pie','Nice Bio Apple Pie.
\r\n ','','',NULL,5.00000000,5.62500000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,NULL,1,1,0,0,'',NULL,NULL,'123456789034',2,'701','601',NULL,500,-3,NULL,0,NULL,0,NULL,0,1001,10.00000000,NULL,NULL,NULL,1,0,NULL,NULL,NULL,NULL),(5,'2011-07-20 23:11:38','2016-01-16 16:18:24',0,0,'DOLIDROID',1,NULL,'DoliDroid, Android app for Dolibarr','DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

','','',NULL,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,NULL,1,1,0,0,'',NULL,'https://play.google.com/store/apps/details?id=com.nltechno.dolidroidpro','123456789023',2,'701','601',NULL,NULL,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,'',NULL,0,NULL,NULL,NULL,NULL),(10,'2008-12-31 00:00:00','2016-01-16 16:33:35',0,0,'COMP-XP4523',1,NULL,'Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.','USXP765',11,100.00000000,110.00000000,0.00000000,0.00000000,'HT',10.000,0,0.000,0.000,NULL,NULL,0,0,1,0,'',NULL,NULL,'123456789055',2,'701OLDC','601OLDC',NULL,1.7,0,NULL,0,NULL,0,NULL,0,NULL,0.00000000,NULL,NULL,NULL,NULL,0,'20110729232310',NULL,NULL,NULL),(11,'2013-01-13 20:24:42','2016-01-16 16:37:50',0,0,'ROLLUPABC',1,NULL,'Rollup Dolibarr','A nice rollup','','',NULL,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,0,0.000,0.000,1,NULL,1,1,0,0,'',NULL,NULL,'123456789044',2,'','',NULL,2.5,0,NULL,0,2.34,0,NULL,0,-1,0.00000000,NULL,NULL,'',1,0,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_product` ENABLE KEYS */; UNLOCK TABLES; @@ -6727,6 +6133,7 @@ CREATE TABLE `llx_product_batch` ( PRIMARY KEY (`rowid`), KEY `idx_fk_product_stock` (`fk_product_stock`), KEY `ix_fk_product_stock` (`fk_product_stock`), + KEY `idx_batch` (`batch`), CONSTRAINT `fk_product_batch_fk_product_stock` FOREIGN KEY (`fk_product_stock`) REFERENCES `llx_product_stock` (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -6772,6 +6179,8 @@ CREATE TABLE `llx_product_customer_price` ( KEY `idx_product_customer_price_fk_soc` (`fk_soc`), CONSTRAINT `fk_customer_price_fk_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`) ON DELETE CASCADE, CONSTRAINT `fk_customer_price_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`) ON DELETE CASCADE, + CONSTRAINT `fk_product_customer_price_fk_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`), + CONSTRAINT `fk_product_customer_price_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_product_customer_price_fk_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; @@ -6943,7 +6352,7 @@ CREATE TABLE `llx_product_lang` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_product_lang` (`fk_product`,`lang`), CONSTRAINT `fk_product_lang_fk_product` FOREIGN KEY (`fk_product`) REFERENCES `llx_product` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -6952,7 +6361,7 @@ CREATE TABLE `llx_product_lang` ( LOCK TABLES `llx_product_lang` WRITE; /*!40000 ALTER TABLE `llx_product_lang` DISABLE KEYS */; -INSERT INTO `llx_product_lang` VALUES (1,1,'en_US','Pink dress','A beatifull pink dress',''),(2,2,'en_US','Product P1','',''),(3,3,'en_US','Service S1','',''),(4,4,'fr_FR','Decapsuleur','',''),(5,5,'en_US','aaaa','cccc','bbbb'),(6,6,'en_US','aaaa','cccc','bbbb'),(7,7,'en_US','aaaa','cccc','bbbb'),(8,8,'en_US','aaaa','cccc','bbbb'),(9,11,'fr_FR','hfghf','',''),(10,2,'fr_FR','Product P1','',''); +INSERT INTO `llx_product_lang` VALUES (1,1,'en_US','Pink dress','A beatifull pink dress',''),(2,2,'en_US','Pear Pie','',''),(3,3,'en_US','Cake making contribution','',''),(4,4,'fr_FR','Decapsuleur','',''),(5,5,'en_US','DoliDroid, Android app for Dolibarr','DoliDroid is the Android front-end client for Dolibarr ERP & CRM web software.
\r\nThis application is not a standalone program. It is a front end to use a online hosted Dolibarr ERP & CRM software (an Open-source web software to manage your business).
\r\n

The advantage of DoliDroid are :
\r\n- DoliDroid is not a duplicate code of Dolibarr, but a front-end of a Dolibarr web installation, so all your online existing features are supported by this application. This is also true for external modules features.
\r\n- Upgrading Dolibarr will not break DoliDroid.
\r\n- DoliDroid use embedded image resources to reduce bandwidth usage.
\r\n- DoliDroid use internal cache for pages that should not change (like menu page)
\r\n- Connections parameters are saved. No need to enter them each time you use DoliDroid.
\r\n- Integration with your phone or other applications (Clicking on PDF open PDF reader, clicking onto email or phone launch your email application or launch Android dialer, ...)

\r\n\r\n

WARNING ! 

\r\n\r\n

This application need Android 4.0+ and a hosted Dolibarr ERP & CRM version 3.5 or newer accessible by internet
\r\n(For example, when hosted on any SaaS solution like DoliCloud - http://www.dolicloud.com).

',''),(9,11,'fr_FR','hfghf','',''),(10,2,'fr_FR','Product P1','',''),(11,4,'en_US','Apple Pie','Nice Bio Apple Pie.
\r\n ',''),(12,11,'en_US','Rollup Dolibarr','A nice rollup',''),(13,10,'en_US','Computer XP4523','A powerfull computer XP4523 ','This product is imported.
\r\nWarning: Delay to get it are not reliable.'); /*!40000 ALTER TABLE `llx_product_lang` ENABLE KEYS */; UNLOCK TABLES; @@ -6998,7 +6407,7 @@ CREATE TABLE `llx_product_price` ( LOCK TABLES `llx_product_price` WRITE; /*!40000 ALTER TABLE `llx_product_price` DISABLE KEYS */; -INSERT INTO `llx_product_price` VALUES (1,1,'2010-07-08 12:33:17',1,'2010-07-08 14:33:17',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,0,NULL,NULL),(2,1,'2010-07-08 22:30:01',2,'2010-07-09 00:30:01',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,0,NULL,NULL),(3,1,'2010-07-08 22:30:25',3,'2010-07-09 00:30:25',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,0,NULL,NULL),(4,1,'2010-07-10 12:44:06',4,'2010-07-10 14:44:06',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,0,NULL,NULL),(5,1,'2011-07-20 21:11:38',5,'2011-07-20 23:11:38',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,1,0,NULL,NULL),(6,1,'2011-07-27 17:02:59',5,'2011-07-27 19:02:59',1,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,1,0,NULL,NULL),(7,1,'2011-07-29 20:16:44',6,'2011-07-29 22:16:44',1,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,0,0,NULL,NULL),(8,1,'2011-07-29 20:31:21',7,'2011-07-29 22:31:21',1,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,0,0,NULL,NULL),(9,1,'2011-07-29 20:46:54',8,'2011-07-29 22:46:54',1,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,0,0,NULL,NULL),(10,1,'2011-07-31 22:34:27',4,'2011-08-01 00:34:27',1,5.00000000,5.62500000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,0,NULL,NULL),(12,1,'2013-01-13 19:24:59',11,'2013-01-13 20:24:59',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,0,0.000,0.000,1,1,0,NULL,NULL),(13,1,'2013-03-12 09:30:24',1,'2013-03-12 10:30:24',1,100.00000000,112.50000000,90.00000000,101.25000000,'HT',12.500,0,0.000,0.000,1,1,0,NULL,NULL); +INSERT INTO `llx_product_price` VALUES (1,1,'2010-07-08 12:33:17',1,'2010-07-08 14:33:17',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,0,NULL,NULL),(2,1,'2010-07-08 22:30:01',2,'2010-07-09 00:30:01',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,0,NULL,NULL),(3,1,'2010-07-08 22:30:25',3,'2010-07-09 00:30:25',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,0,NULL,NULL),(4,1,'2010-07-10 12:44:06',4,'2010-07-10 14:44:06',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,0,NULL,NULL),(5,1,'2011-07-20 21:11:38',5,'2011-07-20 23:11:38',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,1,0,NULL,NULL),(6,1,'2011-07-27 17:02:59',5,'2011-07-27 19:02:59',1,10.00000000,11.96000000,0.00000000,0.00000000,'HT',19.600,0,0.000,0.000,1,1,0,NULL,NULL),(10,1,'2011-07-31 22:34:27',4,'2011-08-01 00:34:27',1,5.00000000,5.62500000,0.00000000,0.00000000,'HT',12.500,0,0.000,0.000,1,1,0,NULL,NULL),(12,1,'2013-01-13 19:24:59',11,'2013-01-13 20:24:59',1,0.00000000,0.00000000,0.00000000,0.00000000,'HT',0.000,0,0.000,0.000,1,1,0,NULL,NULL),(13,1,'2013-03-12 09:30:24',1,'2013-03-12 10:30:24',1,100.00000000,112.50000000,90.00000000,101.25000000,'HT',12.500,0,0.000,0.000,1,1,0,NULL,NULL); /*!40000 ALTER TABLE `llx_product_price` ENABLE KEYS */; UNLOCK TABLES; @@ -7133,7 +6542,7 @@ CREATE TABLE `llx_projet` ( LOCK TABLES `llx_projet` WRITE; /*!40000 ALTER TABLE `llx_projet` DISABLE KEYS */; -INSERT INTO `llx_projet` VALUES (1,NULL,'2010-07-09','2014-12-21 13:17:58','2010-07-09',NULL,'PROJ1',1,'Project One','',1,0,1,NULL,NULL,'gdfgdfg','baleine',NULL,NULL,NULL,NULL),(2,NULL,'2010-07-09','2010-07-08 22:49:56','2010-07-09',NULL,'PROJ2',1,'Project Two','',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,1,'2010-07-09','2010-07-08 22:50:19','2010-07-09',NULL,'PROJABC',1,'Project to create ABC company','',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,NULL,'2010-07-09','2010-07-08 22:50:49','2010-07-09',NULL,'PROJSHARED',1,'The Global project','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,NULL,'2010-07-11','2010-07-11 14:22:49','2010-07-11','2011-07-14','RMLL',1,'Projet gestion RMLL 2011','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); +INSERT INTO `llx_projet` VALUES (1,11,'2010-07-09','2015-10-05 20:51:28','2010-07-09',NULL,'PROJ1',1,'Project One','',1,0,1,NULL,NULL,'gdfgdfg','baleine',NULL,NULL,NULL,NULL),(2,13,'2010-07-09','2015-10-05 20:51:51','2010-07-09',NULL,'PROJ2',1,'Project Two','',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,1,'2010-07-09','2016-01-16 15:09:29','2010-07-09',NULL,'PROJINDIAN',1,'Project for Indian company move','',1,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,NULL,'2010-07-09','2010-07-08 22:50:49','2010-07-09',NULL,'PROJSHARED',1,'The Global project','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,NULL,'2010-07-11','2010-07-11 14:22:49','2010-07-11','2011-07-14','RMLL',1,'Projet gestion RMLL 2011','',1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `llx_projet` ENABLE KEYS */; UNLOCK TABLES; @@ -7340,7 +6749,7 @@ CREATE TABLE `llx_propal` ( CONSTRAINT `fk_propal_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_propal_fk_user_cloture` FOREIGN KEY (`fk_user_cloture`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_propal_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7349,7 +6758,7 @@ CREATE TABLE `llx_propal` ( LOCK TABLES `llx_propal` WRITE; /*!40000 ALTER TABLE `llx_propal` DISABLE KEYS */; -INSERT INTO `llx_propal` VALUES (1,2,NULL,'2012-12-08 13:11:07','PR1007-0001',1,NULL,NULL,'','2010-07-09 01:33:49','2010-07-09','2010-07-24 12:00:00','2011-08-08 14:24:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,30.00000000,3.84000000,0.00000000,0.00000000,33.84000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL),(2,1,NULL,'2012-12-08 13:11:07','PR1007-0002',1,NULL,NULL,'','2010-07-10 02:11:44','2010-07-10','2010-07-25 12:00:00','2010-07-10 02:12:55','2011-07-20 15:23:12',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,1,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL),(3,4,NULL,'2012-12-08 13:11:07','PR1007-0003',1,NULL,NULL,'','2010-07-18 11:35:11','2010-07-18','2010-08-02 12:00:00','2010-07-18 11:36:18','2011-07-20 15:21:15',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL),(4,17,NULL,'2012-12-08 13:11:07','PR1108-0004',1,NULL,NULL,'','2011-08-04 23:36:23','2011-08-05','2011-08-20 12:00:00','2011-08-08 14:24:24',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,30.00000000,5.88000000,0.00000000,0.00000000,35.88000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(5,19,NULL,'2013-02-17 14:39:56','PR1302-0005',1,NULL,NULL,'','2013-02-17 15:39:56','2013-02-17','2013-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(6,19,NULL,'2013-02-17 14:40:12','PR1302-0006',1,NULL,NULL,'','2013-02-17 15:40:12','2013-02-17','2013-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(7,19,NULL,'2013-02-17 14:41:15','PR1302-0007',1,NULL,NULL,'','2013-02-17 15:41:15','2013-02-17','2013-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(8,19,NULL,'2013-02-17 14:43:39','PR1302-0008',1,NULL,NULL,'','2013-02-17 15:43:39','2013-02-17','2013-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(9,19,NULL,'2013-02-17 15:22:14','PR1302-0009',1,NULL,NULL,'','2013-02-17 15:53:01','2013-02-17','2013-03-04 12:00:00','2013-02-17 16:22:10','2013-02-17 16:22:14',1,NULL,1,1,2,0,NULL,NULL,0,60.00000000,11.76000000,0.00000000,0.00000000,71.76000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL); +INSERT INTO `llx_propal` VALUES (1,2,NULL,'2012-12-08 13:11:07','PR1007-0001',1,NULL,NULL,'','2010-07-09 01:33:49','2010-07-09','2010-07-24 12:00:00','2011-08-08 14:24:18',NULL,1,NULL,1,NULL,1,0,NULL,NULL,0,30.00000000,3.84000000,0.00000000,0.00000000,33.84000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL),(2,1,NULL,'2012-12-08 13:11:07','PR1007-0002',1,NULL,NULL,'','2010-07-10 02:11:44','2010-07-10','2010-07-25 12:00:00','2010-07-10 02:12:55','2011-07-20 15:23:12',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,1,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL),(3,4,NULL,'2012-12-08 13:11:07','PR1007-0003',1,NULL,NULL,'','2010-07-18 11:35:11','2010-07-18','2010-08-02 12:00:00','2010-07-18 11:36:18','2011-07-20 15:21:15',1,NULL,1,1,2,0,NULL,NULL,0,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL),(5,19,NULL,'2015-11-15 22:27:10','PR1302-0005',1,NULL,NULL,'','2013-02-17 15:39:56','2013-02-17','2013-03-04 12:00:00','2015-11-15 23:27:10',NULL,1,NULL,12,NULL,1,0,NULL,NULL,0,10.00000000,2.00000000,0.00000000,0.00000000,12.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(6,19,NULL,'2013-02-17 14:40:12','PR1302-0006',1,NULL,NULL,'','2013-02-17 15:40:12','2013-02-17','2013-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(7,19,NULL,'2013-02-17 14:41:15','PR1302-0007',1,NULL,NULL,'','2013-02-17 15:41:15','2013-02-17','2013-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(8,19,NULL,'2013-02-17 14:43:39','PR1302-0008',1,NULL,NULL,'','2013-02-17 15:43:39','2013-02-17','2013-03-04 12:00:00',NULL,NULL,1,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,0,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,NULL,NULL),(10,7,NULL,'2015-11-15 22:37:08','(PROV10)',1,NULL,NULL,'','2015-11-15 23:37:08','2015-11-15','2015-11-30 12:00:00',NULL,NULL,12,NULL,NULL,NULL,0,0,NULL,NULL,0,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,NULL,NULL,1,3,'','','azur',NULL,NULL,0,NULL,0,NULL,NULL,0,''); /*!40000 ALTER TABLE `llx_propal` ENABLE KEYS */; UNLOCK TABLES; @@ -7454,7 +6863,7 @@ CREATE TABLE `llx_propaldet` ( KEY `fk_propaldet_fk_unit` (`fk_unit`), CONSTRAINT `fk_propaldet_fk_propal` FOREIGN KEY (`fk_propal`) REFERENCES `llx_propal` (`rowid`), CONSTRAINT `fk_propaldet_fk_unit` FOREIGN KEY (`fk_unit`) REFERENCES `llx_c_units` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7463,7 +6872,7 @@ CREATE TABLE `llx_propaldet` ( LOCK TABLES `llx_propaldet` WRITE; /*!40000 ALTER TABLE `llx_propaldet` DISABLE KEYS */; -INSERT INTO `llx_propaldet` VALUES (1,1,NULL,NULL,NULL,'Une machine à café',NULL,12.500,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,1.25000000,0.00000000,0.00000000,11.25000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL),(2,2,NULL,NULL,NULL,'Product 1',NULL,0.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL),(3,2,NULL,2,NULL,'',NULL,0.000,0.000,'',0.000,'',1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL),(4,3,NULL,NULL,NULL,'A new marvelous product',NULL,0.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL),(5,1,NULL,5,NULL,'cccc',NULL,19.600,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL),(11,1,NULL,4,NULL,'',NULL,0.000,0.000,'',0.000,'',1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL),(12,1,NULL,4,NULL,'',NULL,0.000,0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL),(13,1,NULL,4,NULL,'',NULL,12.500,0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL),(19,4,NULL,NULL,NULL,'bvbcvbcvbcbcbcb',NULL,19.600,0.000,'',0.000,'',1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL),(20,4,NULL,NULL,NULL,'ghjhgjghjgh',NULL,19.600,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL),(21,4,NULL,NULL,NULL,'ghjghjhgjg',NULL,19.600,0.000,'',0.000,'',2,0,0,10,10.00000000,20.00000000,3.92000000,0.00000000,0.00000000,23.92000000,1,NULL,NULL,0,NULL,0.00000000,0,3,NULL),(22,9,NULL,NULL,NULL,'gdfg',NULL,19.600,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,0,0.00000000,0,1,NULL),(23,9,NULL,NULL,NULL,'gfdgd',NULL,19.600,0.000,'',0.000,'',1,0,0,NULL,50.00000000,50.00000000,9.80000000,0.00000000,0.00000000,59.80000000,1,NULL,NULL,0,0,0.00000000,0,2,NULL); +INSERT INTO `llx_propaldet` VALUES (1,1,NULL,NULL,NULL,'Une machine à café',NULL,12.500,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,1.25000000,0.00000000,0.00000000,11.25000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL),(2,2,NULL,NULL,NULL,'Product 1',NULL,0.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL),(3,2,NULL,2,NULL,'',NULL,0.000,0.000,'',0.000,'',1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL),(4,3,NULL,NULL,NULL,'A new marvelous product',NULL,0.000,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,0.00000000,0.00000000,0.00000000,10.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL),(5,1,NULL,5,NULL,'cccc',NULL,19.600,0.000,'',0.000,'',1,0,0,NULL,10.00000000,10.00000000,1.96000000,0.00000000,0.00000000,11.96000000,0,NULL,NULL,0,NULL,0.00000000,0,2,NULL),(11,1,NULL,4,NULL,'',NULL,0.000,0.000,'',0.000,'',1,0,0,NULL,NULL,0.00000000,0.00000000,0.00000000,0.00000000,0.00000000,0,NULL,NULL,0,NULL,0.00000000,0,3,NULL),(12,1,NULL,4,NULL,'',NULL,0.000,0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,0.00000000,0.00000000,0.00000000,5.00000000,0,NULL,NULL,0,NULL,0.00000000,0,4,NULL),(13,1,NULL,4,NULL,'',NULL,12.500,0.000,'',0.000,'',1,0,0,NULL,5.00000000,5.00000000,0.63000000,0.00000000,0.00000000,5.63000000,0,NULL,NULL,0,NULL,0.00000000,0,5,NULL),(24,5,NULL,NULL,NULL,'On demand Apple pie',NULL,20.000,0.000,'0',0.000,'0',1,0,0,NULL,10.00000000,10.00000000,2.00000000,0.00000000,0.00000000,12.00000000,0,NULL,NULL,0,NULL,0.00000000,0,1,NULL); /*!40000 ALTER TABLE `llx_propaldet` ENABLE KEYS */; UNLOCK TABLES; @@ -7493,119 +6902,6 @@ LOCK TABLES `llx_propaldet_extrafields` WRITE; /*!40000 ALTER TABLE `llx_propaldet_extrafields` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_residence` --- - -DROP TABLE IF EXISTS `llx_residence`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_residence` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `entity` int(11) DEFAULT '1', - `ref` varchar(12) NOT NULL, - `label` varchar(30) NOT NULL, - `address` varchar(254) DEFAULT NULL, - `zip` varchar(12) DEFAULT NULL, - `town` varchar(36) DEFAULT NULL, - `fk_country_id` int(11) DEFAULT NULL, - `name_concierge` varchar(64) DEFAULT NULL, - `tel_concierge` varchar(32) DEFAULT NULL, - `hours_concierge` varchar(64) DEFAULT NULL, - `antenne` varchar(64) DEFAULT NULL, - `attestation` int(11) DEFAULT NULL, - `latitude` float DEFAULT NULL, - `longitude` float DEFAULT NULL, - `date_creation` datetime DEFAULT NULL, - `fk_user_creation` int(11) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `fk_user_modification` int(11) DEFAULT NULL, - `note_private` text, - `note_public` text, - `fk_thirdparty` int(11) DEFAULT NULL, - PRIMARY KEY (`rowid`), - UNIQUE KEY `idx_residence_ref` (`ref`), - KEY `idx_residence_label` (`label`), - KEY `idx_residence_zip` (`zip`), - KEY `idx_residence_town` (`town`), - KEY `fk_residence_thirdparty` (`fk_thirdparty`), - KEY `fk_country_id` (`fk_country_id`), - CONSTRAINT `fk_country_id` FOREIGN KEY (`fk_country_id`) REFERENCES `llx_c_country` (`rowid`), - CONSTRAINT `fk_residence_thirdparty` FOREIGN KEY (`fk_thirdparty`) REFERENCES `llx_societe` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_residence` --- - -LOCK TABLES `llx_residence` WRITE; -/*!40000 ALTER TABLE `llx_residence` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_residence` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_residence_building` --- - -DROP TABLE IF EXISTS `llx_residence_building`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_residence_building` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `ref` varchar(20) NOT NULL, - `label` varchar(30) NOT NULL, - `access_code` varchar(16) DEFAULT NULL, - `date_creation` datetime DEFAULT NULL, - `fk_user_creation` int(11) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `fk_user_modification` int(11) DEFAULT NULL, - `note_private` text, - `note_public` text, - `fk_residence` int(11) DEFAULT NULL, - PRIMARY KEY (`rowid`), - KEY `idx_residence_building_fk_residence` (`fk_residence`), - CONSTRAINT `fk_residence_building_residence` FOREIGN KEY (`fk_residence`) REFERENCES `llx_residence` (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_residence_building` --- - -LOCK TABLES `llx_residence_building` WRITE; -/*!40000 ALTER TABLE `llx_residence_building` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_residence_building` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `llx_residence_building_links` --- - -DROP TABLE IF EXISTS `llx_residence_building_links`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_residence_building_links` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `residenceid` int(11) DEFAULT NULL, - `buildingid` int(11) DEFAULT NULL, - `parentid` int(11) DEFAULT NULL, - `parenttype` varchar(16) DEFAULT NULL, - PRIMARY KEY (`rowid`), - UNIQUE KEY `uk_residence_building_1` (`parentid`,`parenttype`,`residenceid`), - UNIQUE KEY `uk_residence_building_2` (`parentid`,`parenttype`,`buildingid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_residence_building_links` --- - -LOCK TABLES `llx_residence_building_links` WRITE; -/*!40000 ALTER TABLE `llx_residence_building_links` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_residence_building_links` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_resource` -- @@ -7662,7 +6958,7 @@ CREATE TABLE `llx_rights_def` ( LOCK TABLES `llx_rights_def` WRITE; /*!40000 ALTER TABLE `llx_rights_def` DISABLE KEYS */; -INSERT INTO `llx_rights_def` VALUES (11,'Lire les factures','facture',1,'lire',NULL,'a',1),(11,'Lire les factures','facture',2,'lire',NULL,'a',1),(12,'Creer/modifier les factures','facture',1,'creer',NULL,'a',0),(12,'Creer/modifier les factures','facture',2,'creer',NULL,'a',0),(13,'Dévalider les factures','facture',1,'invoice_advance','unvalidate','a',0),(13,'Dévalider les factures','facture',2,'invoice_advance','unvalidate','a',0),(14,'Valider les factures','facture',1,'invoice_advance','validate','a',0),(14,'Valider les factures','facture',2,'valider',NULL,'a',0),(15,'Envoyer les factures par mail','facture',1,'invoice_advance','send','a',0),(15,'Envoyer les factures par mail','facture',2,'invoice_advance','send','a',0),(16,'Emettre des paiements sur les factures','facture',1,'paiement',NULL,'a',0),(16,'Emettre des paiements sur les factures','facture',2,'paiement',NULL,'a',0),(19,'Supprimer les factures','facture',1,'supprimer',NULL,'a',0),(19,'Supprimer les factures','facture',2,'supprimer',NULL,'a',0),(21,'Lire les propositions commerciales','propale',1,'lire',NULL,'r',1),(21,'Lire les propositions commerciales','propale',2,'lire',NULL,'r',1),(22,'Creer/modifier les propositions commerciales','propale',1,'creer',NULL,'w',0),(22,'Creer/modifier les propositions commerciales','propale',2,'creer',NULL,'w',0),(24,'Valider les propositions commerciales','propale',1,'valider',NULL,'d',0),(24,'Valider les propositions commerciales','propale',2,'valider',NULL,'d',0),(25,'Envoyer les propositions commerciales aux clients','propale',1,'propal_advance','send','d',0),(25,'Envoyer les propositions commerciales aux clients','propale',2,'propal_advance','send','d',0),(26,'Cloturer les propositions commerciales','propale',1,'cloturer',NULL,'d',0),(26,'Cloturer les propositions commerciales','propale',2,'cloturer',NULL,'d',0),(27,'Supprimer les propositions commerciales','propale',1,'supprimer',NULL,'d',0),(27,'Supprimer les propositions commerciales','propale',2,'supprimer',NULL,'d',0),(28,'Exporter les propositions commerciales et attributs','propale',1,'export',NULL,'r',0),(28,'Exporter les propositions commerciales et attributs','propale',2,'export',NULL,'r',0),(31,'Lire les produits','produit',1,'lire',NULL,'r',1),(31,'Lire les produits','produit',2,'lire',NULL,'r',1),(32,'Creer/modifier les produits','produit',1,'creer',NULL,'w',0),(32,'Creer/modifier les produits','produit',2,'creer',NULL,'w',0),(34,'Supprimer les produits','produit',1,'supprimer',NULL,'d',0),(34,'Supprimer les produits','produit',2,'supprimer',NULL,'d',0),(38,'Exporter les produits','produit',1,'export',NULL,'r',0),(38,'Exporter les produits','produit',2,'export',NULL,'r',0),(41,'Lire les projets et taches (partagés ou dont je suis contact)','projet',1,'lire',NULL,'r',1),(42,'Creer/modifier les projets et taches (partagés ou dont je suis contact)','projet',1,'creer',NULL,'w',0),(44,'Supprimer les projets et taches (partagés ou dont je suis contact)','projet',1,'supprimer',NULL,'d',0),(45,'Exporter les projets','projet',1,'export',NULL,'d',0),(61,'Lire les fiches d\'intervention','ficheinter',1,'lire',NULL,'r',1),(62,'Creer/modifier les fiches d\'intervention','ficheinter',1,'creer',NULL,'w',0),(64,'Supprimer les fiches d\'intervention','ficheinter',1,'supprimer',NULL,'d',0),(67,'Exporter les fiches interventions','ficheinter',1,'export',NULL,'r',0),(68,'Envoyer les fiches d\'intervention par courriel','ficheinter',1,'ficheinter_advance','send','r',0),(71,'Read members\' card','adherent',1,'lire',NULL,'r',1),(72,'Create/modify members (need also user module permissions if member linked to a user)','adherent',1,'creer',NULL,'w',1),(74,'Remove members','adherent',1,'supprimer',NULL,'d',1),(75,'Setup types and attributes of members','adherent',1,'configurer',NULL,'w',1),(76,'Export members','adherent',1,'export',NULL,'r',0),(78,'Read subscriptions','adherent',1,'cotisation','lire','r',1),(79,'Create/modify/remove subscriptions','adherent',1,'cotisation','creer','w',1),(81,'Lire les commandes clients','commande',1,'lire',NULL,'r',1),(82,'Creer/modifier les commandes clients','commande',1,'creer',NULL,'w',0),(84,'Valider les commandes clients','commande',1,'order_advance','validate','d',0),(86,'Envoyer les commandes clients','commande',1,'order_advance','send','d',0),(87,'Cloturer les commandes clients','commande',1,'cloturer',NULL,'d',0),(88,'Annuler les commandes clients','commande',1,'order_advance','annuler','d',0),(89,'Supprimer les commandes clients','commande',1,'supprimer',NULL,'d',0),(91,'Lire les charges','tax',1,'charges','lire','r',1),(91,'Lire les charges','tax',2,'charges','lire','r',1),(92,'Creer/modifier les charges','tax',1,'charges','creer','w',0),(92,'Creer/modifier les charges','tax',2,'charges','creer','w',0),(93,'Supprimer les charges','tax',1,'charges','supprimer','d',0),(93,'Supprimer les charges','tax',2,'charges','supprimer','d',0),(94,'Exporter les charges','tax',1,'charges','export','r',0),(94,'Exporter les charges','tax',2,'charges','export','r',0),(95,'Lire CA, bilans, resultats','compta',1,'resultat','lire','r',1),(96,'Parametrer la ventilation','compta',1,'ventilation','parametrer','r',0),(97,'Lire les ventilations de factures','compta',1,'ventilation','lire','r',1),(98,'Ventiler les lignes de factures','compta',1,'ventilation','creer','r',0),(101,'Lire les expeditions','expedition',1,'lire',NULL,'r',1),(102,'Creer modifier les expeditions','expedition',1,'creer',NULL,'w',0),(104,'Valider les expeditions','expedition',1,'valider',NULL,'d',0),(105,'Envoyer les expeditions aux clients','expedition',1,'shipping_advance','send','d',0),(106,'Exporter les expeditions','expedition',1,'shipment','export','r',0),(109,'Supprimer les expeditions','expedition',1,'supprimer',NULL,'d',0),(111,'Lire les comptes bancaires','banque',1,'lire',NULL,'r',1),(111,'Lire les comptes bancaires','banque',2,'lire',NULL,'r',1),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',1,'modifier',NULL,'w',0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',2,'modifier',NULL,'w',0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',1,'configurer',NULL,'a',0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',2,'configurer',NULL,'a',0),(114,'Rapprocher les ecritures bancaires','banque',1,'consolidate',NULL,'w',0),(114,'Rapprocher les ecritures bancaires','banque',2,'consolidate',NULL,'w',0),(115,'Exporter transactions et releves','banque',1,'export',NULL,'r',0),(115,'Exporter transactions et releves','banque',2,'export',NULL,'r',0),(116,'Virements entre comptes','banque',1,'transfer',NULL,'w',0),(116,'Virements entre comptes','banque',2,'transfer',NULL,'w',0),(117,'Gerer les envois de cheques','banque',1,'cheque',NULL,'w',0),(117,'Gerer les envois de cheques','banque',2,'cheque',NULL,'w',0),(121,'Lire les societes','societe',1,'lire',NULL,'r',1),(121,'Lire les societes','societe',2,'lire',NULL,'r',1),(122,'Creer modifier les societes','societe',1,'creer',NULL,'w',0),(122,'Creer modifier les societes','societe',2,'creer',NULL,'w',0),(125,'Supprimer les societes','societe',1,'supprimer',NULL,'d',0),(125,'Supprimer les societes','societe',2,'supprimer',NULL,'d',0),(126,'Exporter les societes','societe',1,'export',NULL,'r',0),(126,'Exporter les societes','societe',2,'export',NULL,'r',0),(141,'Lire tous les projets et taches (y compris prives qui ne me sont pas affectes)','projet',1,'all','lire','r',0),(142,'Creer/modifier tous les projets et taches (y compris prives qui ne me sont pas affectes)','projet',1,'all','creer','w',0),(144,'Supprimer tous les projets et taches (y compris prives qui ne me sont pas affectes)','projet',1,'all','supprimer','d',0),(151,'Read withdrawals','prelevement',1,'bons','lire','r',1),(152,'Create/modify a withdrawals','prelevement',1,'bons','creer','w',0),(153,'Send withdrawals to bank','prelevement',1,'bons','send','a',0),(154,'credit/refuse withdrawals','prelevement',1,'bons','credit','a',0),(161,'Lire les contrats','contrat',1,'lire',NULL,'r',1),(162,'Creer / modifier les contrats','contrat',1,'creer',NULL,'w',0),(163,'Activer un service d\'un contrat','contrat',1,'activer',NULL,'w',0),(164,'Desactiver un service d\'un contrat','contrat',1,'desactiver',NULL,'w',0),(165,'Supprimer un contrat','contrat',1,'supprimer',NULL,'d',0),(171,'Lire ses notes de frais et deplacements et celles de sa hierarchy','deplacement',1,'lire',NULL,'r',1),(172,'Creer/modifier une note de frais et deplacements','deplacement',1,'creer',NULL,'w',0),(173,'Supprimer les notes de frais et deplacements','deplacement',1,'supprimer',NULL,'d',0),(174,'Lire toutes les notes de frais','deplacement',1,'readall',NULL,'d',0),(178,'Exporter les notes de frais et deplacements','deplacement',1,'export',NULL,'d',0),(221,'Consulter les mailings','mailing',1,'lire',NULL,'r',1),(221,'Consulter les mailings','mailing',2,'lire',NULL,'r',1),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',1,'creer',NULL,'w',1),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',2,'creer',NULL,'w',0),(223,'Valider les mailings (permet leur envoi)','mailing',1,'valider',NULL,'w',0),(223,'Valider les mailings (permet leur envoi)','mailing',2,'valider',NULL,'w',0),(229,'Supprimer les mailings)','mailing',1,'supprimer',NULL,'d',1),(229,'Supprimer les mailings','mailing',2,'supprimer',NULL,'d',0),(237,'View recipients and info','mailing',1,'mailing_advance','recipient','r',0),(237,'View recipients and info','mailing',2,'mailing_advance','recipient','r',0),(238,'Manually send mailings','mailing',1,'mailing_advance','send','w',0),(238,'Manually send mailings','mailing',2,'mailing_advance','send','w',0),(239,'Delete mailings after validation and/or sent','mailing',1,'mailing_advance','delete','d',0),(239,'Delete mailings after validation and/or sent','mailing',2,'mailing_advance','delete','d',0),(241,'Lire les categories','categorie',1,'lire',NULL,'r',1),(242,'Creer/modifier les categories','categorie',1,'creer',NULL,'w',1),(243,'Supprimer les categories','categorie',1,'supprimer',NULL,'d',1),(251,'Consulter les autres utilisateurs','user',1,'user','lire','r',0),(252,'Consulter les permissions des autres utilisateurs','user',1,'user_advance','readperms','r',0),(253,'Creer/modifier utilisateurs internes et externes','user',1,'user','creer','w',0),(254,'Creer/modifier utilisateurs externes seulement','user',1,'user_advance','write','w',0),(255,'Modifier le mot de passe des autres utilisateurs','user',1,'user','password','w',0),(256,'Supprimer ou desactiver les autres utilisateurs','user',1,'user','supprimer','d',0),(262,'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).','societe',1,'client','voir','r',1),(262,'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).','societe',2,'client','voir','r',1),(281,'Lire les contacts','societe',1,'contact','lire','r',1),(281,'Lire les contacts','societe',2,'contact','lire','r',1),(282,'Creer modifier les contacts','societe',1,'contact','creer','w',0),(282,'Creer modifier les contacts','societe',2,'contact','creer','w',0),(283,'Supprimer les contacts','societe',1,'contact','supprimer','d',0),(283,'Supprimer les contacts','societe',2,'contact','supprimer','d',0),(286,'Exporter les contacts','societe',1,'contact','export','d',0),(286,'Exporter les contacts','societe',2,'contact','export','d',0),(300,'Read barcodes','barcode',1,'lire_advance',NULL,'r',1),(301,'Create/modify barcodes','barcode',1,'creer_advance',NULL,'w',0),(331,'Lire les bookmarks','bookmark',1,'lire',NULL,'r',1),(332,'Creer/modifier les bookmarks','bookmark',1,'creer',NULL,'r',0),(333,'Supprimer les bookmarks','bookmark',1,'supprimer',NULL,'r',0),(341,'Consulter ses propres permissions','user',1,'self_advance','readperms','r',1),(342,'Creer/modifier ses propres infos utilisateur','user',1,'self','creer','w',1),(343,'Modifier son propre mot de passe','user',1,'self','password','w',1),(344,'Modifier ses propres permissions','user',1,'self_advance','writeperms','w',1),(351,'Consulter les groupes','user',1,'group_advance','read','r',0),(352,'Consulter les permissions des groupes','user',1,'group_advance','readperms','r',0),(353,'Creer/modifier les groupes et leurs permissions','user',1,'group_advance','write','w',0),(354,'Supprimer ou desactiver les groupes','user',1,'group_advance','delete','d',0),(358,'Exporter les utilisateurs','user',1,'user','export','r',0),(531,'Lire les services','service',1,'lire',NULL,'r',1),(532,'Creer/modifier les services','service',1,'creer',NULL,'w',0),(534,'Supprimer les services','service',1,'supprimer',NULL,'d',0),(538,'Exporter les services','service',1,'export',NULL,'r',0),(700,'Lire les dons','don',1,'lire',NULL,'r',1),(701,'Creer/modifier les dons','don',1,'creer',NULL,'w',0),(701,'Lire les dons','don',2,'lire',NULL,'r',1),(702,'Supprimer les dons','don',1,'supprimer',NULL,'d',0),(702,'Creer/modifier les dons','don',2,'creer',NULL,'w',0),(703,'Supprimer les dons','don',1,'supprimer',NULL,'d',0),(703,'Supprimer les dons','don',2,'supprimer',NULL,'d',0),(1001,'Lire les stocks','stock',1,'lire',NULL,'r',1),(1002,'Creer/Modifier les stocks','stock',1,'creer',NULL,'w',1),(1003,'Supprimer les stocks','stock',1,'supprimer',NULL,'d',1),(1004,'Lire mouvements de stocks','stock',1,'mouvement','lire','r',1),(1005,'Creer/modifier mouvements de stocks','stock',1,'mouvement','creer','w',1),(1101,'Lire les bons de livraison','expedition',1,'livraison','lire','r',1),(1102,'Creer modifier les bons de livraison','expedition',1,'livraison','creer','w',0),(1104,'Valider les bons de livraison','expedition',1,'livraison','valider','d',0),(1109,'Supprimer les bons de livraison','expedition',1,'livraison','supprimer','d',0),(1181,'Consulter les fournisseurs','fournisseur',1,'lire',NULL,'r',1),(1182,'Consulter les commandes fournisseur','fournisseur',1,'commande','lire','r',1),(1183,'Creer une commande fournisseur','fournisseur',1,'commande','creer','w',0),(1184,'Valider une commande fournisseur','fournisseur',1,'supplier_order_advance','validate','w',0),(1185,'Approuver une commande fournisseur','fournisseur',1,'commande','approuver','w',0),(1186,'Commander une commande fournisseur','fournisseur',1,'commande','commander','w',0),(1187,'Receptionner une commande fournisseur','fournisseur',1,'commande','receptionner','d',0),(1188,'Supprimer une commande fournisseur','fournisseur',1,'commande','supprimer','d',0),(1189,'Check/Uncheck a supplier order reception','fournisseur',1,'commande_advance','check','w',0),(1201,'Lire les exports','export',1,'lire',NULL,'r',1),(1202,'Creer/modifier un export','export',1,'creer',NULL,'w',1),(1231,'Consulter les factures fournisseur','fournisseur',1,'facture','lire','r',1),(1232,'Creer une facture fournisseur','fournisseur',1,'facture','creer','w',0),(1233,'Valider une facture fournisseur','fournisseur',1,'supplier_invoice_advance','validate','w',0),(1234,'Supprimer une facture fournisseur','fournisseur',1,'facture','supprimer','d',0),(1235,'Envoyer les factures par mail','fournisseur',1,'supplier_invoice_advance','send','a',0),(1236,'Exporter les factures fournisseurs, attributs et reglements','fournisseur',1,'facture','export','r',0),(1237,'Exporter les commande fournisseurs, attributs','fournisseur',1,'commande','export','r',0),(1251,'Run mass imports of external data (data load)','import',1,'run',NULL,'r',0),(1321,'Exporter les factures clients, attributs et reglements','facture',1,'facture','export','r',0),(1321,'Exporter les factures clients, attributs et reglements','facture',2,'facture','export','r',0),(1421,'Exporter les commandes clients et attributs','commande',1,'commande','export','r',0),(2401,'Read actions/tasks linked to his account','agenda',1,'myactions','read','r',1),(2401,'Read actions/tasks linked to his account','agenda',2,'myactions','read','r',1),(2402,'Create/modify actions/tasks linked to his account','agenda',1,'myactions','create','w',0),(2402,'Create/modify actions/tasks linked to his account','agenda',2,'myactions','create','w',0),(2403,'Delete actions/tasks linked to his account','agenda',1,'myactions','delete','w',0),(2403,'Delete actions/tasks linked to his account','agenda',2,'myactions','delete','w',0),(2411,'Read actions/tasks of others','agenda',1,'allactions','read','r',0),(2411,'Read actions/tasks of others','agenda',2,'allactions','read','r',0),(2412,'Create/modify actions/tasks of others','agenda',1,'allactions','create','w',0),(2412,'Create/modify actions/tasks of others','agenda',2,'allactions','create','w',0),(2413,'Delete actions/tasks of others','agenda',1,'allactions','delete','w',0),(2413,'Delete actions/tasks of others','agenda',2,'allactions','delete','w',0),(2414,'Export actions/tasks of others','agenda',1,'export',NULL,'w',0),(2501,'Consulter/Télécharger les documents','ecm',1,'read',NULL,'r',1),(2503,'Soumettre ou supprimer des documents','ecm',1,'upload',NULL,'w',1),(2515,'Administrer les rubriques de documents','ecm',1,'setup',NULL,'w',1),(20001,'Read your own holidays','holiday',1,'read',NULL,'w',1),(20001,'Créer / Modifier / Lire ses demandes de congés payés','holiday',2,'write',NULL,'w',1),(20002,'Create/modify your own holidays','holiday',1,'write',NULL,'w',1),(20002,'Lire / Modifier toutes les demandes de congés payés','holiday',2,'lire_tous',NULL,'w',0),(20003,'Delete holidays','holiday',1,'delete',NULL,'w',0),(20003,'Supprimer des demandes de congés payés','holiday',2,'delete',NULL,'w',0),(20004,'Read holidays for everybody','holiday',1,'read_all',NULL,'w',0),(20004,'Définir les congés payés des utilisateurs','holiday',2,'define_holiday',NULL,'w',0),(20005,'Create/modify holidays for everybody','holiday',1,'write_all',NULL,'w',0),(20005,'Voir les logs de modification des congés payés','holiday',2,'view_log',NULL,'w',0),(20006,'Setup holidays of users (setup and update balance)','holiday',1,'define_holiday',NULL,'w',0),(20006,'Accéder au rapport mensuel des congés payés','holiday',2,'month_report',NULL,'w',0),(23001,'Read cron jobs','cron',1,'read',NULL,'w',1),(23002,'Create cron Jobs','cron',1,'create',NULL,'w',0),(23003,'Delete cron Jobs','cron',1,'delete',NULL,'w',0),(23004,'Execute cron Jobs','cron',1,'execute',NULL,'w',0),(50101,'Use point of sale','cashdesk',1,'use',NULL,'a',1),(55001,'Read surveys','opensurvey',1,'read',NULL,'r',0),(55002,'Create/modify surveys','opensurvey',1,'write',NULL,'w',0),(101250,'Read surveys','opensurvey',2,'survey','read','r',0),(101251,'Create/modify surveys','opensurvey',2,'survey','write','w',0),(400051,'Use POS','pos',2,'frontend',NULL,'a',1),(400052,'Use Backend','pos',2,'backend',NULL,'a',1),(400053,'Make Transfers','pos',2,'transfer',NULL,'a',1),(400055,'Stats','pos',2,'stats',NULL,'a',1); +INSERT INTO `llx_rights_def` VALUES (11,'Lire les factures','facture',1,'lire',NULL,'a',1),(11,'Lire les factures','facture',2,'lire',NULL,'a',1),(12,'Creer/modifier les factures','facture',1,'creer',NULL,'a',0),(12,'Creer/modifier les factures','facture',2,'creer',NULL,'a',0),(13,'Dévalider les factures','facture',1,'invoice_advance','unvalidate','a',0),(13,'Dévalider les factures','facture',2,'invoice_advance','unvalidate','a',0),(14,'Valider les factures','facture',1,'invoice_advance','validate','a',0),(14,'Valider les factures','facture',2,'valider',NULL,'a',0),(15,'Envoyer les factures par mail','facture',1,'invoice_advance','send','a',0),(15,'Envoyer les factures par mail','facture',2,'invoice_advance','send','a',0),(16,'Emettre des paiements sur les factures','facture',1,'paiement',NULL,'a',0),(16,'Emettre des paiements sur les factures','facture',2,'paiement',NULL,'a',0),(19,'Supprimer les factures','facture',1,'supprimer',NULL,'a',0),(19,'Supprimer les factures','facture',2,'supprimer',NULL,'a',0),(21,'Lire les propositions commerciales','propale',1,'lire',NULL,'r',1),(21,'Lire les propositions commerciales','propale',2,'lire',NULL,'r',1),(22,'Creer/modifier les propositions commerciales','propale',1,'creer',NULL,'w',0),(22,'Creer/modifier les propositions commerciales','propale',2,'creer',NULL,'w',0),(24,'Valider les propositions commerciales','propale',1,'propal_advance','validate','d',0),(24,'Valider les propositions commerciales','propale',2,'valider',NULL,'d',0),(25,'Envoyer les propositions commerciales aux clients','propale',1,'propal_advance','send','d',0),(25,'Envoyer les propositions commerciales aux clients','propale',2,'propal_advance','send','d',0),(26,'Cloturer les propositions commerciales','propale',1,'cloturer',NULL,'d',0),(26,'Cloturer les propositions commerciales','propale',2,'cloturer',NULL,'d',0),(27,'Supprimer les propositions commerciales','propale',1,'supprimer',NULL,'d',0),(27,'Supprimer les propositions commerciales','propale',2,'supprimer',NULL,'d',0),(28,'Exporter les propositions commerciales et attributs','propale',1,'export',NULL,'r',0),(28,'Exporter les propositions commerciales et attributs','propale',2,'export',NULL,'r',0),(31,'Lire les produits','produit',1,'lire',NULL,'r',1),(31,'Lire les produits','produit',2,'lire',NULL,'r',1),(32,'Creer/modifier les produits','produit',1,'creer',NULL,'w',0),(32,'Creer/modifier les produits','produit',2,'creer',NULL,'w',0),(34,'Supprimer les produits','produit',1,'supprimer',NULL,'d',0),(34,'Supprimer les produits','produit',2,'supprimer',NULL,'d',0),(38,'Exporter les produits','produit',1,'export',NULL,'r',0),(38,'Exporter les produits','produit',2,'export',NULL,'r',0),(41,'Read projects and tasks (shared projects or projects I am contact for). Can also enter time consumed on assigned tasks (timesheet)','projet',1,'lire',NULL,'r',1),(42,'Create/modify projects and tasks (shared projects or projects I am contact for)','projet',1,'creer',NULL,'w',0),(44,'Delete project and tasks (shared projects or projects I am contact for)','projet',1,'supprimer',NULL,'d',0),(45,'Export projects','projet',1,'export',NULL,'d',0),(61,'Lire les fiches d\'intervention','ficheinter',1,'lire',NULL,'r',1),(62,'Creer/modifier les fiches d\'intervention','ficheinter',1,'creer',NULL,'w',0),(64,'Supprimer les fiches d\'intervention','ficheinter',1,'supprimer',NULL,'d',0),(67,'Exporter les fiches interventions','ficheinter',1,'export',NULL,'r',0),(68,'Envoyer les fiches d\'intervention par courriel','ficheinter',1,'ficheinter_advance','send','r',0),(71,'Read members\' card','adherent',1,'lire',NULL,'r',1),(72,'Create/modify members (need also user module permissions if member linked to a user)','adherent',1,'creer',NULL,'w',0),(74,'Remove members','adherent',1,'supprimer',NULL,'d',0),(75,'Setup types of membership','adherent',1,'configurer',NULL,'w',0),(76,'Export members','adherent',1,'export',NULL,'r',0),(78,'Read subscriptions','adherent',1,'cotisation','lire','r',1),(79,'Create/modify/remove subscriptions','adherent',1,'cotisation','creer','w',0),(81,'Lire les commandes clients','commande',1,'lire',NULL,'r',1),(82,'Creer/modifier les commandes clients','commande',1,'creer',NULL,'w',0),(84,'Valider les commandes clients','commande',1,'order_advance','validate','d',0),(86,'Envoyer les commandes clients','commande',1,'order_advance','send','d',0),(87,'Cloturer les commandes clients','commande',1,'cloturer',NULL,'d',0),(88,'Annuler les commandes clients','commande',1,'order_advance','annuler','d',0),(89,'Supprimer les commandes clients','commande',1,'supprimer',NULL,'d',0),(91,'Lire les charges','tax',1,'charges','lire','r',1),(91,'Lire les charges','tax',2,'charges','lire','r',1),(92,'Creer/modifier les charges','tax',1,'charges','creer','w',0),(92,'Creer/modifier les charges','tax',2,'charges','creer','w',0),(93,'Supprimer les charges','tax',1,'charges','supprimer','d',0),(93,'Supprimer les charges','tax',2,'charges','supprimer','d',0),(94,'Exporter les charges','tax',1,'charges','export','r',0),(94,'Exporter les charges','tax',2,'charges','export','r',0),(95,'Lire CA, bilans, resultats','compta',1,'resultat','lire','r',1),(101,'Lire les expeditions','expedition',1,'lire',NULL,'r',1),(102,'Creer modifier les expeditions','expedition',1,'creer',NULL,'w',0),(104,'Valider les expeditions','expedition',1,'shipping_advance','validate','d',0),(105,'Envoyer les expeditions aux clients','expedition',1,'shipping_advance','send','d',0),(106,'Exporter les expeditions','expedition',1,'shipment','export','r',0),(109,'Supprimer les expeditions','expedition',1,'supprimer',NULL,'d',0),(111,'Lire les comptes bancaires','banque',1,'lire',NULL,'r',1),(111,'Lire les comptes bancaires','banque',2,'lire',NULL,'r',1),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',1,'modifier',NULL,'w',0),(112,'Creer/modifier montant/supprimer ecriture bancaire','banque',2,'modifier',NULL,'w',0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',1,'configurer',NULL,'a',0),(113,'Configurer les comptes bancaires (creer, gerer categories)','banque',2,'configurer',NULL,'a',0),(114,'Rapprocher les ecritures bancaires','banque',1,'consolidate',NULL,'w',0),(114,'Rapprocher les ecritures bancaires','banque',2,'consolidate',NULL,'w',0),(115,'Exporter transactions et releves','banque',1,'export',NULL,'r',0),(115,'Exporter transactions et releves','banque',2,'export',NULL,'r',0),(116,'Virements entre comptes','banque',1,'transfer',NULL,'w',0),(116,'Virements entre comptes','banque',2,'transfer',NULL,'w',0),(117,'Gerer les envois de cheques','banque',1,'cheque',NULL,'w',0),(117,'Gerer les envois de cheques','banque',2,'cheque',NULL,'w',0),(121,'Lire les societes','societe',1,'lire',NULL,'r',1),(121,'Lire les societes','societe',2,'lire',NULL,'r',1),(122,'Creer modifier les societes','societe',1,'creer',NULL,'w',0),(122,'Creer modifier les societes','societe',2,'creer',NULL,'w',0),(125,'Supprimer les societes','societe',1,'supprimer',NULL,'d',0),(125,'Supprimer les societes','societe',2,'supprimer',NULL,'d',0),(126,'Exporter les societes','societe',1,'export',NULL,'r',0),(126,'Exporter les societes','societe',2,'export',NULL,'r',0),(141,'Read all projects and tasks (also private projects I am not contact for)','projet',1,'all','lire','r',0),(142,'Create/modify all projects and tasks (also private projects I am not contact for)','projet',1,'all','creer','w',0),(144,'Delete all projects and tasks (also private projects I am not contact for)','projet',1,'all','supprimer','d',0),(151,'Read withdrawals','prelevement',1,'bons','lire','r',1),(152,'Create/modify a withdrawals','prelevement',1,'bons','creer','w',0),(153,'Send withdrawals to bank','prelevement',1,'bons','send','a',0),(154,'credit/refuse withdrawals','prelevement',1,'bons','credit','a',0),(161,'Lire les contrats','contrat',1,'lire',NULL,'r',1),(162,'Creer / modifier les contrats','contrat',1,'creer',NULL,'w',0),(163,'Activer un service d\'un contrat','contrat',1,'activer',NULL,'w',0),(164,'Desactiver un service d\'un contrat','contrat',1,'desactiver',NULL,'w',0),(165,'Supprimer un contrat','contrat',1,'supprimer',NULL,'d',0),(167,'Export contracts','contrat',1,'export',NULL,'r',0),(221,'Consulter les mailings','mailing',1,'lire',NULL,'r',1),(221,'Consulter les mailings','mailing',2,'lire',NULL,'r',1),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',1,'creer',NULL,'w',0),(222,'Creer/modifier les mailings (sujet, destinataires...)','mailing',2,'creer',NULL,'w',0),(223,'Valider les mailings (permet leur envoi)','mailing',1,'valider',NULL,'w',0),(223,'Valider les mailings (permet leur envoi)','mailing',2,'valider',NULL,'w',0),(229,'Supprimer les mailings','mailing',1,'supprimer',NULL,'d',0),(229,'Supprimer les mailings','mailing',2,'supprimer',NULL,'d',0),(237,'View recipients and info','mailing',1,'mailing_advance','recipient','r',0),(237,'View recipients and info','mailing',2,'mailing_advance','recipient','r',0),(238,'Manually send mailings','mailing',1,'mailing_advance','send','w',0),(238,'Manually send mailings','mailing',2,'mailing_advance','send','w',0),(239,'Delete mailings after validation and/or sent','mailing',1,'mailing_advance','delete','d',0),(239,'Delete mailings after validation and/or sent','mailing',2,'mailing_advance','delete','d',0),(241,'Lire les categories','categorie',1,'lire',NULL,'r',1),(242,'Creer/modifier les categories','categorie',1,'creer',NULL,'w',0),(243,'Supprimer les categories','categorie',1,'supprimer',NULL,'d',0),(251,'Consulter les autres utilisateurs','user',1,'user','lire','r',0),(252,'Consulter les permissions des autres utilisateurs','user',1,'user_advance','readperms','r',0),(253,'Creer/modifier utilisateurs internes et externes','user',1,'user','creer','w',0),(254,'Creer/modifier utilisateurs externes seulement','user',1,'user_advance','write','w',0),(255,'Modifier le mot de passe des autres utilisateurs','user',1,'user','password','w',0),(256,'Supprimer ou desactiver les autres utilisateurs','user',1,'user','supprimer','d',0),(262,'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).','societe',1,'client','voir','r',1),(262,'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).','societe',2,'client','voir','r',1),(281,'Lire les contacts','societe',1,'contact','lire','r',1),(281,'Lire les contacts','societe',2,'contact','lire','r',1),(282,'Creer modifier les contacts','societe',1,'contact','creer','w',0),(282,'Creer modifier les contacts','societe',2,'contact','creer','w',0),(283,'Supprimer les contacts','societe',1,'contact','supprimer','d',0),(283,'Supprimer les contacts','societe',2,'contact','supprimer','d',0),(286,'Exporter les contacts','societe',1,'contact','export','d',0),(286,'Exporter les contacts','societe',2,'contact','export','d',0),(300,'Read barcodes','barcode',1,'lire_advance',NULL,'r',1),(301,'Create/modify barcodes','barcode',1,'creer_advance',NULL,'w',0),(331,'Lire les bookmarks','bookmark',1,'lire',NULL,'r',1),(332,'Creer/modifier les bookmarks','bookmark',1,'creer',NULL,'r',1),(333,'Supprimer les bookmarks','bookmark',1,'supprimer',NULL,'r',1),(341,'Consulter ses propres permissions','user',1,'self_advance','readperms','r',1),(342,'Creer/modifier ses propres infos utilisateur','user',1,'self','creer','w',1),(343,'Modifier son propre mot de passe','user',1,'self','password','w',1),(344,'Modifier ses propres permissions','user',1,'self_advance','writeperms','w',1),(351,'Consulter les groupes','user',1,'group_advance','read','r',0),(352,'Consulter les permissions des groupes','user',1,'group_advance','readperms','r',0),(353,'Creer/modifier les groupes et leurs permissions','user',1,'group_advance','write','w',0),(354,'Supprimer ou desactiver les groupes','user',1,'group_advance','delete','d',0),(358,'Exporter les utilisateurs','user',1,'user','export','r',0),(510,'Read salaries','salaries',1,'read',NULL,'r',0),(512,'Create/modify salaries','salaries',1,'write',NULL,'w',0),(514,'Delete salaries','salaries',1,'delete',NULL,'d',0),(517,'Export salaries','salaries',1,'export',NULL,'r',0),(531,'Lire les services','service',1,'lire',NULL,'r',1),(532,'Creer/modifier les services','service',1,'creer',NULL,'w',0),(534,'Supprimer les services','service',1,'supprimer',NULL,'d',0),(538,'Exporter les services','service',1,'export',NULL,'r',0),(701,'Lire les dons','don',1,'lire',NULL,'r',1),(701,'Lire les dons','don',2,'lire',NULL,'r',1),(702,'Creer/modifier les dons','don',1,'creer',NULL,'w',0),(702,'Creer/modifier les dons','don',2,'creer',NULL,'w',0),(703,'Supprimer les dons','don',1,'supprimer',NULL,'d',0),(703,'Supprimer les dons','don',2,'supprimer',NULL,'d',0),(771,'Read expense reports (yours and your subordinates)','expensereport',1,'lire',NULL,'r',1),(772,'Create/modify expense reports','expensereport',1,'creer',NULL,'w',0),(773,'Delete expense reports','expensereport',1,'supprimer',NULL,'d',0),(774,'Read all expense reports','expensereport',1,'readall',NULL,'r',1),(775,'Approve expense reports','expensereport',1,'approve',NULL,'w',0),(776,'Pay expense reports','expensereport',1,'to_paid',NULL,'w',0),(779,'Export expense reports','expensereport',1,'export',NULL,'r',0),(1001,'Lire les stocks','stock',1,'lire',NULL,'r',1),(1002,'Creer/Modifier les stocks','stock',1,'creer',NULL,'w',0),(1003,'Supprimer les stocks','stock',1,'supprimer',NULL,'d',0),(1004,'Lire mouvements de stocks','stock',1,'mouvement','lire','r',1),(1005,'Creer/modifier mouvements de stocks','stock',1,'mouvement','creer','w',0),(1101,'Lire les bons de livraison','expedition',1,'livraison','lire','r',1),(1102,'Creer modifier les bons de livraison','expedition',1,'livraison','creer','w',0),(1104,'Valider les bons de livraison','expedition',1,'livraison_advance','validate','d',0),(1109,'Supprimer les bons de livraison','expedition',1,'livraison','supprimer','d',0),(1181,'Consulter les fournisseurs','fournisseur',1,'lire',NULL,'r',1),(1182,'Consulter les commandes fournisseur','fournisseur',1,'commande','lire','r',1),(1183,'Creer une commande fournisseur','fournisseur',1,'commande','creer','w',0),(1184,'Valider une commande fournisseur','fournisseur',1,'supplier_order_advance','validate','w',0),(1185,'Approuver une commande fournisseur','fournisseur',1,'commande','approuver','w',0),(1186,'Commander une commande fournisseur','fournisseur',1,'commande','commander','w',0),(1187,'Receptionner une commande fournisseur','fournisseur',1,'commande','receptionner','d',0),(1188,'Supprimer une commande fournisseur','fournisseur',1,'commande','supprimer','d',0),(1189,'Check/Uncheck a supplier order reception','fournisseur',1,'commande_advance','check','w',0),(1201,'Lire les exports','export',1,'lire',NULL,'r',1),(1202,'Creer/modifier un export','export',1,'creer',NULL,'w',0),(1231,'Consulter les factures fournisseur','fournisseur',1,'facture','lire','r',1),(1232,'Creer une facture fournisseur','fournisseur',1,'facture','creer','w',0),(1233,'Valider une facture fournisseur','fournisseur',1,'supplier_invoice_advance','validate','w',0),(1234,'Supprimer une facture fournisseur','fournisseur',1,'facture','supprimer','d',0),(1235,'Envoyer les factures par mail','fournisseur',1,'supplier_invoice_advance','send','a',0),(1236,'Exporter les factures fournisseurs, attributs et reglements','fournisseur',1,'facture','export','r',0),(1237,'Exporter les commande fournisseurs, attributs','fournisseur',1,'commande','export','r',0),(1251,'Run mass imports of external data (data load)','import',1,'run',NULL,'r',0),(1321,'Exporter les factures clients, attributs et reglements','facture',1,'facture','export','r',0),(1321,'Exporter les factures clients, attributs et reglements','facture',2,'facture','export','r',0),(1421,'Exporter les commandes clients et attributs','commande',1,'commande','export','r',0),(2401,'Read actions/tasks linked to his account','agenda',1,'myactions','read','r',1),(2401,'Read actions/tasks linked to his account','agenda',2,'myactions','read','r',1),(2402,'Create/modify actions/tasks linked to his account','agenda',1,'myactions','create','w',0),(2402,'Create/modify actions/tasks linked to his account','agenda',2,'myactions','create','w',0),(2403,'Delete actions/tasks linked to his account','agenda',1,'myactions','delete','w',0),(2403,'Delete actions/tasks linked to his account','agenda',2,'myactions','delete','w',0),(2411,'Read actions/tasks of others','agenda',1,'allactions','read','r',0),(2411,'Read actions/tasks of others','agenda',2,'allactions','read','r',0),(2412,'Create/modify actions/tasks of others','agenda',1,'allactions','create','w',0),(2412,'Create/modify actions/tasks of others','agenda',2,'allactions','create','w',0),(2413,'Delete actions/tasks of others','agenda',1,'allactions','delete','w',0),(2413,'Delete actions/tasks of others','agenda',2,'allactions','delete','w',0),(2414,'Export actions/tasks of others','agenda',1,'export',NULL,'w',0),(2501,'Consulter/Télécharger les documents','ecm',1,'read',NULL,'r',1),(2503,'Soumettre ou supprimer des documents','ecm',1,'upload',NULL,'w',1),(2515,'Administrer les rubriques de documents','ecm',1,'setup',NULL,'w',1),(20001,'Read your own holidays','holiday',1,'read',NULL,'w',1),(20001,'Créer / Modifier / Lire ses demandes de congés payés','holiday',2,'write',NULL,'w',1),(20002,'Create/modify your own holidays','holiday',1,'write',NULL,'w',1),(20002,'Lire / Modifier toutes les demandes de congés payés','holiday',2,'lire_tous',NULL,'w',0),(20003,'Delete holidays','holiday',1,'delete',NULL,'w',0),(20003,'Supprimer des demandes de congés payés','holiday',2,'delete',NULL,'w',0),(20004,'Read holidays for everybody','holiday',1,'read_all',NULL,'w',0),(20004,'Définir les congés payés des utilisateurs','holiday',2,'define_holiday',NULL,'w',0),(20005,'Create/modify holidays for everybody','holiday',1,'write_all',NULL,'w',0),(20005,'Voir les logs de modification des congés payés','holiday',2,'view_log',NULL,'w',0),(20006,'Setup holidays of users (setup and update balance)','holiday',1,'define_holiday',NULL,'w',0),(20006,'Accéder au rapport mensuel des congés payés','holiday',2,'month_report',NULL,'w',0),(50101,'Use point of sale','cashdesk',1,'use',NULL,'a',1),(55001,'Read surveys','opensurvey',1,'read',NULL,'r',0),(55002,'Create/modify surveys','opensurvey',1,'write',NULL,'w',0),(59001,'Visualiser les marges','margins',1,'liretous',NULL,'r',1),(59002,'Définir les marges','margins',1,'creer',NULL,'w',0),(59003,'Read every user margin','margins',1,'read','all','r',0),(101250,'Read surveys','opensurvey',2,'survey','read','r',0),(101251,'Create/modify surveys','opensurvey',2,'survey','write','w',0),(400051,'Use POS','pos',2,'frontend',NULL,'a',1),(400052,'Use Backend','pos',2,'backend',NULL,'a',1),(400053,'Make Transfers','pos',2,'transfer',NULL,'a',1),(400055,'Stats','pos',2,'stats',NULL,'a',1); /*!40000 ALTER TABLE `llx_rights_def` ENABLE KEYS */; UNLOCK TABLES; @@ -7750,6 +7046,7 @@ CREATE TABLE `llx_societe` ( UNIQUE KEY `uk_societe_prefix_comm` (`prefix_comm`,`entity`), UNIQUE KEY `uk_societe_code_client` (`code_client`,`entity`), UNIQUE KEY `uk_societe_barcode` (`barcode`,`fk_barcode_type`,`entity`), + UNIQUE KEY `uk_societe_code_fournisseur` (`code_fournisseur`,`entity`), KEY `idx_societe_user_creat` (`fk_user_creat`), KEY `idx_societe_user_modif` (`fk_user_modif`), KEY `idx_societe_barcode` (`barcode`) @@ -7762,7 +7059,7 @@ CREATE TABLE `llx_societe` ( LOCK TABLES `llx_societe` WRITE; /*!40000 ALTER TABLE `llx_societe` DISABLE KEYS */; -INSERT INTO `llx_societe` VALUES (1,0,NULL,'2012-12-19 14:47:50','2010-07-08 14:21:44','ABC and Co',1,NULL,NULL,'CU1212-0007','SU1212-0005','7050','6050','1 alalah road',NULL,'Delhi',0,4,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,'0','','','','','',5000,1,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,1,1,NULL,0,NULL,NULL,NULL,'en_IN',NULL,NULL,1,NULL,'','',0,NULL,NULL,NULL,NULL,NULL),(2,0,NULL,'2011-07-31 22:35:08','2010-07-08 14:23:48','Belin SARL',1,NULL,NULL,'CU1108-0001','SU1108-0001',NULL,NULL,'11 rue de la paix.','75000','Paris',0,117,NULL,NULL,'dolibarr.fr',NULL,NULL,NULL,3,NULL,'0','123456789','','ACE14','','',10000,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,'fr_FR',NULL,NULL,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(3,0,NULL,'2010-07-08 20:42:12','2010-07-08 22:42:12','Spanish Comp',1,NULL,NULL,'SPANISHCOMP',NULL,NULL,NULL,'1 via mallere',NULL,'Madrid',123,4,NULL,NULL,NULL,NULL,NULL,3,4,408,'0','','','','','',10000,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,'es_AR',NULL,NULL,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(4,0,NULL,'2013-03-03 23:09:48','2010-07-08 22:48:18','Prospector Vaalen',1,NULL,NULL,'CU1303-0014',NULL,NULL,NULL,'',NULL,'Bruxelles',103,2,NULL,NULL,NULL,NULL,NULL,3,4,201,'0','12345678','','','','',0,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,1,0,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,'','',0,NULL,NULL,NULL,NULL,NULL),(5,0,NULL,'2010-07-08 21:37:56','2010-07-08 23:22:57','NoCountry Co',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,193,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0,0,NULL,NULL,NULL,0,0,NULL,NULL,0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(6,0,NULL,'2010-07-08 22:25:06','2010-07-09 00:15:09','Swiss customer supplier',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,'Genevia',0,6,NULL,NULL,NULL,'abademail@aa.com',NULL,2,2,601,'0','','','','','',56000,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(7,0,NULL,'2013-02-12 16:06:20','2010-07-09 01:24:26','Generic customer',1,NULL,NULL,'CU1302-0011',NULL,NULL,NULL,'',NULL,NULL,0,7,NULL,NULL,NULL,'ttt@ttt.com',NULL,NULL,8,NULL,'0','','','','','',0,0,'Generic customer to use for Point Of Sale module.
',NULL,NULL,1,0,NULL,NULL,0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,'','',0,NULL,NULL,NULL,NULL,NULL),(10,0,NULL,'2012-12-08 16:38:30','2010-07-10 15:13:08','Smith Vick',1,NULL,NULL,'CU1212-0005',NULL,NULL,NULL,'',NULL,NULL,0,102,NULL,NULL,NULL,'vsmith@email.com',NULL,NULL,0,NULL,'0','','','','','',0,0,NULL,NULL,NULL,1,0,NULL,NULL,0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,'','',0,NULL,NULL,NULL,NULL,NULL),(11,0,NULL,'2010-07-11 12:35:22','2010-07-10 18:35:57','Mon client',1,NULL,NULL,NULL,NULL,'7051',NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(12,0,NULL,'2015-10-03 09:08:58','2010-07-11 16:18:08','Dupont Alain',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,'pcurie@example.com',NULL,NULL,0,NULL,'0','','','','','',0,0,NULL,NULL,NULL,1,0,NULL,NULL,0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,NULL,'','',0,NULL,NULL,'',0,NULL),(13,0,NULL,'2010-07-11 15:13:20','2010-07-11 17:13:20','Vendeur de chips',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0,0,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL),(17,0,NULL,'2015-10-03 10:12:11','2011-08-01 02:41:26','Book Keeping Company',1,NULL,NULL,'CU1108-0004','SU1108-0004',NULL,NULL,'The French Company',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,1,3,NULL,'0','','','','','',0,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,'',0,NULL),(19,0,NULL,'2014-03-02 19:09:52','2013-01-12 12:23:05','Magic Food Store',1,NULL,NULL,'CU1301-0008',NULL,NULL,NULL,'65 holdywood boulevard','123456','BigTown',0,4,NULL,'0101',NULL,'myemail@domain.com',NULL,NULL,0,NULL,'0','','','10/10/2010','','',0,0,NULL,NULL,NULL,1,0,NULL,NULL,0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'en_US','patient@cabinetmed',NULL,1,NULL,'','',0,NULL,NULL,NULL,NULL,NULL),(25,0,NULL,'2015-10-03 09:21:44','2013-03-10 15:47:37','Print Company',1,NULL,NULL,'CU1303-0016','SU1303-0007',NULL,NULL,'21 Gutenberg street','45600','Berlin',0,5,NULL,NULL,NULL,'printcompany@example.com',NULL,NULL,0,NULL,'0','','','','','',0,0,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,1,1,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'de_DE',NULL,NULL,1,'printcompany.png','','',0,NULL,NULL,'',0,NULL); +INSERT INTO `llx_societe` VALUES (1,0,NULL,'2016-01-16 15:21:09','2010-07-08 14:21:44','Indian SAS',1,NULL,NULL,'CU1212-0007','SU1212-0005','7050','6050','1 alalah road',NULL,'Delhi',0,117,NULL,NULL,NULL,NULL,NULL,NULL,4,NULL,'0','','','','','',5000,1,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'en_IN',NULL,NULL,1,'indiancompany.png','','',0,NULL,NULL,'',0,NULL),(2,0,NULL,'2016-01-16 15:25:44','2010-07-08 14:23:48','Teclib',1,NULL,NULL,'CU1108-0001','SU1108-0001',NULL,NULL,'11 rue de la paix.','75000','Paris',0,1,NULL,NULL,'www.teclib.com',NULL,NULL,NULL,3,57,'0','123456789','','ACE14','','',400000,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'fr_FR',NULL,NULL,1,'teclibcompany.png','','',0,NULL,NULL,'',0,NULL),(3,0,NULL,'2016-01-16 15:28:17','2010-07-08 22:42:12','Spanish Comp',1,NULL,NULL,'SPANISHCOMP','SU1601-0009',NULL,NULL,'1 via mallere',NULL,'Madrid',123,4,NULL,NULL,NULL,NULL,NULL,3,4,408,'0','','','','','',10000,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'es_AR',NULL,NULL,1,'spanishcompany.png','','',0,NULL,NULL,'',0,NULL),(4,0,NULL,'2016-01-22 17:24:53','2010-07-08 22:48:18','Prospector Vaalen',1,NULL,NULL,'CU1303-0014',NULL,NULL,NULL,'',NULL,'Bruxelles',103,2,NULL,NULL,NULL,NULL,NULL,3,4,201,'0','12345678','','','','',0,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'valeencompany.png','','',0,NULL,NULL,'',0,NULL),(5,0,NULL,'2016-01-16 15:31:29','2010-07-08 23:22:57','NoCountry',1,NULL,NULL,NULL,NULL,NULL,NULL,'',NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0,0,NULL,NULL,NULL,0,0,NULL,NULL,0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'nocountrycomp.png','','',0,NULL,NULL,'',0,NULL),(6,0,NULL,'2016-01-16 15:35:56','2010-07-09 00:15:09','Swiss Touch',1,NULL,NULL,'CU1601-0018','SU1601-0010',NULL,NULL,'',NULL,'Genevia',0,6,NULL,NULL,NULL,'swisstouch@example.ch',NULL,2,2,601,'0','','','','','',56000,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'swisstouch.png','','',0,NULL,NULL,'',0,NULL),(7,0,NULL,'2016-01-16 15:38:32','2010-07-09 01:24:26','Generic customer',1,NULL,NULL,'CU1302-0011',NULL,NULL,NULL,'',NULL,NULL,0,7,NULL,NULL,NULL,'ttt@ttt.com',NULL,NULL,8,NULL,'0','','','','','',0,0,'Generic customer to use for Point Of Sale module.
',NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'genericcustomer.png','','',0,NULL,NULL,'',0,NULL),(10,0,NULL,'2016-01-16 15:44:20','2010-07-10 15:13:08','NLTechno',1,NULL,NULL,'CU1212-0005','SU1601-0011',NULL,NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,'notanemail@nltechno.com',NULL,1,4,54,'0','493861496','49386149600039','6209Z','22-01-2007','FR123456789',10000,0,NULL,NULL,NULL,1,1,NULL,NULL,0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,'123456789012',NULL,'fr_FR',NULL,NULL,1,'logo_nltechno_94x100.png','','',0,NULL,NULL,'The OpenSource company',0,NULL),(11,0,NULL,'2016-01-22 17:11:20','2010-07-10 18:35:57','Company Corp 1',1,NULL,NULL,'CU1510-0017',NULL,'7051',NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0,0,NULL,NULL,NULL,3,0,NULL,'PL_LOW',0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'comapnycorp1company.png','','',0,NULL,NULL,'',0,NULL),(12,0,NULL,'2016-01-22 16:41:56','2010-07-11 16:18:08','Dupont Alain',1,NULL,NULL,'CU1601-0019',NULL,NULL,NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,'dalain@example.com',NULL,NULL,0,NULL,'0','','','','','',0,0,NULL,NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'pierrecurie.jpg','','',0,NULL,NULL,'',0,NULL),(13,0,NULL,'2016-01-22 17:13:16','2010-07-11 17:13:20','Company Corp 2',1,NULL,NULL,NULL,'SU1510-0008',NULL,NULL,'',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,'0','','','','','',0,0,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'companycorp2company.png','','',0,NULL,NULL,'',0,NULL),(17,0,NULL,'2016-01-22 17:13:46','2011-08-01 02:41:26','Book Keeping Company',1,NULL,NULL,'CU1108-0004','SU1108-0004',NULL,NULL,'The French Company',NULL,NULL,0,1,NULL,NULL,NULL,NULL,NULL,1,3,NULL,'0','','','','','',0,0,NULL,NULL,NULL,3,1,NULL,NULL,0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,NULL,NULL,NULL,1,'bookkeepercompany.png','','',0,NULL,NULL,'',0,NULL),(19,0,NULL,'2016-01-22 17:18:08','2013-01-12 12:23:05','Magic Food Store',1,NULL,NULL,'CU1301-0008',NULL,NULL,NULL,'65 holdywood boulevard','123456','BigTown',0,4,NULL,'0101',NULL,'myemail@domain.com',NULL,NULL,0,NULL,'0','','','10/10/2010','','',0,0,NULL,NULL,NULL,1,0,NULL,NULL,0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,0,NULL,0.000,NULL,0.000,NULL,NULL,'en_US','patient@cabinetmed',NULL,1,'magicfoodstore.png','','',0,NULL,NULL,'',0,NULL),(25,0,NULL,'2016-01-22 17:21:17','2013-03-10 15:47:37','Print Company',1,NULL,NULL,'CU1303-0016','SU1303-0007',NULL,NULL,'21 Gutenberg street','45600','Berlin',0,5,NULL,NULL,NULL,'printcompany@example.com',NULL,NULL,0,NULL,'0','','','','','',0,0,NULL,NULL,NULL,0,1,NULL,NULL,0,0,0,1,12,0,NULL,NULL,NULL,NULL,NULL,1,NULL,0.000,NULL,0.000,NULL,NULL,'de_DE',NULL,NULL,1,'printcompany.png','','',0,NULL,NULL,'',0,NULL); /*!40000 ALTER TABLE `llx_societe` ENABLE KEYS */; UNLOCK TABLES; @@ -7815,7 +7112,7 @@ CREATE TABLE `llx_societe_commerciaux` ( `fk_user` int(11) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_societe_commerciaux` (`fk_soc`,`fk_user`) -) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7824,7 +7121,7 @@ CREATE TABLE `llx_societe_commerciaux` ( LOCK TABLES `llx_societe_commerciaux` WRITE; /*!40000 ALTER TABLE `llx_societe_commerciaux` DISABLE KEYS */; -INSERT INTO `llx_societe_commerciaux` VALUES (1,2,2),(2,3,2),(5,17,1),(6,19,1),(8,19,3); +INSERT INTO `llx_societe_commerciaux` VALUES (1,2,2),(2,3,2),(9,11,16),(10,13,17),(5,17,1),(6,19,1),(8,19,3); /*!40000 ALTER TABLE `llx_societe_commerciaux` ENABLE KEYS */; UNLOCK TABLES; @@ -7843,7 +7140,7 @@ CREATE TABLE `llx_societe_extrafields` ( `anotheraddedfield` varchar(15) DEFAULT NULL, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_societe_extrafields` (`fk_object`) -) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -7852,7 +7149,7 @@ CREATE TABLE `llx_societe_extrafields` ( LOCK TABLES `llx_societe_extrafields` WRITE; /*!40000 ALTER TABLE `llx_societe_extrafields` DISABLE KEYS */; -INSERT INTO `llx_societe_extrafields` VALUES (1,'2011-06-22 16:23:01',40,NULL,NULL),(2,'2011-06-22 16:23:16',41,NULL,NULL),(4,'2011-06-23 07:40:40',39,NULL,NULL),(12,'2011-06-29 13:03:12',42,NULL,NULL),(14,'2011-07-02 01:24:03',57,NULL,NULL),(16,'2011-07-02 14:11:29',60,NULL,NULL),(17,'2011-07-18 10:26:55',35,NULL,NULL),(18,'2011-07-31 22:35:08',2,NULL,NULL),(28,'2012-12-08 16:38:30',10,NULL,NULL),(30,'2012-12-19 14:47:50',1,NULL,NULL),(33,'2013-02-12 16:06:20',7,NULL,NULL),(44,'2013-03-03 23:08:04',4,NULL,NULL),(49,'2014-03-02 19:09:52',19,NULL,NULL),(51,'2015-10-03 09:09:23',12,NULL,NULL),(53,'2015-10-03 09:21:44',25,NULL,NULL),(54,'2015-10-03 10:12:11',17,NULL,NULL); +INSERT INTO `llx_societe_extrafields` VALUES (1,'2011-06-22 16:23:01',40,NULL,NULL),(2,'2011-06-22 16:23:16',41,NULL,NULL),(4,'2011-06-23 07:40:40',39,NULL,NULL),(12,'2011-06-29 13:03:12',42,NULL,NULL),(14,'2011-07-02 01:24:03',57,NULL,NULL),(16,'2011-07-02 14:11:29',60,NULL,NULL),(17,'2011-07-18 10:26:55',35,NULL,NULL),(75,'2016-01-22 16:40:03',10,NULL,NULL),(77,'2016-01-22 16:41:56',12,NULL,NULL),(78,'2016-01-22 17:11:20',11,NULL,NULL),(79,'2016-01-22 17:13:16',13,NULL,NULL),(80,'2016-01-22 17:13:46',17,NULL,NULL),(81,'2016-01-22 17:18:08',19,NULL,NULL),(82,'2016-01-22 17:21:17',25,NULL,NULL),(83,'2016-01-22 17:21:51',1,NULL,NULL),(84,'2016-01-22 17:22:09',2,NULL,NULL),(85,'2016-01-22 17:22:32',3,NULL,NULL),(86,'2016-01-22 17:24:53',4,NULL,NULL),(87,'2016-01-22 17:25:11',5,NULL,NULL),(88,'2016-01-22 17:25:26',6,NULL,NULL),(89,'2016-01-22 17:25:41',7,NULL,NULL); /*!40000 ALTER TABLE `llx_societe_extrafields` ENABLE KEYS */; UNLOCK TABLES; @@ -7965,6 +7262,8 @@ CREATE TABLE `llx_societe_remise_except` ( KEY `idx_societe_remise_except_fk_facture_line` (`fk_facture_line`), KEY `idx_societe_remise_except_fk_facture` (`fk_facture`), KEY `idx_societe_remise_except_fk_facture_source` (`fk_facture_source`), + CONSTRAINT `fk_soc_remise_fk_facture_line` FOREIGN KEY (`fk_facture_line`) REFERENCES `llx_facturedet` (`rowid`), + CONSTRAINT `fk_soc_remise_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_societe_remise_fk_facture` FOREIGN KEY (`fk_facture`) REFERENCES `llx_facture` (`rowid`), CONSTRAINT `fk_societe_remise_fk_facture_line` FOREIGN KEY (`fk_facture_line`) REFERENCES `llx_facturedet` (`rowid`), CONSTRAINT `fk_societe_remise_fk_facture_source` FOREIGN KEY (`fk_facture_source`) REFERENCES `llx_facture` (`rowid`), @@ -7979,7 +7278,7 @@ CREATE TABLE `llx_societe_remise_except` ( LOCK TABLES `llx_societe_remise_except` WRITE; /*!40000 ALTER TABLE `llx_societe_remise_except` DISABLE KEYS */; -INSERT INTO `llx_societe_remise_except` VALUES (2,19,'2013-03-19 09:36:15',10.00000000,1.25000000,11.25000000,12.500,1,1019,NULL,NULL,'hfghgf'); +INSERT INTO `llx_societe_remise_except` VALUES (2,19,'2013-03-19 09:36:15',10.00000000,1.25000000,11.25000000,12.500,1,NULL,NULL,NULL,'hfghgf'); /*!40000 ALTER TABLE `llx_societe_remise_except` ENABLE KEYS */; UNLOCK TABLES; @@ -8069,7 +7368,7 @@ CREATE TABLE `llx_socpeople` ( KEY `idx_socpeople_fk_user_creat` (`fk_user_creat`), CONSTRAINT `fk_socpeople_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`), CONSTRAINT `fk_socpeople_user_creat_user_rowid` FOREIGN KEY (`fk_user_creat`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8078,7 +7377,7 @@ CREATE TABLE `llx_socpeople` ( LOCK TABLES `llx_socpeople` WRITE; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; -INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2010-07-08 20:45:28',1,1,NULL,'MR','Samira','Aljoun','','','',297,117,'2010-07-08','Project leader','','','','','','',NULL,0,0,1,1,'Met during a congress at Dubai',NULL,NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2015-10-03 09:39:51',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',1,0,1,1,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2015-10-03 10:01:15',17,1,NULL,'','Bookkeeper','Alex','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',0,0,1,1,'','',NULL,NULL,NULL,1); +INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',0,0,1,12,'','',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; UNLOCK TABLES; @@ -8182,34 +7481,6 @@ LOCK TABLES `llx_tva` WRITE; /*!40000 ALTER TABLE `llx_tva` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `llx_update_modules` --- - -DROP TABLE IF EXISTS `llx_update_modules`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `llx_update_modules` ( - `rowid` int(11) NOT NULL AUTO_INCREMENT, - `modulekey` varchar(24) DEFAULT NULL, - `datekey` date DEFAULT NULL, - `versionkey` double DEFAULT NULL, - `lastrequestdate` datetime DEFAULT NULL, - `email` varchar(128) DEFAULT NULL, - `tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`rowid`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `llx_update_modules` --- - -LOCK TABLES `llx_update_modules` WRITE; -/*!40000 ALTER TABLE `llx_update_modules` DISABLE KEYS */; -/*!40000 ALTER TABLE `llx_update_modules` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `llx_user` -- @@ -8280,9 +7551,10 @@ CREATE TABLE `llx_user` ( UNIQUE KEY `uk_user_login` (`login`,`entity`), UNIQUE KEY `uk_user_fk_socpeople` (`fk_socpeople`), UNIQUE KEY `uk_user_fk_member` (`fk_member`), + UNIQUE KEY `uk_user_api_key` (`api_key`), KEY `idx_user_api_key` (`api_key`), KEY `idx_user_fk_societe` (`fk_soc`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8291,7 +7563,7 @@ CREATE TABLE `llx_user` ( LOCK TABLES `llx_user` WRITE; /*!40000 ALTER TABLE `llx_user` DISABLE KEYS */; -INSERT INTO `llx_user` VALUES (1,'2010-07-08 13:20:11','2015-10-03 09:43:40',NULL,NULL,'admin',0,NULL,NULL,NULL,'admindemo','c84258e9c39059a89ab77d846ddab909',NULL,NULL,'Einstein','Albert','President','','123456789','','','alexadmin@example.com','',1,'','','',1,1,NULL,NULL,NULL,'','2015-10-03 11:43:50','2014-12-21 20:52:09',NULL,'',1,'alberteinstein.jpg',NULL,NULL,NULL,NULL,'','','',NULL,NULL,'aaaaff','',NULL,0,0,NULL,NULL,NULL,NULL,'man'),(2,'2010-07-08 13:54:48','2015-10-03 09:07:36',NULL,NULL,'demo',1,NULL,NULL,NULL,'demo','fe01ce2a7fbac8fafaed7c982a04e229',NULL,NULL,'John','Doe','','','09123123','','','johndoe@mycompany.com','',0,'','','',1,1,NULL,NULL,NULL,'','2013-03-24 16:30:29','2010-07-08 14:12:02',NULL,'',1,'johndoe.png',NULL,NULL,1,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,'man'),(3,'2010-07-11 16:18:59','2015-10-03 09:09:23',NULL,NULL,'pcurie',1,NULL,NULL,NULL,'pcuriedolibarr','ab335b4eb4c3c99334f656e5db9584c9',NULL,NULL,'Pierre','Curie','','','','','','pcurie@example.com','',0,'','','',1,1,NULL,NULL,2,'','2012-12-21 17:38:55',NULL,NULL,'',1,'pierrecurie.jpg',NULL,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,NULL),(4,'2013-01-23 17:52:27','2015-10-03 10:01:39',NULL,NULL,'bookkeeper',1,NULL,NULL,NULL,'athestudent','9c98d27c557c6aabfb4125c0941037c8',NULL,NULL,'Bookkeeper','Alex','','','','','','','',0,'','','',1,1,17,6,NULL,'','2013-02-25 10:18:41','2013-01-23 17:53:20',NULL,'',1,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,'man'),(6,'2013-02-16 20:22:40','2013-02-16 18:22:40',NULL,NULL,'aaab',2,NULL,NULL,NULL,'aaab','4c189b020ceb022e0ecc42482802e2b8',NULL,NULL,'aaab','','',NULL,'','','','','',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL),(7,'2013-02-16 20:48:15','2013-02-16 18:48:15',NULL,NULL,'zzz',2,NULL,NULL,NULL,'zzz','f3abb86bd34cf4d52698f14c0da1dc60',NULL,NULL,'zzz','','',NULL,'','','','','',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL),(9,'2013-02-16 20:50:07','2013-03-24 15:10:14',NULL,NULL,'zzzg',2,NULL,NULL,NULL,'jc28fg4h','93d789524fd223cf05eecea3f59cbe86',NULL,NULL,'zzzg','','',NULL,'','','','','fsdkkfsdf
\r\nfsdfsd
\r\nfsdfs',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,5,NULL,'','','',NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL),(10,'2015-10-03 11:47:41','2015-10-03 09:47:53',NULL,NULL,'mcurie',1,NULL,NULL,NULL,'mcuriedolibarr','c89846eb5971a43ff467b8a206732ebc',NULL,'t3mnkbhs','Curie','Marie','','','','','','','',0,NULL,NULL,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'mariecurie.jpg',NULL,NULL,NULL,NULL,'','','',NULL,NULL,'ffaaff','',NULL,0,0,NULL,NULL,NULL,NULL,'woman'); +INSERT INTO `llx_user` VALUES (1,'2010-07-08 13:20:11','2015-10-05 20:07:36',NULL,NULL,'aeinstein',0,NULL,NULL,NULL,'aeinstein','11c9c772d6471aa24c27274bdd8a223b',NULL,NULL,'Einstein','Albert','','','123456789','','','aeinstein@example.com','',0,'','','',1,1,NULL,NULL,NULL,'','2015-10-05 08:32:44','2015-10-03 11:43:50',NULL,'',1,'alberteinstein.jpg',NULL,NULL,14,NULL,'','','',NULL,NULL,'aaaaff','',NULL,0,0,NULL,NULL,NULL,NULL,'man'),(2,'2010-07-08 13:54:48','2015-10-05 19:47:22',NULL,NULL,'demo',1,NULL,NULL,NULL,'demo','fe01ce2a7fbac8fafaed7c982a04e229',NULL,NULL,'Doe','David','','','09123123','','','daviddoe@mycompany.com','',0,'','','',1,1,NULL,NULL,NULL,'','2016-01-22 17:20:12','2016-01-22 14:28:35',NULL,'',1,'johndoe.png',NULL,NULL,11,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,'man'),(3,'2010-07-11 16:18:59','2015-10-05 19:57:57',NULL,NULL,'pcurie',1,NULL,NULL,NULL,'pcuriedolibarr','ab335b4eb4c3c99334f656e5db9584c9',NULL,NULL,'Curie','Pierre','','','','','','pcurie@example.com','',0,'','','',1,1,NULL,NULL,2,'','2012-12-21 17:38:55',NULL,NULL,'',1,'pierrecurie.jpg',NULL,NULL,14,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,NULL),(4,'2013-01-23 17:52:27','2015-10-05 20:08:34',NULL,NULL,'bbookkeeper',1,NULL,NULL,NULL,'bbookkeeper','a7d30b58d647fcf59b7163f9592b1dbb',NULL,NULL,'Bookkeeper','Bob','Bookkeeper','','','','','','',0,'','','',1,1,17,6,NULL,'','2013-02-25 10:18:41','2013-01-23 17:53:20',NULL,'',1,NULL,NULL,NULL,11,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,'man'),(10,'2015-10-03 11:47:41','2015-10-05 20:07:18',NULL,NULL,'mcurie',1,NULL,NULL,NULL,'mcurie','11c9c772d6471aa24c27274bdd8a223b',NULL,'t3mnkbhs','Curie','Marie','','','','','','','',0,NULL,NULL,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,'mariecurie.jpg',NULL,NULL,14,NULL,'','','',NULL,NULL,'ffaaff','',NULL,0,0,NULL,NULL,NULL,NULL,'woman'),(11,'2015-10-05 09:07:52','2015-10-05 19:57:02',NULL,NULL,'zzeceo',1,NULL,NULL,NULL,'zzeceo','92af989c4c3a5140fb5d73eb77a52454',NULL,'cq78nf9m','Zeceo','Zack','President','','','','','','',0,NULL,NULL,NULL,1,1,NULL,NULL,NULL,'','2015-10-05 22:48:08','2015-10-05 21:18:46',NULL,'',1,NULL,NULL,NULL,NULL,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,NULL),(12,'2015-10-05 09:09:46','2016-01-22 13:13:42',NULL,NULL,'admin',0,NULL,NULL,NULL,'admin','21232f297a57a5a743894a0e4a801fc3',NULL,'nd6hgbcr','Adminson','Alice','Admin Technical','','','','','','',1,NULL,NULL,NULL,1,1,NULL,NULL,NULL,'','2016-01-22 18:11:06','2016-01-22 17:20:36',NULL,'',1,'mariecurie.jpg',NULL,NULL,11,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,'woman'),(13,'2015-10-05 21:29:35','2016-01-22 13:51:46',NULL,NULL,'ccommercy',1,NULL,NULL,NULL,'ccomercy','11c9c772d6471aa24c27274bdd8a223b',NULL,'y451ksdv','Commercy','Charle','Commercial leader','','','','','','',0,NULL,NULL,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,11,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,'man'),(14,'2015-10-05 21:33:33','2015-10-05 19:52:05',NULL,NULL,'sscientol',1,NULL,NULL,NULL,'sscientol','39bee07ac42f31c98e79cdcd5e5fe4c5',NULL,'s2hp8bxd','Scientol','Sam','Scientist leader','','','','','','',0,NULL,NULL,NULL,1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,11,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,NULL),(16,'2015-10-05 22:47:52','2015-11-15 22:25:17',NULL,NULL,'cc1',1,NULL,NULL,NULL,'cc1','d68005ccf362b82d084551b6291792a3',NULL,'cx9y1dk0','Charle1','Commerson','Sale representative','','','','','','',0,NULL,NULL,NULL,1,1,NULL,NULL,NULL,'','2015-10-05 23:46:24','2015-10-05 23:37:31',NULL,'',1,NULL,NULL,NULL,13,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,NULL),(17,'2015-10-05 22:48:39','2016-01-22 16:30:01',NULL,NULL,'cc2',1,NULL,NULL,NULL,'cc2','a964065211872fb76f876c6c3e952ea3',NULL,'gw8cb7xj','Charle2','Commerson','Sale representative','','','','','','',0,NULL,NULL,NULL,1,1,NULL,NULL,NULL,'','2015-10-05 23:16:06',NULL,NULL,'',0,NULL,NULL,NULL,13,NULL,'','','',NULL,NULL,'','',NULL,0,0,NULL,NULL,NULL,NULL,'man'),(18,'2016-01-22 17:27:02','2016-01-22 16:28:34',NULL,NULL,'ldestailleur',1,NULL,NULL,NULL,'3bfysn46','a66b0e4aef51147f9697c6f2b6df66aa',NULL,'87g06wbx','Destailleur','Laurent','Project leader of Dolibarr ERP CRM','','','','','ldestailleur@example.com','
Laurent DESTAILLEUR
\r\n\r\n
\r\n
Project Director
\r\nldestailleur@example.com
\r\n\r\n
 
\r\n\r\n\r\n
',0,NULL,NULL,NULL,1,1,NULL,NULL,NULL,'More information on http://www.destailleur.fr',NULL,NULL,NULL,'',1,'ldestailleur_200x200.jpg',NULL,NULL,NULL,NULL,'','','',NULL,NULL,'007f7f','',NULL,0,0,NULL,NULL,NULL,NULL,'man'); /*!40000 ALTER TABLE `llx_user` ENABLE KEYS */; UNLOCK TABLES; @@ -8395,7 +7667,7 @@ CREATE TABLE `llx_user_param` ( LOCK TABLES `llx_user_param` WRITE; /*!40000 ALTER TABLE `llx_user_param` DISABLE KEYS */; -INSERT INTO `llx_user_param` VALUES (1,1,'MAIN_BOXES_0','1'),(1,1,'MAIN_THEME','eldy'),(1,3,'THEME_ELDY_ENABLE_PERSONALIZED','1'),(1,1,'THEME_ELDY_RGB','ded0ed'),(1,3,'THEME_ELDY_RGB','d0ddc3'); +INSERT INTO `llx_user_param` VALUES (1,1,'MAIN_BOXES_0','1'),(1,1,'MAIN_THEME','eldy'),(1,3,'THEME_ELDY_ENABLE_PERSONALIZED','1'),(1,1,'THEME_ELDY_RGB','ded0ed'),(1,3,'THEME_ELDY_RGB','d0ddc3'),(11,1,'MAIN_BOXES_0','1'),(12,1,'MAIN_BOXES_0','1'); /*!40000 ALTER TABLE `llx_user_param` ENABLE KEYS */; UNLOCK TABLES; @@ -8413,7 +7685,7 @@ CREATE TABLE `llx_user_rights` ( PRIMARY KEY (`rowid`), UNIQUE KEY `uk_user_rights` (`fk_user`,`fk_id`), CONSTRAINT `fk_user_rights_fk_user_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=12664 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=14732 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8422,7 +7694,7 @@ CREATE TABLE `llx_user_rights` ( LOCK TABLES `llx_user_rights` WRITE; /*!40000 ALTER TABLE `llx_user_rights` DISABLE KEYS */; -INSERT INTO `llx_user_rights` VALUES (12402,1,11),(12380,1,12),(12385,1,13),(12389,1,14),(12393,1,15),(12398,1,16),(12404,1,19),(9726,1,21),(9700,1,22),(9706,1,24),(9711,1,25),(9716,1,26),(9722,1,27),(9728,1,28),(9978,1,31),(9968,1,32),(9974,1,34),(1910,1,36),(9980,1,38),(11573,1,41),(11574,1,42),(11575,1,44),(11576,1,45),(7184,1,61),(7181,1,62),(7183,1,64),(7185,1,67),(7186,1,68),(1678,1,71),(1673,1,72),(1675,1,74),(1679,1,75),(1677,1,76),(1681,1,78),(1682,1,79),(12322,1,81),(12309,1,82),(12312,1,84),(12314,1,86),(12317,1,87),(12320,1,88),(12323,1,89),(11580,1,91),(11581,1,92),(11582,1,93),(11583,1,94),(10097,1,95),(10099,1,96),(10103,1,97),(10104,1,98),(7139,1,101),(7134,1,102),(7136,1,104),(7137,1,105),(7138,1,106),(7140,1,109),(10229,1,111),(10201,1,112),(10207,1,113),(10213,1,114),(10219,1,115),(10225,1,116),(10231,1,117),(12518,1,121),(12508,1,122),(12514,1,125),(12520,1,126),(11577,1,141),(11578,1,142),(11579,1,144),(2307,1,151),(2304,1,152),(2306,1,153),(2308,1,154),(10092,1,161),(10093,1,162),(10094,1,163),(10095,1,164),(10096,1,165),(1585,1,170),(12342,1,171),(12331,1,172),(12335,1,173),(12339,1,174),(12343,1,178),(10000,1,221),(9990,1,222),(9996,1,223),(10002,1,229),(10007,1,237),(10011,1,238),(10015,1,239),(1686,1,241),(1685,1,242),(1687,1,243),(12604,1,251),(12566,1,252),(12569,1,253),(12572,1,254),(12575,1,255),(12579,1,256),(1617,1,258),(12525,1,262),(12544,1,281),(12534,1,282),(12540,1,283),(12546,1,286),(12288,1,300),(12290,1,301),(11591,1,302),(1763,1,331),(1762,1,332),(1764,1,333),(12582,1,341),(12584,1,342),(12586,1,343),(12588,1,344),(12600,1,351),(12593,1,352),(12597,1,353),(12601,1,354),(12605,1,358),(12560,1,531),(12553,1,532),(12557,1,534),(1625,1,536),(12561,1,538),(12358,1,700),(12348,1,701),(12354,1,702),(12360,1,703),(1755,1,1001),(1754,1,1002),(1756,1,1003),(1758,1,1004),(1759,1,1005),(7146,1,1101),(7143,1,1102),(7145,1,1104),(7147,1,1109),(12412,1,1181),(12458,1,1182),(12417,1,1183),(12420,1,1184),(12423,1,1185),(12427,1,1186),(12431,1,1187),(12437,1,1188),(12434,1,1189),(1578,1,1201),(1579,1,1202),(12454,1,1231),(12443,1,1232),(12446,1,1233),(12449,1,1234),(12452,1,1235),(12455,1,1236),(12459,1,1237),(1736,1,1251),(12409,1,1321),(12326,1,1421),(8190,1,1791),(8187,1,1792),(8191,1,1793),(12264,1,2401),(12260,1,2402),(12266,1,2403),(12280,1,2411),(12276,1,2412),(12282,1,2413),(12286,1,2414),(1618,1,2500),(12370,1,2501),(12367,1,2503),(12371,1,2515),(9610,1,5001),(9611,1,5002),(12490,1,20001),(12468,1,20002),(12474,1,20003),(12480,1,20004),(12486,1,20005),(12492,1,20006),(12302,1,23001),(12295,1,23002),(12299,1,23003),(12303,1,23004),(7701,1,50101),(4984,1,50401),(4983,1,50402),(4985,1,50403),(4987,1,50411),(4988,1,50412),(4989,1,50415),(12498,1,55001),(12499,1,55002),(3564,1,100700),(3565,1,100701),(9596,1,101051),(9598,1,101052),(9600,1,101053),(9604,1,101060),(9605,1,101061),(7177,1,101201),(7178,1,101202),(10353,1,101250),(10355,1,101251),(8980,1,101261),(8981,1,101262),(7616,1,101331),(10030,1,101701),(10031,1,101702),(3582,1,102000),(3583,1,102001),(9819,1,400051),(9823,1,400052),(9827,1,400053),(9831,1,400055),(132,2,11),(133,2,12),(134,2,13),(135,2,14),(136,2,16),(137,2,19),(138,2,21),(139,2,22),(140,2,24),(141,2,25),(142,2,26),(143,2,27),(10359,2,31),(145,2,32),(10361,2,34),(146,2,36),(147,2,41),(148,2,42),(149,2,44),(150,2,61),(151,2,62),(152,2,64),(153,2,71),(154,2,72),(155,2,74),(156,2,75),(157,2,78),(158,2,79),(159,2,81),(160,2,82),(161,2,84),(162,2,86),(163,2,87),(164,2,88),(165,2,89),(166,2,91),(167,2,92),(168,2,93),(2475,2,95),(2476,2,96),(2477,2,97),(2478,2,98),(169,2,101),(170,2,102),(171,2,104),(172,2,109),(173,2,111),(174,2,112),(175,2,113),(176,2,114),(177,2,116),(178,2,117),(179,2,121),(180,2,122),(181,2,125),(182,2,141),(183,2,142),(184,2,144),(2479,2,151),(2480,2,152),(2481,2,153),(2482,2,154),(185,2,161),(186,2,162),(187,2,163),(188,2,164),(189,2,165),(190,2,170),(2471,2,171),(192,2,172),(2472,2,173),(193,2,221),(194,2,222),(195,2,229),(196,2,241),(197,2,242),(198,2,243),(199,2,251),(201,2,262),(202,2,281),(203,2,282),(204,2,283),(205,2,331),(2483,2,531),(207,2,532),(2484,2,534),(208,2,536),(2473,2,700),(210,2,701),(211,2,702),(2474,2,703),(212,2,1001),(213,2,1002),(214,2,1003),(215,2,1004),(216,2,1005),(217,2,1101),(218,2,1102),(219,2,1104),(220,2,1109),(221,2,1181),(222,2,1182),(223,2,1183),(224,2,1184),(225,2,1185),(226,2,1186),(227,2,1187),(228,2,1188),(229,2,1201),(230,2,1202),(231,2,1231),(232,2,1232),(233,2,1233),(234,2,1234),(235,2,1421),(236,2,2401),(237,2,2402),(238,2,2403),(239,2,2411),(240,2,2412),(241,2,2413),(242,2,2500),(2470,2,2501),(243,2,2515),(10363,2,20001),(10364,2,20002),(10365,2,20003),(10366,2,20004),(10367,2,20005),(10368,2,20006),(10362,2,50101),(10372,2,101250),(1807,3,11),(1808,3,31),(1809,3,36),(1810,3,41),(1811,3,61),(1812,3,71),(1813,3,72),(1814,3,74),(1815,3,75),(1816,3,78),(1817,3,79),(1818,3,91),(1819,3,95),(1820,3,97),(1821,3,111),(1822,3,121),(1823,3,122),(1824,3,125),(1825,3,161),(1826,3,170),(1827,3,171),(1828,3,172),(1829,3,221),(1830,3,222),(1831,3,229),(1832,3,241),(1833,3,242),(1834,3,243),(1835,3,251),(1836,3,255),(1837,3,256),(1838,3,262),(1839,3,281),(1840,3,282),(1841,3,283),(1842,3,331),(1843,3,531),(1844,3,536),(1845,3,700),(1846,3,1001),(1847,3,1002),(1848,3,1003),(1849,3,1004),(1850,3,1005),(1851,3,1181),(1852,3,1182),(1853,3,1201),(1854,3,1202),(1855,3,1231),(1856,3,2401),(1857,3,2402),(1858,3,2403),(1859,3,2411),(1860,3,2412),(1861,3,2413),(1862,3,2500),(1863,3,2515),(8026,4,11),(8027,4,21),(8028,4,31),(8029,4,41),(8030,4,61),(8031,4,71),(8032,4,72),(8033,4,74),(8034,4,75),(8035,4,78),(8036,4,79),(8037,4,81),(8038,4,91),(8039,4,95),(8040,4,97),(8041,4,101),(8042,4,111),(8043,4,121),(8044,4,151),(8045,4,161),(8046,4,171),(8047,4,221),(8048,4,222),(8049,4,229),(8050,4,241),(8051,4,242),(8052,4,243),(8146,4,251),(8147,4,253),(8053,4,262),(8054,4,281),(8055,4,331),(8056,4,341),(8057,4,342),(8058,4,343),(8059,4,344),(8060,4,531),(8061,4,700),(8062,4,1001),(8063,4,1002),(8064,4,1003),(8065,4,1004),(8066,4,1005),(8067,4,1101),(8068,4,1181),(8069,4,1182),(8070,4,1201),(8071,4,1202),(8072,4,1231),(8073,4,2401),(8074,4,2501),(8075,4,2503),(8076,4,2515),(8077,4,20001),(8078,4,50101),(8079,4,101201),(8080,4,101261),(8081,4,102000),(8082,4,400051),(8083,4,400052),(8084,4,400053),(8085,4,400055),(8194,6,11),(8195,6,21),(8196,6,31),(8197,6,41),(8198,6,61),(8199,6,71),(8200,6,72),(8201,6,74),(8202,6,75),(8203,6,78),(8204,6,79),(8205,6,81),(8206,6,91),(8207,6,95),(8208,6,97),(8209,6,101),(8210,6,111),(8211,6,121),(8212,6,151),(8213,6,161),(8214,6,171),(8215,6,221),(8216,6,222),(8217,6,229),(8218,6,241),(8219,6,242),(8220,6,243),(8221,6,262),(8222,6,281),(8223,6,331),(8224,6,341),(8225,6,342),(8226,6,343),(8227,6,344),(8228,6,531),(8229,6,700),(8230,6,1001),(8231,6,1002),(8232,6,1003),(8233,6,1004),(8234,6,1005),(8235,6,1101),(8236,6,1181),(8237,6,1182),(8238,6,1201),(8239,6,1202),(8240,6,1231),(8241,6,1791),(8242,6,2401),(8243,6,2501),(8244,6,2503),(8245,6,2515),(8246,6,5001),(8247,6,20001),(8248,6,50101),(8249,6,101201),(8250,6,101261),(8251,6,102000),(8252,6,400051),(8253,6,400052),(8254,6,400053),(8255,6,400055),(8256,7,11),(8257,7,21),(8258,7,31),(8259,7,41),(8260,7,61),(8261,7,71),(8262,7,72),(8263,7,74),(8264,7,75),(8265,7,78),(8266,7,79),(8267,7,81),(8268,7,91),(8269,7,95),(8270,7,97),(8271,7,101),(8272,7,111),(8273,7,121),(8274,7,151),(8275,7,161),(8276,7,171),(8277,7,221),(8278,7,222),(8279,7,229),(8280,7,241),(8281,7,242),(8282,7,243),(8283,7,262),(8284,7,281),(8285,7,331),(8286,7,341),(8287,7,342),(8288,7,343),(8289,7,344),(8290,7,531),(8291,7,700),(8292,7,1001),(8293,7,1002),(8294,7,1003),(8295,7,1004),(8296,7,1005),(8297,7,1101),(8298,7,1181),(8299,7,1182),(8300,7,1201),(8301,7,1202),(8302,7,1231),(8303,7,1791),(8304,7,2401),(8305,7,2501),(8306,7,2503),(8307,7,2515),(8308,7,5001),(8309,7,20001),(8310,7,50101),(8311,7,101201),(8312,7,101261),(8313,7,102000),(8314,7,400051),(8315,7,400052),(8316,7,400053),(8317,7,400055),(8318,9,11),(8319,9,21),(8320,9,31),(8321,9,41),(8322,9,61),(8323,9,71),(8324,9,72),(8325,9,74),(8326,9,75),(8327,9,78),(8328,9,79),(8329,9,81),(8330,9,91),(8331,9,95),(8332,9,97),(8333,9,101),(8334,9,111),(8335,9,121),(8336,9,151),(8337,9,161),(8338,9,171),(8339,9,221),(8340,9,222),(8341,9,229),(8342,9,241),(8343,9,242),(8344,9,243),(8345,9,262),(8346,9,281),(8347,9,331),(8348,9,341),(8349,9,342),(8350,9,343),(8351,9,344),(8352,9,531),(8353,9,700),(8354,9,1001),(8355,9,1002),(8356,9,1003),(8357,9,1004),(8358,9,1005),(8359,9,1101),(8360,9,1181),(8361,9,1182),(8362,9,1201),(8363,9,1202),(8364,9,1231),(8365,9,1791),(8366,9,2401),(8367,9,2501),(8368,9,2503),(8369,9,2515),(8370,9,5001),(8371,9,20001),(8372,9,50101),(8373,9,101201),(8374,9,101261),(8375,9,102000),(8376,9,400051),(8377,9,400052),(8378,9,400053),(8379,9,400055),(12608,10,11),(12609,10,21),(12610,10,31),(12611,10,41),(12612,10,61),(12613,10,71),(12614,10,72),(12615,10,74),(12616,10,75),(12617,10,78),(12618,10,79),(12619,10,81),(12620,10,91),(12621,10,95),(12622,10,97),(12623,10,101),(12624,10,111),(12625,10,121),(12626,10,151),(12627,10,161),(12628,10,171),(12629,10,221),(12630,10,222),(12631,10,229),(12632,10,241),(12633,10,242),(12634,10,243),(12635,10,262),(12636,10,281),(12637,10,300),(12638,10,331),(12639,10,341),(12640,10,342),(12641,10,343),(12642,10,344),(12643,10,531),(12644,10,700),(12645,10,1001),(12646,10,1002),(12647,10,1003),(12648,10,1004),(12649,10,1005),(12650,10,1101),(12651,10,1181),(12652,10,1182),(12653,10,1201),(12654,10,1202),(12655,10,1231),(12656,10,2401),(12657,10,2501),(12658,10,2503),(12659,10,2515),(12660,10,20001),(12661,10,20002),(12662,10,23001),(12663,10,50101); +INSERT INTO `llx_user_rights` VALUES (12402,1,11),(12380,1,12),(12385,1,13),(12389,1,14),(12393,1,15),(12398,1,16),(12404,1,19),(9726,1,21),(9700,1,22),(9706,1,24),(9711,1,25),(9716,1,26),(9722,1,27),(9728,1,28),(9978,1,31),(9968,1,32),(9974,1,34),(1910,1,36),(9980,1,38),(11573,1,41),(11574,1,42),(11575,1,44),(11576,1,45),(7184,1,61),(7181,1,62),(7183,1,64),(7185,1,67),(7186,1,68),(1678,1,71),(1673,1,72),(1675,1,74),(1679,1,75),(1677,1,76),(1681,1,78),(1682,1,79),(12322,1,81),(12309,1,82),(12312,1,84),(12314,1,86),(12317,1,87),(12320,1,88),(12323,1,89),(11580,1,91),(11581,1,92),(11582,1,93),(11583,1,94),(10097,1,95),(10099,1,96),(10103,1,97),(10104,1,98),(7139,1,101),(7134,1,102),(7136,1,104),(7137,1,105),(7138,1,106),(7140,1,109),(10229,1,111),(10201,1,112),(10207,1,113),(10213,1,114),(10219,1,115),(10225,1,116),(10231,1,117),(12518,1,121),(12508,1,122),(12514,1,125),(12520,1,126),(11577,1,141),(11578,1,142),(11579,1,144),(2307,1,151),(2304,1,152),(2306,1,153),(2308,1,154),(10092,1,161),(10093,1,162),(10094,1,163),(10095,1,164),(10096,1,165),(1585,1,170),(12342,1,171),(12331,1,172),(12335,1,173),(12339,1,174),(12343,1,178),(10000,1,221),(9990,1,222),(9996,1,223),(10002,1,229),(10007,1,237),(10011,1,238),(10015,1,239),(1686,1,241),(1685,1,242),(1687,1,243),(12604,1,251),(12566,1,252),(12569,1,253),(12572,1,254),(12575,1,255),(12579,1,256),(1617,1,258),(12525,1,262),(12544,1,281),(12534,1,282),(12540,1,283),(12546,1,286),(12288,1,300),(12290,1,301),(11591,1,302),(1763,1,331),(1762,1,332),(1764,1,333),(12582,1,341),(12584,1,342),(12586,1,343),(12588,1,344),(12600,1,351),(12593,1,352),(12597,1,353),(12601,1,354),(12605,1,358),(12560,1,531),(12553,1,532),(12557,1,534),(1625,1,536),(12561,1,538),(12358,1,700),(12348,1,701),(12354,1,702),(12360,1,703),(1755,1,1001),(1754,1,1002),(1756,1,1003),(1758,1,1004),(1759,1,1005),(7146,1,1101),(7143,1,1102),(7145,1,1104),(7147,1,1109),(12412,1,1181),(12458,1,1182),(12417,1,1183),(12420,1,1184),(12423,1,1185),(12427,1,1186),(12431,1,1187),(12437,1,1188),(12434,1,1189),(1578,1,1201),(1579,1,1202),(12454,1,1231),(12443,1,1232),(12446,1,1233),(12449,1,1234),(12452,1,1235),(12455,1,1236),(12459,1,1237),(1736,1,1251),(12409,1,1321),(12326,1,1421),(8190,1,1791),(8187,1,1792),(8191,1,1793),(12264,1,2401),(12260,1,2402),(12266,1,2403),(12280,1,2411),(12276,1,2412),(12282,1,2413),(12286,1,2414),(1618,1,2500),(12370,1,2501),(12367,1,2503),(12371,1,2515),(9610,1,5001),(9611,1,5002),(12490,1,20001),(12468,1,20002),(12474,1,20003),(12480,1,20004),(12486,1,20005),(12492,1,20006),(12302,1,23001),(12295,1,23002),(12299,1,23003),(12303,1,23004),(7701,1,50101),(4984,1,50401),(4983,1,50402),(4985,1,50403),(4987,1,50411),(4988,1,50412),(4989,1,50415),(12498,1,55001),(12499,1,55002),(3564,1,100700),(3565,1,100701),(9596,1,101051),(9598,1,101052),(9600,1,101053),(9604,1,101060),(9605,1,101061),(7177,1,101201),(7178,1,101202),(10353,1,101250),(10355,1,101251),(8980,1,101261),(8981,1,101262),(7616,1,101331),(10030,1,101701),(10031,1,101702),(3582,1,102000),(3583,1,102001),(9819,1,400051),(9823,1,400052),(9827,1,400053),(9831,1,400055),(132,2,11),(133,2,12),(134,2,13),(135,2,14),(136,2,16),(137,2,19),(138,2,21),(139,2,22),(140,2,24),(141,2,25),(142,2,26),(143,2,27),(10359,2,31),(145,2,32),(10361,2,34),(146,2,36),(147,2,41),(148,2,42),(149,2,44),(150,2,61),(151,2,62),(152,2,64),(153,2,71),(154,2,72),(155,2,74),(156,2,75),(157,2,78),(158,2,79),(159,2,81),(160,2,82),(161,2,84),(162,2,86),(163,2,87),(164,2,88),(165,2,89),(166,2,91),(167,2,92),(168,2,93),(2475,2,95),(2476,2,96),(2477,2,97),(2478,2,98),(169,2,101),(170,2,102),(171,2,104),(172,2,109),(173,2,111),(174,2,112),(175,2,113),(176,2,114),(177,2,116),(178,2,117),(179,2,121),(180,2,122),(181,2,125),(182,2,141),(183,2,142),(184,2,144),(2479,2,151),(2480,2,152),(2481,2,153),(2482,2,154),(185,2,161),(186,2,162),(187,2,163),(188,2,164),(189,2,165),(190,2,170),(2471,2,171),(192,2,172),(2472,2,173),(193,2,221),(194,2,222),(195,2,229),(196,2,241),(197,2,242),(198,2,243),(199,2,251),(201,2,262),(202,2,281),(203,2,282),(204,2,283),(205,2,331),(2483,2,531),(207,2,532),(2484,2,534),(208,2,536),(2473,2,700),(210,2,701),(211,2,702),(2474,2,703),(212,2,1001),(213,2,1002),(214,2,1003),(215,2,1004),(216,2,1005),(217,2,1101),(218,2,1102),(219,2,1104),(220,2,1109),(221,2,1181),(222,2,1182),(223,2,1183),(224,2,1184),(225,2,1185),(226,2,1186),(227,2,1187),(228,2,1188),(229,2,1201),(230,2,1202),(231,2,1231),(232,2,1232),(233,2,1233),(234,2,1234),(235,2,1421),(236,2,2401),(237,2,2402),(238,2,2403),(239,2,2411),(240,2,2412),(241,2,2413),(242,2,2500),(2470,2,2501),(243,2,2515),(10363,2,20001),(10364,2,20002),(10365,2,20003),(10366,2,20004),(10367,2,20005),(10368,2,20006),(10362,2,50101),(10372,2,101250),(1807,3,11),(1808,3,31),(1809,3,36),(1810,3,41),(1811,3,61),(1812,3,71),(1813,3,72),(1814,3,74),(1815,3,75),(1816,3,78),(1817,3,79),(1818,3,91),(1819,3,95),(1820,3,97),(1821,3,111),(1822,3,121),(1823,3,122),(1824,3,125),(1825,3,161),(1826,3,170),(1827,3,171),(1828,3,172),(1829,3,221),(1830,3,222),(1831,3,229),(1832,3,241),(1833,3,242),(1834,3,243),(1835,3,251),(1836,3,255),(1837,3,256),(1838,3,262),(1839,3,281),(1840,3,282),(1841,3,283),(1842,3,331),(1843,3,531),(1844,3,536),(1845,3,700),(1846,3,1001),(1847,3,1002),(1848,3,1003),(1849,3,1004),(1850,3,1005),(1851,3,1181),(1852,3,1182),(1853,3,1201),(1854,3,1202),(1855,3,1231),(1856,3,2401),(1857,3,2402),(1858,3,2403),(1859,3,2411),(1860,3,2412),(1861,3,2413),(1862,3,2500),(1863,3,2515),(8026,4,11),(8027,4,21),(8028,4,31),(8029,4,41),(8030,4,61),(8031,4,71),(8032,4,72),(8033,4,74),(8034,4,75),(8035,4,78),(8036,4,79),(8037,4,81),(8038,4,91),(8039,4,95),(8040,4,97),(8041,4,101),(8042,4,111),(8043,4,121),(8044,4,151),(8045,4,161),(8046,4,171),(8047,4,221),(8048,4,222),(8049,4,229),(8050,4,241),(8051,4,242),(8052,4,243),(8146,4,251),(8147,4,253),(8053,4,262),(8054,4,281),(8055,4,331),(8056,4,341),(8057,4,342),(8058,4,343),(8059,4,344),(8060,4,531),(8061,4,700),(8062,4,1001),(8063,4,1002),(8064,4,1003),(8065,4,1004),(8066,4,1005),(8067,4,1101),(8068,4,1181),(8069,4,1182),(8070,4,1201),(8071,4,1202),(8072,4,1231),(8073,4,2401),(8074,4,2501),(8075,4,2503),(8076,4,2515),(8077,4,20001),(8078,4,50101),(8079,4,101201),(8080,4,101261),(8081,4,102000),(8082,4,400051),(8083,4,400052),(8084,4,400053),(8085,4,400055),(12608,10,11),(12609,10,21),(12610,10,31),(12611,10,41),(12612,10,61),(12613,10,71),(12614,10,72),(12615,10,74),(12616,10,75),(12617,10,78),(12618,10,79),(12619,10,81),(12620,10,91),(12621,10,95),(12622,10,97),(12623,10,101),(12624,10,111),(12625,10,121),(12626,10,151),(12627,10,161),(12628,10,171),(12629,10,221),(12630,10,222),(12631,10,229),(12632,10,241),(12633,10,242),(12634,10,243),(12635,10,262),(12636,10,281),(12637,10,300),(12638,10,331),(12639,10,341),(12640,10,342),(12641,10,343),(12642,10,344),(12643,10,531),(12644,10,700),(12645,10,1001),(12646,10,1002),(12647,10,1003),(12648,10,1004),(12649,10,1005),(12650,10,1101),(12651,10,1181),(12652,10,1182),(12653,10,1201),(12654,10,1202),(12655,10,1231),(12656,10,2401),(12657,10,2501),(12658,10,2503),(12659,10,2515),(12660,10,20001),(12661,10,20002),(12662,10,23001),(12663,10,50101),(12664,11,11),(12665,11,21),(12666,11,31),(12667,11,41),(12668,11,61),(12669,11,71),(12670,11,72),(12671,11,74),(12672,11,75),(12673,11,78),(12674,11,79),(12675,11,81),(12676,11,91),(12677,11,95),(12678,11,97),(12679,11,101),(12680,11,111),(12681,11,121),(12682,11,151),(12683,11,161),(12684,11,171),(12685,11,221),(12686,11,222),(12687,11,229),(12688,11,241),(12689,11,242),(12690,11,243),(12691,11,262),(12692,11,281),(12693,11,300),(12694,11,331),(12695,11,341),(12696,11,342),(12697,11,343),(12698,11,344),(12699,11,531),(12700,11,700),(12701,11,1001),(12702,11,1002),(12703,11,1003),(12704,11,1004),(12705,11,1005),(12706,11,1101),(12707,11,1181),(12708,11,1182),(12709,11,1201),(12710,11,1202),(12711,11,1231),(12712,11,2401),(12713,11,2501),(12714,11,2503),(12715,11,2515),(12716,11,20001),(12717,11,20002),(12718,11,23001),(12719,11,50101),(14607,12,11),(14597,12,12),(14599,12,13),(14601,12,14),(14603,12,15),(14606,12,16),(14609,12,19),(14146,12,21),(14135,12,22),(14137,12,24),(14139,12,25),(14142,12,26),(14145,12,27),(14148,12,28),(14181,12,31),(14177,12,32),(14180,12,34),(14183,12,38),(13816,12,41),(13813,12,42),(13815,12,44),(13817,12,45),(14094,12,61),(14091,12,62),(14093,12,64),(14095,12,67),(14096,12,68),(13891,12,71),(13886,12,72),(13888,12,74),(13892,12,75),(13890,12,76),(13894,12,78),(13895,12,79),(14577,12,81),(14571,12,82),(14572,12,84),(14573,12,86),(14575,12,87),(14576,12,88),(14578,12,89),(13904,12,91),(13900,12,92),(13903,12,93),(13906,12,94),(13990,12,95),(12734,12,97),(13669,12,101),(13665,12,102),(13666,12,104),(13667,12,105),(13668,12,106),(13670,12,109),(14051,12,111),(14038,12,112),(14041,12,113),(14044,12,114),(14047,12,115),(14050,12,116),(14053,12,117),(14665,12,121),(14661,12,122),(14664,12,125),(14667,12,126),(13821,12,141),(13820,12,142),(13822,12,144),(13912,12,151),(13909,12,152),(13911,12,153),(13913,12,154),(14063,12,161),(14056,12,162),(14058,12,163),(14060,12,164),(14062,12,165),(14064,12,167),(13350,12,171),(13345,12,172),(13347,12,173),(13349,12,174),(13351,12,178),(13838,12,221),(13834,12,222),(13837,12,223),(13840,12,229),(13842,12,237),(13844,12,238),(13846,12,239),(13516,12,241),(13515,12,242),(13517,12,243),(14730,12,251),(14711,12,252),(14713,12,253),(14714,12,254),(14716,12,255),(14718,12,256),(14669,12,262),(14678,12,281),(14674,12,282),(14677,12,283),(14680,12,286),(14567,12,300),(14568,12,301),(14126,12,331),(14125,12,332),(14127,12,333),(14719,12,341),(14720,12,342),(14721,12,343),(14722,12,344),(14728,12,351),(14725,12,352),(14727,12,353),(14729,12,354),(14731,12,358),(13865,12,510),(13862,12,512),(13864,12,514),(13866,12,517),(14686,12,531),(14683,12,532),(14685,12,534),(14687,12,538),(13358,12,700),(14585,12,701),(14584,12,702),(14587,12,703),(13858,12,771),(13849,12,772),(13851,12,773),(13853,12,774),(13855,12,775),(13857,12,776),(13859,12,779),(13647,12,1001),(13646,12,1002),(13648,12,1003),(13650,12,1004),(13651,12,1005),(13675,12,1101),(13673,12,1102),(13674,12,1104),(13676,12,1109),(14612,12,1181),(14635,12,1182),(14615,12,1183),(14616,12,1184),(14618,12,1185),(14620,12,1186),(14622,12,1187),(14625,12,1188),(14623,12,1189),(13827,12,1201),(13828,12,1202),(14633,12,1231),(14628,12,1232),(14629,12,1233),(14631,12,1234),(14632,12,1235),(14634,12,1236),(14636,12,1237),(13829,12,1251),(14611,12,1321),(14579,12,1421),(14555,12,2401),(14554,12,2402),(14557,12,2403),(14563,12,2411),(14562,12,2412),(14565,12,2413),(14566,12,2414),(14591,12,2501),(14590,12,2503),(14592,12,2515),(14651,12,20001),(14641,12,20002),(14644,12,20003),(14647,12,20004),(14650,12,20005),(14653,12,20006),(13330,12,23001),(13327,12,23002),(13329,12,23003),(13331,12,23004),(13712,12,50101),(14655,12,55001),(14656,12,55002),(14128,12,59001),(14129,12,59002),(14130,12,59003),(12776,13,11),(12777,13,21),(12778,13,31),(12779,13,41),(12780,13,61),(12781,13,71),(12782,13,72),(12783,13,74),(12784,13,75),(12785,13,78),(12786,13,79),(12787,13,81),(12788,13,91),(12789,13,95),(12790,13,97),(12791,13,101),(12792,13,111),(12793,13,121),(12794,13,151),(12795,13,161),(12796,13,171),(12797,13,221),(12798,13,222),(12799,13,229),(12800,13,241),(12801,13,242),(12802,13,243),(12803,13,262),(12804,13,281),(12805,13,300),(12806,13,331),(12807,13,341),(12808,13,342),(12809,13,343),(12810,13,344),(12811,13,531),(12812,13,700),(12813,13,1001),(12814,13,1002),(12815,13,1003),(12816,13,1004),(12817,13,1005),(12818,13,1101),(12819,13,1181),(12820,13,1182),(12821,13,1201),(12822,13,1202),(12823,13,1231),(12824,13,2401),(12825,13,2501),(12826,13,2503),(12827,13,2515),(12828,13,20001),(12829,13,20002),(12830,13,23001),(12831,13,50101),(12832,14,11),(12833,14,21),(12834,14,31),(12835,14,41),(12836,14,61),(12837,14,71),(12838,14,72),(12839,14,74),(12840,14,75),(12841,14,78),(12842,14,79),(12843,14,81),(12844,14,91),(12845,14,95),(12846,14,97),(12847,14,101),(12848,14,111),(12849,14,121),(12850,14,151),(12851,14,161),(12852,14,171),(12853,14,221),(12854,14,222),(12855,14,229),(12856,14,241),(12857,14,242),(12858,14,243),(12859,14,262),(12860,14,281),(12861,14,300),(12862,14,331),(12863,14,341),(12864,14,342),(12865,14,343),(12866,14,344),(12867,14,531),(12868,14,700),(12869,14,1001),(12870,14,1002),(12871,14,1003),(12872,14,1004),(12873,14,1005),(12874,14,1101),(12875,14,1181),(12876,14,1182),(12877,14,1201),(12878,14,1202),(12879,14,1231),(12880,14,2401),(12881,14,2501),(12882,14,2503),(12883,14,2515),(12884,14,20001),(12885,14,20002),(12886,14,23001),(12887,14,50101),(12944,16,11),(12945,16,21),(12946,16,31),(13056,16,41),(13057,16,42),(13058,16,44),(13059,16,45),(12948,16,61),(12949,16,71),(12950,16,72),(12951,16,74),(12952,16,75),(12953,16,78),(12954,16,79),(12955,16,81),(12956,16,91),(12957,16,95),(12958,16,97),(12959,16,101),(12960,16,111),(12961,16,121),(13060,16,141),(13061,16,142),(13062,16,144),(12962,16,151),(12963,16,161),(12964,16,171),(12965,16,221),(12966,16,222),(12967,16,229),(12968,16,241),(12969,16,242),(12970,16,243),(13128,16,251),(13064,16,262),(12972,16,281),(12973,16,300),(12974,16,331),(12975,16,341),(12976,16,342),(12977,16,343),(12978,16,344),(12979,16,531),(12980,16,700),(12981,16,1001),(12982,16,1002),(12983,16,1003),(12984,16,1004),(12985,16,1005),(12986,16,1101),(12987,16,1181),(12988,16,1182),(12989,16,1201),(12990,16,1202),(12991,16,1231),(12992,16,2401),(12993,16,2501),(12994,16,2503),(12995,16,2515),(12996,16,20001),(12997,16,20002),(12998,16,23001),(12999,16,50101),(13000,17,11),(13001,17,21),(13002,17,31),(13065,17,41),(13066,17,42),(13067,17,44),(13068,17,45),(13004,17,61),(13005,17,71),(13006,17,72),(13007,17,74),(13008,17,75),(13009,17,78),(13010,17,79),(13011,17,81),(13012,17,91),(13013,17,95),(13014,17,97),(13015,17,101),(13016,17,111),(13017,17,121),(13069,17,141),(13070,17,142),(13071,17,144),(13018,17,151),(13019,17,161),(13020,17,171),(13021,17,221),(13022,17,222),(13023,17,229),(13024,17,241),(13025,17,242),(13026,17,243),(13028,17,281),(13029,17,300),(13030,17,331),(13031,17,341),(13032,17,342),(13033,17,343),(13034,17,344),(13035,17,531),(13036,17,700),(13037,17,1001),(13038,17,1002),(13039,17,1003),(13040,17,1004),(13041,17,1005),(13042,17,1101),(13043,17,1181),(13044,17,1182),(13045,17,1201),(13046,17,1202),(13047,17,1231),(13048,17,2401),(13049,17,2501),(13050,17,2503),(13051,17,2515),(13052,17,20001),(13053,17,20002),(13054,17,23001),(13055,17,50101),(14504,18,11),(14505,18,21),(14506,18,31),(14507,18,41),(14508,18,61),(14509,18,71),(14510,18,78),(14511,18,81),(14512,18,91),(14513,18,95),(14514,18,101),(14515,18,111),(14516,18,121),(14517,18,151),(14518,18,161),(14519,18,221),(14520,18,241),(14521,18,262),(14522,18,281),(14523,18,300),(14524,18,331),(14525,18,332),(14526,18,333),(14527,18,341),(14528,18,342),(14529,18,343),(14530,18,344),(14531,18,531),(14532,18,701),(14533,18,771),(14534,18,774),(14535,18,1001),(14536,18,1004),(14537,18,1101),(14538,18,1181),(14539,18,1182),(14540,18,1201),(14541,18,1231),(14542,18,2401),(14543,18,2501),(14544,18,2503),(14545,18,2515),(14546,18,20001),(14547,18,20002),(14548,18,50101),(14549,18,59001); /*!40000 ALTER TABLE `llx_user_rights` ENABLE KEYS */; UNLOCK TABLES; @@ -8442,7 +7714,7 @@ CREATE TABLE `llx_usergroup` ( `note` text, PRIMARY KEY (`rowid`), UNIQUE KEY `uk_usergroup_name` (`nom`,`entity`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8451,7 +7723,7 @@ CREATE TABLE `llx_usergroup` ( LOCK TABLES `llx_usergroup` WRITE; /*!40000 ALTER TABLE `llx_usergroup` DISABLE KEYS */; -INSERT INTO `llx_usergroup` VALUES (1,'Sale representatives',1,'2013-01-16 20:48:08','2015-10-03 09:44:44','All sales representative users'),(2,'Management',1,'2015-10-03 11:46:25','2015-10-03 09:46:25',''),(3,'Scientists',1,'2015-10-03 11:46:46','2015-10-03 09:46:46',''); +INSERT INTO `llx_usergroup` VALUES (1,'Sale representatives',1,'2013-01-16 20:48:08','2015-10-03 09:44:44','All sales representative users'),(2,'Management',1,'2015-10-03 11:46:25','2015-10-03 09:46:25',''),(3,'Scientists',1,'2015-10-03 11:46:46','2015-10-03 09:46:46',''),(4,'Commercial',1,'2015-10-05 21:30:13','2015-10-05 19:30:13',''); /*!40000 ALTER TABLE `llx_usergroup` ENABLE KEYS */; UNLOCK TABLES; @@ -8495,7 +7767,7 @@ CREATE TABLE `llx_usergroup_rights` ( PRIMARY KEY (`rowid`), UNIQUE KEY `fk_usergroup` (`fk_usergroup`,`fk_id`), CONSTRAINT `fk_usergroup_rights_fk_usergroup` FOREIGN KEY (`fk_usergroup`) REFERENCES `llx_usergroup` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=200 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8504,7 +7776,7 @@ CREATE TABLE `llx_usergroup_rights` ( LOCK TABLES `llx_usergroup_rights` WRITE; /*!40000 ALTER TABLE `llx_usergroup_rights` DISABLE KEYS */; -INSERT INTO `llx_usergroup_rights` VALUES (1,1,2401),(2,1,2402),(3,1,2403),(4,1,2411),(5,1,2412),(6,1,2413); +INSERT INTO `llx_usergroup_rights` VALUES (1,1,2401),(2,1,2402),(3,1,2403),(4,1,2411),(5,1,2412),(6,1,2413),(78,2,11),(79,2,12),(80,2,13),(81,2,14),(82,2,15),(83,2,16),(84,2,19),(144,2,21),(145,2,22),(146,2,24),(147,2,25),(148,2,26),(149,2,27),(150,2,28),(133,2,31),(134,2,32),(135,2,34),(136,2,38),(137,2,41),(138,2,42),(139,2,44),(140,2,45),(86,2,61),(87,2,62),(88,2,64),(89,2,67),(90,2,68),(7,2,71),(8,2,72),(9,2,74),(10,2,75),(11,2,76),(12,2,78),(13,2,79),(32,2,81),(33,2,82),(34,2,84),(35,2,86),(36,2,87),(37,2,88),(38,2,89),(173,2,91),(174,2,92),(175,2,93),(176,2,94),(40,2,95),(41,2,96),(42,2,97),(43,2,98),(66,2,101),(67,2,102),(68,2,104),(69,2,105),(70,2,106),(71,2,109),(21,2,111),(22,2,112),(23,2,113),(24,2,114),(25,2,115),(26,2,116),(27,2,117),(164,2,121),(165,2,122),(166,2,125),(167,2,126),(141,2,141),(142,2,142),(143,2,144),(129,2,151),(130,2,152),(131,2,153),(132,2,154),(44,2,161),(45,2,162),(46,2,163),(47,2,164),(48,2,165),(49,2,167),(54,2,171),(55,2,172),(56,2,173),(57,2,174),(58,2,178),(120,2,221),(121,2,222),(122,2,223),(123,2,229),(124,2,237),(125,2,238),(126,2,239),(29,2,241),(30,2,242),(31,2,243),(182,2,251),(183,2,252),(184,2,253),(185,2,254),(186,2,255),(187,2,256),(168,2,262),(169,2,281),(170,2,282),(171,2,283),(172,2,286),(197,2,331),(198,2,332),(199,2,333),(188,2,341),(189,2,342),(190,2,343),(191,2,344),(192,2,351),(193,2,352),(194,2,353),(195,2,354),(196,2,358),(151,2,531),(152,2,532),(153,2,534),(154,2,538),(59,2,700),(60,2,701),(61,2,702),(62,2,703),(177,2,1001),(178,2,1002),(179,2,1003),(180,2,1004),(181,2,1005),(72,2,1101),(73,2,1102),(74,2,1104),(75,2,1109),(91,2,1181),(92,2,1182),(93,2,1183),(94,2,1184),(95,2,1185),(96,2,1186),(97,2,1187),(98,2,1188),(99,2,1189),(76,2,1201),(77,2,1202),(100,2,1231),(101,2,1232),(102,2,1233),(103,2,1234),(104,2,1235),(105,2,1236),(106,2,1237),(113,2,1251),(85,2,1321),(39,2,1421),(14,2,2401),(15,2,2402),(16,2,2403),(17,2,2411),(18,2,2412),(19,2,2413),(20,2,2414),(63,2,2501),(64,2,2503),(65,2,2515),(114,2,20001),(115,2,20002),(116,2,20003),(117,2,20004),(118,2,20005),(119,2,20006),(50,2,23001),(51,2,23002),(52,2,23003),(53,2,23004),(28,2,50101),(127,2,55001),(128,2,55002); /*!40000 ALTER TABLE `llx_usergroup_rights` ENABLE KEYS */; UNLOCK TABLES; @@ -8526,7 +7798,7 @@ CREATE TABLE `llx_usergroup_user` ( KEY `fk_usergroup_user_fk_usergroup` (`fk_usergroup`), CONSTRAINT `fk_usergroup_user_fk_user` FOREIGN KEY (`fk_user`) REFERENCES `llx_user` (`rowid`), CONSTRAINT `fk_usergroup_user_fk_usergroup` FOREIGN KEY (`fk_usergroup`) REFERENCES `llx_usergroup` (`rowid`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -8535,7 +7807,7 @@ CREATE TABLE `llx_usergroup_user` ( LOCK TABLES `llx_usergroup_user` WRITE; /*!40000 ALTER TABLE `llx_usergroup_user` DISABLE KEYS */; -INSERT INTO `llx_usergroup_user` VALUES (1,1,1,1),(2,1,1,3),(3,1,3,3); +INSERT INTO `llx_usergroup_user` VALUES (2,1,1,3),(3,1,3,3),(4,1,11,2),(5,1,13,4),(6,1,16,1),(7,1,17,1),(11,1,18,1),(8,1,18,2),(9,1,18,3),(10,1,18,4); /*!40000 ALTER TABLE `llx_usergroup_user` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -8548,4 +7820,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2015-10-03 13:00:02 +-- Dump completed on 2016-01-23 12:01:52 diff --git a/dev/initdata/savedemo.sh b/dev/initdata/savedemo.sh index c4de22c5e2f..0f21aa9e6a8 100755 --- a/dev/initdata/savedemo.sh +++ b/dev/initdata/savedemo.sh @@ -171,15 +171,20 @@ export list=" --ignore-table=$base.llx_abonne_extrafields --ignore-table=$base.llx_abonne_type --ignore-table=$base.llx_abonnement + --ignore-table=$base.llx_advanced_extrafields + --ignore-table=$base.llx_advanced_extrafields_options + --ignore-table=$base.llx_advanced_extrafields_values + --ignore-table=$base.llx_bookkeeping --ignore-table=$base.llx_bootstrap --ignore-table=$base.llx_bt_namemap --ignore-table=$base.llx_bt_speedlimit --ignore-table=$base.llx_bt_summary --ignore-table=$base.llx_bt_timestamps --ignore-table=$base.llx_bt_webseedfiles - --ignore-table=$base.llx_dolicloud_customers - --ignore-table=$base.llx_dolicloud_stats + --ignore-table=$base.llx_c_civilite --ignore-table=$base.llx_c_dolicloud_plans + --ignore-table=$base.llx_c_lead_status + --ignore-table=$base.llx_c_source --ignore-table=$base.llx_cabinetmed_c_banques --ignore-table=$base.llx_cabinetmed_c_ccam --ignore-table=$base.llx_cabinetmed_c_examconclusion @@ -191,16 +196,34 @@ export list=" --ignore-table=$base.llx_cabinetmed_motifcons --ignore-table=$base.llx_cabinetmed_patient --ignore-table=$base.llx_cabinetmed_societe + --ignore-table=$base.llx_dolicloud_customers + --ignore-table=$base.llx_dolicloud_stats + --ignore-table=$base.llx_dolicloud_emailstemplates + --ignore-table=$base.llx_domain + --ignore-table=$base.llx_element_rang + --ignore-table=$base.llx_entity + --ignore-table=$base.llx_filemanager_roots --ignore-table=$base.llx_fournisseur_ca --ignore-table=$base.llx_google_maps + --ignore-table=$base.llx_monitoring_probes --ignore-table=$base.llx_notes + --ignore-table=$base.llx_pos_cash + --ignore-table=$base.llx_pos_control_cash + --ignore-table=$base.llx_pos_facture + --ignore-table=$base.llx_pos_moviments + --ignore-table=$base.llx_pos_ticketdet --ignore-table=$base.llx_pos_paiement_ticket --ignore-table=$base.llx_pos_places --ignore-table=$base.llx_pos_ticket + --ignore-table=$base.llx_printer_ipp --ignore-table=$base.llx_publi_c_contact_list --ignore-table=$base.llx_publi_c_dnd_list --ignore-table=$base.llx_publi_c_method_list + --ignore-table=$base.llx_residence + --ignore-table=$base.llx_residence_building + --ignore-table=$base.llx_residence_building_links --ignore-table=$base.llx_ultimatepdf + --ignore-table=$base.llx_update_modules --ignore-table=$base.llx_ventilation_achat " echo "mysqldump -P$port -u$admin -p***** $list $base > $mydir/$dumpfile" diff --git a/dev/initdata/sftpget_and_loaddump.php b/dev/initdata/sftpget_and_loaddump.php index c91ddcc3e17..64c5ddeb24d 100755 --- a/dev/initdata/sftpget_and_loaddump.php +++ b/dev/initdata/sftpget_and_loaddump.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php * @@ -15,6 +15,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * or see http://www.gnu.org/ + * + * Get a distant dump file and load it into a mysql database */ $sapi_type = php_sapi_name(); @@ -32,9 +34,10 @@ $error=0; $sourceserver=isset($argv[1])?$argv[1]:''; // user@server:/src/file $password=isset($argv[2])?$argv[2]:''; -$database=isset($argv[3])?$argv[3]:''; -$loginbase=isset($argv[4])?$argv[4]:''; -$passwordbase=isset($argv[5])?$argv[5]:''; +$dataserver=isset($argv[3])?$argv[3]:''; +$database=isset($argv[4])?$argv[4]:''; +$loginbase=isset($argv[5])?$argv[5]:''; +$passwordbase=isset($argv[6])?$argv[6]:''; // Include Dolibarr environment $res=0; @@ -64,7 +67,7 @@ if (preg_match('/^(.*)@(.*):(.*)$/',$sourceserver,$reg)) } if (empty($sourceserver) || empty($server) || empty($login) || empty($sourcefile) || empty($password) || empty($database) || empty($loginbase) || empty($passwordbase)) { - print "Usage: $script_file login@server:/src/file.(sql|gz|bz2) passssh database loginbase passbase\n"; + print "Usage: $script_file login@server:/src/file.(sql|gz|bz2) passssh databaseserver databasename loginbase passbase\n"; print "Return code: 0 if success, <>0 if error\n"; print "Warning, this script may take a long time.\n"; exit(-1); @@ -108,14 +111,14 @@ if ($connection) print 'Get file '.$sourcefile.' into '.$targetdir.$targetfile."\n"; ssh2_scp_recv($connection, $sourcefile, $targetdir.$targetfile); - $fullcommand="cat ".$targetdir.$targetfile." | mysql -u".$loginbase." -p".$passwordbase." -D ".$database; + $fullcommand="cat ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database; if (preg_match('/\.bz2$/',$targetfile)) { - $fullcommand="bzip2 -c -d ".$targetdir.$targetfile." | mysql -u".$loginbase." -p".$passwordbase." -D ".$database; + $fullcommand="bzip2 -c -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database; } if (preg_match('/\.gz$/',$targetfile)) { - $fullcommand="gzip -d ".$targetdir.$targetfile." | mysql -u".$loginbase." -p".$passwordbase." -D ".$database; + $fullcommand="gzip -d ".$targetdir.$targetfile." | mysql -h".$databaseserver." -u".$loginbase." -p".$passwordbase." -D ".$database; } print "Load dump with ".$fullcommand."\n"; $output=array(); diff --git a/dev/iso-normes/GURULABS-RPM-GUIDE-v1.0.PDF b/dev/iso-normes/GURULABS-RPM-GUIDE-v1.0.PDF old mode 100755 new mode 100644 diff --git a/dev/iso-normes/address_format.txt b/dev/iso-normes/address_format.txt old mode 100755 new mode 100644 diff --git a/dev/iso-normes/banknumber_format.txt b/dev/iso-normes/banknumber_format.txt old mode 100755 new mode 100644 diff --git a/dev/iso-normes/format_FEC-Lien_outil_de_test_agréé.pdf b/dev/iso-normes/format_FEC-Lien_outil_de_test_agréé.pdf new file mode 100644 index 00000000000..1c0d0c91e73 Binary files /dev/null and b/dev/iso-normes/format_FEC-Lien_outil_de_test_agréé.pdf differ diff --git a/dev/iso-normes/format_FEC.pdf b/dev/iso-normes/format_FEC.pdf new file mode 100644 index 00000000000..ad62797a190 Binary files /dev/null and b/dev/iso-normes/format_FEC.pdf differ diff --git a/dev/iso-normes/xmlexport.txt b/dev/iso-normes/xmlexport.txt old mode 100755 new mode 100644 diff --git a/dev/mail/source_email_from_thirdparty.txt b/dev/mail/source_email_from_thirdparty.txt new file mode 100644 index 00000000000..e17afa19414 --- /dev/null +++ b/dev/mail/source_email_from_thirdparty.txt @@ -0,0 +1,48 @@ +Content-Type: multipart/mixed; boundary="===============4543832834454763172==" +Date: Thu, 12 Nov 2015 17:58:00 -0000 +From: Administrator +MIME-Version: 1.0 +Message-ID: 5nLkUQEIn50FnlwxWDkh59NfLof1ode0uC5cZEgm9Y4=@mailhog.example +Message-Id: <1447351080.369951963424683.576889035053436-dolibarr-7-thirdparty@PCHOME-LD> +Received: from pchome-ld by mailhog.example (Go-MailHog) + id 5nLkUQEIn50FnlwxWDkh59NfLof1ode0uC5cZEgm9Y4=@mailhog.example; Thu, 12 Nov 2015 18:58:00 +0100 +Reply-To: Administrator +Return-Path: +Subject: A test email from thirdparty card +To: Thirdparty company + +--===============4543832834454763172== +Content-Type: multipart/alternative; + boundary="===============8764907306434163361==" +MIME-Version: 1.0 + +--===============8764907306434163361== +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: base64 + +dGVzdDIKCi0tCkFkbWluaXN0cmF0b3IKClNlbnQgYnkgWW91ckNvbXBhbnkgWzFdIHVzaW5nIE9k +b28gWzJdCgosICBhY2Nlc3MgZGlyZWN0bHkgdG8gUGFydG5lciBBZ3JvbGFpdCBbM10KCgpbMV0g +aHR0cDovL3d3dy5leGFtcGxlLmNvbQpbMl0gaHR0cHM6Ly93d3cub2Rvby5jb20vClszXSBodHRw +Oi8vbG9jYWxob3N0OjgxNjkvd2ViL3NpZ251cD9yZWRpcmVjdD0lMkZ3ZWIlMjNhY3Rpb24lM0Rt +YWlsLmFjdGlvbl9tYWlsX3JlZGlyZWN0JTI2bW9kZWwlM0RyZXMucGFydG5lciUyNmlkJTNENyZ0 +b2tlbj1nM0s0QWU1T0Q5a3UxaEVubVZUQiZkYj1vZG9vX3Y4Cg== + +--===============8764907306434163361== +Content-Type: text/html; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: base64 + +PHA+dGVzdDI8L3A+Cgo8c3Bhbj4tLTxicj4KQWRtaW5pc3RyYXRvcjwvc3Bhbj4KCjxiciAvPjxz +bWFsbD5TZW50IGJ5IDxhIHN0eWxlPSdjb2xvcjppbmhlcml0JyBocmVmPSdodHRwOi8vd3d3LmV4 +YW1wbGUuY29tJz5Zb3VyQ29tcGFueTwvYT4gdXNpbmcgPGEgc3R5bGU9J2NvbG9yOmluaGVyaXQn +IGhyZWY9J2h0dHBzOi8vd3d3Lm9kb28uY29tLyc+T2RvbzwvYT48L3NtYWxsPgoKCiwgPHNwYW4g +Y2xhc3M9J29lX21haWxfZm9vdGVyX2FjY2Vzcyc+PHNtYWxsPmFjY2VzcyBkaXJlY3RseSB0byA8 +YSBzdHlsZT0nY29sb3I6aW5oZXJpdCcgaHJlZj0naHR0cDovL2xvY2FsaG9zdDo4MTY5L3dlYi9z +aWdudXA/cmVkaXJlY3Q9JTJGd2ViJTIzYWN0aW9uJTNEbWFpbC5hY3Rpb25fbWFpbF9yZWRpcmVj +dCUyNm1vZGVsJTNEcmVzLnBhcnRuZXIlMjZpZCUzRDcmdG9rZW49ZzNLNEFlNU9EOWt1MWhFbm1W +VEImZGI9b2Rvb192OCc+UGFydG5lciBBZ3JvbGFpdDwvYT48L3NtYWxsPjwvc3Bhbj4K + +--===============8764907306434163361==-- + +--===============4543832834454763172==-- \ No newline at end of file diff --git a/dev/phpunit/README b/dev/phpunit/README old mode 100755 new mode 100644 diff --git a/dev/phpunit/eclipse_setup_for_pti_phpunit.png b/dev/phpunit/eclipse_setup_for_pti_phpunit.png old mode 100755 new mode 100644 diff --git a/dev/skeletons/build_api_class.php b/dev/skeletons/build_api_class.php index 4ed122c95d8..6263eabcd6e 100755 --- a/dev/skeletons/build_api_class.php +++ b/dev/skeletons/build_api_class.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php * diff --git a/dev/skeletons/build_class_from_table.php b/dev/skeletons/build_class_from_table.php index f4f25c84391..4de319dabc9 100755 --- a/dev/skeletons/build_class_from_table.php +++ b/dev/skeletons/build_class_from_table.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php * @@ -450,186 +450,225 @@ else $error++; -//-------------------------------- -// Build skeleton_script.php -//-------------------------------- +//-------------------------------------------------------------------- +// Build skeleton_script.php, skeleton_list.php and skeleton_card.php +//-------------------------------------------------------------------- -// Read skeleton_script.php file -$skeletonfile=$path.'skeleton_script.php'; -$sourcecontent=file_get_contents($skeletonfile); -if (! $sourcecontent) +$skeletonfiles=array( + $path.'skeleton_script.php' => 'out.'.$classmin.'_script.php', + $path.'skeleton_list.php' => 'out.'.$classmin.'_list.php', + $path.'skeleton_card.php' => 'out.'.$classmin.'_card.php' + ); + +foreach ($skeletonfiles as $skeletonfile => $outfile) { - print "\n"; - print "Error: Failed to read skeleton sample '".$skeletonfile."'\n"; - print "Try to run script from skeletons directory.\n"; - exit; + $sourcecontent=file_get_contents($skeletonfile); + if (! $sourcecontent) + { + print "\n"; + print "Error: Failed to read skeleton sample '".$skeletonfile."'\n"; + print "Try to run script from skeletons directory.\n"; + exit; + } + + // Define output variables + $targetcontent=$sourcecontent; + + // Substitute module name + $targetcontent=preg_replace('/dev\/skeletons/', $module, $targetcontent); + $targetcontent=preg_replace('/mymodule othermodule1 othermodule2/', $module, $targetcontent); + $targetcontent=preg_replace('/mymodule/', $module, $targetcontent); + + // Substitute class name + $targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent); + $targetcontent=preg_replace('/skeleton_script\.php/', $classmin.'_script.php', $targetcontent); + $targetcontent=preg_replace('/\$element = \'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent); + $targetcontent=preg_replace('/\$table_element = \'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent); + $targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent); + $targetcontent=preg_replace('/skeletons/', $classmin, $targetcontent); + $targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent); + + // Substitute comments + $targetcontent=preg_replace('/This file is an example to create a new class file/', 'Put here description of this class', $targetcontent); + $targetcontent=preg_replace('/\s*\/\/\.\.\./', '', $targetcontent); + $targetcontent=preg_replace('/Put here some comments/','Initialy built by build_class_from_table on '.strftime('%Y-%m-%d %H:%M',mktime()), $targetcontent); + + // Substitute table name + $targetcontent=preg_replace('/MAIN_DB_PREFIX."mytable/', 'MAIN_DB_PREFIX."'.$tablenoprefix, $targetcontent); + + // Substitute GETPOST search_fieldx + $varprop="\n"; + $cleanparam=''; + foreach($property as $key => $prop) + { + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) + { + if ($prop['isint']) $varprop.='$search_'.$prop['field']."=GETPOST('search_".$prop['field']."','int');\n"; + else $varprop.='$search_'.$prop['field']."=GETPOST('search_".$prop['field']."','alpha');\n"; + } + } + $targetcontent=preg_replace('/'.preg_quote('$search_field1=GETPOST("search_field1");','/').'/', $varprop, $targetcontent); + $targetcontent=preg_replace('/'.preg_quote('$search_field2=GETPOST("search_field2");','/').'/', '', $targetcontent); + + // Substitute GETPOST fieldx + $varprop="\n"; + $cleanparam=''; + foreach($property as $key => $prop) + { + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) + { + if ($prop['isint']) $varprop.="\t\$object->".$prop['field']."=GETPOST('".$prop['field']."','int');\n"; + else $varprop.="\t\$object->".$prop['field']."=GETPOST('".$prop['field']."','alpha');\n"; + } + } + $targetcontent=preg_replace('/'.preg_quote('$object->prop1=GETPOST("field1");','/').'/', $varprop, $targetcontent); + $targetcontent=preg_replace('/'.preg_quote('$object->prop2=GETPOST("field2");','/').'/', '', $targetcontent); + + // Substitute reset search_field = ''; + $varprop="\n"; + $cleanparam=''; + foreach($property as $key => $prop) + { + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) + { + $varprop.='$search_'.$prop['field']."='';\n"; + } + } + $targetcontent=preg_replace('/'.preg_quote('$search_field1=\'\';','/').'/', $varprop, $targetcontent); + $targetcontent=preg_replace('/'.preg_quote('$search_field2=\'\';','/').'/', '', $targetcontent); + + // Substitute fetch/select parameters + $targetcontent=preg_replace('/\$sql\s*\.= " t\.field1,";/', $varpropselect, $targetcontent); + $targetcontent=preg_replace('/\$sql\s*\.= " t\.field2";/', '', $targetcontent); + + // Substitute where for search + $varprop="\n"; + $cleanparam=''; + foreach($property as $key => $prop) + { + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) + { + $varprop.='if ($search_'.$prop['field'].') $sql.= natural_search("'.$prop['field'].'",$search_'.$prop['field'].');'."\n"; + } + } + $targetcontent=preg_replace('/'.preg_quote('if ($search_field1) $sql.= natural_search("field1",$search_field1);','/').'/', $varprop, $targetcontent); + $targetcontent=preg_replace('/'.preg_quote('if ($search_field2) $sql.= natural_search("field2",$search_field2);','/').'/', '', $targetcontent); + + // substitute $params.= + $varprop="\n"; + $cleanparam=''; + foreach($property as $key => $prop) + { + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) + { + $varprop.="if (\$search_".$prop['field']." != '') \$params.= '&search_".$prop['field']."='.urlencode(\$search_".$prop['field'].");\n"; + } + } + $targetcontent=preg_replace('/'.preg_quote("if (\$search_field1 != '') \$params.= '&search_field1='.urlencode(\$search_field1);",'/').'/', $varprop, $targetcontent); + $targetcontent=preg_replace('/'.preg_quote("if (\$search_field2 != '') \$params.= '&search_field2='.urlencode(\$search_field2);",'/').'/', '', $targetcontent); + + // Substitute arrayfields + $varprop="\n"; + $cleanparam=''; + foreach($property as $key => $prop) + { + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) + { + $varprop.="'t.".$prop['field']."'=>array('label'=>\$langs->trans(\"Field".$prop['field']."\"), 'checked'=>1),\n"; + } + } + $targetcontent=preg_replace('/'.preg_quote("'t.field1'=>array('label'=>\$langs->trans(\"Field1\"), 'checked'=>1),",'/').'/', $varprop, $targetcontent); + $targetcontent=preg_replace('/'.preg_quote("'t.field2'=>array('label'=>\$langs->trans(\"Field2\"), 'checked'=>1),",'/').'/', '', $targetcontent); + + // Substitute print_liste_field_titre + $varprop="\n"; + $cleanparam=''; + foreach($property as $key => $prop) + { + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) + { + $varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print_liste_field_titre(\$arrayfields['t.".$prop['field']."']['label'],\$_SERVER['PHP_SELF'],'t.".$prop['field']."','',\$param,'',\$sortfield,\$sortorder);\n"; + } + } + $targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field1']['checked'])) print_liste_field_titre(\$langs->trans('field1'),\$_SERVER['PHP_SELF'],'t.field1','',\$param,'',\$sortfield,\$sortorder);",'/').'/', $varprop, $targetcontent); + $targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field2']['checked'])) print_liste_field_titre(\$langs->trans('field2'),\$_SERVER['PHP_SELF'],'t.field2','',\$param,'',\$sortfield,\$sortorder);",'/').'/', '', $targetcontent); + + // Substitute fields title search + $varprop="\n"; + $cleanparam=''; + foreach($property as $key => $prop) + { + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) + { + $varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print '';\n"; + } + } + $targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field1']['checked'])) print '';",'/').'/', $varprop, $targetcontent); + $targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field2']['checked'])) print '';",'/').'/', '', $targetcontent); + + // Substitute where for .fieldx. + $varprop="\n"; + $cleanparam=''; + foreach($property as $key => $prop) + { + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) + { + $varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print ''.\$obj->".$prop['field'].".'';\n"; + } + } + $targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field1']['checked'])) print ''.\$obj->field1.'';",'/').'/', $varprop, $targetcontent); + $targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field2']['checked'])) print ''.\$obj->field2.'';",'/').'/', '', $targetcontent); + + // LIST_OF_TD_LABEL_FIELDS_CREATE - List of td for card view + $varprop="\n"; + $cleanparam=''; + foreach($property as $key => $prop) + { + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) + { + $varprop.="print ''.\$langs->trans(\"Field".$prop['field']."\").'';\n"; + } + } + $targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_CREATE/', $varprop, $targetcontent); + + // LIST_OF_TD_LABEL_FIELDS_EDIT - List of td for card view + $varprop="\n"; + $cleanparam=''; + foreach($property as $key => $prop) + { + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) + { + $varprop.="print ''.\$langs->trans(\"Field".$prop['field']."\").'".$prop['field'].".'\">';\n"; + } + } + $targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_EDIT/', $varprop, $targetcontent); + + // LIST_OF_TD_LABEL_FIELDS_VIEW - List of td for card view + $varprop="\n"; + $cleanparam=''; + foreach($property as $key => $prop) + { + if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) + { + $varprop.="print ''.\$langs->trans(\"Field".$prop['field']."\").'\$object->".$prop['field']."';\n"; + } + } + $targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_VIEW/', $varprop, $targetcontent); + + + // Build file + $fp=fopen($outfile,"w"); + if ($fp) + { + fputs($fp, $targetcontent); + fclose($fp); + print "File '".$outfile."' has been built in current directory.\n"; + } + else $error++; } -// Define output variables -$outfile='out.'.$classmin.'_script.php'; -$targetcontent=$sourcecontent; - -// Substitute module name -$targetcontent=preg_replace('/dev\/skeletons/', $module, $targetcontent); -$targetcontent=preg_replace('/mymodule othermodule1 othermodule2/', $module, $targetcontent); -$targetcontent=preg_replace('/mymodule/', $module, $targetcontent); - -// Substitute class name -$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent); -$targetcontent=preg_replace('/skeleton_script\.php/', $classmin.'_script.php', $targetcontent); -$targetcontent=preg_replace('/\$element = \'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent); -$targetcontent=preg_replace('/\$table_element = \'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent); -$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent); -$targetcontent=preg_replace('/skeletons/', $classmin, $targetcontent); -$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent); - -// Substitute comments -$targetcontent=preg_replace('/This file is an example to create a new class file/', 'Put here description of this class', $targetcontent); -$targetcontent=preg_replace('/\s*\/\/\.\.\./', '', $targetcontent); -$targetcontent=preg_replace('/Put here some comments/','Initialy built by build_class_from_table on '.strftime('%Y-%m-%d %H:%M',mktime()), $targetcontent); - -// Substitute table name -$targetcontent=preg_replace('/MAIN_DB_PREFIX."mytable/', 'MAIN_DB_PREFIX."'.$tablenoprefix, $targetcontent); - -// Build file -$fp=fopen($outfile,"w"); -if ($fp) -{ - fputs($fp, $targetcontent); - fclose($fp); - print "File '".$outfile."' has been built in current directory.\n"; -} -else $error++; - - - -//-------------------------------- -// Build skeleton_page.php -//-------------------------------- - -// Read skeleton_page.php file -$skeletonfile=$path.'skeleton_page.php'; -$sourcecontent=file_get_contents($skeletonfile); -if (! $sourcecontent) -{ - print "\n"; - print "Error: Failed to read skeleton sample '".$skeletonfile."'\n"; - print "Try to run script from skeletons directory.\n"; - exit; -} - -// Define output variables -$outfile='out.'.$classmin.'_page.php'; -$targetcontent=$sourcecontent; - -// Substitute module name -$targetcontent=preg_replace('/dev\/skeletons/', $module, $targetcontent); -$targetcontent=preg_replace('/mymodule othermodule1 othermodule2/', $module, $targetcontent); -$targetcontent=preg_replace('/mymodule/', $module, $targetcontent); - -// Substitute class name -$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent); -$targetcontent=preg_replace('/skeleton_script\.php/', $classmin.'_script.php', $targetcontent); -$targetcontent=preg_replace('/\$element = \'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent); -$targetcontent=preg_replace('/\$table_element = \'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent); -$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent); -$targetcontent=preg_replace('/skeletons/', $classmin, $targetcontent); -$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent); - -// Substitute comments -$targetcontent=preg_replace('/This file is an example to create a new class file/', 'Put here description of this class', $targetcontent); -$targetcontent=preg_replace('/\s*\/\/\.\.\./', '', $targetcontent); -$targetcontent=preg_replace('/Put here some comments/','Initialy built by build_class_from_table on '.strftime('%Y-%m-%d %H:%M',mktime()), $targetcontent); - -// Substitute table name -$targetcontent=preg_replace('/MAIN_DB_PREFIX."mytable/', 'MAIN_DB_PREFIX."'.$tablenoprefix, $targetcontent); - -// Substitute GETPOST search_fieldx -$varprop="\n"; -$cleanparam=''; -foreach($property as $key => $prop) -{ - if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) - { - if ($prop['isint']) $varprop.='$search_'.$prop['field']."=GETPOST('search_".$prop['field']."','int');\n"; - else $varprop.='$search_'.$prop['field']."=GETPOST('search_".$prop['field']."','alpha');\n"; - } -} -$targetcontent=preg_replace('/'.preg_quote('$search_field1=GETPOST("search_field1");','/').'/', $varprop, $targetcontent); -$targetcontent=preg_replace('/'.preg_quote('$search_field2=GETPOST("search_field2");','/').'/', '', $targetcontent); - -// Substitute GETPOST fieldx -$varprop="\n"; -$cleanparam=''; -foreach($property as $key => $prop) -{ - if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) - { - if ($prop['isint']) $varprop.="\t\$object->".$prop['field']."=GETPOST('".$prop['field']."','int');\n"; - else $varprop.="\t\$object->".$prop['field']."=GETPOST('".$prop['field']."','alpha');\n"; - } -} -$targetcontent=preg_replace('/'.preg_quote('$object->prop1=GETPOST("field1");','/').'/', $varprop, $targetcontent); -$targetcontent=preg_replace('/'.preg_quote('$object->prop2=GETPOST("field2");','/').'/', '', $targetcontent); - -// Substitute fetch/select parameters -$targetcontent=preg_replace('/\$sql\s*\.= " t\.field1,";/', $varpropselect, $targetcontent); -$targetcontent=preg_replace('/\$sql\s*\.= " t\.field2";/', '', $targetcontent); - -// Substitute where for search -$varprop="\n"; -$cleanparam=''; -foreach($property as $key => $prop) -{ - if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) - { - $varprop.='if ($search_'.$prop['field'].') $sql.= natural_search("'.$prop['field'].'",$search_'.$prop['field'].');'."\n"; - } -} -$targetcontent=preg_replace('/'.preg_quote('if ($search_field1) $sql.= natural_search("field1",$search_field1);','/').'/', $varprop, $targetcontent); -$targetcontent=preg_replace('/'.preg_quote('if ($search_field2) $sql.= natural_search("field2",$search_field2);','/').'/', '', $targetcontent); - -// Substitute print_liste_field_titre -$varprop="\n"; -$cleanparam=''; -foreach($property as $key => $prop) -{ - if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) - { - $varprop.="print_liste_field_titre(\$langs->trans('".$prop['field']."'),\$_SERVER['PHP_SELF'],'t.".$prop['field']."','',\$param,'',\$sortfield,\$sortorder);\n"; - } -} - -$targetcontent=preg_replace('/'.preg_quote("print_liste_field_titre(\$langs->trans('field1'),\$_SERVER['PHP_SELF'],'t.field1','',\$param,'',\$sortfield,\$sortorder);",'/').'/', $varprop, $targetcontent); -$targetcontent=preg_replace('/'.preg_quote("print_liste_field_titre(\$langs->trans('field2'),\$_SERVER['PHP_SELF'],'t.field1','',\$param,'',\$sortfield,\$sortorder);",'/').'/', '', $targetcontent); - -// Substitute where for .fieldx. -$varprop="\n"; -$cleanparam=''; -foreach($property as $key => $prop) -{ - if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) - { - $varprop.="print ''.\$obj->".$prop['field'].".'';\n"; - } -} -$targetcontent=preg_replace('/'.preg_quote("print ''.\$obj->field1.'';",'/').'/', $varprop, $targetcontent); -$targetcontent=preg_replace('/'.preg_quote("print ''.\$obj->field2.'';",'/').'/', '', $targetcontent); - - - -// Build file -$fp=fopen($outfile,"w"); -if ($fp) -{ - fputs($fp, $targetcontent); - fclose($fp); - print "File '".$outfile."' has been built in current directory.\n"; -} -else $error++; - // -------------------- END OF BUILD_CLASS_FROM_TABLE SCRIPT -------------------- -print "You can now rename generated files by removing the 'out.' prefix in their name and store them into directory /yourmodule/class.\n"; +print "You can now rename generated files by removing the 'out.' prefix in their name and store them into directory /yourmodule/class (for .class.php file) or /yourmodule.\n"; return $error; diff --git a/dev/skeletons/build_webservice_from_class.php b/dev/skeletons/build_webservice_from_class.php old mode 100644 new mode 100755 index ee8772a8a44..c91347a424d --- a/dev/skeletons/build_webservice_from_class.php +++ b/dev/skeletons/build_webservice_from_class.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php * diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index 518b4f4d018..3cb86055d0e 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -1,7 +1,7 @@ - * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2005-2016 Regis Houssin * * 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 @@ -46,17 +46,23 @@ class modMyModule extends DolibarrModules // Id for module (must be unique). // Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id). - $this->numero = 100000; + $this->numero = 500000; // TODO Go on page http://wiki.dolibarr.org/index.php/List_of_modules_id to reserve id number for your module // Key text used to identify module (for permissions, menus, etc...) $this->rights_class = 'mymodule'; // Family can be 'crm','financial','hr','projects','products','ecm','technic','other' // It is used to group modules in module setup page $this->family = "other"; + // Module position in the family + $this->module_position = 500; + // Gives the possibility to the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this) + $this->familyinfo = array('myownfamily' => array('position' => '001', 'label' => $langs->trans("MyOwnFamily"))); + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i','',get_class($this)); // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) $this->description = "Description of module MyModule"; + // Possible values for version are: 'development', 'experimental', 'dolibarr' or 'dolibarr_deprecated' or version $this->version = '1.0'; // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) @@ -165,12 +171,16 @@ class modMyModule extends DolibarrModules // Add here list of php file(s) stored in core/boxes that contains class to show a box. $this->boxes = array(); // List of boxes // Example: - //$this->boxes=array(array(0=>array('file'=>'myboxa.php','note'=>'','enabledbydefaulton'=>'Home'),1=>array('file'=>'myboxb.php','note'=>''),2=>array('file'=>'myboxc.php','note'=>''));); + //$this->boxes=array( + // 0=>array('file'=>'myboxa.php@mymodule','note'=>'','enabledbydefaulton'=>'Home'), + // 1=>array('file'=>'myboxb.php@mymodule','note'=>''), + // 2=>array('file'=>'myboxc.php@mymodule','note'=>'') + //); // Cronjobs $this->cronjobs = array(); // List of cron jobs entries to add - // Example: $this->cronjobs=array(0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>3600, 'unitfrequency'=>3600), - // 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>3600, 'unitfrequency'=>3600) + // Example: $this->cronjobs=array(0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600), + // 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24) // ); // Permissions diff --git a/dev/skeletons/skeleton_card.php b/dev/skeletons/skeleton_card.php new file mode 100644 index 00000000000..03f70955527 --- /dev/null +++ b/dev/skeletons/skeleton_card.php @@ -0,0 +1,334 @@ + + * Copyright (C) ---Put here your own copyright and developer email--- + * + * 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 3 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, see . + */ + +/** + * \file dev/skeletons/skeleton_card.php + * \ingroup mymodule othermodule1 othermodule2 + * \brief This file is an example of a php page + * Put here some comments + */ + +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check anti CSRF attack test +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not check anti POST attack test +//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu +//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php +//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); +//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session) + +// Change this following line to use the correct relative path (../, ../../, etc) +$res=0; +if (! $res && file_exists("../main.inc.php")) $res=@include '../main.inc.php'; // to work if your module directory is into dolibarr root htdocs directory +if (! $res && file_exists("../../main.inc.php")) $res=@include '../../main.inc.php'; // to work if your module directory is into a subdir of root htdocs directory +if (! $res && file_exists("../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only +if (! $res && file_exists("../../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only +if (! $res) die("Include of main fails"); +// Change this following line to use the correct relative path from htdocs +include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'); +dol_include_once('/mymodule/class/skeleton_class.class.php'); + +// Load traductions files requiredby by page +$langs->load("mymodule"); +$langs->load("other"); + +// Get parameters +$id = GETPOST('id','int'); +$action = GETPOST('action','alpha'); +$backtopage = GETPOST('backtopage'); +$myparam = GETPOST('myparam','alpha'); + +$search_field1=GETPOST("search_field1"); +$search_field2=GETPOST("search_field2"); + +// Protection if external user +if ($user->societe_id > 0) +{ + //accessforbidden(); +} + +if (empty($action) && empty($id) && empty($ref)) $action='list'; + +// Load object if id or ref is provided as parameter +$object=new Skeleton_Class($db); +if (($id > 0 || ! empty($ref)) && $action != 'add') +{ + $result=$object->fetch($id,$ref); + if ($result < 0) dol_print_error($db); +} + +// Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('skeleton')); +$extrafields = new ExtraFields($db); + + + +/******************************************************************* +* ACTIONS +* +* Put here all code to do according to value of "action" parameter +********************************************************************/ + +$parameters=array(); +$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +if (empty($reshook)) +{ + // Action to add record + if ($action == 'add') + { + if (GETPOST('cancel')) + { + $urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1); + header("Location: ".$urltogo); + exit; + } + + $error=0; + + /* object_prop_getpost_prop */ + $object->prop1=GETPOST("field1"); + $object->prop2=GETPOST("field2"); + + if (empty($object->ref)) + { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")), null, 'errors'); + } + + if (! $error) + { + $result=$object->create($user); + if ($result > 0) + { + // Creation OK + $urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1); + header("Location: ".$urltogo); + exit; + } + { + // Creation KO + if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); + else setEventMessages($object->error, null, 'errors'); + $action='create'; + } + } + else + { + $action='create'; + } + } + + // Cancel + if ($action == 'update' && GETPOST('cancel')) $action='view'; + + // Action to update record + if ($action == 'update' && ! GETPOST('cancel')) + { + $error=0; + + $object->prop1=GETPOST("field1"); + $object->prop2=GETPOST("field2"); + + if (empty($object->ref)) + { + $error++; + setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")), null, 'errors'); + } + + if (! $error) + { + $result=$object->update($user); + if ($result > 0) + { + $action='view'; + } + else + { + // Creation KO + if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); + else setEventMessages($object->error, null, 'errors'); + $action='edit'; + } + } + else + { + $action='edit'; + } + } + + // Action to delete + if ($action == 'confirm_delete') + { + $result=$object->delete($user); + if ($result > 0) + { + // Delete OK + setEventMessages("RecordDeleted", null, 'mesgs'); + header("Location: ".dol_buildpath('/mymodule/list.php',1)); + exit; + } + else + { + if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); + else setEventMessages($object->error, null, 'errors'); + } + } +} + + + + +/*************************************************** +* VIEW +* +* Put here all code to build page +****************************************************/ + +llxHeader('','MyPageName',''); + +$form=new Form($db); + + +// Put here content of your page + +// Example : Adding jquery code +print ''; + + +// Part to create +if ($action == 'create') +{ + print load_fiche_titre($langs->trans("NewMyModule")); + + print '
'; + print ''; + print ''; + + dol_fiche_head(); + + print ''."\n"; + // print ''; + // LIST_OF_TD_LABEL_FIELDS_CREATE + print '
'.$langs->trans("Label").'
'."\n"; + + dol_fiche_end(); + + print '
 
'; + + print '
'; +} + + + +// Part to edit record +if (($id || $ref) && $action == 'edit') +{ + print load_fiche_titre($langs->trans("MyModule")); + + print '
'; + print ''; + print ''; + print ''; + + dol_fiche_head(); + + print ''."\n"; + // print ''; + // LIST_OF_TD_LABEL_FIELDS_EDIT + print '
'.$langs->trans("Label").'
'; + + dol_fiche_end(); + + print '
'; + print '   '; + print '
'; + + print '
'; +} + + + +// Part to show record +if ($id && (empty($action) || $action == 'view' || $action == 'delete')) +{ + print load_fiche_titre($langs->trans("MyModule")); + + dol_fiche_head(); + + if ($action == 'delete') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), $langs->trans('ConfirmDeleteMyObject'), 'confirm_delete', '', 0, 1); + print $formconfirm; + } + + print ''."\n"; + // print ''; + // LIST_OF_TD_LABEL_FIELDS_VIEW + print '
'.$langs->trans("Label").'
'; + + dol_fiche_end(); + + + // Buttons + print '
'."\n"; + $parameters=array(); + $reshook=$hookmanager->executeHooks('addMoreActionsButtons',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + + if (empty($reshook)) + { + if ($user->rights->mymodule->write) + { + print ''."\n"; + } + + if ($user->rights->mymodule->delete) + { + print ''."\n"; + } + } + print '
'."\n"; + + + // Example 2 : Adding links to objects + //$somethingshown=$form->showLinkedObjectBlock($object); + //$linktoelem = $form->showLinkToObjectBlock($object); + //if ($linktoelem) print '
'.$linktoelem; + +} + + +// End of page +llxFooter(); +$db->close(); diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php index 1eeae9a9fd2..2e737b8e87f 100644 --- a/dev/skeletons/skeleton_class.class.php +++ b/dev/skeletons/skeleton_class.class.php @@ -35,19 +35,10 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php'; * Class Skeleton_Class * * Put here description of your class + * @see CommonObject */ class Skeleton_Class extends CommonObject { - /** - * @var string Error code (or message) - * @deprecated - * @see Skeleton_Class::errors - */ - public $error; - /** - * @var string[] Error codes (or messages) - */ - public $errors = array(); /** * @var string Id to identify managed objects */ @@ -62,10 +53,6 @@ class Skeleton_Class extends CommonObject */ public $lines = array(); - /** - * @var int ID - */ - public $id; /** * @var mixed Sample property 1 */ @@ -439,6 +426,101 @@ class Skeleton_Class extends CommonObject } } + /** + * Return a link to the user card (with optionaly the picto) + * Use this->id,this->lastname, this->firstname + * + * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) + * @param string $option On what the link point to + * @param integer $notooltip 1=Disable tooltip + * @param int $maxlen Max length of visible user name + * @param string $morecss Add more css on link + * @return string String with URL + */ + function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='') + { + global $langs, $conf, $db; + global $dolibarr_main_authentication, $dolibarr_main_demo; + global $menumanager; + + + $result = ''; + $companylink = ''; + + $label = '' . $langs->trans("MyModule") . ''; + $label.= '
'; + $label.= '' . $langs->trans('Ref') . ': ' . $this->ref; + + $link = 'ref . $linkend; + return $result; + } + + /** + * Retourne le libelle du status d'un user (actif, inactif) + * + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * @return string Label of status + */ + function getLibStatut($mode=0) + { + return $this->LibStatut($this->status,$mode); + } + + /** + * Renvoi le libelle d'un status donne + * + * @param int $status Id status + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * @return string Label of status + */ + function LibStatut($status,$mode=0) + { + global $langs; + + if ($mode == 0) + { + $prefix=''; + if ($status == 1) return $langs->trans('Enabled'); + if ($status == 0) return $langs->trans('Disabled'); + } + if ($mode == 1) + { + if ($status == 1) return $langs->trans('Enabled'); + if ($status == 0) return $langs->trans('Disabled'); + } + if ($mode == 2) + { + if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); + if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled'); + } + if ($mode == 3) + { + if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4'); + if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5'); + } + if ($mode == 4) + { + if ($status == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); + if ($status == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled'); + } + if ($mode == 5) + { + if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4'); + if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5'); + } + } + + /** * Initialise object with example values * Id must be 0 if object instance is a specimen diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php new file mode 100644 index 00000000000..28333b3edee --- /dev/null +++ b/dev/skeletons/skeleton_list.php @@ -0,0 +1,440 @@ + + * Copyright (C) ---Put here your own copyright and developer email--- + * + * 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 3 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, see . + */ + +/** + * \file dev/skeletons/skeleton_list.php + * \ingroup mymodule othermodule1 othermodule2 + * \brief This file is an example of a php page + * Put here some comments + */ + +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check anti CSRF attack test +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not check anti POST attack test +//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu +//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php +//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); +//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session) + +// Change this following line to use the correct relative path (../, ../../, etc) +$res=0; +if (! $res && file_exists("../main.inc.php")) $res=@include '../main.inc.php'; // to work if your module directory is into dolibarr root htdocs directory +if (! $res && file_exists("../../main.inc.php")) $res=@include '../../main.inc.php'; // to work if your module directory is into a subdir of root htdocs directory +if (! $res && file_exists("../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only +if (! $res && file_exists("../../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only +if (! $res) die("Include of main fails"); +// Change this following line to use the correct relative path from htdocs +include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'); +dol_include_once('/mymodule/class/skeleton_class.class.php'); + +// Load traductions files requiredby by page +$langs->load("mymodule"); +$langs->load("other"); + +// Get parameters +$id = GETPOST('id','int'); +$action = GETPOST('action','alpha'); +$backtopage = GETPOST('backtopage'); +$myparam = GETPOST('myparam','alpha'); + +$search_field1=GETPOST("search_field1"); +$search_field2=GETPOST("search_field2"); +$optioncss = GETPOST('optioncss','alpha'); + +// Load variable for pagination +$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit; +$sortfield = GETPOST('sortfield','alpha'); +$sortorder = GETPOST('sortorder','alpha'); +$page = GETPOST('page','int'); +if ($page == -1) { $page = 0; } +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (! $sortfield) $sortfield="t.rowid"; // Set here default search field +if (! $sortorder) $sortorder="ASC"; + +// Protection if external user +$socid=0; +if ($user->societe_id > 0) +{ + $socid = $user->societe_id; + //accessforbidden(); +} + +// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('skeletonlist')); +$extrafields = new ExtraFields($db); + +// fetch optionals attributes and labels +$extralabels = $extrafields->fetch_name_optionals_label('mymodule'); +$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_'); + +// Load object if id or ref is provided as parameter +$object=new Skeleton_Class($db); +if (($id > 0 || ! empty($ref)) && $action != 'add') +{ + $result=$object->fetch($id,$ref); + if ($result < 0) dol_print_error($db); +} + +// Definition of fields for list +$arrayfields=array( + 't.field1'=>array('label'=>$langs->trans("Field1"), 'checked'=>1), + 't.field2'=>array('label'=>$langs->trans("Field2"), 'checked'=>1), + //'t.entity'=>array('label'=>$langs->trans("Entity"), 'checked'=>1, 'enabled'=>(! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode))), + 't.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), + 't.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), + //'t.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), +); +// Extra fields +if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) +{ + foreach($extrafields->attribute_label as $key => $val) + { + $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]); + } +} + + + + +/******************************************************************* +* ACTIONS +* +* Put here all code to do according to value of "action" parameter +********************************************************************/ + +$parameters=array(); +$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; + +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPOST("button_removefilter")) // All test are required to be compatible with all browsers +{ + $search_field1=''; + $search_field2=''; + $search_date_creation=''; + $search_date_update=''; + $search_array_options=array(); +} + + +if (empty($reshook)) +{ + // Action to delete + if ($action == 'confirm_delete') + { + $result=$object->delete($user); + if ($result > 0) + { + // Delete OK + setEventMessages("RecordDeleted", null, 'mesgs'); + header("Location: ".dol_buildpath('/mymodule/list.php',1)); + exit; + } + else + { + if (! empty($object->errors)) setEventMessages(null,$object->errors,'errors'); + else setEventMessages($object->error,null,'errors'); + } + } +} + + + + +/*************************************************** +* VIEW +* +* Put here all code to build page +****************************************************/ + +llxHeader('','MyPageName',''); + +$form=new Form($db); + +// Put here content of your page +$title = $langs->trans('MyModuleListTitle'); + +// Example : Adding jquery code +print ''; + + +$sql = "SELECT"; +$sql.= " t.rowid,"; +$sql.= " t.field1,"; +$sql.= " t.field2"; +// Add fields for extrafields +foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key; +// Add fields from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; +$sql.= " FROM ".MAIN_DB_PREFIX."mytable as t"; +if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."mytable_extrafields as ef on (u.rowid = ef.fk_object)"; +$sql.= " WHERE 1 = 1"; +//$sql.= " WHERE u.entity IN (".getEntity('mytable',1).")"; +if ($search_field1) $sql.= natural_search("field1",$search_field1); +if ($search_field2) $sql.= natural_search("field2",$search_field2); +if ($sall) $sql.= natural_search(array_keys($fieldstosearchall), $sall); +// Add where from extra fields +foreach ($search_array_options as $key => $val) +{ + $crit=$val; + $tmpkey=preg_replace('/search_options_/','',$key); + $typ=$extrafields->attribute_type[$tmpkey]; + $mode=0; + if (in_array($typ, array('int'))) $mode=1; // Search on a numeric + if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit))) + { + $sql .= natural_search('ef.'.$tmpkey, $crit, $mode); + } +} +// Add where from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; +$sql.=$db->order($sortfield,$sortorder); +//$sql.= $db->plimit($conf->liste_limit+1, $offset); + +// Count total nb of records +$nbtotalofrecords = 0; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); +} + +$sql.= $db->plimit($limit+1, $offset); + + +dol_syslog($script_file, LOG_DEBUG); +$resql=$db->query($sql); +if ($resql) +{ + $num = $db->num_rows($resql); + + $params=''; + if ($search_field1 != '') $params.= '&search_field1='.urlencode($search_field1); + if ($search_field2 != '') $params.= '&search_field2='.urlencode($search_field2); + if ($optioncss != '') $param.='&optioncss='.$optioncss; + // Add $param from extra fields + foreach ($search_array_options as $key => $val) + { + $crit=$val; + $tmpkey=preg_replace('/search_options_/','',$key); + if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val); + } + + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit); + + + print '
'; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + + if ($sall) + { + foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); + print $langs->trans("FilterOnInto", $all) . join(', ',$fieldstosearchall); + } + + if (! empty($moreforfilter)) + { + print '
'; + print $moreforfilter; + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print '
'; + } + + $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; + $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + + print ''; + + // Fields title + print ''; + if (! empty($arrayfields['t.field1']['checked'])) print_liste_field_titre($langs->trans('field1'),$_SERVER['PHP_SELF'],'t.field1','',$param,'',$sortfield,$sortorder); + if (! empty($arrayfields['t.field2']['checked'])) print_liste_field_titre($langs->trans('field2'),$_SERVER['PHP_SELF'],'t.field2','',$param,'',$sortfield,$sortorder); + // Extra fields + if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) + { + foreach($extrafields->attribute_label as $key => $val) + { + if (! empty($arrayfields["ef.".$key]['checked'])) + { + $align=$extrafields->getAlignFlag($key); + print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder); + } + } + } + // Hook fields + $parameters=array('arrayfields'=>$arrayfields); + $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + if (! empty($arrayfields['t.datec']['checked'])) print_liste_field_titre($langs->trans("DateCreationShort"),$_SERVER["PHP_SELF"],"t.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['t.tms']['checked'])) print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"t.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); + //if (! empty($arrayfields['t.status']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"t.status","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch '); + print ''."\n"; + + // Fields title search + print ''; + if (! empty($arrayfields['t.field1']['checked'])) print ''; + if (! empty($arrayfields['t.field2']['checked'])) print ''; + // Extra fields + if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) + { + foreach($extrafields->attribute_label as $key => $val) + { + if (! empty($arrayfields["ef.".$key]['checked'])) print ''; + } + } + // Fields from hook + $parameters=array('arrayfields'=>$arrayfields); + $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + if (! empty($arrayfields['t.datec']['checked'])) + { + // Date creation + print ''; + } + if (! empty($arrayfields['t.tms']['checked'])) + { + // Date modification + print ''; + } + /*if (! empty($arrayfields['u.statut']['checked'])) + { + // Status + print ''; + }*/ + // Action column + print ''; + print ''."\n"; + + + $i = 0; + while ($i < min($num, $limit)) + { + $obj = $db->fetch_object($resql); + if ($obj) + { + // You can use here results + print ''; + if (! empty($arrayfields['t.field1']['checked'])) print ''; + if (! empty($arrayfields['t.field2']['checked'])) print ''; + // Extra fields + if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) + { + foreach($extrafields->attribute_label as $key => $val) + { + if (! empty($arrayfields["ef.".$key]['checked'])) + { + print 'getAlignFlag($key); + if ($align) print ' align="'.$align.'"'; + print '>'; + $tmpkey='options_'.$key; + print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1); + print ''; + } + } + } + // Fields from hook + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Date creation + if (! empty($arrayfields['t.datec']['checked'])) + { + print ''; + } + // Date modification + if (! empty($arrayfields['t.tms']['checked'])) + { + print ''; + } + // Status + /* + if (! empty($arrayfields['u.statut']['checked'])) + { + $userstatic->statut=$obj->statut; + print ''; + }*/ + // Action column + print ''; + print ''; + } + $i++; + } + + $db->free($resql); + + $parameters=array('sql' => $sql); + $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + + print "
'; + print ''; + print ''; + print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut); + print ''; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print '
'.$obj->field1.''.$obj->field2.''; + print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print ''; + print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print ''.$userstatic->getLibStatut(3).'
\n"; + print "
\n"; + + $db->free($result); +} +else +{ + $error++; + dol_print_error($db); +} + + +// End of page +llxFooter(); +$db->close(); diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php deleted file mode 100644 index 2dd9f08e18f..00000000000 --- a/dev/skeletons/skeleton_page.php +++ /dev/null @@ -1,446 +0,0 @@ - - * Copyright (C) ---Put here your own copyright and developer email--- - * - * 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 3 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, see . - */ - -/** - * \file dev/skeletons/skeleton_page.php - * \ingroup mymodule othermodule1 othermodule2 - * \brief This file is an example of a php page - * Put here some comments - */ - -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check anti CSRF attack test -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not check anti POST attack test -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session) - -// Change this following line to use the correct relative path (../, ../../, etc) -$res=0; -if (! $res && file_exists("../main.inc.php")) $res=@include '../main.inc.php'; // to work if your module directory is into dolibarr root htdocs directory -if (! $res && file_exists("../../main.inc.php")) $res=@include '../../main.inc.php'; // to work if your module directory is into a subdir of root htdocs directory -if (! $res && file_exists("../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only -if (! $res && file_exists("../../../../dolibarr/htdocs/main.inc.php")) $res=@include '../../../../dolibarr/htdocs/main.inc.php'; // Used on dev env only -if (! $res) die("Include of main fails"); -// Change this following line to use the correct relative path from htdocs -include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'); -dol_include_once('/mymodule/class/skeleton_class.class.php'); - -// Load traductions files requiredby by page -$langs->load("companies"); -$langs->load("other"); - -// Get parameters -$id = GETPOST('id','int'); -$action = GETPOST('action','alpha'); -$backtopage = GETPOST('backtopage'); -$myparam = GETPOST('myparam','alpha'); - -$search_field1=GETPOST("search_field1"); -$search_field2=GETPOST("search_field2"); - -// Protection if external user -if ($user->societe_id > 0) -{ - //accessforbidden(); -} - -if (empty($action) && empty($id) && empty($ref)) $action='list'; - -// Load object if id or ref is provided as parameter -$object=new Skeleton_Class($db); -if (($id > 0 || ! empty($ref)) && $action != 'add') -{ - $result=$object->fetch($id,$ref); - if ($result < 0) dol_print_error($db); -} - -// Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array -$hookmanager->initHooks(array('skeleton')); -$extrafields = new ExtraFields($db); - - - -/******************************************************************* -* ACTIONS -* -* Put here all code to do according to value of "action" parameter -********************************************************************/ - -$parameters=array(); -$reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - -if (empty($reshook)) -{ - // Action to add record - if ($action == 'add') - { - if (GETPOST('cancel')) - { - $urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1); - header("Location: ".$urltogo); - exit; - } - - $error=0; - - /* object_prop_getpost_prop */ - $object->prop1=GETPOST("field1"); - $object->prop2=GETPOST("field2"); - - if (empty($object->ref)) - { - $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")),'errors'); - } - - if (! $error) - { - $result=$object->create($user); - if ($result > 0) - { - // Creation OK - $urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1); - header("Location: ".$urltogo); - exit; - } - { - // Creation KO - if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); - else setEventMessages($object->error, null, 'errors'); - $action='create'; - } - } - else - { - $action='create'; - } - } - - // Cancel - if ($action == 'update' && GETPOST('cancel')) $action='view'; - - // Action to update record - if ($action == 'update' && ! GETPOST('cancel')) - { - $error=0; - - $object->prop1=GETPOST("field1"); - $object->prop2=GETPOST("field2"); - - if (empty($object->ref)) - { - $error++; - setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")),null,'errors'); - } - - if (! $error) - { - $result=$object->update($user); - if ($result > 0) - { - $action='view'; - } - else - { - // Creation KO - if (! empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); - else setEventMessages($object->error, null, 'errors'); - $action='edit'; - } - } - else - { - $action='edit'; - } - } - - // Action to delete - if ($action == 'confirm_delete') - { - $result=$object->delete($user); - if ($result > 0) - { - // Delete OK - setEventMessages("RecordDeleted", null, 'mesgs'); - header("Location: ".dol_buildpath('/buildingmanagement/list.php',1)); - exit; - } - else - { - if (! empty($object->errors)) setEventMessages(null,$object->errors,'errors'); - else setEventMessages($object->error,null,'errors'); - } - } -} - - - - -/*************************************************** -* VIEW -* -* Put here all code to build page -****************************************************/ - -llxHeader('','MyPageName',''); - -$form=new Form($db); - - -// Put here content of your page - -// Example : Adding jquery code -print ''; - - -// Part to show a list -if ($action == 'list' || (empty($id) && $action != 'create')) -{ - // Put here content of your page - print load_fiche_titre('PageTitle'); - - $sql = "SELECT"; - $sql.= " t.rowid,"; - $sql.= " t.field1,"; - $sql.= " t.field2"; - // Add fields for extrafields - foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key; - // Add fields from hooks - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook - $sql.=$hookmanager->resPrint; - $sql.= " FROM ".MAIN_DB_PREFIX."mytable as t"; - $sql.= " WHERE 1 = 1"; - if ($search_field1) $sql.= natural_search("field1",$search_field1); - if ($search_field2) $sql.= natural_search("field2",$search_field2); - - // Add where from hooks - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook - $sql.=$hookmanager->resPrint; - - // Count total nb of records - $nbtotalofrecords = 0; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); - } - - $sql.= $db->order($sortfield, $sortorder); - $sql.= $db->plimit($conf->liste_limit+1, $offset); - - - dol_syslog($script_file, LOG_DEBUG); - $resql=$db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - - $params=''; - $params.= '&search_field1='.urlencode($search_field1); - $params.= '&search_field2='.urlencode($search_field2); - - print_barre_liste($title, $page, $_SERVER["PHP_SELF"],$params,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_companies'); - - - print '
'; - - if (! empty($moreforfilter)) - { - print '
'; - print $moreforfilter; - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - print '
'; - } - - print ''."\n"; - - // Fields title - print ''; - print_liste_field_titre($langs->trans('field1'),$_SERVER['PHP_SELF'],'t.field1','',$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('field2'),$_SERVER['PHP_SELF'],'t.field2','',$param,'',$sortfield,$sortorder); - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - print ''."\n"; - - // Fields title search - print ''; - print ''; - print ''; - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - print ''."\n"; - - - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - if ($obj) - { - // You can use here results - print ''; - print ''; - print ''; - $parameters=array('obj' => $obj); - $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - print ''; - } - $i++; - } - - $db->free($resql); - - $parameters=array('sql' => $sql); - $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - print "
'.$obj->field1.''.$obj->field2.'
\n"; - print "
\n"; - - } - else - { - $error++; - dol_print_error($db); - } -} - - - -// Part to create -if ($action == 'create') -{ - print_fiche_titre($langs->trans("NewSkeleton")); - - print '
'; - print ''; - print ''; - - dol_fiche_head(); - - print ''."\n"; - print ''; - - print '
'.$langs->trans("Label").''; - print ''; - print '
'."\n"; - - dol_fiche_end(); - - print '
 
'; - - print '
'; -} - - - -// Part to edit record -if (($id || $ref) && $action == 'edit') -{ - print '
'; - - dol_fiche_head(); - - print ''; - print ''; - print ''; - - dol_fiche_end(); - - print '
'; - - print '
'; -} - - - -// Part to show record -if ($id && (empty($action) || $action == 'view')) -{ - dol_fiche_head(); - - - - dol_fiche_end(); - - - // Buttons - print '
'."\n"; - $parameters=array(); - $reshook=$hookmanager->executeHooks('addMoreActionsButtons',$parameters,$object,$action); // Note that $action and $object may have been modified by hook - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - - if (empty($reshook)) - { - if ($user->rights->mymodule->write) - { - print ''."\n"; - } - - if ($user->rights->mymodule->delete) - { - if ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)) // We can't use preloaded confirm form with jmobile - { - print '
'.$langs->trans('Delete').'
'."\n"; - } - else - { - print ''."\n"; - } - } - } - print '
'."\n"; - - - // Example 2 : Adding links to objects - //$somethingshown=$form->showLinkedObjectBlock($object); - //$linktoelem = $form->showLinkToObjectBlock($object); - //if ($linktoelem) print '
'.$linktoelem; - -} - - -// End of page -llxFooter(); -$db->close(); diff --git a/dev/skeletons/skeleton_script.php b/dev/skeletons/skeleton_script.php index 35904c9bfd3..5eb1565d4a3 100644 --- a/dev/skeletons/skeleton_script.php +++ b/dev/skeletons/skeleton_script.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php * Copyright (C) ---Put here your own copyright and developer email--- diff --git a/dev/test/testtcpdf.php b/dev/test/testtcpdf.php index 4b8b6f36d53..ad67bce8af9 100755 --- a/dev/test/testtcpdf.php +++ b/dev/test/testtcpdf.php @@ -27,8 +27,8 @@ * @since 2008-03-04 */ -require_once('../../htdocs/includes/tcpdf/config/lang/eng.php'); -require_once('../../htdocs/includes/tcpdf/tcpdf.php'); +require_once('../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php'); +require_once('../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php'); // create new PDF document $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); diff --git a/dev/test/testutf.php b/dev/test/testutf.php index 5812b0c8639..cb83f431b93 100644 --- a/dev/test/testutf.php +++ b/dev/test/testutf.php @@ -47,8 +47,8 @@ print 'Files has been created. Check its name from your explorer'."\n"; * @since 2008-09-15 */ -require_once('../../htdocs/includes/tcpdf/config/lang/eng.php'); -require_once('../../htdocs/includes/tcpdf/tcpdf.php'); +require_once('../../htdocs/includes/tecnickcom/tcpdf/config/tcpdf_config.php'); +require_once('../../htdocs/includes/tecnickcom/tcpdf/tcpdf.php'); // create new PDF document $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); diff --git a/dev/translation/autotranslator.php b/dev/translation/autotranslator.php index 7fe21adfd73..58314a23b9e 100755 --- a/dev/translation/autotranslator.php +++ b/dev/translation/autotranslator.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php * diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php old mode 100644 new mode 100755 index a3b3911c77f..5eb92509eb1 --- a/dev/translation/sanity_check_en_langfiles.php +++ b/dev/translation/sanity_check_en_langfiles.php @@ -1,82 +1,102 @@ +#!/usr/bin/env php -* -* 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, see . -*/ +/* Copyright (c) 2015 Tommaso Basilici + * Copyright (c) 2015 Laurent Destailleur + * + * 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, see . + */ -echo ""; -echo ""; +$sapi_type = php_sapi_name(); +$script_file = basename(__FILE__); +$path=dirname(__FILE__).'/'; -echo ""; + + echo ""; } -tr:nth-child(odd) td { - background-color: #f1f1f1; -} +echo "If you call this file with the argument \"?unused=true\" it searches for the translation strings that exist in en_US but are never used.\n"; +if ($web) print "
"; +echo "IMPORTANT: that can take quite a lot of time (up to 10 minutes), you need to tune the max_execution_time on your php.ini accordingly.\n"; +if ($web) print "
"; -"; - -echo ""; - -echo "If you call this file with the argument \"?unused=true\" it searches for the translation strings that exist in en_US but are never used.
"; -echo "IMPORTANT: that can take quite a lot of time (up to 10 minutes), you need to tune the max_execution_time on your php.ini accordingly.
"; -echo "Happy translating :)
"; // STEP 1 - Search duplicates keys // directory containing the php and lang files -$htdocs = "../../htdocs/"; +$htdocs = $path."/../../htdocs/"; // directory containing the english lang files $workdir = $htdocs."langs/en_US/"; @@ -114,8 +134,10 @@ foreach ($files AS $file) { } } -foreach ($langstrings_3d AS $filename => $file) { - foreach ($file AS $linenum => $value) { +foreach ($langstrings_3d AS $filename => $file) +{ + foreach ($file AS $linenum => $value) + { $keys = array_keys($langstrings_full, $value); if (count($keys)>1) { @@ -126,30 +148,95 @@ foreach ($langstrings_3d AS $filename => $file) { } } -echo "

Duplicate strings in lang files in $workdir - ".count($dups)." found

"; +if ($web) print "

"; +print "Duplicate strings in lang files in $workdir - ".count($dups)." found\n"; +if ($web) print "

"; -echo " "; -echo ""; -echo ""; -$count = 0; -foreach ($dups as $string => $pages) { - $count++; - echo ""; - echo ""; - echo ""; - echo "\n"; +if ($web) +{ + echo '
#StringFile and lines
$count$string"; - foreach ($pages AS $page => $lines ) { - echo "$page "; - foreach ($lines as $line => $translatedvalue) { - //echo "($line - ".(substr($translatedvalue,0,20)).") "; - echo "($line - ".htmlentities($translatedvalue).") "; - } - echo "
"; - } - echo "
'."\n"; + echo "\n"; + echo "\n"; +} + +$sduplicateinsamefile=''; +$sinmainandother=''; +$sininstallandadmin=''; +$sother=''; + +$count = 0; +foreach ($dups as $string => $pages) +{ + $count++; + $s=''; + + // Keyword $string + if ($web) $s.=""; + if ($web) $s.=""; + if ($web) $s.=""; + if ($web) $s.=""; + $s.="\n"; + + if ($duplicateinsamefile) $sduplicateinsamefile .= $s; + else if ($inmain) $sinmainandother .= $s; + else if ($inadmin) $sininstallandadmin .= $s; + else $sother .= $s; +} + +if (! $web) print "\n***** Entries duplicated in same file\n"; +print $sduplicateinsamefile; +if (! $web && empty($sduplicateinsamefile)) print "None\n"; +if (! $web) print "\n"; + +if (! $web) print "***** Entries in main and another (keep only entry in main)\n"; +print $sinmainandother; +if (! $web && empty($sinmainandother)) print "None\n"; +if (! $web) print "\n"; + +if (! $web) print "***** Entries in admin and another\n"; +print $sininstallandadmin; +if (! $web && empty($sininstallandadmin)) print "None\n"; +if (! $web) print "\n"; + +if (! $web) print "***** Other\n"; +print $sother; +if (! $web && empty($sother)) print "None\n"; +if (! $web) print "\n"; + +if ($web) +{ + echo "\n"; + echo "
#StringFile and lines
"; + if ($web) $s.=$count; + if ($web) $s.=""; + $s.=$string; + if ($web) $s.=""; + if (! $web) $s.= ' : '; + + // Loop on each files keyword was found + $duplicateinsamefile=0; + $inmain=0; + $inadmin=0; + foreach ($pages AS $file => $lines) + { + if ($file == 'main.lang') { $inmain=1; $inadmin=0; } + if ($file == 'admin.lang' && ! $inmain) { $inadmin=1; } + + $s.=$file." "; + + // Loop on each line keword was found into file. + $listoffilesforthisentry=array(); + foreach ($lines as $line => $translatedvalue) + { + if (! empty($listoffilesforthisentry[$file])) $duplicateinsamefile=1; + $listoffilesforthisentry[$file]=1; + + $s.= "(".$line." - ".htmlentities($translatedvalue).") "; + } + if ($web) $s.="
"; + } + if ($web) $s.="
\n"; } -echo ""; -echo ""; // STEP 2 - Search key not used @@ -168,12 +255,20 @@ if (! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') } } - echo "

Strings in en_US that are never used

"; - echo "
";
+	if ($web) print "

\n"; + print "Strings in en_US that are never used\n"; + if ($web) print "

\n"; + if ($web) echo "
";
 	print_r($unused);
-	echo "
"; + if ($web) echo "
\n"; } echo "\n"; -echo ""; -echo ""; +if ($web) +{ + echo "\n"; + echo "\n"; +} + +exit; + diff --git a/dev/translation/strip_language_file.php b/dev/translation/strip_language_file.php index d612ff66abf..647b571c788 100755 --- a/dev/translation/strip_language_file.php +++ b/dev/translation/strip_language_file.php @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php diff --git a/dev/translation/txpush.sh b/dev/translation/txpush.sh index 89529b8d965..05ec107b6ff 100755 --- a/dev/translation/txpush.sh +++ b/dev/translation/txpush.sh @@ -7,13 +7,15 @@ # Usage: txpush.sh (source|xx_XX) [-r dolibarr.file] [-f] #------------------------------------------------------ +export project='dolibarr' + # Syntax if [ "x$1" = "x" ] then - echo "This push local files to transifex." + echo "This push local files to transifex for project $project." echo "Note: If you push a language file (not source), file will be skipped if transifex file is newer." echo " Using -f will overwrite translation but not memory." - echo "Usage: ./dev/translation/txpush.sh (source|xx_XX) [-r dolibarr.file] [-f] [--no-interactive]" + echo "Usage: ./dev/translation/txpush.sh (source|xx_XX|all) [-r dolibarr.file] [-f] [--no-interactive]" exit fi @@ -28,11 +30,24 @@ then echo "tx push -s $2 $3" tx push -s $2 $3 else - for file in `find htdocs/langs/$1/*.lang -type f` - do - echo $file - export basefile=`basename $file | sed -s s/\.lang//g` - echo "tx push --skip -r dolibarr.$basefile -t -l $1 $2 $3 $4" - tx push --skip -r dolibarr.$basefile -t -l $1 $2 $3 $4 - done + if [ "x$1" = "xall" ] + then + for dir in `find htdocs/langs/* -type d` + do + shortdir=`basename $dir` + file=$3 + echo $file + export basefile=`basename $file | sed -s s/\.lang//g` + echo "tx push --skip -t -l $shortdir $2 $3 $4" + tx push --skip -t -l $shortdir $2 $3 $4 + done + else + for file in `find htdocs/langs/$1/*.lang -type f` + do + echo $file + export basefile=`basename $file | sed -s s/\.lang//g` + echo "tx push --skip -r $project.$basefile -t -l $1 $2 $3 $4" + tx push --skip -r $project.$basefile -t -l $1 $2 $3 $4 + done + fi fi diff --git a/doc/images/appicon_128.png b/doc/images/appicon_128.png old mode 100755 new mode 100644 diff --git a/doc/images/appicon_16.ico b/doc/images/appicon_16.ico old mode 100755 new mode 100644 diff --git a/doc/images/appicon_16.png b/doc/images/appicon_16.png old mode 100755 new mode 100644 diff --git a/doc/images/appicon_32.png b/doc/images/appicon_32.png old mode 100755 new mode 100644 diff --git a/doc/images/appicon_48.ico b/doc/images/appicon_48.ico old mode 100755 new mode 100644 diff --git a/doc/images/appicon_64.png b/doc/images/appicon_64.png old mode 100755 new mode 100644 diff --git a/doc/images/dolibarr_73x73.png b/doc/images/dolibarr_73x73.png old mode 100755 new mode 100644 diff --git a/doc/images/dolibarr_logo.png b/doc/images/dolibarr_logo.png old mode 100755 new mode 100644 diff --git a/htdocs/.gitignore b/htdocs/.gitignore index 949cb7c77f5..050707daf91 100644 --- a/htdocs/.gitignore +++ b/htdocs/.gitignore @@ -1,7 +1,11 @@ +/allscreens* /ancot* /bootstrap* +/dolimed* +/ecommerce* /extensions* /google* +/lead /multicompany* /ndf* /numberingpack* @@ -15,3 +19,6 @@ /dolimed* /allscreens* /ecommerce/ +/cabinetmed* +/conf/conf.php +/webmail* diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 0bf37a7753e..8ebaa93d96c 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -17,17 +17,16 @@ */ /** - * \file htdocs/accountancy/admin/account.php - * \ingroup Accounting Expert - * \brief List accounting account + * \file htdocs/accountancy/admin/account.php + * \ingroup Accounting Expert + * \brief List accounting account */ - require '../../main.inc.php'; - + // Class -require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; // Langs $langs->load("compta"); @@ -44,12 +43,12 @@ $search_pcgtype = GETPOST("search_pcgtype"); $search_pcgsubtype = GETPOST("search_pcgsubtype"); // Security check -if (!$user->admin) - accessforbidden(); +if (! $user->admin) + accessforbidden(); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'sortorder'); -$limit = $conf->liste_limit; +$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit; $page = GETPOST("page", 'int'); if ($page == - 1) { $page = 0; @@ -76,7 +75,7 @@ if ($action == 'disable') { $action = 'update'; if ($result < 0) { - setEventMessage($accounting->error, 'errors'); + setEventMessages($accounting->error, $accounting->errors, 'errors'); } } else if ($action == 'enable') { if ($accounting->fetch($id)) { @@ -84,17 +83,17 @@ if ($action == 'disable') { } $action = 'update'; if ($result < 0) { - setEventMessage($accounting->error, 'errors'); + setEventMessages($accounting->error, $accounting->errors, 'errors'); } } if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { - $search_account=""; - $search_label=""; - $search_accountparent=""; - $search_pcgtype=""; - $search_pcgsubtype=""; + $search_account = ""; + $search_label = ""; + $search_accountparent = ""; + $search_pcgtype = ""; + $search_pcgsubtype = ""; } /* @@ -106,7 +105,7 @@ llxHeader('', $langs->trans("ListAccounts")); $pcgver = $conf->global->CHARTOFACCOUNTS; $sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.pcg_subtype, aa.account_number, aa.account_parent , aa.label, aa.active "; -$sql .= " FROM " . MAIN_DB_PREFIX . "accountingaccount as aa, " . MAIN_DB_PREFIX . "accounting_system as asy"; +$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa, " . MAIN_DB_PREFIX . "accounting_system as asy"; $sql .= " WHERE aa.fk_pcg_version = asy.pcg_version"; $sql .= " AND asy.rowid = " . $pcgver; @@ -156,7 +155,7 @@ if ($result) { print_liste_field_titre($langs->trans("Pcgtype"), $_SERVER["PHP_SELF"], "aa.pcg_type", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Pcgsubtype"), $_SERVER["PHP_SELF"], "aa.pcg_subtype", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($langs->trans("Activated"), $_SERVER["PHP_SELF"], "aa.active", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"",$param,"",'width="60" align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder); print ''; print ''; @@ -167,24 +166,23 @@ if ($result) { print ''; print ' '; print ''; - print ''; + print ''; print ' '; - print ''; + print ''; print ''; print ''; $var = false; - $accountstatic=new AccountingAccount($db); + $accountstatic = new AccountingAccount($db); - while ( $i < min($num, $limit) ) - { + while ( $i < min($num, $limit) ) { $obj = $db->fetch_object($resql); - $accountstatic->id=$obj->rowid; - $accountstatic->label=$obj->label; - $accountstatic->account_number=$obj->account_number; - + $accountstatic->id = $obj->rowid; + $accountstatic->label = $obj->label; + $accountstatic->account_number = $obj->account_number; + print ''; print '' . $accountstatic->getNomUrl(1) . ''; print '' . $obj->label . ''; @@ -217,7 +215,7 @@ if ($result) { print '' . "\n"; print "\n"; - $var=!$var; + $var = ! $var; $i ++; } diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 51c6a5c6715..7810ad4f3ef 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -18,18 +18,18 @@ */ /** - * \file htdocs/accountancy/admin/card.php - * \ingroup Accounting Expert - * \brief Card accounting account + * \file htdocs/accountancy/admin/card.php + * \ingroup Accounting Expert + * \brief Card accounting account */ require '../../main.inc.php'; // Class -require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; -$error=0; +$error = 0; // Langs $langs->load("bills"); @@ -42,21 +42,20 @@ $rowid = GETPOST('rowid', 'int'); $cancel = GETPOST('cancel'); // Security check -if (!$user->admin) - accessforbidden(); +if (! $user->admin) + accessforbidden(); $accounting = new AccountingAccount($db); // Action -if ($action == 'add') -{ +if ($action == 'add') { if (! $cancel) { $sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS; - + dol_syslog('accountancy/admin/card.php:: $sql=' . $sql); $result = $db->query($sql); $obj = $db->fetch_object($result); - + $accounting->fk_pcg_version = $obj->pcg_version; $accounting->pcg_type = GETPOST('pcg_type'); $accounting->pcg_subtype = GETPOST('pcg_subtype'); @@ -64,9 +63,9 @@ if ($action == 'add') $accounting->account_parent = GETPOST('account_parent', 'int'); $accounting->label = GETPOST('label', 'alpha'); $accounting->active = 1; - + $res = $accounting->create($user); - + if ($res == 0) { } else { if ($res == - 3) { @@ -80,27 +79,25 @@ if ($action == 'add') } } Header("Location: account.php"); -} -else if ($action == 'edit') -{ +} else if ($action == 'edit') { if (! GETPOST('cancel', 'alpha')) { $result = $accounting->fetch($id); - + $sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS; - + dol_syslog('accountancy/admin/card.php:: $sql=' . $sql); $result2 = $db->query($sql); $obj = $db->fetch_object($result2); - + $accounting->fk_pcg_version = $obj->pcg_version; $accounting->pcg_type = GETPOST('pcg_type'); $accounting->pcg_subtype = GETPOST('pcg_subtype'); $accounting->account_number = GETPOST('account_number'); $accounting->account_parent = GETPOST('account_parent', 'int'); $accounting->label = GETPOST('label', 'alpha'); - + $result = $accounting->update($user); - + if ($result > 0) { header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); exit(); @@ -111,21 +108,19 @@ else if ($action == 'edit') header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); exit(); } -} -else if ($action == 'delete') -{ +} else if ($action == 'delete') { $result = $accounting->fetch($id); - + if (! empty($accounting->id)) { $result = $accounting->delete($user); - + if ($result > 0) { Header("Location: account.php"); } } - + if ($result < 0) { - setEventMessage($accounting->error, 'errors'); + setEventMessages($accounting->error, $accounting->errors, 'errors'); } } @@ -137,25 +132,24 @@ llxheader('', $langs->trans('AccountAccounting')); $form = new Form($db); $htmlacc = new FormVentilation($db); -if ($action == 'create') -{ - print_fiche_titre($langs->trans('NewAccount')); - +if ($action == 'create') { + print load_fiche_titre($langs->trans('NewAccount')); + print '
' . "\n"; print ''; print ''; - + dol_fiche_head(); - + print ''; - - print ''; + + print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; print ''; print ''; - + print '
' . $langs->trans("AccountNumber") . '
' . $langs->trans("AccountNumber") . '
' . $langs->trans("Label") . '
' . $langs->trans("Label") . '
' . $langs->trans("Accountparent") . ''; - print $htmlacc->select_account($accounting->account_parent, 'account_parent'); + print $htmlacc->select_account($accounting->account_parent, 'account_parent', 1); print '
' . $langs->trans("Pcgtype") . ''; @@ -165,52 +159,49 @@ if ($action == 'create') print ''; print $htmlacc->select_pcgsubtype($accounting->pcg_subtype, 'pcg_subtype'); print '
'; - + dol_fiche_end(); - + print '
'; print ''; print '     '; print ''; print '
'; - + print '
'; -} -else if ($id) -{ +} else if ($id) { $rowid = $id; $account = $accounting->fetch($rowid); - + if ($account > 0) { dol_htmloutput_mesg($mesg); - + $head = accounting_prepare_head($accounting); - - if ($action == 'update') - { + + if ($action == 'update') { $soc = new Societe($db); if ($object->socid) { $soc->fetch($object->socid); } - + dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr'); - + print '
' . "\n"; print ''; print ''; print ''; - + print ''; - - print ''; + + print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; print ''; print ''; - + print '
' . $langs->trans("AccountNumber") . '
' . $langs->trans("AccountNumber") . '
' . $langs->trans("Label") . '
' . $langs->trans("Label") . '
' . $langs->trans("Accountparent") . ''; - print $htmlacc->select_account($accounting->account_parent, 'account_parent'); + print $htmlacc->select_account($accounting->account_parent, 'account_parent', 1); print '
' . $langs->trans("Pcgtype") . ''; @@ -220,89 +211,86 @@ else if ($id) print ''; print $htmlacc->select_pcgsubtype($accounting->pcg_subtype, 'pcg_subtype'); print '
'; - + dol_fiche_end(); - + print '
'; print ''; print '     '; print ''; print '
'; - + print '
'; - } - else - { + } else { $linkback = '' . $langs->trans("BackToChartofaccounts") . ''; - + dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr'); - + print ''; - + // Account number print ''; print ''; print ''; - + print ''; print ''; - + $accp = new AccountingAccount($db); if (! empty($accounting->account_parent)) { $accp->fetch($accounting->account_parent, ''); } print ''; print ''; - + print ''; print ''; - + print ''; print ''; - + print ''; print ''; - + print '
' . $langs->trans("AccountNumber") . '' . $accounting->account_number . '' . $linkback . '
' . $langs->trans("Label") . '' . $accounting->label . '
' . $langs->trans("Accountparent") . '' . $accp->account_number . ' - ' . $accp->label . '
' . $langs->trans("Pcgtype") . '' . $accounting->pcg_type . '
' . $langs->trans("Pcgsubtype") . '' . $accounting->pcg_subtype . '
' . $langs->trans("Activated") . ''; - + if (empty($accounting->active)) { print img_picto($langs->trans("Disabled"), 'switch_off'); } else { print img_picto($langs->trans("Activated"), 'switch_on'); } - + print '
'; - + dol_fiche_end(); - + /* * Barre d'actions */ - + print '
'; - + if ($user->admin) { print '' . $langs->trans('Modify') . ''; } else { print '' . $langs->trans('Modify') . ''; } - + if ($user->admin) { print '' . $langs->trans('Delete') . ''; } else { print '' . $langs->trans('Delete') . ''; } - + print '
'; } - } - else - { + } else { dol_print_error($db); } } -$db->close(); -llxFooter(); \ No newline at end of file +llxFooter(); + +$db->close(); \ No newline at end of file diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 856670e18e2..0dc1798ef57 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -4,7 +4,7 @@ * Copyright (C) 2014 Florian Henry * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -21,16 +21,15 @@ */ /** - * \file htdocs/accountancy/admin/export.php - * \ingroup Accounting Expert - * \brief Setup page to configure accounting expert module + * \file htdocs/accountancy/admin/export.php + * \ingroup Accounting Expert + * \brief Setup page to configure accounting expert module */ - require '../../main.inc.php'; // Class -require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; $langs->load("compta"); $langs->load("bills"); @@ -38,20 +37,24 @@ $langs->load("admin"); $langs->load("accountancy"); // Security check -if (!$user->admin) - accessforbidden(); +if (! $user->admin) + accessforbidden(); $action = GETPOST('action', 'alpha'); -// Other parameters ACCOUNTING_EXPORT_* -$list = array ( +// Parameters ACCOUNTING_EXPORT_* +$main_option = array ( + 'ACCOUNTING_EXPORT_PREFIX_SPEC' +); + +$model_option = array ( 'ACCOUNTING_EXPORT_SEPARATORCSV', 'ACCOUNTING_EXPORT_DATE', 'ACCOUNTING_EXPORT_PIECE', 'ACCOUNTING_EXPORT_GLOBAL_ACCOUNT', 'ACCOUNTING_EXPORT_LABEL', 'ACCOUNTING_EXPORT_AMOUNT', - 'ACCOUNTING_EXPORT_DEVISE' + 'ACCOUNTING_EXPORT_DEVISE' ); /* @@ -59,30 +62,46 @@ $list = array ( */ if ($action == 'update') { $error = 0; - + + $format = GETPOST('format', 'alpha'); $modelcsv = GETPOST('modelcsv', 'int'); - + + if (! empty($format)) { + if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_FORMAT', $format, 'chaine', 0, '', $conf->entity)) { + $error ++; + } + } else { + $error ++; + } + if (! empty($modelcsv)) { - if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) { $error ++; } } else { $error ++; } - - foreach ( $list as $constname ) { + + foreach ( $main_option as $constname ) { $constvalue = GETPOST($constname, 'alpha'); - + if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { $error ++; } } - + + foreach ( $model_option as $constname ) { + $constvalue = GETPOST($constname, 'alpha'); + + if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error ++; + } + } + if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"), 'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -94,21 +113,74 @@ llxHeader(); $form = new Form($db); -$linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'title_setup'); +$linkback = '' . $langs->trans("BackToModuleList") . ''; +print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup'); $head = admin_accounting_prepare_head(); - print '
'; print ''; print ''; dol_fiche_head($head, 'export', $langs->trans("Configuration"), 0, 'cron'); -print ''; $var = true; +/* + * Main Options + */ +print '
'; +print ''; +print ''; +print "\n"; + +$var = ! $var; + +print ''; +print ''; +if (! $conf->use_javascript_ajax) { + print '"; +} else { + print ''; +} +print ""; + +$num = count($main_option); +if ($num) { + foreach ( $main_option as $key ) { + $var = ! $var; + + print ''; + + // Param + $label = $langs->trans($key); + print ''; + + // Value + print ''; + } +} + +print "
' . $langs->trans('MainOptions') . '
' . $langs->trans("Selectformat") . ''; + print $langs->trans("NotAvailableWhenAjaxDisabled"); + print "'; + $listformat = array ( + 'csv' => $langs->trans("csv"), + 'txt' => $langs->trans("txt") + ); + print $form->selectarray("format", $listformat, $conf->global->ACCOUNTING_EXPORT_FORMAT, 0); + + print '
' . $label . ''; + print ''; + print '
\n"; + +print "
\n"; + +/* + * Export model + */ +print ''; + print ''; print ''; print ''; @@ -117,21 +189,19 @@ $var = ! $var; print ''; print ''; -if (! $conf->use_javascript_ajax) -{ +if (! $conf->use_javascript_ajax) { print '"; -} -else -{ +} else { print ''; } print ""; @@ -143,30 +213,30 @@ print "
\n"; * Parameters */ -$num = count($list); -if ($num) -{ +$num2 = count($model_option); +if ($num2) { print '
' . $langs->trans("Modelcsv") . '
' . $langs->trans("Selectmodelcsv") . ''; print $langs->trans("NotAvailableWhenAjaxDisabled"); print "'; - $listmodelcsv=array( - '1'=>$langs->trans("Modelcsv_normal"), - '2'=>$langs->trans("Modelcsv_CEGID") + $listmodelcsv = array ( + '1' => $langs->trans("Modelcsv_normal"), + '2' => $langs->trans("Modelcsv_CEGID"), + '3' => $langs->trans("Modelcsv_COALA") ); - print $form->selectarray("modelcsv",$listmodelcsv,$conf->global->ACCOUNTING_EXPORT_MODELCSV,0); - + print $form->selectarray("modelcsv", $listmodelcsv, $conf->global->ACCOUNTING_EXPORT_MODELCSV, 0); + print '
'; print ''; print ''; print "\n"; - if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > 1) print ''; - - foreach ( $list as $key ) { + if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > 1) + print ''; + + foreach ( $model_option as $key ) { $var = ! $var; - + print ''; - + // Param $label = $langs->trans($key); print ''; - + // Value print ''; } - + print "
' . $langs->trans('OtherOptions') . '
' . $langs->trans('OptionsDeactivatedForThisExportModel') . '
' . $langs->trans('OptionsDeactivatedForThisExportModel') . '
' . $label . ''; print ''; print '
\n"; } diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index bd530eaa8d7..75411d6402f 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -16,34 +16,37 @@ */ /** - * \file htdocs/accountancy/admin/fiscalyear.php - * \ingroup fiscal year - * \brief Setup page to configure fiscal year + * \file htdocs/accountancy/admin/fiscalyear.php + * \ingroup fiscal year + * \brief Setup page to configure fiscal year */ - require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php'; -$action=GETPOST('action'); +$action = GETPOST('action'); $langs->load("admin"); $langs->load("compta"); -if (! $user->admin) accessforbidden(); +if (! $user->admin) + accessforbidden(); -$error=0; +$error = 0; // List of statut -static $tmpstatut2label=array( - '0'=>'OpenFiscalYear', - '1'=>'CloseFiscalYear' +static $tmpstatut2label = array ( + '0' => 'OpenFiscalYear', + '1' => 'CloseFiscalYear' ); -$statut2label=array(''); -foreach ($tmpstatut2label as $key => $val) $statut2label[$key]=$langs->trans($val); +$statut2label = array ( + '' +); +foreach ( $tmpstatut2label as $key => $val ) + $statut2label[$key] = $langs->trans($val); -$errors=array(); +$errors = array (); $object = new Fiscalyear($db); @@ -55,67 +58,59 @@ $object = new Fiscalyear($db); * View */ -$max=100; +$max = 100; $form = new Form($db); $title = $langs->trans('FiscalYears'); -llxHeader('',$title,LOG_ERR); +llxHeader('', $title, LOG_ERR); -print_fiche_titre($langs->trans('FiscalYears')); +print load_fiche_titre($langs->trans('FiscalYears')); $sql = "SELECT f.rowid, f.label, f.date_start, f.date_end, f.statut, f.entity"; -$sql.= " FROM ".MAIN_DB_PREFIX."accounting_fiscalyear as f"; -$sql.= " WHERE f.entity = ".$conf->entity; +$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_fiscalyear as f"; +$sql .= " WHERE f.entity = " . $conf->entity; $result = $db->query($sql); -if ($result) -{ - $var=false; - $num = $db->num_rows($result); - - $i = 0; - +if ($result) { + $var = false; + $num = $db->num_rows($result); + + $i = 0; + // Load attribute_label print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print ''; - - if ($num) - { - $fiscalyearstatic=new Fiscalyear($db); - - while ($i < $num && $i < $max) - { - $obj = $db->fetch_object($result); - $fiscalyearstatic->id=$obj->rowid; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - $var=!$var; - $i++; - } - - } - else - { - print ''; - } - + + if ($num) { + $fiscalyearstatic = new Fiscalyear($db); + + while ( $i < $num && $i < $max ) { + $obj = $db->fetch_object($result); + $fiscalyearstatic->id = $obj->rowid; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $var = ! $var; + $i ++; + } + } else { + print ''; + } + print '
'.$langs->trans("Ref").''.$langs->trans("Label").''.$langs->trans("DateStart").''.$langs->trans("DateEnd").''.$langs->trans("Statut").'' . $langs->trans("Ref") . '' . $langs->trans("Label") . '' . $langs->trans("DateStart") . '' . $langs->trans("DateEnd") . '' . $langs->trans("Statut") . '
'.img_object($langs->trans("ShowFiscalYear"),"technic").' '.$obj->rowid.''.$obj->label.''.dol_print_date($db->jdate($obj->date_start),'day').''.dol_print_date($db->jdate($obj->date_end),'day').''.$fiscalyearstatic->LibStatut($obj->statut,5).'
'.$langs->trans("None").'
' . img_object($langs->trans("ShowFiscalYear"), "technic") . ' ' . $obj->rowid . '' . $obj->label . '' . dol_print_date($db->jdate($obj->date_start), 'day') . '' . dol_print_date($db->jdate($obj->date_end), 'day') . '' . $fiscalyearstatic->LibStatut($obj->statut, 5) . '
' . $langs->trans("None") . '
'; -} -else -{ +} else { dol_print_error($db); } @@ -123,7 +118,7 @@ dol_fiche_end(); // Buttons print ''; llxFooter(); diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index a1692878c55..e04cc7132f0 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -16,145 +16,123 @@ */ /** - * \file htdocs/accountancy/admin/fiscalyear_card.php - * \brief Page to show a fiscal year + * \file htdocs/accountancy/admin/fiscalyear_card.php + * \brief Page to show a fiscal year */ - require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php'; - +require_once DOL_DOCUMENT_ROOT . '/core/lib/fiscalyear.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php'; $langs->load("admin"); $langs->load("compta"); // Security check -if (! $user->admin) accessforbidden(); +if (! $user->admin) + accessforbidden(); -$error=0; +$error = 0; -$action = GETPOST('action','alpha'); -$confirm = GETPOST('confirm','alpha'); -$id = GETPOST('id','int'); +$action = GETPOST('action', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); +$id = GETPOST('id', 'int'); // List of statut -static $tmpstatut2label=array( - '0'=>'OpenFiscalYear', - '1'=>'CloseFiscalYear' +static $tmpstatut2label = array ( + '0' => 'OpenFiscalYear', + '1' => 'CloseFiscalYear' ); -$statut2label=array(''); -foreach ($tmpstatut2label as $key => $val) $statut2label[$key]=$langs->trans($val); +$statut2label = array ( + '' +); +foreach ( $tmpstatut2label as $key => $val ) + $statut2label[$key] = $langs->trans($val); $object = new Fiscalyear($db); -$date_start=dol_mktime(0,0,0,GETPOST('fiscalyearmonth','int'),GETPOST('fiscalyearday','int'),GETPOST('fiscalyearyear','int')); -$date_end=dol_mktime(0,0,0,GETPOST('fiscalyearendmonth','int'),GETPOST('fiscalyearendday','int'),GETPOST('fiscalyearendyear','int')); - +$date_start = dol_mktime(0, 0, 0, GETPOST('fiscalyearmonth', 'int'), GETPOST('fiscalyearday', 'int'), GETPOST('fiscalyearyear', 'int')); +$date_end = dol_mktime(0, 0, 0, GETPOST('fiscalyearendmonth', 'int'), GETPOST('fiscalyearendday', 'int'), GETPOST('fiscalyearendyear', 'int')); /* * Actions */ -if ($action == 'confirm_delete' && $confirm == "yes") -{ - $result=$object->delete($id); - if ($result >= 0) - { - header("Location: fiscalyear.php"); - exit; - } - else - { - setEventMessage($object->error, 'errors'); - } -} +if ($action == 'confirm_delete' && $confirm == "yes") { + $result = $object->delete($id); + if ($result >= 0) { + header("Location: fiscalyear.php"); + exit(); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } +} -else if ($action == 'add') -{ - if (! GETPOST('cancel','alpha')) - { - $error=0; - - $object->date_start = $date_start; - $object->date_end = $date_end; - $object->label = GETPOST('label','alpha'); - $object->statut = GETPOST('statut','int'); - $object->datec = dol_now(); - - if (empty($object->date_start) && empty($object->date_end)) - { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")), 'errors'); - $error++; - } - if (empty($object->label)) - { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Label")), 'errors'); - $error++; - } - - if (! $error) - { +else if ($action == 'add') { + if (! GETPOST('cancel', 'alpha')) { + $error = 0; + + $object->date_start = $date_start; + $object->date_end = $date_end; + $object->label = GETPOST('label', 'alpha'); + $object->statut = GETPOST('statut', 'int'); + $object->datec = dol_now(); + + if (empty($object->date_start) && empty($object->date_end)) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); + $error ++; + } + if (empty($object->label)) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); + $error ++; + } + + if (! $error) { $db->begin(); - - $id = $object->create($user); - - if ($id > 0) - { - $db->commit(); - - header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); - exit; - } - else - { - $db->rollback(); - - setEventMessage($object->error, 'errors'); - $action='create'; - } - } - else - { - $action='create'; - } - } - else - { - header("Location: ./fiscalyear.php"); - exit; - } -} + + $id = $object->create($user); + + if ($id > 0) { + $db->commit(); + + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); + exit(); + } else { + $db->rollback(); + + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'create'; + } + } else { + $action = 'create'; + } + } else { + header("Location: ./fiscalyear.php"); + exit(); + } +} // Update record -else if ($action == 'update') -{ - if (! GETPOST('cancel','alpha')) - { - $result = $object->fetch($id); - - $object->date_start = empty($_POST["fiscalyear"])?'':$date_start; - $object->date_end = empty($_POST["fiscalyearend"])?'':$date_end; - $object->label = GETPOST('label','alpha'); - $object->statut = GETPOST('statut','int'); - - $result = $object->update($user); - - if ($result > 0) - { - header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); - exit; - } - else - { - setEventMessage($object->error, 'errors'); - } - } - else - { - header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); - exit; - } +else if ($action == 'update') { + if (! GETPOST('cancel', 'alpha')) { + $result = $object->fetch($id); + + $object->date_start = empty($_POST["fiscalyear"]) ? '' : $date_start; + $object->date_end = empty($_POST["fiscalyearend"]) ? '' : $date_end; + $object->label = GETPOST('label', 'alpha'); + $object->statut = GETPOST('statut', 'int'); + + $result = $object->update($user); + + if ($result > 0) { + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); + exit(); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } else { + header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); + exit(); + } } /* @@ -167,176 +145,165 @@ $form = new Form($db); /* * Action create -*/ -if ($action == 'create') -{ - print_fiche_titre($langs->trans("NewFiscalYear")); - - print ''; - print ''; - print ''; - + */ +if ($action == 'create') { + print load_fiche_titre($langs->trans("NewFiscalYear")); + + print ''; + print ''; + print ''; + dol_fiche_head(); - - print ''; - + + print '
'; + // Label - print ''; - + print ''; + // Date start - print ''; - - // Date end - print ''; - + print ''; + + // Date end + print ''; + // Statut - print ''; - print ''; + print ''; + print ''; print ''; - - print '
'.$langs->trans("Label").'
' . $langs->trans("Label") . '
'.$langs->trans("DateStart").''; - print $form->select_date(($date_start?$date_start:''),'fiscalyear'); - print '
'.$langs->trans("DateEnd").''; - print $form->select_date(($date_end?$date_end:-1),'fiscalyearend'); - print '
' . $langs->trans("DateStart") . ''; + print $form->select_date(($date_start ? $date_start : ''), 'fiscalyear'); + print '
' . $langs->trans("DateEnd") . ''; + print $form->select_date(($date_end ? $date_end : - 1), 'fiscalyearend'); + print '
'.$langs->trans("Statut").'
' . $langs->trans("Statut") . ''; - print $form->selectarray('statut',$statut2label,GETPOST('statut')); - print '
'; + print $form->selectarray('statut', $statut2label, GETPOST('statut')); + print ''; + + print ''; dol_fiche_end(); - - print '
'; - print ''; + + print '
'; + print ''; print '     '; - print ''; + print ''; print '
'; - - print ''; -} -else if ($id) -{ - $result = $object->fetch($id); - if ($result > 0) - { - $head = fiscalyear_prepare_head($object); - - if ($action == 'edit') - { - dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron'); - - print '
' . "\n"; - print ''; - print ''; - print ''; - - print ''; - - // Ref - print ""; - print ''; - - // Label - print ''; - - // Date start - print ''; - - // Date end - print ''; - - // Statut - print ''; + + // Date start + print ''; + + // Date end + print ''; + + // Statut + print ''; + + print '
'.$langs->trans("Ref").''; - print $object->rowid; - print '
'.$langs->trans("Label").''; - print ''; - print '
'.$langs->trans("DateStart").''; - print $form->select_date($object->date_start?$object->date_start:-1,'fiscalyear'); - print '
'.$langs->trans("DateEnd").''; - print $form->select_date($object->date_end?$object->date_end:-1,'fiscalyearend'); - print '
'.$langs->trans("Statut").''; - print $form->selectarray('statut',$statut2label,$object->statut); + + print ''; +} else if ($id) { + $result = $object->fetch($id); + if ($result > 0) { + $head = fiscalyear_prepare_head($object); + + if ($action == 'edit') { + dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron'); + + print '
' . "\n"; + print ''; + print ''; + print ''; + + print ''; + + // Ref + print ""; + print ''; - - print '
' . $langs->trans("Ref") . ''; + print $object->rowid; print '
'; - - print '
'; - print ''; + + // Label + print '
' . $langs->trans("Label") . ''; + print ''; + print '
' . $langs->trans("DateStart") . ''; + print $form->select_date($object->date_start ? $object->date_start : - 1, 'fiscalyear'); + print '
' . $langs->trans("DateEnd") . ''; + print $form->select_date($object->date_end ? $object->date_end : - 1, 'fiscalyearend'); + print '
' . $langs->trans("Statut") . ''; + print $form->selectarray('statut', $statut2label, $object->statut); + print '
'; + + print '
'; + print ''; print '     '; - print ''; - print '
'; - - print ''; - - dol_fiche_end(); - } - else - { - /* - * Confirm delete - */ - if ($action == 'delete') - { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id,$langs->trans("DeleteFiscalYear"),$langs->trans("ConfirmDeleteFiscalYear"),"confirm_delete"); - - } - - dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron'); - - print ''; - - $linkback = ''.$langs->trans("BackToList").''; - - // Ref - print ''; + + // Statut + print ''; + + print "
'.$langs->trans("Ref").''; - print $object->rowid; + print ''; + print ''; + + print ''; + + dol_fiche_end(); + } else { + /* + * Confirm delete + */ + if ($action == 'delete') { + print $form->formconfirm($_SERVER["PHP_SELF"] . "?id=" . $id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete"); + } + + dol_fiche_head($head, 'card', $langs->trans("FiscalYearCard"), 0, 'cron'); + + print ''; + + $linkback = '' . $langs->trans("BackToList") . ''; + + // Ref + print ''; - + print ''; + // Label - print '"; - - // Date start - print ''; - + print '"; + + // Date start + print ''; + // Date end - print ''; - - // Statut - print ''; - - print "
' . $langs->trans("Ref") . ''; + print $object->rowid; print ''; print $linkback; - print '
'; - print $form->editfieldkey("Label",'label',$object->label,$object,$conf->global->MAIN_EDIT_ALSO_INLINE,'alpha:32'); - print ''; - print $form->editfieldval("Label",'label',$object->label,$object,$conf->global->MAIN_EDIT_ALSO_INLINE,'alpha:32'); - print "
'; - print $form->editfieldkey("Date",'date_start',$object->date_start,$object,$conf->global->MAIN_EDIT_ALSO_INLINE,'datepicker'); - print ''; - print $form->editfieldval("Date",'date_start',$object->date_start,$object,$conf->global->MAIN_EDIT_ALSO_INLINE,'datepicker'); - print '
'; + print $form->editfieldkey("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); + print ''; + print $form->editfieldval("Label", 'label', $object->label, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'alpha:32'); + print "
'; + print $form->editfieldkey("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print ''; + print $form->editfieldval("Date", 'date_start', $object->date_start, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print '
'; - print $form->editfieldkey("Date",'date_end',$object->date_end,$object,$conf->global->MAIN_EDIT_ALSO_INLINE,'datepicker'); - print ''; - print $form->editfieldval("Date",'date_end',$object->date_end,$object,$conf->global->MAIN_EDIT_ALSO_INLINE,'datepicker'); - print '
'.$langs->trans("Status").''.$object->getLibStatut(4).'
"; - - dol_fiche_end(); - - /* - * Barre d'actions - */ - - print '
'; - - print ''.$langs->trans('Modify').''; - - print ''.$langs->trans('Delete').''; - - print '
'; - } - } - else - { - dol_print_error($db); - } + print '
'; + print $form->editfieldkey("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print ''; + print $form->editfieldval("Date", 'date_end', $object->date_end, $object, $conf->global->MAIN_EDIT_ALSO_INLINE, 'datepicker'); + print '
' . $langs->trans("Status") . '' . $object->getLibStatut(4) . '
"; + + dol_fiche_end(); + + /* + * Barre d'actions + */ + + print '
'; + + print '' . $langs->trans('Modify') . ''; + + print '' . $langs->trans('Delete') . ''; + + print '
'; + } + } else { + dol_print_error($db); + } } llxFooter(); diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index ddd0eaaab98..f1f61a1f8d5 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -16,45 +16,42 @@ */ /** - * \file htdocs/accountancy/admin/fiscalyear_card.php - * \brief Page to show info of a fiscal year + * \file htdocs/accountancy/admin/fiscalyear_card.php + * \brief Page to show info of a fiscal year */ - require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/fiscalyear.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/fiscalyear.class.php'; - +require_once DOL_DOCUMENT_ROOT . '/core/lib/fiscalyear.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php'; $langs->load("admin"); $langs->load("compta"); // Security check -if (! $user->admin) accessforbidden(); +if (! $user->admin) + accessforbidden(); -$id = GETPOST('id','int'); +$id = GETPOST('id', 'int'); // View llxHeader(); -if ($id) -{ +if ($id) { $object = new Fiscalyear($db); $object->fetch($id); $object->info($id); - + $head = fiscalyear_prepare_head($object); - + dol_fiche_head($head, 'info', $langs->trans("FiscalYearCard"), 0, 'cron'); - - print '
'; - dol_print_object_info($object); - print '
'; - - print '
'; + + print '
'; + dol_print_object_info($object); + print '
'; + + print '
'; } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/accountancy/admin/importaccounts.php b/htdocs/accountancy/admin/importaccounts.php index e81557d0522..15bd063bf9c 100644 --- a/htdocs/accountancy/admin/importaccounts.php +++ b/htdocs/accountancy/admin/importaccounts.php @@ -19,17 +19,16 @@ */ /** - * \file htdocs/accountancy/admin/importaccounts.php - * \ingroup Accounting Expert - * \brief Page import accounting account + * \file htdocs/accountancy/admin/importaccounts.php + * \ingroup Accounting Expert + * \brief Page import accounting account */ - require '../../main.inc.php'; - + // Class -require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; // langs $langs->load("compta"); @@ -38,8 +37,8 @@ $langs->load("main"); $langs->load("accountancy"); // Security check -if (!$user->admin) - accessforbidden(); +if (! $user->admin) + accessforbidden(); llxHeader('', $langs->trans("ImportAccount")); @@ -76,14 +75,14 @@ if ($_POST["action"] == 'import') { $result = $accounting->create($user); if ($result > 0) { - setEventMessage($langs->trans("AccountingAccountAdd"), 'mesgs'); + setEventMessages($langs->trans("AccountingAccountAdd"), null, 'mesgs'); } else { - setEventMessage($accounting->error, 'errors'); + setEventMessages($accounting->error, $accounting->errors, 'errors'); } $cpt ++; } } else { - setEventMessage($langs->trans('AccountPlanNotFoundCheckSetting'), 'errors'); + setEventMessages($langs->trans('AccountPlanNotFoundCheckSetting'), null, 'errors'); } } else { print '
' . $langs->trans("AnyLineImport") . '
'; @@ -92,9 +91,9 @@ if ($_POST["action"] == 'import') { } /* -* list accounting account from product -* -*/ + * list accounting account from product + * + */ $page = GETPOST("page"); if ($page < 0) $page = 0; @@ -124,7 +123,7 @@ if ($result) { print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 44b2268dc06..6a63ad433cb 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -23,16 +23,16 @@ */ /** - * \file htdocs/accountancy/admin/index.php - * \ingroup Accounting Expert - * \brief Setup page to configure accounting expert module + * \file htdocs/accountancy/admin/index.php + * \ingroup Accounting Expert + * \brief Setup page to configure accounting expert module */ - require '../../main.inc.php'; - + // Class -require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; $langs->load("compta"); $langs->load("bills"); @@ -40,18 +40,21 @@ $langs->load("admin"); $langs->load("accountancy"); // Security check -if (!$user->admin) - accessforbidden(); +if (! $user->admin) + accessforbidden(); $action = GETPOST('action', 'alpha'); // Other parameters ACCOUNTING_* $list = array ( 'ACCOUNTING_LIMIT_LIST_VENTILATION', - 'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc - 'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc + 'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc + 'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc 'ACCOUNTING_LENGTH_GACCOUNT', - 'ACCOUNTING_LENGTH_AACCOUNT', + 'ACCOUNTING_LENGTH_AACCOUNT' +); + +$list_account = array ( 'ACCOUNTING_ACCOUNT_CUSTOMER', 'ACCOUNTING_ACCOUNT_SUPPLIER', 'ACCOUNTING_PRODUCT_BUY_ACCOUNT', @@ -67,28 +70,27 @@ $list = array ( /* * Actions */ - -$accounting_mode = defined('ACCOUNTING_MODE')?ACCOUNTING_MODE:'RECETTES-DEPENSES'; -if ($action == 'update') -{ - $error = 0; +$accounting_mode = defined('ACCOUNTING_MODE') ? ACCOUNTING_MODE : 'RECETTES-DEPENSES'; - $accounting_modes = array( - 'RECETTES-DEPENSES', - 'CREANCES-DETTES' - ); - - $accounting_mode = GETPOST('accounting_mode','alpha'); +if ($action == 'update') { + $error = 0; - if (in_array($accounting_mode,$accounting_modes)) { - - if (!dolibarr_set_const($db, 'ACCOUNTING_MODE', $accounting_mode, 'chaine', 0, '', $conf->entity)) { - $error++; - } - } else { - $error++; - } + $accounting_modes = array ( + 'RECETTES-DEPENSES', + 'CREANCES-DETTES' + ); + + $accounting_mode = GETPOST('accounting_mode', 'alpha'); + + if (in_array($accounting_mode, $accounting_modes)) { + + if (! dolibarr_set_const($db, 'ACCOUNTING_MODE', $accounting_mode, 'chaine', 0, '', $conf->entity)) { + $error ++; + } + } else { + $error ++; + } $chartofaccounts = GETPOST('chartofaccounts', 'int'); @@ -101,22 +103,27 @@ if ($action == 'update') $error ++; } - foreach ($list as $constname) { - $constvalue = GETPOST($constname, 'alpha'); - - if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { - $error++; - } - } - - if (! $error) - { - setEventMessage($langs->trans("SetupSaved")); - } - else - { - setEventMessage($langs->trans("Error"),'errors'); - } + foreach ( $list as $constname ) { + $constvalue = GETPOST($constname, 'alpha'); + + if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error ++; + } + } + + foreach ( $list_account as $constname ) { + $constvalue = GETPOST($constname, 'alpha'); + + if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error ++; + } + } + + if (! $error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } } if ($action == 'setlistsorttodo') { @@ -126,9 +133,9 @@ if ($action == 'setlistsorttodo') { $error ++; if (! $error) { - setEventMessage($langs->trans("SetupSaved"), 'mesgs'); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"), 'mesgs'); + setEventMessages($langs->trans("Error"), null, 'mesgs'); } } @@ -138,9 +145,9 @@ if ($action == 'setlistsortdone') { if (! $res > 0) $error ++; if (! $error) { - setEventMessage($langs->trans("SetupSaved"), 'mesgs'); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"), 'mesgs'); + setEventMessages($langs->trans("Error"), null, 'mesgs'); } } @@ -151,15 +158,15 @@ if ($action == 'setlistsortdone') { llxHeader(); $form = new Form($db); +$formaccountancy = new FormVentilation($db); -$linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'title_setup'); +$linkback = '' . $langs->trans("BackToModuleList") . ''; +print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup'); $head = admin_accounting_prepare_head($accounting); - -print ''; -print ''; +print ''; +print ''; print ''; dol_fiche_head($head, 'general', $langs->trans("Configuration"), 0, 'cron'); @@ -169,24 +176,24 @@ print '
' . $langs->trans("accountingaccount") . '
' . $langs->trans("AccountAccouting") . '' . $langs->trans("label") . '' . $langs->trans("Accountparent") . '' . $langs->trans("Pcgtype") . '
'; // Cas du parametre ACCOUNTING_MODE print ''; -print ''; +print ''; print "\n"; -print ''; -print ''; +print '\n"; -print ''; -print '\n"; +print ''; +print '\n"; print "
'.$langs->trans('OptionMode').''.$langs->trans('Description').'' . $langs->trans('OptionMode') . '' . $langs->trans('Description') . '
'.$langs->trans('OptionModeTrue').''.nl2br($langs->trans('OptionModeTrueDesc')); +print '
' . $langs->trans('OptionModeTrue') . '' . nl2br($langs->trans('OptionModeTrueDesc')); // Write info on way to count VAT -//if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) -//{ -// // print "
\n"; -// // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite')); -//} -//else -//{ -// // print "
\n"; -// // print nl2br($langs->trans('OptionModeTrueInfoExpert')); -//} +// if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) +// { +// // print "
\n"; +// // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite')); +// } +// else +// { +// // print "
\n"; +// // print nl2br($langs->trans('OptionModeTrueInfoExpert')); +// } print "
'.$langs->trans('OptionModeVirtual').''.nl2br($langs->trans('OptionModeVirtualDesc'))."
' . $langs->trans('OptionModeVirtual') . '' . nl2br($langs->trans('OptionModeVirtualDesc')) . "
\n"; @@ -246,19 +253,33 @@ print ''; print '' . $langs->trans('OtherOptions') . ''; print "\n"; -foreach ($list as $key) -{ - $var=!$var; - - print ''; - +foreach ( $list as $key ) { + $var = ! $var; + + print ''; + // Param - $label = $langs->trans($key); - print ''; - + $label = $langs->trans($key); + print ''; + // Value print ''; - print ''; + print ''; + print ''; +} + +foreach ( $list_account as $key ) { + $var = ! $var; + + print ''; + + // Param + $label = $langs->trans($key); + print ''; + + // Value + print ''; + print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1); print ''; } @@ -294,7 +315,7 @@ print "\n"; dol_fiche_end(); -print '
'; +print '
'; print ''; diff --git a/htdocs/accountancy/admin/journal.php b/htdocs/accountancy/admin/journal.php index e1d4894788a..e1b76273193 100644 --- a/htdocs/accountancy/admin/journal.php +++ b/htdocs/accountancy/admin/journal.php @@ -22,24 +22,23 @@ */ /** - * \file htdocs/accountancy/admin/journal.php - * \ingroup Accounting Expert - * \brief Setup page to configure accounting expert module + * \file htdocs/accountancy/admin/journal.php + * \ingroup Accounting Expert + * \brief Setup page to configure accounting expert module */ - require '../../main.inc.php'; - + // Class -require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/bank.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php'; $langs->load("accountancy"); // Security check -if (!$user->admin) - accessforbidden(); +if (! $user->admin) + accessforbidden(); $action = GETPOST('action', 'alpha'); @@ -49,7 +48,7 @@ $list = array ( 'ACCOUNTING_PURCHASE_JOURNAL', 'ACCOUNTING_SOCIAL_JOURNAL', 'ACCOUNTING_MISCELLANEOUS_JOURNAL', - 'ACCOUNTING_EXPENSEREPORT_JOURNAL' + 'ACCOUNTING_EXPENSEREPORT_JOURNAL' ); /* @@ -68,9 +67,9 @@ if ($action == 'update') { } if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"), 'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -82,8 +81,8 @@ llxHeader(); $form = new Form($db); -$linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'title_setup'); +$linkback = '' . $langs->trans("BackToModuleList") . ''; +print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup'); $head = admin_accounting_prepare_head(null); @@ -115,10 +114,8 @@ foreach ( $list as $key ) { print "\n"; - print '
'; - print ''; print ''; print ''; @@ -126,39 +123,37 @@ print "\n"; // Bank account $sql = "SELECT rowid, label, accountancy_journal"; -$sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; -$sql.= " WHERE entity = ".$conf->entity; -$sql.= " AND clos = 0"; -$sql.= " ORDER BY label"; +$sql .= " FROM " . MAIN_DB_PREFIX . "bank_account"; +$sql .= " WHERE entity = " . $conf->entity; +$sql .= " AND clos = 0"; +$sql .= " ORDER BY label"; $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $numr = $db->num_rows($resql); $i = 0; - + if ($numr > 0) - - while ($i < $numr) - { - $objp = $db->fetch_object($resql); - $var = ! $var; - - print ''; - - // Param - print ''; - - // Value - print ''; - - $i++; - } -} -else dol_print_error($db); + while ( $i < $numr ) { + $objp = $db->fetch_object($resql); + + $var = ! $var; + + print ''; + + // Param + print ''; + + // Value + print ''; + + $i ++; + } +} else + dol_print_error($db); $db->free($resql); print "
' . $langs->trans('JournalFinancial') . '
'; - print ''; - print '
'; + print ''; + print '
\n"; @@ -169,6 +164,5 @@ print '
load("main"); $langs->load("accountancy"); +// Security check +if (! $user->admin) { + accessforbidden(); +} +if (empty($conf->accounting->enabled)) { + accessforbidden(); +} + // search & action GETPOST $action = GETPOST('action'); $codeventil_buy = GETPOST('codeventil_buy', 'array'); @@ -67,19 +76,19 @@ $pagenext = $page + 1; // bug in page limit if ACCOUNTING_LIMIT_LIST_VENTILATION < $conf->liste_limit there is no pagination displayed ! if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) && $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION >= $conf->liste_limit) { $limit = $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION; - // } else if ($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION <= 0) { - // $limit = $conf->liste_limit; } else { - $limit = $conf->liste_limit; + $limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit; } $offset = $limit * $page; -if (! $sortfield) +if (! $sortfield) { $sortfield = "p.ref"; -if (! $sortorder) +} +if (! $sortorder) { $sortorder = "ASC"; +} - // sales or purchase +// Sales or Purchase mode ? if ($action == 'update') { if (! empty($btn_changetype)) { $error = 0; @@ -100,7 +109,7 @@ if ($action == 'update') { $error ++; } } - + if (! empty($btn_changeaccount)) { $msg = '
' . $langs->trans("Processing") . '...
'; if (! empty($chk_prod)) { @@ -112,11 +121,11 @@ if ($action == 'update') { $cpt = 0; foreach ( $chk_prod as $productid ) { - $accounting_account_id=GETPOST('codeventil_'.$productid); + $accounting_account_id = GETPOST('codeventil_' . $productid); - $result=$accounting->fetch($accounting_account_id,null,1); - if ($result<0) { - //setEventMessage(null, $accounting->errors,'errors'); + $result = $accounting->fetch($accounting_account_id, null, 1); + if ($result < 0) { + // setEventMessages(null, $accounting->errors, 'errors'); $msg .= '
' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("NotVentilatedinAccount") . ' : id=' . $accounting_account_id . '
' . $sql . '
'; } else { @@ -131,9 +140,9 @@ if ($action == 'update') { dol_syslog("/accountancy/admin/productaccount.php sql=" . $sql, LOG_DEBUG); if ($db->query($sql)) { - $msg .= '
' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("VentilatedinAccount") . ' : ' . $monCompte . '
'; + $msg .= '
' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accounting->account_number) . '
'; } else { - $msg .= '
' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("NotVentilatedinAccount") . ' : ' . $accounting->account_number . '
' . $sql . '
'; + $msg .= '
' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accounting->account_number) . '
' . $sql . '
'; } } @@ -143,17 +152,9 @@ if ($action == 'update') { $msg .= '
' . $langs->trans("AnyLineVentilate") . '
'; } $msg .= '
' . $langs->trans("EndProcessing") . '
'; - } } -// Security check -if ($user->societe_id > 0) - accessforbidden(); - // TODO after adding menu - // if (! $user->rights->accounting->ventilation->dispatch) - // accessforbidden(); - $form = new FormVentilation($db); // Defaut AccountingAccount RowId Product / Service @@ -179,13 +180,12 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_desc = ''; } -// debug move header to top -llxHeader('', $langs->trans("Accounts")); - /* * View */ +llxHeader('', $langs->trans("Accounts")); + print ''; - + /* * Show result array */ print '

'; - + $i = 0; print ""; print ""; @@ -638,19 +567,21 @@ else print ""; print ""; print "\n"; - + $var = true; $r = ''; - + foreach ( $tabpay as $key => $val ) { $date = dol_print_date($db->jdate($val["date"]), 'day'); - - if ($val["lib"] == '(SupplierInvoicePayment)') + + if ($val["lib"] == '(SupplierInvoicePayment)') { $reflabel = $langs->trans('SupplierInvoicePayment'); - if ($val["lib"] == '(CustomerInvoicePayment)') + } + if ($val["lib"] == '(CustomerInvoicePayment)') { $reflabel = $langs->trans('CustomerInvoicePayment'); - - // Bank + } + + // Bank foreach ( $tabbq[$key] as $k => $mt ) { print ""; print ""; @@ -662,10 +593,9 @@ else print ""; print ""; } - + // Third party - if (is_array ( $tabtp[$key])) - { + if (is_array($tabtp[$key])) { foreach ( $tabtp[$key] as $k => $mt ) { if ($k != 'type') { print ""; @@ -679,15 +609,12 @@ else print ""; } } - } - else - { - foreach ( $tabbq[$key] as $k => $mt ) - { + } else { + foreach ( $tabbq[$key] as $k => $mt ) { print ""; print ""; print ""; - print ""; + print ""; print ""; print ""; print ""; @@ -697,10 +624,9 @@ else } $var = ! $var; } - + print "
" . $langs->trans("PaymentMode") . "" . $langs->trans("Debit") . "" . $langs->trans("Credit") . "
" . $date . "" . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "" . $reflabel . "" . $conf->global->ACCOUNTING_ACCOUNT_SUSPENSE . "" . length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) . "" . $langs->trans('ThirdParty') . " " . ($mt < 0 ? price(- $mt) : '') . "
"; - - // End of page + llxFooter(); } $db->close(); diff --git a/htdocs/accountancy/journal/index.php b/htdocs/accountancy/journal/index.php index 9906c68d0c8..c6905ee531e 100644 --- a/htdocs/accountancy/journal/index.php +++ b/htdocs/accountancy/journal/index.php @@ -19,13 +19,12 @@ */ /** - * \file htdocs/accountancy/journal/index.php - * \ingroup Accounting Expert - * \brief Index + * \file htdocs/accountancy/journal/index.php + * \ingroup Accounting Expert + * \brief Index */ - require '../../main.inc.php'; - + // Langs $langs->load("compta"); $langs->load("bills"); @@ -42,5 +41,5 @@ llxHeader('', 'Journaux', ''); $form = new Form($db); // End of page -$db->close(); -llxFooter(); \ No newline at end of file +llxFooter(); +$db->close(); \ No newline at end of file diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 5844700748a..86232bb2029 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -3,9 +3,9 @@ * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2013-2014 Alexandre Spangaro + * Copyright (C) 2013-2015 Alexandre Spangaro * Copyright (C) 2013-2014 Olivier Geffroy - * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013-2016 Florian Henry * * 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 @@ -22,21 +22,20 @@ */ /** - * \file htdocs/accountancy/journal/purchasesjournal.php - * \ingroup Accounting Expert - * \brief Page with purchases journal + * \file htdocs/accountancy/journal/purchasesjournal.php + * \ingroup Accounting Expert + * \brief Page with purchases journal */ - require '../../main.inc.php'; // Class -require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; +require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.class.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; // Langs $langs->load("compta"); @@ -52,14 +51,14 @@ $date_endmonth = GETPOST('date_endmonth'); $date_endday = GETPOST('date_endday'); $date_endyear = GETPOST('date_endyear'); +$now = dol_now(); + // Security check if ($user->societe_id > 0) accessforbidden(); $action = GETPOST('action'); - - /* * Actions */ @@ -84,14 +83,14 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY); $idpays = $p[0]; -$sql = "SELECT f.rowid, f.ref, f.type, f.datef as df, f.libelle,"; +$sql = "SELECT f.rowid, f.ref, f.type, f.datef as df, f.libelle,f.ref_supplier,"; $sql .= " fd.rowid as fdid, fd.description, fd.total_ttc, fd.tva_tx, fd.total_ht, fd.tva as total_tva, fd.product_type,"; $sql .= " s.rowid as socid, s.nom as name, s.code_compta_fournisseur, s.fournisseur,"; $sql .= " s.code_compta_fournisseur, p.accountancy_code_buy , ct.accountancy_code_buy as account_tva, aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte"; $sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as fd"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = fd.fk_product"; -$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON aa.rowid = fd.fk_code_ventilation"; +$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation"; $sql .= " JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = fd.fk_facture_fourn"; $sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc"; $sql .= " WHERE f.fk_statut > 0 "; @@ -113,13 +112,13 @@ if ($result) { // les variables $cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER)) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"); $cpttva = (! empty($conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"); - + $tabfac = array (); $tabht = array (); $tabtva = array (); $tabttc = array (); $tabcompany = array (); - + $i = 0; while ( $i < $num ) { $obj = $db->fetch_object($result); @@ -133,9 +132,9 @@ if ($result) { $compta_prod = (! empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef"); } $compta_tva = (! empty($obj->account_tva) ? $obj->account_tva : $cpttva); - + $tabfac[$obj->rowid]["date"] = $obj->df; - $tabfac[$obj->rowid]["ref"] = $obj->ref; + $tabfac[$obj->rowid]["ref"] = $obj->ref_supplier . ' (' . $obj->ref . ')'; $tabfac[$obj->rowid]["type"] = $obj->type; $tabfac[$obj->rowid]["description"] = $obj->description; $tabfac[$obj->rowid]["fk_facturefourndet"] = $obj->fdid; @@ -145,9 +144,9 @@ if ($result) { $tabcompany[$obj->rowid] = array ( 'id' => $obj->socid, 'name' => $obj->name, - 'code_fournisseur' => $obj->code_compta_fournisseur + 'code_fournisseur' => $obj->code_compta_fournisseur ); - + $i ++; } } else { @@ -158,11 +157,11 @@ if ($result) { if ($action == 'writebookkeeping') { $now = dol_now(); $error = 0; - + foreach ( $tabfac as $key => $val ) { foreach ( $tabttc[$key] as $k => $mt ) { // get compte id and label - + $bookkeeping = new BookKeeping($db); $bookkeeping->doc_date = $val["date"]; $bookkeeping->doc_ref = $val["ref"]; @@ -179,14 +178,14 @@ if ($action == 'writebookkeeping') { $bookkeeping->credit = ($mt > 0) ? $mt : 0; $bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL; $bookkeeping->fk_user_author = $user->id; - - $result = $bookkeeping->create(); + + $result = $bookkeeping->create($user); if ($result < 0) { $error ++; - setEventMessage($object->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } - + // Product / Service foreach ( $tabht[$key] as $k => $mt ) { if ($mt) { @@ -209,16 +208,16 @@ if ($action == 'writebookkeeping') { $bookkeeping->credit = ($mt <= 0) ? $mt : 0; $bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL; $bookkeeping->fk_user_author = $user->id; - - $result = $bookkeeping->create(); + + $result = $bookkeeping->create($user); if ($result < 0) { $error ++; - setEventMessage($object->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } } - + // VAT // var_dump($tabtva); foreach ( $tabtva[$key] as $k => $mt ) { @@ -240,22 +239,21 @@ if ($action == 'writebookkeeping') { $bookkeeping->credit = ($mt <= 0) ? $mt : 0; $bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL; $bookkeeping->fk_user_author = $user->id; - - $result = $bookkeeping->create(); + + $result = $bookkeeping->create($user); if ($result < 0) { $error ++; - setEventMessage($object->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } } - + if (empty($error)) { - setEventMessage($langs->trans("GeneralLedgerIsWritten"),'mesgs'); + setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs'); } } - /* * View */ @@ -263,31 +261,26 @@ if ($action == 'writebookkeeping') { $companystatic = new Fournisseur($db); // Export -if ($action == 'export_csv') -{ +if ($action == 'export_csv') { $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; - $purchase_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL; - - header('Content-Type: text/csv'); - if ($conf->global->EXPORT_PREFIX_SPEC) - $filename=$conf->global->EXPORT_PREFIX_SPEC."_"."journal_achats.csv"; - else - $filename="journal_achats.csv"; - header('Content-Disposition: attachment;filename='.$filename); - - if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) // Model Cegid Expert Export + $journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL; + + include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; + + // Model Cegid Expert Export + if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) { $sep = ";"; foreach ( $tabfac as $key => $val ) { $date = dol_print_date($db->jdate($val["date"]), '%d%m%Y'); - + // Product / Service foreach ( $tabht[$key] as $k => $mt ) { $companystatic->id = $tabcompany[$key]['id']; $companystatic->name = $tabcompany[$key]['name']; $companystatic->client = $tabcompany[$key]['code_client']; - + if ($mt) { print $date . $sep; print $purchase_journal . $sep; @@ -300,7 +293,7 @@ if ($action == 'export_csv') print "\n"; } } - + // VAT foreach ( $tabtva[$key] as $k => $mt ) { if ($mt) { @@ -315,7 +308,7 @@ if ($action == 'export_csv') print "\n"; } } - + foreach ( $tabttc[$key] as $k => $mt ) { print $date . $sep; print $purchase_journal . $sep; @@ -328,19 +321,19 @@ if ($action == 'export_csv') print "\n"; } } - } else // Model Classic Export - { + } else { + // Model Classic Export foreach ( $tabfac as $key => $val ) { $date = dol_print_date($db->jdate($val["date"]), 'day'); - + $companystatic->id = $tabcompany[$key]['id']; $companystatic->name = $tabcompany[$key]['name']; $companystatic->client = $tabcompany[$key]['code_client']; - + // Product / Service foreach ( $tabht[$key] as $k => $mt ) { - $accountingaccount = new AccountingAccount($db); - $accountingaccount->fetch(null, $k); + $accountingaccount = new AccountingAccount($db); + $accountingaccount->fetch(null, $k); if ($mt) { print '"' . $date . '"' . $sep; print '"' . $val["ref"] . '"' . $sep; @@ -363,7 +356,7 @@ if ($action == 'export_csv') print "\n"; } } - + // Third party foreach ( $tabttc[$key] as $k => $mt ) { print '"' . $date . '"' . $sep; @@ -377,28 +370,32 @@ if ($action == 'export_csv') } } } else { - - llxHeader('', '', ''); - + + llxHeader('', $langs->trans("PurchasesJournal")); + $form = new Form($db); - + $nom = $langs->trans("PurchasesJournal"); $nomlink = ''; $periodlink = ''; $exportlink = ''; $builddate = time(); $description = $langs->trans("DescPurchasesJournal") . '
'; - if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) + if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { $description .= $langs->trans("DepositsAreNotIncluded"); - else + } else { $description .= $langs->trans("DepositsAreIncluded"); + } + $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); - report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => '')); - + report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( + 'action' => '' + )); + print ''; - + print ''; - + print ' '; - + /* * Show result array */ print '

'; - + $i = 0; print ""; print ""; @@ -427,25 +424,25 @@ if ($action == 'export_csv') print ""; print ""; print "\n"; - + $var = true; $r = ''; - + $invoicestatic = new FactureFournisseur($db); - + foreach ( $tabfac as $key => $val ) { $invoicestatic->id = $key; $invoicestatic->ref = $val["ref"]; $invoicestatic->type = $val["type"]; $invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32)); - + $date = dol_print_date($db->jdate($val["date"]), 'day'); - + // Product / Service foreach ( $tabht[$key] as $k => $mt ) { - $accountingaccount = new AccountingAccount($db); - $accountingaccount->fetch(null, $k); - + $accountingaccount = new AccountingAccount($db); + $accountingaccount->fetch(null, $k); + if ($mt) { print ""; print ""; @@ -470,7 +467,7 @@ if ($action == 'export_csv') } } print ""; - + // Third party foreach ( $tabttc[$key] as $k => $mt ) { print ""; @@ -485,13 +482,14 @@ if ($action == 'export_csv') print '"; } print ""; - + $var = ! $var; } - + print "
" . $langs->trans("Account") . "" . $langs->trans("Type") . "" . $langs->trans("Debit") . "" . $langs->trans("Credit") . "
" . $date . "
" . $date . "' . ($mt >= 0 ? price($mt) : '') . "
"; - + // End of page llxFooter(); } + $db->close(); diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 8535e59aa26..4678a677597 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -24,21 +24,20 @@ */ /** - * \file htdocs/accountancy/journal/sellsjournal.php - * \ingroup Accounting Expert - * \brief Page with sells journal + * \file htdocs/accountancy/journal/sellsjournal.php + * \ingroup Accounting Expert + * \brief Page with sells journal */ - require '../../main.inc.php'; // Class -require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT . '/societe/class/client.class.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; // Langs $langs->load("compta"); @@ -54,14 +53,14 @@ $date_endmonth = GETPOST('date_endmonth'); $date_endday = GETPOST('date_endday'); $date_endyear = GETPOST('date_endyear'); +$now = dol_now(); + // Security check if ($user->societe_id > 0) accessforbidden(); $action = GETPOST('action'); - - /* * View */ @@ -93,7 +92,7 @@ $sql .= " p.rowid as pid, p.ref as pref, p.accountancy_code_sell, aa.rowid as fk $sql .= " fd.situation_percent,ct.accountancy_code_sell as account_tva"; $sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = fd.fk_product"; -$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON aa.rowid = fd.fk_code_ventilation"; +$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation"; $sql .= " JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture"; $sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'"; @@ -103,10 +102,9 @@ if (! empty($conf->multicompany->enabled)) { } $sql .= " AND f.fk_statut > 0"; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - $sql.= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")"; -} -else { - $sql.= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_STANDARD.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")"; + $sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")"; +} else { + $sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_STANDARD . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")"; } $sql .= " AND fd.product_type IN (0,1)"; if ($date_start && $date_end) @@ -121,16 +119,16 @@ if ($result) { $tabtva = array (); $tabttc = array (); $tabcompany = array (); - + $num = $db->num_rows($result); $i = 0; - + while ( $i < $num ) { $obj = $db->fetch_object($result); // les variables $cptcli = (! empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER)) ? $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER : $langs->trans("CodeNotDef"); $compta_soc = (! empty($obj->code_compta)) ? $obj->code_compta : $cptcli; - + $compta_prod = $obj->compte; if (empty($compta_prod)) { if ($obj->product_type == 0) @@ -140,12 +138,12 @@ if ($result) { } $cpttva = (! empty($conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"); $compta_tva = (! empty($obj->account_tva) ? $obj->account_tva : $cpttva); - + // Situation invoices handling $line = new FactureLigne($db); $line->fetch($obj->rowid); $prev_progress = $line->get_prev_progress(); - if ($obj->type==Facture::TYPE_SITUATION) { + if ($obj->type == Facture::TYPE_SITUATION) { // Avoid divide by 0 if ($obj->situation_percent == 0) { $situation_ratio = 0; @@ -155,7 +153,7 @@ if ($result) { } else { $situation_ratio = 1; } - + // Invoice lines $tabfac[$obj->rowid]["date"] = $obj->df; $tabfac[$obj->rowid]["ref"] = $obj->facnumber; @@ -174,9 +172,9 @@ if ($result) { $tabcompany[$obj->rowid] = array ( 'id' => $obj->socid, 'name' => $obj->name, - 'code_client' => $obj->code_compta + 'code_client' => $obj->code_compta ); - + $i ++; } } else { @@ -189,15 +187,12 @@ if ($result) { */ // Bookkeeping Write -if ($action == 'writebookkeeping') -{ +if ($action == 'writebookkeeping') { $now = dol_now(); $error = 0; - - foreach ($tabfac as $key => $val) - { - foreach ($tabttc[$key] as $k => $mt) - { + + foreach ( $tabfac as $key => $val ) { + foreach ( $tabttc[$key] as $k => $mt ) { $bookkeeping = new BookKeeping($db); $bookkeeping->doc_date = $val["date"]; $bookkeeping->doc_ref = $val["ref"]; @@ -214,16 +209,16 @@ if ($action == 'writebookkeeping') $bookkeeping->credit = ($mt < 0) ? $mt : 0; $bookkeeping->code_journal = $conf->global->ACCOUNTING_SELL_JOURNAL; $bookkeeping->fk_user_author = $user->id; - - $result = $bookkeeping->create(); + + $result = $bookkeeping->create($user); if ($result < 0) { $error ++; - setEventMessage($object->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } - + // Product / Service - foreach ($tabht[$key] as $k => $mt) { + foreach ( $tabht[$key] as $k => $mt ) { if ($mt) { // get compte id and label $accountingaccount = new AccountingAccount($db); @@ -244,22 +239,20 @@ if ($action == 'writebookkeeping') $bookkeeping->credit = ($mt >= 0) ? $mt : 0; $bookkeeping->code_journal = $conf->global->ACCOUNTING_SELL_JOURNAL; $bookkeeping->fk_user_author = $user->id; - - $result = $bookkeeping->create(); + + $result = $bookkeeping->create($user); if ($result < 0) { $error ++; - setEventMessage($object->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } } - + // VAT // var_dump($tabtva); - foreach ($tabtva[$key] as $k => $mt) - { - if ($mt) - { + foreach ( $tabtva[$key] as $k => $mt ) { + if ($mt) { $bookkeeping = new BookKeeping($db); $bookkeeping->doc_date = $val["date"]; $bookkeeping->doc_ref = $val["ref"]; @@ -276,47 +269,42 @@ if ($action == 'writebookkeeping') $bookkeeping->credit = ($mt >= 0) ? $mt : 0; $bookkeeping->code_journal = $conf->global->ACCOUNTING_SELL_JOURNAL; $bookkeeping->fk_user_author = $user->id; - - $result = $bookkeeping->create(); + + $result = $bookkeeping->create($user); if ($result < 0) { $error ++; - setEventMessage($object->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } } - + if (empty($error)) { - setEventMessage($langs->trans("GeneralLedgerIsWritten"),'mesgs'); + setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs'); } } // Export -if ($action == 'export_csv') -{ +if ($action == 'export_csv') { $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; $sell_journal = $conf->global->ACCOUNTING_SELL_JOURNAL; - - header('Content-Type: text/csv'); - if ($conf->global->EXPORT_PREFIX_SPEC) - $filename=$conf->global->EXPORT_PREFIX_SPEC."_"."journal_ventes.csv"; - else - $filename="journal_ventes.csv"; - header('Content-Disposition: attachment;filename='.$filename); - + + include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; + $companystatic = new Client($db); - - if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) // Model Cegid Expert Export + + // Model Cegid Expert Export + if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) { $sep = ";"; - + foreach ( $tabfac as $key => $val ) { $companystatic->id = $tabcompany[$key]['id']; $companystatic->name = $tabcompany[$key]['name']; $companystatic->client = $tabcompany[$key]['code_client']; - + $date = dol_print_date($db->jdate($val["date"]), '%d%m%Y'); - + foreach ( $tabttc[$key] as $k => $mt ) { print $date . $sep; print $sell_journal . $sep; @@ -328,22 +316,23 @@ if ($action == 'export_csv') print $val["ref"]; print "\n"; } - + // Product / Service foreach ( $tabht[$key] as $k => $mt ) { - if ($mt) { + $accountingaccount_static = new AccountingAccount($db); + if ($accountingaccount_static->fetch(null, $k)) { print $date . $sep; print $sell_journal . $sep; print length_accountg(html_entity_decode($k)) . $sep; print $sep; print ($mt < 0 ? 'D' : 'C') . $sep; print ($mt <= 0 ? price(- $mt) : $mt) . $sep; - print dol_trunc($val["description"], 32) . $sep; + print dol_trunc($accountingaccount_static->label, 32) . $sep; print $val["ref"]; print "\n"; } } - + // TVA foreach ( $tabtva[$key] as $k => $mt ) { if ($mt) { @@ -359,17 +348,15 @@ if ($action == 'export_csv') } } } - } - else // Model Classic Export - { - foreach ($tabfac as $key => $val) - { + } else { + // Model Classic Export + foreach ( $tabfac as $key => $val ) { $companystatic->id = $tabcompany[$key]['id']; $companystatic->name = $tabcompany[$key]['name']; $companystatic->client = $tabcompany[$key]['code_client']; - + $date = dol_print_date($db->jdate($val["date"]), 'day'); - + foreach ( $tabttc[$key] as $k => $mt ) { print '"' . $date . '"' . $sep; print '"' . $val["ref"] . '"' . $sep; @@ -379,13 +366,12 @@ if ($action == 'export_csv') print '"' . ($mt < 0 ? price(- $mt) : '') . '"'; print "\n"; } - + // Product / Service - foreach ($tabht[$key] as $k => $mt) - { + foreach ( $tabht[$key] as $k => $mt ) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch(null, $k); - + if ($mt) { print '"' . $date . '"' . $sep; print '"' . $val["ref"] . '"' . $sep; @@ -396,10 +382,9 @@ if ($action == 'export_csv') print "\n"; } } - + // VAT - foreach ($tabtva[$key] as $k => $mt) - { + foreach ( $tabtva[$key] as $k => $mt ) { if ($mt) { print '"' . $date . '"' . $sep; print '"' . $val["ref"] . '"' . $sep; @@ -413,11 +398,11 @@ if ($action == 'export_csv') } } } else { - + $form = new Form($db); - + llxHeader('', $langs->trans("SellsJournal")); - + $nom = $langs->trans("SellsJournal"); $nomlink = ''; $periodlink = ''; @@ -429,12 +414,14 @@ if ($action == 'export_csv') else $description .= $langs->trans("DepositsAreIncluded"); $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); - report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => '')); - + report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( + 'action' => '' + )); + print ''; - + print ''; - + print ' '; - + /* * Show result array */ print '

'; - + $i = 0; print ""; print ""; @@ -464,24 +451,22 @@ if ($action == 'export_csv') print ""; print ""; print "\n"; - + $var = true; $r = ''; - + $invoicestatic = new Facture($db); $companystatic = new Client($db); - - foreach ($tabfac as $key => $val) - { + + foreach ( $tabfac as $key => $val ) { $invoicestatic->id = $key; $invoicestatic->ref = $val["ref"]; $invoicestatic->type = $val["type"]; - + $date = dol_print_date($db->jdate($val["date"]), 'day'); - + // Third party - foreach ($tabttc[$key] as $k => $mt) - { + foreach ( $tabttc[$key] as $k => $mt ) { print ""; print ""; print ""; @@ -495,13 +480,12 @@ if ($action == 'export_csv') print ""; } print ""; - + // Product / Service - foreach ($tabht[$key] as $k => $mt) - { + foreach ( $tabht[$key] as $k => $mt ) { $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch(null, $k); - + if ($mt) { print ""; print ""; @@ -513,10 +497,9 @@ if ($action == 'export_csv') print ""; } } - + // VAT - foreach ($tabtva[$key] as $k => $mt) - { + foreach ( $tabtva[$key] as $k => $mt ) { if ($mt) { print ""; print ""; @@ -528,12 +511,12 @@ if ($action == 'export_csv') print ""; } } - + $var = ! $var; } - + print "
" . $langs->trans("Debit") . "" . $langs->trans("Credit") . "
" . $date . "" . $invoicestatic->getNomUrl(1) . "" . ($mt < 0 ? price(- $mt) : '') . "
" . $date . "
" . $date . "
"; - + // End of page llxFooter(); } diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index 36c8cd09d65..e0eb900b1c1 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -22,16 +22,15 @@ * */ /** - * \file htdocs/accountancy/supplier/card.php - * \ingroup Accounting Expert - * \brief Card supplier ventilation + * \file htdocs/accountancy/supplier/card.php + * \ingroup Accountancy + * \brief Card supplier ventilation */ - require '../../main.inc.php'; - + // Class -require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php'; +require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; // Langs $langs->load("bills"); @@ -46,8 +45,7 @@ if ($user->societe_id > 0) accessforbidden(); if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) { - if (! GETPOST('cancel', 'alpha')) - { + if (! GETPOST('cancel', 'alpha')) { $sql = " UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det"; $sql .= " SET fk_code_ventilation = " . $codeventil; $sql .= " WHERE rowid = " . $id; @@ -55,7 +53,7 @@ if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) { dol_syslog('accountancy/supplier/card.php:: $sql=' . $sql); $resql = $db->query($sql); if (! $resql) { - setEventMessage($db->lasterror(), 'errors'); + setEventMessages($db->lasterror(), null, 'errors'); } } else { header("Location: ./lines.php"); @@ -85,17 +83,16 @@ if (! empty($id)) { $sql .= ", aa.account_number, aa.label"; $sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as l"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON l.fk_code_ventilation = aa.rowid"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON l.fk_code_ventilation = aa.rowid"; $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = l.fk_facture_fourn "; $sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id; - if (! empty($conf->multicompany->enabled)) { $sql .= " AND f.entity IN (" . getEntity("facture_fourn", 1) . ")"; } dol_syslog("/accounting/supplier/card.php sql=" . $sql, LOG_DEBUG); $result = $db->query($sql); - + if ($result) { $num_lines = $db->num_rows($result); $i = 0; @@ -107,9 +104,9 @@ if (! empty($id)) { print ''; print ''; - print_fiche_titre($langs->trans('SuppliersVentilation'),'','title_setup'); - - dol_fiche_head(); + print load_fiche_titre($langs->trans('SuppliersVentilation'), '', 'title_setup'); + + dol_fiche_head(); print ''; @@ -128,15 +125,15 @@ if (! empty($id)) { print $formventilation->select_account($objp->fk_code_ventilation, 'codeventil', 1); print ''; print '
'; - - dol_fiche_end(); - + + dol_fiche_end(); + print '
'; print ''; print '     '; print ''; print '
'; - + print ''; } else { print "Error"; diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index cae09cc98c2..747943575b9 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -19,16 +19,15 @@ */ /** - * \file htdocs/accountancy/supplier/index.php - * \ingroup Accounting Expert - * \brief Home supplier ventilation + * \file htdocs/accountancy/supplier/index.php + * \ingroup Accounting Expert + * \brief Home supplier ventilation */ - require '../../main.inc.php'; - + // Class -require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; // Langs $langs->load("compta"); @@ -43,7 +42,7 @@ if ($user->societe_id > 0) if (! $user->rights->accounting->ventilation->read) accessforbidden(); -// Filter + // Filter $year = $_GET["year"]; if ($year == 0) { $year_current = strftime("%Y", time()); @@ -63,18 +62,41 @@ if ($action == 'validatehistory') { if ($db->type == 'pgsql') { $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd"; $sql1 .= " SET fd.fk_code_ventilation = accnt.rowid"; - $sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accountingaccount as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst"; + $sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst"; $sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS; $sql1 .= " AND accnt.active = 1 AND p.accountancy_code_buy=accnt.account_number"; $sql1 .= " AND fd.fk_code_ventilation = 0"; } else { - $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accountingaccount as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst"; + $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst"; $sql1 .= " SET fd.fk_code_ventilation = accnt.rowid"; $sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS; $sql1 .= " AND accnt.active = 1 AND p.accountancy_code_buy=accnt.account_number"; $sql1 .= " AND fd.fk_code_ventilation = 0"; } + $resql1 = $db->query($sql1); + if (! $resql1) { + $error ++; + $db->rollback(); + setEventMessages($db->lasterror(), null, 'errors'); + } else { + $db->commit(); + setEventMessages($langs->trans('Dispatched'), null, 'mesgs'); + } +} elseif ($action == 'fixaccountancycode') { + $error = 0; + $db->begin(); + + $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd"; + $sql1 .= " SET fd.fk_code_ventilation = 0"; + $sql1 .= ' WHERE fd.fk_code_ventilation NOT IN '; + $sql1 .= ' (SELECT accnt.rowid '; + $sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accountingaccount as accnt'; + $sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst'; + $sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')'; + + dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG); + $resql1 = $db->query($sql1); if (! $resql1) { $error ++; @@ -82,7 +104,28 @@ if ($action == 'validatehistory') { setEventMessage($db->lasterror(), 'errors'); } else { $db->commit(); - setEventMessage($langs->trans('Dispatched'), 'mesgs'); + setEventMessage($langs->trans('Done'), 'mesgs'); + } +} elseif ($action == 'cleanaccountancycode') { + $error = 0; + $db->begin(); + + $sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd"; + $sql1 .= " SET fd.fk_code_ventilation = 0"; + $sql1 .= " WHERE fd.fk_facture_fourn IN ( SELECT f.rowid FROM " . MAIN_DB_PREFIX . "facture_fourn as f"; + $sql1 .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'"; + $sql1 .= " AND f.datef <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "')"; + + dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG); + + $resql1 = $db->query($sql1); + if (! $resql1) { + $error ++; + $db->rollback(); + setEventMessage($db->lasterror(), 'errors'); + } else { + $db->commit(); + setEventMessage($langs->trans('Done'), 'mesgs'); } } @@ -95,10 +138,14 @@ llxHeader('', $langs->trans("SuppliersVentilation")); $textprevyear = '' . img_previous() . ''; $textnextyear = ' ' . img_next() . ''; -print_fiche_titre($langs->trans("SuppliersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear); +print load_fiche_titre($langs->trans("SuppliersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear); print '' . $langs->trans("DescVentilSupplier") . ''; -print ''; +print ''; $y = $year_current; @@ -138,7 +185,7 @@ $sql .= " ROUND(SUM(IF(MONTH(ff.datef)=12,ffd.total_ht,0)),2) AS 'Decembre',"; $sql .= " ROUND(SUM(ffd.total_ht),2) as 'Total'"; $sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn"; -$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON aa.rowid = ffd.fk_code_ventilation"; +$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = ffd.fk_code_ventilation"; $sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'"; $sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'"; $sql .= " AND ff.fk_statut > 0 "; @@ -158,8 +205,8 @@ if ($resql) { while ( $i < $num ) { $row = $db->fetch_row($resql); - $var=!$var; - print '' . length_accountg($row[0]) . ''; + $var = ! $var; + print '' . length_accountg($row[0]) . ''; print '' . $row[1] . ''; print '' . price($row[2]) . ''; print '' . price($row[3]) . ''; diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 96e830ef06e..788eaa32e88 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2015 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Juanjo Menent @@ -20,18 +20,17 @@ */ /** - * \file htdocs/accountancy/supplier/lines.php - * \ingroup Accounting Expert - * \brief Page of detail of the lines of ventilation of invoices suppliers + * \file htdocs/accountancy/supplier/lines.php + * \ingroup Accounting Expert + * \brief Page of detail of the lines of ventilation of invoices suppliers */ - require '../../main.inc.php'; // Class -require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php'; -require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; +require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; +require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; // Langs $langs->load("compta"); @@ -41,43 +40,38 @@ $langs->load("main"); $langs->load("accountancy"); $account_parent = GETPOST('account_parent'); -$changeaccount = GETPOST('changeaccount'); -//Search Getpost -$search_ref = GETPOST('search_ref','alpha'); -$search_invoice = GETPOST('search_invoice','alpha'); -$search_label = GETPOST('search_label','alpha'); -$search_desc = GETPOST('search_desc','alpha'); -$search_amount = GETPOST('search_amount','alpha'); -$search_account = GETPOST('search_account','alpha'); -$search_vat = GETPOST('search_vat','alpha'); +$changeaccount = GETPOST('changeaccount'); +// Search Getpost +$search_ref = GETPOST('search_ref', 'alpha'); +$search_invoice = GETPOST('search_invoice', 'alpha'); +$search_label = GETPOST('search_label', 'alpha'); +$search_desc = GETPOST('search_desc', 'alpha'); +$search_amount = GETPOST('search_amount', 'alpha'); +$search_account = GETPOST('search_account', 'alpha'); +$search_vat = GETPOST('search_vat', 'alpha'); -//Getpost Order and column and limit page -$sortfield = GETPOST('sortfield','alpha'); -$sortorder = GETPOST('sortorder','alpha'); -$page = GETPOST('page','int'); +// Getpost Order and column and limit page +$sortfield = GETPOST('sortfield', 'alpha'); +$sortorder = GETPOST('sortorder', 'alpha'); +$page = GETPOST('page', 'int'); -if ($page < 0) $page = 0; +if ($page < 0) + $page = 0; $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) -{ +if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) { $limit = $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION; -} -else if ($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION <= 0) -{ - $limit = $conf->liste_limit; -} -else -{ - $limit = $conf->liste_limit; +} else if ($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION <= 0) { + $limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit; +} else { + $limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit; } -if (! $sortfield) $sortfield="f.datef, f.ref, l.rowid"; +if (! $sortfield) + $sortfield = "f.datef, f.ref, l.rowid"; -if (! $sortorder) -{ - if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE > 0) - { +if (! $sortorder) { + if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE > 0) { $sortorder = " DESC "; } } @@ -93,13 +87,13 @@ $formventilation = new FormVentilation($db); // Purge search criteria if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { - $search_ref=''; - $search_invoice=''; - $search_label=''; - $search_desc=''; - $search_amount=''; - $search_account=''; - $search_vat=''; + $search_ref = ''; + $search_invoice = ''; + $search_label = ''; + $search_desc = ''; + $search_amount = ''; + $search_account = ''; + $search_vat = ''; } if (is_array($changeaccount) && count($changeaccount) > 0) { @@ -115,14 +109,14 @@ if (is_array($changeaccount) && count($changeaccount) > 0) { $resql1 = $db->query($sql1); if (! $resql1) { $error ++; - setEventMessage($db->lasterror(), 'errors'); + setEventMessages($db->lasterror(), null, 'errors'); } if (! $error) { $db->commit(); - setEventMessage($langs->trans('Save'), 'mesgs'); + setEventMessages($langs->trans('Save'), null, 'mesgs'); } else { $db->rollback(); - setEventMessage($db->lasterror(), 'errors'); + setEventMessages($db->lasterror(), null, 'errors'); } } @@ -132,7 +126,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0) { llxHeader('', $langs->trans("SuppliersVentilation") . ' - ' . $langs->trans("Dispatched")); -print ''; - /* * Supplier Invoice lines */ $sql = "SELECT f.ref as facnumber, f.rowid as facid, l.fk_product, l.description, l.total_ht , l.qty, l.rowid, l.tva_tx, aa.label, aa.account_number, "; $sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type"; $sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f"; -$sql .= " , " . MAIN_DB_PREFIX . "accountingaccount as aa"; +$sql .= " , " . MAIN_DB_PREFIX . "accounting_account as aa"; $sql .= " , " . MAIN_DB_PREFIX . "facture_fourn_det as l"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; $sql .= " WHERE f.rowid = l.fk_facture_fourn and f.fk_statut >= 1 AND l.fk_code_ventilation <> 0 "; @@ -179,15 +172,14 @@ if (strlen(trim($search_amount))) { if (strlen(trim($search_account))) { $sql .= " AND aa.account_number like '%" . $search_account . "%'"; } -if (strlen(trim($search_vat))) -{ +if (strlen(trim($search_vat))) { $sql .= " AND (l.tva_tx like '" . $search_vat . "%')"; } if (! empty($conf->multicompany->enabled)) { $sql .= " AND f.entity IN (" . getEntity("facture_fourn", 1) . ")"; } -$sql.= $db->order($sortfield,$sortorder); -$sql.= $db->plimit($limit + 1,$offset); +$sql .= $db->order($sortfield, $sortorder); +$sql .= $db->plimit($limit + 1, $offset); dol_syslog('accountancy/supplier/lines.php::list sql= ' . $sql1); $result = $db->query($sql); @@ -203,34 +195,36 @@ if ($result) { print '
'; print ''; - print '
'. $langs->trans("ChangeAccount") . '
'; + print '
' . $langs->trans("ChangeAccount") . '
'; print $formventilation->select_account(GETPOST('account_parent'), 'account_parent', 1); print '
'; print '
'; - print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"],"f.ref","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"],"p.ref","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"],"p.label","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"],"l.description","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"],"l.total_ht","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"],"l.tva_tx","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Account"), $_SERVER["PHP_SELF"],"aa.account_number","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Label"), $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Description"), $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Amount"), $_SERVER["PHP_SELF"], "l.total_ht", "", $param, 'align="center"', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder); + print_liste_field_titre($langs->trans("Account"), $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre(''); print_liste_field_titre(''); - print_liste_field_titre($langs->trans("Ventilate").'
/','','','','','align="center"'); + print_liste_field_titre($langs->trans("Ventilate") . '
/', '', '', '', '', 'align="center"'); print "\n"; - + print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; - print '\n"; + print ''; + print "\n"; $facturefournisseur_static = new FactureFournisseur($db); $product_static = new Product($db); @@ -278,7 +272,6 @@ if ($result) { print $db->error(); } - print "
%% '; - print ''; - print "
'; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print '
"; llxFooter(); diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index b6e06209da1..e0f0c390a02 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2015 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Juanjo Menent s @@ -20,9 +20,9 @@ */ /** - * \file htdocs/accountancy/supplier/list.php - * \ingroup Accounting Expert - * \brief Ventilation page from suppliers invoices + * \file htdocs/accountancy/supplier/list.php + * \ingroup Accountancy + * \brief Ventilation page from suppliers invoices */ require '../../main.inc.php'; @@ -66,9 +66,9 @@ if ($page < 0) if (! empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)) { $limit = $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION; } else if ($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION <= 0) { - $limit = $conf->liste_limit; + $limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit; } else { - $limit = $conf->liste_limit; + $limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit; } $offset = $limit * $page; @@ -94,8 +94,8 @@ $formventilation = new FormVentilation($db); $accounting = new AccountingAccount($db); // TODO: we should need to check if result is a really exist accountaccount rowid..... -$aarowid_s = $accounting->fetch('', ACCOUNTING_SERVICE_BUY_ACCOUNT); -$aarowid_p = $accounting->fetch('', ACCOUNTING_PRODUCT_BUY_ACCOUNT); +$aarowid_s = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT, 1); +$aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT, 1); // Purge search criteria if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers @@ -111,7 +111,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both /* * View */ -llxHeader('', $langs->trans("Ventilation")); +llxHeader('', $langs->trans("SuppliersVentilation")); print ''; - form_constantes($constantes,1); - + form_constantes($constantes,2); + print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'
'; print '%LISTE%, %MAILMAN_ADMINPW%, %EMAIL%
'; + + dol_fiche_end(); + + print '
'; + + print ''; } else { + dol_fiche_head($head, 'mailman', $langs->trans("Setup"), 0, 'user'); + $link=''; //$link.=img_$langs->trans("Activate") $link.=img_picto($langs->trans("Disabled"),'switch_off'); $link.=''; - print_fiche_titre($langs->trans('MailmanTitle'), $link,''); + print load_fiche_titre($langs->trans('MailmanTitle'), $link,''); + + dol_fiche_end(); } -dol_fiche_end(); if (! empty($conf->global->ADHERENT_USE_MAILMAN)) { diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 148fcf76268..733569d8071 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -123,7 +123,7 @@ if (! empty($_POST['removedfile']) || ! empty($_POST['removedfilehtml'])) $result = dol_delete_file($pathtodelete,1); if ($result) { - setEventMessage($langs->trans("FileWasRemoved"), $filetodelete); + setEventMessages(array($langs->trans("FileWasRemoved"), $filetodelete), null, 'mesgs'); include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); @@ -152,7 +152,8 @@ if (($action == 'send' || $action == 'sendhtml') && ! GETPOST('addfile') && ! GE $subject = $_POST['subject']; $body = $_POST['message']; $deliveryreceipt= $_POST["deliveryreceipt"]; - + $trackid = GETPOST('trackid'); + //Check if we have to decode HTML if (!empty($conf->global->FCKEDITOR_ENABLE_MAILING) && dol_textishtml(dol_html_entity_decode($body, ENT_COMPAT | ENT_HTML401))) { $body=dol_html_entity_decode($body, ENT_COMPAT | ENT_HTML401); @@ -169,19 +170,19 @@ if (($action == 'send' || $action == 'sendhtml') && ! GETPOST('addfile') && ! GE if (empty($_POST["frommail"])) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("MailFrom")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("MailFrom")), null, 'errors'); $action='test'; $error++; } if (empty($sendto)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("MailTo")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("MailTo")), null, 'errors'); $action='test'; $error++; } if (! $error) { - // Le message est-il en html + // Is the message in HTML? $msgishtml=0; // Message is not HTML if ($action == 'sendhtml') $msgishtml=1; // Force message to HTML @@ -202,18 +203,20 @@ if (($action == 'send' || $action == 'sendhtml') && ! GETPOST('addfile') && ! GE $sendtoccc, $deliveryreceipt, $msgishtml, - $errors_to + $errors_to, + '', + $trackid ); $result=$mailfile->sendfile(); if ($result) { - setEventMessage($langs->trans("MailSuccessfulySent",$mailfile->getValidAddress($email_from,2),$mailfile->getValidAddress($sendto,2))); + setEventMessages($langs->trans("MailSuccessfulySent",$mailfile->getValidAddress($email_from,2),$mailfile->getValidAddress($sendto,2)), null, 'mesgs'); } else { - setEventMessage($langs->trans("ResultKo").'
'.$mailfile->error.' '.$result,'errors'); + setEventMessages($langs->trans("ResultKo").'
'.$mailfile->error.' '.$result, null, 'errors'); } $action=''; @@ -244,7 +247,7 @@ if (! $server) $server='127.0.0.1'; $wikihelp='EN:Setup EMails|FR:Paramétrage EMails|ES:Configuración EMails'; llxHeader('',$langs->trans("Setup"),$wikihelp); -print_fiche_titre($langs->trans("EMailsSetup"),'','title_setup'); +print load_fiche_titre($langs->trans("EMailsSetup"),'','title_setup'); print $langs->trans("EMailsDesc")."
\n"; print "
\n"; @@ -502,7 +505,6 @@ if ($action == 'edit') print '
'; print ''; - print '
'; } else { @@ -659,8 +661,7 @@ else // Run the test to connect if ($action == 'testconnect') { - print '
'; - print_titre($langs->trans("DoTestServerAvailability")); + print load_fiche_titre($langs->trans("DoTestServerAvailability")); // If we use SSL/TLS if (! empty($conf->global->MAIN_MAIL_EMAIL_TLS) && function_exists('openssl_open')) $server='ssl://'.$server; @@ -677,7 +678,7 @@ else $errormsg .= ' - '.$mail->error; } - setEventMessage($errormsg, 'errors'); + setEventMessages($errormsg, null, 'errors'); } print '
'; } @@ -685,14 +686,14 @@ else // Show email send test form if ($action == 'test' || $action == 'testhtml') { - print '
'; - print_titre($action == 'testhtml'?$langs->trans("DoTestSendHTML"):$langs->trans("DoTestSend")); + print load_fiche_titre($action == 'testhtml'?$langs->trans("DoTestSendHTML"):$langs->trans("DoTestSend")); // Cree l'objet formulaire mail include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); $formmail->fromname = (isset($_POST['fromname'])?$_POST['fromname']:$conf->global->MAIN_MAIL_EMAIL_FROM); $formmail->frommail = (isset($_POST['frommail'])?$_POST['frommail']:$conf->global->MAIN_MAIL_EMAIL_FROM); + $formmail->trackid='test'; $formmail->withfromreadonly=0; $formmail->withsubstit=0; $formmail->withfrom=1; diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index ad83def9ce8..f8b89c515aa 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -102,8 +102,7 @@ if ($action == 'update' && empty($_POST["cancel"])) else { $error++; - //TODO: Translate - setEventMessage('Failed to initialize menu '.$key.'.', 'errors'); + setEventMessages($langs->trans("FailedToInitializeMenu").' '.$key, null, 'errors'); $db->rollback(); } } @@ -131,7 +130,7 @@ $formadmin=new FormAdmin($db); $wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones'; llxHeader('',$langs->trans("Setup"),$wikihelp); -print_fiche_titre($langs->trans("Menus"),'','title_setup'); +print load_fiche_titre($langs->trans("Menus"),'','title_setup'); $h = 0; diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index 4ab41c7991e..f4f1bbb96bf 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -78,16 +78,16 @@ if ($action == 'update') $result=$menu->update($user); if ($result > 0) { - setEventMessage($langs->trans("RecordModifiedSuccessfully")); + setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); } else { - setEventMessage($menu->error, 'errors'); + setEventMessages($menu->error, $menu->errors, 'errors'); } } else { - setEventMessage($menu->error, 'errors'); + setEventMessages($menu->error, $menu->errors, 'errors'); } $_GET["menuId"] = $_POST['menuId']; $action = "edit"; @@ -135,37 +135,37 @@ if ($action == 'add') $error=0; if (! $error && ! $_POST['menu_handler']) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("MenuHandler")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("MenuHandler")), null, 'errors'); $action = 'create'; $error++; } if (! $error && ! $_POST['type']) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Type")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors'); $action = 'create'; $error++; } if (! $error && ! $_POST['url']) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Url")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("URL")), null, 'errors'); $action = 'create'; $error++; } if (! $error && ! $_POST['titre']) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Title")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Title")), null, 'errors'); $action = 'create'; $error++; } if (! $error && $_POST['menuId'] && $_POST['type'] == 'top') { - setEventMessage($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), 'errors'); + setEventMessages($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), null, 'errors'); $action = 'create'; $error++; } if (! $error && empty($_POST['menuId']) && $_POST['type'] == 'left') { - setEventMessage($langs->trans("ErrorLeftMenuMustHaveAParentId"), 'errors'); + setEventMessages($langs->trans("ErrorLeftMenuMustHaveAParentId"), null, 'errors'); $action = 'create'; $error++; } @@ -204,7 +204,7 @@ if ($action == 'add') else { $action = 'create'; - setEventMessage($menu->error, 'errors'); + setEventMessages($menu->error, $menu->errors, 'errors'); } } } @@ -222,7 +222,7 @@ if ($action == 'confirm_delete' && $_POST["confirm"] == 'yes') $this->db->commit(); llxHeader(); - setEventMessage($langs->trans("MenuDeleted")); + setEventMessages($langs->trans("MenuDeleted"), null, 'mesgs'); llxFooter(); exit ; } @@ -270,7 +270,7 @@ if ($action == 'create') }); '; - print_fiche_titre($langs->trans("NewMenu"),'','title_setup'); + print load_fiche_titre($langs->trans("NewMenu"),'','title_setup'); print '
'; print ''; @@ -379,7 +379,7 @@ if ($action == 'create') } elseif ($action == 'edit') { - print_fiche_titre($langs->trans("ModifMenu"),'','title_setup'); + print load_fiche_titre($langs->trans("ModifMenu"),'','title_setup'); print '
'; print ''; @@ -466,7 +466,5 @@ elseif ($action == 'edit') print '
'; } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 62bf0bbd617..7da0673b196 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -186,7 +186,7 @@ elseif ($action == 'confirm_delete' && $confirm == 'yes') { $db->commit(); - setEventMessage($langs->trans("MenuDeleted")); + setEventMessages($langs->trans("MenuDeleted"), null, 'mesgs'); header("Location: ".DOL_URL_ROOT.'/admin/menus/index.php?menu_handler='.$menu_handler); exit ; @@ -214,7 +214,7 @@ $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css') llxHeader('',$langs->trans("Menus"),'','',0,0,$arrayofjs,$arrayofcss); -print_fiche_titre($langs->trans("Menus"),'','title_setup'); +print load_fiche_titre($langs->trans("Menus"),'','title_setup'); $h = 0; @@ -359,7 +359,7 @@ if ($conf->use_javascript_ajax) else { $langs->load("errors"); - setEventMessage($langs->trans("ErrorFeatureNeedJavascript"), 'errors'); + setEventMessages($langs->trans("ErrorFeatureNeedJavascript"), null, 'errors'); } print '
'; diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php index 8a893b21321..73dc0fe3b85 100644 --- a/htdocs/admin/menus/other.php +++ b/htdocs/admin/menus/other.php @@ -71,7 +71,7 @@ else if ($action == 'disable_layoutmenu') llxHeader('',$langs->trans("Setup")); -print_fiche_titre($langs->trans("Menus"),'','title_setup'); +print load_fiche_titre($langs->trans("Menus"),'','title_setup'); $h = 0; diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 398dd8036fb..3fbaddd0a3f 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -1,11 +1,12 @@ - * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2015 Jean-François Ferry +/* Copyright (C) 2003-2007 Rodolphe Quiedeville + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -28,6 +29,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; $langs->load("errors"); $langs->load("admin"); @@ -35,12 +37,28 @@ $langs->load("admin"); $mode=GETPOST('mode', 'alpha')?GETPOST('mode', 'alpha'):(isset($_SESSION['mode'])?$_SESSION['mode']:0); $action=GETPOST('action','alpha'); $value=GETPOST('value', 'alpha'); +$page_y=GETPOST('page_y','int'); if (! $user->admin) accessforbidden(); $specialtostring=array(0=>'common', 1=>'interfaces', 2=>'other', 3=>'functional', 4=>'marketplace'); +$familyinfo=array( + 'hr'=>array('position'=>'001', 'label'=>$langs->trans("ModuleFamilyHr")), + 'crm'=>array('position'=>'006', 'label'=>$langs->trans("ModuleFamilyCrm")), + 'financial'=>array('position'=>'009', 'label'=>$langs->trans("ModuleFamilyFinancial")), + 'products'=>array('position'=>'012', 'label'=>$langs->trans("ModuleFamilyProducts")), + 'projects'=>array('position'=>'015', 'label'=>$langs->trans("ModuleFamilyProjects")), + 'ecm'=>array('position'=>'018', 'label'=>$langs->trans("ModuleFamilyECM")), + 'technic'=>array('position'=>'021', 'label'=>$langs->trans("ModuleFamilyTechnic")), + 'portal'=>array('position'=>'040', 'label'=>$langs->trans("ModuleFamilyPortal")), + 'interface'=>array('position'=>'050', 'label'=>$langs->trans("ModuleFamilyInterface")), + 'base'=>array('position'=>'060', 'label'=>$langs->trans("ModuleFamilyBase")), + 'other'=>array('position'=>'100', 'label'=>$langs->trans("ModuleFamilyOther")), +); + + /* * Actions @@ -49,16 +67,16 @@ $specialtostring=array(0=>'common', 1=>'interfaces', 2=>'other', 3=>'functional' if ($action == 'set' && $user->admin) { $result=activateModule($value); - if ($result) setEventMessage($result, 'errors'); - header("Location: modules.php?mode=".$mode); + if ($result) setEventMessages($result, null, 'errors'); + header("Location: modules.php?mode=".$mode.($page_y?'&page_y='.$page_y:'')); exit; } if ($action == 'reset' && $user->admin) { $result=unActivateModule($value); - if ($result) setEventMessage($result, 'errors'); - header("Location: modules.php?mode=".$mode); + if ($result) setEventMessages($result, null, 'errors'); + header("Location: modules.php?mode=".$mode.($page_y?'&page_y='.$page_y:'')); exit; } @@ -76,28 +94,7 @@ llxHeader('',$langs->trans("Setup"),$help_url); // Search modules dirs -$modulesdir = array(); -foreach ($conf->file->dol_document_root as $type => $dirroot) -{ - $modulesdir[$dirroot . '/core/modules/'] = $dirroot . '/core/modules/'; - - $handle=@opendir($dirroot); - if (is_resource($handle)) - { - while (($file = readdir($handle))!==false) - { - if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes') - { - if (is_dir($dirroot . '/' . $file . '/core/modules/')) - { - $modulesdir[$dirroot . '/' . $file . '/core/modules/'] = $dirroot . '/' . $file . '/core/modules/'; - } - } - } - closedir($handle); - } -} -//var_dump($modulesdir); +$modulesdir = dolGetModulesDirs(); $filename = array(); @@ -129,7 +126,7 @@ foreach ($modulesdir as $dir) if (! empty($modNameLoaded[$modName])) { $mesg="Error: Module ".$modName." was found twice: Into ".$modNameLoaded[$modName]." and ".$dir.". You probably have an old file on your disk.
"; - setEventMessage($mesg, 'warnings'); + setEventMessages($mesg, null, 'warnings'); dol_syslog($mesg, LOG_ERR); continue; } @@ -143,14 +140,11 @@ foreach ($modulesdir as $dir) $objMod = new $modName($db); $modNameLoaded[$modName]=$dir; - if ($objMod->numero > 0) + if (! $objMod->numero > 0) { - $j = $objMod->numero; - } - else - { - $j = 1000 + $i; + dol_syslog('The module descriptor '.$modName.' must have a numero property', LOG_ERR); } + $j = $objMod->numero; $modulequalified=1; @@ -158,7 +152,8 @@ foreach ($modulesdir as $dir) $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod))); if ($objMod->version == 'development' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) $modulequalified=0; if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) $modulequalified=0; - // We discard modules according to property disabled + if (preg_match('/deprecated/', $objMod->version) && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL >= 0))) $modulequalified=0; + // We discard modules according to property disabled if (! empty($objMod->hidden)) $modulequalified=false; // Define array $categ with categ with at least one qualified module @@ -166,13 +161,32 @@ foreach ($modulesdir as $dir) { $modules[$i] = $objMod; $filename[$i]= $modName; - $orders[$i] = $objMod->family."_".$j; // Sort by family, then by module number + + $special = $objMod->special; + + // Gives the possibility to the module, to provide his own family info and position of this family + if (is_array($objMod->familyinfo) && !empty($objMod->familyinfo)) { + $familyinfo = array_merge($familyinfo, $objMod->familyinfo); + $familykey = key($objMod->familyinfo); + } else { + $familykey = $objMod->family; + } + + $moduleposition = ($objMod->module_position?$objMod->module_position:'500'); + if ($moduleposition == 500 && ($objMod->isCoreOrExternalModule() == 'external')) + { + $moduleposition = 800; + } + + if ($special == 1) $familykey='interface'; + + $orders[$i] = $familyinfo[$familykey]['position']."_".$familykey."_".$moduleposition."_".$j; // Sort by family, then by module position then number $dirmod[$i] = $dir; // Set categ[$i] - $special = isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown'; - if ($objMod->version == 'development' || $objMod->version == 'experimental') $special='expdev'; - if (isset($categ[$special])) $categ[$special]++; // Array of all different modules categories - else $categ[$special]=1; + $specialstring = isset($specialtostring[$special])?$specialtostring[$special]:'unknown'; + if ($objMod->version == 'development' || $objMod->version == 'experimental') $specialstring='expdev'; + if (isset($categ[$specialstring])) $categ[$specialstring]++; // Array of all different modules categories + else $categ[$specialstring]=1; $j++; $i++; } @@ -216,9 +230,9 @@ print load_fiche_titre($langs->trans("ModulesSetup"),$moreinfo,'title_setup'); // Start to show page if (empty($mode)) $mode='common'; if ($mode==='common') print $langs->trans("ModulesDesc")."
\n"; -if ($mode==='other') print $langs->trans("ModulesSpecialDesc")."
\n"; -if ($mode==='interfaces') print $langs->trans("ModulesInterfaceDesc")."
\n"; -if ($mode==='functional') print $langs->trans("ModulesJobDesc")."
\n"; +//if ($mode==='other') print $langs->trans("ModulesSpecialDesc")."
\n"; +//if ($mode==='interfaces') print $langs->trans("ModulesInterfaceDesc")."
\n"; +//if ($mode==='functional') print $langs->trans("ModulesJobDesc")."
\n"; if ($mode==='marketplace') print $langs->trans("ModulesMarketPlaceDesc")."
\n"; if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."
\n"; @@ -232,11 +246,12 @@ $categidx='common'; // Main if (! empty($categ[$categidx])) { $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; - $head[$h][1] = $langs->trans("ModulesCommon"); + $head[$h][1] = $langs->trans("AvailableModules"); $head[$h][2] = 'common'; $h++; } +/* $categidx='other'; // Other if (! empty($categ[$categidx])) { @@ -263,6 +278,7 @@ if (! empty($categ[$categidx])) $head[$h][2] = 'functional'; $h++; } +*/ $categidx='expdev'; if (! empty($categ[$categidx])) @@ -306,28 +322,19 @@ if ($mode != 'marketplace') $oldfamily=''; - $familylib=array( - 'base'=>$langs->trans("ModuleFamilyBase"), - 'crm'=>$langs->trans("ModuleFamilyCrm"), - 'products'=>$langs->trans("ModuleFamilyProducts"), - 'hr'=>$langs->trans("ModuleFamilyHr"), - 'projects'=>$langs->trans("ModuleFamilyProjects"), - 'financial'=>$langs->trans("ModuleFamilyFinancial"), - 'ecm'=>$langs->trans("ModuleFamilyECM"), - 'technic'=>$langs->trans("ModuleFamilyTechnic"), - 'other'=>$langs->trans("ModuleFamilyOther") - ); - foreach ($orders as $key => $value) { $tab=explode('_',$value); - $family=$tab[0]; $numero=$tab[1]; + $familyposition=$tab[0]; $familykey=$tab[1]; $module_position=$tab[2]; $numero=$tab[3]; $modName = $filename[$key]; $objMod = $modules[$key]; + $special = $objMod->special; + //print $objMod->name." - ".$key." - ".$objMod->special.' - '.$objMod->version."
"; - if (($mode != (isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown') && $mode != 'expdev') + //if (($mode != (isset($specialtostring[$special])?$specialtostring[$special]:'unknown') && $mode != 'expdev') + if (($special >= 4 && $mode != 'expdev') || ($mode == 'expdev' && $objMod->version != 'development' && $objMod->version != 'experimental')) continue; // Discard if not for current tab if (! $objMod->getName()) @@ -348,28 +355,27 @@ if ($mode != 'marketplace') } // Print a separator if we change family - //print "xx".$oldfamily."-".$family."-".$atleastoneforfamily."
"; - //if ($oldfamily && $family!=$oldfamily && $atleastoneforfamily) { - if ($family!=$oldfamily) + //print "xx".$oldfamily."-".$familykey."-".$atleastoneforfamily."
"; + //if ($oldfamily && $familykey!=$oldfamily && $atleastoneforfamily) { + if ($familykey!=$oldfamily) { print ''."\n"; print ''; - $familytext=empty($familylib[$family])?$family:$familylib[$family]; + $familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label']; print $familytext; print "\n"; print ''.$langs->trans("SetupShort").''."\n"; print "\n"; $atleastoneforfamily=0; - //print "yy".$oldfamily."-".$family."-".$atleastoneforfamily."
"; + //print "yy".$oldfamily."-".$familykey."-".$atleastoneforfamily."
"; } $atleastoneforfamily++; - if ($family!=$oldfamily) + if ($familykey!=$oldfamily) { - $familytext=empty($familylib[$family])?$family:$familylib[$family]; - //print $familytext; - $oldfamily=$family; + $familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label']; + $oldfamily=$familykey; } $var=!$var; @@ -433,12 +439,13 @@ if ($mode != 'marketplace') } else { - print ''; + print ''; print img_picto($langs->trans("Activated"),'switch_on'); print ''; } print ''."\n"; + // Config link if (! empty($objMod->config_page_url) && !$disableSetup) { if (is_array($objMod->config_page_url)) @@ -496,7 +503,7 @@ if ($mode != 'marketplace') else { // Module non actif - print ''; + print ''; print img_picto($langs->trans("Disabled"),'switch_off'); print "\n"; } diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php new file mode 100644 index 00000000000..c721f63a050 --- /dev/null +++ b/htdocs/admin/multicurrency.php @@ -0,0 +1,292 @@ + + * Copyright (C) 2015 ATM Consulting + * + * 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 3 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, see . + */ + +/** + * \file admin/multicurrency.php + * \ingroup quickpriceupdate + * \brief This file is an example module setup page + * Put some comments here + */ +// Dolibarr environment + +require '../main.inc.php'; + +// Libraries +dol_include_once('/core/lib/admin.lib.php'); +dol_include_once('/core/lib/multicurrency.lib.php'); +dol_include_once('/multicurrency/class/multicurrency.class.php'); + +// Translations +$langs->load("multicurrency"); + +// Access control +if (! $user->admin) { + accessforbidden(); +} + +// Parameters +$action = GETPOST('action', 'alpha'); + +/* + * Actions + */ +if (preg_match('/set_(.*)/',$action,$reg)) +{ + $code=$reg[1]; + if (dolibarr_set_const($db, $code, GETPOST($code), 'chaine', 0, '', $conf->entity) > 0) + { + header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + dol_print_error($db); + } +} + +if (preg_match('/del_(.*)/',$action,$reg)) +{ + $code=$reg[1]; + if (dolibarr_del_const($db, $code, 0) > 0) + { + Header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + dol_print_error($db); + } +} + +if ($action == 'add_currency') +{ + $code = GETPOST('code', 'alpha'); + $name = GETPOST('name', 'alpha'); + $rate = GETPOST('rate', 'alpha'); + + $currency = new MultiCurrency($db); + $currency->code = $code; + $currency->name = $name; + + if ($currency->create($user) > 0) + { + if ($currency->addRate($rate)) setEventMessages($langs->trans('RecordSaved'), array()); + else setEventMessages($langs->trans('ErrorAddRateFail'), array(), 'errors'); + } + else setEventMessages($langs->trans('ErrorAddCurrencyFail'), array()); +} +elseif ($action == 'update_currency') +{ + $submit = GETPOST('submit', 'alpha'); + + if ($submit == $langs->trans('Modify')) + { + $fk_multicurrency = GETPOST('fk_multicurrency', 'int'); + $rate = GETPOST('rate', 'float'); + $currency = new MultiCurrency($db); + + if ($currency->fetch($fk_multicurrency) > 0) + { + $currency->updateRate($rate); + } + } + elseif ($submit == $langs->trans('Delete')) + { + $fk_multicurrency = GETPOST('fk_multicurrency', 'int'); + $currency = new MultiCurrency($db); + + if ($currency->fetch($fk_multicurrency) > 0) + { + if ($currency->delete() > 0) setEventMessages($langs->trans('RecordDeleted'), array()); + else setEventMessages($langs->trans('ErrorDeleteCurrencyFail'), array(), 'errors'); + } + } +} + +$TCurrency = array(); +$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'multicurrency WHERE entity = '.$conf->entity; +$resql = $db->query($sql); +if ($resql) +{ + while ($obj = $db->fetch_object($resql)) + { + $currency = new MultiCurrency($db); + $currency->fetch($obj->rowid); + $TCurrency[] = $currency; + } +} + + +/* + * View + */ + +$page_name = "MultiCurrency"; + +llxHeader('', $langs->trans($page_name)); + +// Subheader +$linkback = '' + . $langs->trans("BackToModuleList") . ''; +print_fiche_titre($langs->trans($page_name), $linkback); + +// Configuration header +$head = multicurrencyAdminPrepareHead(); +dol_fiche_head( + $head, + 'settings', + $langs->trans("ModuleSetup"), + 0, + "multicurrency" +); + +// Setup page goes here +$form=new Form($db); + +$var=false; +print ''; +print ''; +print ''."\n"; +print ''; +print ''."\n"; + +$var=!$var; +print ''; +print ''; +print ''; +print ''; + +$var=!$var; +print ''; +print ''; +print ''; +print ''; + +$var=!$var; +print ''; +print ''; +print ''; +print ''; + +$var=!$var; +print ''; +print ''; +print ''; +print ''; + +$var=!$var; +print ''; +print ''; +print ''; +print ''; + +$var=!$var; +print ''; +print ''; +print ''; +print ''; + +print '
'.$langs->trans("Parameters").' '.$langs->trans("Value").'
'.$langs->transnoentitiesnoconv("multicurrency_useRateOnInvoiceDate").' '; +print ''; +print ''; +print ''; +print $form->selectyesno("MULTICURRENCY_USE_RATE_ON_INVOICE_DATE",$conf->global->MULTICURRENCY_USE_RATE_ON_INVOICE_DATE,1); +print ''; +print ''; +print '
'.$langs->transnoentitiesnoconv("multicurrency_useOriginTx").' '; +print '
'; +print ''; +print ''; +print $form->selectyesno("MULTICURRENCY_USE_ORIGIN_TX",$conf->global->MULTICURRENCY_USE_ORIGIN_TX,1); +print ''; +print '
'; +print '
'.$langs->transnoentitiesnoconv("multicurrency_buyPriceInCurrency").' '; +print '
'; +print ''; +print ''; +print $form->selectyesno("MULTICURRENCY_BUY_PRICE_IN_CURRENCY",$conf->global->MULTICURRENCY_BUY_PRICE_IN_CURRENCY,1); +print ''; +print '
'; +print '
'.$langs->transnoentitiesnoconv("multicurrency_modifyRateApplication").' '; +print '
'; +print ''; +print ''; +print $form->selectarray('MULTICURRENCY_MODIFY_RATE_APPLICATION', array('PU_DOLIBARR' => 'PU_DOLIBARR', 'PU_CURRENCY' => 'PU_CURRENCY')); +print ''; +print '
'; +print '
'.$langs->transnoentitiesnoconv("multicurrency_appId").' '; +print '
'; +print ''; +print ''; +print ' '; +print ''; +print '
'; +print '
'.$langs->transnoentitiesnoconv("multicurrency_currencyFromToRate").' '; +print '
'; +print ''; +print ''; +print ' '; // CURRENCY_BASE - CURRENCY_ENTITY - ID_ENTITY +print ''; +print '
'; +print '
'; + +print ''; + +print '
'; +print ''; + +print ''; +print ''."\n"; +print ''; +print ''."\n"; + +$var=!$var; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +foreach ($TCurrency as &$currency) +{ + $var=!$var; + print ''; + print ''; + print ''; + print ''; +} + +print '
'.$langs->trans("Currencies").' '.$langs->trans("Rate").'
-  '; +print ' '; +print ''; +print '
'.$currency->code.' - '.$currency->name.' '; + print '
'; + print ''; + print ''; + print ''; + print ' '; + print ' '; + print ''; + print '
'; + print '
'; + +llxFooter(); + +$db->close(); \ No newline at end of file diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index bab6db29959..a7699db4292 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2011 Laurent Destailleur + * Copyright (C) 2005-2015 Laurent Destailleur * Copyright (C) 2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -93,13 +93,13 @@ if ($action == 'setvalue' && $user->admin) { $db->commit(); - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -115,7 +115,7 @@ $notify = new Notify($db); llxHeader('',$langs->trans("NotificationSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("NotificationSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("NotificationSetup"),$linkback,'title_setup'); print $langs->trans("NotificationsDesc").'

'; @@ -132,10 +132,12 @@ print ''.$langs->trans("Value").''; print "\n"; $var=!$var; print ''; -print $langs->trans("NotificationEMailFrom").''; +print $langs->trans("NotificationEMailFrom").''; +print ''; print ''; if (! empty($conf->global->NOTIFICATION_EMAIL_FROM) && ! isValidEmail($conf->global->NOTIFICATION_EMAIL_FROM)) print ' '.img_warning($langs->trans("ErrorBadEMail")); -print ''; +print ''; +print ''; print ''; print '
'; @@ -143,15 +145,14 @@ print '
'; if ($conf->societe->enabled) { - print_fiche_titre($langs->trans("ListOfNotificationsPerContact"),'',''); + print load_fiche_titre($langs->trans("ListOfNotificationsPerContact"),'',''); print ''; print ''; print ''; print ''; print ''; - print ''; - print ''; + //print ''; print "\n"; // Load array of available notifications @@ -173,10 +174,10 @@ if ($conf->societe->enabled) print ''; print ''; print ''; - print ''; + print '';*/ print ''; } @@ -186,7 +187,7 @@ if ($conf->societe->enabled) } -print_fiche_titre($langs->trans("ListOfFixedNotifications"),'',''); +print load_fiche_titre($langs->trans("ListOfFixedNotifications"),'',''); print '
'.$langs->trans("Module").''.$langs->trans("Code").''.$langs->trans("Label").''.$langs->trans("NbOfTargetedContacts").''.''.$langs->trans("NbOfTargetedContacts").'
'.$elementLabel.''.$notifiedevent['code'].''.$label.''; + /*print ''; $tmparray = $notify->getNotificationsArray($notifiedevent['code'], 0); print count($tmparray); - print '
'; print ''; diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php new file mode 100644 index 00000000000..2adf79a6174 --- /dev/null +++ b/htdocs/admin/oauth.php @@ -0,0 +1,371 @@ + + * + * 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 3 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, see . + * + */ + +/** + * \file htdocs/admin/oauth.php + * \ingroup oauth + * \brief Setup page to configure oauth access api + */ + +require '../main.inc.php'; + +// required Class +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; + + +// Define $urlwithroot +$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); +$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file +//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current + + +$langs->load("admin"); +$langs->load("oauth"); + +// Security check +if (!$user->admin) + accessforbidden(); + +$action = GETPOST('action', 'alpha'); + +// Supported OAUTH (a provider is supported when a file xxx_oauth2callback.php is available into htdocs/core/modules/oauth) +$supportedoauth2array=array('OAUTH_GOOGLE_NAME'=>'google'); + +// API access parameters OAUTH +$list = array ( + array( + 'OAUTH_AMAZON_NAME', + 'OAUTH_AMAZON_ID', + 'OAUTH_AMAZON_SECRET', + ), + array( + 'OAUTH_BITBUCKET_NAME', + 'OAUTH_BITBUCKET_ID', + 'OAUTH_BITBUCKET_SECRET', + ), + array( + 'OAUTH_BITLY_NAME', + 'OAUTH_BITLY_ID', + 'OAUTH_BITLY_SECRET', + ), + array( + 'OAUTH_BITRIX24_NAME', + 'OAUTH_BITRIX24_ID', + 'OAUTH_BITRIX24_SECRET', + ), + array( + 'OAUTH_BOX_NAME', + 'OAUTH_BOX_ID', + 'OAUTH_BOX_SECRET', + ), + array( + 'OAUTH_BUFFER_NAME', + 'OAUTH_BUFFER_ID', + 'OAUTH_BUFFER_SECRET', + ), + array( + 'OAUTH_DAILYMOTION_NAME', + 'OAUTH_DAILYMOTION_ID', + 'OAUTH_DAILYMOTION_SECRET', + ), + array( + 'OAUTH_DEVIANTART_NAME', + 'OAUTH_DEVIANTART_ID', + 'OAUTH_DEVIANTART_SECRET', + ), + array( + 'OAUTH_DROPBOX_NAME', + 'OAUTH_DROPBOX_ID', + 'OAUTH_DROPBOX_SECRET', + ), + array( + 'OAUTH_ETSY_NAME', + 'OAUTH_ETSY_ID', + 'OAUTH_ETSY_SECRET', + ), + array( + 'OAUTH_EVEONLINE_NAME', + 'OAUTH_EVEONLINE_ID', + 'OAUTH_EVEONLINE_SECRET', + ), + array( + 'OAUTH_FACEBOOK_NAME', + 'OAUTH_FACEBOOK_ID', + 'OAUTH_FACEBOOK_SECRET', + ), + array( + 'OAUTH_FITBIT_NAME', + 'OAUTH_FITBIT_ID', + 'OAUTH_FITBIT_SECRET', + ), + array( + 'OAUTH_FIVEHUNDREDPX_NAME', + 'OAUTH_FIVEHUNDREDPX_ID', + 'OAUTH_FIVEHUNDREDPX_SECRET', + ), + array( + 'OAUTH_FLICKR_NAME', + 'OAUTH_FLICKR_ID', + 'OAUTH_FLICKR_SECRET', + ), + array( + 'OAUTH_FOURSQUARE_NAME', + 'OAUTH_FOURSQUARE_ID', + 'OAUTH_FOURSQUARE_SECRET', + ), + array( + 'OAUTH_GITHUB_NAME', + 'OAUTH_GITHUB_ID', + 'OAUTH_GITHUB_SECRET', + ), + array( + 'OAUTH_GOOGLE_NAME', + 'OAUTH_GOOGLE_ID', + 'OAUTH_GOOGLE_SECRET', + ), + array( + 'OAUTH_HUBIC_NAME', + 'OAUTH_HUBIC_ID', + 'OAUTH_HUBIC_SECRET', + ), + array( + 'OAUTH_INSTAGRAM_NAME', + 'OAUTH_INSTAGRAM_ID', + 'OAUTH_INSTAGRAM_SECRET', + ), + array( + 'OAUTH_LINKEDIN_NAME', + 'OAUTH_LINKEDIN_ID', + 'OAUTH_LINKEDIN_SECRET', + ), + array( + 'OAUTH_MAILCHIMP_NAME', + 'OAUTH_MAILCHIMP_ID', + 'OAUTH_MAILCHIMP_SECRET', + ), + array( + 'OAUTH_MICROSOFT_NAME', + 'OAUTH_MICROSOFT_ID', + 'OAUTH_MICROSOFT_SECRET', + ), + array( + 'OAUTH_NEST_NAME', + 'OAUTH_NEST_ID', + 'OAUTH_NEST_SECRET', + ), + array( + 'OAUTH_NETATMO_NAME', + 'OAUTH_NETATMO_ID', + 'OAUTH_NETATMO_SECRET', + ), + array( + 'OAUTH_PARROTFLOWERPOWER_NAME', + 'OAUTH_PARROTFLOWERPOWER_ID', + 'OAUTH_PARROTFLOWERPOWER_SECRET', + ), + array( + 'OAUTH_PAYPAL_NAME', + 'OAUTH_PAYPAL_ID', + 'OAUTH_PAYPAL_SECRET', + ), + array( + 'OAUTH_POCKET_NAME', + 'OAUTH_POCKET_ID', + 'OAUTH_POCKET_SECRET', + ), + array( + 'OAUTH_QUICKBOOKS_NAME', + 'OAUTH_QUICKBOOKS_ID', + 'OAUTH_QUICKBOOKS_SECRET', + ), + array( + 'OAUTH_REDDIT_NAME', + 'OAUTH_REDDIT_ID', + 'OAUTH_REDDIT_SECRET', + ), + array( + 'OAUTH_REDMINE_NAME', + 'OAUTH_REDMINE_ID', + 'OAUTH_REDMINE_SECRET', + ), + array( + 'OAUTH_RUNKEEPER_NAME', + 'OAUTH_RUNKEEPER_ID', + 'OAUTH_RUNKEEPER_SECRET', + ), + array( + 'OAUTH_SCOOPIT_NAME', + 'OAUTH_SCOOPIT_ID', + 'OAUTH_SCOOPIT_SECRET', + ), + array( + 'OAUTH_SOUNDCLOUD_NAME', + 'OAUTH_SOUNDCLOUD_ID', + 'OAUTH_SOUNDCLOUD_SECRET', + ), + array( + 'OAUTH_SPOTIFY_NAME', + 'OAUTH_SPOTIFY_ID', + 'OAUTH_SPOTIFY_SECRET', + ), + array( + 'OAUTH_STRAVA_NAME', + 'OAUTH_STRAVA_ID', + 'OAUTH_STRAVA_SECRET', + ), + array( + 'OAUTH_TUMBLR_NAME', + 'OAUTH_TUMBLR_ID', + 'OAUTH_TUMBLR_SECRET', + ), + array( + 'OAUTH_TWITTER_NAME', + 'OAUTH_TWITTER_ID', + 'OAUTH_TWITTER_SECRET', + ), + array( + 'OAUTH_USTREAM_NAME', + 'OAUTH_USTREAM_ID', + 'OAUTH_USTREAM_SECRET', + ), + array( + 'OAUTH_VIMEO_NAME', + 'OAUTH_VIMEO_ID', + 'OAUTH_VIMEO_SECRET', + ), + array( + 'OAUTH_YAHOO_NAME', + 'OAUTH_YAHOO_ID', + 'OAUTH_YAHOO_SECRET', + ), + array( + 'OAUTH_YAMMER_NAME', + 'OAUTH_YAMMER_ID', + 'OAUTH_YAMMER_SECRET', + ), +); + + +/* + * Actions + */ + +if ($action == 'update') +{ + $error = 0; + + foreach ($list as $constname) { + $constvalue = GETPOST($constname[1], 'alpha'); + if (!dolibarr_set_const($db, $constname[1], $constvalue, 'chaine', 0, '', $conf->entity)) + $error++; + $constvalue = GETPOST($constname[2], 'alpha'); + if (!dolibarr_set_const($db, $constname[2], $constvalue, 'chaine', 0, '', $conf->entity)) + $error++; + } + + if (! $error) + { + setEventMessages($langs->trans("SetupSaved"), null); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + +/* + * View + */ + +llxHeader(); + +$form = new Form($db); + +$linkback=''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans('ConfigOAuth'),$linkback,'title_setup'); + +print '
'; +print ''; +print ''; + +/* + * Parameters + */ +dol_fiche_head(array(), '', '', 0, 'technic'); + + +print $langs->trans("ListOfSupportedOauthProviders").'

'; + +print '
'; + +$var = true; + +foreach ($list as $key) +{ + $supported=0; + if (in_array($key[0], array_keys($supportedoauth2array))) $supported=1; + if (! $supported) continue; // show only supported + + print ''; + // Api Name + $label = $langs->trans($key[0]); + print ''; + + if ($supported) + { + $redirect_uri=$urlwithroot.'/core/modules/oauth/'.$supportedoauth2array[$key[0]].'_oauthcallback.php'; + $var = !$var; + print ''; + print ''; + print ''; + } + else + { + $var = !$var; + print ''; + print ''; + print ''; + print ''; + } + + // Api Id + $var = !$var; + print ''; + print ''; + print ''; + + // Api Secret + $var = !$var; + print ''; + print ''; + print ''; + +} + +print '
'.$label.'
'.$langs->trans("UseTheFollowingUrlAsRedirectURI").''; + print '
'.$langs->trans("UseTheFollowingUrlAsRedirectURI").''.$langs->trans("FeatureNotYetSupported").'
'; + print '
'; + print '
'."\n"; + +dol_fiche_end(); + +print '
'; + +print ''; + + +llxFooter(); +$db->close(); \ No newline at end of file diff --git a/htdocs/admin/order_extrafields.php b/htdocs/admin/order_extrafields.php index 0c71c3285ad..5d7358ae051 100644 --- a/htdocs/admin/order_extrafields.php +++ b/htdocs/admin/order_extrafields.php @@ -70,7 +70,7 @@ $textobject=$langs->transnoentitiesnoconv("Orders"); llxHeader('',$langs->trans("OrdersSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("OrdersSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("OrdersSetup"),$linkback,'title_setup'); print "
\n"; $head = order_admin_prepare_head(); @@ -93,27 +93,27 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'create') { print "
"; - print_titre($langs->trans('NewAttribute')); + print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) { print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; } diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php index 9f16d7934b1..f966af78bf3 100644 --- a/htdocs/admin/orderdet_extrafields.php +++ b/htdocs/admin/orderdet_extrafields.php @@ -66,12 +66,12 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; * View */ -$textobject=$langs->transnoentitiesnoconv("OrderLines"); +$textobject=$langs->transnoentitiesnoconv("Orders"); llxHeader('',$langs->trans("OrdersSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("OrdersSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("OrdersSetup"),$linkback,'title_setup'); print "
\n"; $head = order_admin_prepare_head(); @@ -94,27 +94,27 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'create') { print "
"; - print_titre($langs->trans('NewAttribute')); + print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) { print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; } diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php new file mode 100644 index 00000000000..fa99e2c202b --- /dev/null +++ b/htdocs/admin/payment.php @@ -0,0 +1,223 @@ + + * + * 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 3 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, see . + */ + +/** + * \file htdocs/admin/payment.php + * \ingroup facture + * \brief Page to setup invoices payments + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; + +$langs->load("admin"); +$langs->load("errors"); +$langs->load('other'); +$langs->load('bills'); + +if (! $user->admin) accessforbidden(); + +$action = GETPOST('action','alpha'); +$value = GETPOST('value','alpha'); +$label = GETPOST('label','alpha'); +$scandir = GETPOST('scandir','alpha'); +$type='invoice'; + +if (empty($conf->global->PAYMENT_ADDON)) $conf->global->PAYMENT_ADDON = 'mod_payment_cicada.php'; + + +/* + * Actions + */ + +if ($action == 'updateMask') +{ + $maskconstpayment=GETPOST('maskconstpayment','alpha'); + $maskpayment=GETPOST('maskpayment','alpha'); + if ($maskconstpayment) $res = dolibarr_set_const($db,$maskconstpayment,$maskpayment,'chaine',0,'',$conf->entity); + + if (! $res > 0) $error++; + + if (! $error) + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + +if ($action == 'setmod') +{ + dolibarr_set_const($db, "PAYMENT_ADDON",$value,'chaine',0,'',$conf->entity); +} + + + +/* + * View + */ + +$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); + +llxHeader("",$langs->trans("BillsSetup"),'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura'); + +$form=new Form($db); + + +$linkback=''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("BillsSetup"),$linkback,'title_setup'); + +$head = invoice_admin_prepare_head(); +dol_fiche_head($head, 'payment', $langs->trans("Invoices"), 0, 'invoice'); + +/* + * Numbering module + */ + +print load_fiche_titre($langs->trans("PaymentsNumberingModule"), '', ''); + +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''."\n"; + +clearstatcache(); + +foreach ($dirmodels as $reldir) +{ + $dir = dol_buildpath($reldir."core/modules/payment/"); + if (is_dir($dir)) + { + $handle = opendir($dir); + if (is_resource($handle)) + { + $var=true; + + while (($file = readdir($handle))!==false) + { + if (! is_dir($dir.$file) || (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')) + { + $filebis = $file; + $classname = preg_replace('/\.php$/','',$file); + // For compatibility + if (! is_file($dir.$filebis)) + { + $filebis = $file."/".$file.".modules.php"; + $classname = "mod_payment_".$file; + } + // Check if there is a filter on country + preg_match('/\-(.*)_(.*)$/',$classname,$reg); + if (! empty($reg[2]) && $reg[2] != strtoupper($mysoc->country_code)) continue; + + $classname = preg_replace('/\-.*$/','',$classname); + if (! class_exists($classname) && is_readable($dir.$filebis) && (preg_match('/mod_/',$filebis) || preg_match('/mod_/',$classname)) && substr($filebis, dol_strlen($filebis)-3, 3) == 'php') + { + // Charging the numbering class + require_once $dir.$filebis; + + $module = new $classname($db); + + // Show modules according to features level + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + + if ($module->isEnabled()) + { + $var = !$var; + print ''; + + // Show example of numbering module + print ''."\n"; + + print ''; + + $payment=new Paiement($db); + $payment->initAsSpecimen(); + + // Example + $htmltooltip=''; + $htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().'
'; + $nextval=$module->getNextValue($mysoc,$payment); + if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval + $htmltooltip.=$langs->trans("NextValue").': '; + if ($nextval) { + if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured') + $nextval = $langs->trans($nextval); + $htmltooltip.=$nextval.'
'; + } else { + $htmltooltip.=$langs->trans($module->error).'
'; + } + } + + print ''; + + print "\n"; + + } + } + } + } + closedir($handle); + } + } +} + +print '
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Example").''.$langs->trans("Status").''.$langs->trans("ShortInfo").'
'; + echo preg_replace('/\-.*$/','',preg_replace('/mod_payment_/','',preg_replace('/\.php$/','',$file))); + print "\n"; + + print $module->info(); + + print ''; + $tmp=$module->getExample(); + if (preg_match('/^Error/',$tmp)) print '
'.$langs->trans($tmp).'
'; + elseif ($tmp=='NotConfigured') print $langs->trans($tmp); + else print $tmp; + print '
'; + //print "> ".$conf->global->PAYMENT_ADDON." - ".$file; + if ($conf->global->PAYMENT_ADDON == $file || $conf->global->PAYMENT_ADDON.'.php' == $file) + { + print img_picto($langs->trans("Activated"),'switch_on'); + } + else + { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').''; + } + print ''; + print $form->textwithpicto('',$htmltooltip,1,0); + + if ($conf->global->PAYMENT_ADDON.'.php' == $file) // If module is the one used, we show existing errors + { + if (! empty($module->error)) dol_htmloutput_mesg($module->error,'','error',1); + } + + print '
'; + +dol_fiche_end(); + + +llxFooter(); + +$db->close(); diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 9f12c98e1d8..3b968af09c3 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -62,7 +62,8 @@ if ($action == 'update') dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DESC", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DESC"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_REF", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_REF"],'chaine',0,'',$conf->entity); - + dolibarr_set_const($db, "MAIN_PDF_USE_ISO_LOCATION", $_POST["MAIN_PDF_USE_ISO_LOCATION"],'chaine',0,'',$conf->entity); + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; } @@ -93,7 +94,7 @@ $form=new Form($db); $formother=new FormOther($db); $formadmin=new FormAdmin($db); -print_fiche_titre($langs->trans("PDF"),'','title_setup'); +print load_fiche_titre($langs->trans("PDF"),'','title_setup'); print $langs->trans("PDFDesc")."
\n"; print "
\n"; @@ -110,7 +111,7 @@ if ($action == 'edit') // Edit // Misc options - print_fiche_titre($langs->trans("DictionaryPaperFormat"),'','').'
'; + print load_fiche_titre($langs->trans("DictionaryPaperFormat"),'','').'
'; $var=true; print ''; print ''; @@ -130,11 +131,17 @@ if ($action == 'edit') // Edit // Addresses - print_fiche_titre($langs->trans("PDFAddressForging"),'','').'
'; + print load_fiche_titre($langs->trans("PDFAddressForging"),'','').'
'; $var=true; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; print ''; + // Hide VAT Intra on address + $var=!$var; + print ''; + // Show prof id 1 in address into pdf $var=!$var; if (! $noCountryCode) @@ -212,7 +219,7 @@ if ($action == 'edit') // Edit print '
'; // Other - print_fiche_titre($langs->trans("Other"),'','').'
'; + print load_fiche_titre($langs->trans("Other"),'','').'
'; $var=true; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("ShowVATIntaInAddress").''; + print $form->selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1); + print '
'; print ''; @@ -223,12 +230,6 @@ if ($action == 'edit') // Edit print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1); print ''; - // Hide Tva Intra on adress - $var=!$var; - print ''; - //Desc $var=!$var; print ''; + // Place customer adress to the ISO location + $var=!$var; + print ''; + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("ShowVATIntaInAddress").''; - print $form->selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1); - print '
'.$langs->trans("HideDescOnPDF").''; @@ -247,6 +248,12 @@ if ($action == 'edit') // Edit print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1); print '
'.$langs->trans("PlaceCustomerAddressToIsoLocation").''; + print $form->selectyesno('MAIN_PDF_USE_ISO_LOCATION',(! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0,1); + print '
'; @@ -262,7 +269,7 @@ else // Show $var=true; // Misc options - print_fiche_titre($langs->trans("DictionaryPaperFormat"),'','').'
'; + print load_fiche_titre($langs->trans("DictionaryPaperFormat"),'','').'
'; $var=true; print ''; print ''; @@ -299,10 +306,16 @@ else // Show print '
'; - print_fiche_titre($langs->trans("PDFAddressForging"),'','').'
'; + print load_fiche_titre($langs->trans("PDFAddressForging"),'','').'
'; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; print ''; + // Hide Intra VAT on address + $var=!$var; + print ''; + // Show prof id 1 in address into pdf $var=!$var; if (! $noCountryCode) @@ -380,19 +393,12 @@ else // Show print '
'; // Other - print_fiche_titre($langs->trans("Other"),'','').'
'; + print load_fiche_titre($langs->trans("Other"),'','').'
'; $var=true; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("ShowVATIntaInAddress").''; + print yn($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS,1); + print '
'; print ''; - // Hide any PDF informations - $var=!$var; - print ''; - - // Encrypt and protect PDF $var=!$var; print ""; @@ -421,11 +427,11 @@ else // Show print ""; print ''; - // Hide Tva Intra on adress - $var=!$var; - print ''; + // Hide any PDF informations + $var=!$var; + print ''; //Desc $var=!$var; @@ -445,6 +451,10 @@ else // Show print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS,1); print ''; + $var=!$var; + print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("HideAnyVATInformationOnPDF").''; - print yn($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT,1); - print '
'.$langs->trans("ShowVATIntaInAddress").''; - print yn($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS,1); - print '
'.$langs->trans("HideAnyVATInformationOnPDF").''; + print yn($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT,1); + print '
'.$langs->trans("PlaceCustomerAddressToIsoLocation").''; + print yn($conf->global->MAIN_PDF_USE_ISO_LOCATION,1); + print '
'; @@ -453,7 +463,7 @@ else // Show * Library */ print '
'; - print_titre($langs->trans("Library")); + print load_fiche_titre($langs->trans("Library")); print ''."\n"; diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index 5bb526352f6..2e0ba0873bf 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -62,9 +62,10 @@ if ($action == 'remove') * View */ -llxHeader('',$langs->trans("DefaultRights")); +$wikihelp='EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad'; +llxHeader('',$langs->trans("DefaultRights"), $wikihelp); -print_fiche_titre($langs->trans("SecuritySetup"),'','title_setup'); +print load_fiche_titre($langs->trans("SecuritySetup"),'','title_setup'); print $langs->trans("DefaultRightsDesc"); print " ".$langs->trans("OnlyActiveElementsAreShown")."

\n"; @@ -217,7 +218,5 @@ print '
'; print ''; - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 31c1e5e7dba..410851b640b 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -81,12 +81,12 @@ if ($action == "set") if (! $error) { $db->commit(); - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -119,7 +119,7 @@ llxHeader('',$langs->trans("WithdrawalsSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("WithdrawalsSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("WithdrawalsSetup"),$linkback,'title_setup'); print '
'; print '
'; @@ -135,7 +135,7 @@ print ""; print ''.$langs->trans("ResponsibleUser").''; print ''; print ''; -print $form->select_dolusers($conf->global->PRELEVEMENT_USER,'value0',1); +print $form->select_dolusers($conf->global->PRELEVEMENT_USER, 'value0', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print ''; print ''; @@ -178,7 +178,7 @@ print '
'; if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) { $langs->load("mails"); - print_titre($langs->trans("Notifications")); + print load_fiche_titre($langs->trans("Notifications")); $sql = "SELECT u.rowid, u.lastname, u.firstname, u.fk_soc, u.email"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; @@ -238,11 +238,11 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) print "\n"; print ''; - print $form->selectarray('user',$internalusers);// select_users(0,'user',0); + print $form->selectarray('user',$internalusers);// select_dolusers(0,'user',0); print ''; print ''; - print $form->selectarray('action',$actions);// select_users(0,'user',0); + print $form->selectarray('action',$actions);// select_dolusers(0,'user',0); print ''; print ''; @@ -284,6 +284,5 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) } */ -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index b407f5bc6f8..b4f1fe67e0b 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -59,11 +59,11 @@ if ($action == 'updateMask') if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -101,13 +101,13 @@ if ($action == 'specimen') } else { - setEventMessage($module->error,'errors'); + setEventMessages($module->error, $module->errors, 'errors'); dol_syslog($module->error, LOG_ERR); } } else { - setEventMessage($langs->trans("ErrorModuleNotFound"),'errors'); + setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } } @@ -121,29 +121,29 @@ if ($action == 'set_PROPALE_DRAFT_WATERMARK') if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } -if ($action == 'set_PROPALE_FREE_TEXT') +if ($action == 'set_PROPOSAL_FREE_TEXT') { - $freetext = GETPOST('PROPALE_FREE_TEXT'); // No alpha here, we want exact string + $freetext = GETPOST('PROPOSAL_FREE_TEXT'); // No alpha here, we want exact string - $res = dolibarr_set_const($db, "PROPALE_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); + $res = dolibarr_set_const($db, "PROPOSAL_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -155,11 +155,11 @@ if ($action == 'setdefaultduration') if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -171,11 +171,11 @@ if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -199,12 +199,12 @@ if ($action == 'setModuleOptions') if (! $error) { $db->commit(); - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -261,7 +261,7 @@ $form=new Form($db); //if ($mesg) print $mesg; $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("PropalSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("PropalSetup"),$linkback,'title_setup'); $head = propal_admin_prepare_head(); @@ -270,7 +270,7 @@ dol_fiche_head($head, 'general', $langs->trans("Proposals"), 0, 'propal'); /* * Module numerotation */ -print_titre($langs->trans("ProposalsNumberingModules")); +print load_fiche_titre($langs->trans("ProposalsNumberingModules"),'',''); print ''; print ''; @@ -374,7 +374,7 @@ print "

\n"; * Document templates generators */ -print_titre($langs->trans("ProposalsPDFModules")); +print load_fiche_titre($langs->trans("ProposalsPDFModules"),'',''); // Load array def with activated templates $def = array(); @@ -536,7 +536,7 @@ print '
'; * Other options * */ -print_titre($langs->trans("OtherOptions")); +print load_fiche_titre($langs->trans("OtherOptions"),'',''); $var=true; print ""; @@ -575,10 +575,20 @@ print ''; $var=! $var; print ''; print ''; -print ''; +print ''; print '\n"; @@ -633,7 +643,7 @@ print '
'; print $langs->trans("FreeLegalTextOnProposal").' ('.$langs->trans("AddCRIfTooLong").')
'; -print ''; +$variablename='PROPOSAL_FREE_TEXT'; +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) +{ + print ''; +} +else +{ + include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_details'); + print $doleditor->Create(); +} print '
'; print ''; print "
'; * Directory */ print '
'; -print_titre($langs->trans("PathToDocuments")); +print load_fiche_titre($langs->trans("PathToDocuments"),'',''); print "\n"; print "\n"; @@ -648,7 +658,7 @@ print "
\n
"; * Notifications */ -print_titre($langs->trans("Notifications")); +print load_fiche_titre($langs->trans("Notifications"),'',''); print ''; print ''; print ''; diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index 00d66944c97..1f6e45223b4 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -44,12 +44,12 @@ if (GETPOST("action") == 'set_proxy') { if (GETPOST("MAIN_USE_CONNECT_TIMEOUT") && ! is_numeric(GETPOST("MAIN_USE_CONNECT_TIMEOUT"))) { - setEventMessage($langs->trans("ErrorValueMustBeInteger"),'errors'); + setEventMessages($langs->trans("ErrorValueMustBeInteger"), null, 'errors'); $error++; } if (GETPOST("MAIN_USE_RESPONSE_TIMEOUT") && ! is_numeric(GETPOST("MAIN_USE_RESPONSE_TIMEOUT"))) { - setEventMessage($langs->trans("ErrorValueMustBeInteger"),'errors'); + setEventMessages($langs->trans("ErrorValueMustBeInteger"), null, 'errors'); $error++; } @@ -68,7 +68,7 @@ if (GETPOST("action") == 'set_proxy') if (! $error) { - setEventMessage($langs->trans("RecordModifiedSuccessfully")); + setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); } } @@ -79,9 +79,10 @@ if (GETPOST("action") == 'set_proxy') $form = new Form($db); -llxHeader('',$langs->trans("Proxy")); +$wikihelp='EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad'; +llxHeader('',$langs->trans("Proxy"), $wikihelp); -print_fiche_titre($langs->trans("SecuritySetup"),'','title_setup'); +print load_fiche_titre($langs->trans("SecuritySetup"),'','title_setup'); print $langs->trans("ProxyDesc")."
\n"; print "
\n"; @@ -207,6 +208,5 @@ print ''; print ''; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php new file mode 100644 index 00000000000..87fce1f6087 --- /dev/null +++ b/htdocs/admin/receiptprinter.php @@ -0,0 +1,452 @@ + + * Copyright (C) 2015 Frederic France + * + * 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 3 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, see . + */ + +/** + * \file htdocs/admin/receiptprinter.php + * \ingroup printing + * \brief Page to setup receipt printer + */ + +require '../main.inc.php'; + +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/receiptprinter.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php'; + +$langs->load("admin"); +$langs->load("receiptprinter"); + +if (! $user->admin) accessforbidden(); + +$action = GETPOST('action','alpha'); +$mode = GETPOST('mode','alpha'); + +$printername = GETPOST('printername', 'alpha'); +$printerid = GETPOST('printerid', 'int'); +$parameter = GETPOST('parameter', 'alpha'); + +$template = GETPOST('template', 'alpha'); +$templatename = GETPOST('templatename', 'alpha'); +$templateid = GETPOST('templateid', 'int'); + +$printer = new dolReceiptPrinter($db); + +if (!$mode) $mode='config'; + +// used in library escpos maybe useful if php doesn't support gzdecode +if (!function_exists('gzdecode')) { + function gzdecode($data) + { + return gzinflate(substr($data,10,-8)); + } +} + +/* + * Action + */ + +if ($action == 'addprinter' && $user->admin) +{ + $error=0; + $db->begin(); + if (empty($printername)) { + $error++; + setEventMessages($langs->trans("PrinterNameEmpty"), null, 'errors'); + } + + if (empty($parameter)) { + setEventMessages($langs->trans("PrinterParameterEmpty"), null, 'warnings'); + } + + if (! $error) + { + $result= $printer->AddPrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter); + if ($result > 0) $error++; + + if (! $error) + { + $db->commit(); + setEventMessages($langs->trans("PrinterAdded",$printername), null); + } + else + { + $db->rollback(); + dol_print_error($db); + } + } + $action = ''; +} + +if ($action == 'deleteprinter' && $user->admin) +{ + $error=0; + $db->begin(); + if (empty($printerid)) { + $error++; + setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors'); + } + + if (! $error) + { + $result= $printer->DeletePrinter($printerid); + if ($result > 0) $error++; + + if (! $error) + { + $db->commit(); + setEventMessages($langs->trans("PrinterDeleted",$printername), null); + } + else + { + $db->rollback(); + dol_print_error($db); + } + } + $action = ''; +} + +if ($action == 'updateprinter' && $user->admin) +{ + $error=0; + $db->begin(); + if (empty($printerid)) { + $error++; + setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors'); + } + + if (! $error) + { + $result= $printer->UpdatePrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter, $printerid); + if ($result > 0) $error++; + + if (! $error) + { + $db->commit(); + setEventMessages($langs->trans("PrinterUpdated",$printername), null); + } + else + { + $db->rollback(); + dol_print_error($db); + } + } + $action = ''; +} + +if ($action == 'testprinter' && $user->admin) +{ + $error=0; + if (empty($printerid)) { + $error++; + setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors'); + } + + if (! $error) + { + // test + $ret = $printer->SendTestToPrinter($printerid); + if ($ret == 0) + { + setEventMessages($langs->trans("TestSentToPrinter", $printername), null); + } + else + { + setEventMessages($printer->error, $printer->errors, 'errors'); + } + } + $action = ''; +} + + +if ($action == 'updatetemplate' && $user->admin) +{ + $error=0; + $db->begin(); + if (empty($templateid)) { + $error++; + setEventMessages($langs->trans("TemplateIdEmpty"), null, 'errors'); + } + + if (! $error) + { + $result= $printer->UpdateTemplate($templatename, $template, $templateid); + if ($result > 0) $error++; + + if (! $error) + { + $db->commit(); + setEventMessages($langs->trans("TemplateUpdated",$templatename), null); + } + else + { + $db->rollback(); + dol_print_error($db); + } + } + $action = ''; +} + + +/* + * View + */ + +$form = new Form($db); + +llxHeader('',$langs->trans("ReceiptPrinterSetup")); + +$linkback=''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("ReceiptPrinterSetup"),$linkback,'title_setup'); + +$head = receiptprinteradmin_prepare_head($mode); + +if ($mode == 'config' && $user->admin) +{ + print '
'; + print ''; + if ($action!='editprinter') { + print ''; + } else { + print ''; + } + + dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), 0, 'technic'); + + print $langs->trans("ReceiptPrinterDesc")."

\n"; + + print '
'.$langs->trans("Parameter").'
'."\n"; + $var=true; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + $ret = $printer->listprinters(); + $nbofprinters = count($printer->listprinters); + + if ($ret > 0) { + setEventMessages($printer->error, $printer->errors, 'errors'); + } else { + for ($line=0; $line < $nbofprinters; $line++) { + $var = !$var; + print ''; + if ($action=='editprinter' && $printer->listprinters[$line]['rowid']==$printerid) { + print ''; + print ''; + $ret = $printer->selectTypePrinter($printer->listprinters[$line]['fk_type']); + print ''; + $ret = $printer->selectProfilePrinter($printer->listprinters[$line]['fk_profile']); + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + } else { + print ''; + print ''; + print ''; + print ''; + // edit icon + print ''; + // delete icon + print ''; + // test icon + print ''; + print ''; + } + } + } + + if ($action!='editprinter') + { + if ($nbofprinters > 0) + { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + } + + print ''; + print ''; + $ret = $printer->selectTypePrinter(); + print ''; + $ret = $printer->selectProfilePrinter(); + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + } + print '
'.$langs->trans("Name").''.$langs->trans("Type").''.$langs->trans("Profile").''.$langs->trans("Parameters").'
'.$printer->resprint.''.$printer->profileresprint.'
'.$printer->listprinters[$line]['name'].''.$langs->trans($printer->listprinters[$line]['fk_type_name']).''.$langs->trans($printer->listprinters[$line]['fk_profile_name']).''.$printer->listprinters[$line]['parameter'].''; + print img_picto($langs->trans("Edit"),'edit'); + print ''; + print img_picto($langs->trans("Delete"),'delete'); + print ''; + print img_picto($langs->trans("TestPrinter"),'printer'); + print '
'.$langs->trans("Name").''.$langs->trans("Type").''.$langs->trans("Profile").''.$langs->trans("Parameters").'
'.$printer->resprint.''.$printer->profileresprint.'
'; + + dol_fiche_end(); + + if ($action!='editprinter') { + print '
'; + } else { + print '
'; + } + print ''; + + print '

'; + + dol_fiche_head(); + + print $langs->trans("ReceiptPrinterTypeDesc")."

\n"; + print ''."\n"; + print ''; + print ''; + print ''; + print ''; + //print ''; + print '
'.$langs->trans("CONNECTOR_DUMMY").':'.$langs->trans("CONNECTOR_DUMMY_HELP").'
'.$langs->trans("CONNECTOR_NETWORK_PRINT").':'.$langs->trans("CONNECTOR_NETWORK_PRINT_HELP").'
'.$langs->trans("CONNECTOR_FILE_PRINT").':'.$langs->trans("CONNECTOR_FILE_PRINT_HELP").'
'.$langs->trans("CONNECTOR_WINDOWS_PRINT").':'.$langs->trans("CONNECTOR_WINDOWS_PRINT_HELP").'
'.$langs->trans("CONNECTOR_JAVA").':'.$langs->trans("CONNECTOR_JAVA_HELP").'
'; + dol_fiche_end(); + + print '

'; + + dol_fiche_head(); + print $langs->trans("ReceiptPrinterProfileDesc")."

\n"; + print ''."\n"; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'.$langs->trans("PROFILE_DEFAULT").':'.$langs->trans("PROFILE_DEFAULT_HELP").'
'.$langs->trans("PROFILE_SIMPLE").':'.$langs->trans("PROFILE_SIMPLE_HELP").'
'.$langs->trans("PROFILE_EPOSTEP").':'.$langs->trans("PROFILE_EPOSTEP_HELP").'
'.$langs->trans("PROFILE_P822D").':'.$langs->trans("PROFILE_P822D_HELP").'
'.$langs->trans("PROFILE_STAR").':'.$langs->trans("PROFILE_STAR_HELP").'
'; + dol_fiche_end(); +} + +if ($mode == 'template' && $user->admin) +{ + print '
'; + print ''; + if ($action!='edittemplate') { + print ''; + } else { + print ''; + } + + dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), 0, 'technic'); + + print $langs->trans("ReceiptPrinterTemplateDesc")."

\n"; + print ''."\n"; + $var=true; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + $ret = $printer->listPrintersTemplates(); + //print '
'.print_r($printer->listprinterstemplates, true).'
'; + if ($ret > 0) { + setEventMessages($printer->error, $printer->errors, 'errors'); + } else { + for ($line=0; $line < count($printer->listprinterstemplates); $line++) { + $var = !$var; + print ''; + if ($action=='edittemplate' && $printer->listprinterstemplates[$line]['rowid']==$templateid) { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + } else { + print ''; + print ''; + // edit icon + print ''; + // delete icon + print ''; + // test icon + print ''; + } + print ''; + } + } + + print '
'.$langs->trans("Name").''.$langs->trans("Template").'
'; + print ''.$printer->listprinterstemplates[$line]['name'].''.nl2br(htmlentities($printer->listprinterstemplates[$line]['template'])).''; + print img_picto($langs->trans("Edit"),'edit'); + print ''; + print img_picto($langs->trans("Delete"),'delete'); + print ''; + print img_picto($langs->trans("TestPrinterTemplate"),'printer'); + print '
'; + if ($action!='edittemplate') { + print '
'; + } else { + print '
'; + } + print '
'; + print '

'; + print ''."\n"; + $var=true; + print ''; + print ''; + print ''; + print "\n"; + for ($tag=0; $tag < count($printer->tags); $tag++) { + $var = !$var; + print ''; + print ''; + print ''; + } + print '
'.$langs->trans("Tag").''.$langs->trans("Description").'
<'.$printer->tags[$tag].'>'.$langs->trans(strtoupper($printer->tags[$tag])).'
'; + + dol_fiche_end(); + +} + +// to remove after test +$object=new stdClass(); +$object->date_time = '2015-11-02 22:30:25'; +$object->id = 1234; +$object->customer_firstname = 'John'; +$object->customer_lastname = 'Deuf'; +$object->vendor_firstname = 'Jim'; +$object->vendor_lastname = 'Big'; +$object->barcode = '3700123862396'; +//$printer->sendToPrinter($object, 1, 16); +//setEventMessages($printer->error, $printer->errors, 'errors'); + +llxFooter(); + +$db->close(); + diff --git a/htdocs/admin/salaries.php b/htdocs/admin/salaries.php index 291c3848a63..b09f4820312 100644 --- a/htdocs/admin/salaries.php +++ b/htdocs/admin/salaries.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2015 Alexandre Spangaro * * 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 @@ -26,6 +26,7 @@ require '../main.inc.php'; // Class require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; $langs->load("admin"); $langs->load("salaries"); @@ -60,11 +61,11 @@ if ($action == 'update') if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -75,14 +76,17 @@ if ($action == 'update') llxHeader('',$langs->trans('SalariesSetup')); $form = new Form($db); +if (! empty($conf->accounting->enabled)) $formaccountancy = New FormVentilation($db); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans('SalariesSetup'),$linkback,'title_setup'); +print load_fiche_titre($langs->trans('SalariesSetup'),$linkback,'title_setup'); print '
'; print ''; print ''; +dol_fiche_head(); + /* * Params */ @@ -103,16 +107,26 @@ foreach ($list as $key) // Value print ''; - print ''; + if (! empty($conf->accounting->enabled)) + { + print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1); + } + else + { + print ''; + } print ''; } print ''; -print '
'; print "\n"; -print '
'; +dol_fiche_end(); + +print '
'; + +print ''; llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index fe20d868e83..97cae20377c 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -135,7 +135,7 @@ if ($action == 'activate_encryptdbpassconf') } else { - setEventMessage($langs->trans('InstrucToEncodePass',dol_encode($dolibarr_main_db_pass)),'warnings'); + setEventMessages($langs->trans('InstrucToEncodePass',dol_encode($dolibarr_main_db_pass)), null, 'warnings'); } } else if ($action == 'disable_encryptdbpassconf') @@ -152,7 +152,7 @@ else if ($action == 'disable_encryptdbpassconf') } else { - setEventMessage($langs->trans('InstrucToClearPass',$dolibarr_main_db_pass),'warnings'); + setEventMessages($langs->trans('InstrucToClearPass',$dolibarr_main_db_pass), null, 'warnings'); } } @@ -187,9 +187,10 @@ if ($action == 'maj_pattern') */ $form = new Form($db); -llxHeader('',$langs->trans("Passwords")); +$wikihelp='EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad'; +llxHeader('',$langs->trans("Passwords"),$wikihelp); -print_fiche_titre($langs->trans("SecuritySetup"),'','title_setup'); +print load_fiche_titre($langs->trans("SecuritySetup"),'','title_setup'); print $langs->trans("GeneratedPasswordDesc")."
\n"; print "
\n"; @@ -221,7 +222,7 @@ if (is_resource($handle)) { if (preg_match('/(modGeneratePass[a-z]+)\.class\.php/i',$file,$reg)) { - // Chargement de la classe de numerotation + // Charging the numbering class $classname = $reg[1]; require_once $dir.'/'.$file; diff --git a/htdocs/admin/security_file.php b/htdocs/admin/security_file.php index e72ece4375c..1213a9b2238 100644 --- a/htdocs/admin/security_file.php +++ b/htdocs/admin/security_file.php @@ -86,7 +86,7 @@ else if ($action == 'updateform') $res4=dolibarr_set_const($db, "MAIN_UMASK", $_POST["MAIN_UMASK"],'chaine',0,'',$conf->entity); $res5=dolibarr_set_const($db, "MAIN_ANTIVIRUS_COMMAND", $_POST["MAIN_ANTIVIRUS_COMMAND"],'chaine',0,'',$conf->entity); $res6=dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", $_POST["MAIN_ANTIVIRUS_PARAM"],'chaine',0,'',$conf->entity); - if ($res3 && $res4 && $res5 && $res6) setEventMessage($langs->trans("RecordModifiedSuccessfully")); + if ($res3 && $res4 && $res5 && $res6) setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); } @@ -97,8 +97,8 @@ else if ($action == 'delete') $langs->load("other"); $file = $conf->admin->dir_temp . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). $ret=dol_delete_file($file); - if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); - else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); Header('Location: '.$_SERVER["PHP_SELF"]); exit; } @@ -109,9 +109,10 @@ else if ($action == 'delete') $form = new Form($db); -llxHeader('',$langs->trans("Files")); +$wikihelp='EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad'; +llxHeader('',$langs->trans("Files"),$wikihelp); -print_fiche_titre($langs->trans("SecuritySetup"),'','title_setup'); +print load_fiche_titre($langs->trans("SecuritySetup"),'','title_setup'); //print $langs->trans("FilesDesc")."
\n"; //print "
\n"; diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 74101f29710..ac0a1e883eb 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -76,7 +76,7 @@ else if ($action == 'updateform') { $res1=dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_APPLICATION_TITLE"],'chaine',0,'',$conf->entity); $res2=dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity); - if ($res1 && $res2) setEventMessage($langs->trans("RecordModifiedSuccessfully")); + if ($res1 && $res2) setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); } @@ -87,9 +87,10 @@ else if ($action == 'updateform') $form = new Form($db); -llxHeader('',$langs->trans("Miscellaneous")); +$wikihelp='EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad'; +llxHeader('',$langs->trans("Miscellaneous"),$wikihelp); -print_fiche_titre($langs->trans("SecuritySetup"),'','title_setup'); +print load_fiche_titre($langs->trans("SecuritySetup"),'','title_setup'); print $langs->trans("MiscellaneousDesc")."
\n"; print "
\n"; diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 44bab100730..05fe548daff 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -88,25 +88,25 @@ if ($action == 'send' && ! $_POST['cancel']) if (! empty($formsms->error)) { - setEventMessage($formsms->error,'errors'); + setEventMessages($formsms->error, $formsms->errors, 'errors'); $action='test'; $error++; } if (empty($body)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Message")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Message")), null, 'errors'); $action='test'; $error++; } if (empty($smsfrom) || ! str_replace('+','',$smsfrom)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("SmsFrom")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("SmsFrom")), null, 'errors'); $action='test'; $error++; } if (empty($sendto) || ! str_replace('+','',$sendto)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("SmsTo")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("SmsTo")), null, 'errors'); $action='test'; $error++; } @@ -123,11 +123,13 @@ if ($action == 'send' && ! $_POST['cancel']) if ($result) { - setEventMessage($langs->trans("SmsSuccessfulySent",$smsfrom,$sendto)); + setEventMessages($langs->trans("SmsSuccessfulySent",$smsfrom,$sendto), null, 'mesgs'); + setEventMessages($smsfile->error, $smsfile->errors, 'mesgs'); } else { - setEventMessage($langs->trans("ResultKo"),'errors'); + setEventMessages($langs->trans("ResultKo"), null, 'errors'); + setEventMessages($smsfile->error, $smsfile->errors, 'errors'); } $action=''; @@ -147,7 +149,7 @@ if (preg_match('/^mac/i',PHP_OS)) $linuxlike=0; $wikihelp='EN:Setup Sms|FR:Paramétrage Sms|ES:Configuración Sms'; llxHeader('',$langs->trans("Setup"),$wikihelp); -print_fiche_titre($langs->trans("SmsSetup"),'','title_setup'); +print load_fiche_titre($langs->trans("SmsSetup"),'','title_setup'); print $langs->trans("SmsDesc")."
\n"; print "
\n"; @@ -289,7 +291,7 @@ else if ($_GET["action"] == 'testconnect') { print '
'; - print_titre($langs->trans("DoTestServerAvailability")); + print load_fiche_titre($langs->trans("DoTestServerAvailability")); // If we use SSL/TLS if (! empty($conf->global->MAIN_MAIL_EMAIL_TLS) && function_exists('openssl_open')) $server='ssl://'.$server; @@ -311,7 +313,7 @@ else if ($action == 'test') { print '
'; - print_titre($langs->trans("DoTestSend")); + print load_fiche_titre($langs->trans("DoTestSend")); // Cree l'objet formulaire mail include_once DOL_DOCUMENT_ROOT.'/core/class/html.formsms.class.php'; diff --git a/htdocs/admin/spip.php b/htdocs/admin/spip.php index 753fef37be6..241062732a4 100644 --- a/htdocs/admin/spip.php +++ b/htdocs/admin/spip.php @@ -54,28 +54,30 @@ if ($action == 'update' || $action == 'add') $constname=GETPOST("constname"); $constvalue=GETPOST("constvalue"); - if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue=''; - if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice - { - if ($constvalue) $constvalue=0; - else $constvalue=1; - } + // Action mise a jour ou ajout d'une constante + if ($action == 'update' || $action == 'add') + { + foreach($_POST['constname'] as $key => $val) + { + $constname=$_POST["constname"][$key]; + $constvalue=$_POST["constvalue"][$key]; + $consttype=$_POST["consttype"][$key]; + $constnote=$_POST["constnote"][$key]; - if (in_array($constname,array('ADHERENT_MAIL_VALID','ADHERENT_MAIL_COTIS','ADHERENT_MAIL_RESIL'))) $constvalue=$_POST["constvalue".$constname]; - $consttype=$_POST["consttype"]; - $constnote=GETPOST("constnote"); - $res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity); - - if (! $res > 0) $error++; - - if (! $error) - { - setEventMessage($langs->trans("SetupSaved")); - } - else - { - setEventMessage($langs->trans("Error"),'errors'); - } + $res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity); + + if (! $res > 0) $error++; + } + + if (! $error) + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans("Error"), null, 'errors'); + } + } } // Action activation d'un sous module du module adherent @@ -110,12 +112,11 @@ llxHeader('',$langs->trans("MailmanSpipSetup"),$help_url); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup'); $head = mailmanspip_admin_prepare_head(); -dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user'); $var=true; @@ -124,6 +125,10 @@ $var=true; */ if (! empty($conf->global->ADHERENT_USE_SPIP)) { + print '
'; + + dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user'); + //$link=img_picto($langs->trans("Active"),'tick').' '; $link=''; //$link.=$langs->trans("Disable"); @@ -137,23 +142,30 @@ if (! empty($conf->global->ADHERENT_USE_SPIP)) 'ADHERENT_SPIP_PASS' ); - print_fiche_titre($langs->trans('SPIPTitle'), $link, ''); + print load_fiche_titre($langs->trans('SPIPTitle'), $link, ''); print '
'; - form_constantes($constantes); - print '
'; + + form_constantes($constantes,2); + + dol_fiche_end(); + + print '
'; + + print ''; } else { + dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user'); + $link='
'; //$link.=$langs->trans("Activate"); $link.=img_picto($langs->trans("Disabled"),'switch_off'); $link.=''; - print_fiche_titre($langs->trans('SPIPTitle'), $link, ''); + print load_fiche_titre($langs->trans('SPIPTitle'), $link, ''); + + dol_fiche_end(); } - -dol_fiche_end(); - llxFooter(); $db->close(); diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 0f6560ad055..98ff43360a8 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -96,12 +96,12 @@ if($action) if (! $error) { $db->commit(); - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -113,7 +113,7 @@ if($action) llxHeader('',$langs->trans("StockSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("StockSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("StockSetup"),$linkback,'title_setup'); $form=new Form($db); @@ -141,58 +141,75 @@ $var=true; $found=0; +$var=!$var; +print ""; +print ''.$langs->trans("DeStockOnBill").''; +print ''; if (! empty($conf->facture->enabled)) { - $var=!$var; - print ""; - print ''.$langs->trans("DeStockOnBill").''; - print ''; - print "
"; + print ""; print ''; print ""; print $form->selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled); print ''; - print "
\n\n\n"; - $found++; + print "\n"; } +else +{ + print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module30Name")); +} +print "\n\n"; +$found++; +$var=!$var; +print ""; +print ''.$langs->trans("DeStockOnValidateOrder").''; +print ''; if (! empty($conf->commande->enabled)) { - $var=!$var; - print ""; - print ''.$langs->trans("DeStockOnValidateOrder").''; - print ''; - print "
"; + print ""; print ''; print ""; print $form->selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled); print ''; - print "
\n\n\n"; - $found++; + print "\n"; } +else +{ + print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module25Name")); +} +print "\n\n"; +$found++; +//if (! empty($conf->expedition->enabled)) +//{ +$var=!$var; +print ""; +print ''.$langs->trans("DeStockOnShipment").''; +print ''; if (! empty($conf->expedition->enabled)) { - $var=!$var; - print ""; - print ''.$langs->trans("DeStockOnShipment").''; - print ''; print "
"; print ''; print ""; print $form->selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled); print ''; - print "
\n\n\n"; - $found++; + print "\n"; } +else +{ + print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module80Name")); +} +print "\n\n"; +$found++; -if (! $found) +/*if (! $found) { $var=!$var; print ""; - print ''.$langs->trans("NoModueToManageStockDecrease").''; + print ''.$langs->trans("NoModuleToManageStockDecrease").''; print "\n"; -} +}*/ print ''; @@ -208,57 +225,74 @@ $var=true; $found=0; +$var=!$var; +print ""; +print ''.$langs->trans("ReStockOnBill").''; +print ''; if (! empty($conf->fournisseur->enabled)) { - $var=!$var; - print ""; - print ''.$langs->trans("ReStockOnBill").''; - print ''; - print "
"; + print ""; print ''; print ""; print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled); print ''; - print "
\n\n\n"; - $found++; + print "\n"; } +else +{ + print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name")); +} +print "\n\n"; +$found++; + +$var=!$var; +print ""; +print ''.$langs->trans("ReStockOnValidateOrder").''; +print ''; if (! empty($conf->fournisseur->enabled)) { - $var=!$var; - print ""; - print ''.$langs->trans("ReStockOnValidateOrder").''; - print ''; - print "
"; + print ""; print ''; print ""; print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled); print ''; - print "
\n\n\n"; - $found++; + print "\n"; } +else +{ + print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name")); +} +print "\n\n"; +$found++; + +$var=!$var; +print ""; +print ''.$langs->trans("ReStockOnDispatchOrder").''; +print ''; if (! empty($conf->fournisseur->enabled)) { - $var=!$var; - print ""; - print ''.$langs->trans("ReStockOnDispatchOrder").''; - print ''; - print "
"; + print ""; print ''; print ""; print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled); print ''; - print "
\n\n\n"; - $found++; + print "\n"; } +else +{ + print $langs->trans("ModuleMustBeEnabledFirst", $langs->transnoentitiesnoconv("Module40Name")); +} +print "\n\n"; +$found++; -if (! $found) +/*if (! $found) { $var=!$var; print ""; print ''.$langs->trans("NoModueToManageStockIncrease").''; print "\n"; -} +}*/ print ''; diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 9c70ecc5e4c..92992490ac3 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -5,7 +5,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2010-2013 Juanjo Menent - * Copyright (C) 2011-2013 Philippe Grand + * Copyright (C) 2011-2015 Philippe Grand * * 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 @@ -63,11 +63,11 @@ if ($action == 'updateMask') if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -106,13 +106,13 @@ if ($action == 'specimen') // For invoices } else { - setEventMessage($module->error,'errors'); + setEventMessages($module->error, $module->errors, 'errors'); dol_syslog($module->error, LOG_ERR); } } else { - setEventMessage($langs->trans("ErrorModuleNotFound"),'errors'); + setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } } @@ -174,11 +174,11 @@ if ($action == 'set_SUPPLIER_INVOICE_FREE_TEXT') if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -194,7 +194,7 @@ llxHeader("",""); $form=new Form($db); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup'); print "
"; @@ -205,7 +205,7 @@ dol_fiche_head($head, 'invoice', $langs->trans("Suppliers"), 0, 'company'); // Supplier invoice numbering module -print_titre($langs->trans("SuppliersInvoiceNumberingModel")); +print load_fiche_titre($langs->trans("SuppliersInvoiceNumberingModel"),'',''); print ''; print ''; @@ -311,7 +311,7 @@ print '

'; * Modeles documents for supplier invoices */ -print_titre($langs->trans("BillsPDFModules")); +print load_fiche_titre($langs->trans("BillsPDFModules"),'',''); // Defini tableau def de modele $def = array(); @@ -365,7 +365,7 @@ foreach ($dirmodels as $reldir) { while (($file = readdir($handle))!==false) { - if (preg_match('/\.modules\.php$/i',$file) && substr($file,0,4) == 'pdf_') + if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file)) { $name = substr($file, 4, dol_strlen($file) -16); $classname = substr($file, 0, dol_strlen($file) -12); @@ -381,7 +381,9 @@ foreach ($dirmodels as $reldir) print "\n"; require_once $dir.$file; $module = new $classname($db,$specimenthirdparty); - print $module->description; + if (method_exists($module,'info')) print $module->info($langs); + else print $module->description; + print "\n"; // Active @@ -453,7 +455,7 @@ print '
'; print ''; print ''; -print_titre($langs->trans("OtherOptions")); +print load_fiche_titre($langs->trans("OtherOptions"),'',''); print ''; print ''; print ''; @@ -463,7 +465,17 @@ print "\n"; print '\n"; @@ -477,7 +489,7 @@ print ''; * Notifications */ -print_titre($langs->trans("Notifications")); +print load_fiche_titre($langs->trans("Notifications"),'',''); print '
'.$langs->trans("Parameter").'
'; print $langs->trans("FreeLegalTextOnInvoices").' ('.$langs->trans("AddCRIfTooLong").')
'; -print ''; +$variablename='SUPPLIER_INVOICE_FREE_TEXT'; +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) +{ + print ''; +} +else +{ + include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_details'); + print $doleditor->Create(); +} print '
'; print ''; print "
'; print ''; print ''; diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index 4b39b2381f7..dc3db7a0036 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -5,7 +5,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2010-2013 Juanjo Menent - * Copyright (C) 2011-2013 Philippe Grand + * Copyright (C) 2011-2015 Philippe Grand * * 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 @@ -64,11 +64,11 @@ if ($action == 'updateMask') if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -107,13 +107,13 @@ else if ($action == 'specimen') // For orders } else { - setEventMessage($module->error,'errors'); + setEventMessages($module->error, $module->errors, 'errors'); dol_syslog($module->error, LOG_ERR); } } else { - setEventMessage($langs->trans("ErrorModuleNotFound"),'errors'); + setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } } @@ -210,7 +210,7 @@ $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); llxHeader("",""); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup'); print "
"; @@ -221,7 +221,7 @@ dol_fiche_head($head, 'order', $langs->trans("Suppliers"), 0, 'company'); // Supplier order numbering module -print_titre($langs->trans("OrdersNumberingModules")); +print load_fiche_titre($langs->trans("OrdersNumberingModules"),'',''); print '
'.$langs->trans("Parameter").'
'; print ''; @@ -325,7 +325,7 @@ print '

'; * Documents models for supplier orders */ -print_titre($langs->trans("OrdersModelModule")); +print load_fiche_titre($langs->trans("OrdersModelModule"),'',''); // Defini tableau def de modele $def = array(); @@ -376,7 +376,7 @@ foreach ($dirmodels as $reldir) { while (($file = readdir($handle))!==false) { - if (preg_match('/\.modules\.php$/i',$file) && substr($file,0,4) == 'pdf_') + if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file)) { $name = substr($file, 4, dol_strlen($file) -16); $classname = substr($file, 0, dol_strlen($file) -12); @@ -392,7 +392,8 @@ foreach ($dirmodels as $reldir) print "\n"; require_once $dir.$file; $module = new $classname($db,$specimenthirdparty); - print $module->description; + if (method_exists($module,'info')) print $module->info($langs); + else print $module->description; print "\n"; // Active @@ -464,7 +465,7 @@ print '
'; print ''; print ''; -print_titre($langs->trans("OtherOptions")); +print load_fiche_titre($langs->trans("OtherOptions"),'',''); print ''; print ''; print ''; @@ -487,7 +488,17 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) print '\n"; @@ -502,7 +513,7 @@ print ''; * Notifications */ -print_titre($langs->trans("Notifications")); +print load_fiche_titre($langs->trans("Notifications"),'',''); print '
'.$langs->trans("Parameter").'
'; print $langs->trans("FreeLegalTextOnOrders").' ('.$langs->trans("AddCRIfTooLong").')
'; -print ''; +$variablename='SUPPLIER_ORDER_FREE_TEXT'; +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) +{ + print ''; +} +else +{ + include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_details'); + print $doleditor->Create(); +} print '
'; print ''; print "
'; print ''; print ''; diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php new file mode 100644 index 00000000000..069c90ead8a --- /dev/null +++ b/htdocs/admin/supplier_proposal.php @@ -0,0 +1,609 @@ + + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004 Sebastien Di Cintio + * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2008 Raphael Bertrand (Resultic) + * Copyright (C) 2011-2013 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry + * + * 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 3 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, see . + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php'; +$langs->load("admin"); +$langs->load("errors"); +$langs->load('other'); +$langs->load('supplier_proposal'); + +if (! $user->admin) accessforbidden(); + +$action = GETPOST('action','alpha'); +$value = GETPOST('value','alpha'); +$label = GETPOST('label','alpha'); +$scandir = GETPOST('scandir','alpha'); +$type='supplier_proposal'; + +/* + * Actions + */ +$error=0; +if ($action == 'updateMask') +{ + $maskconstsupplier_proposal=GETPOST('maskconstsupplier_proposal','alpha'); + $masksupplier_proposal=GETPOST('masksupplier_proposal','alpha'); + if ($maskconstsupplier_proposal) $res = dolibarr_set_const($db,$maskconstsupplier_proposal,$masksupplier_proposal,'chaine',0,'',$conf->entity); + + if (! $res > 0) $error++; + + if (! $error) + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + +if ($action == 'specimen') +{ + $modele=GETPOST('module','alpha'); + + $supplier_proposal = new SupplierProposal($db); + $supplier_proposal->initAsSpecimen(); + + // Search template files + $file=''; $classname=''; $filefound=0; + $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); + foreach($dirmodels as $reldir) + { + $file=dol_buildpath($reldir."core/modules/supplier_proposal/doc/pdf_".$modele.".modules.php"); + if (file_exists($file)) + { + $filefound=1; + $classname = "pdf_".$modele; + break; + } + } + + if ($filefound) + { + require_once $file; + + $module = new $classname($db); + + if ($module->write_file($supplier_proposal,$langs) > 0) + { + header("Location: ".DOL_URL_ROOT."/document.php?modulepart=supplier_proposal&file=SPECIMEN.pdf"); + return; + } + else + { + setEventMessages($module->error, null, 'errors'); + dol_syslog($module->error, LOG_ERR); + } + } + else + { + setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); + dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); + } +} + +if ($action == 'set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK') +{ + $draft = GETPOST('SUPPLIER_PROPOSAL_DRAFT_WATERMARK','alpha'); + + $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + + if (! $error) + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + +if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT') +{ + $freetext = GETPOST('SUPPLIER_PROPOSAL_FREE_TEXT'); // No alpha here, we want exact string + + $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity); + + if (! $res > 0) $error++; + + if (! $error) + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + +if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL') +{ + $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL",$value,'chaine',0,'',$conf->entity); + + if (! $res > 0) $error++; + + if (! $error) + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + +// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...) +if ($action == 'setModuleOptions') +{ + $post_size=count($_POST); + + $db->begin(); + + for($i=0;$i < $post_size;$i++) + { + if (array_key_exists('param'.$i,$_POST)) + { + $param=GETPOST("param".$i,'alpha'); + $value=GETPOST("value".$i,'alpha'); + if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity); + if (! $res > 0) $error++; + } + } + if (! $error) + { + $db->commit(); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + $db->rollback(); + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + +// Activate a model +if ($action == 'set') +{ + $ret = addDocumentModel($value, $type, $label, $scandir); +} + +else if ($action == 'del') +{ + $ret = delDocumentModel($value, $type); + if ($ret > 0) + { + if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$value") dolibarr_del_const($db, 'SUPPLIER_PROPOSAL_ADDON_PDF',$conf->entity); + } +} + +else if ($action == 'setdoc') +{ + if (dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON_PDF",$value,'chaine',0,'',$conf->entity)) + { + $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF = $value; + } + + // On active le modele + $ret = delDocumentModel($value, $type); + if ($ret > 0) + { + $ret = addDocumentModel($value, $type, $label, $scandir); + } +} + +else if ($action == 'setmod') +{ + // TODO Verifier si module numerotation choisi peut etre active + // par appel methode canBeActivated + + dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON",$value,'chaine',0,'',$conf->entity); +} + + +/* + * Affiche page + */ + +$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']); + + +llxHeader('',$langs->trans("SupplierProposalSetup")); + +$form=new Form($db); + +//if ($mesg) print $mesg; + +$linkback=''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("SupplierProposalSetup"),$linkback,'title_setup'); + +$head = supplier_proposal_admin_prepare_head(); + +dol_fiche_head($head, 'general', $langs->trans("CommRequests"), 0, 'supplier_proposal'); + +/* + * Module numerotation + */ +print load_fiche_titre($langs->trans("SupplierProposalNumberingModules"),'',''); + +print '
'.$langs->trans("Parameter").'
'; +print ''; +print '\n"; +print '\n"; +print '\n"; +print ''; +print ''; +print ''."\n"; + +clearstatcache(); +foreach ($dirmodels as $reldir) +{ + $dir = dol_buildpath($reldir."core/modules/supplier_proposal/"); + + if (is_dir($dir)) + { + $handle = opendir($dir); + if (is_resource($handle)) + { + $var=true; + + while (($file = readdir($handle))!==false) + { + if (substr($file, 0, 21) == 'mod_supplier_proposal_' && substr($file, dol_strlen($file)-3, 3) == 'php') + { + $file = substr($file, 0, dol_strlen($file)-4); + + require_once $dir.$file.'.php'; + + $module = new $file; + + // Show modules according to features level + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; + + if ($module->isEnabled()) + { + $var=!$var; + print ''; + + // Show example of numbering module + print ''."\n"; + + print ''; + + $supplier_proposal=new SupplierProposal($db); + $supplier_proposal->initAsSpecimen(); + + // Info + $htmltooltip=''; + $htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().'
'; + $nextval=$module->getNextValue($mysoc,$supplier_proposal); + if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval + $htmltooltip.=''.$langs->trans("NextValue").': '; + if ($nextval) { + if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured') + $nextval = $langs->trans($nextval); + $htmltooltip.=$nextval.'
'; + } else { + $htmltooltip.=$langs->trans($module->error).'
'; + } + } + + print ''; + + print "\n"; + } + } + } + closedir($handle); + } + } +} +print "
'.$langs->trans("Name")."'.$langs->trans("Description")."'.$langs->trans("Example")."'.$langs->trans("Status").''.$langs->trans("ShortInfo").'
'.$module->nom."\n"; + print $module->info(); + print ''; + $tmp=$module->getExample(); + if (preg_match('/^Error/',$tmp)) print '
'.$langs->trans($tmp).'
'; + elseif ($tmp=='NotConfigured') print $langs->trans($tmp); + else print $tmp; + print '
'; + if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file") + { + print img_picto($langs->trans("Activated"),'switch_on'); + } + else + { + print ''; + print img_picto($langs->trans("Disabled"),'switch_off'); + print ''; + } + print ''; + print $form->textwithpicto('',$htmltooltip,1,0); + print '

\n"; + + +/* + * Document templates generators + */ + +print load_fiche_titre($langs->trans("SupplierProposalPDFModules"),'',''); + +// Load array def with activated templates +$def = array(); +$sql = "SELECT nom"; +$sql.= " FROM ".MAIN_DB_PREFIX."document_model"; +$sql.= " WHERE type = '".$type."'"; +$sql.= " AND entity = ".$conf->entity; +$resql=$db->query($sql); +if ($resql) +{ + $i = 0; + $num_rows=$db->num_rows($resql); + while ($i < $num_rows) + { + $array = $db->fetch_array($resql); + array_push($def, $array[0]); + $i++; + } +} +else +{ + dol_print_error($db); +} + + +print "\n"; +print "\n"; +print " \n"; +print " \n"; +print '\n"; +print '\n"; +print ''; +print ''; +print "\n"; + +clearstatcache(); + +$var=true; +foreach ($dirmodels as $reldir) +{ + foreach (array('','/doc') as $valdir) + { + $dir = dol_buildpath($reldir."core/modules/supplier_proposal".$valdir); + + if (is_dir($dir)) + { + $handle=opendir($dir); + if (is_resource($handle)) + { + while (($file = readdir($handle))!==false) + { + $filelist[]=$file; + } + closedir($handle); + arsort($filelist); + + foreach($filelist as $file) + { + if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file)) + { + if (file_exists($dir.'/'.$file)) + { + $name = substr($file, 4, dol_strlen($file) -16); + $classname = substr($file, 0, dol_strlen($file) -12); + + require_once $dir.'/'.$file; + $module = new $classname($db); + + $modulequalified=1; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0; + + if ($modulequalified) + { + $var = !$var; + print ''; + + // Active + if (in_array($name, $def)) + { + print ''; + } + else + { + print ""; + } + + // Defaut + print "'; + + // Info + $htmltooltip = ''.$langs->trans("Name").': '.$module->name; + $htmltooltip.='
'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown")); + if ($module->type == 'pdf') + { + $htmltooltip.='
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; + } + $htmltooltip.='

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip.='
'.$langs->trans("Logo").': '.yn($module->option_logo,1,1); + $htmltooltip.='
'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1); + $htmltooltip.='
'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1); + $htmltooltip.='
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1); + //$htmltooltip.='
'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1); + //$htmltooltip.='
'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1); + $htmltooltip.='
'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark,1,1); + + + print ''; + + // Preview + print ''; + + print "\n"; + } + } + } + } + } + } + } +} + +print '
".$langs->trans("Name")."".$langs->trans("Description")."'.$langs->trans("Status")."'.$langs->trans("Default")."'.$langs->trans("ShortInfo").''.$langs->trans("Preview").'
'; + print (empty($module->name)?$name:$module->name); + print "\n"; + if (method_exists($module,'info')) print $module->info($langs); + else print $module->description; + print ''."\n"; + print ''; + print img_picto($langs->trans("Enabled"),'switch_on'); + print ''; + print '\n"; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').''; + print ""; + if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$name") + { + print img_picto($langs->trans("Default"),'on'); + } + else + { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; + } + print ''; + print $form->textwithpicto('',$htmltooltip,1,0); + print ''; + if ($module->type == 'pdf') + { + print ''.img_object($langs->trans("Preview"),'bill').''; + } + else + { + print img_object($langs->trans("PreviewNotAvailable"),'generic'); + } + print '
'; +print '
'; + + +/* + * Other options + * + */ +print load_fiche_titre($langs->trans("OtherOptions"),'',''); + +$var=true; +print ""; +print ""; +print "\n"; +print '\n"; +print "\n"; +print ""; + +$var=! $var; +print ''; +print ''; +print ''; +print '\n"; +print ''; + +$var=!$var; +print ""; +print ''; +print ""; +print '\n"; +print ''; + +if ($conf->banque->enabled) +{ + $var=!$var; + print ''; +} +else +{ + $var=!$var; + print ''; +} + +print '
".$langs->trans("Parameter")."'.$langs->trans("Value")." 
'; +print $langs->trans("FreeLegalTextOnSupplierProposal").' ('.$langs->trans("AddCRIfTooLong").')
'; +$variablename='SUPPLIER_PROPOSAL_FREE_TEXT'; +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) +{ + print ''; +} +else +{ + include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_details'); + print $doleditor->Create(); +} +print '
'; +print ''; +print "
'; +print $langs->trans("WatermarkOnDraftSupplierProposal").'
'; +print ''; +print '
'; +print ''; +print "
'; + print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '; + if (! empty($conf->use_javascript_ajax)) + { + print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL'); + } + else + { + if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL)) + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + else + { + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + } + } + print '
'; + print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '.$langs->trans('NotAvailable').'
'; + + + +/* + * Directory + */ +print '
'; +print load_fiche_titre($langs->trans("PathToDocuments"),'',''); + +print "\n"; +print "\n"; +print " \n"; +print " \n"; +print "\n"; +print "\n \n \n\n"; +print "
".$langs->trans("Name")."".$langs->trans("Value")."
".$langs->trans("PathDirectory")."".$conf->supplier_proposal->dir_output."
\n
"; + +llxFooter(); +$db->close(); + diff --git a/htdocs/admin/supplierinvoice_extrafields.php b/htdocs/admin/supplierinvoice_extrafields.php index 4e9f1fce9ae..701362e38f4 100644 --- a/htdocs/admin/supplierinvoice_extrafields.php +++ b/htdocs/admin/supplierinvoice_extrafields.php @@ -74,7 +74,7 @@ $textobject=$langs->transnoentitiesnoconv("BillsSuppliers"); llxHeader('',$langs->trans("SuppliersSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup'); print "
\n"; $head = supplierorder_admin_prepare_head(); @@ -97,27 +97,27 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'create') { print "
"; - print_titre($langs->trans('NewAttribute')); + print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) { print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; } diff --git a/htdocs/admin/supplierinvoicedet_extrafields.php b/htdocs/admin/supplierinvoicedet_extrafields.php index b6f71ecc00c..e741eb6cd75 100644 --- a/htdocs/admin/supplierinvoicedet_extrafields.php +++ b/htdocs/admin/supplierinvoicedet_extrafields.php @@ -74,7 +74,7 @@ $textobject=$langs->transnoentitiesnoconv("BillsSuppliers"); llxHeader('',$langs->trans("SuppliersSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup'); print "
\n"; $head = supplierorder_admin_prepare_head(); @@ -97,27 +97,27 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'create') { print "
"; - print_titre($langs->trans('NewAttribute')); + print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) { print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; } diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php index 135e02a92b4..00550995d19 100644 --- a/htdocs/admin/supplierorder_extrafields.php +++ b/htdocs/admin/supplierorder_extrafields.php @@ -70,7 +70,7 @@ $textobject=$langs->transnoentitiesnoconv("SuppliersOrders"); llxHeader('',$langs->trans("SuppliersSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup'); print "
\n"; $head = supplierorder_admin_prepare_head(); @@ -93,27 +93,27 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'create') { print "
"; - print_titre($langs->trans('NewAttribute')); + print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) { print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; } diff --git a/htdocs/admin/supplierorderdet_extrafields.php b/htdocs/admin/supplierorderdet_extrafields.php index 6d422de4d31..f83ad1348fc 100644 --- a/htdocs/admin/supplierorderdet_extrafields.php +++ b/htdocs/admin/supplierorderdet_extrafields.php @@ -71,7 +71,7 @@ $textobject=$langs->transnoentitiesnoconv("SuppliersOrders"); llxHeader('',$langs->trans("SuppliersSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'title_setup'); print "
\n"; $head = supplierorder_admin_prepare_head(); @@ -94,27 +94,27 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'create') { print "
"; - print_titre($langs->trans('NewAttribute')); + print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) { print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; } diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 3eebfebb37b..f3cfcff9807 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -106,16 +106,26 @@ if ($action == 'set') $activeModules = $newActiveModules; dolibarr_set_const($db, 'SYSLOG_HANDLERS', json_encode($activeModules), 'chaine',0,'',0); + // Check configuration + foreach ($activeModules as $modulename) { + /** + * @var LogHandler + */ + $module = new $modulename; + $error = $module->checkConfiguration(); + } - if (! $error) + + if (! $error) { $db->commit(); - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($error, $errors, 'errors'); + } } @@ -130,11 +140,11 @@ if ($action == 'setlevel') if (! $res > 0) $error++; if (! $error) { - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -147,7 +157,7 @@ llxHeader(); $form=new Form($db); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("SyslogSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("SyslogSetup"),$linkback,'title_setup'); print '
'; $def = array(); @@ -168,7 +178,7 @@ if ($conf->global->MAIN_MODULE_MULTICOMPANY && $user->entity) //print "conf->global->MAIN_FEATURES_LEVEL = ".$conf->global->MAIN_FEATURES_LEVEL."

\n"; // Output mode -print_titre($langs->trans("SyslogOutput")); +print load_fiche_titre($langs->trans("SyslogOutput")); // Mode print '
'; @@ -215,7 +225,11 @@ foreach ($syslogModules as $moduleName) print ''; if ($module->getInfo()) { - print $form->textwithpicto('', $module->getInfo()); + print $form->textwithpicto('', $module->getInfo(), 1, 'help'); + } + if ($module->getWarning()) + { + print $form->textwithpicto('', $module->getWarning(), 1, 'warning'); } print ''; print "\n"; @@ -226,7 +240,7 @@ print "
\n"; print '
'."\n\n"; -print_titre($langs->trans("SyslogLevel")); +print load_fiche_titre($langs->trans("SyslogLevel")); // Level print '
'; diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php index e4bd9d77928..3b2492fad65 100644 --- a/htdocs/admin/system/about.php +++ b/htdocs/admin/system/about.php @@ -25,11 +25,15 @@ */ require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; $langs->load("admin"); $langs->load("help"); $langs->load("members"); +$youuselaststable = 0; + /* * View @@ -38,13 +42,58 @@ $langs->load("members"); llxHeader(); -print_fiche_titre("Dolibarr",'','title_setup'); +print load_fiche_titre("Dolibarr",'','title_setup'); print '
'.img_picto_common('', 'dolibarr_box.png','height="120"').'
'; + + +print '
'; + print $langs->trans("Version").' / '.$langs->trans("DolibarrLicense").':'; print '
    '; -print '
  • '.DOL_VERSION.' / GNU-GPL v3+
  • '; +print '
  • '.DOL_VERSION.''; + +$result = getURLContent('http://sourceforge.net/projects/dolibarr/rss'); +//var_dump($result['content']); +$sfurl = simplexml_load_string($result['content']); +if ($sfurl) +{ + $i=0; + $version='0.0'; + while (! empty($sfurl->channel[0]->item[$i]->title) && $i < 10000) + { + $title=$sfurl->channel[0]->item[$i]->title; + if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg)) + { + $newversion=$reg[1]; + $newversionarray=explode('.',$newversion); + $versionarray=explode('.',$version); + //var_dump($newversionarray);var_dump($versionarray); + if (versioncompare($newversionarray, $versionarray) > 0) $version=$newversion; + } + $i++; + } + + // Show version + if ($version != '0.0') + { + print ' ('.$langs->trans("LastStableVersion").': '.$version.''; + if (DOL_VERSION == $version) + { + $youuselaststable=1; + print $langs->trans("YouUseLastStableVersion"); + } + print ')'; + } + print ' / GNU-GPL v3+
  • '; +} +else +{ + print $langs->trans("LastStableVersion").' : ' .$langs->trans("UpdateServerOffline").'
    '; +} + + print '
'; //print "
\n"; @@ -114,6 +163,9 @@ print ''; print ''; +print '
'; + + print $langs->trans("HelpCenter").':'; print ''; +print '
'; +print '
'; +print '
'; + + +if ($youuselaststable) +{ + print '
'; + print '
'; + + $tmp=versiondolibarrarray(); + if ((empty($tmp[2]) && (strpos($tmp[1], '0') === 0)) || (strpos($tmp[2], '0') === 0)) + { + print $langs->trans("TitleExampleForMajorRelease").':
'; + print ''; + } + else + { + print $langs->trans("TitleExampleForMaintenanceRelease").':
'; + print ''; + } +} + llxFooter(); diff --git a/htdocs/admin/system/browser.php b/htdocs/admin/system/browser.php index 1a68133127d..30ecc448e4d 100644 --- a/htdocs/admin/system/browser.php +++ b/htdocs/admin/system/browser.php @@ -42,7 +42,7 @@ $form=new Form($db); llxHeader(); -print_fiche_titre($langs->trans("InfoBrowser"),'','title_setup'); +print load_fiche_titre($langs->trans("InfoBrowser"),'','title_setup'); $tmp=getBrowserInfo($_SERVER["HTTP_USER_AGENT"]); diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php index 16c63b1b1fd..1ff005e88b2 100644 --- a/htdocs/admin/system/constall.php +++ b/htdocs/admin/system/constall.php @@ -39,10 +39,10 @@ if (!$user->admin) llxHeader(); -print_fiche_titre($langs->trans("SummaryConst"),'','title_setup'); +print load_fiche_titre($langs->trans("SummaryConst"),'','title_setup'); -print_titre($langs->trans("ConfigurationFile").' ('.$conffiletoshowshort.')'); +print load_fiche_titre($langs->trans("ConfigurationFile").' ('.$conffiletoshowshort.')'); // Parameters in conf.php file (when a parameter start with ?, it is shown only if defined) $configfileparameters=array( 'dolibarr_main_url_root', @@ -200,7 +200,7 @@ print '
'; // Parameters in database -print_titre($langs->trans("Database")); +print load_fiche_titre($langs->trans("Database")); print ''; print ''; print ''; diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index 9650b32bd5c..31d35d3f01d 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -46,7 +46,7 @@ if ($action == 'convert') llxHeader(); -print_fiche_titre($langs->trans("Tables")." ".ucfirst($conf->db->type),'','title_setup'); +print load_fiche_titre($langs->trans("Tables")." ".ucfirst($conf->db->type),'','title_setup'); // Define request to get table description diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index e6fc31c4426..365cfaa449d 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -39,7 +39,7 @@ $form=new Form($db); llxHeader(); -print_fiche_titre($langs->trans("InfoDatabase"),'','title_setup'); +print load_fiche_titre($langs->trans("InfoDatabase"),'','title_setup'); // Database print '
'.$langs->trans("Parameter").'
'; diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php index b2e01f65ebb..3fc10bb0f3f 100644 --- a/htdocs/admin/system/dbtable.php +++ b/htdocs/admin/system/dbtable.php @@ -41,7 +41,7 @@ $table=GETPOST('table','alpha'); llxHeader(); -print_fiche_titre($langs->trans("Table") . " ".$table,'','title_setup'); +print load_fiche_titre($langs->trans("Table") . " ".$table,'','title_setup'); // Define request to get table description $base=0; diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index a3788e04023..eeea93a2fea 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -42,7 +42,7 @@ $form=new Form($db); llxHeader(); -print_fiche_titre($langs->trans("InfoDolibarr"),'','title_setup'); +print load_fiche_titre($langs->trans("InfoDolibarr"),'','title_setup'); // Version $var=true; diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 14c9ea59d9a..9b7dfb76689 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -40,7 +40,7 @@ $error=0; llxHeader(); -print_fiche_titre($langs->trans("FileCheckDolibarr"),'','title_setup'); +print load_fiche_titre($langs->trans("FileCheckDolibarr"),'','title_setup'); // Version $var = true; diff --git a/htdocs/admin/system/index.php b/htdocs/admin/system/index.php index 133b6cfbfff..3d473640618 100644 --- a/htdocs/admin/system/index.php +++ b/htdocs/admin/system/index.php @@ -45,7 +45,7 @@ if (! $user->admin) accessforbidden(); llxHeader(); -print_fiche_titre($langs->trans("SummarySystem"),'','title_setup'); +print load_fiche_titre($langs->trans("SummarySystem"),'','title_setup'); print '
'; diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php index 1014beba184..d812f6c29ed 100644 --- a/htdocs/admin/system/modules.php +++ b/htdocs/admin/system/modules.php @@ -39,7 +39,7 @@ if (! $user->admin) llxHeader(); -print_fiche_titre($langs->trans("AvailableModules"),'','title_setup'); +print load_fiche_titre($langs->trans("AvailableModules"),'','title_setup'); print $langs->trans("ToActivateModule").'
'; print "
\n"; diff --git a/htdocs/admin/system/os.php b/htdocs/admin/system/os.php index 5c20fda1cd4..01d48f2444d 100644 --- a/htdocs/admin/system/os.php +++ b/htdocs/admin/system/os.php @@ -35,7 +35,7 @@ if (!$user->admin) llxHeader(); -print_fiche_titre($langs->trans("InfoOS"),'','title_setup'); +print load_fiche_titre($langs->trans("InfoOS"),'','title_setup'); print '
'; print ''; @@ -51,3 +51,4 @@ print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; llxFooter(); +$db->close(); diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index b53c666f2af..3e6a9df4a25 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -48,7 +48,7 @@ $nowstring=dol_print_date(dol_now(),'dayhourlog'); llxHeader(); -print_fiche_titre($langs->trans("PerfDolibarr"),'','title_setup'); +print load_fiche_titre($langs->trans("PerfDolibarr"),'','title_setup'); print $langs->trans("YouMayFindPerfAdviceHere",'http://wiki.dolibarr.org/index.php/FAQ_Increase_Performance').' (
'.$langs->trans("Reload").')
'; @@ -108,6 +108,14 @@ if (! $foundcache && $test) $foundcache++; print img_picto('','tick.png').' '.$langs->trans("EAcceleratorInstalled"); } +$test=function_exists('opcache_get_status'); +if (! $foundcache && $test) +{ + $foundcache++; + print img_picto('','tick.png').' '.$langs->trans("ZendOPCacheInstalled"); // Should be by defautl starting with PHP 5.5 + //$tmp=opcache_get_status(); + //var_dump($tmp); +} $test=function_exists('apc_cache_info'); if (! $foundcache && $test) { @@ -289,7 +297,7 @@ jQuery(document).ready(function() { var compjsstring; getjsurl = $.ajax({ type: "GET", - url: \''.DOL_URL_ROOT.'/core/js/lib_head.js\', + url: \''.DOL_URL_ROOT.'/core/js/lib_rare.js\', cache: false, /* async: false, */ /* crossDomain: true,*/ diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index 89b0f8cd8dc..dfb897ba27c 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -43,7 +43,7 @@ $title='InfoPHP'; if (isset($title)) { - print_fiche_titre($langs->trans($title), '', 'title_setup'); + print load_fiche_titre($langs->trans($title), '', 'title_setup'); } @@ -67,7 +67,7 @@ print '
'; $phparray=phpinfo_array(); foreach($phparray as $key => $value) { - //print_titre($key); + //print load_fiche_titre($key); print ''; print ''; //print ''; diff --git a/htdocs/admin/system/web.php b/htdocs/admin/system/web.php index 2d51344b68c..d1864b1b409 100644 --- a/htdocs/admin/system/web.php +++ b/htdocs/admin/system/web.php @@ -42,7 +42,7 @@ if (!$user->admin) accessforbidden(); llxHeader(); -print_fiche_titre($langs->trans("InfoWebServer"),'','title_setup'); +print load_fiche_titre($langs->trans("InfoWebServer"),'','title_setup'); print '
'.$langs->trans("Parameter").'
'; print "\n"; diff --git a/htdocs/admin/system/xcache.php b/htdocs/admin/system/xcache.php index e6c0f7ae477..361be2b461a 100644 --- a/htdocs/admin/system/xcache.php +++ b/htdocs/admin/system/xcache.php @@ -35,7 +35,7 @@ $action=GETPOST('action'); llxHeader(); -print_fiche_titre("XCache",'','title_setup'); +print load_fiche_titre("XCache",'','title_setup'); print "
\n"; diff --git a/htdocs/admin/system/xdebug.php b/htdocs/admin/system/xdebug.php index 501f74b414b..4236d8c6019 100644 --- a/htdocs/admin/system/xdebug.php +++ b/htdocs/admin/system/xdebug.php @@ -34,7 +34,7 @@ accessforbidden(); llxHeader(); -print_fiche_titre("XDebug",'','title_setup'); +print load_fiche_titre("XDebug",'','title_setup'); print "
\n"; diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 0802b2230ec..00bf0635293 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -26,7 +26,8 @@ */ require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; +if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php'; $langs->load('admin'); @@ -98,10 +99,10 @@ if ($action == 'update') { if (! $error) { $db->commit(); - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); - setEventMessage($langs->trans("Error"),'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -112,9 +113,10 @@ if ($action == 'update') { llxHeader(); $form=new Form($db); +if (! empty($conf->accounting->enabled)) $formaccountancy = New FormVentilation($db); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans('TaxSetup'),$linkback,'title_setup'); +print load_fiche_titre($langs->trans('TaxSetup'),$linkback,'title_setup'); dol_fiche_head(); @@ -143,7 +145,7 @@ else print "
".$langs->trans("Parameter")."".$langs->trans("Value")."
\n"; print '
'; - print_fiche_titre($langs->trans("SummaryOfVatExigibilityUsedByDefault"),'',''); + print load_fiche_titre($langs->trans("SummaryOfVatExigibilityUsedByDefault"),'',''); //print ' ('.$langs->trans("CanBeChangedWhenMakingInvoice").')'; print ''; @@ -212,7 +214,14 @@ foreach ($list as $key) // Value print ''; } @@ -226,6 +235,5 @@ print ''; print ''; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 6f1783e5d11..ee27833b5b4 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -37,7 +37,7 @@ $page = GETPOST('page','int'); if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="date"; if ($page < 0) { $page = 0; } -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page; if (! $user->admin) @@ -52,8 +52,8 @@ if ($action == 'delete') { $file=$conf->admin->dir_output.'/'.GETPOST('urlfile'); $ret=dol_delete_file($file, 1); - if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); - else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); $action=''; } @@ -110,7 +110,7 @@ jQuery(document).ready(function() { trans("Backup"),'','title_setup'); +print load_fiche_titre($langs->trans("Backup"),'','title_setup'); print $langs->trans("BackupDesc",DOL_DATA_ROOT).'

'; @@ -133,7 +133,7 @@ print '
'; trans("BackupDumpWizard")); +print load_fiche_titre($title?$title:$langs->trans("BackupDumpWizard")); print '
'; - print ''; + if (! empty($conf->accounting->enabled)) + { + print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1); + } + else + { + print ''; + } print '
'; print ''; diff --git a/htdocs/admin/tools/dolibarr_import.php b/htdocs/admin/tools/dolibarr_import.php index 6513c846816..24cef75d53c 100644 --- a/htdocs/admin/tools/dolibarr_import.php +++ b/htdocs/admin/tools/dolibarr_import.php @@ -65,7 +65,7 @@ jQuery(document).ready(function() { trans("Restore"),'','title_setup'); +print load_fiche_titre($langs->trans("Restore"),'','title_setup'); print $langs->trans("RestoreDesc",DOL_DATA_ROOT).'

'; ?> diff --git a/htdocs/admin/tools/eaccelerator.php b/htdocs/admin/tools/eaccelerator.php index da168eec510..588170fbb90 100644 --- a/htdocs/admin/tools/eaccelerator.php +++ b/htdocs/admin/tools/eaccelerator.php @@ -227,7 +227,7 @@ function create_key_table($list) $form=new Form($db); -print_fiche_titre('Dolibarr eAccelerator '.$info['version'].' control panel','','title_setup'); +print load_fiche_titre('Dolibarr eAccelerator '.$info['version'].' control panel','','title_setup'); $var=true; diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index f3f21388cc1..3cfb3baf496 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -1,6 +1,7 @@ - * Copyright (C) 2011 Juanjo Menent +/* Copyright (C) 2006-2014 Laurent Destailleur + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -39,7 +40,7 @@ $page = GETPOST("page",'int'); if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="date"; if ($page < 0) { $page = 0; } -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page; if (! $user->admin) accessforbidden(); @@ -60,8 +61,8 @@ if ($action == 'delete') { $file=$conf->admin->dir_output.'/'.GETPOST('urlfile'); $ret=dol_delete_file($file, 1); - if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); - else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); $action=''; } @@ -95,7 +96,7 @@ $formfile = new FormFile($db); //$help_url='EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad'; //llxHeader('','',$help_url); -//print_fiche_titre($langs->trans("Backup"),'','title_setup'); +//print load_fiche_titre($langs->trans("Backup"),'','title_setup'); // Start with empty buffer @@ -106,6 +107,10 @@ $dump_buffer_len = 0; $time_start = time(); +$outputdir = $conf->admin->dir_output.'/backup'; +$result=dol_mkdir($outputdir); + + // MYSQL if ($what == 'mysql') { @@ -115,7 +120,6 @@ if ($what == 'mysql') dolibarr_set_const($db, 'SYSTEMTOOLS_MYSQLDUMP', $cmddump,'chaine',0,'',$conf->entity); } - $outputdir = $conf->admin->dir_output.'/backup'; $outputfile = $outputdir.'/'.$file; // for compression format, we add extension $compression=GETPOST('compression') ? GETPOST('compression','alpha') : 'none'; @@ -184,8 +188,6 @@ if ($what == 'mysql') $errormsg=''; - $result=dol_mkdir($outputdir); - // Debut appel methode execution $fullcommandcrypted=$command." ".$paramcrypted." 2>&1"; $fullcommandclear=$command." ".$paramclear." 2>&1"; @@ -253,7 +255,6 @@ if ($what == 'mysql') if ($what == 'mysqlnobin') { - $outputdir = $conf->admin->dir_output.'/backup'; $outputfile = $outputdir.'/'.$file; $outputfiletemp = $outputfile.'-TMP.sql'; // for compression format, we add extension @@ -287,7 +288,6 @@ if ($what == 'postgresql') dolibarr_set_const($db, 'SYSTEMTOOLS_POSTGRESQLDUMP', $cmddump,'chaine',0,'',$conf->entity); } - $outputdir = $conf->admin->dir_output.'/backup'; $outputfile = $outputdir.'/'.$file; // for compression format, we add extension $compression=GETPOST('compression') ? GETPOST('compression','alpha') : 'none'; @@ -298,7 +298,7 @@ if ($what == 'postgresql') // Parameteres execution $command=$cmddump; - if (preg_match("/\s/",$command)) $command=$command=escapeshellarg($command); // Use quotes on command + if (preg_match("/\s/",$command)) $command=escapeshellarg($command); // Use quotes on command //$param=escapeshellarg($dolibarr_main_db_name)." -h ".escapeshellarg($dolibarr_main_db_host)." -u ".escapeshellarg($dolibarr_main_db_user)." -p".escapeshellarg($dolibarr_main_db_pass); //$param="-F c"; @@ -351,38 +351,34 @@ if ($what == 'postgresql') +if ($errormsg) +{ + setEventMessages($langs->trans("Error")." : ".$errormsg, null, 'errors'); -// Si on a demande une generation -//if ($what) -//{ - if ($errormsg) - { - setEventMessage($langs->trans("Error")." : ".$errormsg, 'errors'); + $resultstring=''; + $resultstring.='
'.$langs->trans("Error")." : ".$errormsg.'
'; - $resultstring=''; - $resultstring.='
'.$langs->trans("Error")." : ".$errormsg.'
'; + $_SESSION["commandbackupresult"]=$resultstring; +} +else +{ + if ($what) + { + setEventMessages($langs->trans("BackupFileSuccessfullyCreated").'.
'.$langs->trans("YouCanDownloadBackupFile"), null, 'mesgs'); + + $resultstring='
'; + $resultstring.=$langs->trans("BackupFileSuccessfullyCreated").'.
'; + $resultstring.=$langs->trans("YouCanDownloadBackupFile"); + $resultstring.='
'; $_SESSION["commandbackupresult"]=$resultstring; - } - else + } + else { - if ($what) - { - setEventMessage($langs->trans("BackupFileSuccessfullyCreated").'.
'.$langs->trans("YouCanDownloadBackupFile")); + setEventMessages($langs->trans("YouMustRunCommandFromCommandLineAfterLoginToUser",$dolibarr_main_db_user,$dolibarr_main_db_user), null, 'mesgs'); + } +} - $resultstring='
'; - $resultstring.=$langs->trans("BackupFileSuccessfullyCreated").'.
'; - $resultstring.=$langs->trans("YouCanDownloadBackupFile"); - $resultstring.='
'; - - $_SESSION["commandbackupresult"]=$resultstring; - } - else - { - setEventMessage($langs->trans("YouMustRunCommandFromCommandLineAfterLoginToUser",$dolibarr_main_db_user,$dolibarr_main_db_user)); - } - } -//} /* $filearray=dol_dir_list($conf->admin->dir_output.'/backup','files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1); @@ -417,8 +413,14 @@ function backup_tables($outputfile, $tables='*') global $errormsg; // Set to UTF-8 - $db->query('SET NAMES utf8'); - $db->query('SET CHARACTER SET utf8'); + if(is_a($db, 'DoliDBMysqli')) { + /** @var DoliDBMysqli $db */ + $db->db->set_charset('utf8'); + } else { + /** @var DoliDB $db */ + $db->query('SET NAMES utf8'); + $db->query('SET CHARACTER SET utf8'); + } //get all of the tables if ($tables == '*') diff --git a/htdocs/admin/tools/index.php b/htdocs/admin/tools/index.php index 4ea716c322b..6d7082728f3 100644 --- a/htdocs/admin/tools/index.php +++ b/htdocs/admin/tools/index.php @@ -42,7 +42,7 @@ if (GETPOST('leftmenu') == 'modulesadmintools') $title=$langs->trans("ModulesSys llxHeader(array(),$title); -print_fiche_titre($title,'','title_setup'); +print load_fiche_titre($title,'','title_setup'); print $langs->trans("SystemToolsAreaDesc").'
'; print "
"; diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 204ac36ea03..4ba759a66fa 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -111,7 +111,7 @@ if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) if (! $resql) { $error++; - setEventMessage($db->lasterror(), 'errors'); + setEventMessages($db->lasterror(), null, 'errors'); } // Add event purge diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index 9bd700a7c9e..170c37a79bf 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -48,64 +48,12 @@ if (! empty($conf->syslog->enabled)) */ if ($action=='purge' && ! preg_match('/^confirm/i',$choice) && ($choice != 'allfiles' || $confirm == 'yes') ) { - $filesarray=array(); + require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php'; + $utils = new Utils($db); + $result = $utils->purgeFiles($choice); - if ($choice=='tempfiles') - { - // Delete temporary files - if ($dolibarr_main_data_root) - { - $filesarray=dol_dir_list($dolibarr_main_data_root,"directories",1,'\/temp$'); - } - } - - if ($choice=='allfiles') - { - // Delete all files - if ($dolibarr_main_data_root) - { - $filesarray=dol_dir_list($dolibarr_main_data_root,"all",0,'','install\.lock$'); - } - } - - if ($choice=='logfile') - { - $filesarray[]=array('fullname'=>$filelog,'type'=>'file'); - } - - $count=0; - if (count($filesarray)) - { - - foreach($filesarray as $key => $value) - { - //print "x ".$filesarray[$key]['fullname']."
\n"; - if ($filesarray[$key]['type'] == 'dir') - { - $count+=dol_delete_dir_recursive($filesarray[$key]['fullname']); - } - elseif ($filesarray[$key]['type'] == 'file') - { - // If (file that is not logfile) or (if logfile with option logfile) - if ($filesarray[$key]['fullname'] != $filelog || $choice=='logfile') - { - $count+=(dol_delete_file($filesarray[$key]['fullname'])?1:0); - } - } - } - - // Update cachenbofdoc - if (! empty($conf->ecm->enabled) && $choice=='allfiles') - { - require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; - $ecmdirstatic = new EcmDirectory($db); - $result = $ecmdirstatic->refreshcachenboffile(1); - } - } - - if ($count) $mesg=$langs->trans("PurgeNDirectoriesDeleted", $count); - else $mesg=$langs->trans("PurgeNothingToDelete"); - setEventMessage($mesg); + $mesg = $utils->output; + setEventMessages($mesg, null, 'mesgs'); } @@ -117,7 +65,7 @@ llxHeader(); $form=new Form($db); -print_fiche_titre($langs->trans("Purge"),'','title_setup'); +print load_fiche_titre($langs->trans("Purge"),'','title_setup'); print $langs->trans("PurgeAreaDesc",$dolibarr_main_data_root).'
'; print '
'; @@ -160,7 +108,7 @@ if (preg_match('/^confirm/i',$choice)) { print '
'; $formquestion=array(); - print $form->formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').' '.img_warning(), 'purge', $formquestion, 'no', 2); + print $form->formconfirm($_SERVER["PHP_SELF"].'?choice=allfiles', $langs->trans('Purge'), $langs->trans('ConfirmPurge').img_warning().' ', 'purge', $formquestion, 'no', 2); } diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php index b391ffa0d2a..cb4890f77f1 100644 --- a/htdocs/admin/tools/update.php +++ b/htdocs/admin/tools/update.php @@ -23,6 +23,7 @@ */ require '../../main.inc.php'; +include_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; include_once DOL_DOCUMENT_ROOT . '/core/lib/geturl.lib.php'; @@ -34,7 +35,7 @@ $action=GETPOST('action','alpha'); if (! $user->admin) accessforbidden(); if (GETPOST('msg','alpha')) { - setEventMessage(GETPOST('msg','alpha'), 'errors'); + setEventMessages(GETPOST('msg','alpha'), null, 'errors'); } @@ -63,7 +64,7 @@ if ($action=='install') if (! $original_file) { $langs->load("Error"); - setEventMessage($langs->trans("ErrorFileRequired"), 'warnings'); + setEventMessages($langs->trans("ErrorFileRequired"), null, 'warnings'); $error++; } else @@ -71,7 +72,7 @@ if ($action=='install') if (! preg_match('/\.zip/i',$original_file)) { $langs->load("errors"); - setEventMessage($langs->trans("ErrorFileMustBeADolibarrPackage",$original_file), 'errors'); + setEventMessages($langs->trans("ErrorFileMustBeADolibarrPackage",$original_file), null, 'errors'); $error++; } } @@ -99,7 +100,7 @@ if ($action=='install') if (! empty($result['error'])) { $langs->load("errors"); - setEventMessage($langs->trans($result['error'],$original_file), 'errors'); + setEventMessages($langs->trans($result['error'],$original_file), null, 'errors'); $error++; } else @@ -116,7 +117,7 @@ if ($action=='install') //var_dump($modulenamedir); if (! dol_is_dir($modulenamedir)) { - setEventMessage($langs->trans("ErrorModuleFileSeemsToHaveAWrongFormat"), 'errors'); + setEventMessages($langs->trans("ErrorModuleFileSeemsToHaveAWrongFormat"), null, 'errors'); $error++; } } @@ -128,7 +129,7 @@ if ($action=='install') $result=dolCopyDir($modulenamedir, $dirins.'/'.$modulename, '0444', 1); if ($result <= 0) { - setEventMessage($langs->trans("ErrorFailedToCopy"), 'errors'); + setEventMessages($langs->trans("ErrorFailedToCopy"), null, 'errors'); $error++; } } @@ -142,7 +143,7 @@ if ($action=='install') if (! $error) { - setEventMessage($langs->trans("SetupIsReadyForUse")); + setEventMessages($langs->trans("SetupIsReadyForUse"), null, 'mesgs'); } } @@ -163,7 +164,7 @@ $dirins_ok=(dol_is_dir($dirins)); $wikihelp='EN:Installation_-_Upgrade|FR:Installation_-_Mise_à_jour|ES:Instalación_-_Actualización'; llxHeader('',$langs->trans("Upgrade"),$wikihelp); -print_fiche_titre($langs->trans("Upgrade"),'','title_setup'); +print load_fiche_titre($langs->trans("Upgrade"),'','title_setup'); print $langs->trans("CurrentVersion").' : '.DOL_VERSION.'
'; @@ -172,30 +173,24 @@ $result = getURLContent('http://sourceforge.net/projects/dolibarr/rss'); $sfurl = simplexml_load_string($result['content']); if ($sfurl) { - $title=$sfurl->channel[0]->item[0]->title; - - function word_limiter($text, $limit = 30, $chars = '0123456789.') - { - if (strlen( $text ) > $limit) - { - $words = str_word_count($text, 2, $chars); - $words = array_reverse($words, TRUE); - foreach($words as $length => $word) { - if ($length + strlen( $word ) >= $limit) - { - array_shift($words); - } else { - break; - } - } - $words = array_reverse($words); - $text = implode(" ", $words) . ''; - } - return $text; - } - - $str = $title; - print $langs->trans("LastStableVersion").' : '. word_limiter( $str ).'
'; + $i=0; + $version='0.0'; + while (! empty($sfurl->channel[0]->item[$i]->title) && $i < 10000) + { + $title=$sfurl->channel[0]->item[$i]->title; + if (preg_match('/([0-9]+\.([0-9\.]+))/', $title, $reg)) + { + $newversion=$reg[1]; + $newversionarray=explode('.',$newversion); + $versionarray=explode('.',$version); + //var_dump($newversionarray);var_dump($versionarray); + if (versioncompare($newversionarray, $versionarray) > 0) $version=$newversion; + } + $i++; + } + + // Show version + print $langs->trans("LastStableVersion").' : '. (($version != '0.0')?$version:$langs->trans("Unknown")) .'
'; } else { diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index cdea31fd7c4..4ebd64a2f5b 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2007-2016 Laurent Destailleur * Copyright (C) 2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -33,15 +33,73 @@ $langs->load("errors"); if (!$user->admin) accessforbidden(); - -$action=GETPOST('action'); +$id=GETPOST('rowid','int'); +$action=GETPOST('action','alpha'); +$langcode=GETPOST('langcode','alpha'); +$transkey=GETPOST('transkey','alpha'); +$transvalue=GETPOST('transvalue','alpha'); /* * Actions */ -// None + +if ($action == 'add' || (GETPOST('add') && $action != 'update')) +{ + $error=0; + + if (empty($langcode)) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Language")), null, 'errors'); + $error++; + } + if ($transkey == '') + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Key")), null, 'errors'); + $error++; + } + if ($transvalue == '') + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Value")), null, 'errors'); + $error++; + } + if (! $error) + { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."overwrite_trans(lang, transkey, transvalue) VALUE ('".$db->escape($langcode)."','".$db->escape($transkey)."','".$db->escape($transvalue)."')"; + $result = $db->query($sql); + if ($result > 0) + { + setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); + $action=""; + $transkey=""; + $transvalue=""; + } + else + { + dol_print_error($db); + $action=''; + } + } +} + +// Delete line from delete picto +if ($action == 'delete') +{ + $sql = "DELETE FROM ".MAIN_DB_PREFIX."overwrite_trans WHERE rowid = ".$db->escape($id); + $result = $db->query($sql); + if ($result >= 0) + { + setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); + } + else + { + dol_print_error($db); + } +} + + + @@ -52,17 +110,127 @@ $action=GETPOST('action'); $wikihelp='EN:Setup|FR:Paramétrage|ES:Configuración'; llxHeader('',$langs->trans("Setup"),$wikihelp); -print_fiche_titre($langs->trans("TranslationSetup"),'','title_setup'); +print load_fiche_titre($langs->trans("TranslationSetup"),'','title_setup'); print $langs->trans("TranslationDesc")."
\n"; print "
\n"; print $langs->trans("CurrentUserLanguage").': '.$langs->defaultlang.'
'; -print img_warning().' '.$langs->trans("SomeTranslationAreUncomplete").'
'; +print '
'; +print img_warning().' '.$langs->trans("SomeTranslationAreUncomplete").'
'; $urlwikitranslatordoc='http://wiki.dolibarr.org/index.php/Translator_documentation'; print $langs->trans("SeeAlso").': '.$urlwikitranslatordoc.'
'; +print '
'; + +print $langs->trans("TranslationOverwriteDesc",$langs->transnoentitiesnoconv("Language"),$langs->transnoentitiesnoconv("Key"),$langs->transnoentitiesnoconv("Value"))."
\n"; + +print '
'; + +print '
entity) && $debug)?'?debug=1':'').'" method="POST">'; +print ''; +print ''; + +print '
'; +print ''; +print ''; +print ''; +print ''; +if (! empty($conf->multicompany->enabled) && !$user->entity) print ''; +print ''; +print "\n"; + + +// Line to add new record +$var=false; +print "\n"; + +print ''."\n"; +print ''; +// Limit to superadmin +if (! empty($conf->multicompany->enabled) && !$user->entity) +{ + print ''; + print '\n"; +print ''; + + +// Show constants +$sql = "SELECT"; +$sql.= " rowid"; +$sql.= ", lang"; +$sql.= ", transkey"; +$sql.= ", transvalue"; +//$sql.= ", entity"; +$sql.= " FROM ".MAIN_DB_PREFIX."overwrite_trans"; +$sql.= " WHERE 1 = 1"; +//$sql.= " AND entity IN (".$user->entity.",".$conf->entity.")"; +//if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin to debug +//else if (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits +//if (GETPOST('name')) $sql.=natural_search("name", GETPOST('name')); +//$sql.= " ORDER BY entity, name ASC"; +$sql.= " ORDER BY lang ASC, transkey ASC"; + +dol_syslog("translation::select from table", LOG_DEBUG); +$result = $db->query($sql); +if ($result) +{ + $num = $db->num_rows($result); + $i = 0; + $var=false; + + while ($i < $num) + { + $obj = $db->fetch_object($result); + $var=!$var; + + print "\n"; + + print ''; + + print ''."\n"; + print ''."\n"; + + // Value + print ''; + + print ''; + + print "\n"; + print "\n"; + $i++; + } +} + + +print '
'.$langs->trans("Language").''.$langs->trans("Key").''.$langs->trans("Value").''.$langs->trans("Entity").'
'; +print ''; +print ''; +print ''; +print ''; + print ''; + print ''; +} +else +{ + print ''; + print ''; +} +print ''; +print "
'.$obj->lang.''.$obj->transkey.''; + /*print ''; + print ''; + print ''; + print ''; + */ + print $obj->transvalue; + print ''; + print ''.img_delete().''; + print '
'; + +print "\n"; + llxFooter(); diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php index fb7085a6ba8..de59c9136b2 100644 --- a/htdocs/admin/triggers.php +++ b/htdocs/admin/triggers.php @@ -42,7 +42,7 @@ llxHeader("",""); $form = new Form($db); -print_fiche_titre($langs->trans("TriggersAvailable"),'','title_setup'); +print load_fiche_titre($langs->trans("TriggersAvailable"),'','title_setup'); print $langs->trans("TriggersDesc")."
"; print "
\n"; diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index dc21790ec32..f76762c8334 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -95,12 +95,12 @@ $help_url='EN:Module_Users|FR:Module_Utilisateurs|ES:Módulo_Usuarios'; llxHeader('',$langs->trans("UsersSetup"),$help_url); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("UsersSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("UsersSetup"),$linkback,'title_setup'); $head=user_admin_prepare_head(); -dol_fiche_head($head,'card', $langs->trans("User"), 0, 'user'); +dol_fiche_head($head,'card', $langs->trans("MenuUsersAndGroups"), 0, 'user'); print ''; print ''; diff --git a/htdocs/admin/websites.php b/htdocs/admin/websites.php new file mode 100644 index 00000000000..7704e7f3198 --- /dev/null +++ b/htdocs/admin/websites.php @@ -0,0 +1,993 @@ + + * + * 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 3 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, see . + */ + +/** + * \file htdocs/admin/websites.php + * \ingroup setup + * \brief Page to administer web sites + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + +$langs->load("errors"); +$langs->load("admin"); +$langs->load("companies"); +$langs->load("website"); + +$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; +$confirm=GETPOST('confirm','alpha'); +$id=GETPOST('id','int'); +$rowid=GETPOST('rowid','alpha'); + +$id=1; + +if (!$user->admin) accessforbidden(); + +$acts[0] = "activate"; +$acts[1] = "disable"; +$actl[0] = img_picto($langs->trans("Disabled"),'switch_off'); +$actl[1] = img_picto($langs->trans("Activated"),'switch_on'); + +$listoffset=GETPOST('listoffset'); +$listlimit=GETPOST('listlimit')>0?GETPOST('listlimit'):1000; +$status = 1; + +$sortfield = GETPOST("sortfield",'alpha'); +$sortorder = GETPOST("sortorder",'alpha'); +$page = GETPOST("page",'int'); +if ($page == -1) { $page = 0 ; } +$offset = $listlimit * $page ; +$pageprev = $page - 1; +$pagenext = $page + 1; + +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('admin')); + +// This page is a generic page to edit dictionaries +// Put here declaration of dictionaries properties + +// Name of SQL tables of dictionaries +$tabname=array(); +$tabname[1] = MAIN_DB_PREFIX."website"; + +// Dictionary labels +$tablib=array(); +$tablib[1] = "Websites"; + +// Requests to extract data +$tabsql=array(); +$tabsql[1] = "SELECT f.rowid as rowid, f.entity, f.shortname, f.description, f.status FROM ".MAIN_DB_PREFIX."website as f"; + +// Criteria to sort dictionaries +$tabsqlsort=array(); +$tabsqlsort[1] ="shortname ASC"; + +// Nom des champs en resultat de select pour affichage du dictionnaire +$tabfield=array(); +$tabfield[1] = "shortname,description"; + +// Nom des champs d'edition pour modification d'un enregistrement +$tabfieldvalue=array(); +$tabfieldvalue[1] = "shortname,description"; + +// Nom des champs dans la table pour insertion d'un enregistrement +$tabfieldinsert=array(); +$tabfieldinsert[1] = "shortname,description,entity"; + +// Nom du rowid si le champ n'est pas de type autoincrement +// Example: "" if id field is "rowid" and has autoincrement on +// "nameoffield" if id field is not "rowid" or has not autoincrement on +$tabrowid=array(); +$tabrowid[1] = ""; + +// Condition to show dictionary in setup page +$tabcond=array(); +$tabcond[1] = (! empty($conf->websites->enabled)); + +// List of help for fields +$tabhelp=array(); +$tabhelp[1] = array(); + +// List of check for fields (NOT USED YET) +$tabfieldcheck=array(); +$tabfieldcheck[1] = array(); + + +// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact") +$elementList = array(); +$sourceList=array(); + +// Actions add or modify an entry into a dictionary +if (GETPOST('actionadd') || GETPOST('actionmodify')) +{ + $listfield=explode(',',$tabfield[$id]); + $listfieldinsert=explode(',',$tabfieldinsert[$id]); + $listfieldmodify=explode(',',$tabfieldinsert[$id]); + $listfieldvalue=explode(',',$tabfieldvalue[$id]); + + // Check that all fields are filled + $ok=1; + foreach ($listfield as $f => $value) + { + if (! isset($_POST[$value]) || $_POST[$value]=='') // Fields that are not mandatory + { + $ok=0; + $fieldnamekey=$listfield[$f]; + setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors'); + } + } + + // Si verif ok et action add, on ajoute la ligne + if ($ok && GETPOST('actionadd')) + { + if ($tabrowid[$id]) + { + // Recupere id libre pour insertion + $newid=0; + $sql = "SELECT max(".$tabrowid[$id].") newid from ".$tabname[$id]; + $result = $db->query($sql); + if ($result) + { + $obj = $db->fetch_object($result); + $newid=($obj->newid + 1); + + } else { + dol_print_error($db); + } + } + + // Add new entry + $sql = "INSERT INTO ".$tabname[$id]." ("; + // List of fields + if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert)) + $sql.= $tabrowid[$id].","; + $sql.= $tabfieldinsert[$id]; + $sql.=",status)"; + $sql.= " VALUES("; + + // List of values + if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert)) + $sql.= $newid.","; + $i=0; + foreach ($listfieldinsert as $f => $value) + { + if ($value == 'entity') { + $_POST[$listfieldvalue[$i]] = $conf->entity; + } + if ($i) $sql.=","; + if ($_POST[$listfieldvalue[$i]] == '') $sql.="null"; + else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'"; + $i++; + } + $sql.=",1)"; + + dol_syslog("actionadd", LOG_DEBUG); + $result = $db->query($sql); + if ($result) // Add is ok + { + setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); + $_POST=array('id'=>$id); // Clean $_POST array, we keep only + } + else + { + if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); + } + else { + dol_print_error($db); + } + } + } + + // Si verif ok et action modify, on modifie la ligne + if ($ok && GETPOST('actionmodify')) + { + if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; } + else { $rowidcol="rowid"; } + + // Modify entry + $sql = "UPDATE ".$tabname[$id]." SET "; + // Modifie valeur des champs + if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldmodify)) + { + $sql.= $tabrowid[$id]."="; + $sql.= "'".$db->escape($rowid)."', "; + } + $i = 0; + foreach ($listfieldmodify as $field) + { + if ($field == 'entity') { + $_POST[$listfieldvalue[$i]] = $conf->entity; + } + if ($i) $sql.=","; + $sql.= $field."="; + if ($_POST[$listfieldvalue[$i]] == '') $sql.="null"; + else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'"; + $i++; + } + $sql.= " WHERE ".$rowidcol." = '".$rowid."'"; + + dol_syslog("actionmodify", LOG_DEBUG); + //print $sql; + $resql = $db->query($sql); + if (! $resql) + { + setEventMessages($db->error(), null, 'errors'); + } + } + //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition +} + +if (GETPOST('actioncancel')) +{ + //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition +} + +if ($action == 'confirm_delete' && $confirm == 'yes') // delete +{ + if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; } + else { $rowidcol="rowid"; } + + $sql = "DELETE from ".MAIN_DB_PREFIX."website_pages WHERE fk_website ='".$rowid."'"; + $result = $db->query($sql); + + $sql = "DELETE from ".MAIN_DB_PREFIX."website WHERE rowid ='".$rowid."'"; + $result = $db->query($sql); + if (! $result) + { + if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') + { + setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); + } + else + { + dol_print_error($db); + } + } +} + +// activate +if ($action == $acts[0]) +{ + if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; } + else { $rowidcol="rowid"; } + + if ($rowid) { + $sql = "UPDATE ".$tabname[$id]." SET status = 1 WHERE rowid ='".$rowid."'"; + } + + $result = $db->query($sql); + if (!$result) + { + dol_print_error($db); + } +} + +// disable +if ($action == $acts[1]) +{ + if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; } + else { $rowidcol="rowid"; } + + if ($rowid) { + $sql = "UPDATE ".$tabname[$id]." SET status = 0 WHERE rowid ='".$rowid."'"; + } + + $result = $db->query($sql); + if (!$result) + { + dol_print_error($db); + } +} + + + +/* + * View + */ + +$form = new Form($db); +$formadmin=new FormAdmin($db); + +llxHeader(); + +$titre=$langs->trans("WebsiteSetup"); +$linkback=''; +print load_fiche_titre($titre,$linkback,'title_setup'); + +print $langs->trans("WebsiteSetupDesc").'
'; +print "
\n"; + + +// Confirmation de la suppression de la ligne +if ($action == 'delete') +{ + print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete','',0,1); +} +//var_dump($elementList); + +/* + * Show a dictionary + */ +if ($id) +{ + // Complete requete recherche valeurs avec critere de tri + $sql=$tabsql[$id]; + + if ($sortfield) + { + // If sort order is "country", we use country_code instead + $sql.= " ORDER BY ".$sortfield; + if ($sortorder) + { + $sql.=" ".strtoupper($sortorder); + } + $sql.=", "; + // Clear the required sort criteria for the tabsqlsort to be able to force it with selected value + $tabsqlsort[$id]=preg_replace('/([a-z]+\.)?'.$sortfield.' '.$sortorder.',/i','',$tabsqlsort[$id]); + $tabsqlsort[$id]=preg_replace('/([a-z]+\.)?'.$sortfield.',/i','',$tabsqlsort[$id]); + } + else { + $sql.=" ORDER BY "; + } + $sql.=$tabsqlsort[$id]; + $sql.=$db->plimit($listlimit+1,$offset); + //print $sql; + + $fieldlist=explode(',',$tabfield[$id]); + + print '
'; + print ''; + print '
'; + + // Form to add a new line + if ($tabname[$id]) + { + $alabelisused=0; + $var=false; + + $fieldlist=explode(',',$tabfield[$id]); + + // Line for title + print ''; + foreach ($fieldlist as $field => $value) + { + // Determine le nom du champ par rapport aux noms possibles + // dans les dictionnaires de donnees + $valuetoshow=ucfirst($fieldlist[$field]); // Par defaut + $valuetoshow=$langs->trans($valuetoshow); // try to translate + $align="left"; + if ($fieldlist[$field]=='lang') { $valuetoshow=$langs->trans("Language"); } + if ($valuetoshow != '') + { + print ''; + } + if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1; + } + + if ($id == 4) print ''; + print ''; + print ''; + + // Line to enter new values + print ""; + + $obj = new stdClass(); + // If data was already input, we define them in obj to populate input fields. + if (GETPOST('actionadd')) + { + foreach ($fieldlist as $key=>$val) + { + if (GETPOST($val)) + $obj->$val=GETPOST($val); + } + } + + $tmpaction = 'create'; + $parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $reshook=$hookmanager->executeHooks('createDictionaryFieldlist',$parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + $error=$hookmanager->error; $errors=$hookmanager->errors; + + if ($id == 3) unset($fieldlist[2]); + + if (empty($reshook)) + { + if ($tabname[$id] == MAIN_DB_PREFIX.'c_email_templates' && $action == 'edit') + { + fieldList($fieldlist,$obj,$tabname[$id],'hide'); + } + else + { + fieldList($fieldlist,$obj,$tabname[$id],'add'); + } + } + + if ($id == 4) print ''; + print ''; + print ""; + + $colspan=count($fieldlist)+2; + if ($id == 4) $colspan++; + + if (! empty($alabelisused) && $id != 25) // If there is one label among fields, we show legend of * + { + print ''; + } + print ''; // Keep   to have a line with enough height + } + + print ''; + + + + // List of available values in database + dol_syslog("htdocs/admin/dict", LOG_DEBUG); + $resql=$db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + $var=true; + if ($num) + { + // There is several pages + if ($num > $listlimit) + { + print ''; + } + + // Title of lines + print ''; + foreach ($fieldlist as $field => $value) + { + // Determine le nom du champ par rapport aux noms possibles + // dans les dictionnaires de donnees + $showfield=1; // Par defaut + $align="left"; + $sortable=1; + $valuetoshow=''; + /* + $tmparray=getLabelOfField($fieldlist[$field]); + $showfield=$tmp['showfield']; + $valuetoshow=$tmp['valuetoshow']; + $align=$tmp['align']; + $sortable=$tmp['sortable']; + */ + $valuetoshow=ucfirst($fieldlist[$field]); // Par defaut + $valuetoshow=$langs->trans($valuetoshow); // try to translate + if ($fieldlist[$field]=='source') { $valuetoshow=$langs->trans("Contact"); } + if ($fieldlist[$field]=='price') { $valuetoshow=$langs->trans("PriceUHT"); } + if ($fieldlist[$field]=='taux') { + if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow=$langs->trans("Rate"); + else $valuetoshow=$langs->trans("Amount"); + $align='right'; + } + if ($fieldlist[$field]=='localtax1_type') { $valuetoshow=$langs->trans("UseLocalTax")." 2"; $align="center"; $sortable=0; } + if ($fieldlist[$field]=='localtax1') { $valuetoshow=$langs->trans("Rate")." 2"; $sortable=0; } + if ($fieldlist[$field]=='localtax2_type') { $valuetoshow=$langs->trans("UseLocalTax")." 3"; $align="center"; $sortable=0; } + if ($fieldlist[$field]=='localtax2') { $valuetoshow=$langs->trans("Rate")." 3"; $sortable=0; } + if ($fieldlist[$field]=='organization') { $valuetoshow=$langs->trans("Organization"); } + if ($fieldlist[$field]=='lang') { $valuetoshow=$langs->trans("Language"); } + if ($fieldlist[$field]=='type') { $valuetoshow=$langs->trans("Type"); } + if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); } + if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') + { + $valuetoshow=$langs->trans("Label"); + if ($id != 25) $valuetoshow.="*"; + } + if ($fieldlist[$field]=='libelle_facture') { $valuetoshow=$langs->trans("LabelOnDocuments")."*"; } + if ($fieldlist[$field]=='country') { $valuetoshow=$langs->trans("Country"); } + if ($fieldlist[$field]=='recuperableonly') { $valuetoshow=$langs->trans("NPR"); $align="center"; } + if ($fieldlist[$field]=='nbjour') { $valuetoshow=$langs->trans("NbOfDays"); } + if ($fieldlist[$field]=='fdm') { $valuetoshow=$langs->trans("AtEndOfMonth"); } + if ($fieldlist[$field]=='decalage') { $valuetoshow=$langs->trans("Offset"); } + if ($fieldlist[$field]=='width') { $valuetoshow=$langs->trans("Width"); } + if ($fieldlist[$field]=='height') { $valuetoshow=$langs->trans("Height"); } + if ($fieldlist[$field]=='unit') { $valuetoshow=$langs->trans("MeasuringUnit"); } + if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; } + if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); } + if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); $sortable=0; } + if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); $sortable=0; } + if ($fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); } + if ($fieldlist[$field]=='account_parent') { $valuetoshow=$langs->trans("Accountsparent"); } + if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); } + if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); } + if ($fieldlist[$field]=='sortorder') { $valuetoshow=$langs->trans("SortOrder"); } + if ($fieldlist[$field]=='short_label') { $valuetoshow=$langs->trans("ShortLabel"); } + if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); } + + // Affiche nom du champ + if ($showfield) + { + print getTitleFieldOfList($valuetoshow,0,$_SERVER["PHP_SELF"],($sortable?$fieldlist[$field]:''),($page?'page='.$page.'&':'').'&id='.$id,"","align=".$align,$sortfield,$sortorder); + } + } + // Favorite - Only activated on country dictionary + if ($id == 4) print getTitleFieldOfList($langs->trans("Favorite"),0,$_SERVER["PHP_SELF"],"favorite",($page?'page='.$page.'&':'').'&id='.$id,"",'align="center"',$sortfield,$sortorder); + + print getTitleFieldOfList($langs->trans("Status"),0,$_SERVER["PHP_SELF"],"status",($page?'page='.$page.'&':'').'&id='.$id,"",'align="center"',$sortfield,$sortorder); + print getTitleFieldOfList(''); + print getTitleFieldOfList(''); + print ''; + + // Lines with values + while ($i < $num) + { + $var = ! $var; + + $obj = $db->fetch_object($resql); + //print_r($obj); + print ''; + if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code))) + { + print ''; + print ''; + print ''; + print ''; + + $tmpaction='edit'; + $parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $reshook=$hookmanager->executeHooks('editDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + $error=$hookmanager->error; $errors=$hookmanager->errors; + + if (empty($reshook)) fieldList($fieldlist,$obj,$tabname[$id],'edit'); + + print ''; + } + else + { + $tmpaction = 'view'; + $parameters=array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $reshook=$hookmanager->executeHooks('viewDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + + $error=$hookmanager->error; $errors=$hookmanager->errors; + + if (empty($reshook)) + { + foreach ($fieldlist as $field => $value) + { + $showfield=1; + $align="left"; + $valuetoshow=$obj->$fieldlist[$field]; + if ($value == 'type_template') + { + $valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow; + } + if ($value == 'element') + { + $valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow; + } + else if ($value == 'source') + { + $valuetoshow = isset($sourceList[$valuetoshow])?$sourceList[$valuetoshow]:$valuetoshow; + } + else if ($valuetoshow=='all') { + $valuetoshow=$langs->trans('All'); + } + else if ($fieldlist[$field]=='country') { + if (empty($obj->country_code)) + { + $valuetoshow='-'; + } + else + { + $key=$langs->trans("Country".strtoupper($obj->country_code)); + $valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country); + } + } + else if ($fieldlist[$field]=='recuperableonly' || $fieldlist[$field]=='fdm' || $fieldlist[$field] == 'deductible') { + $valuetoshow=yn($valuetoshow); + $align="center"; + } + else if ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) { + $valuetoshow=price($valuetoshow); + } + else if ($fieldlist[$field]=='libelle_facture') { + $langs->load("bills"); + $key=$langs->trans("PaymentCondition".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "PaymentCondition".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); + $valuetoshow=nl2br($valuetoshow); + } + else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') { + $key=$langs->trans("Country".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); + } + else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_availability') { + $langs->load("propal"); + $key=$langs->trans("AvailabilityType".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "AvailabilityType".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); + } + else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_actioncomm') { + $key=$langs->trans("Action".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); + } + else if (! empty($obj->code_iso) && $fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_currencies') { + $key=$langs->trans("Currency".strtoupper($obj->code_iso)); + $valuetoshow=($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso)?$key:$obj->$fieldlist[$field]); + } + else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_typent') { + $key=$langs->trans(strtoupper($obj->code)); + $valuetoshow=($key != strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); + } + else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_prospectlevel') { + $key=$langs->trans(strtoupper($obj->code)); + $valuetoshow=($key != strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); + } + else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_civility') { + $key=$langs->trans("Civility".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); + } + else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') { + $langs->load('agenda'); + $key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); + } + else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') { + $langs->load("bills"); + $key=$langs->trans("PaymentConditionShort".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); + } + else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') { + $langs->load("bills"); + $key=$langs->trans("PaymentType".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); + } + else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') { + $key=$langs->trans("DemandReasonType".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); + } + else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') { + $langs->load("orders"); + $key=$langs->trans($obj->code); + $valuetoshow=($obj->code && $key != $obj->code)?$key:$obj->$fieldlist[$field]; + } + else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') { + $langs->load("sendings"); + $key=$langs->trans("SendingMethod".strtoupper($obj->code)); + $valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code)?$key:$obj->$fieldlist[$field]); + } + else if ($fieldlist[$field] == 'libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paper_format') + { + $key = $langs->trans('PaperFormat'.strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->$fieldlist[$field]); + } + else if ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees') + { + $langs->load('trips'); + $key = $langs->trans(strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->$fieldlist[$field]); + } + else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { + $showfield=0; + } + else if ($fieldlist[$field]=='unicode') { + $valuetoshow = $langs->getCurrencySymbol($obj->code,1); + } + else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { + $langs->load("products"); + $valuetoshow=$langs->trans($obj->$fieldlist[$field]); + } + else if ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') { + $langs->load("products"); + $valuetoshow = $langs->trans($obj->$fieldlist[$field]); + } + else if (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format')) + { + $key = $langs->trans('SizeUnit'.strtolower($obj->unit)); + $valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->$fieldlist[$field]); + } + + else if ($fieldlist[$field]=='localtax1_type') { + if ($obj->localtax1 != 0) + $valuetoshow=$localtax_typeList[$valuetoshow]; + else + $valuetoshow = ''; + $align="center"; + } + else if ($fieldlist[$field]=='localtax2_type') { + if ($obj->localtax2 != 0) + $valuetoshow=$localtax_typeList[$valuetoshow]; + else + $valuetoshow = ''; + $align="center"; + } + else if ($fieldlist[$field]=='localtax1') { + $valuetoshow = price($valuetoshow, 0, $langs, 0, 0); + if ($obj->localtax1 == 0) + $valuetoshow = ''; + $align="right"; + } + else if ($fieldlist[$field]=='localtax2') { + $valuetoshow = price($valuetoshow, 0, $langs, 0, 0); + if ($obj->localtax2 == 0) + $valuetoshow = ''; + $align="right"; + } + else if (in_array($fieldlist[$field],array('taux','localtax1','localtax2'))) + { + $valuetoshow = price($valuetoshow, 0, $langs, 0, 0); + $align="right"; + } + else if (in_array($fieldlist[$field],array('recuperableonly'))) + { + $align="center"; + } + else if ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') { + $valuetoshow = length_accountg($valuetoshow); + } + + // Show value for field + if ($showfield) print ''; + } + } + + // Can an entry be erased or disabled ? + $iserasable=1;$isdisable=1; // true by default + + if (isset($obj->code) && $id != 10) + { + if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $isdisable = 0; } + else if ($obj->code == 'RECEP') { $iserasable = 0; $isdisable = 0; } + else if ($obj->code == 'EF0') { $iserasable = 0; $isdisable = 0; } + } + + if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable=0; } + if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO')) || in_array($obj->type, array('systemauto'))) { $isdisable=0; $isdisable = 0; } + + $url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):'').'&id='.$id.'&'; + + // Favorite + // Only activated on country dictionary + if ($id == 4) + { + print ''; + } + + // Active + print '"; + + // Modify link + if ($iserasable) print ''; + else print ''; + + // Delete link + if ($iserasable) print ''; + else print ''; + + print "\n"; + } + $i++; + } + } + } + else { + dol_print_error($db); + } + + print '
'; + if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1,$valuetoshow).''; + else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]); + else print $valuetoshow; + print ''; + print ''; + print '
'; + if ($action != 'edit') + { + print ''; + } + print '
* '.$langs->trans("LabelUsedByDefault").'.
 
'; + print_fleche_navigation($page, $_SERVER["PHP_SELF"], '&id='.$id, ($num > $listlimit), ''); + print '
 '; + print ' '.$valuetoshow.''; + if ($iserasable) print ''.$actl[$obj->favorite].''; + else print $langs->trans("AlwaysActive"); + print ''; + print ''.$actl[$obj->status].''; + print "'.img_edit().' '.img_delete().' 
'; + + print ''; +} + +print '
'; + + +llxFooter(); +$db->close(); + + +/** + * Show fields in insert/edit mode + * + * @param array $fieldlist Array of fields + * @param Object $obj If we show a particular record, obj is filled with record fields + * @param string $tabname Name of SQL table + * @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered + * @return void + */ +function fieldList($fieldlist, $obj='', $tabname='', $context='') +{ + global $conf,$langs,$db; + global $form; + global $region_id; + global $elementList,$sourceList,$localtax_typeList; + global $bc; + + $formadmin = new FormAdmin($db); + $formcompany = new FormCompany($db); + if (! empty($conf->accounting->enabled)) $formaccountancy = New FormVentilation($db); + + foreach ($fieldlist as $field => $value) + { + if ($fieldlist[$field] == 'country') + { + if (in_array('region_id',$fieldlist)) + { + print ''; + //print join(',',$fieldlist); + print ''; + continue; + } // For state page, we do not show the country input (we link to region, not country) + print ''; + $fieldname='country'; + print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:'')), $fieldname, '', 28, 'maxwidth300'); + print ''; + } + elseif ($fieldlist[$field] == 'country_id') + { + if (! in_array('country',$fieldlist)) // If there is already a field country, we don't show country_id (avoid duplicate) + { + $country_id = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0); + print ''; + print ''; + print ''; + } + } + elseif ($fieldlist[$field] == 'region') + { + print ''; + $formcompany->select_region($region_id,'region'); + print ''; + } + elseif ($fieldlist[$field] == 'region_id') + { + $region_id = (! empty($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:0); + print ''; + print ''; + print ''; + } + elseif ($fieldlist[$field] == 'lang') + { + print ''; + print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT,'lang'); + print ''; + } + // Le type de template + elseif ($fieldlist[$field] == 'type_template') + { + print ''; + print $form->selectarray('type_template', $elementList,(! empty($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:'')); + print ''; + } + // Le type de l'element (pour les type de contact) + elseif ($fieldlist[$field] == 'element') + { + print ''; + print $form->selectarray('element', $elementList,(! empty($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:'')); + print ''; + } + // La source de l'element (pour les type de contact) + elseif ($fieldlist[$field] == 'source') + { + print ''; + print $form->selectarray('source', $sourceList,(! empty($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:'')); + print ''; + } + elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX."c_actioncomm") + { + print ''; + print 'user'; + print ''; + } + elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'fdm' || $fieldlist[$field] == 'deductible') { + print ''; + print $form->selectyesno($fieldlist[$field],(! empty($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:''),1); + print ''; + } + elseif (in_array($fieldlist[$field],array('nbjour','decalage','taux','localtax1','localtax2'))) { + $align="left"; + if (in_array($fieldlist[$field],array('taux','localtax1','localtax2'))) $align="right"; // Fields aligned on right + print ''; + print ''; + print ''; + } + elseif (in_array($fieldlist[$field], array('libelle_facture'))) { + print ''; + } + elseif (in_array($fieldlist[$field], array('content'))) + { + if ($tabname == MAIN_DB_PREFIX.'c_email_templates') + { + print ''; // To create an artificial CR for the current tr we are on + } + else print ''; + if ($context != 'hide') + { + //print ''; + $doleditor = new DolEditor($fieldlist[$field], (! empty($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:''), '', 140, 'dolibarr_mailings', 'In', 0, false, true, ROWS_5, '90%'); + print $doleditor->Create(1); + } + else print ' '; + print ''; + } + elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i',$fieldlist[$field])) { + print ''; + } + elseif ($fieldlist[$field] == 'code' && isset($obj->$fieldlist[$field])) { + print ''; + } + elseif ($fieldlist[$field]=='unit') { + print ''; + $units = array( + 'mm' => $langs->trans('SizeUnitmm'), + 'cm' => $langs->trans('SizeUnitcm'), + 'point' => $langs->trans('SizeUnitpoint'), + 'inch' => $langs->trans('SizeUnitinch') + ); + print $form->selectarray('unit', $units, (! empty($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:''), 0, 0, 0); + print ''; + } + // Le type de taxe locale + elseif ($fieldlist[$field] == 'localtax1_type' || $fieldlist[$field] == 'localtax2_type') + { + print ''; + print $form->selectarray($fieldlist[$field], $localtax_typeList, (! empty($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:'')); + print ''; + } + elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy') + { + print ''; + if (! empty($conf->accounting->enabled)) + { + $accountancy_account = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0); + print $formaccountancy->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1); + } + else + { + print ''; + } + print ''; + } + else + { + print ''; + $size=''; + if ($fieldlist[$field]=='code') $size='size="8" '; + if ($fieldlist[$field]=='position') $size='size="4" '; + if ($fieldlist[$field]=='libelle') $size='size="32" '; + if ($fieldlist[$field]=='tracking') $size='size="92" '; + if ($fieldlist[$field]=='sortorder') $size='size="2" '; + print ''; + print ''; + } + } +} + diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php index 255fc0f6d9c..bdd84a50a7f 100644 --- a/htdocs/admin/workflow.php +++ b/htdocs/admin/workflow.php @@ -61,7 +61,7 @@ if (preg_match('/del(.*)/',$action,$reg)) llxHeader('',$langs->trans("WorkflowSetup"),''); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("WorkflowSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("WorkflowSetup"),$linkback,'title_setup'); print $langs->trans("WorkflowDesc").'
'; print "
"; diff --git a/htdocs/api/README.md b/htdocs/api/README.md index 30f90a7e13e..b4ff7a89f7b 100644 --- a/htdocs/api/README.md +++ b/htdocs/api/README.md @@ -1,24 +1,33 @@ -API howto -========= +API REST howto +============== + +This directory contains files to make Dolibarr a server of REST Web Services. +It depends on external library Restler. + Explore the api --------------- -You can explore API method by using web interface : https://**yourdolibarr.tld**/htdocs/public/api/explorer/index.html (replace **yourdolibarr.tld** by real hostname of your Dolibarr installation) +You can explore API method by using web interface : https://**yourdolibarr.tld**/mydolibarr/api/admin/explorer.php (replace **yourdolibarr.tld** by real hostname of your Dolibarr installation) Access to the API ---------------- +----------------- > **Warning : access to the API should (or better : must!) be secured with SSL connection** To access to the API you need a token to identify. When you access the API for the first time, you need to log in with user name and password to get a token. **Only** this token will allow to access API with. -To log in with the API, use this uri : https://**yourdolibarr.tld**/htdocs/public/api/login?login=**username**&password=**password** (replace bold strings with real values) +To log in with the API, use this uri : https://**yourdolibarr.tld**/mydolibarr/api/index.php/login?login=**username**&password=**password** (replace bold strings with real values) The token will be saved by Dolibarr for next user accesses to the API and it **must** be put into request uri as **api_key** parameter. +Then call other services with + +https://**yourdolibarr.tld**/mydolibarr/api/index.php/otherservice?api_key=**api_key** + + Develop the API --------------- +--------------- The API uses Lucarast Restler framework. Please check documentation https://www.luracast.com/products/restler and examples http://help.luracast.com/restler/examples/ Github contains also usefull informations : https://github.com/Luracast/Restler diff --git a/htdocs/api/admin/api.php b/htdocs/api/admin/api.php deleted file mode 100644 index 740d3eb7e8d..00000000000 --- a/htdocs/api/admin/api.php +++ /dev/null @@ -1,117 +0,0 @@ - - * Copyright (C) 2005-2010 Laurent Destailleur - * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2015 Jean-François Ferry - * - * 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 3 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, see . - */ - -/** - * \file htdocs/api/admin/api.php - * \ingroup api - * \brief Page to setup api module - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; - -$langs->load("admin"); - -if (! $user->admin) - accessforbidden(); - -$action=GETPOST("action"); - -//Activate ProfId -if ($action == 'setproductionmode') -{ - $status = GETPOST('status','alpha'); - - if (dolibarr_set_const($db, 'API_PRODUCTION_MODE', $status, 'chaine', 0, '', $conf->entity) > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - dol_print_error($db); - } -} - - -/* - * View - */ - -llxHeader(); - -$linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("ApiSetup"),$linkback,'title_setup'); - -print $langs->trans("ApiDesc")."
\n"; -print "
\n"; - -//print '
'; -print ''; -print ''; - -print ''; -print ""; -print ""; -print ""; -print ""; - -print ''; -print ''; -$production_mode=(empty($conf->global->API_PRODUCTION_MODE)?false:true); -if ($production_mode) -{ - print ''; -} -else -{ - print ''; -} -print ''; -print ''; - -print '
".$langs->trans("Parameter")."".$langs->trans("Value")." 
'.$langs->trans("ApiProductionMode").''; - print img_picto($langs->trans("Activated"),'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"),'switch_off'); - print ' 
'; -print '

'; - -// API endpoint -print ''.$langs->trans("ApiEndPointIs").':
'; -$url=DOL_MAIN_URL_ROOT.'/public/api/'; -print img_picto('','object_globe.png').' '.$url."
\n"; -$url=DOL_MAIN_URL_ROOT.'/public/api/.json'; -print img_picto('','object_globe.png').' '.$url."
\n"; - -// Explorer -print ''.$langs->trans("ApiExporerIs").':
'; -$url=DOL_MAIN_URL_ROOT.'/public/api/explorer/index.html'; -print img_picto('','object_globe.png').' '.$url."
\n"; - -print '
'; -print '
'; -print $langs->trans("OnlyActiveElementsAreExposed", DOL_URL_ROOT.'/admin/modules.php'); - - - -llxFooter(); -$db->close(); diff --git a/htdocs/api/admin/explorer.php b/htdocs/api/admin/explorer.php new file mode 100644 index 00000000000..44a14f99675 --- /dev/null +++ b/htdocs/api/admin/explorer.php @@ -0,0 +1,166 @@ + + * + * 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 3 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, see . + */ + +/** + * \defgroup api Module DolibarrApi + * \brief API loader + * Search files htdocs//class/api_.class.php + * \file htdocs/api/indexphp + * + * @todo User authentication with api_key + * + * + */ + +require_once '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/api/class/api.class.php'; +require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php'; + + +/* + * View + */ + +// Enable and test if module Api is enabled +if (empty($conf->global->MAIN_MODULE_API)) +{ + $langs->load("admin"); + dol_syslog("Call Dolibarr API interfaces with module REST disabled"); + print $langs->trans("WarningModuleNotActive",'Api').'.

'; + print $langs->trans("ToActivateModule"); + exit; +} + +use \Luracast\Restler\Defaults; + +$api = new DolibarrApi($db); + +$api->r->addAPIClass('Luracast\\Restler\\Resources'); //this creates resources.json at API Root +$api->r->addAPIClass('DolibarrApiInit',''); // Just for url root page +$api->r->setSupportedFormats('JsonFormat', 'XmlFormat'); +$api->r->addAuthenticationClass('DolibarrApiAccess',''); + +$listofapis = array(); + +$modulesdir = dolGetModulesDirs(); +foreach ($modulesdir as $dir) +{ + /* + * Search available module + */ + dol_syslog("Scan directory ".$dir." for API modules"); + + $handle=@opendir(dol_osencode($dir)); + if (is_resource($handle)) + { + while (($file = readdir($handle))!==false) + { + if (is_readable($dir.$file) && preg_match("/^(mod.*)\.class\.php$/i",$file,$reg)) + { + $modulename=$reg[1]; + + // Defined if module is enabled + $enabled=true; + $module=$part=$obj=strtolower(preg_replace('/^mod/i','',$modulename)); + //if ($part == 'propale') $part='propal'; + if ($module == 'societe') { + $obj = 'thirdparty'; + } + if ($module == 'categorie') { + $part = 'categories'; + $obj = 'category'; + } + if ($module == 'facture') { + $part = 'compta/facture'; + $obj = 'facture'; + } + if (empty($conf->$module->enabled)) $enabled=false; + + if ($enabled) + { + /* + * If exists, load the API class for enable module + * + * Search files named api_.class.php into /htdocs//class directory + * + * @todo : take care of externals module! + * @todo : use getElementProperties() function ? + */ + $dir_part = DOL_DOCUMENT_ROOT.'/'.$part.'/class/'; + + $handle_part=@opendir(dol_osencode($dir_part)); + if (is_resource($handle_part)) + { + while (($file_searched = readdir($handle_part))!==false) + { + if (is_readable($dir_part.$file_searched) && preg_match("/^(api_.*)\.class\.php$/i",$file_searched,$reg)) + { + $classname=$reg[1]; + $classname = str_replace('Api_','',ucwords($reg[1])).'Api'; + $classname = ucfirst($classname); + require_once $dir_part.$file_searched; + if (class_exists($classname)) + { + dol_syslog("Found API classname=".$classname); + $api->r->addAPIClass($classname,''); + + /* + require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/Routes.php'; + $tmpclass = new ReflectionClass($classname); + try { + $classMetadata = CommentParser::parse($tmpclass->getDocComment()); + } catch (Exception $e) { + throw new RestException(500, "Error while parsing comments of `$classname` class. " . $e->getMessage()); + }*/ + + //$listofapis[]=array('classname'=>$classname, 'fullpath'=>$file_searched); + } + } + } + } + } + } + } + } +} + + +$listofapis=Routes::toArray(); +//var_dump($listofapis); + + +llxHeader(); + +$linkback=''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("ApiSetup"),$linkback,'title_setup'); + + +foreach($listofapis['v1'] as $key => $val) +{ + if ($key) + { + //print $key.' - '.$val['classname'].' - '.$val['fullpath']." - ".DOL_MAIN_URL_ROOT.'/api/index.php/'.strtolower(preg_replace('/Api$/','',$val['classname']))."/xxx
\n"; + $url=DOL_MAIN_URL_ROOT.'/api/index.php/'.$key; + print img_picto('','object_globe.png').' '.$url."
\n"; + + } +} + +llxFooter(); +$db->close(); + diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php new file mode 100644 index 00000000000..2c31432b63b --- /dev/null +++ b/htdocs/api/admin/index.php @@ -0,0 +1,118 @@ + + * Copyright (C) 2005-2010 Laurent Destailleur + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2015 Jean-François Ferry + * + * 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 3 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, see . + */ + +/** + * \file htdocs/api/admin/index.php + * \ingroup api + * \brief Page to setup Webservices REST module + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; + +$langs->load("admin"); + +if (! $user->admin) + accessforbidden(); + +$action=GETPOST("action"); + +//Activate ProfId +if ($action == 'setproductionmode') +{ + $status = GETPOST('status','alpha'); + + if (dolibarr_set_const($db, 'API_PRODUCTION_MODE', $status, 'chaine', 0, '', $conf->entity) > 0) + { + header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + dol_print_error($db); + } +} + + +/* + * View + */ + +llxHeader(); + +$linkback=''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("ApiSetup"),$linkback,'title_setup'); + +print $langs->trans("ApiDesc")."
\n"; +print "
\n"; + +//print ''; +print ''; +print ''; + +print ''; +print ""; +print ""; +print ""; +print ""; + +print ''; +print ''; +$production_mode=(empty($conf->global->API_PRODUCTION_MODE)?false:true); +if ($production_mode) +{ + print ''; +} +else +{ + print ''; +} +print ''; +print ''; + +print '
".$langs->trans("Parameter")."".$langs->trans("Value")." 
'.$langs->trans("ApiProductionMode").''; + print img_picto($langs->trans("Activated"),'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"),'switch_off'); + print ' 
'; +print '

'; + +// Explorer +print ''.$langs->trans("ApiExporerIs").':
'; +$url=DOL_MAIN_URL_ROOT.'/api/admin/explorer.php'; +print img_picto('','object_globe.png').' '.$url."
\n"; + +// API endpoint +/*print ''.$langs->trans("ApiEndPointIs").':
'; +$url=DOL_MAIN_URL_ROOT.'/api/index.php/xxx/list'; +print img_picto('','object_globe.png').' '.$url."
\n"; +$url=DOL_MAIN_URL_ROOT.'/api/xxx/list.json'; +print img_picto('','object_globe.png').' '.$url."
\n"; +*/ + +print '
'; +print '
'; +print $langs->trans("OnlyActiveElementsAreExposed", DOL_URL_ROOT.'/admin/modules.php'); + + + +llxFooter(); +$db->close(); diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 33bbe56e0a1..a5020d4e112 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -17,6 +17,7 @@ use Luracast\Restler\Restler; use Luracast\Restler\RestException; +use Luracast\Restler\Defaults; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; @@ -40,10 +41,16 @@ class DolibarrApi /** * Constructor * - * @param DoliDb $db Database handler + * @param DoliDb $db Database handler + * @param string $cachedir Cache dir */ - function __construct($db) { + function __construct($db, $cachedir='') + { global $conf; + + if (empty($cachedir)) $cachedir = $conf->api->dir_temp; + Defaults::$cacheDirectory = $cachedir; + $this->db = $db; $production_mode = ( empty($conf->global->API_PRODUCTION_MODE) ? false : true ); $this->r = new Restler($production_mode); @@ -84,7 +91,7 @@ class DolibarrApi // If object has lines, remove $db property if(isset($object->lines) && count($object->lines) > 0) { $nboflines = count($object->lines); - for ($i=0; $i < $nbofline; $i++) + for ($i=0; $i < $nboflines; $i++) { $this->_cleanObjectDatas($object->lines[$i]); } diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index 027c9dcf5f4..a8ceef4a232 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -15,7 +15,21 @@ * along with this program. If not, see . */ +// Create the autoloader for Luracast +require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php'; +call_user_func(function () { + $loader = Luracast\Restler\AutoLoader::instance(); + spl_autoload_register($loader); + return $loader; +}); + +require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/iAuthenticate.php'; +require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/iUseAuthentication.php'; +require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/Resources.php'; +require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/Defaults.php'; +require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/RestException.php'; use \Luracast\Restler\iAuthenticate; +use \Luracast\Restler\iUseAuthentication; use \Luracast\Restler\Resources; use \Luracast\Restler\Defaults; use \Luracast\Restler\RestException; @@ -60,7 +74,8 @@ class DolibarrApiAccess implements iAuthenticate $userClass = Defaults::$userIdentifierClass; - if (isset($_GET['api_key'])) { + if (isset($_GET['api_key'])) + { $sql = "SELECT u.login, u.datec, u.api_key, "; $sql.= " u.tms as date_modification, u.entity"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; @@ -100,7 +115,9 @@ class DolibarrApiAccess implements iAuthenticate } else { - return false; + throw new RestException(401, "Failed to login to API. No parameter 'api_key' provided"); + //dol_syslog("Failed to login to API. No parameter key provided", LOG_DEBUG); + //return false; } $userClass::setCacheIdentifier(static::$role); diff --git a/htdocs/api/class/index.html b/htdocs/api/class/index.html new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/htdocs/api/class/index.html @@ -0,0 +1 @@ + diff --git a/htdocs/api/index.php b/htdocs/api/index.php index 3ac00faa65f..d7bcedb5fd7 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -1,8 +1,148 @@ + * + * 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 3 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, see . */ +/** + * \defgroup api Module DolibarrApi + * \brief API loader + * Search files htdocs//class/api_.class.php + * \file htdocs/api/indexphp + * + * @todo User authentication with api_key + * + * + */ +if (! defined("NOLOGIN")) define("NOLOGIN",'1'); + +$res=0; +if (! $res && file_exists("../main.inc.php")) $res=include '../main.inc.php'; +if (! $res) die("Include of main fails"); + +require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php'; + +call_user_func(function () { + $loader = Luracast\Restler\AutoLoader::instance(); + spl_autoload_register($loader); + return $loader; +}); + +require_once DOL_DOCUMENT_ROOT.'/api/class/api.class.php'; +require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + + + +// Enable and test if module Api is enabled +if (empty($conf->global->MAIN_MODULE_API)) +{ + $langs->load("admin"); + dol_syslog("Call Dolibarr API interfaces with module REST disabled"); + print $langs->trans("WarningModuleNotActive",'Api').'.

'; + print $langs->trans("ToActivateModule"); + exit; +} + +use \Luracast\Restler\Defaults; + +$api = new DolibarrApi($db); + +$api->r->addAPIClass('Luracast\\Restler\\Resources'); //this creates resources.json at API Root +$api->r->addAPIClass('DolibarrApiInit',''); // Just for url root page +$api->r->setSupportedFormats('JsonFormat', 'XmlFormat'); +$api->r->addAuthenticationClass('DolibarrApiAccess',''); + +$listofapis = array(); + +$modulesdir = dolGetModulesDirs(); +foreach ($modulesdir as $dir) +{ + /* + * Search available module + */ + dol_syslog("Scan directory ".$dir." for API modules"); + + $handle=@opendir(dol_osencode($dir)); + if (is_resource($handle)) + { + while (($file = readdir($handle))!==false) + { + if (is_readable($dir.$file) && preg_match("/^(mod.*)\.class\.php$/i",$file,$reg)) + { + $modulename=$reg[1]; + + // Defined if module is enabled + $enabled=true; + $module=$part=$obj=strtolower(preg_replace('/^mod/i','',$modulename)); + //if ($part == 'propale') $part='propal'; + if ($module == 'societe') { + $obj = 'thirdparty'; + } + if ($module == 'categorie') { + $part = 'categories'; + $obj = 'category'; + } + if ($module == 'facture') { + $part = 'compta/facture'; + $obj = 'facture'; + } + if (empty($conf->$module->enabled)) $enabled=false; + + if ($enabled) + { + /* + * If exists, load the API class for enable module + * + * Search files named api_.class.php into /htdocs//class directory + * + * @todo : take care of externals module! + * @todo : use getElementProperties() function ? + */ + $dir_part = DOL_DOCUMENT_ROOT.'/'.$part.'/class/'; + + $handle_part=@opendir(dol_osencode($dir_part)); + if (is_resource($handle_part)) + { + while (($file_searched = readdir($handle_part))!==false) + { + if (is_readable($dir_part.$file_searched) && preg_match("/^(api_.*)\.class\.php$/i",$file_searched,$reg)) + { + $classname=$reg[1]; + $classname = str_replace('Api_','',ucwords($reg[1])).'Api'; + $classname = ucfirst($classname); + require_once $dir_part.$file_searched; + if (class_exists($classname)) + { + dol_syslog("Found API classname=".$classname); + $api->r->addAPIClass($classname,''); + $listofapis[]=array('classname'=>$classname, 'fullpath'=>$file_searched); + } + } + } + } + } + } + } + } +} + + +// TODO If not found, redirect to explorer + +$api->r->handle(); + + + + diff --git a/htdocs/asterisk/cidlookup.php b/htdocs/asterisk/cidlookup.php index ef4eaefe9c2..e50a1a74a1b 100644 --- a/htdocs/asterisk/cidlookup.php +++ b/htdocs/asterisk/cidlookup.php @@ -73,5 +73,9 @@ else dol_print_error($db,'Error'); $found = 'Error'; } +//Greek to Latin +$greek = array('α','β','γ','δ','ε','ζ','η','θ','ι','κ','λ','μ','ν','ξ','ο','π','ρ','ς','σ','τ','υ','φ','χ','ψ','ω','Α','Β','Γ','Δ','Ε','Ζ','Η','Θ','Ι','Κ','Λ','Μ','Ν','Ξ','Ο','Π','Ρ','Σ','Τ','Υ','Φ','Χ','Ψ','Ω','ά','έ','ή','ί','ό','ύ','ώ','ϊ','ΐ','Ά','Έ','Ή','Ί','Ό','Ύ','Ώ','Ϊ'); -echo $found; +$latin = array('a','b','g','d','e','z','h','th','i','k','l','m','n','ks','o','p','r','s','s','t','u','f','ch','ps','w','A','B','G','D','E','Z','H','TH','I','K','L','M','N','KS','O','P','R','S','T','U','F','CH','PS','W','a','e','h','i','o','u','w','i','i','A','E','H','I','O','U','W','I'); + +print str_replace($greek, $latin, $found); diff --git a/htdocs/asterisk/wrapper.php b/htdocs/asterisk/wrapper.php index e0f115e31c5..e5c9a6b2093 100644 --- a/htdocs/asterisk/wrapper.php +++ b/htdocs/asterisk/wrapper.php @@ -79,6 +79,10 @@ if (! isset($conf->global->ASTERISK_TYPE)) $conf->global->ASTERISK_TYPE="SI if (! isset($conf->global->ASTERISK_INDICATIF)) $conf->global->ASTERISK_INDICATIF="0"; if (! isset($conf->global->ASTERISK_PORT)) $conf->global->ASTERISK_PORT=5038; if ($conf->global->ASTERISK_INDICATIF=='NONE') $conf->global->ASTERISK_INDICATIF=''; +if (! isset($conf->global->ASTERISK_CONTEXT)) $conf->global->ASTERISK_CONTEXT="from-internal"; +if (! isset($conf->global->ASTERISK_WAIT_TIME)) $conf->global->ASTERISK_WAIT_TIME="30"; +if (! isset($conf->global->ASTERISK_PRIORITY)) $conf->global->ASTERISK_PRIORITY="1"; +if (! isset($conf->global->ASTERISK_MAX_RETRY)) $conf->global->ASTERISK_MAX_RETRY="2"; $login = $_GET['login']; @@ -96,14 +100,13 @@ $prefix = $conf->global->ASTERISK_INDICATIF; // Port $port = $conf->global->ASTERISK_PORT; // Context ( generalement from-internal ) -$strContext = "from-internal"; - +$strContext = $conf->global->ASTERISK_CONTEXT; // Delai d'attente avant de raccrocher -$strWaitTime = "30"; +$strWaitTime = $conf->global->ASTERISK_WAIT_TIME; // Priority -$strPriority = "1"; +$strPriority = $conf->global->ASTERISK_PRIORITY; // Nomber of try -$strMaxRetry = "2"; +$strMaxRetry = $conf->global->ASTERISK_MAX_RETRY; /* @@ -112,6 +115,34 @@ $strMaxRetry = "2"; llxHeader(); +$sql = "SELECT s.nom as name FROM ".MAIN_DB_PREFIX."societe as s"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON sp.fk_soc = s.rowid"; +$sql.= " WHERE s.entity IN (".getEntity('societe', 1).")"; +$sql.= " AND (s.phone='".$db->escape($called)."'"; +$sql.= " OR sp.phone='".$db->escape($called)."'"; +$sql.= " OR sp.phone_perso='".$db->escape($called)."'"; +$sql.= " OR sp.phone_mobile='".$db->escape($called)."')"; +$sql.= $db->plimit(1); + +dol_syslog('click to dial search information with phone '.$called, LOG_DEBUG); +$resql = $db->query($sql); +if ($resql) +{ + $obj = $db->fetch_object($resql); + if ($obj) + { + $found = $obj->name; + } else { + $found = $notfound; + } + $db->free($resql); +} +else +{ + dol_print_error($db,'Error'); + $found = 'Error'; +} + $number=strtolower($called); $pos=strpos($number,"local"); if (! empty($number)) @@ -120,7 +151,7 @@ if (! empty($number)) { $errno=0; $errstr=0; - $strCallerId = "Dolibarr <".strtolower($caller).">"; + $strCallerId = "Dolibarr call $found <".strtolower($number).">"; $oSocket = @fsockopen($strHost, $port, $errno, $errstr, 10); if (!$oSocket) { @@ -162,3 +193,4 @@ else { } llxFooter(); +$db->close(); diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index bd8f2194fe4..e421c17a470 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -92,7 +92,7 @@ if ($action == 'initbarcodeproducts') if (! is_object($modBarCodeProduct)) { $error++; - setEventMessage($langs->trans("NoBarcodeNumberingTemplateDefined"),'errors'); + setEventMessages($langs->trans("NoBarcodeNumberingTemplateDefined"), null, 'errors'); } if (! $error) @@ -109,7 +109,7 @@ if ($action == 'initbarcodeproducts') $resql=$db->query($sql); if ($resql) { - setEventMessage($langs->trans("AllBarcodeReset"),'mesgs'); + setEventMessages($langs->trans("AllBarcodeReset"), null, 'mesgs'); } else { @@ -160,7 +160,7 @@ if ($action == 'initbarcodeproducts') if (! $error) { - setEventMessage($langs->trans("RecordsModified",$nbok),'mesgs'); + setEventMessages($langs->trans("RecordsModified",$nbok), null, 'mesgs'); } } @@ -191,7 +191,7 @@ $form=new Form($db); llxHeader('',$langs->trans("MassBarcodeInit")); -print_fiche_titre($langs->trans("MassBarcodeInit")); +print load_fiche_titre($langs->trans("MassBarcodeInit")); print '
'; print $langs->trans("MassBarcodeInitDesc").'
'; @@ -211,7 +211,7 @@ if ($conf->societe->enabled) { $nbno=$nbtotal=0; - print_fiche_titre($langs->trans("BarcodeInitForThirdparties"),'','object_company'); + print load_fiche_titre($langs->trans("BarcodeInitForThirdparties"),'','object_company'); print '
'."\n"; $sql="SELECT count(rowid) as nb FROM ".MAIN_DB_PREFIX."societe where barcode IS NULL or barcode = ''"; $resql=$db->query($sql); @@ -252,7 +252,7 @@ if ($conf->product->enabled || $conf->product->service) $nbno=$nbtotal=0; - print_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"),'','object_product'); + print load_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"),'','object_product'); print '
'."\n"; $sql ="SELECT count(rowid) as nb, fk_product_type, datec"; @@ -298,7 +298,7 @@ if ($conf->product->enabled || $conf->product->service) { $disabled=1; $titleno=$langs->trans("NoBarcodeNumberingTemplateDefined"); - print ''.$langs->trans("NoBarcodeNumberingTemplateDefined").'
'; + print ''.$langs->trans("NoBarcodeNumberingTemplateDefined").' ('.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").')
'; } if (empty($nbno)) { diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index b535eb7765d..01e969fc927 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2006-2013 Laurent Destailleur + * Copyright (C) 2006-2016 Laurent Destailleur * * 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 @@ -68,7 +68,7 @@ if (GETPOST('submitproduct') && GETPOST('submitproduct')) if (empty($forbarcode) || empty($fk_barcode_type)) { - setEventMessage($langs->trans("DefinitionOfBarCodeForProductNotComplete",$producttmp->getNomUrl()), 'warnings'); + setEventMessages($langs->trans("DefinitionOfBarCodeForProductNotComplete",$producttmp->getNomUrl()), null, 'warnings'); } } } @@ -85,7 +85,7 @@ if (GETPOST('submitthirdparty') && GETPOST('submitthirdparty')) if (empty($forbarcode) || empty($fk_barcode_type)) { - setEventMessage($langs->trans("DefinitionOfBarCodeForProductNotComplete",$thirdpartytmp->getNomUrl()), 'warnings'); + setEventMessages($langs->trans("DefinitionOfBarCodeForThirdpartyNotComplete",$thirdpartytmp->getNomUrl()), null, 'warnings'); } } } @@ -96,12 +96,12 @@ if ($action == 'builddoc') if (empty($forbarcode)) // barcode value { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("BarcodeValue")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BarcodeValue")), null, 'errors'); $error++; } if (empty($fk_barcode_type)) // barcode type = barcode encoding { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("BarcodeType")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BarcodeType")), null, 'errors'); $error++; } @@ -114,7 +114,7 @@ if ($action == 'builddoc') if ($result <= 0) { $error++; - setEventMessage('Failed to get bar code type information '.$stdobject->error, 'errors'); + setEventMessages('Failed to get bar code type information '.$stdobject->error, $stdobject->errors, 'errors'); } } @@ -145,7 +145,9 @@ if ($action == 'builddoc') // Load barcode class for generating barcode image $classname = "mod".ucfirst($generator); $module = new $classname($db); - if ($generator != 'tcpdfbarcode') { + if ($generator != 'tcpdfbarcode') + { + // May be phpbarcode $template = 'standardlabel'; $is2d = false; if ($module->encodingIsSupported($encoding)) @@ -153,18 +155,18 @@ if ($action == 'builddoc') $barcodeimage=$conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png'; dol_delete_file($barcodeimage); // File is created with full name $barcodeimage = $conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png'; - $result=$module->writeBarCode($code,$encoding,'Y',4); - + $result=$module->writeBarCode($code,$encoding,'Y',4,1); if ($result <= 0 || ! dol_is_file($barcodeimage)) { $error++; - setEventMessage('Failed to generate image file of barcode for code='.$code.' encoding='.$encoding.' file='.basename($barcodeimage), 'errors'); + setEventMessages('Failed to generate image file of barcode for code='.$code.' encoding='.$encoding.' file='.basename($barcodeimage), null, 'errors'); + setEventMessages($module->error, null, 'errors'); } } else { $error++; - setEventMessage("Error, encoding ".$encoding." is not supported by encoder ".$generator.'. You must choose another barcode type or install a barcode generation engine that support '.$encoding, 'errors'); + setEventMessages("Error, encoding ".$encoding." is not supported by encoder ".$generator.'. You must choose another barcode type or install a barcode generation engine that support '.$encoding, null, 'errors'); } } else { $template = 'tcpdflabel'; @@ -207,7 +209,7 @@ if ($action == 'builddoc') for ($i=0; $i < $numberofsticker; $i++) { - $arrayofmembers[]=array( + $arrayofrecords[]=array( 'textleft'=>$textleft, 'textheader'=>$textheader, 'textfooter'=>$textfooter, @@ -226,7 +228,7 @@ if ($action == 'builddoc') // Build and output PDF if ($mode == 'label') { - if (! count($arrayofmembers)) + if (! count($arrayofrecords)) { $mesg=$langs->trans("ErrorRecordNotFound"); } @@ -234,7 +236,7 @@ if ($action == 'builddoc') { $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DescADHERENT_ETIQUETTE_TYPE")); } - if (! $mesg) $result=members_label_pdf_create($db, $arrayofmembers, $modellabel, $outputlangs, $diroutput, $template); + if (! $mesg) $result=doc_label_pdf_create($db, $arrayofrecords, $modellabel, $outputlangs, $diroutput, $template, 'tmp_barcode_sheet.pdf'); } if ($result <= 0) @@ -261,7 +263,7 @@ $form=new Form($db); llxHeader('',$langs->trans("BarCodePrintsheet")); -print_fiche_titre($langs->trans("BarCodePrintsheet")); +print load_fiche_titre($langs->trans("BarCodePrintsheet")); print '
'; print $langs->trans("PageToGenerateBarCodeSheets",$langs->transnoentitiesnoconv("BuildPageToPrint")).'
'; @@ -283,10 +285,13 @@ print '
'; print '
'; print $langs->trans("DescADHERENT_ETIQUETTE_TYPE").'   '; print '
'; -// List of possible labels (defined into $_Avery_Labels variable set into format_cards.lib.php) +// List of possible labels (defined into $_Avery_Labels variable set into core/lib/format_cards.lib.php) $arrayoflabels=array(); foreach(array_keys($_Avery_Labels) as $codecards) { + $labeltoshow=$_Avery_Labels[$codecards]['name']; + //$labeltoshow.=' ('.$_Avery_Labels[$row['code']]['paper-size'].')'; + $arrayoflabels[$codecards]=$labeltoshow; $arrayoflabels[$codecards]=$_Avery_Labels[$codecards]['name']; } print $form->selectarray('modellabel',$arrayoflabels,(GETPOST('modellabel')?GETPOST('modellabel'):$conf->global->ADHERENT_ETIQUETTE_TYPE),1,0,0); @@ -387,11 +392,11 @@ print '
'; if ($producttmp->id > 0) { - print $langs->trans("BarCodeDataForProduct",$producttmp->getNomUrl(1)).'
'; + print $langs->trans("BarCodeDataForProduct",'').' '.$producttmp->getNomUrl(1).'
'; } if ($thirdpartytmp->id > 0) { - print $langs->trans("BarCodeDataForThirdparty",$thirdpartytmp->getNomUrl(1)).'
'; + print $langs->trans("BarCodeDataForThirdparty",'').' '.$thirdpartytmp->getNomUrl(1).'
'; } print '
'; diff --git a/htdocs/bookmarks/admin/bookmark.php b/htdocs/bookmarks/admin/bookmark.php index 51274716eda..b622aa1d9dd 100644 --- a/htdocs/bookmarks/admin/bookmark.php +++ b/htdocs/bookmarks/admin/bookmark.php @@ -42,12 +42,12 @@ if ($action == 'setvalue') if (! $error) { $db->commit(); - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); - setEventMessage($langs->trans("Error"), 'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -59,7 +59,7 @@ if ($action == 'setvalue') llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("BookmarkSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("BookmarkSetup"),$linkback,'title_setup'); print $langs->trans("BookmarkDesc")."
\n"; @@ -82,6 +82,5 @@ print '
'; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index ee6003d0119..4af1815c767 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -50,8 +50,7 @@ function printBookmarksList($aDb, $aLangs) $ret.= ''; if ($user->rights->bookmark->creer) { - $ret.= ''; - //$ret.=img_picto($langs->trans('AddThisPageToBookmarks'),'edit_add').' '; + $ret.= ''; $ret.=img_object($langs->trans('AddThisPageToBookmarks'),'bookmark'); $ret.= ''; } diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index a821cf8e94f..67e01bcb773 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2013 Laurent Destailleur + * Copyright (C) 2005-2015 Laurent Destailleur * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify @@ -70,7 +70,9 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') } if ($action == 'update') $bookmark->fetch($_POST["id"]); - $bookmark->fk_user=$userid; + // Check if null because user not admin can't set an user and send empty value here. + if(!empty($userid)) + $bookmark->fk_user=$userid; $bookmark->title=$title; $bookmark->url=$url; $bookmark->target=$target; @@ -78,12 +80,12 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if (! $title) { $error++; - setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("BookmarkTitle")), 'errors'); + setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->trans("BookmarkTitle")), null, 'errors'); } if (! $url) { $error++; - setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("UrlOrLink")), 'errors'); + setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->trans("UrlOrLink")), null, 'errors'); } if (! $error) @@ -104,11 +106,11 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if ($bookmark->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - setEventMessage($langs->transnoentities("WarningBookmarkAlreadyExists"), 'warnings'); + setEventMessages($langs->transnoentities("WarningBookmarkAlreadyExists"), null, 'warnings'); } else { - setEventMessage($bookmark->error, 'errors'); + setEventMessages($bookmark->error, $bookmark->errors, 'errors'); } $action = $invertedaction; } @@ -149,7 +151,7 @@ if ($action == 'create') print ''; print ''; - print_fiche_titre($langs->trans("NewBookmark")); + print load_fiche_titre($langs->trans("NewBookmark")); dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); @@ -165,7 +167,7 @@ if ($action == 'create') print ''.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").''; print ''.$langs->trans("Owner").''; - $form->select_users(isset($_POST['userid'])?$_POST['userid']:$user->id,'userid',1); + print $form->select_dolusers(isset($_POST['userid'])?$_POST['userid']:$user->id, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print ' '; // Position @@ -262,7 +264,7 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''.$langs->trans("Owner").''; if ($action == 'edit' && $user->admin) { - $form->select_users(isset($_POST['userid'])?$_POST['userid']:($bookmark->fk_user?$bookmark->fk_user:''),'userid',1); + print $form->select_dolusers(isset($_POST['userid'])?$_POST['userid']:($bookmark->fk_user?$bookmark->fk_user:''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); } else { diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 7512785d78b..66b94896424 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -31,6 +31,7 @@ $langs->load("admin"); if (! $user->rights->bookmark->lire) { restrictedArea($user, 'bookmarks'); } +$optioncss = GETPOST('optioncss','alpha'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); @@ -59,7 +60,7 @@ if ($_GET["action"] == 'delete') } else { - setEventMessage($bookmark->error, 'errors'); + setEventMessages($bookmark->error, $bookmark->errors, 'errors'); } } @@ -72,7 +73,7 @@ $userstatic=new User($db); llxHeader(); -print_fiche_titre($langs->trans("Bookmarks")); +print load_fiche_titre($langs->trans("Bookmarks")); $sql = "SELECT b.fk_soc as rowid, b.dateb, b.rowid as bid, b.fk_user, b.url, b.target, b.title, b.favicon, b.position,"; $sql.= " u.login, u.lastname, u.firstname"; @@ -88,21 +89,23 @@ if ($resql) { $num = $db->num_rows($resql); $i = 0; + $param = ""; + if ($optioncss != '') $param ='&optioncss='.$optioncss; print ""; print ""; //print ""; - print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bid","","",'align="left"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bid","", $param,'align="left"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Title"),'',''); print ""; print_liste_field_titre($langs->trans("Link"),'',''); print ""; print_liste_field_titre($langs->trans("Target"),'','','','','align="center"'); print ""; - print_liste_field_titre($langs->trans("Owner"),$_SERVER["PHP_SELF"],"u.lastname","","",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"b.dateb","","",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Position"),$_SERVER["PHP_SELF"],"b.position","","",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Owner"),$_SERVER["PHP_SELF"],"u.lastname","", $param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"b.dateb","", $param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Position"),$_SERVER["PHP_SELF"],"b.position","", $param,'align="right"',$sortfield,$sortorder); print_liste_field_titre(''); print "\n"; @@ -215,7 +218,7 @@ if ($user->rights->bookmark->creer) print ''; - +llxFooter(); $db->close(); -llxFooter(); + diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index 48804958b20..de60e8b80cf 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -58,6 +58,7 @@ if (GETPOST('action','alpha') == 'set') $res = dolibarr_set_const($db,"CASHDESK_ID_WAREHOUSE",(GETPOST('CASHDESK_ID_WAREHOUSE','alpha') > 0 ? GETPOST('CASHDESK_ID_WAREHOUSE','alpha') : ''),'chaine',0,'',$conf->entity); $res = dolibarr_set_const($db,"CASHDESK_NO_DECREASE_STOCK",GETPOST('CASHDESK_NO_DECREASE_STOCK','alpha'),'chaine',0,'',$conf->entity); $res = dolibarr_set_const($db,"CASHDESK_SERVICES", GETPOST('CASHDESK_SERVICES','alpha'),'chaine',0,'',$conf->entity); + $res = dolibarr_set_const($db,"CASHDESK_DOLIBAR_RECEIPT_PRINTER", GETPOST('CASHDESK_DOLIBAR_RECEIPT_PRINTER','alpha'),'chaine',0,'',$conf->entity); dol_syslog("admin/cashdesk: level ".GETPOST('level','alpha')); @@ -66,12 +67,12 @@ if (GETPOST('action','alpha') == 'set') if (! $error) { $db->commit(); - setEventMessage($langs->trans("SetupSaved")); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { $db->rollback(); - setEventMessage($langs->trans("Error"), 'errors'); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -85,7 +86,7 @@ $formproduct=new FormProduct($db); llxHeader('',$langs->trans("CashDeskSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("CashDeskSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("CashDeskSetup"),$linkback,'title_setup'); print '
'; @@ -169,6 +170,17 @@ if (! empty($conf->service->enabled)) print "\n"; } +// Use Dolibarr Receipt Printer +if (! empty($conf->receiptprinter->enabled)) +{ + $var=! $var; + print '\n"; +} + print '
 
'; + print $langs->trans("DolibarrReceiptPrinter").' ('.$langs->trans("FeatureNotYetAvailable").')'; + print ''; + print $form->selectyesno("CASHDESK_DOLIBAR_RECEIPT_PRINTER",$conf->global->CASHDESK_DOLIBAR_RECEIPT_PRINTER,1); + print "
'; print '
'; @@ -176,6 +188,5 @@ print '
\n"; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php index 6d8f5ca83ee..3f27d19c7f3 100644 --- a/htdocs/cashdesk/affContenu.php +++ b/htdocs/cashdesk/affContenu.php @@ -56,6 +56,7 @@ exit;*/ // Left area with selected articles (area for article, amount and payments) +print '
'; print '
'; $page=GETPOST('menu','alpha'); @@ -78,16 +79,17 @@ else } print '
'; - +print '
'; // Right area with selected articles (shopping cart) +print '
'; print '
'; require ('tpl/liste_articles.tpl.php'); print '
'; - +print '
'; $_SESSION['serObjFacturation'] = serialize($obj_facturation); diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index 296ced0f172..fd67bf9e2ae 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -89,7 +89,7 @@ class Facturation */ public function ajoutArticle() { - global $conf,$db; + global $conf,$db,$mysoc; $thirdpartyid = $_SESSION['CASHDESK_ID_THIRDPARTY']; @@ -118,7 +118,7 @@ class Facturation } // Define part of HT, VAT, TTC - $resultarray=calcul_price_total($this->qte,$this->prix(),$this->remisePercent(),$vat_rate,0,0,0,'HT',0,$product->type,0); + $resultarray=calcul_price_total($this->qte,$this->prix(),$this->remisePercent(),$vat_rate,0,0,0,'HT',0,$product->type,$mysoc); // Calcul du total ht sans remise $total_ht = $resultarray[0]; diff --git a/htdocs/cashdesk/css/style.css b/htdocs/cashdesk/css/style.css index f62a9193830..bbb03bafde5 100644 --- a/htdocs/cashdesk/css/style.css +++ b/htdocs/cashdesk/css/style.css @@ -15,7 +15,7 @@ */ body { - background: #eee; + background: #fff; color: #333; margin: 0; padding: 0; @@ -30,9 +30,9 @@ p { .conteneur { background: #fff; text-align: left; - max-width: 770px; - margin: 10px auto; - border: 2px solid #000; + /*max-width: 770px;*/ + /*margin: 10px auto; + border: 2px solid #000;*/ } .conteneur_img_gauche { @@ -43,6 +43,11 @@ p { /* background: url("../img/bg_conteneur_droite.png") top right repeat-y; */ } +.contenu { + width: 100%; + text-align: center; +} + /* ------------------- Header ------------------- */ .entete { height: 15px; @@ -138,6 +143,7 @@ li.menu_choix0 { margin-right: 20px; border: 1px dotted #5ca64d; padding-bottom: 10px; + vertical-align: middle; } p.titre { @@ -192,8 +198,10 @@ p.titre { /* ------------------- Contenu ------------------- */ .principal_login { - margin: 30px; + margin: 10px; padding: 0; + max-width: 800px; + text-align: left; } .formulaire_login { @@ -221,8 +229,7 @@ p.titre { float: left; margin: 0 15px; padding: 0; - max-width: 500px; - width: 100%; + max-width: 900px; } .titre1 { @@ -330,7 +337,7 @@ p.titre { /* -------------- Boutons --------------------- */ .bouton_ajout_article { margin-top: 10px; - width: 100%; + width: 60%; height: 40px; } diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index fa1c6723d20..44d096ab478 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -60,10 +60,11 @@ top_htmlhead('','',0,0,'',$arrayofcss);

-'; + ?> +
diff --git a/htdocs/cashdesk/validation_ticket.php b/htdocs/cashdesk/validation_ticket.php index e6be818e3bc..577df309138 100644 --- a/htdocs/cashdesk/validation_ticket.php +++ b/htdocs/cashdesk/validation_ticket.php @@ -24,12 +24,19 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php'; require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php'; +include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); $obj_facturation = unserialize($_SESSION['serObjFacturation']); unset($_SESSION['serObjFacturation']); +$hookmanager->initHooks(array('cashdeskTplTicket')); -require ('tpl/ticket.tpl.php'); +$parameters=array(); +$reshook=$hookmanager->executeHooks('doActions',$parameters,$obj_facturation); +if (empty($reshook)) +{ + require ('tpl/ticket.tpl.php'); +} $_SESSION['serObjFacturation'] = serialize($obj_facturation); diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php index 23ebc01f3e2..d1af6bdafb2 100644 --- a/htdocs/categories/admin/categorie.php +++ b/htdocs/categories/admin/categorie.php @@ -47,7 +47,7 @@ if (preg_match('/set_(.*)/',$action,$reg)) } else { - setEventMessage($db->lasterror(),'errors'); + setEventMessages($db->lasterror(), null, 'errors'); } } @@ -61,7 +61,7 @@ if (preg_match('/del_(.*)/',$action,$reg)) } else { - setEventMessage($db->lasterror(),'errors'); + setEventMessages($db->lasterror(), null, 'errors'); } } @@ -77,7 +77,7 @@ $linkback=''.$langs->trans("BackToM llxHeader('',$langs->trans("Categories"),$help_url); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("CategoriesSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("CategoriesSetup"),$linkback,'title_setup'); $head=categoriesadmin_prepare_head(); @@ -121,5 +121,5 @@ print ''; print ''; -$db->close(); -llxFooter(); \ No newline at end of file +llxFooter(); +$db->close(); \ No newline at end of file diff --git a/htdocs/categories/admin/categorie_extrafields.php b/htdocs/categories/admin/categorie_extrafields.php index df31e07d95b..2bc9f205334 100644 --- a/htdocs/categories/admin/categorie_extrafields.php +++ b/htdocs/categories/admin/categorie_extrafields.php @@ -64,7 +64,7 @@ llxHeader('',$langs->trans("Categories"),$help_url); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("CategoriesSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("CategoriesSetup"),$linkback,'title_setup'); $head = categoriesadmin_prepare_head(); @@ -86,27 +86,27 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel - /* */ +/* Creation of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'create') { print "
"; - print_titre($langs->trans('NewAttribute')); + print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) { print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; } diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 814badf95a7..6281307218c 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -29,6 +29,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $langs->load("categories"); @@ -46,6 +47,7 @@ $urlfrom = GETPOST('urlfrom','alpha'); $socid=GETPOST('socid','int'); $label=GETPOST('label'); $description=GETPOST('description'); +$color=GETPOST('color'); $visible=GETPOST('visible'); $parent=GETPOST('parent'); @@ -124,6 +126,7 @@ if ($action == 'add' && $user->rights->categorie->creer) $object->label = $label; + $object->color = $color; $object->description = dol_htmlcleanlastbr($description); $object->socid = ($socid ? $socid : 'null'); $object->visible = $visible; @@ -137,7 +140,7 @@ if ($action == 'add' && $user->rights->categorie->creer) if (! $object->label) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Ref")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors'); $action = 'create'; } @@ -152,7 +155,7 @@ if ($action == 'add' && $user->rights->categorie->creer) } else { - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -210,6 +213,7 @@ if (($action == 'add' || $action == 'confirmed') && $user->rights->categorie->cr */ $form = new Form($db); +$formother = new FormOther($db); llxHeader("","",$langs->trans("Categories")); @@ -232,7 +236,7 @@ if ($user->rights->categorie->creer) if ($origin) print ''; if ($catorigin) print ''; - print_fiche_titre($langs->trans("CreateCat")); + print load_fiche_titre($langs->trans("CreateCat")); dol_fiche_head(''); @@ -250,6 +254,11 @@ if ($user->rights->categorie->creer) $doleditor->Create(); print ''; + // Color + print ''.$langs->trans("Color").''; + print $formother->selectColor($color,'color'); + print ''; + // Parent category print ''.$langs->trans("AddIn").''; print $form->select_all_categories($type, $catorigin); diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php index ee486b0370e..1775c14767d 100644 --- a/htdocs/categories/categorie.php +++ b/htdocs/categories/categorie.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2007 Rodolphe Quiedeville * Copyright (C) 2005 Brice Davoleau * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2006-2014 Laurent Destailleur + * Copyright (C) 2006-2015 Laurent Destailleur * Copyright (C) 2007 Patrick Raguin * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2013 Florian Henry @@ -151,8 +151,7 @@ if (empty($reshook)) $result=$cat->del_type($object,$elementtype); if ($result < 0) { - setEventMessage($cat->error,'errors'); - setEventMessage($cat->errors,'errors'); + setEventMessages($cat->error, $cat->errors, 'errors'); } } @@ -199,17 +198,17 @@ if (empty($reshook)) $result=$cat->add_type($object,$elementtype); if ($result >= 0) { - setEventMessage($langs->trans("WasAddedSuccessfully",$cat->label)); + setEventMessages($langs->trans("WasAddedSuccessfully",$cat->label), null, 'mesgs'); } else { if ($cat->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - setEventMessage($langs->trans("ObjectAlreadyLinkedToCategory"),'warnings'); + setEventMessages($langs->trans("ObjectAlreadyLinkedToCategory"), null, 'warnings'); } else { - setEventMessages( $cat->error, $cat->errors, 'errors' ); + setEventMessages($cat->error, $cat->errors, 'errors'); } } } @@ -641,7 +640,7 @@ function formCategory($db,$object,$typeid,$socid=0,$showclassifyform=1) } print '
'; - print_fiche_titre($title,$linktocreate,''); + print load_fiche_titre($title,$linktocreate,''); // Form to add record into a category if ($showclassifyform) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index f632492a59d..a35fc566ea1 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -112,10 +112,16 @@ class Categorie extends CommonObject public $element='category'; public $table_element='categories'; - var $id; var $fk_parent; var $label; var $description; + /** + * @var string Color + */ + var $color; + /** + * @var ??? + */ var $socid; /** * @var int Category type @@ -127,7 +133,6 @@ class Categorie extends CommonObject * @see Categorie::TYPE_CONTACT */ var $type; - var $import_key; var $cats=array(); // Tableau en memoire des categories var $motherof=array(); @@ -156,7 +161,7 @@ class Categorie extends CommonObject // Check parameters if (empty($id) && empty($label)) return -1; - $sql = "SELECT rowid, fk_parent, entity, label, description, fk_soc, visible, type"; + $sql = "SELECT rowid, fk_parent, entity, label, description, color, fk_soc, visible, type"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie"; if ($id) { @@ -180,6 +185,7 @@ class Categorie extends CommonObject $this->fk_parent = $res['fk_parent']; $this->label = $res['label']; $this->description = $res['description']; + $this->color = $res['color']; $this->socid = $res['fk_soc']; $this->visible = $res['visible']; $this->type = $res['type']; @@ -227,6 +233,7 @@ class Categorie extends CommonObject // Clean parameters $this->label = trim($this->label); $this->description = trim($this->description); + $this->color = trim($this->color); $this->import_key = trim($this->import_key); if (empty($this->visible)) $this->visible=0; $this->fk_parent = ($this->fk_parent != "" ? intval($this->fk_parent) : 0); @@ -245,6 +252,7 @@ class Categorie extends CommonObject $sql.= "fk_parent,"; $sql.= " label,"; $sql.= " description,"; + $sql.= " color,"; if (! empty($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER)) { $sql.= "fk_soc,"; @@ -257,6 +265,7 @@ class Categorie extends CommonObject $sql.= $this->fk_parent.","; $sql.= "'".$this->db->escape($this->label)."',"; $sql.= "'".$this->db->escape($this->description)."',"; + $sql.= "'".$this->db->escape($this->color)."',"; if (! empty($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER)) { $sql.= ($this->socid != -1 ? $this->socid : 'null').","; @@ -357,7 +366,8 @@ class Categorie extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."categorie"; $sql.= " SET label = '".$this->db->escape($this->label)."',"; - $sql.= " description = '".$this->db->escape($this->description)."'"; + $sql.= " description = '".$this->db->escape($this->description)."',"; + $sql.= " color = '".$this->db->escape($this->color)."'"; if (! empty($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER)) { $sql .= ", fk_soc = ".($this->socid != -1 ? $this->socid : 'null'); @@ -389,14 +399,13 @@ class Categorie extends CommonObject } else if ($reshook < 0) $error++; - $this->db->commit(); - - // Call trigger $result=$this->call_trigger('CATEGORY_MODIFY',$user); if ($result < 0) { $error++; $this->db->rollback(); return -1; } // End call triggers + $this->db->commit(); + return 1; } else @@ -562,14 +571,15 @@ class Categorie extends CommonObject if ($this->id == -1) return -2; // For backward compatibility - if ($type == 'societe') { + if ($type == 'societe') + { $type = 'customer'; - dol_syslog( get_class( $this ) . "::add_type(): type 'societe' is deprecated, please use 'customer' instead", - LOG_WARNING ); - } elseif ($type == 'fournisseur') { + dol_syslog(get_class($this) . "::add_type(): type 'societe' is deprecated, please use 'customer' instead", LOG_WARNING); + } + elseif ($type == 'fournisseur') + { $type = 'supplier'; - dol_syslog( get_class( $this ) . "::add_type(): type 'fournisseur' is deprecated, please use 'supplier' instead", - LOG_WARNING ); + dol_syslog(get_class($this) . "::add_type(): type 'fournisseur' is deprecated, please use 'supplier' instead", LOG_WARNING); } $this->db->begin(); @@ -876,7 +886,7 @@ class Categorie extends CommonObject $current_lang = $langs->getDefaultLang(); // Init $this->cats array - $sql = "SELECT DISTINCT c.rowid, c.label, c.description, c.fk_parent"; // Distinct reduce pb with old tables with duplicates + $sql = "SELECT DISTINCT c.rowid, c.label, c.description, c.color, c.fk_parent"; // Distinct reduce pb with old tables with duplicates if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= ", t.label as label_trans, t.description as description_trans"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie as c"; if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$current_lang."'"; @@ -895,6 +905,7 @@ class Categorie extends CommonObject $this->cats[$obj->rowid]['fk_parent'] = $obj->fk_parent; $this->cats[$obj->rowid]['label'] = ! empty($obj->label_trans) ? $obj->label_trans : $obj->label; $this->cats[$obj->rowid]['description'] = ! empty($obj->description_trans) ? $obj->description_trans : $obj->description; + $this->cats[$obj->rowid]['color'] = $obj->color; $i++; } } @@ -1294,7 +1305,7 @@ class Categorie extends CommonObject if (is_numeric( $type )) { // We want to reverse lookup $map_type = array_flip( $this->MAP_ID ); - $type = $map_type; + $type = $map_type[$type]; dol_syslog( get_class( $this ) . "::rechercher(): numeric types are deprecated, please use string instead", LOG_WARNING ); } @@ -1497,9 +1508,11 @@ class Categorie extends CommonObject /** * Update ou cree les traductions des infos produits * + * @param User $user Object user + * * @return int <0 if KO, >0 if OK */ - function setMultiLangs() + function setMultiLangs($user) { global $langs; @@ -1563,6 +1576,15 @@ class Categorie extends CommonObject } } } + + // Call trigger + $result = $this->call_trigger('CATEGORY_SET_MULTILANGS',$user); + if ($result < 0) { + $this->error = $this->db->lasterror(); + return -1; + } + // End call triggers + return 1; } diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index 98160cf9b6d..715547c3311 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -27,6 +27,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $langs->load("categories"); @@ -35,10 +36,12 @@ $ref=GETPOST('ref'); $type=GETPOST('type'); $action=GETPOST('action'); $confirm=GETPOST('confirm'); +$cancel=GETPOST('cancel'); $socid=GETPOST('socid','int'); $label=GETPOST('label'); $description=GETPOST('description'); +$color=GETPOST('color','alpha'); $visible=GETPOST('visible'); $parent=GETPOST('parent'); @@ -52,6 +55,10 @@ if ($id == "") $result = restrictedArea($user, 'categorie', $id, '&category'); $object = new Categorie($db); +if ($id > 0) +{ + $result=$object->fetch($id); +} $extrafields = new ExtraFields($db); $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); @@ -59,51 +66,56 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('categorycard')); + /* * Actions */ +if ($cancel) +{ + header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$object->id.'&type='.$type); + exit; +} + // Action mise a jour d'une categorie if ($action == 'update' && $user->rights->categorie->creer) { - $categorie = new Categorie($db); - $result=$categorie->fetch($id); - - $categorie->label = $label; - $categorie->description = dol_htmlcleanlastbr($description); - $categorie->socid = ($socid ? $socid : 'null'); - $categorie->visible = $visible; + $object->label = $label; + $object->description = dol_htmlcleanlastbr($description); + $object->color = $color; + $object->socid = ($socid ? $socid : 'null'); + $object->visible = $visible; if ($parent != "-1") - $categorie->fk_parent = $parent; + $object->fk_parent = $parent; else - $categorie->fk_parent = ""; + $object->fk_parent = ""; - if (empty($categorie->label)) + if (empty($object->label)) { $error++; $action = 'edit'; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors'); } - if (empty($categorie->error)) + if (! $error && empty($object->error)) { - $ret = $extrafields->setOptionalsFromPost($extralabels,$categorie); + $ret = $extrafields->setOptionalsFromPost($extralabels,$object); if ($ret < 0) $error++; - if (! $error && $categorie->update($user) > 0) + if (! $error && $object->update($user) > 0) { - header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$categorie->id.'&type='.$type); + header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$object->id.'&type='.$type); exit; } else { - setEventMessage($categorie->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else { - setEventMessage($categorie->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -114,10 +126,11 @@ if ($action == 'update' && $user->rights->categorie->creer) */ $form = new Form($db); +$formother = new FormOther($db); llxHeader("","",$langs->trans("Categories")); -print_fiche_titre($langs->trans("ModifCat")); +print load_fiche_titre($langs->trans("ModifCat")); $object->fetch($id); @@ -148,6 +161,13 @@ $doleditor=new DolEditor('description',$object->description,'',200,'dolibarr_not $doleditor->Create(); print ''; +// Color +print ''; +print ''.$langs->trans("Color").''; +print ''; +print $formother->selectColor($object->color, 'color'); +print ''; + // Parent category print ''.$langs->trans("In").''; print $form->select_all_categories($type,$object->fk_parent,'parent',64,$object->id); @@ -165,7 +185,7 @@ print ''; dol_fiche_end(); -print '
'; +print '
 
'; print ''; diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index b22b1989673..e57cd22d5fd 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -61,7 +61,7 @@ $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css') llxHeader('',$title,'','',0,0,$arrayofjs,$arrayofcss); -print_fiche_titre($title); +print load_fiche_titre($title); //print ''; //print ''; // Description -print ''; +// Color +print ''; + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook if (empty($reshook) && ! empty($extrafields->attribute_label)) { @@ -286,6 +294,7 @@ else print "
'; @@ -146,6 +146,7 @@ foreach($fulltree as $key => $val) { $categstatic->id=$val['id']; $categstatic->ref=$val['label']; + $categstatic->color=$val['color']; $categstatic->type=$type; $li=$categstatic->getNomUrl(1,'',60); $desc=dol_htmlcleanlastbr($val['description']); @@ -153,8 +154,8 @@ foreach($fulltree as $key => $val) $data[] = array( 'rowid'=>$val['rowid'], 'fk_menu'=>$val['fk_parent'], - 'entry'=>''. + 'entry'=>'
'.$li. - ''.dolGetFirstLineOfText($desc).'
'. + ''. ''. '
color?' style="background: #'.$categstatic->color.';"':' style="background: #aaa"').'>'.$li.''.dolGetFirstLineOfText($desc).''.img_view().'
' ); diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index 94570d48f3e..f3969793ef0 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -88,14 +88,14 @@ $cancel != $langs->trans("Cancel") && } // sauvegarde en base - if ( $object->setMultiLangs() > 0 ) + if ( $object->setMultiLangs($user) > 0 ) { $action = ''; } else { $action = 'add'; - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -121,14 +121,14 @@ $cancel != $langs->trans("Cancel") && } } - if ( $object->setMultiLangs() > 0 ) + if ( $object->setMultiLangs($user) > 0 ) { $action = ''; } else { $action = 'edit'; - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -158,10 +158,23 @@ print ''; // Reference print ''; -print ''; print ''; + +// Description +print ''; + print '
'.$langs->trans("Ref").''; -print $object->label; +print ''; +$ways = $object->print_all_ways(); +print $langs->trans("Ref").''; +print ''.$langs->trans("Root").' >> '; +foreach ($ways as $way) +{ + print $way."
\n"; +} print '
'; +print $langs->trans("Description").''; +print dol_htmlentitiesbr($object->description); +print '
'; if ($action == 'edit') diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 87d6dc57d63..3b5d0b64a86 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -1,6 +1,6 @@ - * Copyright (C) 2006-2010 Laurent Destailleur + * Copyright (C) 2006-2015 Laurent Destailleur * Copyright (C) 2007 Patrick Raguin * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Raphaël Doursenaud @@ -29,6 +29,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $langs->load("categories"); @@ -121,7 +122,7 @@ if ($user->rights->categorie->supprimer && $action == 'confirm_delete' && $confi } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -136,13 +137,13 @@ if ($type == Categorie::TYPE_PRODUCT && $elemid && $action == 'addintocategory' $result=$object->add_type($newobject,$elementtype); if ($result >= 0) { - setEventMessage($langs->trans("WasAddedSuccessfully",$newobject->ref)); + setEventMessages($langs->trans("WasAddedSuccessfully",$newobject->ref), null, 'mesgs'); } else { if ($cat->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - setEventMessage($langs->trans("ObjectAlreadyLinkedToCategory"),'warnings'); + setEventMessages($langs->trans("ObjectAlreadyLinkedToCategory"), null, 'warnings'); } else { @@ -159,6 +160,7 @@ if ($type == Categorie::TYPE_PRODUCT && $elemid && $action == 'addintocategory' */ $form = new Form($db); +$formother = new FormOther($db); llxHeader("","",$langs->trans("Categories")); @@ -197,11 +199,17 @@ foreach ($ways as $way) print '
'; +print '
'; print $langs->trans("Description").''; print dol_htmlentitiesbr($object->description); print '
'; +print $langs->trans("Color").''; +print $formother->showColor($object->color); +print '
\n"; } + // List of products or services (type is type of category) if ($object->type == Categorie::TYPE_PRODUCT) { @@ -331,7 +340,7 @@ if ($object->type == Categorie::TYPE_PRODUCT) $var=!$var; print "\t\n"; print ''; - print $prod->getNomUrl(1,'category'); + print $prod->getNomUrl(1); print "\n"; print ''.$prod->label."\n"; // Link to delete from category @@ -382,7 +391,7 @@ if ($object->type == Categorie::TYPE_SUPPLIER) print "\t\n"; print ''; - print $soc->getNomUrl(1,'category_supplier'); + print $soc->getNomUrl(1); print "\n"; // Link to delete from category print ''; @@ -436,7 +445,7 @@ if($object->type == Categorie::TYPE_CUSTOMER) $var=!$var; print "\t\n"; print ''; - print $soc->getNomUrl(1,'category'); + print $soc->getNomUrl(1); print "\n"; // Link to delete from category print ''; @@ -489,7 +498,7 @@ if ($object->type == Categorie::TYPE_MEMBER) print "\t\n"; print ''; $member->ref=$member->login; - print $member->getNomUrl(1,0,'category'); + print $member->getNomUrl(1,0); print "\n"; print ''.$member->lastname."\n"; print ''.$member->firstname."\n"; @@ -518,7 +527,7 @@ if ($object->type == Categorie::TYPE_MEMBER) } } -//Categorie contact +// Categorie contact if($object->type == Categorie::TYPE_CONTACT) { $contacts = $object->getObjectsInCateg("contact"); diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 32d5a34aa52..19633aa13d7 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -96,7 +96,7 @@ $hookmanager->initHooks(array('actioncard','globalcard')); /* * Actions */ - +$listUserAssignedUpdated = false; // Remove user to assigned list if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0') { @@ -114,6 +114,8 @@ if (GETPOST('removedassigned') || GETPOST('removedassigned') == '0') $donotclearsession=1; if ($action == 'add') $action = 'create'; if ($action == 'update') $action = 'edit'; + + $listUserAssignedUpdated = true; } // Add user to assigned list @@ -133,6 +135,8 @@ if (GETPOST('addassignedtouser') || GETPOST('updateassignedtouser')) $donotclearsession=1; if ($action == 'add') $action = 'create'; if ($action == 'update') $action = 'edit'; + + $listUserAssignedUpdated = true; } // Action clone object @@ -140,7 +144,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes') { if (1 == 0 && ! GETPOST('clone_content') && ! GETPOST('clone_receivers')) { - setEventMessage($langs->trans("NoCloneOptionsSpecified"), 'errors'); + setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { @@ -151,7 +155,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes') header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $result); exit(); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } } @@ -191,14 +195,14 @@ if ($action == 'add') { $error++; $donotclearsession=1; $action = 'create'; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), null, 'errors'); } if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && ! GETPOST('label')) { $error++; $donotclearsession=1; $action = 'create'; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Title")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Title")), null, 'errors'); } // Initialisation objet cactioncomm @@ -206,7 +210,7 @@ if ($action == 'add') { $error++; $donotclearsession=1; $action = 'create'; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); } else { @@ -289,20 +293,20 @@ if ($action == 'add') { $error++; $donotclearsession=1; $action = 'create'; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("ActionsOwnedBy")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ActionsOwnedBy")), null, 'errors'); } if ($object->type_code == 'AC_RDV' && ($datep == '' || ($datef == '' && empty($fulldayevent)))) { $error++; $donotclearsession=1; $action = 'create'; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), null, 'errors'); } if (! GETPOST('apyear') && ! GETPOST('adyear')) { $error++; $donotclearsession=1; $action = 'create'; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); } // Fill array 'array_options' with data from add form @@ -347,7 +351,7 @@ if ($action == 'add') $db->rollback(); $langs->load("errors"); $error=$langs->trans($object->error); - setEventMessage($error,'errors'); + setEventMessages($error, null, 'errors'); $action = 'create'; $donotclearsession=1; } } @@ -450,7 +454,7 @@ if ($action == 'update') { $error++; $donotclearsession=1; $action = 'edit'; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); } else { @@ -460,7 +464,7 @@ if ($action == 'update') { $error++; $donotclearsession=1; $action = 'edit'; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("ActionsOwnedBy")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ActionsOwnedBy")), null, 'errors'); } // Fill array 'array_options' with data from add form @@ -551,8 +555,7 @@ if ($action == 'mupdate') $result=$object->update($user); if ($result < 0) { - setEventMessage($object->error,'errors'); - setEventMessage($object->errors,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } if (! empty($backtopage)) @@ -636,8 +639,8 @@ if ($action == 'create') if ($backtopage) print ''; if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) print ''; - if (GETPOST("actioncode") == 'AC_RDV') print_fiche_titre($langs->trans("AddActionRendezVous")); - else print_fiche_titre($langs->trans("AddAnAction")); + if (GETPOST("actioncode") == 'AC_RDV') print load_fiche_titre($langs->trans("AddActionRendezVous")); + else print load_fiche_titre($langs->trans("AddAnAction")); dol_fiche_head(); @@ -647,7 +650,8 @@ if ($action == 'create') if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { print ''.$langs->trans("Type").''; - $formactions->select_type_actions(GETPOST("actioncode")?GETPOST("actioncode"):$object->type_code, "actioncode","systemauto"); + $default=(empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT)?'':$conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT); + $formactions->select_type_actions(GETPOST("actioncode")?GETPOST("actioncode"):($object->type_code?$object->type_code:$default), "actioncode", "systemauto", 0, -1); print ''; } @@ -715,8 +719,15 @@ if ($action == 'create') $listofuserid=json_decode($_SESSION['assignedtouser'], true); } } + print '
'; print $form->select_dolusers_forevent(($action=='create'?'add':'update'), 'assignedtouser', 1, '', 0, '', '', 0, 0, 0, 'AND u.statut != 0'); - if (in_array($user->id,array_keys($listofuserid))) print $langs->trans("MyAvailability").': '.$langs->trans("Busy"); + print '
'; + if (in_array($user->id,array_keys($listofuserid))) + { + print '
'; + print $langs->trans("MyAvailability").': '.$langs->trans("Busy"); + print '
'; + } print ''; // Realised by @@ -744,7 +755,7 @@ if ($action == 'create') { $events=array(); - $events[]=array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php',1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled')); + $events[]=array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1',1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled')); //For external user force the company to user company if (!empty($user->societe_id)) { print $form->select_thirdparty_list($user->societe_id,'socid','',1,1,0,$events); @@ -838,6 +849,28 @@ if ($id > 0) $result4=$object->fetch_userassigned(); $result5=$object->fetch_optionals($id,$extralabels); + if($listUserAssignedUpdated || $donotclearsession) { + + $datep=dol_mktime($fulldayevent?'00':$aphour, $fulldayevent?'00':$apmin, 0, $_POST["apmonth"], $_POST["apday"], $_POST["apyear"]); + $datef=dol_mktime($fulldayevent?'23':$p2hour, $fulldayevent?'59':$p2min, $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); + + $object->fk_action = dol_getIdFromCode($db, GETPOST("actioncode"), 'c_actioncomm'); + $object->label = GETPOST("label"); + $object->datep = $datep; + $object->datef = $datef; + $object->percentage = $percentage; + $object->priority = GETPOST("priority"); + $object->fulldayevent= GETPOST("fullday")?1:0; + $object->location = GETPOST('location'); + $object->socid = GETPOST("socid"); + $object->contactid = GETPOST("contactid",'int'); + //$object->societe->id = $_POST["socid"]; // deprecated + //$object->contact->id = $_POST["contactid"]; // deprecated + $object->fk_project = GETPOST("projectid",'int'); + + $object->note = GETPOST("note"); + } + if ($result1 < 0 || $result2 < 0 || $result3 < 0 || $result4 < 0 || $result5 < 0) { dol_print_error($db,$object->error); @@ -1026,8 +1059,16 @@ if ($id > 0) $listofuserid=json_decode($_SESSION['assignedtouser'], true); } } + + print '
'; print $form->select_dolusers_forevent(($action=='create'?'add':'update'), 'assignedtouser', 1, '', 0, '', '', 0, 0, 0, 'AND u.statut != 0'); - if (in_array($user->id,array_keys($listofuserid))) print $langs->trans("MyAvailability").': id]['transparency']?' checked':'').'>'.$langs->trans("Busy"); + print '
'; + if (in_array($user->id,array_keys($listofuserid))) + { + print '
'; + print $langs->trans("MyAvailability").': id]['transparency']?' checked':'').'>'.$langs->trans("Busy"); + print '
'; + } print ''; // Realised by @@ -1040,8 +1081,10 @@ if ($id > 0) print ''; + print '

'; + print ''; // Thirdparty - Contact @@ -1147,7 +1190,7 @@ if ($id > 0) } // Title - print ''; + print ''; // Full day event print ''; @@ -1205,8 +1248,15 @@ if ($id > 0) $listofuserid=json_decode($_SESSION['assignedtouser'], true); } } - print $form->select_dolusers_forevent('view','assignedtouser',1); - if (in_array($user->id,array_keys($listofuserid))) print $langs->trans("MyAvailability").': '.(($object->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody + print '
'; + print $form->select_dolusers_forevent('view', 'assignedtouser', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + print '
'; + if (in_array($user->id,array_keys($listofuserid))) + { + print '
'; + print $langs->trans("MyAvailability").': '.(($object->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody + print '
'; + } print ' '; // Done by diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index aa7d532025e..d4e56bb2715 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -107,7 +107,6 @@ class ActionComm extends CommonObject var $transparency; // Transparency (ical standard). Used to say if people assigned to event are busy or not by event. 0=available, 1=busy, 2=busy (refused events) var $priority; // Small int (0 By default) - var $note; // Description var $userassigned = array(); // Array of user ids var $userownerid; // Id of user owner = fk_user_action into table @@ -148,12 +147,6 @@ class ActionComm extends CommonObject */ var $contact; - /** - * Id of project (optional) - * @var int - */ - var $fk_project; - // Properties for links to other objects var $fk_element; // Id of record var $elementtype; // Type of record. This if property ->element of object linked to. @@ -164,7 +157,17 @@ class ActionComm extends CommonObject var $actions=array(); + // Fields for emails + var $email_msgid; + var $email_from; + var $email_sender; + var $email_to; + var $email_tocc; + var $email_tobcc; + var $email_subject; + var $errors_to; + /** * Constructor * @@ -196,6 +199,7 @@ class ActionComm extends CommonObject // Check parameters if (empty($this->userownerid)) { + dol_syslog("You tried to create an event but mandatory property ownerid was not defined", LOG_WARNING); $this->errors[]='ErrorPropertyUserowneridNotDefined'; return -1; } @@ -227,7 +231,7 @@ class ActionComm extends CommonObject $this->userassigned[$tmpid]=array('id'=>$tmpid); } - if (is_object($this->contact) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated + if (is_object($this->contact) && isset($this->contact->id) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated $userownerid=$this->userownerid; @@ -409,14 +413,28 @@ class ActionComm extends CommonObject $this->db->begin(); - // Load source object - $objFrom = dol_clone($this); + // Load source object + $objFrom = clone $this; $this->fetch_optionals(); $this->fetch_userassigned(); $this->id=0; + if (!is_object($fuser)) + { + if ($fuser > 0) + { + $u = new User($db); + $u->fetch($fuser); + $fuser = $u; + } + else + { + $fuser = $user; + } + } + // Create clone $result=$this->add($fuser); if ($result < 0) $error++; @@ -840,7 +858,7 @@ class ActionComm extends CommonObject if (! empty($elementtype)) { if ($elementtype == 'project') $sql.= ' AND a.fk_project = '.$fk_element; - else $sql.= " AND a.fk_element = ".$fk_element." AND a.elementtype = '".$elementtype."'"; + else $sql.= " AND a.fk_element = ".(int) $fk_element." AND a.elementtype = '".$elementtype."'"; } if (! empty($filter)) $sql.= $filter; if ($sortorder && $sortfield) $sql.=$db->order($sortfield, $sortorder); @@ -878,7 +896,7 @@ class ActionComm extends CommonObject */ function load_board($user) { - global $conf, $user, $langs; + global $conf, $langs; $sql = "SELECT a.id, a.datep as dp"; $sql.= " FROM (".MAIN_DB_PREFIX."actioncomm as a"; @@ -894,10 +912,10 @@ class ActionComm extends CommonObject $resql=$this->db->query($sql); if ($resql) { - $now = dol_now(); + $agenda_static = new ActionComm($this->db); $response = new WorkboardResponse(); - $response->warning_delay = $conf->actions->warning_delay/60/60/24; + $response->warning_delay = $conf->agenda->warning_delay/60/60/24; $response->label = $langs->trans("ActionsToDo"); $response->url = DOL_URL_ROOT.'/comm/action/listactions.php?status=todo&mainmenu=agenda'; $response->img = img_object($langs->trans("Actions"),"action"); @@ -907,7 +925,9 @@ class ActionComm extends CommonObject { $response->nbtodo++; - if (isset($obj->dp) && $this->db->jdate($obj->dp) < ($now - $conf->actions->warning_delay)) { + $agenda_static->datep = $this->db->jdate($obj->dp); + + if ($agenda_static->hasDelay()) { $response->nbtodolate++; } } @@ -1373,5 +1393,19 @@ class ActionComm extends CommonObject return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); } + /** + * Is the action delayed? + * + * @return bool + */ + public function hasDelay() + { + global $conf; + + $now = dol_now(); + + return $this->datep && ($this->datep < ($now - $conf->agenda->warning_delay)); + } + } diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 56465d45fdb..5e14b45665b 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -99,13 +99,14 @@ class CActionComm /** * Return list of event types: array(id=>label) or array(code=>label) * - * @param string|int $active 1 or 0 to filter on event state active or not ('' by default = no filter) + * @param string|int $active 1 or 0 to filter on event state active or not ('' by default = no filter) * @param string $idorcode 'id' or 'code' - * @param string $excludetype Type to exclude - * @param int $onlyautoornot Group list by auto events or not + * @param string $excludetype Type to exclude ('system' or 'systemauto') + * @param int $onlyautoornot 1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type + * @param string $morefilter Add more SQL filter * @return mixed Array of all event types if OK, <0 if KO */ - function liste_array($active='',$idorcode='id',$excludetype='',$onlyautoornot=0) + function liste_array($active='',$idorcode='id',$excludetype='',$onlyautoornot=0, $morefilter='') { global $langs,$conf; $langs->load("commercial"); @@ -115,8 +116,10 @@ class CActionComm $sql = "SELECT id, code, libelle, module, type, color"; $sql.= " FROM ".MAIN_DB_PREFIX."c_actioncomm"; - if ($active != '') $sql.=" WHERE active=".$active; - if (! empty($excludetype)) $sql.=($active != ''?" AND":" WHERE")." type <> '".$excludetype."'"; + $sql.= " WHERE 1=1"; + if ($active != '') $sql.=" AND active=".$active; + if (! empty($excludetype)) $sql.=" AND type <> '".$excludetype."'"; + if ($morefilter) $sql.=" AND ".$morefilter; $sql.= " ORDER BY module, position"; dol_syslog(get_class($this)."::liste_array", LOG_DEBUG); diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index d45a18e3e8c..992c2314446 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -195,8 +195,15 @@ if ($object->id > 0) $listofuserid=json_decode($_SESSION['assignedtouser'], true); } } - print $form->select_dolusers_forevent('view','assignedtouser',1); - if (in_array($user->id,array_keys($listofuserid))) print $langs->trans("MyAvailability").': '.(($object->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody + print '
'; + print $form->select_dolusers_forevent('view', 'assignedtouser', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + print '
'; + if (in_array($user->id,array_keys($listofuserid))) + { + print '
'; + print $langs->trans("MyAvailability").': '.(($object->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody + print '
'; + } print ' '; print '
'.$langs->trans("Title").''.$object->label.'
'.$langs->trans("Title").''.dol_htmlentities($object->label).'
'.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent, 3).'


'; diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 5366720bfc6..c894647bb29 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -58,7 +58,7 @@ $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page","int"); if ($page == -1) { $page = 0; } -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page; if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="a.datec"; @@ -87,9 +87,18 @@ $pid=GETPOST("projectid","int",3); $status=GETPOST("status"); $type=GETPOST("type"); $maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); -$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':''); +// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) +if (GETPOST('actioncode','array')) +{ + $actioncode=GETPOST('actioncode','array',3); + if (! count($actioncode)) $actioncode='0'; +} +else +{ + $actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE)); +} +if ($actioncode == '' && empty($actioncodearray)) $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE); -if ($actioncode == '') $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE); if ($status == '' && ! isset($_GET['status']) && ! isset($_POST['status'])) $status=(empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS)?'':$conf->global->AGENDA_DEFAULT_FILTER_STATUS); if (empty($action) && ! isset($_GET['action']) && ! isset($_POST['action'])) $action=(empty($conf->global->AGENDA_DEFAULT_VIEW)?'show_month':$conf->global->AGENDA_DEFAULT_VIEW); @@ -296,28 +305,28 @@ $param.="&maxprint=".$maxprint; // Show navigation bar if (empty($action) || $action=='show_month') { - $nav ="".img_previous($langs->trans("Previous"))."\n"; + $nav ="".img_previous($langs->trans("Previous"), 'class="valignbottom"')."\n"; $nav.=" ".dol_print_date(dol_mktime(0,0,0,$month,1,$year),"%b %Y"); $nav.=" \n"; - $nav.="".img_next($langs->trans("Next"))."\n"; + $nav.="".img_next($langs->trans("Next"), 'class="valignbottom"')."\n"; $nav.="   (".$langs->trans("Today").")"; $picto='calendar'; } if ($action=='show_week') { - $nav ="".img_previous($langs->trans("Previous"))."\n"; + $nav ="".img_previous($langs->trans("Previous"), 'class="valignbottom"')."\n"; $nav.=" ".dol_print_date(dol_mktime(0,0,0,$first_month,$first_day,$first_year),"%Y").", ".$langs->trans("Week")." ".$week; $nav.=" \n"; - $nav.="".img_next($langs->trans("Next"))."\n"; + $nav.="".img_next($langs->trans("Next"), 'class="valignbottom"')."\n"; $nav.="   (".$langs->trans("Today").")"; $picto='calendarweek'; } if ($action=='show_day') { - $nav ="".img_previous($langs->trans("Previous"))."\n"; + $nav ="".img_previous($langs->trans("Previous"), 'class="valignbottom"')."\n"; $nav.=" ".dol_print_date(dol_mktime(0,0,0,$month,$day,$year),"daytextshort"); $nav.=" \n"; - $nav.="".img_next($langs->trans("Next"))."\n"; + $nav.="".img_next($langs->trans("Next"), 'class="valignbottom"')."\n"; $nav.="   (".$langs->trans("Today").")"; $picto='calendarday'; } @@ -414,7 +423,7 @@ else // If javascript off $link.=''; } -print_fiche_titre($s, $link.'     '.$nav, ''); +print load_fiche_titre($s, $link.'     '.$nav, ''); // Load events from database into $eventarray @@ -437,7 +446,7 @@ if ($filtert > 0 || $usergroup > 0) $sql.=", ".MAIN_DB_PREFIX."actioncomm_resour if ($usergroup > 0) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_user = ar.fk_element"; $sql.= ' WHERE a.fk_action = ca.id'; $sql.= ' AND a.entity IN ('.getEntity('agenda', 1).')'; -if ($actioncode) $sql.=" AND ca.code='".$db->escape($actioncode)."'"; +if ($actioncode) $sql.=" AND ca.code IN ('".implode("','", explode(',',$actioncode))."')"; if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid); if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")"; if ($socid > 0) $sql.= ' AND a.fk_soc = '.$socid; @@ -900,7 +909,7 @@ if (count($listofextcals)) $daykey=dol_mktime(0,0,0,$mois,$jour,$annee); $daykeygmt=dol_mktime(0,0,0,$mois,$jour,$annee,true,0); do - { + { //if ($event->fulldayevent) print dol_print_date($daykeygmt,'dayhour','gmt').'-'.dol_print_date($daykey,'dayhour','gmt').'-'.dol_print_date($event->date_end_in_calendar,'dayhour','gmt').' '; $eventarray[$daykey][]=$event; $daykey+=60*60*24; $daykeygmt+=60*60*24; // Add one day @@ -949,7 +958,7 @@ if (empty($action) || $action == 'show_month') // View by month $newparam=preg_replace('/viewcal=[0-9]+&?/i','',$newparam); $newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter $newparam.='&viewcal=1'; - echo '
'; + echo '
'; echo ' '; $i=0; while ($i < 7) @@ -1026,7 +1035,7 @@ elseif ($action == 'show_week') // View by week $newparam=preg_replace('/viewweek=[0-9]+&?/i','',$newparam); $newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter $newparam.='&viewweek=1'; - echo '
'; + echo '
'; echo ' '; $i=0; while ($i < 7) @@ -1083,7 +1092,7 @@ else // View by day $timestamp=dol_mktime(12,0,0,$month,$day,$year); $arraytimestamp=dol_getdate($timestamp); - echo '
'; + echo '
'; echo ' '; echo ' \n"; echo " \n"; @@ -1169,14 +1178,14 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa // Line with td contains all div of each events print '
'.$langs->trans("Day".$arraytimestamp['wday'])."
'; - print '
'; + print '
'; //$curtime = dol_mktime (0, 0, 0, $month, $day, $year); $i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array(); $ymd=sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day); $nextindextouse=count($colorindexused); // At first run this is 0, so fist user has 0, next 1, ... - //print $nextindextouse; + //print $nextindextouse; foreach ($eventarray as $daykey => $notused) { @@ -1189,23 +1198,23 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa { if ($i < $maxprint || $maxprint == 0 || ! empty($conf->global->MAIN_JS_SWITCH_AGENDA)) { - $keysofuserassigned=array_keys($event->userassigned); + $keysofuserassigned=array_keys($event->userassigned); - $ponct=($event->date_start_in_calendar == $event->date_end_in_calendar); + $ponct=($event->date_start_in_calendar == $event->date_end_in_calendar); // Define $color (Hex string like '0088FF') and $cssclass of event $color=-1; $colorindex=-1; - if (in_array($user->id, $keysofuserassigned)) - { - $nummytasks++; $cssclass='family_mytasks'; + if (in_array($user->id, $keysofuserassigned)) + { + $nummytasks++; $cssclass='family_mytasks'; - if (empty($cacheusers[$event->userownerid])) - { - $newuser=new User($db); - $newuser->fetch($event->userownerid); - $cacheusers[$event->userownerid]=$newuser; - } - //var_dump($cacheusers[$event->userownerid]->color); + if (empty($cacheusers[$event->userownerid])) + { + $newuser=new User($db); + $newuser->fetch($event->userownerid); + $cacheusers[$event->userownerid]=$newuser; + } + //var_dump($cacheusers[$event->userownerid]->color); // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) if (! empty($cacheusers[$event->userownerid]->color)) $color=$cacheusers[$event->userownerid]->color; @@ -1219,7 +1228,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa } $numicals[dol_string_nospecial($event->icalname)]++; } - $color=$event->icalcolor; + $color=($event->icalcolor?$event->icalcolor:-1); $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other'); } else if ($event->type_code == 'BIRTHDAY') @@ -1227,20 +1236,22 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $numbirthday++; $colorindex=2; $cssclass='family_birthday unmovable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); } else - { - $numother++; $cssclass='family_other'; + { + $numother++; + $color=($event->icalcolor?$event->icalcolor:-1); + $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other'); - if (empty($cacheusers[$event->userownerid])) - { - $newuser=new User($db); - $newuser->fetch($event->userownerid); - $cacheusers[$event->userownerid]=$newuser; - } - //var_dump($cacheusers[$event->userownerid]->color); + if (empty($cacheusers[$event->userownerid])) + { + $newuser=new User($db); + $newuser->fetch($event->userownerid); + $cacheusers[$event->userownerid]=$newuser; + } + //var_dump($cacheusers[$event->userownerid]->color); // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) if (! empty($cacheusers[$event->userownerid]->color)) $color=$cacheusers[$event->userownerid]->color; - } + } if ($color == -1) // Color was not forced. Set color according to color index. { // Define color index if not yet defined @@ -1251,14 +1262,14 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa } else { - $colorindex=$nextindextouse; - $colorindexused[$idusertouse]=$colorindex; + $colorindex=$nextindextouse; + $colorindexused[$idusertouse]=$colorindex; if (! empty($theme_datacolor[$nextindextouse+1])) $nextindextouse++; // Prepare to use next color } //print '|'.($color).'='.($idusertouse?$idusertouse:0).'='.$colorindex.'
'; - // Define color + // Define color $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); - } + } $cssclass=$cssclass.' '.$cssclass.'_day_'.$ymd; // Defined style to disable drag and drop feature diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index 93881b35564..7c2001d925d 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -64,6 +64,5 @@ print '
'; print '
'; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 977a91a404a..ed8227a1cb8 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -39,16 +39,25 @@ $action=GETPOST('action','alpha'); $year=GETPOST("year",'int'); $month=GETPOST("month",'int'); $day=GETPOST("day",'int'); -$actioncode=GETPOST("actioncode","alpha",3); $pid=GETPOST("projectid",'int',3); $status=GETPOST("status",'alpha'); $type=GETPOST('type'); -$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_USE_EVENT_TYPE)?'AC_OTH':'')); +$optioncss = GETPOST('optioncss','alpha'); +// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) +if (GETPOST('actioncode','array')) +{ + $actioncode=GETPOST('actioncode','array',3); + if (! count($actioncode)) $actioncode='0'; +} +else +{ + $actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE)); +} +if ($actioncode == '' && empty($actioncodearray)) $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE); + $dateselect=dol_mktime(0, 0, 0, GETPOST('dateselectmonth'), GETPOST('dateselectday'), GETPOST('dateselectyear')); $datestart=dol_mktime(0, 0, 0, GETPOST('datestartmonth'), GETPOST('datestartday'), GETPOST('datestartyear')); $dateend=dol_mktime(0, 0, 0, GETPOST('dateendmonth'), GETPOST('dateendday'), GETPOST('dateendyear')); - -if ($actioncode == '') $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE); if ($status == '' && ! isset($_GET['status']) && ! isset($_POST['status'])) $status=(empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS)?'':$conf->global->AGENDA_DEFAULT_FILTER_STATUS); if (empty($action) && ! isset($_GET['action']) && ! isset($_POST['action'])) $action=(empty($conf->global->AGENDA_DEFAULT_VIEW)?'show_month':$conf->global->AGENDA_DEFAULT_VIEW); @@ -63,11 +72,11 @@ if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS)) $filtert=$user->id; } +$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); if ($page == -1) { $page = 0 ; } -$limit = $conf->liste_limit; $offset = $limit * $page ; if (! $sortorder) { @@ -133,19 +142,8 @@ $form=new Form($db); $userstatic=new User($db); $nav=''; -$nav.='
'; -if ($actioncode || isset($_GET['actioncode']) || isset($_POST['actioncode'])) $nav.=''; -if ($status || isset($_GET['status']) || isset($_POST['status'])) $nav.=''; -if ($filter) $nav.=''; -if ($filtert) $nav.=''; -if ($socid) $nav.=''; -if ($showbirthday) $nav.=''; -if ($pid) $nav.=''; -if ($type) $nav.=''; -if ($usergroup) $nav.=''; $nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); $nav.=' '; -$nav.='
'; $now=dol_now(); @@ -156,7 +154,8 @@ llxHeader('',$langs->trans("Agenda"),$help_url); $listofextcals=array(); $param=''; -if ($actioncode || isset($_GET['actioncode']) || isset($_POST['actioncode'])) $param.="&actioncode=".$actioncode; +if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; +if ($actioncode != '') $param.="&actioncode=".$actioncode; if ($status || isset($_GET['status']) || isset($_POST['status'])) $param.="&status=".$status; if ($filter) $param.="&filter=".$filter; if ($filtert) $param.="&filtert=".$filtert; @@ -165,6 +164,7 @@ if ($showbirthday) $param.="&showbirthday=1"; if ($pid) $param.="&projectid=".$pid; if ($type) $param.="&type=".$type; if ($usergroup) $param.="&usergroup=".$usergroup; +if ($optioncss != '') $param.='&optioncss='.$optioncss; $sql = "SELECT"; if ($usergroup > 0) $sql.=" DISTINCT"; @@ -183,7 +183,7 @@ if ($filtert > 0 || $usergroup > 0) $sql.=", ".MAIN_DB_PREFIX."actioncomm_resour if ($usergroup > 0) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_user = ar.fk_element"; $sql.= " WHERE c.id = a.fk_action"; $sql.= ' AND a.entity IN ('.getEntity('agenda', 1).')'; -if ($actioncode) $sql.=" AND c.code='".$db->escape($actioncode)."'"; +if ($actioncode) $sql.=" AND c.code IN ('".$db->escape($actioncode)."')"; if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid); if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")"; if ($socid > 0) $sql.= " AND s.rowid = ".$socid; @@ -209,6 +209,14 @@ if ($dateselect > 0) $sql.= " AND ((a.datep2 >= '".$db->idate($dateselect)."' AN if ($datestart > 0) $sql.= " AND a.datep BETWEEN '".$db->idate($datestart)."' AND '".$db->idate($datestart+3600*24-1)."'"; if ($dateend > 0) $sql.= " AND a.datep2 BETWEEN '".$db->idate($dateend)."' AND '".$db->idate($dateend+3600*24-1)."'"; $sql.= $db->order($sortfield,$sortorder); + +$nbtotalofrecords = 0; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); +} + $sql.= $db->plimit($limit + 1, $offset); //print $sql; @@ -268,15 +276,34 @@ if ($resql) $s = $hookmanager->resPrint; } - print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $link, $num, 0, '', 0, $nav); + print '
'."\n"; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $nav=''; + if ($optioncss != '') $nav.= ''; + if ($actioncode) $nav.=''; + if ($status || isset($_GET['status']) || isset($_POST['status'])) $nav.=''; + if ($filter) $nav.=''; + if ($filtert) $nav.=''; + if ($socid) $nav.=''; + if ($showbirthday) $nav.=''; + if ($pid) $nav.=''; + if ($usergroup) $nav.=''; + print $nav; + + print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $link, $num, -1 * $nbtotalofrecords, '', 0, $nav, '', $limit); - print ''."\n"; - - $i = 0; + $i = 0; print ''; print ''; print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"a.label",$param,"","",$sortfield,$sortorder); + if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle",$param,"","",$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateStart"),$_SERVER["PHP_SELF"],"a.datep",$param,'','align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateEnd"),$_SERVER["PHP_SELF"],"a.datep2",$param,'','align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom",$param,"","",$sortfield,$sortorder); @@ -287,6 +314,11 @@ if ($resql) print ''; print ''; + if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) + { + print ''; + //print ''; + } print ''; @@ -306,6 +338,10 @@ if ($resql) $now=dol_now(); $delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60; + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; + $caction=new CActionComm($db); + $arraylist=$caction->liste_array(1, 'code', '', (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0)); + $var=true; while ($i < min($num,$limit)) { @@ -331,6 +367,13 @@ if ($resql) print $actionstatic->getNomUrl(1,28); print ''; + if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) + { + $labeltype=$obj->type_code; + if (! empty($arraylist[$labeltype])) $labeltype=$arraylist[$labeltype]; + print ''; + } + // Start date print ''; + } +} diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 5f8ce1563de..35b89ff129d 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -55,7 +55,7 @@ $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page","int"); if ($page == -1) { $page = 0; } -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page; if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="a.datec"; @@ -85,7 +85,17 @@ $pid=GETPOST("projectid","int",3); $status=GETPOST("status"); $type=GETPOST("type"); $maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); -$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':''); +// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) +if (GETPOST('actioncode','array')) +{ + $actioncode=GETPOST('actioncode','array',3); + if (! count($actioncode)) $actioncode='0'; +} +else +{ + $actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE)); +} +if ($actioncode == '' && empty($actioncodearray)) $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE); $dateselect=dol_mktime(0, 0, 0, GETPOST('dateselectmonth'), GETPOST('dateselectday'), GETPOST('dateselectyear')); if ($dateselect > 0) @@ -111,7 +121,6 @@ if ($begin_d < 1 || $begin_d > 7) $begin_d = 1; if ($end_d < 1 || $end_d > 7) $end_d = 7; if ($end_d < $begin_d) $end_d = $begin_d + 1; -if ($actioncode == '') $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE); if ($status == '' && ! isset($_GET['status']) && ! isset($_POST['status'])) $status=(empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS)?'':$conf->global->AGENDA_DEFAULT_FILTER_STATUS); if (empty($action) && ! isset($_GET['action']) && ! isset($_POST['action'])) $action=(empty($conf->global->AGENDA_DEFAULT_VIEW)?'show_month':$conf->global->AGENDA_DEFAULT_VIEW); @@ -233,10 +242,10 @@ $max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year)); $tmpday = $first_day; -$nav ="".img_previous($langs->trans("Previous"))."\n"; +$nav ="".img_previous($langs->trans("Previous"), 'class="valignbottom"')."\n"; $nav.=" ".dol_print_date(dol_mktime(0,0,0,$first_month,$first_day,$first_year),"%Y").", ".$langs->trans("Week")." ".$week; $nav.=" \n"; -$nav.="".img_next($langs->trans("Next"))."\n"; +$nav.="".img_next($langs->trans("Next"), 'class="valignbottom"')."\n"; $nav.="   (".$langs->trans("Today").")"; $picto='calendarweek'; @@ -337,7 +346,7 @@ if ($conf->use_javascript_ajax) $link=''; -print_fiche_titre($s, $link.'     '.$nav, ''); +print load_fiche_titre($s, $link.'     '.$nav, ''); // Get event in an array @@ -677,7 +686,7 @@ else // Load array of colors by type $colorsbytype=array(); $labelbytype=array(); -$sql="SELECT code, color, libelle FROM ".MAIN_DB_PREFIX."c_actioncomm"; +$sql="SELECT code, color, libelle FROM ".MAIN_DB_PREFIX."c_actioncomm ORDER BY position"; $resql=$db->query($sql); while ($obj = $db->fetch_object($resql)) { diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 24eb117684f..e62af271c49 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Eric Seigne - * Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -37,11 +37,11 @@ $action=GETPOST('action','alpha'); $month=GETPOST('month'); $year=GETPOST('year'); +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); if ($page == -1) { $page = 0 ; } -$limit = $conf->liste_limit; $offset = $limit * $page ; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="a.datep"; @@ -62,7 +62,7 @@ if ($action == 'builddoc') $result=$cat->write_file(GETPOST('id','int')); if ($result < 0) { - setEventMessage($cat->error, 'errors'); + setEventMessages($cat->error, $cat->errors, 'errors'); } } @@ -84,6 +84,14 @@ $sql.= ' AND a.entity IN ('.getEntity('agenda', 1).')'; //$sql.= " AND percent = 100"; $sql.= " GROUP BY year, month, df"; $sql.= " ORDER BY year DESC, month DESC, df DESC"; + +$nbtotalofrecords = 0; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); +} + $sql.= $db->plimit($limit+1,$offset); //print $sql; @@ -93,7 +101,18 @@ if ($resql) { $num = $db->num_rows($resql); - print_barre_liste($langs->trans("Actions"), $page, $_SERVER["PHP_SELF"],'',$sortfield,$sortorder,'',$num); + $param=''; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + + print '
'; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + print_barre_liste($langs->trans("Actions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit); $i = 0; print '
'; print $form->select_date($datestart, 'datestart', 0, 0, 1, '', 1, 0, 1); print ''.dol_trunc($labeltype,24).''; print dol_print_date($db->jdate($obj->dp),"dayhour"); diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php new file mode 100644 index 00000000000..28a531c6b28 --- /dev/null +++ b/htdocs/comm/action/pertype.php @@ -0,0 +1,975 @@ + + * Copyright (C) 2003 Eric Seigne + * Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2014 Cedric GROSS + * + * 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 3 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, see . + */ + + +/** + * \file htdocs/comm/action/pertype.php + * \ingroup agenda + * \brief Tab of calendar events per type + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; +require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; +if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; + + +if (! isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW=3; + +$filter=GETPOST("filter",'',3); +$filtert = GETPOST("usertodo","int",3)?GETPOST("usertodo","int",3):GETPOST("filtert","int",3); +$usergroup = GETPOST("usergroup","int",3); +//if (! ($usergroup > 0) && ! ($filtert > 0)) $filtert = $user->id; +//$showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; +$showbirthday = 0; + +// If not choice done on calendar owner, we filter on user. +if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS)) +{ + $filtert=$user->id; +} + +$sortfield = GETPOST("sortfield",'alpha'); +$sortorder = GETPOST("sortorder",'alpha'); +$page = GETPOST("page","int"); +if ($page == -1) { $page = 0; } +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; +$offset = $limit * $page; +if (! $sortorder) $sortorder="ASC"; +if (! $sortfield) $sortfield="a.datec"; + +// Security check +$socid = GETPOST("socid","int"); +if ($user->societe_id) $socid=$user->societe_id; +$result = restrictedArea($user, 'agenda', 0, '', 'myactions'); +if ($socid < 0) $socid=''; + +$canedit=1; +if (! $user->rights->agenda->myactions->read) accessforbidden(); +if (! $user->rights->agenda->allactions->read) $canedit=0; +if (! $user->rights->agenda->allactions->read || $filter =='mine') // If no permission to see all, we show only affected to me +{ + $filtert=$user->id; +} + +//$action=GETPOST('action','alpha'); +$action='show_pertype'; +//$year=GETPOST("year"); +$year=GETPOST("year","int")?GETPOST("year","int"):date("Y"); +$month=GETPOST("month","int")?GETPOST("month","int"):date("m"); +$week=GETPOST("week","int")?GETPOST("week","int"):date("W"); +$day=GETPOST("day","int")?GETPOST("day","int"):date("d"); +$pid=GETPOST("projectid","int",3); +$status=GETPOST("status"); +$type=GETPOST("type"); +$maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); +// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) +if (GETPOST('actioncode','array')) +{ + $actioncode=GETPOST('actioncode','array',3); + if (! count($actioncode)) $actioncode='0'; +} +else +{ + $actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE)); +} +if ($actioncode == '' && empty($actioncodearray)) $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE); + +$dateselect=dol_mktime(0, 0, 0, GETPOST('dateselectmonth'), GETPOST('dateselectday'), GETPOST('dateselectyear')); +if ($dateselect > 0) +{ + $day=GETPOST('dateselectday'); + $month=GETPOST('dateselectmonth'); + $year=GETPOST('dateselectyear'); +} + +$tmp=empty($conf->global->MAIN_DEFAULT_WORKING_HOURS)?'9-18':$conf->global->MAIN_DEFAULT_WORKING_HOURS; +$tmparray=explode('-',$tmp); +$begin_h = GETPOST('begin_h')!=''?GETPOST('begin_h','int'):($tmparray[0] != '' ? $tmparray[0] : 9); +$end_h = GETPOST('end_h')?GETPOST('end_h'):($tmparray[1] != '' ? $tmparray[1] : 18); +if ($begin_h < 0 || $begin_h > 23) $begin_h = 9; +if ($end_h < 1 || $end_h > 24) $end_h = 18; +if ($end_h <= $begin_h) $end_h = $begin_h + 1; + +$tmp=empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)?'1-5':$conf->global->MAIN_DEFAULT_WORKING_DAYS; +$tmparray=explode('-',$tmp); +$begin_d = 1; +$end_d = 53; + +if ($status == '' && ! isset($_GET['status']) && ! isset($_POST['status'])) $status=(empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS)?'':$conf->global->AGENDA_DEFAULT_FILTER_STATUS); +if (empty($action) && ! isset($_GET['action']) && ! isset($_POST['action'])) $action=(empty($conf->global->AGENDA_DEFAULT_VIEW)?'show_month':$conf->global->AGENDA_DEFAULT_VIEW); + +if (GETPOST('viewcal') && $action != 'show_day' && $action != 'show_week' && $action != 'show_peruser') { + $action='show_month'; $day=''; +} // View by month +if (GETPOST('viewweek') || $action == 'show_week') { + $action='show_week'; $week=($week?$week:date("W")); $day=($day?$day:date("d")); +} // View by week +if (GETPOST('viewday') || $action == 'show_day') { + $action='show_day'; $day=($day?$day:date("d")); +} // View by day +if (GETPOST('viewyear') || $action == 'show_year') { + $action='show_year'; +} // View by year + + +$langs->load("users"); +$langs->load("agenda"); +$langs->load("other"); +$langs->load("commercial"); + +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('agenda')); + + +/* + * Actions + */ + +if ($action =='delete_action') +{ + $event = new ActionComm($db); + $event->fetch($actionid); + $result=$event->delete(); +} + + + +/* + * View + */ + +$help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda'; +llxHeader('',$langs->trans("Agenda"),$help_url); + +$form=new Form($db); +$companystatic=new Societe($db); + +$now=dol_now(); +$nowarray=dol_getdate($now); +$nowyear=$nowarray['year']; +$nowmonth=$nowarray['mon']; +$nowday=$nowarray['mday']; + + +// Define list of all external calendars (global setup) +$listofextcals=array(); + +$prev = dol_get_first_day($year, $month); +$first_day = 1; +$first_month = 1; +$first_year = $year; + +$week = $prev['week']; + +$day = (int) $day; +$next = dol_get_next_day($day, $month, $year); +$next_year = year + 1; +$next_month = $month; +$next_day = $day; + +$max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year)); + +$tmpday = $first_day; +//print 'xx'.$prev_year.'-'.$prev_month.'-'.$prev_day; +//print 'xx'.$next_year.'-'.$next_month.'-'.$next_day; + +$title=$langs->trans("DoneAndToDoActions"); +if ($status == 'done') $title=$langs->trans("DoneActions"); +if ($status == 'todo') $title=$langs->trans("ToDoActions"); + +$param=''; +if ($actioncode || isset($_GET['actioncode']) || isset($_POST['actioncode'])) $param.="&actioncode=".$actioncode; +if ($status || isset($_GET['status']) || isset($_POST['status'])) $param.="&status=".$status; +if ($filter) $param.="&filter=".$filter; +if ($filtert) $param.="&filtert=".$filtert; +if ($usergroup) $param.="&usergroup=".$usergroup; +if ($socid) $param.="&socid=".$socid; +if ($showbirthday) $param.="&showbirthday=1"; +if ($pid) $param.="&projectid=".$pid; +if ($type) $param.="&type=".$type; +if ($action == 'show_day' || $action == 'show_week' || $action == 'show_month' || $action != 'show_peruser' || $action != 'show_pertype') $param.='&action='.$action; +$param.="&maxprint=".$maxprint; + +$prev = dol_get_first_day($year, 1); +$prev_year = $year - 1; +$prev_month = $month; +$prev_day = $day; +$first_day = 1; +$first_month= 1; +$first_year = $year; + +$week = $prev['week']; + +$day = (int) $day; +$next = dol_get_next_day(31, 12, $year); +$next_year = $year + 1; +$next_month = $month; +$next_day = $day; + +// Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1) +$firstdaytoshow=dol_mktime(0,0,0,$first_month,$first_day,$first_year); +$lastdaytoshow=dol_time_plus_duree($firstdaytoshow, 7, 'd'); +//print $firstday.'-'.$first_month.'-'.$first_year; +//print dol_print_date($firstdaytoshow,'dayhour'); +//print dol_print_date($lastdaytoshow,'dayhour'); + +$max_day_in_month = date("t",dol_mktime(0,0,0,$month,1,$year)); + +$tmpday = $first_day; + +$nav ="".img_previous($langs->trans("Previous"))."\n"; +$nav.=" ".dol_print_date(dol_mktime(0,0,0,$first_month,$first_day,$first_year),"%Y")." \n"; +$nav.="".img_next($langs->trans("Next"))."\n"; +$nav.="   (".$langs->trans("Today").")"; +$picto='calendarweek'; + +$nav.='   '; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; +$nav.=''; + +$nav.=$form->select_date($dateselect, 'dateselect', 0, 0, 1, '', 1, 0, 1); +$nav.=' '; +$nav.=''; + +// Must be after the nav definition +$param.='&year='.$year.'&month='.$month.($day?'&day='.$day:''); +//print 'x'.$param; + + + + +$tabactive='cardpertype'; + +$paramnoaction=preg_replace('/action=[a-z_]+/','',$param); + +$head = calendars_prepare_head($paramnoaction); + +dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); +print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, $listofextcals, $actioncode, $usergroup); +dol_fiche_end(); + +$showextcals=$listofextcals; +// Legend +if ($conf->use_javascript_ajax) +{ + $s=''; + $s.='' . "\n"; + if (! empty($conf->use_javascript_ajax)) + { + $s.='
' . $langs->trans("LocalAgenda").'  
'; + if (is_array($showextcals) && count($showextcals) > 0) + { + foreach ($showextcals as $val) + { + $htmlname = md5($val['name']); + $s.='' . "\n"; + $s.='
' . $val ['name'] . '  
'; + } + } + + //$s.='
'.$langs->trans("AgendaShowBirthdayEvents").'  
'; + + // Calendars from hooks + $parameters=array(); $object=null; + $reshook=$hookmanager->executeHooks('addCalendarChoice',$parameters,$object,$action); + if (empty($reshook)) + { + $s.= $hookmanager->resPrint; + } + elseif ($reshook > 1) + { + $s = $hookmanager->resPrint; + } + } +} + + + +$link=''; +print load_fiche_titre($s, $link.'     '.$nav, ''); + + +// Get event in an array +$eventarray=array(); + +$sql = 'SELECT'; +if ($usergroup > 0) $sql.=" DISTINCT"; +$sql.= ' a.id, a.label,'; +$sql.= ' a.datep,'; +$sql.= ' a.datep2,'; +$sql.= ' a.percent,'; +$sql.= ' a.fk_user_author,a.fk_user_action,'; +$sql.= ' a.transparency, a.priority, a.fulldayevent, a.location,'; +$sql.= ' a.fk_soc, a.fk_contact, a.fk_element, a.elementtype,'; +$sql.= ' ca.code, ca.color'; +$sql.= ' FROM '.MAIN_DB_PREFIX.'c_actioncomm as ca, '.MAIN_DB_PREFIX."actioncomm as a"; +if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; +// We must filter on assignement table +if ($filtert > 0 || $usergroup > 0) $sql.=", ".MAIN_DB_PREFIX."actioncomm_resources as ar"; +if ($usergroup > 0) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_user = ar.fk_element"; +$sql.= ' WHERE a.fk_action = ca.id'; +$sql.= ' AND a.entity IN ('.getEntity('agenda', 1).')'; +if ($actioncode) $sql.=" AND ca.code='".$db->escape($actioncode)."'"; +if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid); +if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")"; +if ($socid > 0) $sql.= ' AND a.fk_soc = '.$socid; +// We must filter on assignement table +if ($filtert > 0 || $usergroup > 0) $sql.= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'"; +if ($action == 'show_day') +{ + $sql.= " AND ("; + $sql.= " (a.datep BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; + $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; + $sql.= " OR "; + $sql.= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; + $sql.= " AND '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; + $sql.= " OR "; + $sql.= " (a.datep < '".$db->idate(dol_mktime(0,0,0,$month,$day,$year))."'"; + $sql.= " AND a.datep2 > '".$db->idate(dol_mktime(23,59,59,$month,$day,$year))."')"; + $sql.= ')'; +} +else +{ + // To limit array + $sql.= " AND ("; + $sql.= " (a.datep BETWEEN '".$db->idate(dol_mktime(0,0,0,1,1,$year)-(60*60*24*7))."'"; // Start 7 days before + $sql.= " AND '".$db->idate(dol_mktime(23,59,59,12,31,$year)+(60*60*24*7))."')"; // End 7 days after + $sql.= " OR "; + $sql.= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0,0,0,1,1,$year)-(60*60*24*7))."'"; + $sql.= " AND '".$db->idate(dol_mktime(23,59,59,12,31,$year)+(60*60*24*7))."')"; + $sql.= " OR "; + $sql.= " (a.datep < '".$db->idate(dol_mktime(0,0,0,12,1,$year)-(60*60*24*7))."'"; + $sql.= " AND a.datep2 > '".$db->idate(dol_mktime(23,59,59,12,31,$year)+(60*60*24*7))."')"; + $sql.= ')'; +} +if ($type) $sql.= " AND ca.id = ".$type; +if ($status == '0') { $sql.= " AND a.percent = 0"; } +if ($status == '-1') { $sql.= " AND a.percent = -1"; } // Not applicable +if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // Running already started +if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; } +if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; } +// We must filter on assignement table +if ($filtert > 0 || $usergroup > 0) +{ + $sql.= " AND ("; + if ($filtert > 0) $sql.= "ar.fk_element = ".$filtert; + if ($usergroup > 0) $sql.= ($filtert>0?" OR ":"")." ugu.fk_usergroup = ".$usergroup; + $sql.= ")"; +} +// Sort on date +$sql.= ' ORDER BY fk_user_action, datep'; //fk_user_action +//print $sql; + +dol_syslog("comm/action/index.php", LOG_DEBUG); +$resql=$db->query($sql); +if ($resql) +{ + $num = $db->num_rows($resql); + $i=0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + + // Discard auto action if option is on + if (! empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO) && $obj->code == 'AC_OTH_AUTO') + { + $i++; + continue; + } + + // Create a new object action + $event=new ActionComm($db); + $event->id=$obj->id; + $event->datep=$db->jdate($obj->datep); // datep and datef are GMT date + $event->datef=$db->jdate($obj->datep2); + $event->type_code=$obj->code; + $event->type_color=$obj->color; + //$event->libelle=$obj->label; // deprecated + $event->label=$obj->label; + $event->percentage=$obj->percent; + //$event->author->id=$obj->fk_user_author; // user id of creator + $event->authorid=$obj->fk_user_author; // user id of creator + $event->userownerid=$obj->fk_user_action; // user id of owner + $event->fetch_userassigned(); // This load $event->userassigned + $event->priority=$obj->priority; + $event->fulldayevent=$obj->fulldayevent; + $event->location=$obj->location; + $event->transparency=$obj->transparency; + + $event->socid=$obj->fk_soc; + $event->contactid=$obj->fk_contact; + //$event->societe->id=$obj->fk_soc; // deprecated + //$event->contact->id=$obj->fk_contact; // deprecated + + $event->fk_element=$obj->fk_element; + $event->elementtype=$obj->elementtype; + + // Defined date_start_in_calendar and date_end_in_calendar property + // They are date start and end of action but modified to not be outside calendar view. + if ($event->percentage <= 0) + { + $event->date_start_in_calendar=$event->datep; + if ($event->datef != '' && $event->datef >= $event->datep) $event->date_end_in_calendar=$event->datef; + else $event->date_end_in_calendar=$event->datep; + } + else + { + $event->date_start_in_calendar=$event->datep; + if ($event->datef != '' && $event->datef >= $event->datep) $event->date_end_in_calendar=$event->datef; + else $event->date_end_in_calendar=$event->datep; + } + // Define ponctual property + if ($event->date_start_in_calendar == $event->date_end_in_calendar) + { + $event->ponctuel=1; + } + + // Check values + if ($event->date_end_in_calendar < $firstdaytoshow || + $event->date_start_in_calendar >= $lastdaytoshow) + { + // This record is out of visible range + } + else + { + if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar=$firstdaytoshow; + if ($event->date_end_in_calendar >= $lastdaytoshow) $event->date_end_in_calendar=($lastdaytoshow - 1); + + // Add an entry in actionarray for each day + $daycursor=$event->date_start_in_calendar; + $annee = date('Y',$daycursor); + $mois = date('m',$daycursor); + $jour = date('d',$daycursor); + + // Loop on each day covered by action to prepare an index to show on calendar + $loop=true; $j=0; + $daykey=dol_mktime(0,0,0,$mois,$jour,$annee); + do + { + //if ($event->id==408) print 'daykey='.$daykey.' '.$event->datep.' '.$event->datef.'
'; + + $eventarray[$daykey][]=$event; + $j++; + + $daykey+=60*60*24; + if ($daykey > $event->date_end_in_calendar) $loop=false; + } + while ($loop); + + //print 'Event '.$i.' id='.$event->id.' (start='.dol_print_date($event->datep).'-end='.dol_print_date($event->datef); + //print ' startincalendar='.dol_print_date($event->date_start_in_calendar).'-endincalendar='.dol_print_date($event->date_end_in_calendar).') was added in '.$j.' different index key of array
'; + } + $i++; + + } +} +else +{ + dol_print_error($db); +} + +$maxnbofchar=18; +$cachethirdparties=array(); +$cachecontacts=array(); + +// Define theme_datacolor array +$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/graph-color.php"; +if (is_readable($color_file)) +{ + include_once $color_file; +} +if (! is_array($theme_datacolor)) $theme_datacolor=array(array(120,130,150), array(200,160,180), array(190,190,220)); + + +$newparam=$param; // newparam is for birthday links +$newparam=preg_replace('/showbirthday=/i','showbirthday_=',$newparam); // To avoid replacement when replace day= is done +$newparam=preg_replace('/action=show_month&?/i','',$newparam); +$newparam=preg_replace('/action=show_week&?/i','',$newparam); +$newparam=preg_replace('/day=[0-9]+&?/i','',$newparam); +$newparam=preg_replace('/month=[0-9]+&?/i','',$newparam); +$newparam=preg_replace('/year=[0-9]+&?/i','',$newparam); +$newparam=preg_replace('/viewweek=[0-9]+&?/i','',$newparam); +$newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter +$newparam.='&viewweek=1'; + +echo '
'; +echo ''; +echo ''; +echo '' ; +echo '
'; + + +// Line header with list of days + +//print "begin_d=".$begin_d." end_d=".$end_d; + + +echo ''; + +echo ''; +echo ''; +$i=0; // 0 = sunday, +echo '\n"; +echo "\n"; + +echo ''; +echo ''; +$i=0; +for ($h = $begin_d; $h < $end_d; $h++) +{ + echo '"; +} +echo "\n"; +echo "\n"; + + +$typeofevents=array(); + +// Load array of colors by type +$colorsbytype=array(); +$labelbytype=array(); +$sql="SELECT code, color, libelle FROM ".MAIN_DB_PREFIX."c_actioncomm"; +$resql=$db->query($sql); +while ($obj = $db->fetch_object($resql)) +{ + $colorsbytype[$obj->code]=$obj->color; + $labelbytype[$obj->code]=$obj->libelle; +} + +// Loop on each user to show calendar +$todayarray=dol_getdate($now,'fast'); +$sav = $tmpday; +$showheader = true; +$var = false; +foreach ($typeofevents as $typeofevent) +{ + $var = ! $var; + echo ""; + echo ''; + $tmpday = $sav; + + // Lopp on each day of week + $i = 0; + for ($iter_day = 0; $iter_day < 8; $iter_day++) + { + if (($i + 1) < $begin_d || ($i + 1) > $end_d) + { + $i++; + continue; + } + + // Show days of the current week + $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); + $tmparray = dol_getdate($curtime,'fast'); + $tmpday = $tmparray['mday']; + $tmpmonth = $tmparray['mon']; + $tmpyear = $tmparray['year']; + + $style='cal_current_month'; + if ($iter_day == 6) $style.=' cal_other_month'; + $today=0; + if ($todayarray['mday']==$tmpday && $todayarray['mon']==$tmpmonth && $todayarray['year']==$tmpyear) $today=1; + if ($today) $style='cal_today_peruser'; + + show_day_events2($username, $tmpday, $tmpmonth, $tmpyear, $monthshown, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, $showheader, $colorsbytype, $var); + + $i++; + } + echo "\n"; + $showheader = false; +} + +echo "
'; +echo $langs->trans("Year"); +print "
"; +print $year; +echo "
'; + print ''.sprintf("%02d",$h).''; + print "
' . $username->getNomUrl(1). '
\n"; + + +if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) +{ + $langs->load("commercial"); + print '
'.$langs->trans("Legend").':
'; + foreach($colorsbytype as $code => $color) + { + if ($color) + { + print '
 
'; + print $langs->trans("Action".$code)!="Action".$code?$langs->trans("Action".$code):$labelbytype[$code]; + //print $code; + print '
'; + } + } + //$color=sprintf("%02x%02x%02x",$theme_datacolor[0][0],$theme_datacolor[0][1],$theme_datacolor[0][2]); + print '
 
'; + print $langs->trans("Other"); + print '
'; + /* TODO Show this if at least one cumulated event + print '
 
'; + print $langs->trans("SeveralEvents"); + print '
'; + */ +} + +// Add js code to manage click on a box +print ''; + + + +llxFooter(); + +$db->close(); + + + + +/** + * Show event line of a particular day for a user + * + * @param string $username Login + * @param int $day Day + * @param int $month Month + * @param int $year Year + * @param int $monthshown Current month shown in calendar view + * @param string $style Style to use for this day + * @param array $eventarray Array of events + * @param int $maxprint Nb of actions to show each day on month view (0 means no limit) + * @param int $maxnbofchar Nb of characters to show for event line + * @param string $newparam Parameters on current URL + * @param int $showinfo Add extended information (used by day view) + * @param int $minheight Minimum height for each event. 60px by default. + * @param boolean $showheader Show header + * @param array $colorsbytype Array with colors by type + * @param bool $var true or false for alternat style on tr/td + * @return void + */ +function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false) +{ + global $db; + global $user, $conf, $langs, $hookmanager, $action; + global $filter, $filtert, $status, $actioncode; // Filters used into search form + global $theme_datacolor; // Array with a list of different we can use (come from theme) + global $cachethirdparties, $cachecontacts, $colorindexused; + global $begin_h, $end_h; + + $cases1 = array(); // Color first half hour + $cases2 = array(); // Color second half hour + + $curtime = dol_mktime(0, 0, 0, $month, $day, $year); + + $i=0; $nummytasks=0; $numother=0; $numbirthday=0; $numical=0; $numicals=array(); + $ymd=sprintf("%04d",$year).sprintf("%02d",$month).sprintf("%02d",$day); + + $nextindextouse=count($colorindexused); // At first run, this is 0, so fist user has 0, next 1, ... + //if ($username->id && $day==1) var_dump($eventarray); + + // We are in a particular day for $username, now we scan all events + foreach ($eventarray as $daykey => $notused) + { + $annee = date('Y',$daykey); + $mois = date('m',$daykey); + $jour = date('d',$daykey); + //print $annee.'-'.$mois.'-'.$jour.' '.$year.'-'.$month.'-'.$day."
\n"; + + if ($day==$jour && $month==$mois && $year==$annee) // Is it the day we are looking for when calling function ? + { + // Scan all event for this date + foreach ($eventarray[$daykey] as $index => $event) + { + //var_dump($event); + + $keysofuserassigned=array_keys($event->userassigned); + if (! in_array($username->id,$keysofuserassigned)) continue; // We discard record if event is from another user than user we want to show + //if ($username->id != $event->userownerid) continue; // We discard record if event is from another user than user we want to show + + $parameters=array(); + $reshook=$hookmanager->executeHooks('formatEvent',$parameters,$event,$action); // Note that $action and $object may have been modified by some hooks + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + + $ponct=($event->date_start_in_calendar == $event->date_end_in_calendar); + + // Define $color (Hex string like '0088FF') and $cssclass of event + $color=-1; $cssclass=''; $colorindex=-1; + if (in_array($user->id, $keysofuserassigned)) + { + $nummytasks++; $cssclass='family_mytasks'; + if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) $color=$event->type_color; + } + else if ($event->type_code == 'ICALEVENT') + { + $numical++; + if (! empty($event->icalname)) + { + if (! isset($numicals[dol_string_nospecial($event->icalname)])) { + $numicals[dol_string_nospecial($event->icalname)] = 0; + } + $numicals[dol_string_nospecial($event->icalname)]++; + } + + $color=$event->icalcolor; + $cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unsortable'); + } + else if ($event->type_code == 'BIRTHDAY') + { + $numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); + } + else + { + $numother++; $cssclass='family_other'; + if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) $color=$event->type_color; + } + + if ($color < 0) // Color was not forced. Set color according to color index. + { + // Define color index if not yet defined + $idusertouse=($event->userownerid?$event->userownerid:0); + if (isset($colorindexused[$idusertouse])) + { + $colorindex=$colorindexused[$idusertouse]; // Color already assigned to this user + } + else + { + $colorindex=$nextindextouse; + $colorindexused[$idusertouse]=$colorindex; + if (! empty($theme_datacolor[$nextindextouse+1])) $nextindextouse++; // Prepare to use next color + } + // Define color + $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]); + } + //$cssclass=$cssclass.' '.$cssclass.'_day_'.$ymd; + + // Define all rects with event (cases1 is first half hour, cases2 is second half hour) + for ($h = $begin_h; $h < $end_h; $h++) + { + //if ($username->id == 1 && $day==1) print 'h='.$h; + $newcolor = ''; //init + if (empty($event->fulldayevent)) + { + $a = dol_mktime((int) $h,0,0,$month,$day,$year,false,0); + $b = dol_mktime((int) $h,30,0,$month,$day,$year,false,0); + $c = dol_mktime((int) $h+1,0,0,$month,$day,$year,false,0); + + $dateendtouse=$event->date_end_in_calendar; + if ($dateendtouse==$event->date_start_in_calendar) $dateendtouse++; + + //print dol_print_date($event->date_start_in_calendar,'dayhour').'-'.dol_print_date($a,'dayhour').'-'.dol_print_date($b,'dayhour').'
'; + + if ($event->date_start_in_calendar < $b && $dateendtouse > $a) + { + $busy=$event->transparency; + $cases1[$h][$event->id]['busy']=$busy; + $cases1[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour'); + if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar) + { + $tmpa=dol_getdate($event->date_start_in_calendar,true); + $tmpb=dol_getdate($event->date_end_in_calendar,true); + if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases1[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'hour'); + else $cases1[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'dayhour'); + } + $cases1[$h][$event->id]['string'].=' - '.$event->label; + $cases1[$h][$event->id]['typecode']=$event->type_code; + if ($event->socid) + { + //$cases1[$h][$event->id]['string'].='xxx'; + } + $cases1[$h][$event->id]['color']=$color; + } + if ($event->date_start_in_calendar < $c && $dateendtouse > $b) + { + $busy=$event->transparency; + $cases2[$h][$event->id]['busy']=$busy; + $cases2[$h][$event->id]['string']=dol_print_date($event->date_start_in_calendar,'dayhour'); + if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar) + { + $tmpa=dol_getdate($event->date_start_in_calendar,true); + $tmpb=dol_getdate($event->date_end_in_calendar,true); + if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases2[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'hour'); + else $cases2[$h][$event->id]['string'].='-'.dol_print_date($event->date_end_in_calendar,'dayhour'); + } + $cases2[$h][$event->id]['string'].=' - '.$event->label; + $cases2[$h][$event->id]['typecode']=$event->type_code; + if ($event->socid) + { + //$cases2[$h][$event->id]['string'].='xxx'; + } + $cases2[$h][$event->id]['color']=$color; + } + } + else + { + $busy=$event->transparency; + $cases1[$h][$event->id]['busy']=$busy; + $cases2[$h][$event->id]['busy']=$busy; + $cases1[$h][$event->id]['string']=$event->label; + $cases2[$h][$event->id]['string']=$event->label; + $cases1[$h][$event->id]['typecode']=$event->type_code; + $cases2[$h][$event->id]['typecode']=$event->type_code; + $cases1[$h][$event->id]['color']=$color; + $cases2[$h][$event->id]['color']=$color; + } + } + $i++; + } + + break; // We found the date we were looking for. No need to search anymore. + } + } + + for ($h = $begin_h; $h < $end_h; $h++) + { + $color1='';$color2=''; + $style1='';$style2=''; + $string1=' ';$string2=' '; + $title1='';$title2=''; + if (isset($cases1[$h]) && $cases1[$h] != '') + { + //$title1.=count($cases1[$h]).' '.(count($cases1[$h])==1?$langs->trans("Event"):$langs->trans("Events")); + if (count($cases1[$h]) > 1) $title1.=count($cases1[$h]).' '.(count($cases1[$h])==1?$langs->trans("Event"):$langs->trans("Events")); + $string1=' '; + if (empty($conf->global->AGENDA_NO_TRANSPARENT_ON_NOT_BUSY)) $style1='peruser_notbusy'; + else $style1='peruser_busy'; + foreach($cases1[$h] as $id => $ev) + { + if ($ev['busy']) $style1='peruser_busy'; + } + } + if (isset($cases2[$h]) && $cases2[$h] != '') + { + //$title2.=count($cases2[$h]).' '.(count($cases2[$h])==1?$langs->trans("Event"):$langs->trans("Events")); + if (count($cases2[$h]) > 1) $title2.=count($cases2[$h]).' '.(count($cases2[$h])==1?$langs->trans("Event"):$langs->trans("Events")); + $string2=' '; + if (empty($conf->global->AGENDA_NO_TRANSPARENT_ON_NOT_BUSY)) $style2='peruser_notbusy'; + else $style2='peruser_busy'; + foreach($cases2[$h] as $id => $ev) + { + if ($ev['busy']) $style2='peruser_busy'; + } + } + + $ids1='';$ids2=''; + if (count($cases1[$h]) && array_keys($cases1[$h])) $ids1=join(',',array_keys($cases1[$h])); + if (count($cases2[$h]) && array_keys($cases2[$h])) $ids2=join(',',array_keys($cases2[$h])); + + if ($h == $begin_h) echo '
'; + else echo ''; + if (count($cases1[$h]) == 1) // only 1 event + { + $output = array_slice($cases1[$h], 0, 1); + $title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:''); + if ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string']; + if ($output[0]['color']) $color1 = $output[0]['color']; + } + else if (count($cases1[$h]) > 1) + { + $title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:''); + $color1='222222'; + } + + if (count($cases2[$h]) == 1) // only 1 event + { + $output = array_slice($cases2[$h], 0, 1); + $title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:''); + if ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string']; + if ($output[0]['color']) $color2 = $output[0]['color']; + } + else if (count($cases2[$h]) > 1) + { + $title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:''); + $color2='222222'; + } + print ''; + print ''; + print '
'; + print $string1; + print ''; + print $string2; + print '
'; + print '
'; @@ -143,6 +162,9 @@ if ($resql) $i++; } print "
"; + + print ''; + $db->free($resql); } else @@ -150,7 +172,5 @@ else dol_print_error($db); } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php index 963847aee18..edb5042e358 100644 --- a/htdocs/comm/address.php +++ b/htdocs/comm/address.php @@ -106,7 +106,7 @@ if ($action == 'add' || $action == 'update') } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action='create'; } } @@ -147,7 +147,7 @@ if ($action == 'add' || $action == 'update') else { $reload = 0; - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action= "edit"; } } @@ -211,7 +211,7 @@ if ($action == 'create') $object->country = $tmparray['label']; } - print_fiche_titre($langs->trans("AddAddress")); + print load_fiche_titre($langs->trans("AddAddress")); print "
\n"; @@ -306,7 +306,7 @@ elseif ($action == 'edit') dol_fiche_head($head, 'card', $societe->name); - print_titre($langs->trans("EditAddress")); + print load_fiche_titre($langs->trans("EditAddress")); print "
\n"; if ($socid) diff --git a/htdocs/comm/admin/askpricesupplier_extrafields.php b/htdocs/comm/admin/askpricesupplier_extrafields.php deleted file mode 100644 index 4342549c46a..00000000000 --- a/htdocs/comm/admin/askpricesupplier_extrafields.php +++ /dev/null @@ -1,151 +0,0 @@ - - * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin - * - * 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 3 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, see . - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/askpricesupplier.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - -$langs->load("companies"); -$langs->load("admin"); -$langs->load('askpricesupplier'); - -$extrafields = new ExtraFields($db); -$form = new Form($db); - -// List of supported format -$tmptype2label=ExtraFields::$type2label; -$type2label=array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val); - -$action=GETPOST('action', 'alpha'); -$attrname=GETPOST('attrname', 'alpha'); -$elementtype='askpricesupplier'; //Must be the $table_element of the class that manage extrafield - -if (!$user->admin) accessforbidden(); - - -/* - * Actions - */ - -require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; - - - -/* - * View - */ - -$textobject=$langs->transnoentitiesnoconv("CommRequests"); - - -llxHeader('',$langs->trans("AskPriceSupplierSetup")); - - -$linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("AskPriceSupplierSetup"),$linkback,'title_setup'); - - -$head = askpricesupplier_admin_prepare_head(); - -dol_fiche_head($head, 'attributes', $langs->trans("CommRequests"), 0, 'askpricesupplier'); - - -print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n"; -print '
'; - -// Load attribute_label -$extrafields->fetch_name_optionals_label($elementtype); - -print ""; - -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print "\n"; - -$var=True; -foreach($extrafields->attribute_type as $key => $value) -{ - $var=!$var; - print ""; - print "\n"; - print "\n"; - print "\n"; - print "\n"; - print '\n"; - print '\n"; - print '\n"; - print '\n"; - print ""; - // $i++; -} - -print "
'.$langs->trans("Position").''.$langs->trans("Label").''.$langs->trans("AttributeCode").''.$langs->trans("Type").''.$langs->trans("Size").''.$langs->trans("Unique").''.$langs->trans("Required").' 
".$extrafields->attribute_pos[$key]."".$extrafields->attribute_label[$key]."".$key."".$type2label[$extrafields->attribute_type[$key]]."'.$extrafields->attribute_size[$key]."'.yn($extrafields->attribute_unique[$key])."'.yn($extrafields->attribute_required[$key])."'.img_edit().''; - print "  ".img_delete()."
"; - -dol_fiche_end(); - - -// Buttons -if ($action != 'create' && $action != 'edit') -{ - print '
'; - print ''; - print "
"; -} - - -/* ************************************************************************** */ -/* */ -/* Creation d'un champ optionnel - /* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ - print "
"; - print_titre($langs->trans('NewAttribute')); - - require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; -} - -/* ************************************************************************** */ -/* */ -/* Edition d'un champ optionnel */ -/* */ -/* ************************************************************************** */ -if ($action == 'edit' && ! empty($attrname)) -{ - print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); - - require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; -} - -llxFooter(); - -$db->close(); diff --git a/htdocs/comm/admin/askpricesupplierdet_extrafields.php b/htdocs/comm/admin/askpricesupplierdet_extrafields.php deleted file mode 100644 index e419b6a3168..00000000000 --- a/htdocs/comm/admin/askpricesupplierdet_extrafields.php +++ /dev/null @@ -1,153 +0,0 @@ - - * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2012 Florian Henry - * Copyright (C) 2013 Philippe Grand - * Copyright (C) 2013 Florian Henry - * - * 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 3 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, see . - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/askpricesupplier.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - - -if (!$user->admin) - accessforbidden(); - -$langs->load("admin"); -$langs->load("other"); -$langs->load("askpricesupplier"); - -$extrafields = new ExtraFields($db); -$form = new Form($db); - -// List of supported format -$tmptype2label=ExtraFields::$type2label; -$type2label=array(''); -foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val); - -$action=GETPOST('action', 'alpha'); -$attrname=GETPOST('attrname', 'alpha'); - -$elementtype='askpricesupplierdet'; //Must be the $table_element of the class that manage extrafield - -if (!$user->admin) accessforbidden(); - - -/* - * Actions - */ - -require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; - - - -/* - * View - */ - -$textobject=$langs->transnoentitiesnoconv("CommRequests"); - -llxHeader('',$langs->trans("AskPriceSupplierSetup")); - -$linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("AskPriceSupplierSetup"),$linkback,'title_setup'); - -$head = askpricesupplier_admin_prepare_head(); - -dol_fiche_head($head, 'attributeslines', $langs->trans("CommRequests"), 0, 'askpricesupplier'); - - -print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n"; -print '
'; - -// Load attribute_label -$extrafields->fetch_name_optionals_label($elementtype); - -print ""; - -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print "\n"; - -$var=True; -foreach($extrafields->attribute_type as $key => $value) -{ - $var=!$var; - print ""; - print "\n"; - print "\n"; - print "\n"; - print '\n"; - print '\n"; - print '\n"; - print '\n"; - print ""; -} - -print "
'.$langs->trans("Label").''.$langs->trans("AttributeCode").''.$langs->trans("Type").''.$langs->trans("Size").''.$langs->trans("Unique").''.$langs->trans("Required").' 
".$extrafields->attribute_label[$key]."".$key."".$type2label[$extrafields->attribute_type[$key]]."'.$extrafields->attribute_size[$key]."'.yn($extrafields->attribute_unique[$key])."'.yn($extrafields->attribute_required[$key])."'.img_edit().''; - print "  ".img_delete()."
"; - -dol_fiche_end(); - - -// Buttons -if ($action != 'create' && $action != 'edit') -{ - print '
'; - print "".$langs->trans("NewAttribute").""; - print "
"; -} - - -/* ************************************************************************** */ -/* */ -/* Creation d'un champ optionnel */ -/* */ -/* ************************************************************************** */ - -if ($action == 'create') -{ - print "
"; - print_titre($langs->trans('NewAttribute')); - - require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; -} - -/* ************************************************************************** */ -/* */ -/* Edition d'un champ optionnel */ -/* */ -/* ************************************************************************** */ -if ($action == 'edit' && ! empty($attrname)) -{ - print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); - - require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; -} - -llxFooter(); - -$db->close(); diff --git a/htdocs/comm/admin/propal_extrafields.php b/htdocs/comm/admin/propal_extrafields.php index bd0ce34329d..784512d6d1e 100644 --- a/htdocs/comm/admin/propal_extrafields.php +++ b/htdocs/comm/admin/propal_extrafields.php @@ -64,7 +64,7 @@ $textobject=$langs->transnoentitiesnoconv("Proposals"); llxHeader('',$langs->trans("PropalSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("PropalSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("PropalSetup"),$linkback,'title_setup'); $head = propal_admin_prepare_head(); @@ -87,27 +87,27 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel - /* */ +/* Creation of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'create') { print "
"; - print_titre($langs->trans('NewAttribute')); + print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) { print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; } diff --git a/htdocs/comm/admin/propaldet_extrafields.php b/htdocs/comm/admin/propaldet_extrafields.php index 58ab3adf109..633c4fab581 100644 --- a/htdocs/comm/admin/propaldet_extrafields.php +++ b/htdocs/comm/admin/propaldet_extrafields.php @@ -72,7 +72,7 @@ $textobject=$langs->transnoentitiesnoconv("Proposals"); llxHeader('',$langs->trans("PropalSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("PropalSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("PropalSetup"),$linkback,'title_setup'); $head = propal_admin_prepare_head(); @@ -94,27 +94,27 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel */ +/* Creation of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'create') { print "
"; - print_titre($langs->trans('NewAttribute')); + print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) { print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; } diff --git a/htdocs/comm/askpricesupplier/card.php b/htdocs/comm/askpricesupplier/card.php deleted file mode 100644 index 101160cf482..00000000000 --- a/htdocs/comm/askpricesupplier/card.php +++ /dev/null @@ -1,1828 +0,0 @@ - - * Copyright (C) 2004-2014 Laurent Destailleur - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2014 Juanjo Menent - * Copyright (C) 2010-2011 Philippe Grand - * Copyright (C) 2012-2013 Christophe Battarel - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2014 Ferran Marcet - * - * 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 3 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, see . - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaskpricesupplier.class.php'; -require_once DOL_DOCUMENT_ROOT . '/comm/askpricesupplier/class/askpricesupplier.class.php'; -require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; -require_once DOL_DOCUMENT_ROOT . '/core/modules/askpricesupplier/modules_askpricesupplier.php'; -require_once DOL_DOCUMENT_ROOT . '/core/lib/askpricesupplier.lib.php'; -require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; -require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; -if (! empty($conf->projet->enabled)) { - require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; -} - -$langs->load('companies'); -$langs->load('askpricesupplier'); -$langs->load('compta'); -$langs->load('bills'); -$langs->load('orders'); -$langs->load('products'); -$langs->load("deliveries"); -$langs->load('sendings'); -if (! empty($conf->margin->enabled)) - $langs->load('margins'); - -$error = 0; - -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); -$socid = GETPOST('socid', 'int'); -$action = GETPOST('action', 'alpha'); -$origin = GETPOST('origin', 'alpha'); -$originid = GETPOST('originid', 'int'); -$confirm = GETPOST('confirm', 'alpha'); -$lineid = GETPOST('lineid', 'int'); -$contactid = GETPOST('contactid','int'); - -// PDF -$hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0)); -$hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0)); -$hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0)); - -// Nombre de ligne pour choix de produit/service predefinis -$NBLINES = 4; - -// Security check -if (! empty($user->societe_id)) $socid = $user->societe_id; -$result = restrictedArea($user, 'askpricesupplier', $id); - -$object = new AskPriceSupplier($db); -$extrafields = new ExtraFields($db); - -// fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - -// Load object -if ($id > 0 || ! empty($ref)) { - $ret = $object->fetch($id, $ref); - if ($ret > 0) - $ret = $object->fetch_thirdparty(); - if ($ret < 0) - dol_print_error('', $object->error); -} - -// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array -$hookmanager->initHooks(array('askpricesuppliercard','globalcard')); - -$permissionnote = $user->rights->askpricesupplier->creer; // Used by the include of actions_setnotes.inc.php - - -/* - * Actions - */ - -$parameters = array('socid' => $socid); -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - -if (empty($reshook)) -{ - include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php'; // Must be include, not includ_once - - // Action clone object - if ($action == 'confirm_clone' && $confirm == 'yes') - { - if (1 == 0 && ! GETPOST('clone_content') && ! GETPOST('clone_receivers')) - { - setEventMessage($langs->trans("NoCloneOptionsSpecified"), 'errors'); - } - else - { - if ($object->id > 0) { - $result = $object->createFromClone($socid); - if ($result > 0) { - header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $result); - exit(); - } else { - setEventMessage($object->error, 'errors'); - $action = ''; - } - } - } - } - - // Delete askprice - else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->askpricesupplier->supprimer) - { - $result = $object->delete($user); - if ($result > 0) { - header('Location: ' . DOL_URL_ROOT . '/comm/askpricesupplier/list.php'); - exit(); - } else { - $langs->load("errors"); - setEventMessage($langs->trans($object->error), 'errors'); - } - } - - // Remove line - else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->askpricesupplier->creer) - { - $result = $object->deleteline($lineid); - // reorder lines - if ($result) - $object->line_order(true); - - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - // Define output language - $outputlangs = $langs; - if (! empty($conf->global->MAIN_MULTILANGS)) { - $outputlangs = new Translate("", $conf); - $newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang); - $outputlangs->setDefaultLang($newlang); - } - $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - } - - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); - exit(); - } - - // Validation - else if ($action == 'confirm_validate' && $confirm == 'yes' && - ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->askpricesupplier->creer)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->askpricesupplier->validate))) - ) - { - $result = $object->valid($user); - if ($result >= 0) - { - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { - // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { - $outputlangs = $langs; - $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (! empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - $model=$object->modelpdf; - $ret = $object->fetch($id); // Reload to get new records - - $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - } - } - } else { - $langs->load("errors"); - if (count($object->errors) > 0) setEventMessage($object->errors, 'errors'); - else setEventMessage($langs->trans($object->error), 'errors'); - } - } - - else if ($action == 'setdate_livraison' && $user->rights->askpricesupplier->creer) - { - $result = $object->set_date_livraison($user, dol_mktime(12, 0, 0, $_POST['liv_month'], $_POST['liv_day'], $_POST['liv_year'])); - if ($result < 0) - dol_print_error($db, $object->error); - } - - // Create askprice - else if ($action == 'add' && $user->rights->askpricesupplier->creer) - { - $object->socid = $socid; - $object->fetch_thirdparty(); - - $date_delivery = dol_mktime(12, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year')); - - if ($socid < 1) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), 'errors'); - $action = 'create'; - $error ++; - } - - if (! $error) - { - $db->begin(); - - // Si on a selectionne une demande a copier, on realise la copie - if (GETPOST('createmode') == 'copy' && GETPOST('copie_askpricesupplier')) - { - if ($object->fetch(GETPOST('copie_askpricesupplier')) > 0) { - $object->ref = GETPOST('ref'); - $object->date_livraison = $date_delivery; - $object->shipping_method_id = GETPOST('shipping_method_id', 'int'); - $object->cond_reglement_id = GETPOST('cond_reglement_id'); - $object->mode_reglement_id = GETPOST('mode_reglement_id'); - $object->fk_account = GETPOST('fk_account', 'int'); - $object->remise_percent = GETPOST('remise_percent'); - $object->remise_absolue = GETPOST('remise_absolue'); - $object->socid = GETPOST('socid'); - $object->fk_project = GETPOST('projectid'); - $object->modelpdf = GETPOST('model'); - $object->author = $user->id; // deprecated - $object->note = GETPOST('note'); - $object->statut = 0; - - $id = $object->create_from($user); - } else { - setEventMessage($langs->trans("ErrorFailedToCopyProposal", GETPOST('copie_askpricesupplier')), 'errors'); - } - } else { - $object->ref = GETPOST('ref'); - $object->date_livraison = $date_delivery; - $object->demand_reason_id = GETPOST('demand_reason_id'); - $object->shipping_method_id = GETPOST('shipping_method_id', 'int'); - $object->cond_reglement_id = GETPOST('cond_reglement_id'); - $object->mode_reglement_id = GETPOST('mode_reglement_id'); - $object->fk_account = GETPOST('fk_account', 'int'); - $object->fk_project = GETPOST('projectid'); - $object->modelpdf = GETPOST('model'); - $object->author = $user->id; // deprecated - $object->note = GETPOST('note'); - - $object->origin = GETPOST('origin'); - $object->origin_id = GETPOST('originid'); - - for($i = 1; $i <= $conf->global->PRODUCT_SHOW_WHEN_CREATE; $i ++) - { - if ($_POST['idprod' . $i]) { - $xid = 'idprod' . $i; - $xqty = 'qty' . $i; - $xremise = 'remise' . $i; - $object->add_product($_POST[$xid], $_POST[$xqty], $_POST[$xremise]); - } - } - - // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); - if ($ret < 0) { - $error ++; - $action = 'create'; - } - } - - if (! $error) - { - if ($origin && $originid) - { - $element = 'comm/askpricesupplier'; - $subelement = 'askpricesupplier'; - - $object->origin = $origin; - $object->origin_id = $originid; - - // Possibility to add external linked objects with hooks - $object->linked_objects [$object->origin] = $object->origin_id; - if (is_array($_POST['other_linked_objects']) && ! empty($_POST['other_linked_objects'])) { - $object->linked_objects = array_merge($object->linked_objects, $_POST['other_linked_objects']); - } - - $id = $object->create($user); - if ($id > 0) - { - dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); - - $classname = ucfirst($subelement); - $srcobject = new $classname($db); - - dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines"); - $result = $srcobject->fetch($object->origin_id); - - if ($result > 0) - { - $lines = $srcobject->lines; - if (empty($lines) && method_exists($srcobject, 'fetch_lines')) - { - $srcobject->fetch_lines(); - $lines = $srcobject->lines; - } - - $fk_parent_line=0; - $num=count($lines); - for ($i=0;$i<$num;$i++) - { - $label=(! empty($lines[$i]->label)?$lines[$i]->label:''); - $desc=(! empty($lines[$i]->desc)?$lines[$i]->desc:$lines[$i]->libelle); - - // Positive line - $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); - - // Reset fk_parent_line for no child products and special product - if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) { - $fk_parent_line = 0; - } - - // Extrafields - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { - $lines[$i]->fetch_optionals($lines[$i]->rowid); - $array_option = $lines[$i]->array_options; - } - - $tva_tx=get_default_tva($mysoc, $object->thirdparty); - - $result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, 'HT', 0, $lines[$i]->info_bits, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_option); - - if ($result > 0) { - $lineid = $result; - } else { - $lineid = 0; - $error ++; - break; - } - - // Defined the new fk_parent_line - if ($result > 0 && $lines[$i]->product_type == 9) { - $fk_parent_line = $result; - } - } - - // Hooks - $parameters = array('objFrom' => $srcobject); - $reshook = $hookmanager->executeHooks('createFrom', $parameters, $object, $action); // Note that $action and $object may have been - // modified by hook - if ($reshook < 0) - $error ++; - } else { - setEventMessages($srcobject->error, $srcobject->errors, 'errors'); - $error ++; - } - } else { - setEventMessages($object->error, $object->errors, 'errors'); - $error ++; - } - } // Standard creation - else - { - $id = $object->create($user); - } - - if ($id > 0) - { - if (! $error) - { - $db->commit(); - - // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { - $outputlangs = $langs; - $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (! empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - $model=$object->modelpdf; - - $ret = $object->fetch($id); // Reload to get new records - $result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db,$result); - } - - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); - exit(); - } - else - { - $db->rollback(); - $action='create'; - } - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - $db->rollback(); - $action='create'; - } - } - } - } - - // Reopen proposal - else if ($action == 'confirm_reopen' && $user->rights->askpricesupplier->cloturer && ! GETPOST('cancel')) { - // prevent browser refresh from reopening proposal several times - if ($object->statut == 2 || $object->statut == 3 || $object->statut == 4) { - $object->reopen($user, 1); - } - } - - // Close proposal - else if ($action == 'setstatut' && $user->rights->askpricesupplier->cloturer && ! GETPOST('cancel')) { - if (! GETPOST('statut')) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentities("CloseAs")), 'errors'); - $action = 'statut'; - } else { - // prevent browser refresh from closing proposal several times - if ($object->statut == 1) { - $object->cloture($user, GETPOST('statut'), GETPOST('note')); - } - } - } - - include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; - - - /* - * Send mail - */ - - // Actions to send emails - $actiontypecode='AC_ASKPRICE'; - $trigger_name='ASKPRICESUPPLIER_SENTBYMAIL'; - $paramname='id'; - $mode='emailfromaskpricesupplier'; - include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; - - - - // Go back to draft - if ($action == 'modif' && $user->rights->askpricesupplier->creer) - { - $object->set_draft($user); - - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { - // Define output language - $outputlangs = $langs; - if (! empty($conf->global->MAIN_MULTILANGS)) { - $outputlangs = new Translate("", $conf); - $newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang); - $outputlangs->setDefaultLang($newlang); - } - $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - } - } - - else if ($action == "setabsolutediscount" && $user->rights->askpricesupplier->creer) { - if ($_POST["remise_id"]) { - if ($object->id > 0) { - $result = $object->insert_discount($_POST["remise_id"]); - if ($result < 0) { - setEventMessage($object->error, 'errors'); - } - } - } - } - - // Add line - else if ($action == 'addline' && $user->rights->askpricesupplier->creer) { - - // Set if we used free entry or predefined product - $predef=''; - $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); - $price_ht = GETPOST('price_ht'); - - if (GETPOST('prod_entry_mode') == 'free') - { - $idprod=0; - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); - } - else - { - $idprod=GETPOST('idprod', 'int'); - $tva_tx = ''; - } - - $qty = GETPOST('qty' . $predef); - $remise_percent = GETPOST('remise_percent' . $predef); - - // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef); - // Unset extrafield - if (is_array($extralabelsline)) { - // Get extra fields - foreach ($extralabelsline as $key => $value) { - unset($_POST["options_" . $key]); - } - } - - if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && GETPOST('type') < 0) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), 'errors'); - $error ++; - } - - if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && $price_ht == '') // Unit price can be 0 but not ''. Also price can be negative for proposal. - { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), 'errors'); - $error ++; - } - if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && empty($product_desc)) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")), 'errors'); - $error ++; - } - - if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) { - $pu_ht = 0; - $pu_ttc = 0; - $price_min = 0; - $price_base_type = (GETPOST('price_base_type', 'alpha') ? GETPOST('price_base_type', 'alpha') : 'HT'); - - $db->begin(); - - // Ecrase $pu par celui du produit - // Ecrase $desc par celui du produit - // Ecrase $txtva par celui du produit - if (! empty($idprod)) { - $prod = new Product($db); - $prod->fetch($idprod); - - $label = ((GETPOST('product_label') && GETPOST('product_label') != $prod->label) ? GETPOST('product_label') : ''); - - // If prices fields are update - $tva_tx = get_default_tva($mysoc, $object->thirdparty, $prod->id); - $tva_npr = get_default_npr($mysoc, $object->thirdparty, $prod->id); - - //On garde le prix indiqué dans l'input pour la demande de prix fournisseur - //$pu_ht = $prod->price; - $pu_ht = price2num($price_ht, 'MU'); - //$pu_ttc = $prod->price_ttc; - $pu_ttc = price2num($pu_ht * (1 + ($tva_tx / 100)), 'MU'); - - $price_min = $prod->price_min; - $price_base_type = $prod->price_base_type; - - // On defini prix unitaire - if (! empty($conf->global->PRODUIT_MULTIPRICES) && $object->thirdparty->price_level) - { - $pu_ht = $prod->multiprices[$object->thirdparty->price_level]; - $pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level]; - $price_min = $prod->multiprices_min[$object->thirdparty->price_level]; - $price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level]; - if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->thirdparty->price_level]; - if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->thirdparty->price_level]; - } - elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) - { - require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; - - $prodcustprice = new Productcustomerprice($db); - - $filter = array('t.fk_product' => $prod->id,'t.fk_soc' => $object->thirdparty->id); - - $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); - if ($result) { - if (count($prodcustprice->lines) > 0) { - $pu_ht = price($prodcustprice->lines [0]->price); - $pu_ttc = price($prodcustprice->lines [0]->price_ttc); - $price_base_type = $prodcustprice->lines [0]->price_base_type; - $prod->tva_tx = $prodcustprice->lines [0]->tva_tx; - } - } - } - - // if price ht is forced (ie: calculated by margin rate and cost price) - if (! empty($price_ht)) { - $pu_ht = price2num($price_ht, 'MU'); - $pu_ttc = price2num($pu_ht * (1 + ($tva_tx / 100)), 'MU'); - } - - // On reevalue prix selon taux tva car taux tva transaction peut etre different - // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). - elseif ($tva_tx != $prod->tva_tx) { - if ($price_base_type != 'HT') { - $pu_ht = price2num($pu_ttc / (1 + ($tva_tx / 100)), 'MU'); - } else { - $pu_ttc = price2num($pu_ht * (1 + ($tva_tx / 100)), 'MU'); - } - } - - $desc = ''; - - // Define output language - if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { - $outputlangs = $langs; - $newlang = ''; - if (empty($newlang) && GETPOST('lang_id')) - $newlang = GETPOST('lang_id'); - if (empty($newlang)) - $newlang = $object->thirdparty->default_lang; - if (! empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - - $desc = (! empty($prod->multilangs [$outputlangs->defaultlang] ["description"])) ? $prod->multilangs [$outputlangs->defaultlang] ["description"] : $prod->description; - } else { - $desc = $prod->description; - } - - $desc = dol_concatdesc($desc, $product_desc); - - // Add custom code and origin country into description - if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code))) { - $tmptxt = '('; - if (! empty($prod->customcode)) - $tmptxt .= $langs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode; - if (! empty($prod->customcode) && ! empty($prod->country_code)) - $tmptxt .= ' - '; - if (! empty($prod->country_code)) - $tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $langs, 0); - $tmptxt .= ')'; - $desc = dol_concatdesc($desc, $tmptxt); - } - - $type = $prod->type; - } else { - $pu_ht = price2num($price_ht, 'MU'); - $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); - $tva_npr = (preg_match('/\*/', $tva_tx) ? 1 : 0); - $tva_tx = str_replace('*', '', $tva_tx); - $label = (GETPOST('product_label') ? GETPOST('product_label') : ''); - $desc = $product_desc; - $type = GETPOST('type'); - } - - // Margin - $fournprice = (GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : ''); - $buyingprice = (GETPOST('buying_price' . $predef) ? GETPOST('buying_price' . $predef) : ''); - - // Local Taxes - $localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty); - $localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty); - - $info_bits = 0; - if ($tva_npr) - $info_bits |= 0x01; - - if (! empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min))) { - $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)); - setEventMessage($mesg, 'errors'); - } else { - // Insert line - $ref_fourn = GETPOST('fourn_ref'); - $result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $pu_ttc, $info_bits, $type, - 1, 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_option, $ref_fourn); - - if ($result > 0) { - $db->commit(); - - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - // Define output language - $outputlangs = $langs; - if (! empty($conf->global->MAIN_MULTILANGS)) { - $outputlangs = new Translate("", $conf); - $newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang); - $outputlangs->setDefaultLang($newlang); - } - $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - } - - unset($_POST['prod_entry_mode']); - - unset($_POST['qty']); - unset($_POST['type']); - unset($_POST['remise_percent']); - unset($_POST['price_ht']); - unset($_POST['price_ttc']); - unset($_POST['tva_tx']); - unset($_POST['product_ref']); - unset($_POST['product_label']); - unset($_POST['product_desc']); - unset($_POST['fournprice']); - unset($_POST['buying_price']); - unset($_POST['np_marginRate']); - unset($_POST['np_markRate']); - unset($_POST['dp_desc']); - unset($_POST['idprod']); - - } else { - $db->rollback(); - - setEventMessage($object->error, 'errors'); - } - } - } - } - - // Mise a jour d'une ligne dans la demande de prix - else if ($action == 'updateligne' && $user->rights->askpricesupplier->creer && GETPOST('save') == $langs->trans("Save")) { - // Define info_bits - $info_bits = 0; - if (preg_match('/\*/', GETPOST('tva_tx'))) - $info_bits |= 0x01; - - // Clean parameters - $description = dol_htmlcleanlastbr(GETPOST('product_desc')); - - // Define vat_rate - $vat_rate = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); - $vat_rate = str_replace('*', '', $vat_rate); - $localtax1_rate = get_localtax($vat_rate, 1, $object->thirdparty); - $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty); - $pu_ht = GETPOST('price_ht') ? GETPOST('price_ht') : 0; - - // Add buying price - $fournprice = (GETPOST('fournprice') ? GETPOST('fournprice') : ''); - $buyingprice = (GETPOST('buying_price') ? GETPOST('buying_price') : ''); - - // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline); - // Unset extrafield - if (is_array($extralabelsline)) { - // Get extra fields - foreach ($extralabelsline as $key => $value) { - unset($_POST["options_" . $key]); - } - } - - // Define special_code for special lines - $special_code=GETPOST('special_code'); - if (! GETPOST('qty')) $special_code=3; - - // Check minimum price - $productid = GETPOST('productid', 'int'); - if (! empty($productid)) { - $product = new Product($db); - $res = $product->fetch($productid); - - $type = $product->type; - - $price_min = $product->price_min; - if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->thirdparty->price_level)) - $price_min = $product->multiprices_min [$object->thirdparty->price_level]; - - $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); - - if ($price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min))) { - setEventMessage($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), 'errors'); - $error ++; - } - } else { - $type = GETPOST('type'); - $label = (GETPOST('product_label') ? GETPOST('product_label') : ''); - - // Check parameters - if (GETPOST('type') < 0) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), 'errors'); - $error ++; - } - } - - if (! $error) { - $db->begin(); - $ref_fourn = GETPOST('fourn_ref'); - $result = $object->updateline(GETPOST('lineid'), $pu_ht, GETPOST('qty'), GETPOST('remise_percent'), $vat_rate, $localtax1_rate, $localtax2_rate, $description, 'HT', $info_bits, $special_code, GETPOST('fk_parent_line'), 0, $fournprice, $buyingprice, $label, $type, $array_option, $ref_fourn); - - if ($result >= 0) { - $db->commit(); - - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - // Define output language - $outputlangs = $langs; - if (! empty($conf->global->MAIN_MULTILANGS)) { - $outputlangs = new Translate("", $conf); - $newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang); - $outputlangs->setDefaultLang($newlang); - } - $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - } - - unset($_POST['qty']); - unset($_POST['type']); - unset($_POST['productid']); - unset($_POST['remise_percent']); - unset($_POST['price_ht']); - unset($_POST['price_ttc']); - unset($_POST['tva_tx']); - unset($_POST['product_ref']); - unset($_POST['product_label']); - unset($_POST['product_desc']); - unset($_POST['fournprice']); - unset($_POST['buying_price']); - } else { - $db->rollback(); - - setEventMessage($object->error, 'errors'); - } - } - } - - else if ($action == 'updateligne' && $user->rights->askpricesupplier->creer && GETPOST('cancel') == $langs->trans('Cancel')) { - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition - exit(); - } - - // Generation doc (depuis lien ou depuis cartouche doc) - else if ($action == 'builddoc' && $user->rights->askpricesupplier->creer) { - if (GETPOST('model')) { - $object->setDocModel($user, GETPOST('model')); - } - - // Define output language - $outputlangs = $langs; - if (! empty($conf->global->MAIN_MULTILANGS)) { - $outputlangs = new Translate("", $conf); - $newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang); - $outputlangs->setDefaultLang($newlang); - } - $ret = $object->fetch($id); // Reload to get new records - $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result <= 0) - { - setEventMessages($object->error, $object->errors, 'errors'); - $action=''; - } - } - - // Remove file in doc form - else if ($action == 'remove_file' && $user->rights->askpricesupplier->creer) { - if ($object->id > 0) { - require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; - - $langs->load("other"); - $upload_dir = $conf->askpricesupplier->dir_output; - $file = $upload_dir . '/' . GETPOST('file'); - $ret = dol_delete_file($file, 0, 0, 0, $object); - if ($ret) - setEventMessage($langs->trans("FileWasRemoved", GETPOST('file'))); - else - setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), 'errors'); - } - } - - // Set project - else if ($action == 'classin' && $user->rights->askpricesupplier->creer) { - $object->setProject($_POST['projectid']); - } - - // Delai de livraison - else if ($action == 'setavailability' && $user->rights->askpricesupplier->creer) { - $result = $object->availability($_POST['availability_id']); - } - - // Conditions de reglement - else if ($action == 'setconditions' && $user->rights->askpricesupplier->creer) { - $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); - } - - else if ($action == 'setremisepercent' && $user->rights->askpricesupplier->creer) { - $result = $object->set_remise_percent($user, $_POST['remise_percent']); - } - - else if ($action == 'setremiseabsolue' && $user->rights->askpricesupplier->creer) { - $result = $object->set_remise_absolue($user, $_POST['remise_absolue']); - } - - // Mode de reglement - else if ($action == 'setmode' && $user->rights->askpricesupplier->creer) { - $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); - } - - /* - * Ordonnancement des lignes - */ - - else if ($action == 'up' && $user->rights->askpricesupplier->creer) { - $object->line_up(GETPOST('rowid')); - - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - // Define output language - $outputlangs = $langs; - if (! empty($conf->global->MAIN_MULTILANGS)) { - $outputlangs = new Translate("", $conf); - $newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang); - $outputlangs->setDefaultLang($newlang); - } - $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - } - - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id . '#' . GETPOST('rowid')); - exit(); - } - - else if ($action == 'down' && $user->rights->askpricesupplier->creer) { - $object->line_down(GETPOST('rowid')); - - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - // Define output language - $outputlangs = $langs; - if (! empty($conf->global->MAIN_MULTILANGS)) { - $outputlangs = new Translate("", $conf); - $newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang); - $outputlangs->setDefaultLang($newlang); - } - $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - } - - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id . '#' . GETPOST('rowid')); - exit(); - } else if ($action == 'update_extras') { - // Fill array 'array_options' with data from update form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute')); - if ($ret < 0) - $error ++; - - if (! $error) { - // Actions on extra fields (by external module or standard code) - $hookmanager->initHooks(array('askpricesupplierdao')); - $parameters = array('id' => $object->id); - $reshook = $hookmanager->executeHooks('insertExtraFields', $parameters, $object, $action); // Note that $action and $object may have been - // modified by - // some hooks - if (empty($reshook)) { - $result = $object->insertExtraFields(); - if ($result < 0) { - $error ++; - } - } else if ($reshook < 0) - $error ++; - } - - if ($error) - $action = 'edit_extras'; - } -} - - -/* - * View - */ - -llxHeader('', $langs->trans('CommRequests'), 'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'); - -$form = new Form($db); -$formother = new FormOther($db); -$formfile = new FormFile($db); -$formaskpricesupplier = new FormAskPriceSupplier($db); -$companystatic = new Societe($db); - -$now = dol_now(); - -// Add new askprice -if ($action == 'create') -{ - print_fiche_titre($langs->trans("NewAskPrice")); - - $soc = new Societe($db); - if ($socid > 0) - $res = $soc->fetch($socid); - - // Load objectsrc - if (! empty($origin) && ! empty($originid)) - { - $element = 'comm/askpricesupplier'; - $subelement = 'askpricesupplier'; - - dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); - - $classname = ucfirst($subelement); - $objectsrc = new $classname($db); - $objectsrc->fetch($originid); - if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) - { - $objectsrc->fetch_lines(); - } - $objectsrc->fetch_thirdparty(); - - $projectid = (! empty($objectsrc->fk_project) ? $objectsrc->fk_project : ''); - $soc = $objectsrc->thirdparty; - - $cond_reglement_id = (! empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(! empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1)); - $mode_reglement_id = (! empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(! empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0)); - $remise_percent = (! empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(! empty($soc->remise_percent)?$soc->remise_percent:0)); - $remise_absolue = (! empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(! empty($soc->remise_absolue)?$soc->remise_absolue:0)); - - // Replicate extrafields - $objectsrc->fetch_optionals($originid); - $object->array_options = $objectsrc->array_options; - - } - - $object = new AskPriceSupplier($db); - - print '
'; - print ''; - print ''; - if ($origin != 'project' && $originid) { - print ''; - print ''; - } - - dol_fiche_head(); - - print ''; - - // Reference - print ''; - - // Third party - print ''; - print ''; - if ($socid > 0) { - print ''; - } else { - print ''; - } - print '' . "\n"; - - // Terms of payment - print ''; - - // Mode of payment - print ''; - - // Bank Account - if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->banque->enabled) { - print ''; - } - - // Shipping Method - if (! empty($conf->expedition->enabled)) { - print ''; - } - - // Delivery date (or manufacturing) - print ''; - print ''; - - - // Model - print ''; - print ''; - print '"; - - // Project - if (! empty($conf->projet->enabled) && $socid > 0) { - - $formproject = new FormProjets($db); - - $projectid = 0; - if ($origin == 'project') - $projectid = ($originid ? $originid : 0); - - print ''; - print ''; - print ''; - } - - - // Other attributes - $parameters = array('colspan' => ' colspan="3"'); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified - // by - // hook - if (empty($reshook) && ! empty($extrafields->attribute_label)) { - print $object->showOptionals($extrafields, 'edit'); - } - - - // Lines from source - if (! empty($origin) && ! empty($originid) && is_object($objectsrc)) - { - // TODO for compatibility - if ($origin == 'contrat') { - // Calcul contrat->price (HT), contrat->total (TTC), contrat->tva - $objectsrc->remise_absolue = $remise_absolue; - $objectsrc->remise_percent = $remise_percent; - $objectsrc->update_price(1, - 1, 1); - } - - print "\n"; - print "\n"; - print '' . "\n"; - print '' . "\n"; - print '' . "\n"; - print ''; - print ''; - - print ''; - print ''; - print '"; - if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0 ) // Localtax1 - { - print '"; - } - - if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 - { - print '"; - } - print '"; - } - - print "
' . $langs->trans('Ref') . '' . $langs->trans("Draft") . '
' . $langs->trans('Supplier') . ''; - print $soc->getNomUrl(1); - print ''; - print ''; - print $form->select_company('', 'socid', 's.fournisseur = 1', 1); - print '
' . $langs->trans('PaymentConditionsShort') . ''; - $form->select_conditions_paiements($soc->cond_reglement_id, 'cond_reglement_id', -1, 1); - print '
' . $langs->trans('PaymentMode') . ''; - $form->select_types_paiements($soc->mode_reglement_id, 'mode_reglement_id'); - print '
' . $langs->trans('BankAccount') . ''; - $form->select_comptes($fk_account, 'fk_account', 0, '', 1); - print '
' . $langs->trans('SendingMethod') . ''; - print $form->selectShippingMethod($shipping_method_id, 'shipping_method_id', '', 1); - print '
' . $langs->trans("DeliveryDate") . ''; - if ($conf->global->DATE_LIVRAISON_WEEK_DELAY != "") { - $tmpdte = time() + ((7 * $conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60); - $syear = date("Y", $tmpdte); - $smonth = date("m", $tmpdte); - $sday = date("d", $tmpdte); - $form->select_date($syear."-".$smonth."-".$sday, 'liv_', '', '', '', "addask"); - } else { - $form->select_date(-1, 'liv_', '', '', '', "addask", 1, 1); - } - print '
' . $langs->trans("DefaultModel") . ''; - $liste = ModelePDFAskPriceSupplier::liste_modeles($db); - print $form->selectarray('model', $liste, ($conf->global->ASKPRICESUPPLIER_ADDON_PDF_ODT_DEFAULT ? $conf->global->ASKPRICESUPPLIER_ADDON_PDF_ODT_DEFAULT : $conf->global->ASKPRICESUPPLIER_ADDON_PDF)); - print "
' . $langs->trans("Project") . ''; - - $numprojet = $formproject->select_projects($soc->id, $projectid); - if ($numprojet == 0) { - $langs->load("projects"); - print '   ' . $langs->trans("AddProject") . ''; - } - print '
' . $langs->trans('CommRequest') . '' . $objectsrc->getNomUrl(1) . '
' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . '
' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . "
' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($objectsrc->total_localtax1) . "
' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2) . "
' . $langs->trans('TotalTTC') . '' . price($objectsrc->total_ttc) . "
\n"; - - - /* - * Combobox pour la fonction de copie - */ - - if (empty($conf->global->ASKPRICESUPPLIER_CLONE_ON_CREATE_PAGE)) print ''; - - if (! empty($conf->global->ASKPRICESUPPLIER_CLONE_ON_CREATE_PAGE) || ! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE)) print '
'; - if (! empty($conf->global->ASKPRICESUPPLIER_CLONE_ON_CREATE_PAGE)) - { - // For backward compatibility - print ''; - print ''; - print ''; - print ''; - - if (! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE)) - print ''; - - print ''; - print ''; - } - - if (! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE)) - { - print ''; - } - if (! empty($conf->global->ASKPRICESUPPLIER_CLONE_ON_CREATE_PAGE) || ! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE)) print '
' . $langs->trans("CopyAskFrom") . ' '; - $liste_ask = array(); - $liste_ask [0] = ''; - - $sql = "SELECT p.rowid as id, p.ref, s.nom"; - $sql .= " FROM " . MAIN_DB_PREFIX . "askpricesupplier p"; - $sql .= ", " . MAIN_DB_PREFIX . "societe s"; - $sql .= " WHERE s.rowid = p.fk_soc"; - $sql .= " AND p.entity = " . $conf->entity; - $sql .= " AND p.fk_statut <> 0"; - $sql .= " ORDER BY Id"; - - $resql = $db->query($sql); - if ($resql) { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) { - $row = $db->fetch_row($resql); - $askPriceSupplierRefAndSocName = $row [1] . " - " . $row [2]; - $liste_ask [$row [0]] = $askPriceSupplierRefAndSocName; - $i ++; - } - print $form->selectarray("copie_askpricesupplier", $liste_ask, 0); - } else { - dol_print_error($db); - } - print '
 
' . $langs->trans("CreateEmptyAsk") . '
'; - if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { - $lib = $langs->trans("ProductsAndServices"); - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - for($i = 1; $i <= $conf->global->PRODUCT_SHOW_WHEN_CREATE; $i ++) { - print ''; - print ''; - print ''; - print ''; - } - print "
' . $lib . '' . $langs->trans("Qty") . '' . $langs->trans("ReductionShort") . '
'; - // multiprix - if ($conf->global->PRODUIT_MULTIPRICES && $soc->price_level) - $form->select_produits('', "idprod" . $i, '', $conf->product->limit_size, $soc->price_level); - else - $form->select_produits('', "idprod" . $i, '', $conf->product->limit_size); - print '%
"; - } - print '
'; - - dol_fiche_end(); - - print '
'; - print ''; - print '     '; - print ''; - print '
'; - - print "
"; - - - // Show origin lines - if (! empty($origin) && ! empty($originid) && is_object($objectsrc)) { - print '
'; - - $title = $langs->trans('ProductsAndServices'); - print_titre($title); - - print ''; - - $objectsrc->printOriginLinesList(); - - print '
'; - } - -} else { - /* - * Show object in view mode - */ - - $soc = new Societe($db); - $soc->fetch($object->socid); - - $head = askpricesupplier_prepare_head($object); - dol_fiche_head($head, 'comm', $langs->trans('CommRequest'), 0, 'askpricesupplier'); - - $formconfirm = ''; - - // Clone confirmation - if ($action == 'clone') { - // Create an array for form - $formquestion = array( - // 'text' => $langs->trans("ConfirmClone"), - // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), - // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => - // 1), - array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', 's.fournisseur=1'))); - // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneAsk'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); - } - - // Confirm delete - else if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteAsk'), $langs->trans('ConfirmDeleteAsk', $object->ref), 'confirm_delete', '', 0, 1); - } - - // Confirm reopen - else if ($action == 'reopen') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenAsk', $object->ref), 'confirm_reopen', '', 0, 1); - } - - // Confirmation delete product/service line - else if ($action == 'ask_deleteline') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); - } - - // Confirm validate askprice - else if ($action == 'validate') { - $error = 0; - - // on verifie si l'objet est en numerotation provisoire - $ref = substr($object->ref, 1, 4); - if ($ref == 'PROV') { - $numref = $object->getNextNumRef($soc); - if (empty($numref)) { - $error ++; - setEventMessage($object->error, 'errors'); - } - } else { - $numref = $object->ref; - } - - $text = $langs->trans('ConfirmValidateAsk', $numref); - if (! empty($conf->notification->enabled)) { - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; - $notify = new Notify($db); - $text .= '
'; - $text .= $notify->confirmMessage('ASKPRICESUPPLIER_VALIDATE', $object->socid, $object); - } - - if (! $error) - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateAsk'), $text, 'confirm_validate', '', 0, 1); - } - - if (! $formconfirm) { - $parameters = array('lineid' => $lineid); - $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if (empty($reshook)) $formconfirm.=$hookmanager->resPrint; - elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint; - } - - // Print form confirm - print $formconfirm; - - print ''; - - $linkback = '' . $langs->trans("BackToList") . ''; - - // Ref - print ''; - - // Company - print ''; - print ''; - - // Payment term - print ''; - print ''; - - // Delivery date - $langs->load('deliveries'); - print ''; - print ''; - - // Payment mode - print ''; - print ''; - - // Project - if (! empty($conf->projet->enabled)) { - $langs->load("projects"); - print ''; - } else { - print '
' . $langs->trans('Ref') . ''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); - print '
' . $langs->trans('Supplier') . '' . $soc->getNomUrl(1) . '
'; - print ''; - if ($action != 'editconditions' && ! empty($object->brouillon)) - print ''; - print '
'; - print $langs->trans('PaymentConditionsShort'); - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetConditions'), 1) . '
'; - print '
'; - if ($action == 'editconditions') { - $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id', 1); - } else { - $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'none', 1); - } - print '
'; - print ''; - if ($action != 'editdate_livraison' && ! empty($object->brouillon)) - print ''; - print '
'; - print $langs->trans('DeliveryDate'); - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetDeliveryDate'), 1) . '
'; - print '
'; - if ($action == 'editdate_livraison') { - print '
'; - print ''; - print ''; - $form->select_date($object->date_livraison, 'liv_', '', '', '', "editdate_livraison"); - print ''; - print '
'; - } else { - print dol_print_date($object->date_livraison, 'daytext'); - } - print '
'; - print ''; - if ($action != 'editmode' && ! empty($object->brouillon)) - print ''; - print '
'; - print $langs->trans('PaymentMode'); - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . '
'; - print '
'; - if ($action == 'editmode') { - $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id'); - } else { - $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'none'); - } - print '
'; - print ''; - if ($user->rights->askpricesupplier->creer) { - if ($action != 'classify') - print ''; - print '
'; - print $langs->trans('Project') . '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '
'; - print '
'; - if ($action == 'classify') { - $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid'); - } else { - $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none'); - } - print '
'; - if (! empty($object->fk_project)) { - print ''; - $proj = new Project($db); - $proj->fetch($object->fk_project); - print ''; - print $proj->ref; - print ''; - print ''; - } else { - print ' '; - } - } - print ''; - } - - - if ($soc->outstanding_limit) - { - // Outstanding Bill - print ''; - print $langs->trans('OutstandingBill'); - print ''; - print price($soc->get_OutstandingBill()) . ' / '; - print price($soc->outstanding_limit, 0, '', 1, - 1, - 1, $conf->currency); - print ''; - print ''; - } - - if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->banque->enabled) - { - // Bank Account - print ''; - print ''; - if ($action != 'editbankaccount' && $user->rights->askpricesupplier->creer) - print ''; - print '
'; - print $langs->trans('BankAccount'); - print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; - print ''; - if ($action == 'editbankaccount') { - $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); - } else { - $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); - } - print ''; - print ''; - } - - // Other attributes - $cols = 3; - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; - - // Amount HT - print '' . $langs->trans('AmountHT') . ''; - print '' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . ''; - print ''; - - // Margin Infos - if (! empty($conf->margin->enabled)) { - print ''; - $object->displayMarginInfos(); - print ''; - } - print ''; - - // Amount VAT - print '' . $langs->trans('AmountVAT') . ''; - print '' . price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency) . ''; - print ''; - - // Amount Local Taxes - if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1 - { - print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ''; - print '' . price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency) . ''; - print ''; - } - if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2 - { - print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ''; - print '' . price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency) . ''; - print ''; - } - - // Amount TTC - print '' . $langs->trans('AmountTTC') . ''; - print '' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . ''; - print ''; - - // Statut - print '' . $langs->trans('Status') . '' . $object->getLibStatut(4) . ''; - - print '
'; - - if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { - $blocname = 'contacts'; - $title = $langs->trans('ContactsAddresses'); - include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php'; - } - - if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { - $blocname = 'notes'; - $title = $langs->trans('Notes'); - include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php'; - } - - /* - * Lines - */ - - // Show object lines - $result = $object->getLinesArray(); - - print '
- - - - - '; - - if (! empty($conf->use_javascript_ajax) && $object->statut == 0) { - include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; - } - - print ''; - - if (! empty($object->lines)) - $ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1); - - // Form to add new line - if ($object->statut == 0 && $user->rights->askpricesupplier->creer) - { - if ($action != 'editline') - { - $var = true; - - // Add products/services form - $object->formAddObjectLine(1, $mysoc, $soc); - - $parameters = array(); - $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - } - } - - print '
'; - - print "
\n"; - - dol_fiche_end(); - - if ($action == 'statut') - { - /* - * Form to close proposal (signed or not) - */ - $form_close = '
'; - $form_close .= '

'.$langs->trans('AskPriceSupplierRefFournNotice').'

'; - $form_close .= ''; - $form_close .= ''; - $form_close .= ''; - $form_close .= ''; - $form_close .= ''; - $form_close .= '
' . $langs->trans("CloseAs") . ''; - $form_close .= ''; - $form_close .= ''; - $form_close .= '
' . $langs->trans('Note') . '
'; - $form_close .= ''; - $form_close .= '   '; - $form_close .= ' '; - $form_close .= '
'; - - print $form_close; - } - - /* - * Boutons Actions - */ - if ($action != 'presend') { - print '
'; - - $parameters = array(); - $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been - // modified by hook - if (empty($reshook)) - { - if ($action != 'statut' && $action != 'editline') - { - // Validate - if ($object->statut == 0 && $object->total_ttc >= 0 && count($object->lines) > 0 && - ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->askpricesupplier->creer)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->askpricesupplier->validate))) - ) { - if (count($object->lines) > 0) - print ''; - // else print ''.$langs->trans('Validate').''; - } - - // Edit - if ($object->statut == 1 && $user->rights->askpricesupplier->creer) { - print ''; - } - - // ReOpen - if (($object->statut == 2 || $object->statut == 3 || $object->statut == 4) && $user->rights->askpricesupplier->cloturer) { - print ''; - } - - // Send - if ($object->statut == 1 || $object->statut == 2) { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->askpricesupplier->send) { - print ''; - } else - print ''; - } - - // Create an order - if (! empty($conf->commande->enabled) && $object->statut == 2) { - if ($user->rights->fournisseur->commande->creer) { - print ''; - } - } - - // Close - if ($object->statut == 1 && $user->rights->askpricesupplier->cloturer) { - print ''; - } - - // Clone - if ($user->rights->askpricesupplier->creer) { - print ''; - } - - // Delete - if ($user->rights->askpricesupplier->supprimer) { - print ''; - } - } - } - - print '
'; - } - print "
\n"; - - if ($action != 'presend') - { - print '
'; - - /* - * Documents generes - */ - $filename = dol_sanitizeFileName($object->ref); - $filedir = $conf->askpricesupplier->dir_output . "/" . dol_sanitizeFileName($object->ref); - $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; - $genallowed = $user->rights->askpricesupplier->creer; - $delallowed = $user->rights->askpricesupplier->supprimer; - - $var = true; - - $somethingshown = $formfile->show_documents('askpricesupplier', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang); - - // Linked object block - $somethingshown = $form->showLinkedObjectBlock($object); - - // Show links to link elements - //$linktoelem = $form->showLinkToObjectBlock($object); - //if ($linktoelem) print '
'.$linktoelem; - - print '
'; - - // List of actions on element - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; - $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'askpricesupplier', $socid); - - print '
'; - } - - /* - * Action presend - */ - if (GETPOST('modelselected')) { - $action = 'presend'; - } - if ($action == 'presend') - { - $object->fetch_projet(); - - $ref = dol_sanitizeFileName($object->ref); - include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; - $fileparams = dol_most_recent_file($conf->askpricesupplier->dir_output . '/' . $ref, preg_quote($ref, '/').'[^\-]+'); - $file = $fileparams['fullname']; - - // Define output language - $outputlangs = $langs; - $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) - $newlang = $_REQUEST['lang_id']; - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) - $newlang = $object->thirdparty->default_lang; - - if (!empty($newlang)) - { - $outputlangs = new Translate('', $conf); - $outputlangs->setDefaultLang($newlang); - $outputlangs->load('commercial'); - } - - // Build document if it not exists - if (! $file || ! is_readable($file)) { - $result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result <= 0) - { - dol_print_error($db, $object->error, $object->errors); - exit(); - } - $fileparams = dol_most_recent_file($conf->askpricesupplier->dir_output . '/' . $ref, preg_quote($ref, '/').'[^\-]+'); - $file = $fileparams['fullname']; - } - - print '
'; - print '
'; - print_fiche_titre($langs->trans('SendAskByMail')); - - dol_fiche_head(''); - - // Create form object - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php'; - $formmail = new FormMail($db); - $formmail->param['langsmodels']=(empty($newlang)?$langs->defaultlang:$newlang); - $formmail->fromtype = 'user'; - $formmail->fromid = $user->id; - $formmail->fromname = $user->getFullName($langs); - $formmail->frommail = $user->email; - $formmail->withfrom = 1; - $liste = array(); - foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key => $value) - $liste [$key] = $value; - $formmail->withto = GETPOST("sendto") ? GETPOST("sendto") : $liste; - $formmail->withtocc = $liste; - $formmail->withtoccc = (! empty($conf->global->MAIN_EMAIL_USECCC) ? $conf->global->MAIN_EMAIL_USECCC : false); - - $formmail->withtopic = $outputlangs->trans('SendAskRef', '__ASKREF__'); - - $formmail->withfile = 2; - $formmail->withbody = 1; - $formmail->withdeliveryreceipt = 1; - $formmail->withcancel = 1; - - // Tableau des substitutions - $formmail->substit['__ASKREF__'] = $object->ref; - $formmail->substit['__SIGNATURE__'] = $user->signature; - $formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name; - $formmail->substit['__PROJECT_REF__'] = (is_object($object->projet)?$object->projet->ref:''); - $formmail->substit['__CONTACTCIVNAME__'] = ''; - $formmail->substit['__PERSONALIZED__'] = ''; - - // Tableau des parametres complementaires - $formmail->param['action'] = 'send'; - $formmail->param['models'] = 'askpricesupplier_send'; - $formmail->param['models_id']=GETPOST('modelmailselected','int'); - $formmail->param['id'] = $object->id; - $formmail->param['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id; - // Init list of files - if (GETPOST("mode") == 'init') { - $formmail->clear_attached_files(); - $formmail->add_attached_files($file, basename($file), dol_mimetype($file)); - } - - print $formmail->get_form(); - - dol_fiche_end(); - } -} - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/comm/askpricesupplier/class/askpricesupplier.class.php b/htdocs/comm/askpricesupplier/class/askpricesupplier.class.php deleted file mode 100644 index 957ea33f60c..00000000000 --- a/htdocs/comm/askpricesupplier/class/askpricesupplier.class.php +++ /dev/null @@ -1,2956 +0,0 @@ - - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley - * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2008 Raphael Bertrand - * Copyright (C) 2010-2015 Juanjo Menent - * Copyright (C) 2010-2011 Philippe Grand - * Copyright (C) 2012-2014 Christophe Battarel - * Copyright (C) 2013 Florian Henry - * Copyright (C) 2014 Marcos García - * - * 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 3 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, see . - */ - -/** - * \file htdocs/comm/propal/class/propal.class.php - * \brief File of class to manage proposals - */ - -require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.product.class.php'; -require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; -require_once DOL_DOCUMENT_ROOT .'/product/class/product.class.php'; -require_once DOL_DOCUMENT_ROOT .'/contact/class/contact.class.php'; -require_once DOL_DOCUMENT_ROOT .'/margin/lib/margins.lib.php'; - -/** - * Class to manage price ask supplier - */ -class AskPriceSupplier extends CommonObject -{ - public $element='askpricesupplier'; - public $table_element='askpricesupplier'; - public $table_element_line='askpricesupplierdet'; - public $fk_element='fk_askpricesupplier'; - protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - - /** - * {@inheritdoc} - */ - protected $table_ref_field = 'ref'; - - var $id; - - var $socid; // Id client - var $client; // Objet societe client (a charger par fetch_client) - - var $fk_project; - /** - * @deprecated - * @see user_author_id - */ - var $author; - var $ref; - var $ref_fourn; //Reference saisie lors de l'ajout d'une ligne à la demande - var $statut; // 0 (draft), 1 (validated), 2 (signed), 3 (not signed), 4 (billed) - var $date; // Date of proposal - var $date_livraison; - - /** - * @deprecated - * @see date_creation - */ - var $datec; - - /** - * Creation date - * @var int - */ - public $date_creation; - - /** - * @deprecated - * @see date_validation - */ - var $datev; - - /** - * Validation date - * @var int - */ - public $date_validation; - - - var $user_author_id; - var $user_valid_id; - var $user_close_id; - - var $total_ht; // Total net of tax - var $total_tva; // Total VAT - var $total_localtax1; // Total Local Taxes 1 - var $total_localtax2; // Total Local Taxes 2 - var $total_ttc; // Total with tax - - /** - * @deprecated - * @see price_ht - */ - var $price; - /** - * @deprecated - * @see total_tva - */ - var $tva; - /** - * @deprecated - * @see total_ttc - */ - var $total; - - var $cond_reglement_id; - var $cond_reglement_code; - var $fk_account; // Id of bank account - var $mode_reglement_id; - var $mode_reglement_code; - var $remise; - var $remise_percent; - var $remise_absolue; - /** - * @deprecated - * @see note_public, note_private - */ - var $note; - var $note_private; - var $note_public; - var $shipping_method_id; - - var $products=array(); - var $extraparams=array(); - - var $lines = array(); - var $line; - - var $origin; - var $origin_id; - - var $labelstatut=array(); - var $labelstatut_short=array(); - - var $nbtodo; - var $nbtodolate; - - var $specimen; - - - /** - * Constructor - * - * @param DoliDB $db Database handler - * @param int $socid Id third party - * @param int $askpricesupplierid Id askpricesupplier - */ - function __construct($db, $socid="", $askpricesupplierid=0) - { - global $conf,$langs; - - $this->db = $db; - $this->socid = $socid; - $this->id = $askpricesupplierid; - $this->products = array(); - $this->remise = 0; - $this->remise_percent = 0; - $this->remise_absolue = 0; - - $langs->load("askpricesupplier"); - $this->labelstatut[0]=(! empty($conf->global->ASKPRICESUPPLIER_STATUS_DRAFT_LABEL) ? $conf->global->ASKPRICESUPPLIER_STATUS_DRAFT_LABEL : $langs->trans("AskpricesupplierStatusDraft")); - $this->labelstatut[1]=(! empty($conf->global->ASKPRICESUPPLIER_STATUS_VALIDATED_LABEL) ? $conf->global->ASKPRICESUPPLIER_STATUS_VALIDATED_LABEL : $langs->trans("AskpricesupplierStatusValidated")); - $this->labelstatut[2]=(! empty($conf->global->ASKPRICESUPPLIER_STATUS_SIGNED_LABEL) ? $conf->global->ASKPRICESUPPLIER_STATUS_SIGNED_LABEL : $langs->trans("AskpricesupplierStatusSigned")); - $this->labelstatut[3]=(! empty($conf->global->ASKPRICESUPPLIER_STATUS_NOTSIGNED_LABEL) ? $conf->global->ASKPRICESUPPLIER_STATUS_NOTSIGNED_LABEL : $langs->trans("AskpricesupplierStatusNotSigned")); - $this->labelstatut[4]=(! empty($conf->global->ASKPRICESUPPLIER_STATUS_BILLED_LABEL) ? $conf->global->ASKPRICESUPPLIER_STATUS_BILLED_LABEL : $langs->trans("AskpricesupplierStatusBilled")); - $this->labelstatut_short[0]=(! empty($conf->global->ASKPRICESUPPLIER_STATUS_DRAFTSHORT_LABEL) ? $conf->global->ASKPRICESUPPLIER_STATUS_DRAFTSHORT_LABEL : $langs->trans("AskpricesupplierStatusDraftShort")); - $this->labelstatut_short[1]=(! empty($conf->global->ASKPRICESUPPLIER_STATUS_VALIDATEDSHORT_LABEL) ? $conf->global->ASKPRICESUPPLIER_STATUS_VALIDATEDSHORT_LABEL : $langs->trans("Opened")); - $this->labelstatut_short[2]=(! empty($conf->global->ASKPRICESUPPLIER_STATUS_SIGNEDSHORT_LABEL) ? $conf->global->ASKPRICESUPPLIER_STATUS_SIGNEDSHORT_LABEL : $langs->trans("AskpricesupplierStatusSignedShort")); - $this->labelstatut_short[3]=(! empty($conf->global->ASKPRICESUPPLIER_STATUS_NOTSIGNEDSHORT_LABEL) ? $conf->global->ASKPRICESUPPLIER_STATUS_NOTSIGNEDSHORT_LABEL : $langs->trans("AskpricesupplierStatusNotSignedShort")); - $this->labelstatut_short[4]=(! empty($conf->global->ASKPRICESUPPLIER_STATUS_BILLEDSHORT_LABEL) ? $conf->global->ASKPRICESUPPLIER_STATUS_BILLEDSHORT_LABEL : $langs->trans("AskpricesupplierStatusBilledShort")); - } - - - /** - * Add line into array products - * $this->client doit etre charge - * - * @param int $idproduct Product Id to add - * @param int $qty Quantity - * @param int $remise_percent Discount effected on Product - * @return int <0 if KO, >0 if OK - * - * TODO Remplacer les appels a cette fonction par generation objet Ligne - * insere dans tableau $this->products - */ - function add_product($idproduct, $qty, $remise_percent=0) - { - global $conf, $mysoc; - - if (! $qty) $qty = 1; - - dol_syslog(get_class($this)."::add_product $idproduct, $qty, $remise_percent"); - if ($idproduct > 0) - { - $prod=new Product($this->db); - $prod->fetch($idproduct); - - $productdesc = $prod->description; - - $tva_tx = get_default_tva($mysoc,$this->client,$prod->id); - // local taxes - $localtax1_tx = get_default_localtax($mysoc,$this->client,1,$prod->tva_tx); - $localtax2_tx = get_default_localtax($mysoc,$this->client,2,$prod->tva_tx); - - // multiprix - if($conf->global->PRODUIT_MULTIPRICES && $this->client->price_level) - { - $price = $prod->multiprices[$this->client->price_level]; - } - else - { - $price = $prod->price; - } - - $line = new AskPriceSupplierLine($this->db); - - $line->fk_product=$idproduct; - $line->desc=$productdesc; - $line->qty=$qty; - $line->subprice=$price; - $line->remise_percent=$remise_percent; - $line->tva_tx=$tva_tx; - - $this->lines[]=$line; - } - } - - /** - * Adding line of fixed discount in the proposal in DB - * - * @param int $idremise Id of fixed discount - * @return int >0 if OK, <0 if KO - */ - function insert_discount($idremise) - { - global $langs; - - include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; - - $this->db->begin(); - - $remise=new DiscountAbsolute($this->db); - $result=$remise->fetch($idremise); - - if ($result > 0) - { - if ($remise->fk_facture) // Protection against multiple submission - { - $this->error=$langs->trans("ErrorDiscountAlreadyUsed"); - $this->db->rollback(); - return -5; - } - - $askpricesupplierligne=new AskPriceSupplierLine($this->db); - $askpricesupplierligne->fk_askpricesupplier=$this->id; - $askpricesupplierligne->fk_remise_except=$remise->id; - $askpricesupplierligne->desc=$remise->description; // Description ligne - $askpricesupplierligne->tva_tx=$remise->tva_tx; - $askpricesupplierligne->subprice=-$remise->amount_ht; - $askpricesupplierligne->fk_product=0; // Id produit predefini - $askpricesupplierligne->qty=1; - $askpricesupplierligne->remise=0; - $askpricesupplierligne->remise_percent=0; - $askpricesupplierligne->rang=-1; - $askpricesupplierligne->info_bits=2; - - // TODO deprecated - $askpricesupplierligne->price=-$remise->amount_ht; - - $askpricesupplierligne->total_ht = -$remise->amount_ht; - $askpricesupplierligne->total_tva = -$remise->amount_tva; - $askpricesupplierligne->total_ttc = -$remise->amount_ttc; - - $result=$askpricesupplierligne->insert(); - if ($result > 0) - { - $result=$this->update_price(1); - if ($result > 0) - { - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - else - { - $this->error=$askpricesupplierligne->error; - $this->db->rollback(); - return -2; - } - } - else - { - $this->db->rollback(); - return -2; - } - } - - /** - * Add a proposal line into database (linked to product/service or not) - * Les parametres sont deja cense etre juste et avec valeurs finales a l'appel - * de cette methode. Aussi, pour le taux tva, il doit deja avoir ete defini - * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,'',produit) - * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue) - * - * @param string $desc Description de la ligne - * @param double $pu_ht Prix unitaire - * @param double $qty Quantite - * @param double $txtva Taux de tva - * @param double $txlocaltax1 Local tax 1 rate - * @param double $txlocaltax2 Local tax 2 rate - * @param int $fk_product Id du produit/service predefini - * @param double $remise_percent Pourcentage de remise de la ligne - * @param string $price_base_type HT or TTC - * @param double $pu_ttc Prix unitaire TTC - * @param int $info_bits Bits de type de lignes - * @param int $type Type of line (product, service) - * @param int $rang Position of line - * @param int $special_code Special code (also used by externals modules!) - * @param int $fk_parent_line Id of parent line - * @param int $fk_fournprice Id supplier price - * @param int $pa_ht Buying price without tax - * @param string $label ??? - * @param array $array_option extrafields array - * @param string $ref_fourn Supplier price reference - * @return int >0 if OK, <0 if KO - * - * @see add_product - */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $pu_ttc=0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$array_option=0, $ref_fourn='') - { - global $mysoc; - - dol_syslog(get_class($this)."::addline askpricesupplierid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_except=$remise_percent, price_base_type=$price_base_type, pu_ttc=$pu_ttc, info_bits=$info_bits, type=$type"); - include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - - // Clean parameters - if (empty($remise_percent)) $remise_percent=0; - if (empty($qty)) $qty=0; - if (empty($info_bits)) $info_bits=0; - if (empty($rang)) $rang=0; - if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0; - - $remise_percent=price2num($remise_percent); - $qty=price2num($qty); - $pu_ht=price2num($pu_ht); - $pu_ttc=price2num($pu_ttc); - $txtva=price2num($txtva); - $txlocaltax1=price2num($txlocaltax1); - $txlocaltax2=price2num($txlocaltax2); - $pa_ht=price2num($pa_ht); - if ($price_base_type=='HT') - { - $pu=$pu_ht; - } - else - { - $pu=$pu_ttc; - } - - // Check parameters - if ($type < 0) return -1; - - if ($this->statut == 0) - { - $this->db->begin(); - - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - - $localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty,$mysoc); - - $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, '', $localtaxes_type); - $total_ht = $tabprice[0]; - $total_tva = $tabprice[1]; - $total_ttc = $tabprice[2]; - $total_localtax1 = $tabprice[9]; - $total_localtax2 = $tabprice[10]; - - // Rang to use - $rangtouse = $rang; - if ($rangtouse == -1) - { - $rangmax = $this->line_max($fk_parent_line); - $rangtouse = $rangmax + 1; - } - - // TODO A virer - // Anciens indicateurs: $price, $remise (a ne plus utiliser) - $price = $pu; - $remise = 0; - if ($remise_percent > 0) - { - $remise = round(($pu * $remise_percent / 100), 2); - $price = $pu - $remise; - } - - // Insert line - $this->line=new AskPriceSupplierLine($this->db); - - $this->line->fk_askpricesupplier=$this->id; - $this->line->label=$label; - $this->line->desc=$desc; - $this->line->qty=$qty; - $this->line->tva_tx=$txtva; - $this->line->localtax1_tx=$txlocaltax1; - $this->line->localtax2_tx=$txlocaltax2; - $this->line->localtax1_type = $localtaxes_type[0]; - $this->line->localtax2_type = $localtaxes_type[2]; - $this->line->fk_product=$fk_product; - $this->line->remise_percent=$remise_percent; - $this->line->subprice=$pu_ht; - $this->line->rang=$rangtouse; - $this->line->info_bits=$info_bits; - $this->line->total_ht=$total_ht; - $this->line->total_tva=$total_tva; - $this->line->total_localtax1=$total_localtax1; - $this->line->total_localtax2=$total_localtax2; - $this->line->total_ttc=$total_ttc; - $this->line->product_type=$type; - $this->line->special_code=$special_code; - $this->line->fk_parent_line=$fk_parent_line; - - $this->line->ref_fourn = $this->db->escape($ref_fourn); - - // infos marge - if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) { - // by external module, take lowest buying price - include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; - $productFournisseur = new ProductFournisseur($this->db); - $productFournisseur->find_min_price_product_fournisseur($fk_product); - $this->line->fk_fournprice = $productFournisseur->product_fourn_price_id; - } else { - $this->line->fk_fournprice = $fk_fournprice; - } - $this->line->pa_ht = $pa_ht; - - // Mise en option de la ligne - if (empty($qty) && empty($special_code)) $this->line->special_code=3; - - // TODO deprecated - $this->line->price=$price; - $this->line->remise=$remise; - - if (is_array($array_option) && count($array_option)>0) { - $this->line->array_options=$array_option; - } - - $result=$this->line->insert(); - if ($result > 0) - { - // Reorder if child line - if (! empty($fk_parent_line)) $this->line_order(true,'DESC'); - - // Mise a jour informations denormalisees au niveau de la propale meme - $result=$this->update_price(1,'auto'); // This method is designed to add line from user input so total calculation must be done using 'auto' mode. - if ($result > 0) - { - $this->db->commit(); - return $this->line->rowid; - } - else - { - $this->error=$this->db->error(); - $this->db->rollback(); - return -1; - } - } - else - { - $this->error=$this->line->error; - $this->db->rollback(); - return -2; - } - } - } - - - /** - * Update a proposal line - * - * @param int $rowid Id de la ligne - * @param double $pu Prix unitaire (HT ou TTC selon price_base_type) - * @param double $qty Quantity - * @param double $remise_percent Remise effectuee sur le produit - * @param double $txtva Taux de TVA - * @param double $txlocaltax1 Local tax 1 rate - * @param double $txlocaltax2 Local tax 2 rate - * @param string $desc Description - * @param double $price_base_type HT ou TTC - * @param int $info_bits Miscellaneous informations - * @param int $special_code Special code (also used by externals modules!) - * @param int $fk_parent_line Id of parent line (0 in most cases, used by modules adding sublevels into lines). - * @param int $skip_update_total Keep fields total_xxx to 0 (used for special lines by some modules) - * @param int $fk_fournprice Id of origin supplier price - * @param int $pa_ht Price (without tax) of product when it was bought - * @param string $label ??? - * @param int $type 0/1=Product/service - * @param array $array_option extrafields array - * @param string $ref_fourn Supplier price reference - * @return int 0 if OK, <0 if KO - */ - function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0, $txlocaltax2=0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $array_option=0, $ref_fourn='') - { - global $conf,$user,$langs, $mysoc; - - dol_syslog(get_class($this)."::updateLine $rowid, $pu, $qty, $remise_percent, $txtva, $desc, $price_base_type, $info_bits"); - include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - - // Clean parameters - $remise_percent=price2num($remise_percent); - $qty=price2num($qty); - $pu = price2num($pu); - $txtva = price2num($txtva); - $txlocaltax1=price2num($txlocaltax1); - $txlocaltax2=price2num($txlocaltax2); - $pa_ht=price2num($pa_ht); - if (empty($qty) && empty($special_code)) $special_code=3; // Set option tag - if (! empty($qty) && $special_code == 3) $special_code=0; // Remove option tag - - if ($this->statut == 0) - { - $this->db->begin(); - - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - - $localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty,$mysoc); - - $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type,'', $localtaxes_type); - $total_ht = $tabprice[0]; - $total_tva = $tabprice[1]; - $total_ttc = $tabprice[2]; - $total_localtax1 = $tabprice[9]; - $total_localtax2 = $tabprice[10]; - - // Anciens indicateurs: $price, $remise (a ne plus utiliser) - $price = $pu; - if ($remise_percent > 0) - { - $remise = round(($pu * $remise_percent / 100), 2); - $price = $pu - $remise; - } - - // Update line - $this->line=new AskPriceSupplierLine($this->db); - - // Stock previous line records - $staticline=new AskPriceSupplierLine($this->db); - $staticline->fetch($rowid); - $this->line->oldline = $staticline; - - // Reorder if fk_parent_line change - if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line) - { - $rangmax = $this->line_max($fk_parent_line); - $this->line->rang = $rangmax + 1; - } - - $this->line->rowid = $rowid; - $this->line->label = $label; - $this->line->desc = $desc; - $this->line->qty = $qty; - $this->line->product_type = $type; - $this->line->tva_tx = $txtva; - $this->line->localtax1_tx = $txlocaltax1; - $this->line->localtax2_tx = $txlocaltax2; - $this->line->localtax1_type = $localtaxes_type[0]; - $this->line->localtax2_type = $localtaxes_type[2]; - $this->line->remise_percent = $remise_percent; - $this->line->subprice = $pu; - $this->line->info_bits = $info_bits; - $this->line->total_ht = $total_ht; - $this->line->total_tva = $total_tva; - $this->line->total_localtax1 = $total_localtax1; - $this->line->total_localtax2 = $total_localtax2; - $this->line->total_ttc = $total_ttc; - $this->line->special_code = $special_code; - $this->line->fk_parent_line = $fk_parent_line; - $this->line->skip_update_total = $skip_update_total; - $this->line->ref_fourn = $ref_fourn; - - // infos marge - if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) { - // by external module, take lowest buying price - include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; - $productFournisseur = new ProductFournisseur($this->db); - $productFournisseur->find_min_price_product_fournisseur($fk_product); - $this->line->fk_fournprice = $productFournisseur->product_fourn_price_id; - } else { - $this->line->fk_fournprice = $fk_fournprice; - } - $this->line->pa_ht = $pa_ht; - - // TODO deprecated - $this->line->price=$price; - $this->line->remise=$remise; - - if (is_array($array_option) && count($array_option)>0) { - $this->line->array_options=$array_option; - } - - $result=$this->line->update(); - if ($result > 0) - { - // Reorder if child line - if (! empty($fk_parent_line)) $this->line_order(true,'DESC'); - - $this->update_price(1); - - $this->fk_askpricesupplier = $this->id; - $this->rowid = $rowid; - - $this->db->commit(); - return $result; - } - else - { - $this->error=$this->db->error(); - $this->db->rollback(); - return -1; - } - } - else - { - dol_syslog(get_class($this)."::updateline Erreur -2 Askpricesupplier en mode incompatible pour cette action"); - return -2; - } - } - - - /** - * Delete detail line - * - * @param int $lineid Id of line to delete - * @return int >0 if OK, <0 if KO - */ - function deleteline($lineid) - { - if ($this->statut == 0) - { - $line=new AskPriceSupplierLine($this->db); - - // For triggers - $line->fetch($lineid); - - if ($line->delete() > 0) - { - $this->update_price(1); - - return 1; - } - else - { - return -1; - } - } - else - { - return -2; - } - } - - - /** - * Create commercial proposal into database - * this->ref can be set or empty. If empty, we will use "(PROVid)" - * - * @param User $user User that create - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers - * @return int <0 if KO, >=0 if OK - */ - function create($user, $notrigger=0) - { - global $langs,$conf,$mysoc,$hookmanager; - $error=0; - - $now=dol_now(); - - dol_syslog(get_class($this)."::create"); - - // Check parameters - $result=$this->fetch_thirdparty(); - if ($result < 0) - { - $this->error="Failed to fetch company"; - dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); - return -3; - } - - // Check parameters - if (! empty($this->ref)) // We check that ref is not already used - { - $result=self::isExistingObject($this->element, 0, $this->ref); // Check ref is not yet used - if ($result > 0) - { - $this->error='ErrorRefAlreadyExists'; - dol_syslog(get_class($this)."::create ".$this->error,LOG_WARNING); - $this->db->rollback(); - return -1; - } - } - - $this->db->begin(); - - // Insert into database - $sql = "INSERT INTO ".MAIN_DB_PREFIX."askpricesupplier ("; - $sql.= "fk_soc"; - $sql.= ", price"; - $sql.= ", remise"; - $sql.= ", remise_percent"; - $sql.= ", remise_absolue"; - $sql.= ", tva"; - $sql.= ", total"; - $sql.= ", datec"; - $sql.= ", ref"; - $sql.= ", fk_user_author"; - $sql.= ", note_private"; - $sql.= ", note_public"; - $sql.= ", model_pdf"; - $sql.= ", fk_cond_reglement"; - $sql.= ", fk_mode_reglement"; - $sql.= ", fk_account"; - $sql.= ", date_livraison"; - $sql.= ", fk_shipping_method"; - $sql.= ", fk_projet"; - $sql.= ", entity"; - $sql.= ") "; - $sql.= " VALUES ("; - $sql.= $this->socid; - $sql.= ", 0"; - $sql.= ", ".$this->remise; - $sql.= ", ".($this->remise_percent?$this->db->escape($this->remise_percent):'null'); - $sql.= ", ".($this->remise_absolue?$this->db->escape($this->remise_absolue):'null'); - $sql.= ", 0"; - $sql.= ", 0"; - $sql.= ", '".$this->db->idate($now)."'"; - $sql.= ", '(PROV)'"; - $sql.= ", ".($user->id > 0 ? "'".$user->id."'":"null"); - $sql.= ", '".$this->db->escape($this->note_private)."'"; - $sql.= ", '".$this->db->escape($this->note_public)."'"; - $sql.= ", '".$this->db->escape($this->modelpdf)."'"; - $sql.= ", ".$this->cond_reglement_id; - $sql.= ", ".$this->mode_reglement_id; - $sql.= ", ".($this->fk_account>0?$this->fk_account:'NULL'); - $sql.= ", ".($this->date_livraison!=''?"'".$this->db->idate($this->date_livraison)."'":"null"); - $sql.= ", ".($this->shipping_method_id>0?$this->shipping_method_id:'NULL'); - $sql.= ", ".($this->fk_project?$this->fk_project:"null"); - $sql.= ", ".$conf->entity; - $sql.= ")"; - - dol_syslog(get_class($this)."::create", LOG_DEBUG); - $resql=$this->db->query($sql); - if ($resql) - { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."askpricesupplier"); - - if ($this->id) - { - $this->ref='(PROV'.$this->id.')'; - $sql = 'UPDATE '.MAIN_DB_PREFIX."askpricesupplier SET ref='".$this->ref."' WHERE rowid=".$this->id; - - dol_syslog(get_class($this)."::create", LOG_DEBUG); - $resql=$this->db->query($sql); - if (! $resql) $error++; - - /* - * Insertion du detail des produits dans la base - */ - if (! $error) - { - $fk_parent_line=0; - $num=count($this->lines); - - for ($i=0;$i<$num;$i++) - { - // Reset fk_parent_line for no child products and special product - if (($this->lines[$i]->product_type != 9 && empty($this->lines[$i]->fk_parent_line)) || $this->lines[$i]->product_type == 9) { - $fk_parent_line = 0; - } - - $result = $this->addline( - $this->lines[$i]->desc, - $this->lines[$i]->subprice, - $this->lines[$i]->qty, - $this->lines[$i]->tva_tx, - $this->lines[$i]->localtax1_tx, - $this->lines[$i]->localtax2_tx, - $this->lines[$i]->fk_product, - $this->lines[$i]->remise_percent, - 'HT', - 0, - 0, - $this->lines[$i]->product_type, - $this->lines[$i]->rang, - $this->lines[$i]->special_code, - $fk_parent_line, - $this->lines[$i]->fk_fournprice, - $this->lines[$i]->pa_ht, - $this->lines[$i]->label, - $this->lines[$i]->array_options, - $this->lines[$i]->ref_fourn - ); - - if ($result < 0) - { - $error++; - $this->error=$this->db->error; - dol_print_error($this->db); - break; - } - // Defined the new fk_parent_line - if ($result > 0 && $this->lines[$i]->product_type == 9) { - $fk_parent_line = $result; - } - } - } - - // Add linked object - if (! $error && $this->origin && $this->origin_id) - { - $ret = $this->add_object_linked(); - if (! $ret) dol_print_error($this->db); - } - - if (! $error) - { - // Mise a jour infos denormalisees - $resql=$this->update_price(1); - if ($resql) - { - $action='update'; - - // Actions on extra fields (by external module or standard code) - $hookmanager->initHooks(array('askpricesupplierdao')); - $parameters=array('socid'=>$this->id); - $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks - if (empty($reshook)) - { - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used - { - $result=$this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } - } - else if ($reshook < 0) $error++; - - if (! $notrigger) - { - // Call trigger - $result=$this->call_trigger('ASKPRICESUPPLIER_CREATE',$user); - if ($result < 0) { $error++; } - // End call triggers - } - } - else - { - $this->error=$this->db->lasterror(); - $error++; - } - } - } - else - { - $this->error=$this->db->lasterror(); - $error++; - } - - if (! $error) - { - $this->db->commit(); - dol_syslog(get_class($this)."::create done id=".$this->id); - return $this->id; - } - else - { - $this->db->rollback(); - return -2; - } - } - else - { - $this->error=$this->db->lasterror(); - $this->db->rollback(); - return -1; - } - } - - - /** - * Insert into DB a askpricesupplier object completely defined by its data members (ex, results from copy). - * - * @param User $user User that create - * @return int Id of the new object if ok, <0 if ko - * @see create - */ - function create_from($user) - { - $this->products=$this->lines; - - return $this->create($user); - } - - /** - * Load an object from its id and create a new one in database - * - * @param int $socid Id of thirdparty - * @return int New id of clone - */ - function createFromClone($socid=0) - { - global $user,$langs,$conf,$hookmanager; - - $error=0; - $now=dol_now(); - - $this->db->begin(); - - // get extrafields so they will be clone - foreach($this->lines as $line) - $line->fetch_optionals($line->rowid); - - // Load source object - $objFrom = dol_clone($this); - - $objsoc=new Societe($this->db); - - // Change socid if needed - if (! empty($socid) && $socid != $this->socid) - { - if ($objsoc->fetch($socid) > 0) - { - $this->socid = $objsoc->id; - $this->cond_reglement_id = (! empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); - $this->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); - $this->fk_project = ''; - } - - // TODO Change product price if multi-prices - } - else - { - $objsoc->fetch($this->socid); - } - - $this->id=0; - $this->statut=0; - - if (empty($conf->global->ASKPRICESUPPLIER_ADDON) || ! is_readable(DOL_DOCUMENT_ROOT ."/core/modules/askpricesupplier/".$conf->global->ASKPRICESUPPLIER_ADDON.".php")) - { - $this->error='ErrorSetupNotComplete'; - return -1; - } - - // Clear fields - $this->user_author = $user->id; - $this->user_valid = ''; - $this->date = $now; - - // Set ref - require_once DOL_DOCUMENT_ROOT ."/core/modules/askpricesupplier/".$conf->global->ASKPRICESUPPLIER_ADDON.'.php'; - $obj = $conf->global->ASKPRICESUPPLIER_ADDON; - $modAskPriceSupplier = new $obj; - $this->ref = $modAskPriceSupplier->getNextValue($objsoc,$this); - - // Create clone - $result=$this->create($user); - if ($result < 0) $error++; - - if (! $error) - { - // Hook of thirdparty module - if (is_object($hookmanager)) - { - $parameters=array('objFrom'=>$objFrom); - $action=''; - $reshook=$hookmanager->executeHooks('createFrom',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) $error++; - } - - // Call trigger - $result=$this->call_trigger('ASKPRICESUPPLIER_CLONE',$user); - if ($result < 0) { $error++; } - // End call triggers - } - - // End - if (! $error) - { - $this->db->commit(); - return $this->id; - } - else - { - $this->db->rollback(); - return -1; - } - } - - /** - * Load a proposal from database and its ligne array - * - * @param int $rowid id of object to load - * @param string $ref Ref of proposal - * @return int >0 if OK, <0 if KO - */ - function fetch($rowid,$ref='') - { - global $conf; - - $sql = "SELECT p.rowid, p.ref, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc"; - $sql.= ", p.total, p.tva, p.localtax1, p.localtax2, p.total_ht"; - $sql.= ", p.datec"; - $sql.= ", p.date_valid as datev"; - $sql.= ", p.date_livraison as date_livraison"; - $sql.= ", p.model_pdf, p.extraparams"; - $sql.= ", p.note_private, p.note_public"; - $sql.= ", p.fk_projet, p.fk_statut"; - $sql.= ", p.fk_user_author, p.fk_user_valid, p.fk_user_cloture"; - $sql.= ", p.fk_cond_reglement"; - $sql.= ", p.fk_mode_reglement"; - $sql.= ', p.fk_account'; - $sql.= ", p.fk_shipping_method"; - $sql.= ", c.label as statut_label"; - $sql.= ", cr.code as cond_reglement_code, cr.libelle as cond_reglement, cr.libelle_facture as cond_reglement_libelle_doc"; - $sql.= ", cp.code as mode_reglement_code, cp.libelle as mode_reglement"; - $sql.= " FROM ".MAIN_DB_PREFIX."c_propalst as c, ".MAIN_DB_PREFIX."askpricesupplier as p"; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as cp ON p.fk_mode_reglement = cp.id'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON p.fk_cond_reglement = cr.rowid'; - $sql.= " WHERE p.fk_statut = c.id"; - $sql.= " AND p.entity = ".$conf->entity; - if ($ref) $sql.= " AND p.ref='".$ref."'"; - else $sql.= " AND p.rowid=".$rowid; - - dol_syslog(get_class($this)."::fetch", LOG_DEBUG); - $resql=$this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { - $obj = $this->db->fetch_object($resql); - - $this->id = $obj->rowid; - - $this->ref = $obj->ref; - $this->remise = $obj->remise; - $this->remise_percent = $obj->remise_percent; - $this->remise_absolue = $obj->remise_absolue; - $this->total = $obj->total; // TODO deprecated - $this->total_ht = $obj->total_ht; - $this->total_tva = $obj->tva; - $this->total_localtax1 = $obj->localtax1; - $this->total_localtax2 = $obj->localtax2; - $this->total_ttc = $obj->total; - $this->socid = $obj->fk_soc; - $this->fk_project = $obj->fk_projet; - $this->modelpdf = $obj->model_pdf; - $this->note = $obj->note_private; // TODO deprecated - $this->note_private = $obj->note_private; - $this->note_public = $obj->note_public; - $this->statut = $obj->fk_statut; - $this->statut_libelle = $obj->statut_label; - - $this->datec = $this->db->jdate($obj->datec); // TODO deprecated - $this->datev = $this->db->jdate($obj->datev); // TODO deprecated - $this->date_creation = $this->db->jdate($obj->datec); //Creation date - $this->date_validation = $this->db->jdate($obj->datev); //Validation date - $this->date_livraison = $this->db->jdate($obj->date_livraison); - $this->shipping_method_id = ($obj->fk_shipping_method>0)?$obj->fk_shipping_method:null; - - $this->mode_reglement_id = $obj->fk_mode_reglement; - $this->mode_reglement_code = $obj->mode_reglement_code; - $this->mode_reglement = $obj->mode_reglement; - $this->fk_account = ($obj->fk_account>0)?$obj->fk_account:null; - $this->cond_reglement_id = $obj->fk_cond_reglement; - $this->cond_reglement_code = $obj->cond_reglement_code; - $this->cond_reglement = $obj->cond_reglement; - $this->cond_reglement_doc = $obj->cond_reglement_libelle_doc; - - $this->extraparams = (array) json_decode($obj->extraparams, true); - - $this->user_author_id = $obj->fk_user_author; - $this->user_valid_id = $obj->fk_user_valid; - $this->user_close_id = $obj->fk_user_cloture; - - if ($obj->fk_statut == 0) - { - $this->brouillon = 1; - } - - // Retreive all extrafield for invoice - // fetch optionals attributes and labels - require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafields=new ExtraFields($this->db); - $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true); - $this->fetch_optionals($this->id,$extralabels); - - $this->db->free($resql); - - $this->lines = array(); - - /* - * Lignes askprice liees a un produit ou non - */ - $sql = "SELECT d.rowid, d.fk_askpricesupplier, d.fk_parent_line, d.label as custom_label, d.description, d.price, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.qty, d.fk_remise_except, d.remise_percent, d.subprice, d.fk_product,"; - $sql.= " d.info_bits, d.total_ht, d.total_tva, d.total_localtax1, d.total_localtax2, d.total_ttc, d.fk_product_fournisseur_price as fk_fournprice, d.buy_price_ht as pa_ht, d.special_code, d.rang, d.product_type,"; - $sql.= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label,'; - $sql.= ' d.ref_fourn as ref_produit_fourn'; - $sql.= " FROM ".MAIN_DB_PREFIX."askpricesupplierdet as d"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON d.fk_product = p.rowid"; - $sql.= " WHERE d.fk_askpricesupplier = ".$this->id; - $sql.= " ORDER by d.rang"; - - $result = $this->db->query($sql); - if ($result) - { - $num = $this->db->num_rows($result); - $i = 0; - - while ($i < $num) - { - $objp = $this->db->fetch_object($result); - - $line = new AskPriceSupplierLine($this->db); - - $line->rowid = $objp->rowid; - $line->fk_askpricesupplier = $objp->fk_askpricesupplier; - $line->fk_parent_line = $objp->fk_parent_line; - $line->product_type = $objp->product_type; - $line->label = $objp->custom_label; - $line->desc = $objp->description; // Description ligne - $line->qty = $objp->qty; - $line->tva_tx = $objp->tva_tx; - $line->localtax1_tx = $objp->localtax1_tx; - $line->localtax2_tx = $objp->localtax2_tx; - $line->subprice = $objp->subprice; - $line->fk_remise_except = $objp->fk_remise_except; - $line->remise_percent = $objp->remise_percent; - $line->price = $objp->price; // TODO deprecated - - $line->info_bits = $objp->info_bits; - $line->total_ht = $objp->total_ht; - $line->total_tva = $objp->total_tva; - $line->total_localtax1 = $objp->total_localtax1; - $line->total_localtax2 = $objp->total_localtax2; - $line->total_ttc = $objp->total_ttc; - $line->fk_fournprice = $objp->fk_fournprice; - $marginInfos = getMarginInfos($objp->subprice, $objp->remise_percent, $objp->tva_tx, $objp->localtax1_tx, $objp->localtax2_tx, $line->fk_fournprice, $objp->pa_ht); - $line->pa_ht = $marginInfos[0]; - $line->marge_tx = $marginInfos[1]; - $line->marque_tx = $marginInfos[2]; - $line->special_code = $objp->special_code; - $line->rang = $objp->rang; - - $line->fk_product = $objp->fk_product; - - $line->ref = $objp->product_ref; // TODO deprecated - $line->product_ref = $objp->product_ref; - $line->libelle = $objp->product_label; // TODO deprecated - $line->product_label = $objp->product_label; - $line->product_desc = $objp->product_desc; // Description produit - $line->fk_product_type = $objp->fk_product_type; - - $line->ref_fourn = $objp->ref_produit_fourn; - - $this->lines[$i] = $line; - - $i++; - } - $this->db->free($result); - } - else - { - $this->error=$this->db->error(); - return -1; - } - - // Retreive all extrafield for askprice - // fetch optionals attributes and labels - require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafields=new ExtraFields($this->db); - $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true); - $this->fetch_optionals($this->id,$extralabels); - - return 1; - } - - $this->error="Record Not Found"; - return 0; - } - else - { - $this->error=$this->db->error(); - return -1; - } - } - - /** - * Update value of extrafields on the proposal - * - * @param User $user Object user that modify - * @return int <0 if ko, >0 if ok - */ - function update_extrafields($user) - { - $action='update'; - - // Actions on extra fields (by external module or standard code) - $hookmanager->initHooks(array('askpricesupplierdao')); - $parameters=array('id'=>$this->id); - $reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks - if (empty($reshook)) - { - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used - { - $result=$this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } - } - else if ($reshook < 0) $error++; - - if (!$error) - { - return 1; - } - else - { - return -1; - } - - } - - /** - * Set status to validated - * - * @param User $user Object user that validate - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers - * @return int <0 if KO, >=0 if OK - */ - function valid($user, $notrigger=0) - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - - global $conf,$langs; - - $error=0; - $now=dol_now(); - - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->askpricesupplier->creer)) - || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->askpricesupplier->validate))) - { - $this->db->begin(); - - // Numbering module definition - $soc = new Societe($this->db); - $soc->fetch($this->socid); - - // Define new ref - if (! $error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life - { - $num = $this->getNextNumRef($soc); - } - else - { - $num = $this->ref; - } - $this->newref = $num; - - $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplier"; - $sql.= " SET ref = '".$num."',"; - $sql.= " fk_statut = 1, date_valid='".$this->db->idate($now)."', fk_user_valid=".$user->id; - $sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0"; - - dol_syslog(get_class($this)."::valid", LOG_DEBUG); - $resql=$this->db->query($sql); - if (! $resql) - { - dol_print_error($this->db); - $error++; - } - - // Trigger calls - if (! $error && ! $notrigger) - { - // Call trigger - $result=$this->call_trigger('ASKPRICESUPPLIER_VALIDATE',$user); - if ($result < 0) { $error++; } - // End call triggers - } - - if (! $error) - { - $this->oldref = $this->ref; - - // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->ref)) - { - // Rename of propal directory ($this->ref = old ref, $num = new ref) - // to not lose the linked files - $oldref = dol_sanitizeFileName($this->ref); - $newref = dol_sanitizeFileName($num); - $dirsource = $conf->askpricesupplier->dir_output.'/'.$oldref; - $dirdest = $conf->askpricesupplier->dir_output.'/'.$newref; - - if (file_exists($dirsource)) - { - dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { - dol_syslog("Rename ok"); - // Rename docs starting with $oldref with $newref - $listoffiles=dol_dir_list($conf->askpricesupplier->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref,'/')); - foreach($listoffiles as $fileentry) - { - $dirsource=$fileentry['name']; - $dirdest=preg_replace('/^'.preg_quote($oldref,'/').'/',$newref, $dirsource); - $dirsource=$fileentry['path'].'/'.$dirsource; - $dirdest=$fileentry['path'].'/'.$dirdest; - @rename($dirsource, $dirdest); - } - } - } - } - - $this->ref=$num; - $this->brouillon=0; - $this->statut = 1; - $this->user_valid_id=$user->id; - $this->datev=$now; - - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - } - - /** - * Set delivery date - * - * @param User $user Object user that modify - * @param int $date_livraison Delivery date - * @return int <0 if ko, >0 if ok - */ - function set_date_livraison($user, $date_livraison) - { - if (! empty($user->rights->askpricesupplier->creer)) - { - $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplier "; - $sql.= " SET date_livraison = ".($date_livraison!=''?"'".$this->db->idate($date_livraison)."'":'null'); - $sql.= " WHERE rowid = ".$this->id; - - if ($this->db->query($sql)) - { - $this->date_livraison = $date_livraison; - return 1; - } - else - { - $this->error=$this->db->error(); - dol_syslog(get_class($this)."::set_date_livraison Erreur SQL"); - return -1; - } - } - } - - /** - * Set an overall discount on the proposal - * - * @param User $user Object user that modify - * @param double $remise Amount discount - * @return int <0 if ko, >0 if ok - */ - function set_remise_percent($user, $remise) - { - $remise=trim($remise)?trim($remise):0; - - if (! empty($user->rights->askpricesupplier->creer)) - { - $remise = price2num($remise); - - $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplier SET remise_percent = ".$remise; - $sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0"; - - if ($this->db->query($sql) ) - { - $this->remise_percent = $remise; - $this->update_price(1); - return 1; - } - else - { - $this->error=$this->db->error(); - return -1; - } - } - } - - - /** - * Set an absolute overall discount on the proposal - * - * @param User $user Object user that modify - * @param double $remise Amount discount - * @return int <0 if ko, >0 if ok - */ - function set_remise_absolue($user, $remise) - { - $remise=trim($remise)?trim($remise):0; - - if (! empty($user->rights->askpricesupplier->creer)) - { - $remise = price2num($remise); - - $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplier "; - $sql.= " SET remise_absolue = ".$remise; - $sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0"; - - if ($this->db->query($sql) ) - { - $this->remise_absolue = $remise; - $this->update_price(1); - return 1; - } - else - { - $this->error=$this->db->error(); - return -1; - } - } - } - - - - /** - * Reopen the commercial proposal - * - * @param User $user Object user that close - * @param int $statut Statut - * @param string $note Comment - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers - * @return int <0 if KO, >0 if OK - */ - function reopen($user, $statut, $note='', $notrigger=0) - { - global $langs,$conf; - - $this->statut = $statut; - $error=0; - - $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplier"; - $sql.= " SET fk_statut = ".$this->statut.","; - if (! empty($note)) $sql.= " note_private = '".$this->db->escape($note)."',"; - $sql.= " date_cloture=NULL, fk_user_cloture=NULL"; - $sql.= " WHERE rowid = ".$this->id; - - $this->db->begin(); - - dol_syslog(get_class($this)."::reopen", LOG_DEBUG); - $resql = $this->db->query($sql); - if (! $resql) { - $error++; $this->errors[]="Error ".$this->db->lasterror(); - } - if (! $error) - { - if (! $notrigger) - { - // Call trigger - $result=$this->call_trigger('ASKPRICESUPPLIER_REOPEN',$user); - if ($result < 0) { $error++; } - // End call triggers - } - } - - // Commit or rollback - if ($error) - { - if (!empty($this->errors)) - { - foreach($this->errors as $errmsg) - { - dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); - $this->error.=($this->error?', '.$errmsg:$errmsg); - } - } - $this->db->rollback(); - return -1*$error; - } - else - { - $this->db->commit(); - return 1; - } - } - - - /** - * Close the askprice - * - * @param User $user Object user that close - * @param int $statut Statut - * @param string $note Comment - * @return int <0 if KO, >0 if OK - */ - function cloture($user, $statut, $note) - { - global $langs,$conf; - - $this->statut = $statut; - $error=0; - $now=dol_now(); - - $this->db->begin(); - - $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplier"; - $sql.= " SET fk_statut = ".$statut.", note_private = '".$this->db->escape($note)."', date_cloture='".$this->db->idate($now)."', fk_user_cloture=".$user->id; - $sql.= " WHERE rowid = ".$this->id; - - $resql=$this->db->query($sql); - if ($resql) - { - $modelpdf=$conf->global->ASKPRICESUPPLIER_ADDON_PDF_ODT_CLOSED?$conf->global->ASKPRICESUPPLIER_ADDON_PDF_ODT_CLOSED:$this->modelpdf; - $trigger_name='ASKPRICESUPPLIER_CLOSE_REFUSED'; - - if ($statut == 2) - { - $trigger_name='ASKPRICESUPPLIER_CLOSE_SIGNED'; - $modelpdf=$conf->global->ASKPRICESUPPLIER_ADDON_PDF_ODT_TOBILL?$conf->global->ASKPRICESUPPLIER_ADDON_PDF_ODT_TOBILL:$this->modelpdf; - - // The connected company is classified as a client - $soc=new Societe($this->db); - $soc->id = $this->socid; - $result=$soc->set_as_client(); - - if ($result < 0) - { - $this->error=$this->db->error(); - $this->db->rollback(); - return -2; - } - else - { - $this->updateOrCreatePriceFournisseur($user); - } - } - if ($statut == 4) - { - $trigger_name='ASKPRICESUPPLIER_CLASSIFY_BILLED'; - } - - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { - // Define output language - $outputlangs = $langs; - if (! empty($conf->global->MAIN_MULTILANGS)) - { - $outputlangs = new Translate("",$conf); - $newlang=(GETPOST('lang_id') ? GETPOST('lang_id') : $this->client->default_lang); - $outputlangs->setDefaultLang($newlang); - } - //$ret=$object->fetch($id); // Reload to get new records - $this->generateDocument($modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - } - - // Call trigger - $result=$this->call_trigger($trigger_name,$user); - if ($result < 0) { $error++; } - // End call triggers - - if ( ! $error ) - { - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - else - { - $this->error=$this->db->error(); - $this->db->rollback(); - return -1; - } - } - - /** - * Choose between update or create ProductFournisseur - * - * @param User $user Object user - */ - function updateOrCreatePriceFournisseur($user) - { - $productsupplier = new ProductFournisseur($this->db); - - dol_syslog(get_class($this)."::updateOrCreatePriceFournisseur", LOG_DEBUG); - foreach ($this->lines as $product) { - if ($product->subprice <= 0) - continue; - - $idProductFourn = $productsupplier->find_min_price_product_fournisseur($product->fk_product, $product->qty); - $res = $productsupplier->fetch($idProductFourn); - - if ($productsupplier->id) { - if ($productsupplier->fourn_qty == $product->qty) { - $this->updatePriceFournisseur($productsupplier->product_fourn_price_id, $product, $user); - } else { - $this->createPriceFournisseur($product, $user); - } - } else { - $this->createPriceFournisseur($product, $user); - } - } - } - - /** - * Upate ProductFournisseur - * - * @param int $idProductFournPrice id of llx_product_fournisseur_price - * @param int $product contain informations to update - * @param User $user Object user - * @return int <0 if KO, >0 if OK - */ - function updatePriceFournisseur($idProductFournPrice, $product, $user) { - $price=price2num($product->subprice*$product->qty,'MU'); - $unitPrice = price2num($product->subprice,'MU'); - - $sql = 'UPDATE '.MAIN_DB_PREFIX.'product_fournisseur_price SET '.(!empty($product->ref_fourn) ? 'ref_fourn = "'.$product->ref_fourn.'", ' : '').' price ='.$price.', unitprice ='.$unitPrice.' WHERE rowid = '.$idProductFournPrice; - - $resql = $this->db->query($sql); - if (!$resql) { - $this->error=$this->db->error(); - $this->db->rollback(); - return -1; - } - } - - /** - * Create ProductFournisseur - * - * @param Product $product Object Product - * @param User $user Object user - * @return int <0 if KO, >0 if OK - */ - function createPriceFournisseur($product, $user) { - $price=price2num($product->subprice*$product->qty,'MU'); - $qty=price2num($product->qty); - $unitPrice = price2num($product->subprice,'MU'); - $now=dol_now(); - - $values = array( - "'".$this->db->idate($now)."'", - $product->fk_product, - $this->client->id, - "'".$product->ref_fourn."'", - $price, - $qty, - $unitPrice, - $product->tva_tx, - $user->id - ); - - $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'product_fournisseur_price '; - $sql .= '(datec, fk_product, fk_soc, ref_fourn, price, quantity, unitprice, tva_tx, fk_user) VALUES ('.implode(',', $values).')'; - - $resql = $this->db->query($sql); - if (!$resql) { - $this->error=$this->db->error(); - $this->db->rollback(); - return -1; - } - } - - /** - * Set draft status - * - * @param User $user Object user that modify - * @return int <0 if KO, >0 if OK - */ - function set_draft($user) - { - global $conf,$langs; - - $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplier SET fk_statut = 0"; - $sql.= " WHERE rowid = ".$this->id; - - if ($this->db->query($sql)) - { - $this->statut = 0; - $this->brouillon = 1; - return 1; - } - else - { - return -1; - } - } - - - /** - * Return list of askprice (eventually filtered on user) into an array - * - * @param int $shortlist 0=Return array[id]=ref, 1=Return array[](id=>id,ref=>ref,name=>name) - * @param int $draft 0=not draft, 1=draft - * @param int $notcurrentuser 0=all user, 1=not current user - * @param int $socid Id third pary - * @param int $limit For pagination - * @param int $offset For pagination - * @param string $sortfield Sort criteria - * @param string $sortorder Sort order - * @return int -1 if KO, array with result if OK - */ - function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datec', $sortorder='DESC') - { - global $conf,$user; - - $ga = array(); - - $sql = "SELECT s.rowid, s.nom as name, s.client,"; - $sql.= " p.rowid as askpricesupplierid, p.fk_statut, p.total_ht, p.ref, p.remise, "; - $sql.= " p.datep as dp, p.fin_validite as datelimite"; - if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user"; - $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."askpricesupplier as p, ".MAIN_DB_PREFIX."c_propalst as c"; - if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE p.entity = ".$conf->entity; - $sql.= " AND p.fk_soc = s.rowid"; - $sql.= " AND p.fk_statut = c.id"; - if (! $user->rights->societe->client->voir && ! $socid) //restriction - { - $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - } - if ($socid) $sql.= " AND s.rowid = ".$socid; - if ($draft) $sql.= " AND p.fk_statut = 0"; - if ($notcurrentuser > 0) $sql.= " AND p.fk_user_author <> ".$user->id; - $sql.= $this->db->order($sortfield,$sortorder); - $sql.= $this->db->plimit($limit,$offset); - - $result=$this->db->query($sql); - if ($result) - { - $num = $this->db->num_rows($result); - if ($num) - { - $i = 0; - while ($i < $num) - { - $obj = $this->db->fetch_object($result); - - if ($shortlist == 1) - { - $ga[$obj->askpricesupplierid] = $obj->ref; - } - else if ($shortlist == 2) - { - $ga[$obj->askpricesupplierid] = $obj->ref.' ('.$obj->name.')'; - } - else - { - $ga[$i]['id'] = $obj->askpricesupplierid; - $ga[$i]['ref'] = $obj->ref; - $ga[$i]['name'] = $obj->name; - } - - $i++; - } - } - return $ga; - } - else - { - dol_print_error($this->db); - return -1; - } - } - - /** - * Delete askprice - * - * @param User $user Object user that delete - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers - * @return int 1 if ok, otherwise if error - */ - function delete($user, $notrigger=0) - { - global $conf,$langs; - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - - $error=0; - - $this->db->begin(); - - if (! $notrigger) - { - // Call trigger - $result=$this->call_trigger('ASKPRICESUPPLIER_DELETE',$user); - if ($result < 0) { $error++; } - // End call triggers - } - - if (! $error) - { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."askpricesupplierdet WHERE fk_askpricesupplier = ".$this->id; - if ($this->db->query($sql)) - { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."askpricesupplier WHERE rowid = ".$this->id; - if ($this->db->query($sql)) - { - // Delete linked object - $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; - - if (! $error) - { - // We remove directory - $ref = dol_sanitizeFileName($this->ref); - if ($conf->askpricesupplier->dir_output && !empty($this->ref)) - { - $dir = $conf->askpricesupplier->dir_output . "/" . $ref ; - $file = $dir . "/" . $ref . ".pdf"; - if (file_exists($file)) - { - dol_delete_preview($this); - - if (! dol_delete_file($file,0,0,0,$this)) // For triggers - { - $this->error='ErrorFailToDeleteFile'; - $this->errors=array('ErrorFailToDeleteFile'); - $this->db->rollback(); - return 0; - } - } - if (file_exists($dir)) - { - $res=@dol_delete_dir_recursive($dir); - if (! $res) - { - $this->error='ErrorFailToDeleteDir'; - $this->errors=array('ErrorFailToDeleteDir'); - $this->db->rollback(); - return 0; - } - } - } - } - - // Removed extrafields - if (! $error) - { - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used - { - $result=$this->deleteExtraFields(); - if ($result < 0) - { - $error++; - $errorflag=-4; - dol_syslog(get_class($this)."::delete erreur ".$errorflag." ".$this->error, LOG_ERR); - } - } - } - - if (! $error) - { - dol_syslog(get_class($this)."::delete ".$this->id." by ".$user->id, LOG_DEBUG); - $this->db->commit(); - return 1; - } - else - { - $this->error=$this->db->lasterror(); - $this->db->rollback(); - return 0; - } - } - else - { - $this->error=$this->db->lasterror(); - $this->db->rollback(); - return -3; - } - } - else - { - $this->error=$this->db->lasterror(); - $this->db->rollback(); - return -2; - } - } - else - { - $this->db->rollback(); - return -1; - } - } - - /** - * Object AskPriceSupplier Information - * - * @param int $id Proposal id - * @return void - */ - function info($id) - { - $sql = "SELECT c.rowid, "; - $sql.= " c.datec, c.date_valid as datev, c.date_cloture as dateo,"; - $sql.= " c.fk_user_author, c.fk_user_valid, c.fk_user_cloture"; - $sql.= " FROM ".MAIN_DB_PREFIX."askpricesupplier as c"; - $sql.= " WHERE c.rowid = ".$id; - - $result = $this->db->query($sql); - - if ($result) - { - if ($this->db->num_rows($result)) - { - $obj = $this->db->fetch_object($result); - - $this->id = $obj->rowid; - - $this->date_creation = $this->db->jdate($obj->datec); - $this->date_validation = $this->db->jdate($obj->datev); - $this->date_cloture = $this->db->jdate($obj->dateo); - - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - - if ($obj->fk_user_valid) - { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) - { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } - - - } - $this->db->free($result); - - } - else - { - dol_print_error($this->db); - } - } - - - /** - * Return label of status of proposal (draft, validated, ...) - * - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto - * @return string Label - */ - function getLibStatut($mode=0) - { - return $this->LibStatut($this->statut,$mode); - } - - /** - * Return label of a status (draft, validated, ...) - * - * @param int $statut id statut - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto - * @return string Label - */ - function LibStatut($statut,$mode=1) - { - global $langs; - $langs->load("askpricesupplier"); - - if ($statut==0) $statuttrans='statut0'; - if ($statut==1) $statuttrans='statut1'; - if ($statut==2) $statuttrans='statut3'; - if ($statut==3) $statuttrans='statut5'; - if ($statut==4) $statuttrans='statut6'; - - if ($mode == 0) return $this->labelstatut[$statut]; - if ($mode == 1) return $this->labelstatut_short[$statut]; - if ($mode == 2) return img_picto($this->labelstatut_short[$statut], $statuttrans).' '.$this->labelstatut_short[$statut]; - if ($mode == 3) return img_picto($this->labelstatut[$statut], $statuttrans); - if ($mode == 4) return img_picto($this->labelstatut[$statut],$statuttrans).' '.$this->labelstatut[$statut]; - if ($mode == 5) return ''.$this->labelstatut_short[$statut].' '.img_picto($this->labelstatut_short[$statut],$statuttrans); - } - - - /** - * Load indicators for dashboard (this->nbtodo and this->nbtodolate) - * - * @param User $user Object user - * @param int $mode "opened" for askprice to close, "signed" for proposal to invoice - * @return int <0 if KO, >0 if OK - */ - function load_board($user,$mode) - { - global $conf, $user; - - $now=dol_now(); - - $this->nbtodo=$this->nbtodolate=0; - $clause = " WHERE"; - - $sql = "SELECT p.rowid, p.ref, p.datec as datec"; - $sql.= " FROM ".MAIN_DB_PREFIX."askpricesupplier as p"; - if (!$user->rights->societe->client->voir && !$user->societe_id) - { - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON p.fk_soc = sc.fk_soc"; - $sql.= " WHERE sc.fk_user = " .$user->id; - $clause = " AND"; - } - $sql.= $clause." p.entity = ".$conf->entity; - if ($mode == 'opened') $sql.= " AND p.fk_statut = 1"; - if ($mode == 'signed') $sql.= " AND p.fk_statut = 2"; - if ($user->societe_id) $sql.= " AND p.fk_soc = ".$user->societe_id; - - $resql=$this->db->query($sql); - if ($resql) - { - if ($mode == 'opened') $delay_warning=$conf->askpricesupplier->cloture->warning_delay; - if ($mode == 'signed') $delay_warning=$conf->askpricesupplier->facturation->warning_delay; - - // This assignment in condition is not a bug. It allows walking the results. - while ($obj=$this->db->fetch_object($resql)) - { - $this->nbtodo++; - if ($mode == 'opened') - { - $datelimit = $this->db->jdate($obj->datefin); - if ($datelimit < ($now - $delay_warning)) - { - $this->nbtodolate++; - } - } - // TODO Definir regle des propales a facturer en retard - // if ($mode == 'signed' && ! count($this->FactureListeArray($obj->rowid))) $this->nbtodolate++; - } - return 1; - } - else - { - $this->error=$this->db->error(); - return -1; - } - } - - - /** - * Initialise an instance with random values. - * Used to build previews or test instances. - * id must be 0 if object instance is a specimen. - * - * @return void - */ - function initAsSpecimen() - { - global $user,$langs,$conf; - - // Charge tableau des produits prodids - $prodids = array(); - $sql = "SELECT rowid"; - $sql.= " FROM ".MAIN_DB_PREFIX."product"; - $sql.= " WHERE entity IN (".getEntity('product', 1).")"; - $resql = $this->db->query($sql); - if ($resql) - { - $num_prods = $this->db->num_rows($resql); - $i = 0; - while ($i < $num_prods) - { - $i++; - $row = $this->db->fetch_row($resql); - $prodids[$i] = $row[0]; - } - } - - // Initialise parametres - $this->id=0; - $this->ref = 'SPECIMEN'; - $this->specimen=1; - $this->socid = 1; - $this->date = time(); - $this->cond_reglement_id = 1; - $this->cond_reglement_code = 'RECEP'; - $this->mode_reglement_id = 7; - $this->mode_reglement_code = 'CHQ'; - $this->note_public='This is a comment (public)'; - $this->note_private='This is a comment (private)'; - // Lines - $nbp = 5; - $xnbp = 0; - while ($xnbp < $nbp) - { - $line=new AskPriceSupplierLine($this->db); - $line->desc=$langs->trans("Description")." ".$xnbp; - $line->qty=1; - $line->subprice=100; - $line->price=100; - $line->tva_tx=19.6; - $line->localtax1_tx=0; - $line->localtax2_tx=0; - if ($xnbp == 2) - { - $line->total_ht=50; - $line->total_ttc=59.8; - $line->total_tva=9.8; - $line->remise_percent=50; - } - else - { - $line->total_ht=100; - $line->total_ttc=119.6; - $line->total_tva=19.6; - $line->remise_percent=00; - } - - $prodid = rand(1, $num_prods); - $line->fk_product=$prodids[$prodid]; - - $this->lines[$xnbp]=$line; - - $this->total_ht += $line->total_ht; - $this->total_tva += $line->total_tva; - $this->total_ttc += $line->total_ttc; - - $xnbp++; - } - } - - /** - * Charge indicateurs this->nb de tableau de bord - * - * @return int <0 if ko, >0 if ok - */ - function load_state_board() - { - global $conf, $user; - - $this->nb=array(); - $clause = "WHERE"; - - $sql = "SELECT count(p.rowid) as nb"; - $sql.= " FROM ".MAIN_DB_PREFIX."askpricesupplier as p"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON p.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->societe_id) - { - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; - $sql.= " WHERE sc.fk_user = " .$user->id; - $clause = "AND"; - } - $sql.= " ".$clause." p.entity = ".$conf->entity; - - $resql=$this->db->query($sql); - if ($resql) - { - // This assignment in condition is not a bug. It allows walking the results. - while ($obj=$this->db->fetch_object($resql)) - { - $this->nb["askprice"]=$obj->nb; - } - $this->db->free($resql); - return 1; - } - else - { - dol_print_error($this->db); - $this->error=$this->db->error(); - return -1; - } - } - - - /** - * Returns the reference to the following non used Proposal used depending on the active numbering module - * defined into ASKPRICESUPPLIER_ADDON - * - * @param Societe $soc Object thirdparty - * @return string Reference libre pour la propale - */ - function getNextNumRef($soc) - { - global $conf, $db, $langs; - $langs->load("askpricesupplier"); - - if (! empty($conf->global->ASKPRICESUPPLIER_ADDON)) - { - $mybool=false; - - $file = $conf->global->ASKPRICESUPPLIER_ADDON.".php"; - $classname = $conf->global->ASKPRICESUPPLIER_ADDON; - - // Include file with class - $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) { - - $dir = dol_buildpath($reldir."core/modules/askpricesupplier/"); - - // Load file with numbering class (if found) - $mybool|=@include_once $dir.$file; - } - - if (! $mybool) - { - dol_print_error('',"Failed to include file ".$file); - return ''; - } - - $obj = new $classname(); - $numref = ""; - $numref = $obj->getNextValue($soc,$this); - - if ($numref != "") - { - return $numref; - } - else - { - $this->error=$obj->error; - return ""; - } - } - else - { - $langs->load("errors"); - print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete"); - return ""; - } - } - - /** - * Return clicable link of object (with eventually picto) - * - * @param int $withpicto Add picto into link - * @param string $option Where point the link ('compta', 'expedition', 'document', ...) - * @param string $get_params Parametres added to url - * @return string String with URL - */ - function getNomUrl($withpicto=0,$option='', $get_params='') - { - global $langs; - - $result=''; - $label=$langs->trans("ShowAskpricesupplier").': '.$this->ref; - $linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; - if ($option == '') { - $link = ''; - - $picto='askpricesupplier'; - - - if ($withpicto) - $result.=($link.img_object($label, $picto, 'class="classfortooltip"').$linkend); - if ($withpicto && $withpicto != 2) - $result.=' '; - $result.=$link.$this->ref.$linkend; - return $result; - } - - /** - * Retrieve an array of askprice lines - * - * @return int <0 if ko, >0 if ok - */ - function getLinesArray() - { - $sql = 'SELECT pt.rowid, pt.label as custom_label, pt.description, pt.fk_product, pt.fk_remise_except,'; - $sql.= ' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.info_bits,'; - $sql.= ' pt.total_ht, pt.total_tva, pt.total_ttc, pt.fk_product_fournisseur_price as fk_fournprice, pt.buy_price_ht as pa_ht, pt.special_code, pt.localtax1_tx, pt.localtax2_tx,'; - $sql.= ' pt.product_type, pt.rang, pt.fk_parent_line,'; - $sql.= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid,'; - $sql.= ' p.description as product_desc, pt.ref_fourn as ref_produit_fourn'; - $sql.= ' FROM '.MAIN_DB_PREFIX.'askpricesupplierdet as pt'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product=p.rowid'; - $sql.= ' WHERE pt.fk_askpricesupplier = '.$this->id; - $sql.= ' ORDER BY pt.rang ASC, pt.rowid'; - - dol_syslog(get_class($this).'::getLinesArray', LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $num = $this->db->num_rows($resql); - $i = 0; - - while ($i < $num) - { - $obj = $this->db->fetch_object($resql); - - $this->lines[$i] = new AskPriceSupplierLine($this->db); - $this->lines[$i]->id = $obj->rowid; // for backward compatibility - $this->lines[$i]->rowid = $obj->rowid; - $this->lines[$i]->label = $obj->custom_label; - $this->lines[$i]->description = $obj->description; - $this->lines[$i]->fk_product = $obj->fk_product; - $this->lines[$i]->ref = $obj->ref; - $this->lines[$i]->product_label = $obj->product_label; - $this->lines[$i]->product_desc = $obj->product_desc; - $this->lines[$i]->fk_product_type = $obj->fk_product_type; // deprecated - $this->lines[$i]->product_type = $obj->product_type; - $this->lines[$i]->qty = $obj->qty; - $this->lines[$i]->subprice = $obj->subprice; - $this->lines[$i]->fk_remise_except = $obj->fk_remise_except; - $this->lines[$i]->remise_percent = $obj->remise_percent; - $this->lines[$i]->tva_tx = $obj->tva_tx; - $this->lines[$i]->info_bits = $obj->info_bits; - $this->lines[$i]->total_ht = $obj->total_ht; - $this->lines[$i]->total_tva = $obj->total_tva; - $this->lines[$i]->total_ttc = $obj->total_ttc; - $this->lines[$i]->fk_fournprice = $obj->fk_fournprice; - $marginInfos = getMarginInfos($obj->subprice, $obj->remise_percent, $obj->tva_tx, $obj->localtax1_tx, $obj->localtax2_tx, $this->lines[$i]->fk_fournprice, $obj->pa_ht); - $this->lines[$i]->pa_ht = $marginInfos[0]; - $this->lines[$i]->marge_tx = $marginInfos[1]; - $this->lines[$i]->marque_tx = $marginInfos[2]; - $this->lines[$i]->fk_parent_line = $obj->fk_parent_line; - $this->lines[$i]->special_code = $obj->special_code; - $this->lines[$i]->rang = $obj->rang; - - $this->lines[$i]->ref_fourn = $obj->ref_produit_fourn; - - $i++; - } - $this->db->free($resql); - - return 1; - } - else - { - $this->error=$this->db->error(); - return -1; - } - } - - /** - * Create a document onto disk according to template module. - * - * @param string $modele Force model to use ('' to not force) - * @param Translate $outputlangs Object langs to use for output - * @param int $hidedetails Hide details of lines - * @param int $hidedesc Hide description - * @param int $hideref Hide ref - * @return int 0 if KO, 1 if OK - */ - public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0) - { - global $conf,$user,$langs; - - $langs->load("askpricesupplier"); - - // Positionne le modele sur le nom du modele a utiliser - if (! dol_strlen($modele)) - { - if (! empty($conf->global->ASKPRICESUPPLIER_ADDON_PDF)) - { - $modele = $conf->global->ASKPRICESUPPLIER_ADDON_PDF; - } - else - { - $modele = 'aurore'; - } - } - - $modelpath = "core/modules/askpricesupplier/doc/"; - - return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref); - } - - - function printOriginLinesList() - { - global $langs, $hookmanager; - - print ''; - print ''.$langs->trans('Ref').''; - print ''.$langs->trans('Description').''; - print ''.$langs->trans('VAT').''; - print ''.$langs->trans('PriceUHT').''; - print ''.$langs->trans('Qty').''; - print ''.$langs->trans('ReductionShort').''; - - $num = count($this->lines); - $var = true; - $i = 0; - - foreach ($this->lines as $line) - { - if (empty($line->subprice) || $line->qty <= 0) - continue; - - $var=!$var; - - if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line))) - { - if (empty($line->fk_parent_line)) - { - $parameters=array('line'=>$line,'var'=>$var,'i'=>$i); - $action=''; - $reshook=$hookmanager->executeHooks('printOriginObjectLine',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks - } - } - else - { - $this->printOriginLine($line,$var); - } - - $i++; - } - } - - -} - - -/** - * \class AskPriceSupplierLine - * \brief Class to manage askpricesupplier lines - */ -class AskPriceSupplierLine extends CommonObject -{ - var $db; - var $error; - - public $element='askpricesupplierdet'; - public $table_element='askpricesupplierdet'; - - var $oldline; - - // From llx_askpricesupplierdet - var $rowid; - var $fk_askpricesupplier; - var $fk_parent_line; - var $desc; // Description ligne - var $fk_product; // Id produit predefini - /** - * @deprecated - * @see product_type - */ - var $fk_product_type; - /** - * Product type - * @var int - * @see Product::TYPE_PRODUCT, Product::TYPE_SERVICE - */ - public $product_type = Product::TYPE_PRODUCT; - - var $qty; - var $tva_tx; - var $subprice; - var $remise_percent; - var $fk_remise_except; - - var $rang = 0; - - var $fk_fournprice; - var $pa_ht; - var $marge_tx; - var $marque_tx; - - var $special_code; // Tag for special lines (exlusive tags) - // 1: frais de port - // 2: ecotaxe - // 3: option line (when qty = 0) - - var $info_bits = 0; // Liste d'options cumulables: - // Bit 0: 0 si TVA normal - 1 si TVA NPR - // Bit 1: 0 ligne normale - 1 si ligne de remise fixe - - var $total_ht; // Total HT de la ligne toute quantite et incluant la remise ligne - var $total_tva; // Total TVA de la ligne toute quantite et incluant la remise ligne - var $total_ttc; // Total TTC de la ligne toute quantite et incluant la remise ligne - - /** - * @deprecated - * @see remise_percent, fk_remise_except - */ - var $remise; - /** - * @deprecated - * @see subprice - */ - var $price; - - // From llx_product - /** - * @deprecated - * @see product_ref - */ - var $ref; - /** - * Product reference - * @var string - */ - public $product_ref; - /** - * @deprecated - * @see product_label - */ - var $libelle; - /** - * Product label - * @var string - */ - public $product_label; - /** - * Product description - * @var string - */ - public $product_desc; - - var $localtax1_tx; // Local tax 1 - var $localtax2_tx; // Local tax 2 - var $localtax1_type; // Local tax 1 type - var $localtax2_type; // Local tax 2 type - var $total_localtax1; // Line total local tax 1 - var $total_localtax2; // Line total local tax 2 - - var $skip_update_total; // Skip update price total for special lines - - var $ref_fourn; - - /** - * Class line Contructor - * - * @param DoliDB $db Database handler - */ - function __construct($db) - { - $this->db= $db; - } - - /** - * Retrieve the propal line object - * - * @param int $rowid Propal line id - * @return int <0 if KO, >0 if OK - */ - function fetch($rowid) - { - $sql = 'SELECT pd.rowid, pd.fk_askpricesupplier, pd.fk_parent_line, pd.fk_product, pd.label as custom_label, pd.description, pd.price, pd.qty, pd.tva_tx,'; - $sql.= ' pd.remise, pd.remise_percent, pd.fk_remise_except, pd.subprice,'; - $sql.= ' pd.info_bits, pd.total_ht, pd.total_tva, pd.total_ttc, pd.fk_product_fournisseur_price as fk_fournprice, pd.buy_price_ht as pa_ht, pd.special_code, pd.rang,'; - $sql.= ' pd.localtax1_tx, pd.localtax2_tx, pd.total_localtax1, pd.total_localtax2,'; - $sql.= ' p.ref as product_ref, p.label as product_label, p.description as product_desc,'; - $sql.= ' pd.product_type, pd.ref_fourn as ref_produit_fourn'; - $sql.= ' FROM '.MAIN_DB_PREFIX.'askpricesupplierdet as pd'; - $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pd.fk_product = p.rowid'; - $sql.= ' WHERE pd.rowid = '.$rowid; - - $result = $this->db->query($sql); - if ($result) - { - $objp = $this->db->fetch_object($result); - - $this->rowid = $objp->rowid; - $this->fk_askpricesupplier = $objp->fk_askpricesupplier; - $this->fk_parent_line = $objp->fk_parent_line; - $this->label = $objp->custom_label; - $this->desc = $objp->description; - $this->qty = $objp->qty; - $this->price = $objp->price; // deprecated - $this->subprice = $objp->subprice; - $this->tva_tx = $objp->tva_tx; - $this->remise = $objp->remise; - $this->remise_percent = $objp->remise_percent; - $this->fk_remise_except = $objp->fk_remise_except; - $this->fk_product = $objp->fk_product; - $this->info_bits = $objp->info_bits; - - $this->total_ht = $objp->total_ht; - $this->total_tva = $objp->total_tva; - $this->total_ttc = $objp->total_ttc; - - $this->fk_fournprice = $objp->fk_fournprice; - - $marginInfos = getMarginInfos($objp->subprice, $objp->remise_percent, $objp->tva_tx, $objp->localtax1_tx, $objp->localtax2_tx, $this->fk_fournprice, $objp->pa_ht); - $this->pa_ht = $marginInfos[0]; - $this->marge_tx = $marginInfos[1]; - $this->marque_tx = $marginInfos[2]; - - $this->special_code = $objp->special_code; - $this->product_type = $objp->product_type; - $this->rang = $objp->rang; - - $this->ref = $objp->product_ref; // deprecated - $this->product_ref = $objp->product_ref; - $this->libelle = $objp->product_label; // deprecated - $this->product_label = $objp->product_label; - $this->product_desc = $objp->product_desc; - - $this->ref_fourn = $objp->ref_produit_forun; - - $this->db->free($result); - } - else - { - dol_print_error($this->db); - } - } - - /** - * Insert object line propal in database - * - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers - * @return int <0 if KO, >0 if OK - */ - function insert($notrigger=0) - { - global $conf,$langs,$user; - - $error=0; - - dol_syslog(get_class($this)."::insert rang=".$this->rang); - - // Clean parameters - if (empty($this->tva_tx)) $this->tva_tx=0; - if (empty($this->localtax1_tx)) $this->localtax1_tx=0; - if (empty($this->localtax2_tx)) $this->localtax2_tx=0; - if (empty($this->localtax1_type)) $this->localtax1_type=0; - if (empty($this->localtax2_type)) $this->localtax2_type=0; - if (empty($this->total_localtax1)) $this->total_localtax1=0; - if (empty($this->total_localtax2)) $this->total_localtax2=0; - if (empty($this->rang)) $this->rang=0; - if (empty($this->remise)) $this->remise=0; - if (empty($this->remise_percent)) $this->remise_percent=0; - if (empty($this->info_bits)) $this->info_bits=0; - if (empty($this->special_code)) $this->special_code=0; - if (empty($this->fk_parent_line)) $this->fk_parent_line=0; - if (empty($this->fk_fournprice)) $this->fk_fournprice=0; - - if (empty($this->pa_ht)) $this->pa_ht=0; - - // si prix d'achat non renseigne et utilise pour calcul des marges alors prix achat = prix vente - if ($this->pa_ht == 0) { - if ($this->subprice > 0 && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) - $this->pa_ht = $this->subprice * (1 - $this->remise_percent / 100); - } - - // Check parameters - if ($this->product_type < 0) return -1; - - $this->db->begin(); - - // Insert line into database - $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'askpricesupplierdet'; - $sql.= ' (fk_askpricesupplier, fk_parent_line, label, description, fk_product, product_type,'; - $sql.= ' fk_remise_except, qty, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,'; - $sql.= ' subprice, remise_percent, '; - $sql.= ' info_bits, '; - $sql.= ' total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_product_fournisseur_price, buy_price_ht, special_code, rang,'; - $sql.= ' ref_fourn)'; - $sql.= " VALUES (".$this->fk_askpricesupplier.","; - $sql.= " ".($this->fk_parent_line>0?"'".$this->fk_parent_line."'":"null").","; - $sql.= " ".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null").","; - $sql.= " '".$this->db->escape($this->desc)."',"; - $sql.= " ".($this->fk_product?"'".$this->fk_product."'":"null").","; - $sql.= " '".$this->product_type."',"; - $sql.= " ".($this->fk_remise_except?"'".$this->fk_remise_except."'":"null").","; - $sql.= " ".price2num($this->qty).","; - $sql.= " ".price2num($this->tva_tx).","; - $sql.= " ".price2num($this->localtax1_tx).","; - $sql.= " ".price2num($this->localtax2_tx).","; - $sql.= " '".$this->localtax1_type."',"; - $sql.= " '".$this->localtax2_type."',"; - $sql.= " ".($this->subprice?price2num($this->subprice):"null").","; - $sql.= " ".price2num($this->remise_percent).","; - $sql.= " ".(isset($this->info_bits)?"'".$this->info_bits."'":"null").","; - $sql.= " ".price2num($this->total_ht).","; - $sql.= " ".price2num($this->total_tva).","; - $sql.= " ".price2num($this->total_localtax1).","; - $sql.= " ".price2num($this->total_localtax2).","; - $sql.= " ".price2num($this->total_ttc).","; - $sql.= " ".(!empty($this->fk_fournprice)?"'".$this->fk_fournprice."'":"null").","; - $sql.= " ".(isset($this->pa_ht)?"'".price2num($this->pa_ht)."'":"null").","; - $sql.= ' '.$this->special_code.','; - $sql.= ' '.$this->rang.','; - $sql.= " '".$this->db->escape($this->ref_fourn)."'"; - $sql.= ')'; - - dol_syslog(get_class($this).'::insert', LOG_DEBUG); - $resql=$this->db->query($sql); - if ($resql) - { - $this->rowid=$this->db->last_insert_id(MAIN_DB_PREFIX.'askpricesupplierdet'); - - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used - { - $this->id=$this->rowid; - $result=$this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } - - if (! $notrigger) - { - // Call trigger - $result=$this->call_trigger('LINEASKPRICESUPPLIER_INSERT',$user); - if ($result < 0) - { - $this->db->rollback(); - return -1; - } - // End call triggers - } - - $this->db->commit(); - return 1; - } - else - { - $this->error=$this->db->error()." sql=".$sql; - $this->db->rollback(); - return -1; - } - } - - /** - * Delete line in database - * - * @return int <0 if ko, >0 if ok - */ - function delete() - { - global $conf,$langs,$user; - - $error=0; - $this->db->begin(); - - $sql = "DELETE FROM ".MAIN_DB_PREFIX."askpricesupplierdet WHERE rowid = ".$this->rowid; - dol_syslog("AskPriceSupplierLine::delete", LOG_DEBUG); - if ($this->db->query($sql) ) - { - - // Remove extrafields - if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used - { - $this->id=$this->rowid; - $result=$this->deleteExtraFields(); - if ($result < 0) - { - $error++; - dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); - } - } - - // Call trigger - $result=$this->call_trigger('LINEASKPRICESUPLLIER_DELETE',$user); - if ($result < 0) - { - $this->db->rollback(); - return -1; - } - // End call triggers - - $this->db->commit(); - - return 1; - } - else - { - $this->error=$this->db->error()." sql=".$sql; - $this->db->rollback(); - return -1; - } - } - - /** - * Update propal line object into DB - * - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers - * @return int <0 if ko, >0 if ok - */ - function update($notrigger=0) - { - global $conf,$langs,$user; - - $error=0; - - // Clean parameters - if (empty($this->tva_tx)) $this->tva_tx=0; - if (empty($this->localtax1_tx)) $this->localtax1_tx=0; - if (empty($this->localtax2_tx)) $this->localtax2_tx=0; - if (empty($this->total_localtax1)) $this->total_localtax1=0; - if (empty($this->total_localtax2)) $this->total_localtax2=0; - if (empty($this->localtax1_type)) $this->localtax1_type=0; - if (empty($this->localtax2_type)) $this->localtax2_type=0; - if (empty($this->marque_tx)) $this->marque_tx=0; - if (empty($this->marge_tx)) $this->marge_tx=0; - if (empty($this->price)) $this->price=0; // TODO A virer - if (empty($this->remise)) $this->remise=0; // TODO A virer - if (empty($this->remise_percent)) $this->remise_percent=0; - if (empty($this->info_bits)) $this->info_bits=0; - if (empty($this->special_code)) $this->special_code=0; - if (empty($this->fk_parent_line)) $this->fk_parent_line=0; - if (empty($this->fk_fournprice)) $this->fk_fournprice=0; - - if (empty($this->pa_ht)) $this->pa_ht=0; - - // si prix d'achat non renseigne et utilise pour calcul des marges alors prix achat = prix vente - if ($this->pa_ht == 0) { - if ($this->subprice > 0 && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) - $this->pa_ht = $this->subprice * (1 - $this->remise_percent / 100); - } - - $this->db->begin(); - - // Mise a jour ligne en base - $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplierdet SET"; - $sql.= " description='".$this->db->escape($this->desc)."'"; - $sql.= " , label=".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null"); - $sql.= " , product_type=".$this->product_type; - $sql.= " , tva_tx='".price2num($this->tva_tx)."'"; - $sql.= " , localtax1_tx=".price2num($this->localtax1_tx); - $sql.= " , localtax2_tx=".price2num($this->localtax2_tx); - $sql.= " , localtax1_type='".$this->localtax1_type."'"; - $sql.= " , localtax2_type='".$this->localtax2_type."'"; - $sql.= " , qty='".price2num($this->qty)."'"; - $sql.= " , subprice=".price2num($this->subprice).""; - $sql.= " , remise_percent=".price2num($this->remise_percent).""; - $sql.= " , price=".price2num($this->price).""; // TODO A virer - $sql.= " , remise=".price2num($this->remise).""; // TODO A virer - $sql.= " , info_bits='".$this->info_bits."'"; - if (empty($this->skip_update_total)) - { - $sql.= " , total_ht=".price2num($this->total_ht).""; - $sql.= " , total_tva=".price2num($this->total_tva).""; - $sql.= " , total_ttc=".price2num($this->total_ttc).""; - $sql.= " , total_localtax1=".price2num($this->total_localtax1).""; - $sql.= " , total_localtax2=".price2num($this->total_localtax2).""; - } - $sql.= " , fk_product_fournisseur_price=".(! empty($this->fk_fournprice)?"'".$this->fk_fournprice."'":"null"); - $sql.= " , buy_price_ht=".price2num($this->pa_ht); - if (strlen($this->special_code)) $sql.= " , special_code=".$this->special_code; - $sql.= " , fk_parent_line=".($this->fk_parent_line>0?$this->fk_parent_line:"null"); - if (! empty($this->rang)) $sql.= ", rang=".$this->rang; - $sql.= " , ref_fourn=".(! empty($this->ref_fourn)?"'".$this->db->escape($this->ref_fourn)."'":"null"); - $sql.= " WHERE rowid = ".$this->rowid; - - dol_syslog(get_class($this)."::update", LOG_DEBUG); - $resql=$this->db->query($sql); - if ($resql) - { - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used - { - $this->id=$this->rowid; - $result=$this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } - - if (! $notrigger) - { - // Call trigger - $result=$this->call_trigger('LINEASKPRICESUPPLIER_UPDATE',$user); - if ($result < 0) - { - $this->db->rollback(); - return -1; - } - // End call triggers - } - - $this->db->commit(); - return 1; - } - else - { - $this->error=$this->db->error(); - $this->db->rollback(); - return -2; - } - } - - /** - * Update DB line fields total_xxx - * Used by migration - * - * @return int <0 if ko, >0 if ok - */ - function update_total() - { - $this->db->begin(); - - // Mise a jour ligne en base - $sql = "UPDATE ".MAIN_DB_PREFIX."askpricesupplierdet SET"; - $sql.= " total_ht=".price2num($this->total_ht,'MT').""; - $sql.= ",total_tva=".price2num($this->total_tva,'MT').""; - $sql.= ",total_ttc=".price2num($this->total_ttc,'MT').""; - $sql.= " WHERE rowid = ".$this->rowid; - - dol_syslog("AskPriceSupplierLine::update_total", LOG_DEBUG); - - $resql=$this->db->query($sql); - if ($resql) - { - $this->db->commit(); - return 1; - } - else - { - $this->error=$this->db->error(); - $this->db->rollback(); - return -2; - } - } - -} - diff --git a/htdocs/comm/askpricesupplier/document.php b/htdocs/comm/askpricesupplier/document.php deleted file mode 100644 index f2558e826dc..00000000000 --- a/htdocs/comm/askpricesupplier/document.php +++ /dev/null @@ -1,127 +0,0 @@ - - * Copyright (C) 2004-2009 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Cédric Salvador - * - * 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 3 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, see . - */ - -/** - * \file htdocs/comm/propal/document.php - * \ingroup propal - * \brief Management page of documents attached to a business proposal - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/comm/askpricesupplier/class/askpricesupplier.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/askpricesupplier.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; - -$langs->load('compta'); -$langs->load('other'); - -$action = GETPOST('action','alpha'); -$confirm = GETPOST('confirm','alpha'); -$id = GETPOST('id','int'); -$ref = GETPOST('ref','alpha'); - -// Security check -$socid=''; -if (! empty($user->societe_id)) -{ - $action=''; - $socid = $user->societe_id; -} -$result = restrictedArea($user, 'askpricesupplier', $id); - -// Get parameters -$sortfield = GETPOST("sortfield",'alpha'); -$sortorder = GETPOST("sortorder",'alpha'); -$page = GETPOST("page",'int'); -if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; -$pageprev = $page - 1; -$pagenext = $page + 1; -if (! $sortorder) $sortorder="ASC"; -if (! $sortfield) $sortfield="name"; - -$object = new AskPriceSupplier($db); -$object->fetch($id,$ref); -if ($object->id > 0) -{ - $object->fetch_thirdparty(); - $upload_dir = $conf->askpricesupplier->dir_output.'/'.dol_sanitizeFileName($object->ref); - include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php'; -} - - -/* - * View - */ - -llxHeader('',$langs->trans('CommRequest'),'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'); - -$form = new Form($db); - -if ($object->id > 0) -{ - $upload_dir = $conf->askpricesupplier->dir_output.'/'.dol_sanitizeFileName($object->ref); - - $head = askpricesupplier_prepare_head($object); - dol_fiche_head($head, 'document', $langs->trans('CommRequest'), 0, 'askpricesupplier'); - - // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); - $totalsize=0; - foreach($filearray as $key => $file) - { - $totalsize+=$file['size']; - } - - print ''; - - $linkback=''.$langs->trans("BackToList").''; - - // Ref - print ''; - - // Supplier - print ""; - print ''; - - print ''; - print ''; - - print '
'.$langs->trans('Ref').''; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); - print '
".$langs->trans("Supplier")."'.$object->thirdparty->getNomUrl(1).'
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; - - print '
'; - - $modulepart = 'askpricesupplier'; - $permission = $user->rights->askpricesupplier->creer; - $param = '&id=' . $object->id; - include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ - print $langs->trans("ErrorUnknown"); -} - -llxFooter(); -$db->close(); diff --git a/htdocs/comm/askpricesupplier/index.php b/htdocs/comm/askpricesupplier/index.php deleted file mode 100644 index 681a889ed25..00000000000 --- a/htdocs/comm/askpricesupplier/index.php +++ /dev/null @@ -1,377 +0,0 @@ - - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * - * 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 3 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, see . - */ - -/** - * \file htdocs/comm/propal/index.php - * \ingroup propal - * \brief Home page of proposal area - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -require_once DOL_DOCUMENT_ROOT .'/comm/askpricesupplier/class/askpricesupplier.class.php'; - -$langs->load("askpricesupplier"); -$langs->load("companies"); - -// Security check -$socid=GETPOST('socid','int'); -if (isset($user->societe_id) && $user->societe_id > 0) -{ - $action = ''; - $socid = $user->societe_id; -} -$result = restrictedArea($user, 'askpricesupplier'); - - -/* - * View - */ -$now=dol_now(); -$askpricesupplierstatic=new AskPriceSupplier($db); -$companystatic=new Societe($db); -$form = new Form($db); -$formfile = new FormFile($db); -$help_url="EN:Module_Ask_Price_Supplier|FR:Module_Demande_de_prix_fournisseur"; - -llxHeader("",$langs->trans("AskPriceSupplierArea"),$help_url); - -print_fiche_titre($langs->trans("AskPriceSupplierArea")); - -print '
'; - - -/* - * Search form - */ -$var=false; -print '
'; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print "
'.$langs->trans("SearchRequest").'
'; -print $langs->trans("Ref").':
'.$langs->trans("Other").':

\n"; - - -/* - * Statistics - */ - -$sql = "SELECT count(p.rowid), p.fk_statut"; -$sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; -$sql.= ", ".MAIN_DB_PREFIX."askpricesupplier as p"; -if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; -$sql.= " WHERE p.fk_soc = s.rowid"; -$sql.= " AND p.entity = ".$conf->entity; -if ($user->societe_id) $sql.=' AND p.fk_soc = '.$user->societe_id; -if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; -$sql.= " AND p.fk_statut IN (0,1,2,3,4)"; -$sql.= " GROUP BY p.fk_statut"; -$resql = $db->query($sql); -if ($resql) -{ - $num = $db->num_rows($resql); - $i = 0; - - $total=0; - $totalinprocess=0; - $dataseries=array(); - $vals=array(); - // -1=Canceled, 0=Draft, 1=Validated, (2=Accepted/On process not managed for customer orders), 3=Closed (Sent/Received, billed or not) - while ($i < $num) - { - $row = $db->fetch_row($resql); - if ($row) - { - //if ($row[1]!=-1 && ($row[1]!=3 || $row[2]!=1)) - { - $vals[$row[1]]=$row[0]; - $totalinprocess+=$row[0]; - } - $total+=$row[0]; - } - $i++; - } - $db->free($resql); - - print ''; - print ''."\n"; - $var=true; - $listofstatus=array(0,1,2,3,4); - foreach ($listofstatus as $status) - { - $dataseries[]=array('label'=>$askpricesupplierstatic->LibStatut($status,1),'data'=>(isset($vals[$status])?(int) $vals[$status]:0)); - if (! $conf->use_javascript_ajax) - { - $var=!$var; - print ""; - print ''; - print ''; - print "\n"; - } - } - if ($conf->use_javascript_ajax) - { - print ''; - } - - print ''; - print "
'.$langs->trans("Statistics").' - '.$langs->trans("CommRequests").'
'.$askpricesupplierstatic->LibStatut($status,0).''.(isset($vals[$status])?$vals[$status]:0).'
'; - $data=array('series'=>$dataseries); - dol_print_graph('stats',300,180,$data,1,'pie',1); - print '
'.$langs->trans("Total").''.$total.'

"; -} -else -{ - dol_print_error($db); -} - - -/* - * Draft askprice - */ -if (! empty($conf->askpricesupplier->enabled)) -{ - $sql = "SELECT c.rowid, c.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client"; - $sql.= " FROM ".MAIN_DB_PREFIX."askpricesupplier as c"; - $sql.= ", ".MAIN_DB_PREFIX."societe as s"; - if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE c.fk_soc = s.rowid"; - $sql.= " AND c.entity = ".$conf->entity; - $sql.= " AND c.fk_statut = 0"; - if ($socid) $sql.= " AND c.fk_soc = ".$socid; - if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - - $resql=$db->query($sql); - if ($resql) - { - print ''; - print ''; - print ''; - $langs->load("askpricesupplier"); - $num = $db->num_rows($resql); - if ($num) - { - $i = 0; - $var = True; - while ($i < $num) - { - $var=!$var; - $obj = $db->fetch_object($resql); - print ""; - - $askpricesupplierstatic->id=$obj->rowid; - $askpricesupplierstatic->ref=$obj->ref; - print ''; - - $companystatic->id=$obj->socid; - $companystatic->name=$obj->socname; - $companystatic->client=$obj->client; - $companystatic->canvas=$obj->canvas; - print ''; - - print ''; - $i++; - } - } - print "
'.$langs->trans("DraftRequests").'
'.$askpricesupplierstatic->getNomUrl(1).''.$companystatic->getNomUrl(1,'customer',24).'

"; - } -} - -print '
'; - - -$max=5; - -/* - * Last modified askprice - */ - -$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom as socname, s.rowid as socid, s.canvas, s.client,"; -$sql.= " date_cloture as datec"; -$sql.= " FROM ".MAIN_DB_PREFIX."askpricesupplier as c"; -$sql.= ", ".MAIN_DB_PREFIX."societe as s"; -if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; -$sql.= " WHERE c.fk_soc = s.rowid"; -$sql.= " AND c.entity = ".$conf->entity; -//$sql.= " AND c.fk_statut > 2"; -if ($socid) $sql .= " AND c.fk_soc = ".$socid; -if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; -$sql.= " ORDER BY c.tms DESC"; -$sql.= $db->plimit($max, 0); - -$resql=$db->query($sql); -if ($resql) -{ - print ''; - print ''; - print ''; - - $num = $db->num_rows($resql); - if ($num) - { - $i = 0; - $var = True; - while ($i < $num) - { - $var=!$var; - $obj = $db->fetch_object($resql); - - print ""; - print ''; - - $companystatic->id=$obj->socid; - $companystatic->name=$obj->socname; - $companystatic->client=$obj->client; - $companystatic->canvas=$obj->canvas; - print ''; - - print ''; - print ''; - print ''; - $i++; - } - } - print "
'.$langs->trans("LastModifiedRequests",$max).'
'; - - $askpricesupplierstatic->id=$obj->rowid; - $askpricesupplierstatic->ref=$obj->ref; - - print ''; - print ''; - - print ''; - - print '
'; - print $askpricesupplierstatic->getNomUrl(1); - print ''; - print ' '; - print ''; - $filename=dol_sanitizeFileName($obj->ref); - $filedir=$conf->askpricesupplier->dir_output . '/' . dol_sanitizeFileName($obj->ref); - $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid; - print $formfile->getDocumentsLink($askpricesupplierstatic->element, $filename, $filedir); - print '
'; - - print '
'.$companystatic->getNomUrl(1,'customer').''.dol_print_date($db->jdate($obj->datec),'day').''.$askpricesupplierstatic->LibStatut($obj->fk_statut,5).'

"; -} -else dol_print_error($db); - - -/* - * Opened askprice - */ -if (! empty($conf->askpricesupplier->enabled) && $user->rights->askpricesupplier->lire) -{ - $langs->load("askpricesupplier"); - - $now=dol_now(); - - $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client, p.rowid as askpricesupplierid, p.total as total_ttc, p.total_ht, p.ref, p.fk_statut, p.datec as dp"; - $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - $sql.= ", ".MAIN_DB_PREFIX."askpricesupplier as p"; - if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE p.fk_soc = s.rowid"; - $sql.= " AND p.entity = ".$conf->entity; - $sql.= " AND p.fk_statut = 1"; - if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($socid) $sql.= " AND s.rowid = ".$socid; - $sql.= " ORDER BY p.rowid DESC"; - - $result=$db->query($sql); - if ($result) - { - $total = 0; - $num = $db->num_rows($result); - $i = 0; - if ($num > 0) - { - $var=true; - - print ''; - print ''; - - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); - while ($i < $nbofloop) - { - $obj = $db->fetch_object($result); - $var=!$var; - print ''; - - // Ref - print '"; - - $companystatic->id=$obj->socid; - $companystatic->name=$obj->socname; - $companystatic->client=$obj->client; - $companystatic->canvas=$obj->canvas; - print ''."\n"; - - print ''."\n"; - print ''; - print ''."\n"; - print ''."\n"; - $i++; - $total += $obj->total_ttc; - } - if ($num > $nbofloop) - { - print '"; - } - else if ($total>0) - { - print '"; - } - print "
'.$langs->trans("RequestsOpened").' '.$num.'
'; - - $askpricesupplierstatic->id=$obj->askpricesupplierid; - $askpricesupplierstatic->ref=$obj->ref; - - print ''; - print ''; - print ''; - print '
'; - print $askpricesupplierstatic->getNomUrl(1); - print ''; - if ($db->jdate($obj->dfv) < ($now - $conf->askpricesupplier->cloture->warning_delay)) print img_warning($langs->trans("Late")); - print ''; - $filename=dol_sanitizeFileName($obj->ref); - $filedir=$conf->askpricesupplier->dir_output . '/' . dol_sanitizeFileName($obj->ref); - $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->askpricesupplierid; - print $formfile->getDocumentsLink($askpricesupplierstatic->element, $filename, $filedir); - print '
'; - - print "
'.$companystatic->getNomUrl(1,'customer',44).''; - print dol_print_date($db->jdate($obj->dp),'day').''.price($obj->total_ttc).''.$askpricesupplierstatic->LibStatut($obj->fk_statut,3).'
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total")."".price($total)." 

"; - } - } - else - { - dol_print_error($db); - } -} - -print '
'; - -llxFooter(); - -$db->close(); diff --git a/htdocs/comm/askpricesupplier/info.php b/htdocs/comm/askpricesupplier/info.php deleted file mode 100644 index 3b8f95d45fa..00000000000 --- a/htdocs/comm/askpricesupplier/info.php +++ /dev/null @@ -1,65 +0,0 @@ - - * Copyright (C) 2004-2006 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * - * 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 3 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, see . - */ - -/** - * \file htdocs/comm/propal/info.php - * \ingroup propal - * \brief Page d'affichage des infos d'une proposition commerciale - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/comm/askpricesupplier/class/askpricesupplier.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/askpricesupplier.lib.php'; - -$langs->load('askpricesupplier'); -$langs->load('compta'); - -$id=GETPOST('id','int'); -$socid=GETPOST('socid','int'); - -// Security check -if (! empty($user->societe_id)) $socid=$user->societe_id; -$result = restrictedArea($user, 'askpricesupplier', $id); - - -/* - * View - */ - -llxHeader('',$langs->trans('CommRequest'),'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'); - -$object = new AskPriceSupplier($db); -$object->fetch($id); -$object->fetch_thirdparty(); - -$head = askpricesupplier_prepare_head($object); -dol_fiche_head($head, 'info', $langs->trans('CommRequest'), 0, 'askpricesupplier'); - -$object->info($object->id); - -print '
'; -dol_print_object_info($object); -print '
'; - -print ''; - - -llxFooter(); -$db->close(); diff --git a/htdocs/comm/askpricesupplier/list.php b/htdocs/comm/askpricesupplier/list.php deleted file mode 100644 index 2e78045b308..00000000000 --- a/htdocs/comm/askpricesupplier/list.php +++ /dev/null @@ -1,425 +0,0 @@ - - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2011 Juanjo Menent - * Copyright (C) 2010-2011 Philippe Grand - * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2013 Cédric Salvador -* - * 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 3 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, see . - */ - -/** - * \file htdocs/comm/propal/list.php - * \ingroup propal - * \brief Page of commercial proposals card and list - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaskpricesupplier.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/comm/askpricesupplier/class/askpricesupplier.class.php'; -if (! empty($conf->projet->enabled)) - require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; - -$langs->load('companies'); -$langs->load('askpricesupplier'); -$langs->load('compta'); -$langs->load('bills'); -$langs->load('orders'); -$langs->load('products'); - -$socid=GETPOST('socid','int'); - -$search_user=GETPOST('search_user','int'); -$search_sale=GETPOST('search_sale','int'); -$search_ref=GETPOST('sf_ref')?GETPOST('sf_ref','alpha'):GETPOST('search_ref','alpha'); -$search_societe=GETPOST('search_societe','alpha'); -$search_montant_ht=GETPOST('search_montant_ht','alpha'); -$search_author=GETPOST('search_author','alpha'); -$viewstatut=$db->escape(GETPOST('viewstatut')); -$object_statut=$db->escape(GETPOST('askpricesupplier_statut')); - -$sall=GETPOST("sall"); -$mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg")); -$year=GETPOST("year"); -$month=GETPOST("month"); - -// Nombre de ligne pour choix de produit/service predefinis -$NBLINES=4; - -// Security check -$module='askpricesupplier'; -$dbtable=''; -$objectid=''; -if (! empty($user->societe_id)) $socid=$user->societe_id; -if (! empty($socid)) -{ - $objectid=$socid; - $module='societe'; - $dbtable='&societe'; -} -$result = restrictedArea($user, $module, $objectid, $dbtable); - -if (GETPOST("button_removefilter") || GETPOST("button_removefilter_x")) // Both tests are required to be compatible with all browsers -{ - $search_categ=''; - $search_user=''; - $search_sale=''; - $search_ref=''; - $search_societe=''; - $search_montant_ht=''; - $search_author=''; - $year=''; - $month=''; - $viewstatut=''; - $object_statut=''; -} - -if($object_statut != '') -$viewstatut=$object_statut; - - -// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array -$hookmanager->initHooks(array('askpricesupplierlist')); - - - -/* - * Actions - */ - - -$parameters=array('socid'=>$socid); -$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - - - -/* - * View - */ - -llxHeader('',$langs->trans('CommRequest'),'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'); - -$form = new Form($db); -$formother = new FormOther($db); -$formfile = new FormFile($db); -$formaskpricesupplier = new FormAskPriceSupplier($db); -$companystatic=new Societe($db); - -$now=dol_now(); - -$sortfield = GETPOST("sortfield",'alpha'); -$sortorder = GETPOST("sortorder",'alpha'); -$page = GETPOST("page",'int'); -if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; -$pageprev = $page - 1; -$pagenext = $page + 1; - -if (! $sortfield) $sortfield='p.date_livraison'; -if (! $sortorder) $sortorder='DESC'; -$limit = $conf->liste_limit; - - -$sql = 'SELECT s.rowid, s.nom as name, s.town, s.client, s.code_client,'; -$sql.= ' p.rowid as askpricesupplierid, p.note_private, p.total_ht, p.ref, p.fk_statut, p.fk_user_author, p.date_livraison as dp,'; -if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,"; -$sql.= ' u.login'; -$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'askpricesupplier as p'; -if ($sall) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'askpricesupplierdet as pd ON p.rowid=pd.fk_askpricesupplier'; -$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON p.fk_user_author = u.rowid'; -// We'll need this table joined to the select in order to filter by sale -if ($search_sale > 0 || (! $user->rights->societe->client->voir && ! $socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; -if ($search_user > 0) -{ - $sql.=", ".MAIN_DB_PREFIX."element_contact as c"; - $sql.=", ".MAIN_DB_PREFIX."c_type_contact as tc"; -} -$sql.= ' WHERE p.fk_soc = s.rowid'; -$sql.= ' AND p.entity = '.$conf->entity; -if (! $user->rights->societe->client->voir && ! $socid) //restriction -{ - $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; -} -if ($search_ref) { - $sql .= natural_search('p.ref', $search_ref); -} -if ($search_societe) { - $sql .= natural_search('s.nom', $search_societe); -} -if ($search_author) -{ - $sql.= " AND u.login LIKE '%".$db->escape(trim($search_author))."%'"; -} -if ($search_montant_ht) -{ - $sql.= " AND p.total_ht='".$db->escape(price2num(trim($search_montant_ht)))."'"; -} -if ($sall) { - $sql .= natural_search(array('s.nom', 'p.note_private', 'p.note_public', 'pd.description'), $sall); -} -if ($socid) $sql.= ' AND s.rowid = '.$socid; -if ($viewstatut <> '') -{ - $sql.= ' AND p.fk_statut IN ('.$viewstatut.')'; -} -if ($month > 0) -{ - if ($year > 0 && empty($day)) - $sql.= " AND p.date_livraison BETWEEN '".$db->idate(dol_get_first_day($year,$month,false))."' AND '".$db->idate(dol_get_last_day($year,$month,false))."'"; - else if ($year > 0 && ! empty($day)) - $sql.= " AND p.date_livraison BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'"; - else - $sql.= " AND date_format(p.date_livraison, '%m') = '".$month."'"; -} -else if ($year > 0) -{ - $sql.= " AND p.date_livraison BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; -} -if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale; -if ($search_user > 0) -{ - $sql.= " AND c.fk_c_type_contact = tc.rowid AND tc.element='askpricesupplier' AND tc.source='internal' AND c.element_id = p.rowid AND c.fk_socpeople = ".$search_user; -} - - -$sql.= ' ORDER BY '.$sortfield.' '.$sortorder.', p.ref DESC'; - -$nbtotalofrecords = 0; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); -} - - -$sql.= $db->plimit($limit + 1,$offset); -$result=$db->query($sql); - -if ($result) -{ - $objectstatic=new AskPriceSupplier($db); - $userstatic=new User($db); - $num = $db->num_rows($result); - - if ($socid) - { - $soc = new Societe($db); - $soc->fetch($socid); - } - - $param='&socid='.$socid.'&viewstatut='.$viewstatut; - if ($month) $param.='&month='.$month; - if ($year) $param.='&year='.$year; - if ($search_ref) $param.='&search_ref=' .$search_ref; - if ($search_societe) $param.='&search_societe=' .$search_societe; - if ($search_user > 0) $param.='&search_user='.$search_user; - if ($search_sale > 0) $param.='&search_sale='.$search_sale; - if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht; - if ($search_author) $param.='&search_author='.$search_author; - print_barre_liste($langs->trans('ListOfAskPriceSupplier').' '.($socid?'- '.$soc->name:''), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); - - // Lignes des champs de filtre - print '
'; - - $i = 0; - print ''; - - $moreforfilter=''; - - // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { - $langs->load("commercial"); - $moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': '; - $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user); - $moreforfilter.='       '; - } - // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { - $moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': '; - $moreforfilter.=$form->select_dolusers($search_user,'search_user',1); - } - if (! empty($moreforfilter)) - { - print ''; - print ''; - } - - print ''; - print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('AskPriceSupplierDate'),$_SERVER["PHP_SELF"],'p.date_livraison','',$param, 'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('AmountHT'),$_SERVER["PHP_SELF"],'p.total_ht','',$param, 'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Author'),$_SERVER["PHP_SELF"],'u.login','',$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Status'),$_SERVER["PHP_SELF"],'p.fk_statut','',$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); - print "\n"; - - print ''; - print ''; - print ''; - - // Date - print ''; - - // Amount - print ''; - // Author - print ''; - print ''; - - print ''; - - print "\n"; - - $var=true; - $total=0; - $subtotal=0; - - while ($i < min($num,$limit)) - { - $objp = $db->fetch_object($result); - $now = dol_now(); - $var=!$var; - print ''; - print '\n"; - - $url = DOL_URL_ROOT.'/comm/card.php?socid='.$objp->rowid; - - // Company - $companystatic->id=$objp->rowid; - $companystatic->name=$objp->name; - $companystatic->client=$objp->client; - $companystatic->code_client=$objp->code_client; - print ''; - - // Date askprice - print '\n"; - - print '\n"; - - $userstatic->id=$objp->fk_user_author; - $userstatic->login=$objp->login; - print '\n"; - - print '\n"; - - print ''; - - print "\n"; - - $total += $objp->total_ht; - $subtotal += $objp->total_ht; - - $i++; - } - - if ($total>0) - { - if($num<$limit){ - $var=!$var; - print ''; - print ''; - print ''; - } - else - { - $var=!$var; - print ''; - print ''; - print ''; - } - - } - - print '
'; - print $moreforfilter; - print '
'; - print ''; - print ''; - print ''; - print ''; - //print $langs->trans('Month').': '; - print ''; - //print ' '.$langs->trans('Year').': '; - $syear = $year; - $formother->select_year($syear,'year',1, 20, 5); - print ''; - print ''; - print ''; - print ''; - print ''; - $formaskpricesupplier->selectAskPriceSupplierStatus($viewstatut,1); - print ''; - print ''; - print ''; - print '
'; - - $objectstatic->id=$objp->askpricesupplierid; - $objectstatic->ref=$objp->ref; - - print ''; - print ''; - - print ''; - - // Ref - print '
'; - print $objectstatic->getNomUrl(1); - print ''; - if ($objp->fk_statut == 1 && $db->jdate($objp->dfv) < ($now - $conf->askpricesupplier->cloture->warning_delay)) print img_warning($langs->trans("Late")); - if (! empty($objp->note_private)) - { - print ' '; - print ''.img_picto($langs->trans("ViewPrivateNote"),'object_generic').''; - print ''; - } - print ''; - $filename=dol_sanitizeFileName($objp->ref); - $filedir=$conf->askpricesupplier->dir_output . '/' . dol_sanitizeFileName($objp->ref); - $urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->askpricesupplierid; - print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); - print '
'; - - print "
'; - print $companystatic->getNomUrl(1,'customer'); - print ''; - print dol_print_date($db->jdate($objp->dp), 'day'); - print "'.price($objp->total_ht)."'; - if ($userstatic->id) print $userstatic->getLoginUrl(1); - else print ' '; - print "'.$objectstatic->LibStatut($objp->fk_statut,5)." 
'.$langs->trans("TotalHT").''.price($total).'
'.$langs->trans("TotalHTforthispage").''.price($total).'
'; - - print '
'; - - $db->free($result); -} -else -{ - dol_print_error($db); -} - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index a9164676716..c5630d8c6c1 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -105,7 +105,7 @@ if (empty($reshook)) $result=$object->fetch($id); $object->code_compta=$_POST["customeraccountancycode"]; $result=$object->update($object->id,$user,1,1,0); - if ($result < 0) setEventMessage($object->error,$object->errors,'errors'); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // conditions de reglement @@ -113,7 +113,7 @@ if (empty($reshook)) { $object->fetch($id); $result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int')); - if ($result < 0) setEventMessage($object->error,$object->errors,'errors'); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // mode de reglement @@ -121,7 +121,7 @@ if (empty($reshook)) { $object->fetch($id); $result=$object->setPaymentMethods(GETPOST('mode_reglement_id','int')); - if ($result < 0) setEventMessage($object->error,$object->errors,'errors'); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // assujetissement a la TVA @@ -130,7 +130,7 @@ if (empty($reshook)) $object->fetch($id); $object->tva_assuj=$_POST['assujtva_value']; $result=$object->update($object->id); - if ($result < 0) setEventMessage($object->error,$object->errors,'errors'); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // set prospect level @@ -139,7 +139,7 @@ if (empty($reshook)) $object->fetch($id); $object->fk_prospectlevel=GETPOST('prospect_level_id','alpha'); $result=$object->set_prospect_level($user); - if ($result < 0) setEventMessage($object->error,$object->errors,'errors'); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // set communication status @@ -148,7 +148,7 @@ if (empty($reshook)) $object->fetch($id); $object->stcomm_id=dol_getIdFromCode($db, GETPOST('stcomm','alpha'), 'c_stcomm'); $result=$object->set_commnucation_level($user); - if ($result < 0) setEventMessages($object->error,$object->errors,'errors'); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // update outstandng limit @@ -157,7 +157,7 @@ if (empty($reshook)) $object->fetch($id); $object->outstanding_limit=GETPOST('outstanding_limit'); $result=$object->set_OutstandingBill($user); - if ($result < 0) setEventMessage($object->error,$object->errors,'errors'); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } } @@ -184,7 +184,7 @@ $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('',$title,$help_url); - +/* if ($mode == 'search') { if ($modesearch == 'soc') @@ -209,7 +209,7 @@ if ($mode == 'search') $db->free($resql); } } - +*/ if ($id > 0) { @@ -218,17 +218,15 @@ if ($id > 0) dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"),0,'company'); + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + print '
'; - + print '
'; print ''; - print ''; - // Alias name (commercial, trademark or alias name) - print '"; @@ -264,39 +262,6 @@ if ($id > 0) print ''; } - // Address - print '"; - - // Zip / Town - print ''; - print '"; - print ''; - - // Country - print ''; - - // EMail - print ''; - - // Web - print ''; - - // Phone - print ''; - - // Fax - print ''; - // Skype if (! empty($conf->skype->enabled)) { @@ -411,17 +376,6 @@ if ($id > 0) $limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount'; print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : '')); if (empty($object->outstanding_limit)) print $langs->trans("NoLimit"); - // display amount and link to unpaid bill - $outstandingBills = $object->get_OutstandingBill(); - print ' (' . $langs->trans('CurrentOutstandingBill') . ': '; - print price($outstandingBills, '', $langs, 0, 0, - 1, $conf->currency); - if ($object->outstanding_limit != '') - { - if ($outstandingBills > $object->outstanding_limit) - print img_warning($langs->trans("OutstandingBillReached")); - //print ' / ' . price($soc->outstanding_limit); - } - print ')'; print ''; print ''; @@ -526,14 +480,24 @@ if ($id > 0) // Nbre max d'elements des petites listes - $MAXLIST=4; - $tableaushown=1; + $MAXLIST=$conf->global->MAIN_SIZE_SHORTLISTE_LIMIT; // Lien recap + $outstandingBills = $object->get_OutstandingBill(); + $warn = ''; + if ($object->outstanding_limit != '' && $object->outstanding_limit < $outstandingBills) + { + $warn = img_warning($langs->trans("OutstandingBillReached")); + } + print '
'.$langs->trans("ThirdPartyName").''; - print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','',''); - print '
'.$langs->trans('AliasNameShort').''; + print '
'.$langs->trans('AliasNames').''; print $object->name_alias; print "
'.$langs->trans('Address').''; - dol_print_address($object->address,'gmap','thirdparty',$object->id); - print "
'.$langs->trans('Zip').' / '.$langs->trans('Town').''.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town."
'.$langs->trans("Country").''; - if (! empty($object->country_code)) - { - //$img=picto_from_langcode($object->country_code); - $img=''; - if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0); - else print ($img?$img.' ':'').$object->country; - } - print '
'.$langs->trans('EMail').''.dol_print_email($object->email,0,$object->id,'AC_EMAIL').'
'.$langs->trans("Web").''.dol_print_url($object->url,'_blank').'
'.$langs->trans('Phone').''.dol_print_phone($object->phone,$object->country_code,0,$object->id,'AC_TEL').''.$langs->trans('Fax').''.dol_print_phone($object->fax,$object->country_code,0,$object->id,'AC_FAX').'
'; print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print ''; print '
'; - print '
'.$langs->trans("Summary").''.$langs->trans("ShowCustomerPreview").'
'.$langs->trans("Summary").''.$langs->trans("ShowCustomerPreview").'
'.$langs->trans("CurrentOutstandingBill").''.price($outstandingBills).$warn.'
'; print '
'; @@ -719,7 +683,6 @@ if ($id > 0) if ($num > 0) { print ''; - $tableaushown=1; print ''; print ''; print '
'; print ''; @@ -762,7 +725,7 @@ if ($id > 0) { $contratstatic=new Contrat($db); - $sql = "SELECT s.nom, s.rowid, c.rowid as id, c.ref as ref, c.statut, c.datec as dc"; + $sql = "SELECT s.nom, s.rowid, c.rowid as id, c.ref as ref, c.statut, c.datec as dc, c.date_contrat as dcon, c.ref_supplier as refsup"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c"; $sql.= " WHERE c.fk_soc = s.rowid "; $sql.= " AND s.rowid = ".$object->id; @@ -779,7 +742,7 @@ if ($id > 0) print '
'.$langs->trans("LastSendings",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllSendings").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').'
'; print ''; - print ''; print ''; @@ -1866,7 +1864,7 @@ if ($action == 'create') if ($action != 'editavailability' && ! empty($object->brouillon)) print ''; print '
'; + print ''; print ''; } @@ -796,7 +759,9 @@ if ($id > 0) $contrat->ref=$objp->ref?$objp->ref:$objp->id; print $contrat->getNomUrl(1,12); print "\n"; + print '\n"; print '\n"; + print '\n"; print ''; print ''; // Status - print ''; + print ''; // Nb of distinct emails print ''; print '
'.$langs->trans("LastContracts",($num<=$MAXLIST?"":$MAXLIST)).''; print '
'.$langs->trans("LastContracts",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllContracts").' '.$num.'
'.dol_trunc($objp->refsup,12)."'.dol_print_date($db->jdate($objp->dc),'day')."'.dol_print_date($db->jdate($objp->dcon),'day')." '; $contrat->fetch_lines(); @@ -903,7 +868,6 @@ if ($id > 0) { print ''; - $tableaushown=1; print ''; print ''; // Status - print ''; + print ''; // Nb of distinct emails print '
'; print ''; @@ -1059,6 +1023,7 @@ if ($id > 0) // List of done actions show_actions_done($conf,$langs,$db,$object); } + } else { diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 7bdbaf99b80..c7690e7e16f 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -34,7 +34,7 @@ $page=GETPOST('page', 'int'); if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="p.name"; if ($page < 0) { $page = 0; } -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page ; $type=GETPOST('type', 'alpha'); @@ -51,10 +51,10 @@ $result = restrictedArea($user, 'societe',$socid,''); /* -* View -*/ + * View + */ -llxHeader('','Contacts'); +llxHeader('',$langs->trans("Contacts")); if ($type == "c" || $type == "p") { @@ -68,8 +68,7 @@ if ($type == "f") } /* - * Mode liste - * + * List mode */ $sql = "SELECT s.rowid, s.nom as name, st.libelle as stcomm"; diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 7dc359b4568..727e9904fef 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -31,11 +31,14 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; if (! empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; +if (! empty($conf->supplier_proposal->enabled)) require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; if (! $user->rights->societe->lire) accessforbidden(); $langs->load("commercial"); +$langs->load("propal"); $action=GETPOST('action', 'alpha'); $bid=GETPOST('bid', 'int'); @@ -64,101 +67,78 @@ $form = new Form($db); $formfile = new FormFile($db); $companystatic=new Societe($db); if (! empty($conf->propal->enabled)) $propalstatic=new Propal($db); +if (! empty($conf->supplier_proposal->enabled)) $supplierproposalstatic=new SupplierProposal($db); if (! empty($conf->commande->enabled)) $orderstatic=new Commande($db); +if (! empty($conf->fournisseur->enabled)) $supplierorderstatic=new CommandeFournisseur($db); llxHeader(); -print_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png'); +print load_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png'); print '
'; // Search proposal if (! empty($conf->propal->enabled) && $user->rights->propal->lire) { - $var=false; - print '
'; - print ''; - print '
'.$langs->trans("LastCustomersBills",($num<=$MAXLIST?"":$MAXLIST)).''.$langs->trans("AllBills").' '.$num.''.img_picto($langs->trans("Statistics"),'stats').'
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "
'.$langs->trans("SearchAProposal").'
:
:
\n"; - print "
\n"; + $listofsearchfields['search_proposal']=array('text'=>'Proposal'); } - // Search customer order if (! empty($conf->commande->enabled) && $user->rights->commande->lire) { - $var=false; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "
'.$langs->trans("SearchACustomerOrder").'
'; - print ':
:

\n"; + $listofsearchfields['search_customer_order']=array('text'=>'CustomerOrder'); } - // Search supplier order if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire) { - $var=false; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "
'.$langs->trans("SearchASupplierOrder").'
'; - print ':
:

\n"; + $listofsearchfields['search_supplier_order']=array('text'=>'SupplierOrder'); +} +// Search intervention +if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire) +{ + $listofsearchfields['search_intervention']=array('text'=>'Intervention'); } - // Search contract if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) { - $var=false; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "
'.$langs->trans("SearchAContract").'
:
:
\n"; - print "
"; + $listofsearchfields['search_contract']=array('text'=>'Contrat'); +} +// Search contract +if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) +{ + $listofsearchfields['search_supplier_proposal']=array('text'=>'SupplierProposalShort'); } -// Search contract -if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire) +if (count($listofsearchfields)) { - $var=false; - print '
'; + print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "
'.$langs->trans("SearchAnIntervention").'
:
:
\n"; - print "
"; + print ''; + $i=0; + foreach($listofsearchfields as $key => $value) + { + if ($i == 0) print ''; + print ''; + print ''; + if ($i == 0) print ''; + print ''; + $i++; + } + print '
'.$langs->trans("Search").'
:
'; + print ''; + print '
'; } + + /* * Draft proposals */ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) { + $langs->load("propal"); + $sql = "SELECT p.rowid, p.ref, p.ref_client, p.total_ht, p.tva as total_tva, p.total as total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas"; + $sql.= ", s.code_client"; $sql.= " FROM ".MAIN_DB_PREFIX."propal as p"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -171,12 +151,13 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) $resql=$db->query($sql); if ($resql) { - print ''; - print ''; - print ''; - $total = 0; $num = $db->num_rows($resql); + + print '
'.$langs->trans("ProposalsDraft").'
'; + print ''; + print ''; + if ($num > 0) { $i = 0; @@ -198,6 +179,8 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) $companystatic->id=$obj->socid; $companystatic->name=$obj->name; $companystatic->client=$obj->client; + $companystatic->code_client = $obj->code_client; + $companystatic->code_fournisseur = $obj->code_fournisseur; $companystatic->canvas=$obj->canvas; print $companystatic->getNomUrl(1,'customer',16); print ''; @@ -211,6 +194,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) print '"; } } + else + { + $var=!$var; + print ''; + } print "
'.$langs->trans("ProposalsDraft").($num?' '.$num.'':'').'
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("NoProposal").'

"; $db->free($resql); @@ -222,6 +210,86 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) } + +/* + * Draft supplier proposals + */ +if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) +{ + $langs->load("supplier_proposal"); + + $sql = "SELECT p.rowid, p.ref, p.total_ht, p.tva as total_tva, p.total as total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas"; + $sql.= ", s.code_client"; + $sql.= " FROM ".MAIN_DB_PREFIX."supplier_proposal as p"; + $sql.= ", ".MAIN_DB_PREFIX."societe as s"; + if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql.= " WHERE p.fk_statut = 0"; + $sql.= " AND p.fk_soc = s.rowid"; + $sql.= " AND p.entity IN (".getEntity('propal', 1).")"; + if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($socid) $sql.= " AND s.rowid = ".$socid; + + $resql=$db->query($sql); + if ($resql) + { + $total = 0; + $num = $db->num_rows($resql); + + print ''; + print ''; + print ''; + + if ($num > 0) + { + $i = 0; + $var=true; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $var=!$var; + print ''; + print ''; + print ''; + $i++; + $total += $obj->total_ht; + } + if ($total>0) + { + $var=!$var; + print '"; + } + } + else + { + $var=!$var; + print ''; + } + print "
'.$langs->trans("SupplierProposalsDraft").($num?' '.$num.'':'').'
'; + $supplierproposalstatic->id=$obj->rowid; + $supplierproposalstatic->ref=$obj->ref; + $supplierproposalstatic->total_ht = $obj->total_ht; + $supplierproposalstatic->total_tva = $obj->total_tva; + $supplierproposalstatic->total_ttc = $obj->total_ttc; + print $supplierproposalstatic->getNomUrl(1); + print ''; + $companystatic->id=$obj->socid; + $companystatic->name=$obj->name; + $companystatic->client=$obj->client; + $companystatic->code_client = $obj->code_client; + $companystatic->code_fournisseur = $obj->code_fournisseur; + $companystatic->canvas=$obj->canvas; + print $companystatic->getNomUrl(1,'customer',16); + print ''.price($obj->total_ht).'
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("NoProposal").'

"; + + $db->free($resql); + } + else + { + dol_print_error($db); + } +} + + /* * Draft orders */ @@ -230,6 +298,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $langs->load("orders"); $sql = "SELECT c.rowid, c.ref, c.ref_client, c.total_ht, c.tva as total_tva, c.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas"; + $sql.= ", s.code_client"; $sql.= " FROM ".MAIN_DB_PREFIX."commande as c"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -242,12 +311,13 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $resql = $db->query($sql); if ($resql) { - print ''; - print ''; - print ''; - $total = 0; $num = $db->num_rows($resql); + + print '
'.$langs->trans("DraftOrders").'
'; + print ''; + print ''; + if ($num) { $i = 0; @@ -269,6 +339,8 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $companystatic->id=$obj->socid; $companystatic->name=$obj->name; $companystatic->client=$obj->client; + $companystatic->code_client = $obj->code_client; + $companystatic->code_fournisseur = $obj->code_fournisseur; $companystatic->canvas=$obj->canvas; print $companystatic->getNomUrl(1,'customer',16); print ''; @@ -282,10 +354,98 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) print '"; } } + else + { + $var=!$var; + print ''; + } print "
'.$langs->trans("DraftOrders").($num?' '.$num.'':'').'
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("NoOrder").'

"; $db->free($resql); } + else + { + dol_print_error($db); + } +} + + +/* + * Draft suppliers orders + */ +if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire) +{ + $langs->load("orders"); + + $sql = "SELECT cf.rowid, cf.ref, cf.ref_supplier, cf.total_ttc, s.rowid as socid, s.nom as name, s.client, s.canvas"; + $sql.= ", s.code_client"; + $sql.= ", s.code_fournisseur"; + $sql.= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as cf"; + $sql.= ", ".MAIN_DB_PREFIX."societe as s"; + if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql.= " WHERE cf.fk_soc = s.rowid"; + $sql.= " AND cf.fk_statut = 0"; + $sql.= " AND cf.entity IN (".getEntity('supplier_order', 1).")"; + if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + if ($socid) $sql.= " AND cf.fk_soc = ".$socid; + + $resql = $db->query($sql); + if ($resql) + { + $total = 0; + $num = $db->num_rows($resql); + + print ''; + print ''; + print ''; + + if ($num) + { + $i = 0; + $var = true; + while ($i < $num) + { + $var=!$var; + $obj = $db->fetch_object($resql); + print ''; + print ''; + print ''; + $i++; + $total += $obj->total_ttc; + } + if ($total>0) + { + $var=!$var; + print '"; + } + } + else + { + $var=!$var; + print ''; + } + print "
'.$langs->trans("DraftSuppliersOrders").($num?' '.$num.'':'').'
'; + $supplierorderstatic->id=$obj->rowid; + $supplierorderstatic->ref=$obj->ref; + $supplierorderstatic->ref_supplier=$obj->ref_suppliert; + $supplierorderstatic->total_ht = $obj->total_ht; + $supplierorderstatic->total_tva = $obj->total_tva; + $supplierorderstatic->total_ttc = $obj->total_ttc; + print $supplierorderstatic->getNomUrl(1); + print ''; + $companystatic->id=$obj->socid; + $companystatic->name=$obj->name; + $companystatic->client=$obj->client; + $companystatic->code_client = $obj->code_client; + $companystatic->code_fournisseur = $obj->code_fournisseur; + $companystatic->canvas=$obj->canvas; + print $companystatic->getNomUrl(1,'customer',16); + print ''.price($obj->total_ttc).'
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("NoSupplierOrder").'

"; + + $db->free($resql); + } else { + dol_print_error($db); + } } @@ -304,6 +464,7 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire) $langs->load("boxes"); $sql = "SELECT s.rowid, s.nom as name, s.client, s.datec, s.tms, s.canvas"; + $sql.= ", s.code_client"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.client IN (1, 2, 3)"; @@ -322,7 +483,11 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire) print ''; print ''; - print ''; + print ''; print ''; print ''; if ($num) @@ -333,6 +498,8 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire) $companystatic->id=$objp->rowid; $companystatic->name=$objp->name; $companystatic->client=$objp->client; + $companystatic->code_client = $objp->code_client; + $companystatic->code_fournisseur = $objp->code_fournisseur; $companystatic->canvas=$objp->canvas; print ''; print ''; @@ -362,6 +529,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->societe->lire) $langs->load("boxes"); $sql = "SELECT s.nom as name, s.rowid, s.datec as dc, s.canvas, s.tms as dm"; + $sql.= ", s.code_fournisseur"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.fournisseur = 1"; @@ -389,6 +557,8 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->societe->lire) $objp = $db->fetch_object($result); $companystatic->id=$objp->rowid; $companystatic->name=$objp->name; + $companystatic->code_client = $objp->code_client; + $companystatic->code_fournisseur = $objp->code_fournisseur; $companystatic->canvas=$objp->canvas; print ''; print ''; @@ -434,6 +604,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) // TO $langs->load("contracts"); $sql = "SELECT s.nom as name, s.rowid, s.canvas, "; + $sql.= ", s.code_client"; $sql.= " c.statut, c.rowid as contratid, p.ref, c.mise_en_service as datemes, c.fin_validite as datefin, c.date_cloture as dateclo"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."contrat as c"; @@ -468,6 +639,8 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) // TO print ''."\n"; @@ -492,6 +665,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) $langs->load("propal"); $sql = "SELECT s.nom as name, s.rowid, p.rowid as propalid, p.total as total_ttc, p.total_ht, p.tva as total_tva, p.ref, p.ref_client, p.fk_statut, p.datep as dp, p.fin_validite as dfv"; + $sql.= ", s.code_client"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."propal as p"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -552,6 +726,8 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) $companystatic->id=$obj->rowid; $companystatic->name=$obj->name; $companystatic->client=$obj->client; + $companystatic->code_client = $obj->code_client; + $companystatic->code_fournisseur = $obj->code_fournisseur; $companystatic->canvas=$obj->canvas; print $companystatic->getNomUrl(1, 'company', 44); print ''; @@ -588,6 +764,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $langs->load("orders"); $sql = "SELECT s.nom as name, s.rowid, c.rowid as commandeid, c.total_ttc, c.total_ht, c.tva as total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv, c.facture as billed"; + $sql.= ", s.code_client"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."commande as c"; if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -648,6 +825,8 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $companystatic->id=$obj->rowid; $companystatic->name=$obj->name; $companystatic->client=$obj->client; + $companystatic->code_client = $obj->code_client; + $companystatic->code_fournisseur = $obj->code_fournisseur; $companystatic->canvas=$obj->canvas; print $companystatic->getNomUrl(1, 'company', 44); print ''; diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php deleted file mode 100644 index 126ffc5f470..00000000000 --- a/htdocs/comm/list.php +++ /dev/null @@ -1,304 +0,0 @@ - - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2013 Florian Henry - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2015 Marcos García - * - * This program is freei 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 3 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, see . - */ - -/** - * \file htdocs/comm/list.php - * \ingroup commercial societe - * \brief List of customers - */ - -require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; - -$langs->load("companies"); -$langs->load("customers"); -$langs->load("suppliers"); -$langs->load("commercial"); - -// Security check -$socid = GETPOST('socid','int'); -if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user,'societe',$socid,''); - -$sortfield = GETPOST('sortfield','alpha'); -$sortorder = GETPOST('sortorder','alpha'); -$page=GETPOST('page','int'); -if ($page == -1) { $page = 0 ; } -$offset = $conf->liste_limit * $page; -$pageprev = $page - 1; -$pagenext = $page + 1; -if (! $sortorder) $sortorder="ASC"; -if (! $sortfield) $sortfield="s.nom"; - -$search_company=GETPOST("search_company"); -$search_zipcode=GETPOST("search_zipcode"); -$search_town=GETPOST("search_town"); -$search_code=GETPOST("search_code"); -$search_compta=GETPOST("search_compta"); -$search_status= GETPOST("search_status",'int'); - -// Load sale and categ filters -$search_sale = GETPOST("search_sale",'int'); -$search_categ = GETPOST("search_categ",'int'); -$catid = GETPOST("catid",'int'); -// If the internal user must only see his customers, force searching by him -if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id; - -// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array -$hookmanager->initHooks(array('customerlist')); -$extrafields = new ExtraFields($db); - - -/* - * Actions - */ - -$parameters=array(); -$reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - -// Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers -{ - $search_sale=""; - $search_categ=""; - $catid=""; - $search_company=""; - $search_zipcode=""; - $search_town=""; - $search_code=''; - $search_compta=''; - $search_status=''; -} - -if ($search_status=='') $search_status=1; // always display activ customer first - - -/* - * view - */ - -$formother=new FormOther($db); -$form = new Form($db); -$thirdpartystatic=new Societe($db); - -$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('',$langs->trans("ThirdParty"),$help_url); - -$sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.client, s.zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,"; -$sql.= " s.datec, s.canvas"; -if ((!$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) -// Add fields for extrafields -foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key; -// Add fields from hooks -$parameters=array(); -$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook -$sql.=$hookmanager->resPrint; -$sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; -if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; // We need this table joined to the select in order to filter by categ -if ((!$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale -$sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st"; -$sql.= " WHERE s.fk_stcomm = st.id"; -$sql.= " AND s.client IN (1, 3)"; -$sql.= ' AND s.entity IN ('.getEntity('societe', 1).')'; -if ((!$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc"; -if ($socid) $sql.= " AND s.rowid = ".$socid; -if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale -if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid; -if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL"; -if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ; -if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL"; -if ($search_company) $sql.= natural_search(array('s.nom', 's.name_alias'), $search_company); -if ($search_zipcode) $sql.= natural_search("s.zip", $search_zipcode); -if ($search_town) $sql.= natural_search('s.town', $search_town); -if ($search_code) $sql.= natural_search("s.code_client", $search_code); -if ($search_compta) $sql.= natural_search("s.code_compta", $search_compta); -if ($search_status!='') $sql.= " AND s.status = ".$db->escape($search_status); -if ($search_sale > 0) $sql.= " AND sc.fk_user = ".$search_sale; -// Add where from hooks -$parameters=array(); -$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook -$sql.=$hookmanager->resPrint; - -// Count total nb of records -$nbtotalofrecords = 0; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); -} - -$sql.= $db->order($sortfield,$sortorder); -$sql.= $db->plimit($conf->liste_limit +1, $offset); - -dol_syslog('comm/list.php:', LOG_DEBUG); -$result = $db->query($sql); -if ($result) -{ - $num = $db->num_rows($result); - - $param = "&search_company=".$search_company."&search_code=".$search_code."&search_zipcode=".$search_zipcode."&search_town=".$search_town; - if ($search_categ != '') $param.='&search_categ='.$search_categ; - if ($search_sale > 0) $param.='&search_sale='.$search_sale; - if ($search_status != '') $param.='&search_status='.$search_status; - - print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_companies.png'); - - $i = 0; - - print '
'."\n"; - - // Filter on categories - $moreforfilter=''; - if (! empty($conf->categorie->enabled)) - { - $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$formother->select_categories(2,$search_categ,'search_categ',1); - $moreforfilter.='       '; - } - // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { - $moreforfilter.=$langs->trans('SalesRepresentatives'). ': '; - $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user); - } - if ($moreforfilter) - { - print '
'; - print $moreforfilter; - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - print '
'; - } - - print '
'.$langs->trans("BoxTitleLastCustomersOrProspects",$max).''; + if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastCustomersOrProspects",$max); + else if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastModifiedProspects",$max); + else print $langs->trans("BoxTitleLastModifiedCustomers",$max); + print ''.$langs->trans("DateModificationShort").'
'.$companystatic->getNomUrl(1,'customer',48).'
'.$companystatic->getNomUrl(1,'supplier',44).''; $companystatic->id=$objp->rowid; $companystatic->name=$objp->name; + $companystatic->code_client = $objp->code_client; + $companystatic->code_fournisseur = $objp->code_fournisseur; $companystatic->canvas=$objp->canvas; print $companystatic->getNomUrl(1,'customer',44); print '
'."\n"; - - print ''; - print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.zip","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","",$param,'align="left"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec","",$param,'align="right"',$sortfield,$sortorder); - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); - print "\n"; - - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - print ''; - - print ''; - - print ''."\n"; - - - $var=True; - - while ($i < min($num,$conf->liste_limit)) - { - $obj = $db->fetch_object($result); - - $var=!$var; - - print ""; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - $parameters=array('obj' => $obj); - $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - print ''; - - print ''; - - print "\n"; - $i++; - } - $db->free($result); - - $parameters=array('sql' => $sql); - $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - print "
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ' '; - print ''; - print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); - print ''; - print ''; - print '
'; - $thirdpartystatic->id=$obj->rowid; - $thirdpartystatic->name=$obj->name; - $thirdpartystatic->client=$obj->client; - $thirdpartystatic->code_client=$obj->code_client; - $thirdpartystatic->canvas=$obj->canvas; - $thirdpartystatic->status=$obj->status; - $thirdpartystatic->name_alias=$obj->name_alias; - print $thirdpartystatic->getNomUrl(1); - print ''.$obj->zip.''.$obj->town.''.$obj->code_client.''.$obj->code_compta.''.dol_print_date($db->jdate($obj->datec),'day').''.$thirdpartystatic->getLibStatut(3); - print '
\n"; - print "\n"; -} -else -{ - dol_print_error($db); -} - -llxFooter(); -$db->close(); diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index b7d4f909fa7..a468e79e23a 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -117,7 +117,7 @@ if (empty($reshook)) { if (empty($_REQUEST["clone_content"]) && empty($_REQUEST["clone_receivers"])) { - setEventMessage($langs->trans("NoCloneOptionsSpecified"), 'errors'); + setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { @@ -129,7 +129,7 @@ if (empty($reshook)) } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } $action=''; @@ -141,14 +141,14 @@ if (empty($reshook)) if (empty($conf->global->MAILING_LIMIT_SENDBYWEB)) { // As security measure, we don't allow send from the GUI - setEventMessage($langs->trans("MailingNeedCommand"), 'warnings'); - setEventMessage('', 'warnings'); - setEventMessage($langs->trans("MailingNeedCommand2"), 'warnings'); + setEventMessages($langs->trans("MailingNeedCommand"), null, 'warnings'); + setEventMessages('', null, 'warnings'); + setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); $action=''; } else if ($conf->global->MAILING_LIMIT_SENDBYWEB < 0) { - setEventMessage($langs->trans("NotEnoughPermissions"), 'warnings'); + setEventMessages($langs->trans("NotEnoughPermissions"), null, 'warnings'); $action=''; } else @@ -351,27 +351,27 @@ if (empty($reshook)) } else { - setEventMessage($langs->transnoentitiesnoconv("NoMoreRecipientToSendTo")); + setEventMessages($langs->transnoentitiesnoconv("NoMoreRecipientToSendTo"), null, 'mesgs'); } // Loop finished, set global statut of mail if ($nbko > 0) { $statut=2; // Status 'sent partially' (because at least one error) - if ($nbok > 0) setEventMessage($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok)); - else setEventMessage($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok)); + if ($nbok > 0) setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok), null, 'mesgs'); + else setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok), null, 'mesgs'); } else { if ($nbok >= $num) { $statut=3; // Send to everybody - setEventMessage($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok)); + setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok), null, 'mesgs'); } else { $statut=2; // Status 'sent partially' (because not send to everybody) - setEventMessage($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok)); + setEventMessages($langs->transnoentitiesnoconv("EMailSentToNRecipients",$nbok), null, 'mesgs'); } } @@ -403,7 +403,7 @@ if (empty($reshook)) $object->sendto = $_POST["sendto"]; if (! $object->sendto) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("MailTo")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("MailTo")), null, 'errors'); $error++; } @@ -443,11 +443,11 @@ if (empty($reshook)) $result=$mailfile->sendfile(); if ($result) { - setEventMessage($langs->trans("MailSuccessfulySent",$mailfile->getValidAddress($object->email_from,2),$mailfile->getValidAddress($object->sendto,2))); + setEventMessages($langs->trans("MailSuccessfulySent",$mailfile->getValidAddress($object->email_from,2),$mailfile->getValidAddress($object->sendto,2)), null, 'mesgs'); } else { - setEventMessage($langs->trans("ResultKo").'
'.$mailfile->error.' '.$result, 'errors'); + setEventMessages($langs->trans("ResultKo").'
'.$mailfile->error.' '.$result, null, 'errors'); } $action=''; @@ -488,7 +488,7 @@ if (empty($reshook)) $mesgs[] = $object->error; } - setEventMessage($mesgs, 'errors'); + setEventMessages($mesg, $mesgs, 'errors'); $action="create"; } @@ -518,7 +518,7 @@ if (empty($reshook)) $mesg = $object->error; } - setEventMessage($mesg, 'errors'); + setEventMessages($mesg, $mesgs, 'errors'); $action=""; } @@ -544,7 +544,7 @@ if (empty($reshook)) require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_remove_file_process($_POST['removedfile'],0); + dol_remove_file_process($_POST['removedfile'],0,0); // We really delete file linked to mailing $action="edit"; } @@ -582,7 +582,7 @@ if (empty($reshook)) $mesgs[] =$object->error; } - setEventMessage($mesgs, 'errors'); + setEventMessages($mesg, $mesgs, 'errors'); $action="edit"; } else @@ -597,7 +597,7 @@ if (empty($reshook)) if ($object->id > 0) { $object->valid($user); - setEventMessage($langs->trans("MailingSuccessfullyValidated")); + setEventMessages($langs->trans("MailingSuccessfullyValidated"), null, 'mesgs'); header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } @@ -628,7 +628,7 @@ if (empty($reshook)) } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } } @@ -673,7 +673,7 @@ if ($action == 'create') print ''; print ''; - print_fiche_titre($langs->trans("NewMailing")); + print load_fiche_titre($langs->trans("NewMailing")); dol_fiche_head(); @@ -764,18 +764,18 @@ else // You ensure that every user is using its own SMTP server. $linktoadminemailbefore=''; $linktoadminemailend=''; - setEventMessage($langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]), 'warnings'); - setEventMessage($langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']), 'warnings'); - if (! empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessage($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), 'warnings'); + setEventMessages($langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]), null, 'warnings'); + setEventMessages($langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']), null, 'warnings'); + if (! empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessages($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), null, 'warnings'); $_GET["action"]=''; } else if (empty($conf->global->MAILING_LIMIT_SENDBYWEB)) { // Pour des raisons de securite, on ne permet pas cette fonction via l'IHM, // on affiche donc juste un message - setEventMessage($langs->trans("MailingNeedCommand"), 'warnings'); - setEventMessage('', 'warnings'); - setEventMessage($langs->trans("MailingNeedCommand2"), 'warnings'); + setEventMessages($langs->trans("MailingNeedCommand"), null, 'warnings'); + setEventMessages('', null, 'warnings'); + setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); $_GET["action"]=''; } else @@ -818,7 +818,9 @@ else print '
'.$langs->trans("Status").''.$object->getLibStatut(4).'
'.$langs->trans("Status").''.$object->getLibStatut(4); + if ($object->statut == 2) print ' ('.$object->countNbOfTargets('alreadysent').'/'.$object->nbemail.')'; + print'
'; @@ -958,7 +960,7 @@ else // Affichage formulaire de TEST if ($action == 'test') { - print_titre($langs->trans("TestMailing")); + print load_fiche_titre($langs->trans("TestMailing")); // Create l'objet formulaire mail include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; @@ -991,7 +993,7 @@ else } // Print mail content - print_fiche_titre($langs->trans("EMail"),'',''); + print load_fiche_titre($langs->trans("EMail"),'',''); dol_fiche_head(''); @@ -1093,7 +1095,10 @@ else } print '
'; - print ""; + + dol_fiche_end(); + + print "\n"; print '
'."\n"; @@ -1102,7 +1107,10 @@ else print ''; // Print mail content - print_fiche_titre($langs->trans("EMail"),'',''); + print load_fiche_titre($langs->trans("EMail"),'',''); + + dol_fiche_head(); + print ''; // Subject @@ -1168,7 +1176,9 @@ else print '
'; - print '
'; + dol_fiche_end(); + + print '
'; print ''; print '     '; print ''; diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 99c73dc4837..0c133fac6df 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -38,11 +38,12 @@ $langs->load("mails"); if (! $user->rights->mailing->lire || $user->societe_id > 0) accessforbidden(); +$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortorder) $sortorder="ASC"; @@ -80,7 +81,7 @@ if ($action == 'add') //print $dir."\n
"; dol_syslog("Scan directory ".$dir." for modules"); - // Chargement de la classe + // Loading Class $file = $dir."/".$module.".modules.php"; $classname = "mailing_".$module; @@ -95,29 +96,30 @@ if ($action == 'add') // Add targets into database $obj = new $classname($db); + dol_syslog("Call add_to_target on class ".$classname); $result=$obj->add_to_target($id,$filtersarray); } } if ($result > 0) { - setEventMessage($langs->trans("XTargetsAdded",$result),'mesgs'); + setEventMessages($langs->trans("XTargetsAdded",$result), null, 'mesgs'); header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } if ($result == 0) { - setEventMessage($langs->trans("WarningNoEMailsAdded"),'warnings'); + setEventMessages($langs->trans("WarningNoEMailsAdded"), null, 'warnings'); } if ($result < 0) { - setEventMessage($langs->trans("Error").($obj->error?' '.$obj->error:''),'errors'); + setEventMessages($langs->trans("Error").($obj->error?' '.$obj->error:''), null, 'errors'); } } if (GETPOST('clearlist')) { - // Chargement de la classe + // Loading Class $obj = new MailingTargets($db); $obj->clear_target($id); @@ -194,7 +196,9 @@ if ($object->fetch($id) >= 0) print '
'.$langs->trans("Status").''.$object->getLibStatut(4).'
'.$langs->trans("Status").''.$object->getLibStatut(4); + if ($object->statut == 2) print ' ('.$object->countNbOfTargets('alreadysent').'/'.$object->nbemail.')'; + print '
'; @@ -223,7 +227,7 @@ if ($object->fetch($id) >= 0) // Show email selectors if ($allowaddtarget && $user->rights->mailing->creer) { - print_fiche_titre($langs->trans("ToAddRecipientsChooseHere"),($user->admin?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"),1):''),''); + print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"),($user->admin?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"),1):''),''); print ''; print ''; @@ -267,7 +271,7 @@ if ($object->fetch($id) >= 0) // Loop on each submodule foreach($modulenames as $modulename) { - // Chargement de la classe + // Loading Class $file = $dir.$modulename.".modules.php"; $classname = "mailing_".$modulename; require_once $file; @@ -366,11 +370,21 @@ if ($object->fetch($id) >= 0) if ($search_email) $sql.= " AND mc.email LIKE '%".$db->escape($search_email)."%'"; if (!empty($search_dest_status)) $sql.= " AND mc.statut=".$db->escape($search_dest_status)." "; $sql .= $db->order($sortfield,$sortorder); - $sql .= $db->plimit($conf->liste_limit+1, $offset); + + // Count total nb of records + $nbtotalofrecords = 0; + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) + { + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); + } + //$nbtotalofrecords=$object->nbemail; // nbemail is a denormalized field storing nb of targets + $sql .= $db->plimit($limit+1, $offset); $resql=$db->query($sql); if ($resql) { + $num = $db->num_rows($resql); $param = "&id=".$object->id; @@ -388,7 +402,7 @@ if ($object->fetch($id) >= 0) $cleartext='
'.$langs->trans("ToClearAllRecipientsClickHere").': '.''; } - print_barre_liste($langs->trans("MailSelectedRecipients").$cleartext,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,"",$num,$object->nbemail,''); + print_barre_liste($langs->trans("MailSelectedRecipients").$cleartext,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,"",$num,$nbtotalofrecords,'',0,'','',$limit); print ''; @@ -398,7 +412,8 @@ if ($object->fetch($id) >= 0) print ''; print ''; print ''; - + print ''; + if ($page) $param.= "&page=".$page; print '
'; @@ -484,23 +499,24 @@ if ($object->fetch($id) >= 0) if ($obj->source_type == 'member') { include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; - $m=new Adherent($db); - $m->id=$obj->source_id; - print $m->getNomUrl(2); + $objectstatic=new Adherent($db); + $objectstatic->fetch($obj->source_id); + print $objectstatic->getNomUrl(2); } else if ($obj->source_type == 'user') { include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; - $m=new User($db); - $m->id=$obj->source_id; - print $m->getNomUrl(2); + $objectstatic=new User($db); + $objectstatic->fetch($obj->source_id); + $objectstatic->id=$obj->source_id; + print $objectstatic->getNomUrl(2); } else if ($obj->source_type == 'thirdparty') { include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; - $m=new Societe($db); - $m->id=$obj->source_id; - print $m->getNomUrl(2); + $objectstatic=new Societe($db); + $objectstatic->fetch($obj->source_id); + print $objectstatic->getNomUrl(2); } else { @@ -540,7 +556,12 @@ if ($object->fetch($id) >= 0) } else { - print ''; + if ($object->statut < 2) + { + print ''; + } } print "
'.$langs->trans("NoTargetYet").'
'; + print $langs->trans("NoTargetYet"); + print '

"; diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index 1df5a7ad18f..d9cc6f31d23 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -34,8 +34,6 @@ class Mailing extends CommonObject public $element='mailing'; public $table_element='mailing'; - var $id; - var $statut; var $titre; var $sujet; var $body; @@ -82,7 +80,7 @@ class Mailing extends CommonObject $this->statut_dest[-1] = 'MailingStatusError'; $this->statut_dest[1] = 'MailingStatusSent'; $this->statut_dest[2] = 'MailingStatusRead'; - $this->statut_dest[3] = 'MailingStatusNotContact'; + $this->statut_dest[3] = 'MailingStatusReadAndUnsubscribe'; // Read but ask to not be contacted anymore } @@ -196,7 +194,7 @@ class Mailing extends CommonObject $sql.= ", m.date_envoi"; $sql.= ", m.extraparams"; $sql.= " FROM ".MAIN_DB_PREFIX."mailing as m"; - $sql.= " WHERE m.rowid = ".$rowid; + $sql.= " WHERE m.rowid = ".(int) $rowid; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result=$this->db->query($sql); @@ -479,6 +477,38 @@ class Mailing extends CommonObject } } + + /** + * Count number of target with status + * + * @param string $mode Mode ('alreadysent' = Sent success or error) + * @return int Nb of target with status + */ + function countNbOfTargets($mode) + { + $sql = "SELECT COUNT(rowid) as nb FROM ".MAIN_DB_PREFIX."mailing_cibles"; + $sql.= " WHERE fk_mailing = ".$this->id; + if ($mode == 'alreadysent') $sql.= " AND statut <> 0"; + else + { + $this->error='BadValueForParameterMode'; + return -2; + } + + $resql=$this->db->query($sql); + if ($resql) + { + $obj = $this->db->fetch_object($resql); + if ($obj) return $obj->nb; + } + else + { + $this->error=$this->db->lasterror(); + return -1; + } + return 0; + } + /** * Retourne le libelle du statut d'un mailing (brouillon, validee, ... @@ -556,11 +586,11 @@ class Mailing extends CommonObject if ($mode == 0) { - return $langs->trans($this->statut_dest[$statut]); + return $langs->trans('MailingStatusError'); } if ($mode == 1) { - return $langs->trans($this->statut_dest[$statut]); + return $langs->trans('MailingStatusSent'); } if ($mode == 2) { diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index 5c6ae896e42..5904bec0009 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -42,7 +42,7 @@ $result=restrictedArea($user,'mailing'); $help_url='EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing'; llxHeader('','EMailing',$help_url); -print_fiche_titre($langs->trans("MailingArea")); +print load_fiche_titre($langs->trans("MailingArea")); //print ''; //print ''; @@ -171,6 +174,5 @@ if ($_socid > 0) } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index fd6794c3d44..d4956377543 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2014 Juanjo Menent - * Copyright (C) 2010-2011 Philippe Grand + * Copyright (C) 2010-2015 Philippe Grand * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2013-2014 Florian Henry @@ -35,6 +35,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formpropal.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmargin.class.php'; require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/modules/propale/modules_propale.php'; @@ -130,7 +131,7 @@ if (empty($reshook)) { if (! GETPOST('socid', 3)) { - setEventMessage($langs->trans("NoCloneOptionsSpecified"), 'errors'); + setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { @@ -140,7 +141,7 @@ if (empty($reshook)) header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $result); exit(); } else { - if (count($object->errors) > 0) setEventMessage($object->errors, 'errors'); + if (count($object->errors) > 0) setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } } @@ -156,7 +157,7 @@ if (empty($reshook)) exit(); } else { $langs->load("errors"); - setEventMessage($langs->trans($object->error), 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -210,8 +211,8 @@ if (empty($reshook)) } } else { $langs->load("errors"); - if (count($object->errors) > 0) setEventMessage($object->errors, 'errors'); - else setEventMessage($langs->trans($object->error), 'errors'); + if (count($object->errors) > 0) setEventMessages($object->error, $object->errors, 'errors'); + else setEventMessages($langs->trans($object->error), null, 'errors'); } } @@ -221,7 +222,7 @@ if (empty($reshook)) if (empty($datep)) { $error ++; - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); } if (! $error) { @@ -266,18 +267,19 @@ if (empty($reshook)) $duration = GETPOST('duree_validite'); if (empty($datep)) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); $action = 'create'; $error ++; } if (empty($duration)) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ValidityDuration")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ValidityDuration")), null, 'errors'); $action = 'create'; $error ++; } if ($socid < 1) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), null, 'errors'); + $action = 'create'; $error ++; } @@ -316,7 +318,7 @@ if (empty($reshook)) $id = $object->create_from($user); } else { - setEventMessage($langs->trans("ErrorFailedToCopyProposal", GETPOST('copie_propal')), 'errors'); + setEventMessages($langs->trans("ErrorFailedToCopyProposal", GETPOST('copie_propal')), null, 'errors'); } } else { $object->ref = GETPOST('ref'); @@ -342,6 +344,12 @@ if (empty($reshook)) $object->origin = GETPOST('origin'); $object->origin_id = GETPOST('originid'); + + // Multicurrency + if (!empty($conf->multicurrency->enabled)) + { + $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); + } for($i = 1; $i <= $conf->global->PRODUCT_SHOW_WHEN_CREATE; $i ++) { @@ -505,7 +513,7 @@ if (empty($reshook)) if ($result < 0) { $error++; - setEventMessage($langs->trans("ErrorFailedToAddContact"), 'errors'); + setEventMessages($langs->trans("ErrorFailedToAddContact"), null, 'errors'); } } @@ -574,7 +582,7 @@ if (empty($reshook)) else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel')) { if (! GETPOST('statut')) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentities("CloseAs")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors'); $action = 'statut'; } else { // prevent browser refresh from closing proposal several times @@ -620,7 +628,7 @@ if (empty($reshook)) else if ($action == 'setstatut' && $user->rights->propal->cloturer && ! GETPOST('cancel')) { if (! GETPOST('statut')) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentities("CloseAs")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors'); $action = 'statut'; } else { // prevent browser refresh from closing proposal several times @@ -669,7 +677,7 @@ if (empty($reshook)) if ($object->id > 0) { $result = $object->insert_discount($_POST["remise_id"]); if ($result < 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -709,17 +717,17 @@ if (empty($reshook)) } if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && GETPOST('type') < 0) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); $error ++; } if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && $price_ht == '') // Unit price can be 0 but not ''. Also price can be negative for proposal. { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); $error ++; } if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && empty($product_desc)) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")), null, 'errors'); $error ++; } @@ -857,11 +865,11 @@ if (empty($reshook)) } // Margin - $fournprice = (GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : ''); - $buyingprice = (GETPOST('buying_price' . $predef) ? GETPOST('buying_price' . $predef) : ''); + $fournprice = price2num(GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : ''); + $buyingprice = price2num(GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''); // If buying_price is '0', we muste keep this value - $date_start = dol_mktime(0, 0, 0, GETPOST('date_start' . $predef . 'month'), GETPOST('date_start' . $predef . 'day'), GETPOST('date_start' . $predef . 'year')); - $date_end = dol_mktime(0, 0, 0, GETPOST('date_end' . $predef . 'month'), GETPOST('date_end' . $predef . 'day'), GETPOST('date_end' . $predef . 'year')); + $date_start = dol_mktime(GETPOST('date_start' . $predef . 'hour'), GETPOST('date_start' . $predef . 'min'), GETPOST('date_start' . $predef . 'sec'), GETPOST('date_start' . $predef . 'month'), GETPOST('date_start' . $predef . 'day'), GETPOST('date_start' . $predef . 'year')); + $date_end = dol_mktime(GETPOST('date_end' . $predef . 'hour'), GETPOST('date_end' . $predef . 'min'), GETPOST('date_end' . $predef . 'sec'), GETPOST('date_end' . $predef . 'month'), GETPOST('date_end' . $predef . 'day'), GETPOST('date_end' . $predef . 'year')); // Local Taxes $localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty); @@ -873,7 +881,7 @@ if (empty($reshook)) if (! empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min))) { $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)); - setEventMessage($mesg, 'errors'); + setEventMessages($mesg, null, 'errors'); } else { // Insert line $result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $pu_ttc, $info_bits, $type, - 1, 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $date_start, $date_end, $array_options, $fk_unit); @@ -927,13 +935,13 @@ if (empty($reshook)) } else { $db->rollback(); - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } } - // Mise a jour d'une ligne dans la propale + // Update a line within proposal else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('save')) { // Define info_bits @@ -952,11 +960,11 @@ if (empty($reshook)) $pu_ht = GETPOST('price_ht'); // Add buying price - $fournprice = (GETPOST('fournprice') ? GETPOST('fournprice') : ''); - $buyingprice = (GETPOST('buying_price') ? GETPOST('buying_price') : ''); + $fournprice = price2num(GETPOST('fournprice') ? GETPOST('fournprice') : ''); + $buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value - $date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); - $date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); + $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); + $date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); // Extrafields $extrafieldsline = new ExtraFields($db); @@ -989,7 +997,7 @@ if (empty($reshook)) $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); if ($price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min))) { - setEventMessage($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), 'errors'); + setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors'); $error ++; } } else { @@ -998,7 +1006,7 @@ if (empty($reshook)) // Check parameters if (GETPOST('type') < 0) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); $error ++; } } @@ -1038,7 +1046,7 @@ if (empty($reshook)) } else { $db->rollback(); - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -1049,49 +1057,6 @@ if (empty($reshook)) exit(); } - // Generation doc (depuis lien ou depuis cartouche doc) - else if ($action == 'builddoc' && $user->rights->propal->creer) { - if (GETPOST('model')) { - $object->setDocModel($user, GETPOST('model')); - } - if (GETPOST('fk_bank')) { // this field may come from an external module - $object->fk_bank = GETPOST('fk_bank'); - } else { - $object->fk_bank = $object->fk_account; - } - - // Define output language - $outputlangs = $langs; - if (! empty($conf->global->MAIN_MULTILANGS)) { - $outputlangs = new Translate("", $conf); - $newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang); - $outputlangs->setDefaultLang($newlang); - } - $ret = $object->fetch($id); // Reload to get new records - $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result <= 0) - { - setEventMessages($object->error, $object->errors, 'errors'); - $action=''; - } - } - - // Remove file in doc form - else if ($action == 'remove_file' && $user->rights->propal->creer) { - if ($object->id > 0) { - require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; - - $langs->load("other"); - $upload_dir = $conf->propal->dir_output; - $file = $upload_dir . '/' . GETPOST('file'); - $ret = dol_delete_file($file, 0, 0, 0, $object); - if ($ret) - setEventMessage($langs->trans("FileWasRemoved", GETPOST('file'))); - else - setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), 'errors'); - } - } - // Set project else if ($action == 'classin' && $user->rights->propal->creer) { $object->setProject($_POST['projectid']); @@ -1125,6 +1090,16 @@ if (empty($reshook)) $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); } + // Multicurrency Code + else if ($action == 'setmulticurrencycode' && $user->rights->propal->creer) { + $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); + } + + // Multicurrency rate + else if ($action == 'setmulticurrencyrate' && $user->rights->propal->creer) { + $result = $object->setMulticurrencyRate(GETPOST('multicurrency_tx', 'int')); + } + // bank account else if ($action == 'setbankaccount' && $user->rights->propal->creer) { $result=$object->setBankAccount(GETPOST('fk_account', 'int')); @@ -1178,9 +1153,9 @@ if (empty($reshook)) } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - setEventMessage($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), 'errors'); + setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -1207,6 +1182,12 @@ if (empty($reshook)) } } } + + // Actions to build doc + $upload_dir = $conf->propal->dir_output; + $permissioncreate=$user->rights->propal->creer; + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; + } @@ -1220,6 +1201,7 @@ $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); $formpropal = new FormPropal($db); +$formmargin = new FormMargin($db); $companystatic = new Societe($db); if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } @@ -1228,7 +1210,7 @@ $now = dol_now(); // Add new proposal if ($action == 'create') { - print_fiche_titre($langs->trans("NewProp")); + print load_fiche_titre($langs->trans("NewProp")); $soc = new Societe($db); if ($socid > 0) @@ -1310,7 +1292,7 @@ if ($action == 'create') // Ref customer print ''; + print ''; print ''; // Third party @@ -1324,6 +1306,19 @@ if ($action == 'create') } else { print ''; } print '' . "\n"; @@ -1443,15 +1438,22 @@ if ($action == 'create') print $form->selectarray('model', $liste, ($conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT ? $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT : $conf->global->PROPALE_ADDON_PDF)); print ""; + // Multicurrency + if (! empty($conf->multicurrency->enabled)) + { + print ''; + print ''; + print ''; + } + // Public note print ''; print ''; print ''; print ''; print ''; print '
'; @@ -83,7 +83,7 @@ if (is_resource($handle)) $modulename=$reg[1]; if ($modulename == 'example') continue; - // Chargement de la classe + // Loading Class $file = $dir."/".$modulename.".modules.php"; $classname = "mailing_".$modulename; require_once $file; diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php index bbd10849f42..77245f74766 100644 --- a/htdocs/comm/mailing/info.php +++ b/htdocs/comm/mailing/info.php @@ -63,6 +63,5 @@ if ($mil->fetch($_REQUEST["id"]) >= 0) print ''; } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index cc7bafa9f5d..66474afea8e 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -32,9 +32,10 @@ $result=restrictedArea($user,'mailing'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $page = GETPOST("page",'int'); if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortorder) $sortorder="DESC"; diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index 6f8c0b70b86..fbaf00e53db 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -105,7 +105,10 @@ if ($_socid > 0) print ''; + print '>'.$i; + $keyforlabel='PRODUIT_MULTIPRICES_LABEL'.$i; + if (! empty($conf->global->$keyforlabel)) print ' - '.$langs->trans($conf->global->$keyforlabel); + print ''; } print ''; print '
' . $langs->trans('RefCustomer') . ''; - print '
'; print $form->select_company('', 'socid', '(s.client = 1 OR s.client = 2 OR s.client = 3) AND status=1', 1); + // reload page to retrieve customer informations + if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE)) + { + print ''; + } print '
'.fieldLabel('Currency','multicurrency_code').''; + $currency_code = (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : ($object->multicurrency_code ? $object->multicurrency_code : $conf->currency)); + print $form->selectMultiCurrency($currency_code, 'multicurrency_code'); + print '
' . $langs->trans('NotePublic') . ''; - $note_public = ''; - if (is_object($objectsrc)) // Take value from source object - { - $note_public = $objectsrc->note_public; - } + $note_public = $object->getDefaultCreateValueFor('note_public', (is_object($objectsrc)?$objectsrc->note_public:null)); $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); @@ -1461,11 +1463,7 @@ if ($action == 'create') print '
' . $langs->trans('NotePrivate') . ''; - $note_private = ''; - if (! empty($origin) && ! empty($originid) && is_object($objectsrc)) // Take value from source object - { - $note_private = $objectsrc->note_private; - } + $note_private = $object->getDefaultCreateValueFor('note_private', ((! empty($origin) && ! empty($originid) && is_object($objectsrc))?$objectsrc->note_private:null)); $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); // print ' @@ -1624,7 +1622,7 @@ if ($action == 'create') print '
'; $title = $langs->trans('ProductsAndServices'); - print_titre($title); + print load_fiche_titre($title); print ''; @@ -1678,13 +1676,13 @@ if ($action == 'create') else if ($action == 'validate') { $error = 0; - // on verifie si l'objet est en numerotation provisoire + // We verifie whether the object is provisionally numbering $ref = substr($object->ref, 1, 4); if ($ref == 'PROV') { $numref = $object->getNextNumRef($soc); if (empty($numref)) { $error ++; - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else { $numref = $object->ref; @@ -1784,7 +1782,7 @@ if ($action == 'create') if ($action != 'editdate' && ! empty($object->brouillon)) print ''; print '
id . '">' . img_edit($langs->trans('SetDate'), 1) . '
'; - print '
'; + print ''; if (! empty($object->brouillon) && $action == 'editdate') { print '
'; print ''; @@ -1810,7 +1808,7 @@ if ($action == 'create') if ($action != 'editecheance' && ! empty($object->brouillon)) print '
id . '">' . img_edit($langs->trans('SetConditions'), 1) . '
'; - print '
'; + print ''; if (! empty($object->brouillon) && $action == 'editecheance') { print ''; print ''; @@ -1838,7 +1836,7 @@ if ($action == 'create') if ($action != 'editconditions' && ! empty($object->brouillon)) print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetConditions'), 1) . '
'; - print '
'; + print ''; if ($action == 'editconditions') { $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id'); } else { @@ -1851,7 +1849,7 @@ if ($action == 'create') $langs->load('deliveries'); print '
'; print $form->editfieldkey($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer); - print ''; + print ''; print $form->editfieldval($langs->trans('DeliveryDate'), 'date_livraison', $object->date_livraison, $object, $user->rights->propal->creer, 'day'); print '
id . '">' . img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1) . '
'; - print '
'; + print ''; if ($action == 'editavailability') { $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1); } else { @@ -1885,7 +1883,7 @@ if ($action == 'create') if ($action != 'editshippingmethod' && $user->rights->propal->creer) print 'id.'">'.img_edit($langs->trans('SetShippingMode'),1).'
'; - print ''; + print ''; if ($action == 'editshippingmethod') { $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, $object->shipping_method_id, 'shipping_method_id', 1); } else { @@ -1903,7 +1901,7 @@ if ($action == 'create') if ($action != 'editdemandreason' && ! empty($object->brouillon)) print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1) . ''; print ''; - print ''; + print ''; if ($action == 'editdemandreason') { $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1); } else { @@ -1921,7 +1919,7 @@ if ($action == 'create') if ($action != 'editmode' && ! empty($object->brouillon)) print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . ''; print ''; - print ''; + print ''; if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id'); } else { @@ -1929,6 +1927,44 @@ if ($action == 'create') } print ''; + // Multicurrency + if (! empty($conf->multicurrency->enabled)) + { + // Multicurrency code + print ''; + print ''; + print ''; + if ($action != 'editmulticurrencycode' && ! empty($object->brouillon)) + print ''; + print '
'; + print fieldLabel('Currency','multicurrency_code'); + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; + print ''; + if ($action == 'editmulticurrencycode') { + $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'multicurrency_code'); + } else { + $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'none'); + } + print ''; + + // Multicurrency rate + print ''; + print ''; + print ''; + if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon)) + print ''; + print '
'; + print fieldLabel('Rate','multicurrency_tx'); + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; + print ''; + if ($action == 'editmulticurrencyrate') { + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx'); + } else { + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none'); + } + print ''; + } + // Project if (! empty($conf->projet->enabled)) { @@ -1941,7 +1977,7 @@ if ($action == 'create') if ($action != 'classify') print '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; print ''; - print ''; + print ''; if ($action == 'classify') { $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1); } else { @@ -1970,7 +2006,7 @@ if ($action == 'create') // Outstanding Bill print ''; print $langs->trans('OutstandingBill'); - print ''; + print ''; print price($soc->get_OutstandingBill()) . ' / '; print price($soc->outstanding_limit, 0, $langs, 1, - 1, - 1, $conf->currency); print ''; @@ -1987,7 +2023,7 @@ if ($action == 'create') if ($action != 'editbankaccount' && $user->rights->propal->creer) print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).''; print ''; - print ''; + print ''; if ($action == 'editbankaccount') { $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); } else { @@ -2008,7 +2044,7 @@ if ($action == 'create') else print ' '; print ''; print ''; - print ''; + print ''; if ($action != 'editincoterm') { print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); @@ -2021,17 +2057,21 @@ if ($action == 'create') } // Other attributes - $cols = 3; + $cols = 5; include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; // Amount HT - print '' . $langs->trans('AmountHT') . ''; + print '' . $langs->trans('AmountHT') . ''; print '' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . ''; // Margin Infos - if (! empty($conf->margin->enabled)) { - print ''; - $object->displayMarginInfos(); + if (! empty($conf->margin->enabled)) + { + $rowspan=4; + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) $rowspan++; + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) $rowspan++; + print ''; + $formmargin->displayMarginInfos($object); print ''; } print ''; @@ -2046,7 +2086,7 @@ if ($action == 'create') { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ''; print '' . price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency) . ''; - print ''; + print ''; } if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2 { @@ -2059,7 +2099,25 @@ if ($action == 'create') print '' . $langs->trans('AmountTTC') . ''; print '' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . ''; print ''; - + + if (!empty($conf->multicurrency->enabled)) + { + // Multicurrency Amount HT + print '' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . ''; + print '' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . ''; + print ''; + + // Multicurrency Amount VAT + print '' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . ''; + print '' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . ''; + print ''; + + // Multicurrency Amount TTC + print '' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . ''; + print '' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . ''; + print ''; + } + // Statut print '' . $langs->trans('Status') . '' . $object->getLibStatut(4) . ''; @@ -2141,7 +2199,7 @@ if ($action == 'create') $form_close .= $object->note; $form_close .= ''; $form_close .= ''; - $form_close .= ''; + $form_close .= ''; $form_close .= '   '; $form_close .= ' '; $form_close .= ''; @@ -2229,10 +2287,10 @@ if ($action == 'create') } } - // Close + // Set accepted/refused if ($object->statut == Propal::STATUS_VALIDATED && $user->rights->propal->cloturer) { print ''; + print '>' . $langs->trans('SetAcceptedRefused') . '
'; } // Clone @@ -2334,7 +2392,7 @@ if ($action == 'create') print '
'; print '
'; - print_fiche_titre($langs->trans('SendPropalByMail')); + print load_fiche_titre($langs->trans('SendPropalByMail')); dol_fiche_head(''); @@ -2346,6 +2404,15 @@ if ($action == 'create') $formmail->fromid = $user->id; $formmail->fromname = $user->getFullName($langs); $formmail->frommail = $user->email; + if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 1)) // If bit 1 is set + { + $formmail->trackid='pro'.$object->id; + } + if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set + { + include DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $formmail->frommail=dolAddEmailTrackId($formmail->frommail, 'pro'.$object->id); + } $formmail->withfrom = 1; $liste = array(); foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key => $value) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index ec5b9945c8e..26e65e09464 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -37,6 +37,7 @@ require_once DOL_DOCUMENT_ROOT ."/core/class/commonobjectline.class.php"; require_once DOL_DOCUMENT_ROOT .'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT .'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT .'/margin/lib/margins.lib.php'; +dol_include_once('/multicurrency/class/multicurrency.class.php'); /** * Class to manage proposals @@ -54,23 +55,14 @@ class Propal extends CommonObject */ protected $table_ref_field = 'ref'; - var $id; - /** * ID of the client * @var int */ var $socid; - /** - * Client (loaded by fetch_client) - * @var Societe - */ - var $client; var $contactid; - var $fk_project; var $author; - var $ref; var $ref_client; /** @@ -122,12 +114,6 @@ class Propal extends CommonObject var $user_valid_id; var $user_close_id; - var $total_ht; // Total net of tax - var $total_tva; // Total VAT - var $total_localtax1; // Total Local Taxes 1 - var $total_localtax2; // Total Local Taxes 2 - var $total_ttc; // Total with tax - /** * @deprecated * @see total_ht @@ -144,29 +130,14 @@ class Propal extends CommonObject */ var $total; - var $cond_reglement_id; var $cond_reglement_code; - var $fk_account; // Id of bank account - var $mode_reglement_id; var $mode_reglement_code; var $remise; var $remise_percent; var $remise_absolue; - /** - * @deprecated - * @see note_private, note_public - */ - var $note; - var $note_private; - var $note_public; - /** - * @deprecated - */ - var $fk_delivery_address; var $fk_address; var $address_type; var $address; - var $shipping_method_id; var $availability_id; var $availability_code; var $demand_reason_id; @@ -181,19 +152,19 @@ class Propal extends CommonObject var $lines = array(); var $line; - var $origin; - var $origin_id; - var $labelstatut=array(); var $labelstatut_short=array(); var $specimen; - //Incorterms - var $fk_incoterms; - var $location_incoterms; - var $libelle_incoterms; //Used into tooltip - + // Multicurrency + var $fk_multicurrency; + var $multicurrency_code; + var $multicurrency_tx; + var $multicurrency_total_ht; + var $multicurrency_total_tva; + var $multicurrency_total_ttc; + /** * Draft status */ @@ -402,7 +373,7 @@ class Propal extends CommonObject * @param string $price_base_type HT or TTC * @param float $pu_ttc Prix unitaire TTC * @param int $info_bits Bits de type de lignes - * @param int $type Type of line (product, service) + * @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used. * @param int $rang Position of line * @param int $special_code Special code (also used by externals modules!) * @param int $fk_parent_line Id of parent line @@ -413,13 +384,15 @@ class Propal extends CommonObject * @param int $date_end End date of the line * @param array $array_options extrafields array * @param string $fk_unit Code of the unit to use. Null to use the default one + * @param string $origin 'order', ... + * @param int $origin_id Id of origin object * @return int >0 if OK, <0 if KO * * @see add_product */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$date_start='', $date_end='',$array_options=0, $fk_unit=null) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$date_start='', $date_end='',$array_options=0, $fk_unit=null, $origin='', $origin_id=0) { - global $mysoc; + global $mysoc, $conf, $langs; dol_syslog(get_class($this)."::addline propalid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_except=$remise_percent, price_base_type=$price_base_type, pu_ttc=$pu_ttc, info_bits=$info_bits, type=$type"); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; @@ -438,7 +411,7 @@ class Propal extends CommonObject $txtva=price2num($txtva); $txlocaltax1=price2num($txlocaltax1); $txlocaltax2=price2num($txlocaltax2); - $pa_ht=price2num($pa_ht); + $pa_ht=price2num($pa_ht); if ($price_base_type=='HT') { $pu=$pu_ht; @@ -455,20 +428,41 @@ class Propal extends CommonObject { $this->db->begin(); - // Calcul du total TTC et de la TVA pour la ligne a partir de + $product_type=$type; + if (!empty($fk_product)) + { + $product=new Product($this->db); + $result=$product->fetch($fk_product); + $product_type=$product->type; + + if (! empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_PROPOSAL) && $product_type == 0 && $product->stock_reel < $qty) { + $this->error=$langs->trans('ErrorStockIsNotEnough'); + $this->db->rollback(); + return -3; + } + } + + // Calcul du total TTC et de la TVA pour la ligne a partir de // qty, pu, remise_percent et txtva // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. $localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty,$mysoc); + $txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate. + + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $mysoc, $localtaxes_type, 100, $this->multicurrency_tx); - $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; $total_ttc = $tabprice[2]; $total_localtax1 = $tabprice[9]; $total_localtax2 = $tabprice[10]; + // MultiCurrency + $multicurrency_total_ht = $tabprice[16]; + $multicurrency_total_tva = $tabprice[17]; + $multicurrency_total_ttc = $tabprice[18]; + // Rang to use $rangtouse = $rang; if ($rangtouse == -1) @@ -519,19 +513,20 @@ class Propal extends CommonObject $this->line->date_start=$date_start; $this->line->date_end=$date_end; - - // infos marge - if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) { - // by external module, take lowest buying price - include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; - $productFournisseur = new ProductFournisseur($this->db); - $productFournisseur->find_min_price_product_fournisseur($fk_product); - $this->line->fk_fournprice = $productFournisseur->product_fourn_price_id; - } else { - $this->line->fk_fournprice = $fk_fournprice; - } + $this->line->fk_fournprice = $fk_fournprice; $this->line->pa_ht = $pa_ht; + $this->line->origin_id = $origin_id; + $this->line->origin = $origin; + + // Multicurrency + $this->line->fk_multicurrency = $this->fk_multicurrency; + $this->line->multicurrency_code = $this->multicurrency_code; + $this->line->multicurrency_subprice = price2num($pu_ht * $this->multicurrency_tx); + $this->line->multicurrency_total_ht = $multicurrency_total_ht; + $this->line->multicurrency_total_tva = $multicurrency_total_tva; + $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; + // Mise en option de la ligne if (empty($qty) && empty($special_code)) $this->line->special_code=3; @@ -603,7 +598,8 @@ class Propal extends CommonObject { global $mysoc; - dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise_percent=$remise_percent, txtva=$txtva, desc=$desc, price_base_type=$price_base_type, info_bits=$info_bits, special_code=$special_code, fk_parent_line=$fk_parent_line, pa_ht=$a_ht, type=$type, date_start=$date_start, date_end=$date_end"); + dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise_percent=$remise_percent, + txtva=$txtva, desc=$desc, price_base_type=$price_base_type, info_bits=$info_bits, special_code=$special_code, fk_parent_line=$fk_parent_line, pa_ht=$pa_ht, type=$type, date_start=$date_start, date_end=$date_end"); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; // Clean parameters @@ -627,14 +623,20 @@ class Propal extends CommonObject // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. $localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty,$mysoc); - - $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type); + $txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate. + + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, 100, $this->multicurrency_tx); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; $total_ttc = $tabprice[2]; $total_localtax1 = $tabprice[9]; $total_localtax2 = $tabprice[10]; + // MultiCurrency + $multicurrency_total_ht = $tabprice[16]; + $multicurrency_total_tva = $tabprice[17]; + $multicurrency_total_ttc = $tabprice[18]; + // Anciens indicateurs: $price, $remise (a ne plus utiliser) $price = $pu; if ($remise_percent > 0) @@ -647,7 +649,7 @@ class Propal extends CommonObject $line = new PropaleLigne($this->db); $line->fetch($rowid); - $staticline = clone $line; + $staticline = clone $line; $line->oldline = $staticline; $this->line = $line; @@ -683,16 +685,7 @@ class Propal extends CommonObject $this->line->skip_update_total = $skip_update_total; $this->line->fk_unit = $fk_unit; - // infos marge - if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) { - // by external module, take lowest buying price - include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; - $productFournisseur = new ProductFournisseur($this->db); - $productFournisseur->find_min_price_product_fournisseur($fk_product); - $this->line->fk_fournprice = $productFournisseur->product_fourn_price_id; - } else { - $this->line->fk_fournprice = $fk_fournprice; - } + $this->line->fk_fournprice = $fk_fournprice; $this->line->pa_ht = $pa_ht; $this->line->date_start=$date_start; @@ -706,6 +699,12 @@ class Propal extends CommonObject $this->line->array_options=$array_options; } + // Multicurrency + $this->line->multicurrency_subprice = price2num($pu * $this->multicurrency_tx); + $this->line->multicurrency_total_ht = $multicurrency_total_ht; + $this->line->multicurrency_total_tva = $multicurrency_total_tva; + $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; + $result=$this->line->update(); if ($result > 0) { @@ -790,6 +789,15 @@ class Propal extends CommonObject if (empty($this->availability_id)) $this->availability_id=0; if (empty($this->demand_reason_id)) $this->demand_reason_id=0; + // Multicurrency + if (!empty($this->multicurrency_code)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code); + if (empty($this->fk_multicurrency)) + { + $this->multicurrency_code = $conf->currency; + $this->fk_multicurrency = 0; + $this->multicurrency_tx = 1; + } + dol_syslog(get_class($this)."::create"); // Check parameters @@ -853,6 +861,9 @@ class Propal extends CommonObject $sql.= ", fk_incoterms"; $sql.= ", location_incoterms"; $sql.= ", entity"; + $sql.= ", fk_multicurrency"; + $sql.= ", multicurrency_code"; + $sql.= ", multicurrency_tx"; $sql.= ") "; $sql.= " VALUES ("; $sql.= $this->socid; @@ -882,6 +893,9 @@ class Propal extends CommonObject $sql.= ", ".(int) $this->fk_incoterms; $sql.= ", '".$this->db->escape($this->location_incoterms)."'"; $sql.= ", ".$conf->entity; + $sql.= ", ".(int) $this->fk_multicurrency; + $sql.= ", '".$this->db->escape($this->multicurrency_code)."'"; + $sql.= ", ".(double) $this->multicurrency_tx; $sql.= ")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); @@ -936,7 +950,9 @@ class Propal extends CommonObject $this->lines[$i]->date_start, $this->lines[$i]->date_end, $this->lines[$i]->array_options, - $this->lines[$i]->fk_unit + $this->lines[$i]->fk_unit, + $this->element, + $this->lines[$i]->id ); if ($result < 0) @@ -1091,13 +1107,17 @@ class Propal extends CommonObject $clonedObj->mode_reglement_id = (! empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); $clonedObj->fk_delivery_address = ''; - $project = new Project($db); - if ($this->fk_project > 0 && $project->fetch($this->fk_project)) { - if ($project->socid <= 0) $clonedObj->fk_project = $this->fk_project; - else $clonedObj->fk_project = ''; - } else { - $clonedObj->fk_project = ''; - } + /*if (!empty($conf->projet->enabled)) + { + $project = new Project($db); + if ($this->fk_project > 0 && $project->fetch($this->fk_project)) { + if ($project->socid <= 0) $clonedObj->fk_project = $this->fk_project; + else $clonedObj->fk_project = ''; + } else { + $clonedObj->fk_project = ''; + } + }*/ + $clonedObj->fk_project = ''; // A cloned proposal is set by default to no project. } // reset ref_client @@ -1162,7 +1182,7 @@ class Propal extends CommonObject } // Call trigger - $result=$this->call_trigger('PROPAL_CLONE',$user); + $result=$clonedObj->call_trigger('PROPAL_CLONE',$user); if ($result < 0) { $error++; } // End call triggers } @@ -1212,6 +1232,7 @@ class Propal extends CommonObject $sql.= ', p.fk_account'; $sql.= ", p.fk_shipping_method"; $sql.= ", p.fk_incoterms, p.location_incoterms"; + $sql.= ", p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva, p.multicurrency_total_ttc"; $sql.= ", i.libelle as libelle_incoterms"; $sql.= ", c.label as statut_label"; $sql.= ", ca.code as availability_code, ca.label as availability"; @@ -1296,6 +1317,14 @@ class Propal extends CommonObject $this->location_incoterms = $obj->location_incoterms; $this->libelle_incoterms = $obj->libelle_incoterms; + // Multicurrency + $this->fk_multicurrency = $obj->fk_multicurrency; + $this->multicurrency_code = $obj->multicurrency_code; + $this->multicurrency_tx = $obj->multicurrency_tx; + $this->multicurrency_total_ht = $obj->multicurrency_total_ht; + $this->multicurrency_total_tva = $obj->multicurrency_total_tva; + $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; + if ($obj->fk_statut == self::STATUS_DRAFT) { $this->brouillon = 1; @@ -1320,6 +1349,7 @@ class Propal extends CommonObject $sql.= " d.fk_unit,"; $sql.= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label,'; $sql.= ' d.date_start, d.date_end'; + $sql.= ' ,d.fk_multicurrency, d.multicurrency_code, d.multicurrency_subprice, d.multicurrency_total_ht, d.multicurrency_total_tva, d.multicurrency_total_ttc'; $sql.= " FROM ".MAIN_DB_PREFIX."propaldet as d"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON d.fk_product = p.rowid"; $sql.= " WHERE d.fk_propal = ".$this->id; @@ -1385,6 +1415,15 @@ class Propal extends CommonObject $line->date_start = $objp->date_start; $line->date_end = $objp->date_end; + + // Multicurrency + $line->fk_multicurrency = $objp->fk_multicurrency; + $line->multicurrency_code = $objp->multicurrency_code; + $line->multicurrency_subprice = $objp->multicurrency_subprice; + $line->multicurrency_total_ht = $objp->multicurrency_total_ht; + $line->multicurrency_total_tva = $objp->multicurrency_total_tva; + $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; + $line->fetch_optionals($line->id,$extralabelsline); $this->lines[$i] = $line; @@ -1422,7 +1461,10 @@ class Propal extends CommonObject */ function update_extrafields($user) { + global $conf, $hookmanager; + $action='update'; + $error = 0; // Actions on extra fields (by external module or standard code) // TODO le hook fait double emploi avec le trigger !! @@ -2490,7 +2532,7 @@ class Propal extends CommonObject */ function load_board($user,$mode) { - global $conf, $user, $langs; + global $conf, $langs; $clause = " WHERE"; @@ -2755,7 +2797,7 @@ class Propal extends CommonObject */ function getNomUrl($withpicto=0,$option='', $get_params='') { - global $langs; + global $langs, $conf; $result=''; $label = '' . $langs->trans("ShowPropal") . ''; @@ -2766,7 +2808,7 @@ class Propal extends CommonObject if (! empty($this->total_ht)) $label.= '
' . $langs->trans('AmountHT') . ': ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); if (! empty($this->total_tva)) - $label.= '
' . $langs->trans('TVA') . ': ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); + $label.= '
' . $langs->trans('VAT') . ': ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); if (! empty($this->total_ttc)) $label.= '
' . $langs->trans('AmountTTC') . ': ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); $linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">'; @@ -2810,6 +2852,7 @@ class Propal extends CommonObject $sql.= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid,'; $sql.= ' p.description as product_desc,'; $sql.= ' p.entity'; + $sql.= ' ,pt.fk_multicurrency, pt.multicurrency_code, pt.multicurrency_subprice, pt.multicurrency_total_ht, pt.multicurrency_total_tva, pt.multicurrency_total_ttc'; $sql.= ' FROM '.MAIN_DB_PREFIX.'propaldet as pt'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product=p.rowid'; $sql.= ' WHERE pt.fk_propal = '.$this->id; @@ -2858,6 +2901,14 @@ class Propal extends CommonObject $this->lines[$i]->date_start = $this->db->jdate($obj->date_start); $this->lines[$i]->date_end = $this->db->jdate($obj->date_end); $this->lines[$i]->fk_unit = $obj->fk_unit; + + // Multicurrency + $this->lines[$i]->fk_multicurrency = $obj->fk_multicurrency; + $this->lines[$i]->multicurrency_code = $obj->multicurrency_code; + $this->lines[$i]->multicurrency_subprice = $obj->multicurrency_subprice; + $this->lines[$i]->multicurrency_total_ht = $obj->multicurrency_total_ht; + $this->lines[$i]->multicurrency_total_tva = $obj->multicurrency_total_tva; + $this->lines[$i]->multicurrency_total_ttc = $obj->multicurrency_total_ttc; $i++; } @@ -2926,8 +2977,7 @@ class Propal extends CommonObject /** - * \class PropaleLigne - * \brief Class to manage commercial proposal lines + * Class to manage commercial proposal lines */ class PropaleLigne extends CommonObjectLine { @@ -3029,6 +3079,14 @@ class PropaleLigne extends CommonObjectLine var $skip_update_total; // Skip update price total for special lines + // Multicurrency + var $fk_multicurrency; + var $multicurrency_code; + var $multicurrency_subprice; + var $multicurrency_total_ht; + var $multicurrency_total_tva; + var $multicurrency_total_ttc; + /** * Class line Contructor * @@ -3052,6 +3110,7 @@ class PropaleLigne extends CommonObjectLine $sql.= ' pd.info_bits, pd.total_ht, pd.total_tva, pd.total_ttc, pd.fk_product_fournisseur_price as fk_fournprice, pd.buy_price_ht as pa_ht, pd.special_code, pd.rang,'; $sql.= ' pd.fk_unit,'; $sql.= ' pd.localtax1_tx, pd.localtax2_tx, pd.total_localtax1, pd.total_localtax2,'; + $sql.= ' pd.fk_multicurrency, pd.multicurrency_code, pd.multicurrency_subprice, pd.multicurrency_total_ht, pd.multicurrency_total_tva, pd.multicurrency_total_ttc,'; $sql.= ' p.ref as product_ref, p.label as product_label, p.description as product_desc,'; $sql.= ' pd.date_start, pd.date_end, pd.product_type'; $sql.= ' FROM '.MAIN_DB_PREFIX.'propaldet as pd'; @@ -3104,6 +3163,14 @@ class PropaleLigne extends CommonObjectLine $this->date_start = $this->db->jdate($objp->date_start); $this->date_end = $this->db->jdate($objp->date_end); + // Multicurrency + $this->fk_multicurrency = $objp->fk_multicurrency; + $this->multicurrency_code = $objp->multicurrency_code; + $this->multicurrency_subprice = $objp->multicurrency_subprice; + $this->multicurrency_total_ht = $objp->multicurrency_total_ht; + $this->multicurrency_total_tva = $objp->multicurrency_total_tva; + $this->multicurrency_total_ttc = $objp->multicurrency_total_ttc; + $this->db->free($result); return 1; @@ -3128,6 +3195,8 @@ class PropaleLigne extends CommonObjectLine dol_syslog(get_class($this)."::insert rang=".$this->rang); + $pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'. + // Clean parameters if (empty($this->tva_tx)) $this->tva_tx=0; if (empty($this->localtax1_tx)) $this->localtax1_tx=0; @@ -3144,14 +3213,20 @@ class PropaleLigne extends CommonObjectLine if (empty($this->fk_parent_line)) $this->fk_parent_line=0; if (empty($this->fk_fournprice)) $this->fk_fournprice=0; if (! is_numeric($this->qty)) $this->qty = 0; - if (empty($this->pa_ht)) $this->pa_ht=0; - // si prix d'achat non renseigne et utilise pour calcul des marges alors prix achat = prix vente - if ($this->pa_ht == 0) { - if ($this->subprice > 0 && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) - $this->pa_ht = $this->subprice * (1 - $this->remise_percent / 100); - } + // if buy price not defined, define buyprice as configured in margin admin + if ($this->pa_ht == 0 && $pa_ht_isemptystring) + { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) + { + return $result; + } + else + { + $this->pa_ht = $result; + } + } // Check parameters if ($this->product_type < 0) return -1; @@ -3166,7 +3241,8 @@ class PropaleLigne extends CommonObjectLine $sql.= ' info_bits, '; $sql.= ' total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_product_fournisseur_price, buy_price_ht, special_code, rang,'; $sql.= ' fk_unit,'; - $sql.= ' date_start, date_end)'; + $sql.= ' date_start, date_end'; + $sql.= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc)'; $sql.= " VALUES (".$this->fk_propal.","; $sql.= " ".($this->fk_parent_line>0?"'".$this->fk_parent_line."'":"null").","; $sql.= " ".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null").","; @@ -3195,6 +3271,12 @@ class PropaleLigne extends CommonObjectLine $sql.= ' '.(!$this->fk_unit ? 'NULL' : $this->fk_unit).','; $sql.= " ".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null").','; $sql.= " ".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null"); + $sql.= ", ".$this->fk_multicurrency; + $sql.= ", '".$this->db->escape($this->multicurrency_code)."'"; + $sql.= ", ".$this->multicurrency_subprice; + $sql.= ", ".$this->multicurrency_total_ht; + $sql.= ", ".$this->multicurrency_total_tva; + $sql.= ", ".$this->multicurrency_total_ttc; $sql.= ')'; dol_syslog(get_class($this).'::insert', LOG_DEBUG); @@ -3289,7 +3371,7 @@ class PropaleLigne extends CommonObjectLine /** * Update propal line object into DB * - * @param int $notrigger 1=Does not execute triggers, 0= execuete triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ function update($notrigger=0) @@ -3298,6 +3380,8 @@ class PropaleLigne extends CommonObjectLine $error=0; + $pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'. + // Clean parameters if (empty($this->tva_tx)) $this->tva_tx=0; if (empty($this->localtax1_tx)) $this->localtax1_tx=0; @@ -3316,13 +3400,19 @@ class PropaleLigne extends CommonObjectLine if (empty($this->fk_parent_line)) $this->fk_parent_line=0; if (empty($this->fk_fournprice)) $this->fk_fournprice=0; if (empty($this->subprice)) $this->subprice=0; - if (empty($this->pa_ht)) $this->pa_ht=0; - // si prix d'achat non renseigne et utilise pour calcul des marges alors prix achat = prix vente - if ($this->pa_ht == 0) { - if ($this->subprice > 0 && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) - $this->pa_ht = $this->subprice * (1 - $this->remise_percent / 100); + // if buy price not defined, define buyprice as configured in margin admin + if ($this->pa_ht == 0 && $pa_ht_isemptystring) + { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) + { + return $result; + } + else + { + $this->pa_ht = $result; + } } $this->db->begin(); @@ -3359,6 +3449,13 @@ class PropaleLigne extends CommonObjectLine $sql.= " , date_start=".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null"); $sql.= " , date_end=".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null"); $sql.= " , fk_unit=".(!$this->fk_unit ? 'NULL' : $this->fk_unit); + + // Multicurrency + $sql.= " , multicurrency_subprice=".price2num($this->multicurrency_subprice).""; + $sql.= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht).""; + $sql.= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva).""; + $sql.= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc).""; + $sql.= " WHERE rowid = ".$this->rowid; dol_syslog(get_class($this)."::update", LOG_DEBUG); diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index 07a5ff606bc..e38297a3377 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -26,6 +26,7 @@ include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php'; include_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; +include_once DOL_DOCUMENT_ROOT . '/supplier_proposal/class/supplier_proposal.class.php'; include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; @@ -50,8 +51,9 @@ class PropaleStats extends Stats * @param DoliDB $db Database handler * @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user. * @param int $userid Id user for filter (creation user) + * @param string $mode Option ('customer', 'supplier') */ - function __construct($db, $socid=0, $userid=0) + function __construct($db, $socid=0, $userid=0, $mode='customer') { global $user, $conf; @@ -59,15 +61,30 @@ class PropaleStats extends Stats $this->socid = ($socid > 0 ? $socid : 0); $this->userid = $userid; - $object=new Propal($this->db); - - $this->from = MAIN_DB_PREFIX.$object->table_element." as p"; - $this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl"; - - $this->field='total_ht'; - $this->field_line='total_ht'; - - $this->where.= " p.fk_statut > 0"; + if ($mode == 'customer') + { + $object=new Propal($this->db); + + $this->from = MAIN_DB_PREFIX.$object->table_element." as p"; + $this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl"; + $this->field_date='p.datep'; + $this->field='total_ht'; + $this->field_line='total_ht'; + + $this->where.= " p.fk_statut > 0"; + } + if ($mode == 'supplier') + { + $object=new SupplierProposal($this->db); + + $this->from = MAIN_DB_PREFIX.$object->table_element." as p"; + $this->from_line = MAIN_DB_PREFIX.$object->table_element_line." as tl"; + $this->field_date='p.date_valid'; + $this->field='total_ht'; + $this->field_line='total_ht'; + + $this->where.= " p.fk_statut > 0"; // Validated, accepted, refused and closed + } //$this->where.= " AND p.fk_soc = s.rowid AND p.entity = ".$conf->entity; $this->where.= " AND p.entity IN (".getEntity('propal', 1).")"; if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND p.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; @@ -89,10 +106,10 @@ class PropaleStats extends Stats { global $user; - $sql = "SELECT date_format(p.datep,'%m') as dm, COUNT(*) as nb"; + $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, COUNT(*) as nb"; $sql.= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql.= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql.= " AND ".$this->where; $sql.= " GROUP BY dm"; $sql.= $this->db->order('dm','DESC'); @@ -111,7 +128,7 @@ class PropaleStats extends Stats { global $user; - $sql = "SELECT date_format(p.datep,'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; + $sql = "SELECT date_format(".$this->field_date.",'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; $sql.= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE ".$this->where; @@ -131,10 +148,10 @@ class PropaleStats extends Stats { global $user; - $sql = "SELECT date_format(p.datep,'%m') as dm, SUM(p.".$this->field.")"; + $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, SUM(p.".$this->field.")"; $sql.= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql.= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql.= " AND ".$this->where; $sql.= " GROUP BY dm"; $sql.= $this->db->order('dm','DESC'); @@ -153,10 +170,10 @@ class PropaleStats extends Stats { global $user; - $sql = "SELECT date_format(p.datep,'%m') as dm, AVG(p.".$this->field.")"; + $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, AVG(p.".$this->field.")"; $sql.= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; + $sql.= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql.= " AND ".$this->where; $sql.= " GROUP BY dm"; $sql.= $this->db->order('dm','DESC'); @@ -173,7 +190,7 @@ class PropaleStats extends Stats { global $user; - $sql = "SELECT date_format(p.datep,'%Y') as year, COUNT(*) as nb, SUM(".$this->field.") as total, AVG(".$this->field.") as avg"; + $sql = "SELECT date_format(".$this->field_date.",'%Y') as year, COUNT(*) as nb, SUM(".$this->field.") as total, AVG(".$this->field.") as avg"; $sql.= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE ".$this->where; @@ -200,7 +217,7 @@ class PropaleStats extends Stats if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE ".$this->where; $sql.= " AND p.rowid = tl.fk_propal AND tl.fk_product = product.rowid"; - $sql.= " AND p.datep BETWEEN '".$this->db->idate(dol_get_first_day($year,1,false))."' AND '".$this->db->idate(dol_get_last_day($year,12,false))."'"; + $sql.= " AND ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year,1,false))."' AND '".$this->db->idate(dol_get_last_day($year,12,false))."'"; $sql.= " GROUP BY product.ref"; $sql.= $this->db->order('nb','DESC'); //$sql.= $this->db->plimit(20); diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 6a0a1076e62..544c5ab27e3 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Patrick Rouillon * Copyright (C) 2005-2009 Destailleur Laurent * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011-2012 Philippe Grand + * Copyright (C) 2011-2015 Philippe Grand * * 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 @@ -54,12 +54,12 @@ if ($id > 0 || ! empty($ref)) if ($ret == 0) { $langs->load("errors"); - setEventMessage($langs->trans('ErrorRecordNotFound'), 'errors'); + setEventMessages($langs->trans('ErrorRecordNotFound'), null, 'errors'); $error++; } else if ($ret < 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $error++; } } @@ -75,7 +75,7 @@ else /* - * Ajout d'un nouveau contact + * Add a new contact */ if ($action == 'addcontact' && $user->rights->propale->creer) @@ -96,16 +96,16 @@ if ($action == 'addcontact' && $user->rights->propale->creer) if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - setEventMessage($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), 'errors'); + setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } -// Bascule du statut d'un contact +// Toggle the status of a contact else if ($action == 'swapstatut' && $user->rights->propale->creer) { if ($object->id > 0) @@ -114,7 +114,7 @@ else if ($action == 'swapstatut' && $user->rights->propale->creer) } } -// Efface un contact +// Deletes a contact else if ($action == 'deletecontact' && $user->rights->propale->creer) { $result = $object->delete_contact($lineid); diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 8fc50f853c6..4b03cb48429 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -52,7 +52,7 @@ $help_url="EN:Module_Commercial_Proposals|FR:Module_Propositions_commerciales|ES llxHeader("",$langs->trans("ProspectionArea"),$help_url); -print_fiche_titre($langs->trans("ProspectionArea")); +print load_fiche_titre($langs->trans("ProspectionArea")); //print ''; //print ''; print ''; - print '\n"; + + print ''; + print "\n"; while ($i < min($num,$limit)) { diff --git a/htdocs/compta/ventilation/card.php b/htdocs/compta/ventilation/card.php index 7201dfe9e29..59ed7fe9cde 100644 --- a/htdocs/compta/ventilation/card.php +++ b/htdocs/compta/ventilation/card.php @@ -112,7 +112,7 @@ if($_GET["id"]) } - print_fiche_titre("Ventilation"); + print load_fiche_titre("Ventilation"); print '
'; @@ -66,11 +66,9 @@ $var=false; print ''; print ''; print ''; -print ''; +print ''; print ''; -print ''; -print ''; +print $langs->trans("Proposal").':'; print "
'.$langs->trans("SearchPropal").'
'.$langs->trans("Search").'
'; -print $langs->trans("Ref").':
'.$langs->trans("Other").':

\n"; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 1004986ffe5..74ac2fdd7ea 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2013 Regis Houssin @@ -59,6 +59,7 @@ $search_author=GETPOST('search_author','alpha'); $search_product_category=GETPOST('search_product_category','int'); $search_town=GETPOST('search_town','alpha'); $viewstatut=GETPOST('viewstatut'); +$optioncss = GETPOST('optioncss','alpha'); $object_statut=GETPOST('propal_statut'); $sall=GETPOST("sall"); @@ -66,6 +67,18 @@ $mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg")); $year=GETPOST("year"); $month=GETPOST("month"); +$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit; +$sortfield = GETPOST("sortfield",'alpha'); +$sortorder = GETPOST("sortorder",'alpha'); +$page = GETPOST("page",'int'); +if ($page == -1) { $page = 0; } +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (! $sortfield) $sortfield='p.ref'; +if (! $sortorder) $sortorder='DESC'; + + // Nombre de ligne pour choix de produit/service predefinis $NBLINES=4; @@ -107,6 +120,15 @@ $viewstatut=$object_statut; // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('propallist')); +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'p.ref'=>'Ref', + 'p.ref_client'=>'CustomerRef', + 'pd.description'=>'Description', + 's.nom'=>"ThirdParty", + 'p.note_public'=>'NotePublic', +); +if (empty($user->socid)) $fieldstosearchall["p.note_private"]="NotePrivate"; /* @@ -134,19 +156,6 @@ $companystatic=new Societe($db); $now=dol_now(); -$sortfield = GETPOST("sortfield",'alpha'); -$sortorder = GETPOST("sortorder",'alpha'); -$page = GETPOST("page",'int'); -if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; -$pageprev = $page - 1; -$pagenext = $page + 1; - -if (! $sortfield) $sortfield='p.datep'; -if (! $sortorder) $sortorder='DESC'; -$limit = $conf->liste_limit; - - $sql = 'SELECT'; if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT'; $sql.= ' s.rowid, s.nom as name, s.town, s.client, s.code_client,'; @@ -191,7 +200,7 @@ if ($search_montant_ht != '') $sql.= natural_search("p.total_ht", $search_montant_ht, 1); } if ($sall) { - $sql .= natural_search(array('s.nom', 'p.note_private', 'p.note_public', 'pd.description'), $sall); + $sql .= natural_search(array_keys($fieldstosearchall), $sall); } if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$search_product_category; if ($socid > 0) $sql.= ' AND s.rowid = '.$socid; @@ -217,8 +226,6 @@ if ($search_user > 0) { $sql.= " AND c.fk_c_type_contact = tc.rowid AND tc.element='propal' AND tc.source='internal' AND c.element_id = p.rowid AND c.fk_socpeople = ".$search_user; } - - $sql.= ' ORDER BY '.$sortfield.' '.$sortorder.', p.ref DESC'; $nbtotalofrecords = 0; @@ -245,6 +252,7 @@ if ($result) } $param='&socid='.$socid.'&viewstatut='.$viewstatut; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($month) $param.='&month='.$month; if ($year) $param.='&year='.$year; if ($search_ref) $param.='&search_ref=' .$search_ref; @@ -255,14 +263,26 @@ if ($result) if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht; if ($search_author) $param.='&search_author='.$search_author; if ($search_town) $param.='&search_town='.$search_town; - - print_barre_liste($langs->trans('ListOfProposals').' '.($socid?'- '.$soc->name:''), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_commercial.png'); + if ($optioncss != '') $param.='&optioncss='.$optioncss; // Lignes des champs de filtre - print '
'; + print ''; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + print_barre_liste($langs->trans('ListOfProposals').' '.($socid?'- '.$soc->name:''), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_commercial.png', 0, '', '', $limit); + + if ($sall) + { + foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); + //sort($fieldstosearchall); + print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall); + } + $i = 0; - print ''; $moreforfilter=''; @@ -284,7 +304,7 @@ if ($result) $moreforfilter.=''; } // If the user can view prospects other than his' - if ($conf->categorie->enabled && $user->rights->produit->lire) + if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter.='
'; @@ -295,12 +315,13 @@ if ($result) } if (! empty($moreforfilter)) { - print '
'; - print ''; + print ''; } + print '
'; + print '
'; print $moreforfilter; - print '
'."\n"; + print ''; print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'p.ref_client','',$param,'',$sortfield,$sortorder); diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 9a2a712e339..2c93f874baa 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -33,6 +33,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formpropal.class.php'; $WIDTH=DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height'); +$mode=GETPOST("mode")?GETPOST("mode"):'customer'; +if ($mode == 'customer' && ! $user->rights->propale->lire) accessforbidden(); +if ($mode == 'supplier' && ! $user->rights->supplier_proposal->lire) accessforbidden(); + $object_statut=GETPOST('propal_statut'); $userid=GETPOST('userid','int'); @@ -50,7 +54,10 @@ $year = GETPOST('year')>0?GETPOST('year'):$nowyear; $startyear=$year-1; $endyear=$year; -$mode=GETPOST('mode'); +$langs->load('orders'); +$langs->load('companies'); +$langs->load('other'); +$langs->load('suppliers'); /* @@ -62,17 +69,28 @@ $formpropal=new FormPropal($db); $langs->load('propal'); $langs->load('other'); +$langs->load("companies"); -llxHeader('', $langs->trans("ProposalsStatistics")); +if ($mode == 'customer') +{ + $title=$langs->trans("ProposalsStatistics"); + $dir=$conf->propale->dir_temp; +} +if ($mode == 'supplier') +{ + $title=$langs->trans("ProposalsStatisticsSuppliers").' ('.$langs->trans("SentToSuppliers").")"; + $dir=$conf->supplier_proposal->dir_temp; +} -print_fiche_titre($langs->trans("ProposalsStatistics"),'','title_commercial.png'); +llxHeader('', $title); + +print load_fiche_titre($title,'','title_commercial.png'); -$dir=$conf->propal->dir_temp; dol_mkdir($dir); -$stats = new PropaleStats($db, $socid, ($userid>0?$userid:0)); +$stats = new PropaleStats($db, $socid, ($userid>0?$userid:0), $mode); if ($object_statut != '' && $object_statut >= 0) $stats->where .= ' AND p.fk_statut IN ('.$object_statut.')'; // Build graphic number of object @@ -234,20 +252,20 @@ print '
'; // Show filter box print ''; print ''; - print '
'; + print '
'; print ''; // Company print ''; // User print ''; // Status print ''; // Year print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; $filter='s.client in (1,2,3)'; - print $form->select_company($socid,'socid',$filter,1); + print $form->select_company($socid,'socid',$filter,1,0,0,array(),0,'','style="width: 95%"'); print '
'.$langs->trans("CreatedBy").''; - print $form->select_dolusers($userid,'userid',1); + print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '
'.$langs->trans("Status").''; - $formpropal->selectProposalStatus($object_statut,0,1); + $formpropal->selectProposalStatus($object_statut,0,1,1,$mode); print '
'.$langs->trans("Year").''; @@ -262,8 +280,8 @@ print '
'; print '

'; //} -print ''; -print ''; +print '
'; +print ''; print ''; print ''; print ''; @@ -274,13 +292,15 @@ print ''; print ''; $oldyear=0; +$var=true; foreach ($data as $val) { $year = $val['year']; while (! empty($year) && $oldyear > $year+1) { // If we have empty year $oldyear--; - print ''; + $var=!$var; + print ''; print ''; print ''; print ''; @@ -290,7 +310,7 @@ foreach ($data as $val) print ''; print ''; } - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php index 66cde8692ce..d38c9918af8 100644 --- a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php @@ -34,7 +34,7 @@ $langs = $GLOBALS['langs']; $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; echo '
'; -print_titre($langs->trans('RelatedCommercialProposals')); +print load_fiche_titre($langs->trans('RelatedCommercialProposals'), '', ''); ?>
'.$langs->trans("Year").''.$langs->trans("NbOfProposals").'%%
0?'&userid='.$userid:'').'">'.$oldyear.'0
0?'&userid='.$userid:'').'">'.$year.''.$val['nb'].''.round($val['nb_diff']).'
diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index f5f600ddd08..fba2fe9d1cd 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -44,7 +44,7 @@ $companystatic=new Societe($db); llxHeader(); -print_fiche_titre($langs->trans("ProspectionArea")); +print load_fiche_titre($langs->trans("ProspectionArea")); //print '
'; //print '
'; diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php deleted file mode 100644 index 7259cff218e..00000000000 --- a/htdocs/comm/prospect/list.php +++ /dev/null @@ -1,574 +0,0 @@ - - * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011 Philippe Grand - * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2015 Raphaël Doursenaud - * Copyright (C) 2015 Marcos García - * - * 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 3 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, see . - */ - -/** - * \file htdocs/comm/prospect/list.php - * \ingroup prospect - * \brief Page to list prospects - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; - -$langs->load("propal"); -$langs->load("companies"); - -// Security check -$socid = GETPOST("socid",'int'); -if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'societe',$socid,''); - -$action = GETPOST('action','alpha'); -$socname = GETPOST("socname",'alpha'); -$stcomm = GETPOST("stcomm",'alpha'); // code -$search_stcomm = GETPOST("search_stcomm",'int'); -$search_nom = GETPOST("search_nom"); -$search_zipcode = GETPOST("search_zipcode"); -$search_town = GETPOST("search_town"); -$search_state = GETPOST("search_state"); -$search_datec = GETPOST("search_datec"); -$search_categ = GETPOST("search_categ",'int'); -$search_status = GETPOST("search_status",'int'); -$catid = GETPOST("catid",'int'); - -$sortfield = GETPOST("sortfield",'alpha'); -$sortorder = GETPOST("sortorder",'alpha'); -$page = GETPOST("page",'int'); -if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; -$pageprev = $page - 1; -$pagenext = $page + 1; -if (! $sortorder) $sortorder="ASC"; -if (! $sortfield) $sortfield="s.nom"; - -$search_level_from = GETPOST("search_level_from","alpha"); -$search_level_to = GETPOST("search_level_to","alpha"); - -// If both parameters are set, search for everything BETWEEN them -if ($search_level_from != '' && $search_level_to != '') -{ - // Ensure that these parameters are numbers - $search_level_from = (int) $search_level_from; - $search_level_to = (int) $search_level_to; - - // If from is greater than to, reverse orders - if ($search_level_from > $search_level_to) - { - $tmp = $search_level_to; - $search_level_to = $search_level_from; - $search_level_from = $tmp; - } - - // Generate the SQL request - $sortwhere = '(sortorder BETWEEN '.$search_level_from.' AND '.$search_level_to.') AS is_in_range'; -} -// If only "from" parameter is set, search for everything GREATER THAN it -else if ($search_level_from != '') -{ - // Ensure that this parameter is a number - $search_level_from = (int) $search_level_from; - - // Generate the SQL request - $sortwhere = '(sortorder >= '.$search_level_from.') AS is_in_range'; -} -// If only "to" parameter is set, search for everything LOWER THAN it -else if ($search_level_to != '') -{ - // Ensure that this parameter is a number - $search_level_to = (int) $search_level_to; - - // Generate the SQL request - $sortwhere = '(sortorder <= '.$search_level_to.') AS is_in_range'; -} -// If no parameters are set, dont search for anything -else -{ - $sortwhere = '0 as is_in_range'; -} - -// Select every potentiels, and note each potentiels which fit in search parameters -dol_syslog('prospects::prospects_prospect_level',LOG_DEBUG); -$sql = "SELECT code, label, sortorder, ".$sortwhere; -$sql.= " FROM ".MAIN_DB_PREFIX."c_prospectlevel"; -$sql.= " WHERE active > 0"; -$sql.= " ORDER BY sortorder"; - -$resql = $db->query($sql); -if ($resql) -{ - $tab_level = array(); - $search_levels = array(); - - while ($obj = $db->fetch_object($resql)) - { - // Compute level text - $level=$langs->trans($obj->code); - if ($level == $obj->code) $level=$langs->trans($obj->label); - - // Put it in the array sorted by sortorder - $tab_level[$obj->sortorder] = $level; - - // If this potentiel fit in parameters, add its code to the $search_levels array - if ($obj->is_in_range == 1) - { - $search_levels[] = '"'.preg_replace('[^A-Za-z0-9_-]', '', $obj->code).'"'; - } - } - - // Implode the $search_levels array so that it can be use in a "IN (...)" where clause. - // If no paramters was set, $search_levels will be empty - $search_levels = implode(',', $search_levels); -} -else dol_print_error($db); - -// Load sale and categ filters -$search_sale = GETPOST('search_sale','int'); -$search_categ = GETPOST('search_categ','int'); -// If the internal user must only see his prospect, force searching by him -if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id; - -// List of available states; we'll need that for each lines (quick changing prospect states) and for search bar (filter by prospect state) -$sts = array(-1,0,1,2,3); - - -// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array -$hookmanager->initHooks(array('prospectlist')); -$extrafields = new ExtraFields($db); - -// fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('thirdparty'); -$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_'); - -// Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers -{ - $socname=""; - $stcomm=""; - $search_stcomm=""; - $search_nom=""; - $search_zipcode=""; - $search_town=""; - $search_state=""; - $search_datec=""; - $search_categ=""; - $search_status=""; - $search_array_options=array(); -} - -if ($search_status=='') $search_status=1; // always display active customer first - - - -/* - * Actions - */ - -$parameters=array(); -$reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - -if (empty($reshook)) -{ - if ($action == 'setstcomm') - { - $object = new Client($db); - $result=$object->fetch($socid); - $object->stcomm_id=dol_getIdFromCode($db, GETPOST('stcomm','alpha'), 'c_stcomm'); - $result=$object->set_commnucation_level($user); - if ($result < 0) setEventMessages($object->error,$object->errors,'errors'); - - $action=''; $socid=0; - } -} - - -/* - * View - */ - -$formother=new FormOther($db); -$form=new Form($db); -$prospectstatic=new Client($db); -$prospectstatic->client=2; -$prospectstatic->loadCacheOfProspStatus(); - -$sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias, s.zip, s.town, s.datec, s.status as status, s.code_client, s.client,"; -$sql.= " s.prefix_comm, s.fk_prospectlevel, s.fk_stcomm as stcomm_id,"; -$sql.= " st.libelle as stcomm_label,"; -$sql.= " d.nom as departement"; -if ((!$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) -// Add fields for extrafields -if (is_array($extrafields->attribute_list) && count($extrafields->attribute_list)) foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key; -// Add fields from hooks -$parameters=array(); -$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook -$sql.=$hookmanager->resPrint; -$sql .= " FROM ".MAIN_DB_PREFIX."c_stcomm as st"; -$sql.= ", ".MAIN_DB_PREFIX."societe as s"; -if (is_array($extrafields->attribute_list) && count($extrafields->attribute_list)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_extrafields as ef on (s.rowid = ef.fk_object)"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as d on (d.rowid = s.fk_departement)"; -if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; // We need this table joined to the select in order to filter by categ -if ((!$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale -$sql.= " WHERE s.fk_stcomm = st.id"; -$sql.= " AND s.client IN (2, 3)"; -$sql.= ' AND s.entity IN ('.getEntity('societe', 1).')'; -if ((!$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc"; -if ($socid) $sql.= " AND s.rowid = " .$socid; -if ($search_stcomm != '' && $search_stcomm != -2) $sql.= natural_search("s.fk_stcomm",$search_stcomm,2); -if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid; -if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL"; -if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ; -if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL"; -if ($search_nom) $sql .= natural_search(array('s.nom','s.name_alias'), $search_nom); -if ($search_zipcode) $sql .= " AND s.zip LIKE '".$db->escape(strtolower($search_zipcode))."%'"; -if ($search_town) $sql .= natural_search('s.town', $search_town); -if ($search_state) $sql .= natural_search('d.nom', $search_state); -if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'"; -if ($search_status!='') $sql .= " AND s.status = ".$db->escape($search_status); -// Insert levels filters -if ($search_levels) $sql .= " AND s.fk_prospectlevel IN (".$search_levels.')'; -// Insert sale filter -if ($search_sale > 0) $sql .= " AND sc.fk_user = ".$db->escape($search_sale); -if ($socname) -{ - $sql .= natural_search('s.nom', $search_nom); - $sortfield = "s.nom"; - $sortorder = "ASC"; -} -// Extra fields -foreach ($search_array_options as $key => $val) -{ - $crit=$val; - $tmpkey=preg_replace('/search_options_/','',$key); - $typ=$extrafields->attribute_type[$tmpkey]; - $mode=0; - if (in_array($typ, array('int'))) $mode=1; // Search on a numeric - if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit))) - { - $sql .= natural_search('ef.'.$tmpkey, $crit, $mode); - } -} -// Add where from hooks -$parameters=array(); -$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook -$sql.=$hookmanager->resPrint; -// Count total nb of records -$nbtotalofrecords = 0; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); -} -$sql.= " ORDER BY $sortfield $sortorder, s.nom ASC"; -$sql.= $db->plimit($conf->liste_limit+1, $offset); -//print $sql; - -dol_syslog('comm/prospect/list.php', LOG_DEBUG); -$resql = $db->query($sql); -if ($resql) -{ - $num = $db->num_rows($resql); - - if ($num == 1 && $socname) - { - $obj = $db->fetch_object($resql); - header("Location: card.php?socid=".$obj->socid); - exit; - } - else - { - $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; - llxHeader('',$langs->trans("ThirdParty"),$help_url); - } - - $param='&search_stcomm='.$search_stcomm.'&search_nom='.urlencode($search_nom).'&search_zipcode='.urlencode($search_zipcode).'&search_town='.urlencode($search_town); - // Store the status filter in the URL - if (isSet($search_setstcomm)) - { - foreach ($search_setstcomm as $key => $value) - { - if ($value == 'true') - $param.='&search_setstcomm['.((int) $key).']=true'; - else - $param.='&search_setstcomm['.((int) $key).']=false'; - } - } - if ($search_level_from != '') $param.='&search_level_from='.$search_level_from; - if ($search_level_to != '') $param.='&search_level_to='.$search_level_to; - if ($search_categ != '') $param.='&search_categ='.urlencode($search_categ); - if ($search_sale > 0) $param.='&search_sale='.$search_sale; - if ($search_status != '') $param.='&search_status='.$search_status; - foreach ($search_array_options as $key => $val) - { - $crit=$val; - $tmpkey=preg_replace('/search_options_/','',$key); - $param.='&search_options_'.$tmpkey.'='.urlencode($val); - } - // $param and $urladd should have the same value - $urladd = $param; - - print_barre_liste($langs->trans("ListOfProspects"), $page, $_SERVER["PHP_SELF"], $param, $sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_companies.png'); - - - // Print the search-by-sale and search-by-categ filters - print ''; - - // Filter on categories - $moreforfilter=''; - if (! empty($conf->categorie->enabled)) - { - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; - $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ,'search_categ',1); - $moreforfilter.='       '; - } - // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { - $moreforfilter.=$langs->trans('SalesRepresentatives'). ': '; - $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user); - } - if ($moreforfilter) - { - print '
'; - print $moreforfilter; - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - print '
'; - } - - print ''; - - print ''; - print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.zip","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("State"),$_SERVER["PHP_SELF"],"s.fk_departement","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"s.datec","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("ProspectLevelShort"),$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("StatusProsp"),$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre(''); - - // Extrafields - if (is_array($extrafields->attribute_list) && count($extrafields->attribute_list)) - { - foreach($extrafields->attribute_list as $key => $val) - { - if ($val) - { - print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,"",$sortfield,$sortorder); - } - } - } - // Hook fields - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); - print "\n"; - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - // Prospect level - print ''; - - // Prospect status - print ''; - - print ''; - - // Extrafields - if (is_array($extrafields->attribute_list) && count($extrafields->attribute_list)) - { - foreach($extrafields->attribute_list as $key => $val) - { - if ($val) - { - $crit=$search_array_options['search_options_'.$key]; - print ''; - } - } - } - // Hook fields - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldListSearch',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - // Status - print ''; - - // Print the search button - print '\n"; - - print "\n"; - - $i = 0; - $var=true; - - while ($i < min($num,$conf->liste_limit)) - { - $obj = $db->fetch_object($resql); - - $var=!$var; - - print ''; - print ''; - print ""; - print ""; - print ''; - // Creation date - print ''; - // Level - print '"; - // Statut - print '"; - - print ''; - - // Extrafields - if (is_array($extrafields->attribute_list) && count($extrafields->attribute_list)) - { - foreach($extrafields->attribute_list as $key => $val) - { - if ($val) - { - print ''; - } - } - } - // Hook fields - $parameters=array('obj' => $obj); - $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - print ''; - - print ''; - - print "\n"; - $i++; - } - - if ($num > $conf->liste_limit || $page > 0) print_barre_liste('', $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); - - print "
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - $options_from = ''; // Generate in $options_from the list of each option sorted - foreach ($tab_level as $tab_level_sortorder => $tab_level_label) - { - $options_from .= ''; - } - array_reverse($tab_level, true); // Reverse the list - $options_to = ''; // Generate in $options_to the list of each option sorted in the reversed order - foreach ($tab_level as $tab_level_sortorder => $tab_level_label) - { - $options_to .= ''; - } - - // Print these two select - print $langs->trans("From").' '; - print ' '; - print $langs->trans("to").' '; - - print ''; - $arraystcomm=array(); - foreach($prospectstatic->cacheprospectstatus as $key => $val) - { - $arraystcomm[$val['id']]=$val['label']; - } - print $form->selectarray('search_stcomm', $arraystcomm, $search_stcomm, -2); - print ''; - print ' '; - print ''; - print $extrafields->showInputField($key, $crit, '', '', 'search_', 4); - print ''; - print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); - print ''; - print ''; - print "
'; - $prospectstatic->id=$obj->socid; - $prospectstatic->name=$obj->name; - $prospectstatic->status=$obj->status; - $prospectstatic->code_client=$obj->code_client; - $prospectstatic->client=$obj->client; - $prospectstatic->fk_prospectlevel=$obj->fk_prospectlevel; - $prospectstatic->name_alias=$obj->name_alias; - print $prospectstatic->getNomUrl(1,'prospect'); - print '".$obj->zip."".$obj->town."'.$obj->departement.''.dol_print_date($db->jdate($obj->datec)).''; - print $prospectstatic->getLibProspLevel(); - print "'; - print $prospectstatic->LibProspCommStatut($obj->stcomm_id,2,$prospectstatic->cacheprospectstatus[$obj->stcomm_id]['label']); - print "'; - foreach($prospectstatic->cacheprospectstatus as $key => $val) - { - $titlealt='default'; - if (! empty($val['code']) && ! in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt=$val['label']; - if ($obj->stcomm_id != $val['id']) print ''.img_action($titlealt,$val['code']).''; - } - print ''; - $paramkey='options_'.$key; - print $extrafields->showOutputField($key, $obj->$paramkey); - print ''; - print $prospectstatic->LibStatut($prospectstatic->status,5); - print '
"; - - print ""; - - $db->free($resql); - - $parameters=array('sql' => $sql); - $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; -} -else -{ - dol_print_error($db); -} - - -llxFooter(); -$db->close(); diff --git a/htdocs/comm/prospect/recap-prospect.php b/htdocs/comm/prospect/recap-prospect.php index 5d7358a806e..fe0fdc55b58 100644 --- a/htdocs/comm/prospect/recap-prospect.php +++ b/htdocs/comm/prospect/recap-prospect.php @@ -89,7 +89,5 @@ else dol_print_error($db); } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php index ec54e553bdb..71add817dc5 100644 --- a/htdocs/comm/recap-client.php +++ b/htdocs/comm/recap-client.php @@ -64,7 +64,7 @@ if ($socid > 0) print ''; // Name - print ''; + print ''; // Prefix if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field @@ -88,7 +88,5 @@ else dol_print_error($db); } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index 6d0d1dedb2a..a08e0a66a6f 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -52,9 +52,9 @@ if (GETPOST('cancel') && ! empty($backtopage)) if (GETPOST("action") == 'setremise') { - $soc = New Societe($db); - $soc->fetch($_GET["id"]); - $result=$soc->set_remise_client($_POST["remise"],$_POST["note"],$user); + $object = new Societe($db); + $object->fetch($_GET["id"]); + $result=$object->set_remise_client($_POST["remise"],$_POST["note"],$user); if ($result > 0) { @@ -71,7 +71,7 @@ if (GETPOST("action") == 'setremise') } else { - setEventMessage($soc->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -93,51 +93,50 @@ llxHeader(); if ($socid > 0) { // On recupere les donnees societes par l'objet - $objsoc = new Societe($db); - $objsoc->id=$socid; - $objsoc->fetch($socid); + $object = new Societe($db); + $object->fetch($socid); - $head = societe_prepare_head($objsoc); + $head = societe_prepare_head($object); - print ''; + print ''; print ''; print ''; print ''; dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty"),0,'company'); - - print '
'.$langs->trans("Thirdparty").''.$societe->getNomUrl(1).'
'.$langs->trans("ThirdParty").''.$societe->getNomUrl(1).'
'; - - // Name - print ''; - print ''; + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
'; + + print '
'; + print '
'.$langs->trans('Name').''; - print $form->showrefnav($objsoc,'id','',1,'rowid','nom'); - print '
'; // Remise - print '"; + print '"; print '
'; - print $langs->trans("CustomerRelativeDiscount").''.price2num($objsoc->remise_percent)."%
'; + print $langs->trans("CustomerRelativeDiscount").''.price2num($object->remise_percent)."%
'; print '
'; - print_fiche_titre($langs->trans("NewRelativeDiscount"),'',''); + print load_fiche_titre($langs->trans("NewRelativeDiscount"),'',''); - print ''; + print '
'; // Nouvelle valeur - print ''; + print ''; // Motif/Note - print ''; + print ''; print "
'; - print $langs->trans("NewValue").'%
'; + print $langs->trans("NewValue").'%
'; - print $langs->trans("NoteReason").'
'; + print $langs->trans("NoteReason").'
"; + print ''; + dol_fiche_end(); print '
'; @@ -160,7 +159,7 @@ if ($socid > 0) $sql = "SELECT rc.rowid, rc.remise_client as remise_percent, rc.note, rc.datec as dc,"; $sql.= " u.login, u.rowid as user_id"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_remise as rc, ".MAIN_DB_PREFIX."user as u"; - $sql.= " WHERE rc.fk_soc =". $objsoc->id; + $sql.= " WHERE rc.fk_soc =". $object->id; $sql.= " AND u.rowid = rc.fk_user_author"; $sql.= " ORDER BY rc.datec DESC"; @@ -200,6 +199,5 @@ if ($socid > 0) } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 471232ef708..07989b457de 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -36,7 +36,7 @@ $action=GETPOST('action','alpha'); $backtopage=GETPOST('backtopage','alpha'); // Security check -$socid = GETPOST('id','int'); +$socid = GETPOST('id','int')?GETPOST('id','int'):GETPOST('socid','int'); if ($user->societe_id > 0) { $socid = $user->societe_id; @@ -65,17 +65,17 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes') if (! $res > 0) { $error++; - setEventMessage($langs->trans("ErrorFailedToLoadDiscount"), 'errors'); + setEventMessages($langs->trans("ErrorFailedToLoadDiscount"), null, 'errors'); } if (! $error && price2num($_POST["amount_ttc_1"]+$_POST["amount_ttc_2"]) != $discount->amount_ttc) { $error++; - setEventMessage($langs->trans("TotalOfTwoDiscountMustEqualsOriginal"), 'errors'); + setEventMessages($langs->trans("TotalOfTwoDiscountMustEqualsOriginal"), null, 'errors'); } if (! $error && $discount->fk_facture_line) { $error++; - setEventMessage($langs->trans("ErrorCantSplitAUsedDiscount"), 'errors'); + setEventMessages($langs->trans("ErrorCantSplitAUsedDiscount"), null, 'errors'); } if (! $error) { @@ -140,7 +140,7 @@ if ($action == 'setremise') $error=0; if (empty($_POST["desc"])) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("ReasonDiscount")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("ReasonDiscount")), null, 'errors'); $error++; } @@ -166,13 +166,13 @@ if ($action == 'setremise') else { $error++; - setEventMessage($soc->error, 'errors'); + setEventMessages($soc->error, $soc->errors, 'errors'); } } } else { - setEventMessage($langs->trans("ErrorFieldFormat",$langs->trans("NewGlobalDiscount")), 'errors'); + setEventMessages($langs->trans("ErrorFieldFormat",$langs->trans("NewGlobalDiscount")), null, 'errors'); } } @@ -194,7 +194,7 @@ if (GETPOST("action") == 'confirm_remove' && GETPOST("confirm")=='yes') } else { - setEventMessage($discount->error, 'errors'); + setEventMessages($discount->error, $discount->errors, 'errors'); $db->rollback(); } } @@ -212,36 +212,34 @@ llxHeader('',$langs->trans("GlobalDiscount")); if ($socid > 0) { // On recupere les donnees societes par l'objet - $objsoc = new Societe($db); - $objsoc->id=$socid; - $objsoc->fetch($socid); + $object = new Societe($db); + $object->fetch($socid); /* - * Affichage onglets + * Display tabs */ - $head = societe_prepare_head($objsoc); + $head = societe_prepare_head($object); - print ''; + print ''; print ''; print ''; print ''; dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"),0,'company'); - print ''; - - // Name - print ''; - print ''; + dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + + print '
'; + + print '
'; + print '
'.$langs->trans('Name').''; - print $form->showrefnav($objsoc,'id','',1,'rowid','nom'); - print '
'; // Calcul avoirs en cours $remise_all=$remise_user=0; $sql = "SELECT SUM(rc.amount_ht) as amount, rc.fk_user"; $sql.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as rc"; - $sql.= " WHERE rc.fk_soc =". $objsoc->id; + $sql.= " WHERE rc.fk_soc =". $object->id; $sql.= " AND (fk_facture_line IS NULL AND fk_facture IS NULL)"; $sql.= " GROUP BY rc.fk_user"; $resql=$db->query($sql); @@ -256,7 +254,7 @@ if ($socid > 0) dol_print_error($db); } - print ''; + print ''; print ''; print ''; @@ -264,20 +262,22 @@ if ($socid > 0) print '
'.$langs->trans("CustomerAbsoluteDiscountAllUsers").'
'.$langs->trans("CustomerAbsoluteDiscountAllUsers").''.$remise_all.' '.$langs->trans("Currency".$conf->currency).' '.$langs->trans("HT").'
'.$langs->trans("CustomerAbsoluteDiscountMy").'
'; print '
'; - print_fiche_titre($langs->trans("NewGlobalDiscount"),'',''); + print load_fiche_titre($langs->trans("NewGlobalDiscount"),'',''); print ''; print ''; print ''; print ''; print ''; print ''; print ''; print "
'.$langs->trans("AmountHT").''; print ' '.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("VAT").''; - print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$objsoc); + print $form->load_tva('tva_tx',GETPOST('tva_tx'),$mysoc,$object); print '
'.$langs->trans("NoteReason").'
"; + print '
'; + dol_fiche_end(); print '
'; @@ -296,11 +296,11 @@ if ($socid > 0) if ($_GET['action'] == 'remove') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$_GET["remid"], $langs->trans('RemoveDiscount'), $langs->trans('ConfirmRemoveDiscount'), 'confirm_remove', '', 0, 1); } /* - * Liste remises fixes restant en cours (= liees a acune facture ni ligne de facture) + * Liste remises fixes restant en cours (= liees a aucune facture ni ligne de facture) */ $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx,"; $sql.= " rc.datec as dc, rc.description,"; @@ -309,7 +309,7 @@ if ($socid > 0) $sql.= " fa.facnumber as ref, fa.type as type"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."societe_remise_except as rc"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid"; - $sql.= " WHERE rc.fk_soc =". $objsoc->id; + $sql.= " WHERE rc.fk_soc =". $object->id; $sql.= " AND u.rowid = rc.fk_user"; $sql.= " AND (rc.fk_facture_line IS NULL AND rc.fk_facture IS NULL)"; $sql.= " ORDER BY rc.datec DESC"; @@ -317,7 +317,7 @@ if ($socid > 0) $resql=$db->query($sql); if ($resql) { - print_titre($langs->trans("DiscountStillRemaining")); + print load_fiche_titre($langs->trans("DiscountStillRemaining")); print ''; print ''; print ''; // Need 120+ for format with AM/PM @@ -375,9 +375,9 @@ if ($socid > 0) if ($user->rights->societe->creer || $user->rights->facture->creer) { print ''; } else print ''; @@ -403,7 +403,7 @@ if ($socid > 0) array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') ); $langs->load("dict"); - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); } } else @@ -429,7 +429,7 @@ if ($socid > 0) $sql.= " , ".MAIN_DB_PREFIX."facturedet as fc"; $sql.= " , ".MAIN_DB_PREFIX."societe_remise_except as rc"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid"; - $sql.= " WHERE rc.fk_soc =". $objsoc->id; + $sql.= " WHERE rc.fk_soc =". $object->id; $sql.= " AND rc.fk_facture_line = fc.rowid"; $sql.= " AND fc.fk_facture = f.rowid"; $sql.= " AND rc.fk_user = u.rowid"; @@ -446,7 +446,7 @@ if ($socid > 0) $sql2.= " , ".MAIN_DB_PREFIX."user as u"; $sql2.= " , ".MAIN_DB_PREFIX."societe_remise_except as rc"; $sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid"; - $sql2.= " WHERE rc.fk_soc =". $objsoc->id; + $sql2.= " WHERE rc.fk_soc =". $object->id; $sql2.= " AND rc.fk_facture = f.rowid"; $sql2.= " AND rc.fk_user = u.rowid"; @@ -457,7 +457,7 @@ if ($socid > 0) if ($resql) $resql2=$db->query($sql2); if ($resql2) { - print_titre($langs->trans("DiscountAlreadyCounted")); + print load_fiche_titre($langs->trans("DiscountAlreadyCounted")); print '
'.$langs->trans("Date").''; - print 'rowid.'">'.img_picto($langs->trans("SplitDiscount"),'split').''; + print 'rowid.'">'.img_picto($langs->trans("SplitDiscount"),'split').''; print '   '; - print 'rowid.'">'.img_delete($langs->trans("RemoveDiscount")).''; + print 'rowid.'">'.img_delete($langs->trans("RemoveDiscount")).''; print ' 
'; print ''; print ''; // Need 120+ for format with AM/PM @@ -544,6 +544,5 @@ if ($socid > 0) } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 2b9163886f4..08e2981a060 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -5,10 +5,10 @@ * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2013 Juanjo Menent - * Copyright (C) 2011 Philippe Grand + * Copyright (C) 2011-2015 Philippe Grand * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2012 Marcos García - * Copyright (C) 2012 Cedric Salvador + * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Ferran Marcet * Copyright (C) 2015 Jean-François Ferry @@ -36,6 +36,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formorder.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmargin.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/modules/commande/modules_commande.php'; require_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; @@ -122,14 +123,14 @@ if (empty($reshook)) { if (1==0 && ! GETPOST('clone_content') && ! GETPOST('clone_receivers')) { - setEventMessage($langs->trans("NoCloneOptionsSpecified"), 'errors'); + setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); } else { if ($object->id > 0) { // Because createFromClone modifies the object, we must clone it so that we can restore it later - $orig = dol_clone($object); + $orig = clone $object; $result=$object->createFromClone($socid); if ($result > 0) @@ -139,7 +140,7 @@ if (empty($reshook)) } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $object = $orig; $action=''; } @@ -155,12 +156,11 @@ if (empty($reshook)) $result = $object->set_reopen($user); if ($result > 0) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; + setEventMessages($langs->trans('OrderReopened', $object->ref), null); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -176,7 +176,7 @@ if (empty($reshook)) } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -207,7 +207,7 @@ if (empty($reshook)) } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -224,13 +224,13 @@ if (empty($reshook)) $datelivraison = dol_mktime(12, 0, 0, GETPOST('liv_month'), GETPOST('liv_day'), GETPOST('liv_year')); if ($datecommande == '') { - setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentities('Date')), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Date')), null, 'errors'); $action = 'create'; $error++; } if ($socid < 1) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), null, 'errors'); $action = 'create'; $error++; } @@ -255,11 +255,21 @@ if (empty($reshook)) $object->demand_reason_id = GETPOST('demand_reason_id'); $object->date_livraison = $datelivraison; $object->shipping_method_id = GETPOST('shipping_method_id', 'int'); + $object->warehouse_id = GETPOST('warehouse_id', 'int'); $object->fk_delivery_address = GETPOST('fk_address'); $object->contactid = GETPOST('contactid'); $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); - + $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); + $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); + + // Fill array 'array_options' with data from add form + if (! $error) + { + $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + if ($ret < 0) $error++; + } + // If creation from another object of another module (Example: origin=propal, originid=1) if (! empty($origin) && ! empty($originid)) { @@ -292,10 +302,6 @@ if (empty($reshook)) $object->linked_objects = array_merge($object->linked_objects, $other_linked_objects); } - // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); - if ($ret < 0) $error++; - if (! $error) { $object_id = $object->create($user); @@ -324,7 +330,7 @@ if (empty($reshook)) for($i = 0; $i < $num; $i ++) { $label = (! empty($lines[$i]->label) ? $lines[$i]->label : ''); - $desc = (! empty($lines[$i]->desc) ? $lines[$i]->desc : $lines[$i]->libelle); + $desc = (! empty($lines[$i]->desc) ? $lines[$i]->desc : ''); $product_type = (! empty($lines[$i]->product_type) ? $lines[$i]->product_type : 0); // Dates @@ -353,7 +359,7 @@ if (empty($reshook)) $array_options = $lines[$i]->array_options; } - $result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, $lines[$i]->info_bits, $lines[$i]->fk_remise_except, 'HT', 0, $date_start, $date_end, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_options, $lines[$i]->fk_unit); + $result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, $lines[$i]->info_bits, $lines[$i]->fk_remise_except, 'HT', 0, $date_start, $date_end, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $array_options, $lines[$i]->fk_unit, $object->origin, $lines[$i]->rowid); if ($result < 0) { $error++; @@ -373,11 +379,11 @@ if (empty($reshook)) if ($reshook < 0) $error++; } else { - setEventMessage($srcobject->error, 'errors'); + setEventMessages($srcobject->error, $srcobject->errors, 'errors'); $error++; } } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $error++; } } else { @@ -385,10 +391,6 @@ if (empty($reshook)) $action = 'create'; } } else { - // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); - if ($ret < 0) $error++; - if (! $error) { $object_id = $object->create($user); @@ -413,7 +415,7 @@ if (empty($reshook)) { $result = $object->add_contact(GETPOST('contactid'), 'CUSTOMER', 'external'); if ($result < 0) { - setEventMessage($langs->trans("ErrorFailedToAddContact"), 'errors'); + setEventMessages($langs->trans("ErrorFailedToAddContact"), null, 'errors'); $error++; } } @@ -431,7 +433,7 @@ if (empty($reshook)) } else { $db->rollback(); $action = 'create'; - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -441,7 +443,7 @@ if (empty($reshook)) $ret=$object->classifyBilled(); if ($ret < 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -470,7 +472,7 @@ if (empty($reshook)) $result = $object->set_date($user, $date); if ($result < 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -480,7 +482,7 @@ if (empty($reshook)) $result = $object->set_date_livraison($user, $datelivraison); if ($result < 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -489,7 +491,17 @@ if (empty($reshook)) if ($result < 0) dol_print_error($db, $object->error); } + + // Multicurrency Code + else if ($action == 'setmulticurrencycode' && $user->rights->commande->creer) { + $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); + } + // Multicurrency rate + else if ($action == 'setmulticurrencyrate' && $user->rights->commande->creer) { + $result = $object->setMulticurrencyRate(GETPOST('multicurrency_tx', 'int')); + } + else if ($action == 'setavailability' && $user->rights->commande->creer) { $result = $object->availability(GETPOST('availability_id')); if ($result < 0) @@ -528,18 +540,35 @@ if (empty($reshook)) elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } // bank account else if ($action == 'setbankaccount' && $user->rights->commande->creer) { $result=$object->setBankAccount(GETPOST('fk_account', 'int')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } // shipping method else if ($action == 'setshippingmethod' && $user->rights->commande->creer) { $result = $object->setShippingMethod(GETPOST('shipping_method_id', 'int')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } } + // warehouse + else if ($action == 'setwarehouse' && $user->rights->commande->creer) { + $result = $object->setWarehouse(GETPOST('warehouse_id', 'int')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + else if ($action == 'setremisepercent' && $user->rights->commande->creer) { $result = $object->set_remise($user, GETPOST('remise_percent')); } @@ -585,31 +614,31 @@ if (empty($reshook)) } if (empty($idprod) && ($price_ht < 0) && ($qty < 0)) { - setEventMessage($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), 'errors'); + setEventMessages($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error++; } if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && GETPOST('type') < 0) { - setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors'); $error++; } if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && (! ($price_ht >= 0) || $price_ht == '')) // Unit price can be 0 but not '' { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); $error++; } if ($qty == '') { - setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error++; } if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && empty($product_desc)) { - setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), null, 'errors'); $error++; } if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) { // Clean parameters - $date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), 0, GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); - $date_end=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), 0, GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); + $date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); + $date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); $price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT'); // Ecrase $pu par celui du produit @@ -663,7 +692,7 @@ if (empty($reshook)) } else { - setEventMessage($prodcustprice->error,'errors'); + setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); } } @@ -732,8 +761,8 @@ if (empty($reshook)) } // Margin - $fournprice = (GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : ''); - $buyingprice = (GETPOST('buying_price' . $predef) ? GETPOST('buying_price' . $predef) : ''); + $fournprice = price2num(GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : ''); + $buyingprice = price2num(GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''); // If buying_price is '0', we muste keep this value // Local Taxes $localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty); @@ -747,7 +776,7 @@ if (empty($reshook)) if (! empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min))) { $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)); - setEventMessage($mesg, 'errors'); + setEventMessages($mesg, null, 'errors'); } else { // Insert line $result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $info_bits, 0, $price_base_type, $pu_ttc, $date_start, $date_end, $type, - 1, 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_options, $fk_unit); @@ -801,7 +830,7 @@ if (empty($reshook)) unset($_POST['date_endmonth']); unset($_POST['date_endyear']); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -815,8 +844,8 @@ if (empty($reshook)) // Clean parameters $date_start=''; $date_end=''; - $date_start=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); - $date_end=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); + $date_start=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); + $date_end=dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); $description=dol_htmlcleanlastbr(GETPOST('product_desc')); $pu_ht=GETPOST('price_ht'); $vat_rate=(GETPOST('tva_tx')?GETPOST('tva_tx'):0); @@ -832,8 +861,8 @@ if (empty($reshook)) $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty, $mysoc); // Add buying price - $fournprice = (GETPOST('fournprice') ? GETPOST('fournprice') : ''); - $buyingprice = (GETPOST('buying_price') ? GETPOST('buying_price') : ''); + $fournprice = price2num(GETPOST('fournprice') ? GETPOST('fournprice') : ''); + $buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value // Extrafields Lines $extrafieldsline = new ExtraFields($db); @@ -865,7 +894,7 @@ if (empty($reshook)) $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); if ($price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min))) { - setEventMessage($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), 'errors'); + setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors'); $error++; } } else { @@ -874,7 +903,7 @@ if (empty($reshook)) // Check parameters if (GETPOST('type') < 0) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); $error++; } } @@ -913,7 +942,7 @@ if (empty($reshook)) unset($_POST['fournprice']); unset($_POST['buying_price']); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -946,7 +975,7 @@ if (empty($reshook)) if (! $idwarehouse || $idwarehouse == -1) { $error++; - setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentitiesnoconv("Warehouse")), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired',$langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $action=''; } } @@ -999,7 +1028,7 @@ if (empty($reshook)) if (! $idwarehouse || $idwarehouse == -1) { $error++; - setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentitiesnoconv("Warehouse")), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired',$langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $action=''; } } @@ -1031,7 +1060,7 @@ if (empty($reshook)) else if ($action == 'confirm_shipped' && $confirm == 'yes' && $user->rights->commande->cloturer) { $result = $object->cloture($user); if ($result < 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1058,7 +1087,7 @@ if (empty($reshook)) if (! $idwarehouse || $idwarehouse == -1) { $error++; - setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentitiesnoconv("Warehouse")), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired',$langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $action=''; } } @@ -1067,7 +1096,7 @@ if (empty($reshook)) $result = $object->cancel($idwarehouse); if ($result < 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -1114,9 +1143,9 @@ if (empty($reshook)) $file = $upload_dir . '/' . GETPOST('file'); $ret = dol_delete_file($file, 0, 0, 0, $object); if ($ret) - setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); + setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); else - setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); + setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); $action = ''; } } @@ -1174,9 +1203,9 @@ if (empty($reshook)) - if (! $error && ! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->commande->creer) + if (! $error && ! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->commande->creer) { - if ($action == 'addcontact') + if ($action == 'addcontact') { if ($object->id > 0) { $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); @@ -1189,15 +1218,15 @@ if (empty($reshook)) } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - setEventMessage($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), 'errors'); + setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } // bascule du statut d'un contact - else if ($action == 'swapstatut') + else if ($action == 'swapstatut') { if ($object->id > 0) { $result = $object->swapContactStatus(GETPOST('ligne')); @@ -1207,7 +1236,7 @@ if (empty($reshook)) } // Efface un contact - else if ($action == 'deletecontact') + else if ($action == 'deletecontact') { $result = $object->delete_contact($lineid); @@ -1231,6 +1260,7 @@ llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients| $form = new Form($db); $formfile = new FormFile($db); $formorder = new FormOrder($db); +$formmargin = new FormMargin($db); if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } /** @@ -1242,14 +1272,17 @@ if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } */ if ($action == 'create' && $user->rights->commande->creer) { - print_fiche_titre($langs->trans('CreateOrder'),'','title_commercial.png'); + print load_fiche_titre($langs->trans('CreateOrder'),'','title_commercial.png'); $soc = new Societe($db); if ($socid > 0) $res = $soc->fetch($socid); - if (! empty($origin) && ! empty($originid)) - { + $projectid = 0; + $remise_absolue = 0; + $currency_code = $conf->currency; + + if (! empty($origin) && ! empty($originid)) { // Parse element/subelement (ex: project_task) $element = $subelement = $origin; if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) { @@ -1259,6 +1292,20 @@ if ($action == 'create' && $user->rights->commande->creer) if ($element == 'project') { $projectid = $originid; + + if (!$cond_reglement_id) { + $cond_reglement_id = $soc->cond_reglement_id; + } + if (!$mode_reglement_id) { + $mode_reglement_id = $soc->mode_reglement_id; + } + if (!$remise_percent) { + $remise_percent = $soc->remise_percent; + } + if (!$dateorder) { + // Do not set 0 here (0 for a date is 1970) + $dateorder = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE_ODER)?-1:''):$dateorder); + } } else { // For compatibility if ($element == 'order' || $element == 'commande') { @@ -1294,6 +1341,7 @@ if ($action == 'create' && $user->rights->commande->creer) $fk_account = (! empty($objectsrc->fk_account)?$objectsrc->fk_account:(! empty($soc->fk_account)?$soc->fk_account:0)); $availability_id = (!empty($objectsrc->availability_id)?$objectsrc->availability_id:(!empty($soc->availability_id)?$soc->availability_id:0)); $shipping_method_id = (! empty($objectsrc->shipping_method_id)?$objectsrc->shipping_method_id:(! empty($soc->shipping_method_id)?$soc->shipping_method_id:0)); + $warehouse_id = (! empty($objectsrc->warehouse_id)?$objectsrc->warehouse_id:(! empty($soc->warehouse_id)?$soc->warehouse_id:0)); $demand_reason_id = (!empty($objectsrc->demand_reason_id)?$objectsrc->demand_reason_id:(!empty($soc->demand_reason_id)?$soc->demand_reason_id:0)); $remise_percent = (!empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(!empty($soc->remise_percent)?$soc->remise_percent:0)); $remise_absolue = (!empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0)); @@ -1301,8 +1349,14 @@ if ($action == 'create' && $user->rights->commande->creer) $datedelivery = (! empty($objectsrc->date_livraison) ? $objectsrc->date_livraison : ''); - $note_private = (! empty($objectsrc->note_private) ? $objectsrc->note_private : (! empty($objectsrc->note_private) ? $objectsrc->note_private : '')); - $note_public = (! empty($objectsrc->note_public) ? $objectsrc->note_public : ''); + if (!empty($conf->multicurrency->enabled)) + { + if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code; + if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx; + } + + $note_private = $object->getDefaultCreateValueFor('note_private', (! empty($objectsrc->note_private) ? $objectsrc->note_private : null)); + $note_public = $object->getDefaultCreateValueFor('note_public', (! empty($objectsrc->note_public) ? $objectsrc->note_public : null)); // Object source contacts list $srccontactslist = $objectsrc->liste_contact(- 1, 'external', 1); @@ -1315,11 +1369,17 @@ if ($action == 'create' && $user->rights->commande->creer) $fk_account = $soc->fk_account; $availability_id = $soc->availability_id; $shipping_method_id = $soc->shipping_method_id; + $warehouse_id = $soc->warehouse_id; $demand_reason_id = $soc->demand_reason_id; $remise_percent = $soc->remise_percent; $remise_absolue = 0; $dateorder = empty($conf->global->MAIN_AUTOFILL_DATE_ORDER)?-1:''; $projectid = 0; + + if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; + + $note_private = $object->getDefaultCreateValueFor('note_private'); + $note_public = $object->getDefaultCreateValueFor('note_public'); } $absolute_discount=$soc->getAvailableDiscounts(); @@ -1332,6 +1392,7 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; print ''; print ''; + if (!empty($currency_tx)) print ''; dol_fiche_head(''); @@ -1342,10 +1403,10 @@ if ($action == 'create' && $user->rights->commande->creer) // Reference client print ''; else - print ''; + print ''; print ''; // Client @@ -1359,6 +1420,19 @@ if ($action == 'create' && $user->rights->commande->creer) } else { print ''; } print '' . "\n"; @@ -1431,13 +1505,22 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; } + // Warehouse + if (! empty($conf->expedition->enabled) && ! empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct=new FormProduct($db); + print ''; + } + // What trigger creation print ''; // TODO How record was recorded OrderMode (llx_c_input_method) - + // Project if (! empty($conf->projet->enabled) && $socid > 0) { @@ -1479,6 +1562,16 @@ if ($action == 'create' && $user->rights->commande->creer) print $form->selectarray('model', $liste, $conf->global->COMMANDE_ADDON_PDF); print ""; + // Multicurrency + if (! empty($conf->multicurrency->enabled)) + { + print ''; + print ''; + print ''; + } + // Note public print ''; print ''; @@ -1519,9 +1612,23 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; print ''; - $newclassname = $classname; - if ($newclassname == 'Propal') - $newclassname = 'CommercialProposal'; + switch ($classname) { + case 'Propal': + $newclassname = 'CommercialProposal'; + break; + case 'Commande': + $newclassname = 'Order'; + break; + case 'Expedition': + $newclassname = 'Sending'; + break; + case 'Contrat': + $newclassname = 'Contract'; + break; + default: + $newclassname = $classname; + } + print ''; print ''; print '"; @@ -1536,6 +1643,13 @@ if ($action == 'create' && $user->rights->commande->creer) } print '"; + + if (!empty($conf->multicurrency->enabled)) + { + print ''; + print '"; + print '"; + } } else { @@ -1582,7 +1696,7 @@ if ($action == 'create' && $user->rights->commande->creer) // Show origin lines if (! empty($origin) && ! empty($originid) && is_object($objectsrc)) { $title = $langs->trans('ProductsAndServices'); - print_titre($title); + print load_fiche_titre($title); print '
'.$langs->trans("Date").'
' . $langs->trans('RefCustomer') . ''; - if (!empty($conf->global->MAIN_USE_PROPAL_REFCLIENT_FOR_ORDER)) + if (!empty($conf->global->MAIN_USE_PROPAL_REFCLIENT_FOR_ORDER) && ! empty($origin) && ! empty($originid)) print '
'; print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 1); + // reload page to retrieve customer informations + if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE)) + { + print ''; + } print '
' . $langs->trans('Warehouse') . ''; + print $formproduct->selectWarehouses($warehouse_id, 'warehouse_id', '', 1); + print '
' . $langs->trans('Source') . ''; $form->selectInputReason($demand_reason_id, 'demand_reason_id', '', 1); print '
'.fieldLabel('Currency','multicurrency_code').''; + print $form->selectMultiCurrency($currency_code, 'multicurrency_code'); + print '
' . $langs->trans('NotePublic') . '
' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1) . '
' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . '
' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . "
' . $langs->trans('TotalTTC') . '' . price($objectsrc->total_ttc) . "
' . $langs->trans('MulticurrencyTotalHT') . '' . price($objectsrc->multicurrency_total_ht) . '
' . $langs->trans('MulticurrencyTotalVAT') . '' . price($objectsrc->multicurrency_total_tva) . "
' . $langs->trans('MulticurrencyTotalTTC') . '' . price($objectsrc->multicurrency_total_ttc) . "
'; @@ -1940,6 +2054,27 @@ if ($action == 'create' && $user->rights->commande->creer) print ''; } + // Warehouse + if (! empty($conf->expedition->enabled) && ! empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct=new FormProduct($db); + print ''; + print ''; + } + // Terms of payment print ''; echo '
'; + print ''; + if ($action != 'editwarehouse' && $user->rights->commande->creer) + print ''; + print '
'; + print $langs->trans('Warehouse'); + print 'id.'">'.img_edit($langs->trans('SetWarehouse'),1).'
'; + print '
'; + if ($action == 'editwarehouse') { + $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1); + } else { + $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'none'); + } + print '
'; print ''; + // Multicurrency + if (! empty($conf->multicurrency->enabled)) + { + // Multicurrency code + print ''; + print ''; + + // Multicurrency rate + print ''; + print ''; + } + // Availability print ''; - //print ''; + //DATE ORDER print ''; //SEARCH BUTTON - print ''; - print ''; + print ''; print ''; print ''; @@ -640,6 +643,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) $generic_commande->id=$objp->rowid; $generic_commande->ref=$objp->ref; + $generic_commande->statut = $objp->fk_statut; + $generic_commande->date_commande = $db->jdate($objp->date_commande); + $generic_commande->date_livraison = $db->jdate($objp->date_livraison); print '
'; @@ -1974,6 +2109,44 @@ if ($action == 'create' && $user->rights->commande->creer) } print '
'; + print ''; + if ($action != 'editmulticurrencycode' && ! empty($object->brouillon)) + print ''; + print '
'; + print fieldLabel('Currency','multicurrency_code'); + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; + print '
'; + if ($action == 'editmulticurrencycode') { + $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'multicurrency_code'); + } else { + $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'none'); + } + print '
'; + print ''; + if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon)) + print ''; + print '
'; + print fieldLabel('Rate','multicurrency_tx'); + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; + print '
'; + if ($action == 'editmulticurrencyrate') { + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx'); + } else { + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none'); + } + print '
'; print ''; // TODO How record was recorded OrderMode (llx_c_input_method) - + // Project if (! empty($conf->projet->enabled)) { @@ -2105,7 +2278,7 @@ if ($action == 'create' && $user->rights->commande->creer) // Margin Infos if (! empty($conf->margin->enabled)) { print ''; } else print ''; @@ -2130,6 +2303,24 @@ if ($action == 'create' && $user->rights->commande->creer) // Total TTC print ''; + if (!empty($conf->multicurrency->enabled)) + { + // Multicurrency Amount HT + print ''; + print ''; + print ''; + + // Multicurrency Amount VAT + print ''; + print ''; + print ''; + + // Multicurrency Amount TTC + print ''; + print ''; + print ''; + } + // Statut print ''; @@ -2204,7 +2395,15 @@ if ($action == 'create' && $user->rights->commande->creer) $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been // modified by hook if (empty($reshook)) { - // Valid + // Send + if ($object->statut > Commande::STATUS_DRAFT) { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->commande->order_advance->send)) { + print ''; + } else + print ''; + } + + // Valid if ($object->statut == Commande::STATUS_DRAFT && $object->total_ttc >= 0 && $numlines > 0 && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->order_advance->validate))) @@ -2223,14 +2422,29 @@ if ($action == 'create' && $user->rights->commande->creer) { print '' . $langs->trans("AddAction") . ''; } - // Send - if ($object->statut > Commande::STATUS_DRAFT) { - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->commande->order_advance->send)) { - print ''; - } else - print ''; + + // Create intervention + if ($conf->ficheinter->enabled) { + $langs->load("interventions"); + + if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0) { + if ($user->rights->ficheinter->creer) { + print ''; + } else { + print ''; + } + } } + // Create contract + if ($conf->contrat->enabled && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED)) { + $langs->load("contracts"); + + if ($user->rights->contrat->creer) { + print ''; + } + } + // Ship $numshipping = 0; if (! empty($conf->expedition->enabled)) { @@ -2250,31 +2464,14 @@ if ($action == 'create' && $user->rights->commande->creer) } } - // Create intervention - if ($conf->ficheinter->enabled) { - $langs->load("interventions"); - - if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0) { - if ($user->rights->ficheinter->creer) { - print ''; - } else { - print ''; - } - } - } - // Reopen a closed order if (($object->statut == Commande::STATUS_CLOSED || $object->statut == Commande::STATUS_CANCELED) && $user->rights->commande->creer) { print ''; } - // Create contract - if ($conf->contrat->enabled && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED)) { - $langs->load("contracts"); - - if ($user->rights->contrat->creer) { - print ''; - } + // Set to shipped + if (($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED) && $user->rights->commande->cloturer) { + print ''; } // Create bill and Classify billed @@ -2283,16 +2480,11 @@ if ($action == 'create' && $user->rights->commande->creer) if (! empty($conf->facture->enabled) && $user->rights->facture->creer && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) { print ''; } - if ($user->rights->commande->creer && $object->statut > Commande::STATUS_ACCEPTED && empty($conf->global->WORKFLOW_DISABLE_CLASSIFY_BILLED_FROM_ORDER) && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { + if ($user->rights->commande->creer && $object->statut >= Commande::STATUS_VALIDATED && empty($conf->global->WORKFLOW_DISABLE_CLASSIFY_BILLED_FROM_ORDER) && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { print ''; } } - // Set to shipped - if (($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED) && $user->rights->commande->cloturer) { - print ''; - } - // Clone if ($user->rights->commande->creer) { print ''; @@ -2397,7 +2589,7 @@ if ($action == 'create' && $user->rights->commande->creer) print '
'; print '
'; - print_fiche_titre($langs->trans('SendOrderByMail')); + print load_fiche_titre($langs->trans('SendOrderByMail')); dol_fiche_head(''); @@ -2409,6 +2601,15 @@ if ($action == 'create' && $user->rights->commande->creer) $formmail->fromid = $user->id; $formmail->fromname = $user->getFullName($langs); $formmail->frommail = $user->email; + if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 1)) // If bit 1 is set + { + $formmail->trackid='ord'.$object->id; + } + if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set + { + include DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $formmail->frommail=dolAddEmailTrackId($formmail->frommail, 'ord'.$object->id); + } $formmail->withfrom = 1; $liste = array(); foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key => $value) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index cb0e5ccf55e..7f12328089e 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -33,6 +33,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/commonorder.class.php'; require_once DOL_DOCUMENT_ROOT ."/core/class/commonobjectline.class.php"; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT .'/margin/lib/margins.lib.php'; +dol_include_once('/multicurrency/class/multicurrency.class.php'); /** * Class to manage customers orders @@ -51,26 +52,15 @@ class Commande extends CommonOrder */ protected $table_ref_field = 'ref'; - var $id; - /** * Client ID * @var int */ var $socid; - /** - * Client (loaded by fetch_client) - * @var Societe - */ - var $client; - - var $ref; var $ref_client; - var $ref_ext; var $ref_int; var $contactid; - var $fk_project; /** * Status of the order. Check the following constants: @@ -86,16 +76,44 @@ class Commande extends CommonOrder var $billed; // billed or not var $brouillon; - var $cond_reglement_id; var $cond_reglement_code; + var $fk_account; + + /** + * It holds the label of the payment mode. Use it in case translation cannot be found. + * @var string + */ + var $mode_reglement; + + /** + * Payment mode id + * @var int + */ var $mode_reglement_id; + /** + * Payment mode code + * @var string + */ var $mode_reglement_code; + /** + * Availability delivery time id + * @var int + */ var $availability_id; + /** + * Availability delivery time code + * @var string + */ var $availability_code; + /** + * Label of availability delivery time. Use it in case translation cannot be found. + * @var string + */ + var $availability; + var $demand_reason_id; var $demand_reason_code; - var $fk_delivery_address; var $address; var $date; // Date commande /** @@ -104,31 +122,15 @@ class Commande extends CommonOrder */ var $date_commande; var $date_livraison; // Date livraison souhaitee - var $shipping_method_id; var $fk_remise_except; var $remise_percent; - var $total_ht; // Total net of tax - var $total_ttc; // Total with tax - var $total_tva; // Total VAT - var $total_localtax1; // Total Local tax 1 - var $total_localtax2; // Total Local tax 2 var $remise_absolue; - var $modelpdf; var $info_bits; var $rang; var $special_code; var $source; // Origin of order - /** - * @deprecated - * @see note_private, note_public - */ - var $note; - var $note_private; - var $note_public; var $extraparams=array(); - var $origin; - var $origin_id; var $linked_objects=array(); var $user_author_id; @@ -138,17 +140,20 @@ class Commande extends CommonOrder */ var $lines = array(); - //Incorterms - var $fk_incoterms; - var $location_incoterms; - var $libelle_incoterms; //Used into tooltip - // Pour board var $nbtodo; var $nbtodolate; + // Multicurrency + var $fk_multicurrency; + var $multicurrency_code; + var $multicurrency_tx; + var $multicurrency_total_ht; + var $multicurrency_total_tva; + var $multicurrency_total_ttc; + /** - * ERR Not engouch stock + * ERR Not enough stock */ const STOCK_NOT_ENOUGH_FOR_ORDER = -3; @@ -453,7 +458,7 @@ class Commande extends CommonOrder { $mouvP = new MouvementStock($this->db); // We increment stock of product (and sub-products) - $result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("OrderBackToDraftInDolibarr",$this->ref)); + $result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, 0, $langs->trans("OrderBackToDraftInDolibarr",$this->ref)); if ($result < 0) { $error++; } } } @@ -637,7 +642,7 @@ class Commande extends CommonOrder { $mouvP = new MouvementStock($this->db); // We increment stock of product (and sub-products) - $result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("OrderCanceledInDolibarr",$this->ref)); + $result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, 0, $langs->trans("OrderCanceledInDolibarr",$this->ref)); // price is 0, we don't want WAP to be changed if ($result < 0) { $error++; @@ -696,7 +701,17 @@ class Commande extends CommonOrder // Clean parameters $this->brouillon = 1; // set command as draft - + + // Multicurrency (test on $this->multicurrency_tx because we sould take the default rate only if not using origin rate) + if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code); + else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); + if (empty($this->fk_multicurrency)) + { + $this->multicurrency_code = $conf->currency; + $this->fk_multicurrency = 0; + $this->multicurrency_tx = 1; + } + dol_syslog(get_class($this)."::create user=".$user->id); // Check parameters @@ -738,9 +753,13 @@ class Commande extends CommonOrder $sql.= " ref, fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note_private, note_public, ref_ext, ref_client, ref_int"; $sql.= ", model_pdf, fk_cond_reglement, fk_mode_reglement, fk_account, fk_availability, fk_input_reason, date_livraison, fk_delivery_address"; $sql.= ", fk_shipping_method"; + $sql.= ", fk_warehouse"; $sql.= ", remise_absolue, remise_percent"; $sql.= ", fk_incoterms, location_incoterms"; $sql.= ", entity"; + $sql.= ", fk_multicurrency"; + $sql.= ", multicurrency_code"; + $sql.= ", multicurrency_tx"; $sql.= ")"; $sql.= " VALUES ('(PROV)',".$this->socid.", '".$this->db->idate($now)."', ".$user->id; $sql.= ", ".($this->fk_project>0?$this->fk_project:"null"); @@ -760,11 +779,15 @@ class Commande extends CommonOrder $sql.= ", ".($this->date_livraison?"'".$this->db->idate($this->date_livraison)."'":"null"); $sql.= ", ".($this->fk_delivery_address>0?$this->fk_delivery_address:'NULL'); $sql.= ", ".($this->shipping_method_id>0?$this->shipping_method_id:'NULL'); + $sql.= ", ".($this->warehouse_id>0?$this->warehouse_id:'NULL'); $sql.= ", ".($this->remise_absolue>0?$this->db->escape($this->remise_absolue):'NULL'); $sql.= ", ".($this->remise_percent>0?$this->db->escape($this->remise_percent):0); $sql.= ", ".(int) $this->fk_incoterms; $sql.= ", '".$this->db->escape($this->location_incoterms)."'"; $sql.= ", ".$conf->entity; + $sql.= ", ".(int) $this->fk_multicurrency; + $sql.= ", '".$this->db->escape($this->multicurrency_code)."'"; + $sql.= ", ".(double) $this->multicurrency_tx; $sql.= ")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); @@ -811,7 +834,9 @@ class Commande extends CommonOrder $this->lines[$i]->pa_ht, $this->lines[$i]->label, $this->lines[$i]->array_options, - $this->lines[$i]->fk_unit + $this->lines[$i]->fk_unit, + $this->element, + $this->lines[$i]->id ); if ($result < 0) { @@ -958,7 +983,7 @@ class Commande extends CommonOrder $line->fetch_optionals($line->rowid); // Load source object - $objFrom = dol_clone($this); + $objFrom = clone $this; // Change socid if needed if (! empty($socid) && $socid != $this->socid) @@ -984,10 +1009,11 @@ class Commande extends CommonOrder // Clear fields $this->user_author_id = $user->id; $this->user_valid = ''; + $this->date = dol_now(); $this->date_creation = ''; $this->date_validation = ''; $this->ref_client = ''; - + // Create clone $result=$this->create($user); if ($result < 0) $error++; @@ -1039,7 +1065,7 @@ class Commande extends CommonOrder $error=0; - + $this->date_commande = dol_now(); $this->source = 0; @@ -1093,6 +1119,7 @@ class Commande extends CommonOrder $this->demand_reason_id = $object->demand_reason_id; $this->date_livraison = $object->date_livraison; $this->shipping_method_id = $object->shipping_method_id; + $this->warehouse_id = $object->warehouse_id; $this->fk_delivery_address = $object->fk_delivery_address; $this->contact_id = $object->contactid; $this->ref_client = $object->ref_client; @@ -1157,7 +1184,7 @@ class Commande extends CommonOrder * @param float $txtva Taux de tva force, sinon -1 * @param float $txlocaltax1 Local tax 1 rate * @param float $txlocaltax2 Local tax 2 rate - * @param int $fk_product Id du produit/service predefini + * @param int $fk_product Id of product * @param float $remise_percent Pourcentage de remise de la ligne * @param int $info_bits Bits de type de lignes * @param int $fk_remise_except Id remise @@ -1165,15 +1192,17 @@ class Commande extends CommonOrder * @param float $pu_ttc Prix unitaire TTC * @param int $date_start Start date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html) * @param int $date_end End date of the line - Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html) - * @param int $type Type of line (0=product, 1=service) + * @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used. * @param int $rang Position of line * @param int $special_code Special code (also used by externals modules!) * @param int $fk_parent_line Parent line * @param int $fk_fournprice Id supplier price * @param int $pa_ht Buying price (without tax) * @param string $label Label - * @param array $array_options extrafields array + * @param array $array_options extrafields array. Example array('options_codeforfield1'=>'valueforfield1', 'options_codeforfield2'=>'valueforfield2', ...) * @param string $fk_unit Code of the unit to use. Null to use the default one + * @param string $origin 'order', ... + * @param int $origin_id Id of origin object * @return int >0 if OK, <0 if KO * * @see add_product @@ -1183,11 +1212,11 @@ class Commande extends CommonOrder * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,produit) * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue) */ - function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $info_bits=0, $fk_remise_except=0, $price_base_type='HT', $pu_ttc=0, $date_start='', $date_end='', $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='',$array_options=0, $fk_unit=null) + function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $info_bits=0, $fk_remise_except=0, $price_base_type='HT', $pu_ttc=0, $date_start='', $date_end='', $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='',$array_options=0, $fk_unit=null, $origin='', $origin_id=0) { global $mysoc, $conf, $langs; - dol_syslog(get_class($this)."::addline commandeid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_percent=$remise_percent, info_bits=$info_bits, fk_remise_except=$fk_remise_except, price_base_type=$price_base_type, pu_ttc=$pu_ttc, date_start=$date_start, date_end=$date_end, type=$type, fk_unit=$fk_unit", LOG_DEBUG); + dol_syslog(get_class($this)."::addline commandeid=$this->id, desc=$desc, pu_ht=$pu_ht, qty=$qty, txtva=$txtva, fk_product=$fk_product, remise_percent=$remise_percent, info_bits=$info_bits, fk_remise_except=$fk_remise_except, price_base_type=$price_base_type, pu_ttc=$pu_ttc, date_start=$date_start, date_end=$date_end, type=$type special_code=$special_code, fk_unit=$fk_unit", LOG_DEBUG); include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; @@ -1227,29 +1256,7 @@ class Commande extends CommonOrder { $this->db->begin(); - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - - $localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty,$mysoc); - - $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type,'', $localtaxes_type); - $total_ht = $tabprice[0]; - $total_tva = $tabprice[1]; - $total_ttc = $tabprice[2]; - $total_localtax1 = $tabprice[9]; - $total_localtax2 = $tabprice[10]; - - // Rang to use - $rangtouse = $rang; - if ($rangtouse == -1) - { - $rangmax = $this->line_max($fk_parent_line); - $rangtouse = $rangmax + 1; - } - - $product_type=$type; + $product_type=$type; if (!empty($fk_product)) { $product=new Product($this->db); @@ -1264,6 +1271,33 @@ class Commande extends CommonOrder return self::STOCK_NOT_ENOUGH_FOR_ORDER; } } + // Calcul du total TTC et de la TVA pour la ligne a partir de + // qty, pu, remise_percent et txtva + // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker + // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + + $localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty,$mysoc); + $txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate. + + $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $mysoc, $localtaxes_type, 100, $this->multicurrency_tx); + $total_ht = $tabprice[0]; + $total_tva = $tabprice[1]; + $total_ttc = $tabprice[2]; + $total_localtax1 = $tabprice[9]; + $total_localtax2 = $tabprice[10]; + + // MultiCurrency + $multicurrency_total_ht = $tabprice[16]; + $multicurrency_total_tva = $tabprice[17]; + $multicurrency_total_ttc = $tabprice[18]; + + // Rang to use + $rangtouse = $rang; + if ($rangtouse == -1) + { + $rangmax = $this->line_max($fk_parent_line); + $rangtouse = $rangmax + 1; + } // TODO A virer // Anciens indicateurs: $price, $remise (a ne plus utiliser) @@ -1303,24 +1337,25 @@ class Commande extends CommonOrder $this->line->total_ttc=$total_ttc; $this->line->product_type=$type; $this->line->special_code=$special_code; + $this->line->origin=$origin; + $this->line->origin_id=$origin_id; $this->line->fk_parent_line=$fk_parent_line; $this->line->fk_unit=$fk_unit; $this->line->date_start=$date_start; $this->line->date_end=$date_end; - // infos marge - if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) { - // by external module, take lowest buying price - include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; - $productFournisseur = new ProductFournisseur($this->db); - $productFournisseur->find_min_price_product_fournisseur($fk_product); - $this->line->fk_fournprice = $productFournisseur->product_fourn_price_id; - } else { - $this->line->fk_fournprice = $fk_fournprice; - } + $this->line->fk_fournprice = $fk_fournprice; $this->line->pa_ht = $pa_ht; + // Multicurrency + $this->line->fk_multicurrency = $this->fk_multicurrency; + $this->line->multicurrency_code = $this->multicurrency_code; + $this->line->multicurrency_subprice = price2num($pu_ht * $this->multicurrency_tx); + $this->line->multicurrency_total_ht = $multicurrency_total_ht; + $this->line->multicurrency_total_tva = $multicurrency_total_tva; + $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; + // TODO Ne plus utiliser $this->line->price=$price; $this->line->remise=$remise; @@ -1463,13 +1498,15 @@ class Commande extends CommonOrder $sql.= ', c.date_commande'; $sql.= ', c.date_livraison'; $sql.= ', c.fk_shipping_method'; + $sql.= ', c.fk_warehouse'; $sql.= ', c.fk_projet, c.remise_percent, c.remise, c.remise_absolue, c.source, c.facture as billed'; $sql.= ', c.note_private, c.note_public, c.ref_client, c.ref_ext, c.ref_int, c.model_pdf, c.fk_delivery_address, c.extraparams'; $sql.= ', c.fk_incoterms, c.location_incoterms'; + $sql.= ", c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc"; $sql.= ", i.libelle as libelle_incoterms"; $sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle'; $sql.= ', cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc'; - $sql.= ', ca.code as availability_code'; + $sql.= ', ca.code as availability_code, ca.label as availability_label'; $sql.= ', dr.code as demand_reason_code'; $sql.= ' FROM '.MAIN_DB_PREFIX.'commande as c'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as cr ON (c.fk_cond_reglement = cr.rowid)'; @@ -1526,10 +1563,12 @@ class Commande extends CommonOrder $this->fk_account = $obj->fk_account; $this->availability_id = $obj->fk_availability; $this->availability_code = $obj->availability_code; + $this->availability = $obj->availability_label; $this->demand_reason_id = $obj->fk_input_reason; $this->demand_reason_code = $obj->demand_reason_code; $this->date_livraison = $this->db->jdate($obj->date_livraison); $this->shipping_method_id = ($obj->fk_shipping_method>0)?$obj->fk_shipping_method:null; + $this->warehouse_id = ($obj->fk_warehouse>0)?$obj->fk_warehouse:null; $this->fk_delivery_address = $obj->fk_delivery_address; //Incoterms @@ -1537,6 +1576,14 @@ class Commande extends CommonOrder $this->location_incoterms = $obj->location_incoterms; $this->libelle_incoterms = $obj->libelle_incoterms; + // Multicurrency + $this->fk_multicurrency = $obj->fk_multicurrency; + $this->multicurrency_code = $obj->multicurrency_code; + $this->multicurrency_tx = $obj->multicurrency_tx; + $this->multicurrency_total_ht = $obj->multicurrency_total_ht; + $this->multicurrency_total_tva = $obj->multicurrency_total_tva; + $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; + $this->extraparams = (array) json_decode($obj->extraparams, true); $this->lines = array(); @@ -1666,6 +1713,7 @@ class Commande extends CommonOrder $sql.= ' l.localtax1_tx, l.localtax2_tx, l.fk_remise_except, l.remise_percent, l.subprice, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht, l.rang, l.info_bits, l.special_code,'; $sql.= ' l.total_ht, l.total_ttc, l.total_tva, l.total_localtax1, l.total_localtax2, l.date_start, l.date_end,'; $sql.= ' l.fk_unit,'; + $sql.= ' l.fk_multicurrency, l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc,'; $sql.= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label'; $sql.= ' FROM '.MAIN_DB_PREFIX.'commandedet as l'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON (p.rowid = l.fk_product)'; @@ -1728,6 +1776,14 @@ class Commande extends CommonOrder $line->date_start = $this->db->jdate($objp->date_start); $line->date_end = $this->db->jdate($objp->date_end); + // Multicurrency + $line->fk_multicurrency = $objp->fk_multicurrency; + $line->multicurrency_code = $objp->multicurrency_code; + $line->multicurrency_subprice = $objp->multicurrency_subprice; + $line->multicurrency_total_ht = $objp->multicurrency_total_ht; + $line->multicurrency_total_tva = $objp->multicurrency_total_tva; + $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; + $this->lines[$i] = $line; $i++; @@ -2358,6 +2414,7 @@ class Commande extends CommonOrder function classifyBilled() { global $conf, $user, $langs; + $error = 0; $this->db->begin(); @@ -2475,14 +2532,20 @@ class Commande extends CommonOrder // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. $localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty, $mysoc); - - $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type); + $txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate. + + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, 100, $this->multicurrency_tx); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; $total_ttc = $tabprice[2]; $total_localtax1 = $tabprice[9]; $total_localtax2 = $tabprice[10]; + // MultiCurrency + $multicurrency_total_ht = $tabprice[16]; + $multicurrency_total_tva = $tabprice[17]; + $multicurrency_total_ttc = $tabprice[18]; + // Anciens indicateurs: $price, $subprice, $remise (a ne plus utiliser) $price = $pu; $subprice = $pu; @@ -2535,18 +2598,15 @@ class Commande extends CommonOrder $this->line->skip_update_total=$skip_update_total; $this->line->fk_unit=$fk_unit; - // infos marge - if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) { - //by external module, take lowest buying price - include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; - $productFournisseur = new ProductFournisseur($this->db); - $productFournisseur->find_min_price_product_fournisseur($fk_product); - $this->line->fk_fournprice = $productFournisseur->product_fourn_price_id; - } else { - $this->line->fk_fournprice = $fk_fournprice; - } + $this->line->fk_fournprice = $fk_fournprice; $this->line->pa_ht = $pa_ht; + // Multicurrency + $this->line->multicurrency_subprice = price2num($subprice * $this->multicurrency_tx); + $this->line->multicurrency_total_ht = $multicurrency_total_ht; + $this->line->multicurrency_total_tva = $multicurrency_total_tva; + $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; + // TODO deprecated $this->line->price=$price; $this->line->remise=$remise; @@ -2681,6 +2741,7 @@ class Commande extends CommonOrder global $hookmanager, $conf; $action='create'; + $error = 0; // Actions on extra fields (by external module or standard code) // TODO le hook fait double emploi avec le trigger !! @@ -2832,11 +2893,11 @@ class Commande extends CommonOrder */ function load_board($user) { - global $conf, $user, $langs; + global $conf, $langs; $clause = " WHERE"; - $sql = "SELECT c.rowid, c.date_creation as datec, c.date_livraison as delivery_date, c.fk_statut"; + $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.date_livraison as delivery_date, c.fk_statut"; $sql.= " FROM ".MAIN_DB_PREFIX."commande as c"; if (!$user->rights->societe->client->voir && !$user->societe_id) { @@ -2852,21 +2913,22 @@ class Commande extends CommonOrder $resql=$this->db->query($sql); if ($resql) { - $now=dol_now(); - $response = new WorkboardResponse(); $response->warning_delay=$conf->commande->client->warning_delay/60/60/24; $response->label=$langs->trans("OrdersToProcess"); $response->url=DOL_URL_ROOT.'/commande/list.php?viewstatut=-3'; $response->img=img_object($langs->trans("Orders"),"order"); + $generic_commande = new Commande($this->db); + while ($obj=$this->db->fetch_object($resql)) { - $response->nbtodo++; + $response->nbtodo++; - $date_to_test = empty($obj->delivery_date) ? $obj->datec : $obj->delivery_date; + $generic_commande->statut = $obj->fk_statut; + $generic_commande->date_livraison = $obj->delivery_date; - if ($obj->fk_statut != 3 && $this->db->jdate($date_to_test) < ($now - $conf->commande->client->warning_delay)) { + if ($generic_commande->hasDelay()) { $response->nbtodolate++; } } @@ -2903,74 +2965,86 @@ class Commande extends CommonOrder */ function getLibStatut($mode) { - return $this->LibStatut($this->statut,$this->facturee,$mode); + if ($this->facturee && empty($this->billed)) $this->billed=$this->facturee; // For backward compatibility + return $this->LibStatut($this->statut,$this->billed,$mode); } /** * Return label of status * - * @param int $statut Id statut - * @param int $billed If invoiced - * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto - * @return string Label of status + * @param int $statut Id statut + * @param int $billed If invoiced + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * @param int $donotshowbilled Do not show billed status after order status + * @return string Label of status */ - function LibStatut($statut,$billed,$mode) + function LibStatut($statut,$billed,$mode,$donotshowbilled=0) { - global $langs; + global $langs, $conf; + + $billedtext = ''; + if (empty($donotshowbilled)) $billedtext .= ($billed?' - '.$langs->trans("Billed"):''); + //print 'x'.$statut.'-'.$billed; if ($mode == 0) { if ($statut==self::STATUS_CANCELED) return $langs->trans('StatusOrderCanceled'); if ($statut==self::STATUS_DRAFT) return $langs->trans('StatusOrderDraft'); - if ($statut==self::STATUS_VALIDATED) return $langs->trans('StatusOrderValidated'); - if ($statut==self::STATUS_ACCEPTED) return $langs->trans('StatusOrderSentShort'); + if ($statut==self::STATUS_VALIDATED) return $langs->trans('StatusOrderValidated').$billedtext; + if ($statut==self::STATUS_ACCEPTED) return $langs->trans('StatusOrderSentShort').$billedtext; if ($statut==self::STATUS_CLOSED && (! $billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return $langs->trans('StatusOrderToBill'); - if ($statut==self::STATUS_CLOSED && ($billed || ! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return $langs->trans('StatusOrderProcessed'); + if ($statut==self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return $langs->trans('StatusOrderProcessed').$billedtext; + if ($statut==self::STATUS_CLOSED && (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return $langs->trans('StatusOrderProcessed'); } elseif ($mode == 1) { if ($statut==self::STATUS_CANCELED) return $langs->trans('StatusOrderCanceledShort'); if ($statut==self::STATUS_DRAFT) return $langs->trans('StatusOrderDraftShort'); - if ($statut==self::STATUS_VALIDATED) return $langs->trans('StatusOrderValidatedShort'); - if ($statut==self::STATUS_ACCEPTED) return $langs->trans('StatusOrderSentShort'); + if ($statut==self::STATUS_VALIDATED) return $langs->trans('StatusOrderValidatedShort').$billedtext; + if ($statut==self::STATUS_ACCEPTED) return $langs->trans('StatusOrderSentShort').$billedtext; if ($statut==self::STATUS_CLOSED && (! $billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return $langs->trans('StatusOrderToBillShort'); - if ($statut==self::STATUS_CLOSED && ($billed || ! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return $langs->trans('StatusOrderProcessed'); + if ($statut==self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return $langs->trans('StatusOrderProcessed').$billedtext; + if ($statut==self::STATUS_CLOSED && (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return $langs->trans('StatusOrderProcessed'); } elseif ($mode == 2) { if ($statut==self::STATUS_CANCELED) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceledShort'); if ($statut==self::STATUS_DRAFT) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraftShort'); - if ($statut==self::STATUS_VALIDATED) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidatedShort'); - if ($statut==self::STATUS_ACCEPTED) return img_picto($langs->trans('StatusOrderSent'),'statut3').' '.$langs->trans('StatusOrderSentShort'); + if ($statut==self::STATUS_VALIDATED) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidatedShort').$billedtext; + if ($statut==self::STATUS_ACCEPTED) return img_picto($langs->trans('StatusOrderSent'),'statut3').' '.$langs->trans('StatusOrderSentShort').$billedtext; if ($statut==self::STATUS_CLOSED && (! $billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBillShort'); - if ($statut==self::STATUS_CLOSED && ($billed || ! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessedShort'); + if ($statut==self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return img_picto($langs->trans('StatusOrderProcessed').$billedtext,'statut6').' '.$langs->trans('StatusOrderProcessed').$billedtext; + if ($statut==self::STATUS_CLOSED && (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessedShort'); } elseif ($mode == 3) { if ($statut==self::STATUS_CANCELED) return img_picto($langs->trans('StatusOrderCanceled'),'statut5'); if ($statut==self::STATUS_DRAFT) return img_picto($langs->trans('StatusOrderDraft'),'statut0'); - if ($statut==self::STATUS_VALIDATED) return img_picto($langs->trans('StatusOrderValidated'),'statut1'); - if ($statut==self::STATUS_ACCEPTED) return img_picto($langs->trans('StatusOrderSentShort'),'statut3'); + if ($statut==self::STATUS_VALIDATED) return img_picto($langs->trans('StatusOrderValidated').$billedtext,'statut1'); + if ($statut==self::STATUS_ACCEPTED) return img_picto($langs->trans('StatusOrderSentShort').$billedtext,'statut3'); if ($statut==self::STATUS_CLOSED && (! $billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return img_picto($langs->trans('StatusOrderToBill'),'statut7'); - if ($statut==self::STATUS_CLOSED && ($billed || ! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return img_picto($langs->trans('StatusOrderProcessed'),'statut6'); + if ($statut==self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return img_picto($langs->trans('StatusOrderProcessed').$billedtext,'statut6'); + if ($statut==self::STATUS_CLOSED && (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return img_picto($langs->trans('StatusOrderProcessed'),'statut6'); } elseif ($mode == 4) { if ($statut==self::STATUS_CANCELED) return img_picto($langs->trans('StatusOrderCanceled'),'statut5').' '.$langs->trans('StatusOrderCanceled'); if ($statut==self::STATUS_DRAFT) return img_picto($langs->trans('StatusOrderDraft'),'statut0').' '.$langs->trans('StatusOrderDraft'); - if ($statut==self::STATUS_VALIDATED) return img_picto($langs->trans('StatusOrderValidated'),'statut1').' '.$langs->trans('StatusOrderValidated'); - if ($statut==self::STATUS_ACCEPTED) return img_picto($langs->trans('StatusOrderSentShort'),'statut3').' '.$langs->trans('StatusOrderSent'); + if ($statut==self::STATUS_VALIDATED) return img_picto($langs->trans('StatusOrderValidated').$billedtext,'statut1').' '.$langs->trans('StatusOrderValidated').$billedtext; + if ($statut==self::STATUS_ACCEPTED) return img_picto($langs->trans('StatusOrderSentShort').$billedtext,'statut3').' '.$langs->trans('StatusOrderSent').$billedtext; if ($statut==self::STATUS_CLOSED && (! $billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return img_picto($langs->trans('StatusOrderToBill'),'statut7').' '.$langs->trans('StatusOrderToBill'); - if ($statut==self::STATUS_CLOSED && ($billed || ! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessed'); + if ($statut==self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return img_picto($langs->trans('StatusOrderToBill').$billedtext,'statut6').' '.$langs->trans('StatusOrderToBill').$billedtext; + if ($statut==self::STATUS_CLOSED && (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return img_picto($langs->trans('StatusOrderProcessed'),'statut6').' '.$langs->trans('StatusOrderProcessed'); } elseif ($mode == 5) { if ($statut==self::STATUS_CANCELED) return ''.$langs->trans('StatusOrderCanceledShort').' '.img_picto($langs->trans('StatusOrderCanceled'),'statut5'); if ($statut==self::STATUS_DRAFT) return ''.$langs->trans('StatusOrderDraftShort').' '.img_picto($langs->trans('StatusOrderDraft'),'statut0'); - if ($statut==self::STATUS_VALIDATED) return ''.$langs->trans('StatusOrderValidatedShort').' '.img_picto($langs->trans('StatusOrderValidated'),'statut1'); - if ($statut==self::STATUS_ACCEPTED) return ''.$langs->trans('StatusOrderSentShort').' '.img_picto($langs->trans('StatusOrderSent'),'statut3'); + if ($statut==self::STATUS_VALIDATED) return ''.$langs->trans('StatusOrderValidatedShort').$billedtext.' '.img_picto($langs->trans('StatusOrderValidated').$billedtext,'statut1'); + if ($statut==self::STATUS_ACCEPTED) return ''.$langs->trans('StatusOrderSentShort').$billedtext.' '.img_picto($langs->trans('StatusOrderSent').$billedtext,'statut3'); if ($statut==self::STATUS_CLOSED && (! $billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return ''.$langs->trans('StatusOrderToBillShort').' '.img_picto($langs->trans('StatusOrderToBill'),'statut7'); - if ($statut==self::STATUS_CLOSED && ($billed || ! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return ''.$langs->trans('StatusOrderProcessedShort').' '.img_picto($langs->trans('StatusOrderProcessed'),'statut6'); + if ($statut==self::STATUS_CLOSED && ($billed && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return ''.$langs->trans('StatusOrderToBillShort').$billedtext.' '.img_picto($langs->trans('StatusOrderToBill').$billedtext,'statut6'); + if ($statut==self::STATUS_CLOSED && (! empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) return ''.$langs->trans('StatusOrderProcessedShort').' '.img_picto($langs->trans('StatusOrderProcessed'),'statut6'); } } @@ -3004,7 +3078,7 @@ class Commande extends CommonOrder if (! empty($this->total_ht)) $label.= '
' . $langs->trans('AmountHT') . ': ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); if (! empty($this->total_tva)) - $label.= '
' . $langs->trans('TVA') . ': ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); + $label.= '
' . $langs->trans('VAT') . ': ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); if (! empty($this->total_ttc)) $label.= '
' . $langs->trans('AmountTTC') . ': ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); @@ -3215,6 +3289,7 @@ class Commande extends CommonOrder $sql.= ' l.total_ht, l.total_tva, l.total_ttc, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht, l.localtax1_tx, l.localtax2_tx,'; $sql.= ' l.date_start, l.date_end,'; $sql.= ' l.fk_unit,'; + $sql.= ' l.fk_multicurrency, l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc,'; $sql.= ' p.label as product_label, p.ref, p.fk_product_type, p.rowid as prodid, '; $sql.= ' p.description as product_desc, p.stock as stock_reel,'; $sql.= ' p.entity'; @@ -3265,7 +3340,15 @@ class Commande extends CommonOrder $this->lines[$i]->marge_tx = $marginInfos[1]; $this->lines[$i]->marque_tx = $marginInfos[2]; $this->lines[$i]->fk_unit = $obj->fk_unit; - + + // Multicurrency + $this->lines[$i]->fk_multicurrency = $obj->fk_multicurrency; + $this->lines[$i]->multicurrency_code = $obj->multicurrency_code; + $this->lines[$i]->multicurrency_subprice = $obj->multicurrency_subprice; + $this->lines[$i]->multicurrency_total_ht = $obj->multicurrency_total_ht; + $this->lines[$i]->multicurrency_total_tva = $obj->multicurrency_total_tva; + $this->lines[$i]->multicurrency_total_ttc = $obj->multicurrency_total_ttc; + $i++; } @@ -3331,11 +3414,29 @@ class Commande extends CommonOrder return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); } + + /** + * Is the customer order delayed? + * + * @return bool true if late, false if not + */ + public function hasDelay() + { + global $conf; + + if (! ($this->statut > Commande::STATUS_DRAFT && $this->statut < Commande::STATUS_CLOSED)) { + return false; // Never late if not inside this status range + } + + $now = dol_now(); + + return max($this->date_commande, $this->date_livraison) < ($now - $conf->commande->client->warning_delay); + } } /** - * Class to mange order lines + * Class to manage order lines */ class OrderLine extends CommonOrderLine { @@ -3538,6 +3639,8 @@ class OrderLine extends CommonOrderLine $error=0; + $pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'. + dol_syslog(get_class($this)."::insert rang=".$this->rang); // Clean parameters @@ -3554,13 +3657,19 @@ class OrderLine extends CommonOrderLine if (empty($this->info_bits)) $this->info_bits=0; if (empty($this->special_code)) $this->special_code=0; if (empty($this->fk_parent_line)) $this->fk_parent_line=0; - if (empty($this->pa_ht)) $this->pa_ht=0; - // si prix d'achat non renseigne et utilise pour calcul des marges alors prix achat = prix vente - if ($this->pa_ht == 0) { - if ($this->subprice > 0 && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) - $this->pa_ht = $this->subprice * (1 - $this->remise_percent / 100); + // if buy price not defined, define buyprice as configured in margin admin + if ($this->pa_ht == 0 && $pa_ht_isemptystring) + { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) + { + return $result; + } + else + { + $this->pa_ht = $result; + } } // Check parameters @@ -3575,7 +3684,9 @@ class OrderLine extends CommonOrderLine $sql.= ' fk_product, product_type, remise_percent, subprice, price, remise, fk_remise_except,'; $sql.= ' special_code, rang, fk_product_fournisseur_price, buy_price_ht,'; $sql.= ' info_bits, total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, date_start, date_end,'; - $sql.= ' fk_unit)'; + $sql.= ' fk_unit'; + $sql.= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc'; + $sql.= ')'; $sql.= " VALUES (".$this->fk_commande.","; $sql.= " ".($this->fk_parent_line>0?"'".$this->fk_parent_line."'":"null").","; $sql.= " ".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null").","; @@ -3606,6 +3717,12 @@ class OrderLine extends CommonOrderLine $sql.= " ".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null").','; $sql.= " ".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null").','; $sql.= ' '.(!$this->fk_unit ? 'NULL' : $this->fk_unit); + $sql.= ", ".$this->fk_multicurrency; + $sql.= ", '".$this->db->escape($this->multicurrency_code)."'"; + $sql.= ", ".$this->multicurrency_subprice; + $sql.= ", ".$this->multicurrency_total_ht; + $sql.= ", ".$this->multicurrency_total_tva; + $sql.= ", ".$this->multicurrency_total_ttc; $sql.= ')'; dol_syslog(get_class($this)."::insert", LOG_DEBUG); @@ -3665,6 +3782,8 @@ class OrderLine extends CommonOrderLine $error=0; + $pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'. + // Clean parameters if (empty($this->tva_tx)) $this->tva_tx=0; if (empty($this->localtax1_tx)) $this->localtax1_tx=0; @@ -3684,10 +3803,17 @@ class OrderLine extends CommonOrderLine if (empty($this->fk_parent_line)) $this->fk_parent_line=0; if (empty($this->pa_ht)) $this->pa_ht=0; - // si prix d'achat non renseigné et utilisé pour calcul des marges alors prix achat = prix vente - if ($this->pa_ht == 0) { - if ($this->subprice > 0 && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) - $this->pa_ht = $this->subprice * (1 - $this->remise_percent / 100); + // if buy price not defined, define buyprice as configured in margin admin + if ($this->pa_ht == 0 && $pa_ht_isemptystring) + { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) + { + return $result; + } + else + { + $this->pa_ht = $result; + } } $this->db->begin(); @@ -3724,6 +3850,13 @@ class OrderLine extends CommonOrderLine $sql.= " , fk_parent_line=".(! empty($this->fk_parent_line)?$this->fk_parent_line:"null"); if (! empty($this->rang)) $sql.= ", rang=".$this->rang; $sql.= " , fk_unit=".(!$this->fk_unit ? 'NULL' : $this->fk_unit); + + // Multicurrency + $sql.= " , multicurrency_subprice=".price2num($this->multicurrency_subprice).""; + $sql.= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht).""; + $sql.= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva).""; + $sql.= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc).""; + $sql.= " WHERE rowid = ".$this->rowid; dol_syslog(get_class($this)."::update", LOG_DEBUG); diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index 6a322e8681e..c72e040e61c 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Patrick Rouillon * Copyright (C) 2005-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011-2012 Philippe Grand + * Copyright (C) 2011-2015 Philippe Grand * * 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 @@ -69,11 +69,11 @@ if ($action == 'addcontact' && $user->rights->commande->creer) if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - setEventMessage($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), 'errors'); + setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 5baa7b7c30f..0aa828dc77a 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -26,11 +26,13 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php'; +require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; require_once DOL_DOCUMENT_ROOT .'/commande/class/commande.class.php'; if (!$user->rights->commande->lire) accessforbidden(); $langs->load("orders"); +$langs->load("bills"); // Security check $socid=GETPOST('socid','int'); @@ -47,13 +49,14 @@ if ($user->societe_id > 0) */ $commandestatic=new Commande($db); +$companystatic=new Societe($db); $form = new Form($db); $formfile = new FormFile($db); $help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes"; llxHeader("",$langs->trans("Orders"),$help_url); -print_fiche_titre($langs->trans("OrdersArea")); +print load_fiche_titre($langs->trans("OrdersArea")); //print '
'; @@ -2011,7 +2184,7 @@ if ($action == 'create' && $user->rights->commande->creer) print '
'; - $object->displayMarginInfos(); + $formmargin->displayMarginInfos($object); print '
' . $langs->trans('AmountTTC') . '' . price($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency) . '
' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . $langs->trans('Status') . '' . $object->getLibStatut(4) . '
'; //print '"; print '"; - print ''; + print $commandestatic->getNomUrl(1); + print ""; + print ''; $i++; } } @@ -216,6 +233,9 @@ $max=5; $sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, c.date_cloture as datec, c.tms as datem,"; $sql.= " s.nom as name, s.rowid as socid"; +$sql.= ", s.client"; +$sql.= ", s.code_client"; +$sql.= ", s.canvas"; $sql.= " FROM ".MAIN_DB_PREFIX."commande as c,"; $sql.= " ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -250,6 +270,12 @@ if ($resql) $commandestatic->id=$obj->rowid; $commandestatic->ref=$obj->ref; + $companystatic->id=$obj->socid; + $companystatic->name=$obj->name; + $companystatic->client=$obj->client; + $companystatic->code_client=$obj->code_client; + $companystatic->canvas=$obj->canvas; + print '
'; @@ -65,11 +68,9 @@ $var=false; print ''; print ''; print ''; -print ''; +print ''; print ''; -print ''; -print ''; +print $langs->trans("CustomerOrder").':'; print "
'.$langs->trans("SearchOrder").'
'.$langs->trans("Search").'
'; -print $langs->trans("Ref").':
'.$langs->trans("Other").':

\n"; @@ -167,6 +168,9 @@ else if (! empty($conf->commande->enabled)) { $sql = "SELECT c.rowid, c.ref, s.nom as name, s.rowid as socid"; + $sql.= ", s.client"; + $sql.= ", s.code_client"; + $sql.= ", s.canvas"; $sql.= " FROM ".MAIN_DB_PREFIX."commande as c"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -192,10 +196,23 @@ if (! empty($conf->commande->enabled)) { $var=!$var; $obj = $db->fetch_object($resql); + + $commandestatic->id=$obj->rowid; + $commandestatic->ref=$obj->ref; + + $companystatic->id=$obj->socid; + $companystatic->name=$obj->name; + $companystatic->client=$obj->client; + $companystatic->code_client=$obj->code_client; + $companystatic->canvas=$obj->canvas; + print "
'; - print "rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref."'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,24).'
'; + print $companystatic->getNomUrl(1,'company',16); + print '
'; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -286,6 +314,9 @@ else dol_print_error($db); if (! empty($conf->commande->enabled)) { $sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom as name, s.rowid as socid"; + $sql.= ", s.client"; + $sql.= ", s.code_client"; + $sql.= ", s.canvas"; $sql.=" FROM ".MAIN_DB_PREFIX."commande as c"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -319,6 +350,12 @@ if (! empty($conf->commande->enabled)) $commandestatic->id=$obj->rowid; $commandestatic->ref=$obj->ref; + $companystatic->id=$obj->socid; + $companystatic->name=$obj->name; + $companystatic->client=$obj->client; + $companystatic->code_client=$obj->code_client; + $companystatic->canvas=$obj->canvas; + print '
'; print $commandestatic->getNomUrl(1); @@ -268,7 +294,9 @@ if ($resql) print ''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.''; + print $companystatic->getNomUrl(1,'company',16); + print ''.dol_print_date($db->jdate($obj->datem),'day').''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'
'; print ''; - print ''; + print ''; print ''; @@ -357,6 +396,9 @@ if (! empty($conf->commande->enabled)) if (! empty($conf->commande->enabled)) { $sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom as name, s.rowid as socid"; + $sql.= ", s.client"; + $sql.= ", s.code_client"; + $sql.= ", s.canvas"; $sql.= " FROM ".MAIN_DB_PREFIX."commande as c"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -390,6 +432,12 @@ if (! empty($conf->commande->enabled)) $commandestatic->id=$obj->rowid; $commandestatic->ref=$obj->ref; + $companystatic->id=$obj->socid; + $companystatic->name=$obj->name; + $companystatic->client=$obj->client; + $companystatic->code_client=$obj->code_client; + $companystatic->canvas=$obj->canvas; + print '
'; print $commandestatic->getNomUrl(1); @@ -337,7 +374,9 @@ if (! empty($conf->commande->enabled)) print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,24).''; + print $companystatic->getNomUrl(1,'company',24); + print ''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'
'; print ''; - print ''; + print ''; print ''; diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index bae932857fe..ae0dd789064 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -62,7 +62,5 @@ print '
'; print $commandestatic->getNomUrl(1); @@ -408,7 +456,9 @@ if (! empty($conf->commande->enabled)) print ''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.''; + print $companystatic->getNomUrl(1,'company'); + print ''.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,5).'
'; print ''; - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index db11df409f6..ce6df0524c4 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -8,7 +8,7 @@ * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2015 Frederic France * Copyright (C) 2015 Marcos García - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -41,6 +41,7 @@ require_once DOL_DOCUMENT_ROOT .'/product/class/product.class.php'; $langs->load('orders'); $langs->load('deliveries'); $langs->load('companies'); +$langs->load('compta'); $orderyear=GETPOST("orderyear","int"); $ordermonth=GETPOST("ordermonth","int"); @@ -55,27 +56,60 @@ $socid=GETPOST('socid','int'); $search_user=GETPOST('search_user','int'); $search_sale=GETPOST('search_sale','int'); $search_total_ht=GETPOST('search_total_ht','alpha'); +$optioncss = GETPOST('optioncss','alpha'); +$billed = GETPOST('billed','int'); // Security check $id = (GETPOST('orderid')?GETPOST('orderid'):GETPOST('id','int')); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'commande', $id,''); +$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (! $sortfield) $sortfield='c.rowid'; +if (! $sortfield) $sortfield='c.ref'; if (! $sortorder) $sortorder='DESC'; -$limit = $conf->liste_limit; $viewstatut=GETPOST('viewstatut'); +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('orderlist')); + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'c.ref'=>'Ref', + 'c.ref_client'=>'RefCustomerOrder', + 'pd.description'=>'Description', + 's.nom'=>"ThirdParty", + 'c.note_public'=>'NotePublic', +); +if (empty($user->socid)) $fieldstosearchall["c.note_private"]="NotePrivate"; + +$arrayfields=array( +); +// Extra fields +/* + if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) + { + foreach($extrafields->attribute_label as $key => $val) + { + $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]); + } + } + */ + + +/* + * Actions + */ + // Purge search criteria -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_user=''; @@ -89,15 +123,10 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $ordermonth=''; $deliverymonth=''; $deliveryyear=''; + $viewstatut=''; + $billed=''; } -// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array -$hookmanager->initHooks(array('orderlist')); - -/* - * Actions - */ - $parameters=array('socid'=>$socid); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); @@ -120,7 +149,7 @@ llxHeader('',$langs->trans("Orders"),$help_url); $sql = 'SELECT'; if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT'; $sql.= ' s.nom as name, s.rowid as socid, s.client, s.code_client, c.rowid, c.ref, c.total_ht, c.tva as total_tva, c.total_ttc, c.ref_client,'; -$sql.= ' c.date_valid, c.date_commande, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as facturee'; +$sql.= ' c.date_valid, c.date_commande, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed'; $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql.= ', '.MAIN_DB_PREFIX.'commande as c'; if ($sall || $search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'commandedet as pd ON c.rowid=pd.fk_commande'; @@ -138,7 +167,8 @@ if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$search_produc if ($socid > 0) $sql.= ' AND s.rowid = '.$socid; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($search_ref) $sql .= natural_search('c.ref', $search_ref); -if ($sall) $sql .= natural_search(array('c.ref', 'c.note_private'), $sall); +if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); +if ($billed != '' && $billed >= 0) $sql.=' AND c.facture = '.$billed; if ($viewstatut <> '') { if ($viewstatut < 4 && $viewstatut > -3) @@ -239,7 +269,10 @@ if ($resql) if ($viewstatut == -3) $title.=' - '.$langs->trans('StatusOrderValidated').', '.(empty($conf->expedition->enabled)?'':$langs->trans("StatusOrderSent").', ').$langs->trans('StatusOrderToBill'); - $param='&socid='.$socid.'&viewstatut='.$viewstatut; + $param=''; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + if ($socid > 0) $param.='&socid='.$socid; + if ($viewstatut != '') $param.='&viewstatut='.$viewstatut; if ($ordermonth) $param.='&ordermonth='.$ordermonth; if ($orderyear) $param.='&orderyear='.$orderyear; if ($deliverymonth) $param.='&deliverymonth='.$deliverymonth; @@ -250,17 +283,27 @@ if ($resql) if ($search_user > 0) $param.='&search_user='.$search_user; if ($search_sale > 0) $param.='&search_sale='.$search_sale; if ($search_total_ht != '') $param.='&search_total_ht='.$search_total_ht; + if ($optioncss != '') $param.='&optioncss='.$optioncss; $num = $db->num_rows($resql); - print_barre_liste($title, $page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_commercial.png'); - $i = 0; - + // Lignes des champs de filtre - print '
'; + print ''; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; print ''; - print ''; - + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_commercial.png', 0, '', '', $limit); + + if ($sall) + { + foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); + print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall); + } + $moreforfilter=''; // If the user can view prospects other than his' @@ -272,8 +315,8 @@ if ($resql) $moreforfilter.=$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, 1, 'maxwidth300'); $moreforfilter.=''; } - // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) + // If the user can view other users + if ($user->rights->user->user->lire) { $moreforfilter.='
'; $moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': '; @@ -281,7 +324,7 @@ if ($resql) $moreforfilter.='
'; } // If the user can view prospects other than his' - if ($conf->categorie->enabled && $user->rights->produit->lire) + if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter.='
'; @@ -290,28 +333,31 @@ if ($resql) $moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1); $moreforfilter.='
'; } - if (! empty($moreforfilter)) - { - print '
'; - print $moreforfilter; $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; + if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint; + else $moreforfilter = $hookmanager->resPrint; + if (! empty($moreforfilter)) + { + print '
'; + print $moreforfilter; print '
'; } + print '
'; print ''; print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'c.ref','',$param,'width="25%"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('RefCustomerOrder'),$_SERVER["PHP_SELF"],'c.ref_client','',$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('ThirdParty'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('OrderDate'),$_SERVER["PHP_SELF"],'c.date_commande','',$param, 'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('DeliveryDate'),$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="center"',$sortfield,$sortorder); + if (empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)) print_liste_field_titre($langs->trans('DeliveryDate'),$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('AmountHT'),$_SERVER["PHP_SELF"],'c.total_ht','',$param, 'align="right"',$sortfield,$sortorder); $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print_liste_field_titre($langs->trans('Status'),$_SERVER["PHP_SELF"],'c.fk_statut','',$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); + print_liste_field_titre($langs->trans('Billed'),$_SERVER["PHP_SELF"],'c.facture','',$param,'align="center"',$sortfield,$sortorder,''); + print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'',$param,'',$sortfield,$sortorder,'maxwidthsearch '); print ''; print ''; @@ -328,27 +374,37 @@ if ($resql) if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; print ''; $formother->select_year($orderyear?$orderyear:-1,'orderyear',1, 20, 5); - print ''; + if (empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)) + { + print ''; + } print ''; print ''; - print '\n"; + print ''; + print ''; + print "\n"; $var=true; $total=0; $subtotal=0; $productstat_cache=array(); - + $i=0; + $generic_commande = new Commande($db); $generic_product = new Product($db); while ($i < min($num,$limit)) @@ -357,9 +413,11 @@ if ($resql) $var=!$var; print ''; print ''; - // Shippable Icon - if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && ! empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) { - $notshippable=0; - $text_info=''; - $nbprod=0; - for ($lig=0; $lig<(count($generic_commande->lines)); $lig++) { - if ($generic_commande->lines[$lig]->product_type==0) { - $nbprod++; // order contains real products - $generic_product->id = $generic_commande->lines[$lig]->fk_product; - if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product])) { - $generic_product->load_stock(); - $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_reel; - } else { - $generic_product->stock_reel = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel']; - } - // stock order and stock order_supplier - $stock_order=0; - $stock_order_supplier=0; - if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) + // Show shippable Icon (create subloop, so may be slow) + if ($conf->stock->enabled) + { + $langs->load("stocks"); + if (($objp->fk_statut > 0) && ($objp->fk_statut < 3)) + { + $notshippable=0; + $warning = 0; + $text_info=''; + $text_warning=''; + $nbprod=0; + + $numlines = count($generic_commande->lines); // Loop on each line of order + for ($lig=0; $lig < $numlines; $lig++) + { + if ($generic_commande->lines[$lig]->product_type == 0 && $generic_commande->lines[$lig]->fk_product > 0) // If line is a product and not a service { - if (! empty($conf->commande->enabled)) - { - if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'])) { - $generic_product->load_stats_commande(0,'1,2'); - $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'] = $generic_product->stats_commande['qty']; - } else { - $generic_product->stats_commande['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer']; - } - $stock_order=$generic_product->stats_commande['qty']; + $nbprod++; // order contains real products + $generic_product->id = $generic_commande->lines[$lig]->fk_product; + if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product])) { + $generic_product->load_stock(); + $generic_product->load_virtual_stock(); + $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_reel; + $productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_theorique; + } else { + $generic_product->stock_reel = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel']; + $generic_product->stock_theorique = $productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_theorique; } - if (! empty($conf->fournisseur->enabled)) + + if (empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) // Default code is when this option is not set, setting it create strange result { - if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'])) { - $generic_product->load_stats_commande_fournisseur(0,'3'); - $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'] = $generic_product->stats_commande_fournisseur['qty']; - } else { - $generic_product->stats_commande_fournisseur['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier']; + $text_info .= $generic_commande->lines[$lig]->qty.' X '.$generic_commande->lines[$lig]->ref.' '.dol_trunc($generic_commande->lines[$lig]->product_label, 25); + $text_info .= ' - '.$langs->trans("Stock").': '.$generic_product->stock_reel; + $text_info .= ' - '.$langs->trans("VirtualStock").': '.$generic_product->stock_theorique; + $text_info .= '
'; + + if ($generic_commande->lines[$lig]->qty > $generic_product->stock_reel) + { + $notshippable++; + } + } + else { // Detailed code, looks bugged + // stock order and stock order_supplier + $stock_order=0; + $stock_order_supplier=0; + if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)) // What about other options ? + { + if (! empty($conf->commande->enabled)) + { + if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'])) { + $generic_product->load_stats_commande(0,'1,2'); + $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer'] = $generic_product->stats_commande['qty']; + } else { + $generic_product->stats_commande['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_customer']; + } + $stock_order=$generic_product->stats_commande['qty']; + } + if (! empty($conf->fournisseur->enabled)) + { + if (empty($productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'])) { + $generic_product->load_stats_commande_fournisseur(0,'3'); + $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier'] = $generic_product->stats_commande_fournisseur['qty']; + } else { + $generic_product->stats_commande_fournisseur['qty'] = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stats_order_supplier']; + } + $stock_order_supplier=$generic_product->stats_commande_fournisseur['qty']; + } + } + $text_info .= $generic_commande->lines[$lig]->qty.' X '.$generic_commande->lines[$lig]->ref.' '.dol_trunc($generic_commande->lines[$lig]->product_label, 25); + $text_stock_reel = $generic_product->stock_reel.'/'.$stock_order; + if ($stock_order > $generic_product->stock_reel && ! ($generic_product->stock_reel < $generic_commande->lines[$lig]->qty)) { + $warning++; + $text_warning.=''.$langs->trans('Available').' : '.$text_stock_reel.''; + } + if ($generic_product->stock_reel < $generic_commande->lines[$lig]->qty) { + $notshippable++; + $text_info.=''.$langs->trans('Available').' : '.$text_stock_reel.''; + } else { + $text_info.=''.$langs->trans('Available').' : '.$text_stock_reel.''; + } + if (! empty($conf->fournisseur->enabled)) { + $text_info.= ' '.$langs->trans('SupplierOrder').' : '.$stock_order_supplier.'
'; + } else { + $text_info.= '
'; } - $stock_order_supplier=$generic_product->stats_commande_fournisseur['qty']; } - } - $text_info .= $generic_commande->lines[$lig]->qty.' X '.$generic_commande->lines[$lig]->ref.' '.dol_trunc($generic_commande->lines[$lig]->product_label, 25); - $text_stock_reel = $generic_product->stock_reel.'/'.$stock_order; - if ($generic_product->stock_reel<$generic_commande->lines[$lig]->qty) { - $notshippable++; - $text_info.=''.$langs->trans('Available').' : '.$text_stock_reel.''; - } else { - $text_info.=''.$langs->trans('Available').' : '.$text_stock_reel.''; - } - if ($stock_order_supplier>0) { - $text_info.= ' '.$langs->trans('SupplierOrder').' : '.$stock_order_supplier.'
'; - } else { - $text_info.= '
'; } } + if ($notshippable==0) { + $text_icon = img_picto('', 'object_sending'); + $text_info = $langs->trans('Shippable').'
'.$text_info; + } else { + $text_icon = img_picto('', 'error'); + $text_info = $langs->trans('NonShippable').'
'.$text_info; + } } - if ($notshippable==0) { - $text_icon = img_picto('', 'object_sending'); - $text_info = $langs->trans('Shippable').'
'.$text_info; - } else { - $text_icon = img_picto('', 'error'); - $text_info = $langs->trans('NonShippable').'
'.$text_info; - } - if ($nbprod>0) { - print ''; } + if ($warning) { + print $form->textwithtooltip('', $langs->trans('NotEnoughForAllOrders').'
'.$text_warning, 2, 1, img_picto('', 'error'),'',2); + } + print ''; } - // warning late icon - print ''; // Statut - print ''; + print ''; + // Billed + print ''; + print ''; print ''; @@ -523,6 +623,7 @@ if ($resql) print ''; print ''; print ''; + print ''; print ''; } diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index cb3ede38f24..aeafb1ee67b 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -6,6 +6,7 @@ * Copyright (C) 2012 Andreu Bisquerra Gaya * Copyright (C) 2012 David Rodriguez Martinez * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2015 Ferran Marcet * * 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 @@ -74,7 +75,7 @@ if ($action == 'create') if (is_array($selected) == false) { $error++; - setEventMessage($langs->trans('Error_OrderNotChecked'), 'errors'); + setEventMessages($langs->trans('Error_OrderNotChecked'), null, 'errors'); } else { @@ -179,6 +180,7 @@ if (($action == 'create' || $action == 'add') && !$error) $object->origin_id = $orders_id[$ii]; $object->linked_objects = $orders_id; $id = $object->create($user); + $object->fetch_thirdparty(); if ($id>0) { @@ -251,7 +253,7 @@ if (($action == 'create' || $action == 'add') && !$error) } else { - setEventMessage($discount->error, 'errors'); + setEventMessages($discount->error, $discount->errors, 'errors'); $error++; break; } @@ -298,7 +300,8 @@ if (($action == 'create' || $action == 'add') && !$error) $lines[$i]->rowid, $fk_parent_line, $lines[$i]->fk_fournprice, - $lines[$i]->pa_ht + $lines[$i]->pa_ht, + $lines[$i]->label ); if ($result > 0) { @@ -320,7 +323,7 @@ if (($action == 'create' || $action == 'add') && !$error) } else { - setEventMessage($objectsrc->error, 'errors'); + setEventMessages($objectsrc->error, $objectsrc->errors, 'errors'); $error++; } $ii++; @@ -328,7 +331,7 @@ if (($action == 'create' || $action == 'add') && !$error) } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $error++; } } @@ -348,7 +351,7 @@ if (($action == 'create' || $action == 'add') && !$error) $action='create'; $_GET["origin"]=$_POST["origin"]; $_GET["originid"]=$_POST["originid"]; - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $error++; } } @@ -370,7 +373,7 @@ if ($action == 'create' && !$error) $facturestatic=new Facture($db); llxHeader(); - print_fiche_titre($langs->trans('NewBill')); + print load_fiche_titre($langs->trans('NewBill')); $soc = new Societe($db); if ($socid) $res=$soc->fetch($socid); @@ -394,9 +397,9 @@ if ($action == 'create' && !$error) print ''; print ''; print ''; - + dol_fiche_head(); - + print '
'; - if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; - print ''; - $formother->select_year($deliveryyear?$deliveryyear:-1,'deliveryyear',1, 20, 5); print ''; + if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; + $formother->select_year($deliveryyear?$deliveryyear:-1,'deliveryyear',1, 20, 5); + print ''; print ''; print ''; - $liststatus=array('0'=>$langs->trans("StatusOrderDraftShort"), '1'=>$langs->trans("StatusOrderValidated"), '2'=>$langs->trans("StatusOrderSentShort"), '3'=>$langs->trans("StatusOrderToBill"), '4'=>$langs->trans("StatusOrderProcessed"), '-1'=>$langs->trans("StatusOrderCanceledShort")); + $liststatus=array('0'=>$langs->trans("StatusOrderDraftShort"), '1'=>$langs->trans("StatusOrderValidated"), '2'=>$langs->trans("StatusOrderSentShort"), '3'=>$langs->trans("StatusOrderDelivered"), '-1'=>$langs->trans("StatusOrderCanceledShort")); print $form->selectarray('viewstatut', $liststatus, $viewstatut, -4); print ''; - print ''; - print "
'; + print $form->selectyesno('billed', $billed, 1, 0, 1); + print ''; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print '
'; - $generic_commande->id=$objp->rowid; $generic_commande->ref=$objp->ref; + $generic_commande->statut = $objp->fk_statut; + $generic_commande->date_commande = $db->jdate($objp->date_commande); + $generic_commande->date_livraison = $db->jdate($objp->date_delivery); $generic_commande->ref_client = $objp->ref_client; $generic_commande->total_ht = $objp->total_ht; $generic_commande->total_tva = $objp->total_tva; @@ -372,80 +430,119 @@ if ($resql) print $generic_commande->getNomUrl(1,($viewstatut != 2?0:$objp->fk_statut)); print ''; + + print ''; + if ($nbprod) + { print $form->textwithtooltip('',$text_info,2,1,$text_icon,'',2); - print ''; - if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && max($db->jdate($objp->date_commande),$db->jdate($objp->date_delivery)) < ($now - $conf->commande->client->warning_delay)) - print img_picto($langs->trans("Late"),"warning"); + // Warning late icon + print ''; + if ($generic_commande->hasDelay()) { + print img_picto($langs->trans("Late"), "warning"); + } if(!empty($objp->note_private)) { print ' '; @@ -480,7 +577,7 @@ if ($resql) { if ($user->rights->facture->creer) { - if (($objp->fk_statut > 0 && $objp->fk_statut < 3) || ($objp->fk_statut == 3 && $objp->facturee == 0)) + if (($objp->fk_statut > 0 && $objp->fk_statut < 3) || ($objp->fk_statut == 3 && $objp->billed == 0)) { print ' '; print img_picto($langs->trans("CreateInvoiceForThisCustomer").' : '.$companystatic->name, 'object_bill', 'hideonsmartphone').''; @@ -503,8 +600,11 @@ if ($resql) print ''.price($objp->total_ht).''.$generic_commande->LibStatut($objp->fk_statut,$objp->facturee,5).''.$generic_commande->LibStatut($objp->fk_statut, $objp->billed, 5, 1).''.yn($objp->billed).'
'.price($total).'
'; // Ref @@ -499,15 +502,15 @@ if ($action == 'create' && !$error) } dol_fiche_end(); - + // Button "Create Draft" print '
'; print "\n"; print ''; print "
\n"; - - + + } // Mode liste @@ -570,7 +573,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) $title = $langs->trans('ListOfOrders'); $title.=' - '.$langs->trans('StatusOrderValidated').', '.$langs->trans("StatusOrderSent").', '.$langs->trans('StatusOrderToBill'); $num = $db->num_rows($resql); - print_fiche_titre($title); + print load_fiche_titre($title); $i = 0; $period=$html->select_date($date_start,'date_start',0,0,1,'',1,0,1).' - '.$html->select_date($date_end,'date_end',0,0,1,'',1,0,1); $periodely=$html->select_date($date_starty,'date_start_dely',0,0,1,'',1,0,1).' - '.$html->select_date($date_endy,'date_end_dely',0,0,1,'',1,0,1); @@ -601,10 +604,11 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) //REF print ''; print '
'; + print ''; print ''; - + print ''; print $period; @@ -616,15 +620,14 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) print ''; + print ''; print ''; //ALL/NONE - print ''; if ($conf->use_javascript_ajax) print ''.$langs->trans("All").' / '.$langs->trans("None").''; print '
'; print ''; print ''; print ''; } else @@ -553,7 +553,7 @@ if ($result) if ($acct->canBeConciliated() > 0) // Si compte rapprochable { print '
'."\n"; - print_fiche_titre($langs->trans("Reconciliation"), '', 'title_bank.png'); + print load_fiche_titre($langs->trans("Reconciliation"), '', 'title_bank.png'); print ''; print ''; print ''; @@ -587,7 +587,7 @@ if ($result) if ($user->rights->banque->consolidate) { print ''; } else diff --git a/htdocs/compta/bank/rappro.php b/htdocs/compta/bank/rappro.php index 8468bfbd5fb..6e91a180e50 100644 --- a/htdocs/compta/bank/rappro.php +++ b/htdocs/compta/bank/rappro.php @@ -71,7 +71,7 @@ if ($action == 'rappro' && $user->rights->banque->consolidate) $result=$bankline->update_conciliation($user,$_POST["cat"]); if ($result < 0) { - setEventMessage($bankline->error, 'errors'); + setEventMessages($bankline->error, $bankline->errors, 'errors'); $error++; break; } @@ -83,7 +83,7 @@ if ($action == 'rappro' && $user->rights->banque->consolidate) { $error++; $langs->load("errors"); - setEventMessage($langs->trans("ErrorPleaseTypeBankTransactionReportName"), 'errors'); + setEventMessages($langs->trans("ErrorPleaseTypeBankTransactionReportName"), null, 'errors'); } if (! $error) @@ -99,11 +99,14 @@ if ($action == 'rappro' && $user->rights->banque->consolidate) if ($action == 'del') { $bankline=new AccountLine($db); - $bankline->fetch($_GET["rowid"]); - $result=$bankline->delete($user); - if ($result < 0) - { - dol_print_error($db,$bankline->error); + + if ($bankline->fetch($_GET["rowid"]) > 0) { + $result = $bankline->delete($user); + if ($result < 0) { + dol_print_error($db, $bankline->error); + } + } else { + setEventMessage($langs->trans('ErrorRecordNotFound'), 'errors'); } } @@ -151,6 +154,7 @@ $acct->fetch($id); $now=dol_now(); $sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type as type"; +$sql.= ", b.fk_bordereau"; $sql.= " FROM ".MAIN_DB_PREFIX."bank as b"; $sql.= " WHERE rappro=0 AND fk_account=".$acct->id; $sql.= " ORDER BY dateo ASC"; @@ -182,11 +186,11 @@ if ($resql) $var=True; $num = $db->num_rows($resql); - print_fiche_titre($langs->trans("Reconciliation").': '.$acct->label.'', '', 'title_bank.png'); + print load_fiche_titre($langs->trans("Reconciliation").': '.$acct->label.'', '', 'title_bank.png'); print '
'; // Show last bank receipts - $nbmax=5; + $nbmax=15; // We accept to show last 15 receipts (so we can have more than one year) $liste=""; $sql = "SELECT DISTINCT num_releve FROM ".MAIN_DB_PREFIX."bank"; $sql.= " WHERE fk_account=".$acct->id." AND num_releve IS NOT NULL"; @@ -198,10 +202,14 @@ if ($resql) { $numr=$db->num_rows($resqlr); $i=0; + $last_ok=0; while (($i < $numr) && ($i < $nbmax)) { $objr = $db->fetch_object($resqlr); + if (! $last_ok) { $last_releve = $objr->num_releve; + $last_ok=1; + } $i++; $liste=''.$objr->num_releve.'   '.$liste; } @@ -218,11 +226,11 @@ if ($resql) print ''; print ''; - print ""; - print "id."\">"; + print ''; + print ''; print ''.$langs->trans("InputReceiptNumber").': '; - print ''; + print ''; // The only default value is value we just entered print '
'; if ($options) { @@ -284,7 +292,7 @@ if ($resql) // Type + Number $label=($langs->trans("PaymentType".$objp->type)!="PaymentType".$objp->type)?$langs->trans("PaymentType".$objp->type):$objp->type; // $objp->type is a code if ($label=='SOLD') $label=''; - print ''; + print ''; // Description print '"; } diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 73fd8df531a..0025fb62fd8 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -157,6 +157,7 @@ if (empty($num)) } print ''; + print '

'; print_barre_liste('', $page, $_SERVER["PHP_SELF"], "&account=".$object->id, $sortfield, $sortorder,'',$numrows); @@ -282,10 +283,15 @@ else $found=true; } - $mesprevnext ="id\">".img_previous()."  "; - $mesprevnext.= $langs->trans("AccountStatement")." $num"; - $mesprevnext.="   id\">".img_next().""; - print_fiche_titre($langs->trans("AccountStatement").' '.$num.', '.$langs->trans("BankAccount").' : '.$object->getNomUrl(0),$mesprevnext, 'title_bank.png'); + $mesprevnext=''; + $mesprevnext.=''; + print load_fiche_titre($langs->trans("AccountStatement").' '.$num.', '.$langs->trans("BankAccount").' : '.$object->getNomUrl(0, 'receipts'), $mesprevnext, 'title_bank.png'); print '
'; print ""; @@ -321,6 +327,7 @@ else // Recherche les ecritures pour le releve $sql = "SELECT b.rowid, b.dateo as do, b.datev as dv,"; $sql.= " b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type,"; + $sql.= " b.fk_bordereau,"; $sql.= " ba.rowid as bankid, ba.ref as bankref, ba.label as banklabel"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba"; $sql.= ", ".MAIN_DB_PREFIX."bank as b"; @@ -367,7 +374,7 @@ else } else { $type_label=($langs->trans("PaymentTypeShort".$objp->fk_type)!="PaymentTypeShort".$objp->fk_type)?$langs->trans("PaymentTypeShort".$objp->fk_type):$objp->fk_type; } - print ''; + print ''; // Description print '"; print ''; print ""; @@ -353,7 +353,7 @@ else if ($id) // Who print ""; print ''; // Date @@ -411,8 +411,8 @@ else if ($id) } else { - /* - * Confirmation de la suppression du deplacement + /* + * Confirm delete trip */ if ($action == 'delete') { diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index f09875456c2..4b2dce9f14e 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -37,23 +37,13 @@ class Deplacement extends CommonObject public $fk_element = ''; protected $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - var $id; - var $datec; // Creation date var $dated; var $fk_user_author; var $fk_user; var $km; - /** - * @deprecated - * @see note_private, note_public - */ - var $note; // TODO deprecated - var $note_private; - var $note_public; var $socid; var $statut; // 0=draft, 1=validated - var $fk_project; var $extraparams=array(); var $statuts=array(); diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index b8920bb45a4..b83cdde2db9 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -45,7 +45,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="d.dated"; -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; /* @@ -91,7 +91,7 @@ if ($result) } -print_fiche_titre($langs->trans("ExpensesArea")); +print load_fiche_titre($langs->trans("ExpensesArea")); print '
'; diff --git a/htdocs/compta/deplacement/info.php b/htdocs/compta/deplacement/info.php index dcdc8c9baf0..1e0279263e3 100644 --- a/htdocs/compta/deplacement/info.php +++ b/htdocs/compta/deplacement/info.php @@ -58,6 +58,5 @@ if ($id) print '
'; } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index c3c5f7dd80b..497de98fa72 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -46,13 +46,13 @@ $search_company=GETPOST('search_company','alpha'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="d.dated"; -$limit = $conf->liste_limit; $year=GETPOST("year"); $month=GETPOST("month"); @@ -164,9 +164,11 @@ if ($resql) print '
'; - print '\n"; + print ''; + print "\n"; $var=true; while ($i < min($num,$limit)) diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index 0d0a32a877c..216988b6a7a 100644 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacementstats.class.php'; $langs->load("trips"); +$langs->load("companies"); $WIDTH=DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT=DolGraph::getDefaultGraphSizeForStats('height'); @@ -78,7 +79,7 @@ llxHeader(); $title=$langs->trans("TripsAndExpensesStatistics"); $dir=$conf->deplacement->dir_temp; -print_fiche_titre($title, $mesg); +print load_fiche_titre($title, $mesg); dol_mkdir($dir); @@ -236,13 +237,13 @@ print ''; // User print ''; // Year print ''; print ''; @@ -658,7 +659,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $text.='
'.$langs->trans("AllCompletelyPayedInvoiceWillBeClosed"); print ''; } - $form->form_confirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice); + print $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$facture->id.'&socid='.$facture->socid.'&type='.$facture->type,$langs->trans('ReceivedCustomersPayments'),$text,'confirm_paiement',$formquestion,$preselectedchoice); } print "\n"; @@ -672,7 +673,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie if (! GETPOST('action')) { if ($page == -1) $page = 0 ; - $limit = $conf->liste_limit; + $limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page ; if (! $sortorder) $sortorder='DESC'; diff --git a/htdocs/compta/paiement/avalider.php b/htdocs/compta/paiement/avalider.php index 489997011b0..02201093830 100644 --- a/htdocs/compta/paiement/avalider.php +++ b/htdocs/compta/paiement/avalider.php @@ -53,7 +53,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="p.rowid"; -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $sql = "SELECT p.rowid, p.datep as dp, p.amount, p.statut"; $sql.=", c.libelle as paiement_type, p.num_paiement"; @@ -118,6 +118,5 @@ if ($resql) print "
'; @@ -647,7 +653,9 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) print ''; - if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_valid) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning"); + if ($generic_commande->hasDelay()) { + print img_picto($langs->trans("Late"),"warning"); + } print ''; diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index ea781a4828f..1f0f763bfd1 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -64,8 +64,6 @@ $langs->load('suppliers'); $form=new Form($db); -llxHeader(); - if ($mode == 'customer') { $title=$langs->trans("OrdersStatistics"); @@ -77,7 +75,9 @@ if ($mode == 'supplier') $dir=$conf->fournisseur->dir_output.'/commande/temp'; } -print_fiche_titre($title,'','title_commercial.png'); +llxHeader('', $title); + +print load_fiche_titre($title,'','title_commercial.png'); dol_mkdir($dir); @@ -250,18 +250,17 @@ print '
'; // Show filter box print ''; print ''; - print ''; + print '
'; print ''; // Company print ''; // User print ''; + print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); // Year print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; if ($mode == 'customer') $filter='s.client in (1,2,3)'; if ($mode == 'supplier') $filter='s.fournisseur = 1'; - print $form->select_company($socid,'socid',$filter,1); + print $form->select_company($socid,'socid',$filter,1,0,0,array(),0,'','style="width: 95%"'); print '
'.$langs->trans("CreatedBy").''; - print $form->select_dolusers($userid,'userid',1); - print '
'.$langs->trans("Year").''; if (! in_array($year,$arrayyears)) $arrayyears[$year]=$year; @@ -275,25 +274,27 @@ print '
'; print '

'; //} -print ''; -print ''; +print '
'; +print ''; print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; print ''; $oldyear=0; +$var=true; foreach ($data as $val) { $year = $val['year']; while (! empty($year) && $oldyear > $year+1) { // If we have empty year $oldyear--; - print ''; + $var=!$var; + print ''; print ''; print ''; @@ -305,7 +306,8 @@ foreach ($data as $val) print ''; } - print ''; + $var=!$var; + print ''; print ''; print ''; print ''; diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index a661013802d..231f6034b00 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -30,7 +30,7 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("orders"); echo '
'; -print_titre($langs->trans('RelatedCustomerOrders')); +print load_fiche_titre($langs->trans('RelatedCustomerOrders'), '', ''); ?>
'.$langs->trans("Year").''.$langs->trans("NbOfOrders").'%'.$langs->trans("AmountTotal").'%'.$langs->trans("AmountAverage").'%'.$langs->trans("NbOfOrders").'%'.$langs->trans("AmountTotal").'%'.$langs->trans("AmountAverage").'%
0?'&userid='.$userid:'').'">'.$oldyear.'0
0?'&userid='.$userid:'').'">'.$year.''.$val['nb'].''.round($val['nb_diff']).'
diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 32284874797..0973ece78d3 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -135,15 +135,15 @@ if ($action == 'add' && $id && ! isset($_POST["cancel"]) && $user->rights->banqu if (! $dateop) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Date")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Date")), null, 'errors'); } if (! $operation) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Type")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Type")), null, 'errors'); } if (! $amount) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Amount")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Amount")), null, 'errors'); } if (! $error) @@ -152,13 +152,13 @@ if ($action == 'add' && $id && ! isset($_POST["cancel"]) && $user->rights->banqu $insertid = $object->addline($dateop, $operation, $label, $amount, $num_chq, $cat1, $user); if ($insertid > 0) { - setEventMessage($langs->trans("RecordSaved")); + setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); header("Location: ".$_SERVER['PHP_SELF']."?id=".$id."&action=addline"); exit; } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else @@ -378,19 +378,6 @@ if ($id > 0 || ! empty($ref)) { print '
'; - if ($object->type != 2 && $object->rappro) - { - // If not cash account and can be reconciliate - if ($user->rights->banque->consolidate) - { - print ''.$langs->trans("Conciliate").''; - } - else - { - print ''.$langs->trans("Conciliate").''; - } - } - if ($action != 'addline') { if (empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) @@ -409,6 +396,20 @@ if ($id > 0 || ! empty($ref)) print ''.$langs->trans("AddBankRecord").''; } } + + if ($object->type != 2 && $object->rappro) + { + // If not cash account and can be reconciliate + if ($user->rights->banque->consolidate) + { + print ''.$langs->trans("Conciliate").''; + } + else + { + print ''.$langs->trans("Conciliate").''; + } + } + print '
'; } @@ -469,7 +470,7 @@ if ($id > 0 || ! empty($ref)) // Form to add a transaction with no invoice if ($user->rights->banque->modifier && $action == 'addline') { - print_fiche_titre($langs->trans("AddBankRecordLong"),'',''); + print load_fiche_titre($langs->trans("AddBankRecordLong"),'',''); print '
'; print ''; @@ -554,10 +555,10 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; - print ''; + print ''; print "\n"; @@ -952,7 +953,7 @@ if ($id > 0 || ! empty($ref)) if ($sep > 0) print ' '; // If we had at least one line in future else print $langs->trans("CurrentBalance"); print ' '.$object->currency_code.''; - print ''; + print ''; print ''; print ''; } else { @@ -961,9 +962,9 @@ if ($id > 0 || ! empty($ref)) if ($sep > 0) print ' '; // If we had at least one line in future else print $langs->trans("Total"); print ' '.$object->currency_code.''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; print ''; } diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 68ef0a42e32..7b53d775cb6 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -291,7 +291,7 @@ if ($result < 0) { $langs->load("errors"); $error++; - setEventMessage($langs->trans("ErrorFailedToCreateDir"), 'errors'); + setEventMessages($langs->trans("ErrorFailedToCreateDir"), null, 'errors'); } else { diff --git a/htdocs/compta/bank/bilan.php b/htdocs/compta/bank/bilan.php index edfc84c23cc..c1d668df8d7 100644 --- a/htdocs/compta/bank/bilan.php +++ b/htdocs/compta/bank/bilan.php @@ -58,7 +58,7 @@ function valeur($sql) llxHeader(); -print_titre("Bilan"); +print load_fiche_titre("Bilan"); print '
'; print '
 '; - print ''; - print ''; - print ''; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print '
'.price($total, 0, $langs, 0, 0, -1, $object->currency_code).''.price($total).' 
'.price($total_deb*-1, 0, $langs, 0, 0, -1, $object->currency_code).''.price($total_cred, 0, $langs, 0, 0, -1, $object->currency_code).''.price($total_cred-($total_deb*-1), 0, $langs, 0, 0, -1, $object->currency_code).''.price($total_deb*-1).''.price($total_cred).''.price($total_cred-($total_deb*-1)).' 
'; @@ -89,6 +89,5 @@ print "'; - print ''; + print ''; // Type print ''; @@ -476,20 +481,40 @@ if ($action == 'create') // Accountancy code if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)) { - print ''; - print ''; - } + if (! empty($conf->accounting->enabled)) + { + print ''; + print ''; + } + else + { + print ''; + print ''; + } + } else { - print ''; - print ''; - } + if (! empty($conf->accounting->enabled)) + { + print ''; + print ''; + } + else + { + print ''; + print ''; + } + } // Accountancy journal if (! empty($conf->accounting->enabled)) { print ''; - print ''; + print ''; } print '
".$langs->trans("BankBalance").""; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index f22ce342bf0..666ad0085e1 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -44,7 +44,7 @@ $companystatic=new Societe($db); llxHeader(); // List movements bu category for bank transactions -print_fiche_titre($langs->trans("BankTransactionByCategories"), '', 'title_bank.png'); +print load_fiche_titre($langs->trans("BankTransactionByCategories"), '', 'title_bank.png'); print ''; print ""; @@ -97,6 +97,5 @@ else } print "
"; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index c6c34d87129..cccf16f0467 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2014-2015 Alexandre Spangaro - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -33,6 +33,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formbank.class.php'; require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php'; $langs->load("banks"); $langs->load("bills"); @@ -85,7 +87,8 @@ if ($_POST["action"] == 'add') $account->proprio = trim($_POST["proprio"]); $account->owner_address = trim($_POST["owner_address"]); - $account->account_number = trim($_POST["account_number"]); + if (GETPOST('account_number') <= 0) { $accountancy_code_number = ''; } else { $accountancy_code_number = GETPOST('account_number'); } + $account->account_number = $accountancy_code_number; $account->accountancy_journal = trim($_POST["accountancy_journal"]); $account->solde = $_POST["solde"]; @@ -102,19 +105,19 @@ if ($_POST["action"] == 'add') if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED && empty($account->account_number)) { - setEventMessage($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("AccountancyCode")), 'error'); + setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("AccountancyCode")), null, 'error'); $action='create'; // Force chargement page en mode creation $error++; } if (empty($account->ref)) { - setEventMessage($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")), 'errors'); + setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")), null, 'errors'); $action='create'; // Force chargement page en mode creation $error++; } if (empty($account->label)) { - setEventMessage($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("LabelBankCashAccount")), 'errors'); + setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("LabelBankCashAccount")), null, 'errors'); $action='create'; // Force chargement page en mode creation $error++; } @@ -130,7 +133,7 @@ if ($_POST["action"] == 'add') $_GET["id"]=$id; // Force chargement page en mode visu } else { - setEventMessage($account->error,'errors'); + setEventMessages($account->error, $account->errors, 'errors'); $action='create'; // Force chargement page en mode creation } } @@ -163,7 +166,8 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) $account->proprio = trim($_POST["proprio"]); $account->owner_address = trim($_POST["owner_address"]); - $account->account_number = trim($_POST["account_number"]); + if (GETPOST('account_number') <= 0) { $accountancy_code_number = ''; } else { $accountancy_code_number = GETPOST('account_number'); } + $account->account_number = $accountancy_code_number; $account->accountancy_journal = trim($_POST["accountancy_journal"]); $account->currency_code = trim($_POST["account_currency_code"]); @@ -177,19 +181,19 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED && empty($account->account_number)) { - setEventMessage($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("AccountancyCode")), 'error'); + setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("AccountancyCode")), null, 'error'); $action='edit'; // Force chargement page en mode creation $error++; } if (empty($account->ref)) { - setEventMessage($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")), 'errors'); + setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")), null, 'errors'); $action='edit'; // Force chargement page en mode creation $error++; } if (empty($account->label)) { - setEventMessage($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("LabelBankCashAccount")), 'errors'); + setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("LabelBankCashAccount")), null, 'errors'); $action='edit'; // Force chargement page en mode creation $error++; } @@ -206,7 +210,7 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) } else { - setEventMessage($account->error, 'errors'); + setEventMessages($account->error, $account->errors, 'errors'); $action='edit'; // Force chargement page edition } } @@ -231,6 +235,7 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == "yes" && $user- $form = new Form($db); $formbank = new FormBank($db); $formcompany = new FormCompany($db); +if (! empty($conf->accounting->enabled)) $formaccountancy = New FormVentilation($db); $countrynotdefined=$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; @@ -243,7 +248,7 @@ if ($action == 'create') { $account=new Account($db); - print_fiche_titre($langs->trans("NewFinancialAccount"), '', 'title_bank.png'); + print load_fiche_titre($langs->trans("NewFinancialAccount"), '', 'title_bank.png'); if ($conf->use_javascript_ajax) { @@ -276,7 +281,7 @@ if ($action == 'create') // Label print '
'.$langs->trans("LabelBankCashAccount").'
'.$langs->trans("AccountType").'
'.$langs->trans("AccountancyCode").'account_number).'">
'.$langs->trans("AccountancyCode").''; + print $formaccountancy->select_account($account->account_number, 'account_number', 1, '', 1, 1); + print '
'.$langs->trans("AccountancyCode").'account_number).'">
'.$langs->trans("AccountancyCode").'account_number).'">
'.$langs->trans("AccountancyCode").''; + print $formaccountancy->select_account($account->account_number, 'account_number', 1, '', 1, 1); + print '
'.$langs->trans("AccountancyCode").'account_number).'">
'.$langs->trans("AccountancyJournal").'accountancy_journal).'">
accountancy_journal).'">
'; @@ -732,7 +757,7 @@ else print ''; // Accountancy code print ''; - print ''; + print ''; // Accountancy journal if (! empty($conf->accounting->enabled)) @@ -777,7 +802,7 @@ else $account = new Account($db); $account->fetch(GETPOST('id','int')); - print_fiche_titre($langs->trans("EditFinancialAccount"), '', 'title_bank.png'); + print load_fiche_titre($langs->trans("EditFinancialAccount"), '', 'title_bank.png'); if ($conf->use_javascript_ajax) { @@ -1008,16 +1033,36 @@ else print '
'.$langs->trans("AccountancyCode").''.$account->account_number.'
'.length_accountg($account->account_number).'
'; // Accountancy code - if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)) - { - print ''; - print ''; - } - else - { - print ''; - print ''; - } + if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)) + { + if (! empty($conf->accounting->enabled)) + { + print ''; + print ''; + } + else + { + print ''; + print ''; + } + } + else + { + if (! empty($conf->accounting->enabled)) + { + print ''; + print ''; + } + else + { + print ''; + print ''; + } + } // Accountancy journal if (! empty($conf->accounting->enabled)) @@ -1041,8 +1086,5 @@ else } - - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index 00755959ab9..1d9da7f9f59 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -108,7 +108,7 @@ if ($action == 'delete') llxHeader(); -print_fiche_titre($langs->trans("Rubriques"), '', 'title_bank.png'); +print load_fiche_titre($langs->trans("Rubriques"), '', 'title_bank.png'); print ''; print ''; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index a7e55afb3cb..cf38669d554 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -44,9 +44,7 @@ class Account extends CommonObject * @see id */ var $rowid; - var $id; - var $ref; var $label; //! 1=Compte courant/check/carte, 2=Compte liquide, 0=Compte épargne var $courant; @@ -75,10 +73,6 @@ class Account extends CommonObject var $state_code; var $state; - var $country_id; - var $country_code; - var $country; - var $type_lib=array(); var $account_number; @@ -767,11 +761,12 @@ class Account extends CommonObject /** - * Delete bank account from database + * Delete bank account from database * - * @return int <0 if KO, >0 if OK + * @param User $user User deleting + * @return int <0 if KO, >0 if OK */ - function delete() + function delete($user='') { global $conf; @@ -1004,7 +999,12 @@ class Account extends CommonObject $link = ''; + } + if ($withpicto) $result.=($link.img_object($label, 'account', 'class="classfortooltip"').$linkend.' '); $result.=$link.$this->label.$linkend; return $result; @@ -1088,8 +1088,8 @@ class Account extends CommonObject { $country_code=$this->getCountryCode(); - if (in_array($country_code,array('CH','DE','FR','ES','GA','IT'))) return 1; // France, Spain, Gabon - if (in_array($country_code,array('AU','BE','CA','DK','GR','GB','ID','IE','IR','KR','NL','NZ','UK','US'))) return 2; // Australia, Great Britain... + if (in_array($country_code,array('CH','FR','ES','GA','IT'))) return 1; // France, Spain, Gabon, ... + if (in_array($country_code,array('AU','BE','CA','DE','DK','GR','GB','ID','IE','IR','KR','NL','NZ','UK','US'))) return 2; // Australia, England... return 0; } @@ -1148,6 +1148,10 @@ class AccountLine extends CommonObject var $ref; var $datec; var $dateo; + + /** + * Value date + */ var $datev; var $amount; var $label; @@ -1277,12 +1281,12 @@ class AccountLine extends CommonObject $nbko++; } - $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid=".$this->rowid; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class WHERE lineid=".(int) $this->rowid; dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sql); if (! $result) $nbko++; - $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank WHERE rowid=".$this->rowid; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank WHERE rowid=".(int) $this->rowid; dol_syslog(get_class($this)."::delete", LOG_DEBUG); $result = $this->db->query($sql); if (! $result) $nbko++; @@ -1319,7 +1323,7 @@ class AccountLine extends CommonObject $this->db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank=".$this->rowid; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank=".(int) $this->rowid; dol_syslog(get_class($this)."::delete_urls", LOG_DEBUG); $result = $this->db->query($sql); if (! $result) $nbko++; diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php new file mode 100644 index 00000000000..3b6957df40f --- /dev/null +++ b/htdocs/compta/bank/document.php @@ -0,0 +1,232 @@ + + * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2011 Regis Houssin + * + * 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, see . + */ + +/** + * \file htdocs/compta/bank/document.php + * \ingroup banque + * \brief Page de gestion des documents attaches a un compte bancaire + */ +require('../../main.inc.php'); +require_once(DOL_DOCUMENT_ROOT . "/core/lib/bank.lib.php"); +require_once(DOL_DOCUMENT_ROOT . "/core/lib/files.lib.php"); +require_once(DOL_DOCUMENT_ROOT . "/core/lib/images.lib.php"); +require_once(DOL_DOCUMENT_ROOT . "/core/class/html.formfile.class.php"); +require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php'; + +$langs->load("banks"); + + +$langs->load('companies'); +$langs->load('other'); + +$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int')); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); + +$mesg = ''; +if (isset($_SESSION['DolMessage'])) { + $mesg = $_SESSION['DolMessage']; + unset($_SESSION['DolMessage']); +} + +// Security check +if ($user->societe_id) { + $action = ''; + $socid = $user->societe_id; +} +if ($user->societe_id) + $socid = $user->societe_id; +$result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account', '', '', + $fieldtype); + +// Get parameters +$sortfield = GETPOST("sortfield", 'alpha'); +$sortorder = GETPOST("sortorder", 'alpha'); +$page = GETPOST("page", 'int'); +if ($page == -1) { + $page = 0; +} +$offset = $conf->liste_limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (!$sortorder) + $sortorder = "ASC"; +if (!$sortfield) + $sortfield = "name"; + +$object = new Account($db); +if ($id) + $object->fetch($id); + +/* + * Actions + */ + +// Envoi fichier +if ($_POST["sendit"] && !empty($conf->global->MAIN_UPLOAD_DOC)) { + if ($object->fetch($id)) { + + $upload_dir = $conf->bank->dir_output . "/" . $object->ref; + + if (dol_mkdir($upload_dir) >= 0) { + $resupload = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], + $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']), + 0, 0, $_FILES['userfile']['error']); + if (is_numeric($resupload) && $resupload > 0) { + if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) + == 1) { + // Create small thumbs for image (Ratio is near 16/9) + // Used on logon for example + $imgThumbSmall = vignette($upload_dir . "/" . $_FILES['userfile']['name'], + $maxwidthsmall, $maxheightsmall, '_small', $quality, + "thumbs"); + // Create mini thumbs for image (Ratio is near 16/9) + // Used on menu or for setup page for example + $imgThumbMini = vignette($upload_dir . "/" . $_FILES['userfile']['name'], + $maxwidthmini, $maxheightmini, '_mini', $quality, + "thumbs"); + } + $mesg = '
' . $langs->trans("FileTransferComplete") . '
'; + } + else { + $langs->load("errors"); + if ($resupload < 0) { // Unknown error + $mesg = '
' . $langs->trans("ErrorFileNotUploaded") . '
'; + } + else if (preg_match('/ErrorFileIsInfectedWithAVirus/', + $resupload)) { // Files infected by a virus + $mesg = '
' . $langs->trans("ErrorFileIsInfectedWithAVirus") . '
'; + } + else { // Known error + $mesg = '
' . $langs->trans($resupload) . '
'; + } + } + } + } +} + +// Delete +else if ($action == 'confirm_deletefile' && $confirm == 'yes') { + if ($object->fetch($id)) { + + $upload_dir = $conf->bank->dir_output; + $file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). + + $ret = dol_delete_file($file, 0, 0, 0, $object); + if ($ret) { + setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + } + + Header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); + exit; + } +} + + +/* + * View + */ + +llxHeader(); + +$form = new Form($db); + +if ($id > 0 || !empty($ref)) { + if ($object->fetch($id, $ref)) { + + $upload_dir = $conf->bank->dir_output . '/' . $object->ref; + + // Onglets + $head = bank_prepare_head($object); + dol_fiche_head($head, 'document', $langs->trans("FinancialAccount"), 0, + 'account'); + + + // Construit liste des fichiers + $filearray = dol_dir_list($upload_dir, "files", 0, '', '\.meta$', + $sortfield, + (strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC), 1); + $totalsize = 0; + foreach ($filearray as $key => $file) { + $totalsize+=$file['size']; + } + + + print '
'.$langs->trans("AccountancyCode").'account_number).'">
'.$langs->trans("AccountancyCode").'account_number).'">
'.$langs->trans("AccountancyCode").''; + print $formaccountancy->select_account($account->account_number, 'account_number', 1, '', 1, 1); + print '
'.$langs->trans("AccountancyCode").'account_number).'">
'.$langs->trans("AccountancyCode").''; + print $formaccountancy->select_account($account->account_number, 'account_number', 1, '', 1, 1); + print '
'.$langs->trans("AccountancyCode").'account_number).'">
'; + + // Ref + // Ref + print ''; + print ''; + + // Label + print ''; + print ''; + + // Status + print ''; + print ''; + print ''; + print ''; + print "
' . $langs->trans("Ref") . ''; + print $form->showrefnav($object, 'ref', '', 1, 'ref'); + print '
' . $langs->trans("Label") . '' . $object->label . '
' . $langs->trans("Status") . '' . $object->getLibStatut(4) . '
' . $langs->trans("NbOfAttachedFiles") . '' . count($filearray) . '
' . $langs->trans("TotalSizeOfAttachedFiles") . '' . $totalsize . ' ' . $langs->trans("bytes") . '
\n"; + print "
\n"; + + dol_htmloutput_mesg($mesg, $mesgs); + + /* + * Confirmation suppression fichier + */ + if ($action == 'delete') { + $ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]), + $langs->trans('DeleteFile'), + $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', + '', 0, 1); + if ($ret == 'html') + print '
'; + } + + // Affiche formulaire upload + $formfile = new FormFile($db); + $formfile->form_attach_new_file(DOL_URL_ROOT . '/compta/bank/document.php?id=' . $object->id, + '', 0, 0, $user->rights->banque, 50, $object); + + + // List of document + $param = '&id=' . $object->id; + $formfile->list_of_documents($filearray, $object, 'bank', $param); + } + else { + dol_print_error($db); + } +} +else { + Header('Location: index.php'); +} + + +llxFooter(); + +$db->close(); diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 6f885e12bde..0764c87f5ab 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -81,7 +81,7 @@ if ($result < 0) { $langs->load("errors"); $error++; - setEventMessage($langs->trans("ErrorFailedToCreateDir"), 'errors'); + setEventMessages($langs->trans("ErrorFailedToCreateDir"), null, 'errors'); } else { @@ -113,7 +113,7 @@ else if ($mode == 'standard') { - // Chargement du tableau $amounts + // Loading table $amounts $amounts = array(); $monthnext = $month+1; @@ -153,7 +153,7 @@ else dol_print_error($db); } - // Calcul de $solde avant le debut du graphe + // Calculation of $solde before the start of the graph $solde = 0; $sql = "SELECT SUM(b.amount)"; @@ -265,7 +265,7 @@ else if ($mode == 'standard') { - // Chargement du tableau $amounts + // Loading table $amounts $amounts = array(); $sql = "SELECT date_format(b.datev,'%Y%m%d')"; $sql.= ", SUM(b.amount)"; @@ -296,7 +296,7 @@ else dol_print_error($db); } - // Calcul de $solde avant le debut du graphe + // Calculation of $solde before the start of the graph $solde = 0; $sql = "SELECT SUM(b.amount)"; @@ -403,7 +403,7 @@ else if ($mode == 'showalltime') { - // Chargement du tableau $amounts + // Loading table $amounts $amounts = array(); $sql = "SELECT date_format(b.datev,'%Y%m%d')"; diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php index ac175b5b7d7..7ea3bf1be5a 100644 --- a/htdocs/compta/bank/index.php +++ b/htdocs/compta/bank/index.php @@ -51,7 +51,7 @@ llxHeader('',$langs->trans('AccountsArea'),$help_url); $link=''; if ($statut == '') $link='
'.$langs->trans("IncludeClosedAccount").''; if ($statut == 'all') $link=''.$langs->trans("OnlyOpenedAccount").''; -print_fiche_titre($langs->trans("AccountsArea"),$link, 'title_bank.png'); +print load_fiche_titre($langs->trans("AccountsArea"),$link, 'title_bank.png'); // On charge tableau des comptes financiers (ouverts par defaut) @@ -113,7 +113,7 @@ foreach ($accounts as $key=>$type) { $result=$acc->load_board($user,$acc->id); if ($result<0) { - setEventMessage($acc->error, 'errors'); + setEventMessages($acc->error, $acc->errors, 'errors'); } else { print $result->nbtodo; if ($result->nbtodolate) print ' ('.$result->nbtodolate.img_warning($langs->trans("Late")).')'; @@ -229,7 +229,7 @@ foreach ($accounts as $key=>$type) { $result=$acc->load_board($user,$acc->id); if ($result<0) { - setEventMessage($acc->error, 'errors'); + setEventMessages($acc->error, $acc->errors, 'errors'); } else { print $result->nbtodo; if ($result->nbtodolate) print ' ('.$result->nbtodolate.img_warning($langs->trans("Late")).')'; diff --git a/htdocs/compta/bank/info.php b/htdocs/compta/bank/info.php index cfc0c10d0a5..a1952ab5957 100644 --- a/htdocs/compta/bank/info.php +++ b/htdocs/compta/bank/info.php @@ -62,7 +62,5 @@ print '
'; print '
'; - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index 4186dae5561..13b65f0baf1 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Xavier DUTOIT - * Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2004 Christophe Combelles * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Alexandre Spangaro @@ -104,7 +104,7 @@ if ($user->rights->banque->modifier && $action == "update") if ($ac->courant == 2 && $_POST['value'] != 'LIQ') { - setEventMessage($langs->trans("ErrorCashAccountAcceptsOnlyCashMoney"), 'errors'); + setEventMessages($langs->trans("ErrorCashAccountAcceptsOnlyCashMoney"), null, 'errors'); $error++; } @@ -146,7 +146,7 @@ if ($user->rights->banque->modifier && $action == "update") $result = $db->query($sql); if ($result) { - setEventMessage($langs->trans("RecordSaved")); + setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $db->commit(); } else @@ -166,7 +166,7 @@ if ($user->rights->banque->consolidate && ($action == 'num_releve' || $action == // Check parameters if ($rappro && empty($num_rel)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("AccountStatement")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("AccountStatement")), null, 'errors'); $error++; } @@ -184,7 +184,7 @@ if ($user->rights->banque->consolidate && ($action == 'num_releve' || $action == $result = $db->query($sql); if ($result) { - setEventMessage($langs->trans("RecordSaved")); + setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $db->commit(); } else @@ -205,7 +205,7 @@ $form = new Form($db); llxHeader(); -// On initialise la liste des categories +// The list of categories is initialized $sql = "SELECT rowid, label"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_categ"; $sql.= " ORDER BY label"; @@ -535,7 +535,7 @@ if ($result) if ($user->rights->banque->modifier) { print '
'; - print 'rappro?' disabled':'').' value="'.price($objp->amount).'"> '.$langs->trans("Currency".$conf->currency); + print 'rappro?' disabled':'').' value="'.price($objp->amount).'"> '.$langs->trans("Currency".$acct->currency_code); print ''; - print 'rappro?' checked':'')).'">'; + print 'rappro?' checked="checked"':'')).'">'; print ''.$label.($objp->num_chq?' '.$objp->num_chq:'').''.$label.($objp->num_chq?' '.$objp->num_chq:'').($objp->fk_bordereau>0?' ('.$objp->fk_bordereau.')':'').''; @@ -405,7 +413,7 @@ if ($resql) print ''; } else { - print " "; // On n'empeche la suppression car le raprochement ne pourra se faire qu'apr�s la date pass�e et que l'�criture apparaisse bien sur le compte. + print " "; // We prevents the deletion because reconciliation can not be achieved until the date has elapsed and that writing appears well on the account. } print "'.$type_label.' '.($objp->num_chq?$objp->num_chq:'').''.$type_label.' '.($objp->num_chq?$objp->num_chq:'').($objp->fk_bordereau>0?' ('.$objp->fk_bordereau.')':'').''; diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 80befe3d433..e3b121065ef 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -42,14 +42,16 @@ $langs->load("margins"); if ($user->societe_id) $socid=$user->societe_id; $result=restrictedArea($user,'banque'); -$description=GETPOST("description"); -$debit=GETPOST("debit"); -$credit=GETPOST("credit"); -$type=GETPOST("type"); -$account=GETPOST("account"); +$description=GETPOST("description",'alpha'); +$debit=GETPOST("debit",'alpha'); +$credit=GETPOST("credit",'alpha'); +$type=GETPOST("type",'alpha'); +$account=GETPOST("account",'alpha'); $bid=GETPOST("bid","int"); $search_dt_start = dol_mktime(0, 0, 0, GETPOST('search_start_dtmonth', 'int'), GETPOST('search_start_dtday', 'int'), GETPOST('search_start_dtyear', 'int')); $search_dt_end = dol_mktime(0, 0, 0, GETPOST('search_end_dtmonth', 'int'), GETPOST('search_end_dtday', 'int'), GETPOST('search_end_dtyear', 'int')); +$search_thirdparty=GETPOST("thirdparty",'alpha'); +$search_req_nb=GETPOST("req_nb",'alpha'); $param=''; if (!empty($description)) $param.='&description='.$description; @@ -63,14 +65,14 @@ if (dol_strlen($search_dt_start) > 0) if (dol_strlen($search_dt_end) > 0) $param .= '&search_end_dtmonth=' . GETPOST('search_end_dtmonth', 'int') . '&search_end_dtday=' . GETPOST('search_end_dtday', 'int') . '&search_end_dtyear=' . GETPOST('search_end_dtyear', 'int'); +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -$limit = $conf->liste_limit; if (! $sortorder) $sortorder='DESC'; if (! $sortfield) $sortfield='b.dateo'; @@ -82,6 +84,8 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $credit=""; $account=""; $bid=""; + $search_req_nb=''; + $search_thirdparty=''; } /* @@ -111,15 +115,15 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu ON bu.fk_bank = b.rowid AND $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON bu.url_id = s.rowid"; $sql.= " WHERE b.fk_account = ba.rowid"; $sql.= " AND ba.entity IN (".getEntity('bank_account', 1).")"; -if (GETPOST("req_nb")) +if ($search_req_nb) { - $sql.= " AND b.num_chq LIKE '%".$db->escape(GETPOST("req_nb"))."%'"; - $param.='&req_nb='.urlencode(GETPOST("req_nb")); + $sql.= " AND b.num_chq LIKE '%".$db->escape($search_req_nb)."%'"; + $param.='&req_nb='.urlencode($search_req_nb); } -if (GETPOST("thirdparty")) +if ($search_thirdparty) { - $sql.=" AND s.nom LIKE '%".$db->escape(GETPOST("thirdparty"))."%'"; - $param.='&thirdparty='.urlencode(GETPOST("thirdparty")); + $sql.=" AND s.nom LIKE '%".$db->escape($search_thirdparty)."%'"; + $param.='&thirdparty='.urlencode($search_thirdparty); } if ($bid) { @@ -137,22 +141,19 @@ if (dol_strlen($search_dt_end)>0) { $sql .= " AND b.dateo <= '" . $db->idate($search_dt_end) . "'"; } // Search criteria amount -$si=0; $debit = price2num(str_replace('-','',$debit)); $credit = price2num(str_replace('-','',$credit)); -if (is_numeric($debit)) { - $si++; - $sqlw[$si] .= " b.amount = -" . $debit; -} -if (is_numeric($credit)) { - $si++; - $sqlw[$si] .= " b.amount = " . $credit; -} -// Other search criteria -for ($i = 1 ; $i <= $si; $i++) { - $sql .= " AND " . $sqlw[$i]; -} +if ($debit) $sql.= natural_search('- b.amount', $debit, 1); +if ($credit) $sql.= natural_search('b.amount', $credit, 1); $sql.= $db->order($sortfield,$sortorder); + +$nbtotalofrecords = 0; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); +} + $sql.= $db->plimit($limit+1,$offset); //print $sql; @@ -164,34 +165,45 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; + print ''."\n"; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + print ''; + if (! empty($_REQUEST['bid'])) print ''; + // Title $bankcateg=new BankCateg($db); if (GETPOST("bid")) { $result=$bankcateg->fetch(GETPOST("bid")); - print_barre_liste($langs->trans("BankTransactionForCategory",$bankcateg->label).' '.($socid?' '.$soc->name:''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num,'', 'title_bank.png'); + print_barre_liste($langs->trans("BankTransactionForCategory",$bankcateg->label).' '.($socid?' '.$soc->name:''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_bank.png', 0, '', '', $limit); } else { - print_barre_liste($langs->trans("BankTransactions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, '', 'title_bank.png'); + print_barre_liste($langs->trans("BankTransactions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_bank.png', 0, '', '', $limit); } - - print ''."\n"; - print ''."\n"; - + + $moreforfilter = ''; + $moreforfilter.='
'; $moreforfilter .= $langs->trans('Period') . ' ('.$langs->trans('DateOperationShort').') : ' . $langs->trans('StartDate') . ' '; $moreforfilter .= $form->select_date($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 1); $moreforfilter .= ' - '; $moreforfilter .= $langs->trans('EndDate') . ' ' . $form->select_date($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 1); + $moreforfilter .= '
'; - - if ($moreforfilter) { - print '
'; + if ($moreforfilter) + { + print '
'; print $moreforfilter; print '
'."\n"; } - print ''."\n"; + print '
'."\n"; print ''; print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'b.rowid','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('DateOperationShort'),$_SERVER['PHP_SELF'],'b.dateo','',$param,'align="center"',$sortfield,$sortorder); @@ -203,6 +215,7 @@ if ($resql) print_liste_field_titre($langs->trans("Debit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Credit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Account"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre(''); print "\n"; print ''; @@ -212,23 +225,23 @@ if ($resql) print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print ''; - print '\n"; + print ''; + print ''; + print "\n"; // Loop on each record $total_debit=0; @@ -320,6 +333,9 @@ if ($resql) $bankaccountstatic->label=$objp->bankref; print $bankaccountstatic->getNomUrl(1); print "\n"; + + print ''; + print ""; } $i++; @@ -331,6 +347,7 @@ if ($resql) print ''; print ''; print ''; + print ''; print ''; } @@ -349,7 +366,5 @@ if ($_POST["action"] == "search" && ! $num) print $langs->trans("NoRecordFound"); } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 38f6b94952e..db7f37cb3e5 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -2,6 +2,7 @@ /* Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008-2009 Laurent Destailleur (Eldy) * Copyright (C) 2008 Raphael Bertrand (Resultic) + * Copyright (C) 2015 Marcos García "; print ""; print ""; - if ($obj->total_ttc < 0) { print ""; }; + if ($obj->total_ttc < 0) { print ""; }; if ($obj->total_ttc >= 0) { print ""; }; print ''; print ""; @@ -338,6 +339,5 @@ else print $langs->trans("ErrorBankAccountNotFound"); } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/bank/virement.php b/htdocs/compta/bank/virement.php index d81390a0205..1a3294a2f15 100644 --- a/htdocs/compta/bank/virement.php +++ b/htdocs/compta/bank/virement.php @@ -54,22 +54,22 @@ if ($action == 'add') if (! $label) { $error=1; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Description")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Description")), null, 'errors'); } if (! $amount) { $error=1; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")), null, 'errors'); } if (! GETPOST('account_from','int')) { $error=1; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("TransferFrom")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("TransferFrom")), null, 'errors'); } if (! GETPOST('account_to','int')) { $error=1; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("TransferTo")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("TransferTo")), null, 'errors'); } if (! $error) { @@ -113,18 +113,18 @@ if ($action == 'add') if (! $error) { $mesgs = $langs->trans("TransferFromToDone","id."\">".$accountfrom->label."","id."\">".$accountto->label."",$amount,$langs->transnoentities("Currency".$conf->currency)); - setEventMessage($mesgs); + setEventMessages($mesgs, null, 'mesgs'); $db->commit(); } else { - setEventMessage($accountfrom->error.' '.$accountto->error, 'errors'); + setEventMessages($accountfrom->error.' '.$accountto->error, null, 'errors'); $db->rollback(); } } else { - setEventMessage($langs->trans("ErrorFromToAccountsMustDiffers"), 'errors'); + setEventMessages($langs->trans("ErrorFromToAccountsMustDiffers"), null, 'errors'); } } } @@ -132,7 +132,7 @@ if ($action == 'add') /* - * Affichage + * View */ llxHeader(); @@ -152,7 +152,7 @@ if($error) $amount = GETPOST('amount','int'); } -print_fiche_titre($langs->trans("BankTransfer"), '', 'title_bank.png'); +print load_fiche_titre($langs->trans("BankTransfer"), '', 'title_bank.png'); print $langs->trans("TransferDesc"); print "

"; @@ -188,6 +188,5 @@ print '
"; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 45b10f2363c..c263cc99696 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -49,7 +49,7 @@ $sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"]; $page = $_GET["page"]; if ($page < 0) $page = 0; -//$limit = $conf->liste_limit; +//$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; //$offset = $limit * $page ; if (! $sortfield) $sortfield="cs.date_ech"; @@ -75,7 +75,7 @@ if (GETPOST("mode") == 'sconly') $param='&mode=sconly'; if ($sortfield) $param.='&sortfield='.$sortfield; if ($sortorder) $param.='&sortorder='.$sortorder; -print_fiche_titre($title, ($year?"".img_previous()." ".$langs->trans("Year")." $year ".img_next()."":""), 'title_accountancy.png'); +print load_fiche_titre($title, ($year?"".img_previous()." ".$langs->trans("Year")." $year ".img_next()."":""), 'title_accountancy.png'); if ($year) $param.='&year='.$year; @@ -85,94 +85,13 @@ if (GETPOST("mode") != 'sconly') print "
"; } -// Payment Salary -if ($conf->salaries->enabled) -{ - if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') - { - $sal = new PaymentSalary($db); - - print_fiche_titre($langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); - - $sql = "SELECT s.rowid, s.amount, s.label, s.datep as datep, s.datev as datev, s.datesp, s.dateep, s.salary, u.salary as current_salary"; - $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s, ".MAIN_DB_PREFIX."user as u"; - $sql.= " WHERE s.entity IN (".getEntity('user',1).")"; - $sql.= " AND u.rowid = s.fk_user"; - if ($year > 0) - { - $sql.= " AND (s.datesp between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; - $sql.= " OR s.dateep between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."')"; - } - if (preg_match('/^s\./',$sortfield)) $sql.= $db->order($sortfield,$sortorder); - - $result = $db->query($sql); - if ($result) - { - $num = $db->num_rows($result); - $i = 0; - $total = 0 ; - print '
'; $form->select_types_paiements(empty($type)?'':$type, 'type', '', 2, 0, 1, 8); print ''; print ''; print ''; print ''; print ''; print ''; print ''; - print ''; - if (! empty($_REQUEST['bid'])) print ''; - print ''; - print ''; - print "
'; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print '
' . price($total_debit * - 1) . '' . price($total_credit) . '
".$ref."".$refcomp."".price($total_ttc)." ".price(abs($total_ttc))."  ".price($total_ttc)."'.price($solde).'
'; - print ''; - print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"s.dateep","",$param,'width="140px"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"s.label","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"s.rowid","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"s.datep","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder); - print "\n"; - $var=1; - while ($i < $num) - { - $obj = $db->fetch_object($result); - - $total = $total + $obj->amount; - - $var=!$var; - print ""; - - print ''."\n"; - - print "\n"; - - print '"; - - // Ref payment - $sal_static->id=$obj->rowid; - $sal_static->ref=$obj->rowid; - print '\n"; - - print '\n"; - print '"; - print "\n"; - - $i++; - } - print ''; - print '"; - print ''; - print ''; - print '"; - print ""; - - print "
'.dol_print_date($db->jdate($obj->dateep),'day').'".$obj->label."'.($obj->salary?price($obj->salary):'')."'.$sal_static->getNomUrl(1)."'.dol_print_date($db->jdate($obj->datep),'day')."'.price($obj->amount)."
'.$langs->trans("Total").''."  '.price($total)."
"; - $db->free($result); - - print "
"; - } - else - { - dol_print_error($db); - } - } -} - if ($conf->tax->enabled) { // Social contributions only if (GETPOST("mode") != 'sconly') { - print_fiche_titre($langs->trans("SocialContributionsPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); + print load_fiche_titre($langs->trans("SocialContributionsPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); } print ''; @@ -286,7 +205,7 @@ if ($conf->tax->enabled) $tva = new Tva($db); - print_fiche_titre($langs->trans("VATPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); + print load_fiche_titre($langs->trans("VATPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); $sql = "SELECT pv.rowid, pv.amount, pv.label, pv.datev as dm"; $sql.= " FROM ".MAIN_DB_PREFIX."tva as pv"; @@ -356,7 +275,8 @@ if ($conf->tax->enabled) } } } -//localtax + +// Localtax if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") { $j=1; @@ -386,7 +306,7 @@ while($j<$numlt) $tva = new Tva($db); - print_fiche_titre($langs->transcountry(($j==1?"LT1Payments":"LT2Payments"),$mysoc->country_code).($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); + print load_fiche_titre($langs->transcountry(($j==1?"LT1Payments":"LT2Payments"),$mysoc->country_code).($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); $sql = "SELECT pv.rowid, pv.amount, pv.label, pv.datev as dm, pv.datep as dp"; @@ -460,6 +380,91 @@ while($j<$numlt) } + +// Payment Salary +if ($conf->salaries->enabled) +{ + if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly') + { + $sal = new PaymentSalary($db); + + print '
'; + print load_fiche_titre($langs->trans("SalariesPayments").($year?' ('.$langs->trans("Year").' '.$year.')':''), '', ''); + + $sql = "SELECT s.rowid, s.amount, s.label, s.datep as datep, s.datev as datev, s.datesp, s.dateep, s.salary, u.salary as current_salary"; + $sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s, ".MAIN_DB_PREFIX."user as u"; + $sql.= " WHERE s.entity IN (".getEntity('user',1).")"; + $sql.= " AND u.rowid = s.fk_user"; + if ($year > 0) + { + $sql.= " AND (s.datesp between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; + $sql.= " OR s.dateep between '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."')"; + } + if (preg_match('/^s\./',$sortfield)) $sql.= $db->order($sortfield,$sortorder); + + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + $i = 0; + $total = 0 ; + print '
'; + print ''; + print_liste_field_titre($langs->trans("PeriodEndDate"),$_SERVER["PHP_SELF"],"s.dateep","",$param,'width="140px"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"s.label","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("ExpectedToPay"),$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"s.rowid","",$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DatePayment"),$_SERVER["PHP_SELF"],"s.datep","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"s.amount","",$param,'align="right"',$sortfield,$sortorder); + print "\n"; + $var=1; + while ($i < $num) + { + $obj = $db->fetch_object($result); + + $total = $total + $obj->amount; + + $var=!$var; + print ""; + + print ''."\n"; + + print "\n"; + + print '"; + + // Ref payment + $sal_static->id=$obj->rowid; + $sal_static->ref=$obj->rowid; + print '\n"; + + print '\n"; + print '"; + print "\n"; + + $i++; + } + print ''; + print '"; + print ''; + print ''; + print '"; + print ""; + + print "
'.dol_print_date($db->jdate($obj->dateep),'day').'".$obj->label."'.($obj->salary?price($obj->salary):'')."'.$sal_static->getNomUrl(1)."'.dol_print_date($db->jdate($obj->datep),'day')."'.price($obj->amount)."
'.$langs->trans("Total").''."  '.price($total)."
"; + $db->free($result); + + print "
"; + } + else + { + dol_print_error($db); + } + } +} + + + llxFooter(); $db->close(); diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index 14751d308c4..6c2d9023902 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -210,6 +210,5 @@ else dol_print_error($db); } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 083aeb48986..934c970accf 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -71,7 +71,7 @@ if ($action == 'validate' && $user->rights->deplacement->creer) } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -89,7 +89,7 @@ else if ($action == 'classifyrefunded' && $user->rights->deplacement->creer) } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -104,7 +104,7 @@ else if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->depl } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -115,7 +115,7 @@ else if ($action == 'add' && $user->rights->deplacement->creer) $error=0; $object->date = dol_mktime(12, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int')); - $object->km = GETPOST('km','int'); + $object->km = price2num(GETPOST('km','alpha'), 'MU'); // Not 'int', it may be a formated amount $object->type = GETPOST('type','alpha'); $object->socid = GETPOST('socid','int'); $object->fk_user = GETPOST('fk_user','int'); @@ -125,17 +125,17 @@ else if ($action == 'add' && $user->rights->deplacement->creer) if (! $object->date) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); $error++; } if ($object->type == '-1') { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); $error++; } if (! ($object->fk_user > 0)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Person")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Person")), null, 'errors'); $error++; } @@ -150,7 +150,7 @@ else if ($action == 'add' && $user->rights->deplacement->creer) } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action='create'; } } @@ -174,7 +174,7 @@ else if ($action == 'update' && $user->rights->deplacement->creer) $result = $object->fetch($id); $object->date = dol_mktime(12, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int')); - $object->km = GETPOST('km','int'); + $object->km = price2num(GETPOST('km','alpha'), 'MU'); // Not 'int', it may be a formated amount $object->type = GETPOST('type','alpha'); $object->socid = GETPOST('socid','int'); $object->fk_user = GETPOST('fk_user','int'); @@ -190,7 +190,7 @@ else if ($action == 'update' && $user->rights->deplacement->creer) } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else @@ -240,7 +240,7 @@ if ($action == 'create') //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - print_fiche_titre($langs->trans("NewTrip")); + print load_fiche_titre($langs->trans("NewTrip")); $datec = dol_mktime(12, 0, 0, GETPOST('remonth','int'), GETPOST('reday','int'), GETPOST('reyear','int')); @@ -257,7 +257,7 @@ if ($action == 'create') print "
'.$langs->trans("Person").''; - print $form->select_dolusers(GETPOST('fk_user','int'),'fk_user',1); + print $form->select_dolusers(GETPOST('fk_user','int'), 'fk_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '
'.$langs->trans("Person").''; - print $form->select_dolusers(GETPOST('fk_user','int')?GETPOST('fk_user','int'):$object->fk_user,'fk_user',0); + print $form->select_dolusers(GETPOST('fk_user','int')?GETPOST('fk_user','int'):$object->fk_user, 'fk_user', 0, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '
'; // print ''; print ''; - print ''; - print "
'; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print '
'.$langs->tra // Company print '
'.$langs->trans("ThirdParty").''; $filter=''; -print $form->select_company($socid,'socid',$filter,1,1); +print $form->select_company($socid,'socid',$filter,1,1,0,array(),0,'','style="width: 95%"'); print '
'.$langs->trans("User").''; $include=''; if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $include='hierarchy'; -print $form->select_dolusers($userid,'userid',1,'',0,$include); +print $form->select_dolusers($userid, 'userid', 1, '', 0, $include, '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '
'.$langs->trans("Year").''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 9608bd87a0c..88be9bab0ba 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -37,11 +37,13 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture-rec.class.php'; require_once DOL_DOCUMENT_ROOT . '/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/modules/facture/modules_facture.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/discount.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmargin.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; @@ -101,7 +103,7 @@ $extrafields = new ExtraFields($db); // Load object if ($id > 0 || ! empty($ref)) { - $ret = $object->fetch($id, $ref); + $ret = $object->fetch($id, $ref, '', '', $conf->global->INVOICE_USE_SITUATION); } // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array @@ -139,7 +141,7 @@ if (empty($reshook)) header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result); exit(); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } } @@ -155,7 +157,7 @@ if (empty($reshook)) header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id); exit(); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -179,7 +181,7 @@ if (empty($reshook)) header('Location: ' . DOL_URL_ROOT . '/compta/facture/list.php'); exit(); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action=''; } } @@ -212,7 +214,7 @@ if (empty($reshook)) exit(); } } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } } @@ -234,13 +236,13 @@ if (empty($reshook)) if ($object->type == Facture::TYPE_CREDIT_NOTE) { // Si avoir, le signe doit etre negatif if ($object->total_ht >= 0) { - setEventMessage($langs->trans("ErrorInvoiceAvoirMustBeNegative"), 'errors'); + setEventMessages($langs->trans("ErrorInvoiceAvoirMustBeNegative"), null, 'errors'); $action = ''; } } else { // Si non avoir, le signe doit etre positif if (empty($conf->global->FACTURE_ENABLE_NEGATIVE) && $object->total_ht < 0) { - setEventMessage($langs->trans("ErrorInvoiceOfThisTypeMustBePositive"), 'errors'); + setEventMessages($langs->trans("ErrorInvoiceOfThisTypeMustBePositive"), null, 'errors'); $action = ''; } } @@ -269,6 +271,16 @@ if (empty($reshook)) dol_print_error($db, $object->error); } + // Multicurrency Code + else if ($action == 'setmulticurrencycode' && $user->rights->facture->creer) { + $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); + } + + // Multicurrency rate + else if ($action == 'setmulticurrencyrate' && $user->rights->facture->creer) { + $result = $object->setMulticurrencyRate(GETPOST('multicurrency_tx', 'int')); + } + else if ($action == 'setinvoicedate' && $user->rights->facture->creer) { $object->fetch($id); @@ -276,7 +288,7 @@ if (empty($reshook)) $date = dol_mktime(12, 0, 0, $_POST['invoicedatemonth'], $_POST['invoicedateday'], $_POST['invoicedateyear']); if (empty($date)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id.'&action=editinvoicedate'); exit; } @@ -310,7 +322,7 @@ if (empty($reshook)) $object->date_lim_reglement = dol_mktime(12, 0, 0, $_POST['paymenttermmonth'], $_POST['paymenttermday'], $_POST['paymenttermyear']); if ($object->date_lim_reglement < $object->date) { $object->date_lim_reglement = $object->calculate_date_lim_reglement(); - setEventMessage($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"), 'warnings'); + setEventMessages($langs->trans("DatePaymentTermCantBeLowerThanObjectDate"), null, 'warnings'); } $result = $object->update($user); if ($result < 0) @@ -353,7 +365,7 @@ if (empty($reshook)) if ($ret > 0) { $result = $object->insert_discount($_POST["remise_id"]); if ($result < 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else { dol_print_error($db, $object->error); @@ -366,7 +378,7 @@ if (empty($reshook)) $result = $discount->link_to_invoice(0, $id); if ($result < 0) { - setEventMessage($discount->error, 'errors'); + setEventMessages($discount->error, $discount->errors, 'errors'); } } } @@ -401,7 +413,7 @@ if (empty($reshook)) $langs->load("errors"); $error ++; - setEventMessage($langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId' . $i, $object->thirdparty->country_code)), 'errors'); + setEventMessages($langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId' . $i, $object->thirdparty->country_code)), null, 'errors'); } } @@ -417,7 +429,7 @@ if (empty($reshook)) { if (! $idwarehouse || $idwarehouse == - 1) { $error ++; - setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $action = ''; } } @@ -447,8 +459,8 @@ if (empty($reshook)) } else { - if (count($object->errors)) setEventMessage($object->errors, 'errors'); - else setEventMessage($object->error, 'errors'); + if (count($object->errors)) setEventMessages(null, $object->errors, 'errors'); + else setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -476,7 +488,7 @@ if (empty($reshook)) { if (! $idwarehouse || $idwarehouse == - 1) { $error ++; - setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $action = ''; } } @@ -510,7 +522,7 @@ if (empty($reshook)) if ($resteapayer == $object->total_ttc && $object->paye == 0 && $ventilExportCompta == 0) { $result=$object->set_draft($user, $idwarehouse); - if ($result<0) setEventMessage($object->error,'errors'); + if ($result<0) setEventMessages($object->error, $object->errors, 'errors'); // Define output language @@ -538,7 +550,7 @@ if (empty($reshook)) { $object->fetch($id); $result = $object->set_paid($user); - if ($result<0) setEventMessage($object->error,'errors'); + if ($result<0) setEventMessages($object->error, $object->errors, 'errors'); } // Classif "paid partialy" else if ($action == 'confirm_paid_partially' && $confirm == 'yes' && $user->rights->facture->paiement) { @@ -547,9 +559,9 @@ if (empty($reshook)) $close_note = $_POST["close_note"]; if ($close_code) { $result = $object->set_paid($user, $close_code, $close_note); - if ($result<0) setEventMessage($object->error,'errors'); + if ($result<0) setEventMessages($object->error, $object->errors, 'errors'); } else { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); } } // Classify "abandoned" else if ($action == 'confirm_canceled' && $confirm == 'yes') { @@ -558,9 +570,9 @@ if (empty($reshook)) $close_note = $_POST["close_note"]; if ($close_code) { $result = $object->set_canceled($user, $close_code, $close_note); - if ($result<0) setEventMessage($object->error,'errors'); + if ($result<0) setEventMessages($object->error, $object->errors, 'errors'); } else { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); } } @@ -602,7 +614,7 @@ if (empty($reshook)) elseif ($object->type == Facture::TYPE_DEPOSIT) $discount->description = '(DEPOSIT)'; else { - setEventMessage($langs->trans('CantConvertToReducAnInvoiceOfThisType'),'errors'); + setEventMessages($langs->trans('CantConvertToReducAnInvoiceOfThisType'), null, 'errors'); } $discount->tva_tx = abs($object->total_ttc); $discount->fk_soc = $object->socid; @@ -635,13 +647,13 @@ if (empty($reshook)) } else { - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } } else { - setEventMessage($discount->error,'errors'); + setEventMessages($discount->error, $discount->errors, 'errors'); $db->rollback(); } } @@ -670,12 +682,12 @@ if (empty($reshook)) if (empty($dateinvoice)) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); } if (! ($_POST['fac_replacement'] > 0)) { $error ++; - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ReplaceInvoice")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ReplaceInvoice")), null, 'errors'); } if (! $error) { @@ -697,14 +709,16 @@ if (empty($reshook)) $object->remise_percent = $_POST['remise_percent']; $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); - + $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); + $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); + // Proprietes particulieres a facture de remplacement $object->fk_facture_source = $_POST['fac_replacement']; $object->type = Facture::TYPE_REPLACEMENT; $id = $object->createFromCurrent($user); if ($id <= 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -712,17 +726,18 @@ if (empty($reshook)) // Credit note invoice if ($_POST['type'] == Facture::TYPE_CREDIT_NOTE) { - if (! ($_POST['fac_avoir'] > 0)) + $sourceinvoice = GETPOST('fac_avoir'); + if (! ($sourceinvoice > 0) && empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) { $error ++; - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CorrectInvoice")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CorrectInvoice")), null, 'errors'); } $dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); if (empty($dateinvoice)) { $error ++; - setEventMessage($langs->trans("ErrorFieldRequired", $langs->trans("Date")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Date")), null, 'errors'); } if (! $error) @@ -743,9 +758,11 @@ if (empty($reshook)) $object->remise_percent = $_POST['remise_percent']; $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); - + $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); + $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); + // Proprietes particulieres a facture avoir - $object->fk_facture_source = $_POST['fac_avoir']; + $object->fk_facture_source = $sourceinvoice > 0 ? $sourceinvoice : ''; $object->type = Facture::TYPE_CREDIT_NOTE; $id = $object->create($user); @@ -808,13 +825,13 @@ if (empty($reshook)) } // Standard invoice or Deposit invoice created from a Predefined invoice - if (($_POST['type'] == Facture::TYPE_STANDARD || $_POST['type'] == Facture::TYPE_DEPOSIT) && $_POST['fac_rec'] > 0) + if (($_POST['type'] == Facture::TYPE_STANDARD || $_POST['type'] == Facture::TYPE_DEPOSIT) && GETPOST('fac_rec') > 0) { $dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); if (empty($dateinvoice)) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); } if (! $error) @@ -828,28 +845,30 @@ if (empty($reshook)) $object->ref_client = $_POST['ref_client']; $object->ref_int = $_POST['ref_int']; $object->modelpdf = $_POST['model']; - + $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); + $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); + // Source facture - $object->fac_rec = $_POST['fac_rec']; + $object->fac_rec = GETPOST('fac_rec'); $id = $object->create($user); } } // Standard or deposit or proforma invoice - if (($_POST['type'] == Facture::TYPE_STANDARD || $_POST['type'] == Facture::TYPE_DEPOSIT || $_POST['type'] == Facture::TYPE_PROFORMA || ($_POST['type'] == Facture::TYPE_SITUATION && empty($_POST['situations']))) && $_POST['fac_rec'] <= 0) + if (($_POST['type'] == Facture::TYPE_STANDARD || $_POST['type'] == Facture::TYPE_DEPOSIT || $_POST['type'] == Facture::TYPE_PROFORMA || ($_POST['type'] == Facture::TYPE_SITUATION && empty($_POST['situations']))) && GETPOST('fac_rec') <= 0) { if (GETPOST('socid', 'int') < 1) { $error ++; - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), null, 'errors'); } $dateinvoice = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); if (empty($dateinvoice)) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); } if (! $error) @@ -873,6 +892,8 @@ if (empty($reshook)) $object->remise_percent = $_POST['remise_percent']; $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); + $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); + $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); if (GETPOST('type') == Facture::TYPE_SITUATION) { @@ -977,7 +998,7 @@ if (empty($reshook)) $amountdeposit = ($totalamount * $valuedeposit) / 100; } } else { - setEventMessage($srcobject->error, 'errors'); + setEventMessages($srcobject->error, $srcobject->errors, 'errors'); $error ++; } } @@ -1052,7 +1073,7 @@ if (empty($reshook)) if ($discountid > 0) { $result = $object->insert_discount($discountid); // This include link_to_invoice } else { - setEventMessage($discount->error, 'errors'); + setEventMessages($discount->error, $discount->errors, 'errors'); $error ++; break; } @@ -1117,12 +1138,12 @@ if (empty($reshook)) if ($reshook < 0) $error ++; } else { - setEventMessage($srcobject->error, 'errors'); + setEventMessages($srcobject->error, $srcobject->errors, 'errors'); $error ++; } } } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $error ++; } } // If some invoice's lines already known @@ -1160,6 +1181,18 @@ if (empty($reshook)) $object->fk_facture_source = $_POST['situations']; $object->type = Facture::TYPE_SITUATION; + if (!empty($origin) && !empty($originid)) + { + $object->origin = $origin; + $object->origin_id = $originid; + + foreach ($object->lines as &$line) + { + $line->origin = $object->origin; + $line->origin_id = $line->id; + } + } + $object->fetch_thirdparty(); $object->date = $datefacture; $object->note_public = trim($_POST['note_public']); @@ -1235,29 +1268,29 @@ if (empty($reshook)) } if (empty($idprod) && ($price_ht < 0) && ($qty < 0)) { - setEventMessage($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), 'errors'); + setEventMessages($langs->trans('ErrorBothFieldCantBeNegative', $langs->transnoentitiesnoconv('UnitPriceHT'), $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error ++; } if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && GETPOST('type') < 0) { - setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors'); $error ++; } if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && (! ($price_ht >= 0) || $price_ht == '')) // Unit price can be 0 but not '' { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); $error ++; } if ($qty == '') { - setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error ++; } if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && empty($product_desc)) { - setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), null, 'errors'); $error ++; } if ($qty < 0) { $langs->load("errors"); - setEventMessage($langs->trans('ErrorQtyForCustomerInvoiceCantBeNegative'), 'errors'); + setEventMessages($langs->trans('ErrorQtyForCustomerInvoiceCantBeNegative'), null, 'errors'); $error ++; } if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) { @@ -1282,7 +1315,8 @@ if (empty($reshook)) // Ecrase $txtva par celui du produit // Ecrase $base_price_type par celui du produit // Replaces $fk_unit with the product's - if (! empty($idprod)) { + if (! empty($idprod)) + { $prod = new Product($db); $prod->fetch($idprod); @@ -1303,8 +1337,11 @@ if (empty($reshook)) $pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level]; $price_min = $prod->multiprices_min[$object->thirdparty->price_level]; $price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level]; - if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->thirdparty->price_level]; - if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->thirdparty->price_level]; + if (! empty($conf->global->PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL)) // using this option is a bug. kept for backward compatibility + { + if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->thirdparty->price_level]; + if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->thirdparty->price_level]; + } } elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { @@ -1317,26 +1354,30 @@ if (empty($reshook)) $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); if ($result) { if (count($prodcustprice->lines) > 0) { - $pu_ht = price($prodcustprice->lines [0]->price); - $pu_ttc = price($prodcustprice->lines [0]->price_ttc); - $price_base_type = $prodcustprice->lines [0]->price_base_type; - $prod->tva_tx = $prodcustprice->lines [0]->tva_tx; + $pu_ht = price($prodcustprice->lines[0]->price); + $pu_ttc = price($prodcustprice->lines[0]->price_ttc); + $price_base_type = $prodcustprice->lines[0]->price_base_type; + $prod->tva_tx = $prodcustprice->lines[0]->tva_tx; } } } - // if price ht is forced (ie: calculated by margin rate and cost price) - if (! empty($price_ht)) { + // if price ht was forced (ie: from gui when calculated by margin rate and cost price) + if (! empty($price_ht)) + { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num($pu_ht * (1 + ($tva_tx / 100)), 'MU'); } - // On reevalue prix selon taux tva car taux tva transaction peut etre different // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). - elseif ($tva_tx != $prod->tva_tx) { - if ($price_base_type != 'HT') { + elseif ($tva_tx != $prod->tva_tx) + { + if ($price_base_type != 'HT') + { $pu_ht = price2num($pu_ttc / (1 + ($tva_tx / 100)), 'MU'); - } else { + } + else + { $pu_ttc = price2num($pu_ht * (1 + ($tva_tx / 100)), 'MU'); } } @@ -1391,19 +1432,19 @@ if (empty($reshook)) // Margin $fournprice = price2num(GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : ''); - $buyingprice = price2num(GETPOST('buying_price' . $predef) ? GETPOST('buying_price' . $predef) : ''); + $buyingprice = price2num(GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''); // If buying_price is '0', we must keep this value // Local Taxes - $localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty); - $localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty); - + $localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty, $mysoc); + $localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty, $mysoc); + $info_bits = 0; if ($tva_npr) $info_bits |= 0x01; if (! empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min))) { $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)); - setEventMessage($mesg, 'errors'); + setEventMessages($mesg, null, 'errors'); } else { // Insert line $result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $date_start, $date_end, 0, $info_bits, '', $price_base_type, $pu_ttc, $type, - 1, $special_code, '', 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_options, $_POST['progress'], '', $fk_unit); @@ -1463,7 +1504,7 @@ if (empty($reshook)) unset($_POST['situations']); unset($_POST['progress']); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } $action = ''; @@ -1481,11 +1522,11 @@ if (empty($reshook)) $date_end = ''; $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); $date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); - $description = dol_htmlcleanlastbr(GETPOST('product_desc')); + $description = dol_htmlcleanlastbr(GETPOST('product_desc') ? GETPOST('product_desc') : GETPOST('desc')); $pu_ht = GETPOST('price_ht'); $vat_rate = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); $qty = GETPOST('qty'); - + // Define info_bits $info_bits = 0; if (preg_match('/\*/', $vat_rate)) @@ -1498,8 +1539,8 @@ if (empty($reshook)) // Add buying price $fournprice = price2num(GETPOST('fournprice') ? GETPOST('fournprice') : ''); - $buyingprice = price2num(GETPOST('buying_price') ? GETPOST('buying_price') : ''); - + $buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value + // Extrafields $extrafieldsline = new ExtraFields($db); $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); @@ -1545,7 +1586,7 @@ if (empty($reshook)) // Check price is not lower than minimum (check is done only for standard or replacement invoices) if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT) && $price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min))) { - setEventMessage($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), 'errors'); + setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors'); $error ++; } } else { @@ -1554,13 +1595,13 @@ if (empty($reshook)) // Check parameters if (GETPOST('type') < 0) { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); $error ++; } } if ($qty < 0) { $langs->load("errors"); - setEventMessage($langs->trans('ErrorQtyForCustomerInvoiceCantBeNegative'), 'errors'); + setEventMessages($langs->trans('ErrorQtyForCustomerInvoiceCantBeNegative'), null, 'errors'); $error ++; } @@ -1624,7 +1665,7 @@ if (empty($reshook)) unset($_POST['situations']); unset($_POST['progress']); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } @@ -1718,66 +1759,11 @@ if (empty($reshook)) $upload_dir = $conf->facture->dir_output; $file = $upload_dir . '/' . GETPOST('file'); $ret = dol_delete_file($file, 0, 0, 0, $object); - if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); - else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); $action = ''; } - } - - include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; - - if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->facture->creer) - { - if ($action == 'addcontact') - { - $result = $object->fetch($id); - - if ($result > 0 && $id > 0) { - $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); - $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]); - } - - if ($result >= 0) { - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); - exit(); - } else { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - $langs->load("errors"); - setEventMessage($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), 'errors'); - } else { - setEventMessage($object->error, 'errors'); - } - } - } - - // bascule du statut d'un contact - else if ($action == 'swapstatut') - { - if ($object->fetch($id)) { - $result = $object->swapContactStatus(GETPOST('ligne')); - } else { - dol_print_error($db); - } - } - - // Efface un contact - else if ($action == 'deletecontact') - { - $object->fetch($id); - $result = $object->delete_contact($lineid); - - if ($result >= 0) { - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); - exit(); - } else { - dol_print_error($db); - } - } - } - - - if ($action == 'update_extras') - { + } elseif ($action == 'update_extras') { // Fill array 'array_options' with data from add form $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute')); @@ -1789,9 +1775,9 @@ if (empty($reshook)) $hookmanager->initHooks(array('invoicedao')); $parameters = array('id' => $object->id); $reshook = $hookmanager->executeHooks('insertExtraFields', $parameters, $object, $action); // Note that $action and $object may have been modified by - // some hooks + // some hooks if (empty($reshook)) { - $result = $object->insertExtraFields(); + $result = $object->insertExtraFields(); if ($result < 0) { $error ++; } @@ -1802,6 +1788,52 @@ if (empty($reshook)) if ($error) $action = 'edit_extras'; } + + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; + + if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->facture->creer) { + if ($action == 'addcontact') { + $result = $object->fetch($id); + + if ($result > 0 && $id > 0) { + $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); + $result = $object->add_contact($contactid, $_POST["type"], $_POST["source"]); + } + + if ($result >= 0) { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit(); + } else { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + } // bascule du statut d'un contact + elseif ($action == 'swapstatut') { + if ($object->fetch($id)) { + $result = $object->swapContactStatus(GETPOST('ligne')); + } else { + dol_print_error($db); + } + } // Efface un contact + elseif ($action == 'deletecontact') { + $object->fetch($id); + $result = $object->delete_contact($lineid); + + if ($result >= 0) { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit(); + } else { + dol_print_error($db); + } + } + + if ($error) + $action = 'edit_extras'; + } } @@ -1812,6 +1844,8 @@ if (empty($reshook)) $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); +$formmargin = new FormMargin($db); +$paymentstatic=new Paiement($db); $bankaccountstatic = new Account($db); if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } @@ -1834,13 +1868,17 @@ if ($action == 'create') $facturestatic = new Facture($db); $extralabels = $extrafields->fetch_name_optionals_label($facturestatic->table_element); - print_fiche_titre($langs->trans('NewBill')); + print load_fiche_titre($langs->trans('NewBill')); $soc = new Societe($db); if ($socid > 0) $res = $soc->fetch($socid); + $currency_code = $conf->currency; + // Load objectsrc + $remise_absolue = 0; + if (! empty($origin) && ! empty($originid)) { // Parse element/subelement (ex: project_task) @@ -1852,6 +1890,20 @@ if ($action == 'create') if ($element == 'project') { $projectid = $originid; + + if (!$cond_reglement_id) { + $cond_reglement_id = $soc->cond_reglement_id; + } + if (!$mode_reglement_id) { + $mode_reglement_id = $soc->mode_reglement_id; + } + if (!$remise_percent) { + $remise_percent = $soc->remise_percent; + } + if (!$dateinvoice) { + // Do not set 0 here (0 for a date is 1970) + $dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice); + } } else { // For compatibility if ($element == 'order' || $element == 'commande') { @@ -1892,11 +1944,16 @@ if ($action == 'create') $remise_absolue = (! empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(! empty($soc->remise_absolue)?$soc->remise_absolue:0)); $dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice); + if (!empty($conf->multicurrency->enabled)) + { + if (!empty($objectsrc->multicurrency_code)) $currency_code = $objectsrc->multicurrency_code; + if (!empty($conf->global->MULTICURRENCY_USE_ORIGIN_TX) && !empty($objectsrc->multicurrency_tx)) $currency_tx = $objectsrc->multicurrency_tx; + } + // Replicate extrafields $objectsrc->fetch_optionals($originid); $object->array_options = $objectsrc->array_options; } - $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE) ? -1 : ''; // Dot not set 0 here (0 for a date is 1970) } else { @@ -1906,7 +1963,10 @@ if ($action == 'create') $remise_percent = $soc->remise_percent; $remise_absolue = 0; $dateinvoice = (empty($dateinvoice)?(empty($conf->global->MAIN_AUTOFILL_DATE)?-1:''):$dateinvoice); // Do not set 0 here (0 for a date is 1970) + + if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; } + $absolute_discount = $soc->getAvailableDiscounts(); if (! empty($conf->use_javascript_ajax)) @@ -1927,7 +1987,8 @@ if ($action == 'create') print ''; print ''; print ''; - + if (!empty($currency_tx)) print ''; + dol_fiche_head(''); print ''; @@ -1937,7 +1998,7 @@ if ($action == 'create') // Thirdparty print ''; - if ($soc->id > 0) + if ($soc->id > 0 && ! GETPOST('fac_rec')) { print ''; } print '' . "\n"; // Predefined invoices - if (empty($origin) && empty($originid) && $socid > 0) + if (empty($origin) && empty($originid) && GETPOST('fac_rec','int') > 0) { + $invoice_predefined = new FactureRec($db); + $invoice_predefined->fetch(GETPOST('fac_rec','int')); + $sql = 'SELECT r.rowid, r.titre, r.total_ttc'; $sql .= ' FROM ' . MAIN_DB_PREFIX . 'facture_rec as r'; - $sql .= ' WHERE r.fk_soc = ' . $soc->id; + $sql .= ' WHERE r.fk_soc = ' . $invoice_predefined->socid; $resql = $db->query($sql); if ($resql) @@ -2032,7 +2109,7 @@ if ($action == 'create') $newinvoice_static->paye = $valarray ['paye']; $optionsav .= ''; + print ''; + print ''; + } + // Public note print ''; print ''; print ''; print ''; print ''; @@ -2380,6 +2459,13 @@ if ($action == 'create') print '"; } print '"; + + if (!empty($conf->multicurrency->enabled)) + { + print ''; + print '"; + print '"; + } } else { @@ -2452,7 +2538,7 @@ if ($action == 'create') print '
'; $title = $langs->trans('ProductsAndServices'); - print_titre($title); + print load_fiche_titre($title); print '
' . $langs->trans('Customer') . ''; print $soc->getNomUrl(1); @@ -1957,17 +2018,33 @@ if ($action == 'create') else { print ''; - print $form->select_company('', 'socid', 's.client = 1 OR s.client = 3', 1); + print $form->select_company($soc->id, 'socid', '(s.client = 1 OR s.client = 3) AND status=1', 1); + // Option to reload page to retrieve customer informations. Note, this clear other input + if (!empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE)) + { + print ''; + } print '
'.fieldLabel('Currency','multicurrency_code').''; + print $form->selectMultiCurrency($currency_code, 'multicurrency_code'); + print '
' . $langs->trans('NotePublic') . ''; - $note_public = ''; - if (is_object($objectsrc)) // Take value from source object - { - $note_public = $objectsrc->note_public; - } + $note_public = $object->getDefaultCreateValueFor('note_public', (is_object($objectsrc)?$objectsrc->note_public:null)); $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); @@ -2308,11 +2391,7 @@ if ($action == 'create') print '
' . $langs->trans('NotePrivate') . ''; - $note_private = ''; - if (! empty($origin) && ! empty($originid) && is_object($objectsrc)) // Take value from source object - { - $note_private = $objectsrc->note_private; - } + $note_private = $object->getDefaultCreateValueFor('note_private', ((! empty($origin) && ! empty($originid) && is_object($objectsrc))?$objectsrc->note_private:null)); $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); // print ' @@ -2359,12 +2438,12 @@ if ($action == 'create') } print '
' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1); - //We check if Origin document has already an invoice attached to it - $objectsrc->fetchObjectLinked($originid,'','','facture'); + // We check if Origin document (id and type is known) has already at least one invoice attached to it + $objectsrc->fetchObjectLinked($originid,$origin,'','facture'); $cntinvoice=count($objectsrc->linkedObjects['facture']); if ($cntinvoice>=1) { - setEventMessage('WarningBillExist','warnings'); + setEventMessages('WarningBillExist', null, 'warnings'); echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['facture'])->getNomUrl(1).')'; } echo '
' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2) . "
' . $langs->trans('TotalTTC') . '' . price($objectsrc->total_ttc) . "
' . $langs->trans('MulticurrencyTotalHT') . '' . price($objectsrc->multicurrency_total_ht) . '
' . $langs->trans('MulticurrencyTotalVAT') . '' . price($objectsrc->multicurrency_total_tva) . "
' . $langs->trans('MulticurrencyTotalTTC') . '' . price($objectsrc->multicurrency_total_ttc) . "
'; @@ -2810,11 +2896,11 @@ else if ($id > 0 || ! empty($ref)) print ''; print ''; + print ''; print '
' . $langs->trans('Company') . ''; if (! empty($conf->global->FACTURE_CHANGE_THIRDPARTY) && $action != 'editthirdparty' && $object->brouillon && $user->rights->facture->creer) - print 'id . '">' . img_edit($langs->trans('SetLinkToThirdParty'), 1) . 'id . '">' . img_edit($langs->trans('SetLinkToAnotherThirdParty'), 1) . '
'; print '
'; if ($action == 'editthirdparty') { - $form->form_thirdparty($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, 'socid'); + $form->form_thirdparty($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, 'socid','client>0'); } else { print '  ' . $soc->getNomUrl(1, 'compta'); print '   '; @@ -2841,7 +2927,7 @@ else if ($id > 0 || ! empty($ref)) $facreplaced->fetch($object->fk_facture_source); print ' (' . $langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)) . ')'; } - if ($object->type == Facture::TYPE_CREDIT_NOTE) { + if ($object->type == Facture::TYPE_CREDIT_NOTE && !empty($object->fk_facture_source)) { $facusing = new Facture($db); $facusing->fetch($object->fk_facture_source); print ' (' . $langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)) . ')'; @@ -2953,7 +3039,7 @@ else if ($id > 0 || ! empty($ref)) print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer) + if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer && empty($conf->global->FAC_FORCE_DATE_VALIDATION)) print ''; print '
'; print $langs->trans('Date'); print 'id . '">' . img_edit($langs->trans('SetDate'), 1) . '
'; print '
'; @@ -2991,25 +3077,116 @@ else if ($id > 0 || ! empty($ref)) print ''; - print ''; + if ($object->type == Facture::TYPE_SITUATION && !empty($conf->global->INVOICE_USE_SITUATION)) + { + if (count($object->tab_previous_situation_invoice) > 0 || count($object->tab_next_situation_invoice) > 0) print '
'; + + if (count($object->tab_previous_situation_invoice) > 0) + { + //List of previous invoices + print ''; + print ''; + print ''; + if (! empty($conf->banque->enabled)) + print ''; + print ''; + print ''; + print ''; + print ''; + + $total_prev_ht = $total_prev_ttc = 0; + $var = true; + foreach ($object->tab_previous_situation_invoice as $prev_invoice) + { + $totalpaye = $prev_invoice->getSommePaiement(); + $total_prev_ht += $prev_invoice->total_ht; + $total_prev_ttc += $prev_invoice->total_ttc; + print ''; + print ''; + print ''; + if (! empty($conf->banque->enabled)) + print ''; + print ''; + print ''; + print ''; + print ''; + + $var = !$var; + } + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + } + + if (count($object->tab_next_situation_invoice) > 0) + { + //List of next invoices + print ''; + print ''; + print ''; + if (! empty($conf->banque->enabled)) + print ''; + print ''; + print ''; + print ''; + print ''; + + $total_next_ht = $total_next_ttc = 0; + + $var = true; + foreach ($object->tab_next_situation_invoice as $next_invoice) + { + $totalpaye = $next_invoice->getSommePaiement(); + $total_next_ht += $next_invoice->total_ht; + $total_next_ttc += $next_invoice->total_ttc; + print ''; + print ''; + print ''; + if (! empty($conf->banque->enabled)) + print ''; + print ''; + print ''; + print ''; + print ''; + + $var = !$var; + } + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + } + + if (count($object->tab_previous_situation_invoice) > 0 || count($object->tab_next_situation_invoice) > 0) print '
' . $langs->trans('ListOfPreviousSituationInvoices') . '' . $langs->trans('AmountHT') . '' . $langs->trans('AmountTTC') . ' 
'.$prev_invoice->getNomUrl(1).'' . price($prev_invoice->total_ht) . '' . price($prev_invoice->total_ttc) . ''.$prev_invoice->getLibStatut(3, $totalpaye).'
' . price($total_prev_ht) . '' . price($total_prev_ttc) . ' 
' . $langs->trans('ListOfNextSituationInvoices') . '' . $langs->trans('AmountHT') . '' . $langs->trans('AmountTTC') . ' 
'.$next_invoice->getNomUrl(1).'' . price($next_invoice->total_ht) . '' . price($next_invoice->total_ttc) . ''.$next_invoice->getLibStatut(3, $totalpaye).'
' . price($total_next_ht) . '' . price($total_next_ttc) . ' 
'; + } + + print ''; // List of payments already done print ''; - print ''; - print ''; + print ''; + print ''; + print ''; if (! empty($conf->banque->enabled)) - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; $var = true; // Payments already done (from payment on this invoice) - $sql = 'SELECT p.datep as dp, p.num_paiement, p.rowid, p.fk_bank,'; + $sql = 'SELECT p.datep as dp, p.ref, p.num_paiement, p.rowid, p.fk_bank,'; $sql .= ' c.code as payment_code, c.libelle as payment_label,'; $sql .= ' pf.amount,'; - $sql .= ' ba.rowid as baid, ba.ref, ba.label'; + $sql .= ' ba.rowid as baid, ba.ref as baref, ba.label'; $sql .= ' FROM ' . MAIN_DB_PREFIX . 'c_paiement as c, ' . MAIN_DB_PREFIX . 'paiement_facture as pf, ' . MAIN_DB_PREFIX . 'paiement as p'; $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'bank as b ON p.fk_bank = b.rowid'; $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'bank_account as ba ON b.fk_account = ba.rowid'; @@ -3031,15 +3208,21 @@ else if ($id > 0 || ! empty($ref)) $objp = $db->fetch_object($result); $var = ! $var; print ''; + $paymentstatic->id=$objp->rowid; + $paymentstatic->datepaye=$db->jdate($objp->dp); + $paymentstatic->ref=$objp->ref; + $paymentstatic->num_paiement=$objp->num_paiement; + $paymentstatic->payment_code=$objp->payment_code; + print $paymentstatic->getNomUrl(1); + print ''; + print ''; $label = ($langs->trans("PaymentType" . $objp->payment_code) != ("PaymentType" . $objp->payment_code)) ? $langs->trans("PaymentType" . $objp->payment_code) : $objp->payment_label; print ''; if (! empty($conf->banque->enabled)) { $bankaccountstatic->id = $objp->baid; - $bankaccountstatic->ref = $objp->ref; - $bankaccountstatic->label = $objp->ref; + $bankaccountstatic->ref = $objp->baref; + $bankaccountstatic->label = $objp->baref; print ''; + print ''; } // } $db->free($result); @@ -3186,7 +3369,7 @@ else if ($id > 0 || ! empty($ref)) if (! empty($conf->margin->enabled)) { print '
'; - $object->displayMarginInfos($object->statut > 0); + $formmargin->displayMarginInfos($object, $object->statut > 0); } print ''; @@ -3227,8 +3410,9 @@ else if ($id > 0 || ! empty($ref)) $form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm'); } else { print dol_print_date($object->date_lim_reglement, 'daytext'); - if ($object->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $object->paye && $object->statut == 1 && ! isset($object->am)) + if ($object->hasDelay()) { print img_warning($langs->trans('Late')); + } } } else { print ' '; @@ -3254,6 +3438,44 @@ else if ($id > 0 || ! empty($ref)) } print ''; + // Multicurrency + if (! empty($conf->multicurrency->enabled)) + { + // Multicurrency code + print ''; + print ''; + + // Multicurrency rate + print ''; + print ''; + } + // Bank Account print ''; print '
' . ($object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')) . '' . $langs->trans('Type') . '' . ($object->type == Facture::TYPE_CREDIT_NOTE ? $langs->trans("PaymentsBack") : $langs->trans('Payments')) . '' . $langs->trans('Date') . '' . $langs->trans('Type') . '' . $langs->trans('BankAccount') . '' . $langs->trans('Amount') . ' ' . $langs->trans('BankAccount') . '' . $langs->trans('Amount') . ' 
'; - print '' . img_object($langs->trans('ShowPayment'), 'payment') . ' '; - print dol_print_date($db->jdate($objp->dp), 'day') . ''.dol_print_date($db->jdate($objp->dp), 'day') . '' . $label . ' ' . $objp->num_paiement . ''; if ($bankaccountstatic->id) print $bankaccountstatic->getNomUrl(1, 'transactions'); @@ -3051,7 +3234,7 @@ else if ($id > 0 || ! empty($ref)) $i ++; } } else { - print '
' . $langs->trans("None") . '
' . $langs->trans("None") . '
'; + print ''; + if ($action != 'editmulticurrencycode' && ! empty($object->brouillon)) + print ''; + print '
'; + print fieldLabel('Currency','multicurrency_code'); + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; + print '
'; + if ($action == 'editmulticurrencycode') { + $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'multicurrency_code'); + } else { + $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, 'none'); + } + print '
'; + print ''; + if ($action != 'editmulticurrencyrate' && ! empty($object->brouillon)) + print ''; + print '
'; + print fieldLabel('Rate','multicurrency_tx'); + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '
'; + print '
'; + if ($action == 'editmulticurrencyrate') { + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'multicurrency_tx'); + } else { + $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none'); + } + print '
'; print ''; + if (!empty($conf->multicurrency->enabled)) + { + // Multicurrency Amount HT + print ''; + print ''; + print ''; + + // Multicurrency Amount VAT + print ''; + print ''; + print ''; + + // Multicurrency Amount TTC + print ''; + print ''; + print ''; + } + // Statut print ''; print ''; @@ -3548,7 +3788,7 @@ else if ($id > 0 || ! empty($ref)) if ($resteapayer == $object->total_ttc && empty($object->paye) && $ventilExportCompta == 0) { - if (! $objectidnext && $object->is_last_in_cycle()) + if (! $objectidnext) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->creer)) || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->facture->invoice_advance->unvalidate))) @@ -3639,7 +3879,7 @@ else if ($id > 0 || ! empty($ref)) } else { - print ''; + print ''; } } @@ -3694,6 +3934,15 @@ else if ($id > 0 || ! empty($ref)) print ''; } } + + // Create a credit note + if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $user->rights->facture->creer) + { + if (! $objectidnext) + { + print ''; + } + } //Create next situation invoice if ($user->rights->facture->creer && ($object->type == 5) && ($object->statut == 1 || $object->statut == 2)) { @@ -3823,7 +4072,7 @@ else if ($id > 0 || ! empty($ref)) print '
'; print '
'; - print_fiche_titre($langs->trans($titreform)); + print load_fiche_titre($langs->trans($titreform)); // Cree l'objet formulaire mail dol_fiche_head(); @@ -3835,6 +4084,15 @@ else if ($id > 0 || ! empty($ref)) $formmail->fromid = $user->id; $formmail->fromname = $user->getFullName($langs); $formmail->frommail = $user->email; + if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 1)) // If bit 1 is set + { + $formmail->trackid='inv'.$object->id; + } + if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set + { + include DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $formmail->frommail=dolAddEmailTrackId($formmail->frommail, 'inv'.$object->id); + } $formmail->withfrom = 1; $liste = array(); foreach ($object->thirdparty->thirdparty_and_contact_email_array(1) as $key => $value) { @@ -3844,9 +4102,9 @@ else if ($id > 0 || ! empty($ref)) $formmail->withtocc = $liste; // List suggested for CC $formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC; if (empty($object->ref_client)) { - $formmail->withtopic = $outputlangs->transnoentities($topicmail, '__FACREF__'); + $formmail->withtopic = $outputlangs->transnoentities($topicmail, '__REF__'); } else if (! empty($object->ref_client)) { - $formmail->withtopic = $outputlangs->transnoentities($topicmail, '__FACREF__ (__REFCLIENT__)'); + $formmail->withtopic = $outputlangs->transnoentities($topicmail, '__REF__ (__REFCLIENT__)'); } $formmail->withfile = 2; @@ -3854,7 +4112,7 @@ else if ($id > 0 || ! empty($ref)) $formmail->withdeliveryreceipt = 1; $formmail->withcancel = 1; // Tableau des substitutions - $formmail->substit['__FACREF__'] = $object->ref; + $formmail->substit['__REF__'] = $object->ref; $formmail->substit['__SIGNATURE__'] = $user->signature; $formmail->substit['__REFCLIENT__'] = $object->ref_client; $formmail->substit['__THIRDPARTY_NAME__'] = $object->thirdparty->name; diff --git a/htdocs/compta/facture/admin/facture_cust_extrafields.php b/htdocs/compta/facture/admin/facture_cust_extrafields.php index b9dce92e80f..ae545c695c3 100644 --- a/htdocs/compta/facture/admin/facture_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_cust_extrafields.php @@ -65,7 +65,8 @@ $textobject=strtolower($langs->transnoentitiesnoconv("BillsCustomers")); llxHeader('',$langs->trans("BillsSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("BillsSetup"),$linkback,'title_setup'); + +print load_fiche_titre($langs->trans("BillsSetup"),$linkback,'title_setup'); $head = invoice_admin_prepare_head(); @@ -86,30 +87,30 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ -/* */ -/* Creation d'un champ optionnel -/* */ +/* */ +/* Creation of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'create') { print "
"; - print_titre($langs->trans('NewAttribute')); + print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } /* ************************************************************************** */ -/* */ -/* Edition d'un champ optionnel */ -/* */ +/* */ +/* Edition of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) { $langs->load("members"); print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; } diff --git a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php index addc23a8378..d7fd3367b67 100644 --- a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php @@ -66,7 +66,8 @@ $textobject=strtolower($langs->transnoentitiesnoconv("BillsCustomers")); llxHeader('',$langs->trans("BillsSetup")); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("BillsSetup"),$linkback,'title_setup'); + +print load_fiche_titre($langs->trans("BillsSetup"),$linkback,'title_setup'); $head = invoice_admin_prepare_head(); @@ -95,7 +96,7 @@ if ($action != 'create' && $action != 'edit') if ($action == 'create') { print "
"; - print_titre($langs->trans('NewAttribute')); + print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } @@ -108,7 +109,7 @@ if ($action == 'create') if ($action == 'edit' && ! empty($attrname)) { print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; } diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 7d0de20ce0b..f2ef90677c5 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -42,35 +42,20 @@ class FactureRec extends Facture public $table_element_line='facturedet_rec'; public $fk_element='fk_facture'; - var $id; - - //! Id customer - var $socid; - //! Customer object (charging by fetch_client) - var $client; - var $number; - var $author; var $date; - var $ref; var $amount; var $remise; var $tva; var $total; - var $note_private; - var $note_public; var $db_table; var $propalid; - var $fk_project; var $rang; var $special_code; var $usenewprice=0; - var $lines=array(); - - /** * Constructor * @@ -201,10 +186,13 @@ class FactureRec extends Facture /** * Recupere l'objet facture et ses lignes de factures * - * @param int $rowid Id de la facture a recuperer - * @return int >0 si ok, <0 si ko + * @param int $rowid Id of object to load + * @param string $ref Reference of invoice + * @param string $ref_ext External reference of invoice + * @param int $ref_int Internal reference of other object + * @return int >0 if OK, <0 if KO, 0 if not found */ - function fetch($rowid) + function fetch($rowid, $ref='', $ref_ext='', $ref_int='') { $sql = 'SELECT f.titre,f.fk_soc,f.amount,f.tva,f.total,f.total_ttc,f.remise_percent,f.remise_absolue,f.remise'; $sql.= ', f.date_lim_reglement as dlr'; @@ -218,8 +206,13 @@ class FactureRec extends Facture $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON f.fk_mode_reglement = p.id'; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = f.rowid AND el.targettype = 'facture'"; $sql.= ' WHERE f.rowid='.$rowid; - - dol_syslog("FactureRec::Fetch rowid=".$rowid."", LOG_DEBUG); + if ($ref) $sql.= " AND f.titre='".$this->db->escape($ref)."'"; + /* This field are not used for template invoice + if ($ref_ext) $sql.= " AND f.ref_ext='".$this->db->escape($ref_ext)."'"; + if ($ref_int) $sql.= " AND f.ref_int='".$this->db->escape($ref_int)."'"; + */ + + dol_syslog(get_class($this)."::fetch rowid=".$rowid, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -368,32 +361,49 @@ class FactureRec extends Facture /** - * Delete current invoice + * Delete template invoice * - * @return int <0 if KO, >0 if OK + * @param int $rowid Id of invoice to delete. If empty, we delete current instance of invoice + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @param int $idwarehouse Id warehouse to use for stock change. + * @return int <0 if KO, >0 if OK */ - function delete() + function delete($rowid=0, $notrigger=0, $idwarehouse=-1) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet_rec WHERE fk_facture = ".$this->id; + if (empty($rowid)) $rowid=$this->id; + + dol_syslog(get_class($this)."::delete rowid=".$rowid, LOG_DEBUG); + + $error=0; + $this->db->begin(); + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet_rec WHERE fk_facture = ".$rowid; dol_syslog($sql); if ($this->db->query($sql)) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."facture_rec WHERE rowid = ".$this->id; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."facture_rec WHERE rowid = ".$rowid; dol_syslog($sql); - if ($this->db->query($sql)) - { - return 1; - } - else + if (! $this->db->query($sql)) { $this->error=$this->db->lasterror(); - return -1; + $error=-1; } } else { $this->error=$this->db->lasterror(); - return -2; + $error=-2; + } + + if (! $error) + { + $this->db->commit(); + return 1; + } + else + { + $this->db->rollback(); + return $error; } } @@ -420,6 +430,8 @@ class FactureRec extends Facture */ function addline($desc, $pu_ht, $qty, $txtva, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='', $fk_unit=null) { + global $mysoc; + $facid=$this->id; dol_syslog("FactureRec::addline facid=$facid,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva,fk_product=$fk_product,remise_percent=$remise_percent,date_start=$date_start,date_end=$date_end,ventil=$ventil,info_bits=$info_bits,fk_remise_except=$fk_remise_except,price_base_type=$price_base_type,pu_ttc=$pu_ttc,type=$type,fk_unit=$fk_unit", LOG_DEBUG); @@ -452,7 +464,7 @@ class FactureRec extends Facture // qty, pu, remise_percent et txtva // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, 0, 0, 0, $price_base_type, $info_bits, $type); + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, 0, 0, 0, $price_base_type, $info_bits, $type, $mysoc); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; $total_ttc = $tabprice[2]; @@ -517,61 +529,32 @@ class FactureRec extends Facture } } - - /** - * Rend la facture automatique - * - * @param User $user User object - * @param int $freq Freq - * @param string $courant Courant - * @return int 0 if OK, <0 if KO - */ - function set_auto($user, $freq, $courant) - { - if ($user->rights->facture->creer) - { - $sql = "UPDATE ".MAIN_DB_PREFIX."facture_rec "; - $sql .= " SET frequency = '".$freq."', last_gen='".$courant."'"; - $sql .= " WHERE rowid = ".$this->id; - - $resql = $this->db->query($sql); - - if ($resql) - { - $this->frequency = $freq; - $this->last_gen = $courant; - return 0; - } - else - { - dol_print_error($this->db); - return -1; - } - } - else - { - return -2; - } - } - /** * Return clicable name (with picto eventually) * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param string $option Sur quoi pointe le lien ('', 'withdraw') - * @return string Chaine avec URL + * @param int $withpicto Add picto into link + * @param string $option Where point the link + * @param int $max Maxlength of ref + * @param int $short 1=Return just URL + * @param string $moretitle Add more text to title tooltip + * @return string String with URL */ - function getNomUrl($withpicto=0,$option='') + function getNomUrl($withpicto=0,$option='',$max=0,$short=0,$moretitle='') { global $langs; $result=''; $label=$langs->trans("ShowInvoice").': '.$this->ref; - - $link = ''; + + $url = DOL_URL_ROOT.'/compta/facture/fiche-rec.php?facid='.$this->id; + + if ($short) return $url; + + $picto='bill'; + + $link = ''; $linkend=''; - $picto='bill'; if ($withpicto) $result.=($link.img_object($label, $picto, 'class="classfortooltip"').$linkend); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index eee909645d7..fe38c17ff0d 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -40,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT ."/core/class/commonobjectline.class.php"; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; require_once DOL_DOCUMENT_ROOT.'/margin/lib/margins.lib.php'; - +dol_include_once('/multicurrency/class/multicurrency.class.php'); /** * Class to manage invoices @@ -58,27 +58,16 @@ class Facture extends CommonInvoice */ protected $table_ref_field = 'facnumber'; - var $id; - //! Id client var $socid; - //! Objet societe client (to load with fetch_client method) - /** - * Customer - * @var Societe - */ - var $client; var $author; var $fk_user_author; var $fk_user_valid; - //! Invoice date - var $date; // Invoice date + var $date; // Date invoice var $date_creation; // Creation date var $date_validation; // Validation date var $datem; - var $ref; var $ref_client; - var $ref_ext; var $ref_int; //Check constants for types var $type = self::TYPE_STANDARD; @@ -90,20 +79,7 @@ class Facture extends CommonInvoice var $total_tva=0; var $total_ttc=0; var $revenuestamp; - /** - * @deprecated - * @see note_private, note_public - */ - var $note; - var $note_private; - var $note_public; - /** - * Invoice status - * @var int - * @see Facture::STATUS_DRAFT, Facture::STATUS_VALIDATED, Facture::STATUS_PAID, Facture::STATUS_ABANDONED - */ - var $statut; //! Fermeture apres paiement partiel: discount_vat, badcustomer, abandon //! Fermeture alors que aucun paiement: replaced (si remplace), abandon var $close_code; @@ -113,18 +89,11 @@ class Facture extends CommonInvoice var $paye; //! id of source invoice if replacement invoice or credit note var $fk_facture_source; - var $origin; - var $origin_id; var $linked_objects=array(); - var $fk_project; var $date_lim_reglement; - var $cond_reglement_id; // Id in llx_c_paiement var $cond_reglement_code; // Code in llx_c_paiement - var $mode_reglement_id; // Id in llx_c_paiement var $mode_reglement_code; // Code in llx_c_paiement - var $fk_account; // Id of bank account var $fk_bank; // Field to store bank id to use when payment mode is withdraw - var $modelpdf; /** * @deprecated */ @@ -138,11 +107,14 @@ class Facture extends CommonInvoice var $specimen; var $fac_rec; - - //Incoterms - var $fk_incoterms; - var $location_incoterms; - var $libelle_incoterms; //Used into tooltip + + // Multicurrency + var $fk_multicurrency; + var $multicurrency_code; + var $multicurrency_tx; + var $multicurrency_total_ht; + var $multicurrency_total_tva; + var $multicurrency_total_ttc; /** * @var int Situation cycle reference number @@ -159,6 +131,16 @@ class Facture extends CommonInvoice */ public $situation_final; + /** + * @var array Table of previous situations + */ + public $tab_previous_situation_invoice=array(); + + /** + * @var array Table of next situations + */ + public $tab_next_situation_invoice=array(); + /** * Standard invoice */ @@ -256,6 +238,16 @@ class Facture extends CommonInvoice if (! $this->mode_reglement_id) $this->mode_reglement_id = 0; $this->brouillon = 1; + // Multicurrency (test on $this->multicurrency_tx because we sould take the default rate only if not using origin rate) + if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code); + else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); + if (empty($this->fk_multicurrency)) + { + $this->multicurrency_code = $conf->currency; + $this->fk_multicurrency = 0; + $this->multicurrency_tx = 1; + } + dol_syslog(get_class($this)."::create user=".$user->id); // Check parameters @@ -293,7 +285,7 @@ class Facture extends CommonInvoice $this->fk_incoterms = $_facrec->fk_incoterms; $this->location_incoterms= $_facrec->location_incoterms; - // Clean parametres + // Clean parameters if (! $this->type) $this->type = self::TYPE_STANDARD; $this->ref_client=trim($this->ref_client); $this->note_private=trim($this->note_private); @@ -327,6 +319,9 @@ class Facture extends CommonInvoice $sql.= ", fk_cond_reglement, fk_mode_reglement, date_lim_reglement, model_pdf"; $sql.= ", situation_cycle_ref, situation_counter, situation_final"; $sql.= ", fk_incoterms, location_incoterms"; + $sql.= ", fk_multicurrency"; + $sql.= ", multicurrency_code"; + $sql.= ", multicurrency_tx"; $sql.= ")"; $sql.= " VALUES ("; $sql.= "'(PROV)'"; @@ -354,6 +349,9 @@ class Facture extends CommonInvoice $sql.= ", ".($this->situation_final?$this->situation_final:0); $sql.= ", ".(int) $this->fk_incoterms; $sql.= ", '".$this->db->escape($this->location_incoterms)."'"; + $sql.= ", ".(int) $this->fk_multicurrency; + $sql.= ", '".$this->db->escape($this->multicurrency_code)."'"; + $sql.= ", ".(double) $this->multicurrency_tx; $sql.=")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); @@ -422,6 +420,8 @@ class Facture extends CommonInvoice { $newinvoiceline=$this->lines[$i]; $newinvoiceline->fk_facture=$this->id; + $newinvoiceline->origin = $this->element; + $newinvoiceline->origin_id = $this->lines[$i]->id; if ($result >= 0 && ($newinvoiceline->info_bits & 0x01) == 0) // We keep only lines with first bit = 0 { // Reset fk_parent_line for no child products and special product @@ -478,8 +478,8 @@ class Facture extends CommonInvoice $this->lines[$i]->product_type, $this->lines[$i]->rang, $this->lines[$i]->special_code, - '', - 0, + $this->element, + $this->lines[$i]->id, $fk_parent_line, $this->lines[$i]->fk_fournprice, $this->lines[$i]->pa_ht, @@ -629,6 +629,8 @@ class Facture extends CommonInvoice */ function createFromCurrent($user,$invertdetail=0) { + global $conf; + // Charge facture source $facture=new Facture($this->db); @@ -646,6 +648,9 @@ class Facture extends CommonInvoice $facture->remise_absolue = $this->remise_absolue; $facture->remise_percent = $this->remise_percent; + $facture->origin = $this->origin; + $facture->origin_id = $this->origin_id; + $facture->lines = $this->lines; // Tableau des lignes de factures $facture->products = $this->lines; // Tant que products encore utilise $facture->situation_counter = $this->situation_counter; @@ -675,6 +680,20 @@ class Facture extends CommonInvoice $this->error=$facture->error; $this->errors=$facture->errors; } + elseif ($this->type == self::TYPE_SITUATION && !empty($conf->global->INVOICE_USE_SITUATION)) + { + $this->fetchObjectLinked('', '', $object->id, 'facture'); + + foreach ($this->linkedObjectsIds as $typeObject => $Tfk_object) + { + foreach ($Tfk_object as $fk_object) + { + $facture->add_object_linked($typeObject, $fk_object); + } + } + + $facture->add_object_linked('facture', $this->fk_facture_source); + } return $facid; } @@ -701,7 +720,7 @@ class Facture extends CommonInvoice $line->fetch_optionals($line->rowid); // Load source object - $objFrom = dol_clone($this); + $objFrom = clone $this; @@ -910,7 +929,7 @@ class Facture extends CommonInvoice */ function getNomUrl($withpicto=0,$option='',$max=0,$short=0,$moretitle='') { - global $langs; + global $langs, $conf; $result=''; @@ -932,7 +951,7 @@ class Facture extends CommonInvoice if (! empty($this->total_ht)) $label.= '
' . $langs->trans('AmountHT') . ': ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); if (! empty($this->total_tva)) - $label.= '
' . $langs->trans('TVA') . ': ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); + $label.= '
' . $langs->trans('VAT') . ': ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); if (! empty($this->total_ttc)) $label.= '
' . $langs->trans('AmountTTC') . ': ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); if ($this->type == self::TYPE_REPLACEMENT) $label=$langs->transnoentitiesnoconv("ShowInvoiceReplace").': '.$this->ref; @@ -957,9 +976,10 @@ class Facture extends CommonInvoice * @param string $ref Reference of invoice * @param string $ref_ext External reference of invoice * @param int $ref_int Internal reference of other object + * @param bool $fetch_situation Fetch the previous and next situation in $tab_previous_situation_invoice and $tab_next_situation_invoice * @return int >0 if OK, <0 if KO, 0 if not found */ - function fetch($rowid, $ref='', $ref_ext='', $ref_int='') + function fetch($rowid, $ref='', $ref_ext='', $ref_int='', $fetch_situation=false) { global $conf; @@ -977,6 +997,7 @@ class Facture extends CommonInvoice $sql.= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet, f.extraparams'; $sql.= ', f.situation_cycle_ref, f.situation_counter, f.situation_final'; $sql.= ', f.fk_account'; + $sql.= ", f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc"; $sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle'; $sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc'; $sql.= ', f.fk_incoterms, f.location_incoterms'; @@ -1049,9 +1070,22 @@ class Facture extends CommonInvoice $this->location_incoterms = $obj->location_incoterms; $this->libelle_incoterms = $obj->libelle_incoterms; + // Multicurrency + $this->fk_multicurrency = $obj->fk_multicurrency; + $this->multicurrency_code = $obj->multicurrency_code; + $this->multicurrency_tx = $obj->multicurrency_tx; + $this->multicurrency_total_ht = $obj->multicurrency_total_ht; + $this->multicurrency_total_tva = $obj->multicurrency_total_tva; + $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; + + if ($this->type == self::TYPE_SITUATION && $fetch_situation) + { + $this->fetchPreviousNextSituationInvoice(); + } + if ($this->statut == self::STATUS_DRAFT) $this->brouillon = 1; - // Retreive all extrafield for invoice + // Retrieve all extrafield for invoice // fetch optionals attributes and labels require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; $extrafields=new ExtraFields($this->db); @@ -1074,7 +1108,7 @@ class Facture extends CommonInvoice } else { - $this->error='Bill with id '.$rowid.' or ref '.$ref.' not found sql='.$sql; + $this->error='Bill with id '.$rowid.' or ref '.$ref.' not found'; dol_syslog(get_class($this)."::fetch Error ".$this->error, LOG_ERR); return 0; } @@ -1103,6 +1137,7 @@ class Facture extends CommonInvoice $sql.= ' l.date_start as date_start, l.date_end as date_end,'; $sql.= ' l.info_bits, l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc, l.fk_code_ventilation, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht,'; $sql.= ' l.fk_unit,'; + $sql.= ' l.fk_multicurrency, l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc,'; $sql.= ' p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facturedet as l'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid'; @@ -1162,7 +1197,15 @@ class Facture extends CommonInvoice $line->situation_percent= $objp->situation_percent; $line->fk_prev_id = $objp->fk_prev_id; $line->fk_unit = $objp->fk_unit; - + + // Multicurrency + $line->fk_multicurrency = $objp->fk_multicurrency; + $line->multicurrency_code = $objp->multicurrency_code; + $line->multicurrency_subprice = $objp->multicurrency_subprice; + $line->multicurrency_total_ht = $objp->multicurrency_total_ht; + $line->multicurrency_total_tva = $objp->multicurrency_total_tva; + $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; + $this->lines[$i] = $line; $i++; @@ -1177,6 +1220,36 @@ class Facture extends CommonInvoice } } + /** + * Fetch previous and next situations invoices + * + * @return void + */ + function fetchPreviousNextSituationInvoice() + { + global $conf; + + $this->tab_previous_situation_invoice = array(); + $this->tab_next_situation_invoice = array(); + + $sql = 'SELECT rowid, situation_counter FROM '.MAIN_DB_PREFIX.'facture WHERE rowid <> '.$this->id.' AND entity = '.$conf->entity.' AND situation_cycle_ref = '.(int) $this->situation_cycle_ref.' ORDER BY situation_counter ASC'; + + dol_syslog(get_class($this).'::fetchPreviousNextSituationInvoice ', LOG_DEBUG); + $result = $this->db->query($sql); + if ($result && $this->db->num_rows($result) > 0) + { + while ($objp = $this->db->fetch_object($result)) + { + $invoice = new Facture($this->db); + if ($invoice->fetch($objp->rowid) > 0) + { + if ($objp->situation_counter < $this->situation_counter) $this->tab_previous_situation_invoice[] = $invoice; + else $this->tab_next_situation_invoice[] = $invoice; + } + } + } + + } /** * Update database @@ -1420,7 +1493,7 @@ class Facture extends CommonInvoice dol_syslog(get_class($this)."::delete rowid=".$rowid, LOG_DEBUG); - // TODO Test if there is at least on payment. If yes, refuse to delete. + // TODO Test if there is at least one payment. If yes, refuse to delete. $error=0; $this->db->begin(); @@ -1482,7 +1555,7 @@ class Facture extends CommonInvoice } } - // If we decrament stock on invoice validation, we increment + // If we decrement stock on invoice validation, we increment if ($this->type != self::TYPE_DEPOSIT && $result >= 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $idwarehouse!=-1) { require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; @@ -1772,7 +1845,7 @@ class Facture extends CommonInvoice || (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->facture->invoice_advance->validate))) { $this->error='Permission denied'; - dol_syslog(get_class($this)."::validate ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::validate ".$this->error.' MAIN_USE_ADVANCED_PERMS='.$conf->global->MAIN_USE_ADVANCED_PERMS, LOG_ERR); return -1; } @@ -1890,7 +1963,7 @@ class Facture extends CommonInvoice $mouvP = new MouvementStock($this->db); $mouvP->origin = &$this; // We decrease stock for product - if ($this->type == self::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarr",$num)); + if ($this->type == self::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, 0, $langs->trans("InvoiceValidatedInDolibarr",$num)); else $result=$mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarr",$num)); if ($result < 0) { $error++; @@ -1944,6 +2017,14 @@ class Facture extends CommonInvoice } } + if (! $error && !$this->is_last_in_cycle()) + { + if (! $this->updatePriceNextInvoice($langs)) + { + $error++; + } + } + // Set new ref and define current statut if (! $error) { @@ -1953,14 +2034,18 @@ class Facture extends CommonInvoice $this->brouillon=0; $this->date_validation=$now; $i = 0; - $final = True; - while ($i < count($this->lines) && $final == True) { - $final = ($this->lines[$i]->situation_percent == 100); - $i++; - } - if ($final) { - $this->setFinal(); - } + + if (!empty($conf->global->INVOICE_USE_SITUATION)) + { + $final = True; + while ($i < count($this->lines) && $final == True) { + $final = ($this->lines[$i]->situation_percent == 100); + $i++; + } + if ($final) { + $this->setFinal(); + } + } } } else @@ -1980,6 +2065,45 @@ class Facture extends CommonInvoice } } + /** + * Update price of next invoice + * + * @param Translate $langs Translate object + * @return bool false if KO, true if OK + */ + function updatePriceNextInvoice(&$langs) + { + foreach ($this->tab_next_situation_invoice as $next_invoice) + { + $is_last = $next_invoice->is_last_in_cycle(); + + if ($next_invoice->brouillon && $is_last != 1) + { + $this->error = $langs->trans('updatePriceNextInvoiceErrorUpdateline', $next_invoice->ref); + return false; + } + + $next_invoice->brouillon = 1; + foreach ($next_invoice->lines as $line) + { + $result = $next_invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, + $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, + $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, + $line->fk_unit); + + if ($result < 0) + { + $this->error = $langs->trans('updatePriceNextInvoiceErrorUpdateline', $next_invoice->ref); + return false; + } + } + + break; // Only the next invoice and not each next invoice + } + + return true; + } + /** * Set draft status * @@ -2079,8 +2203,8 @@ class Facture extends CommonInvoice * @param double $pu_ht Unit price without tax (> 0 even for credit note) * @param double $qty Quantity * @param double $txtva Force vat rate, -1 for auto - * @param double $txlocaltax1 Local tax 1 rate - * @param double $txlocaltax2 Local tax 2 rate + * @param double $txlocaltax1 Local tax 1 rate (deprecated) + * @param double $txlocaltax2 Local tax 2 rate (deprecated) * @param int $fk_product Id of predefined product/service * @param double $remise_percent Percent of discount on line * @param int $date_start Date start of service @@ -2090,7 +2214,7 @@ class Facture extends CommonInvoice * @param int $fk_remise_except Id discount used * @param string $price_base_type 'HT' or 'TTC' * @param double $pu_ttc Unit price with tax (> 0 even for credit note) - * @param int $type Type of line (0=product, 1=service) + * @param int $type Type of line (0=product, 1=service). Not used if fk_product is defined, the type of product is used. * @param int $rang Position of line * @param int $special_code Special code (also used by externals modules!) * @param string $origin 'order', ... @@ -2128,8 +2252,8 @@ class Facture extends CommonInvoice if (empty($txlocaltax2)) $txlocaltax2=0; if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0; if (empty($fk_prev_id)) $fk_prev_id = 'null'; - if (is_null($situation_percent) || $situation_percent > 100) $situation_percent = 100; - + if (! isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '') $situation_percent = 100; + $remise_percent=price2num($remise_percent); $qty=price2num($qty); $pu_ht=price2num($pu_ht); @@ -2155,30 +2279,6 @@ class Facture extends CommonInvoice { $this->db->begin(); - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - - $localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty, $mysoc); - - $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, $situation_percent); - - $total_ht = $tabprice[0]; - $total_tva = $tabprice[1]; - $total_ttc = $tabprice[2]; - $total_localtax1 = $tabprice[9]; - $total_localtax2 = $tabprice[10]; - $pu_ht = $tabprice[3]; - - // Rang to use - $rangtouse = $rang; - if ($rangtouse == -1) - { - $rangmax = $this->line_max($fk_parent_line); - $rangtouse = $rangmax + 1; - } - $product_type=$type; if (!empty($fk_product)) { @@ -2193,11 +2293,41 @@ class Facture extends CommonInvoice } } + // Calcul du total TTC et de la TVA pour la ligne a partir de + // qty, pu, remise_percent et txtva + // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker + // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + + $localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty, $mysoc); + $txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate. + + $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $mysoc, $localtaxes_type, $situation_percent, $this->multicurrency_tx); + + $total_ht = $tabprice[0]; + $total_tva = $tabprice[1]; + $total_ttc = $tabprice[2]; + $total_localtax1 = $tabprice[9]; + $total_localtax2 = $tabprice[10]; + $pu_ht = $tabprice[3]; + + // MultiCurrency + $multicurrency_total_ht = $tabprice[16]; + $multicurrency_total_tva = $tabprice[17]; + $multicurrency_total_ttc = $tabprice[18]; + + // Rank to use + $rangtouse = $rang; + if ($rangtouse == -1) + { + $rangmax = $this->line_max($fk_parent_line); + $rangtouse = $rangmax + 1; + } + // Insert line $this->line=new FactureLigne($this->db); $this->line->context = $this->context; - + $this->line->fk_facture=$this->id; $this->line->label=$label; // deprecated $this->line->desc=$desc; @@ -2233,7 +2363,15 @@ class Facture extends CommonInvoice // infos marge $this->line->fk_fournprice = $fk_fournprice; $this->line->pa_ht = $pa_ht; - + + // Multicurrency + $this->line->fk_multicurrency = $this->fk_multicurrency; + $this->line->multicurrency_code = $this->multicurrency_code; + $this->line->multicurrency_subprice = price2num($this->line->subprice * $this->multicurrency_tx); + $this->line->multicurrency_total_ht = $multicurrency_total_ht; + $this->line->multicurrency_total_tva = $multicurrency_total_tva; + $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; + if (is_array($array_options) && count($array_options)>0) { $this->line->array_options=$array_options; } @@ -2245,7 +2383,7 @@ class Facture extends CommonInvoice if (! empty($fk_parent_line)) $this->line_order(true,'DESC'); // Mise a jour informations denormalisees au niveau de la facture meme - $result=$this->update_price(1,'auto',0,$mysoc); // This method is designed to add line from user input so total calculation must be done using 'auto' mode. + $result=$this->update_price(1,'auto',0,$mysoc); // The addline method is designed to add line from user input so total calculation with update_price must be done using 'auto' mode. if ($result > 0) { $this->db->commit(); @@ -2303,19 +2441,28 @@ class Facture extends CommonInvoice include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - global $mysoc; + global $mysoc,$langs; dol_syslog(get_class($this)."::updateline rowid=$rowid, desc=$desc, pu=$pu, qty=$qty, remise_percent=$remise_percent, date_start=$date_start, date_end=$date_end, txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, price_base_type=$price_base_type, info_bits=$info_bits, type=$type, fk_parent_line=$fk_parent_line pa_ht=$pa_ht, special_code=$special_code fk_unit=$fk_unit", LOG_DEBUG); if ($this->brouillon) { + if (!$this->is_last_in_cycle() && empty($this->error)) + { + if (!$this->checkProgressLine($rowid, $situation_percent)) + { + if (!$this->error) $this->error=$langs->trans('invoiceLineProgressError'); + return -3; + } + } + $this->db->begin(); // Clean parameters if (empty($qty)) $qty=0; if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line=0; if (empty($special_code) || $special_code == 3) $special_code=0; - if ($situation_percent > 100 || is_null($situation_percent) || $situation_percent == "") $situation_percent = 100; + if (! isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '') $situation_percent = 100; $remise_percent = price2num($remise_percent); $qty = price2num($qty); @@ -2333,8 +2480,9 @@ class Facture extends CommonInvoice // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. $localtaxes_type=getLocalTaxesFromRate($txtva,0,$this->thirdparty, $mysoc); - - $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, $situation_percent); + $txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate. + + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, $situation_percent, $this->multicurrency_tx); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; @@ -2345,6 +2493,11 @@ class Facture extends CommonInvoice $pu_tva = $tabprice[4]; $pu_ttc = $tabprice[5]; + // MultiCurrency + $multicurrency_total_ht = $tabprice[16]; + $multicurrency_total_tva = $tabprice[17]; + $multicurrency_total_ttc = $tabprice[18]; + // Old properties: $price, $remise (deprecated) $price = $pu; $remise = 0; @@ -2398,18 +2551,15 @@ class Facture extends CommonInvoice $this->line->situation_percent = $situation_percent; $this->line->fk_unit = $fk_unit; - // infos marge - if (!empty($fk_product) && empty($fk_fournprice) && empty($pa_ht)) { - // POS or external module, take lowest buying price - include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; - $productFournisseur = new ProductFournisseur($this->db); - $productFournisseur->find_min_price_product_fournisseur($fk_product); - $this->line->fk_fournprice = $productFournisseur->product_fourn_price_id; - } else { - $this->line->fk_fournprice = $fk_fournprice; - } + $this->line->fk_fournprice = $fk_fournprice; $this->line->pa_ht = $pa_ht; + // Multicurrency + $this->line->multicurrency_subprice = price2num($this->line->subprice * $this->multicurrency_tx); + $this->line->multicurrency_total_ht = $multicurrency_total_ht; + $this->line->multicurrency_total_tva = $multicurrency_total_tva; + $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; + if (is_array($array_options) && count($array_options)>0) { $this->line->array_options=$array_options; } @@ -2439,21 +2589,50 @@ class Facture extends CommonInvoice } } + /** + * Check if the percent edited is lower of next invoice line + * + * @param int $idline id of line to check + * @param float $situation_percent progress percentage need to be test + * @return false if KO, true if OK + */ + function checkProgressLine($idline, $situation_percent) + { + $sql = 'SELECT fd.situation_percent FROM '.MAIN_DB_PREFIX.'facturedet fd + INNER JOIN '.MAIN_DB_PREFIX.'facture f ON (fd.fk_facture = f.rowid) + WHERE fd.fk_prev_id = '.$idline.' + AND f.fk_statut <> 0'; + + $result = $this->db->query($sql); + if (! $result) + { + $this->error=$this->db->error(); + return false; + } + + $obj = $this->db->fetch_object($result); + + if ($obj === null) return true; + else return $situation_percent < $obj->situation_percent; + } + /** * Update invoice line with percentage * - * @param FactureLigne $line Invoice line - * @param int $percent Percentage + * @param FactureLigne $line Invoice line + * @param int $percent Percentage * @return void */ function update_percent($line, $percent) { + global $mysoc; + include_once(DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php'); // Cap percentages to 100 if ($percent > 100) $percent = 100; $line->situation_percent = $percent; - $tabprice = calcul_price_total($line->qty, $line->subprice, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->product_type, 'HT', 0, 0, '', '', $percent); + $tabprice = calcul_price_total($line->qty, $line->subprice, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->product_type, 'HT', 0, 0, $mysoc, '', $percent); $line->total_ht = $tabprice[0]; $line->total_tva = $tabprice[1]; $line->total_ttc = $tabprice[2]; @@ -3218,7 +3397,7 @@ class Facture extends CommonInvoice */ function load_board($user) { - global $conf, $user, $langs; + global $conf, $langs; $clause = " WHERE"; @@ -3247,11 +3426,15 @@ class Facture extends CommonInvoice $response->url=DOL_URL_ROOT.'/compta/facture/list.php?search_status=1'; $response->img=img_object($langs->trans("Bills"),"bill"); + $generic_facture = new Facture($this->db); + while ($obj=$this->db->fetch_object($resql)) { + $generic_facture->date_lim_reglement = $this->db->jdate($obj->datefin); + $response->nbtodo++; - if ($this->db->jdate($obj->datefin) < ($now - $conf->facture->client->warning_delay)) { + if ($generic_facture->hasDelay()) { $response->nbtodolate++; } } @@ -3477,6 +3660,7 @@ class Facture extends CommonInvoice $sql.= ' l.total_ht, l.total_tva, l.total_ttc, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht,'; $sql.= ' l.date_start, l.date_end,'; $sql.= ' l.fk_unit,'; + $sql.= ' l.fk_multicurrency, l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc,'; $sql.= ' p.ref as product_ref, p.fk_product_type, p.label as product_label,'; $sql.= ' p.description as product_desc,'; $sql.= ' p.entity'; @@ -3529,7 +3713,15 @@ class Facture extends CommonInvoice $this->lines[$i]->marge_tx = $marginInfos[1]; $this->lines[$i]->marque_tx = $marginInfos[2]; $this->lines[$i]->fk_unit = $obj->fk_unit; - + + // Multicurrency + $this->lines[$i]->fk_multicurrency = $obj->fk_multicurrency; + $this->lines[$i]->multicurrency_code = $obj->multicurrency_code; + $this->lines[$i]->multicurrency_subprice = $obj->multicurrency_subprice; + $this->lines[$i]->multicurrency_total_ht = $obj->multicurrency_total_ht; + $this->lines[$i]->multicurrency_total_tva = $obj->multicurrency_total_tva; + $this->lines[$i]->multicurrency_total_ttc = $obj->multicurrency_total_ttc; + $i++; } $this->db->free($resql); @@ -3624,10 +3816,12 @@ class Facture extends CommonInvoice */ function get_prev_sits() { - + global $conf; + $sql = 'SELECT rowid FROM ' . MAIN_DB_PREFIX . 'facture'; $sql .= ' where situation_cycle_ref = ' . $this->situation_cycle_ref; $sql .= ' and situation_counter < ' . $this->situation_counter; + $sql .= ' AND entity = '. ($this->entity > 0 ? $this->entity : $conf->entity); $resql = $this->db->query($sql); $res = array(); if ($resql && $resql->num_rows > 0) { @@ -3654,11 +3848,14 @@ class Facture extends CommonInvoice function setFinal() { global $conf, $langs, $user; + + $this->db->begin(); + $this->situation_final = 1; $sql = 'update ' . MAIN_DB_PREFIX . 'facture set situation_final = ' . $this->situation_final . ' where rowid = ' . $this->id; $resql = $this->db->query($sql); if ($resql) { - // FIXME: call triggers? + // FIXME: call triggers MODIFY because we modify invoice $this->db->commit(); return 1; } else { @@ -3672,23 +3869,29 @@ class Facture extends CommonInvoice /** * Checks if the invoice is the last in its cycle * - * @return int 0 or 1 if OK, -1 if error + * @return bool Last of the cycle status * */ function is_last_in_cycle() { - $sql = 'SELECT max(situation_counter) FROM ' . MAIN_DB_PREFIX . 'facture WHERE situation_cycle_ref = ' . $this->situation_cycle_ref; - $resql = $this->db->query($sql); - - if ($resql && $resql->num_rows > 0) { - $res = $this->db->fetch_array($resql); - $last = $res['max(situation_counter)']; - return ($last == $this->situation_counter); + global $conf; + + if (!empty($this->situation_cycle_ref)) { + // No point in testing anything if we're not inside a cycle + $sql = 'SELECT max(situation_counter) FROM ' . MAIN_DB_PREFIX . 'facture WHERE situation_cycle_ref = ' . $this->situation_cycle_ref . ' AND entity = ' . ($this->entity > 0 ? $this->entity : $conf->entity); + $resql = $this->db->query($sql); + + if ($resql && $resql->num_rows > 0) { + $res = $this->db->fetch_array($resql); + $last = $res['max(situation_counter)']; + return ($last == $this->situation_counter); + } else { + $this->error = $this->db->lasterror(); + dol_syslog(get_class($this) . "::select Error " . $this->error, LOG_ERR); + return false; + } } else { - $this->error = $this->db->lasterror(); - dol_syslog(get_class($this) . "::select Error " . $this->error, LOG_ERR); - $this->db->rollback(); - return -1; + return true; } } @@ -3708,6 +3911,23 @@ class Facture extends CommonInvoice return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); } + + /** + * Is the customer invoice delayed? + * + * @return bool + */ + public function hasDelay() + { + global $conf; + + $now = dol_now(); + + // Paid invoices have status STATUS_CLOSED + if ($this->statut != Facture::STATUS_VALIDATED) return false; + + return $this->date_lim_reglement < ($now - $conf->facture->client->warning_delay); + } } /** @@ -3875,7 +4095,9 @@ class FactureLigne extends CommonInvoiceLine $error=0; - dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG); + $pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'. + + dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG); // Clean parameters $this->desc=trim($this->desc); @@ -3893,14 +4115,25 @@ class FactureLigne extends CommonInvoiceLine if (empty($this->special_code)) $this->special_code=0; if (empty($this->fk_parent_line)) $this->fk_parent_line=0; if (empty($this->fk_prev_id)) $this->fk_prev_id = 'null'; - if (empty($this->situation_percent)) $this->situation_percent = 0; + if (! isset($this->situation_percent) || $this->situation_percent > 100 || (string) $this->situation_percent == '') $this->situation_percent = 100; if (empty($this->pa_ht)) $this->pa_ht=0; - - // si prix d'achat non renseigne et utilise pour calcul des marges alors prix achat = prix vente - if ($this->pa_ht == 0) { - if ($this->subprice > 0 && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) - $this->pa_ht = $this->subprice * (1 - $this->remise_percent / 100); + if (empty($this->multicurrency_subprice)) $this->multicurrency_subprice=0; + if (empty($this->multicurrency_total_ht)) $this->multicurrency_total_ht=0; + if (empty($this->multicurrency_total_tva)) $this->multicurrency_total_tva=0; + if (empty($this->multicurrency_total_ttc)) $this->multicurrency_total_ttc=0; + + // if buy price not defined, define buyprice as configured in margin admin + if ($this->pa_ht == 0 && $pa_ht_isemptystring) + { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) + { + return $result; + } + else + { + $this->pa_ht = $result; + } } // Check parameters @@ -3920,14 +4153,6 @@ class FactureLigne extends CommonInvoiceLine } } - // POS or by external module, take lowest buying price - if (!empty($this->fk_product) && empty($this->fk_fournprice) && empty($this->pa_ht)) { - include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; - $productFournisseur = new ProductFournisseur($this->db); - $productFournisseur->find_min_price_product_fournisseur($this->fk_product); - $this->fk_fournprice = $productFournisseur->product_fourn_price_id; - } - $this->db->begin(); // Insertion dans base de la ligne @@ -3939,7 +4164,9 @@ class FactureLigne extends CommonInvoiceLine $sql.= ' rang, special_code, fk_product_fournisseur_price, buy_price_ht,'; $sql.= ' info_bits, total_ht, total_tva, total_ttc, total_localtax1, total_localtax2,'; $sql.= ' situation_percent, fk_prev_id,'; - $sql.= ' fk_unit)'; + $sql.= ' fk_unit'; + $sql.= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc'; + $sql.= ')'; $sql.= " VALUES (".$this->fk_facture.","; $sql.= " ".($this->fk_parent_line>0?"'".$this->fk_parent_line."'":"null").","; $sql.= " ".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null").","; @@ -3971,6 +4198,12 @@ class FactureLigne extends CommonInvoiceLine $sql .= ", " . $this->situation_percent; $sql .= ", " . $this->fk_prev_id; $sql .= ", ".(!$this->fk_unit ? 'NULL' : $this->fk_unit); + $sql.= ", ".(int) $this->fk_multicurrency; + $sql.= ", '".$this->db->escape($this->multicurrency_code)."'"; + $sql.= ", ".price2num($this->multicurrency_subprice); + $sql.= ", ".price2num($this->multicurrency_total_ht); + $sql.= ", ".price2num($this->multicurrency_total_tva); + $sql.= ", ".price2num($this->multicurrency_total_ttc); $sql.= ')'; dol_syslog(get_class($this)."::insert", LOG_DEBUG); @@ -4074,6 +4307,8 @@ class FactureLigne extends CommonInvoiceLine $error=0; + $pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'. + // Clean parameters $this->desc=trim($this->desc); if (empty($this->tva_tx)) $this->tva_tx=0; @@ -4088,17 +4323,23 @@ class FactureLigne extends CommonInvoiceLine if (empty($this->special_code)) $this->special_code=0; if (empty($this->product_type)) $this->product_type=0; if (empty($this->fk_parent_line)) $this->fk_parent_line=0; - if (is_null($this->situation_percent)) $this->situation_percent=100; + if (! isset($this->situation_percent) || $this->situation_percent > 100 || (string) $this->situation_percent == '') $this->situation_percent = 100; + if (empty($this->pa_ht)) $this->pa_ht=0; // Check parameters if ($this->product_type < 0) return -1; - if (empty($this->pa_ht)) $this->pa_ht=0; - - // si prix d'achat non renseigne et utilise pour calcul des marges alors prix achat = prix vente - if ($this->pa_ht == 0) { - if ($this->subprice > 0 && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) - $this->pa_ht = $this->subprice * (1 - $this->remise_percent / 100); + // if buy price not defined, define buyprice as configured in margin admin + if ($this->pa_ht == 0 && $pa_ht_isemptystring) + { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) + { + return $result; + } + else + { + $this->pa_ht = $result; + } } $this->db->begin(); @@ -4136,6 +4377,13 @@ class FactureLigne extends CommonInvoiceLine if (! empty($this->rang)) $sql.= ", rang=".$this->rang; $sql .= ", situation_percent=" . $this->situation_percent; $sql .= ", fk_unit=".(!$this->fk_unit ? 'NULL' : $this->fk_unit); + + // Multicurrency + $sql.= " , multicurrency_subprice=".price2num($this->multicurrency_subprice).""; + $sql.= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht).""; + $sql.= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva).""; + $sql.= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc).""; + $sql.= " WHERE rowid = ".$this->rowid; dol_syslog(get_class($this)."::update", LOG_DEBUG); diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 8fe20cd66f6..b07a8f8c2d4 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Patrick Rouillon * Copyright (C) 2005-2009 Destailleur Laurent * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011-2012 Philippe Grand + * Copyright (C) 2011-2015 Philippe Grand * * 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 @@ -48,7 +48,7 @@ $object = new Facture($db); /* - * Ajout d'un nouveau contact + * Add a new contact */ if ($action == 'addcontact' && $user->rights->facture->creer) @@ -71,16 +71,16 @@ if ($action == 'addcontact' && $user->rights->facture->creer) if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - setEventMessage($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), 'errors'); + setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } } -// Bascule du statut d'un contact +// Toggle the status of a contact else if ($action == 'swapstatut' && $user->rights->facture->creer) { if ($object->fetch($id)) @@ -93,7 +93,7 @@ else if ($action == 'swapstatut' && $user->rights->facture->creer) } } -// Efface un contact +// Deletes a contact else if ($action == 'deletecontact' && $user->rights->facture->creer) { $object->fetch($id); @@ -124,7 +124,7 @@ $userstatic=new User($db); /* *************************************************************************** */ /* */ -/* Mode vue et edition */ +/* View and edit mode */ /* */ /* *************************************************************************** */ @@ -139,7 +139,7 @@ if ($id > 0 || ! empty($ref)) dol_fiche_head($head, 'contact', $langs->trans('InvoiceCustomer'), 0, 'bill'); /* - * Facture synthese pour rappel + * Summary invoice for reminder */ print '
'; @@ -3368,6 +3590,24 @@ else if ($id > 0 || ! empty($ref)) // Total with tax print '
' . $langs->trans('AmountTTC') . '' . price($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency) . '
' . fieldLabel('MulticurrencyAmountHT','multicurrency_total_ht') . '' . price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . fieldLabel('MulticurrencyAmountVAT','multicurrency_total_tva') . '' . price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . fieldLabel('MulticurrencyAmountTTC','multicurrency_total_ttc') . '' . price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)) . '
' . $langs->trans('Status') . '' . ($object->getLibStatut(4, $totalpaye)) . '
'; diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 460c0bffcab..5f17c5d49bb 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -48,7 +48,7 @@ if ($page == -1) { $page = 0 ; } -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page ; if ($sortorder == "") @@ -70,7 +70,7 @@ if ($action == 'add') { if (! GETPOST('titre')) { - setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("Title")), 'errors'); + setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->trans("Title")), null, 'errors'); $action = "create"; $error++; } @@ -88,13 +88,13 @@ if ($action == 'add') } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action = "create"; } } } -// Suppression +// Delete if ($action == 'delete' && $user->rights->facture->supprimer) { $object->fetch($id); @@ -118,7 +118,7 @@ $companystatic = new Societe($db); */ if ($action == 'create') { - print_fiche_titre($langs->trans("CreateRepeatableInvoice"),'','title_accountancy.png'); + print load_fiche_titre($langs->trans("CreateRepeatableInvoice"),'','title_accountancy.png'); $object = new Facture($db); // Source invoice $product_static = new Product($db); @@ -191,7 +191,7 @@ if ($action == 'create') else if (empty($conf->product->enabled)) $title = $langs->trans("Services"); - print_titre($title); + print load_fiche_titre($title); /* * Invoice lines @@ -456,7 +456,7 @@ else else if (empty($conf->product->enabled)) $title = $langs->trans("Services"); - print_titre($title); + print load_fiche_titre($title); print '
'; print ''; diff --git a/htdocs/compta/facture/info.php b/htdocs/compta/facture/info.php index 8611381d486..24164b5709a 100644 --- a/htdocs/compta/facture/info.php +++ b/htdocs/compta/facture/info.php @@ -54,6 +54,5 @@ print '
'; print ''; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 93874ac5e80..38d1ce96f59 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1,9 +1,9 @@ * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2012 Juanjo Menent * Copyright (C) 2012 Christophe Battarel @@ -60,6 +60,7 @@ $id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For ba $ref=GETPOST('ref','alpha'); $socid=GETPOST('socid','int'); $action=GETPOST('action','alpha'); +$massaction=GETPOST('massaction','alpha'); $confirm=GETPOST('confirm','alpha'); $lineid=GETPOST('lineid','int'); $userid=GETPOST('userid','int'); @@ -70,17 +71,20 @@ $search_societe=GETPOST('search_societe','alpha'); $search_montant_ht=GETPOST('search_montant_ht','alpha'); $search_montant_ttc=GETPOST('search_montant_ttc','alpha'); $search_status=GETPOST('search_status','int'); +$search_paymentmode=GETPOST('search_paymentmode','int'); +$option = GETPOST('option'); +if ($option == 'late') $filter = 'paye:0'; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $page = GETPOST("page",'int'); if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; +$offset = $limit * $page; if (! $sortorder) $sortorder='DESC'; if (! $sortfield) $sortfield='f.datef'; -$limit = $conf->liste_limit; $pageprev = $page - 1; $pagenext = $page + 1; @@ -94,12 +98,16 @@ $day_lim = GETPOST('day_lim','int'); $month_lim = GETPOST('month_lim','int'); $year_lim = GETPOST('year_lim','int'); $filtre = GETPOST('filtre'); +$toselect = GETPOST('toselect', 'array'); // Security check $fieldid = (! empty($ref)?'facnumber':'rowid'); if (! empty($user->societe_id)) $socid=$user->societe_id; $result = restrictedArea($user, 'facture', $id,'','','fk_soc',$fieldid); +$diroutputpdf=$conf->facture->dir_output . '/unpaid/temp'; +if (! $user->rights->societe->client->voir || $socid) $diroutputpdf.='/private/'.$user->id; // If user has no permission to see all, output dir is specific to user + $object=new Facture($db); // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array @@ -107,14 +115,430 @@ $hookmanager->initHooks(array('invoicelist')); $now=dol_now(); +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'f.facnumber'=>'Ref', + 'f.ref_client'=>'RefCustomer', + 'fd.description'=>'Description', + 's.nom'=>"ThirdParty", + 'f.note_public'=>'NotePublic', +); +if (empty($user->socid)) $fieldstosearchall["f.note_private"]="NotePrivate"; + /* * Actions */ +if (GETPOST('cancel')) { $action='list'; $massaction=''; } + $parameters=array('socid'=>$socid); $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +if (empty($reshook)) +{ + // Mass actions. Controls on number of lines checked + $maxformassaction=1000; + if (! empty($massaction) && count($toselect) < 1) + { + $error++; + setEventMessages($langs->trans("NoLineChecked"), null, "warnings"); + } + if (! $error && count($toselect) > $maxformassaction) + { + setEventMessages($langs->trans('TooManyRecordForMassAction',$maxformassaction), null, 'errors'); + $error++; + } + + if (! $error && $massaction == 'confirm_presend') + { + $resaction = ''; + $nbsent = 0; + $nbignored = 0; + $langs->load("mails"); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + if (!$error && !isset($user->email)) + { + $error++; + setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings'); + } + + if (! $error) + { + $thirdparty=new Societe($db); + $objecttmp=new Facture($db); + $listofobjectid=array(); + $listofobjectthirdparties=array(); + $listofobjectref=array(); + foreach($toselect as $toselectid) + { + $objecttmp=new Facture($db); // must create new instance because instance is saved into $listofobjectref array for future use + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + $listoinvoicesid[$toselectid]=$toselectid; + $thirdpartyid=$objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid; + $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; + $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; + } + } + //var_dump($listofobjectthirdparties);exit; + + foreach ($listofobjectthirdparties as $thirdpartyid) + { + $result = $thirdparty->fetch($thirdpartyid); + if ($result < 0) + { + dol_print_error($db); + exit; + } + + // Define recipient $sendto and $sendtocc + if (trim($_POST['sendto'])) + { + // Recipient is provided into free text + $sendto = trim($_POST['sendto']); + $sendtoid = 0; + } + elseif ($_POST['receiver'] != '-1') + { + // Recipient was provided from combo list + if ($_POST['receiver'] == 'thirdparty') // Id of third party + { + $sendto = $thirdparty->email; + $sendtoid = 0; + } + else // Id du contact + { + $sendto = $thirdparty->contact_get_property((int) $_POST['receiver'],'email'); + $sendtoid = $_POST['receiver']; + } + } + if (trim($_POST['sendtocc'])) + { + $sendtocc = trim($_POST['sendtocc']); + } + elseif ($_POST['receivercc'] != '-1') + { + // Recipient was provided from combo list + if ($_POST['receivercc'] == 'thirdparty') // Id of third party + { + $sendtocc = $thirdparty->email; + } + else // Id du contact + { + $sendtocc = $thirdparty->contact_get_property((int) $_POST['receivercc'],'email'); + } + } + + //var_dump($listofobjectref[$thirdpartyid]); // Array of invoice for this thirdparty + + $attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array()); + $listofqualifiedinvoice=array(); + $listofqualifiedref=array(); + foreach($listofobjectref[$thirdpartyid] as $objectid => $object) + { + //var_dump($object); + //var_dump($thirdpartyid.' - '.$objectid.' - '.$object->statut); + + if ($object->statut != Facture::STATUS_VALIDATED) + { + $nbignored++; + continue; // Payment done or started or canceled + } + + // Read document + // TODO Use future field $object->fullpathdoc to know where is stored default file + // TODO If not defined, use $object->modelpdf (or defaut invoice config) to know what is template to use to regenerate doc. + $filename=dol_sanitizeFileName($object->ref).'.pdf'; + $filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref); + $file = $filedir . '/' . $filename; + $mime = dol_mimetype($file); + + if (dol_is_file($file)) + { + if (empty($sendto)) // For the case, no recipient were set (multi thirdparties send) + { + $object->fetch_thirdparty(); + $sendto = $object->thirdparty->email; + } + + if (empty($sendto)) + { + //print "No recipient for thirdparty ".$object->thirdparty->name; + $nbignored++; + continue; + } + + if (dol_strlen($sendto)) + { + // Create form object + $attachedfiles=array( + 'paths'=>array_merge($attachedfiles['paths'],array($file)), + 'names'=>array_merge($attachedfiles['names'],array($filename)), + 'mimes'=>array_merge($attachedfiles['mimes'],array($mime)) + ); + } + + $listofqualifiedinvoice[$objectid]=$object; + $listofqualifiedref[$objectid]=$object->ref; + } + else + { + $nbignored++; + $langs->load("other"); + $resaction.='
'.$langs->trans('ErrorCantReadFile',$file).'
'; + dol_syslog('Failed to read file: '.$file, LOG_WARNING); + continue; + } + + //var_dump($listofqualifiedref); + } + + if (count($listofqualifiedinvoice) > 0) + { + $langs->load("commercial"); + $from = $user->getFullName($langs) . ' <' . $user->email .'>'; + $replyto = $from; + $subject = GETPOST('subject'); + $message = GETPOST('message'); + $sendtocc = GETPOST('sentocc'); + $sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO); + + $substitutionarray=array( + '__ID__' => join(', ',array_keys($listofqualifiedinvoice)), + '__EMAIL__' => $thirdparty->email, + '__CHECK_READ__' => '', + //'__LASTNAME__' => $obj2->lastname, + //'__FIRSTNAME__' => $obj2->firstname, + '__FACREF__' => join(', ',$listofqualifiedref), // For backward compatibility + '__REF__' => join(', ',$listofqualifiedref), + '__REFCLIENT__' => $thirdparty->name + ); + + $subject=make_substitutions($subject, $substitutionarray); + $message=make_substitutions($message, $substitutionarray); + + $filepath = $attachedfiles['paths']; + $filename = $attachedfiles['names']; + $mimetype = $attachedfiles['mimes']; + + //var_dump($filepath); + + // Send mail + require_once(DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'); + $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1); + if ($mailfile->error) + { + $resaction.='
'.$mailfile->error.'
'; + } + else + { + $result=$mailfile->sendfile(); + if ($result) + { + $resaction.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)).'
'; // Must not contain " + + $error=0; + + // Insert logs into agenda + foreach($listofqualifiedinvoice as $invid => $object) + { + $actiontypecode='AC_FAC'; + $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; + if ($message) + { + if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); + $actionmsg = dol_concatdesc($actionmsg, $message); + } + + // Initialisation donnees + $object->sendtoid = 0; + $object->actiontypecode = $actiontypecode; + $object->actionmsg = $actionmsg; // Long text + $object->actionmsg2 = $actionmsg2; // Short text + $object->fk_element = $invid; + $object->elementtype = $object->element; + + // Appel des triggers + include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + $interface=new Interfaces($db); + $result=$interface->run_triggers('BILL_SENTBYMAIL',$object,$user,$langs,$conf); + if ($result < 0) { $error++; $errors=$interface->errors; } + // Fin appel triggers + + if ($error) + { + setEventMessages($db->lasterror(), $errors, 'errors'); + dol_syslog("Error in trigger BILL_SENTBYMAIL ".$db->lasterror(), LOG_ERR); + } + $nbsent++; + } + } + else + { + $langs->load("other"); + if ($mailfile->error) + { + $resaction.=$langs->trans('ErrorFailedToSendMail',$from,$sendto); + $resaction.='
'.$mailfile->error.'
'; + } + else + { + $resaction.='
No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS
'; + } + } + } + } + } + + $resaction.=($resaction?'
':$resaction); + $resaction.=''.$langs->trans("ResultOfMailSending").':
'."\n"; + $resaction.=$langs->trans("NbSelected").': '.count($toselect)."\n
"; + $resaction.=$langs->trans("NbIgnored").': '.($nbignored?$nbignored:0)."\n
"; + $resaction.=$langs->trans("NbSent").': '.($nbsent?$nbsent:0)."\n
"; + + if ($nbsent) + { + $action=''; // Do not show form post if there was at least one successfull sent + setEventMessages($langs->trans("EMailSentToNRecipients", $nbsent.'/'.count($toselect)), null, 'mesgs'); + setEventMessages($resaction, null, 'mesgs'); + } + else + { + //setEventMessages($langs->trans("EMailSentToNRecipients", 0), null, 'warnings'); // May be object has no generated PDF file + setEventMessages($resaction, null, 'warnings'); + } + } + + $action='list'; + $massaction=''; + } + + if (! $error && $massaction == "builddoc" && $user->rights->facture->lire && ! GETPOST('button_search')) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; + + $objecttmp=new Facture($db); + $listofobjectid=array(); + $listofobjectthirdparties=array(); + $listofobjectref=array(); + foreach($toselect as $toselectid) + { + $objecttmp=new Facture($db); // must create new instance because instance is saved into $listofobjectref array for future use + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + $listoinvoicesid[$toselectid]=$toselectid; + $thirdpartyid=$objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid; + $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; + $listofobjectref[$toselectid]=$objecttmp->ref; + } + } + + $arrayofinclusion=array(); + foreach($listofobjectref as $tmppdf) $arrayofinclusion[]=preg_quote($tmppdf.'.pdf','/'); + $factures = dol_dir_list($conf->facture->dir_output,'all',1,implode('|',$arrayofinclusion),'\.meta$|\.png','date',SORT_DESC,0,true); + + // liste les fichiers + $files = array(); + foreach($listofobjectref as $basename) + { + foreach($factures as $facture) + { + if (strstr($facture["name"],$basename)) + { + $files[] = $conf->facture->dir_output.'/'.$basename.'/'.$facture["name"]; + break; + } + } + } + + // Define output language (Here it is not used because we do only merging existing PDF) + $outputlangs = $langs; + $newlang=''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang=GETPOST('lang_id'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang; + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + + // Create empty PDF + $pdf=pdf_getInstance(); + if (class_exists('TCPDF')) + { + $pdf->setPrintHeader(false); + $pdf->setPrintFooter(false); + } + $pdf->SetFont(pdf_getPDFFont($outputlangs)); + + if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + + // Add all others + foreach($files as $file) + { + // Charge un document PDF depuis un fichier. + $pagecount = $pdf->setSourceFile($file); + for ($i = 1; $i <= $pagecount; $i++) + { + $tplidx = $pdf->importPage($i); + $s = $pdf->getTemplatesize($tplidx); + $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); + $pdf->useTemplate($tplidx); + } + } + + // Create output dir if not exists + dol_mkdir($diroutputpdf); + + // Save merged file + $filename=strtolower(dol_sanitizeFileName($langs->transnoentities("Invoices"))); + if ($filter=='paye:0') + { + if ($option=='late') $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); + else $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); + } + if ($year) $filename.='_'.$year; + if ($month) $filename.='_'.$month; + if ($pagecount) + { + $now=dol_now(); + $file=$diroutputpdf.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; + $pdf->Output($file,'F'); + if (! empty($conf->global->MAIN_UMASK)) + @chmod($file, octdec($conf->global->MAIN_UMASK)); + + $langs->load("exports"); + setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); + } + } + + // Remove file + if ($action == 'remove_file') + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $langs->load("other"); + $upload_dir = $diroutputpdf; + $file = $upload_dir . '/' . GETPOST('file'); + $ret=dol_delete_file($file); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + $action=''; + } + +} // Do we click on purge search criteria ? if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers @@ -129,11 +553,16 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_montant_ht=''; $search_montant_ttc=''; $search_status=''; + $search_paymentmode=''; $day=''; $year=''; $month=''; + $toselect=''; + $option=''; + $filter=''; } + /* * View @@ -149,7 +578,7 @@ $facturestatic=new Facture($db); $sql = 'SELECT'; if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT'; -$sql.= ' f.rowid as facid, f.facnumber, f.ref_client, f.type, f.note_private, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc,'; +$sql.= ' f.rowid as facid, f.facnumber, f.ref_client, f.type, f.note_private, f.increment, f.fk_mode_reglement, f.total as total_ht, f.tva as total_tva, f.total_ttc,'; $sql.= ' f.datef as df, f.date_lim_reglement as datelimite,'; $sql.= ' f.paye as paye, f.fk_statut,'; $sql.= ' s.nom as name, s.rowid as socid, s.code_client, s.client '; @@ -192,6 +621,7 @@ if ($search_societe) $sql .= natural_search('s.nom', $search_societe); if ($search_montant_ht != '') $sql.= natural_search('f.total', $search_montant_ht, 1); if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1); if ($search_status != '' && $search_status >= 0) $sql.= " AND f.fk_statut = ".$db->escape($search_status); +if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmode.""; if ($month > 0) { if ($year > 0 && empty($day)) @@ -218,6 +648,8 @@ else if ($year_lim > 0) { $sql.= " AND f.date_lim_reglement BETWEEN '".$db->idate(dol_get_first_day($year_lim,1,false))."' AND '".$db->idate(dol_get_last_day($year_lim,12,false))."'"; } +if ($option == 'late') $sql.=" AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->client->warning_delay)."'"; +if ($filter == 'paye:0') $sql.= " AND f.fk_statut = 1"; if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale; if ($search_user > 0) { @@ -232,7 +664,7 @@ if (! $sall) } else { - $sql .= natural_search(array('s.nom', 'f.facnumber', 'f.note_public', 'fd.description'), $sall); + $sql .= natural_search(array_keys($fieldstosearchall), $sall); } $sql.= ' ORDER BY '; $listfield=explode(',',$sortfield); @@ -254,6 +686,8 @@ if ($resql) { $num = $db->num_rows($resql); + $arrayofselected=is_array($toselect)?$toselect:array(); + if ($socid) { $soc = new Societe($db); @@ -261,6 +695,7 @@ if ($resql) } $param='&socid='.$socid; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; if ($month) $param.='&month='.$month; if ($year) $param.='&year=' .$year; if ($search_ref) $param.='&search_ref=' .$search_ref; @@ -271,12 +706,125 @@ if ($resql) if ($search_montant_ht != '') $param.='&search_montant_ht='.$search_montant_ht; if ($search_montant_ttc != '') $param.='&search_montant_ttc='.$search_montant_ttc; if ($search_status != '') $param.='&search_status='.$search_status; - print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->name:''),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_accountancy.png'); - + if ($search_paymentmode > 0) $param.='search_paymentmode='.$search_paymentmode; + $param.=(! empty($option)?"&option=".$option:""); + + $massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); + $i = 0; - print ''."\n"; - print ''; + print ''."\n"; + print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->name:''),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$massactionbutton,$num,$nbtotalofrecords,'title_accountancy.png',0,'','',$limit); + if ($massaction == 'presend') + { + $langs->load("mails"); + + if (! GETPOST('cancel')) + { + $objecttmp=new Facture($db); + $listofselectedid=array(); + $listofselectedthirdparties=array(); + $listofselectedref=array(); + foreach($arrayofselected as $toselectid) + { + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + $listofselectedid[$toselectid]=$toselectid; + $thirdpartyid=$objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid; + $listofselectedthirdparties[$thirdpartyid]=$thirdpartyid; + $listofselectedref[$thirdpartyid][$toselectid]=$objecttmp->ref; + } + } + } + + print ''; + + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + + dol_fiche_head(null, '', ''); + + $topicmail="SendBillRef"; + $modelmail="facture_send"; + + // Cree l'objet formulaire mail + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + $formmail->withform=-1; + $formmail->fromtype = 'user'; + $formmail->fromid = $user->id; + $formmail->fromname = $user->getFullName($langs); + $formmail->frommail = $user->email; + if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 1)) // If bit 1 is set + { + $formmail->trackid='inv'.$object->id; + } + if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set + { + include DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $formmail->frommail=dolAddEmailTrackId($formmail->frommail, 'inv'.$object->id); + } + $formmail->withfrom=1; + $liste=$langs->trans("AllRecipientSelected"); + if (count($listofselectedthirdparties) == 1) + { + $liste=array(); + $thirdpartyid=array_shift($listofselectedthirdparties); + $soc=new Societe($db); + $soc->fetch($thirdpartyid); + foreach ($soc->thirdparty_and_contact_email_array(1) as $key=>$value) + { + $liste[$key]=$value; + } + $formmail->withtoreadonly=0; + } + else + { + $formmail->withtoreadonly=1; + } + $formmail->withto=$liste; + $formmail->withtofree=0; + $formmail->withtocc=1; + $formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC; + $formmail->withtopic=$langs->transnoentities($topicmail, '__REF__', '__REFCLIENT__'); + $formmail->withfile=$langs->trans("OnlyPDFattachmentSupported"); + $formmail->withbody=1; + $formmail->withdeliveryreceipt=1; + $formmail->withcancel=1; + // Tableau des substitutions + $formmail->substit['__REF__']='__REF__'; // We want to keep the tag + $formmail->substit['__SIGNATURE__']=$user->signature; + $formmail->substit['__REFCLIENT__']='__REFCLIENT__'; // We want to keep the tag + $formmail->substit['__PERSONALIZED__']=''; + $formmail->substit['__CONTACTCIVNAME__']=''; + + // Tableau des parametres complementaires du post + $formmail->param['action']=$action; + $formmail->param['models']=$modelmail; + $formmail->param['models_id']=GETPOST('modelmailselected','int'); + $formmail->param['facid']=join(',',$arrayofselected); + //$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id; + + print $formmail->get_form(); + + dol_fiche_end(); + } + + + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + if ($sall) + { + foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); + print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall); + } + // If the user can view prospects other than his' $moreforfilter=''; if ($user->rights->societe->client->voir || $socid) @@ -296,7 +844,7 @@ if ($resql) $moreforfilter.=''; } // If the user can view prospects other than his' - if ($conf->categorie->enabled && $user->rights->produit->lire) + if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter.='
'; @@ -305,23 +853,29 @@ if ($resql) $moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1); $moreforfilter.='
'; } + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint; + else $moreforfilter = $hookmanager->resPrint; if ($moreforfilter) { - print ''; - print ''; + print ''; } + print '
'; + print '
'; print $moreforfilter; - print '
'; + print ''; print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'f.facnumber','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Date'),$_SERVER['PHP_SELF'],'f.datef','',$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateDue"),$_SERVER['PHP_SELF'],"f.date_lim_reglement",'',$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('ThirdParty'),$_SERVER['PHP_SELF'],'s.nom','',$param,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("PaymentModeShort"),$_SERVER["PHP_SELF"],"f.fk_mode_reglement","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans('AmountHT'),$_SERVER['PHP_SELF'],'f.total','',$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('AmountVAT'),$_SERVER['PHP_SELF'],'f.tva','',$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans('Taxes'),$_SERVER['PHP_SELF'],'f.tva','',$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('AmountTTC'),$_SERVER['PHP_SELF'],'f.total_ttc','',$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Received'),$_SERVER['PHP_SELF'],'am','',$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Status'),$_SERVER['PHP_SELF'],'fk_statut,paye,am','',$param,'align="right"',$sortfield,$sortorder); @@ -345,8 +899,12 @@ if ($resql) if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; print ''; $formother->select_year($year_lim?$year_lim:-1,'year_lim',1, 20, 5); + print '
'.$langs->trans("Late"); print ''; print ''; + print ''; print ''; print ''; print ''; @@ -355,9 +913,11 @@ if ($resql) $liststatus=array('0'=>$langs->trans("BillShortStatusDraft"), '1'=>$langs->trans("BillShortStatusNotPaid"), '2'=>$langs->trans("BillShortStatusPaid"), '3'=>$langs->trans("BillShortStatusCanceled")); print $form->selectarray('search_status', $liststatus, $search_status, 1); print ''; - print '\n"; + print ''; + print "\n"; if ($num > 0) { @@ -380,6 +940,8 @@ if ($resql) $facturestatic->id=$objp->facid; $facturestatic->ref=$objp->facnumber; $facturestatic->type=$objp->type; + $facturestatic->statut=$objp->fk_statut; + $facturestatic->date_lim_reglement=$db->jdate($objp->datelimite); $notetoshow=dol_string_nohtmltag(($user->societe_id>0?$objp->note_public:$objp->note),1); $paiement = $facturestatic->getSommePaiement(); @@ -419,7 +981,7 @@ if ($resql) // Date limit print ''; + // Payment mode + print ''; + print ''; print ''; @@ -442,12 +1009,17 @@ if ($resql) print ''; - // Affiche statut de la facture + // Status print '"; - print ""; + // Checkbox + print '' ; print "\n"; $total_ht+=$objp->total_ht; @@ -461,7 +1033,7 @@ if ($resql) { // Print total print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -475,6 +1047,23 @@ if ($resql) print "
'; + $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 0, 1, 10); + print ''; - print ''; - print "
'; + $searchpitco=$form->showFilterAndCheckAddButtons(1, 'checkforselect', 1); + print $searchpitco; + print '
'.dol_print_date($datelimit,'day'); - if ($datelimit < ($now - $conf->facture->client->warning_delay) && ! $objp->paye && $objp->fk_statut == 1 && ! $paiement) + if ($facturestatic->hasDelay()) { print img_warning($langs->trans('Late')); } @@ -434,6 +996,11 @@ if ($resql) print $thirdparty->getNomUrl(1,'customer'); print ''; + $form->form_modes_reglement($_SERVER['PHP_SELF'], $objp->fk_mode_reglement, 'none', '', -1); + print ''.price($objp->total_ht,0,$langs).''.price($objp->total_tva,0,$langs).''.(! empty($paiement)?price($paiement,0,$langs):' ').''; print $facturestatic->LibStatut($objp->paye,$objp->fk_statut,5,$paiement,$objp->type); print "'; + $selected=0; + if (in_array($objp->facid, $arrayofselected)) $selected=1; + print ''; + print '
'.$langs->trans('Total').''.$langs->trans('Total').''.price($total_ht,0,$langs).''.price($total_tva,0,$langs).''.price($total_ttc,0,$langs).'
\n"; print "\n"; $db->free($resql); + + if ($massaction == 'builddoc' || $action == 'remove_file') + { + /* + * Show list of available documents + */ + $urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; + $urlsource.=str_replace('&','&',$param); + + $filedir=$diroutputpdf; + $genallowed=$user->rights->facture->lire; + $delallowed=$user->rights->facture->lire; + + print '
'; + // We disable multilang because we concat already existing pdf. + $formfile->show_documents('unpaid','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$langs->trans("PDFMerge"),''); + } } else { diff --git a/htdocs/compta/facture/mergepdftool.php b/htdocs/compta/facture/mergepdftool.php index ea0eedfa36a..043a45a0861 100644 --- a/htdocs/compta/facture/mergepdftool.php +++ b/htdocs/compta/facture/mergepdftool.php @@ -49,7 +49,7 @@ $builddoc_generatebutton=GETPOST('builddoc_generatebutton'); $month = GETPOST("month","int"); $year = GETPOST("year","int"); $filter = GETPOST("filtre"); -if (GETPOST('button_search')) +if (GETPOST('button_search') || GETPOST('button_search.x') || GETPOST('button_search_x')) { $filter=GETPOST('filtre',2); //if ($filter != 'payed:0') $option=''; @@ -70,6 +70,11 @@ $diroutputpdf=$conf->facture->dir_output . '/unpaid/temp'; if (! $user->rights->societe->client->voir || $socid) $diroutputpdf.='/private/'.$user->id; // If user has no permission to see all, output dir is specific to user $resultmasssend=''; +if (GETPOST('buttonsendremind')) +{ + $action='presend'; + $mode='sendmassremind'; +} if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test must be present to be compatible with all browsers { @@ -107,14 +112,14 @@ if ($action == 'presend' && GETPOST('sendmail')) if (!isset($user->email)) { $error++; - setEventMessage("NoSenderEmailDefined"); + setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings'); } $countToSend = count($_POST['toSend']); if (empty($countToSend)) { $error++; - setEventMessage("InvoiceNotChecked","warnings"); + setEventMessages($langs->trans("InvoiceNotChecked"), null, 'warnings'); } if (! $error) @@ -122,15 +127,90 @@ if ($action == 'presend' && GETPOST('sendmail')) $nbsent = 0; $nbignored = 0; - for ($i = 0; $i < $countToSend; $i++) + $arrayofinvoices=GETPOST('toSend','array'); + + $thirdparty=new Societe($db); + $invoicetmp=new Facture($db); + $listofinvoicesid=array(); + $listofinvoicesthirdparties=array(); + $listofinvoicesref=array(); + foreach($arrayofinvoices as $invoiceid) { - $object = new Facture($db); - $result = $object->fetch($_POST['toSend'][$i]); - - if ($result > 0) // Invoice was found + $invoicetmp=new Facture($db); // must create new instance because instance is saved into $listofinvoicesref array for future use + $result=$invoicetmp->fetch($invoiceid); + if ($result > 0) { + $listoinvoicesid[$invoiceid]=$invoiceid; + $thirdpartyid=$invoicetmp->fk_soc?$invoicetmp->fk_soc:$invoicetmp->socid; + $listofinvoicesthirdparties[$thirdpartyid]=$thirdpartyid; + $listofinvoicesref[$thirdpartyid][$invoiceid]=$invoicetmp; + } + } + //var_dump($listofinvoicesref);exit; + + foreach ($listofinvoicesthirdparties as $thirdpartyid) + { + $result = $thirdparty->fetch($thirdpartyid); + if ($result < 0) + { + dol_print_error($db); + exit; + } + + // Define recipient $sendto and $sendtocc + if (trim($_POST['sendto'])) + { + // Recipient is provided into free text + $sendto = trim($_POST['sendto']); + $sendtoid = 0; + } + elseif ($_POST['receiver'] != '-1') + { + // Recipient was provided from combo list + if ($_POST['receiver'] == 'thirdparty') // Id of third party + { + $sendto = $thirdparty->email; + $sendtoid = 0; + } + else // Id du contact + { + $sendto = $thirdparty->contact_get_property((int) $_POST['receiver'],'email'); + $sendtoid = $_POST['receiver']; + } + } + if (trim($_POST['sendtocc'])) + { + $sendtocc = trim($_POST['sendtocc']); + } + elseif ($_POST['receivercc'] != '-1') + { + // Recipient was provided from combo list + if ($_POST['receivercc'] == 'thirdparty') // Id of third party + { + $sendtocc = $thirdparty->email; + } + else // Id du contact + { + $sendtocc = $thirdparty->contact_get_property((int) $_POST['receivercc'],'email'); + } + } + + //var_dump($listofinvoicesref[$thirdpartyid]); + + $attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array()); + $listofqualifiedinvoice=array(); + $listofqualifiedref=array(); + foreach($listofinvoicesref[$thirdpartyid] as $invoiceid => $invoice) + { + //var_dump($invoice); + $object = $invoice; + //$object = new Facture($db); + //$result = $object->fetch(); + //var_dump($thirdpartyid.' - '.$invoiceid.' - '.$object->statut); + if ($object->statut != Facture::STATUS_VALIDATED) { + $nbignored++; continue; // Payment done or started or canceled } @@ -144,108 +224,30 @@ if ($action == 'presend' && GETPOST('sendmail')) if (dol_is_file($file)) { - $object->fetch_thirdparty(); - $sendto = $object->thirdparty->email; + if (empty($sendto)) // For the case, no recipient were set (multi thirdparties send) + { + $object->fetch_thirdparty(); + $sendto = $object->thirdparty->email; + } - if (empty($sendto)) $nbignored++; + if (empty($sendto)) + { + $nbignored++; + continue; + } if (dol_strlen($sendto)) { - $langs->load("commercial"); - $from = $user->getFullName($langs) . ' <' . $user->email .'>'; - $replyto = $from; - $subject = GETPOST('subject'); - $message = GETPOST('message'); - $sendtocc = GETPOST('sentocc'); - $sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO); - - $substitutionarray=array( - '__ID__' => $object->id, - '__EMAIL__' => $object->thirdparty->email, - '__CHECK_READ__' => '', - //'__LASTNAME__' => $obj2->lastname, - //'__FIRSTNAME__' => $obj2->firstname, - '__FACREF__' => $object->ref, // For backward compatibility - '__REF__' => $object->ref, - '__REFCLIENT__' => $object->thirdparty->name - ); - - $subject=make_substitutions($subject, $substitutionarray); - $message=make_substitutions($message, $substitutionarray); - - $actiontypecode='AC_FAC'; - $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; - if ($message) - { - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); - $actionmsg = dol_concatdesc($actionmsg, $message); - } - // Create form object - $attachedfiles=array('paths'=>array($file), 'names'=>array($filename), 'mimes'=>array($mime)); - $filepath = $attachedfiles['paths']; - $filename = $attachedfiles['names']; - $mimetype = $attachedfiles['mimes']; - - // Send mail - require_once(DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'); - $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1); - if ($mailfile->error) - { - $resultmasssend.='
'.$mailfile->error.'
'; - } - else - { - $result=$mailfile->sendfile(); - if ($result) - { - $resultmasssend.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); // Must not contain " - - $error=0; - - // Initialisation donnees - $object->sendtoid = 0; - $object->actiontypecode = $actiontypecode; - $object->actionmsg = $actionmsg; // Long text - $object->actionmsg2 = $actionmsg2; // Short text - $object->fk_element = $object->id; - $object->elementtype = $object->element; - - // Appel des triggers - include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); - $interface=new Interfaces($db); - $result=$interface->run_triggers('BILL_SENTBYMAIL',$object,$user,$langs,$conf); - if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers - - if (! $error) - { - $resultmasssend.=$langs->trans("MailSent").': '.$sendto."
\n"; - } - else - { - dol_print_error($db); - } - $nbsent++; - - } - else - { - $langs->load("other"); - if ($mailfile->error) - { - $resultmasssend.=$langs->trans('ErrorFailedToSendMail',$from,$sendto); - $resultmasssend.='
'.$mailfile->error.'
'; - } - else - { - $resultmasssend.='
No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS
'; - } - } - } + $attachedfiles=array( + 'paths'=>array_merge($attachedfiles['paths'],array($file)), + 'names'=>array_merge($attachedfiles['names'],array($filename)), + 'mimes'=>array_merge($attachedfiles['mimes'],array($mime)) + ); } + + $listofqualifiedinvoice[$invoiceid]=$invoice; + $listofqualifiedref[$invoiceid]=$invoice->ref; } else { @@ -253,6 +255,109 @@ if ($action == 'presend' && GETPOST('sendmail')) $langs->load("other"); $resultmasssend.='
'.$langs->trans('ErrorCantReadFile',$file).'
'; dol_syslog('Failed to read file: '.$file, LOG_WARNING); + continue; + } + + //var_dump($listofqualifiedref); + } + + if (count($listofqualifiedinvoice) > 0) + { + $langs->load("commercial"); + $from = $user->getFullName($langs) . ' <' . $user->email .'>'; + $replyto = $from; + $subject = GETPOST('subject'); + $message = GETPOST('message'); + $sendtocc = GETPOST('sentocc'); + $sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO); + + $substitutionarray=array( + '__ID__' => join(', ',array_keys($listofqualifiedinvoice)), + '__EMAIL__' => $thirdparty->email, + '__CHECK_READ__' => '', + //'__LASTNAME__' => $obj2->lastname, + //'__FIRSTNAME__' => $obj2->firstname, + '__FACREF__' => join(', ',$listofqualifiedref), // For backward compatibility + '__REF__' => join(', ',$listofqualifiedref), + '__REFCLIENT__' => $thirdparty->name + ); + + $subject=make_substitutions($subject, $substitutionarray); + $message=make_substitutions($message, $substitutionarray); + + $filepath = $attachedfiles['paths']; + $filename = $attachedfiles['names']; + $mimetype = $attachedfiles['mimes']; + + //var_dump($filepath); + + // Send mail + require_once(DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'); + $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1); + if ($mailfile->error) + { + $resultmasssend.='
'.$mailfile->error.'
'; + } + else + { + $result=$mailfile->sendfile(); + if ($result) + { + $resultmasssend.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); // Must not contain " + + $error=0; + + foreach($listofqualifiedinvoice as $invid => $object) + { + $actiontypecode='AC_FAC'; + $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; + if ($message) + { + if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); + $actionmsg = dol_concatdesc($actionmsg, $message); + } + + // Initialisation donnees + $object->sendtoid = 0; + $object->actiontypecode = $actiontypecode; + $object->actionmsg = $actionmsg; // Long text + $object->actionmsg2 = $actionmsg2; // Short text + $object->fk_element = $invid; + $object->elementtype = $invoice->element; + + // Appel des triggers + include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"); + $interface=new Interfaces($db); + $result=$interface->run_triggers('BILL_SENTBYMAIL',$object,$user,$langs,$conf); + if ($result < 0) { $error++; $this->errors=$interface->errors; } + // Fin appel triggers + + if (! $error) + { + $resultmasssend.=$langs->trans("MailSent").': '.$sendto."
\n"; + } + else + { + dol_print_error($db); + } + $nbsent++; + } + } + else + { + $langs->load("other"); + if ($mailfile->error) + { + $resultmasssend.=$langs->trans('ErrorFailedToSendMail',$from,$sendto); + $resultmasssend.='
'.$mailfile->error.'
'; + } + else + { + $resultmasssend.='
No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS
'; + } + } } } } @@ -260,11 +365,11 @@ if ($action == 'presend' && GETPOST('sendmail')) if ($nbsent) { $action=''; // Do not show form post if there was at least one successfull sent - setEventMessage($nbsent. '/'.$countToSend.' '.$langs->trans("RemindSent")); + setEventMessages($nbsent. '/'.$countToSend.' '.$langs->trans("RemindSent"), null, 'mesgs'); } else { - setEventMessage($langs->trans("NoRemindSent"), 'warnings'); // May be object has no generated PDF file + setEventMessages($langs->trans("NoRemindSent"), null, 'warnings'); // May be object has no generated PDF file } } } @@ -280,7 +385,6 @@ if ($action == "builddoc" && $user->rights->facture->lire && ! GETPOST('button_s // liste les fichiers $files = array(); - $factures_bak = $factures ; foreach($_POST['toGenerate'] as $basename) { foreach($factures as $facture) @@ -349,16 +453,16 @@ if ($action == "builddoc" && $user->rights->facture->lire && ! GETPOST('button_s @chmod($file, octdec($conf->global->MAIN_UMASK)); $langs->load("exports"); - setEventMessage($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog'))); + setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); } else { - setEventMessage($langs->trans('NoPDFAvailableForChecked'),'errors'); + setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); } } else { - setEventMessage($langs->trans('InvoiceNotChecked'), 'warnings'); + setEventMessages($langs->trans('InvoiceNotChecked'), null, 'warnings'); } } @@ -371,8 +475,8 @@ if ($action == 'remove_file') $upload_dir = $diroutputpdf; $file = $upload_dir . '/' . GETPOST('file'); $ret=dol_delete_file($file); - if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); - else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); $action=''; } @@ -417,7 +521,6 @@ $search_societe = GETPOST("search_societe"); $search_paymentmode = GETPOST("search_paymentmode"); $search_montant_ht = GETPOST("search_montant_ht"); $search_montant_ttc = GETPOST("search_montant_ttc"); -$search_status = GETPOST("search_status"); $late = GETPOST("late"); // Do we click on purge search criteria ? @@ -429,7 +532,6 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_paymentmode=''; $search_montant_ht=''; $search_montant_ttc=''; - $search_status=''; } $sortfield = GETPOST("sortfield",'alpha'); @@ -442,7 +544,7 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield="f.date_lim_reglement"; if (! $sortorder) $sortorder="ASC"; -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $sql = "SELECT s.nom as name, s.rowid as socid, s.email"; $sql.= ", f.rowid as facid, f.facnumber, f.ref_client, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc, f.localtax1, f.localtax2, f.revenuestamp"; @@ -485,7 +587,6 @@ if ($search_paymentmode) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmo if ($search_montant_ht) $sql .= " AND f.total = '".$db->escape($search_montant_ht)."'"; if ($search_montant_ttc) $sql .= " AND f.total_ttc = '".$db->escape($search_montant_ttc)."'"; if (GETPOST('sf_ref')) $sql .= " AND f.facnumber LIKE '%".$db->escape(GETPOST('sf_ref'))."%'"; -if ($search_status) $sql .= " AND f.fk_statut = ".$search_status; if ($month > 0) { if ($year > 0) @@ -503,7 +604,7 @@ if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='facture' AND tc.source='internal' AND ec.element_id = f.rowid AND ec.fk_socpeople = ".$search_user; } $sql.= " GROUP BY s.nom, s.rowid, s.email, f.rowid, f.facnumber, f.ref_client, f.increment, f.total, f.tva, f.total_ttc, f.localtax1, f.localtax2, f.revenuestamp,"; -$sql.= " f.datef, f.date_lim_reglement, f.paye, f.fk_statut, f.type, fk_mode_reglement"; +$sql.= " f.datef, f.date_lim_reglement, f.paye, f.fk_statut, f.type, f.fk_mode_reglement"; if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql.= " ORDER BY "; $listfield=explode(',',$sortfield); @@ -531,7 +632,6 @@ if ($resql) if ($search_societe) $param.='&search_paymentmode='.urlencode($search_paymentmode); if ($search_montant_ht) $param.='&search_montant_ht='.urlencode($search_montant_ht); if ($search_montant_ttc) $param.='&search_montant_ttc='.urlencode($search_montant_ttc); - if ($search_status) $param.='&search_status='.urlencode($search_status); if ($late) $param.='&late='.urlencode($late); if ($mode) $param.='&mode='.urlencode($mode); $urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; @@ -548,9 +648,34 @@ if ($resql) $param.=(! empty($option)?"&option=".$option:""); - print_fiche_titre($titre,$link); + print load_fiche_titre($titre,$link); //print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',0); // We don't want pagination on this page + $arrayofinvoices=GETPOST('toSend','array'); + if ($action == 'presend' && count($arrayofinvoices) == 0 && ! GETPOST('cancel')) + { + setEventMessages($langs->trans("InvoiceNotChecked"), null, 'errors'); + $action='list'; + $mode='sendmassremind'; + } + else + { + $invoicetmp=new Facture($db); + $listofinvoicesid=array(); + $listofinvoicesthirdparties=array(); + $listofinvoicesref=array(); + foreach($arrayofinvoices as $invoiceid) + { + $result=$invoicetmp->fetch($invoiceid); + if ($result > 0) + { + $listofinvoicesid[$invoiceid]=$invoiceid; + $thirdpartyid=$invoicetmp->fk_soc?$invoicetmp->fk_soc:$invoicetmp->socid; + $listofinvoicesthirdparties[$thirdpartyid]=$thirdpartyid; + $listofinvoicesref[$thirdpartyid][$invoiceid]=$invoicetmp->ref; + } + } + } print '
'; if (GETPOST('modelselected')) { @@ -574,20 +699,44 @@ if ($resql) $formmail->fromid = $user->id; $formmail->fromname = $user->getFullName($langs); $formmail->frommail = $user->email; + if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 1)) // If bit 1 is set + { + $formmail->trackid='inv'.$object->id; + } + if (! empty($conf->global->MAIN_EMAIL_ADD_TRACK_ID) && ($conf->global->MAIN_EMAIL_ADD_TRACK_ID & 2)) // If bit 2 is set + { + include DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $formmail->frommail=dolAddEmailTrackId($formmail->frommail, 'inv'.$object->id); + } $formmail->withfrom=1; - $liste=array(); - $formmail->withto=$langs->trans("AllRecipientSelectedForRemind"); + $liste=$langs->trans("AllRecipientSelectedForRemind"); + if (count($listofinvoicesthirdparties) == 1) + { + $liste=array(); + $thirdpartyid=array_shift($listofinvoicesthirdparties); + $soc=new Societe($db); + $soc->fetch($thirdpartyid); + foreach ($soc->thirdparty_and_contact_email_array(1) as $key=>$value) + { + $liste[$key]=$value; + } + $formmail->withtoreadonly=0; + } + else + { + $formmail->withtoreadonly=1; + } + $formmail->withto=$liste; $formmail->withtofree=0; - $formmail->withtoreadonly=1; $formmail->withtocc=1; $formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC; - $formmail->withtopic=$langs->transnoentities($topicmail, '__FACREF__', '__REFCLIENT__'); - $formmail->withfile=$langs->trans("EachInvoiceWillBeAttachedToEmail"); + $formmail->withtopic=$langs->transnoentities($topicmail, '__REF__', '__REFCLIENT__'); + $formmail->withfile=$langs->trans("OnlyPDFattachmentSupported"); $formmail->withbody=1; $formmail->withdeliveryreceipt=1; $formmail->withcancel=1; // Tableau des substitutions - //$formmail->substit['__FACREF__']=''; + //$formmail->substit['__REF__']=''; $formmail->substit['__SIGNATURE__']=$user->signature; //$formmail->substit['__REFCLIENT__']=''; $formmail->substit['__PERSONALIZED__']=''; @@ -597,7 +746,7 @@ if ($resql) $formmail->param['action']=$action; $formmail->param['models']=$modelmail; $formmail->param['models_id']=GETPOST('modelmailselected','int'); - $formmail->param['facid']=$object->id; + $formmail->param['facid']=join(',',$arrayofinvoices); $formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id; print $formmail->get_form(); @@ -620,55 +769,51 @@ if ($resql) } $i = 0; - print ''; // If the user can view prospects other than his' $moreforfilter=''; if ($user->rights->societe->client->voir || $socid) { $langs->load("commercial"); + $moreforfilter.='
'; $moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': '; - $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user); - $moreforfilter.='       '; + $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user, 0, 1, 'maxwidth300'); + $moreforfilter.='
'; } // If the user can view prospects other than his' if ($user->rights->societe->client->voir || $socid) { + $moreforfilter.='
'; $moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': '; - $moreforfilter.=$form->select_dolusers($search_user,'search_user',1); + $moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + $moreforfilter.='
'; } - if ($moreforfilter) + if (! empty($moreforfilter)) { - print ''; - print ''; + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print ''; } - print ''; + print '
'; + print '
'; print $moreforfilter; - print '
'; + + print ''; print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.facnumber","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateDue"),$_SERVER["PHP_SELF"],"f.date_lim_reglement","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("PaymentMode"),$_SERVER["PHP_SELF"],"f.fk_reglement_mode","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("PaymentMode"),$_SERVER["PHP_SELF"],"f.fk_mode_reglement","",$param,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Taxes"),$_SERVER["PHP_SELF"],"f.tva","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"f.total_ttc","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Received"),$_SERVER["PHP_SELF"],"am","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Rest"),$_SERVER["PHP_SELF"],"","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"fk_statut,paye,am","",$param,'align="right"',$sortfield,$sortorder); - - $searchpitco=''; - $searchpitco.=''; - if (empty($mode)) - { - print_liste_field_titre($searchpitco,$_SERVER["PHP_SELF"],"","",$param,'align="center"',$sortfield,$sortorder); - } - else - { - print_liste_field_titre($searchpitco,$_SERVER["PHP_SELF"],"","",$param,'align="center"',$sortfield,$sortorder); - } + print_liste_field_titre('',$_SERVER["PHP_SELF"],"","",$param,'align="center"',$sortfield,$sortorder); print "\n"; // Lignes des champs de filtre @@ -702,14 +847,8 @@ if ($resql) print $form->selectarray('filtre', $liststatus, $filter, 1); print ''; print ''; print "\n"; @@ -738,6 +877,8 @@ if ($resql) $facturestatic->id=$objp->facid; $facturestatic->ref=$objp->facnumber; $facturestatic->type=$objp->type; + $facturestatic->statut=$objp->fk_statut; + $facturestatic->date_lim_reglement= $db->jdate($objp->datelimite); print '
'; - if (empty($mode)) - { - if ($conf->use_javascript_ajax) print ''.$langs->trans("All").' / '.$langs->trans("None").''; - } - else - { - if ($conf->use_javascript_ajax) print ''.$langs->trans("All").' / '.$langs->trans("None").''; - } + $searchpitco=$form->showFilterAndCheckAddButtons(1, empty($mode)?'checkformerge':'checkforsend'); + print $searchpitco; print '
'; @@ -748,7 +889,9 @@ if ($resql) // Warning picto print ''; // PDF Picto @@ -781,7 +924,7 @@ if ($resql) // Payment mode print ''; @@ -822,7 +965,9 @@ if ($resql) { // Checkbox to send remind print '' ; } @@ -869,7 +1014,7 @@ if ($resql) if ($action != 'presend') { print '
'; - print ''.$langs->trans("SendRemind").''; + print ''; print '
'; print '
'; } diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index be78b422fe6..47abb50fb8b 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -75,12 +75,12 @@ if ($action == "new") { $db->commit(); - setEventMessage($langs->trans("RecordSaved")); + setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); } else { $db->rollback(); - setEventMessage($object->error, $object->errors, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } $action=''; @@ -356,7 +356,9 @@ if ($object->id > 0) else { print dol_print_date($object->date_lim_reglement,'daytext'); - if ($object->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $object->paye && $object->statut == Facture::STATUS_VALIDATED && ! isset($object->am)) print img_warning($langs->trans('Late')); + if ($object->hasDelay()) { + print img_warning($langs->trans('Late')); + } } } else diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index f86fb1d975b..14f8c8d18f6 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -75,7 +75,7 @@ if ($mode == 'supplier') $dir=$conf->fournisseur->dir_output.'/facture/temp'; } -print_fiche_titre($title, $mesg, 'title_accountancy.png'); +print load_fiche_titre($title, $mesg, 'title_accountancy.png'); dol_mkdir($dir); @@ -234,17 +234,17 @@ print '
'; // Show filter box print ''; print ''; - print '
'; - if ($date_limit < ($now - $conf->facture->client->warning_delay) && ! $objp->paye && $objp->fk_statut == 1) print img_warning($langs->trans("Late")); + if ($facturestatic->hasDelay()) { + print img_warning($langs->trans("Late")); + } print ''; - $form->form_modes_reglement($_SERVER['PHP_SELF'], $objp->fk_mode_reglement, 'none'); + $form->form_modes_reglement($_SERVER['PHP_SELF'], $objp->fk_mode_reglement, 'none', '', -1); print ''; - if ($objp->email) print ''; + $selected=0; + if (in_array($objp->facid, $arrayofinvoices)) $selected=1; + if ($objp->email) print ''; else print img_picto($langs->trans("NoEMail"), 'warning.png'); print '
'; + print '
'; print ''; // Company print ''; // User print ''; // Year print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; if ($num) { @@ -777,6 +765,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) print '
'.$langs->trans("Filter").'
'.$langs->trans("ThirdParty").''; if ($mode == 'customer') $filter='s.client in (1,2,3)'; if ($mode == 'supplier') $filter='s.fournisseur = 1'; - print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 100%"'); + print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1); print '
'.$langs->trans("CreatedBy").''; - print $form->select_dolusers($userid,'userid',1); + print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '
'.$langs->trans("Year").''; @@ -259,8 +259,8 @@ print '
'; print '

'; //} -print ''; -print ''; +print '
'; +print ''; print ''; print ''; print ''; @@ -271,13 +271,15 @@ print ''; print ''; $oldyear=0; +$var=true; foreach ($data as $val) { $year = $val['year']; while ($year && $oldyear > $year+1) { // If we have empty year $oldyear--; - print ''; + $var=!$var; + print ''; print ''; print ''; print ''; @@ -287,7 +289,8 @@ foreach ($data as $val) print ''; print ''; } - print ''; + $var=!$var; + print ''; print ''; print ''; print ''; diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index b295e72f19e..d89dbceb689 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -30,7 +30,7 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("bills"); echo '
'; -print_titre($langs->trans("RelatedCustomerInvoices")); +print load_fiche_titre($langs->trans("RelatedCustomerInvoices"), '', ''); ?>
'.$langs->trans("Year").''.$langs->trans("NumberOfBills").'%%
0?'&userid='.$userid:'').'">'.$oldyear.'0
0?'&userid='.$userid:'').'">'.$year.''.$val['nb'].''.round($val['nb_diff']).'
diff --git a/htdocs/compta/hrm.php b/htdocs/compta/hrm.php index 4e931ef2b9d..08ca07b04c5 100644 --- a/htdocs/compta/hrm.php +++ b/htdocs/compta/hrm.php @@ -67,41 +67,44 @@ $childids[]=$user->id; llxHeader(array(),$langs->trans('HRMArea')); -print_fiche_titre($langs->trans("HRMArea"),'', 'title_hrm.png'); +print load_fiche_titre($langs->trans("HRMArea"),'', 'title_hrm.png'); print '
'; -/* - * Search expenses - */ + +if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) +{ + $langs->load("holiday"); + $listofsearchfields['search_holiday']=array('text'=>'TitreRequestCP'); +} if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) { $langs->load("trips"); - print ''; - print ''; - print '
'; - print ''; - print ""; - print "'; - print ''; - //print "'; - print ''; - print "
'.$langs->trans("SearchATripAndExpense").'
:
:

"; + $listofsearchfields['search_deplacement']=array('text'=>'ExpenseReport'); } - if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) { $langs->load("trips"); - print '
'; - print ''; - print ''; - print ''; - print ""; - print "'; - print ''; - //print "'; - print ''; - print "
'.$langs->trans("SearchATripAndExpense").'
:
:

"; + $listofsearchfields['search_expensereport']=array('text'=>'ExpenseReport'); +} +if (count($listofsearchfields)) +{ + print '
'; + print ''; + print ''; + $i=0; + foreach($listofsearchfields as $key => $value) + { + if ($i == 0) print ''; + print ''; + print ''; + if ($i == 0) print ''; + print ''; + $i++; + } + print '
'.$langs->trans("Search").'
:
'; + print '
'; + print '
'; } @@ -137,7 +140,82 @@ $max=10; $langs->load("boxes"); -// Last trips + + +// Last leave requests +if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) +{ + $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, x.rowid, x.rowid as ref, x.fk_type, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.tms as dm, x.statut as status"; + $sql.= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u"; + $sql.= " WHERE u.rowid = x.fk_user"; + $sql.= " AND x.entity = ".$conf->entity; + if (empty($user->rights->holiday->read_all)) $sql.=' AND x.fk_user IN ('.join(',',$childids).')'; + //if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + //if (!empty($socid)) $sql.= " AND x.fk_soc = ".$socid; + $sql.= $db->order("x.tms","DESC"); + $sql.= $db->plimit($max, 0); + + $result = $db->query($sql); + if ($result) + { + $var=false; + $num = $db->num_rows($result); + + $holidaystatic=new Holiday($db); + $userstatic=new User($db); + + $listhalfday=array('morning'=>$langs->trans("Morning"),"afternoon"=>$langs->trans("Afternoon")); + $typeleaves=$holidaystatic->getTypes(1,-1); + + $i = 0; + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + if ($num) + { + while ($i < $num && $i < $max) + { + $obj = $db->fetch_object($result); + $holidaystatic->id=$obj->rowid; + $holidaystatic->ref=$obj->ref; + $userstatic->id=$obj->uid; + $userstatic->lastname=$obj->lastname; + $userstatic->firstname=$obj->firstname; + print ''; + print ''; + print ''; + print ''; + + $starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning'; + $endhalfday=($obj->halfday == 1 || $obj->halfday == 2)?'morning':'afternoon'; + + print ''; + print ''; + print ''; + $var=!$var; + $i++; + } + + } + else + { + print ''; + } + print '
'.$langs->trans("BoxTitleLastLeaveRequests",min($max,$num)).''.$langs->trans("from").''.$langs->trans("to").''.$langs->trans("DateModificationShort").' 
'.$holidaystatic->getNomUrl(1).''.$userstatic->getNomUrl(1).''.$typeleaves[$obj->fk_type]['label'].''.dol_print_date($obj->date_start,'day').' '.$langs->trans($listhalfday[$endhalfday]); + print ''.dol_print_date($obj->date_end,'day').' '.$langs->trans($listhalfday[$endhalfday]); + print ''.dol_print_date($db->jdate($obj->dm),'day').''.$holidaystatic->LibStatut($obj->status,3).'
'.$langs->trans("None").'

'; + } + else dol_print_error($db); +} + + +// Last expense report (old module) if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) { $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, d.rowid, d.dated as date, d.tms as dm, d.km, d.fk_statut"; @@ -201,6 +279,7 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) else dol_print_error($db); } +// Last expense report (new module) if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) { $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ttc, x.fk_statut as status"; diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 5fb1d638a88..70e2564829e 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2005-2015 Regis Houssin * Copyright (C) 2015 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Raphaël Doursenaud @@ -81,7 +81,7 @@ $thirdpartystatic = new Societe($db); llxHeader("",$langs->trans("AccountancyTreasuryArea")); -print_fiche_titre($langs->trans("AccountancyTreasuryArea"),'','title_accountancy.png'); +print load_fiche_titre($langs->trans("AccountancyTreasuryArea"),'','title_accountancy.png'); print '
'; @@ -90,56 +90,40 @@ print '
'; $max=3; -/* - * Search invoices - */ +// Search customer invoices if (! empty($conf->facture->enabled) && $user->rights->facture->lire) { - print '
'; - print ''; - print ''; - print ""; - print ''; - print "'; - print ''; - print "'; - print ''; - print "
'.$langs->trans("SearchACustomerInvoice").'
:
:

"; + $listofsearchfields['search_invoice']=array('text'=>'CustomerInvoice'); } - -/* - * Search supplier invoices - */ +// Search supplier invoices if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) { - print '
'; - print ''; - print ''; - print ''; - print ""; - print "'; - print ''; - print "'; - print ''; - print "
'.$langs->trans("SearchASupplierInvoice").'
:
:

"; + $listofsearchfields['search_supplier_invoice']=array('text'=>'SupplierInvoice'); } - -/* - * Search donations - */ if (! empty($conf->don->enabled) && $user->rights->don->lire) { $langs->load("donations"); - print '
'; - print ''; - print ''; - print ''; - print ""; - print "'; - print ''; - //print "'; - print ''; - print "
'.$langs->trans("SearchADonation").'
:
:

"; + $listofsearchfields['search_donation']=array('text'=>'Donation'); +} + +if (count($listofsearchfields)) +{ + print '
'; + print ''; + print ''; + $i=0; + foreach($listofsearchfields as $key => $value) + { + if ($i == 0) print ''; + print ''; + print ''; + if ($i == 0) print ''; + print ''; + $i++; + } + print '
'.$langs->trans("Search").'
:
'; + print '
'; + print '
'; } /** @@ -359,11 +343,15 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $facturestatic->total_ht=$obj->total_ht; $facturestatic->total_tva=$obj->total_tva; $facturestatic->total_ttc=$obj->total_ttc; + $facturestatic->statut = $obj->fk_statut; + $facturestatic->date_lim_reglement = $db->jdate($obj->datelimite); $facturestatic->type=$obj->type; print $facturestatic->getNomUrl(1,''); print '
'; - if ($obj->fk_statut == 1 && ! $obj->paye && $db->jdate($obj->datelimite) < ($now - $conf->facture->client->warning_delay)) print img_warning($langs->trans("Late")); + if ($facturestatic->hasDelay()) { + print img_warning($langs->trans("Late")); + } print ''; $filename=dol_sanitizeFileName($obj->facnumber); @@ -592,7 +580,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print ''.$langs->trans("DateDue").''.$langs->trans("AmountTTC").''.$langs->trans("Paid").'  
'; print ''; + print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; @@ -801,10 +790,14 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $facturestatic->total_tva=$obj->total_tva; $facturestatic->total_ttc=$obj->total_ttc; $facturestatic->type=$obj->type; + $facturestatic->statut = $obj->fk_statut; + $facturestatic->date_lim_reglement = $db->jdate($obj->datelimite); print $facturestatic->getNomUrl(1,''); print ''; print ''; print ''; + print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; @@ -836,6 +830,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) } print ''; + print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; @@ -844,7 +839,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) } else { - $colspan=5; + $colspan=6; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print ''; } @@ -865,6 +860,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $facstatic=new FactureFournisseur($db); $sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_tva, ff.total_ttc, ff.paye"; + $sql.= ", ff.date_lim_reglement"; $sql.= ", s.nom as name"; $sql.= ", s.rowid as socid"; $sql.= ", s.code_client"; @@ -881,6 +877,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- if ($socid) $sql.= " AND ff.fk_soc = ".$socid; $sql.= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva, ff.total_tva, ff.total_ttc, ff.paye,"; $sql.= " s.nom, s.rowid, s.code_client, s.code_fournisseur"; + $sql.= " ORDER BY ff.date_lim_reglement ASC"; $resql=$db->query($sql); if ($resql) @@ -890,6 +887,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- print '
'.$langs->trans("BillsCustomersUnpaid",$num).' '.$num.''.$langs->trans("DateDue").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("Received").''; - if ($db->jdate($obj->datelimite) < ($now - $conf->facture->client->warning_delay)) print img_warning($langs->trans("Late")); + if ($facturestatic->hasDelay()) { + print img_warning($langs->trans("Late")); + } print ''; $filename=dol_sanitizeFileName($obj->facnumber); @@ -822,6 +815,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $societestatic->code_fournisseur = $obj->code_fournisseur; print $societestatic->getNomUrl(1,'customer',44); print ''.dol_print_date($db->jdate($obj->datelimite),'day').''.price($obj->total_ht).''.price($obj->total_ttc).''.price($obj->am).'
'.$langs->trans("Total").'   ('.$langs->trans("RemainderToTake").': '.price($total_ttc-$totalam).')  '.price($total).''.price($total_ttc).''.price($totalam).'
'.$langs->trans("NoInvoice").'
'; print ''; + print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; @@ -918,6 +916,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $societestatic->code_client = $obj->code_client; $societestatic->code_fournisseur = $obj->code_fournisseur; print ''; + print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; @@ -931,6 +930,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- } print ''; + print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; @@ -939,7 +939,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- } else { - $colspan=5; + $colspan=6; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print ''; } diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index 308bcac6dc9..aded1c6aa1f 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -1,5 +1,6 @@ + * Copyright (C) 2015 Marcos García * * 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 @@ -104,7 +105,7 @@ if ($_GET["action"] == 'delete') if ($result > 0) { $db->commit(); - header("Location: ".DOL_URL_ROOT.'/compta/localtax/reglement.php'); + header("Location: ".DOL_URL_ROOT.'/compta/localtax/reglement.php?localTaxType='.$localtax->ltt); exit; } else @@ -154,7 +155,7 @@ if ($_GET["action"] == 'create') print ''; print ''; - print_fiche_titre($langs->transcountry($lttype==2?"newLT2Payment":"newLT1Payment",$mysoc->country_code)); + print load_fiche_titre($langs->transcountry($lttype==2?"newLT2Payment":"newLT1Payment",$mysoc->country_code)); if ($mesg) print $mesg; @@ -268,8 +269,6 @@ if ($id) print ""; } - +llxFooter(); $db->close(); -llxFooter(); - diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 04461117271..067c8dc9cbe 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -29,15 +29,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Localtax extends CommonObject { - var $id; - var $ref; var $ltt; var $tms; var $datep; var $datev; var $amount; var $label; - var $note; var $fk_bank; var $fk_user_creat; var $fk_user_modif; diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index 31eaf4375c3..ac30e529839 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -318,7 +318,5 @@ if($conf->global->$calc ==0){ } print '
'.$langs->trans("BillsSuppliersUnpaid",$num).' '.$num.''.$langs->trans("DateDue").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("Paid").''.$societestatic->getNomUrl(1, 'supplier', 44).''.dol_print_date($db->jdate($obj->date_lim_reglement),'day').''.price($obj->total_ht).''.price($obj->total_ttc).''.price($obj->am).'
'.$langs->trans("Total").'   ('.$langs->trans("RemainderToPay").': '.price($total_ttc-$totalam).')  '.price($total).''.price($total_ttc).''.price($totalam).'
'.$langs->trans("NoInvoice").'
'; - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 1e8570d7378..3bed627402e 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -122,7 +122,7 @@ if($localTaxType==1) { $textprevyear="".img_previous().""; $textnextyear=" ".img_next().""; -print_fiche_titre($langs->transcountry($LT,$mysoc->country_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear"); +print load_fiche_titre($langs->transcountry($LT,$mysoc->country_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear"); print $langs->trans("LTReportBuildWithOptionDefinedInModule").'
'; print '('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')
'; @@ -130,10 +130,10 @@ print '
'; print ''; print ''; print '
'; -print_titre($langs->transcountry($LTSummary,$mysoc->country_code)); +print load_fiche_titre($langs->transcountry($LTSummary,$mysoc->country_code)); print ' '; -print_titre($langs->transcountry($LTPaid,$mysoc->country_code)); +print load_fiche_titre($langs->transcountry($LTPaid,$mysoc->country_code)); print '
'; @@ -280,6 +280,5 @@ print '
'; print '
'; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 7396c625165..7c1e99b3537 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -116,7 +116,7 @@ $product_static=new Product($db); $payment_static=new Paiement($db); $paymentfourn_static=new PaiementFourn($db); -//print_fiche_titre($langs->trans("VAT"),""); +//print load_fiche_titre($langs->trans("VAT"),""); //$fsearch.='
'; $fsearch.=' '; @@ -663,6 +663,5 @@ else $i++; } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/localtax/reglement.php b/htdocs/compta/localtax/reglement.php index 6d8c1bc7a9c..54530b14443 100644 --- a/htdocs/compta/localtax/reglement.php +++ b/htdocs/compta/localtax/reglement.php @@ -41,7 +41,7 @@ llxHeader(); $localtax_static = new Localtax($db); -print_fiche_titre($langs->transcountry($ltt==2?"LT2Payments":"LT1Payments",$mysoc->country_code)); +print load_fiche_titre($langs->transcountry($ltt==2?"LT2Payments":"LT1Payments",$mysoc->country_code)); $sql = "SELECT rowid, amount, label, f.datev as dm"; $sql.= " FROM ".MAIN_DB_PREFIX."localtax as f "; @@ -92,6 +92,5 @@ else dol_print_error($db); } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index aaebcf697f3..655bed80031 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -7,6 +7,7 @@ * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2014 Raphaël Doursenaud * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> + * Copyright (C) 2015 Juanjo Menent * * 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 @@ -117,7 +118,7 @@ if (empty($reshook)) { $langs->load("errors"); //$error++; - setEventMessage($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'warnings'); + setEventMessages($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), null, 'warnings'); } } @@ -128,7 +129,7 @@ if (empty($reshook)) // Check parameters if (! GETPOST('paiementcode')) { - setEventMessage($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('PaymentMode')), 'errors'); + setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('PaymentMode')), null, 'errors'); $error++; } @@ -137,20 +138,20 @@ if (empty($reshook)) // If bank module is on, account is required to enter a payment if (GETPOST('accountid') <= 0) { - setEventMessage($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('AccountToCredit')), 'errors'); + setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('AccountToCredit')), null, 'errors'); $error++; } } if (empty($totalpayment) && empty($atleastonepaymentnotnull)) { - setEventMessage($langs->transnoentities('ErrorFieldRequired',$langs->trans('PaymentAmount')), 'errors'); + setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->trans('PaymentAmount')), null, 'errors'); $error++; } if (empty($datepaye)) { - setEventMessage($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('Date')), 'errors'); + setEventMessages($langs->transnoentities('ErrorFieldRequired',$langs->transnoentities('Date')), null, 'errors'); $error++; } } @@ -193,7 +194,7 @@ if (empty($reshook)) // Si module bank actif, un compte est obligatoire lors de la saisie d'un paiement if (GETPOST('accountid') <= 0) { - setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentities('AccountToCredit')), 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired',$langs->transnoentities('AccountToCredit')), null, 'errors'); $error++; } } @@ -211,7 +212,7 @@ if (empty($reshook)) $paiement_id = $paiement->create($user, (GETPOST('closepaidinvoices')=='on'?1:0)); if ($paiement_id < 0) { - setEventMessage($paiement->error, 'errors'); + setEventMessages($paiement->error, $paiement->errors, 'errors'); $error++; } } @@ -223,7 +224,7 @@ if (empty($reshook)) $result=$paiement->addPaymentToBank($user,'payment',$label,GETPOST('accountid'),GETPOST('chqemetteur'),GETPOST('chqbank')); if ($result < 0) { - setEventMessage($paiement->error, 'errors'); + setEventMessages($paiement->error, $paiement->errors, 'errors'); $error++; } } @@ -277,7 +278,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $title=''; if ($facture->type != 2) $title.=$langs->trans("EnterPaymentReceivedFromCustomer"); if ($facture->type == 2) $title.=$langs->trans("EnterPaymentDueToCustomer"); - print_fiche_titre($title); + print load_fiche_titre($title); // Initialize data for confirmation (this is used because data can be change during confirmation) if ($action == 'add_paiement') @@ -414,7 +415,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print '
'.$langs->trans('Date').''; $datepayment = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $datepayment= ($datepayment == '' ? (empty($conf->global->MAIN_AUTOFILL_DATE)?-1:'') : $datepayment); - $form->select_date($datepayment,'','','',0,"add_paiement",1,1); + $form->select_date($datepayment,'','','',0,"add_paiement",1,1,0,0,'','',$facture->date); print ''.$langs->trans('Comments').'
"; } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 71d32404c94..0f03eb8ae47 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -3,7 +3,8 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Marcos García + * Copyright (C) 2013 Marcos García + * Copyright (C) 2015 Juanjo Menent * * 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 @@ -65,7 +66,7 @@ if ($action == 'setnote' && $user->rights->facture->paiement) } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } } @@ -85,7 +86,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture-> else { $langs->load("errors"); - setEventMessage($langs->trans($object->error), 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } } @@ -123,7 +124,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->facture-> else { $langs->load("errors"); - setEventMessage($langs->trans($object->error), 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } } @@ -134,11 +135,11 @@ if ($action == 'setnum_paiement' && ! empty($_POST['num_paiement'])) $res = $object->update_num($_POST['num_paiement']); if ($res === 0) { - setEventMessage($langs->trans('PaymentNumberUpdateSucceeded')); + setEventMessages($langs->trans('PaymentNumberUpdateSucceeded'), null, 'mesgs'); } else { - setEventMessage($langs->trans('PaymentNumberUpdateFailed'), 'errors'); + setEventMessages($langs->trans('PaymentNumberUpdateFailed'), null, 'errors'); } } @@ -149,11 +150,11 @@ if ($action == 'setdatep' && ! empty($_POST['datepday'])) $res = $object->update_date($datepaye); if ($res === 0) { - setEventMessage($langs->trans('PaymentDateUpdateSucceeded')); + setEventMessages($langs->trans('PaymentDateUpdateSucceeded'), null, 'mesgs'); } else { - setEventMessage($langs->trans('PaymentDateUpdateFailed'), 'errors'); + setEventMessages($langs->trans('PaymentDateUpdateFailed'), null, 'errors'); } } @@ -200,8 +201,13 @@ if ($action == 'valide') print ''; +$linkback = '' . $langs->trans("BackToList") . ''; + + // Ref -print ''; +print ''; // Date payment print ''; +$disable_delete = 0; // Bank account if (! empty($conf->banque->enabled)) { @@ -232,6 +239,11 @@ if (! empty($conf->banque->enabled)) { $bankline=new AccountLine($db); $bankline->fetch($object->bank_line); + if ($bankline->rappro) + { + $disable_delete = 1; + $title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemoveConciliatedPayment")); + } print ''; print ''; @@ -273,7 +285,6 @@ print '
'.$langs->trans('Ref').''.$object->id.'
'.$langs->trans('Ref').''; +print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); +print '
'.$form->editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).''; @@ -225,6 +231,7 @@ print '
'.$form->editfieldkey("Note",'note',$object->note,$ print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->facture->paiement,'textarea'); print '
'.$langs->trans('BankTransactionLine').'
'; * List of invoices */ -$disable_delete = 0; $sql = 'SELECT f.rowid as facid, f.facnumber, f.type, f.total_ttc, f.paye, f.fk_statut, pf.amount, s.nom as name, s.rowid as socid'; $sql.= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf,'.MAIN_DB_PREFIX.'facture as f,'.MAIN_DB_PREFIX.'societe as s'; $sql.= ' WHERE pf.fk_facture = f.rowid'; @@ -343,6 +354,7 @@ if ($resql) if ($objp->paye == 1) // If at least one invoice is paid, disable delete { $disable_delete = 1; + $title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemovePaymentWithOneInvoicePaid")); } $total = $total + $objp->amount; $i++; @@ -388,7 +400,7 @@ if ($user->societe_id == 0 && $action == '') } else { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } } } diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 0b7b3ed0c57..fba7a9044fa 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -26,7 +26,7 @@ * \brief Page for cheque deposits */ -require('../../../main.inc.php'); +require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; @@ -54,7 +54,7 @@ $page=GETPOST('page', 'int'); if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="b.dateo,b.rowid"; if ($page < 0) { $page = 0 ; } -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page ; $dir=$conf->banque->dir_output.'/bordereau/'; @@ -79,12 +79,12 @@ if ($action == 'setdate' && $user->rights->banque->cheque) $result=$object->set_date($user,$date); if ($result < 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -98,12 +98,12 @@ if ($action == 'setrefext' && $user->rights->banque->cheque) $result=$object->setValueFrom('ref_ext', $ref_ext); if ($result < 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -117,12 +117,12 @@ if ($action == 'setref' && $user->rights->banque->cheque) $result=$object->set_number($user,$number); if ($result < 0) { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -154,12 +154,12 @@ if ($action == 'create' && $_POST["accountid"] > 0 && $user->rights->banque->che } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else { - setEventMessage($langs->trans("ErrorSelectAtLeastOne")); + setEventMessages($langs->trans("ErrorSelectAtLeastOne"), null, 'mesgs'); $action='new'; } } @@ -175,7 +175,7 @@ if ($action == 'remove' && $id > 0 && $_GET["lineid"] > 0 && $user->rights->banq } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -190,7 +190,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->banque->c } else { - setEventMessage($paiement->error, 'errors'); + setEventMessages($paiement->error, $paiement->errors, 'errors'); } } @@ -217,7 +217,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->banque->c } else { - setEventMessage($object->error, 'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } @@ -230,7 +230,7 @@ if ($action == 'confirm_reject_check' && $confirm == 'yes' && $user->rights->ban $paiement_id = $object->rejectCheck($rejected_check, $reject_date); if ($paiement_id > 0) { - setEventMessage($langs->trans("CheckRejectedAndInvoicesReopened")); + setEventMessages($langs->trans("CheckRejectedAndInvoicesReopened"), null, 'mesgs'); //header("Location: ".DOL_URL_ROOT.'/compta/paiement/card.php?id='.$paiement_id); //exit; $action=''; @@ -282,8 +282,8 @@ else if ($action == 'remove_file' && $user->rights->banque->cheque) $file=$dir.get_exdir($object->number,0,1,0,$object,'cheque') . GETPOST('file'); $ret=dol_delete_file($file,0,0,0,$object); - if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('file'))); - else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), 'errors'); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors'); } } @@ -312,7 +312,7 @@ if ($action == 'new') $hselected = $h; $h++; - print_fiche_titre($langs->trans("Cheques")); + print load_fiche_titre($langs->trans("Cheques")); } else { @@ -779,7 +779,7 @@ print '
'; if ($user->societe_id == 0 && ! empty($object->id) && $object->statut == 0 && $user->rights->banque->cheque) { - print ''.$langs->trans('Valid').''; + print ''.$langs->trans('Validate').''; } if ($user->societe_id == 0 && ! empty($object->id) && $user->rights->banque->cheque) @@ -806,6 +806,7 @@ if ($action != 'new') } -$db->close(); llxFooter(); + +$db->close(); diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index c7fc00c9d2e..e70993bcaed 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -36,14 +36,18 @@ class RemiseCheque extends CommonObject public $element='chequereceipt'; public $table_element='bordereau_cheque'; - var $id; var $num; var $intitule; - var $ref_ext; //! Numero d'erreur Plage 1024-1279 var $errno; - public $statut; + public $amount; + public $date_bordereau; + public $account_id; + public $account_label; + public $author_id; + public $nbcheque; + public $number; /** * Constructor diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index 362493b7f19..ebe9f6e8461 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -47,7 +47,7 @@ $accountstatic=new Account($db); llxHeader('',$langs->trans("ChequesArea")); -print_fiche_titre($langs->trans("ChequesArea")); +print load_fiche_titre($langs->trans("ChequesArea")); //print ''; //print '
'; diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index d44aef51dce..5b4929ae42b 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -38,17 +38,18 @@ $langs->load("bills"); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'banque', '',''); -$search_ref = GETPOST('search_ref','int'); +$search_ref = GETPOST('search_ref','alpha'); $search_account = GETPOST('search_account','int'); $search_amount = GETPOST('search_amount','alpha'); + +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -$limit = $conf->liste_limit; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="dp"; @@ -101,30 +102,45 @@ else if ($year > 0) { $sql.= " AND bc.date_bordereau BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } +$sql.= $db->order($sortfield,$sortorder); + +$nbtotalofrecords = 0; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); +} -$sql.= " ORDER BY $sortfield $sortorder"; $sql.= $db->plimit($limit+1, $offset); //print "$sql"; $resql = $db->query($sql); - if ($resql) { $num = $db->num_rows($resql); $i = 0; - $params=''; + $param=''; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; - print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num); - - print '
'; - print ''; + print ''; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_bank.png', '', '', $limit); + + print '
'; print ''; - print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bc.number","",$params,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"dp","",$params,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$params,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("NbOfCheques"),$_SERVER["PHP_SELF"],"bc.nbcheque","",$params,'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"bc.amount","",$params,'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"bc.statut","",$params,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"bc.number","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"dp","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("NbOfCheques"),$_SERVER["PHP_SELF"],"bc.nbcheque","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"bc.amount","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"bc.statut","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre(''); print "\n"; // Lignes des champs de filtre @@ -144,46 +160,63 @@ if ($resql) print ''; - print '\n"; + print ''; + print ''; + print "\n"; - $var=true; - while ($i < min($num,$limit)) - { - $objp = $db->fetch_object($resql); - $var=!$var; - print ""; - - // Num ref cheque - print ''; - - // Date - print ''; // TODO Use date hour - - // Bank - print ''; - - // Number of cheques - print ''; - - // Amount - print ''; - - // Statut - print '\n"; - $i++; - } + if ($num > 0) + { + $var=true; + while ($i < min($num,$limit)) + { + $objp = $db->fetch_object($resql); + $var=!$var; + print ""; + + // Num ref cheque + print ''; + + // Date + print ''; // TODO Use date hour + + // Bank + print ''; + + // Number of cheques + print ''; + + // Amount + print ''; + + // Statut + print ''; + + print ''; + + print "\n"; + $i++; + } + } + else + { + $var=!$var; + print ""; + print '"; + print ''; + } print "
'; print ''; print ''; - print ''; - print "
'; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print '
'; - $checkdepositstatic->id=$objp->rowid; - $checkdepositstatic->ref=($objp->ref?$objp->ref:$objp->rowid); - $checkdepositstatic->statut=$objp->statut; - print $checkdepositstatic->getNomUrl(1); - print ''.dol_print_date($db->jdate($objp->dp),'day').''; - if ($objp->bid) print ''.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.''; - else print ' '; - print ''.$objp->nbcheque.''.price($objp->amount).''; - print $checkdepositstatic->LibStatut($objp->statut,5); - print "
'; + $checkdepositstatic->id=$objp->rowid; + $checkdepositstatic->ref=($objp->ref?$objp->ref:$objp->rowid); + $checkdepositstatic->statut=$objp->statut; + print $checkdepositstatic->getNomUrl(1); + print ''.dol_print_date($db->jdate($objp->dp),'day').''; + if ($objp->bid) print ''.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.''; + else print ' '; + print ''.$objp->nbcheque.''.price($objp->amount).''; + print $checkdepositstatic->LibStatut($objp->statut,5); + print '
'.$langs->trans("None")."
"; print "
\n"; } @@ -192,6 +225,6 @@ else dol_print_error($db); } -$db->close(); llxFooter(); +$db->close(); diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 9baa15a417f..d01600a7125 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -4,7 +4,8 @@ * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2014 Raphaël Doursenaud - * Copyright (C) 2014 Marcos García + * Copyright (C) 2014 Marcos García + * Copyright (C) 2015 Juanjo Menent * * 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 @@ -28,16 +29,14 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; -/** \class Paiement - * \brief Classe permettant la gestion des paiements des factures clients +/** + * Class to manage payments of customer invoices */ class Paiement extends CommonObject { public $element='payment'; public $table_element='paiement'; - var $id; - var $ref; var $facid; var $datepaye; /** @@ -59,8 +58,6 @@ class Paiement extends CommonObject var $num_paiement; // Numero du CHQ, VIR, etc... var $bank_account; // Id compte bancaire du paiement var $bank_line; // Id de la ligne d'ecriture bancaire - var $fk_account; // Id of bank account - var $note; // fk_paiement dans llx_paiement est l'id du type de paiement (7 pour CHQ, ...) // fk_paiement dans llx_paiement_facture est le rowid du paiement @@ -81,11 +78,11 @@ class Paiement extends CommonObject * @param int $id Id of payment to get * @param string $ref Ref of payment to get (currently ref = id but this may change in future) * @param int $fk_bank Id of bank line associated to payment - * @return int <0 if KO, 0 if not found, >0 if OK + * @return int <0 if KO, 0 if not found, >0 if OK */ function fetch($id, $ref='', $fk_bank='') { - $sql = 'SELECT p.rowid, p.datep as dp, p.amount, p.statut, p.fk_bank,'; + $sql = 'SELECT p.rowid, p.ref, p.datep as dp, p.amount, p.statut, p.fk_bank,'; $sql.= ' c.code as type_code, c.libelle as type_libelle,'; $sql.= ' p.num_paiement, p.note,'; $sql.= ' b.fk_account'; @@ -99,16 +96,14 @@ class Paiement extends CommonObject else if ($fk_bank) $sql.= ' AND p.fk_bank = '.$fk_bank; - dol_syslog(get_class($this)."::fetch", LOG_DEBUG); - $result = $this->db->query($sql); - - if ($result) + $resql = $this->db->query($sql); + if ($resql) { - if ($this->db->num_rows($result)) + if ($this->db->num_rows($resql)) { - $obj = $this->db->fetch_object($result); + $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; - $this->ref = $obj->rowid; + $this->ref = $obj->ref?$obj->ref:$obj->rowid; $this->date = $this->db->jdate($obj->dp); $this->datepaye = $this->db->jdate($obj->dp); $this->numero = $obj->num_paiement; @@ -123,12 +118,12 @@ class Paiement extends CommonObject $this->fk_account = $obj->fk_account; $this->bank_line = $obj->fk_bank; - $this->db->free($result); + $this->db->free($resql); return 1; } else { - $this->db->free($result); + $this->db->free($resql); return 0; } } @@ -177,8 +172,10 @@ class Paiement extends CommonObject $this->db->begin(); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement (entity, datec, datep, amount, fk_paiement, num_paiement, note, fk_user_creat)"; - $sql.= " VALUES (".$conf->entity.", '".$this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', '".$totalamount."', ".$this->paiementid.", '".$this->num_paiement."', '".$this->db->escape($this->note)."', ".$user->id.")"; + $ref = $this->getNextNumRef(''); + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement (entity, ref, datec, datep, amount, fk_paiement, num_paiement, note, fk_user_creat)"; + $sql.= " VALUES (".$conf->entity.", '".$ref."', '". $this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', '".$totalamount."', ".$this->paiementid.", '".$this->num_paiement."', '".$this->db->escape($this->note)."', ".$user->id.")"; dol_syslog(get_class($this)."::Create insert paiement", LOG_DEBUG); $resql = $this->db->query($sql); @@ -294,12 +291,12 @@ class Paiement extends CommonObject /** - * Supprime un paiement ainsi que les lignes qu'il a genere dans comptes - * Si le paiement porte sur un ecriture compte qui est rapprochee, on refuse - * Si le paiement porte sur au moins une facture a "payee", on refuse + * Delete a payment and generated links into account + * - Si le paiement porte sur un ecriture compte qui est rapprochee, on refuse + * - Si le paiement porte sur au moins une facture a "payee", on refuse * - * @param int $notrigger No trigger - * @return int <0 si ko, >0 si ok + * @param int $notrigger No trigger + * @return int <0 si ko, >0 si ok */ function delete($notrigger=0) { @@ -329,21 +326,43 @@ class Paiement extends CommonObject return -2; } - $accline = new AccountLine($this->db); - // Delete bank urls. If payment is on a conciliated line, return error. - if ($bank_line_id) + if ($bank_line_id > 0) { + $accline = new AccountLine($this->db); + $result=$accline->fetch($bank_line_id); if ($result == 0) $accline->rowid=$bank_line_id; // If not found, we set artificially rowid to allow delete of llx_bank_url - $result=$accline->delete_urls($user); + // Delete bank account url lines linked to payment + $result=$accline->delete_urls($user); if ($result < 0) { $this->error=$accline->error; $this->db->rollback(); return -3; } + + // Delete bank account lines linked to payment + $result=$accline->delete($user); + if ($result < 0) + { + $this->error=$accline->error; + $this->db->rollback(); + return -4; + } + } + + if (! $notrigger) + { + // Call triggers + $result=$this->call_trigger('PAYMENT_CUSTOMER_DELETE', $user); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } + // End call triggers } // Delete payment (into paiement_facture and paiement) @@ -364,30 +383,6 @@ class Paiement extends CommonObject return -3; } - // Supprimer l'ecriture bancaire si paiement lie a ecriture - if ($bank_line_id) - { - $result=$accline->delete($user); - if ($result < 0) - { - $this->error=$accline->error; - $this->db->rollback(); - return -4; - } - } - - if (! $notrigger) - { - // Appel des triggers - $result=$this->call_trigger('PAYMENT_DELETE', $user); - if ($result < 0) - { - $this->db->rollback(); - return -1; - } - // Fin appel triggers - } - $this->db->commit(); return 1; } @@ -777,6 +772,116 @@ class Paiement extends CommonObject } } + /** + * Return next reference of customer invoice not already used (or last reference) + * according to numbering module defined into constant FACTURE_ADDON + * + * @param Societe $soc object company + * @param string $mode 'next' for next value or 'last' for last value + * @return string free ref or last ref + */ + function getNextNumRef($soc,$mode='next') + { + global $conf, $db, $langs; + $langs->load("bills"); + + // Clean parameters (if not defined or using deprecated value) + if (empty($conf->global->PAYMENT_ADDON)) $conf->global->PAYMENT_ADDON='mod_payment_cicada'; + else if ($conf->global->PAYMENT_ADDON=='ant') $conf->global->PAYMENT_ADDON='mod_payment_ant'; + else if ($conf->global->PAYMENT_ADDON=='cicada') $conf->global->PAYMENT_ADDON='mod_payment_cicada'; + + if (! empty($conf->global->PAYMENT_ADDON)) + { + $mybool=false; + + $file = $conf->global->PAYMENT_ADDON.".php"; + $classname = $conf->global->PAYMENT_ADDON; + + // Include file with class + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + + foreach ($dirmodels as $reldir) { + + $dir = dol_buildpath($reldir."core/modules/payment/"); + + // Load file with numbering class (if found) + if (is_file($dir.$file) && is_readable($dir.$file)) + { + $mybool |= include_once $dir . $file; + } + } + + // For compatibility + if (! $mybool) + { + $file = $conf->global->PAYMENT_ADDON.".php"; + $classname = "mod_payment_".$conf->global->PAYMENT_ADDON; + $classname = preg_replace('/\-.*$/','',$classname); + // Include file with class + foreach ($conf->file->dol_document_root as $dirroot) + { + $dir = $dirroot."/core/modules/payment/"; + + // Load file with numbering class (if found) + if (is_file($dir.$file) && is_readable($dir.$file)) { + $mybool |= include_once $dir . $file; + } + } + } + + if (! $mybool) + { + dol_print_error('',"Failed to include file ".$file); + return ''; + } + + $obj = new $classname(); + $numref = ""; + $numref = $obj->getNextValue($soc,$this); + + /** + * $numref can be empty in case we ask for the last value because if there is no invoice created with the + * set up mask. + */ + if ($mode != 'last' && !$numref) { + dol_print_error($db,"Payment::getNextNumRef ".$obj->error); + return ""; + } + + return $numref; + } + else + { + $langs->load("errors"); + print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete"); + return ""; + } + } + + /** + * Initialise an instance with random values. + * Used to build previews or test instances. + * id must be 0 if object instance is a specimen. + * + * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines + * @return void + */ + function initAsSpecimen($option='') + { + global $user,$langs,$conf; + + $now=dol_now(); + $arraynow=dol_getdate($now); + $nownotime=dol_mktime(0, 0, 0, $arraynow['mon'], $arraynow['mday'], $arraynow['year']); + + // Initialize parameters + $this->id=0; + $this->ref = 'SPECIMEN'; + $this->specimen=1; + $this->facid = 1; + $this->datepaye = $nownotime; + } + /** * Return clicable name (with picto eventually) @@ -797,7 +902,7 @@ class Paiement extends CommonObject if ($withpicto) $result.=($link.img_object($langs->trans("ShowPayment"), 'payment', 'class="classfortooltip"').$linkend); if ($withpicto && $withpicto != 2) $result.=' '; - if ($withpicto != 2) $result.=$link.$this->ref.$linkend; + if ($withpicto != 2) $result.=$link.($this->ref?$this->ref:$this->id).$linkend; return $result; } diff --git a/htdocs/compta/paiement/index.php b/htdocs/compta/paiement/index.php index 89a57fdc79f..7f1597b5afc 100644 --- a/htdocs/compta/paiement/index.php +++ b/htdocs/compta/paiement/index.php @@ -29,10 +29,7 @@ if (!$user->admin && $user->societe_id > 0) llxHeader(); -print_fiche_titre("Payments"); - - - -$db->close(); +print load_fiche_titre("Payments"); llxFooter(); +$db->close(); diff --git a/htdocs/compta/paiement/info.php b/htdocs/compta/paiement/info.php index 84ef52c3a80..143ef55e987 100644 --- a/htdocs/compta/paiement/info.php +++ b/htdocs/compta/paiement/info.php @@ -63,6 +63,5 @@ print '
'; print '
'; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index c688ca780d4..bcca56ed645 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Juanjo Menent * * 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 @@ -52,35 +53,43 @@ $companystatic=new Societe($db); $search_ref=GETPOST("search_ref","int"); $search_account=GETPOST("search_account","int"); $search_paymenttype=GETPOST("search_paymenttype"); -$search_amount=GETPOST("search_amount"); -$search_company=GETPOST("search_company"); +$search_amount=GETPOST("search_amount",'alpha'); // alpha because we must be able to search on "< x" +$search_company=GETPOST("search_company",'alpha'); +$search_payment_num=GETPOST('search_payment_num','alpha'); + +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -$limit = $conf->liste_limit; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="p.rowid"; +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('paymentlist')); +$extrafields = new ExtraFields($db); + + +/* + * Actions + */ + if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_account=""; $search_amount=""; $search_paymenttype=""; + $search_payment_num=""; $search_company=""; $day=''; $year=''; $month=''; } -// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array -$hookmanager->initHooks(array('paymentlist')); -$extrafields = new ExtraFields($db); - /* @@ -95,7 +104,7 @@ $formother=new FormOther($db); if (GETPOST("orphelins")) { // Paiements lies a aucune facture (pour aide au diagnostic) - $sql = "SELECT p.rowid, p.datep as dp, p.amount,"; + $sql = "SELECT p.rowid, p.ref, p.datep as dp, p.amount,"; $sql.= " p.statut, p.num_paiement,"; $sql.= " c.code as paiement_code"; // Add fields for extrafields @@ -117,7 +126,7 @@ if (GETPOST("orphelins")) } else { - $sql = "SELECT DISTINCT p.rowid, p.datep as dp, p.amount,"; // DISTINCT is to avoid duplicate when there is a link to sales representatives + $sql = "SELECT DISTINCT p.rowid, p.ref, p.datep as dp, p.amount,"; // DISTINCT is to avoid duplicate when there is a link to sales representatives $sql.= " p.statut, p.num_paiement,"; $sql.= " c.code as paiement_code,"; $sql.= " ba.rowid as bid, ba.label,"; @@ -164,10 +173,11 @@ else { $sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } - if ($search_ref > 0) $sql .=" AND p.rowid=".$search_ref; + if ($search_ref) $sql .= natural_search('p.ref', $search_ref); if ($search_account > 0) $sql .=" AND b.fk_account=".$search_account; if ($search_paymenttype != "") $sql .=" AND c.code='".$db->escape($search_paymenttype)."'"; - if ($search_amount) $sql .=" AND p.amount='".$db->escape(price2num($search_amount))."'"; + if ($search_payment_num != '') $sql .= natural_search('p.num_paiement', $search_payment_num); + if ($search_amount) $sql .= natural_search('p.amount', $search_amount, 1); if ($search_company) $sql .= natural_search('s.nom', $search_company); // Add where from hooks $parameters=array(); @@ -175,11 +185,18 @@ else $sql.=$hookmanager->resPrint; } $sql.= $db->order($sortfield,$sortorder); + +$nbtotalofrecords = 0; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); +} + $sql.= $db->plimit($limit+1, $offset); //print "$sql"; $resql = $db->query($sql); - if ($resql) { $num = $db->num_rows($resql); @@ -187,19 +204,29 @@ if ($resql) $paramlist=''; $paramlist.=(GETPOST("orphelins")?"&orphelins=1":""); - $paramlist.=($search_ref?"&search_ref=".$search_ref:""); - $paramlist.=($search_company?"&search_company=".$search_company:""); - $paramlist.=($search_amount?"&search_amount=".$search_amount:""); - - print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"],$paramlist,$sortfield,$sortorder,'',$num,'','title_accountancy.png'); - - print '
'; + $paramlist.=($search_ref?"&search_ref=".urlencode($search_ref):""); + $paramlist.=($search_company?"&search_company=".urlencode($search_company):""); + $paramlist.=($search_amount?"&search_amount=".urlencode($search_amount):""); + $paramlist.=($search_payment_num?"&search_payment_num=".urlencode($search_payment_num):""); + if ($optioncss != '') $paramlist.='&optioncss='.urlencode($optioncss); + + print ''; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"],$paramlist,$sortfield,$sortorder,'',$num, $nbtotalofrecords,'title_accountancy.png', 0, '', '', $limit); + print ''; print ''; print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"p.rowid","",$paramlist,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"dp","",$paramlist,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$paramlist,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle","",$paramlist,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Numero"),$_SERVER["PHP_SELF"],"p.num_paiement","",$paramlist,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$paramlist,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"p.amount","",$paramlist,'align="right"',$sortfield,$sortorder); //print_liste_field_titre($langs->trans("Invoices"),"","","",$paramlist,'align="left"',$sortfield,$sortorder); @@ -228,14 +255,18 @@ if ($resql) print ''; + print ''; print ''; print ''; + print ''; if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { @@ -253,13 +284,14 @@ if ($resql) print ''; + // Date print ''; - // Company + // Thirdparty print ''; - print ''; + // Type + print ''; + + // Payment number + print ''; + print ''; } +/* + * Expense + */ + +if (! empty($conf->expensereport->enabled)) +{ + $langs->load('trips'); + if ($modecompta == 'CREANCES-DETTES') { + $sql = "SELECT p.rowid, p.ref, u.firstname, u.lastname, date_format(date_valid,'%Y-%m') as dm, sum(p.total_ht) as amount_ht,sum(p.total_ttc) as amount_ttc"; + $sql.= " FROM ".MAIN_DB_PREFIX."expensereport as p"; + $sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user_author"; + $sql.= " WHERE p.entity = ".getEntity('expensereport',1); + $sql.= " AND p.fk_statut>5"; + + $column='p.date_valid'; + + } else { + $sql = "SELECT p.rowid, p.ref, u.firstname, u.lastname, date_format(pe.datep,'%Y-%m') as dm, sum(p.total_ht) as amount_ht,sum(p.total_ttc) as amount_ttc"; + $sql.= " FROM ".MAIN_DB_PREFIX."expensereport as p"; + $sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user_author"; + $sql.= " INNER JOIN ".MAIN_DB_PREFIX."payment_expensereport as pe ON pe.fk_expensereport = p.rowid"; + $sql.= " INNER JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id"; + $sql.= " WHERE p.entity = ".getEntity('expensereport',1); + $sql.= " AND p.fk_statut=6"; + + $column='pe.datep'; + } + + print ''; + + if (! empty($date_start) && ! empty($date_end)) + $sql.= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'"; + + $sql.= " GROUP BY p.rowid, p.ref, u.firstname, u.lastname, dm"; + $sql.= " ORDER BY p.ref"; + + dol_syslog("get expense report outcome"); + $result=$db->query($sql); + $subtotal_ht = 0; + $subtotal_ttc = 0; + if ($result) + { + $num = $db->num_rows($result); + $var=true; + if ($num) + { + while ($obj = $db->fetch_object($result)) + { + $total_ht -= $obj->amount_ht; + $total_ttc -= $obj->amount_ttc; + $subtotal_ht += $obj->amount_ht; + $subtotal_ttc += $obj->amount_ttc; + + $var = !$var; + print ""; + + print "\n"; + + if ($modecompta == 'CREANCES-DETTES') print ''; + print ''; + print ''; + } + } + else + { + $var = !$var; + print ""; + print ''; + print ''; + } + } + else + { + dol_print_error($db); + } + print ''; + if ($modecompta == 'CREANCES-DETTES') + print ''; + print ''; + print ''; +} /* * Donation diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 96400da23c1..9036ce32ed0 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -521,6 +521,58 @@ if (! empty($conf->salaries->enabled)) } } +if (! empty($conf->expensereport->enabled)) +{ + $langs->load('trips'); + if ($modecompta == 'CREANCES-DETTES') { + $sql = "SELECT date_format(date_valid,'%Y-%m') as dm, sum(p.total_ht) as amount_ht,sum(p.total_ttc) as amount_ttc"; + $sql.= " FROM ".MAIN_DB_PREFIX."expensereport as p"; + $sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user_author"; + $sql.= " WHERE p.entity = ".getEntity('expensereport',1); + $sql.= " AND p.fk_statut>5"; + + $column='p.date_valid'; + + } else { + $sql = "SELECT date_format(pe.datep,'%Y-%m') as dm, sum(p.total_ht) as amount_ht,sum(p.total_ttc) as amount_ttc"; + $sql.= " FROM ".MAIN_DB_PREFIX."expensereport as p"; + $sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user_author"; + $sql.= " INNER JOIN ".MAIN_DB_PREFIX."payment_expensereport as pe ON pe.fk_expensereport = p.rowid"; + $sql.= " INNER JOIN ".MAIN_DB_PREFIX."c_paiement as c ON pe.fk_typepayment = c.id"; + $sql.= " WHERE p.entity = ".getEntity('expensereport',1); + $sql.= " AND p.fk_statut=6"; + + $column='pe.datep'; + } + + $sql.= " GROUP BY dm"; + + dol_syslog("get expense report outcome"); + $result=$db->query($sql); + $subtotal_ht = 0; + $subtotal_ttc = 0; + if ($result) + { + $num = $db->num_rows($result); + if ($num) + { + while ($obj = $db->fetch_object($result)) + { + if (! isset($decaiss[$obj->dm])) $decaiss[$obj->dm]=0; + $decaiss[$obj->dm] += $obj->amount_ht; + + if (! isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm]=0; + $decaiss_ttc[$obj->dm] += $obj->amount_ttc; + + } + } + } + else + { + dol_print_error($db); + } +} + /* * Donation get dunning paiement */ diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index f96531b059c..4a8dc21ca1b 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011-2015 Alexandre Spangaro * Copyright (C) 2014 Laurent Destailleur * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Charlie BENKE @@ -36,6 +36,7 @@ $langs->load("banks"); $langs->load("bills"); $langs->load("users"); $langs->load("salaries"); +$langs->load('hrm'); $id=GETPOST("id",'int'); $action=GETPOST('action'); @@ -83,7 +84,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) $object->note=GETPOST("note"); $object->type_payment=GETPOST("paymenttype"); $object->num_payment=GETPOST("num_payment"); - $object->fk_user_creat=$user->id; + $object->fk_user_author=$user->id; // Set user current salary as ref salaray for the payment $fuser=new User($db); @@ -92,27 +93,27 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) if (empty($datep) || empty($datev) || empty($datesp) || empty($dateep)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); $error++; } if (empty($object->fk_user) || $object->fk_user < 0) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Employee")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Employee")), null, 'errors'); $error++; } if (empty($object->type_payment) || $object->type_payment < 0) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PaymentMode")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentMode")), null, 'errors'); $error++; } if (empty($object->amount)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Amount")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors'); $error++; } if (! empty($conf->banque->enabled) && ! $object->accountid > 0) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Account")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Account")), null, 'errors'); $error++; } @@ -166,18 +167,18 @@ if ($action == 'delete') { $object->error=$accountline->error; $db->rollback(); - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else { $db->rollback(); - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } else { - setEventMessage('Error try do delete a line linked to a conciliated bank transaction','errors'); + setEventMessages('Error try do delete a line linked to a conciliated bank transaction', null, 'errors'); } } @@ -201,7 +202,11 @@ if ($id) } } -// Formulaire saisie salaire +/* ************************************************************************** */ +/* */ +/* create mode */ +/* */ +/* ************************************************************************** */ if ($action == 'create') { $year_current = strftime("%Y",dol_now()); @@ -225,62 +230,77 @@ if ($action == 'create') print ''; print ''; - print_fiche_titre($langs->trans("NewSalaryPayment"),'', 'title_accountancy.png'); + print load_fiche_titre($langs->trans("NewSalaryPayment"),'', 'title_accountancy.png'); dol_fiche_head('', ''); print '
'; $form->select_types_paiements($search_paymenttype,'search_paymenttype','',2,1,1); print ''; + print ''; + print ''; $form->select_comptes($search_account,'search_account',0,'',1); print ''; print ''; - print ''; - print ''; - print ''; + print ''; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; print ''; $paymentstatic->id=$objp->rowid; - $paymentstatic->ref=$objp->rowid; + $paymentstatic->ref=$objp->ref; print $paymentstatic->getNomUrl(1); print ''.dol_print_date($db->jdate($objp->dp),'day').''; if ($objp->socid) { @@ -270,7 +302,12 @@ if ($resql) else print ' '; print ''.$langs->trans("PaymentTypeShort".$objp->paiement_code).' '.$objp->num_paiement.''.$langs->trans("PaymentTypeShort".$objp->paiement_code).''.$objp->num_paiement.''; if ($objp->bid) { @@ -304,6 +341,5 @@ else dol_print_error($db); } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 142ea7b5a4a..8f23036f6af 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -88,7 +88,7 @@ $formother=new FormOther($db); llxHeader(); $titre=($year?$langs->trans("PaymentsReportsForYear",$year):$langs->trans("PaymentsReports")); -print_fiche_titre($titre,'','title_accountancy.png'); +print load_fiche_titre($titre,'','title_accountancy.png'); // Formulaire de generation print ''; diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 173226f6ab5..a68f3445305 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -162,7 +162,7 @@ if ($_GET["action"] == 'create') $total = $charge->amount; - print_fiche_titre($langs->trans("DoPayment")); + print load_fiche_titre($langs->trans("DoPayment")); print "
\n"; if ($mesg) @@ -323,7 +323,5 @@ if ($_GET["action"] == 'create') print "\n"; } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index dc2fad6d35d..ad59687b43c 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -70,7 +70,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->tax->char } else { - setEventMessage($paiement->error, 'errors'); + setEventMessages($paiement->error, $paiement->errors, 'errors'); $db->rollback(); } } @@ -108,7 +108,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->tax->char } else { - setEventMessage($paiement->error); + setEventMessages($paiement->error, $paiement->errors, 'errors'); $db->rollback(); } } @@ -140,7 +140,7 @@ $h++; dol_fiche_head($head, $hselected, $langs->trans("PaymentSocialContribution"), 0, 'payment'); /* - * Confirmation de la suppression du paiement + * Deletion confirmation of payment */ if ($action == 'delete') { @@ -149,7 +149,7 @@ if ($action == 'delete') } /* - * Confirmation de la validation du paiement + * Validation confirmation of payment */ if ($action == 'valide') { diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 3f813e00938..38f83c5ac54 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -37,8 +37,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; */ class BonPrelevement extends CommonObject { - var $db; - var $date_echeance; var $raison_sociale; var $reference_remise; diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 64ec4ad1895..7fd5cb10483 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -106,7 +106,7 @@ $h++; dol_fiche_head($head, $hselected, $langs->trans("StandingOrders"), 0, 'payment'); */ -print_fiche_titre($langs->trans("NewStandingOrder")); +print load_fiche_titre($langs->trans("NewStandingOrder")); dol_fiche_head(); @@ -183,7 +183,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print_fiche_titre($langs->trans("InvoiceWaitingWithdraw").($num > 0?' ('.$num.')':''),'',''); + print load_fiche_titre($langs->trans("InvoiceWaitingWithdraw").($num > 0?' ('.$num.')':''),'',''); print ''; print ''; @@ -248,7 +248,7 @@ else */ $limit=5; -print_fiche_titre($langs->trans("LastWithdrawalReceipts",$limit),'',''); +print load_fiche_titre($langs->trans("LastWithdrawalReceipts",$limit),'',''); $sql = "SELECT p.rowid, p.ref, p.amount, p.statut"; $sql.= ", p.datec"; @@ -299,7 +299,5 @@ else dol_print_error($db); } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index 364e073676b..22679af2110 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -157,5 +157,5 @@ else dol_print_error($db); } - llxFooter(); +$db->close(); diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 161227aa121..d520abccbcf 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -178,6 +178,5 @@ else dol_print_error($db); } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index 0e9174ef034..c2316578130 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -120,7 +120,7 @@ if ($prev_id) $num = $db->num_rows($resql); $i = 0; - print_fiche_titre($langs->trans("StatisticsByLineStatus"),'',''); + print load_fiche_titre($langs->trans("StatisticsByLineStatus"),'',''); print"\n\n"; print '
'; @@ -159,6 +159,5 @@ if ($prev_id) } } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index 36e4ed71341..7c700dfeabb 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -64,7 +64,7 @@ if (prelevement_check_config() < 0) print ''; } -print_fiche_titre($langs->trans("CustomersStandingOrdersArea")); +print load_fiche_titre($langs->trans("CustomersStandingOrdersArea")); print '
'; diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index 7907a55fda0..d43ba27ef26 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -61,20 +61,20 @@ if ($action == 'confirm_rejet') if (empty($daterej)) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Date")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->trans("Date")), null, 'errors'); } elseif ($daterej > dol_now()) { $error++; $langs->load("error"); - setEventMessage($langs->transnoentities("ErrorDateMustBeBeforeToday"),'errors'); + setEventMessages($langs->transnoentities("ErrorDateMustBeBeforeToday"), null, 'errors'); } if (GETPOST('motif','alpha') == 0) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("RefusedReason")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("RefusedReason")), null, 'errors'); } if ( ! $error ) @@ -261,7 +261,7 @@ if ($id) if ($sortfield == "") $sortfield="pl.fk_soc"; /* - * Liste des factures + * List of invoices */ $sql = "SELECT pf.rowid"; $sql.= " ,f.rowid as facid, f.facnumber as ref, f.total_ttc, f.paye, f.fk_statut"; diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 9274a885105..e7cef1a50ad 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -114,6 +114,7 @@ if ($result) print_barre_liste($langs->trans("WithdrawalsLines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num); print"\n\n"; + print '
'; print '
'; print ''; @@ -126,8 +127,7 @@ if ($result) print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"pl.amount","","",'align="right"'); print_liste_field_titre(''); print "\n"; - - print ''; + print ''; print ''; print ''; @@ -137,10 +137,10 @@ if ($result) print ''; print ''; print ''; - print ''; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print ''; + print ''; $var=True; @@ -185,6 +185,9 @@ if ($result) $i++; } print "
  '; - print ''; - print ''; - print '
"; + + print ''; + $db->free($result); } else @@ -192,7 +195,5 @@ else dol_print_error($db); } -$db->close(); - - llxFooter(); +$db->close(); diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 30eafa40efa..78a11e898df 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -124,6 +124,5 @@ else dol_print_error($db); } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index c3667f8b69f..ceeef191aee 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -45,7 +45,7 @@ $result = restrictedArea($user, 'prelevement','','','bons'); llxHeader('',$langs->trans("WithdrawStatistics")); -print_fiche_titre($langs->trans("Statistics")); +print load_fiche_titre($langs->trans("Statistics")); // Define total and nbtotal $sql = "SELECT sum(pl.amount), count(pl.amount)"; @@ -73,7 +73,7 @@ if ($resql) */ print '
'; -print_titre($langs->trans("WithdrawStatistics")); +print load_fiche_titre($langs->trans("WithdrawStatistics"), '', ''); $ligne=new LignePrelevement($db,$user); @@ -138,12 +138,11 @@ else /* - * - * Stats sur les rejets - * + * Stats on errors */ + print '
'; -print_titre($langs->trans("WithdrawRejectStatistics")); +print load_fiche_titre($langs->trans("WithdrawRejectStatistics"), '', ''); // Define total and nbtotal diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index 19ac5705ef1..3f952ef15c6 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2016 Laurent Destailleur * * 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 @@ -19,12 +19,13 @@ /** * \file htdocs/compta/recap-compta.php * \ingroup compta - * \brief Page de fiche recap compta + * \brief Page de fiche recap customer */ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; $langs->load("companies"); if (! empty($conf->facture->enabled)) $langs->load("bills"); @@ -43,6 +44,7 @@ if ($user->societe_id > 0) * View */ +$form = new Form($db); $userstatic=new User($db); llxHeader(); @@ -58,35 +60,27 @@ if ($socid > 0) $head = societe_prepare_head($societe); dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"), 0, 'company'); - - print "\n"; - print '
'; - - print ''; - - // Name - print ''; - - // Prefix - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field - { - print ''; - } - - print "
'.$langs->trans("Name").''.$societe->name.'
'.$langs->trans("Prefix").''; - print ($societe->prefix_comm?$societe->prefix_comm:' '); - print '
"; - - print "
\n"; - - print ''; - + dol_banner_tab($societe, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom'); + dol_fiche_end(); + if (! empty($conf->facture->enabled) && $user->rights->facture->lire) { - // Factures - print_fiche_titre($langs->trans("CustomerPreview")); + // Invoice list + print load_fiche_titre($langs->trans("CustomerPreview")); print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + $TData = array(); + $TDataSort = array(); $sql = "SELECT s.nom, s.rowid as socid, f.facnumber, f.amount, f.datef as df,"; $sql.= " f.paye as paye, f.fk_statut as statut, f.rowid as facid,"; @@ -95,7 +89,7 @@ if ($socid > 0) $sql.= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$societe->id; $sql.= " AND f.entity = ".$conf->entity; $sql.= " AND f.fk_user_valid = u.rowid"; - $sql.= " ORDER BY f.datef DESC"; + $sql.= " ORDER BY f.datef ASC"; $resql=$db->query($sql); if ($resql) @@ -103,23 +97,6 @@ if ($socid > 0) $var=true; $num = $db->num_rows($resql); - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - if (! $num > 0) - { - print ''; - } - - $solde = 0; - // Boucle sur chaque facture for ($i = 0 ; $i < $num ; $i++) { @@ -133,29 +110,18 @@ if ($socid > 0) continue; } $totalpaye = $fac->getSommePaiement(); - - $var=!$var; - print ""; - - print "\n"; - print '\n"; - - print ''; - print '\n"; - if (($fac->statut == Facture::STATUS_ABANDONED ) || ($fac->statut == Facture::STATUS_CLOSED && ! $fact->close_code) ) $solde = $solde = $solde + $totalpaye; - else $solde = $solde + $fac->total_ttc; - - print ''; - print '\n"; - - // Author + $userstatic->id=$objf->userid; $userstatic->login=$objf->login; - print ''; - - print "\n"; + + $TData[] = array( + 'date' => $fac->date, + 'link' => $fac->getNomUrl(1), + 'status' => $fac->getLibStatut(2,$totalpaye), + 'amount' => $fac->total_ttc, + 'author' => $userstatic->getLoginUrl(1) + ); + $TDataSort[] = $fac->date; // Paiements $sql = "SELECT p.rowid, p.datep as dp, pf.amount, p.statut,"; @@ -166,6 +132,7 @@ if ($socid > 0) $sql.= " WHERE pf.fk_paiement = p.rowid"; $sql.= " AND p.entity = ".$conf->entity; $sql.= " AND pf.fk_facture = ".$fac->id; + $sql.= " ORDER BY p.datep ASC"; $resqlp = $db->query($sql); if ($resqlp) @@ -176,26 +143,21 @@ if ($socid > 0) while ($j < $nump) { $objp = $db->fetch_object($resqlp); - //$var=!$var; - print ""; - print '\n"; - print ''; - print "\n"; - print "\n"; - print ''; - $solde = $solde - $objp->amount; - print '\n"; - - // Author + + $paymentstatic = new Paiement($db); + $paymentstatic->id = $objp->rowid; + $userstatic->id=$objp->userid; $userstatic->login=$objp->login; - print ''; - - print ''; + + $TData[] = array( + 'date' => $db->jdate($objp->dp), + 'link' => $langs->trans("Payment") .' '. $paymentstatic->getNomUrl(1), + 'status' => '', + 'amount' => -$objp->amount, + 'author' => $userstatic->getLoginUrl(1) + ); + $TDataSort[] = $db->jdate($objp->dp); $j++; } @@ -212,8 +174,59 @@ if ($socid > 0) { dol_print_error($db); } + + if(empty($TData)) { + print ''; + } else { + + // Sort array by date + asort($TDataSort); + array_multisort($TData,$TDataSort); + + // Balance calculation + foreach($TData as &$data1) { + $balance += $data1['amount']; + $data1['balance'] += $balance; + } + + // Reverse array to have last elements on top + $TData = array_reverse($TData); + + $totalDebit = 0; + $totalCredit = 0; + + // Display array + foreach($TData as $data) { + $var=!$var; + print ""; + + print "\n"; + print '\n"; + + print ''; + print '\n"; + $totalDebit += ($data['amount'] > 0) ? abs($data['amount']) : 0; + print '\n"; + $totalCredit += ($data['amount'] > 0) ? 0 : abs($data['amount']); + print '\n"; + + // Author + print ''; + + print "\n"; + } + + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + } + print "
'.$langs->trans("Date").''.$langs->trans("Element").''.$langs->trans("Status").''.$langs->trans("Debit").''.$langs->trans("Credit").''.$langs->trans("Balance").''.$langs->trans("Author").'
'.$langs->trans("Date").' '.$langs->trans("Status").''.$langs->trans("Debit").''.$langs->trans("Credit").''.$langs->trans("Balance").' 
'.$langs->trans("NoInvoice").'
".dol_print_date($fac->date,'day')."'.img_object($langs->trans("ShowBill"),"bill")." ".$fac->ref."'.$fac->getLibStatut(2,$totalpaye).''.price($fac->total_ttc)." '.price($solde)."'; - print $userstatic->getLoginUrl(1); - print '
'.dol_print_date($db->jdate($objp->dp),'day')."'; - print '      '; // Decalage - print ''.img_object($langs->trans("ShowPayment"),"payment").' '.$langs->trans("Payment").' '.$objp->rowid.'  '.price($objp->amount).''.price($solde)."'; - print $userstatic->getLoginUrl(1); - print '
'.$langs->trans("NoInvoice").'
".dol_print_date($data['date'],'day')."'.$data['link']."'.$data['status'].''.(($data['amount'] > 0) ? price(abs($data['amount'])) : '')."'.(($data['amount'] > 0) ? '' : price(abs($data['amount'])))."'.price($data['balance'])."'; + print $data['author']; + print '
 '.price($totalDebit).''.price($totalCredit).' 
"; - print "
"; } } else diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index c881b263dff..4286c6a8453 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -621,6 +621,87 @@ if (! empty($conf->salaries->enabled)) print '
'.$langs->trans("ExpenseReport").'
 ".$langs->trans("ExpenseReport")." rowid."\">".$obj->ref.' ('.$obj->firstname." ".$obj->lastname.")'.price(-$obj->amount_ht).''.price(-$obj->amount_ttc).'
 '.$langs->trans("None").'
'.price(-$subtotal_ht).''.price(-$subtotal_ttc).'
'; - print ""; - print ''; - print ''; // Employee - print ""; - print ''; // Label - print ''; + print ''; - print ""; - print ''; - print ''; // Amount - print ''; + print ''; // Bank if (! empty($conf->banque->enabled)) { - print ''; } // Type payment - print '\n"; - print ""; + print ''; + // Number if (! empty($conf->banque->enabled)) { // Number - print ''."\n"; + print ''; + print ''."\n"; } // Other attributes @@ -303,7 +323,7 @@ if ($action == 'create') /* ************************************************************************** */ /* */ -/* Barre d'action */ +/* View mode */ /* */ /* ************************************************************************** */ @@ -314,16 +334,17 @@ if ($id) dol_fiche_head($head, 'card', $langs->trans("SalaryPayment"), 0, 'payment'); - print '
'.$langs->trans("DatePayment").''; + // Date payment + print '
'; + print fieldLabel('DatePayment','datep',1).''; print $form->select_date((empty($datep)?-1:$datep),"datep",'','','','add',1,1); print '
'.$langs->trans("DateValue").''; + // Date value for bank + print '
'; + print fieldLabel('DateValue','datev',0).''; print $form->select_date((empty($datev)?-1:$datev),"datev",'','','','add',1,1); print '
'.$langs->trans("Employee").''; - print $form->select_dolusers(GETPOST('fk_user','int'),'fk_user',1); + print '
'; + print fieldLabel('Employee','fk_user',1).''; + print $form->select_dolusers(GETPOST('fk_user','int'), 'fk_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '
'.$langs->trans("Label").'trans("SalaryPayment")).'">
'; + print fieldLabel('Label','label',1).''; + print 'trans("SalaryPayment")).'">'; + print '
'.$langs->trans("DateStartPeriod").''; + // Date start period + print '
'; + print fieldLabel('DateStartPeriod','datesp',1).''; print $form->select_date($datesp,"datesp",'','','','add'); print '
'.$langs->trans("DateEndPeriod").''; + // Date end period + print '
'; + print fieldLabel('DateEndPeriod','dateep',1).''; print $form->select_date($dateep,"dateep",'','','','add'); print '
'.$langs->trans("Amount").'
'; + print fieldLabel('Amount','amount',1).''; + print ''; + print '
'.$langs->trans("Account").''; + print '
'; + print fieldLabel('Account','selectaccountid',1).''; $form->select_comptes($_POST["accountid"],"accountid",0,'',1); // Affiche liste des comptes courant print '
'.$langs->trans("PaymentMode").''; + print '
'; + print fieldLabel('PaymentMode','selectpaymenttype',1).''; $form->select_types_paiements(GETPOST("paymenttype"), "paymenttype"); - print "
'.$langs->trans('Numero'); + print '
'; - print ""; + $linkback = ''.$langs->trans("BackToList").''; + + print ""; print ''; - // Person - print ''; print '
'.$langs->trans("Ref").''; - print $object->ref; + print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '
'.$langs->trans("Person").''; + // Employee + print '
'.$langs->trans("Employee").''; $usersal=new User($db); $usersal->fetch($object->fk_user); print $usersal->getNomUrl(1); diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index cc0029620cb..a4bee09d7de 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011-2015 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -34,9 +34,6 @@ class PaymentSalary extends CommonObject //public $element='payment_salary'; //!< Id that identify managed objects //public $table_element='payment_salary'; //!< Name of table without prefix where object is stored - var $id; - var $ref; - var $tms; var $fk_user; var $datep; @@ -47,9 +44,8 @@ class PaymentSalary extends CommonObject var $label; var $datesp; var $dateep; - var $note; var $fk_bank; - var $fk_user_creat; + var $fk_user_author; var $fk_user_modif; @@ -85,7 +81,7 @@ class PaymentSalary extends CommonObject $this->label=trim($this->label); $this->note=trim($this->note); $this->fk_bank=trim($this->fk_bank); - $this->fk_user_creat=trim($this->fk_user_creat); + $this->fk_user_author=trim($this->fk_user_author); $this->fk_user_modif=trim($this->fk_user_modif); // Check parameters @@ -112,7 +108,7 @@ class PaymentSalary extends CommonObject $sql.= " dateep=".$this->db->idate($this->dateep).","; $sql.= " note='".$this->db->escape($this->note)."',"; $sql.= " fk_bank=".($this->fk_bank > 0 ? "'".$this->fk_bank."'":"null").","; - $sql.= " fk_user_creat='".$this->fk_user_creat."',"; + $sql.= " fk_user_author='".$this->fk_user_author."',"; $sql.= " fk_user_modif='".$this->fk_user_modif."'"; $sql.= " WHERE rowid=".$this->id; @@ -171,7 +167,7 @@ class PaymentSalary extends CommonObject $sql.= " s.dateep,"; $sql.= " s.note,"; $sql.= " s.fk_bank,"; - $sql.= " s.fk_user_creat,"; + $sql.= " s.fk_user_author,"; $sql.= " s.fk_user_modif,"; $sql.= " b.fk_account,"; $sql.= " b.fk_type,"; @@ -203,7 +199,7 @@ class PaymentSalary extends CommonObject $this->dateep = $this->db->jdate($obj->dateep); $this->note = $obj->note; $this->fk_bank = $obj->fk_bank; - $this->fk_user_creat = $obj->fk_user_creat; + $this->fk_user_author = $obj->fk_user_author; $this->fk_user_modif = $obj->fk_user_modif; $this->fk_account = $obj->fk_account; $this->fk_type = $obj->fk_type; @@ -275,7 +271,7 @@ class PaymentSalary extends CommonObject $this->dateep=''; $this->note=''; $this->fk_bank=''; - $this->fk_user_creat=''; + $this->fk_user_author=''; $this->fk_user_modif=''; } @@ -290,13 +286,14 @@ class PaymentSalary extends CommonObject global $conf,$langs; $error=0; + $now=dol_now(); // Clean parameters $this->amount=price2num(trim($this->amount)); $this->label=trim($this->label); $this->note=trim($this->note); $this->fk_bank=trim($this->fk_bank); - $this->fk_user_creat=trim($this->fk_user_creat); + $this->fk_user_author=trim($this->fk_user_author); $this->fk_user_modif=trim($this->fk_user_modif); // Check parameters @@ -340,7 +337,8 @@ class PaymentSalary extends CommonObject $sql.= ", label"; $sql.= ", datesp"; $sql.= ", dateep"; - $sql.= ", fk_user_creat"; + $sql.= ", fk_user_author"; + $sql.= ", datec"; $sql.= ", fk_bank"; $sql.= ", entity"; $sql.= ") "; @@ -357,6 +355,7 @@ class PaymentSalary extends CommonObject $sql.= ", '".$this->db->idate($this->datesp)."'"; $sql.= ", '".$this->db->idate($this->dateep)."'"; $sql.= ", '".$user->id."'"; + $sql.= ", '".$this->db->idate($now)."'"; $sql.= ", NULL"; $sql.= ", ".$conf->entity; $sql.= ")"; @@ -511,4 +510,41 @@ class PaymentSalary extends CommonObject return $result; } + /** + * Information on record + * + * @param int $id Id of record + * @return void + */ + function info($id) + { + $sql = 'SELECT ps.rowid, ps.datec, ps.fk_user_author'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'payment_salary as ps'; + $sql.= ' WHERE ps.rowid = '.$id; + + dol_syslog(get_class($this).'::info', LOG_DEBUG); + $result = $this->db->query($sql); + + if ($result) + { + if ($this->db->num_rows($result)) + { + $obj = $this->db->fetch_object($result); + $this->id = $obj->rowid; + if ($obj->fk_user_author) + { + $cuser = new User($this->db); + $cuser->fetch($obj->fk_user_author); + $this->user_creation = $cuser; + } + $this->date_creation = $this->db->jdate($obj->datec); + } + $this->db->free($result); + } + else + { + dol_print_error($this->db); + } + } + } diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index 5926d42bb8e..18554f30de8 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -46,9 +46,10 @@ if ($page == -1) { $page = 0; } $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; if (! $sortfield) $sortfield="s.datep"; if (! $sortorder) $sortorder="DESC"; +$optioncss = GETPOST('optioncss','alpha'); $filtre=$_GET["filtre"]; @@ -107,6 +108,12 @@ if ($typeid) { $sql .= " AND s.fk_typepayment=".$typeid; } //$sql.= " GROUP BY u.rowid, u.lastname, u.firstname, s.rowid, s.fk_user, s.amount, s.label, s.datev, s.fk_typepayment, s.num_payment, pst.code"; +$totalnboflines=0; +$result=$db->query($sql); +if ($result) +{ + $totalnboflines = $db->num_rows($result); +} $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit+1,$offset); @@ -120,10 +127,12 @@ if ($result) $param=''; if ($typeid) $param.='&typeid='.$typeid; + if ($optioncss != '') $param.='&optioncss='.$optioncss; print_barre_liste($langs->trans("SalariesPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$totalnboflines, 'title_accountancy.png'); print '
'; + if ($optioncss != '') print ''; print ''; print ''; @@ -158,9 +167,12 @@ if ($result) print ''; // Amount print ''; - print '\n"; + + print ''; + print "\n"; while ($i < min($num,$limit)) { diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index 74e4d3f8aff..2a9894be87a 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -83,27 +83,27 @@ if ($action == 'add' && $user->rights->tax->charges->creer) $actioncode=GETPOST('actioncode'); if (! $dateech) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("DateDue")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("DateDue")), null, 'errors'); $action = 'create'; } elseif (! $dateperiod) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Period")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Period")), null, 'errors'); $action = 'create'; } elseif (! $actioncode > 0) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Type")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors'); $action = 'create'; } elseif (empty($amount)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")), null, 'errors'); $action = 'create'; } elseif (! is_numeric($amount)) { - setEventMessage($langs->trans("ErrorFieldMustBeANumeric",$langs->transnoentities("Amount")), 'errors'); + setEventMessages($langs->trans("ErrorFieldMustBeANumeric",$langs->transnoentities("Amount")), null, 'errors'); $action = 'create'; } else @@ -133,22 +133,22 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->tax->charges->cr $amount=price2num(GETPOST('amount')); if (! $dateech) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("DateDue")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("DateDue")), null, 'errors'); $action = 'edit'; } elseif (! $dateperiod) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Period")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Period")), null, 'errors'); $action = 'edit'; } elseif (empty($amount)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount")), 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")), null, 'errors'); $action = 'edit'; } elseif (! is_numeric($amount)) { - setEventMessage($langs->trans("ErrorFieldMustBeANumeric",$langs->transnoentities("Amount")), 'errors'); + setEventMessages($langs->trans("ErrorFieldMustBeANumeric",$langs->transnoentities("Amount")), null, 'errors'); $action = 'create'; } else @@ -164,7 +164,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->tax->charges->cr $result=$chargesociales->update($user); if ($result <= 0) { - setEventMessage($chargesociales->error, 'errors'); + setEventMessages($chargesociales->error, $chargesociales->errors, 'errors'); } } } @@ -237,7 +237,7 @@ llxHeader("",$langs->trans("SocialContribution"),$help_url); // Mode creation if ($action == 'create') { - print_fiche_titre($langs->trans("NewSocialContribution")); + print load_fiche_titre($langs->trans("NewSocialContribution")); $var=false; diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index dc70126ab9e..7712fd09029 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -39,8 +39,6 @@ class ChargeSociales extends CommonObject */ protected $table_ref_field = 'ref'; - var $id; - var $ref; var $date_ech; var $lib; var $type; diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index ade44bff415..e3bf17b3418 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -33,9 +33,6 @@ class PaymentSocialContribution extends CommonObject public $element='paiementcharge'; //!< Id that identify managed objects public $table_element='paiementcharge'; //!< Name of table without prefix where object is stored - var $id; - var $ref; - var $fk_charge; var $datec=''; var $tms=''; @@ -49,7 +46,6 @@ class PaymentSocialContribution extends CommonObject var $amounts=array(); // Array of amounts var $fk_typepaiement; var $num_paiement; - var $note; var $fk_bank; var $fk_user_creat; var $fk_user_modif; diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 3afbba0df79..2dbb3fd22d7 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -46,7 +46,7 @@ if ($page == -1) { $page = 0; } $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; if (! $sortfield) $sortfield="cs.date_ech"; if (! $sortorder) $sortorder="DESC"; @@ -119,6 +119,12 @@ if ($typeid) { $sql .= " AND cs.fk_type=".$typeid; } $sql.= " GROUP BY cs.rowid, cs.fk_type, cs.amount, cs.date_ech, cs.libelle, cs.paye, cs.periode, c.libelle"; +$totalnboflines=0; +$result=$db->query($sql); +if ($result) +{ + $totalnboflines = $db->num_rows($result); +} $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit+1,$offset); @@ -136,7 +142,7 @@ if ($resql) if ($year) { - print_fiche_titre($langs->trans("SocialContributions"),($year?"".img_previous()." ".$langs->trans("Year")." $year ".img_next()."":"")); + print load_fiche_titre($langs->trans("SocialContributions"),($year?"".img_previous()." ".$langs->trans("Year")." $year ".img_next()."":"")); } else { @@ -187,9 +193,12 @@ if ($resql) print ''; // Status print ''; - print '\n"; + + print ''; + print "\n"; while ($i < min($num,$limit)) { @@ -247,9 +256,5 @@ else dol_print_error($db); } - - - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 385ac1f140c..cb8151cf33c 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -280,7 +280,7 @@ if ($modecompta == 'CREANCES-DETTES') { $sortorder ); } else { - print ''; + print_liste_field_titre(''); } print_liste_field_titre( $langs->trans("AmountTTC"), diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 7b9cfdd7913..dade07fd0e3 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -350,7 +350,7 @@ if ($modecompta == 'CREANCES-DETTES') { $sortorder ); } else { - print ''; + print_liste_field_titre(''); } print_liste_field_titre( $langs->trans("AmountTTC"), diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index e5acabd4e19..674e800a168 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -33,7 +33,9 @@ $langs->load("banks"); $langs->load("bills"); $id=GETPOST("id",'int'); -$action=GETPOST('action'); +$action=GETPOST("action","alpha"); +$refund=GETPOST("refund","int"); +if (empty($refund)) $refund=0; // Security check $socid = isset($_GET["socid"])?$_GET["socid"]:''; @@ -46,7 +48,6 @@ $tva = new Tva($db); $hookmanager->initHooks(array('taxvatcard','globalcard')); - /** * Actions */ @@ -69,28 +70,33 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) $tva->num_payment=GETPOST("num_payment"); $tva->datev=$datev; $tva->datep=$datep; - $tva->amount=GETPOST("amount"); + + $amount = GETPOST("amount"); + if ($refund == 1) { + $amount= -$amount; + } + $tva->amount= $amount; $tva->label=GETPOST("label"); $tva->note=GETPOST("note"); if (empty($tva->datev)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateValue")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateValue")), null, 'errors'); $error++; } if (empty($tva->datep)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DatePayment")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DatePayment")), null, 'errors'); $error++; } if (empty($tva->type_payment) || $tva->type_payment < 0) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PaymentMode")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentMode")), null, 'errors'); $error++; } if (empty($tva->amount)) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Amount")),'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors'); $error++; } @@ -108,7 +114,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) else { $db->rollback(); - setEventMessage($tva->error, 'errors'); + setEventMessages($tva->error, $tva->errors, 'errors'); $action="create"; } } @@ -144,25 +150,25 @@ if ($action == 'delete') { $tva->error=$accountline->error; $db->rollback(); - setEventMessage($tva->error,'errors'); + setEventMessages($tva->error, $tva->errors, 'errors'); } } else { $db->rollback(); - setEventMessage($tva->error,'errors'); + setEventMessages($tva->error, $tva->errors, 'errors'); } } else { - setEventMessage('Error try do delete a line linked to a conciliated bank transaction','errors'); + setEventMessages('Error try do delete a line linked to a conciliated bank transaction', null, 'errors'); } } /* -* View -*/ + * View + */ llxHeader(); @@ -182,12 +188,46 @@ if ($id) // Formulaire saisie tva if ($action == 'create') { - print "\n"; + print load_fiche_titre($langs->trans("VAT") . ' - ' . $langs->trans("New")); + + if (! empty($conf->use_javascript_ajax)) + { + print "\n".''."\n"; + } + + print ''; print ''; print ''; - print_fiche_titre($langs->trans("NewVATPayment")); - + print '
'; + print '
'; + print $langs->trans("Type").':   '; + print '
'; + print ''; + print '   '; + print ''; + print '
'; + print "
\n"; + dol_fiche_head(); print '
'; - print ''; - print "
'; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print '
  '; - print ''; - print "
'; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print '
'; @@ -202,7 +242,12 @@ if ($action == 'create') print ''; // Label - print ''; + if ($refund == 1) { + $label = $langs->trans("VATRefund"); + } else { + $label = $langs->trans("VATPayment"); + } + print ''; // Amount print ''; @@ -327,7 +372,5 @@ if ($id) print ""; } - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index a938087c689..eb4ee3a2408 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur - * Copyright (C) 2011-2014 Alexandre Spangaro + * Copyright (C) 2011-2015 Alexandre Spangaro * * 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 @@ -35,9 +35,6 @@ class Tva extends CommonObject //public $element='tva'; //!< Id that identify managed objects //public $table_element='tva'; //!< Name of table without prefix where object is stored - var $id; - var $ref; - var $tms; var $datep; var $datev; @@ -45,7 +42,6 @@ class Tva extends CommonObject var $type_payment; var $num_payment; var $label; - var $note; var $fk_bank; var $fk_user_creat; var $fk_user_modif; @@ -508,7 +504,7 @@ class Tva extends CommonObject $this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")); return -3; } - if ($this->amount < 0 || $this->amount == '') + if ($this->amount == '') { $this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount")); return -4; @@ -553,7 +549,7 @@ class Tva extends CommonObject $result = $this->db->query($sql); if ($result) { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."tva"); // TODO should be called paiementtva + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."tva"); // TODO should be called 'payment_vat' // Call trigger //XXX: Should be done just befor commit no ? @@ -577,8 +573,12 @@ class Tva extends CommonObject $result=$acc->fetch($this->accountid); if ($result <= 0) dol_print_error($this->db); - $bank_line_id = $acc->addline($this->datep, $this->type_payment, $this->label, -abs($this->amount), '', '', $user); - + if ($this->amount > 0) { + $bank_line_id = $acc->addline($this->datep, $this->type_payment, $this->label, -abs($this->amount), '', '', $user); + } else { + $bank_line_id = $acc->addline($this->datep, $this->type_payment, $this->label, abs($this->amount), '', '', $user); + } + // Update fk_bank into llx_tva. So we know vat line used to generate bank transaction if ($bank_line_id > 0) { diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index 9a7166b7892..b0d7a9bce30 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -126,7 +126,7 @@ if (isset($_REQUEST['extra_report']) && $_REQUEST['extra_report'] == 1) { $special_report = true; } -llxHeader('','','','',0,0,'','',$morequerystring); +llxHeader('',$langs->trans("VATReport"),'','',0,0,'','',$morequerystring); $fsearch.='
'; $fsearch.=' '; @@ -231,7 +231,7 @@ $vatsup=$langs->trans("VATPaid"); // VAT Received //print "
"; -//print_titre($vatcust); +//print load_fiche_titre($vatcust); print "
'.$langs->trans("Label").'trans("VATPayment")).'">
'.$langs->trans("Label").'
'.$langs->trans("Amount").'
"; print ""; @@ -317,7 +317,7 @@ if (is_array($coll_list)) { // VAT Paid //print "
"; -//print_titre($vatsup); +//print load_fiche_titre($vatsup); //print "
"; print ""; diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index c84c7d2b633..4090f2904b7 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -113,10 +113,10 @@ llxHeader(); $tva = new Tva($db); -$textprevyear="".img_previous().""; -$textnextyear=" ".img_next().""; +$textprevyear="".img_previous($langs->trans("Previous"), 'class="valignbottom"').""; +$textnextyear=" ".img_next($langs->trans("Next"), 'class="valignbottom"').""; -print_fiche_titre($langs->trans("VAT"),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear"); +print load_fiche_titre($langs->trans("VAT"),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear"); print $langs->trans("VATReportBuildWithOptionDefinedInModule").'
'; print '('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')
'; @@ -124,12 +124,12 @@ print '
'; print '
'; print ''; print '
'; -print_titre($langs->trans("VATSummary")); +print load_fiche_titre($langs->trans("VATSummary")); // The report mode is the one defined by defaut in tax module setup //print $modetax; //print '('.$langs->trans("SeeVATReportInInputOutputMode",'','').')'; print ''; -print_titre($langs->trans("VATPaid")); +print load_fiche_titre($langs->trans("VATPaid")); print '
'; @@ -252,7 +252,5 @@ print "
"; print '
'; - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/tva/quadri.php b/htdocs/compta/tva/quadri.php index 3918b56c3bf..0e4a66146aa 100644 --- a/htdocs/compta/tva/quadri.php +++ b/htdocs/compta/tva/quadri.php @@ -190,12 +190,12 @@ llxHeader(); $textprevyear="".img_previous().""; $textnextyear=" ".img_next().""; -print_fiche_titre($langs->trans("VAT"),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear"); +print load_fiche_titre($langs->trans("VAT"),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear"); echo ''; echo ''; echo ''; @@ -313,7 +313,5 @@ print '
'; -print_fiche_titre($langs->trans("VATSummary")); +print load_fiche_titre($langs->trans("VATSummary")); echo '
'; echo '
'; - -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index f551e92cb9d..00edf22ac3a 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -104,7 +104,7 @@ foreach($listofparams as $param) if (GETPOST($param)!='') $morequerystring.=($morequerystring?'&':'').$param.'='.GETPOST($param); } -llxHeader('','','','',0,0,'','',$morequerystring); +llxHeader('',$langs->trans("VATReport"),'','',0,0,'','',$morequerystring); $form=new Form($db); @@ -115,7 +115,7 @@ $product_static=new Product($db); $payment_static=new Paiement($db); $paymentfourn_static=new PaiementFourn($db); -//print_fiche_titre($langs->trans("VAT"),""); +//print load_fiche_titre($langs->trans("VAT"),""); //$fsearch.='
'; $fsearch.=' '; @@ -638,6 +638,5 @@ else } echo '
'; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/tva/quarter_report.php b/htdocs/compta/tva/quarter_report.php index 09a6622147e..61d019894e8 100644 --- a/htdocs/compta/tva/quarter_report.php +++ b/htdocs/compta/tva/quarter_report.php @@ -135,7 +135,7 @@ $product_static=new Product($db); $payment_static=new Paiement($db); $paymentfourn_static=new PaiementFourn($db); -//print_fiche_titre($langs->trans("VAT"),""); +//print load_fiche_titre($langs->trans("VAT"),""); //$fsearch.='
'; $fsearch.=' '; @@ -707,6 +707,5 @@ if (!is_array($x_coll) || !is_array($x_paye)) { } print '
'; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index 4156bc977a3..3dee569b0ff 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -49,7 +49,7 @@ if ($page == -1) { $page = 0; } $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; if (! $sortfield) $sortfield="t.datev"; if (! $sortorder) $sortorder="DESC"; @@ -115,6 +115,12 @@ if ($filtre) { if ($typeid) { $sql .= " AND t.fk_typepayment=".$typeid; } +$totalnboflines=0; +$result=$db->query($sql); +if ($result) +{ + $totalnboflines = $db->num_rows($result); +} $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit+1,$offset); @@ -156,9 +162,12 @@ if ($result) $form->select_types_paiements($typeid,'typeid','',0,0,1,16); print '
'; - print ''; - print "
'; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print '
'; @@ -160,6 +160,5 @@ else print "Error ID incorrect"; } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/ventilation/fournisseur/card.php b/htdocs/compta/ventilation/fournisseur/card.php index d62694512fc..dc376de7c06 100644 --- a/htdocs/compta/ventilation/fournisseur/card.php +++ b/htdocs/compta/ventilation/fournisseur/card.php @@ -101,7 +101,7 @@ if($_GET["id"]) } - print_titre("Ventilation"); + print load_fiche_titre("Ventilation"); print '
'; print ''; @@ -144,6 +144,5 @@ else print "Error ID incorrect"; } -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/compta/ventilation/fournisseur/list.php b/htdocs/compta/ventilation/fournisseur/list.php index 5213a4686be..20ca396aa30 100644 --- a/htdocs/compta/ventilation/fournisseur/list.php +++ b/htdocs/compta/ventilation/fournisseur/list.php @@ -45,7 +45,7 @@ llxHeader('','Ventilation'); */ $page = $_GET["page"]; if ($page < 0) $page = 0; -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page ; $sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.total_ttc as price, l.rowid, l.fk_code_ventilation "; @@ -100,6 +100,6 @@ else { print $db->error(); } -$db->close(); llxFooter(); +$db->close(); diff --git a/htdocs/compta/ventilation/list.php b/htdocs/compta/ventilation/list.php index 03a1b658cd2..fc022cade0d 100644 --- a/htdocs/compta/ventilation/list.php +++ b/htdocs/compta/ventilation/list.php @@ -47,12 +47,12 @@ llxHeader('','Ventilation'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $page = GETPOST("page",'int'); if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; +$offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -$limit = $conf->liste_limit; $sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, f.total as price, l.rowid, l.fk_code_ventilation,"; $sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type"; diff --git a/htdocs/conf/conf.php.example b/htdocs/conf/conf.php.example index c1a374ceec2..3d6db94d801 100644 --- a/htdocs/conf/conf.php.example +++ b/htdocs/conf/conf.php.example @@ -323,4 +323,4 @@ $dolibarr_main_db_prefix=''; // Examples: // $multicompany_transverse_mode='1'; -?> + diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index ad628fd6574..3d6b792d99b 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -94,7 +94,8 @@ abstract class ActionsContactCardCommon } /** - * Load data control + * doActions of a canvas is not the doActions of the hook + * @deprecated Use the doActions of hooks instead of this. * * @param string $action Type of action * @param int $id Id of object @@ -207,7 +208,7 @@ abstract class ActionsContactCardCommon { $this->object->fetch($_POST["contactid"]); - $this->object->oldcopy=dol_clone($this->object); + $this->object->oldcopy = clone $this->object; $this->assign_post(); diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php index 3bfcf347c3f..30a52469da2 100644 --- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php +++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php @@ -29,12 +29,6 @@ include_once DOL_DOCUMENT_ROOT.'/contact/canvas/actions_contactcard_common.class */ class ActionsContactCardDefault extends ActionsContactCardCommon { - var $db; - var $dirmodule; - var $targetmodule; - var $canvas; - var $card; - /** * Constructor * diff --git a/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php index 70d6b41bf35..3fce45b848f 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_create.tpl.php @@ -20,7 +20,7 @@ control->tpl['title']); +print load_fiche_titre($this->control->tpl['title']); dol_htmloutput_errors((is_numeric($object->error)?'':$object->error),$object->errors); diff --git a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php index 3be1d16bc8d..c275902d384 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php @@ -23,7 +23,7 @@ $contact = $GLOBALS['objcanvas']->control->object; control->tpl['title']); +print load_fiche_titre($this->control->tpl['title']); dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']); diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index d151298dbc5..bd9a4b781f5 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -4,10 +4,10 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013-2015 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -35,6 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -142,7 +143,7 @@ if (empty($reshook)) $object->fetch($id); if ($object->setstatus(0)<0) { - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } else { @@ -157,7 +158,7 @@ if (empty($reshook)) $object->fetch($id); if ($object->setstatus(1)<0) { - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } else { @@ -277,13 +278,72 @@ if (empty($reshook)) $action = 'edit'; } + if (! $error) { $contactid=GETPOST("contactid",'int'); $object->fetch($contactid); - $object->oldcopy=dol_clone($object); + // Photo save + $dir = $conf->societe->dir_output."/contact/".$object->id."/photos"; + $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); + if (GETPOST('deletephoto') && $object->photo) + { + $fileimg=$dir.'/'.$object->photo; + $dirthumbs=$dir.'/thumbs'; + dol_delete_file($fileimg); + dol_delete_dir_recursive($dirthumbs); + $object->photo = ''; + } + if ($file_OK) + { + if (image_format_supported($_FILES['photo']['name']) > 0) + { + dol_mkdir($dir); + + if (@is_dir($dir)) + { + $newfile=$dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); + $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); + + if (! $result > 0) + { + $errors[] = "ErrorFailedToSaveFile"; + } + else + { + $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); + // Create small thumbs for company (Ratio is near 16/9) + // Used on logon for example + $imgThumbSmall = vignette($newfile, $maxwidthsmall, $maxheightsmall, '_small', $quality); + + // Create mini thumbs for company (Ratio is near 16/9) + // Used on menu or for setup page for example + $imgThumbMini = vignette($newfile, $maxwidthmini, $maxheightmini, '_mini', $quality); + } + } + } + else + { + $errors[] = "ErrorBadImageFormat"; + } + } + else + { + switch($_FILES['photo']['error']) + { + case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini + case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form + $errors[] = "ErrorFileSizeTooLarge"; + break; + case 3: //uploaded file was only partially uploaded + $errors[] = "ErrorFilePartiallyUploaded"; + break; + } + } + + $object->oldcopy = clone$object; $object->old_lastname = GETPOST("old_lastname"); $object->old_firstname = GETPOST("old_firstname"); @@ -336,8 +396,7 @@ if (empty($reshook)) } else { - setEventMessage($object->error,'errors'); - setEventMessage($object->errors,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); $action = 'edit'; } } @@ -350,8 +409,10 @@ if (empty($reshook)) */ +$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); +if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/',$conf->global->MAIN_HTML_TITLE) && $object->lastname) $title=$object->lastname; $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('',$langs->trans("ContactsAddresses"),$help_url); +llxHeader('', $title, $help_url); $form = new Form($db); $formcompany = new FormCompany($db); @@ -433,7 +494,7 @@ else $title = $addcontact = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress")); $linkback=''; - print_fiche_titre($title,$linkback,'title_companies.png'); + print load_fiche_titre($title,$linkback,'title_companies.png'); // Affiche les erreurs dol_htmloutput_errors(is_numeric($error)?'':$error,$errors); @@ -451,10 +512,12 @@ else $(\'textarea[name="address"]\').val("'.dol_escape_js($objsoc->address).'"); $(\'input[name="zipcode"]\').val("'.dol_escape_js($objsoc->zip).'"); $(\'input[name="town"]\').val("'.dol_escape_js($objsoc->town).'"); - $(\'select[name="country_id"]\').val("'.dol_escape_js($objsoc->country_id).'"); - $(\'select[name="state_id"]\').val("'.dol_escape_js($objsoc->state_id).'"); - $(\'input[name="email"]\').val("'.dol_escape_js($objsoc->email).'"); - }); + console.log("Set state_id to '.dol_escape_js($objsoc->state_id).'"); + $(\'select[name="state_id"]\').val("'.dol_escape_js($objsoc->state_id).'").trigger("change"); + /* set country at end because it will trigger page refresh */ + console.log("Set country id to '.dol_escape_js($objsoc->country_id).'"); + $(\'select[name="country_id"]\').val("'.dol_escape_js($objsoc->country_id).'").trigger("change"); /* trigger required to update select2 components */ + }); })'."\n"; print ''."\n"; } @@ -616,7 +679,7 @@ else // Add personnal information - print_fiche_titre('
'.$langs->trans("PersonalInformations").'
','',''); + print load_fiche_titre('
'.$langs->trans("PersonalInformations").'
','',''); print '
Facture
'; @@ -689,17 +752,20 @@ else }); $("#copyaddressfromsoc").click(function() { - $(\'textarea[name="address"]\').text("'.dol_escape_js($objsoc->address).'"); + $(\'textarea[name="address"]\').val("'.dol_escape_js($objsoc->address).'"); $(\'input[name="zipcode"]\').val("'.dol_escape_js($objsoc->zip).'"); $(\'input[name="town"]\').val("'.dol_escape_js($objsoc->town).'"); - $(\'select[name="country_id"]\').val("'.dol_escape_js($objsoc->country_id).'"); - $(\'select[name="state_id"]\').val("'.dol_escape_js($objsoc->state_id).'"); + console.log("Set state_id to '.dol_escape_js($objsoc->state_id).'"); + $(\'select[name="state_id"]\').val("'.dol_escape_js($objsoc->state_id).'").trigger("change"); + /* set country at end because it will trigger page refresh */ + console.log("Set country id to '.dol_escape_js($objsoc->country_id).'"); + $(\'select[name="country_id"]\').val("'.dol_escape_js($objsoc->country_id).'").trigger("change"); /* trigger required to update select2 components */ }); })'."\n"; print ''."\n"; } - print ''; + print ''; print ''; print ''; print ''; @@ -712,11 +778,14 @@ else print '
'; - // Ref - print ''; - + // Ref/ID + if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) + { + print ''; + } + // Lastname print ''; print ''; @@ -906,6 +975,23 @@ else else print $langs->trans("NoDolibarrAccess"); print ''; + // Photo + print ''; + print ''; + print ''; + print ''; + print '
'.$langs->trans("Ref").''; - print $object->ref; - print '
'.$langs->trans("ID").''; + print $object->ref; + print '
lastname).'" autofocus="autofocus">
'.fieldLabel('Photo','photoinput').''; + if ($object->photo) { + print $form->showphoto('contact',$object); + print "
\n"; + } + print ''; + if ($object->photo) print ''; + //print ''; + print ''; + print '
'.$langs->trans("Delete").'

'.$langs->trans("PhotoFile").'
'; + + print '
'; print dol_fiche_end(); @@ -962,23 +1048,21 @@ else } - print ''; - $linkback = ''.$langs->trans("BackToList").''; - - // Ref - print ''; - - // Name - print ''; - print ''; + + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + + print '
'; + print '
'; + + print '
'; + print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback); - print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").''.$object->lastname.''.$langs->trans("Firstname").''.$object->firstname.'
'; // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { - print ''; + print ''; } + print ''; + // Civility - print ''; // Role - print ''; - - // Address - print ''; - - // Zip/Town - print ''; - - // Country - print ''; - - // State - if (empty($conf->global->SOCIETE_DISABLE_STATE)) - { - print ''; - } - - // Phone - print ''; - print ''; - - print ''; - print ''; + print ''; // Email - print ''; if (! empty($conf->mailing->enabled)) { $langs->load("mails"); - print ''; - print ''; + print ''; + print ''; } - else - { - print ''; - } - print ''; // Instant message and no email - print ''; + print ''; if (!empty($conf->mailing->enabled)) { - print ''; - } - else - { - print ''; - } - print ''; - - // Skype - if (! empty($conf->skype->enabled)) - { - print ''; + print ''; } - print ''; // Note Public - print ''; // Note Private - print ''; + print ''; + */ + + print '
'.$langs->trans("ThirdParty").''; + print '
'.$langs->trans("ThirdParty").''; if ($object->socid > 0) { $objsoc->fetch($object->socid); @@ -988,100 +1072,66 @@ else { print $langs->trans("ContactNotLinkedToCompany"); } - print '
'.$langs->trans("UserTitle").''; + print '
'.$langs->trans("UserTitle").''; print $object->getCivilityLabel(); print '
'.$langs->trans("PostOrFunction").''.$object->poste.'
'.$langs->trans("Address").''; - dol_print_address($object->address,'gmap','contact',$object->id); - print '
'.$langs->trans("Zip").' / '.$langs->trans("Town").''; - print $object->zip; - if ($object->zip) print ' '; - print $object->town.'
'.$langs->trans("Country").''; - $img=picto_from_langcode($object->country_code); - if ($img) print $img.' '; - print $object->country; - print '
'.$langs->trans('State').''.$object->state.'
'.$langs->trans("PhonePro").''.dol_print_phone($object->phone_pro,$object->country_code,$object->id,$object->socid,'AC_TEL').''.$langs->trans("PhonePerso").''.dol_print_phone($object->phone_perso,$object->country_code,$object->id,$object->socid,'AC_TEL').'
'.$langs->trans("PhoneMobile").''.dol_print_phone($object->phone_mobile,$object->country_code,$object->id,$object->socid,'AC_TEL').''.$langs->trans("Fax").''.dol_print_phone($object->fax,$object->country_code,$object->id,$object->socid,'AC_FAX').'
'.$langs->trans("PostOrFunction").''.$object->poste.'
'.$langs->trans("EMail").''.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').''.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
'.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
 
'.$langs->trans("IM").''.$object->jabberid.'
'.$langs->trans("IM").''.$object->jabberid.'
'.$langs->trans("No_Email").''.yn($object->no_email).' 
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).'
'.$langs->trans("No_Email").''.yn($object->no_email).'
'.$langs->trans("ContactVisibility").''; + print '
'.$langs->trans("ContactVisibility").''; print $object->LibPubPriv($object->priv); print '
'.$langs->trans("NotePublic").''; + /* + print '
'.$langs->trans("NotePublic").''; print nl2br($object->note_public); print '
'.$langs->trans("NotePrivate").''; + print '
'.$langs->trans("NotePrivate").''; print nl2br($object->note_private); - - // Statut - print '
'.$langs->trans("Status").'
'; + + print '
'; + print '
'; + + print '
'; + print ''; + + // Statut + /*print ''; print ''; print ''."\n"; - + */ + // Categories if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) { print ''; @@ -1148,7 +1198,10 @@ else print ''; print "
'.$langs->trans("Status").''; print $object->getLibStatut(4); print '
' . $langs->trans( "Categories" ) . '
"; - + + print '
'; + print '
'; + print dol_fiche_end(); // Barre d'actions diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 7af2a763ad1..723784d9a5d 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -41,11 +41,7 @@ class Contact extends CommonObject public $table_element='socpeople'; protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - var $id; - var $ref_ext; var $civility_id; // In fact we store civility_code - var $lastname; - var $firstname; var $address; var $zip; var $town; @@ -69,10 +65,6 @@ class Contact extends CommonObject var $state_code; // Code of department var $state; // Label of department - var $country_id; // Id of country - var $country_code; // Code of country - var $country; // Label of country - var $poste; // Position var $socid; // fk_soc @@ -81,6 +73,7 @@ class Contact extends CommonObject var $code; var $email; var $skype; + var $photo; var $jabberid; var $phone_pro; var $phone_perso; @@ -91,13 +84,6 @@ class Contact extends CommonObject var $birthday; var $default_lang; - var $note_public; // Public note - /** - * @deprecated - * @see note_public, note_private - */ - var $note; - var $note_private; // Private note var $no_email; // 1=Don't send e-mail to this contact, 0=do var $ref_facturation; // Nb de reference facture pour lequel il est contact @@ -107,7 +93,6 @@ class Contact extends CommonObject var $user_id; var $user_login; - var $import_key; var $oldcopy; // To contains a clone of this when we need to save old properties of object @@ -256,6 +241,7 @@ class Contact extends CommonObject $this->phone_mobile=trim($this->phone_mobile); $this->jabberid=trim($this->jabberid); $this->skype=trim($this->skype); + $this->photo=trim($this->photo); $this->fax=trim($this->fax); $this->zip=(empty($this->zip)?'':$this->zip); $this->town=(empty($this->town)?'':$this->town); @@ -280,6 +266,7 @@ class Contact extends CommonObject $sql .= ", fax='".$this->db->escape($this->fax)."'"; $sql .= ", email='".$this->db->escape($this->email)."'"; $sql .= ", skype='".$this->db->escape($this->skype)."'"; + $sql .= ", photo='".$this->db->escape($this->photo)."'"; $sql .= ", note_private = ".(isset($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null"); $sql .= ", note_public = ".(isset($this->note_public)?"'".$this->db->escape($this->note_public)."'":"null"); $sql .= ", phone = ".(isset($this->phone_pro)?"'".$this->db->escape($this->phone_pro)."'":"null"); @@ -408,7 +395,7 @@ class Contact extends CommonObject if ($this->phone_perso && ! empty($conf->global->LDAP_CONTACT_FIELD_HOMEPHONE)) $info[$conf->global->LDAP_CONTACT_FIELD_HOMEPHONE] = $this->phone_perso; if ($this->phone_mobile && ! empty($conf->global->LDAP_CONTACT_FIELD_MOBILE)) $info[$conf->global->LDAP_CONTACT_FIELD_MOBILE] = $this->phone_mobile; if ($this->fax && ! empty($conf->global->LDAP_CONTACT_FIELD_FAX)) $info[$conf->global->LDAP_CONTACT_FIELD_FAX] = $this->fax; - if ($this->skype && ! empty($conf->global->LDAP_CONTACT_FIELD_SKYPE)) $info[$conf->global->LDAP_CONTACT_FIELD_SKYPE] = $this->skype; + if ($this->skype && ! empty($conf->global->LDAP_CONTACT_FIELD_SKYPE)) $info[$conf->global->LDAP_CONTACT_FIELD_SKYPE] = $this->skype; if ($this->note_private && ! empty($conf->global->LDAP_CONTACT_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_CONTACT_FIELD_DESCRIPTION] = $this->note_private; if ($this->email && ! empty($conf->global->LDAP_CONTACT_FIELD_MAIL)) $info[$conf->global->LDAP_CONTACT_FIELD_MAIL] = $this->email; @@ -534,6 +521,7 @@ class Contact extends CommonObject $sql.= " c.fk_departement,"; $sql.= " c.birthday,"; $sql.= " c.poste, c.phone, c.phone_perso, c.phone_mobile, c.fax, c.email, c.jabberid, c.skype,"; + $sql.= " c.photo,"; $sql.= " c.priv, c.note_private, c.note_public, c.default_lang, c.no_email, c.canvas,"; $sql.= " c.import_key,"; $sql.= " co.label as country, co.code as country_code,"; @@ -589,6 +577,7 @@ class Contact extends CommonObject $this->email = $obj->email; $this->jabberid = $obj->jabberid; $this->skype = $obj->skype; + $this->photo = $obj->photo; $this->priv = $obj->priv; $this->mail = $obj->email; @@ -919,22 +908,29 @@ class Contact extends CommonObject */ function getNomUrl($withpicto=0,$option='',$maxlen=0,$moreparam='') { - global $langs; + global $conf, $langs; $result=''; $label = '' . $langs->trans("ShowContact") . ''; $label.= '
' . $langs->trans("Name") . ': '.$this->getFullName($langs); //if ($this->civility_id) $label.= '
' . $langs->trans("Civility") . ': '.$this->civility_id; // TODO Translate cibilty_id code - $label.= '
' . $langs->trans("Poste") . ': '.$this->poste; - $label.= '
' . $langs->trans("EMail") . ': '.$this->email; + if (! empty($this->poste)) $label.= '
' . $langs->trans("Poste") . ': '.$this->poste; + if (! empty($this->email)) $label.= '
' . $langs->trans("EMail") . ': '.$this->email; $phonelist=array(); if ($this->phone_pro) $phonelist[]=$this->phone_pro; if ($this->phone_mobile) $phonelist[]=$this->phone_mobile; - if ($this->phone_pesro) $phonelist[]=$this->phone_perso; + if ($this->phone_perso) $phonelist[]=$this->phone_perso; $label.= '
' . $langs->trans("Phone") . ': '.join(', ',$phonelist); $label.= '
' . $langs->trans("Address") . ': '.dol_format_address($this, 1, ' ', $langs); - $link = ''; + $link = 'global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label=$langs->trans("ShowContact"); + $link.=' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $link.= ' title="'.dol_escape_htmltag($label, 1).'"'; + $link.= ' class="classfortooltip">'; $linkend=''; if ($option == 'xxx') diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index 81f9b2a29be..6cf3daf5cad 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -74,8 +74,10 @@ include DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php'; $form = new Form($db); +$title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); +if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/',$conf->global->MAIN_HTML_TITLE) && $object->lastname) $title=$object->lastname; $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader("",$langs->trans("Contact"), $helpurl); +llxHeader('', $title, $helpurl); if ($object->id) { @@ -93,16 +95,14 @@ if ($object->id) $totalsize+=$file['size']; } - print ''; - - // Ref - print ''; - - // Name - print ''; - print ''; + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + print '
'; + + print '
'; + print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback); - print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").''.$object->lastname.''.$langs->trans("Firstname").''.$object->firstname.'
'; // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) @@ -123,12 +123,19 @@ if ($object->id) } } + // Civility + print ''; + print ''; print ''; print '
'.$langs->trans("UserTitle").''; + print $object->getCivilityLabel(); + print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; print ''; + dol_fiche_end(); + $modulepart = 'contact'; $permission = $user->rights->societe->contact->creer; $param = '&id=' . $object->id; diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index 3ad4f0779af..0250691e88d 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -32,36 +32,50 @@ $langs->load("companies"); // Security check -$contactid = GETPOST("id",'int'); +$id = GETPOST("id",'int'); if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'contact', $contactid, 'socpeople&societe'); +$result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); -$contact = new Contact($db); +$object = new Contact($db); /* * View */ + +$form=new Form($db); + $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas'); -if ($contactid > 0) +if ($id > 0) { - $result = $contact->fetch($contactid, $user); + $result = $object->fetch($id, $user); - $contact->info($contactid); + $object->info($id); - $head = contact_prepare_head($contact); + $head = contact_prepare_head($object); dol_fiche_head($head, 'info', $title, 0, 'contact'); - // TODO Put here ref of card + $linkback = ''.$langs->trans("BackToList").''; - dol_print_object_info($contact); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + print '
'; + + print '
'; + + print '
'; + + dol_print_object_info($object); + + print '
'; + dol_fiche_end(); } diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index 187dea70def..a626c57b6af 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.php @@ -39,10 +39,10 @@ $id = GETPOST('id', 'int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); -$contact = new Contact($db); +$object = new Contact($db); if ($id > 0) { - $contact->fetch($id, $user); + $object->fetch($id, $user); } @@ -57,20 +57,20 @@ if ($action == 'dolibarr2ldap') $ldap=new Ldap(); $result=$ldap->connect_bind(); - $info=$contact->_load_ldap_info(); - $dn=$contact->_load_ldap_dn($info); + $info=$object->_load_ldap_info(); + $dn=$object->_load_ldap_dn($info); $olddn=$dn; // We can say that old dn = dn as we force synchro $result=$ldap->update($dn,$info,$user,$olddn); if ($result >= 0) { - setEventMessage($langs->trans("ContactSynchronized")); + setEventMessages($langs->trans("ContactSynchronized"), null, 'mesgs'); $db->commit(); } else { - setEventMessage($ldap->error, 'errors'); + setEventMessages($ldap->error, $ldap->errors, 'errors'); $db->rollback(); } } @@ -86,40 +86,35 @@ llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Em $form = new Form($db); -$head = contact_prepare_head($contact); +$head = contact_prepare_head($object); dol_fiche_head($head, 'ldap', $title, 0, 'contact'); +dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + +print '
'; -print ''; - -// Ref -print ''; - -// Name -print ''; -print ''; +print '
'; +print '
'.$langs->trans("Ref").''; -print $form->showrefnav($contact,'id'); -print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").''.$contact->lastname.''.$langs->trans("Firstname").''.$contact->firstname.'
'; // Company -if ($contact->socid > 0) +if ($object->socid > 0) { - $objsoc = new Societe($db); - $objsoc->fetch($contact->socid); + $thirdparty = new Societe($db); + $thirdparty->fetch($object->socid); - print ''; + print ''; } else { - print ''; } // Civility -print ''; // LDAP DN @@ -135,6 +130,8 @@ print ''; + // Ref customer + print ''; + print ''; + // Ref supplier print ''; print ''; - // Customer + // Thirdparty print ''; - print ''; - if($socid>0) + print ''; + if ($socid>0) { print ''; } print ''."\n"; @@ -1045,12 +1115,13 @@ if ($action == 'create') $form->select_date($datecontrat,'',0,0,'',"contrat"); print ""; + // Project if (! empty($conf->projet->enabled)) { $formproject=new FormProjets($db); print '"; } @@ -1200,6 +1271,14 @@ else } print ''; + print ''; + print ''; + + print ''; print '"; // Date - print ''; - print '\n"; + print ''; + print ''; + print ''; + /* print ''; + print '\n";*/ // Projet if (! empty($conf->projet->enabled)) @@ -1245,11 +1331,11 @@ else print '"; } @@ -1402,26 +1488,19 @@ else print ''; } - print ''; - $colspan=5; + $colspan=6; if (! empty($conf->margin->enabled) && ! empty($conf->global->MARGIN_SHOW_ON_CONTRACT)) $colspan++; - if($conf->global->PRODUCT_USE_UNITS) $colspan++; + if($conf->global->PRODUCT_USE_UNITS) $colspan++; // Ligne dates prevues print ""; @@ -1638,9 +1718,11 @@ else { $tmpaction='activateline'; if ($objp->statut == 4) $tmpaction='unactivateline'; - print ''; - print img_edit(); - print ''; + if (($tmpaction=='activateline' && $user->rights->contrat->activer) || ($tmpaction=='unactivateline' && $user->rights->contrat->unactiver)) { + print ''; + print img_edit(); + print ''; + } } } print ''; @@ -1704,22 +1786,23 @@ else } } - print ''; + print ''; - print ''; - print ''; print ''; - print ''; + print ''; print '
'.$langs->trans("ThirdParty").''.$objsoc->getNomUrl(1).'
'.$langs->trans("ThirdParty").''.$thirdparty->getNomUrl(1).'
'.$langs->trans("ThirdParty").''; + print '
'.$langs->trans("ThirdParty").''; print $langs->trans("ContactNotLinkedToCompany"); print '
'.$langs->trans("UserTitle").''; -print $contact->getCivilityLabel(); +print '
'.$langs->trans("UserTitle").''; +print $object->getCivilityLabel(); print '
LDAP '.$langs->trans("LDAPServerPort").''; +print ''; + dol_fiche_end(); @@ -146,7 +143,7 @@ print '
'; if (! empty($conf->global->LDAP_CONTACT_ACTIVE) && $conf->global->LDAP_CONTACT_ACTIVE != 'ldap2dolibarr') { - print ''.$langs->trans("ForceSynchronize").''; + print ''.$langs->trans("ForceSynchronize").''; } print "
\n"; @@ -156,7 +153,7 @@ if (! empty($conf->global->LDAP_CONTACT_ACTIVE) && $conf->global->LDAP_CONTACT_A // Affichage attributs LDAP -print_titre($langs->trans("LDAPInformationsForThisContact")); +print load_fiche_titre($langs->trans("LDAPInformationsForThisContact")); print ''; @@ -170,9 +167,9 @@ $ldap=new Ldap(); $result=$ldap->connect_bind(); if ($result > 0) { - $info=$contact->_load_ldap_info(); - $dn=$contact->_load_ldap_dn($info,1); - $search = "(".$contact->_load_ldap_dn($info,2).")"; + $info=$object->_load_ldap_info(); + $dn=$object->_load_ldap_dn($info,1); + $search = "(".$object->_load_ldap_dn($info,2).")"; $records=$ldap->getAttribute($dn,$search); //var_dump($records); diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index cf65c1c5456..8db9b90ff49 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -36,104 +36,188 @@ $langs->load("companies"); $langs->load("suppliers"); // Security check +$id = GETPOST('id','int'); $contactid = GETPOST('id','int'); +$ref = ''; // There is no ref for contacts if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'contact', $contactid,''); +$sall=GETPOST("sall"); $search_firstlast_only=GETPOST("search_firstlast_only"); $search_lastname=GETPOST("search_lastname"); $search_firstname=GETPOST("search_firstname"); $search_societe=GETPOST("search_societe"); $search_poste=GETPOST("search_poste"); $search_phone=GETPOST("search_phone"); -$search_phoneper=GETPOST("search_phoneper"); -$search_phonepro=GETPOST("search_phonepro"); -$search_phonemob=GETPOST("search_phonemob"); +$search_phone_perso=GETPOST("search_phone_perso"); +$search_phone_pro=GETPOST("search_phone_pro"); +$search_phone_mobile=GETPOST("search_phone_mobile"); $search_fax=GETPOST("search_fax"); $search_email=GETPOST("search_email"); $search_skype=GETPOST("search_skype"); $search_priv=GETPOST("search_priv"); $search_categ=GETPOST("search_categ",'int'); $search_status=GETPOST("search_status",'int'); +$search_type=GETPOST('search_type','alpha'); if ($search_status=='') $search_status=1; // always display activ customer first +$optioncss = GETPOST('optioncss','alpha'); + $type=GETPOST("type"); $view=GETPOST("view"); -$sall=GETPOST("contactname"); +$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit; $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); $page = GETPOST('page', 'int'); $userid=GETPOST('userid','int'); $begin=GETPOST('begin'); - if (! $sortorder) $sortorder="ASC"; if (! $sortfield) $sortfield="p.lastname"; if ($page < 0) { $page = 0; } -$limit = $conf->liste_limit; $offset = $limit * $page; $langs->load("companies"); + +$contextpage='contactlist'; $titre = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ListOfContacts") : $langs->trans("ListOfContactsAddresses")); if ($type == "p") { + $contextpage='contactprospectlist'; $titre.=' ('.$langs->trans("ThirdPartyProspects").')'; $urlfiche="card.php"; } if ($type == "c") { + $contextpage='contactcustomerlist'; $titre.=' ('.$langs->trans("ThirdPartyCustomers").')'; $urlfiche="card.php"; } else if ($type == "f") { + $contextpage='contactsupplierlist'; $titre.=' ('.$langs->trans("ThirdPartySuppliers").')'; $urlfiche="card.php"; } else if ($type == "o") { + $contextpage='contactotherlist'; $titre.=' ('.$langs->trans("OthersNotLinkedToThirdParty").')'; $urlfiche=""; } -if (GETPOST('button_removefilter_x') || GETPOST('button_removefilter')) // Both tests are required to be compatible with all browsers +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array($contextpage)); +$extrafields = new ExtraFields($db); + +// fetch optionals attributes and labels +$extralabels = $extrafields->fetch_name_optionals_label('contact'); +$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_'); + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'p.lastname'=>'Lastname', + 'p.firstname'=>'Firstname', + 'p.email'=>'EMail', + 's.nom'=>"ThirdParty", +); + +// Definition of fields for list +$arrayfields=array( + 'p.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1), + 'p.firstname'=>array('label'=>$langs->trans("Firsname"), 'checked'=>1), + 'p.poste'=>array('label'=>$langs->trans("Post"), 'checked'=>1), + 'p.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0), + 'p.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0), + 'p.phone'=>array('label'=>$langs->trans("PhonePro"), 'checked'=>1), + 'p.phone_perso'=>array('label'=>$langs->trans("PhonePerso"), 'checked'=>0), + 'p.phone_mobile'=>array('label'=>$langs->trans("PhoneMobile"), 'checked'=>1), + 'p.fax'=>array('label'=>$langs->trans("Fax"), 'checked'=>1), + 'p.email'=>array('label'=>$langs->trans("Email"), 'checked'=>1), + 'p.skype'=>array('label'=>$langs->trans("Skype"), 'checked'=>1, 'enabled'=>(! empty($conf->skype->enabled))), + 'p.thirdparty'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'enabled'=>empty($conf->global->SOCIETE_DISABLE_CONTACTS)), + 'p.priv'=>array('label'=>$langs->trans("ContactVisibility"), 'checked'=>1, 'position'=>200), + 'p.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), + 'p.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), + 'p.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), +); +// Extra fields +if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { + foreach($extrafields->attribute_label as $key => $val) + { + $arrayfields["ef.".$key]=array('label'=>$extrafields->attribute_label[$key], 'checked'=>$extrafields->attribute_list[$key], 'position'=>$extrafields->attribute_pos[$key], 'enabled'=>$extrafields->attribute_perms[$key]); + } +} + +$object=new Contact($db); +if (($id > 0 || ! empty($ref)) && $action != 'add') +{ + $result=$object->fetch($id,$ref); + if ($result < 0) dol_print_error($db); +} + + +/* + * Actions + */ + +$parameters=array(); +$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; + +if (empty($reshook)) +{ + +} + +if (GETPOST('button_removefilter_x') || GETPOST('button_removefilter.x') || GETPOST('button_removefilter')) // All tests are required to be compatible with all browsers +{ + $sall=""; $search_firstlast_only=""; $search_lastname=""; $search_firstname=""; $search_societe=""; $search_poste=""; $search_phone=""; - $search_phoneper=""; - $search_phonepro=""; - $search_phonemob=""; + $search_phone_perso=""; + $search_phone_pro=""; + $search_phone_mobile=""; $search_fax=""; $search_email=""; $search_skype=""; $search_priv=""; - $sall=""; - $seach_status=1; + $search_status=-1; } if ($search_priv < 0) $search_priv=''; - /* * View */ +$form=new Form($db); +$formother=new FormOther($db); +$contactstatic=new Contact($db); + $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas'); -$form=new Form($db); -$formother=new FormOther($db); - $sql = "SELECT s.rowid as socid, s.nom as name,"; -$sql.= " p.rowid as cidp, p.lastname as lastname, p.statut, p.firstname, p.poste, p.email, p.skype,"; -$sql.= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.tms,"; +$sql.= " p.rowid as cidp, p.lastname as lastname, p.statut, p.firstname, p.zip, p.town, p.poste, p.email, p.skype,"; +$sql.= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.datec as date_creation, p.tms as date_update,"; $sql.= " co.code as country_code"; +// Add fields from extrafields +foreach ($extrafields->attribute_label as $key => $val) $sql.=",ef.".$key.' as options_'.$key; +// Add fields from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as p"; +if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (p.rowid = ef.fk_object)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = p.fk_pays"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc"; if (! empty($search_categ)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_contact as cs ON p.rowid = cs.fk_socpeople"; // We need this table joined to the select in order to filter by categ @@ -181,17 +265,17 @@ if (strlen($search_phone)) { $sql .= " AND (p.phone LIKE '%".$db->escape($search_phone)."%' OR p.phone_perso LIKE '%".$db->escape($search_phone)."%' OR p.phone_mobile LIKE '%".$db->escape($search_phone)."%')"; } -if (strlen($search_phoneper)) +if (strlen($search_phone_perso)) { - $sql .= " AND p.phone_perso LIKE '%".$db->escape($search_phoneper)."%'"; + $sql .= " AND p.phone_perso LIKE '%".$db->escape($search_phone_perso)."%'"; } -if (strlen($search_phonepro)) +if (strlen($search_phone_pro)) { - $sql .= " AND p.phone LIKE '%".$db->escape($search_phonepro)."%'"; + $sql .= " AND p.phone LIKE '%".$db->escape($search_phone_pro)."%'"; } -if (strlen($search_phonemob)) +if (strlen($search_phone_mobile)) { - $sql .= " AND p.phone_mobile LIKE '%".$db->escape($search_phonemob)."%'"; + $sql .= " AND p.phone_mobile LIKE '%".$db->escape($search_phone_mobile)."%'"; } if (strlen($search_fax)) { @@ -205,7 +289,7 @@ if (strlen($search_skype)) // filtre sur skype { $sql .= " AND p.skype LIKE '%".$db->escape($search_skype)."%'"; } -if ($search_status!='') $sql .= " AND p.statut = ".$db->escape($search_status); +if ($search_status != '' && $search_status >= 0) $sql .= " AND p.statut = ".$db->escape($search_status); if ($type == "o") // filtre sur type { $sql .= " AND p.fk_soc IS NULL"; @@ -224,12 +308,40 @@ else if ($type == "p") // filtre sur type } if ($sall) { - $sql .= natural_search(array('p.lastname', 'p.firstname', 'p.email', 's.nom'), $sall); + $sql .= natural_search(array_keys($fieldstosearchall), $sall); } if (! empty($socid)) { $sql .= " AND s.rowid = ".$socid; } +// Add where from extra fields +foreach ($search_array_options as $key => $val) +{ + $crit=$val; + $tmpkey=preg_replace('/search_options_/','',$key); + $typ=$extrafields->attribute_type[$tmpkey]; + $mode=0; + if (in_array($typ, array('int'))) $mode=1; // Search on a numeric + if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit))) + { + $sql .= natural_search('ef.'.$tmpkey, $crit, $mode); + } +} +// Add where from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; + +// Add order +if($view == "recent") +{ + $sql.= $db->order("p.datec","DESC"); +} +else +{ + $sql.= $db->order($sortfield,$sortorder); +} + // Count total nb of records $nbtotalofrecords = 0; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) @@ -237,16 +349,15 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); } -// Add order and limit + +// Add limit if($view == "recent") { - $sql.= " ORDER BY p.datec DESC "; - $sql.= " ".$db->plimit($conf->liste_limit+1, $offset); + $sql.= $db->plimit($limit+1, $offset); } else { - $sql.= " ORDER BY $sortfield $sortorder "; - $sql.= " ".$db->plimit($conf->liste_limit+1, $offset); + $sql.= $db->plimit($limit+1, $offset); } //print $sql; @@ -254,113 +365,236 @@ dol_syslog("contact/list.php", LOG_DEBUG); $result = $db->query($sql); if ($result) { - $contactstatic=new Contact($db); - - $param ='&begin='.htmlspecialchars($begin).'&view='.htmlspecialchars($view).'&userid='.htmlspecialchars($userid).'&contactname='.htmlspecialchars($sall); - $param.='&type='.htmlspecialchars($type).'&view='.htmlspecialchars($view).'&search_lastname='.htmlspecialchars($search_lastname).'&search_firstname='.htmlspecialchars($search_firstname).'&search_societe='.htmlspecialchars($search_societe).'&search_email='.htmlspecialchars($search_email); - if (!empty($search_categ)) $param.='&search_categ='.htmlspecialchars($search_categ); - if ($search_status != '') $param.='&search_status='.htmlspecialchars($search_status); - if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=".htmlspecialchars($search_priv); - $num = $db->num_rows($result); $i = 0; - print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords,'title_companies.png'); - + $param=''; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + $param.='&begin='.urlencode($begin).'&view='.urlencode($view).'&userid='.urlencode($userid).'&contactname='.urlencode($sall); + $param.='&type='.urlencode($type).'&view='.urlencode($view); + if (!empty($search_categ)) $param.='&search_categ='.urlencode($search_categ); + if ($search_lastname != '') $param.='&search_lastname='.urlencode($search_lastname); + if ($search_firstname != '') $param.='&search_firstname='.urlencode($search_firstname); + if ($search_societe != '') $param.='&search_societe='.urlencode($search_societe); + if ($search_zip != '') $param.='&search_zip='.urlencode($search_zip); + if ($search_town != '') $param.='&search_town='.urlencode($search_town); + if ($search_job != '') $param.='&search_job='.urlencode($search_job); + if ($search_phone_pro != '') $param.='&search_phone_pro='.urlencode($search_phone_pro); + if ($search_phone_perso != '') $param.='&search_phone_perso='.urlencode($search_phone_perso); + if ($search_phone_mobile != '') $param.='&search_phone_mobile='.urlencode($search_phone_mobile); + if ($search_fax != '') $param.='&search_fax='.urlencode($search_fax); + if ($search_email != '') $param.='&search_email='.urlencode($search_email); + if ($search_status != '') $param.='&search_status='.urlencode($search_status); + if ($search_priv == '0' || $search_priv == '1') $param.="&search_priv=".urlencode($search_priv); + if ($optioncss != '') $param.='&optioncss='.$optioncss; + // Add $param from extra fields + foreach ($search_array_options as $key => $val) + { + $crit=$val; + $tmpkey=preg_replace('/search_options_/','',$key); + if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val); + } + print ''; + if ($optioncss != '') print ''; print ''; + print ''; print ''; print ''; print ''; - if (! empty($conf->categorie->enabled)) - { - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; - $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1); - $moreforfilter.='       '; - } - if ($moreforfilter) - { - print '
'; - print $moreforfilter; - print '
'; - } + print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies.png', 0, '', '', $limit); if ($sall) { - print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("ThirdParty")." ".$langs->trans("or")." ".$langs->trans("EMail")."): ".$sall; + foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); + print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall); } if ($search_firstlast_only) { - print $langs->trans("Filter")." (".$langs->trans("Lastname").", ".$langs->trans("Firstname")."): ".$search_firstlast_only; + print $langs->trans("FilterOnInto", $search_firstlast_only) . $langs->trans("Lastname").", ".$langs->trans("Firstname"); } - print '
'; + + if (! empty($conf->categorie->enabled)) + { + require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; + $moreforfilter.='
'; + $moreforfilter.=$langs->trans('Categories'). ': '; + $moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1); + $moreforfilter.='
'; + } + if ($moreforfilter) + { + print '
'; + print $moreforfilter; + $parameters=array('type'=>$type); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print '
'; + } + + $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; + $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + + print '
'; // Ligne des titres print ''; - print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"p.lastname", $begin, $param, '', $sortfield,$sortorder); - print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"p.firstname", $begin, $param, '', $sortfield,$sortorder); - print_liste_field_titre($langs->trans("PostOrFunction"),$_SERVER["PHP_SELF"],"p.poste", $begin, $param, '', $sortfield,$sortorder); - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom", $begin, $param, '', $sortfield,$sortorder); - print_liste_field_titre($langs->trans("Phone"),$_SERVER["PHP_SELF"],"p.phone", $begin, $param, '', $sortfield,$sortorder); - print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mobile", $begin, $param, '', $sortfield,$sortorder); - print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder); - print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder); - if (! empty($conf->skype->enabled)) { print_liste_field_titre($langs->trans("Skype"),$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder); } - print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"p.tms", $begin, $param, 'align="center"', $sortfield,$sortorder); - print_liste_field_titre($langs->trans("ContactVisibility"),$_SERVER["PHP_SELF"],"p.priv", $begin, $param, 'align="center"', $sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut", $begin, $param, 'align="center"', $sortfield,$sortorder); - print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); + if (! empty($arrayfields['p.lastname']['checked'])) print_liste_field_titre($langs->trans("Lastname"),$_SERVER["PHP_SELF"],"p.lastname", $begin, $param, '', $sortfield,$sortorder); + if (! empty($arrayfields['p.firstname']['checked'])) print_liste_field_titre($langs->trans("Firstname"),$_SERVER["PHP_SELF"],"p.firstname", $begin, $param, '', $sortfield,$sortorder); + if (! empty($arrayfields['p.zip']['checked'])) print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"p.zip", $begin, $param, '', $sortfield,$sortorder); + if (! empty($arrayfields['p.town']['checked'])) print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"p.town", $begin, $param, '', $sortfield,$sortorder); + if (! empty($arrayfields['p.poste']['checked'])) print_liste_field_titre($langs->trans("PostOrFunction"),$_SERVER["PHP_SELF"],"p.poste", $begin, $param, '', $sortfield,$sortorder); + if (! empty($arrayfields['p.phone']['checked'])) print_liste_field_titre($langs->trans("Phone"),$_SERVER["PHP_SELF"],"p.phone", $begin, $param, '', $sortfield,$sortorder); + if (! empty($arrayfields['p.phone_perso']['checked'])) print_liste_field_titre($langs->trans("PhonePerso"),$_SERVER["PHP_SELF"],"p.phone_perso", $begin, $param, '', $sortfield,$sortorder); + if (! empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field_titre($langs->trans("PhoneMobile"),$_SERVER["PHP_SELF"],"p.phone_mobile", $begin, $param, '', $sortfield,$sortorder); + if (! empty($arrayfields['p.fax']['checked'])) print_liste_field_titre($langs->trans("Fax"),$_SERVER["PHP_SELF"],"p.fax", $begin, $param, '', $sortfield,$sortorder); + if (! empty($arrayfields['p.email']['checked'])) print_liste_field_titre($langs->trans("EMail"),$_SERVER["PHP_SELF"],"p.email", $begin, $param, '', $sortfield,$sortorder); + if (! empty($arrayfields['p.skype']['checked'])) print_liste_field_titre($langs->trans("Skype"),$_SERVER["PHP_SELF"],"p.skype", $begin, $param, '', $sortfield,$sortorder); + if (! empty($arrayfields['p.thirdparty']['checked'])) print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom", $begin, $param, '', $sortfield,$sortorder); + if (! empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($langs->trans("ContactVisibility"),$_SERVER["PHP_SELF"],"p.priv", $begin, $param, 'align="center"', $sortfield,$sortorder); + // Extra fields + if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) + { + foreach($extrafields->attribute_label as $key => $val) + { + if (! empty($arrayfields["ef.".$key]['checked'])) + { + $align=$extrafields->getAlignFlag($key); + print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,($align?'align="'.$align.'"':''),$sortfield,$sortorder); + } + } + } + // Hook fields + $parameters=array('arrayfields'=>$arrayfields); + $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + if (! empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($langs->trans("DateCreationShort"),$_SERVER["PHP_SELF"],"p.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"p.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['p.statut']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; // Lines for filter fields print ''; - print ''; - print ''; - print ''; - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) + if (! empty($arrayfields['p.lastname']['checked'])) { print ''; } - print ''; - print ''; - print ''; - print ''; - if (! empty($conf->skype->enabled)) + if (! empty($arrayfields['p.lastname']['checked'])) { print ''; + } + if (! empty($arrayfields['p.poste']['checked'])) + { + print ''; + } + if (! empty($arrayfields['p.zip']['checked'])) + { + print ''; + } + if (! empty($arrayfields['p.town']['checked'])) + { + print ''; + } + if (! empty($arrayfields['p.phone']['checked'])) + { + print ''; + } + if (! empty($arrayfields['p.phone_perso']['checked'])) + { + print ''; + } + if (! empty($arrayfields['p.phone_mobile']['checked'])) + { + print ''; + } + if (! empty($arrayfields['p.fax']['checked'])) + { + print ''; + } + if (! empty($arrayfields['p.email']['checked'])) + { + print ''; + } + if (! empty($arrayfields['p.skype']['checked'])) + { + print ''; + } + if (! empty($arrayfields['p.thirdparty']['checked'])) + { + print ''; + } + if (! empty($arrayfields['p.priv']['checked'])) + { + print ''; + } + // Extra fields + if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) + { + foreach($extrafields->attribute_label as $key => $val) + { + if (! empty($arrayfields["ef.".$key]['checked'])) + { + print ''; + } + } + } + // Fields from hook + $parameters=array('arrayfields'=>$arrayfields); + $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Date creation + if (! empty($arrayfields['p.datec']['checked'])) + { + print ''; + } + // Date modification + if (! empty($arrayfields['p.tms']['checked'])) + { + print ''; + } + if (! empty($arrayfields['p.statut']['checked'])) + { + print ''; } - print ''; - print ''; - print ''; print ''; + print ''; $var=True; @@ -371,8 +605,6 @@ if ($result) $var=!$var; print ""; - // Name - print ''; - + $contactstatic->zip=$obj->zip; + $contactstatic->town=$obj->town; + + // Name + if (! empty($arrayfields['p.lastname']['checked'])) + { + print ''; + } // Firstname - print ''; - - // Function - print ''; - + if (! empty($arrayfields['p.firstname']['checked'])) + { + print ''; + } + // Zip + if (! empty($arrayfields['p.zip']['checked'])) + { + print ''; + } + // Town + if (! empty($arrayfields['p.town']['checked'])) + { + print ''; + } + // Function + if (! empty($arrayfields['p.poste']['checked'])) + { + print ''; + } + // Phone + if (! empty($arrayfields['p.phone']['checked'])) + { + print ''; + } + // Phone perso + if (! empty($arrayfields['p.phone_perso']['checked'])) + { + print ''; + } + // Phone mobile + if (! empty($arrayfields['p.phone_mobile']['checked'])) + { + print ''; + } + // Fax + if (! empty($arrayfields['p.fax']['checked'])) + { + print ''; + } + // EMail + if (! empty($arrayfields['p.email']['checked'])) + { + print ''; + } + // Skype + if (! empty($arrayfields['p.skype']['checked'])) + { + if (! empty($conf->skype->enabled)) { print ''; } + } // Company - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) + if (! empty($arrayfields['p.thirdparty']['checked'])) { print ''; } - // Phone - print ''; - // Phone mobile - print ''; - // Fax - print ''; - // EMail - print ''; - // Skype - if (! empty($conf->skype->enabled)) { print ''; } + // Private/Public + if (! empty($arrayfields['p.priv']['checked'])) + { + print ''; + } - // Date - print ''; - - // Private/Public - print ''; - - // Status - print ''; - - // Links Add action and Export vcard + // Extra fields + if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) + { + foreach($extrafields->attribute_label as $key => $val) + { + if (! empty($arrayfields["ef.".$key]['checked'])) + { + print 'getAlignFlag($key); + if ($align) print ' align="'.$align.'"'; + print '>'; + $tmpkey='options_'.$key; + print $extrafields->showOutputField($key, $obj->$tmpkey, '', 1); + print ''; + } + } + } + // Fields from hook + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Date creation + if (! empty($arrayfields['p.datec']['checked'])) + { + print ''; + } + // Date modification + if (! empty($arrayfields['p.tms']['checked'])) + { + print ''; + } + // Status + if (! empty($arrayfields['p.statut']['checked'])) + { + print ''; + } + // Action column - Links Add action and Export vcard print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); + print $form->selectarray('search_priv',$selectarray,$search_priv,1); + print ''; + print ''; + print ''; + print ''; + print $form->selectarray('search_status', array('-1'=>'', '0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); print ' '; - $selectarray=array('0'=>$langs->trans("ContactPublic"),'1'=>$langs->trans("ContactPrivate")); - print $form->selectarray('search_priv',$selectarray,$search_priv,1); - print ''; - print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); - print ''; print ''; print ''; print '
'; $contactstatic->lastname=$obj->lastname; $contactstatic->firstname=''; $contactstatic->id=$obj->cidp; @@ -381,17 +613,68 @@ if ($result) $contactstatic->phone_pro=$obj->phone_pro; $contactstatic->phone_perso=$obj->phone_perso; $contactstatic->phone_mobile=$obj->phone_mobile; - print $contactstatic->getNomUrl(1,'',20); - print ''; + print $contactstatic->getNomUrl(1,'',20); + print ''.dol_trunc($obj->firstname,20).''.dol_trunc($obj->poste,20).''.dol_trunc($obj->firstname,20).''.dol_trunc($obj->zip,20).''.dol_trunc($obj->town,20).''.dol_trunc($obj->poste,20).''.dol_print_phone($obj->phone_pro,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').''.dol_print_phone($obj->phone_perso,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').''.dol_print_phone($obj->phone_mobile,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').''.dol_print_phone($obj->fax,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').''.dol_print_email($obj->email,$obj->cidp,$obj->socid,'AC_EMAIL',18).''.dol_print_skype($obj->skype,$obj->cidp,$obj->socid,'AC_SKYPE',18).''; if ($obj->socid) @@ -406,27 +689,53 @@ if ($result) print ''.dol_print_phone($obj->phone_pro,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').''.dol_print_phone($obj->phone_mobile,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').''.dol_print_phone($obj->fax,$obj->country_code,$obj->cidp,$obj->socid,'AC_TEL').''.dol_print_email($obj->email,$obj->cidp,$obj->socid,'AC_EMAIL',18).''.dol_print_skype($obj->skype,$obj->cidp,$obj->socid,'AC_SKYPE',18).''.$contactstatic->LibPubPriv($obj->priv).''.dol_print_date($db->jdate($obj->tms),"day").''.$contactstatic->LibPubPriv($obj->priv).''.$contactstatic->getLibStatut(3).''; + print dol_print_date($db->jdate($obj->date_creation), 'dayhour'); + print ''; + print dol_print_date($db->jdate($obj->date_update), 'dayhour'); + print ''.$contactstatic->getLibStatut(3).''; print ''.img_object($langs->trans("AddAction"),"action").''; print '   '; @@ -440,10 +749,10 @@ if ($result) print "
"; + if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies.png', 0, '', '', $limit, 1); + print ''; - - if ($num > $limit) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, ''); - + $db->free($result); } else diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php index 457f794438e..761efcfa840 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -55,12 +55,14 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, * View */ +$now=dol_now(); + $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); $form = new Form($db); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('',$title,$help_url); +llxHeader('', $title, $help_url); if ($id > 0) { @@ -77,19 +79,17 @@ if ($id > 0) print '
'; print ''; - print ''; + + $linkback = ''.$langs->trans("BackToList").''; + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + print '
'; + + print '
'; + print '
'; $linkback = ''.$langs->trans("BackToList").''; - // Ref - print ''; - - // Name - print ''; - print ''; - // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { @@ -110,7 +110,7 @@ if ($id > 0) } // Civility - print ''; @@ -120,7 +120,7 @@ if ($id > 0) { include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback); - print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").''.$object->lastname.''.$langs->trans("Firstname").''.$object->firstname.'
'.$langs->trans("UserTitle").''; + print '
'.$langs->trans("UserTitle").''; print $object->getCivilityLabel(); print '
'.$langs->trans("DateToBirth").''.dol_print_date($object->birthday,"day"); + print ''.$langs->trans("DateToBirth").''.dol_print_date($object->birthday,"day"); print '   '; //var_dump($birthdatearray); @@ -144,9 +144,11 @@ if ($id > 0) print "
"; + print '
'; + print '
'; - $colwidth='20'; + $cssclass='titlefield'; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 8f4e97e690d..8bebb6f0cfb 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -70,8 +70,9 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->societe->contact $now=dol_now(); $title = (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); - -llxHeader('',$title,'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas'); +if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/',$conf->global->MAIN_HTML_TITLE) && $object->lastname) $title=$object->lastname; +$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; +llxHeader('', $title, $helpurl); $form = new Form($db); @@ -155,21 +156,17 @@ if ($action == 'edit') } else { - /* - * Fiche en mode visu - */ - print ''; - + // View mode + $linkback = ''.$langs->trans("BackToList").''; - - // Ref - print ''; - - // Name - print ''; - print ''; + + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + + + print '
'; + + print '
'; + print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback); - print '
'.$langs->trans("Lastname").' / '.$langs->trans("Label").''.$object->lastname.''.$langs->trans("Firstname").''.$object->firstname.'
'; // Company if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) @@ -191,7 +188,7 @@ else } // Civility - print ''; @@ -225,6 +222,7 @@ else print "
'.$langs->trans("UserTitle").''; + print '
'.$langs->trans("UserTitle").''; print $object->getCivilityLabel(); print '
"; + print '
'; } dol_fiche_end(); diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php index 29e060551de..a5a86efaad9 100644 --- a/htdocs/contrat/admin/contract_extrafields.php +++ b/htdocs/contrat/admin/contract_extrafields.php @@ -67,7 +67,7 @@ $textobject = $langs->transnoentitiesnoconv('Contracts'); llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("ContractsSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("ContractsSetup"),$linkback,'title_setup'); print '
'; $head=contract_admin_prepare_head(); @@ -90,27 +90,27 @@ if ($action != 'create' && $action != 'edit') /* ************************************************************************** */ /* */ -/* Creation d'un champ optionnel - /* */ +/* Creation of an optional field */ +/* */ /* ************************************************************************** */ if ($action == 'create') { print "
"; - print_titre($langs->trans('NewAttribute')); + print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } /* ************************************************************************** */ /* */ -/* Edition d'un champ optionnel */ +/* Edition of an optional field */ /* */ /* ************************************************************************** */ if ($action == 'edit' && ! empty($attrname)) { print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; } diff --git a/htdocs/contrat/admin/contractdet_extrafields.php b/htdocs/contrat/admin/contractdet_extrafields.php index 283a400bc80..8014334c008 100644 --- a/htdocs/contrat/admin/contractdet_extrafields.php +++ b/htdocs/contrat/admin/contractdet_extrafields.php @@ -67,7 +67,7 @@ $textobject = $langs->transnoentitiesnoconv('Contracts'); llxHeader(); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans("ContractsSetup"),$linkback,'title_setup'); +print load_fiche_titre($langs->trans("ContractsSetup"),$linkback,'title_setup'); print '
'; $head=contract_admin_prepare_head(); @@ -97,7 +97,7 @@ if ($action != 'create' && $action != 'edit') if ($action == 'create') { print "
"; - print_titre($langs->trans('NewAttribute')); + print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } @@ -110,7 +110,7 @@ if ($action == 'create') if ($action == 'edit' && ! empty($attrname)) { print "
"; - print_titre($langs->trans("FieldEdition", $attrname)); + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index c40e9ab677d..37ec345295b 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -6,7 +6,7 @@ * Copyright (C) 2010-2015 Juanjo Menent * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2014-2016 Ferran Marcet * Copyright (C) 2014 Marcos García * Copyright (C) 2015 Jean-François Ferry * @@ -97,802 +97,868 @@ $permissiondellink=$user->rights->contrat->creer; // Used by the include of acti * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once - -include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once - -if ($action == 'confirm_active' && $confirm == 'yes' && $user->rights->contrat->activer) +$parameters = array('socid' => $socid); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +if (empty($reshook)) { - $result = $object->active_line($user, GETPOST('ligne'), GETPOST('date'), GETPOST('dateend'), GETPOST('comment')); - - if ($result > 0) - { - header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); - exit; - } - else { - setEventMessage($object->error,'errors'); - } -} - -else if ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) -{ - if (! GETPOST('dateend')) + include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once + + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once + + if ($action == 'confirm_active' && $confirm == 'yes' && $user->rights->contrat->activer) { - $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateEnd")),'errors'); - } - if (! $error) - { - $result = $object->close_line($user, GETPOST('ligne'), GETPOST('dateend'), urldecode(GETPOST('comment'))); + $result = $object->active_line($user, GETPOST('ligne'), GETPOST('date'), GETPOST('dateend'), GETPOST('comment')); + if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } else { - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } -} - -// Si ajout champ produit predefini -if (GETPOST('mode')=='predefined') -{ - $date_start=''; - $date_end=''; - if (GETPOST('date_startmonth') && GETPOST('date_startday') && GETPOST('date_startyear')) - { - $date_start=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); - } - if (GETPOST('date_endmonth') && GETPOST('date_endday') && GETPOST('date_endyear')) - { - $date_end=dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); - } -} - -// Si ajout champ produit libre -if (GETPOST('mode')=='libre') -{ - $date_start_sl=''; - $date_end_sl=''; - if (GETPOST('date_start_slmonth') && GETPOST('date_start_slday') && GETPOST('date_start_slyear')) - { - $date_start_sl=dol_mktime(GETPOST('date_start_slhour'), GETPOST('date_start_slmin'), 0, GETPOST('date_start_slmonth'), GETPOST('date_start_slday'), GETPOST('date_start_slyear')); - } - if (GETPOST('date_end_slmonth') && GETPOST('date_end_slday') && GETPOST('date_end_slyear')) - { - $date_end_sl=dol_mktime(GETPOST('date_end_slhour'), GETPOST('date_end_slmin'), 0, GETPOST('date_end_slmonth'), GETPOST('date_end_slday'), GETPOST('date_end_slyear')); - } -} - -// Param dates -$date_contrat=''; -$date_start_update=''; -$date_end_update=''; -$date_start_real_update=''; -$date_end_real_update=''; -if (GETPOST('date_start_updatemonth') && GETPOST('date_start_updateday') && GETPOST('date_start_updateyear')) -{ - $date_start_update=dol_mktime(GETPOST('date_start_updatehour'), GETPOST('date_start_updatemin'), 0, GETPOST('date_start_updatemonth'), GETPOST('date_start_updateday'), GETPOST('date_start_updateyear')); -} -if (GETPOST('date_end_updatemonth') && GETPOST('date_end_updateday') && GETPOST('date_end_updateyear')) -{ - $date_end_update=dol_mktime(GETPOST('date_end_updatehour'), GETPOST('date_end_updatemin'), 0, GETPOST('date_end_updatemonth'), GETPOST('date_end_updateday'), GETPOST('date_end_updateyear')); -} -if (GETPOST('date_start_real_updatemonth') && GETPOST('date_start_real_updateday') && GETPOST('date_start_real_updateyear')) -{ - $date_start_real_update=dol_mktime(GETPOST('date_start_real_updatehour'), GETPOST('date_start_real_updatemin'), 0, GETPOST('date_start_real_updatemonth'), GETPOST('date_start_real_updateday'), GETPOST('date_start_real_updateyear')); -} -if (GETPOST('date_end_real_updatemonth') && GETPOST('date_end_real_updateday') && GETPOST('date_end_real_updateyear')) -{ - $date_end_real_update=dol_mktime(GETPOST('date_end_real_updatehour'), GETPOST('date_end_real_updatemin'), 0, GETPOST('date_end_real_updatemonth'), GETPOST('date_end_real_updateday'), GETPOST('date_end_real_updateyear')); -} -if (GETPOST('remonth') && GETPOST('reday') && GETPOST('reyear')) -{ - $datecontrat = dol_mktime(GETPOST('rehour'), GETPOST('remin'), 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); -} - -// Add contract -if ($action == 'add' && $user->rights->contrat->creer) -{ - // Check - if (empty($datecontrat)) + + else if ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) { - $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors'); - $action='create'; + if (! GETPOST('dateend')) + { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd")), null, 'errors'); + } + if (! $error) + { + $result = $object->close_line($user, GETPOST('ligne'), GETPOST('dateend'), urldecode(GETPOST('comment'))); + if ($result > 0) + { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + } + } } - - if ($socid<1) + + // Si ajout champ produit predefini + if (GETPOST('mode')=='predefined') { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Customer")),'errors'); - $action='create'; - $error++; - } - - // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); - if ($ret < 0) { - $error ++; - $action = 'create'; - } - - if (! $error) - { - $object->socid = $socid; - $object->date_contrat = $datecontrat; - - $object->commercial_suivi_id = GETPOST('commercial_suivi_id','int'); - $object->commercial_signature_id = GETPOST('commercial_signature_id','int'); - - $object->note_private = GETPOST('note_private','alpha'); - $object->note_public = GETPOST('note_public','alpha'); - $object->fk_project = GETPOST('projectid','int'); - $object->remise_percent = GETPOST('remise_percent','alpha'); - $object->ref = GETPOST('ref','alpha'); - $object->ref_supplier = GETPOST('ref_supplier','alpha'); - - // If creation from another object of another module (Example: origin=propal, originid=1) - if ($_POST['origin'] && $_POST['originid']) + $date_start=''; + $date_end=''; + if (GETPOST('date_startmonth') && GETPOST('date_startday') && GETPOST('date_startyear')) { - // Parse element/subelement (ex: project_task) - $element = $subelement = $_POST['origin']; - if (preg_match('/^([^_]+)_([^_]+)/i',$_POST['origin'],$regs)) - { - $element = $regs[1]; - $subelement = $regs[2]; - } - - // For compatibility - if ($element == 'order') { $element = $subelement = 'commande'; } - if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; } - - $object->origin = $_POST['origin']; - $object->origin_id = $_POST['originid']; - - // Possibility to add external linked objects with hooks - $object->linked_objects[$object->origin] = $object->origin_id; - if (is_array($_POST['other_linked_objects']) && ! empty($_POST['other_linked_objects'])) - { - $object->linked_objects = array_merge($object->linked_objects, $_POST['other_linked_objects']); - } - - $id = $object->create($user); - if ($id < 0) { - setEventMessage($object->error,'errors'); - } - - if ($id > 0) - { - dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); - - $classname = ucfirst($subelement); - $srcobject = new $classname($db); - - dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); - $result=$srcobject->fetch($object->origin_id); - if ($result > 0) - { - $srcobject->fetch_thirdparty(); - $lines = $srcobject->lines; - if (empty($lines) && method_exists($srcobject,'fetch_lines')) - { - $srcobject->fetch_lines(); - $lines = $srcobject->lines; - } - - $fk_parent_line=0; - $num=count($lines); - - for ($i=0;$i<$num;$i++) - { - $product_type=($lines[$i]->product_type?$lines[$i]->product_type:0); - - if ($product_type == 1 || (! empty($conf->global->CONTRACT_SUPPORT_PRODUCTS) && in_array($product_type, array(0,1)))) { // TODO Exclude also deee - // service prédéfini - if ($lines[$i]->fk_product > 0) - { - $product_static = new Product($db); - - // Define output language - if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) + $date_start=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); + } + if (GETPOST('date_endmonth') && GETPOST('date_endday') && GETPOST('date_endyear')) + { + $date_end=dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); + } + } + + // Si ajout champ produit libre + if (GETPOST('mode')=='libre') + { + $date_start_sl=''; + $date_end_sl=''; + if (GETPOST('date_start_slmonth') && GETPOST('date_start_slday') && GETPOST('date_start_slyear')) + { + $date_start_sl=dol_mktime(GETPOST('date_start_slhour'), GETPOST('date_start_slmin'), 0, GETPOST('date_start_slmonth'), GETPOST('date_start_slday'), GETPOST('date_start_slyear')); + } + if (GETPOST('date_end_slmonth') && GETPOST('date_end_slday') && GETPOST('date_end_slyear')) + { + $date_end_sl=dol_mktime(GETPOST('date_end_slhour'), GETPOST('date_end_slmin'), 0, GETPOST('date_end_slmonth'), GETPOST('date_end_slday'), GETPOST('date_end_slyear')); + } + } + + // Param dates + $date_contrat=''; + $date_start_update=''; + $date_end_update=''; + $date_start_real_update=''; + $date_end_real_update=''; + if (GETPOST('date_start_updatemonth') && GETPOST('date_start_updateday') && GETPOST('date_start_updateyear')) + { + $date_start_update=dol_mktime(GETPOST('date_start_updatehour'), GETPOST('date_start_updatemin'), 0, GETPOST('date_start_updatemonth'), GETPOST('date_start_updateday'), GETPOST('date_start_updateyear')); + } + if (GETPOST('date_end_updatemonth') && GETPOST('date_end_updateday') && GETPOST('date_end_updateyear')) + { + $date_end_update=dol_mktime(GETPOST('date_end_updatehour'), GETPOST('date_end_updatemin'), 0, GETPOST('date_end_updatemonth'), GETPOST('date_end_updateday'), GETPOST('date_end_updateyear')); + } + if (GETPOST('date_start_real_updatemonth') && GETPOST('date_start_real_updateday') && GETPOST('date_start_real_updateyear')) + { + $date_start_real_update=dol_mktime(GETPOST('date_start_real_updatehour'), GETPOST('date_start_real_updatemin'), 0, GETPOST('date_start_real_updatemonth'), GETPOST('date_start_real_updateday'), GETPOST('date_start_real_updateyear')); + } + if (GETPOST('date_end_real_updatemonth') && GETPOST('date_end_real_updateday') && GETPOST('date_end_real_updateyear')) + { + $date_end_real_update=dol_mktime(GETPOST('date_end_real_updatehour'), GETPOST('date_end_real_updatemin'), 0, GETPOST('date_end_real_updatemonth'), GETPOST('date_end_real_updateday'), GETPOST('date_end_real_updateyear')); + } + if (GETPOST('remonth') && GETPOST('reday') && GETPOST('reyear')) + { + $datecontrat = dol_mktime(GETPOST('rehour'), GETPOST('remin'), 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); + } + + // Add contract + if ($action == 'add' && $user->rights->contrat->creer) + { + // Check + if (empty($datecontrat)) + { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); + $action='create'; + } + + if ($socid<1) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Customer")), null, 'errors'); + $action='create'; + $error++; + } + + // Fill array 'array_options' with data from add form + $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + if ($ret < 0) { + $error ++; + $action = 'create'; + } + + if (! $error) + { + $object->socid = $socid; + $object->date_contrat = $datecontrat; + + $object->commercial_suivi_id = GETPOST('commercial_suivi_id','int'); + $object->commercial_signature_id = GETPOST('commercial_signature_id','int'); + + $object->note_private = GETPOST('note_private','alpha'); + $object->note_public = GETPOST('note_public','alpha'); + $object->fk_project = GETPOST('projectid','int'); + $object->remise_percent = GETPOST('remise_percent','alpha'); + $object->ref = GETPOST('ref','alpha'); + $object->ref_customer = GETPOST('ref_customer','alpha'); + $object->ref_supplier = GETPOST('ref_supplier','alpha'); + + // If creation from another object of another module (Example: origin=propal, originid=1) + if ($_POST['origin'] && $_POST['originid']) + { + // Parse element/subelement (ex: project_task) + $element = $subelement = $_POST['origin']; + if (preg_match('/^([^_]+)_([^_]+)/i',$_POST['origin'],$regs)) + { + $element = $regs[1]; + $subelement = $regs[2]; + } + + // For compatibility + if ($element == 'order') { $element = $subelement = 'commande'; } + if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; } + + $object->origin = $_POST['origin']; + $object->origin_id = $_POST['originid']; + + // Possibility to add external linked objects with hooks + $object->linked_objects[$object->origin] = $object->origin_id; + if (is_array($_POST['other_linked_objects']) && ! empty($_POST['other_linked_objects'])) + { + $object->linked_objects = array_merge($object->linked_objects, $_POST['other_linked_objects']); + } + + $id = $object->create($user); + if ($id < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + + if ($id > 0) + { + dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); + + $classname = ucfirst($subelement); + $srcobject = new $classname($db); + + dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); + $result=$srcobject->fetch($object->origin_id); + if ($result > 0) + { + $srcobject->fetch_thirdparty(); + $lines = $srcobject->lines; + if (empty($lines) && method_exists($srcobject,'fetch_lines')) + { + $srcobject->fetch_lines(); + $lines = $srcobject->lines; + } + + $fk_parent_line=0; + $num=count($lines); + + for ($i=0;$i<$num;$i++) + { + $product_type=($lines[$i]->product_type?$lines[$i]->product_type:0); + + if ($product_type == 1 || (! empty($conf->global->CONTRACT_SUPPORT_PRODUCTS) && in_array($product_type, array(0,1)))) { // TODO Exclude also deee + // service prédéfini + if ($lines[$i]->fk_product > 0) { - $prod = new Product($db); - $prod->id=$lines[$i]->fk_product; - $prod->getMultiLangs(); - - $outputlangs = $langs; - $newlang=''; - if (empty($newlang) && GETPOST('lang_id')) $newlang=GETPOST('lang_id'); - if (empty($newlang)) $newlang=$srcobject->thirdparty->default_lang; - if (! empty($newlang)) + $product_static = new Product($db); + + // Define output language + if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($newlang); + $prod = new Product($db); + $prod->id=$lines[$i]->fk_product; + $prod->getMultiLangs(); + + $outputlangs = $langs; + $newlang=''; + if (empty($newlang) && GETPOST('lang_id')) $newlang=GETPOST('lang_id'); + if (empty($newlang)) $newlang=$srcobject->thirdparty->default_lang; + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + + $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $lines[$i]->product_label; } - - $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $lines[$i]->product_label; + else + { + $label = $lines[$i]->product_label; + } + + if ($conf->global->PRODUIT_DESC_IN_FORM) + $desc .= ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):''; } - else - { - $label = $lines[$i]->product_label; - } - - if ($conf->global->PRODUIT_DESC_IN_FORM) - $desc .= ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):''; + else { + $desc = dol_htmlentitiesbr($lines[$i]->desc); + } + + $result = $object->addline( + $desc, + $lines[$i]->subprice, + $lines[$i]->qty, + $lines[$i]->tva_tx, + $lines[$i]->localtax1_tx, + $lines[$i]->localtax2_tx, + $lines[$i]->fk_product, + $lines[$i]->remise_percent, + $lines[$i]->date_start, + $lines[$i]->date_end, + 'HT', + 0, + $lines[$i]->info_bits, + $lines[$i]->fk_fournprice, + $lines[$i]->pa_ht, + array(), + $lines[$i]->fk_unit + ); + + if ($result < 0) + { + $error++; + break; + } + } - else { - $desc = dol_htmlentitiesbr($lines[$i]->desc); - } - - $result = $object->addline( - $desc, - $lines[$i]->subprice, - $lines[$i]->qty, - $lines[$i]->tva_tx, - $lines[$i]->localtax1_tx, - $lines[$i]->localtax2_tx, - $lines[$i]->fk_product, - $lines[$i]->remise_percent, - $lines[$i]->date_start, - $lines[$i]->date_end, - 'HT', - 0, - $lines[$i]->info_bits, - $lines[$i]->fk_fournprice, - $lines[$i]->pa_ht, - array(), - $lines[$i]->fk_unit - ); - - if ($result < 0) - { - $error++; - break; - } - + } + } + else + { + setEventMessages($srcobject->error, $srcobject->errors, 'errors'); + $error++; + } + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + $error++; + } + } + else + { + $result = $object->create($user); + if ($result > 0) + { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } + else { + setEventMessages($object->error, $object->errors, 'errors'); + } + $action='create'; + } + } + } + + else if ($action == 'classin' && $user->rights->contrat->creer) + { + $object->setProject(GETPOST('projectid')); + } + + // Add a new line + else if ($action == 'addline' && $user->rights->contrat->creer) + { + // Set if we used free entry or predefined product + $predef=''; + $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); + if (GETPOST('prod_entry_mode') == 'free') + { + $idprod=0; + $price_ht = GETPOST('price_ht'); + $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); + } + else + { + $idprod=GETPOST('idprod', 'int'); + $price_ht = ''; + $tva_tx = ''; + } + + $qty = GETPOST('qty'.$predef); + $remise_percent=GETPOST('remise_percent'.$predef); + + if ($qty == '') + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Qty")), null, 'errors'); + $error++; + } + if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && empty($product_desc)) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")), null, 'errors'); + $error++; + } + + // Extrafields + $extrafieldsline = new ExtraFields($db); + $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef); + // Unset extrafield + if (is_array($extralabelsline)) { + // Get extra fields + foreach ($extralabelsline as $key => $value) { + unset($_POST["options_" . $key]); + } + } + + if (! $error) + { + // Clean parameters + $date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); + $date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); + $price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT'); + + // Ecrase $pu par celui du produit + // Ecrase $desc par celui du produit + // Ecrase $txtva par celui du produit + // Ecrase $base_price_type par celui du produit + if ($idprod > 0) + { + $prod = new Product($db); + $prod->fetch($idprod); + + $tva_tx = get_default_tva($mysoc,$object->thirdparty,$prod->id); + $tva_npr = get_default_npr($mysoc,$object->thirdparty,$prod->id); + $pu_ht = $prod->price; + $pu_ttc = $prod->price_ttc; + $price_min = $prod->price_min; + $price_base_type = $prod->price_base_type; + + // On defini prix unitaire + if ($conf->global->PRODUIT_MULTIPRICES && $object->thirdparty->price_level) + { + $pu_ht = $prod->multiprices[$object->thirdparty->price_level]; + $pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level]; + $price_min = $prod->multiprices_min[$object->thirdparty->price_level]; + $price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level]; + } + elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) + { + require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; + + $prodcustprice = new Productcustomerprice($db); + + $filter = array('t.fk_product' => $prod->id,'t.fk_soc' => $object->thirdparty->id); + + $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); + if ($result) { + if (count($prodcustprice->lines) > 0) { + $pu_ht = price($prodcustprice->lines [0]->price); + $pu_ttc = price($prodcustprice->lines [0]->price_ttc); + $price_base_type = $prodcustprice->lines [0]->price_base_type; + $prod->tva_tx = $prodcustprice->lines [0]->tva_tx; } + } + } + + // On reevalue prix selon taux tva car taux tva transaction peut etre different + // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). + if ($tva_tx != $prod->tva_tx) + { + if ($price_base_type != 'HT') + { + $pu_ht = price2num($pu_ttc / (1 + ($tva_tx/100)), 'MU'); + } + else + { + $pu_ttc = price2num($pu_ht * (1 + ($tva_tx/100)), 'MU'); } } - else - { - setEventMessage($srcobject->error,'errors'); - $error++; - } + + $desc=$prod->description; + $desc=dol_concatdesc($desc,$product_desc); + $fk_unit = $prod->fk_unit; + } + else + { + $pu_ht=GETPOST('price_ht'); + $price_base_type = 'HT'; + $tva_tx=GETPOST('tva_tx')?str_replace('*','',GETPOST('tva_tx')):0; // tva_tx field may be disabled, so we use vat rate 0 + $tva_npr=preg_match('/\*/',GETPOST('tva_tx'))?1:0; + $desc=$product_desc; + $fk_unit= GETPOST('units', 'alpha'); + } + + $localtax1_tx=get_localtax($tva_tx,1,$object->thirdparty); + $localtax2_tx=get_localtax($tva_tx,2,$object->thirdparty); + + // ajout prix achat + $fk_fournprice = $_POST['fournprice']; + if ( ! empty($_POST['buying_price']) ) + $pa_ht = $_POST['buying_price']; + else + $pa_ht = null; + + $info_bits=0; + if ($tva_npr) $info_bits |= 0x01; + + if($price_min && (price2num($pu_ht)*(1-price2num($remise_percent)/100) < price2num($price_min))) + { + $object->error = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); + $result = -1 ; + } + else + { + // Insert line + $result = $object->addline( + $desc, + $pu_ht, + $qty, + $tva_tx, + $localtax1_tx, + $localtax2_tx, + $idprod, + $remise_percent, + $date_start, + $date_end, + $price_base_type, + $pu_ttc, + $info_bits, + $fk_fournprice, + $pa_ht, + $array_options, + $fk_unit + ); + } + + if ($result > 0) + { + // Define output language + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) + { + $outputlangs = $langs; + $newlang = ''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; + if (! empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + } + + $ret = $object->fetch($id); // Reload to get new records + + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + } + + unset($_POST ['prod_entry_mode']); + + unset($_POST['qty']); + unset($_POST['type']); + unset($_POST['remise_percent']); + unset($_POST['price_ht']); + unset($_POST['price_ttc']); + unset($_POST['tva_tx']); + unset($_POST['product_ref']); + unset($_POST['product_label']); + unset($_POST['product_desc']); + unset($_POST['fournprice']); + unset($_POST['buying_price']); + unset($_POST ['np_marginRate']); + unset($_POST ['np_markRate']); + unset($_POST['dp_desc']); + unset($_POST['idprod']); + + unset($_POST['date_starthour']); + unset($_POST['date_startmin']); + unset($_POST['date_startsec']); + unset($_POST['date_startday']); + unset($_POST['date_startmonth']); + unset($_POST['date_startyear']); + unset($_POST['date_endhour']); + unset($_POST['date_endmin']); + unset($_POST['date_endsec']); + unset($_POST['date_endday']); + unset($_POST['date_endmonth']); + unset($_POST['date_endyear']); } else { - setEventMessage($object->error,'errors'); - $error++; + setEventMessages($object->error, $object->errors, 'errors'); + } + } + } + + else if ($action == 'updateligne' && $user->rights->contrat->creer && ! GETPOST('cancel')) + { + $objectline = new ContratLigne($db); + if ($objectline->fetch(GETPOST('elrowid'))) + { + $db->begin(); + + if ($date_start_real_update == '') $date_start_real_update=$objectline->date_ouverture; + if ($date_end_real_update == '') $date_end_real_update=$objectline->date_cloture; + + $localtax1_tx=get_localtax(GETPOST('eltva_tx'),1,$object->thirdparty); + $localtax2_tx=get_localtax(GETPOST('eltva_tx'),2,$object->thirdparty); + + // ajout prix d'achat + $fk_fournprice = $_POST['fournprice']; + if ( ! empty($_POST['buying_price']) ) + $pa_ht = $_POST['buying_price']; + else + $pa_ht = null; + + $fk_unit = GETPOST('unit', 'alpha'); + + $objectline->description=GETPOST('product_desc'); + $objectline->price_ht=GETPOST('elprice'); + $objectline->subprice=GETPOST('elprice'); + $objectline->qty=GETPOST('elqty'); + $objectline->remise_percent=GETPOST('elremise_percent'); + $objectline->tva_tx=GETPOST('eltva_tx')?GETPOST('eltva_tx'):0; // Field may be disabled, so we use vat rate 0 + $objectline->localtax1_tx=$localtax1_tx; + $objectline->localtax2_tx=$localtax2_tx; + $objectline->date_ouverture_prevue=$date_start_update; + $objectline->date_ouverture=$date_start_real_update; + $objectline->date_fin_validite=$date_end_update; + $objectline->date_cloture=$date_end_real_update; + $objectline->fk_user_cloture=$user->id; + $objectline->fk_fournprice=$fk_fournprice; + $objectline->pa_ht=$pa_ht; + + if ($fk_unit > 0) { + $objectline->fk_unit = GETPOST('unit'); + } else { + $objectline->fk_unit = null; + } + + // Extrafields + $extrafieldsline = new ExtraFields($db); + $extralabelsline = $extrafieldsline->fetch_name_optionals_label($objectline->table_element); + $array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef); + $objectline->array_options=$array_options; + + // TODO verifier price_min si fk_product et multiprix + + $result=$objectline->update($user); + if ($result > 0) + { + $db->commit(); + } + else + { + setEventMessages($objectline->error, $objectline->errors, 'errors'); + $db->rollback(); } } else { - $result = $object->create($user); - if ($result > 0) - { - header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); - exit; - } - else { - setEventMessage($object->error,'errors'); - } - $action='create'; - } - } -} - -else if ($action == 'classin' && $user->rights->contrat->creer) -{ - $object->setProject(GETPOST('projectid')); -} - -// Add a new line -else if ($action == 'addline' && $user->rights->contrat->creer) -{ - // Set if we used free entry or predefined product - $predef=''; - $product_desc=(GETPOST('dp_desc')?GETPOST('dp_desc'):''); - if (GETPOST('prod_entry_mode') == 'free') - { - $idprod=0; - $price_ht = GETPOST('price_ht'); - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); - } - else - { - $idprod=GETPOST('idprod', 'int'); - $price_ht = ''; - $tva_tx = ''; - } - - $qty = GETPOST('qty'.$predef); - $remise_percent=GETPOST('remise_percent'.$predef); - - if ($qty == '') - { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Qty")),'errors'); - $error++; - } - if (GETPOST('prod_entry_mode') == 'free' && empty($idprod) && empty($product_desc)) - { - setEventMessage($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")),'errors'); - $error++; - } - - // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef); - // Unset extrafield - if (is_array($extralabelsline)) { - // Get extra fields - foreach ($extralabelsline as $key => $value) { - unset($_POST["options_" . $key]); - } - } - - if (! $error) - { - // Clean parameters - $date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); - $date_end=dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); - $price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT'); - - // Ecrase $pu par celui du produit - // Ecrase $desc par celui du produit - // Ecrase $txtva par celui du produit - // Ecrase $base_price_type par celui du produit - if ($idprod > 0) - { - $prod = new Product($db); - $prod->fetch($idprod); - - $tva_tx = get_default_tva($mysoc,$object->thirdparty,$prod->id); - $tva_npr = get_default_npr($mysoc,$object->thirdparty,$prod->id); - $pu_ht = $prod->price; - $pu_ttc = $prod->price_ttc; - $price_min = $prod->price_min; - $price_base_type = $prod->price_base_type; - - // On defini prix unitaire - if ($conf->global->PRODUIT_MULTIPRICES && $object->thirdparty->price_level) - { - $pu_ht = $prod->multiprices[$object->thirdparty->price_level]; - $pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level]; - $price_min = $prod->multiprices_min[$object->thirdparty->price_level]; - $price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level]; - } - elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) - { - require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; - - $prodcustprice = new Productcustomerprice($db); - - $filter = array('t.fk_product' => $prod->id,'t.fk_soc' => $object->thirdparty->id); - - $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); - if ($result) { - if (count($prodcustprice->lines) > 0) { - $pu_ht = price($prodcustprice->lines [0]->price); - $pu_ttc = price($prodcustprice->lines [0]->price_ttc); - $price_base_type = $prodcustprice->lines [0]->price_base_type; - $prod->tva_tx = $prodcustprice->lines [0]->tva_tx; - } - } - } - - // On reevalue prix selon taux tva car taux tva transaction peut etre different - // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). - if ($tva_tx != $prod->tva_tx) - { - if ($price_base_type != 'HT') - { - $pu_ht = price2num($pu_ttc / (1 + ($tva_tx/100)), 'MU'); - } - else - { - $pu_ttc = price2num($pu_ht * (1 + ($tva_tx/100)), 'MU'); - } - } - - $desc=$prod->description; - $desc=dol_concatdesc($desc,$product_desc); - $fk_unit = $prod->fk_unit; - } - else - { - $pu_ht=GETPOST('price_ht'); - $price_base_type = 'HT'; - $tva_tx=GETPOST('tva_tx')?str_replace('*','',GETPOST('tva_tx')):0; // tva_tx field may be disabled, so we use vat rate 0 - $tva_npr=preg_match('/\*/',GETPOST('tva_tx'))?1:0; - $desc=$product_desc; - $fk_unit= GETPOST('units', 'alpha'); - } - - $localtax1_tx=get_localtax($tva_tx,1,$object->thirdparty); - $localtax2_tx=get_localtax($tva_tx,2,$object->thirdparty); - - // ajout prix achat - $fk_fournprice = $_POST['fournprice']; - if ( ! empty($_POST['buying_price']) ) - $pa_ht = $_POST['buying_price']; - else - $pa_ht = null; - - $info_bits=0; - if ($tva_npr) $info_bits |= 0x01; - - if($price_min && (price2num($pu_ht)*(1-price2num($remise_percent)/100) < price2num($price_min))) - { - $object->error = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); - $result = -1 ; - } - else - { - // Insert line - $result = $object->addline( - $desc, - $pu_ht, - $qty, - $tva_tx, - $localtax1_tx, - $localtax2_tx, - $idprod, - $remise_percent, - $date_start, - $date_end, - $price_base_type, - $pu_ttc, - $info_bits, - $fk_fournprice, - $pa_ht, - $array_options, - $fk_unit - ); - } - - if ($result > 0) - { - // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { - $outputlangs = $langs; - $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang = GETPOST('lang_id','alpha'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (! empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - - $ret = $object->fetch($id); // Reload to get new records - - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - } - - unset($_POST ['prod_entry_mode']); - - unset($_POST['qty']); - unset($_POST['type']); - unset($_POST['remise_percent']); - unset($_POST['price_ht']); - unset($_POST['price_ttc']); - unset($_POST['tva_tx']); - unset($_POST['product_ref']); - unset($_POST['product_label']); - unset($_POST['product_desc']); - unset($_POST['fournprice']); - unset($_POST['buying_price']); - unset($_POST ['np_marginRate']); - unset($_POST ['np_markRate']); - unset($_POST['dp_desc']); - unset($_POST['idprod']); - - unset($_POST['date_starthour']); - unset($_POST['date_startmin']); - unset($_POST['date_startsec']); - unset($_POST['date_startday']); - unset($_POST['date_startmonth']); - unset($_POST['date_startyear']); - unset($_POST['date_endhour']); - unset($_POST['date_endmin']); - unset($_POST['date_endsec']); - unset($_POST['date_endday']); - unset($_POST['date_endmonth']); - unset($_POST['date_endyear']); - } - else - { - setEventMessage($object->error,'errors'); - } - } -} - -else if ($action == 'updateligne' && $user->rights->contrat->creer && ! GETPOST('cancel')) -{ - $objectline = new ContratLigne($db); - if ($objectline->fetch(GETPOST('elrowid'))) - { - $db->begin(); - - if ($date_start_real_update == '') $date_start_real_update=$objectline->date_ouverture; - if ($date_end_real_update == '') $date_end_real_update=$objectline->date_cloture; - - $localtax1_tx=get_localtax(GETPOST('eltva_tx'),1,$object->thirdparty); - $localtax2_tx=get_localtax(GETPOST('eltva_tx'),2,$object->thirdparty); - - // ajout prix d'achat - $fk_fournprice = $_POST['fournprice']; - if ( ! empty($_POST['buying_price']) ) - $pa_ht = $_POST['buying_price']; - else - $pa_ht = null; - - $fk_unit = GETPOST('unit', 'alpha'); - - $objectline->description=GETPOST('product_desc'); - $objectline->price_ht=GETPOST('elprice'); - $objectline->subprice=GETPOST('elprice'); - $objectline->qty=GETPOST('elqty'); - $objectline->remise_percent=GETPOST('elremise_percent'); - $objectline->tva_tx=GETPOST('eltva_tx')?GETPOST('eltva_tx'):0; // Field may be disabled, so we use vat rate 0 - $objectline->localtax1_tx=$localtax1_tx; - $objectline->localtax2_tx=$localtax2_tx; - $objectline->date_ouverture_prevue=$date_start_update; - $objectline->date_ouverture=$date_start_real_update; - $objectline->date_fin_validite=$date_end_update; - $objectline->date_cloture=$date_end_real_update; - $objectline->fk_user_cloture=$user->id; - $objectline->fk_fournprice=$fk_fournprice; - $objectline->pa_ht=$pa_ht; - - if ($fk_unit > 0) { - $objectline->fk_unit = GETPOST('unit'); - } else { - $objectline->fk_unit = null; + setEventMessages($objectline->error, $objectline->errors, 'errors'); } - - // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($objectline->table_element); - $array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef); - $objectline->array_options=$array_options; - - // TODO verifier price_min si fk_product et multiprix - - $result=$objectline->update($user); - if ($result > 0) - { - $db->commit(); - } - else - { - setEventMessage($objectline->error,'errors'); - $db->rollback(); - } - } - else - { - setEventMessage($objectline->error,'errors'); - } -} - -else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer) -{ - $result = $object->deleteline(GETPOST('lineid'),$user); - - if ($result >= 0) - { - header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); - exit; - } - else - { - setEventMessage($object->error,'errors'); - } -} - -else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->contrat->creer) -{ - $result = $object->validate($user); -} - -// Close all lines -else if ($action == 'confirm_close' && $confirm == 'yes' && $user->rights->contrat->creer) -{ - $object->cloture($user); -} - -else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer) -{ - $result=$object->delete($user); - if ($result >= 0) - { - header("Location: index.php"); - return; } - else + + else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer) { - setEventMessage($object->error,'errors'); + $result = $object->deleteline(GETPOST('lineid'),$user); + + if ($result >= 0) + { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + } } -} - -else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer) -{ - if (GETPOST('newcid') > 0) + + else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->contrat->creer) { - $contractline = new ContratLigne($db); - $result=$contractline->fetch(GETPOST('lineid')); - $contractline->fk_contrat = GETPOST('newcid'); - $result=$contractline->update($user,1); + $result = $object->validate($user); + } + + else if ($action == 'reopen' && $user->rights->contrat->creer) + { + $result = $object->reopen($user); + } + + // Close all lines + else if ($action == 'confirm_close' && $confirm == 'yes' && $user->rights->contrat->creer) + { + $object->cloture($user); + } + + else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer) + { + $result=$object->delete($user); if ($result >= 0) { - header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + header("Location: index.php"); return; } else { - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); } } - else + + else if ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentities("RefNewContract")),'errors'); - } -} else if ($action == 'update_extras') { - // Fill array 'array_options' with data from update form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute')); - if ($ret < 0) - $error ++; - - if (! $error) { - - $result = $object->insertExtraFields(); - if ($result < 0) { - $error ++; - } - } else if ($reshook < 0) - $error ++; - - if ($error) { - $action = 'edit_extras'; - setEventMessage($object->error,'errors'); - } -} elseif ($action=='setref_supplier') { - $cancelbutton = GETPOST('cancel'); - - if (!$cancelbutton) { - - $result = $object->fetch($id); - if ($result < 0) { - setEventMessage($object->errors, 'errors'); - } - - $result = $object->setValueFrom('ref_supplier',GETPOST('ref_supplier','alpha')); - if ($result < 0) { - setEventMessage($object->errors, 'errors'); - $action = 'editref_supplier'; - } else { - header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); - exit; - } - } - else { - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id); - exit; - } -} elseif ($action=='setref') { - $cancelbutton = GETPOST('cancel'); - - if (!$cancelbutton) { - $result = $object->fetch($id); - if ($result < 0) { - setEventMessage($object->errors, 'errors'); - } - - $result = $object->setValueFrom('ref',GETPOST('ref','alpha')); - if ($result < 0) { - setEventMessage($object->errors, 'errors'); - $action = 'editref'; - } else { - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); - exit; - } - } - else { - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id); - exit; - } -} - -// Generation doc (depuis lien ou depuis cartouche doc) -else if ($action == 'builddoc' && $user->rights->contrat->creer) { - if (GETPOST('model')) { - $object->setDocModel($user, GETPOST('model')); - } - - // Define output language - $outputlangs = $langs; - if (! empty($conf->global->MAIN_MULTILANGS)) { - $outputlangs = new Translate("", $conf); - $newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang); - $outputlangs->setDefaultLang($newlang); - } - $ret = $object->fetch($id); // Reload to get new records - $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result <= 0) - { - setEventMessages($object->error, $object->errors, 'errors'); - $action=''; - } -} - -// Remove file in doc form -else if ($action == 'remove_file' && $user->rights->contrat->creer) { - if ($object->id > 0) { - require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; - - $langs->load("other"); - $upload_dir = $conf->contrat->dir_output; - $file = $upload_dir . '/' . GETPOST('file'); - $ret = dol_delete_file($file, 0, 0, 0, $object); - if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('file'))); - else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), 'errors'); - } -} - -if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->contrat->creer) -{ - if ($action == 'addcontact') - { - $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); - $result = $object->add_contact($contactid, GETPOST('type'), GETPOST('source')); - - if ($result >= 0) + if (GETPOST('newcid') > 0) { - header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); - exit; - } - else - { - if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') + $contractline = new ContratLigne($db); + $result=$contractline->fetch(GETPOST('lineid')); + $contractline->fk_contrat = GETPOST('newcid'); + $result=$contractline->update($user,1); + if ($result >= 0) { - $langs->load("errors"); - setEventMessage($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"),'errors'); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + return; } else { - setEventMessage($object->error,'errors'); + setEventMessages($object->error, $object->errors, 'errors'); + } + } + else + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("RefNewContract")), null, 'errors'); + } + } + else if ($action == 'update_extras') + { + // Fill array 'array_options' with data from update form + $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); + $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute')); + if ($ret < 0) + $error ++; + + if (! $error) { + + $result = $object->insertExtraFields(); + if ($result < 0) { + $error ++; + } + } else if ($reshook < 0) + $error ++; + + if ($error) { + $action = 'edit_extras'; + setEventMessages($object->error, $object->errors, 'errors'); + } + } + elseif ($action=='setref_supplier') + { + $cancelbutton = GETPOST('cancel'); + if (!$cancelbutton) { + + $result = $object->fetch($id); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + + $result = $object->setValueFrom('ref_supplier',GETPOST('ref_supplier','alpha')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'editref_supplier'; + } else { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } + } + else { + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id); + exit; + } + } + elseif ($action=='setref_customer') + { + $cancelbutton = GETPOST('cancel'); + + if (!$cancelbutton) + { + $result = $object->fetch($id); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + + $result = $object->setValueFrom('ref_customer',GETPOST('ref_customer','alpha')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'editref_customer'; + } else { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } + } + else { + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id); + exit; + } + } + elseif ($action=='setref') + { + $cancelbutton = GETPOST('cancel'); + + if (!$cancelbutton) { + $result = $object->fetch($id); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + + $result = $object->setValueFrom('ref',GETPOST('ref','alpha')); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'editref'; + } else { + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); + exit; + } + } + else { + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id); + exit; + } + } + elseif ($action=='setdate_contrat') + { + $cancelbutton = GETPOST('cancel'); + + if (!$cancelbutton) { + $result = $object->fetch($id); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + $datacontrat=dol_mktime(GETPOST('date_contrathour'), GETPOST('date_contratmin'), 0, GETPOST('date_contratmonth'), GETPOST('date_contratday'), GETPOST('date_contratyear')); + $result = $object->setValueFrom('date_contrat',$datacontrat,'',null,'date'); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'editdate_contrat'; + } else { + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); + exit; + } + } + else { + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id); + exit; + } + } + + // Generation doc (depuis lien ou depuis cartouche doc) + else if ($action == 'builddoc' && $user->rights->contrat->creer) { + if (GETPOST('model')) { + $object->setDocModel($user, GETPOST('model')); + } + + // Define output language + $outputlangs = $langs; + if (! empty($conf->global->MAIN_MULTILANGS)) { + $outputlangs = new Translate("", $conf); + $newlang = (GETPOST('lang_id') ? GETPOST('lang_id') : $object->thirdparty->default_lang); + $outputlangs->setDefaultLang($newlang); + } + $ret = $object->fetch($id); // Reload to get new records + $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($result <= 0) + { + setEventMessages($object->error, $object->errors, 'errors'); + $action=''; + } + } + + // Remove file in doc form + else if ($action == 'remove_file' && $user->rights->contrat->creer) { + if ($object->id > 0) { + require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; + + $langs->load("other"); + $upload_dir = $conf->contrat->dir_output; + $file = $upload_dir . '/' . GETPOST('file'); + $ret = dol_delete_file($file, 0, 0, 0, $object); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors'); + } + } + + if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->contrat->creer) + { + if ($action == 'addcontact') + { + $contactid = (GETPOST('userid') ? GETPOST('userid') : GETPOST('contactid')); + $result = $object->add_contact($contactid, GETPOST('type'), GETPOST('source')); + + if ($result >= 0) + { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } + else + { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') + { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + } + + // bascule du statut d'un contact + else if ($action == 'swapstatut') + { + $result=$object->swapContactStatus(GETPOST('ligne')); + } + + // Efface un contact + else if ($action == 'deletecontact') + { + $result = $object->delete_contact(GETPOST('lineid')); + + if ($result >= 0) + { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } + else { + setEventMessages($object->error, $object->errors, 'errors'); } } } - - // bascule du statut d'un contact - else if ($action == 'swapstatut') - { - $result=$object->swapContactStatus(GETPOST('ligne')); - } - - // Efface un contact - else if ($action == 'deletecontact') - { - $result = $object->delete_contact(GETPOST('lineid')); - - if ($result >= 0) - { - header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); - exit; - } - else { - setEventMessage($object->error,'errors'); - } - } } - /* * View */ @@ -924,7 +990,7 @@ if ($result > 0) *********************************************************************/ if ($action == 'create') { - print_fiche_titre($langs->trans('AddContract'),'','title_commercial.png'); + print load_fiche_titre($langs->trans('AddContract'),'','title_commercial.png'); $soc = new Societe($db); if ($socid>0) $soc->fetch($socid); @@ -995,14 +1061,18 @@ if ($action == 'create') } print '
'.$langs->trans('Ref').''.$tmpcode.'
'.$langs->trans('RefCustomer').'
'.$langs->trans('RefSupplier').'
'.$langs->trans('Customer').''.$langs->trans('ThirdParty').''; print $soc->getNomUrl(1); @@ -1012,7 +1082,7 @@ if ($action == 'create') else { print ''; - print $form->select_company('','socid','s.client = 1 OR s.client = 3',1); + print $form->select_company('','socid','',1,1); print '
'.$langs->trans("Project").''; - $formproject->select_projects($soc->id,$projectid,"projectid"); + $formproject->select_projects(($soc->id>0?$soc->id:-1),$projectid,"projectid",0,0,1,1); print "
'; + print $form->editfieldkey("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); + print ''; + print $form->editfieldval("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); + print '
'; print $form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); print ''; @@ -1229,8 +1308,15 @@ else print "
'.$langs->trans("Date").''.dol_print_date($object->date_contrat,"dayhour")."
'; + print $form->editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer); + print ''; + print $form->editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker'); + print '
'.$langs->trans("Date").''.dol_print_date($object->date_contrat,"dayhour")."
'; if ($action == "classify") { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,"projectid", 0, 0, 1); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, "projectid", 1, 0, 1); } else { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id,$object->socid,$object->fk_project,"none", 0, 0); + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, "none", 0, 0); } print "
'; if ($user->rights->contrat->creer && count($arrayothercontracts) && ($object->statut >= 0)) { - print ''; + print ''; print img_picto($langs->trans("MoveToAnotherContract"),'uparrow'); print ''; } - else { - print ' '; - } if ($user->rights->contrat->creer && ($object->statut >= 0)) { - print ''; + print ''; print img_edit(); print ''; } - else { - print ' '; - } if ( $user->rights->contrat->creer && ($object->statut >= 0)) { - print ' '; - print ''; + print ''; print img_delete(); print ''; } @@ -1523,13 +1602,14 @@ else if ($objp->fk_product) print ''; print ''; + print ''; + print ''; print '
'; print '
'.$langs->trans("DateServiceActivate").''; + print '
'.$langs->trans("DateServiceActivate").''; print $form->select_date($dateactstart,'',$usehm,$usehm,'',"active",1,0,1); print ''.$langs->trans("DateEndPlanned").''; + print ''.$langs->trans("DateEndPlanned").''; print $form->select_date($dateactend,"end",$usehm,$usehm,'',"active",1,0,1); print ''; + print ''; print '
'; print ''; print '
'.$langs->trans("Comment").'
'.$langs->trans("Comment").'
'; @@ -1756,7 +1839,7 @@ else $now=dol_now(); if ($dateactend > $now) $dateactend=$now; - print ''; + print ''; if ($objp->statut >= 4) { if ($objp->statut == 4) @@ -1767,11 +1850,12 @@ else } print ''; - print '
'; + print ''; + print '
'; print ''; print ''; - print ''.$langs->trans("Comment").''; + print ''.$langs->trans("Comment").''; print ''; print ''; @@ -1839,7 +1923,12 @@ else if ($user->rights->contrat->creer) print ''; else print ''; } - + if ($object->statut == 1 && $nbofservices) + { + if ($user->rights->contrat->creer) print ''; + else print ''; + } + if (! empty($conf->facture->enabled) && $object->statut > 0 && $object->nbofservicesclosed < $nbofservices) { $langs->load("bills"); @@ -1899,6 +1988,12 @@ else print '
'; + // List of actions on element + include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, 'contract', $socid); + + print '
'; } } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index e4953c99853..9e8b1de5d07 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -8,6 +8,7 @@ * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2015 Marcos García + * Copyright (C) 2015 Ferran Marcet * * 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 @@ -51,24 +52,11 @@ class Contrat extends CommonObject protected $table_ref_field = 'ref'; /** - * Id of the contract - * @var int - */ - var $id; - - /** - * Reference of the contract + * Customer reference of the contract * @var string */ - var $ref; - - /** - * External reference of the contract. - * Used by 3rd party services - * @var string - */ - var $ref_ext; - + var $ref_customer; + /** * Supplier reference of the contract * @var string @@ -140,26 +128,12 @@ class Contrat extends CommonObject var $commercial_signature_id; var $commercial_suivi_id; - /** - * @var string Private note - */ - var $note_private; - - /** - * @var string Public note - */ - var $note_public; - - var $modelpdf; - /** * @deprecated Use fk_project instead * @see fk_project */ var $fk_projet; - public $fk_project; - var $extraparams=array(); /** @@ -498,7 +472,71 @@ class Contrat extends CommonObject } + /** + * Unvalidate a contract + * + * @param User $user Objet User + * @param int $notrigger 1=Does not execute triggers, 0=execute triggers + * @return int <0 if KO, >0 if OK + */ + function reopen($user, $notrigger=0) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + global $langs, $conf; + $now=dol_now(); + + $error=0; + dol_syslog(get_class($this).'::reopen user='.$user->id); + + $this->db->begin(); + + $this->fetch_thirdparty(); + + $sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET statut = 0"; + //$sql.= ", fk_user_valid = null, date_valid = null"; + $sql .= " WHERE rowid = ".$this->id . " AND statut = 1"; + + dol_syslog(get_class($this)."::validate", LOG_DEBUG); + $resql = $this->db->query($sql); + if (! $resql) + { + dol_print_error($this->db); + $error++; + $this->error=$this->db->lasterror(); + } + + // Trigger calls + if (! $error && ! $notrigger) + { + // Call trigger + $result=$this->call_trigger('CONTRACT_REOPEN',$user); + if ($result < 0) { + $error++; + } + // End call triggers + } + + // Set new ref and define current statut + if (! $error) + { + $this->statut=0; + $this->brouillon=1; + $this->date_validation=$now; + } + + if (! $error) + { + $this->db->commit(); + return 1; + } + else + { + $this->db->rollback(); + return -1; + } + } + /** * Load a contract from database * @@ -509,13 +547,13 @@ class Contrat extends CommonObject function fetch($id,$ref='') { $sql = "SELECT rowid, statut, ref, fk_soc, mise_en_service as datemise,"; + $sql.= " ref_supplier, ref_customer,"; + $sql.= " ref_ext,"; $sql.= " fk_user_mise_en_service, date_contrat as datecontrat,"; $sql.= " fk_user_author,"; $sql.= " fk_projet,"; $sql.= " fk_commercial_signature, fk_commercial_suivi,"; $sql.= " note_private, note_public, model_pdf, extraparams"; - $sql.= " ,ref_supplier"; - $sql.= " ,ref_ext"; $sql.= " FROM ".MAIN_DB_PREFIX."contrat"; if ($ref) { @@ -534,6 +572,7 @@ class Contrat extends CommonObject { $this->id = $result["rowid"]; $this->ref = (!isset($result["ref"]) || !$result["ref"]) ? $result["rowid"] : $result["ref"]; + $this->ref_customer = $result["ref_customer"]; $this->ref_supplier = $result["ref_supplier"]; $this->ref_ext = $result["ref_ext"]; $this->statut = $result["statut"]; @@ -872,7 +911,7 @@ class Contrat extends CommonObject // Insert contract $sql = "INSERT INTO ".MAIN_DB_PREFIX."contrat (datec, fk_soc, fk_user_author, date_contrat,"; $sql.= " fk_commercial_signature, fk_commercial_suivi, fk_projet,"; - $sql.= " ref, entity, note_private, note_public, ref_supplier, ref_ext)"; + $sql.= " ref, entity, note_private, note_public, ref_customer, ref_supplier, ref_ext)"; $sql.= " VALUES ('".$this->db->idate($now)."',".$this->socid.",".$user->id; $sql.= ", '".$this->db->idate($this->date_contrat)."'"; $sql.= ",".($this->commercial_signature_id>0?$this->commercial_signature_id:"NULL"); @@ -882,6 +921,7 @@ class Contrat extends CommonObject $sql.= ", ".$conf->entity; $sql.= ", ".(!empty($this->note_private)?("'".$this->db->escape($this->note_private)."'"):"NULL"); $sql.= ", ".(!empty($this->note_public)?("'".$this->db->escape($this->note_public)."'"):"NULL"); + $sql.= ", ".(!empty($this->ref_customer)?("'".$this->db->escape($this->ref_customer)."'"):"NULL"); $sql.= ", ".(!empty($this->ref_supplier)?("'".$this->db->escape($this->ref_supplier)."'"):"NULL"); $sql.= ", ".(!empty($this->ref_ext)?("'".$this->db->escape($this->ref_ext)."'"):"NULL"); $sql.= ")"; @@ -1014,6 +1054,13 @@ class Contrat extends CommonObject } } + if (! $error) + { + // Delete linked object + $res = $this->deleteObjectLinked(); + if ($res < 0) $error++; + } + if (! $error) { // Delete contratdet_log @@ -1134,6 +1181,7 @@ class Contrat extends CommonObject // Clean parameters if (isset($this->ref)) $this->ref=trim($this->ref); + if (isset($this->ref_customer)) $this->ref_customer=trim($this->ref_customer); if (isset($this->ref_supplier)) $this->ref_supplier=trim($this->ref_supplier); if (isset($this->ref_ext)) $this->ref_ext=trim($this->ref_ext); if (isset($this->entity)) $this->entity=trim($this->entity); @@ -1158,6 +1206,7 @@ class Contrat extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET"; $sql.= " ref=".(isset($this->ref)?"'".$this->db->escape($this->ref)."'":"null").","; + $sql.= " ref_customer=".(isset($this->ref_customer)?"'".$this->db->escape($this->ref_customer)."'":"null").","; $sql.= " ref_supplier=".(isset($this->ref_supplier)?"'".$this->db->escape($this->ref_supplier)."'":"null").","; $sql.= " ref_ext=".(isset($this->ref_ext)?"'".$this->db->escape($this->ref_ext)."'":"null").","; $sql.= " entity=".$conf->entity.","; @@ -1283,7 +1332,8 @@ class Contrat extends CommonObject // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. $localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc); - + $txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate. + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,$mysoc, $localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; @@ -1306,10 +1356,18 @@ class Contrat extends CommonObject if (empty($pa_ht)) $pa_ht=0; - // si prix d'achat non renseigne et utilise pour calcul des marges alors prix achat = prix vente - if ($pa_ht == 0) { - if ($pu_ht > 0 && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) - $pa_ht = $pu_ht * (1 - $remise_percent / 100); + + // if buy price not defined, define buyprice as configured in margin admin + if ($this->pa_ht == 0) + { + if (($result = $this->defineBuyPrice($pu_ht, $remise_percent, $fk_product)) < 0) + { + return $result; + } + else + { + $pa_ht = $result; + } } // Insertion dans la base @@ -1365,7 +1423,7 @@ class Contrat extends CommonObject if (empty($error)) { // Call trigger - $result=$this->call_trigger('LINECONTRACT_CREATE',$user); + $result=$this->call_trigger('LINECONTRACT_INSERT',$user); if ($result < 0) { $this->db->rollback(); @@ -1456,7 +1514,8 @@ class Contrat extends CommonObject // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. $localtaxes_type=getLocalTaxesFromRate($tvatx, 0, $this->societe, $mysoc); - + $txtva = preg_replace('/\s*\(.*\)/','',$txtva); // Remove code into vatrate. + $tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtax1tx, $localtax2tx, 0, $price_base_type, $info_bits, 1, $mysoc, $localtaxes_type); $total_ht = $tabprice[0]; $total_tva = $tabprice[1]; @@ -1479,10 +1538,17 @@ class Contrat extends CommonObject if (empty($pa_ht)) $pa_ht=0; - // si prix d'achat non renseigne et utilise pour calcul des marges alors prix achat = prix vente - if ($pa_ht == 0) { - if ($pu > 0 && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) - $pa_ht = $pu * (1 - $remise_percent / 100); + // if buy price not defined, define buyprice as configured in margin admin + if ($this->pa_ht == 0) + { + if (($result = $this->defineBuyPrice($pu_ht, $remise_percent)) < 0) + { + return $result; + } + else + { + $pa_ht = $result; + } } $sql = "UPDATE ".MAIN_DB_PREFIX."contratdet set description='".$this->db->escape($desc)."'"; @@ -1887,7 +1953,7 @@ class Contrat extends CommonObject */ function load_board($user,$mode) { - global $conf, $user, $langs; + global $conf, $langs; $this->from = " FROM ".MAIN_DB_PREFIX."contrat as c"; $this->from.= ", ".MAIN_DB_PREFIX."contratdet as cd"; @@ -2057,6 +2123,8 @@ class Contrat extends CommonObject $this->specimen=1; $this->ref = 'SPECIMEN'; + $this->ref_customer = 'SPECIMENCUST'; + $this->ref_supplier = 'SPECIMENSUPP'; $this->socid = 1; $this->statut= 0; $this->date_contrat = dol_now(); @@ -2502,12 +2570,20 @@ class ContratLigne extends CommonObjectLine if (empty($this->pa_ht)) $this->pa_ht=0; - // si prix d'achat non renseigné et utilisé pour calcul des marges alors prix achat = prix vente - if ($this->pa_ht == 0) { - if ($this->subprice > 0 && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) - $this->pa_ht = $this->subprice * (1 - $this->remise_percent / 100); + // if buy price not defined, define buyprice as configured in margin admin + if ($this->pa_ht == 0) + { + if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) + { + return $result; + } + else + { + $this->pa_ht = $result; + } } + $this->db->begin(); // Update request @@ -2679,7 +2755,7 @@ class ContratLigne extends CommonObjectLine if (!$notrigger) { // Call trigger - $result = $this->call_trigger('LINECONTRACT_CREATE', $user); + $result = $this->call_trigger('LINECONTRACT_INSERT', $user); if ($result < 0) { $this->db->rollback(); return -1; diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index 1528e472cbe..cd070f6078d 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -74,7 +74,7 @@ if ($action == 'addcontact' && $user->rights->contrat->creer) $mesg = $object->error; } - setEventMessage($mesg, 'errors'); + setEventMessages($mesg, null, 'errors'); } } diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index b9297d41c73..f962a9e82ae 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -64,7 +64,7 @@ $now = dol_now(); llxHeader(); -print_fiche_titre($langs->trans("ContractsArea"),'','title_commercial.png'); +print load_fiche_titre($langs->trans("ContractsArea"),'','title_commercial.png'); //print ''; @@ -79,12 +79,10 @@ if (! empty($conf->contrat->enabled)) print ''; print ''; print '
'; - print ''; + print ''; print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; print "
'.$langs->trans("SearchAContract").'
'.$langs->trans("Search").'
'.$langs->trans("Ref").':
'.$langs->trans("Other").':
'.$langs->trans("Contract").':
\n"; print "
"; } diff --git a/htdocs/contrat/info.php b/htdocs/contrat/info.php index 53af58a2415..2067247dbf6 100644 --- a/htdocs/contrat/info.php +++ b/htdocs/contrat/info.php @@ -55,6 +55,5 @@ print ''; print ''; -$db->close(); - llxFooter(); +$db->close(); diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 669f2b09775..b374e7d59b9 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -1,11 +1,11 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Claudio Aschieri - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Claudio Aschieri + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -36,24 +36,28 @@ $langs->load("products"); $langs->load("companies"); $langs->load("compta"); -$sortfield=GETPOST('sortfield','alpha'); -$sortorder=GETPOST('sortorder','alpha'); -$page=GETPOST('page','int'); -if ($page == -1) { $page = 0 ; } -$limit = $conf->liste_limit; -$offset = $limit * $page ; - $search_name=GETPOST('search_name'); $search_contract=GETPOST('search_contract'); $search_ref_supplier=GETPOST('search_ref_supplier','alpha'); $sall=GETPOST('sall'); $search_status=GETPOST('search_status'); $socid=GETPOST('socid'); +$search_user=GETPOST('search_user','int'); +$search_sale=GETPOST('search_sale','int'); +$search_product_category=GETPOST('search_product_category','int'); -$search_sale = GETPOST('search_sale','int'); +$optioncss = GETPOST('optioncss','alpha'); -if (! $sortfield) $sortfield="c.rowid"; -if (! $sortorder) $sortorder="DESC"; +$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit; +$sortfield = GETPOST("sortfield",'alpha'); +$sortorder = GETPOST("sortorder",'alpha'); +$page = GETPOST("page",'int'); +if ($page == -1) { $page = 0; } +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (! $sortfield) $sortfield='c.ref'; +if (! $sortorder) $sortorder='DESC'; // Security check $id=GETPOST('id','int'); @@ -68,26 +72,40 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_name=""; $search_contract=""; $search_ref_supplier=""; - $search_sale=""; + $search_user=''; + $search_sale=''; + $search_product_category=''; $sall=""; $search_status=""; } if ($search_status == '') $search_status=1; +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'c.ref'=>'Ref', + 'c.ref_customer'=>'RefCustomer', + 'c.ref_supplier'=>'RefSupplier', + 's.nom'=>"ThirdParty", + 'cd.description'=>'Description', + 'c.note_public'=>'NotePublic', +); +if (empty($user->socid)) $fieldstosearchall["c.note_private"]="NotePrivate"; + /* * View */ $now=dol_now(); +$form=new Form($db); $formother = new FormOther($db); $socstatic = new Societe($db); llxHeader(); $sql = 'SELECT'; -$sql.= " c.rowid as cid, c.ref, c.datec, c.date_contrat, c.statut, c.ref_supplier,"; +$sql.= " c.rowid as cid, c.ref, c.datec, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier,"; $sql.= " s.nom as name, s.rowid as socid,"; $sql.= ' SUM('.$db->ifsql("cd.statut=0",1,0).') as nb_initial,'; $sql.= ' SUM('.$db->ifsql("cd.statut=4 AND (cd.date_fin_validite IS NULL OR cd.date_fin_validite >= '".$db->idate($now)."')",1,0).') as nb_running,'; @@ -98,8 +116,15 @@ $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if ($search_sale > 0 || (! $user->rights->societe->client->voir && ! $socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ", ".MAIN_DB_PREFIX."contrat as c"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat"; +if ($search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=cd.fk_product'; +if ($search_user > 0) +{ + $sql.=", ".MAIN_DB_PREFIX."element_contact as ec"; + $sql.=", ".MAIN_DB_PREFIX."c_type_contact as tc"; +} $sql.= " WHERE c.fk_soc = s.rowid "; -$sql.= " AND c.entity = ".$conf->entity; +$sql.= ' AND c.entity IN ('.getEntity('contract', 1).')'; +if ($search_product_category > 0) $sql.=" AND cp.fk_categorie = ".$search_product_category; if ($socid) $sql.= " AND s.rowid = ".$db->escape($socid); if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; @@ -112,18 +137,31 @@ if ($search_contract) { if (!empty($search_ref_supplier)) { $sql .= natural_search(array('c.ref_supplier'), $search_ref_supplier); } - if ($search_sale > 0) { $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale; } - if ($sall) { - $sql .= natural_search(array('s.nom', 'cd.label', 'cd.description'), $sall); + $sql .= natural_search(array_keys($fieldstosearchall), $sall); } +if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='contrat' AND tc.source='internal' AND ec.element_id = c.rowid AND ec.fk_socpeople = ".$search_user; $sql.= " GROUP BY c.rowid, c.ref, c.datec, c.date_contrat, c.statut, c.ref_supplier, s.nom, s.rowid"; +$totalnboflines=0; +$result=$db->query($sql); +if ($result) +{ + $totalnboflines = $db->num_rows($result); +} $sql.= $db->order($sortfield,$sortorder); -$sql.= $db->plimit($conf->liste_limit + 1, $offset); + +$nbtotalofrecords = 0; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); +} + +$sql.= $db->plimit($limit + 1, $offset); $resql=$db->query($sql); if ($resql) @@ -131,47 +169,85 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], '&search_contract='.$search_contract.'&search_name='.$search_name, $sortfield, $sortorder,'',$num,$totalnboflines,'title_commercial.png'); - + $param=''; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + $param.='&search_contract='.$search_contract; + $param.='&search_name='.$search_name; + $param.='&search_ref_supplier='.$search_ref_supplier; + $param.='&search_sale=' .$search_sale; + if ($optioncss != '') $param.='&optioncss='.$optioncss; + print '
'; - print ''; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + print_barre_liste($langs->trans("ListOfContracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num,$totalnboflines,'title_commercial.png', 0, '', '', $limit); + + if ($sall) + { + foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); + print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall); + } + // If the user can view prospects other than his' $moreforfilter=''; if ($user->rights->societe->client->voir || $socid) { $langs->load("commercial"); + $moreforfilter.='
'; $moreforfilter.=$langs->trans('ThirdPartiesOfSaleRepresentative'). ': '; - $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user); - $moreforfilter.='       '; + $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user,0,1,'maxwidth300'); + $moreforfilter.='
'; } - - if ($moreforfilter) + // If the user can view other users + if ($user->rights->user->user->lire) + { + $moreforfilter.='
'; + $moreforfilter.=$langs->trans('LinkedToSpecificUsers'). ': '; + $moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + $moreforfilter.='
'; + } + // If the user can view categories of products + if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) + { + include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + $moreforfilter.='
'; + $moreforfilter.=$langs->trans('IncludingProductWithTag'). ': '; + $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1); + $moreforfilter.=$form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, '', 1); + $moreforfilter.='
'; + } + + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook + if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint; + else $moreforfilter = $hookmanager->resPrint; + if (! empty($moreforfilter)) { - print ''; - print ''; + print '
'; + print $moreforfilter; + print '
'; } + print '
'; - print $moreforfilter; - print '
'; print ''; - $param='&search_contract='.$search_contract; - $param.='&search_name='.$search_name; - $param.='&search_ref_supplier='.$search_ref_supplier; - $param.='&search_sale=' .$search_sale; - - print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.rowid","","$param",'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("RefCustomer"), $_SERVER["PHP_SELF"], "c.ref_supplier","","$param",'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Company"), $_SERVER["PHP_SELF"], "s.nom","","$param",'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "c.ref","","$param",'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("RefCustomer"), $_SERVER["PHP_SELF"], "c.ref_customer","","$param",'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("RefSupplier"), $_SERVER["PHP_SELF"], "c.ref_supplier","","$param",'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("ThirdParty"), $_SERVER["PHP_SELF"], "s.nom","","$param",'',$sortfield,$sortorder); print_liste_field_titre($langs->trans("SalesRepresentative"), $_SERVER["PHP_SELF"], "","","$param",'',$sortfield,$sortorder); //print_liste_field_titre($langs->trans("DateCreation"), $_SERVER["PHP_SELF"], "c.datec","","$param",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateContract"), $_SERVER["PHP_SELF"], "c.date_contrat","","$param",'align="center"',$sortfield,$sortorder); //print_liste_field_titre($langs->trans("Status"), $_SERVER["PHP_SELF"], "c.statut","","$param",'align="center"',$sortfield,$sortorder); - print ''; - print ''; - print ''; - print ''; + print_liste_field_titre($staticcontratligne->LibStatut(0,3), '', '', '', '', 'width="16"'); + print_liste_field_titre($staticcontratligne->LibStatut(4,3,0), '', '', '', '', 'width="16"'); + print_liste_field_titre($staticcontratligne->LibStatut(4,3,1), '', '', '', '', 'width="16"'); + print_liste_field_titre($staticcontratligne->LibStatut(5,3), '', '', '', '', 'width="16"'); + print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; print ''; @@ -180,16 +256,21 @@ if ($resql) print ''; print ''; print ''; print ''; + print ''; print ''; - //print ''; - print '\n"; + print ''; + print ''; + print "\n"; $var=true; while ($i < min($num,$limit)) @@ -201,6 +282,7 @@ if ($resql) print img_object($langs->trans("ShowContract"),"contract").' '.(isset($obj->ref) ? $obj->ref : $obj->cid) .''; if ($obj->nb_late) print img_warning($langs->trans("Late")); print ''; + print ''; print ''; print ''; //print ''; @@ -227,9 +309,10 @@ if ($resql) $userstatic->id=$val['id']; $userstatic->lastname=$val['lastname']; $userstatic->firstname=$val['firstname']; - print $userstatic->getNomUrl(1); + print '
'.$userstatic->getNomUrl(1); $j++; - if ($j < $nbofsalesrepresentative) print '
'; + if ($j < $nbofsalesrepresentative) print ', '; + print '
'; } } else print $langs->trans("NoSalesRepresentativeAffected"); @@ -247,6 +330,7 @@ if ($resql) print ''; print ''; print ''; + print ''; print "\n"; $i++; } diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index fdc130b010e..2f1c3697058 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Jean-François Ferry * @@ -38,7 +38,7 @@ $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $page = GETPOST("page",'int'); if ($page == -1) { $page = 0 ; } -$limit = $conf->liste_limit; +$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; $offset = $limit * $page ; if (! $sortfield) $sortfield="c.rowid"; @@ -48,6 +48,7 @@ $filter=GETPOST("filter"); $search_name=GETPOST("search_name"); $search_contract=GETPOST("search_contract"); $search_service=GETPOST("search_service"); +$search_status=GETPOST("search_status","alpha"); $statut=GETPOST('statut')?GETPOST('statut'):1; $socid=GETPOST('socid','int'); @@ -65,6 +66,23 @@ $contratid = GETPOST('id','int'); if (! empty($user->societe_id)) $socid=$user->societe_id; $result = restrictedArea($user, 'contrat',$contratid); +if ($search_status != '') +{ + $tmp=explode('&', $search_status); + $mode=$tmp[0]; + if (empty($tmp[1])) $filter=''; + else + { + if ($tmp[1] == 'filter=notexpired') $filter='notexpired'; + if ($tmp[1] == 'filter=expired') $filter='expired'; + } +} +else +{ + $search_status = $mode; + if ($filter == 'expired') $search_status.='&filter=expired'; + if ($filter == 'notexpired') $search_status.='&filter=notexpired'; +} $staticcontrat=new Contrat($db); $staticcontratligne=new ContratLigne($db); @@ -75,6 +93,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_name=""; $search_contract=""; $search_service=""; + $search_status=-1; $op1month=""; $op1day=""; $op1year=""; @@ -83,6 +102,8 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $op2day=""; $op2year=""; $filter_op2=""; + $mode=''; + $filter=''; } /* @@ -117,6 +138,7 @@ if ($mode == "0") $sql.= " AND cd.statut = 0"; if ($mode == "4") $sql.= " AND cd.statut = 4"; if ($mode == "5") $sql.= " AND cd.statut = 5"; if ($filter == "expired") $sql.= " AND cd.date_fin_validite < '".$db->idate($now)."'"; +if ($filter == "notexpired") $sql.= " AND cd.date_fin_validite >= '".$db->idate($now)."'"; if ($search_name) $sql.= " AND s.nom LIKE '%".$db->escape($search_name)."%'"; if ($search_contract) $sql.= " AND c.rowid = '".$db->escape($search_contract)."'"; if ($search_service) $sql.= " AND (p.ref LIKE '%".$db->escape($search_service)."%' OR p.description LIKE '%".$db->escape($search_service)."%' OR cd.description LIKE '%".$db->escape($search_service)."%')"; @@ -125,6 +147,12 @@ $filter_date1=dol_mktime(0,0,0,$op1month,$op1day,$op1year); $filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year); if (! empty($filter_op1) && $filter_op1 != -1 && $filter_date1 != '') $sql.= " AND date_ouverture_prevue ".$filter_op1." '".$db->idate($filter_date1)."'"; if (! empty($filter_op2) && $filter_op2 != -1 && $filter_date2 != '') $sql.= " AND date_fin_validite ".$filter_op2." '".$db->idate($filter_date2)."'"; +$totalnboflines=0; +$result=$db->query($sql); +if ($result) +{ + $totalnboflines = $db->num_rows($result); +} $sql .= $db->order($sortfield,$sortorder); $sql .= $db->plimit($limit + 1, $offset); @@ -169,6 +197,7 @@ if ($resql) if ($mode == "" || $mode < 5) print_liste_field_titre($langs->trans("DateEndPlannedShort"),$_SERVER["PHP_SELF"], "cd.date_fin_validite",$param,'',' align="center"',$sortfield,$sortorder); else print_liste_field_titre($langs->trans("DateEndRealShort"),$_SERVER["PHP_SELF"], "cd.date_cloture",$param,'',' align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"], "cd.statut,c.statut",$param,"","align=\"right\"",$sortfield,$sortorder); + print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; print ''; @@ -179,11 +208,11 @@ if ($resql) print ''; // Service label print ''; // Third party print ''; print ''; - print '\n"; + print ''; + print ''; + print "\n"; $contractstatic=new Contrat($db); $productstatic=new Product($db); @@ -272,6 +313,7 @@ if ($resql) print $staticcontratligne->LibStatut($obj->statut,5,($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < $now)?1:0); } print ''; + print ''; print "\n"; $i++; } @@ -286,6 +328,6 @@ else } -$db->close(); - llxFooter(); + +$db->close(); diff --git a/htdocs/contrat/tpl/linkedobjectblock.tpl.php b/htdocs/contrat/tpl/linkedobjectblock.tpl.php index 4daf5deef02..c5e4dd92a05 100644 --- a/htdocs/contrat/tpl/linkedobjectblock.tpl.php +++ b/htdocs/contrat/tpl/linkedobjectblock.tpl.php @@ -26,7 +26,7 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("contracts"); echo '
'; -print_titre($langs->trans('RelatedContracts')); +print load_fiche_titre($langs->trans('RelatedContracts'), '', ''); ?>
'.$staticcontratligne->LibStatut(0,3).''.$staticcontratligne->LibStatut(4,3,0).''.$staticcontratligne->LibStatut(4,3,1).''.$staticcontratligne->LibStatut(5,3).'
'; - print ''; + print ''; print ''; - print ''; + print ''; + print ''; + print ''; print '  '; - print ''; - print "
'; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print '
'.$obj->ref_customer.''.$obj->ref_supplier.''.img_object($langs->trans("ShowCompany"),"company").' '.$obj->name.''.dol_print_date($obj->datec).''.($obj->nb_running>0?$obj->nb_running:'').''.($obj->nb_expired>0?$obj->nb_expired:'').''.($obj->nb_closed>0 ?$obj->nb_closed:'').'
'; - print ''; + print ''; print ''; - print ''; + print ''; print ''; $arrayofoperators=array('<'=>'<','>'=>'>'); @@ -199,9 +228,21 @@ if ($resql) $filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year); print $form->select_date($filter_date2,'op2',0,0,1,'',1,0,1); print ''; - print ''; - print "
'; + $arrayofstatus=array( + '0'=>$langs->trans("ServiceStatusInitial"), + '4'=>$langs->trans("ServiceStatusRunning"), + '4&filter=notexpired'=>$langs->trans("ServiceStatusNotLate"), + '4&filter=expired'=>$langs->trans("ServiceStatusLate"), + '5'=>$langs->trans("ServiceStatusClosed") + ); + print $form->selectarray('search_status',$arrayofstatus,(strstr($search_status, ',')?-1:$search_status),1); + print ''; + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + print '
diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php new file mode 100644 index 00000000000..29ae4eb3365 --- /dev/null +++ b/htdocs/core/actions_builddoc.inc.php @@ -0,0 +1,108 @@ + + * + * 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 3 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, see . + * or see http://www.gnu.org/ + */ + +/** + * \file htdocs/core/actions_builddoc.inc.php + * \brief Code for actions on building or deleting documents + */ + + +// $action must be defined +// $id must be defined +// $object must be defined and must have a method generateDocument. +// $permissioncreate must be defined +// $upload_dir must be defined (example $conf->projet->dir_output . "/";) +// $hidedetails, $hidedesc and $hideref may have been set or not. + + +// Build doc +if ($action == 'builddoc' && $permissioncreate) +{ + if (is_numeric(GETPOST('model'))) + { + $error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Model")); + } + else + { + // Reload to get all modified line records and be ready for hooks + $ret = $object->fetch($id); + $ret = $object->fetch_thirdparty(); + /*if (empty($object->id) || ! $object->id > 0) + { + dol_print_error('Object must have been loaded by a fetch'); + exit; + }*/ + + // Save last template used to generate document + if (GETPOST('model')) $object->setDocModel($user, GETPOST('model','alpha')); + + // Special case for invoices + if (property_exists($object, 'fk_bank')) + { + if (GETPOST('fk_bank')) { // this field may come from an external module + $object->fk_bank = GETPOST('fk_bank'); + } else { + $object->fk_bank = $object->fk_account; + } + } + + $outputlangs = $langs; + $newlang=''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang=GETPOST('lang_id'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($object->client->default_lang)) $newlang=$object->client->default_lang; // for proposal, order, invoice, ... + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($object->default_lang)) $newlang=$object->default_lang; // for thirdparty + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + + // To be sure vars is defined + if (empty($hidedetails)) $hidedetails=0; + if (empty($hidedesc)) $hidedesc=0; + if (empty($hideref)) $hideref=0; + + $result= $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($result <= 0) + { + setEventMessages($object->error, $object->errors, 'errors'); + $action=''; + } + } +} + +// Delete file in doc form +if ($action == 'remove_file' && $permissioncreate) +{ + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + if (empty($object->id) || ! $object->id > 0) + { + // Reload to get all modified line records and be ready for hooks + $ret = $object->fetch($id); + $ret = $object->fetch_thirdparty(); + } + + $langs->load("other"); + $filetodelete=GETPOST('file','alpha'); + $file = $upload_dir . '/' . $filetodelete; + $ret=dol_delete_file($file,0,0,0,$object); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", $filetodelete), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", $filetodelete), null, 'errors'); +} + diff --git a/htdocs/core/actions_changeselectedfields.inc.php b/htdocs/core/actions_changeselectedfields.inc.php new file mode 100644 index 00000000000..11884f81224 --- /dev/null +++ b/htdocs/core/actions_changeselectedfields.inc.php @@ -0,0 +1,48 @@ + + * + * 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 3 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, see . + * or see http://www.gnu.org/ + */ + +/** + * \file htdocs/core/actions_changeselectedfields.inc.php + * \brief Code for actions when we change list of fields on a list page + */ + + +// $action must be defined +// $db must be defined +// $conf must be defined +// $object must be defined (object is loaded in this file with fetch) + +// Save selection +if (GETPOST('formfilteraction') == 'listafterchangingselectedfields') +{ + $tabparam=array(); + + $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; + + if (GETPOST("selectedfields")) $tabparam["MAIN_SELECTEDFIELDS_".$varpage]=GETPOST("selectedfields"); + else $tabparam["MAIN_SELECTEDFIELDS_".$varpage]=''; + + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + + $result=dol_set_user_param($db, $conf, $user, $tabparam); + + //$action='list'; + //var_dump($tabparam);exit; +} + + diff --git a/htdocs/core/actions_dellink.inc.php b/htdocs/core/actions_dellink.inc.php index 1ba98a8435a..45fb8c5f9ec 100644 --- a/htdocs/core/actions_dellink.inc.php +++ b/htdocs/core/actions_dellink.inc.php @@ -25,6 +25,7 @@ // $action must be defined // $object must be defined // $permissiondellink must be defined +// $uploaddir (example $conf->projet->dir_output . "/";) $dellinkid = GETPOST('dellinkid','int'); @@ -34,3 +35,5 @@ if ($action == 'dellink' && ! empty($permissiondellink) && ! GETPOST('cancel') & $result=$object->deleteObjectLinked(0, '', 0, '', $dellinkid); if ($result < 0) setEventMessages($object->error,$object->errors,'errors'); } + + diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index 8ac95358bb8..f31e2c184d8 100644 --- a/htdocs/core/actions_extrafields.inc.php +++ b/htdocs/core/actions_extrafields.inc.php @@ -161,11 +161,12 @@ if ($action == 'add') $params, (GETPOST('alwayseditable')?1:0), (GETPOST('perms')?GETPOST('perms'):''), - (GETPOST('list')?1:0) + (GETPOST('list')?1:0), + (GETPOST('ishidden')?1:0) ); if ($result > 0) { - setEventMessage($langs->trans('SetupSaved')); + setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]); exit; } @@ -173,7 +174,7 @@ if ($action == 'add') { $error++; $mesg=$extrafields->error; - setEventMessage($mesg,'errors'); + setEventMessages($mesg, null, 'errors'); } } else @@ -181,13 +182,13 @@ if ($action == 'add') $error++; $langs->load("errors"); $mesg=$langs->trans("ErrorFieldCanNotContainSpecialNorUpperCharacters",$langs->transnoentities("AttributeCode")); - setEventMessage($mesg,'errors'); + setEventMessages($mesg, null, 'errors'); $action = 'create'; } } else { - setEventMessage($mesg,'errors'); + setEventMessages($mesg, null, 'errors'); } } } @@ -311,11 +312,12 @@ if ($action == 'update') $params, (GETPOST('alwayseditable')?1:0), (GETPOST('perms')?GETPOST('perms'):''), - (GETPOST('list')?1:0) + (GETPOST('list')?1:0), + (GETPOST('ishidden')?1:0) ); if ($result > 0) { - setEventMessage($langs->trans('SetupSaved')); + setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]); exit; } @@ -323,7 +325,7 @@ if ($action == 'update') { $error++; $mesg=$extrafields->error; - setEventMessage($mesg,'errors'); + setEventMessages($mesg, null, 'errors'); } } else @@ -331,12 +333,12 @@ if ($action == 'update') $error++; $langs->load("errors"); $mesg=$langs->trans("ErrorFieldCanNotContainSpecialCharacters",$langs->transnoentities("AttributeCode")); - setEventMessage($mesg,'errors'); + setEventMessages($mesg, null, 'errors'); } } else { - setEventMessage($mesg,'errors'); + setEventMessages($mesg, null, 'errors'); } } } diff --git a/htdocs/core/actions_printing.inc.php b/htdocs/core/actions_printing.inc.php index 431ac89a94e..5f04e42cc9b 100644 --- a/htdocs/core/actions_printing.inc.php +++ b/htdocs/core/actions_printing.inc.php @@ -46,19 +46,27 @@ if ($action == 'print_file' and $user->rights->printing->read) if (! empty($conf->global->{$printer->active})) { $subdir=(GETPOST('printer', 'alpha')=='expedition'?'sending':''); - $errorprint = $printer->print_file(GETPOST('file', 'alpha'), GETPOST('printer', 'alpha'), $subdir); - //if ($errorprint < 0) { - // setEventMessage($interface->errors, 'errors'); - //} - if ($errorprint=='') { - setEventMessage($langs->trans("FileWasSentToPrinter", basename(GETPOST('file'))).' '.$langs->trans("ViaModule").' '.$printer->name); + $module = GETPOST('printer', 'alpha'); + if ($module =='commande_fournisseur') { + $module = 'fournisseur'; + $subdir = 'commande'; + } + $ret = $printer->print_file(GETPOST('file', 'alpha'), $module, $subdir); + if ($ret > 0) { + //print '
'.print_r($printer->errors, true).'
'; + setEventMessages($printer->error, $printer->errors, 'errors'); + } + if ($ret==0) { + //print '
'.print_r($printer->errors, true).'
'; + setEventMessages($printer->error, $printer->errors); + setEventMessages($langs->trans("FileWasSentToPrinter", basename(GETPOST('file'))).' '.$langs->trans("ViaModule").' '.$printer->name, null); $printed++; } } } - if ($printed==0) setEventMessage($langs->trans("NoActivePrintingModuleFound")); + if ($printed==0) setEventMessages($langs->trans("NoActivePrintingModuleFound"), null, 'warnings'); } else { - setEventMessage($langs->trans("NoModuleFound"), 'warning'); + setEventMessages($langs->trans("NoModuleFound"), null, 'warnings'); } $action = ''; } diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index d27e6e59fb4..58c48d5b254 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -47,7 +47,7 @@ if (GETPOST('addfile')) /* * Remove file in email form */ -if (! empty($_POST['removedfile'])) +if (! empty($_POST['removedfile']) && empty($_POST['removAll'])) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -56,15 +56,45 @@ if (! empty($_POST['removedfile'])) $upload_dir_tmp = $vardir.'/temp'; // TODO Delete only files that was uploaded from email form - dol_remove_file_process($_POST['removedfile'],0); + dol_remove_file_process(GETPOST('removedfile','alpha'),0); $action='presend'; } +/* + * Remove all files in email form + */ + +if(! empty($_POST['removAll'])) +{ + $listofpaths=array(); + $listofnames=array(); + $listofmimes=array(); + if (! empty($_SESSION["listofpaths"])) $listofpaths=explode(';',$_SESSION["listofpaths"]); + if (! empty($_SESSION["listofnames"])) $listofnames=explode(';',$_SESSION["listofnames"]); + if (! empty($_SESSION["listofmimes"])) $listofmimes=explode(';',$_SESSION["listofmimes"]); + + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + + foreach($listofpaths as $key => $value) + { + $pathtodelete = $value; + $filetodelete = $listofnames[$key]; + $result = dol_delete_file($pathtodelete,1); // Delete uploded Files + + $langs->load("other"); + setEventMessages($langs->trans("FileWasRemoved",$filetodelete), null, 'mesgs'); + + $formmail->remove_attached_files($key); // Update Session + } +} + /* * Send mail */ -if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_POST['cancel'] && !$_POST['modelselected']) +if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_POST['removAll'] && ! $_POST['removedfile'] && ! $_POST['cancel'] && !$_POST['modelselected']) { + if($conf->dolimail->enabled) $langs->load("dolimail@dolimail"); $langs->load('mails'); $subject='';$actionmsg='';$actionmsg2=''; @@ -81,7 +111,37 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO else if ($object->element == 'societe') { $thirdparty=$object; - $sendtosocid=$thirdparty->id; + if ($thirdparty->id > 0) $sendtosocid=$thirdparty->id; + elseif($conf->dolimail->enabled) + { + $dolimail = new Dolimail($db); + $possibleaccounts=$dolimail->get_societe_by_email($_POST['sendto'],"1"); + $possibleuser=$dolimail->get_from_user_by_mail($_POST['sendto'],"1"); // suche in llx_societe and socpeople + if (!$possibleaccounts && !$possibleuser) + { + setEventMessages($langs->trans('ErrorFailedToFindSocieteRecord',$_POST['sendto']), null, 'errors'); + } + elseif (count($possibleaccounts)>1) + { + $sendtosocid=$possibleaccounts[1]['id']; + $result=$object->fetch($sendtosocid); + + setEventMessages($langs->trans('ErrorFoundMoreThanOneRecordWithEmail',$_POST['sendto'],$object->name), null, 'mesgs'); + } + else + { + if($possibleaccounts){ + $sendtosocid=$possibleaccounts[1]['id']; + $result=$object->fetch($sendtosocid); + }elseif($possibleuser){ + $sendtosocid=$possibleuser[0]['id']; + + $result=$uobject->fetch($sendtosocid); + $object=$uobject; + } + + } + } } else dol_print_error('','Use actions_sendmails.in.php for a type that is not supported'); @@ -161,8 +221,50 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $filename = $attachedfiles['names']; $mimetype = $attachedfiles['mimes']; - $trackid = GETPOST('trackid','aZ'); + $trackid = GETPOST('trackid','aZ09'); + // Feature to push mail sent into Sent folder + if (! empty($conf->dolimail->enabled)) + { + $mailfromid = explode("#", $_POST['frommail'],3); // $_POST['frommail'] = 'aaa#Sent# ' // TODO Use a better way to define Sent dir. + if (count($mailfromid)==0) $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; + else + { + $mbid = $mailfromid[1]; + + /*IMAP Postbox*/ + $mailboxconfig = new IMAP($db); + $mailboxconfig->fetch($mbid); + if ($mailboxconfig->mailbox_imap_host) $ref=$mailboxconfig->get_ref(); + + $mailboxconfig->folder_id=$mailboxconfig->mailbox_imap_outbox; + $mailboxconfig->userfolder_fetch(); + + if ($mailboxconfig->mailbox_save_sent_mails == 1) + { + + $folder=str_replace($ref, '', $mailboxconfig->folder_cache_key); + if (!$folder) $folder = "Sent"; // Default Sent folder + + $mailboxconfig->mbox = imap_open($mailboxconfig->get_connector_url().$folder, $mailboxconfig->mailbox_imap_login, $mailboxconfig->mailbox_imap_password); + if (FALSE === $mailboxconfig->mbox) + { + $info = FALSE; + $err = $langs->trans('Error3_Imap_Connection_Error'); + setEventMessages($err,$mailboxconfig->element, null, 'errors'); + } + else + { + $mailboxconfig->mailboxid=$_POST['frommail']; + $mailboxconfig->foldername=$folder; + $from = $mailfromid[0] . $mailfromid[2]; + $imap=1; + } + + } + } + } + // Send mail require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid); @@ -176,8 +278,28 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO if ($result) { $error=0; + + // FIXME This must be moved into a trigger for action $trigger_name + if (! empty($conf->dolimail->enabled)) + { + $mid = (GETPOST('mid','int') ? GETPOST('mid','int') : 0); // Original mail id is set ? + if ($mid) + { + // set imap flag answered if it is an answered mail + $dolimail=new DoliMail($db); + $dolimail->id = $mid; + $res=$dolimail->set_prop($user, 'answered',1); + } + if ($imap==1) + { + // write mail to IMAP Server + $movemail = $mailboxconfig->putMail($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$folder,$deliveryreceipt,$mailfile); + if ($movemail) setEventMessages($langs->trans("MailMovedToImapFolder",$folder), null, 'mesgs'); + else setEventMessages($langs->trans("MailMovedToImapFolder_Warning",$folder), null, 'warnings'); + } + } - // Initialisation donnees + // Initialisation of datas $object->socid = $sendtosocid; // To link to a company $object->sendtoid = $sendtoid; // To link to a contact/address $object->actiontypecode = $actiontypecode; @@ -186,14 +308,14 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO $object->fk_element = $object->id; $object->elementtype = $object->element; - // Appel des triggers + // Call of triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($db); $result=$interface->run_triggers($trigger_name,$object,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } - // Fin appel triggers + // End call of triggers if ($error) { @@ -204,25 +326,28 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO // Redirect here // This avoid sending mail twice if going out and then back to page $mesg=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)); - setEventMessage($mesg); - header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id); + setEventMessages($mesg, null, 'mesgs'); + if($conf->dolimail->enabled) header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id.'&'.($paramname2?$paramname2:'mid').'='.$parm2val); + else header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname?$paramname:'id').'='.$object->id); exit; } } else { $langs->load("other"); + $mesg='
'; if ($mailfile->error) { - $mesg=''; $mesg.=$langs->trans('ErrorFailedToSendMail',$from,$sendto); $mesg.='
'.$mailfile->error; - setEventMessage($mesg,'errors'); } else { - setEventMessage('No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS', 'warnings'); + $mesg.='No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS'; } + $mesg.='
'; + + setEventMessages($mesg, null, 'warnings'); $action = 'presend'; } } @@ -237,7 +362,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO else { $langs->load("errors"); - setEventMessage($langs->trans('ErrorFieldRequired',$langs->transnoentitiesnoconv("MailTo")),'warnings'); + setEventMessages($langs->trans('ErrorFieldRequired',$langs->transnoentitiesnoconv("MailTo")), null, 'warnings'); dol_syslog('Try to send email with no recipiend defined', LOG_WARNING); $action = 'presend'; } @@ -245,7 +370,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO else { $langs->load("other"); - setEventMessage($langs->trans('ErrorFailedToReadEntity',$object->element),'errors'); + setEventMessages($langs->trans('ErrorFailedToReadEntity',$object->element), null, 'errors'); dol_syslog('Failed to read data of object id='.$object->id.' element='.$object->element); $action = 'presend'; } diff --git a/htdocs/core/actions_setnotes.inc.php b/htdocs/core/actions_setnotes.inc.php index dccce99cf9f..3fa76891124 100644 --- a/htdocs/core/actions_setnotes.inc.php +++ b/htdocs/core/actions_setnotes.inc.php @@ -33,7 +33,7 @@ if ($action == 'setnote_public' && ! empty($permissionnote) && ! GETPOST('cancel if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('','Include of actions_setnotes.inc.php was done but required variable was not set before'); if (empty($object->id)) $object->fetch($id); // Fetch may not be already done $result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public'); - if ($result < 0) setEventMessage($object->error,'errors'); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // Set public note else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel')) @@ -41,5 +41,5 @@ else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST(' if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('','Include of actions_setnotes.inc.php was done but required variable was not set before'); if (empty($object->id)) $object->fetch($id); // Fetch may not be already done $result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private'); - if ($result < 0) setEventMessage($object->error,'errors'); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 76fc64b50cf..8b9102a799f 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -207,7 +207,7 @@ if (file_exists($fullpathselecteddir)) // Enable jquery handlers on new generated HTML objects print ''; @@ -231,7 +232,7 @@ class box_actions extends ModeleBoxes else { print ''; } } diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index dde2a559cd3..a1fc2768ba1 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -63,8 +63,9 @@ class box_contacts extends ModeleBoxes if ($user->rights->societe->lire) { $sql = "SELECT sp.rowid as id, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc, sp.statut as status"; - $sql.= ", s.nom as socname"; - $sql.= ", s.code_client"; + $sql.= ", sp.address, sp.zip, sp.town, sp.phone, sp.phone_perso, sp.phone_mobile"; + $sql.= ", s.nom as socname, s.name_alias"; + $sql.= ", s.client, s.fournisseur, s.code_client, s.code_fournisseur"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid"; if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -82,7 +83,8 @@ class box_contacts extends ModeleBoxes $societestatic=new Societe($db); $line = 0; - while ($line < $num) { + while ($line < $num) + { $objp = $db->fetch_object($result); $datec=$db->jdate($objp->datec); $datem=$db->jdate($objp->tms); @@ -92,11 +94,21 @@ class box_contacts extends ModeleBoxes $contactstatic->firstname=$objp->firstname; $contactstatic->civility_id=$objp->civility_id; $contactstatic->statut=$objp->status; + $contactstatic->phone_pro = $objp->phone; + $contactstatic->phone_perso = $objp->phone_perso; + $contactstatic->phone_mobile = $objp->phone_mobile; + $contactstatic->address = $objp->address; + $contactstatic->zip = $objp->zip; + $contactstatic->town = $objp->town; - $societestatic->id = $objp->fk_soc; - $societestatic->code_client = $objp->code_client; + $societestatic->id = $objp->fk_soc; $societestatic->name = $objp->socname; - + $societestatic->name_alias = $objp->name_alias; + $societestatic->code_client = $objp->code_client; + $societestatic->code_fournisseur = $objp->code_fournisseur; + $societestatic->client = $objp->client; + $societestatic->fournisseur = $objp->fournisseur; + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', 'text' => $contactstatic->getNomUrl(1), diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index d04c3e48a3b..f50bff34a86 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -108,12 +108,18 @@ class box_factures extends ModeleBoxes $facturestatic->total_ht = $objp->total_ht; $facturestatic->total_tva = $objp->total_tva; $facturestatic->total_ttc = $objp->total_ttc; + $facturestatic->statut = $objp->fk_statut; + $facturestatic->date_lim_reglement = $db->jdate($objp->datelimite); + $societestatic->id = $objp->socid; $societestatic->name = $objp->name; $societestatic->code_client = $objp->code_client; + $late = ''; - if ($objp->paye == 0 && ($objp->fk_statut != 2 && $objp->fk_statut != 3) && $datelimite < ($now - $conf->facture->client->warning_delay)) { $late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day')));} + if ($facturestatic->hasDelay()) { + $late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day'))); + } $this->info_box_contents[$line][] = array( 'td' => 'align="left"', diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index 2f31fa61f78..7c90bb69683 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -93,7 +93,6 @@ class box_factures_fourn extends ModeleBoxes if ($result) { $num = $db->num_rows($result); - $now=dol_now(); $line = 0; $l_due_date = $langs->trans('Late').' ('.$langs->trans('DateEcheance').': %s)'; @@ -108,6 +107,8 @@ class box_factures_fourn extends ModeleBoxes $facturestatic->total_ht = $objp->total_ht; $facturestatic->total_tva = $objp->total_tva; $facturestatic->total_ttc = $objp->total_ttc; + $facturestatic->date_echeance = $datelimite; + $facturestatic->statut = $objp->fk_statut; $thirdpartytmp->id = $objp->socid; $thirdpartytmp->name = $objp->name; $thirdpartytmp->fournisseur = 1; @@ -115,7 +116,10 @@ class box_factures_fourn extends ModeleBoxes $thirdpartytmp->logo = $objp->logo; $late = ''; - if ($objp->paye == 0 && $datelimite && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date, dol_print_date($datelimite,'day'))); + + if ($facturestatic->hasDelay()) { + $late=img_warning(sprintf($l_due_date, dol_print_date($datelimite,'day'))); + } $this->info_box_contents[$line][] = array( 'td' => 'align="left"', diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index ecea4a27fd1..4e54b590955 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -86,22 +86,35 @@ class box_factures_fourn_imp extends ModeleBoxes if ($result) { $num = $db->num_rows($result); - $now=dol_now(); $line = 0; $l_due_date = $langs->trans('Late').' ('.$langs->trans('DateEcheance').': %s)'; + $facturestatic = new FactureFournisseur($db); + while ($line < $num) { $objp = $db->fetch_object($result); $datelimite=$db->jdate($objp->datelimite); + $date=$db->jdate($objp->df); + $datem=$db->jdate($objp->tms); + $facturestatic->id = $objp->facid; + $facturestatic->ref = $objp->ref; + $facturestatic->total_ht = $objp->total_ht; + $facturestatic->total_tva = $objp->total_tva; + $facturestatic->total_ttc = $objp->total_ttc; + $facturestatic->date_echeance = $datelimite; + $facturestatic->statut = $objp->fk_statut; $thirdpartytmp->id = $objp->socid; - $thirdpartytmp->name = $objp->name; - $thirdpartytmp->code_client = $objp->code_client; + $thirdpartytmp->name = $objp->name; + $thirdpartytmp->fournisseur = 1; + $thirdpartytmp->code_fournisseur = $objp->code_fournisseur; $thirdpartytmp->logo = $objp->logo; $late=''; - if ($datelimite && $datelimite < ($now - $conf->facture->fournisseur->warning_delay)) $late=img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day'))); + if ($facturestatic->hasDelay()) { + $late=img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day'))); + } $tooltip = $langs->trans('SupplierInvoice') . ': ' . ($objp->ref?$objp->ref:$objp->facid) . '
' . $langs->trans('RefSupplier') . ': ' . $objp->ref_supplier; $this->info_box_contents[$line][] = array( @@ -113,10 +126,9 @@ class box_factures_fourn_imp extends ModeleBoxes $this->info_box_contents[$line][] = array( 'td' => 'align="left"', - 'text' => ($objp->ref?$objp->ref:$objp->facid), + 'text' => $facturestatic->getNomUrl(1), 'text2'=> $late, - 'tooltip' => $tooltip, - 'url' => DOL_URL_ROOT."/fourn/facture/card.php?facid=".$objp->facid, + 'asisi' => 1 ); $this->info_box_contents[$line][] = array( diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index 42e889138cc..63ce986e181 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -108,6 +108,8 @@ class box_factures_imp extends ModeleBoxes $facturestatic->total_ht = $objp->total_ht; $facturestatic->total_tva = $objp->total_tva; $facturestatic->total_ttc = $objp->total_ttc; + $facturestatic->statut = $objp->fk_statut; + $facturestatic->date_lim_reglement = $db->jdate($objp->datelimite); $societestatic->id = $objp->socid; $societestatic->name = $objp->name; $societestatic->client = 1; @@ -115,7 +117,9 @@ class box_factures_imp extends ModeleBoxes $societestatic->logo = $objp->logo; $late=''; - if ($datelimite < ($now - $conf->facture->client->warning_delay)) $late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day'))); + if ($facturestatic->hasDelay()) { + $late = img_warning(sprintf($l_due_date,dol_print_date($datelimite,'day'))); + } $this->info_box_contents[$line][] = array( 'td' => 'align="left"', diff --git a/htdocs/core/boxes/box_goodcustomers.php b/htdocs/core/boxes/box_goodcustomers.php new file mode 100644 index 00000000000..609eabdbc7a --- /dev/null +++ b/htdocs/core/boxes/box_goodcustomers.php @@ -0,0 +1,168 @@ + + * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2015 Frederic France + * Copyright (C) 2016 Charlie Benke + * + * 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 3 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, see . + */ + +/** + * \file htdocs/core/boxes/box_clients.php + * \ingroup societes + * \brief Module de generation de l'affichage de la box clients + */ + +include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; + + +/** + * Class to manage the box to show last thirdparties + */ +class box_goodcustomers extends ModeleBoxes +{ + var $boxcode="goodcustomers"; + var $boximg="object_company"; + var $boxlabel="BoxGoodCustomers"; + var $depends = array("societe"); + + var $db; + var $enabled = 1; + + var $info_box_head = array(); + var $info_box_contents = array(); + + + /** + * Constructor + * + * @param DoliDB $db Database handler + * @param string $param More parameters + */ + function __construct($db,$param='') + { + global $conf, $user; + + $this->db = $db; + + // disable box for such cases + if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $this->enabled=0; // disabled by this option + } + + /** + * Load data for box to show them later + * + * @param int $max Maximum number of records to load + * @return void + */ + function loadBox($max=5) + { + global $user, $langs, $db, $conf; + $langs->load("boxes"); + + $this->max=$max; + + include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + $thirdpartystatic=new Societe($db); + + $this->info_box_head = array('text' => $langs->trans("BoxTitleGoodCustomers",$max)); + + if ($user->rights->societe->lire) + { + + $sql = "SELECT s.rowid, s.nom as name, s.logo, s.code_client, s.code_fournisseur, s.client, s.fournisseur, s.tms as datem, s.status as status,"; + $sql.= " count(*) as nbfact, sum(". $db->if('f.paye=1','1','0').") as nbfactpaye"; + $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f"; + $sql.= ' WHERE s.entity IN ('.getEntity('societe', 1).')'; + $sql.= ' AND s.rowid = f.fk_soc'; + $sql.= " GROUP BY s.rowid, s.nom, s.logo, s.code_client, s.code_fournisseur, s.client, s.fournisseur, s.tms, s.status"; + $sql.= $db->order("nbfact","DESC"); + $sql.= $db->plimit($max,0); + + dol_syslog(get_class($this)."::loadBox", LOG_DEBUG); + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + + $line = 0; + while ($line < $num) + { + $objp = $db->fetch_object($result); + $datem=$db->jdate($objp->tms); + $thirdpartystatic->id = $objp->rowid; + $thirdpartystatic->name = $objp->name; + $thirdpartystatic->code_client = $objp->code_client; + $thirdpartystatic->code_fournisseur = $objp->code_fournisseur; + $thirdpartystatic->client = $objp->client; + $thirdpartystatic->fournisseur = $objp->fournisseur; + $thirdpartystatic->logo = $objp->logo; + $nbfact = $objp->nbfact; + $nbimpaye = $objp->nbfact - $objp->nbfactpaye; + + $this->info_box_contents[$line][] = array( + 'td' => 'align="left"', + 'text' => $thirdpartystatic->getNomUrl(1), + 'asis' => 1, + ); + + $this->info_box_contents[$line][] = array( + 'td' => 'align="right"', + 'text' => dol_print_date($datem, "day") + ); + + $this->info_box_contents[$line][] = array( + 'td' => 'align="right"', + 'text' => $nbfact.( $nbimpaye != 0 ? ' ('.$nbimpaye.')':'') + ); + + $this->info_box_contents[$line][] = array( + 'td' => 'align="right" width="18"', + 'text' => $thirdpartystatic->LibStatut($objp->status,3) + ); + + $line++; + } + + if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedCustomers")); + + $db->free($result); + } + else { + $this->info_box_contents[0][0] = array( 'td' => 'align="left"', + 'maxlength'=>500, + 'text' => ($db->error().' sql='.$sql)); + } + } + else { + $this->info_box_contents[0][0] = array('align' => 'left', + 'text' => $langs->trans("ReadPermissionNotAllowed")); + } + + } + + /** + * Method to show box + * + * @param array $head Array with properties of box title + * @param array $contents Array with properties of box lines + * @return void + */ + function showBox($head = null, $contents = null) + { + parent::showBox($this->info_box_head, $this->info_box_contents); + } +} + diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index 7b797b98ab0..3848960e5e9 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -170,6 +170,8 @@ class box_graph_invoices_permonth extends ModeleBoxes $mesg = $px2->isGraphKo(); if (! $mesg) { + $langs->load("bills"); + $px2->SetData($data2); unset($data2); $px2->SetPrecisionY(0); diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index 31d9f811257..0931d2d05df 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -169,6 +169,8 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $mesg = $px2->isGraphKo(); if (! $mesg) { + $langs->load("bills"); + $px2->SetData($data2); unset($data2); $px2->SetPrecisionY(0); diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php index 771547686ea..7d819ec0d2b 100644 --- a/htdocs/core/boxes/box_project.php +++ b/htdocs/core/boxes/box_project.php @@ -115,7 +115,7 @@ class box_project extends ModeleBoxes $sql ="SELECT count(*) as nb, sum(progress) as totprogress"; $sql.=" FROM ".MAIN_DB_PREFIX."projet as p LEFT JOIN ".MAIN_DB_PREFIX."projet_task as pt on pt.fk_projet = p.rowid"; $sql.=" WHERE p.entity = ".$conf->entity; - + $sql.=" AND p.rowid = ".$objp->rowid; $resultTask = $db->query($sql); if ($resultTask) { $objTask = $db->fetch_object($resultTask); diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index d6a65884ffb..d314af73cd1 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -25,6 +25,7 @@ include_once(DOL_DOCUMENT_ROOT."/core/boxes/modules_boxes.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"); + /** * Class to manage the box to show last task */ @@ -36,6 +37,7 @@ class box_task extends ModeleBoxes //var $depends = array("projet"); var $db; var $param; + var $enabled = 0; // Disabled because bugged. var $info_box_head = array(); var $info_box_contents = array(); @@ -79,55 +81,54 @@ class box_task extends ModeleBoxes // list the summary of the orders if ($user->rights->projet->lire) { - - $sql = "SELECT pt.fk_statut, count(pt.rowid) as nb, sum(ptt.task_duration) as durationtot, sum(pt.planned_workload) as plannedtot"; + // FIXME fk_statut on a task is not be used. We use the percent. This means this box is useless. + $sql = "SELECT pt.fk_statut, count(DISTINCT pt.rowid) as nb, sum(ptt.task_duration) as durationtot, sum(pt.planned_workload) as plannedtot"; $sql.= " FROM ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."projet_task_time as ptt"; - $sql.= " WHERE DATE_FORMAT(pt.datec,'%Y') = '".date("Y")."' "; + $sql.= " WHERE pt.datec BETWEEN '".$this->db->idate(dol_get_first_day(date("Y"), 1))."' AND '".$this->db->idate(dol_get_last_day(date("Y"), 12))."'"; $sql.= " AND pt.rowid = ptt.fk_task"; $sql.= " GROUP BY pt.fk_statut "; $sql.= " ORDER BY pt.fk_statut DESC"; $sql.= $db->plimit($max, 0); $result = $db->query($sql); - - if ($result) { + if ($result) + { $num = $db->num_rows($result); $i = 0; - while ($i < $num) { - $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"','logo' => 'object_projecttask'); - + while ($i < $num) + { $objp = $db->fetch_object($result); - $this->info_box_contents[$i][1] = array( + $this->info_box_contents[$i][] = array( 'td' => 'align="left"', - 'text' =>$langs->trans("Task")." ".$taskstatic->LibStatut($objp->fk_statut,0), + 'text' =>$langs->trans("Task")." ".$taskstatic->LibStatut($objp->fk_statut,0), ); - $this->info_box_contents[$i][2] = array( + $this->info_box_contents[$i][] = array( 'td' => 'align="right"', 'text' => $objp->nb." ".$langs->trans("Tasks"), - 'url' => DOL_URL_ROOT."/projet/tasks/index.php?leftmenu=projects&viewstatut=".$objp->fk_statut, + 'url' => DOL_URL_ROOT."/projet/tasks/list.php?leftmenu=projects&viewstatut=".$objp->fk_statut, ); $totalnb += $objp->nb; - $this->info_box_contents[$i][3] = array('td' => 'align="right"', 'text' => ConvertSecondToTime($objp->plannedtot,'all',25200,5)); + $this->info_box_contents[$i][] = array('td' => 'align="right"', 'text' => ConvertSecondToTime($objp->plannedtot,'all',25200,5)); $totalplannedtot += $objp->plannedtot; - $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => ConvertSecondToTime($objp->durationtot,'all',25200,5)); + $this->info_box_contents[$i][] = array('td' => 'align="right"', 'text' => ConvertSecondToTime($objp->durationtot,'all',25200,5)); $totaldurationtot += $objp->durationtot; - $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', 'text' => $taskstatic->LibStatut($objp->fk_statut,3)); + $this->info_box_contents[$i][] = array('td' => 'align="right" width="18"', 'text' => $taskstatic->LibStatut($objp->fk_statut,3)); $i++; } } + else dol_print_error($this->db); } // Add the sum à the bottom of the boxes - $this->info_box_contents[$i][0] = array('tr' => 'class="liste_total"', 'td' => 'align="left"', 'text' => $langs->trans("Total")." ".$textHead); - $this->info_box_contents[$i][1] = array('td' => '', 'text' => ""); - $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks")); - $this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot,'all',25200,5)); - $this->info_box_contents[$i][4] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totaldurationtot,'all',25200,5)); - $this->info_box_contents[$i][5] = array('td' => '', 'text' => ""); + $this->info_box_contents[$i][] = array('tr' => 'class="liste_total"', 'td' => 'align="left"', 'text' => $langs->trans("Total")." ".$textHead); + $this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')." ".$langs->trans("Tasks")); + $this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totalplannedtot,'all',25200,5)); + $this->info_box_contents[$i][] = array('td' => 'align="right" ', 'text' => ConvertSecondToTime($totaldurationtot,'all',25200,5)); + $this->info_box_contents[$i][] = array('td' => '', 'text' => ""); } diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index d1d05ec28a8..359384b5c4d 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -168,7 +168,28 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" } } - + + /** + * Standard method to get content of a box + * + * @param array $head Array with properties of box title + * @param array $contents Array with properties of box lines + * + * @return string + */ + function outputBox($head = null, $contents = null) + { + global $langs, $user, $conf; + + // Trick to get result into a var from a function that makes print instead of return + ob_start(); + $result = $this->showBox($head, $contents); + $output = ob_get_contents(); + ob_end_clean(); + + return $output; + } + /** *Standard method to show a box (usage by boxes not mandatory, a box can still use its own showBox function) * @@ -177,7 +198,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" * * @return void */ - function showBox($head, $contents) + function showBox($head = null, $contents = null) { global $langs, $user, $conf; @@ -287,7 +308,10 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" // Url if (! empty($contents[$i][$j]['url']) && empty($contents[$i][$j]['logo'])) { - $out.= 'trans("Show").' '.$tooltip, 1).'" class="classfortooltip"'; + } //$out.= ' alt="'.$textwithnotags.'"'; // Pas de alt sur un "" $out.= isset($contents[$i][$j]['target'])?' target="'.$contents[$i][$j]['target'].'"':''; $out.= '>'; diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index b3da46ff366..39d28b55311 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -37,10 +37,11 @@ class CMailFile { var $subject; // Topic: Subject of email - var $addr_from; // From: Label and EMail of sender (must include '<>'). For example '' or 'John Doe ' or '') + var $addr_from; // From: Label and EMail of sender (must include '<>'). For example '' or 'John Doe ' or ''). Note that with gmail smtps, value here is forced by google to account (but not the reply-to). // Sender: Who send the email ("Sender" has sent emails on behalf of "From"). // Use it when the "From" is an email of a domain that is a SPF protected domain, and sending smtp server is not this domain. In such case, add Sender field with an email of the protected domain. // Return-Path: Email where to send bounds. + var $reply_to; // Reply-To: Email where to send replies from mailer software (mailer use From if reply-to not defined, Gmail use gmail account if reply-to not defined) var $errors_to; // Errors-To: Email where to send errors. var $addr_to; var $addr_cc; @@ -190,6 +191,7 @@ class CMailFile // Define smtp_headers $this->subject = $subject; $this->addr_from = $from; + $this->reply_to = $from; // Set this property after constructor if you want to use another value $this->errors_to = $errors_to; $this->addr_to = $to; $this->addr_cc = $addr_cc; @@ -256,7 +258,8 @@ class CMailFile $smtps->setTO($this->getValidAddress($to,0,1)); $smtps->setFrom($this->getValidAddress($from,0,1)); $smtps->setTrackId($trackid); - + $smtps->setReplyTo($this->getValidAddress($from,0,1)); // Set property with this->smtps->setReplyTo after constructor if you want to use another value than the From + if (! empty($this->html)) { if (!empty($css)) @@ -308,6 +311,7 @@ class CMailFile $this->phpmailer->Subject($this->encodetorfc2822($subject)); $this->phpmailer->setTO($this->getValidAddress($to,0,1)); $this->phpmailer->SetFrom($this->getValidAddress($from,0,1)); + $this->phpmailer->SetReplyTo($this->getValidAddress($from,0,1)); // Set property with this->phpmailer->setReplyTo after constructor if you want to use another value than the From // TODO Add trackid into smtp header if (! empty($this->html)) @@ -341,12 +345,10 @@ class CMailFile } } - $smtps->setCC($addr_cc); - $smtps->setBCC($addr_bcc); - $smtps->setErrorsTo($errors_to); - $smtps->setDeliveryReceipt($deliveryreceipt); - - $this->smtps=$smtps; + $this->phpmailer->setCC($addr_cc); + $this->phpmailer->setBCC($addr_bcc); + $this->phpmailer->setErrorsTo($errors_to); + $this->phpmailer->setDeliveryReceipt($deliveryreceipt); } else { @@ -375,7 +377,7 @@ class CMailFile if (empty($conf->global->MAIN_DISABLE_ALL_MAILS)) { - dol_include_once('/core/class/hookmanager.class.php'); + require_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php'; $hookmanager = new HookManager($db); $hookmanager->initHooks(array( 'maildao' @@ -708,8 +710,10 @@ class CMailFile $trackid = $this->trackid; if ($trackid) { - $out.= 'Message-ID: <' . time() . '.phpmail-'.$trackid.'@' . $host . ">" . $this->eol2; - $out.= 'references: <' . time() . '.phpmail-'.$trackid.'@' . $host . ">" . $this->eol2; + // References is kept in response and Message-ID is returned into In-Reply-To: + $out.= 'Message-ID: <' . time() . '.phpmail-dolibarr-'.$trackid.'@' . $host . ">" . $this->eol2; // Uppercase seems replaced by phpmail + $out.= 'References: <' . time() . '.phpmail-dolibarr-'.$trackid.'@' . $host . ">" . $this->eol2; + $out.= 'X-Dolibarr-TRACKID: '.$trackid. $this->eol2; } else { diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php index 5620e641df0..4456df76f83 100644 --- a/htdocs/core/class/CSMSFile.class.php +++ b/htdocs/core/class/CSMSFile.class.php @@ -85,9 +85,9 @@ class CSMSFile /** - * Send mail that was prepared by constructor + * Send sms that was prepared by constructor * - * @return boolean True if mail sent, false otherwise + * @return boolean True if sms sent, false otherwise */ function sendfile() { @@ -149,9 +149,10 @@ class CSMSFile $sms->message=$this->message; $res=$sms->SmsSend(); + $this->error = $sms->error; + $this->errors = $sms->errors; if ($res <= 0) { - $this->error=$sms->error; dol_syslog("CSMSFile::sendfile: sms send error=".$this->error, LOG_ERR); } else @@ -168,7 +169,7 @@ class CSMSFile } else { - // Send mail method not correctly defined + // Send sms method not correctly defined // -------------------------------------- return 'Bad value for MAIN_SMS_SENDMODE constant'; @@ -176,7 +177,7 @@ class CSMSFile } else { - $this->error='No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_SMS'; + $this->error='No sms sent. Feature is disabled by option MAIN_DISABLE_ALL_SMS'; dol_syslog("CSMSFile::sendfile: ".$this->error, LOG_WARNING); } @@ -187,7 +188,7 @@ class CSMSFile /** - * Write content of a SMTP request into a dump file (mode = all) + * Write content of a SendSms request into a dump file (mode = all) * Used for debugging. * * @return void @@ -215,7 +216,7 @@ class CSMSFile } /** - * Write content of a SMTP request into a dump file (mode = all) + * Write content of a SendSms result into a dump file (mode = all) * Used for debugging. * * @param int $result Result of sms sending diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index a8bb07e6ec6..6851c124743 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -179,13 +179,14 @@ class Canvas } /** - * Shared method for canvas to execute actions + * Shared method for canvas to execute actions. + * @deprecated Use the doActions of hooks instead of this. + * This function is called if you add a doActions class inside your canvas. Try to not + * do that and add action code into a hook instead. * * @param string $action Action string * @param int $id Object id * @return mixed Return return code of doActions of canvas - * @deprecated This function is called if you add a doActions class inside your canvas. Try to not - * do that and add action code into a hook instead. * @see http://wiki.dolibarr.org/index.php/Canvas_development */ function doActions(&$action='view', $id=0) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index c2634cbaaed..b8aa683097f 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1,9 +1,10 @@ - * Copyright (C) 2004-2010 Laurent Destailleur - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2015 Marcos García + * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2015 Marcos García + * Copyright (C) 2016 Charlie Benke * * 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 @@ -133,9 +134,8 @@ abstract class CommonDocGenerator 'mycompany_idprof6'=>$mysoc->idprof6, 'mycompany_vatnumber'=>$mysoc->tva_intra, 'mycompany_object'=>$mysoc->object, - // Only private not exists for "mysoc" 'mycompany_note_private'=>$mysoc->note_private, - + //'mycompany_note_public'=>$mysoc->note_public, // Only private not exists for "mysoc" but both for thirdparties ); } @@ -560,7 +560,7 @@ abstract class CommonDocGenerator * @param Object $object Object with extrafields (must have $object->array_options filled) * @param array $array_to_fill Substitution array * @param Extrafields $extrafields Extrafields object - * @param string $array_key Name of the key for return array + * @param string $array_key Prefix for name of the keys into returned array * @param Translate $outputlangs Lang object to use for output * @return array Substitution array */ @@ -581,12 +581,25 @@ abstract class CommonDocGenerator $object->array_options['options_'.$key] = $extrafields->attribute_param[$key]['options'][$object->array_options['options_'.$key]]; } else if($extrafields->attribute_type[$key] == 'date') - { - $object->array_options['options_'.$key] = (strlen($object->array_options['options_'.$key])>0?dol_print_date($object->array_options['options_'.$key],'day'):''); + { + if (strlen($object->array_options['options_'.$key])>0) + { + $object->array_options['options_'.$key] = dol_print_date($object->array_options['options_'.$key],'day'); // using company output language + $object->array_options['options_'.$key.'_locale'] = dol_print_date($object->array_options['options_'.$key],'day','tzserver',$outputlangs); // using output language format + $object->array_options['options_'.$key.'_rfc'] = dol_print_date($object->array_options['options_'.$key],'dayrfc'); // international format + } + else + { + $object->array_options['options_'.$key] = ''; + $object->array_options['options_'.$key.'_locale'] = ''; + $object->array_options['options_'.$key.'_rfc'] = ''; + } } else if($extrafields->attribute_type[$key] == 'datetime') { - $object->array_options['options_'.$key] = ($object->array_options['options_'.$key]!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhour'):''); + $object->array_options['options_'.$key] = ($object->array_options['options_'.$key]!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhour'):''); // using company output language + $object->array_options['options_'.$key.'_locale'] = ($object->array_options['options_'.$key]!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhour','tzserver',$outputlangs):''); // using output language format + $object->array_options['options_'.$key.'_rfc'] = ($object->array_options['options_'.$key]!="0000-00-00 00:00:00"?dol_print_date($object->array_options['options_'.$key],'dayhourrfc'):''); // international format } $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key => $object->array_options['options_'.$key])); } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 1cf042e9d13..f7cb1ff7881 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9,6 +9,7 @@ * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012-2015 Raphaël Doursenaud * Copyright (C) 2012 Cedric Salvador + * Copyright (C) 2015 Alexandre Spangaro * * 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 @@ -131,6 +132,7 @@ abstract class CommonObject public $thirdparty; /** * @deprecated + * @var Societe A related customer * @see thirdparty */ public $client; @@ -283,27 +285,27 @@ abstract class CommonObject public $note; /** - * @var float + * @var float Total amount before taxes * @see update_price() */ public $total_ht; /** - * @var float + * @var float Total VAT amount * @see update_price() */ public $total_tva; /** - * @var float + * @var float Total local tax 1 amount * @see update_price() */ public $total_localtax1; /** - * @var float + * @var float Total local tax 2 amount * @see update_price() */ public $total_localtax2; /** - * @var float + * @var float Total amount with taxes * @see update_price() */ public $total_ttc; @@ -362,6 +364,7 @@ abstract class CommonObject dol_print_error(get_class()."::isExistingObject ".$error, LOG_ERR); return -1; } + if ($ref || $ref_ext) $sql.= " AND entity = ".$conf->entity; dol_syslog(get_class()."::isExistingObject", LOG_DEBUG); $resql = $db->query($sql); @@ -389,7 +392,7 @@ abstract class CommonObject * * @param Translate $langs Language object for translation of civility * @param int $option 0=No option, 1=Add civility - * @param int $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname + * @param int $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname, 2=Firstname * @param int $maxlen Maximum length * @return string String with full name */ @@ -433,6 +436,111 @@ abstract class CommonObject } + /** + * Return full address of contact + * + * @param string $htmlkey HTML id to make banner content unique + * @param Object $object Object (thirdparty, thirdparty of contact for contact, null for a member) + * @return string Full address string + */ + function getBannerAddress($htmlkey, $object) + { + global $conf, $langs; + + $countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); + + $contactid=0; + $thirdpartyid=0; + if ($this->element == 'societe') + { + $thirdpartyid=$this->id; + } + if ($this->element == 'contact') + { + $contactid=$this->id; + $thirdpartyid=$object->fk_soc; + } + if ($this->element == 'user') + { + $contactid=$this->contact_id; + $thirdpartyid=$object->fk_soc; + } + + $out=''; + + $outdone=0; + $coords = $this->getFullAddress(1,', '); + if ($coords) + { + if (! empty($conf->use_javascript_ajax)) + { + $namecoords = $this->getFullName($langs,1).'
'.$coords; + // hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile + $out.='
'; + $out.=img_picto($langs->trans("Address"), 'object_address.png'); + $out.=' '; + } + $out.=dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1); $outdone++; + $outdone++; + } + + if (! in_array($this->country_code,$countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) + && ! empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state) + { + $out.=($outdone?'
':'').$this->state; + $outdone++; + } + + if (! empty($this->phone_pro) || ! empty($this->phone_mobile) || ! empty($this->phone_perso) || ! empty($this->fax) || ! empty($this->office_phone) || ! empty($this->user_mobile) || ! empty($this->office_fax)) $out.=($outdone?'
':''); + if (! empty($this->phone) && empty($this->phone_pro)) { // For objects that store pro phone into ->phone + $out.=dol_print_phone($this->phone,$this->country_code,$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++; + } + if (! empty($this->phone_pro)) { + $out.=dol_print_phone($this->phone_pro,$this->country_code,$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++; + } + if (! empty($this->phone_mobile)) { + $out.=dol_print_phone($this->phone_mobile,$this->country_code,$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhoneMobile")); $outdone++; + } + if (! empty($this->phone_perso)) { + $out.=dol_print_phone($this->phone_perso,$this->country_code,$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePerso")); $outdone++; + } + if (! empty($this->fax)) { + $out.=dol_print_phone($this->fax,$this->country_code,$contactid,$thirdpartyid,'AC_FAX',' ','fax',$langs->trans("Fax")); $outdone++; + } + if (! empty($this->office_phone)) { + $out.=dol_print_phone($this->office_phone,$this->country_code,$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhonePro")); $outdone++; + } + if (! empty($this->user_mobile)) { + $out.=dol_print_phone($this->user_mobile,$this->country_code,$contactid,$thirdpartyid,'AC_TEL',' ','phone',$langs->trans("PhoneMobile")); $outdone++; + } + if (! empty($this->office_fax)) { + $out.=dol_print_phone($this->fax,$this->country_code,$contactid,$thirdpartyid,'AC_FAX',' ','fax',$langs->trans("Fax")); $outdone++; + } + + $out.='
'; + $outdone=0; + if (! empty($this->email)) + { + $out.=dol_print_email($this->email,$this->id,$object->id,'AC_EMAIL',0,0,1); + $outdone++; + } + if (! empty($this->url)) + { + $out.=dol_print_url($this->url,'',0,1); + $outdone++; + } + if (! empty($conf->skype->enabled)) + { + $out.='
'; + if ($this->skype) $out.=dol_print_skype($this->skype,$this->id,$object->id,'AC_SKYPE'); + $outdone++; + } + + $out.=''; + + return $out; + } + /** * Add a link between element $this->element and a contact * @@ -1287,6 +1395,8 @@ abstract class CommonObject if ($this->db->query($sql)) { $this->mode_reglement_id = $id; + // for supplier + if (get_class($this) == 'Fournisseur') $this->mode_reglement_supplier_id = $id; return 1; } else @@ -1304,6 +1414,108 @@ abstract class CommonObject } } + /** + * Change the multicurrency code + * + * @param string $code multicurrency code + * @return int >0 if OK, <0 if KO + */ + function setMulticurrencyCode($code) + { + dol_syslog(get_class($this).'::setMulticurrencyCode('.$id.')'); + if ($this->statut >= 0 || $this->element == 'societe') + { + $fieldname = 'multicurrency_code'; + + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' SET '.$fieldname.' = "'.$this->db->escape($code).'"'; + $sql .= ' WHERE rowid='.$this->id; + + if ($this->db->query($sql)) + { + $this->multicurrency_code = $code; + + list($fk_multicurrency, $rate) = MultiCurrency::getIdAndTxFromCode($this->db, $code); + if ($rate) $this->setMulticurrencyRate($rate); + + return 1; + } + else + { + dol_syslog(get_class($this).'::setMulticurrencyCode Erreur '.$sql.' - '.$this->db->error()); + $this->error=$this->db->error(); + return -1; + } + } + else + { + dol_syslog(get_class($this).'::setMulticurrencyCode, status of the object is incompatible'); + $this->error='Status of the object is incompatible '.$this->statut; + return -2; + } + } + + /** + * Change the multicurrency rate + * + * @param double $rate multicurrency rate + * @return int >0 if OK, <0 if KO + */ + function setMulticurrencyRate($rate) + { + dol_syslog(get_class($this).'::setMulticurrencyRate('.$id.')'); + if ($this->statut >= 0 || $this->element == 'societe') + { + $fieldname = 'multicurrency_tx'; + + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' SET '.$fieldname.' = '.$rate; + $sql .= ' WHERE rowid='.$this->id; + + if ($this->db->query($sql)) + { + $this->multicurrency_tx = $rate; + + // Update line price + if (!empty($this->lines)) + { + foreach ($this->lines as &$line) + { + switch ($this->element) { + case 'propal': + $this->updateline($line->id, $line->subprice, $line->qty, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, $line->skip_update_total, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit); + break; + case 'commande': + $this->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->date_start, $line->date_end, $line->product_type, $line->fk_parent_line, $line->skip_update_total, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->fk_unit); + break; + case 'facture': + $this->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, $line->skip_update_total, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); + break; + default: + dol_syslog(get_class($this).'::setMulticurrencyRate no updateline defined', LOG_DEBUG); + break; + } + + } + } + + return 1; + } + else + { + dol_syslog(get_class($this).'::setMulticurrencyRate Erreur '.$sql.' - '.$this->db->error()); + $this->error=$this->db->error(); + return -1; + } + } + else + { + dol_syslog(get_class($this).'::setMulticurrencyRate, status of the object is incompatible'); + $this->error='Status of the object is incompatible '.$this->statut; + return -2; + } + } + /** * Change the payments terms * @@ -1327,6 +1539,8 @@ abstract class CommonObject if ($this->db->query($sql)) { $this->cond_reglement_id = $id; + // for supplier + if (get_class($this) == 'Fournisseur') $this->cond_reglement_supplier_id = $id; $this->cond_reglement = $id; // for compatibility return 1; } @@ -1403,6 +1617,36 @@ abstract class CommonObject } + /** + * Change the warehouse + * + * @param int $warehouse_id Id of warehouse + * @return int 1 if OK, 0 if KO + */ + function setWarehouse($warehouse_id) + { + if (! $this->table_element) { + dol_syslog(get_class($this)."::setWarehouse was called on objet with property table_element not defined",LOG_ERR); + return -1; + } + if ($warehouse_id<0) $warehouse_id='NULL'; + dol_syslog(get_class($this).'::setWarehouse('.$warehouse_id.')'); + + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; + $sql.= " SET fk_warehouse = ".$warehouse_id; + $sql.= " WHERE rowid=".$this->id; + + if ($this->db->query($sql)) { + $this->warehouse_id = ($warehouse_id=='NULL')?null:$warehouse_id; + return 1; + } else { + dol_syslog(get_class($this).'::setWarehouse Error ', LOG_DEBUG); + $this->error=$this->db->error(); + return 0; + } + } + + /** * Set last model used by doc generator * @@ -1912,7 +2156,7 @@ abstract class CommonObject $forcedroundingmode=$roundingadjust; if ($forcedroundingmode == 'auto' && isset($conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND)) $forcedroundingmode=$conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND; - if ($forcedroundingmode == 'auto') $forcedroundingmode='0'; + elseif ($forcedroundingmode == 'auto') $forcedroundingmode='0'; $error=0; @@ -1933,6 +2177,8 @@ abstract class CommonObject $sql = 'SELECT rowid, qty, '.$fieldup.' as up, remise_percent, total_ht, '.$fieldtva.' as total_tva, total_ttc, '.$fieldlocaltax1.' as total_localtax1, '.$fieldlocaltax2.' as total_localtax2,'; $sql.= ' tva_tx as vatrate, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, info_bits, product_type'; + if ($this->table_element_line == 'facturedet') $sql.= ', situation_percent'; + $sql.= ', multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc'; $sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line; $sql.= ' WHERE '.$this->fk_element.' = '.$this->id; if ($exclspec) @@ -1955,6 +2201,9 @@ abstract class CommonObject $total_ht_by_vats = array(); $total_tva_by_vats = array(); $total_ttc_by_vats = array(); + $this->multicurrency_total_ht = 0; + $this->multicurrency_total_tva = 0; + $this->multicurrency_total_ttc = 0; $num = $this->db->num_rows($resql); $i = 0; @@ -1963,11 +2212,11 @@ abstract class CommonObject $obj = $this->db->fetch_object($resql); // Note: There is no check on detail line and no check on total, if $forcedroundingmode = 'none' - + $multicurrency_tx = !empty($this->multicurrency_tx) ? $this->multicurrency_tx : 1; if ($forcedroundingmode == '0') // Check if data on line are consistent. This may solve lines that were not consistent because set with $forcedroundingmode='auto' { $localtax_array=array($obj->localtax1_type,$obj->localtax1_tx,$obj->localtax2_type,$obj->localtax2_tx); - $tmpcal=calcul_price_total($obj->qty, $obj->up, $obj->remise_percent, $obj->vatrate, $obj->localtax1_tx, $obj->localtax2_tx, 0, 'HT', $obj->info_bits, $obj->product_type, $seller, $localtax_array); + $tmpcal=calcul_price_total($obj->qty, $obj->up, $obj->remise_percent, $obj->vatrate, $obj->localtax1_tx, $obj->localtax2_tx, 0, 'HT', $obj->info_bits, $obj->product_type, $seller, $localtax_array, (isset($obj->situation_percent) ? $obj->situation_percent : 100), $multicurrency_tx); $diff=price2num($tmpcal[1] - $obj->total_tva, 'MT', 1); if ($diff) { @@ -1986,6 +2235,7 @@ abstract class CommonObject $this->total_localtax1 += $obj->total_localtax1; $this->total_localtax2 += $obj->total_localtax2; $this->total_ttc += $obj->total_ttc; + if (! isset($total_ht_by_vats[$obj->vatrate])) $total_ht_by_vats[$obj->vatrate]=0; if (! isset($total_tva_by_vats[$obj->vatrate])) $total_tva_by_vats[$obj->vatrate]=0; if (! isset($total_ttc_by_vats[$obj->vatrate])) $total_ttc_by_vats[$obj->vatrate]=0; @@ -2031,7 +2281,12 @@ abstract class CommonObject $this->total_ttc -= $sit->total_ttc; } } - + + // Multicurrency + $this->multicurrency_total_ht += $this->total_ht * $multicurrency_tx; + $this->multicurrency_total_tva += $this->total_tva * $multicurrency_tx; + $this->multicurrency_total_ttc += $this->total_ttc * $multicurrency_tx; + $this->db->free($resql); // Now update global field total_ht, total_ttc and tva @@ -2045,7 +2300,7 @@ abstract class CommonObject if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier') $fieldtva='total_tva'; if ($this->element == 'propal') $fieldttc='total'; if ($this->element == 'expensereport') $fieldtva='total_tva'; - if ($this->element == 'askpricesupplier') $fieldttc='total'; + if ($this->element == 'supplier_proposal') $fieldttc='total'; if (empty($nodatabaseupdate)) { @@ -2055,6 +2310,9 @@ abstract class CommonObject $sql .= " ".$fieldlocaltax1."='".price2num($this->total_localtax1)."',"; $sql .= " ".$fieldlocaltax2."='".price2num($this->total_localtax2)."',"; $sql .= " ".$fieldttc."='".price2num($this->total_ttc)."'"; + $sql .= ", multicurrency_total_ht='".price2num($this->multicurrency_total_ht, 'MT', 1)."'"; + $sql .= ", multicurrency_total_tva='".price2num($this->multicurrency_total_tva, 'MT', 1)."'"; + $sql .= ", multicurrency_total_ttc='".price2num($this->multicurrency_total_ttc, 'MT', 1)."'"; $sql .= ' WHERE rowid = '.$this->id; //print "xx".$sql; @@ -2127,13 +2385,18 @@ abstract class CommonObject /** * Fetch array of objects linked to current object. Links are loaded into this->linkedObjects array and this->linkedObjectsIds - * - * @param int $sourceid Object source id - * @param string $sourcetype Object source type - * @param int $targetid Object target id - * @param string $targettype Object target type + * Possible usage for parameters: + * - all parameters empty -> we look all link to current object (current object can be source or target) + * - one couple id+type is provided -> this will set $justsource or $justtarget + * - one couple id+type is provided and other type is provided -> this will set $justsource or $justtarget + criteria on other type + * + * + * @param int $sourceid Object source id (if not defined, id of object) + * @param string $sourcetype Object source type (if not defined, element name of object) + * @param int $targetid Object target id (if not defined, id of object) + * @param string $targettype Object target type (if not defined, elemennt name of object) * @param string $clause 'OR' or 'AND' clause used when both source id and target id are provided - * @param int $alsosametype 0=Return only links to different object than source. 1=Include also link to objects of same type. + * @param int $alsosametype 0=Return only links to object that differs from source. 1=Include also link to objects of same type. * @return void * @see add_object_linked, updateObjectLinked, deleteObjectLinked */ @@ -2151,12 +2414,12 @@ abstract class CommonObject if (! empty($sourceid) && ! empty($sourcetype) && empty($targetid)) { - $justsource=true; + $justsource=true; // the source (id and type) is a search criteria if (! empty($targettype)) $withtargettype=true; } if (! empty($targetid) && ! empty($targettype) && empty($sourceid)) { - $justtarget=true; + $justtarget=true; // the target (id and type) is a search criteria if (! empty($sourcetype)) $withsourcetype=true; } @@ -2205,13 +2468,27 @@ abstract class CommonObject while ($i < $num) { $obj = $this->db->fetch_object($resql); - if ($obj->fk_source == $sourceid) + if ($justsource || $justtarget) { - $this->linkedObjectsIds[$obj->targettype][$obj->rowid]=$obj->fk_target; + if ($justsource) + { + $this->linkedObjectsIds[$obj->targettype][$obj->rowid]=$obj->fk_target; + } + else if ($justtarget) + { + $this->linkedObjectsIds[$obj->sourcetype][$obj->rowid]=$obj->fk_source; + } } - if ($obj->fk_target == $targetid) + else { - $this->linkedObjectsIds[$obj->sourcetype][$obj->rowid]=$obj->fk_source; + if ($obj->fk_source == $sourceid && $obj->sourcetype == $sourcetype) + { + $this->linkedObjectsIds[$obj->targettype][$obj->rowid]=$obj->fk_target; + } + if ($obj->fk_target == $targetid && $obj->targettype == $targettype) + { + $this->linkedObjectsIds[$obj->sourcetype][$obj->rowid]=$obj->fk_source; + } } $i++; } @@ -2222,14 +2499,14 @@ abstract class CommonObject { // Parse element/subelement (ex: project_task) $module = $element = $subelement = $objecttype; - if ($objecttype != 'order_supplier' && $objecttype != 'invoice_supplier' && preg_match('/^([^_]+)_([^_]+)/i',$objecttype,$regs)) + if ($objecttype != 'supplier_proposal' && $objecttype != 'order_supplier' && $objecttype != 'invoice_supplier' + && preg_match('/^([^_]+)_([^_]+)/i',$objecttype,$regs)) { $module = $element = $regs[1]; $subelement = $regs[2]; } $classpath = $element.'/class'; - // To work with non standard classpath or module name if ($objecttype == 'facture') { $classpath = 'compta/facture/class'; @@ -2237,8 +2514,8 @@ abstract class CommonObject else if ($objecttype == 'propal') { $classpath = 'comm/propal/class'; } - else if ($objecttype == 'askpricesupplier') { - $classpath = 'comm/askpricesupplier/class'; + else if ($objecttype == 'supplier_proposal') { + $classpath = 'supplier_proposal/class'; } else if ($objecttype == 'shipping') { $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; @@ -2265,7 +2542,10 @@ abstract class CommonObject else if ($objecttype == 'order_supplier') { $classfile = 'fournisseur.commande'; $classname = 'CommandeFournisseur'; } - + else if ($objecttype == 'supplier_proposal') { + $classfile = 'supplier_proposal'; $classname = 'SupplierProposal'; + } + // Here $module, $classfile and $classname are set if ($conf->$module->enabled && (($element != $this->element) || $alsosametype)) { @@ -2433,6 +2713,7 @@ abstract class CommonObject $error = 0; $trigkey=''; + if ($this->element == 'supplier_proposal' && $status == 2) $trigkey='SUPPLIER_PROPOSAL_CLOSE'; if ($this->element == 'fichinter' && $status == 2) $trigkey='FICHINTER_CLASSIFY_BILLED'; if ($this->element == 'fichinter' && $status == 1) $trigkey='FICHINTER_CLASSIFY_UNBILLED'; @@ -2709,6 +2990,7 @@ abstract class CommonObject } else { + $this->errors[] = $this->db->lasterror(); return false; } } @@ -2746,6 +3028,7 @@ abstract class CommonObject } else { + $this->errors[] = $this->db->lasterror(); return -1; } } @@ -2755,6 +3038,7 @@ abstract class CommonObject /** * Return if a country is inside the EEC (European Economic Community) + * TODO Add a field into dictionary * * @return boolean true = country inside EEC, false = country outside EEC */ @@ -2776,7 +3060,8 @@ abstract class CommonObject 'FR', // France 'GB', // United Kingdom 'GR', // Greece - 'NL', // Holland + 'HR', // Croatia + 'NL', // Holland 'HU', // Hungary 'IE', // Ireland 'IM', // Isle of Man - Included in UK @@ -2786,7 +3071,7 @@ abstract class CommonObject 'LV', // Latvia 'MC', // Monaco - Included in France 'MT', // Malta - //'NO', // Norway + //'NO', // Norway 'PL', // Poland 'PT', // Portugal 'RO', // Romania @@ -2806,10 +3091,11 @@ abstract class CommonObject // -------------------- /** - * Show linked object block. + * Show linked object block. * - * @return int <0 if KO, >0 if OK - * @deprecated 3.8 Use instead $form->shoLinkedObjectBlock($object) + * @return int <0 if KO, >0 if OK + * @deprecated 3.8 Use instead $form->showLinkedObjectBlock($object) + * @see Form::showLinkedObjectBlock */ function showLinkedObjectBlock() { @@ -2881,60 +3167,66 @@ abstract class CommonObject print '
'; - if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print ''; + if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print ''; // Description - print ''; + print ''; - if ($this->element == 'askpricesupplier') + if ($this->element == 'supplier_proposal') { - print ''; + print ''; } // VAT - print ''; + print ''; // Price HT - print ''; + print ''; + // Multicurrency + if (!empty($conf->multicurrency->enabled)) print ''; + if ($inputalsopricewithtax) print ''; // Qty - print ''; + print ''; if($conf->global->PRODUCT_USE_UNITS) { - print ''; + print ''; } // Reduction short - print ''; + print ''; if ($this->situation_cycle_ref) { - print ''; + print ''; } if ($usemargins && ! empty($conf->margin->enabled) && empty($user->societe_id)) { if ($conf->global->MARGIN_TYPE == "1") - print ''; + print ''; else - print ''; + print ''; if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) - print ''; + print ''; if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) - print ''; + print ''; } // Total HT - print ''; + print ''; - print ''; // No width to allow autodim + // Multicurrency + if (!empty($conf->multicurrency->enabled)) print ''; - print ''; + print ''; // No width to allow autodim - print ''; + print ''; + + print ''; print "\n"; @@ -2954,20 +3246,21 @@ abstract class CommonObject $var=!$var; - if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line))) + //if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line))) + if (is_object($hookmanager)) // Old code is commented on preceding line. { if (empty($line->fk_parent_line)) { $parameters = array('line'=>$line,'var'=>$var,'num'=>$num,'i'=>$i,'dateSelector'=>$dateSelector,'seller'=>$seller,'buyer'=>$buyer,'selected'=>$selected, 'extrafieldsline'=>$extrafieldsline); - $hookmanager->executeHooks('printObjectLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + $reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks } else { $parameters = array('line'=>$line,'var'=>$var,'num'=>$num,'i'=>$i,'dateSelector'=>$dateSelector,'seller'=>$seller,'buyer'=>$buyer,'selected'=>$selected, 'extrafieldsline'=>$extrafieldsline); - $hookmanager->executeHooks('printObjectSubLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + $reshook = $hookmanager->executeHooks('printObjectSubLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks } } - else + if (empty($reshook)) { $this->printObjectLine($action,$line,$var,$num,$i,$dateSelector,$seller,$buyer,$selected,$extrafieldsline); } @@ -3017,6 +3310,9 @@ abstract class CommonObject { $product_static = new Product($this->db); $product_static->fetch($line->fk_product); + + $product_static->ref = $line->ref; //can change ref in hook + $product_static->label = $line->label; //can change label in hook $text=$product_static->getNomUrl(1); // Define output language and label @@ -3113,6 +3409,7 @@ abstract class CommonObject print ''; print ''; print ''; + if (!empty($conf->multicurrency->enabled)) print ''; print ''; if($conf->global->PRODUCT_USE_UNITS) { @@ -3243,6 +3540,7 @@ abstract class CommonObject $this->tpl['vat_rate'] = vatrate($line->tva_tx, true); $this->tpl['price'] = price($line->subprice); + $this->tpl['multicurrency_price'] = price($line->multicurrency_subprice); $this->tpl['qty'] = (($line->info_bits & 2) != 2) ? $line->qty : ' '; if($conf->global->PRODUCT_USE_UNITS) $this->tpl['unit'] = $line->getLabelOfUnit('long'); $this->tpl['remise_percent'] = (($line->info_bits & 2) != 2) ? vatrate($line->remise_percent, true) : ' '; @@ -3438,7 +3736,6 @@ abstract class CommonObject require_once $file; $obj = new $classname($this->db); - //$obj->message = $message; // If generator is ODT, we must have srctemplatepath defined, if not we set it. if ($obj->type == 'odt' && empty($srctemplatepath)) @@ -3550,7 +3847,47 @@ abstract class CommonObject /* Functions common to commonobject and commonobjectline */ + /* For default values */ + /** + * Return the default value to use for a field when showing the create form of object. + * Return values in this order: + * 1) If parameter is available into POST, we return it first. + * 2) If not but an alternate value was provided as parameter of function, we return it. + * 3) If not but a constant $conf->global->OBJECTELEMENT_FIELDNAME is set, we return it (It is better to use the dedicated table). + * 4) Return value found into database (TODO No yet implemented) + * + * @param string $fieldname Name of field + * @param string $alternatevalue Alternate value to use + * @return string Default value + **/ + function getDefaultCreateValueFor($fieldname, $alternatevalue=null) + { + global $conf, $_POST; + + // If param is has been posted with use this value first. + if (isset($_POST[$fieldname])) return GETPOST($fieldname, 2); + + if (isset($alternatevalue)) return $alternatevalue; + + $newelement=$this->element; + if ($newelement == 'facture') $newelement='invoice'; + if ($newelement == 'commande') $newelement='order'; + if (empty($newelement)) + { + dol_syslog("Ask a default value using common method getDefaultCreateValueForField on an object with no property ->element defined. Return empty string.", LOG_WARNING); + return ''; + } + + $keyforfieldname=strtoupper($newelement.'_DEFAULT_'.$fieldname); + //var_dump($keyforfieldname); + if (isset($conf->global->$keyforfieldname)) return $conf->global->$keyforfieldname; + + // TODO Ad here a scan into table llx_overwrite_default with a filter on $this->element and $fieldname + + } + + /* For triggers */ @@ -3638,10 +3975,10 @@ abstract class CommonObject foreach ($tab as $key => $value) { - // Test fetch_array ! is_int($key) because fetch_array seult is a mix table with Key as alpha and Key as int (depend db engine) + // Test fetch_array ! is_int($key) because fetch_array result is a mix table with Key as alpha and Key as int (depend db engine) if ($key != 'rowid' && $key != 'tms' && $key != 'fk_member' && ! is_int($key)) { - // we can add this attribute to adherent object + // we can add this attribute to object $this->array_options["options_".$key]=$value; } } @@ -3689,7 +4026,7 @@ abstract class CommonObject /** * Add/Update all extra fields values for the current object. * Data to describe values to insert/update are stored into $this->array_options=array('options_codeforfield1'=>'valueforfield1', 'options_codeforfield2'=>'valueforfield2', ...) - * This function delte record with all extrafields and insert them again from the array $this->array_options. + * This function delete record with all extrafields and insert them again from the array $this->array_options. * * @return int -1=error, O=did nothing, 1=OK */ @@ -3743,12 +4080,25 @@ abstract class CommonObject // 1 : classPath $InfoFieldList = explode(":", $param_list[0]); dol_include_once($InfoFieldList[1]); - $object = new $InfoFieldList[0]($this->db); - if ($value) - { - $object->fetch(0,$value); - $this->array_options[$key]=$object->id; - } + if ($InfoFieldList[0] && class_exists($InfoFieldList[0])) + { + $object = new $InfoFieldList[0]($this->db); + if ($value) + { + $res=$object->fetch(0,$value); + if ($res > 0) $this->array_options[$key]=$object->id; + else + { + $this->error="Ref '".$value."' for object '".$object->element."' not found"; + $this->db->rollback(); + return -1; + } + } + } + else + { + dol_syslog('Error bad setup of extrafield', LOG_WARNING); + } break; } } @@ -3858,6 +4208,7 @@ abstract class CommonObject else { $csstyle=''; + $class=(!empty($extrafields->attribute_hidden[$key]) ? 'class="hideobject" ' : ''); if (is_array($params) && count($params)>0) { if (array_key_exists('style',$params)) { $csstyle=$params['style']; @@ -3865,12 +4216,12 @@ abstract class CommonObject } if ( !empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { - $out .= ''; + $out .= ''; $colspan='0'; } else { - $out .= ''; + $out .= ''; } // Convert date into timestamp format if (in_array($extrafields->attribute_type[$key],array('date','datetime'))) @@ -3879,17 +4230,18 @@ abstract class CommonObject } if($extrafields->attribute_required[$key]) - $label = ''.$label.''; + $label = ''.$label.''; $out .= ''; - $out .=''; + $html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : ''; + $out .=''; @@ -82,13 +83,20 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; $formactions=new FormActions($db); + // Type print ''; print ''; + // Status print ''; print '"; // Project status @@ -395,7 +399,12 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t // Date end print ''; $plannedworkloadoutputformat='allhourmin'; @@ -416,14 +425,6 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t //else print '--:--'; print ''; - // Progress declared - print ''; - // Time spent print ''; + // Progress declared + print ''; + // Tick to drag and drop if ($addordertick) { @@ -453,9 +462,13 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if (! $showlineingray) $inc++; - $level++; - if ($lines[$i]->id) projectLinesa($inc, $lines[$i]->id, $lines, $level, $var, $showproject, $taskrole, $projectsListId, $addordertick); - $level--; + if ($level >= 0) // Call sublevels + { + $level++; + if ($lines[$i]->id) projectLinesa($inc, $lines[$i]->id, $lines, $level, $var, $showproject, $taskrole, $projectsListId, $addordertick); + $level--; + } + $total_projectlinesa_spent += $lines[$i]->duration; $total_projectlinesa_planned += $lines[$i]->planned_workload; if ($lines[$i]->planned_workload) $total_projectlinesa_spent_if_planned += $lines[$i]->duration; @@ -467,7 +480,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } } - if (($total_projectlinesa_planned > 0 || $total_projectlinesa_spent > 0) && $level==0) + if (($total_projectlinesa_planned > 0 || $total_projectlinesa_spent > 0) && $level <= 0) { print ''; print ''; @@ -478,13 +491,13 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print ''; - print ''; print ''; print ''; + print ''; if ($addordertick) print ''; print ''; } @@ -794,17 +807,19 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ $dayWorkLoad = $projectstatic->weekWorkLoadPerTask[$tmpday][$lines[$i]->id]; $alreadyspent=''; if ($dayWorkLoad > 0) $alreadyspent=convertSecondToTime($dayWorkLoad,'allhourmin'); - $tableCell =''; print $tableCell; } @@ -874,20 +889,22 @@ function searchTaskInChild(&$inc, $parent, &$lines, &$taskrole) * @param DoliDB $db Database handler * @param Form $form Object form * @param int $socid Id thirdparty - * @param int $projectsListId Id of project i have permission on - * @param int $mytasks Limited to task i am contact to + * @param int $projectsListId Id of project I have permission on + * @param int $mytasks Limited to task I am contact to * @param int $statut -1=No filter on statut, 0 or 1 = Filter on status * @param array $listofoppstatus List of opportunity status + * @param array $hiddenfields List of info to not show ('projectlabel', 'declaredprogress', '...', ) * @return void */ -function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=0, $statut=-1, $listofoppstatus=array()) +function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks=0, $statut=-1, $listofoppstatus=array(),$hiddenfields=array()) { global $langs,$conf,$user,$bc; require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $projectstatic=new Project($db); - + $thirdpartystatic=new Societe($db); + $sortfield=''; $sortorder=''; $project_year_filter=0; @@ -895,19 +912,10 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= $title=$langs->trans("Projects"); if (strcmp($statut, '') && $statut >= 0) $title=$langs->trans("Projects").' '.$langs->trans($projectstatic->statuts_long[$statut]); + $arrayidtypeofcontact=array(); + print '
  '.$langs->trans('Description').''.$langs->trans('Description').''.$langs->trans("AskPriceSupplierRefFourn").''.$langs->trans("SupplierProposalRefFourn").''.$langs->trans('VAT').''.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('PriceUHT').''.$langs->trans('PriceUHTCurrency').''.$langs->trans('PriceUTTC').''.$langs->trans('Qty').''.$langs->trans('Qty').''.$langs->trans('Unit').''.$langs->trans('Unit').''.$langs->trans('ReductionShort').''.$langs->trans('ReductionShort').'' . $langs->trans('Progress') . '' . $langs->trans('Progress') . ''.$langs->trans('BuyingPrice').''.$langs->trans('BuyingPrice').''.$langs->trans('CostPrice').''.$langs->trans('CostPrice').''.$langs->trans('MarginRate').''.$langs->trans('MarginRate').''.$langs->trans('MarkRate').''.$langs->trans('MarkRate').''.$langs->trans('TotalHTShort').''.$langs->trans('TotalHTShort').''.$langs->trans('TotalHTShortCurrency').'
'.$langs->trans('Description').''.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('PriceUHTCurrency').''.$langs->trans('Qty').'
'.$langs->trans($label).''; switch($mode) { case "view": $out .= $extrafields->showOutputField($key,$value); break; case "edit": - $out .= $extrafields->showInputField($key,$value,'',$keyprefix); + $out .= $extrafields->showInputField($key,$value,'',$keyprefix,'',0,$this->id); break; } @@ -3970,4 +4322,86 @@ abstract class CommonObject return true; } + + /** + * Get buy price to use for margin calculation. This function is called when buy price is unknown. + * set buy price = sell price if ForceBuyingPriceIfNull configured, + * else if calculation MARGIN_TYPE = 'costprice' and costprice is defined, use costprice as buyprice + * else if calculation MARGIN_TYPE = 'pmp' and pmp is calculated, use pmp as buyprice + * else set min buy price as buy price + * + * @param float $unitPrice product unit price + * @param float $discountPercent line discount percent + * @param int $fk_product product id + * + * @return float <0 if ko, buyprice if ok + */ + public function defineBuyPrice($unitPrice = 0, $discountPercent = 0, $fk_product = 0) + { + global $conf; + + $buyPrice = 0; + + if (($unitPrice > 0) && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) // In most cases, test here is false + { + $buyPrice = $unitPrice * (1 - $discountPercent / 100); + } + else + { + // Get cost price for margin calculation + if (! empty($fk_product)) + { + if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'costprice') + { + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; + $product = new Product($this->db); + $result = $product->fetch($fk_product); + if ($result <= 0) + { + $this->errors[] = 'ErrorProductIdDoesNotExists'; + return -1; + } + if ($product->cost_price > 0) + { + $buyPrice = $product->cost_price; + } + else if ($product->pmp > 0) + { + $buyPrice = $product->pmp; + } + } + else if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') + { + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; + $product = new Product($this->db); + $result = $product->fetch($fk_product); + if ($result <= 0) + { + $this->errors[] = 'ErrorProductIdDoesNotExists'; + return -1; + } + if ($product->pmp > 0) + { + $buyPrice = $product->pmp; + } + } + + if (empty($buyPrice) && isset($conf->global->MARGIN_TYPE) && in_array($conf->global->MARGIN_TYPE, array('1','pmp','costprice'))) + { + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; + $productFournisseur = new ProductFournisseur($this->db); + if (($result = $productFournisseur->find_min_price_product_fournisseur($fk_product)) > 0) + { + $buyPrice = $productFournisseur->fourn_price; + } + else if ($result < 0) + { + $this->errors[] = $productFournisseur->error; + return -2; + } + } + } + } + return $buyPrice; + } } diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php index ef854a2452e..94c7b7bf860 100644 --- a/htdocs/core/class/commonobjectline.class.php +++ b/htdocs/core/class/commonobjectline.class.php @@ -43,9 +43,6 @@ abstract class CommonObjectLine extends CommonObject */ public $rowid; - //! Database handler - public $db; - /** * Product/service unit code ('km', 'm', 'p', ...) * @var string @@ -69,8 +66,6 @@ abstract class CommonObjectLine extends CommonObject $langs->load('products'); - $this->db->begin(); - $label_type = 'label'; if ($type == 'short') diff --git a/htdocs/core/class/commonorder.class.php b/htdocs/core/class/commonorder.class.php index 5309b5524ee..74d14af0819 100644 --- a/htdocs/core/class/commonorder.class.php +++ b/htdocs/core/class/commonorder.class.php @@ -137,36 +137,6 @@ abstract class CommonOrderLine extends CommonObjectLine public $localtax1_type; public $localtax2_type; - /** - * Total amount before taxes - * @var float - */ - public $total_ht; - - /** - * Total VAT amount - * @var float - */ - public $total_tva; - - /** - * Total local tax 1 amount - * @var float - */ - public $total_localtax1; - - /** - * Total local tax 2 amount - * @var float - */ - public $total_localtax2; - - /** - * Total amount with taxes - * @var float - */ - public $total_ttc; - /** * Liste d'options cumulables: * Bit 0: 0 si TVA normal - 1 si TVA NPR diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 63b07830f40..0b55e2cc814 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -193,6 +193,7 @@ class Conf { $modulename=strtolower($reg[1]); if ($modulename == 'propale') $modulename='propal'; + if ($modulename == 'supplierproposal') $modulename='supplier_proposal'; if (! isset($this->$modulename) || ! is_object($this->$modulename)) $this->$modulename=new stdClass(); $this->$modulename->enabled=true; $this->modules[]=$modulename; // Add this module in list of enabled modules @@ -204,6 +205,17 @@ class Conf $db->free($resql); } + // Include local constants files and fetch their values to the corresponding database constants + if(! empty($this->global->LOCAL_CONSTS_FILES)) { + $filesList = explode(":", $this->global->LOCAL_CONSTS_FILES); + foreach ($filesList as $file) { + $file=dol_sanitizeFileName($file); + include_once DOL_DOCUMENT_ROOT . "/$file/{$file}_consts.php"; + foreach ($file2bddconsts as $key=>$value) { + $conf->global->$key=constant($value); + } + } + } //var_dump($this->modules); //var_dump($this->modules_parts['theme']); @@ -330,6 +342,19 @@ class Conf $this->fournisseur->facture=new stdClass(); $this->fournisseur->facture->dir_output =$rootfordata."/fournisseur/facture"; $this->fournisseur->facture->dir_temp =$rootfordata."/fournisseur/facture/temp"; + + // To prepare split of module fournisseur into fournisseur + supplier_order + supplier_invoice + if (! empty($this->fournisseur->enabled) && empty($this->global->MAIN_USE_NEW_SUPPLIERMOD)) // By default, if module supplier is on, we set new properties + { + $this->supplier_order=new stdClass(); + $this->supplier_order->enabled=1; + $this->supplier_order->dir_output=$rootfordata."/fournisseur/commande"; + $this->supplier_order->dir_temp=$rootfordata."/fournisseur/commande/temp"; + $this->supplier_invoice=new stdClass(); + $this->supplier_invoice->enabled=1; + $this->supplier_order->dir_output=$rootfordata."/fournisseur/facture"; + $this->supplier_order->dir_temp=$rootfordata."/fournisseur/facture/temp"; + } } // Module product/service @@ -346,6 +371,9 @@ class Conf // Module contrat $this->contrat->dir_output=$rootfordata."/contracts"; $this->contrat->dir_temp =$rootfordata."/contracts/temp"; + // Module bank + $this->bank->dir_output=$rootfordata."/bank"; + $this->bank->dir_temp =$rootfordata."/bank/temp"; // Set some default values @@ -390,6 +418,9 @@ class Conf // By default, suppliers objects can be linked to all projects $this->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS = 1; + // MAIN_HTML_TITLE + if (! isset($conf->global->MAIN_HTML_TITLE)) $conf->global->MAIN_HTML_TITLE='noapp,thirdpartynameonly,contactnameonly,projectnameonly'; + // conf->liste_limit = constante de taille maximale des listes if (empty($this->global->MAIN_SIZE_LISTE_LIMIT)) $this->global->MAIN_SIZE_LISTE_LIMIT=25; $this->liste_limit=$this->global->MAIN_SIZE_LISTE_LIMIT; @@ -415,7 +446,8 @@ class Conf // conf->mailing->email_from = email pour envoi par Dolibarr des mailings $this->mailing->email_from=$this->email_from; if (! empty($this->global->MAILING_EMAIL_FROM)) $this->mailing->email_from=$this->global->MAILING_EMAIL_FROM; - + if (! isset($conf->global->MAIN_EMAIL_ADD_TRACK_ID)) $conf->global->MAIN_EMAIL_ADD_TRACK_ID=1; + // Format for date (used by default when not found or not searched in lang) $this->format_date_short="%d/%m/%Y"; // Format of day with PHP/C tags (strftime functions) $this->format_date_short_java="dd/MM/yyyy"; // Format of day with Java tags @@ -436,9 +468,10 @@ class Conf if (! isset($this->global->MAIN_MAX_DECIMALS_TOT)) $this->global->MAIN_MAX_DECIMALS_TOT=2; if (! isset($this->global->MAIN_MAX_DECIMALS_SHOWN)) $this->global->MAIN_MAX_DECIMALS_SHOWN=8; - // Default pdf use dash between lines - if (! isset($this->global->MAIN_PDF_DASH_BETWEEN_LINES)) $this->global->MAIN_PDF_DASH_BETWEEN_LINES=1; - + // Default pdf option + if (! isset($this->global->MAIN_PDF_DASH_BETWEEN_LINES)) $this->global->MAIN_PDF_DASH_BETWEEN_LINES=1; // use dash between lines + if (! isset($this->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) $this->global->PDF_ALLOW_HTML_FOR_FREE_TEXT=1; // allow html content into free footer text + // Set default value to MAIN_SHOW_LOGO if (! isset($this->global->MAIN_SHOW_LOGO)) $this->global->MAIN_SHOW_LOGO=1; @@ -446,10 +479,10 @@ class Conf $this->maxfilesize = (empty($this->global->MAIN_UPLOAD_DOC) ? 0 : $this->global->MAIN_UPLOAD_DOC * 1024); // Define list of limited modules - if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,askpricesupplier,facture,categorie,commande,fournisseur,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda,adherent'; // '' means 'all'. Note that contact is added here as it should be a module later. + if (! isset($this->global->MAIN_MODULES_FOR_EXTERNAL)) $this->global->MAIN_MODULES_FOR_EXTERNAL='user,supplier_proposal,facture,categorie,commande,fournisseur,contact,propal,projet,contrat,societe,ficheinter,expedition,agenda,adherent'; // '' means 'all'. Note that contact is added here as it should be a module later. // Enable select2 - if (empty($this->global->MAIN_USE_JQUERY_MULTISELECT)) $this->global->MAIN_USE_JQUERY_MULTISELECT='select2'; + if (empty($this->global->MAIN_USE_JQUERY_MULTISELECT) || $this->global->MAIN_USE_JQUERY_MULTISELECT == '1') $this->global->MAIN_USE_JQUERY_MULTISELECT='select2'; // Timeouts if (empty($this->global->MAIN_USE_CONNECT_TIMEOUT)) $this->global->MAIN_USE_CONNECT_TIMEOUT=10; @@ -463,33 +496,54 @@ class Conf // Delay before warnings // Avoid strict errors. TODO: Replace xxx->warning_delay with a property ->warning_delay_xxx - $this->propal->cloture = new stdClass(); - $this->propal->facturation = new stdClass(); - $this->commande->client = new stdClass(); - $this->commande->fournisseur = new stdClass(); - $this->facture->client = new stdClass(); - $this->facture->fournisseur = new stdClass(); - $this->contrat->services = new stdClass(); - $this->contrat->services->inactifs = new stdClass(); - $this->contrat->services->expires = new stdClass(); - $this->adherent->cotisation = new stdClass(); - $this->bank->rappro = new stdClass(); - $this->bank->cheque = new stdClass(); - $this->expensereport->payment = new stdClass(); - $this->actions->warning_delay=(isset($this->global->MAIN_DELAY_ACTIONS_TODO)?$this->global->MAIN_DELAY_ACTIONS_TODO:7)*24*60*60; - $this->commande->client->warning_delay=(isset($this->global->MAIN_DELAY_ORDERS_TO_PROCESS)?$this->global->MAIN_DELAY_ORDERS_TO_PROCESS:2)*24*60*60; - $this->commande->fournisseur->warning_delay=(isset($this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS)?$this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS:7)*24*60*60; - $this->propal->cloture->warning_delay=(isset($this->global->MAIN_DELAY_PROPALS_TO_CLOSE)?$this->global->MAIN_DELAY_PROPALS_TO_CLOSE:0)*24*60*60; - $this->propal->facturation->warning_delay=(isset($this->global->MAIN_DELAY_PROPALS_TO_BILL)?$this->global->MAIN_DELAY_PROPALS_TO_BILL:0)*24*60*60; - $this->facture->client->warning_delay=(isset($this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED)?$this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED:0)*24*60*60; - $this->facture->fournisseur->warning_delay=(isset($this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY)?$this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY:0)*24*60*60; - $this->contrat->services->inactifs->warning_delay=(isset($this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES)?$this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES:0)*24*60*60; - $this->contrat->services->expires->warning_delay=(isset($this->global->MAIN_DELAY_RUNNING_SERVICES)?$this->global->MAIN_DELAY_RUNNING_SERVICES:0)*24*60*60; - $this->adherent->cotisation->warning_delay=(isset($this->global->MAIN_DELAY_MEMBERS)?$this->global->MAIN_DELAY_MEMBERS:0)*24*60*60; - $this->bank->rappro->warning_delay=(isset($this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE)?$this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE:0)*24*60*60; - $this->bank->cheque->warning_delay=(isset($this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT)?$this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT:0)*24*60*60; - $this->expensereport->payment->warning_delay=(isset($this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY)?$this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY:0)*24*60*60; - + if (isset($this->agenda)) { + $this->adherent->cotisation = new stdClass(); + $this->adherent->cotisation->warning_delay=(isset($this->global->MAIN_DELAY_MEMBERS)?$this->global->MAIN_DELAY_MEMBERS:0)*24*60*60; + } + if (isset($this->agenda)) $this->agenda->warning_delay=(isset($this->global->MAIN_DELAY_ACTIONS_TODO)?$this->global->MAIN_DELAY_ACTIONS_TODO:7)*24*60*60; + if (isset($this->projet)) + { + $this->projet->warning_delay=(isset($this->global->MAIN_DELAY_PROJECT_TO_CLOSE)?$this->global->MAIN_DELAY_PROJECT_TO_CLOSE:7)*24*60*60; + $this->projet->task = new StdClass(); + $this->projet->task->warning_delay=(isset($this->global->MAIN_DELAY_TASKS_TODO)?$this->global->MAIN_DELAY_ACTIONS_TODO:7)*24*60*60; + } + + if (isset($this->commande)) { + $this->commande->client = new stdClass(); + $this->commande->fournisseur = new stdClass(); + $this->commande->client->warning_delay=(isset($this->global->MAIN_DELAY_ORDERS_TO_PROCESS)?$this->global->MAIN_DELAY_ORDERS_TO_PROCESS:2)*24*60*60; + $this->commande->fournisseur->warning_delay=(isset($this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS)?$this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS:7)*24*60*60; + } + if (isset($this->propal)) { + $this->propal->cloture = new stdClass(); + $this->propal->facturation = new stdClass(); + $this->propal->cloture->warning_delay=(isset($this->global->MAIN_DELAY_PROPALS_TO_CLOSE)?$this->global->MAIN_DELAY_PROPALS_TO_CLOSE:0)*24*60*60; + $this->propal->facturation->warning_delay=(isset($this->global->MAIN_DELAY_PROPALS_TO_BILL)?$this->global->MAIN_DELAY_PROPALS_TO_BILL:0)*24*60*60; + } + if (isset($this->facture)) { + $this->facture->client = new stdClass(); + $this->facture->fournisseur = new stdClass(); + $this->facture->client->warning_delay=(isset($this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED)?$this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED:0)*24*60*60; + $this->facture->fournisseur->warning_delay=(isset($this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY)?$this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY:0)*24*60*60; + } + if (isset($this->contrat)) { + $this->contrat->services = new stdClass(); + $this->contrat->services->inactifs = new stdClass(); + $this->contrat->services->expires = new stdClass(); + $this->contrat->services->inactifs->warning_delay=(isset($this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES)?$this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES:0)*24*60*60; + $this->contrat->services->expires->warning_delay=(isset($this->global->MAIN_DELAY_RUNNING_SERVICES)?$this->global->MAIN_DELAY_RUNNING_SERVICES:0)*24*60*60; + } + if (isset($this->commande)) { + $this->bank->rappro = new stdClass(); + $this->bank->cheque = new stdClass(); + $this->bank->rappro->warning_delay=(isset($this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE)?$this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE:0)*24*60*60; + $this->bank->cheque->warning_delay=(isset($this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT)?$this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT:0)*24*60*60; + } + if (isset($this->expensereport)) { + $this->expensereport->payment = new stdClass(); + $this->expensereport->payment->warning_delay=(isset($this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY)?$this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY:0)*24*60*60; + } + // For modules that want to disable top or left menu if (! empty($this->global->MAIN_HIDE_TOP_MENU)) $this->dol_hide_topmenu=$this->global->MAIN_HIDE_TOP_MENU; if (! empty($this->global->MAIN_HIDE_LEFT_MENU)) $this->dol_hide_leftmenu=$this->global->MAIN_HIDE_LEFT_MENU; diff --git a/htdocs/core/class/cookie.class.php b/htdocs/core/class/cookie.class.php index ba519fab365..1d28861a44e 100644 --- a/htdocs/core/class/cookie.class.php +++ b/htdocs/core/class/cookie.class.php @@ -43,9 +43,10 @@ class DolCookie var $cookie; /** - * Constructor + * Constructor * - * @param string $key Personnal key + * @param string $key Personnal key + * @deprecated */ function __construct($key = '') { diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index db303ee7d1b..35c3b3909ef 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -52,7 +52,7 @@ class DolEditor * @param string $content Content of WYSIWIG field * @param int $width Width in pixel of edit area (auto by default) * @param int $height Height in pixel of edit area (200px by default) - * @param string $toolbarname Name of bar set to use ('Full', 'dolibarr_notes[_encoded]', 'dolibarr_details[_encoded]', 'dolibarr_mailings[_encoded]', ') + * @param string $toolbarname Name of bar set to use ('Full', 'dolibarr_notes[_encoded]', 'dolibarr_details[_encoded]'=the less featured, 'dolibarr_mailings[_encoded]', ') * @param string $toolbarlocation Where bar is stored : * 'In' each window has its own toolbar * 'Out:name' share toolbar into the div called 'name' @@ -60,7 +60,7 @@ class DolEditor * @param int $uselocalbrowser Enabled to add links to local object with local browser. If false, only external images can be added in content. * @param int $okforextendededitor True=Allow usage of extended editor tool (like fckeditor) * @param int $rows Size of rows for textarea tool - * @param int $cols Size of cols for textarea tool (textarea number of cols or %) + * @param string $cols Size of cols for textarea tool (textarea number of cols '70' or percent 'x%') * @param int $readonly 0=Read/Edit, 1=Read only */ function __construct($htmlname,$content,$width='',$height=200,$toolbarname='Basic',$toolbarlocation='In',$toolbarstartexpanded=false,$uselocalbrowser=true,$okforextendededitor=true,$rows=0,$cols=0,$readonly=0) @@ -168,8 +168,11 @@ class DolEditor { if (! defined('REQUIRE_CKEDITOR')) define('REQUIRE_CKEDITOR','1'); - //$skin='kama'; - $skin='moono'; // default with cdeditor 4 + if (! empty($conf->global->FCKEDITOR_SKIN)) { + $skin = $conf->global->FCKEDITOR_SKIN; + } else { + $skin = 'moono'; // default with ckeditor 4 : moono + } $htmlencode_force=preg_match('/_encoded$/',$this->toolbarname)?'true':'false'; diff --git a/htdocs/core/class/dolgeoip.class.php b/htdocs/core/class/dolgeoip.class.php index 7cddd4c16f5..a57e4e844ec 100644 --- a/htdocs/core/class/dolgeoip.class.php +++ b/htdocs/core/class/dolgeoip.class.php @@ -58,18 +58,15 @@ class DolGeoIP // Here, function exists (embedded into PHP or exists because we made include) if (empty($type) || empty($datfile)) { - //dol_syslog("DolGeoIP::DolGeoIP parameter datafile not defined", LOG_ERR); - $this->errorlabel='DolGeoIP constructor was called with no datafile parameter'; - //dol_print_error('','DolGeoIP constructor was called with no datafile parameter'); - print $this->errorlabel; + $this->errorlabel='Constructor was called with no datafile parameter'; + dol_syslog('DolGeoIP '.$this->errorlabel, LOG_ERR); return 0; } if (! file_exists($datfile) || ! is_readable($datfile)) { - //dol_syslog("DolGeoIP::DolGeoIP datafile ".$datfile." can not be read", LOG_ERR); $this->error='ErrorGeoIPClassNotInitialized'; $this->errorlabel="Datafile ".$datfile." not found"; - print $this->errorlabel; // To be sure to understand when it fails on screens + dol_syslog('DolGeoIP '.$this->errorlabel, LOG_ERR); return 0; } diff --git a/htdocs/core/class/dolprintipp.class.php b/htdocs/core/class/dolprintipp.class.php index fdd0fc2732c..869b26e2f75 100644 --- a/htdocs/core/class/dolprintipp.class.php +++ b/htdocs/core/class/dolprintipp.class.php @@ -66,7 +66,7 @@ class dolprintIPP */ function list_jobs($module) { - global $conf, $db, $bc; + global $conf, $db, $bc, $langs; include_once DOL_DOCUMENT_ROOT.'/includes/printipp/CupsPrintIPP.php'; $ipp = new CupsPrintIPP(); $ipp->setLog(DOL_DATA_ROOT.'/printipp.log','file',3); // logging very verbose @@ -96,7 +96,8 @@ class dolprintIPP } catch(Exception $e) { - print $e->getMessage(); + setEventMessage('[printipp] '.$langs->trans('CoreErrorMessage'), 'errors'); + dol_syslog($e->getMessage(), LOG_ERR); } print ''; diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php new file mode 100644 index 00000000000..90bf948e215 --- /dev/null +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -0,0 +1,690 @@ + + * + * 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 3 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, see . + * or see http://www.gnu.org/ + */ + +/** + * \file htdocs/core/class/dolreceiptprinter.class.php + * \brief Print receipt ticket on various ESC/POS printer + */ + +/* + * Tags for ticket template + * + * Left align text + * Center text + * Right align text + * Use font A of printer + * Use font B of printer + * Use font C of printer + * Text Bold + * Text double height + * Text double width + * Underline text + * Underline with double line + * Emphasized text + * Print in white on black + * Print barcode + * Print barcode customer id + * Ticket print width of 57mm + * Cut ticket completely + * Cut ticket partially + * Open cash drawer + * Activate buzzer + * + * Code which can be placed everywhere + * Print QR Code + * Print date AAAA-MM-DD + * Print date and time AAAA-MM-DD HH:MM:SS + * Print Year + * Print month in letters (example : november) + * Print month number + * Print day number + * Print day number + * Print table number (for restaurant, bar...) + * Print number of cutlery (for restaurant) + * Print payment method + * Print logo stored on printer. Example : 32|32 + * Print logo stored on printer. Must be followed by logo code. For old printers. + * Print order lines + * Print order total tax + * Print order local tax + * Print order total + * Print order number + * Print order number after validation + * Print customer firstname + * Print customer name + * Print customer mail + * Print customer phone + * Print customer mobile + * Print customer skype + * Print customer VAT number + * Print customer account balance + * Print vendor name + * Print vendor firstname + * Print vendor mail + * Print customer points + * Print number of points for this order + * + * Conditional code at line start (if�then Print) + * Print the line IF a customer is affected to the order + * Print the line IF a vendor is affected to the order + * Print the line IF Happy Hour + * Print the line IF order is validated + * Print the line IF customer points > 0 + * Print the line IF points of the order > 0 + * Print the line IF customer has vat number + * Print the line IF customer balance > 0 + * + */ + +require_once DOL_DOCUMENT_ROOT .'/includes/mike42/escpos-php/Escpos.php'; + + +/** + * Class to manage Receipt Printers + */ +class dolReceiptPrinter extends Escpos +{ + const CONNECTOR_DUMMY = 1; + const CONNECTOR_FILE_PRINT = 2; + const CONNECTOR_NETWORK_PRINT = 3; + const CONNECTOR_WINDOWS_PRINT = 4; + //const CONNECTOR_JAVA = 5; + var $db; + var $tags; + var $printer; + var $template; + var $error; + var $errors; + + + + /** + * Constructor + * + * @param DoliDB $db database + */ + function __construct($db) + { + $this->db=$db; + $this->tags = array( + 'dol_align_left', + 'dol_align_center', + 'dol_align_right', + 'dol_use_font_a', + 'dol_use_font_b', + 'dol_use_font_c', + 'dol_bold', + '/dol_bold', + 'dol_double_height', + '/dol_double_height', + 'dol_double_width', + '/dol_double_width', + 'dol_underline', + '/dol_underline', + 'dol_underline_2dots', + '/dol_underline', + 'dol_emphasized', + '/dol_emphasized', + 'dol_switch_colors', + '/dol_switch_colors', + 'dol_print_barcode', + 'dol_print_barcode_customer_id', + 'dol_set_print_width_57', + 'dol_cut_paper_full', + 'dol_cut_paper_partial', + 'dol_open_drawer', + 'dol_activate_buzzer', + 'dol_print_qrcode', + 'dol_print_date', + 'dol_print_date_time', + 'dol_print_year', + 'dol_print_month_letters', + 'dol_print_month', + 'dol_print_day', + 'dol_print_day_letters', + 'dol_print_table', + 'dol_print_cutlery', + 'dol_print_payment', + 'dol_print_logo', + 'dol_print_logo_old', + 'dol_print_order_lines', + 'dol_print_order_tax', + 'dol_print_order_local_tax', + 'dol_print_order_total', + 'dol_print_order_number', + 'dol_print_order_number_unique', + 'dol_print_customer_firstname', + 'dol_print_customer_lastname', + 'dol_print_customer_mail', + 'dol_print_customer_phone', + 'dol_print_customer_mobile', + 'dol_print_customer_skype', + 'dol_print_customer_tax_number', + 'dol_print_customer_account_balance', + 'dol_print_vendor_lastname', + 'dol_print_vendor_firstname', + 'dol_print_vendor_mail', + 'dol_print_customer_points', + 'dol_print_order_points', + 'dol_print_if_customer', + 'dol_print_if_vendor', + 'dol_print_if_happy_hour', + 'dol_print_if_num_order_unique', + 'dol_print_if_customer_points', + 'dol_print_if_order_points', + 'dol_print_if_customer_tax_number', + 'dol_print_if_customer_account_balance_positive', + ); + + } + + /** + * list printers + * + * @return int 0 if OK; >0 if KO + */ + function listPrinters() + { + global $conf; + $error = 0; + $line = 0; + $sql = 'SELECT rowid, name, fk_type, fk_profile, parameter'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt'; + $sql.= ' WHERE entity = '.$conf->entity; + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + while ($line < $num) { + $row = $this->db->fetch_array($resql); + switch ($row['fk_type']) { + case 1: + $row['fk_type_name'] = 'CONNECTOR_DUMMY'; + break; + case 2: + $row['fk_type_name'] = 'CONNECTOR_FILE_PRINT'; + break; + case 3: + $row['fk_type_name'] = 'CONNECTOR_NETWORK_PRINT'; + break; + case 4: + $row['fk_type_name'] = 'CONNECTOR_WINDOWS_PRINT'; + break; + case 5: + $row['fk_type_name'] = 'CONNECTOR_JAVA'; + break; + default: + $row['fk_type_name'] = 'CONNECTOR_UNKNOWN'; + break; + } + switch ($row['fk_profile']) { + case 0: + $row['fk_profile_name'] = 'PROFILE_DEFAULT'; + break; + case 1: + $row['fk_profile_name'] = 'PROFILE_SIMPLE'; + break; + case 2: + $row['fk_profile_name'] = 'PROFILE_EPOSTEP'; + break; + case 3: + $row['fk_profile_name'] = 'PROFILE_P822D'; + break; + default: + $row['fk_profile_name'] = 'PROFILE_STAR'; + break; + } + $obj[] = $row; + $line++; + } + } else { + $error++; + $this->errors[] = $this->db->lasterror; + } + $this->listprinters = $obj; + return $error; + } + + + /** + * List printers templates + * + * @return int 0 if OK; >0 if KO + */ + function listPrintersTemplates() + { + global $conf; + $error = 0; + $line = 0; + $sql = 'SELECT rowid, name, template'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt_template'; + $sql.= ' WHERE entity = '.$conf->entity; + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + while ($line < $num) { + $obj[] = $this->db->fetch_array($resql); + $line++; + } + } else { + $error++; + $this->errors[] = $this->db->lasterror; + } + $this->listprinterstemplates = $obj; + return $error; + } + + + /** + * Form to Select type printer + * + * @param string $selected Id printer type pre-selected + * @param string $htmlname select html name + * @return int 0 if OK; >0 if KO + */ + function selectTypePrinter($selected='', $htmlname='printertypeid') + { + global $langs; + $error = 0; + $html = ''; + + $this->resprint = $html; + return $error; + } + + + /** + * Form to Select Profile printer + * + * @param string $selected Id printer profile pre-selected + * @param string $htmlname select html name + * @return int 0 if OK; >0 if KO + */ + function selectProfilePrinter($selected='', $htmlname='printerprofileid') + { + global $langs; + $error = 0; + $html = ''; + + $this->profileresprint = $html; + return $error; + } + + + /** + * Function to Add a printer in db + * + * @param string $name Printer name + * @param int $type Printer type + * @param int $profile Printer profile + * @param string $parameter Printer parameter + * @return int 0 if OK; >0 if KO + */ + function AddPrinter($name, $type, $profile, $parameter) + { + global $conf; + $error = 0; + $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'printer_receipt'; + $sql.= ' (name, fk_type, fk_profile, parameter, entity)'; + $sql.= ' VALUES ("'.$this->db->escape($name).'", '.$type.', '.$profile.', "'.$this->db->escape($parameter).'", '.$conf->entity.')'; + $resql = $this->db->query($sql); + if (! $resql) { + $error++; + $this->errors[] = $this->db->lasterror; + } + return $error; + } + + /** + * Function to Update a printer in db + * + * @param string $name Printer name + * @param int $type Printer type + * @param int $profile Printer profile + * @param string $parameter Printer parameter + * @param int $printerid Printer id + * @return int 0 if OK; >0 if KO + */ + function UpdatePrinter($name, $type, $profile, $parameter, $printerid) + { + global $conf; + $error = 0; + $sql = 'UPDATE '.MAIN_DB_PREFIX.'printer_receipt'; + $sql.= ' SET name="'.$this->db->escape($name).'"'; + $sql.= ', fk_type='.$type; + $sql.= ', fk_profile='.$profile; + $sql.= ', parameter="'.$this->db->escape($parameter).'"'; + $sql.= ' WHERE rowid='.$printerid; + $resql = $this->db->query($sql); + if (! $resql) { + $error++; + $this->errors[] = $this->db->lasterror; + } + return $error; + } + + /** + * Function to Delete a printer from db + * + * @param int $printerid Printer id + * @return int 0 if OK; >0 if KO + */ + function DeletePrinter($printerid) + { + global $conf; + $error = 0; + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'printer_receipt'; + $sql.= ' WHERE rowid='.$printerid; + $resql = $this->db->query($sql); + if (! $resql) { + $error++; + $this->errors[] = $this->db->lasterror; + } + return $error; + } + + /** + * Function to Update a printer template in db + * + * @param string $name Template name + * @param int $template Template + * @param int $templateid Template id + * @return int 0 if OK; >0 if KO + */ + function UpdateTemplate($name, $template, $templateid) + { + global $conf; + $error = 0; + $sql = 'UPDATE '.MAIN_DB_PREFIX.'printer_receipt_template'; + $sql.= ' SET name="'.$this->db->escape($name).'"'; + $sql.= ', template="'.$this->db->escape($template).'"'; + $sql.= ' WHERE rowid='.$templateid; + $resql = $this->db->query($sql); + if (! $resql) { + $error++; + $this->errors[] = $this->db->lasterror; + } + return $error; + } + + + /** + * Function to Send Test page to Printer + * + * @param int $printerid Printer id + * @return int 0 if OK; >0 if KO + */ + function SendTestToPrinter($printerid) + { + global $conf; + $error = 0; + $img = new EscposImage(DOL_DOCUMENT_ROOT .'/theme/common/dolibarr_logo_bw.png'); + $ret = $this->InitPrinter($printerid); + if ($ret>0) { + setEventMessages($this->error, $this->errors, 'errors'); + } else { + try { + $this->printer->graphics($img); + $this->printer->text("Hello World!\n"); + $testStr = "Testing 123"; + $this->printer->qrCode($testStr); + $this->printer->text("Most simple example\n"); + $this->printer->feed(); + $this->printer->cut(); + //print '
'.print_r($this->connector, true).'
'; + $this->printer->close(); + + } catch (Exception $e) { + $this->errors[] = $e->getMessage(); + $error++; + } + } + return $error; + } + + /** + * Function to Print Receipt Ticket + * + * @param object $object order or invoice object + * @param int $templateid Template id + * @param int $printerid Printer id + * @return int 0 if OK; >0 if KO + */ + function SendToPrinter($object, $templateid, $printerid) + { + global $conf; + $error = 0; + $ret = $this->loadTemplate($templateid); + + // tags a remplacer par leur valeur avant de parser + $this->template = str_replace('', $object->id, $this->template); + $this->template = str_replace('', $object->customer_firstname, $this->template); + $this->template = str_replace('', $object->customer_lastname, $this->template); + $this->template = str_replace('', $object->customer_mail, $this->template); + $this->template = str_replace('', $object->customer_phone, $this->template); + $this->template = str_replace('', $object->customer_mobile, $this->template); + $this->template = str_replace('', $object->customer_skype, $this->template); + $this->template = str_replace('', $object->customer_tax_number, $this->template); + $this->template = str_replace('', $object->customer_account_balance, $this->template); + $this->template = str_replace('', $object->customer_points, $this->template); + $this->template = str_replace('', $object->order_points, $this->template); + $this->template = str_replace('', $object->vendor_firstname, $this->template); + $this->template = str_replace('', $object->vendor_lastname, $this->template); + $this->template = str_replace('', $object->vendor_mail, $this->template); + $this->template = str_replace('', $object->date, $this->template); + $this->template = str_replace('', $object->date_time, $this->template); + $this->template = str_replace('', $object->date_time, $this->template); + $this->template = str_replace('', $object->date_time, $this->template); + $this->template = str_replace('', $object->date_time, $this->template); + $this->template = str_replace('', $object->date_time, $this->template); + $this->template = str_replace('', $object->date_time, $this->template); + $this->template = str_replace('', $object->table, $this->template); + $this->template = str_replace('', $object->cutlery, $this->template); + + // parse template + $p = xml_parser_create(); + xml_parse_into_struct($p, $this->template, $vals, $index); + xml_parser_free($p); + //print '
'.print_r($index, true).'
'; + //print '
'.print_r($vals, true).'
'; + // print ticket + $level = 0; + $html = '
';
+        $ret = $this->InitPrinter($printerid);
+        if ($ret>0) {
+            setEventMessages($this->error, $this->errors, 'errors');
+        } 
+        else 
+        {
+            $nboflines = count($vals);
+            for ($line=0; $line < $nboflines; $line++) 
+            {
+                switch ($vals[$line]['tag']) {
+                    case 'DOL_ALIGN_CENTER':
+                        $this->printer->setJustification(Escpos::JUSTIFY_CENTER);
+                        $html.='
'; + $this->printer->text($vals[$line]['value']); + break; + case 'DOL_ALIGN_RIGHT': + $this->printer->setJustification(Escpos::JUSTIFY_RIGHT); + $html.=''; + break; + case 'DOL_ALIGN_LEFT': + $this->printer->setJustification(Escpos::JUSTIFY_LEFT); + $html.=''; + break; + case 'DOL_OPEN_DRAWER': + $this->printer->pulse(); + $html.= ' ϟ'.nl2br($vals[$line]['value']); + break; + case 'DOL_ACTIVATE_BUZZER': + //$this->printer->buzzer(); + $html.= ' ♫'.nl2br($vals[$line]['value']); + break; + case 'DOL_PRINT_BARCODE': + // $vals[$line]['value'] -> barcode($content, $type) + $this->printer->barcode($object->barcode); + break; + case 'DOL_PRINT_BARCODE_CUSTOMER_ID': + // $vals[$line]['value'] -> barcode($content, $type) + $this->printer->barcode($object->customer_id); + break; + case 'DOL_PRINT_QRCODE': + // $vals[$line]['value'] -> qrCode($content, $ec, $size, $model) + $this->printer->qrcode($vals[$line]['value']); + $html.='QRCODE: '.$vals[$line]['value']; + break; + case 'DOL_CUT_PAPER_FULL': + $this->printer->cut(Escpos::CUT_FULL); + $html.= ' ✂'.nl2br($vals[$line]['value']); + break; + case 'DOL_CUT_PAPER_PARTIAL': + $this->printer->cut(Escpos::CUT_PARTIAL); + $html.= ' ✂'.nl2br($vals[$line]['value']); + break; + case 'DOL_USE_FONT_A': + $this->printer->setFont(Escpos::FONT_A); + $this->printer->text($vals[$line]['value']); + break; + case 'DOL_USE_FONT_B': + $this->printer->setFont(Escpos::FONT_B); + $this->printer->text($vals[$line]['value']); + break; + case 'DOL_USE_FONT_C': + $this->printer->setFont(Escpos::FONT_C); + $this->printer->text($vals[$line]['value']); + break; + default: + $this->printer->text($vals[$line]['value']); + $html.= nl2br($vals[$line]['value']); + $this->errors[] = 'UnknowTag: <'.strtolower($vals[$line]['tag']).'>'; + $error++; + break; + } + } + $html.= '
'; + print $html; + // Close and print + // uncomment next line to see content sent to printer + //print '
'.print_r($this->connector, true).'
'; + $this->printer->close(); + + } + return $error; + } + + /** + * Function to load Template + * + * @param int $templateid Template id + * @return int 0 if OK; >0 if KO + */ + function loadTemplate($templateid) + { + global $conf; + $error = 0; + $sql = 'SELECT template'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt_template'; + $sql.= ' WHERE rowid='.$templateid; + $sql.= ' AND entity = '.$conf->entity; + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_array($resql); + } else { + $error++; + $this->errors[] = $this->db->lasterror; + } + if (empty($obj)) { + $error++; + $this->errors[] = 'TemplateDontExist'; + } else { + $this->template = $obj['0']; + } + + return $error; + } + + + /** + * Function Init Printer + * + * @param int $printerid Printer id + * @return int 0 if OK; >0 if KO + */ + function InitPrinter($printerid) + { + global $conf; + $error=0; + $sql = 'SELECT rowid, name, fk_type, fk_profile, parameter'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'printer_receipt'; + $sql.= ' WHERE rowid = '.$printerid; + $sql.= ' AND entity = '.$conf->entity; + $resql = $this->db->query($sql); + if ($resql) { + $obj = $this->db->fetch_array($resql); + } else { + $error++; + $this->errors[] = $this->db->lasterror; + } + if (empty($obj)) { + $error++; + $this->errors[] = 'PrinterDontExist'; + } + if (! $error) { + $parameter = $obj['parameter']; + try { + switch ($obj['fk_type']) { + case 1: + require_once DOL_DOCUMENT_ROOT .'/includes/mike42/escpos-php/src/DummyPrintConnector.php'; + $this->connector = new DummyPrintConnector(); + break; + case 2: + $this->connector = new FilePrintConnector($parameter); + break; + case 3: + $parameters = explode(':', $parameter); + $this->connector = new NetworkPrintConnector($parameters[0], $parameters[1]); + break; + case 4: + $this->connector = new WindowsPrintConnector($parameter); + break; + default: + $this->connector = 'CONNECTOR_UNKNOWN'; + break; + } + $this->printer = new Escpos($this->connector); + } catch (Exception $e) { + $this->errors[] = $e->getMessage(); + $error++; + } + } + return $error; + } +} diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 99114bfaef1..828483db3c7 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -61,6 +61,8 @@ class ExtraFields var $error; var $errno; + var $attribute_hidden; + public static $type2label=array( 'varchar'=>'String', 'text'=>'TextLong', @@ -98,6 +100,7 @@ class ExtraFields $this->attribute_required = array(); $this->attribute_perms = array(); $this->attribute_list = array(); + $this->attribute_hidden = array(); } /** @@ -111,14 +114,15 @@ class ExtraFields * @param string $elementtype Element type ('member', 'product', 'thirdparty', ...) * @param int $unique Is field unique or not * @param int $required Is field required or not - * @param string $default_value Defaulted value + * @param string $default_value Defaulted value (Example: '', '0', 'null', 'avalue') * @param array $param Params for field * @param int $alwayseditable Is attribute always editable regardless of the document status * @param string $perms Permission to check * @param int $list Into list view by default + * @param int $ishidden Is hidden extrafield * @return int <=0 if KO, >0 if OK */ - function addExtraField($attrname, $label, $type, $pos, $size, $elementtype, $unique=0, $required=0, $default_value='', $param=0, $alwayseditable=0, $perms='', $list=0) + function addExtraField($attrname, $label, $type, $pos, $size, $elementtype, $unique=0, $required=0, $default_value='', $param=0, $alwayseditable=0, $perms='', $list=0, $ishidden=0) { if (empty($attrname)) return -1; if (empty($label)) return -1; @@ -135,7 +139,7 @@ class ExtraFields if ($result > 0 || $err1 == 'DB_ERROR_COLUMN_ALREADY_EXISTS' || $type == 'separate') { // Add declaration of field into table - $result2=$this->create_label($attrname,$label,$type,$pos,$size,$elementtype, $unique, $required, $param, $alwayseditable, $perms, $list); + $result2=$this->create_label($attrname,$label,$type,$pos,$size,$elementtype, $unique, $required, $param, $alwayseditable, $perms, $list, $ishidden); $err2=$this->errno; if ($result2 > 0 || ($err1 == 'DB_ERROR_COLUMN_ALREADY_EXISTS' && $err2 == 'DB_ERROR_RECORD_ALREADY_EXISTS')) { @@ -243,9 +247,10 @@ class ExtraFields * @param int $alwayseditable Is attribute always editable regardless of the document status * @param string $perms Permission to check * @param int $list Into list view by default + * @param int $ishidden Is hidden extrafield * @return int <=0 if KO, >0 if OK */ - private function create_label($attrname, $label='', $type='', $pos=0, $size=0, $elementtype='member', $unique=0, $required=0, $param='', $alwayseditable=0, $perms='', $list=0) + private function create_label($attrname, $label='', $type='', $pos=0, $size=0, $elementtype='member', $unique=0, $required=0, $param='', $alwayseditable=0, $perms='', $list=0, $ishidden=0) { global $conf; @@ -258,7 +263,7 @@ class ExtraFields if (! empty($attrname) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname) && ! is_numeric($attrname)) { - if(is_array($param) and count($param) > 0) + if(is_array($param) && count($param) > 0) { $params = $this->db->escape(serialize($param)); } @@ -271,7 +276,7 @@ class ExtraFields $params=''; } - $sql = "INSERT INTO ".MAIN_DB_PREFIX."extrafields(name, label, type, pos, size, entity, elementtype, fieldunique, fieldrequired, param, alwayseditable, perms, list)"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."extrafields(name, label, type, pos, size, entity, elementtype, fieldunique, fieldrequired, param, alwayseditable, perms, list, ishidden)"; $sql.= " VALUES('".$attrname."',"; $sql.= " '".$this->db->escape($label)."',"; $sql.= " '".$type."',"; @@ -285,6 +290,7 @@ class ExtraFields $sql.= " '".$alwayseditable."',"; $sql.= " ".($perms?"'".$this->db->escape($perms)."'":"null").","; $sql.= " ".$list; + $sql.= ", ".$ishidden; $sql.=')'; dol_syslog(get_class($this)."::create_label", LOG_DEBUG); @@ -389,9 +395,10 @@ class ExtraFields * @param int $alwayseditable Is attribute always editable regardless of the document status * @param string $perms Permission to check * @param int $list Into list view by default + * @param int $ishidden Is hidden extrafield * @return int >0 if OK, <=0 if KO */ - function update($attrname,$label,$type,$length,$elementtype,$unique=0,$required=0,$pos=0,$param='',$alwayseditable=0, $perms='',$list='') + function update($attrname,$label,$type,$length,$elementtype,$unique=0,$required=0,$pos=0,$param='',$alwayseditable=0, $perms='',$list='',$ishidden=0) { if ($elementtype == 'thirdparty') $elementtype='societe'; if ($elementtype == 'contact') $elementtype='socpeople'; @@ -432,7 +439,7 @@ class ExtraFields { if ($label) { - $result=$this->update_label($attrname,$label,$type,$length,$elementtype,$unique,$required,$pos,$param,$alwayseditable,$perms,$list); + $result=$this->update_label($attrname,$label,$type,$length,$elementtype,$unique,$required,$pos,$param,$alwayseditable,$perms,$list,$ishidden); } if ($result > 0) { @@ -483,12 +490,13 @@ class ExtraFields * @param int $alwayseditable Is attribute always editable regardless of the document status * @param string $perms Permission to check * @param int $list Into list view by default + * @param int $ishidden Is hidden extrafield * @return int <=0 if KO, >0 if OK */ - private function update_label($attrname,$label,$type,$size,$elementtype,$unique=0,$required=0,$pos=0,$param='',$alwayseditable=0,$perms='',$list=0) + private function update_label($attrname,$label,$type,$size,$elementtype,$unique=0,$required=0,$pos=0,$param='',$alwayseditable=0,$perms='',$list=0,$ishidden=0) { global $conf; - dol_syslog(get_class($this)."::update_label ".$attrname.", ".$label.", ".$type.", ".$size.", ".$elementtype.", ".$unique.", ".$required.", ".$pos.", ".$alwayseditable.", ".$perms.", ".$list); + dol_syslog(get_class($this)."::update_label ".$attrname.", ".$label.", ".$type.", ".$size.", ".$elementtype.", ".$unique.", ".$required.", ".$pos.", ".$alwayseditable.", ".$perms.", ".$list.", ".$ishidden); // Clean parameters if ($elementtype == 'thirdparty') $elementtype='societe'; @@ -526,6 +534,7 @@ class ExtraFields $sql.= " alwayseditable,"; $sql.= " param,"; $sql.= " list"; + $sql.= ", ishidden"; $sql.= ") VALUES ("; $sql.= "'".$attrname."',"; $sql.= " ".$conf->entity.","; @@ -540,6 +549,7 @@ class ExtraFields $sql.= " '".$alwayseditable."',"; $sql.= " '".$param."',"; $sql.= " ".$list; + $sql.= ", ".$ishidden; $sql.= ")"; dol_syslog(get_class($this)."::update_label", LOG_DEBUG); $resql2=$this->db->query($sql); @@ -585,7 +595,7 @@ class ExtraFields // For avoid conflicts with external modules if (!$forceload && !empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) return $array_name_label; - $sql = "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,list"; + $sql = "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,list,ishidden"; $sql.= " FROM ".MAIN_DB_PREFIX."extrafields"; $sql.= " WHERE entity IN (0,".$conf->entity.")"; if ($elementtype) $sql.= " AND elementtype = '".$elementtype."'"; @@ -616,6 +626,7 @@ class ExtraFields $this->attribute_alwayseditable[$tab->name]=$tab->alwayseditable; $this->attribute_perms[$tab->name]=$tab->perms; $this->attribute_list[$tab->name]=$tab->list; + $this->attribute_hidden[$tab->name]=$tab->ishidden; } } } @@ -636,10 +647,11 @@ class ExtraFields * @param string $moreparam To add more parametes on html input tag * @param string $keyprefix Prefix string to add into name and id of field (can be used to avoid duplicate names) * @param string $keysuffix Suffix string to add into name and id of field (can be used to avoid duplicate names) - * @param int $showsize Value for size attribute + * @param int $showsize Value for size attributed + * @param int $objectid Current object id * @return string */ - function showInputField($key,$value,$moreparam='',$keyprefix='',$keysuffix='',$showsize=0) + function showInputField($key,$value,$moreparam='',$keyprefix='',$keysuffix='',$showsize=0, $objectid=0) { global $conf,$langs; @@ -747,8 +759,9 @@ class ExtraFields $out.=''; - + if ($InfoFieldList[0] && class_exists($InfoFieldList[0])) + { + $object = new $InfoFieldList[0]($this->db); + $object->fetch($value); + $valuetoshow=$object->ref; + if ($object->element == 'societe') $valuetoshow=$object->name; // Special case for thirdparty because ref is id because name is not unique + $out.=''; + } + else + { + dol_syslog('Error bad setup of extrafield', LOG_WARNING); + $out.='Error bad setup of extrafield'; + } } /* Add comments if ($type == 'date') $out.=' (YYYY-MM-DD)'; @@ -1102,7 +1154,7 @@ class ExtraFields * * @param string $key Key of attribute * @param string $value Value to show - * @param string $moreparam More param + * @param string $moreparam To add more parametes on html input tag (only checkbox use html input for output rendering) * @return string Formated value */ function showOutputField($key,$value,$moreparam='') @@ -1119,6 +1171,7 @@ class ExtraFields $perms=$this->attribute_perms[$key]; $list=$this->attribute_list[$key]; + $showsize=0; if ($type == 'date') { $showsize=10; @@ -1326,9 +1379,17 @@ class ExtraFields // 1 : classPath $InfoFieldList = explode(":", $param_list[0]); dol_include_once($InfoFieldList[1]); - $object = new $InfoFieldList[0]($this->db); - $object->fetch($value); - $value=$object->getNomUrl(3); + if ($InfoFieldList[0] && class_exists($InfoFieldList[0])) + { + $object = new $InfoFieldList[0]($this->db); + $object->fetch($value); + $value=$object->getNomUrl(3); + } + else + { + dol_syslog('Error bad setup of extrafield', LOG_WARNING); + $out.='Error bad setup of extrafield'; + } } } elseif ($type == 'text') @@ -1340,11 +1401,59 @@ class ExtraFields $showsize=round($size); if ($showsize > 48) $showsize=48; } + //print $type.'-'.$size; $out=$value; + return $out; } + /** + * Return tag to describe alignement to use for this extrafield + * + * @param string $key Key of attribute + * @return string Formated value + */ + function getAlignFlag($key) + { + global $conf,$langs; + + $type=$this->attribute_type[$key]; + + $align=''; + + if ($type == 'date') + { + $align="center"; + } + elseif ($type == 'datetime') + { + $align="center"; + } + elseif ($type == 'int') + { + $align="right"; + } + elseif ($type == 'double') + { + $align="right"; + } + elseif ($type == 'boolean') + { + $align="center"; + } + elseif ($type == 'radio') + { + $align="center"; + } + elseif ($type == 'checkbox') + { + $align="center"; + } + + return $align; + } + /** * Return HTML string to print separator extrafield * @@ -1413,7 +1522,7 @@ class ExtraFields if($nofillrequired) { $langs->load('errors'); - setEventMessage($langs->trans('ErrorFieldsRequired').' : '.implode(', ',$error_field_required),'errors'); + setEventMessages($langs->trans('ErrorFieldsRequired').' : '.implode(', ',$error_field_required), null, 'errors'); return -1; } else { @@ -1453,6 +1562,8 @@ class ExtraFields else if (in_array($key_type,array('checkbox'))) { $value_arr=GETPOST($keysuffix."options_".$key.$keyprefix); + // Make sure we get an array even if there's only one checkbox + $value_arr=(array) $value_arr; $value_key=implode(',', $value_arr); } else if (in_array($key_type,array('price','double'))) diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index cdb7f66ac5f..a38b034747b 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -125,7 +125,7 @@ class FileUpload if (!empty($parent->socid)) { $parent->fetch_thirdparty(); } - $object->$parentObject = dol_clone($parent); + $object->$parentObject = clone $parent; } else { $object->fetch_thirdparty(); } diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index d20dbf2d4f3..7d4dff8de44 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -34,7 +34,6 @@ class Fiscalyear extends CommonObject public $fk_element = ''; protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - var $id; var $rowid; var $label; @@ -324,4 +323,4 @@ class Fiscalyear extends CommonObject } } -} \ No newline at end of file +} diff --git a/htdocs/core/class/genericobject.class.php b/htdocs/core/class/genericobject.class.php index c198525a07b..32960664c17 100644 --- a/htdocs/core/class/genericobject.class.php +++ b/htdocs/core/class/genericobject.class.php @@ -30,8 +30,6 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; class GenericObject extends CommonObject { - var $db; - /** * Constructor * diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index a497b3cb7e2..e2de6e61c86 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -118,7 +118,7 @@ class HookManager * @param Object $object Object to use hooks on * @param string $action Action code on calling page ('create', 'edit', 'view', 'add', 'update', 'delete'...) * @return mixed For 'addreplace hooks (doActions,formObjectOptions,pdf_xxx,...): Return 0 if we want to keep standard actions, >0 if we want to stop standard actions, <0 if KO. Things to print are returned into ->resprints and set into ->resPrint. Things to return are returned into ->results and set into ->resArray. - * For 'output' hooks (printLeftBlock, formAddObjectLine, formBuilddocOptions, ...): Return 0, <0 if KO. Things to print are returned into ->resprints and set into ->resPrint. Things to print are returned into ->resprints and set into ->resPrint. Things to return are returned into ->results and set into ->resArray. + * For 'output' hooks (printLeftBlock, formAddObjectLine, formBuilddocOptions, ...): Return 0, <0 if KO. Things to print are returned into ->resprints and set into ->resPrint. Things to return are returned into ->results and set into ->resArray. * All types can also return some values into an array ->results. * $this->error or this->errors are also defined by class called by this function if error. */ @@ -144,15 +144,34 @@ class HookManager 'formBuilddocLineOptions', 'moveUploadedFile', 'pdf_writelinedesc', + 'pdf_getlinenum', + 'pdf_getlineref', + 'pdf_getlineref_supplier', + 'pdf_getlinevatrate', + 'pdf_getlineupexcltax', + 'pdf_getlineupwithtax', + 'pdf_getlineqty', + 'pdf_getlineqty_asked', + 'pdf_getlineqty_shipped', + 'pdf_getlineqty_keeptoship', + 'pdf_getlineunit', + 'pdf_getlineremisepercent', + 'pdf_getlineprogress', + 'pdf_getlinetotalexcltax', + 'pdf_getlinetotalwithtax', 'paymentsupplierinvoices', 'printAddress', 'printSearchForm', 'formatEvent', - 'addCalendarChoice' + 'addCalendarChoice', + 'printObjectLine', + 'printObjectSubLine', + 'createDictionaryFieldList', + 'editDictionaryFieldlist' ) )) $hooktype='addreplace'; // Deprecated hook types ('returnvalue') - if (preg_match('/^pdf_/',$method) && $method != 'pdf_writelinedesc') $hooktype='returnvalue'; // pdf_xxx except pdf_writelinedesc are 'returnvalue' hooks. When there is 2 hooks of this type, only last one win. TODO Move them into 'output' or 'addreplace' hooks. + //if (preg_match('/^pdf_/',$method) && $method != 'pdf_writelinedesc') $hooktype='returnvalue'; // pdf_xxx except pdf_writelinedesc are 'returnvalue' hooks. When there is 2 hooks of this type, only last one win. TODO Move them into 'output' or 'addreplace' hooks. if ($method == 'insertExtraFields') { $hooktype='returnvalue'; // deprecated. TODO Remove all code with "executeHooks('insertExtraFields'" as soon as there is a trigger available. diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 79ba773ad36..668855672a5 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -76,8 +76,8 @@ class Form * @param string $htmlname Name of select field ('edit' prefix will be added) * @param string $preselected Name of Value to show/edit (not used in this function) * @param object $object Object - * @param boolean $perm Permission to allow button to edit parameter - * @param string $typeofdata Type of data ('string' by default, 'email', 'numeric:99', 'text' or 'textarea:rows:cols', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...) + * @param boolean $perm Permission to allow button to edit parameter. Set it to 0 to have a not edited field. + * @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...) * @param string $moreparam More param to add on a href URL * @return string HTML edit field */ @@ -104,11 +104,11 @@ class Form } else { - $ret.='
'; + if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.=''; + if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.=''; if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.=''; - $ret.='
'; $ret.=$langs->trans($text); - $ret.='id.$moreparam.'">'.img_edit($langs->trans('Edit'),1).'
'; + if (GETPOST('action') != 'edit'.$htmlname && $perm) $ret.='
'; } return $ret; @@ -122,7 +122,7 @@ class Form * @param string $value Value to show/edit * @param object $object Object * @param boolean $perm Permission to allow button to edit parameter - * @param string $typeofdata Type of data ('string' by default, 'amount', 'email', 'numeric:99', 'text' or 'textarea:rows:cols', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols', 'select:xxx'...) + * @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'day' or 'datepicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols', 'select:xxx'...) * @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formated price instead of value). Use '' to use same than $value * @param object $extObject External object * @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage') @@ -154,11 +154,16 @@ class Form $ret.=''; $ret.=''; $ret.='
'; - if (preg_match('/^(string|email|numeric|amount)/',$typeofdata)) + if (preg_match('/^(string|email)/',$typeofdata)) { $tmp=explode(':',$typeofdata); $ret.=''; } + else if (preg_match('/^(numeric|amount)/',$typeofdata)) + { + $tmp=explode(':',$typeofdata); + $ret.=''; + } else if (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) { $tmp=explode(':',$typeofdata); @@ -203,8 +208,8 @@ class Form } else { - if ($typeofdata == 'email') $ret.=dol_print_email($value,0,0,0,0,1); - elseif ($typeofdata == 'amount') $ret.=($value != '' ? price($value,'',$langs,0,-1,-1,$conf->currency) : ''); + if (preg_match('/^(email)/',$typeofdata)) $ret.=dol_print_email($value,0,0,0,0,1); + elseif (preg_match('/^(amount|numeric)/',$typeofdata)) $ret.=($value != '' ? price($value,'',$langs,0,-1,-1,$conf->currency) : ''); elseif (preg_match('/^text/',$typeofdata) || preg_match('/^note/',$typeofdata)) $ret.=dol_htmlentitiesbr($value); elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret.=dol_print_date($value,'day'); elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') $ret.=dol_print_date($value,'dayhour'); @@ -364,7 +369,8 @@ class Form } /** - * Show a text and picto with tooltip on text or picto + * Show a text and picto with tooltip on text or picto. + * Can be called by an instancied $form->textwithtooltip or by a static call Form::textwithtooltip * * @param string $text Text to show * @param string $htmltext HTML content of tooltip. Must be HTML/UTF8 encoded. @@ -476,6 +482,73 @@ class Form return $this->textwithtooltip($text, $htmltext, 2, $direction, $img, $extracss, $notabs, '', $noencodehtmltext); } + /** + * Generate select HTML to choose massaction + * + * @param string $selected Selected value + * @param int $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action. + * @return string Select list + */ + function selectMassAction($selected, $arrayofaction) + { + global $conf,$langs,$hookmanager; + + if (count($arrayofaction) == 0) return; + + $disabled=0; + $ret='
'; + $ret.=''; + $ret.='
'; + + $ret.=' + + '; + + return $ret; + } + /** * Return combo list of activated countries, into language of user * @@ -483,9 +556,10 @@ class Form * @param string $htmlname Name of html select object * @param string $htmloption Options html on select object * @param integer $maxlength Max length for labels (0=no limit) + * @param string $morecss More css class * @return string HTML string with select */ - function select_country($selected='',$htmlname='country_id',$htmloption='',$maxlength=0) + function select_country($selected='',$htmlname='country_id',$htmloption='',$maxlength=0,$morecss='minwidth300') { global $conf,$langs; @@ -506,7 +580,7 @@ class Form $resql=$this->db->query($sql); if ($resql) { - $out.= ''; $num = $this->db->num_rows($resql); $i = 0; if ($num) @@ -572,11 +646,11 @@ class Form * @param string $page Defined the form action * @param string $htmlname Name of html select object * @param string $htmloption Options html on select object - * @param int $forcecombo Force to use combo box + * @param int $forcecombo Force to use standard combo box (no ajax use) * @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) * @return string HTML string with select and input */ - function select_incoterms($selected='', $location_incoterms='', $page='',$htmlname='incoterm_id',$htmloption='', $forcecombo=0, $events=array()) + function select_incoterms($selected='', $location_incoterms='', $page='', $htmlname='incoterm_id', $htmloption='', $forcecombo=1, $events=array()) { global $conf,$langs; @@ -594,7 +668,7 @@ class Form $resql=$this->db->query($sql); if ($resql) { - if (!$forcecombo) + if ($conf->use_javascript_ajax && ! $forcecombo) { include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; $out .= ajax_combobox($htmlname, $events); @@ -607,8 +681,8 @@ class Form $out .= ''; } - $out.= ''; + $out.= ''; $num = $this->db->num_rows($resql); $i = 0; if ($num) @@ -825,9 +899,10 @@ class Form * @param array $events Ajax event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) * @param int $limit Maximum number of elements * @param string $morecss Add more css styles to the SELECT component + * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container * @return string HTML string with select box for thirdparty. */ - function select_company($selected='', $htmlname='socid', $filter='', $showempty=0, $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100') + function select_company($selected='', $htmlname='socid', $filter='', $showempty=0, $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='') { $out=''; @@ -861,7 +936,7 @@ class Form } else {*/ - $out.=$this->select_thirdparty_list($selected, $htmlname, $filter, $showempty, $showtype, $forcecombo, $events, '', 0, $limit, $morecss); + $out.=$this->select_thirdparty_list($selected, $htmlname, $filter, $showempty, $showtype, $forcecombo, $events, '', 0, $limit, $morecss, $moreparam); //} return $out; @@ -881,9 +956,10 @@ class Form * @param int $outputmode 0=HTML select string, 1=Array * @param int $limit Limit number of answers * @param string $morecss Add more css styles to the SELECT component + * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container * @return string HTML string with */ - function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100') + function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='') { global $conf,$user,$langs; @@ -891,7 +967,7 @@ class Form $outarray=array(); // On recherche les societes - $sql = "SELECT s.rowid, s.nom as name, s.client, s.fournisseur, s.code_client, s.code_fournisseur"; + $sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.client, s.fournisseur, s.code_client, s.code_fournisseur"; $sql.= " FROM ".MAIN_DB_PREFIX ."societe as s"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= " WHERE s.entity IN (".getEntity('societe', 1).")"; @@ -937,12 +1013,13 @@ class Form } // Construct $out and $outarray - $out.= ''."\n"; $textifempty=''; // Do not use textempty = ' ' or ' ' here, or search on key will search on ' key'. //$textifempty=' '; //if (! empty($conf->use_javascript_ajax) || $forcecombo) $textifempty=''; + if (! empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT)) $textifempty.=$langs->trans("All"); if ($showempty) $out.= ''."\n"; $num = $this->db->num_rows($resql); @@ -967,6 +1044,10 @@ class Form $label=$obj->name; } + if(!empty($obj->name_alias)) { + $label.=' ('.$obj->name_alias.')'; + } + if ($showtype) { if ($obj->client || $obj->fournisseur) $label.=' ('; @@ -1022,7 +1103,7 @@ class Form $sql = "SELECT re.rowid, re.amount_ht, re.amount_tva, re.amount_ttc,"; $sql.= " re.description, re.fk_facture_source"; $sql.= " FROM ".MAIN_DB_PREFIX ."societe_remise_except as re"; - $sql.= " WHERE fk_soc = ".$socid; + $sql.= " WHERE fk_soc = ".(int) $socid; if ($filter) $sql.= " AND ".$filter; $sql.= " ORDER BY re.description ASC"; @@ -1255,10 +1336,11 @@ class Form * @param string $show_every 0=default list, 1=add also a value "Everybody" at beginning of list * @param string $enableonlytext If option $enableonly is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty. * @param string $morecss More css + * @param int $noactive Show only active users (this will also happened whatever is this option if USER_HIDE_INACTIVE_IN_COMBOBOX is on). * @return string HTML select string * @see select_dolgroups */ - function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity=0, $maxlength=0, $showstatus=0, $morefilter='', $show_every=0, $enableonlytext='', $morecss='') + function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity=0, $maxlength=0, $showstatus=0, $morefilter='', $show_every=0, $enableonlytext='', $morecss='', $noactive=0) { global $conf,$user,$langs; @@ -1318,7 +1400,7 @@ class Form if (! empty($user->societe_id)) $sql.= " AND u.fk_soc = ".$user->societe_id; if (is_array($exclude) && $excludeUsers) $sql.= " AND u.rowid NOT IN ('".$excludeUsers."')"; if (is_array($include) && $includeUsers) $sql.= " AND u.rowid IN ('".$includeUsers."')"; - if (! empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) $sql.= " AND u.statut <> 0"; + if (! empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX) || $noactive) $sql.= " AND u.statut <> 0"; if (! empty($morefilter)) $sql.=" ".$morefilter; $sql.= " ORDER BY u.lastname ASC"; @@ -1370,7 +1452,7 @@ class Form $out.= '>'; } - $out.= $userstatic->getFullName($langs, 0, 0, $maxlength); + $out.= $userstatic->getFullName($langs, 0, -1, $maxlength); // Complete name with more info $moreinfo=0; if (! empty($conf->global->MAIN_SHOW_LOGIN)) @@ -1544,7 +1626,7 @@ class Form print img_picto($langs->trans("Search"), 'search'); } } - print ''; + print 'global->PRODUCT_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />'; if ($hidelabel == 3) { print img_picto($langs->trans("Search"), 'search'); } @@ -1640,13 +1722,13 @@ class Form foreach ($scrit as $crit) { if ($i > 0) $sql.=" AND "; - $sql.="(p.ref LIKE '".$prefix.$crit."%' OR p.label LIKE '".$prefix.$crit."%'"; - if (! empty($conf->global->MAIN_MULTILANGS)) $sql.=" OR pl.label LIKE '".$prefix.$crit."%'"; + $sql.="(p.ref LIKE '".$db->escape($prefix.$crit)."%' OR p.label LIKE '".$db->escape($prefix.$crit)."%'"; + if (! empty($conf->global->MAIN_MULTILANGS)) $sql.=" OR pl.label LIKE '".$db->escape($prefix.$crit)."%'"; $sql.=")"; $i++; } if (count($scrit) > 1) $sql.=")"; - if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '".$prefix.$filterkey."%'"; + if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '".$db->escape($prefix.$filterkey)."%'"; $sql.=')'; } $sql.= $db->order("p.ref"); @@ -1661,7 +1743,7 @@ class Form require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; $num = $this->db->num_rows($result); - $out.=''; $out.=''; $i = 0; @@ -1809,7 +1891,7 @@ class Form $sql.= " WHERE fk_product='".$objp->rowid."'"; $sql.= " AND entity IN (".getEntity('productprice', 1).")"; $sql.= " AND price_level=".$price_level; - $sql.= " ORDER BY date_price"; + $sql.= " ORDER BY date_price, rowid"; $sql.= " DESC LIMIT 1"; dol_syslog(get_class($this).'::constructProductListOption search price for level '.$price_level.'', LOG_DEBUG); @@ -1939,8 +2021,8 @@ class Form { $dur=array("h"=>$langs->trans("Hour"),"d"=>$langs->trans("Day"),"w"=>$langs->trans("Week"),"m"=>$langs->trans("Month"),"y"=>$langs->trans("Year")); } - $opt.= ' - '.$duration_value.' '.$langs->trans($dur[$duration_unit]); - $outval.=' - '.$duration_value.' '.$langs->transnoentities($dur[$duration_unit]); + $opt.= ' - '.$duration_value.' '.($dur[$duration_unit]?$langs->trans($dur[$duration_unit]):''); + $outval.=' - '.$duration_value.' '.($dur[$duration_unit]?$langs->transnoentities($dur[$duration_unit]):''); } $opt.= "\n"; @@ -2009,7 +2091,7 @@ class Form $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid"; $sql.= " WHERE p.entity IN (".getEntity('product', 1).")"; $sql.= " AND p.tobuy = 1"; - if (strval($filtertype) != '') $sql.=" AND p.fk_product_type=".$filtertype; + if (strval($filtertype) != '') $sql.=" AND p.fk_product_type=".$this->db->escape($filtertype); if (! empty($filtre)) $sql.=" ".$filtre; // Add criteria on ref/label if ($filterkey != '') @@ -2023,11 +2105,11 @@ class Form foreach ($scrit as $crit) { if ($i > 0) $sql.=" AND "; - $sql.="(pfp.ref_fourn LIKE '".$prefix.$crit."%' OR p.ref LIKE '".$prefix.$crit."%' OR p.label LIKE '".$prefix.$crit."%')"; + $sql.="(pfp.ref_fourn LIKE '".$this->db->escape($prefix.$crit)."%' OR p.ref LIKE '".$this->db->escape($prefix.$crit)."%' OR p.label LIKE '".$this->db->escape($prefix.$crit)."%')"; $i++; } if (count($scrit) > 1) $sql.=")"; - if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '".$prefix.$filterkey."%'"; + if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; $sql.=')'; } $sql.= " ORDER BY pfp.ref_fourn DESC, pfp.quantity ASC"; @@ -2541,7 +2623,7 @@ class Form /** * Charge dans cache la liste des types de paiements possibles * - * @return int Nb of lines loaded, <0 if KO + * @return int Nb of lines loaded, <0 if KO */ function load_cache_types_paiements() { @@ -2554,9 +2636,9 @@ class Form $this->cache_types_paiements = array(); - $sql = "SELECT id, code, libelle as label, type"; + $sql = "SELECT id, code, libelle as label, type, active"; $sql.= " FROM ".MAIN_DB_PREFIX."c_paiement"; - $sql.= " WHERE active > 0"; + //if ($active >= 0) $sql.= " WHERE active = ".$active; $resql = $this->db->query($sql); if ($resql) @@ -2573,6 +2655,7 @@ class Form $this->cache_types_paiements[$obj->id]['code'] =$obj->code; $this->cache_types_paiements[$obj->id]['label']=$label; $this->cache_types_paiements[$obj->id]['type'] =$obj->type; + $this->cache_types_paiements[$obj->id]['active'] =$obj->active; $i++; } @@ -2630,14 +2713,15 @@ class Form * * @param string $selected Id du mode de paiement pre-selectionne * @param string $htmlname Nom de la zone select - * @param string $filtertype To filter on field type in llx_c_paiement (array('code'=>xx,'label'=>zz)) + * @param string $filtertype To filter on field type in llx_c_paiement ('CRDT' or 'DBIT' or array('code'=>xx,'label'=>zz)) * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code * @param int $empty 1=peut etre vide, 0 sinon * @param int $noadmininfo 0=Add admin info, 1=Disable admin info * @param int $maxlength Max length of label + * @param int $active Active or not, -1 = all * @return void */ - function select_types_paiements($selected='',$htmlname='paiementtype',$filtertype='',$format=0, $empty=0, $noadmininfo=0,$maxlength=0) + function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=0, $noadmininfo=0, $maxlength=0, $active=1) { global $langs,$user; @@ -2654,6 +2738,9 @@ class Form if ($empty) print ''; foreach($this->cache_types_paiements as $id => $arraytypes) { + // If not good status + if ($active >= 0 && $arraytypes['active'] != $active) continue; + // On passe si on a demande de filtrer sur des modes de paiments particuliers if (count($filterarray) && ! in_array($arraytypes['type'],$filterarray)) continue; @@ -3358,7 +3445,7 @@ class Form * @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id) * @param int $selected Id pre-selected project * @param string $htmlname Name of select field - * @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable) + * @param int $discard_closed Discard closed projects (0=Keep,1=hide completely except $selected,2=Disable) * @param int $maxlength Max length * @param int $forcefocus Force focus on field (works with javascript only) * @return void @@ -3381,7 +3468,7 @@ class Form print ''; print ''; print ''; print ''; print '
'; - $formproject->select_projects($socid,$selected,$htmlname,$maxlength,0,1,$discard_closed, $forcefocus); + $formproject->select_projects($socid, $selected, $htmlname, $maxlength, 0, 1, $discard_closed, $forcefocus); print '
'; @@ -3580,7 +3667,7 @@ class Form print ''; print ''; print ''; print ''; print '
'; - print $this->select_users($selected,$htmlname,1,$exclude,0,$include); + print $this->select_dolusers($selected,$htmlname,1,$exclude,0,$include); print '
'; @@ -3607,9 +3694,10 @@ class Form * @param int $selected Id mode pre-selectionne * @param string $htmlname Name of select html field * @param string $filtertype To filter on field type in llx_c_paiement (array('code'=>xx,'label'=>zz)) + * @param int $active Active or not, -1 = all * @return void */ - function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='') + function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='', $active=1) { global $langs; if ($htmlname != "none") @@ -3619,7 +3707,7 @@ class Form print ''; print ''; print ''; print ''; print '
'; - $this->select_types_paiements($selected,$htmlname,$filtertype); + $this->select_types_paiements($selected,$htmlname,$filtertype,0,0,0,0,$active); print '
'; @@ -3629,13 +3717,71 @@ class Form if ($selected) { $this->load_cache_types_paiements(); - print $this->cache_types_paiements[$selected]['label']; } else { print " "; } } } + + /** + * Show form with multicurrency code + * + * @param string $page Page + * @param string $selected code pre-selectionne + * @param string $htmlname Name of select html field + * @return void + */ + function form_multicurrency_code($page, $selected='', $htmlname='multicurrency_code') + { + global $langs; + if ($htmlname != "none") + { + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $this->selectMultiCurrency($selected,$htmlname); + print '
'; + } + else + { + dol_include_once('/core/lib/company.lib.php'); + print !empty($selected) ? currency_name($selected,1) : ' '; + } + } + + /** + * Show form with multicurrency rate + * + * @param string $page Page + * @param double $rate Current rate + * @param string $htmlname Name of select html field + * @return void + */ + function form_multicurrency_rate($page, $rate='', $htmlname='multicurrency_tx') + { + global $langs; + if ($htmlname != "none") + { + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print ''; + print '
'; + } + else + { + print !empty($rate) ? price(price2num($rate), 1, $langs) : 1; + } + } /** @@ -3839,7 +3985,53 @@ class Form return $out; } + /** + * Return array of currencies in user language + * + * @param string $selected preselected currency code + * @param string $htmlname name of HTML select list + * @param integer $useempty 1=Add empty line + * @return string + */ + function selectMultiCurrency($selected='',$htmlname='multicurrency_code', $useempty=0) + { + global $db,$conf,$langs,$user; + $langs->loadCacheCurrencies(''); + + $TCurrency = array(); + + $sql = 'SELECT code FROM '.MAIN_DB_PREFIX.'multicurrency'; + $resql = $db->query($sql); + + if ($resql) + { + while ($obj = $db->fetch_object($resql)) $TCurrency[$obj->code] = $obj->code; + } + + $out=''; + $out.= ''; + return $out; + } + /** * Load into the cache vat rates of a country * @@ -3855,12 +4047,12 @@ class Form dol_syslog(__METHOD__, LOG_DEBUG); - $sql = "SELECT DISTINCT t.taux, t.recuperableonly"; + $sql = "SELECT DISTINCT t.code, t.taux, t.recuperableonly"; $sql.= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c"; $sql.= " WHERE t.fk_pays = c.rowid"; $sql.= " AND t.active > 0"; $sql.= " AND c.code IN (".$country_code.")"; - $sql.= " ORDER BY t.taux ASC, t.recuperableonly ASC"; + $sql.= " ORDER BY t.code ASC, t.taux ASC, t.recuperableonly ASC"; $resql=$this->db->query($sql); if ($resql) @@ -3871,8 +4063,9 @@ class Form for ($i = 0; $i < $num; $i++) { $obj = $this->db->fetch_object($resql); + $this->cache_vatrates[$i]['code'] = $obj->code; $this->cache_vatrates[$i]['txtva'] = $obj->taux; - $this->cache_vatrates[$i]['libtva'] = $obj->taux.'%'; + $this->cache_vatrates[$i]['libtva'] = $obj->taux.'%'.($obj->code?' ('.$obj->code.')':''); // Label must contains only 0-9 , . % or * $this->cache_vatrates[$i]['nprtva'] = $obj->recuperableonly; } @@ -3895,7 +4088,7 @@ class Form * Output an HTML select vat rate. * The name of this function should be selectVat. We keep bad name for compatibility purpose. * - * @param string $htmlname Name of html select field + * @param string $htmlname Name of HTML select field * @param float $selectedrate Force preselected vat rate. Use '' for no forcing. * @param Societe $societe_vendeuse Thirdparty seller * @param Societe $societe_acheteuse Thirdparty buyer @@ -3908,10 +4101,11 @@ class Form * Si vendeur et acheteur dans Communauté européenne et acheteur= particulier alors TVA par défaut=TVA du produit vendu. Fin de règle. * Si vendeur et acheteur dans Communauté européenne et acheteur= entreprise alors TVA par défaut=0. Fin de règle. * Sinon la TVA proposee par defaut=0. Fin de regle. - * @param bool $options_only Return options only (for ajax treatment) + * @param bool $options_only Return HTML options lines only (for ajax treatment) + * @param int $addcode Add code into key in select list * @return string */ - function load_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='', $options_only=false) + function load_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='', $options_only=false, $addcode=0) { global $langs,$conf,$mysoc; @@ -4014,13 +4208,16 @@ class Form $return.= '
'.$langs->trans("Priority").' :
'.$langs->trans("Type").' : @@ -324,7 +324,7 @@ function limitChars(textarea, limit, infodiv) print ''; if ($this->withcancel) { - print '  &nbnp;  '; + print '     '; print ''; } print ''; diff --git a/htdocs/core/class/html.formsupplier_proposal.class.php b/htdocs/core/class/html.formsupplier_proposal.class.php new file mode 100644 index 00000000000..d317778e1a0 --- /dev/null +++ b/htdocs/core/class/html.formsupplier_proposal.class.php @@ -0,0 +1,104 @@ + + * + * 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 3 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, see . + */ + +/** + * \file htdocs/core/class/html.formpropal.class.php + * \ingroup core + * \brief File of class with all html predefined components + */ + + +/** + * Class to manage generation of HTML components for proposal management + */ +class FormSupplierProposal +{ + var $db; + var $error; + + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + } + + /** + * Return combo list of differents status of a proposal + * Values are id of table c_propalst + * + * @param string $selected Preselected value + * @param int $short Use short labels + * @return void + */ + function selectSupplierProposalStatus($selected='',$short=0) + { + global $langs; + + $sql = "SELECT id, code, label, active FROM ".MAIN_DB_PREFIX."c_propalst"; + $sql .= " WHERE active = 1"; + + dol_syslog(get_class($this)."::selectSupplierProposalStatus", LOG_DEBUG); + $resql=$this->db->query($sql); + if ($resql) + { + print ''; + } + else + { + dol_print_error($this->db); + } + } + +} + diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 400eb934e26..8ea3221c648 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -108,7 +108,7 @@ class Ldap { global $conf; - //Server + // Server if (! empty($conf->global->LDAP_SERVER_HOST)) $this->server[] = $conf->global->LDAP_SERVER_HOST; if (! empty($conf->global->LDAP_SERVER_HOST_SLAVE)) $this->server[] = $conf->global->LDAP_SERVER_HOST_SLAVE; $this->serverPort = $conf->global->LDAP_SERVER_PORT; @@ -120,9 +120,11 @@ class Ldap $this->searchPassword = $conf->global->LDAP_ADMIN_PASS; $this->people = $conf->global->LDAP_USER_DN; $this->groups = $conf->global->LDAP_GROUP_DN; - $this->filter = $conf->global->LDAP_FILTER_CONNECTION; - //Users + $this->filter = $conf->global->LDAP_FILTER_CONNECTION; // Filter on user + $this->filtermember = $conf->global->LDAP_MEMBER_FILTER; // Filter on member + + // Users $this->attr_login = $conf->global->LDAP_FIELD_LOGIN; //unix $this->attr_sambalogin = $conf->global->LDAP_FIELD_LOGIN_SAMBA; //samba, activedirectory $this->attr_name = $conf->global->LDAP_FIELD_NAME; @@ -147,7 +149,7 @@ class Ldap */ function connect_bind() { - global $langs; + global $langs, $conf; $connected=0; $this->bind=0; @@ -184,7 +186,18 @@ class Ldap if (is_resource($this->connection)) { - // Execute the ldap_set_option here (after connect and before bind) + // Begin TLS if requested by the configuration + if (! empty($conf->global->LDAP_SERVER_USE_TLS)) + { + if (! ldap_start_tls($this->connection)) + { + dol_syslog(get_class($this)."::connect_bind failed to start tls", LOG_WARNING); + $connected = 0; + $this->close(); + } + } + + // Execute the ldap_set_option here (after connect and before bind) $this->setVersion(); ldap_set_option($this->connection, LDAP_OPT_SIZELIMIT, 0); // no limit here. should return true. @@ -891,14 +904,14 @@ class Ldap } /** - * Returns an array containing a details of elements + * Returns an array containing a details or list of LDAP record(s) * ldapsearch -LLLx -hlocalhost -Dcn=admin,dc=parinux,dc=org -w password -b "ou=adherents,ou=people,dc=parinux,dc=org" userPassword * - * @param string $search Valeur champ cle recherche, sinon '*' pour tous. + * @param string $search Value of fiel to search, '*' for all. Not used if $activefilter is set. * @param string $userDn DN (Ex: ou=adherents,ou=people,dc=parinux,dc=org) * @param string $useridentifier Name of key field (Ex: uid) * @param array $attributeArray Array of fields required. Note this array must also contains field $useridentifier (Ex: sn,userPassword) - * @param int $activefilter 1=use field this->filter as filter instead of parameter $search + * @param int $activefilter '1' or 'user'=use field this->filter as filter instead of parameter $search, 'member'=use field this->filtermember as filter * @param array $attributeAsArray Array of fields wanted as an array not a string * @return array Array of [id_record][ldap_field]=value */ @@ -906,7 +919,7 @@ class Ldap { $fulllist=array(); - dol_syslog(get_class($this)."::getRecords search=".$search." userDn=".$userDn." useridentifier=".$useridentifier." attributeArray=array(".join(',',$attributeArray).")"); + dol_syslog(get_class($this)."::getRecords search=".$search." userDn=".$userDn." useridentifier=".$useridentifier." attributeArray=array(".join(',',$attributeArray).") activefilter=".$activefilter); // if the directory is AD, then bind first with the search user first if ($this->serverType == "activedirectory") @@ -916,15 +929,19 @@ class Ldap } // Define filter - if ($activefilter == 1) + if (! empty($activefilter)) { - if ($this->filter) + if (((string) $activefilter == '1' || (string) $activefilter == 'user') && $this->filter) { $filter = '('.$this->filter.')'; } - else + elseif (((string) $activefilter == 'member') && $this->filter) { - $filter='('.$useridentifier.'=*)'; + $filter = '('.$this->filtermember.')'; + } + else // If this->filter is empty, make fiter on * (all) + { + $filter = '('.$useridentifier.'=*)'; } } else diff --git a/htdocs/core/class/link.class.php b/htdocs/core/class/link.class.php index 0cdc6a8c4a8..62bcf9d22c5 100644 --- a/htdocs/core/class/link.class.php +++ b/htdocs/core/class/link.class.php @@ -31,7 +31,6 @@ class Link extends CommonObject public $element = 'link'; public $table_element = 'links'; - public $id; public $entity; public $datea; public $url; @@ -223,19 +222,18 @@ class Link extends CommonObject /** * Loads all links from database * - * @param array $links array of Link objects to fill + * @param array $links array of Link objects to fill * @param string $objecttype type of the associated object in dolibarr * @param int $objectid id of the associated object in dolibarr * @param string $sortfield field used to sort * @param string $sortorder sort order - * @return 1 if ok, 0 if no records, -1 if error - * - * */ + * @return int 1 if ok, 0 if no records, -1 if error + **/ public function fetchAll(&$links, $objecttype, $objectid, $sortfield=null, $sortorder=null) { global $conf; - $sql = "SELECT rowid, entity, datea, url, label , objecttype, objectid FROM " . MAIN_DB_PREFIX . "links"; + $sql = "SELECT rowid, entity, datea, url, label, objecttype, objectid FROM " . MAIN_DB_PREFIX . "links"; $sql .= " WHERE objecttype = '" . $objecttype . "' AND objectid = " . $objectid; if ($conf->entity != 0) $sql .= " AND entity = " . $conf->entity; if ($sortfield) { @@ -274,12 +272,36 @@ class Link extends CommonObject } } + /** + * Return nb of links + * + * @param DoliDb $db Database handler + * @param string $objecttype Type of the associated object in dolibarr + * @param int $objectid Id of the associated object in dolibarr + * @return int Nb of links, -1 if error + **/ + public static function count($db, $objecttype, $objectid) + { + global $conf; + + $sql = "SELECT COUNT(rowid) as nb FROM " . MAIN_DB_PREFIX . "links"; + $sql .= " WHERE objecttype = '" . $objecttype . "' AND objectid = " . $objectid; + if ($conf->entity != 0) $sql .= " AND entity = " . $conf->entity; + + $resql = $db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + if ($obj) return $obj->nb; + } + return -1; + } + /** * Loads a link from database * * @param int $rowid Id of link to load * @return int 1 if ok, 0 if no record found, -1 if error - * **/ public function fetch($rowid=null) { @@ -334,7 +356,7 @@ class Link extends CommonObject $result=$this->call_trigger('LINK_DELETE',$user); if ($result < 0) return -1; // End call triggers - + $this->db->begin(); // Remove link @@ -348,7 +370,6 @@ class Link extends CommonObject $this->error = $this->db->lasterror(); } - if (! $error) { $this->db->commit(); diff --git a/htdocs/core/class/menu.class.php b/htdocs/core/class/menu.class.php index 737e682bba3..58e93ec5544 100644 --- a/htdocs/core/class/menu.class.php +++ b/htdocs/core/class/menu.class.php @@ -55,7 +55,7 @@ class Menu * @param string $titre Label of menu to add * @param integer $level Level of menu to add * @param int $enabled Menu active or not (0=Not active, 1=Active, 2=Active but grey) - * @param string $target Target lien + * @param string $target Target link * @param string $mainmenu Main menu ('home', 'companies', 'products', ...) * @param string $leftmenu Left menu ('setup', 'system', 'admintools', ...) * @param int $position Position (not used yet) @@ -74,7 +74,7 @@ class Menu * @param string $titre Label of menu to add * @param integer $level Level of menu to add * @param int $enabled Menu active or not - * @param string $target Target lien + * @param string $target Target link * @param string $mainmenu Main menu ('home', 'companies', 'products', ...) * @param string $leftmenu Left menu ('setup', 'system', 'admintools', ...) * @param int $position Position (not used yet) @@ -98,4 +98,18 @@ class Menu if (count($this->liste) > 1) array_pop($this->liste); } + /** + * Return number of visible entries (gray or not) + * + * @return int Number of visible (gray or not) menu entries + */ + function getNbOfVisibleMenuEntries() + { + $nb=0; + foreach($this->liste as $val) + { + if (! empty($val['enabled'])) $nb++; + } + return $nb; + } } diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 2c21cb3c512..cb370e31d96 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -511,7 +511,7 @@ class Menubase $sql.= " ORDER BY m.position, m.rowid"; //print $sql; -//$tmp1=dol_microtime_float(); +//$tmp1=microtime(true); //print '>>> 1 0
'; dol_syslog(get_class($this)."::menuLoad mymainmenu=".$mymainmenu." myleftmenu=".$myleftmenu." type_user=".$type_user." menu_handler=".$menu_handler." tabMenu size=".count($tabMenu)."", LOG_DEBUG); $resql = $this->db->query($sql); @@ -575,7 +575,7 @@ class Menubase $title = $langs->trans($menu['titre']); } } -//$tmp4=dol_microtime_float(); +//$tmp4=microtime(true); //print '>>> 3 '.($tmp4 - $tmp3).'
'; // We complete tabMenu diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 51d9dd621dc..cfefa223a7d 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -817,7 +817,36 @@ class SMTPs return $_retValue; } - + /** + * Reply-To Address from which mail will be the reply-to + * + * @param string $_strReplyTo Address from which mail will be the reply-to + * @return void + */ + function setReplyTo($_strReplyTo) + { + if ( $_strReplyTo ) + $this->_msgReplyTo = $this->_strip_email($_strReplyTo); + } + + /** + * Retrieves the Address from which mail will be the reply-to + * + * @param boolean $_part To "strip" 'Real name' from address + * @return string Address from which mail will be the reply-to + */ + function getReplyTo($_part = true) + { + $_retValue = ''; + + if ( $_part === true ) + $_retValue = $this->_msgReplyTo; + else + $_retValue = $this->_msgReplyTo[$_part]; + + return $_retValue; + } + /** * Inserts given addresses into structured format. * This method takes a list of given addresses, via an array @@ -1133,8 +1162,10 @@ class SMTPs $trackid = $this->getTrackId(); if ($trackid) { - $_header .= 'Message-ID: <' . time() . '.SMTPs-'.$trackid.'@' . $host . ">\r\n"; - $_header .= 'references: <' . time() . '.SMTPs-'.$trackid.'@' . $host . ">\r\n"; + // References is kept in response and Message-ID is returned into In-Reply-To: + $_header .= 'Message-ID: <' . time() . '.SMTPs-dolibarr-'.$trackid.'@' . $host . ">\r\n"; + $_header .= 'References: <' . time() . '.SMTPs-dolibarr-'.$trackid.'@' . $host . ">\r\n"; + $_header .= 'X-Dolibarr-TRACKID: ' . $trackid . "\r\n"; } else { @@ -1157,7 +1188,8 @@ class SMTPs $_header .= 'Disposition-Notification-To: '.$this->getFrom('addr') . "\r\n"; if ( $this->getErrorsTo() ) $_header .= 'Errors-To: '.$this->getErrorsTo('addr') . "\r\n"; - + if ( $this->getReplyTo() ) + $_header .= "Reply-To: ".$this->getReplyTo('addr') ."\r\n"; $_header .= 'X-Mailer: Dolibarr version ' . DOL_VERSION .' (using SMTPs Mailer)' . "\r\n" . 'Mime-Version: 1.0' . "\r\n"; diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 5d06586fb16..89ab0019865 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2012 Destailleur Laurent + * Copyright (C) 2004-2015 Destailleur Laurent * Copyright (C) 2005-2010 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -29,17 +29,17 @@ */ class Translate { - var $dir; // Directories that contains /langs subdirectory + var $dir; // Directories that contains /langs subdirectory - var $defaultlang; // Current language for current user - var $direction = 'ltr'; // Left to right or Right to left - var $charset_output='UTF-8'; // Codage used by "trans" method outputs + var $defaultlang; // Current language for current user + var $direction = 'ltr'; // Left to right or Right to left + var $charset_output='UTF-8'; // Codage used by "trans" method outputs - var $tab_translate=array(); // Array of all translations key=>value - private $_tab_loaded=array(); // Array to store result after loading each language file + var $tab_translate=array(); // Array of all translations key=>value + private $_tab_loaded=array(); // Array to store result after loading each language file - var $cache_labels=array(); // Cache for labels return by getLabelFromKey method - var $cache_currencies=array(); // Cache to store currency symbols + var $cache_labels=array(); // Cache for labels return by getLabelFromKey method + var $cache_currencies=array(); // Cache to store currency symbols @@ -144,7 +144,6 @@ class Translate * If data for file already loaded, do nothing. * All data in translation array are stored in UTF-8 format. * tab_loaded is completed with $domain key. - * Warning: MAIN_USE_CUSTOM_TRANSLATION is an old deprecated feature. Do not use it. It will revert * rule "we keep first entry found with we keep last entry found" so it is probably not what you want to do. * * Value for hash are: 1:Loaded from disk, 2:Not found, 3:Loaded from cache @@ -158,9 +157,11 @@ class Translate * @param int $forcelangdir To force a different lang directory * @return int <0 if KO, 0 if already loaded or loading not required, >0 if OK */ - function Load($domain,$alt=0,$stopafterdirection=0,$forcelangdir='') + function load($domain,$alt=0,$stopafterdirection=0,$forcelangdir='') { - global $conf; + global $conf,$db; + + if (count($this->tab_translate) == 0) $this->loadFromDatabase($db); // Nothing was loaded yet, so we load database. // Check parameters if (empty($domain)) @@ -240,7 +241,7 @@ class Translate $tmparray=dol_getcache($usecachekey); if (is_array($tmparray) && count($tmparray)) { - $this->tab_translate=array_merge($tmparray,$this->tab_translate); // Already found values tab_translate overwrites duplicates + $this->tab_translate+=$tmparray; // Faster than array_merge($tmparray,$this->tab_translate). Note: If a valuer already exists into tab_translate, value into tmparaay is not added. //print $newdomain."\n"; //var_dump($this->tab_translate); if ($alt == 2) $fileread=1; @@ -261,7 +262,7 @@ class Translate $tab=explode('=',$line,2); $key=trim($tab[0]); //print "Domain=$domain, found a string for $tab[0] with value $tab[1]
"; - if ((! empty($conf->global->MAIN_USE_CUSTOM_TRANSLATION) || empty($this->tab_translate[$key])) && isset($tab[1])) // If translation was already found, we must not continue, even if MAIN_FORCELANGDIR is set (MAIN_FORCELANGDIR is to replace lang dir, not to overwrite entries) + if (empty($this->tab_translate[$key]) && isset($tab[1])) // If translation was already found, we must not continue, even if MAIN_FORCELANGDIR is set (MAIN_FORCELANGDIR is to replace lang dir, not to overwrite entries) { $value=trim(preg_replace('/\\n/',"\n",$tab[1])); @@ -297,7 +298,7 @@ class Translate } } - if (empty($conf->global->MAIN_FORCELANGDIR) && empty($conf->global->MAIN_USE_CUSTOM_TRANSLATION)) break; // Break loop on each root dir. If a module has forced dir, we do not stop loop. + if (empty($conf->global->MAIN_FORCELANGDIR)) break; // Break loop on each root dir. If a module has forced dir, we do not stop loop. } } } @@ -330,13 +331,181 @@ class Translate if (empty($this->_tab_loaded[$newdomain])) $this->_tab_loaded[$newdomain]=2; // Marque ce fichier comme non trouve } - // Check to be sure that SeparatorDecimal differs from SeparatorThousand + // This part is deprecated and replaced with table llx_overwrite_trans + // Kept for backward compatibility. + $overwritekey='MAIN_OVERWRITE_TRANS_'.$this->defaultlang; + if (! empty($conf->global->$overwritekey)) // Overwrite translation with key1:newstring1,key2:newstring2 + { + // Overwrite translation with param MAIN_OVERWRITE_TRANS_xx_XX + $tmparray=explode(',', $conf->global->$overwritekey); + foreach($tmparray as $tmp) + { + $tmparray2=explode(':',$tmp); + if (! empty($tmparray2[1])) $this->tab_translate[$tmparray2[0]]=$tmparray2[1]; + } + } + + + + // Check to be sure that SeparatorDecimal differs from SeparatorThousand if (! empty($this->tab_translate["SeparatorDecimal"]) && ! empty($this->tab_translate["SeparatorThousand"]) && $this->tab_translate["SeparatorDecimal"] == $this->tab_translate["SeparatorThousand"]) $this->tab_translate["SeparatorThousand"]=''; return 1; } + /** + * Load translation key-value from database into a memory array. + * If data already loaded, do nothing. + * All data in translation array are stored in UTF-8 format. + * tab_loaded is completed with $domain key. + * rule "we keep first entry found with we keep last entry found" so it is probably not what you want to do. + * + * Value for hash are: 1:Loaded from disk, 2:Not found, 3:Loaded from cache + * + * @param Database $db Database handler + * @return int <0 if KO, 0 if already loaded or loading not required, >0 if OK + */ + function loadFromDatabase($db) + { + global $conf; + + $domain='database'; + + if ($this->defaultlang == 'none_NONE') return 0; // Special language code to not translate keys + + // Check parameters + if (empty($db)) return 0; // Database handler can't be used + + //dol_syslog("Translate::Load Start domain=".$domain." alt=".$alt." forcelangdir=".$forcelangdir." this->defaultlang=".$this->defaultlang); + + $newdomain = $domain; + $modulename = ''; + + // Check cache + if (! empty($this->_tab_loaded[$newdomain])) // File already loaded for this domain + { + //dol_syslog("Translate::Load already loaded for newdomain=".$newdomain); + return 0; + } + + $this->_tab_loaded[$newdomain] = 1; // We want to be sure this function is called once only. + + $fileread=0; + $langofdir=(empty($forcelangdir)?$this->defaultlang:$forcelangdir); + + // Redefine alt + $alt=2; + + if (empty($langofdir)) // This may occurs when load is called without setting the language and without providing a value for forcelangdir + { + dol_syslog("Error: ".get_class($this)."::Load was called but language was not set yet with langs->setDefaultLang(). Nothing will be loaded.", LOG_WARNING); + return -1; + } + + // TODO Move cache read out of loop on dirs or at least filelangexists + $found=false; + + // Enable caching of lang file in memory (not by default) + $usecachekey=''; + // Using a memcached server + if (! empty($conf->memcached->enabled) && ! empty($conf->global->MEMCACHED_SERVER)) + { + $usecachekey=$newdomain.'_'.$langofdir.'_'.md5($file_lang); // Should not contains special chars + } + // Using cache with shmop. Speed gain: 40ms - Memory overusage: 200ko (Size of session cache file) + else if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x02)) + { + $usecachekey=$newdomain; + } + + if ($usecachekey) + { + //dol_syslog('Translate::Load we will cache result into usecachekey '.$usecachekey); + //global $aaa; $aaa+=1; + //print $aaa." ".$usecachekey."\n"; + require_once DOL_DOCUMENT_ROOT .'/core/lib/memory.lib.php'; + $tmparray=dol_getcache($usecachekey); + if (is_array($tmparray) && count($tmparray)) + { + $this->tab_translate+=$tmparray; // Faster than array_merge($tmparray,$this->tab_translate). Note: If a valuer already exists into tab_translate, value into tmparaay is not added. + //print $newdomain."\n"; + //var_dump($this->tab_translate); + if ($alt == 2) $fileread=1; + $found=true; // Found in dolibarr PHP cache + } + } + + if (! $found) + { + // Overwrite translation with database read + $sql="SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where lang='".$this->defaultlang."'"; + $resql=$db->query($sql); + + if ($resql) + { + $num = $db->num_rows($resql); + if ($num) + { + if ($usecachekey) $tabtranslatedomain=array(); // To save lang content in cache + + $i = 0; + while ($i < $num) // Ex: Need 225ms for all fgets on all lang file for Third party page. Same speed than file_get_contents + { + $obj=$db->fetch_object($resql); + + $key=$obj->transkey; + $value=$obj->transvalue; + + //print "Domain=$domain, found a string for $tab[0] with value $tab[1]
"; + if (empty($this->tab_translate[$key])) // If translation was already found, we must not continue, even if MAIN_FORCELANGDIR is set (MAIN_FORCELANGDIR is to replace lang dir, not to overwrite entries) + { + $value=trim(preg_replace('/\\n/',"\n",$value)); + + $this->tab_translate[$key]=$value; + if ($usecachekey) $tabtranslatedomain[$key]=$value; // To save lang content in cache + } + + $i++; + } + + $fileread=1; + + // TODO Move cache write out of loop on dirs + // To save lang content for usecachekey into cache + if ($usecachekey && count($tabtranslatedomain)) + { + $ressetcache=dol_setcache($usecachekey,$tabtranslatedomain); + if ($ressetcache < 0) + { + $error='Failed to set cache for usecachekey='.$usecachekey.' result='.$ressetcache; + dol_syslog($error, LOG_ERR); + } + } + } + } + else + { + dol_print_error($db); + } + } + + if ($alt == 2) + { + if ($fileread) $this->_tab_loaded[$newdomain]=1; // Set domain file as loaded + + if (empty($this->_tab_loaded[$newdomain])) $this->_tab_loaded[$newdomain]=2; // Marque ce cas comme non trouve (no lines found for language) + } + + // Check to be sure that SeparatorDecimal differs from SeparatorThousand + if (! empty($this->tab_translate["SeparatorDecimal"]) && ! empty($this->tab_translate["SeparatorThousand"]) + && $this->tab_translate["SeparatorDecimal"] == $this->tab_translate["SeparatorThousand"]) $this->tab_translate["SeparatorThousand"]=''; + + return 1; + } + + + /** * Return translated value of key for special keys ("Currency...", "Civility...", ...). * Search in lang file, then into database. Key must be any complete entry into lang file: CurrencyEUR, ... @@ -410,18 +579,18 @@ class Translate { $str=$this->tab_translate[$key]; - // Overwrite translation (TODO Move this at a higher level when we load tab_translate to avoid doing it for each trans call) - $overwritekey='MAIN_OVERWRITE_TRANS_'.$this->defaultlang; - if (! empty($conf->global->$overwritekey)) // Overwrite translation with key1:newstring1,key2:newstring2 + // Make some string replacement after translation + $replacekey='MAIN_REPLACE_TRANS_'.$this->defaultlang; + if (! empty($conf->global->$replacekey)) // Replacement translation variable with string1:newstring1;string2:newstring2 { - $tmparray=explode(',', $conf->global->$overwritekey); + $tmparray=explode(';', $conf->global->$replacekey); foreach($tmparray as $tmp) { $tmparray2=explode(':',$tmp); - if ($tmparray2[0]==$key) { $str=$tmparray2[1]; break; } + $str=preg_replace('/'.preg_quote($tmparray2[0]).'/',$tmparray2[1],$str); } } - + if (! preg_match('/^Format/',$key)) { //print $str; @@ -490,17 +659,17 @@ class Translate { $str=$this->tab_translate[$key]; - // Overwrite translation - $overwritekey='MAIN_OVERWRITE_TRANS_'.$this->defaultlang; - if (! empty($conf->global->$overwritekey)) // Overwrite translation with key1:newstring1,key2:newstring2 + // Make some string replacement after translation + $replacekey='MAIN_REPLACE_TRANS_'.$this->defaultlang; + if (! empty($conf->global->$replacekey)) // Replacement translation variable with string1:newstring1;string2:newstring2 { - $tmparray=explode(',', $conf->global->$overwritekey); + $tmparray=explode(';', $conf->global->$replacekey); foreach($tmparray as $tmp) { $tmparray2=explode(':',$tmp); - if ($tmparray2[0]==$key) { $str=$tmparray2[1]; break; } + $str=preg_replace('/'.preg_quote($tmparray2[0]).'/',$tmparray2[1],$str); } - } + } if (! preg_match('/^Format/',$key)) { @@ -812,7 +981,8 @@ class Translate } /** - * Return an array with content of all loaded translation keys (found into this->tab_translate) + * Return an array with content of all loaded translation keys (found into this->tab_translate) so + * we get a substitution array we can use for substitutions (for mail or ODT generation for example) * * @return array Array of translation keys lang_key => string_translation_loaded */ @@ -827,9 +997,3 @@ class Translate return $substitutionarray; } } - - -function warning_handler($errno, $errstr, $errfile, $errline, array $errcontext) { - global $str; - print 'str='.$str; -} diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php new file mode 100644 index 00000000000..4cd7b84f150 --- /dev/null +++ b/htdocs/core/class/utils.class.php @@ -0,0 +1,133 @@ + + * + * 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 3 of the License, or + * 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, see . + */ + +/** + * \file htdocs/core/class/utils.class.php + * \ingroup core + * \brief File for Utils class + */ + + +/** + * Class to manage utility methods + */ +class Utils +{ + var $db; + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + function __construct($db) + { + $this->db = $db; + } + + + /** + * Purge files into directory of data files. + * + * @param string $choice Choice of purge mode ('tempfiles', 'tempfilesold' to purge temp older than 24h, 'allfiles', 'logfiles') + * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) + */ + function purgeFiles($choice='tempfilesold') + { + global $conf, $langs, $dolibarr_main_data_root; + + dol_syslog("Utils::purgeFiles choice=".$choice, LOG_DEBUG); + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $filesarray=array(); + if (empty($choice)) $choice='tempfilesold'; + + if ($choice=='tempfiles' || $choice=='tempfilesold') + { + // Delete temporary files + if ($dolibarr_main_data_root) + { + $filesarray=dol_dir_list($dolibarr_main_data_root,"directories",1,'^temp$','','','',2); + if ($choice == 'tempfilesold') + { + $now = dol_now(); + foreach($filesarray as $key => $val) + { + if ($val['date'] > ($now - (24 * 3600))) unset($filesarray[$key]); // Discard files not older than 24h + } + } + } + } + + if ($choice=='allfiles') + { + // Delete all files + if ($dolibarr_main_data_root) + { + $filesarray=dol_dir_list($dolibarr_main_data_root,"all",0,'','install\.lock$'); + } + } + + if ($choice=='logfile') + { + // Define filelog to discard it from purge + $filelog=''; + if (! empty($conf->syslog->enabled)) + { + $filelog=SYSLOG_FILE; + $filelog=preg_replace('/DOL_DATA_ROOT/i',DOL_DATA_ROOT,$filelog); + } + + $filesarray[]=array('fullname'=>$filelog,'type'=>'file'); + } + + $count=0; + if (count($filesarray)) + { + foreach($filesarray as $key => $value) + { + //print "x ".$filesarray[$key]['fullname']."
\n"; + if ($filesarray[$key]['type'] == 'dir') + { + $count+=dol_delete_dir_recursive($filesarray[$key]['fullname']); + } + elseif ($filesarray[$key]['type'] == 'file') + { + // If (file that is not logfile) or (if logfile with option logfile) + if ($filesarray[$key]['fullname'] != $filelog || $choice=='logfile') + { + $count+=(dol_delete_file($filesarray[$key]['fullname'])?1:0); + } + } + } + + // Update cachenbofdoc + if (! empty($conf->ecm->enabled) && $choice=='allfiles') + { + require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; + $ecmdirstatic = new EcmDirectory($this->db); + $result = $ecmdirstatic->refreshcachenboffile(1); + } + } + + if ($count > 0) $this->output=$langs->trans("PurgeNDirectoriesDeleted", $count); + else $this->output=$langs->trans("PurgeNothingToDelete"); + + //return $count; + return 0; // This function can be called by cron so must return 0 if OK + } +} diff --git a/htdocs/core/datepicker.php b/htdocs/core/datepicker.php index eae723946f6..63b765fbadb 100644 --- a/htdocs/core/datepicker.php +++ b/htdocs/core/datepicker.php @@ -56,7 +56,7 @@ print ''."\n"; print ''."\n"; if (GETPOST('mode') && GETPOST('mode') == 'test') { - print ''."\n"; + print ''."\n"; } else { @@ -288,4 +288,4 @@ function displayBox($selectedDate,$month,$year)
* Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -31,12 +32,14 @@ require_once DOL_DOCUMENT_ROOT .'/core/db/DoliDB.class.php'; */ class DoliDBMysqli extends DoliDB { + /** @var mysqli Database object */ + public $db; //! Database type public $type='mysqli'; //! Database label const LABEL='MySQL or MariaDB'; //! Version min database - const VERSIONMIN='4.1.3'; + const VERSIONMIN='5.0.3'; /** @var mysqli_result Resultset of last query */ private $_results; @@ -67,13 +70,12 @@ class DoliDBMysqli extends DoliDB //print "Name DB: $host,$user,$pass,$name
"; - if (! function_exists("mysqli_connect")) + if (! class_exists('mysqli')) { $this->connected = false; $this->ok = false; $this->error="Mysqli PHP functions for using Mysqli driver are not available in this version of PHP. Try to use another driver."; dol_syslog(get_class($this)."::DoliDBMysqli : Mysqli PHP functions for using Mysqli driver are not available in this version of PHP. Try to use another driver.",LOG_ERR); - return $this->ok; } if (! $host) @@ -81,29 +83,24 @@ class DoliDBMysqli extends DoliDB $this->connected = false; $this->ok = false; $this->error=$langs->trans("ErrorWrongHostParameter"); - dol_syslog(get_class($this)."::DoliDBMysqli : Erreur Connect, wrong host parameters",LOG_ERR); - return $this->ok; + dol_syslog(get_class($this)."::DoliDBMysqli : Connect error, wrong host parameters",LOG_ERR); } - // Essai connexion serveur - // We do not try to connect to database, only to server. Connect to database is done later in constrcutor - $this->db = $this->connect($host, $user, $pass, '', $port); + // Try server connection + // We do not try to connect to database, only to server. Connect to database is done later in constrcutor + $this->db = $this->connect($host, $user, $pass, '', $port); - if ($this->db) - { - $this->connected = true; - $this->ok = true; - } - else - { - // host, login ou password incorrect - $this->connected = false; - $this->ok = false; - $this->error=mysqli_connect_error(); - dol_syslog(get_class($this)."::DoliDBMysqli : Erreur Connect mysqli_connect_error=".$this->error,LOG_ERR); - } + if ($this->db->connect_errno) { + $this->connected = false; + $this->ok = false; + $this->error = $this->db->connect_error; + dol_syslog(get_class($this) . "::DoliDBMysqli Connect error: " . $this->error, LOG_ERR); + } else { + $this->connected = true; + $this->ok = true; + } - // Si connexion serveur ok et si connexion base demandee, on essaie connexion base + // If server connection is ok, we try to connect to the database if ($this->connected && $name) { if ($this->select_db($name)) @@ -116,11 +113,9 @@ class DoliDBMysqli extends DoliDB $clientmustbe=''; if (preg_match('/UTF-8/i',$conf->file->character_set_client)) $clientmustbe='utf8'; if (preg_match('/ISO-8859-1/i',$conf->file->character_set_client)) $clientmustbe='latin1'; - if (mysqli_character_set_name($this->db) != $clientmustbe) - { - $this->query("SET NAMES '".$clientmustbe."'", $this->db); - //$this->query("SET CHARACTER SET ". $this->forcecharset); - } + if ($this->db->character_set_name() != $clientmustbe) { + $this->db->set_charset($clientmustbe); + } } else { @@ -128,7 +123,7 @@ class DoliDBMysqli extends DoliDB $this->database_name = ''; $this->ok = false; $this->error=$this->error(); - dol_syslog(get_class($this)."::DoliDBMysqli : Erreur Select_db ".$this->error,LOG_ERR); + dol_syslog(get_class($this)."::DoliDBMysqli : Select_db error ".$this->error,LOG_ERR); } } else @@ -142,15 +137,11 @@ class DoliDBMysqli extends DoliDB $clientmustbe=''; if (preg_match('/UTF-8/i',$conf->file->character_set_client)) $clientmustbe='utf8'; if (preg_match('/ISO-8859-1/i',$conf->file->character_set_client)) $clientmustbe='latin1'; - if (mysqli_character_set_name($this->db) != $clientmustbe) - { - $this->query("SET NAMES '".$clientmustbe."'", $this->db); - //$this->query("SET CHARACTER SET ". $this->forcecharset); - } + if ($this->db->character_set_name() != $clientmustbe) { + $this->db->set_charset($clientmustbe); + } } } - - return $this->ok; } @@ -175,36 +166,27 @@ class DoliDBMysqli extends DoliDB function select_db($database) { dol_syslog(get_class($this)."::select_db database=".$database, LOG_DEBUG); - return mysqli_select_db($this->db,$database); + return $this->db->select_db($database); } - /** - * Connexion to server + /** + * Connect to server * - * @param string $host database server host - * @param string $login login - * @param string $passwd password - * @param string $name name of database (not used for mysql, used for pgsql) - * @param integer $port Port of database server - * @return mysqli Database access handler - * @see close - */ - function connect($host, $login, $passwd, $name, $port=0) - { - dol_syslog(get_class($this)."::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name",LOG_DEBUG); + * @param string $host database server host + * @param string $login login + * @param string $passwd password + * @param string $name name of database (not used for mysql, used for pgsql) + * @param integer $port Port of database server + * @return mysqli Database access object + * @see close + */ + function connect($host, $login, $passwd, $name, $port = 0) + { + dol_syslog(get_class($this) . "::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name", LOG_DEBUG); - $newhost=$host; - $newport=$port; - - // With mysqli, port must be in connect parameters - if (! $newport) $newport=3306; - - $this->db = @mysqli_connect($newhost, $login, $passwd, $name, $newport); - - //print "Resultat fonction connect: ".$this->db; - return $this->db; - } + return new mysqli($host, $login, $passwd, $name, $port); + } /** * Return version of database server @@ -213,7 +195,7 @@ class DoliDBMysqli extends DoliDB */ function getVersion() { - return mysqli_get_server_info($this->db); + return $this->db->server_info; } /** @@ -221,10 +203,10 @@ class DoliDBMysqli extends DoliDB * * @return string Version string */ - function getDriverInfo() - { - return mysqli_get_client_info($this->db); - } + function getDriverInfo() + { + return $this->db->client_info; + } /** @@ -239,7 +221,7 @@ class DoliDBMysqli extends DoliDB { if ($this->transaction_opened > 0) dol_syslog(get_class($this)."::close Closing a connection with an opened transaction depth=".$this->transaction_opened,LOG_ERR); $this->connected=false; - return mysqli_close($this->db); + return $this->db->close(); } return false; } @@ -264,11 +246,11 @@ class DoliDBMysqli extends DoliDB if (! $this->database_name) { // Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE) - $ret = mysqli_query($this->db,$query); + $ret = $this->db->query($query); } else { - $ret = mysqli_query($this->db,$query); + $ret = $this->db->query($query); } if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query)) @@ -300,7 +282,7 @@ class DoliDBMysqli extends DoliDB { // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion if (! is_object($resultset)) { $resultset=$this->_results; } - return mysqli_fetch_object($resultset); + return $resultset->fetch_object(); } @@ -314,7 +296,7 @@ class DoliDBMysqli extends DoliDB { // If resultset not provided, we take the last used by connexion if (! is_object($resultset)) { $resultset=$this->_results; } - return mysqli_fetch_array($resultset); + return $resultset->fetch_array(); } /** @@ -329,7 +311,7 @@ class DoliDBMysqli extends DoliDB if (! is_bool($resultset)) { if (! is_object($resultset)) { $resultset=$this->_results; } - return mysqli_fetch_row($resultset); + return $resultset->fetch_row(); } else { @@ -349,7 +331,7 @@ class DoliDBMysqli extends DoliDB { // If resultset not provided, we take the last used by connexion if (! is_object($resultset)) { $resultset=$this->_results; } - return mysqli_num_rows($resultset); + return $resultset->num_rows; } /** @@ -365,7 +347,7 @@ class DoliDBMysqli extends DoliDB if (! is_object($resultset)) { $resultset=$this->_results; } // mysql necessite un link de base pour cette fonction contrairement // a pqsql qui prend un resultset - return mysqli_affected_rows($this->db); + return $this->db->affected_rows; } @@ -380,7 +362,7 @@ class DoliDBMysqli extends DoliDB // If resultset not provided, we take the last used by connexion if (! is_object($resultset)) { $resultset=$this->_results; } // Si resultset en est un, on libere la memoire - if (is_object($resultset)) mysqli_free_result($resultset); + if (is_object($resultset)) $resultset->free_result(); } /** @@ -391,7 +373,7 @@ class DoliDBMysqli extends DoliDB */ function escape($stringtoencode) { - return addslashes($stringtoencode); + return $this->db->real_escape_string($stringtoencode); } /** @@ -436,10 +418,10 @@ class DoliDBMysqli extends DoliDB 1451 => 'DB_ERROR_CHILD_EXISTS' ); - if (isset($errorcode_map[mysqli_errno($this->db)])) { - return $errorcode_map[mysqli_errno($this->db)]; + if (isset($errorcode_map[$this->db->errno])) { + return $errorcode_map[$this->db->errno]; } - $errno=mysqli_errno($this->db); + $errno=$this->db->errno; return ($errno?'DB_ERROR_'.$errno:'0'); } } @@ -456,7 +438,7 @@ class DoliDBMysqli extends DoliDB return 'Not connected. Check setup parameters in conf/conf.php file and your mysql client and server versions'; } else { - return mysqli_error($this->db); + return $this->db->error; } } @@ -469,7 +451,7 @@ class DoliDBMysqli extends DoliDB */ function last_insert_id($tab,$fieldid='rowid') { - return mysqli_insert_id($this->db); + return $this->db->insert_id; } /** diff --git a/htdocs/core/extrafieldsinexport.inc.php b/htdocs/core/extrafieldsinexport.inc.php new file mode 100644 index 00000000000..1a608f6bc2e --- /dev/null +++ b/htdocs/core/extrafieldsinexport.inc.php @@ -0,0 +1,50 @@ +entity.')'; +//print $sql; +$resql=$this->db->query($sql); +if ($resql) // This can fail when class is used on old database (during migration for example) +{ + while ($obj=$this->db->fetch_object($resql)) + { + $fieldname=$keyforaliasextra.'.'.$obj->name; + $fieldlabel=ucfirst($obj->label); + $typeFilter="Text"; + switch($obj->type) + { + case 'int': + case 'double': + case 'price': + $typeFilter="Numeric"; + break; + case 'date': + case 'datetime': + $typeFilter="Date"; + break; + case 'boolean': + $typeFilter="Boolean"; + break; + case 'sellist': + $tmp=''; + $tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null + if ($tmpparam['options'] && is_array($tmpparam['options'])) { + $tmpkeys=array_keys($tmpparam['options']); + $tmp=array_shift($tmpkeys); + } + if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp; + break; + } + $this->export_fields_array[$r][$fieldname]=$fieldlabel; + $this->export_TypeFields_array[$r][$fieldname]=$typeFilter; + $this->export_entities_array[$r][$fieldname]=$keyforelement; + } +} +// End add axtra fields diff --git a/htdocs/core/filemanagerdol/browser/default/browser.css b/htdocs/core/filemanagerdol/browser/default/browser.css old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/Folder.gif b/htdocs/core/filemanagerdol/browser/default/images/Folder.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/FolderUp.gif b/htdocs/core/filemanagerdol/browser/default/images/FolderUp.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/ai.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/ai.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/avi.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/avi.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/bmp.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/bmp.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/cs.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/cs.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/default.icon.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/default.icon.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/dll.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/dll.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/doc.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/doc.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/exe.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/exe.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/fla.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/fla.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/gif.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/gif.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/htm.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/htm.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/html.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/html.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/jpg.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/jpg.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/js.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/js.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/mdb.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/mdb.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/mp3.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/mp3.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/pdf.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/pdf.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/png.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/png.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/ppt.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/ppt.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/rdp.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/rdp.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/swf.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/swf.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/swt.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/swt.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/txt.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/txt.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/vsd.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/vsd.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/xls.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/xls.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/xml.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/xml.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/32/zip.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/32/zip.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/ai.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/ai.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/avi.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/avi.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/bmp.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/bmp.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/cs.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/cs.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/default.icon.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/default.icon.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/dll.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/dll.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/doc.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/doc.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/exe.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/exe.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/fla.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/fla.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/gif.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/gif.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/htm.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/htm.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/html.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/html.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/jpg.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/jpg.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/js.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/js.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/mdb.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/mdb.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/mp3.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/mp3.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/pdf.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/pdf.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/png.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/png.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/ppt.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/ppt.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/rdp.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/rdp.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/swf.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/swf.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/swt.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/swt.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/txt.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/txt.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/vsd.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/vsd.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/xls.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/xls.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/xml.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/xml.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/images/icons/zip.gif b/htdocs/core/filemanagerdol/browser/default/images/icons/zip.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/js/common.js b/htdocs/core/filemanagerdol/browser/default/js/common.js old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/js/fckxml.js b/htdocs/core/filemanagerdol/browser/default/js/fckxml.js old mode 100755 new mode 100644 diff --git a/htdocs/core/filemanagerdol/browser/default/spacer.gif b/htdocs/core/filemanagerdol/browser/default/spacer.gif old mode 100755 new mode 100644 diff --git a/htdocs/core/js/lib_batch.js b/htdocs/core/js/lib_batch.js index fd76085a36d..54ddb8fa77d 100644 --- a/htdocs/core/js/lib_batch.js +++ b/htdocs/core/js/lib_batch.js @@ -21,7 +21,8 @@ /** * addLineBatch - * + * @deprecated replaced by addDispatchLine and moved to module folder and file fourn/js/lib_dispatch.js + * * @param index int number of produt. 0 = first product line */ function addLineBatch(index) diff --git a/htdocs/core/js/lib_head.js b/htdocs/core/js/lib_head.js deleted file mode 100644 index 6ddfa529bee..00000000000 --- a/htdocs/core/js/lib_head.js +++ /dev/null @@ -1,951 +0,0 @@ -// Copyright (C) 2005-2014 Laurent Destailleur -// Copyright (C) 2005-2014 Regis Houssin -// -// 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 3 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, see . -// or see http://www.gnu.org/ - -// -// \file htdocs/core/js/lib_head.js -// \brief File that include javascript functions (included if option use_javascript activated) -// - - -/* - * ================================================================= - * Purpose: - * Pour la saisie des dates par calendrier Input: base "/theme/eldy" dateFieldID - * "dateo" Nom du champ format "dd/MM/yyyy" Format issu de Dolibarr de - * SimpleDateFormat a utiliser pour retour - * ================================================================== - */ -function showDP(base,dateFieldID,format,codelang) -{ - // check to see if another box is already showing - var alreadybox=getObjectFromID("DPCancel"); - if (alreadybox) closeDPBox(); // This erase value of showDP.datefieldID - - // alert("showDP "+codelang); - showDP.datefieldID=dateFieldID; // Must be after the close - - var dateField=getObjectFromID(dateFieldID); - - // get positioning - var thetop=getTop(dateField)+dateField.offsetHeight; - -// var xxx=getObjectFromID('bottompage'); -// alert(xxx.style.pixelTop); -// alert(document.body.clientHeight); -// alert(document.body.style.offsetTop); -// alert(thetop); -// alert(window.innerHeight); - if (thetop+160 > window.innerHeight) - thetop=thetop-160-20; - var theleft=getLeft(dateField); - if (theleft+140 > window.innerWidth) - theleft= theleft-140+dateField.offsetWidth-15; - - showDP.box=document.createElement("div"); - showDP.box.className="bodyline"; - showDP.box.style.display="block"; - showDP.box.style.zIndex="1000"; - showDP.box.style.position="absolute"; - showDP.box.style.top=thetop + "px"; - showDP.box.style.left=theleft + "px"; - - if (dateField.value) // Si il y avait valeur initiale dans champ - { - selDate=getDateFromFormat(dateField.value,format); - if (selDate) - { - // Success to parse value in field according to format - year=selDate.getFullYear(); - month=selDate.getMonth()+1; - day=selDate.getDate(); - datetime=selDate.getTime(); - ymd=formatDate(selDate,'yyyyMMdd'); - } - else - { - // Failed to parse value in field according to format - selDate=new Date(); - year=selDate.getFullYear(); - month=selDate.getUTCMonth()+1; - day=selDate.getDate(); - datetime=selDate.getTime(); - ymd=formatDate(selDate,'yyyyMMdd'); - } - } - else - { - selDate=new Date(); - year=selDate.getFullYear(); - month=selDate.getUTCMonth()+1; - day=selDate.getDate(); - datetime=selDate.getTime(); - ymd=formatDate(selDate,'yyyyMMdd'); - } - loadMonth(base,month,year,ymd,codelang); - hideSelectBoxes(); - document.body.appendChild(showDP.box); -} - -function resetDP(base,dateFieldID,format,codelang) -{ - var dateField=getObjectFromID(dateFieldID); - dateField.value = formatDate(new Date(), format); - dpChangeDay(dateFieldID,format); - - var alreadybox=getObjectFromID("DPCancel"); - if (alreadybox) showDP(base,dateFieldID,format,codelang); -} - -function loadMonth(base,month,year,ymd,codelang) -{ - /* showDP.box.innerHTML="Loading..."; */ - // alert(codelang); - var theURL=base+"datepicker.php?cm=shw&lang="+codelang; - theURL+="&m="+encodeURIComponent(month); - theURL+="&y="+encodeURIComponent(year); - if (selDate) - { - theURL+="&sd="+ymd; - } - - var req=null; - - req=loadXMLDoc(theURL,null,false); - if (req.responseText == '') alert('Failed to get URL '.theURL); - // alert(theURL+' - '+req.responseText); // L'url doit avoir la meme racine - // que la pages et elements sinon pb de securite. - showDP.box.innerHTML=req.responseText; -} - -function closeDPBox() -{ - document.body.removeChild(showDP.box); - displaySelectBoxes(); - showDP.box=null; - showDP.datefieldID=null; -} - -function dpChangeDay(dateFieldID,format) -{ - showDP.datefieldID=dateFieldID; - - var thefield=getObjectFromID(showDP.datefieldID); - var thefieldday=getObjectFromID(showDP.datefieldID+"day"); - var thefieldmonth=getObjectFromID(showDP.datefieldID+"month"); - var thefieldyear=getObjectFromID(showDP.datefieldID+"year"); - - var date=getDateFromFormat(thefield.value,format); - if (date) - { - thefieldday.value=date.getDate(); - if(thefieldday.onchange) thefieldday.onchange.call(thefieldday); - thefieldmonth.value=date.getMonth()+1; - if(thefieldmonth.onchange) thefieldmonth.onchange.call(thefieldmonth); - thefieldyear.value=date.getFullYear(); - if(thefieldyear.onchange) thefieldyear.onchange.call(thefieldyear); - } - else - { - thefieldday.value=''; - if(thefieldday.onchange) thefieldday.onchange.call(thefieldday); - thefieldmonth.value=''; - if(thefieldmonth.onchange) thefieldmonth.onchange.call(thefieldmonth); - thefieldyear.value=''; - if(thefieldyear.onchange) thefieldyear.onchange.call(thefieldyear); - } -} - -function dpClickDay(year,month,day,format) -{ - var thefield=getObjectFromID(showDP.datefieldID); - var thefieldday=getObjectFromID(showDP.datefieldID+"day"); - var thefieldmonth=getObjectFromID(showDP.datefieldID+"month"); - var thefieldyear=getObjectFromID(showDP.datefieldID+"year"); - - var dt = new Date(year, month-1, day); - - thefield.value=formatDate(dt,format); - if(thefield.onchange) thefield.onchange.call(thefield); - - thefieldday.value=day; - if(thefieldday.onchange) thefieldday.onchange.call(thefieldday); - thefieldmonth.value=month; - if(thefieldmonth.onchange) thefieldmonth.onchange.call(thefieldmonth); - thefieldyear.value=year; - if(thefieldyear.onchange) thefieldyear.onchange.call(thefieldyear); - - closeDPBox(); -} - -function dpHighlightDay(year,month,day,months){ - var displayinfo=getObjectFromID("dpExp"); - displayinfo.innerHTML=months[month-1]+" "+day+", "+year; -} - -// Returns an object given an id -function getObjectFromID(id){ - var theObject; - if(document.getElementById) - theObject=document.getElementById(id); - else - theObject=document.all[id]; - return theObject; -} - -// This Function returns the top position of an object -function getTop(theitem){ - var offsetTrail = theitem; - var offsetTop = 0; - while (offsetTrail) { - offsetTop += offsetTrail.offsetTop; - offsetTrail = offsetTrail.offsetParent; - } - if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") - offsetTop += document.body.TopMargin; - return offsetTop; -} - -// This Function returns the left position of an object -function getLeft(theitem){ - var offsetTrail = theitem; - var offsetLeft = 0; - while (offsetTrail) { - offsetLeft += offsetTrail.offsetLeft; - offsetTrail = offsetTrail.offsetParent; - } - if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") - offsetLeft += document.body.leftMargin; - return offsetLeft; -} - - -// Create XMLHttpRequest object and load url -// Used by calendar or other ajax processes -// Return req built or false if error -function loadXMLDoc(url,readyStateFunction,async) -{ - // req must be defined by caller with - // var req = false; - - // branch for native XMLHttpRequest object (Mozilla, Safari...) - if (window.XMLHttpRequest) - { - req = new XMLHttpRequest(); - -// if (req.overrideMimeType) { -// req.overrideMimeType('text/xml'); -// } - } - // branch for IE/Windows ActiveX version - else if (window.ActiveXObject) - { - try - { - req = new ActiveXObject("Msxml2.XMLHTTP"); - } - catch (e) - { - try { - req = new ActiveXObject("Microsoft.XMLHTTP"); - } catch (e) {} - } - } - - // If XMLHttpRequestObject req is ok, call URL - if (! req) - { - alert('Cannot create XMLHTTP instance'); - return false; - } - - if (readyStateFunction) req.onreadystatechange = readyStateFunction; - // Exemple of function for readyStateFuncyion: - // function () - // { - // if ( (req.readyState == 4) && (req.status == 200) ) { - // if (req.responseText == 1) { newStatus = 'AAA'; } - // if (req.responseText == 0) { newStatus = 'BBB'; } - // if (currentStatus != newStatus) { - // if (newStatus == "AAA") { obj.innerHTML = 'AAA'; } - // else { obj.innerHTML = 'BBB'; } - // currentStatus = newStatus; - // } - // } - // } - req.open("GET", url, async); - req.send(null); - return req; -} - -/* To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and - * not put popup completely on the front) - * Used only bu popup calendar - */ -function hideSelectBoxes() { - var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10); - if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1) - { - for(var i = 0; i < document.all.length; i++) - { - if(document.all[i].tagName) - if(document.all[i].tagName == "SELECT") - document.all[i].style.visibility="hidden"; - } - } -} -/* To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and - * not put popup completely on the front) - * Used only bu popup calendar - */ -function displaySelectBoxes() { - var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10); - if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1) - { - for(var i = 0; i < document.all.length; i++) - { - if(document.all[i].tagName) - if(document.all[i].tagName == "SELECT") - document.all[i].style.visibility="visible"; - } - } -} - - - -/* - * ================================================================= - * Function: - * formatDate (javascript object Date(), format) Purpose: Returns a date in the - * output format specified. The format string can use the following tags: Field | - * Tags -------------+------------------------------- Year | yyyy (4 digits), yy - * (2 digits) Month | MM (2 digits) Day of Month | dd (2 digits) Hour (1-12) | - * hh (2 digits) Hour (0-23) | HH (2 digits) Minute | mm (2 digits) Second | ss - * (2 digits) Author: Laurent Destailleur Author: Matelli (see - * http://matelli.fr/showcases/patchs-dolibarr/update-date-input-in-action-form.html) - * Licence: GPL - * ================================================================== - */ -function formatDate(date,format) -{ - // alert('formatDate date='+date+' format='+format); - - // Force parametres en chaine - format=format+""; - - var result=""; - - var year=date.getYear()+""; if (year.length < 4) { year=""+(year-0+1900); } - var month=date.getMonth()+1; - var day=date.getDate(); - var hour=date.getHours(); - var minute=date.getMinutes(); - var seconde=date.getSeconds(); - - var i=0; - while (i < format.length) - { - c=format.charAt(i); // Recupere char du format - substr=""; - j=i; - while ((format.charAt(j)==c) && (j < format.length)) // Recupere char successif identiques - { - substr += format.charAt(j++); - } - - // alert('substr='+substr); - if (substr == 'yyyy') { result=result+year; } - else if (substr == 'yy') { result=result+year.substring(2,4); } - else if (substr == 'M') { result=result+month; } - else if (substr == 'MM') { result=result+(month<1||month>9?"":"0")+month; } - else if (substr == 'd') { result=result+day; } - else if (substr == 'dd') { result=result+(day<1||day>9?"":"0")+day; } - else if (substr == 'hh') { if (hour > 12) hour-=12; result=result+(hour<0||hour>9?"":"0")+hour; } - else if (substr == 'HH') { result=result+(hour<0||hour>9?"":"0")+hour; } - else if (substr == 'mm') { result=result+(minute<0||minute>9?"":"0")+minute; } - else if (substr == 'ss') { result=result+(seconde<0||seconde>9?"":"0")+seconde; } - else { result=result+substr; } - - i+=substr.length; - } - - // alert(result); - return result; -} - - -/* - * ================================================================= - * Function: - * getDateFromFormat(date_string, format_string) Purpose: This function takes a - * date string and a format string. It parses the date string with format and it - * returns the date as a javascript Date() object. If date does not match - * format, it returns 0. The format string can use the following tags: - * Field | Tags - * -------------+----------------------------------- - * Year | yyyy (4 digits), yy (2 digits) - * Month | MM (2 digits) - * Day of Month | dd (2 digits) - * Hour (1-12) | hh (2 digits) - * Hour (0-23) | HH (2 digits) - * Minute | mm (2 digits) - * Second | ss (2 digits) - * Author: Laurent Destailleur - * Licence: GPL - * ================================================================== - */ -function getDateFromFormat(val,format) -{ - // alert('getDateFromFormat val='+val+' format='+format); - - // Force parametres en chaine - val=val+""; - format=format+""; - - if (val == '') return 0; - - var now=new Date(); - var year=now.getYear(); if (year.length < 4) { year=""+(year-0+1900); } - var month=now.getMonth()+1; - var day=now.getDate(); - var hour=now.getHours(); - var minute=now.getMinutes(); - var seconde=now.getSeconds(); - - var i=0; - var d=0; // -d- follows the date string while -i- follows the format - // string - - while (i < format.length) - { - c=format.charAt(i); // Recupere char du format - substr=""; - j=i; - while ((format.charAt(j)==c) && (j < format.length)) // Recupere char - // successif - // identiques - { - substr += format.charAt(j++); - } - - // alert('substr='+substr); - if (substr == "yyyy") year=getIntegerInString(val,d,4,4); - if (substr == "yy") year=""+(getIntegerInString(val,d,2,2)-0+1900); - if (substr == "MM" ||substr == "M") - { - month=getIntegerInString(val,d,1,2); - d -= 2- month.length; - } - if (substr == "dd") - { - day=getIntegerInString(val,d,1,2); - d -= 2- day.length; - } - if (substr == "HH" ||substr == "hh" ) - { - hour=getIntegerInString(val,d,1,2); - d -= 2- hour.length; - } - if (substr == "mm"){ - minute=getIntegerInString(val,d,1,2); - d -= 2- minute.length; - } - if (substr == "ss") - { - seconde=getIntegerInString(val,d,1,2); - d -= 2- seconde.length; - } - - i+=substr.length; - d+=substr.length; - } - - // Check if format param are ok - if (year==null||year<1) { return 0; } - if (month==null||(month<1)||(month>12)) { return 0; } - if (day==null||(day<1)||(day>31)) { return 0; } - if (hour==null||(hour<0)||(hour>24)) { return 0; } - if (minute==null||(minute<0)||(minute>60)) { return 0; } - if (seconde==null||(seconde<0)||(seconde>60)) { return 0; } - - // alert(year+' '+month+' '+day+' '+hour+' '+minute+' '+seconde); - return new Date(year,month-1,day,hour,minute,seconde); -} - -/* - * ================================================================= - * Function: - * stringIsInteger(string) - * Purpose: Return true if string is an integer - * ================================================================== - */ -function stringIsInteger(str) -{ - var digits="1234567890"; - for (var i=0; i < str.length; i++) - { - if (digits.indexOf(str.charAt(i))==-1) - { - return false; - } - } - return true; -} - -/* - * ================================================================= - * Function: - * getIntegerInString(string,pos,minlength,maxlength) - * Purpose: Return part of string from position i that is integer - * ================================================================== - */ -function getIntegerInString(str,i,minlength,maxlength) -{ - for (var x=maxlength; x>=minlength; x--) - { - var substr=str.substring(i,i+x); - if (substr.length < minlength) { return null; } - if (stringIsInteger(substr)) { return substr; } - } - return null; -} - - -/* - * ================================================================= - * Purpose: - * Clean string to have it url encoded - * Input: s - * Author: Laurent Destailleur - * Licence: GPL - * ================================================================== - */ -function urlencode(s) { - news=s; - news=news.replace(/\+/gi,'%2B'); - news=news.replace(/&/gi,'%26'); - return news; -} - - -/* - * ================================================================= - * Purpose: Show a popup HTML page. - * Input: url,title - * Author: Laurent Destailleur - * Licence: GPL - * ================================================================== - */ -function newpopup(url,title) { - var argv = newpopup.arguments; - var argc = newpopup.arguments.length; - tmp=url; - var l = (argc > 2) ? argv[2] : 600; - var h = (argc > 3) ? argv[3] : 400; - var left = (screen.width - l)/2; - var top = (screen.height - h)/2; - var wfeatures = "directories=0,menubar=0,status=0,resizable=0,scrollbars=1,toolbar=0,width=" + l +",height=" + h + ",left=" + left + ",top=" + top; - fen=window.open(tmp,title,wfeatures); - return false; -} - - -/* - * ================================================================= - * Purpose: - * Applique un delai avant execution. Used for autocompletion of companies. - * Input: funct, delay - * Author: Regis Houssin - * Licence: GPL - * ================================================================== - */ - function ac_delay(funct,delay) { - // delay before start of action - setTimeout(funct,delay); -} - - -/* - * ================================================================= - * Purpose: - * Clean values of a "Sortable.serialize". Used by drag and drop. - * Input: expr - * Author: Regis Houssin - * Licence: GPL - * ================================================================== - */ -function cleanSerialize(expr) { - if (typeof(expr) != 'string') return ''; - var reg = new RegExp("(&)", "g"); - var reg2 = new RegExp("[^A-Z0-9,]", "g"); - var liste1 = expr.replace(reg, ","); - return liste1.replace(reg2, ""); -} - - -/* - * ================================================================= - * Purpose: Display a temporary message in input text fields (For showing help message on - * input field). - * Input: fieldId - * Input: message - * Author: Regis Houssin - * Licence: GPL - * ================================================================== - */ -function displayMessage(fieldId,message) { - var textbox = document.getElementById(fieldId); - if (textbox.value == '') { - textbox.style.color = 'grey'; - textbox.value = message; - } -} - -/* - * ================================================================= - * Purpose: Hide a temporary message in input text fields (For showing help message on - * input field). - * Input: fiedId - * Input: message - * Author: Regis Houssin - * Licence: GPL - * ================================================================== - */ -function hideMessage(fieldId,message) { - var textbox = document.getElementById(fieldId); - textbox.style.color = 'black'; - if (textbox.value == message) textbox.value = ''; -} - - -/* - * Used by button to set on/off - */ -function setConstant(url, code, input, entity, strict) { - $.get( url, { - action: "set", - name: code, - entity: entity - }, - function() { - $("#set_" + code).hide(); - $("#del_" + code).show(); - $.each(input, function(type, data) { - // Enable another element - if (type == "disabled" && strict != 1) { - $.each(data, function(key, value) { - var newvalue=((value.search("^#") < 0 && value.search("^\.") < 0) ? "#" : "") + value; - $(newvalue).removeAttr("disabled"); - if ($(newvalue).hasClass("butActionRefused") == true) { - $(newvalue).removeClass("butActionRefused"); - $(newvalue).addClass("butAction"); - } - }); - } else if (type == "enabled") { - $.each(data, function(key, value) { - var newvalue=((value.search("^#") < 0 && value.search("^\.") < 0) ? "#" : "") + value; - if (strict == 1) - $(newvalue).removeAttr("disabled"); - else - $(newvalue).attr("disabled", true); - if ($(newvalue).hasClass("butAction") == true) { - $(newvalue).removeClass("butAction"); - $(newvalue).addClass("butActionRefused"); - } - }); - // Show another element - } else if (type == "showhide" || type == "show") { - $.each(data, function(key, value) { - var newvalue=((value.search("^#") < 0 && value.search("^\.") < 0) ? "#" : "") + value; - $(newvalue).show(); - }); - // Set another constant - } else if (type == "set") { - $.each(data, function(key, value) { - $("#set_" + key).hide(); - $("#del_" + key).show(); - $.get( url, { - action: "set", - name: key, - value: value, - entity: entity - }); - }); - } - }); - }); -} - -/* - * Used by button to set on/off - */ -function delConstant(url, code, input, entity, strict) { - $.get( url, { - action: "del", - name: code, - entity: entity - }, - function() { - $("#del_" + code).hide(); - $("#set_" + code).show(); - $.each(input, function(type, data) { - // Disable another element - if (type == "disabled") { - $.each(data, function(key, value) { - var newvalue=((value.search("^#") < 0 && value.search("^\.") < 0) ? "#" : "") + value; - $(newvalue).attr("disabled", true); - if ($(newvalue).hasClass("butAction") == true) { - $(newvalue).removeClass("butAction"); - $(newvalue).addClass("butActionRefused"); - } - }); - } else if (type == "enabled" && strict != 1) { - $.each(data, function(key, value) { - var newvalue=((value.search("^#") < 0 && value.search("^\.") < 0) ? "#" : "") + value; - $(newvalue).removeAttr("disabled"); - if ($(newvalue).hasClass("butActionRefused") == true) { - $(newvalue).removeClass("butActionRefused"); - $(newvalue).addClass("butAction"); - } - }); - // Hide another element - } else if (type == "showhide" || type == "hide") { - $.each(data, function(key, value) { - var newvalue=((value.search("^#") < 0 && value.search("^\.") < 0) ? "#" : "") + value; - $(newvalue).hide(); - }); - // Delete another constant - } else if (type == "del") { - $.each(data, function(key, value) { - $("#del_" + value).hide(); - $("#set_" + value).show(); - $.get( url, { - action: "del", - name: value, - entity: entity - }); - }); - } - }); - }); -} - -/* - * Used by button to set on/off - */ -function confirmConstantAction(action, url, code, input, box, entity, yesButton, noButton, strict) { - var boxConfirm = box; - $("#confirm_" + code) - .attr("title", boxConfirm.title) - .html(boxConfirm.content) - .dialog({ - resizable: false, - height: 170, - width: 500, - modal: true, - buttons: [ - { - id : 'yesButton_' + code, - text : yesButton, - click : function() { - if (action == "set") { - setConstant(url, code, input, entity, strict); - } else if (action == "del") { - delConstant(url, code, input, entity, strict); - } - // Close dialog - $(this).dialog("close"); - // Execute another method - if (boxConfirm.method) { - var fnName = boxConfirm.method; - if (window.hasOwnProperty(fnName)) { - window[fnName](); - } - } - } - }, - { - id : 'noButton_' + code, - text : noButton, - click : function() { - $(this).dialog("close"); - } - } - ] - }); - // For information dialog box only, hide the noButton - if (boxConfirm.info) { - $("#noButton_" + code).button().hide(); - } -} - -/* - * ================================================================= - * This is to allow to transform all select box into ajax autocomplete box - * with just one line: - * $(function() { $( "#idofmylist" ).combobox(); }); - * Do not use it on large combo boxes - * ================================================================= - */ -(function( $ ) { - $.widget( "ui.combobox", { - options: { - minLengthToAutocomplete: 0 - }, - _create: function() { - var savMinLengthToAutocomplete = this.options.minLengthToAutocomplete; - var self = this, - select = this.element.hide(), - selected = select.children( ":selected" ), - value = selected.val() ? selected.text() : ""; - var input = this.input = $( "" ) - .insertAfter( select ) - .val( value ) - .attr('id', 'inputautocomplete'+select.attr('id')) - .autocomplete({ - delay: 0, - minLength: this.options.minLengthToAutocomplete, - source: function( request, response ) { - var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" ); - response( select.children( "option:enabled" ).map(function() { - var text = $( this ).text(); - if ( this.value && ( !request.term || matcher.test(text) ) ) - return { - label: text.replace( - new RegExp( - "(?![^&;]+;)(?!<[^<>]*)(" + - $.ui.autocomplete.escapeRegex(request.term) + - ")(?![^<>]*>)(?![^&;]+;)", "gi" - ), "$1" ), - value: text, - option: this - }; - }) ); - }, - select: function( event, ui ) { - ui.item.option.selected = true; - self._trigger( "selected", event, { - item: ui.item.option - }); - }, - change: function( event, ui ) { - if ( !ui.item ) { - var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ), - valid = false; - select.children( "option" ).each(function() { - if ( $( this ).text().match( matcher ) ) { - this.selected = valid = true; - return false; - } - }); - if ( !valid ) { - // remove invalid value, as it didnt match anything - $( this ).val( "" ); - select.val( "" ); - input.data("ui-autocomplete").term = ""; - return false; - } - } - } - }) - .addClass( "ui-widget ui-widget-content ui-corner-left dolibarrcombobox" ); - - input.data("ui-autocomplete")._renderItem = function( ul, item ) { - return $("
  • ") - .data( "item.autocomplete", item ) - .append( "" + item.label + "" ) - .appendTo( ul ); - }; - - this.button = $( "" ) - .attr( "tabIndex", -1 ) - .attr( "title", "Show All Items" ) - .insertAfter( input ) - .button({ - icons: { - primary: "ui-icon-triangle-1-s" - }, - text: false - }) - .removeClass( "ui-corner-all" ) - .addClass( "ui-corner-right ui-button-icon" ) - .click(function() { - // close if already visible - if ( input.autocomplete( "widget" ).is( ":visible" ) ) { - input.autocomplete( "close" ); - return; - } - - // pass empty string as value to search for, displaying all results - input.autocomplete({ minLength: 0 }); - input.autocomplete( "search", "" ); - input.autocomplete({ minLength: savMinLengthToAutocomplete }); - input.focus(); - }); - }, - - destroy: function() { - this.input.remove(); - this.button.remove(); - this.element.show(); - $.Widget.prototype.destroy.call( this ); - } - }); -})( jQuery ); - - -/* - * Function to output a dialog bog for copy/paste - * - * @param string text Text to put into copy/paste area - * @param string text2 Text to put under the copy/paste area - */ -function copyToClipboard(text,text2) -{ - text = text.replace(/
    /g,"\n"); - var newElem = "

    "+text2; - $("#dialog").html(newElem); - $("#dialog").dialog(); - $("#coords").select(); - return false; -} - - -/* - * Timer for delayed keyup function - * - * TODO Who use this ? - */ -/* -(function($){ - $.widget("ui.onDelayedKeyup", { - _init : function() { - var self = this; - $(this.element).bind('keyup input', function() { - if(typeof(window['inputTimeout']) != "undefined"){ - window.clearTimeout(inputTimeout); - } - var handler = self.options.handler; - window['inputTimeout'] = window.setTimeout(function() { handler.call(self.element) }, self.options.delay); - }); - }, - options: { - handler: $.noop(), - delay: 500 - } - }); -})(jQuery); -*/ diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php new file mode 100644 index 00000000000..234a2348590 --- /dev/null +++ b/htdocs/core/js/lib_head.js.php @@ -0,0 +1,1060 @@ + + * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2015 Raphaël Doursenaud + * + * 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 3 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, see . + * or see http://www.gnu.org/ + */ + +/** + * \file htdocs/core/js/lib_head.js.php + * \brief File that include javascript functions (included if option use_javascript activated) + */ + +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled cause need to load personalized language +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); +if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled cause need to do translations +if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK',1); +if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); +if (! defined('NOLOGIN')) define('NOLOGIN',1); +if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); +if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); +if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); + +session_cache_limiter(FALSE); + +require_once '../../main.inc.php'; + +// Define javascript type +header('Content-type: text/javascript; charset=UTF-8'); +// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); +else header('Cache-Control: no-cache'); +?> + +/* + * ================================================================= + * Purpose: + * Pour la saisie des dates par calendrier Input: base "/theme/eldy" dateFieldID + * "dateo" Nom du champ format "dd/MM/yyyy" Format issu de Dolibarr de + * SimpleDateFormat a utiliser pour retour + * ================================================================== + */ +function showDP(base,dateFieldID,format,codelang) +{ + // check to see if another box is already showing + var alreadybox=getObjectFromID("DPCancel"); + if (alreadybox) closeDPBox(); // This erase value of showDP.datefieldID + + // alert("showDP "+codelang); + showDP.datefieldID=dateFieldID; // Must be after the close + + var dateField=getObjectFromID(dateFieldID); + + // get positioning + var thetop=getTop(dateField)+dateField.offsetHeight; + +// var xxx=getObjectFromID('bottompage'); +// alert(xxx.style.pixelTop); +// alert(document.body.clientHeight); +// alert(document.body.style.offsetTop); +// alert(thetop); +// alert(window.innerHeight); + if (thetop+160 > window.innerHeight) + thetop=thetop-160-20; + var theleft=getLeft(dateField); + if (theleft+140 > window.innerWidth) + theleft= theleft-140+dateField.offsetWidth-15; + + showDP.box=document.createElement("div"); + showDP.box.className="bodyline"; + showDP.box.style.display="block"; + showDP.box.style.zIndex="1000"; + showDP.box.style.position="absolute"; + showDP.box.style.top=thetop + "px"; + showDP.box.style.left=theleft + "px"; + + if (dateField.value) // Si il y avait valeur initiale dans champ + { + selDate=getDateFromFormat(dateField.value,format); + if (selDate) + { + // Success to parse value in field according to format + year=selDate.getFullYear(); + month=selDate.getMonth()+1; + day=selDate.getDate(); + datetime=selDate.getTime(); + ymd=formatDate(selDate,'yyyyMMdd'); + } + else + { + // Failed to parse value in field according to format + selDate=new Date(); + year=selDate.getFullYear(); + month=selDate.getUTCMonth()+1; + day=selDate.getDate(); + datetime=selDate.getTime(); + ymd=formatDate(selDate,'yyyyMMdd'); + } + } + else + { + selDate=new Date(); + year=selDate.getFullYear(); + month=selDate.getUTCMonth()+1; + day=selDate.getDate(); + datetime=selDate.getTime(); + ymd=formatDate(selDate,'yyyyMMdd'); + } + loadMonth(base,month,year,ymd,codelang); + hideSelectBoxes(); + document.body.appendChild(showDP.box); +} + +function resetDP(base,dateFieldID,format,codelang) +{ + var dateField=getObjectFromID(dateFieldID); + dateField.value = formatDate(new Date(), format); + dpChangeDay(dateFieldID,format); + + var alreadybox=getObjectFromID("DPCancel"); + if (alreadybox) showDP(base,dateFieldID,format,codelang); +} + +function loadMonth(base,month,year,ymd,codelang) +{ + /* showDP.box.innerHTML="Loading..."; */ + // alert(codelang); + var theURL=base+"datepicker.php?cm=shw&lang="+codelang; + theURL+="&m="+encodeURIComponent(month); + theURL+="&y="+encodeURIComponent(year); + if (selDate) + { + theURL+="&sd="+ymd; + } + + var req=null; + + req=loadXMLDoc(theURL,null,false); + if (req.responseText == '') alert('Failed to get URL '.theURL); + // alert(theURL+' - '+req.responseText); // L'url doit avoir la meme racine + // que la pages et elements sinon pb de securite. + showDP.box.innerHTML=req.responseText; +} + +function closeDPBox() +{ + document.body.removeChild(showDP.box); + displaySelectBoxes(); + showDP.box=null; + showDP.datefieldID=null; +} + +function dpChangeDay(dateFieldID,format) +{ + showDP.datefieldID=dateFieldID; + + var thefield=getObjectFromID(showDP.datefieldID); + var thefieldday=getObjectFromID(showDP.datefieldID+"day"); + var thefieldmonth=getObjectFromID(showDP.datefieldID+"month"); + var thefieldyear=getObjectFromID(showDP.datefieldID+"year"); + + var date=getDateFromFormat(thefield.value,format); + if (date) + { + thefieldday.value=date.getDate(); + if(thefieldday.onchange) thefieldday.onchange.call(thefieldday); + thefieldmonth.value=date.getMonth()+1; + if(thefieldmonth.onchange) thefieldmonth.onchange.call(thefieldmonth); + thefieldyear.value=date.getFullYear(); + if(thefieldyear.onchange) thefieldyear.onchange.call(thefieldyear); + } + else + { + thefieldday.value=''; + if(thefieldday.onchange) thefieldday.onchange.call(thefieldday); + thefieldmonth.value=''; + if(thefieldmonth.onchange) thefieldmonth.onchange.call(thefieldmonth); + thefieldyear.value=''; + if(thefieldyear.onchange) thefieldyear.onchange.call(thefieldyear); + } +} + +function dpClickDay(year,month,day,format) +{ + var thefield=getObjectFromID(showDP.datefieldID); + var thefieldday=getObjectFromID(showDP.datefieldID+"day"); + var thefieldmonth=getObjectFromID(showDP.datefieldID+"month"); + var thefieldyear=getObjectFromID(showDP.datefieldID+"year"); + + var dt = new Date(year, month-1, day); + + thefield.value=formatDate(dt,format); + if(thefield.onchange) thefield.onchange.call(thefield); + + thefieldday.value=day; + if(thefieldday.onchange) thefieldday.onchange.call(thefieldday); + thefieldmonth.value=month; + if(thefieldmonth.onchange) thefieldmonth.onchange.call(thefieldmonth); + thefieldyear.value=year; + if(thefieldyear.onchange) thefieldyear.onchange.call(thefieldyear); + + closeDPBox(); +} + +function dpHighlightDay(year,month,day,months){ + var displayinfo=getObjectFromID("dpExp"); + displayinfo.innerHTML=months[month-1]+" "+day+", "+year; +} + +// Returns an object given an id +function getObjectFromID(id){ + var theObject; + if(document.getElementById) + theObject=document.getElementById(id); + else + theObject=document.all[id]; + return theObject; +} + +// This Function returns the top position of an object +function getTop(theitem){ + var offsetTrail = theitem; + var offsetTop = 0; + while (offsetTrail) { + offsetTop += offsetTrail.offsetTop; + offsetTrail = offsetTrail.offsetParent; + } + if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") + offsetTop += document.body.TopMargin; + return offsetTop; +} + +// This Function returns the left position of an object +function getLeft(theitem){ + var offsetTrail = theitem; + var offsetLeft = 0; + while (offsetTrail) { + offsetLeft += offsetTrail.offsetLeft; + offsetTrail = offsetTrail.offsetParent; + } + if (navigator.userAgent.indexOf("Mac") != -1 && typeof document.body.leftMargin != "undefined") + offsetLeft += document.body.leftMargin; + return offsetLeft; +} + + +// Create XMLHttpRequest object and load url +// Used by calendar or other ajax processes +// Return req built or false if error +function loadXMLDoc(url,readyStateFunction,async) +{ + // req must be defined by caller with + // var req = false; + + // branch for native XMLHttpRequest object (Mozilla, Safari...) + if (window.XMLHttpRequest) + { + req = new XMLHttpRequest(); + +// if (req.overrideMimeType) { +// req.overrideMimeType('text/xml'); +// } + } + // branch for IE/Windows ActiveX version + else if (window.ActiveXObject) + { + try + { + req = new ActiveXObject("Msxml2.XMLHTTP"); + } + catch (e) + { + try { + req = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (e) {} + } + } + + // If XMLHttpRequestObject req is ok, call URL + if (! req) + { + alert('Cannot create XMLHTTP instance'); + return false; + } + + if (readyStateFunction) req.onreadystatechange = readyStateFunction; + // Exemple of function for readyStateFuncyion: + // function () + // { + // if ( (req.readyState == 4) && (req.status == 200) ) { + // if (req.responseText == 1) { newStatus = 'AAA'; } + // if (req.responseText == 0) { newStatus = 'BBB'; } + // if (currentStatus != newStatus) { + // if (newStatus == "AAA") { obj.innerHTML = 'AAA'; } + // else { obj.innerHTML = 'BBB'; } + // currentStatus = newStatus; + // } + // } + // } + req.open("GET", url, async); + req.send(null); + return req; +} + +/* To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and + * not put popup completely on the front) + * Used only bu popup calendar + */ +function hideSelectBoxes() { + var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10); + if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1) + { + for(var i = 0; i < document.all.length; i++) + { + if(document.all[i].tagName) + if(document.all[i].tagName == "SELECT") + document.all[i].style.visibility="hidden"; + } + } +} +/* To hide/show select Boxes with IE6 (and only IE6 because IE6 has a bug and + * not put popup completely on the front) + * Used only bu popup calendar + */ +function displaySelectBoxes() { + var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10); + if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE 6") > -1) + { + for(var i = 0; i < document.all.length; i++) + { + if(document.all[i].tagName) + if(document.all[i].tagName == "SELECT") + document.all[i].style.visibility="visible"; + } + } +} + + + +/* + * ================================================================= + * Function: + * formatDate (javascript object Date(), format) Purpose: Returns a date in the + * output format specified. The format string can use the following tags: Field | + * Tags -------------+------------------------------- Year | yyyy (4 digits), yy + * (2 digits) Month | MM (2 digits) Day of Month | dd (2 digits) Hour (1-12) | + * hh (2 digits) Hour (0-23) | HH (2 digits) Minute | mm (2 digits) Second | ss + * (2 digits) Author: Laurent Destailleur Author: Matelli (see + * http://matelli.fr/showcases/patchs-dolibarr/update-date-input-in-action-form.html) + * Licence: GPL + * ================================================================== + */ +function formatDate(date,format) +{ + // alert('formatDate date='+date+' format='+format); + + // Force parametres en chaine + format=format+""; + + var result=""; + + var year=date.getYear()+""; if (year.length < 4) { year=""+(year-0+1900); } + var month=date.getMonth()+1; + var day=date.getDate(); + var hour=date.getHours(); + var minute=date.getMinutes(); + var seconde=date.getSeconds(); + + var i=0; + while (i < format.length) + { + c=format.charAt(i); // Recupere char du format + substr=""; + j=i; + while ((format.charAt(j)==c) && (j < format.length)) // Recupere char successif identiques + { + substr += format.charAt(j++); + } + + // alert('substr='+substr); + if (substr == 'yyyy') { result=result+year; } + else if (substr == 'yy') { result=result+year.substring(2,4); } + else if (substr == 'M') { result=result+month; } + else if (substr == 'MM') { result=result+(month<1||month>9?"":"0")+month; } + else if (substr == 'd') { result=result+day; } + else if (substr == 'dd') { result=result+(day<1||day>9?"":"0")+day; } + else if (substr == 'hh') { if (hour > 12) hour-=12; result=result+(hour<0||hour>9?"":"0")+hour; } + else if (substr == 'HH') { result=result+(hour<0||hour>9?"":"0")+hour; } + else if (substr == 'mm') { result=result+(minute<0||minute>9?"":"0")+minute; } + else if (substr == 'ss') { result=result+(seconde<0||seconde>9?"":"0")+seconde; } + else { result=result+substr; } + + i+=substr.length; + } + + // alert(result); + return result; +} + + +/* + * ================================================================= + * Function: + * getDateFromFormat(date_string, format_string) Purpose: This function takes a + * date string and a format string. It parses the date string with format and it + * returns the date as a javascript Date() object. If date does not match + * format, it returns 0. The format string can use the following tags: + * Field | Tags + * -------------+----------------------------------- + * Year | yyyy (4 digits), yy (2 digits) + * Month | MM (2 digits) + * Day of Month | dd (2 digits) + * Hour (1-12) | hh (2 digits) + * Hour (0-23) | HH (2 digits) + * Minute | mm (2 digits) + * Second | ss (2 digits) + * Author: Laurent Destailleur + * Licence: GPL + * ================================================================== + */ +function getDateFromFormat(val,format) +{ + // alert('getDateFromFormat val='+val+' format='+format); + + // Force parametres en chaine + val=val+""; + format=format+""; + + if (val == '') return 0; + + var now=new Date(); + var year=now.getYear(); if (year.length < 4) { year=""+(year-0+1900); } + var month=now.getMonth()+1; + var day=now.getDate(); + var hour=now.getHours(); + var minute=now.getMinutes(); + var seconde=now.getSeconds(); + + var i=0; + var d=0; // -d- follows the date string while -i- follows the format + // string + + while (i < format.length) + { + c=format.charAt(i); // Recupere char du format + substr=""; + j=i; + while ((format.charAt(j)==c) && (j < format.length)) // Recupere char + // successif + // identiques + { + substr += format.charAt(j++); + } + + // alert('substr='+substr); + if (substr == "yyyy") year=getIntegerInString(val,d,4,4); + if (substr == "yy") year=""+(getIntegerInString(val,d,2,2)-0+1900); + if (substr == "MM" ||substr == "M") + { + month=getIntegerInString(val,d,1,2); + d -= 2- month.length; + } + if (substr == "dd") + { + day=getIntegerInString(val,d,1,2); + d -= 2- day.length; + } + if (substr == "HH" ||substr == "hh" ) + { + hour=getIntegerInString(val,d,1,2); + d -= 2- hour.length; + } + if (substr == "mm"){ + minute=getIntegerInString(val,d,1,2); + d -= 2- minute.length; + } + if (substr == "ss") + { + seconde=getIntegerInString(val,d,1,2); + d -= 2- seconde.length; + } + + i+=substr.length; + d+=substr.length; + } + + // Check if format param are ok + if (year==null||year<1) { return 0; } + if (month==null||(month<1)||(month>12)) { return 0; } + if (day==null||(day<1)||(day>31)) { return 0; } + if (hour==null||(hour<0)||(hour>24)) { return 0; } + if (minute==null||(minute<0)||(minute>60)) { return 0; } + if (seconde==null||(seconde<0)||(seconde>60)) { return 0; } + + // alert(year+' '+month+' '+day+' '+hour+' '+minute+' '+seconde); + return new Date(year,month-1,day,hour,minute,seconde); +} + +/* + * ================================================================= + * Function: + * stringIsInteger(string) + * Purpose: Return true if string is an integer + * ================================================================== + */ +function stringIsInteger(str) +{ + var digits="1234567890"; + for (var i=0; i < str.length; i++) + { + if (digits.indexOf(str.charAt(i))==-1) + { + return false; + } + } + return true; +} + +/* + * ================================================================= + * Function: + * getIntegerInString(string,pos,minlength,maxlength) + * Purpose: Return part of string from position i that is integer + * ================================================================== + */ +function getIntegerInString(str,i,minlength,maxlength) +{ + for (var x=maxlength; x>=minlength; x--) + { + var substr=str.substring(i,i+x); + if (substr.length < minlength) { return null; } + if (stringIsInteger(substr)) { return substr; } + } + return null; +} + + +/* + * ================================================================= + * Purpose: + * Clean string to have it url encoded + * Input: s + * Author: Laurent Destailleur + * Licence: GPL + * ================================================================== + */ +function urlencode(s) { + news=s; + news=news.replace(/\+/gi,'%2B'); + news=news.replace(/&/gi,'%26'); + return news; +} + + +/* + * ================================================================= + * Purpose: Show a popup HTML page. + * Input: url,title + * Author: Laurent Destailleur + * Licence: GPL + * ================================================================== + */ +function newpopup(url,title) { + var argv = newpopup.arguments; + var argc = newpopup.arguments.length; + tmp=url; + var l = (argc > 2) ? argv[2] : 600; + var h = (argc > 3) ? argv[3] : 400; + var left = (screen.width - l)/2; + var top = (screen.height - h)/2; + var wfeatures = "directories=0,menubar=0,status=0,resizable=0,scrollbars=1,toolbar=0,width=" + l +",height=" + h + ",left=" + left + ",top=" + top; + fen=window.open(tmp,title,wfeatures); + return false; +} + + +/* + * ================================================================= + * Purpose: + * Applique un delai avant execution. Used for autocompletion of companies. + * Input: funct, delay + * Author: Regis Houssin + * Licence: GPL + * ================================================================== + */ + function ac_delay(funct,delay) { + // delay before start of action + setTimeout(funct,delay); +} + + +/* + * ================================================================= + * Purpose: + * Clean values of a "Sortable.serialize". Used by drag and drop. + * Input: expr + * Author: Regis Houssin + * Licence: GPL + * ================================================================== + */ +function cleanSerialize(expr) { + if (typeof(expr) != 'string') return ''; + var reg = new RegExp("(&)", "g"); + var reg2 = new RegExp("[^A-Z0-9,]", "g"); + var liste1 = expr.replace(reg, ","); + return liste1.replace(reg2, ""); +} + + +/* + * ================================================================= + * Purpose: Display a temporary message in input text fields (For showing help message on + * input field). + * Input: fieldId + * Input: message + * Author: Regis Houssin + * Licence: GPL + * ================================================================== + */ +function displayMessage(fieldId,message) { + var textbox = document.getElementById(fieldId); + if (textbox.value == '') { + textbox.style.color = 'grey'; + textbox.value = message; + } +} + +/* + * ================================================================= + * Purpose: Hide a temporary message in input text fields (For showing help message on + * input field). + * Input: fiedId + * Input: message + * Author: Regis Houssin + * Licence: GPL + * ================================================================== + */ +function hideMessage(fieldId,message) { + var textbox = document.getElementById(fieldId); + textbox.style.color = 'black'; + if (textbox.value == message) textbox.value = ''; +} + + +/* + * Used by button to set on/off + */ +function setConstant(url, code, input, entity, strict) { + $.get( url, { + action: "set", + name: code, + entity: entity + }, + function() { + $("#set_" + code).hide(); + $("#del_" + code).show(); + $.each(input, function(type, data) { + // Enable another element + if (type == "disabled" && strict != 1) { + $.each(data, function(key, value) { + var newvalue=((value.search("^#") < 0 && value.search("^\.") < 0) ? "#" : "") + value; + $(newvalue).removeAttr("disabled"); + if ($(newvalue).hasClass("butActionRefused") == true) { + $(newvalue).removeClass("butActionRefused"); + $(newvalue).addClass("butAction"); + } + }); + } else if (type == "enabled") { + $.each(data, function(key, value) { + var newvalue=((value.search("^#") < 0 && value.search("^\.") < 0) ? "#" : "") + value; + if (strict == 1) + $(newvalue).removeAttr("disabled"); + else + $(newvalue).attr("disabled", true); + if ($(newvalue).hasClass("butAction") == true) { + $(newvalue).removeClass("butAction"); + $(newvalue).addClass("butActionRefused"); + } + }); + // Show another element + } else if (type == "showhide" || type == "show") { + $.each(data, function(key, value) { + var newvalue=((value.search("^#") < 0 && value.search("^\.") < 0) ? "#" : "") + value; + $(newvalue).show(); + }); + // Set another constant + } else if (type == "set") { + $.each(data, function(key, value) { + $("#set_" + key).hide(); + $("#del_" + key).show(); + $.get( url, { + action: "set", + name: key, + value: value, + entity: entity + }); + }); + } + }); + }); +} + +/* + * Used by button to set on/off + */ +function delConstant(url, code, input, entity, strict) { + $.get( url, { + action: "del", + name: code, + entity: entity + }, + function() { + $("#del_" + code).hide(); + $("#set_" + code).show(); + $.each(input, function(type, data) { + // Disable another element + if (type == "disabled") { + $.each(data, function(key, value) { + var newvalue=((value.search("^#") < 0 && value.search("^\.") < 0) ? "#" : "") + value; + $(newvalue).attr("disabled", true); + if ($(newvalue).hasClass("butAction") == true) { + $(newvalue).removeClass("butAction"); + $(newvalue).addClass("butActionRefused"); + } + }); + } else if (type == "enabled" && strict != 1) { + $.each(data, function(key, value) { + var newvalue=((value.search("^#") < 0 && value.search("^\.") < 0) ? "#" : "") + value; + $(newvalue).removeAttr("disabled"); + if ($(newvalue).hasClass("butActionRefused") == true) { + $(newvalue).removeClass("butActionRefused"); + $(newvalue).addClass("butAction"); + } + }); + // Hide another element + } else if (type == "showhide" || type == "hide") { + $.each(data, function(key, value) { + var newvalue=((value.search("^#") < 0 && value.search("^\.") < 0) ? "#" : "") + value; + $(newvalue).hide(); + }); + // Delete another constant + } else if (type == "del") { + $.each(data, function(key, value) { + $("#del_" + value).hide(); + $("#set_" + value).show(); + $.get( url, { + action: "del", + name: value, + entity: entity + }); + }); + } + }); + }); +} + +/* + * Used by button to set on/off + */ +function confirmConstantAction(action, url, code, input, box, entity, yesButton, noButton, strict) { + var boxConfirm = box; + $("#confirm_" + code) + .attr("title", boxConfirm.title) + .html(boxConfirm.content) + .dialog({ + resizable: false, + height: 170, + width: 500, + modal: true, + buttons: [ + { + id : 'yesButton_' + code, + text : yesButton, + click : function() { + if (action == "set") { + setConstant(url, code, input, entity, strict); + } else if (action == "del") { + delConstant(url, code, input, entity, strict); + } + // Close dialog + $(this).dialog("close"); + // Execute another method + if (boxConfirm.method) { + var fnName = boxConfirm.method; + if (window.hasOwnProperty(fnName)) { + window[fnName](); + } + } + } + }, + { + id : 'noButton_' + code, + text : noButton, + click : function() { + $(this).dialog("close"); + } + } + ] + }); + // For information dialog box only, hide the noButton + if (boxConfirm.info) { + $("#noButton_" + code).button().hide(); + } +} + +/* + * ================================================================= + * This is to allow to transform all select box into ajax autocomplete box + * with just one line: + * $(function() { $( "#idofmylist" ).combobox(); }); + * Do not use it on large combo boxes + * ================================================================= + */ +(function( $ ) { + $.widget( "ui.combobox", { + options: { + minLengthToAutocomplete: 0 + }, + _create: function() { + var savMinLengthToAutocomplete = this.options.minLengthToAutocomplete; + var self = this, + select = this.element.hide(), + selected = select.children( ":selected" ), + value = selected.val() ? selected.text() : ""; + var input = this.input = $( "" ) + .insertAfter( select ) + .val( value ) + .attr('id', 'inputautocomplete'+select.attr('id')) + .autocomplete({ + delay: 0, + minLength: this.options.minLengthToAutocomplete, + source: function( request, response ) { + var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" ); + response( select.children( "option:enabled" ).map(function() { + var text = $( this ).text(); + if ( this.value && ( !request.term || matcher.test(text) ) ) + return { + label: text.replace( + new RegExp( + "(?![^&;]+;)(?!<[^<>]*)(" + + $.ui.autocomplete.escapeRegex(request.term) + + ")(?![^<>]*>)(?![^&;]+;)", "gi" + ), "$1" ), + value: text, + option: this + }; + }) ); + }, + select: function( event, ui ) { + ui.item.option.selected = true; + self._trigger( "selected", event, { + item: ui.item.option + }); + }, + change: function( event, ui ) { + if ( !ui.item ) { + var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ), + valid = false; + select.children( "option" ).each(function() { + if ( $( this ).text().match( matcher ) ) { + this.selected = valid = true; + return false; + } + }); + if ( !valid ) { + // remove invalid value, as it didnt match anything + $( this ).val( "" ); + select.val( "" ); + input.data("ui-autocomplete").term = ""; + return false; + } + } + } + }) + .addClass( "ui-widget ui-widget-content ui-corner-left dolibarrcombobox" ); + + input.data("ui-autocomplete")._renderItem = function( ul, item ) { + return $("
  • ") + .data( "ui-autocomplete-item", item ) // jQuery UI > 1.10.0 + .append( "" + item.label + "" ) + .appendTo( ul ); + }; + + this.button = $( "" ) + .attr( "tabIndex", -1 ) + .attr( "title", "Show All Items" ) + .insertAfter( input ) + .button({ + icons: { + primary: "ui-icon-triangle-1-s" + }, + text: false + }) + .removeClass( "ui-corner-all" ) + .addClass( "ui-corner-right ui-button-icon" ) + .click(function() { + // close if already visible + if ( input.autocomplete( "widget" ).is( ":visible" ) ) { + input.autocomplete( "close" ); + return; + } + + // pass empty string as value to search for, displaying all results + input.autocomplete({ minLength: 0 }); + input.autocomplete( "search", "" ); + input.autocomplete({ minLength: savMinLengthToAutocomplete }); + input.focus(); + }); + }, + + destroy: function() { + this.input.remove(); + this.button.remove(); + this.element.show(); + $.Widget.prototype.destroy.call( this ); + } + }); +})( jQuery ); + + +/* + * Function to output a dialog bog for copy/paste + * + * @param string text Text to put into copy/paste area + * @param string text2 Text to put under the copy/paste area + */ +function copyToClipboard(text,text2) +{ + text = text.replace(/
    /g,"\n"); + var newElem = '

    '+text2; + /* alert(newElem); */ + $("#dialogforpopup").html(newElem); + $("#dialogforpopup").dialog(); + $("#coordsforpopup").select(); + return false; +} + +/* + * Provide a function to get an URL GET parameter in javascript + * + * @param string name Name of parameter + * @param mixed valueifnotfound Value if not found + * @return string Value + */ +function getParameterByName(name, valueifnotfound) +{ + name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); + var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), + results = regex.exec(location.search); + return results === null ? valueifnotfound : decodeURIComponent(results[1].replace(/\+/g, " ")); +} + +// Code in the public domain from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round +(function() { + /** + * Decimal adjustment of a number. + * + * @param {String} type The type of adjustment. + * @param {Number} value The number. + * @param {Integer} exp The exponent (the 10 logarithm of the adjustment base). + * @returns {Number} The adjusted value. + */ + function decimalAdjust(type, value, exp) { + // If the exp is undefined or zero... + if (typeof exp === 'undefined' || +exp === 0) { + return Math[type](value); + } + value = +value; + exp = +exp; + // If the value is not a number or the exp is not an integer... + if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) { + return NaN; + } + // Shift + value = value.toString().split('e'); + value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp))); + // Shift back + value = value.toString().split('e'); + return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp)); + } + + // Decimal round + if (!Math.round10) { + Math.round10 = function(value, exp) { + return decimalAdjust('round', value, exp); + }; + } + // Decimal floor + if (!Math.floor10) { + Math.floor10 = function(value, exp) { + return decimalAdjust('floor', value, exp); + }; + } + // Decimal ceil + if (!Math.ceil10) { + Math.ceil10 = function(value, exp) { + return decimalAdjust('ceil', value, exp); + }; + } +})(); + + +/** + * Function similar to PHP price2num() + * + * @param {number|string} amount The amount to convert/clean + * @returns {string} The amount in universal numeric format (Example: '99.99999') + * @todo Implement rounding parameter + */ +function price2numjs(amount) { + if (amount == '') return ''; + + transnoentitiesnoconv("SeparatorDecimal") != "SeparatorDecimal") { + $dec = $langs->transnoentitiesnoconv("SeparatorDecimal"); + } + if ($langs->transnoentitiesnoconv("SeparatorThousand") != "SeparatorThousand") { + $thousand = $langs->transnoentitiesnoconv("SeparatorThousand"); + } + print "var dec='" . $dec . "'; var thousand='" . $thousand . "';\n"; // Set var in javascript + ?> + + var main_max_dec_shown = global->MAIN_MAX_DECIMALS_SHOWN); ?>; + var main_rounding_unit = global->MAIN_MAX_DECIMALS_UNIT; ?>; + var main_rounding_tot = global->MAIN_MAX_DECIMALS_TOT; ?>; + + var amount = amount.toString(); + + // rounding for unit price + var rounding = main_rounding_unit; + var pos = amount.indexOf(dec); + var decpart = ''; + if (pos >= 0) decpart = amount.substr(pos + 1).replace('/0+$/i', ''); // Remove 0 for decimal part + var nbdec = decpart.length; + if (nbdec > rounding) rounding = nbdec; + // If rounding higher than max shown + if (rounding > main_max_dec_shown) rounding = main_max_dec_shown; + + if (thousand != ',' && thousand != '.') amount = amount.replace(',', '.'); + amount = amount.replace(' ', ''); // To avoid spaces + amount = amount.replace(thousand, ''); // Replace of thousand before replace of dec to avoid pb if thousand is . + amount = amount.replace(dec, '.'); + + return Math.round10(amount, rounding); +} diff --git a/htdocs/core/js/select2_locale.js.php b/htdocs/core/js/select2_locale.js.php index 2600182dfa1..660b41820df 100644 --- a/htdocs/core/js/select2_locale.js.php +++ b/htdocs/core/js/select2_locale.js.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/core/js/timepicker.js.php + * \file htdocs/core/js/select2_locale.js.php * \brief File that include javascript functions for timepicker */ diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index 6e6da6bd686..502e83010f7 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -91,6 +91,19 @@ function accounting_prepare_head(AccountingAccount $object) return $head; } +/** + * Return accounting account without zero on the right + * + * @param string $account Accounting account + * @return string String without zero on the right + */ +function clean_account($account) +{ + $account = rtrim($account,"0"); + + return $account; +} + /** * Return general accounting account with defined length * @@ -131,7 +144,7 @@ function length_accountg($account) */ function length_accounta($accounta) { - global $conf, $langs; + global $conf; $a = $conf->global->ACCOUNTING_LENGTH_AACCOUNT; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index d59e3c9a864..7823b3534ad 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1,7 +1,8 @@ - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012 J. Fernando Lagrange +/* Copyright (C) 2008-2011 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 J. Fernando Lagrange + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -23,6 +24,7 @@ * \brief Library of admin functions */ +require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; /** * Renvoi une version en chaine depuis une version en tableau @@ -587,9 +589,11 @@ function listOfSessions() if(! @is_dir($fullpath) && is_readable($fullpath)) { $sessValues = file_get_contents($fullpath); // get raw session data - + // Example of possible value + //$sessValues = 'newtoken|s:32:"1239f7a0c4b899200fe9ca5ea394f307";dol_loginmesg|s:0:"";newtoken|s:32:"1236457104f7ae0f328c2928973f3cb5";dol_loginmesg|s:0:"";token|s:32:"123615ad8d650c5cc4199b9a1a76783f";dol_login|s:5:"admin";dol_authmode|s:8:"dolibarr";dol_tz|s:1:"1";dol_tz_string|s:13:"Europe/Berlin";dol_dst|i:0;dol_dst_observed|s:1:"1";dol_dst_first|s:0:"";dol_dst_second|s:0:"";dol_screenwidth|s:4:"1920";dol_screenheight|s:3:"971";dol_company|s:12:"MyBigCompany";dol_entity|i:1;mainmenu|s:4:"home";leftmenuopened|s:10:"admintools";idmenu|s:0:"";leftmenu|s:10:"admintools";'; + if (preg_match('/dol_login/i',$sessValues) && // limit to dolibarr session - preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i',$sessValues) && // limit to current entity + (preg_match('/dol_entity\|i:'.$conf->entity.';/i',$sessValues) || preg_match('/dol_entity\|s:([0-9]+):"'.$conf->entity.'"/i',$sessValues)) && // limit to current entity preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i',$sessValues)) // limit to company name { $tmp=explode('_', $file); @@ -678,29 +682,9 @@ function activateModule($value,$withdeps=1) $modFile = $modName . ".class.php"; // Loop on each directory to fill $modulesdir - $modulesdir = array(); - foreach ($conf->file->dol_document_root as $type => $dirroot) - { - $modulesdir[] = $dirroot."/core/modules/"; + $modulesdir = dolGetModulesDirs(); - $handle=@opendir(dol_osencode($dirroot)); - if (is_resource($handle)) - { - while (($file = readdir($handle))!==false) - { - if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes') - { - if (is_dir($dirroot . '/' . $file . '/core/modules/')) - { - $modulesdir[] = $dirroot . '/' . $file . '/core/modules/'; - } - } - } - closedir($handle); - } - } - - // Loop on each directory + // Loop on each modulesdir directories $found=false; foreach ($modulesdir as $dir) { @@ -797,29 +781,9 @@ function unActivateModule($value, $requiredby=1) $modFile = $modName . ".class.php"; // Loop on each directory to fill $modulesdir - $modulesdir = array(); - foreach ($conf->file->dol_document_root as $type => $dirroot) - { - $modulesdir[] = $dirroot."/core/modules/"; + $modulesdir = dolGetModulesDirs(); - $handle=@opendir(dol_osencode($dirroot)); - if (is_resource($handle)) - { - while (($file = readdir($handle))!==false) - { - if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes') - { - if (is_dir($dirroot . '/' . $file . '/core/modules/')) - { - $modulesdir[] = $dirroot . '/' . $file . '/core/modules/'; - } - } - } - closedir($handle); - } - } - - // Loop on each directory + // Loop on each modulesdir directories $found=false; foreach ($modulesdir as $dir) { @@ -838,13 +802,14 @@ function unActivateModule($value, $requiredby=1) } else { - // TODO Replace this afte DolibarrModules is moved as abstract class with a try catch to show module is bugged + //print $dir.$modFile; + // TODO Replace this after DolibarrModules is moved as abstract class with a try catch to show module we try to disable has not been found or could not be loaded $genericMod = new DolibarrModules($db); $genericMod->name=preg_replace('/^mod/i','',$modName); $genericMod->rights_class=strtolower(preg_replace('/^mod/i','',$modName)); $genericMod->const_name='MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',$modName)); dol_syslog("modules::unActivateModule Failed to find module file, we use generic function with name " . $modName); - $genericMod->_remove(); + $genericMod->_remove(array()); } // Desactivation des modules qui dependent de lui @@ -853,6 +818,7 @@ function unActivateModule($value, $requiredby=1) $countrb=count($objMod->requiredby); for ($i = 0; $i < $countrb; $i++) { + //var_dump($objMod->requiredby[$i]); unActivateModule($objMod->requiredby[$i]); } } @@ -883,36 +849,129 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql global $db, $modules, $conf, $langs; // Search modules - $filename = array(); - $modules = array(); - $orders = array(); - $categ = array(); - $dirmod = array(); - $modulesdir = array(); + $modulesdir = dolGetModulesDirs(); $i = 0; // is a sequencer of modules found $j = 0; // j is module number. Automatically affected if module number not defined. - foreach ($conf->file->dol_document_root as $type => $dirroot) + foreach ($modulesdir as $dir) { - $modulesdir[$dirroot . '/core/modules/'] = $dirroot . '/core/modules/'; - - $handle=@opendir($dirroot); + // Load modules attributes in arrays (name, numero, orders) from dir directory + //print $dir."\n
    "; + dol_syslog("Scan directory ".$dir." for modules"); + $handle=@opendir(dol_osencode($dir)); if (is_resource($handle)) { while (($file = readdir($handle))!==false) { - if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes') + //print "$i ".$file."\n
    "; + if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') { - if (is_dir($dirroot . '/' . $file . '/core/modules/')) + $modName = substr($file, 0, dol_strlen($file) - 10); + + if ($modName) { - $modulesdir[$dirroot . '/' . $file . '/core/modules/'] = $dirroot . '/' . $file . '/core/modules/'; + include_once $dir.$file; + $objMod = new $modName($db); + + if ($objMod->numero > 0) + { + $j = $objMod->numero; + } + else + { + $j = 1000 + $i; + } + + $modulequalified=1; + + // We discard modules according to features level (PS: if module is activated we always show it) + $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod))); + if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && ! $conf->global->$const_name) $modulequalified=0; + if ($objMod->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && ! $conf->global->$const_name) $modulequalified=0; + //If module is not activated disqualified + if (empty($conf->global->$const_name)) $modulequalified=0; + + if ($modulequalified) + { + // Load languages files of module + if (isset($objMod->langfiles) && is_array($objMod->langfiles)) + { + foreach($objMod->langfiles as $langfile) + { + $langs->load($langfile); + } + } + + // Complete arrays + //&$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond + if (empty($objMod->dictionaries) && ! empty($objMod->dictionnaries)) $objMod->dictionaries=$objMod->dictionnaries; // For backward compatibility + + if (! empty($objMod->dictionaries)) + { + //var_dump($objMod->dictionaries['tabname']); + $taborder[] = 0; + $tabfieldcheck[] = array(); $tabhelp[] = array(); + foreach($objMod->dictionaries['tabname'] as $val) + { + $taborder[] = count($tabname)+1; + $tabname[] = $val; + } + foreach($objMod->dictionaries['tablib'] as $val) $tablib[] = $val; + foreach($objMod->dictionaries['tabsql'] as $val) $tabsql[] = $val; + foreach($objMod->dictionaries['tabsqlsort'] as $val) $tabsqlsort[] = $val; + foreach($objMod->dictionaries['tabfield'] as $val) $tabfield[] = $val; + foreach($objMod->dictionaries['tabfieldvalue'] as $val) $tabfieldvalue[] = $val; + foreach($objMod->dictionaries['tabfieldinsert'] as $val) $tabfieldinsert[] = $val; + foreach($objMod->dictionaries['tabrowid'] as $val) $tabrowid[] = $val; + foreach($objMod->dictionaries['tabcond'] as $val) $tabcond[] = $val; + if (! empty($objMod->dictionaries['tabfieldcheck'])) foreach($objMod->dictionaries['tabfieldcheck'] as $val) $tabfieldcheck[] = $val; + if (! empty($objMod->dictionaries['tabhelp'])) foreach($objMod->dictionaries['tabhelp'] as $val) $tabhelp[] = $val; + //foreach($objMod->dictionaries['tabsqlsort'] as $val) $tablib[] = $val; + //$tabname = array_merge ($tabname, $objMod->dictionaries['tabname']); + //var_dump($tabcond); + //exit; + } + + $j++; + $i++; + } + else dol_syslog("Module ".get_class($objMod)." not qualified"); } } } closedir($handle); } + else + { + dol_syslog("htdocs/admin/modules.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING); + } } + return 1; +} + +/** + * Add external modules to list of contact element + * + * @param array $elementList elementList + * @return int 1 + */ +function complete_elementList_with_modules(&$elementList) +{ + global $db, $modules, $conf, $langs; + + // Search modules + $filename = array(); + $modules = array(); + $orders = array(); + $categ = array(); + $dirmod = array(); + + $i = 0; // is a sequencer of modules found + $j = 0; // j is module number. Automatically affected if module number not defined. + + $modulesdir = dolGetModulesDirs(); + foreach ($modulesdir as $dir) { // Load modules attributes in arrays (name, numero, orders) from dir directory @@ -969,34 +1028,9 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql if (isset($categ[$objMod->special])) $categ[$objMod->special]++; // Array of all different modules categories else $categ[$objMod->special]=1; $dirmod[$i] = $dirroot; - - // Complete arrays - //&$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond - if (empty($objMod->dictionaries) && ! empty($objMod->dictionnaries)) $objMod->dictionaries=$objMod->dictionnaries; // For backward compatibility - - if (! empty($objMod->dictionaries)) + if (! empty($objMod->module_parts['contactelement'])) { - //var_dump($objMod->dictionaries['tabname']); - $taborder[] = 0; - $tabfieldcheck[] = array(); $tabhelp[] = array(); - foreach($objMod->dictionaries['tabname'] as $val) - { - $taborder[] = count($tabname)+1; - $tabname[] = $val; - } - foreach($objMod->dictionaries['tablib'] as $val) $tablib[] = $val; - foreach($objMod->dictionaries['tabsql'] as $val) $tabsql[] = $val; - foreach($objMod->dictionaries['tabsqlsort'] as $val) $tabsqlsort[] = $val; - foreach($objMod->dictionaries['tabfield'] as $val) $tabfield[] = $val; - foreach($objMod->dictionaries['tabfieldvalue'] as $val) $tabfieldvalue[] = $val; - foreach($objMod->dictionaries['tabfieldinsert'] as $val) $tabfieldinsert[] = $val; - foreach($objMod->dictionaries['tabrowid'] as $val) $tabrowid[] = $val; - foreach($objMod->dictionaries['tabcond'] as $val) $tabcond[] = $val; - if (! empty($objMod->dictionaries['tabfieldcheck'])) foreach($objMod->dictionaries['tabfieldcheck'] as $val) $tabfieldcheck[] = $val; - if (! empty($objMod->dictionaries['tabhelp'])) foreach($objMod->dictionaries['tabhelp'] as $val) $tabhelp[] = $val; - //foreach($objMod->dictionaries['tabsqlsort'] as $val) $tablib[] = $val; - //$tabname = array_merge ($tabname, $objMod->dictionaries['tabname']); - //var_dump($tabcond); + $elementList[$objMod->name] = $langs->trans($objMod->name); //exit; } @@ -1018,12 +1052,11 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql return 1; } - /** * Show array with constants to edit * * @param array $tableau Array of constants - * @param int $strictw3c Respect W3C (no form into table) + * @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (no form into table), 2=No form nor button at all * @return void */ function form_constantes($tableau,$strictw3c=0) @@ -1032,7 +1065,7 @@ function form_constantes($tableau,$strictw3c=0) $form = new Form($db); - if (! empty($strictw3c)) print "\n".'
    '; + if (! empty($strictw3c) && $strictw3c == 1) print "\n".''; print ''; print ''; @@ -1169,7 +1202,7 @@ function form_constantes($tableau,$strictw3c=0) } print '
    '; - if (! empty($strictw3c)) + if (! empty($strictw3c) && $strictw3c == 1) { print '
    '; print "
    \n"; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index e95bfaa94ef..7e02cbe4679 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -41,11 +41,12 @@ * @param int $socid Third party id * @param string $action Action string * @param array $showextcals Array with list of external calendars (used to show links to select calendar), or -1 to show no legend - * @param string $actioncode Preselected value of actioncode for filter on type + * @param string|array $actioncode Preselected value(s) of actioncode for filter on type * @param int $usergroupid Id of group to filter on users + * @param string $excludetype A type to exclude ('systemauto', 'system', '') * @return void */ -function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals=array(), $actioncode='', $usergroupid='') +function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals=array(), $actioncode='', $usergroupid='', $excludetype='') { global $conf, $user, $langs, $db, $hookmanager; global $begin_h, $end_h, $begin_d, $end_d; @@ -53,7 +54,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh $langs->load("companies"); // Filters - print '
    '; + print ''; print ''; print ''; print ''; @@ -74,7 +75,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print '
  • '; print $langs->trans("ActionsToDoBy").'   '; print ''; - print $form->select_dolusers($filtert, 'usertodo', 1, '', ! $canedit); + print $form->select_dolusers($filtert, 'usertodo', 1, '', ! $canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); if (empty($conf->dol_optimize_smallscreen)) print '   '.$langs->trans("or") . ' '.$langs->trans("Group").'   '; print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', ! $canedit); print '
    '; print $langs->trans("Type"); print '  '; - print $formactions->select_type_actions($actioncode, "actioncode", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : 0)); + $multiselect=0; + if (! empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) // We use an option here because it adds bugs when used on agenda page "peruser" and "list" + { + $multiselect=(!empty($conf->global->AGENDA_USE_EVENT_TYPE)); + } + print $formactions->select_type_actions($actioncode, "actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0), 0, $multiselect); print '
    '; print $langs->trans("Status"); @@ -417,7 +425,7 @@ function agenda_prepare_head() */ function actions_prepare_head($object) { - global $langs, $conf, $user; + global $db, $langs, $conf, $user; $h = 0; $head = array(); @@ -438,11 +446,13 @@ function actions_prepare_head($object) // Attached files require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; $upload_dir = $conf->agenda->dir_output . "/" . $object->id; $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$')); + $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id; $head[$h][1] = $langs->trans("Documents"); - if ($nbFiles > 0) $head[$h][1].= ' '.$nbFiles.''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; @@ -472,9 +482,9 @@ function calendars_prepare_head($param) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?action=show_month'.($param?'&'.$param:''); - $head[$h][1] = $langs->trans("ViewCal"); - $head[$h][2] = 'cardmonth'; + $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?action=show_day'.($param?'&'.$param:''); + $head[$h][1] = $langs->trans("ViewDay"); + $head[$h][2] = 'cardday'; $h++; $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?action=show_week'.($param?'&'.$param:''); @@ -482,13 +492,20 @@ function calendars_prepare_head($param) $head[$h][2] = 'cardweek'; $h++; - //$paramday=$param; - //if (preg_match('/&month=\d+/',$paramday) && ! preg_match('/&day=\d+/',$paramday)) $paramday.='&day=1'; - $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?action=show_day'.($param?'&'.$param:''); - $head[$h][1] = $langs->trans("ViewDay"); - $head[$h][2] = 'cardday'; + $head[$h][0] = DOL_URL_ROOT.'/comm/action/index.php?action=show_month'.($param?'&'.$param:''); + $head[$h][1] = $langs->trans("ViewCal"); + $head[$h][2] = 'cardmonth'; $h++; + //if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) + if (! empty($conf->global->AGENDA_SHOW_PERTYPE)) + { + $head[$h][0] = DOL_URL_ROOT.'/comm/action/pertype.php'.($param?'?'.$param:''); + $head[$h][1] = $langs->trans("ViewPerType"); + $head[$h][2] = 'cardpertype'; + $h++; + } + $head[$h][0] = DOL_URL_ROOT.'/comm/action/peruser.php'.($param?'?'.$param:''); $head[$h][1] = $langs->trans("ViewPerUser"); $head[$h][2] = 'cardperuser'; diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index a1d2ac3cf02..fa150e6fbb7 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -52,16 +52,13 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt // Remove product id before select another product // use keyup instead change to avoid loosing the product id $("input#search_'.$htmlname.'").keydown(function() { - //console.log(\'purge_id_after_keydown\'); $("#'.$htmlname.'").val(""); }); $("input#search_'.$htmlname.'").change(function() { - //console.log(\'change\'); $("#'.$htmlname.'").trigger("change"); }); // Check when keyup $("input#search_'.$htmlname.'").keyup(function() { - //console.log(\'keyup\'); if ($(this).val().length == 0) { $("#search_'.$htmlname.'").val(""); @@ -127,7 +124,6 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt dataType: "json", minLength: '.$minLength.', select: function( event, ui ) { // Function ran when new value is selected into javascript combo - //console.log(\'set value of id with \'+ui.item.id); $("#'.$htmlname.'").val(ui.item.id).trigger("change"); // Select new value // Disable an element if (options.option_disabled) { @@ -171,12 +167,11 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt } }); } - $("#search_'.$htmlname.'").trigger("change"); // To tell that input text field was modified } ,delay: 500 }).data("ui-autocomplete")._renderItem = function( ul, item ) { - return $("
  • ") - .data( "item.autocomplete", item ) + return $("
  • ") + .data( "ui-autocomplete-item", item ) // jQuery UI > 1.10.0 .append( \'\' + item.label + "" ) .appendTo(ul); }; @@ -350,7 +345,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0, $ { global $conf; - //if (! empty($conf->browser->phone)) return ''; // combobox disabled for smartphones (does not works) + if (! empty($conf->browser->phone)) return ''; // select2 disabled for smartphones with standard browser (does not works, popup appears outside screen) if (! empty($conf->dol_use_jmobile)) return ''; // select2 works with jmobile but it breaks the autosize feature of jmobile. if (! empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return ''; if (empty($conf->use_javascript_ajax)) return ''; diff --git a/htdocs/core/lib/askpricesupplier.lib.php b/htdocs/core/lib/askpricesupplier.lib.php deleted file mode 100644 index eec34ea9133..00000000000 --- a/htdocs/core/lib/askpricesupplier.lib.php +++ /dev/null @@ -1,122 +0,0 @@ - - * Copyright (C) 2005-2012 Regis Houssin - * - * 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 3 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, see . - * or see http://www.gnu.org/ - */ - -/** - * \file htdocs/core/lib/propal.lib.php - * \brief Ensemble de fonctions de base pour le module propal - * \ingroup propal - */ - -/** - * Prepare array with list of tabs - * - * @param object $object Object related to tabs - * @return array Array of tabs to show - */ -function askpricesupplier_prepare_head($object) -{ - global $langs, $conf, $user; - $langs->load("askpricesupplier"); - $langs->load("compta"); - - $h = 0; - $head = array(); - - $head[$h][0] = DOL_URL_ROOT.'/comm/askpricesupplier/card.php?id='.$object->id; - $head[$h][1] = $langs->trans('AskPriceSupplierCard'); - $head[$h][2] = 'comm'; - $h++; - - - // Show more tabs from modules - // Entries must be declared in modules descriptor with line - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab - // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf,$langs,$object,$head,$h,'askpricesupplier'); - - if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { - $nbNote = 0; - if(!empty($object->note_private)) $nbNote++; - if(!empty($object->note_public)) $nbNote++; - $head[$h][0] = DOL_URL_ROOT.'/comm/askpricesupplier/note.php?id='.$object->id; - $head[$h][1] = $langs->trans('Notes'); - if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; - $head[$h][2] = 'note'; - $h++; - } - - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $upload_dir = $conf->askpricesupplier->dir_output . "/" . dol_sanitizeFileName($object->ref); - $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$')); - $head[$h][0] = DOL_URL_ROOT.'/comm/askpricesupplier/document.php?id='.$object->id; - $head[$h][1] = $langs->trans('Documents'); - if($nbFiles > 0) $head[$h][1].= ' '.$nbFiles.''; - $head[$h][2] = 'document'; - $h++; - - $head[$h][0] = DOL_URL_ROOT.'/comm/askpricesupplier/info.php?id='.$object->id; - $head[$h][1] = $langs->trans('Info'); - $head[$h][2] = 'info'; - $h++; - - complete_head_from_modules($conf,$langs,$object,$head,$h,'askpricesupplier','remove'); - - return $head; -} - -/** - * Return array head with list of tabs to view object informations. - * - * @return array head array with tabs - */ -function askpricesupplier_admin_prepare_head() -{ - global $langs, $conf, $user; - - $h = 0; - $head = array(); - - $head[$h][0] = DOL_URL_ROOT.'/admin/askpricesupplier.php'; - $head[$h][1] = $langs->trans("Miscellaneous"); - $head[$h][2] = 'general'; - $h++; - - // Show more tabs from modules - // Entries must be declared in modules descriptor with line - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab - // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab - complete_head_from_modules($conf,$langs,null,$head,$h,'askpricesupplier_admin'); - - $head[$h][0] = DOL_URL_ROOT.'/comm/admin/askpricesupplier_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFields"); - $head[$h][2] = 'attributes'; - $h++; - - $head[$h][0] = DOL_URL_ROOT.'/comm/admin/askpricesupplierdet_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFieldsLines"); - $head[$h][2] = 'attributeslines'; - $h++; - - complete_head_from_modules($conf,$langs,null,$head,$h,'askpricesupplier_admin','remove'); - - return $head; -} - - diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index bca5b2f1bdf..3c5d57fdaf6 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -32,7 +32,7 @@ */ function bank_prepare_head(Account $object) { - global $langs, $conf, $user; + global $db, $langs, $conf, $user; $h = 0; $head = array(); @@ -72,6 +72,18 @@ function bank_prepare_head(Account $object) $h++; } + // Attached files + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; + $upload_dir = $conf->bank->dir_output . "/" . dol_sanitizeFileName($object->ref); + $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$')); + $nbLinks=Link::count($db, $object->element, $object->id); + $head[$h][0] = DOL_URL_ROOT . "/compta/bank/document.php?account=" . $object->id; + $head[$h][1] = $langs->trans("Documents"); + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + $head[$h][2] = 'document'; + $h++; + // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index 778723c5f3b..6fa6b55151e 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2004-2010 Folke Ashberg: Some lines of code were inspired from work * of Folke Ashberg into PHP-Barcode 0.3pl2, available as GPL * source code at http://www.ashberg.de/bar. @@ -59,23 +59,20 @@ else $genbarcode_loc = $conf->global->GENBARCODE_LOCATION; /** * Print barcode * - * @param string $code Code - * @param string $encoding Encoding - * @param integer $scale Scale - * @param string $mode 'png' or 'jpg' ... - * - * - * @return array $bars array('encoding': the encoding which has been used, 'bars': the bars, 'text': text-positioning info) + * @param string $code Code + * @param string $encoding Encoding + * @param integer $scale Scale + * @param string $mode 'png' or 'jpg' ... + * @return array|string $bars array('encoding': the encoding which has been used, 'bars': the bars, 'text': text-positioning info) or string with error message */ function barcode_print($code, $encoding="ANY", $scale = 2 ,$mode = "png") { - // DOLCHANGE LDR Add log dol_syslog("barcode.lib.php::barcode_print $code $encoding $scale $mode"); $bars=barcode_encode($code,$encoding); if (! $bars || ! empty($bars['error'])) { - // DOLCHANGE LDR Return error message instead of array + // Return error message instead of array if (empty($bars['error'])) $error='Bad Value '.$code.' for encoding '.$encoding; else $error=$bars['error']; dol_syslog('barcode.lib.php::barcode_print '.$error, LOG_ERR); @@ -116,8 +113,7 @@ function barcode_encode($code,$encoding) global $genbarcode_loc; if ( - ((preg_match("/^ean$/i", $encoding) - && ( strlen($code)==12 || strlen($code)==13))) + (preg_match("/^ean$/i", $encoding)) || (($encoding) && (preg_match("/^isbn$/i", $encoding)) && (( strlen($code)==9 || strlen($code)==10) || @@ -140,7 +136,7 @@ function barcode_encode($code,$encoding) } else { - print "barcode_encode needs an external programm for encodings other then EAN/ISBN
    \n"; + print "barcode_encode needs an external programm for encodings other then EAN/ISBN (code=".$code.", encoding=".$encoding.")
    \n"; print "
  • "; - if ($showlineingray) print ''; + //if ($showlineingray) print ''; $projectstatic->id=$lines[$i]->fk_project; $projectstatic->ref=$lines[$i]->projectref; $projectstatic->public=$lines[$i]->public; + $projectstatic->title=$lines[$i]->projectlabel; if ($lines[$i]->public || in_array($lines[$i]->fk_project,$projectsArrayId) || ! empty($user->rights->projet->all->lire)) print $projectstatic->getNomUrl(1); else print $projectstatic->getNomUrl(1,'nolink'); - if ($showlineingray) print ''; + //if ($showlineingray) print ''; print "'; - print dol_print_date($lines[$i]->date_end,'dayhour'); + $taskstatic->projectstatus = $lines[$i]->projectstatus; + $taskstatic->progress = $lines[$i]->progress; + $taskstatic->fk_statut = $lines[$i]->status; + $taskstatic->datee = $lines[$i]->date_end; + print dol_print_date($lines[$i]->date_end,'dayhour'); + if ($taskstatic->hasDelay()) print img_warning($langs->trans("Late")); print ''; - if ($lines[$i]->progress != '') - { - print $lines[$i]->progress.' %'; - } - print ''; if ($showlineingray) print ''; @@ -443,6 +444,14 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } print ''; + if ($lines[$i]->progress != '') + { + print $lines[$i]->progress.' %'; + } + print '
    '.$langs->trans("Total").''; print convertSecondToTime($total_projectlinesa_planned, 'allhourmin'); print ''; print convertSecondToTime($total_projectlinesa_spent, 'allhourmin'); print ''; if ($total_projectlinesa_planned) print round(100 * $total_projectlinesa_spent / $total_projectlinesa_planned,2).' %'; print '
    '; - $tableCell.=''; - //$placeholder=' placeholder="00:00"'; - $placeholder=''; - //if (! $disabledtask) - //{ - $tableCell.='+'; - $tableCell.=''; - //} + $alttitle=$langs->trans("AddHereTimeSpentForDay",$tmparray['day'],$tmparray['mon']); + + $tableCell =''; + if ($alreadyspent) + { + $tableCell.=''; + //$placeholder=' placeholder="00:00"'; + $placeholder=''; + //$tableCell.='+'; + } + $tableCell.=''; $tableCell.='
    '; - print ''; - print_liste_field_titre($title,"index.php","","","","",$sortfield,$sortorder); - if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) - { - print_liste_field_titre($langs->trans("OpportunityAmount"),"","","","",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("OpportunityStatus"),"","","","",'align="right"',$sortfield,$sortorder); - } - if (empty($conf->global->PROJECT_HIDE_TASKS)) print_liste_field_titre($langs->trans("Tasks"),"","","","",'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),"","","","",'align="right"',$sortfield,$sortorder); - print "\n"; - $sql = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut as status, p.fk_opp_status as opp_status, p.opp_amount, COUNT(DISTINCT t.rowid) as nb"; // We use DISTINCT here because line can be doubled if task has 2 links to same user $sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; if ($mytasks) { @@ -926,9 +934,9 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= { $sql.= " AND p.rowid = t.fk_projet"; $sql.= " AND ec.element_id = t.rowid"; - $sql.= " AND ctc.rowid = ec.fk_c_type_contact"; - $sql.= " AND ctc.element = 'project_task'"; $sql.= " AND ec.fk_socpeople = ".$user->id; + $sql.= " AND ec.fk_c_type_contact = ctc.rowid"; // Replace the 2 lines with ec.fk_c_type_contact in $arrayidtypeofcontact + $sql.= " AND ctc.element = 'project_task'"; } if ($statut >= 0) { @@ -948,20 +956,65 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= $sql.= " AND (p.datee IS NULL OR p.datee >= ".$db->idate(dol_get_first_day($project_year_filter,1,false)).")"; } } - $sql.= " GROUP BY p.rowid, p.ref, p.title, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_amount"; - $sql.= " ORDER BY p.title, p.ref"; + + // Get id of project we must show tasks + $arrayidofprojects=array(); + $sql1 = "SELECT p.rowid as projectid"; + $sql1.= $sql; + $resql = $db->query($sql1); + if ($resql) + { + $i=0; + $num = $db->num_rows($resql); + while ($i < $num) + { + $objp = $db->fetch_object($resql); + $arrayidofprojects[$objp->projectid]=$objp->projectid; + $i++; + } + } + else dol_print_error($db); + if (empty($arrayidofprojects)) $arrayidofprojects[0]=-1; + + // Get list of project with calculation on tasks + $sql2 = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_soc, s.nom as socname, p.fk_user_creat, p.public, p.fk_statut as status, p.fk_opp_status as opp_status, p.opp_amount,"; + $sql2.= " p.dateo, p.datee,"; + $sql2.= " COUNT(t.rowid) as nb, SUM(t.planned_workload) as planned_workload, SUM(t.planned_workload * t.progress / 100) as declared_progess_workload"; + $sql2.= " FROM ".MAIN_DB_PREFIX."projet as p"; + $sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc"; + $sql2.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet"; + $sql2.= " WHERE p.rowid IN (".join(',',$arrayidofprojects).")"; + $sql2.= " GROUP BY p.rowid, p.ref, p.title, p.fk_soc, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_amount, p.dateo, p.datee"; + $sql2.= " ORDER BY p.title, p.ref"; $var=true; - $resql = $db->query($sql); - if ( $resql ) + $resql = $db->query($sql2); + if ($resql) { - $total_task = 0; + $total_task = 0; $total_opp_amount = 0; $ponderated_opp_amount = 0; $num = $db->num_rows($resql); $i = 0; + print ''; + print_liste_field_titre($title.' '.$num.'',$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder); + if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) + { + print_liste_field_titre($langs->trans("OpportunityAmount"),"","","","",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("OpportunityStatus"),"","","","",'align="right"',$sortfield,$sortorder); + } + if (empty($conf->global->PROJECT_HIDE_TASKS)) + { + print_liste_field_titre($langs->trans("Tasks"),"","","","",'align="right"',$sortfield,$sortorder); + if (! in_array('plannedworkload', $hiddenfields)) print_liste_field_titre($langs->trans("PlannedWorkload"),"","","","",'align="right"',$sortfield,$sortorder); + if (! in_array('declaredprogress', $hiddenfields)) print_liste_field_titre($langs->trans("ProgressDeclared"),"","","","",'align="right"',$sortfield,$sortorder); + } + print_liste_field_titre($langs->trans("Status"),"","","","",'align="right"',$sortfield,$sortorder); + print "\n"; + while ($i < $num) { $objp = $db->fetch_object($resql); @@ -974,12 +1027,27 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= $userAccess = $projectstatic->restrictedProjectArea($user); if ($userAccess >= 0) { + $projectstatic->ref=$objp->ref; + $projectstatic->statut = $objp->status; + $projectstatic->title = $objp->title; + $projectstatic->datee = $db->jdate($objp->datee); + $projectstatic->dateo = $db->jdate($objp->dateo); + $var=!$var; print ""; - print ''; + if (! in_array('projectlabel', $hiddenfields)) print '
    '.dol_trunc($objp->title,24); + print ''; + print ''; if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { print ''; } - $projectstatic->statut = $objp->status; - if (empty($conf->global->PROJECT_HIDE_TASKS)) print ''; + if (empty($conf->global->PROJECT_HIDE_TASKS)) + { + print ''; + + $plannedworkload=$objp->planned_workload; + $total_plannedworkload+=$plannedworkload; + if (! in_array('plannedworkload', $hiddenfields)) + { + print ''; + } + if (! in_array('declaredprogress', $hiddenfields)) + { + $declaredprogressworkload=$objp->declared_progess_workload; + $total_declaredprogressworkload+=$declaredprogressworkload; + print ''; + } + } + print ''; print "\n"; @@ -1003,14 +1090,22 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= $i++; } - print '"; + print ''; + print '"; if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { - print ''; - print ''; + print ''; + print ''; } - if (empty($conf->global->PROJECT_HIDE_TASKS)) print ''; - + if (empty($conf->global->PROJECT_HIDE_TASKS)) + { + print ''; + if (! in_array('plannedworkload', $hiddenfields)) print ''; + if (! in_array('declaredprogress', $hiddenfields)) print ''; + } + print ''; + print ''; + $db->free($resql); } else diff --git a/htdocs/core/lib/propal.lib.php b/htdocs/core/lib/propal.lib.php index fd227d512b7..7674f0780dd 100644 --- a/htdocs/core/lib/propal.lib.php +++ b/htdocs/core/lib/propal.lib.php @@ -31,7 +31,7 @@ */ function propal_prepare_head($object) { - global $langs, $conf, $user; + global $db, $langs, $conf, $user; $langs->load("propal"); $langs->load("compta"); @@ -89,11 +89,13 @@ function propal_prepare_head($object) } require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; $upload_dir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref); $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$')); + $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if($nbFiles > 0) $head[$h][1].= ' '.$nbFiles.''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; $head[$h][2] = 'document'; $h++; diff --git a/htdocs/core/lib/receiptprinter.lib.php b/htdocs/core/lib/receiptprinter.lib.php new file mode 100644 index 00000000000..d440acc5403 --- /dev/null +++ b/htdocs/core/lib/receiptprinter.lib.php @@ -0,0 +1,72 @@ + + * Copyright (C) 2015 Frederic France + * + * 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 3 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, see . + */ + +/** + * \file htdocs/core/lib/receiptprinter.lib.php + * \ingroup printing + * \brief Library for receipt printer functions + */ + + + +/** + * Define head array for tabs of receipt printer setup pages + * + * @param string $mode Mode + * @return Array of head + */ +function receiptprinteradmin_prepare_head($mode) +{ + global $langs, $conf; + + $h = 0; + $head = array(); + + $head[$h][0] = DOL_URL_ROOT."/admin/receiptprinter.php?mode=config"; + $head[$h][1] = $langs->trans("ListPrinters"); + $head[$h][2] = 'config'; + $h++; + + $head[$h][0] = DOL_URL_ROOT."/admin/receiptprinter.php?mode=template"; + $head[$h][1] = $langs->trans("SetupReceiptTemplate"); + $head[$h][2] = 'template'; + $h++; + + if ($mode == 'test') + { + $head[$h][0] = DOL_URL_ROOT."/admin/receiptprinter.php?mode=test"; + $head[$h][1] = $langs->trans("TargetedPrinter"); + $head[$h][2] = 'test'; + $h++; + } + + + //$object=new stdClass(); + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname); to remove a tab + //complete_head_from_modules($conf,$langs,$object,$head,$h,'printingadmin'); + + //complete_head_from_modules($conf,$langs,$object,$head,$h,'printing','remove'); + + return $head; +} + + diff --git a/htdocs/core/lib/report.lib.php b/htdocs/core/lib/report.lib.php index 8946449d5ac..fa05e632983 100644 --- a/htdocs/core/lib/report.lib.php +++ b/htdocs/core/lib/report.lib.php @@ -26,33 +26,36 @@ /** * Show header of a VAT report * -* @param string $nom Name of report +* @param string $nom Name of report * @param string $variante Link for alternate report * @param string $period Period of report * @param string $periodlink Link to switch period * @param string $description Description * @param timestamp|integer $builddate Date generation * @param string $exportlink Link for export or '' -* @param array $moreparam Array with list of params to add into form -* @param string $calcmode Calculation mode +* @param array $moreparam Array with list of params to add into form +* @param string $calcmode Calculation mode +* @param string $varlink Add a variable into the address of the page * @return void */ -function report_header($nom,$variante,$period,$periodlink,$description,$builddate,$exportlink='',$moreparam=array(),$calcmode='') +function report_header($nom,$variante,$period,$periodlink,$description,$builddate,$exportlink='',$moreparam=array(),$calcmode='', $varlink='') { global $langs; if (empty($hselected)) $hselected='report'; print "\n\n\n"; + + if(! empty($varlink)) $varlink = '?'.$varlink; $h=0; - $head[$h][0] = $_SERVER["PHP_SELF"]; + $head[$h][0] = $_SERVER["PHP_SELF"].$varlink; $head[$h][1] = $langs->trans("Report"); $head[$h][2] = 'report'; dol_fiche_head($head, 'report'); - print '
    '; + print ''; foreach($moreparam as $key => $value) { print ''; @@ -115,7 +118,8 @@ function report_header($nom,$variante,$period,$periodlink,$description,$builddat print ''; - print ''; + dol_fiche_end(); + print "\n\n\n"; } diff --git a/htdocs/core/lib/salaries.lib.php b/htdocs/core/lib/salaries.lib.php index 7c104b4da82..2e230ad2302 100644 --- a/htdocs/core/lib/salaries.lib.php +++ b/htdocs/core/lib/salaries.lib.php @@ -26,7 +26,7 @@ */ function salaries_prepare_head($object) { - global $langs, $conf; + global $db, $langs, $conf; $h = 0; $head = array(); @@ -43,20 +43,20 @@ function salaries_prepare_head($object) { complete_head_from_modules($conf,$langs,$object,$head,$h,'salaries'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; $upload_dir = $conf->salaries->dir_output . "/" . dol_sanitizeFileName($object->ref); $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$')); + $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/compta/salaries/document.php?id='.$object->id; $head[$h][1] = $langs->trans('Documents'); - if($nbFiles > 0) $head[$h][1].= ' '.$nbFiles.''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; - /* $head[$h][0] = DOL_URL_ROOT.'/compta/salaries/info.php?id='.$object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++; - */ complete_head_from_modules($conf,$langs,$object,$head,$h,'salaries', 'remove'); diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 0e7f74b32f7..4cfc077f0be 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -74,7 +74,7 @@ function dol_decode($chain) * If constant MAIN_SECURITY_SALT is defined, we use it as a salt. * * @param string $chain String to hash - * @param int $type Type of hash (0:auto, 1:sha1, 2:sha1+md5, 3:md5) + * @param int $type Type of hash (0:auto, 1:sha1, 2:sha1+md5, 3:md5). Use 3 here, if hash is not needed for security purpose, for security need, prefer 0. * @return string Hash of string */ function dol_hash($chain,$type=0) diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index 0d94357a201..a32805b6169 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -148,8 +148,10 @@ function dol_loginfunction($langs,$conf,$mysoc) if (! preg_match('/mainmenu=/',$php_self)) $php_self.=(preg_match('/\?/',$php_self)?'&':'?').'mainmenu=home'; // Title - $title='Dolibarr '.DOL_VERSION; + $appli=constant('DOL_APPLICATION_TITLE'); + $title=$appli.' '.DOL_VERSION; if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$conf->global->MAIN_APPLICATION_TITLE; + $titletruedolibarrversion=DOL_VERSION; // $title used by login template after the @ to inform of true Dolibarr version // Note: $conf->css looks like '/theme/eldy/style.css.php' $conf->css = "/theme/".(GETPOST('theme')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php"; diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index 1c0c589870e..8cfd5f202d5 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -50,9 +50,12 @@ function shipping_prepare_head($object) { // delivery link $object->fetchObjectLinked($object->id,$object->element); - if (! empty($object->linkedObjectsIds['delivery'][0])) // If there is a delivery + if (count($object->linkedObjectsIds['delivery']) > 0) // If there is a delivery { - $head[$h][0] = DOL_URL_ROOT."/livraison/card.php?id=".$object->linkedObjectsIds['delivery'][0]; + // Take first one element of array + $tmp = reset($object->linkedObjectsIds['delivery']); + + $head[$h][0] = DOL_URL_ROOT."/livraison/card.php?id=".$tmp; $head[$h][1] = $langs->trans("DeliveryCard"); $head[$h][2] = 'delivery'; $h++; @@ -184,8 +187,8 @@ function show_list_sending_receive($origin,$origin_id,$filter='') if ($num) { - if ($filter) print_titre($langs->trans("OtherSendingsForSameOrder")); - else print_titre($langs->trans("SendingsAndReceivingForSameOrder")); + if ($filter) print load_fiche_titre($langs->trans("OtherSendingsForSameOrder")); + else print load_fiche_titre($langs->trans("SendingsAndReceivingForSameOrder")); print '
    '; - $projectstatic->ref=$objp->ref; + print ''; print $projectstatic->getNomUrl(1); - print ' - '.dol_trunc($objp->title,24).''; + if ($objp->fk_soc > 0) + { + $thirdpartystatic->id=$objp->fk_soc; + $thirdpartystatic->ref=$objp->socname; + $thirdpartystatic->name=$objp->socname; + print $thirdpartystatic->getNomUrl(1); + } + print ''; @@ -990,8 +1058,27 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= if ($code) print $langs->trans("OppStatus".$code); print ''.$objp->nb.''.$objp->nb.''.($plannedworkload?convertSecondToTime($plannedworkload):'').''; + //print $objp->planned_workload.'-'.$objp->declared_progess_workload."
    "; + print ($plannedworkload?round(100*$declaredprogressworkload/$plannedworkload,0).'%':''); + print '
    '.$projectstatic->getLibStatut(3).'
    '.$langs->trans("Total")."
    '.$langs->trans("Total")."'.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).''.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmount"), 1).''.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).''.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc"), 1).''.$total_task.''.$total_task.''.($total_plannedworkload?convertSecondToTime($total_plannedworkload):'').''.($total_plannedworkload?round(100*$total_declaredprogressworkload/$total_plannedworkload,0).'%':'').'
    '; print ''; @@ -302,7 +305,8 @@ function show_list_sending_receive($origin,$origin_id,$filter='') $expedition->id=$objp->sendingid; $expedition->fetchObjectLinked($expedition->id,$expedition->element); //var_dump($expedition->linkedObjects); - $receiving=(! empty($expedition->linkedObjects['delivery'][0])?$expedition->linkedObjects['delivery'][0]:''); + $receiving=''; + if (count($expedition->linkedObjects['delivery']) > 0) $receiving=reset($expedition->linkedObjects['delivery']); // Take first link if (! empty($receiving)) { diff --git a/htdocs/core/lib/supplier_proposal.lib.php b/htdocs/core/lib/supplier_proposal.lib.php new file mode 100644 index 00000000000..1e48edcb87d --- /dev/null +++ b/htdocs/core/lib/supplier_proposal.lib.php @@ -0,0 +1,124 @@ + + * Copyright (C) 2005-2012 Regis Houssin + * + * 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 3 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, see . + * or see http://www.gnu.org/ + */ + +/** + * \file htdocs/core/lib/propal.lib.php + * \brief Ensemble de fonctions de base pour le module propal + * \ingroup propal + */ + +/** + * Prepare array with list of tabs + * + * @param object $object Object related to tabs + * @return array Array of tabs to show + */ +function supplier_proposal_prepare_head($object) +{ + global $db, $langs, $conf, $user; + $langs->load("supplier_proposal"); + $langs->load("compta"); + + $h = 0; + $head = array(); + + $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/card.php?id='.$object->id; + $head[$h][1] = $langs->trans('SupplierProposalCard'); + $head[$h][2] = 'comm'; + $h++; + + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname); to remove a tab + complete_head_from_modules($conf,$langs,$object,$head,$h,'supplier_proposal'); + + if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) + { + $nbNote = 0; + if(!empty($object->note_private)) $nbNote++; + if(!empty($object->note_public)) $nbNote++; + $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/note.php?id='.$object->id; + $head[$h][1] = $langs->trans('Notes'); + if ($nbNote > 0) $head[$h][1].= ' '.$nbNote.''; + $head[$h][2] = 'note'; + $h++; + } + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; + $upload_dir = $conf->supplier_proposal->dir_output . "/" . dol_sanitizeFileName($object->ref); + $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$')); + $nbLinks=Link::count($db, $object->element, $object->id); + $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/document.php?id='.$object->id; + $head[$h][1] = $langs->trans('Documents'); + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; + $head[$h][2] = 'document'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/info.php?id='.$object->id; + $head[$h][1] = $langs->trans('Info'); + $head[$h][2] = 'info'; + $h++; + + complete_head_from_modules($conf,$langs,$object,$head,$h,'supplier_proposal','remove'); + + return $head; +} + +/** + * Return array head with list of tabs to view object informations. + * + * @return array head array with tabs + */ +function supplier_proposal_admin_prepare_head() +{ + global $langs, $conf, $user; + + $h = 0; + $head = array(); + + $head[$h][0] = DOL_URL_ROOT.'/admin/supplier_proposal.php'; + $head[$h][1] = $langs->trans("Miscellaneous"); + $head[$h][2] = 'general'; + $h++; + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab + complete_head_from_modules($conf,$langs,null,$head,$h,'supplier_proposal_admin'); + + $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/admin/supplier_proposal_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFields"); + $head[$h][2] = 'attributes'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/supplier_proposal/admin/supplier_proposaldet_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsLines"); + $head[$h][2] = 'attributeslines'; + $h++; + + complete_head_from_modules($conf,$langs,null,$head,$h,'supplier_proposal_admin','remove'); + + return $head; +} + + diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 2387332e670..758301c9171 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -36,7 +36,7 @@ */ function tax_prepare_head(ChargeSociales $object) { - global $langs, $conf, $user; + global $db, $langs, $conf, $user; $h = 0; $head = array(); @@ -53,11 +53,13 @@ function tax_prepare_head(ChargeSociales $object) complete_head_from_modules($conf,$langs,$object,$head,$h,'tax'); require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; $upload_dir = $conf->tax->dir_output . "/" . dol_sanitizeFileName($object->ref); $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$')); + $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id; $head[$h][1] = $langs->trans("Documents"); - if($nbFiles > 0) $head[$h][1].= ' '.$nbFiles.''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; $head[$h][2] = 'documents'; $h++; @@ -108,7 +110,7 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction if ($modetax == 1) { // If vat paid on due invoices (non draft) - $sql = "SELECT s.rowid as socid, s.nom as name, s.siren as tva_intra, s.tva_assuj as assuj,"; + $sql = "SELECT s.rowid as socid, s.nom as name, s.tva_intra as tva_intra, s.tva_assuj as assuj,"; $sql.= " sum(f.$total_ht) as amount, sum(f.".$total_tva.") as tva,"; $sql.= " sum(f.localtax1) as localtax1,"; $sql.= " sum(f.localtax2) as localtax2"; diff --git a/htdocs/core/lib/treeview.lib.php b/htdocs/core/lib/treeview.lib.php index b3f3e16a3bd..e900931037e 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -98,6 +98,7 @@ function tree_showpad(&$fulltree,$key,$silent=0) /** * Recursive function to output menu tree.
    • ...
    + * It is also used for the tree of categories. * Note: To have this function working, check you have loaded the js and css for treeview. * $arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', * '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js'); @@ -132,7 +133,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree') print '
      '; } - if ($rang > 10) return; // Protection contre boucle infinie + if ($rang > 50) return; // Protect against infinite loop. Max 50 depth //ballayage du tableau $sizeoftab=count($tab); diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 5dc17962e14..8b9c6c3406f 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -1,6 +1,7 @@ * Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2015 Alexandre Spangaro * * 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 @@ -31,7 +32,7 @@ */ function user_prepare_head($object) { - global $langs, $conf, $user; + global $db, $langs, $conf, $user; $langs->load("users"); @@ -93,6 +94,15 @@ function user_prepare_head($object) // $this->tabs = array('entity:-tabname); to remove a tab complete_head_from_modules($conf,$langs,$object,$head,$h,'user'); + if (! empty($conf->hrm->enabled) && $user->rights->hrm->employee->read) + { + // Bank + $head[$h][0] = DOL_URL_ROOT.'/user/bank.php?id='.$object->id; + $head[$h][1] = $langs->trans("Bank"); + $head[$h][2] = 'bank'; + $h++; + } + //Info on users is visible only by internal user if (empty($user->societe_id)) { @@ -107,11 +117,13 @@ function user_prepare_head($object) // Attached files require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; $upload_dir = $conf->user->dir_output . "/" . $object->id; $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$')); + $nbLinks=Link::count($db, $object->element, $object->id); $head[$h][0] = DOL_URL_ROOT.'/user/document.php?userid='.$object->id; $head[$h][1] = $langs->trans("Documents"); - if($nbFiles > 0) $head[$h][1].= ' '.$nbFiles.''; + if (($nbFiles+$nbLinks) > 0) $head[$h][1].= ' '.($nbFiles+$nbLinks).''; $head[$h][2] = 'document'; $h++; @@ -277,6 +289,10 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) if (empty($foruserprofile)) $selected_theme=$conf->global->MAIN_THEME; else $selected_theme=((is_object($fuser) && ! empty($fuser->conf->MAIN_THEME))?$fuser->conf->MAIN_THEME:''); + $hoverdisabled=''; + if (empty($foruserprofile)) $hoverdisabled=(isset($conf->global->THEME_ELDY_USE_HOVER) && $conf->global->THEME_ELDY_USE_HOVER == '0'); + else $hoverdisabled=(is_object($fuser)?(empty($fuser->conf->THEME_ELDY_USE_HOVER) || $fuser->conf->THEME_ELDY_USE_HOVER == '0'):''); + $colspan=2; if ($foruserprofile) $colspan=4; @@ -295,7 +311,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) print '
    '; print ''; print ''; - print ''; + print ''; print ''; print ''; } @@ -303,8 +319,8 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) { print ''; print ''; - if (! $foruserprofile) + // BackgroundColor + if ($foruserprofile) + { + /*$var=!$var; + print ''; + print ''; + print ''; + print ''; + print '';*/ + } + else { $var=!$var; print ''; - print ''; - $hoverdisabled=(isset($conf->global->THEME_ELDY_USE_HOVER) && $conf->global->THEME_ELDY_USE_HOVER == '0'); - print ''; + print ''; + } + + // TopMenuBackgroundColor + if ($foruserprofile) + { + /*$var=!$var; + print ''; + print ''; + print ''; + print ''; + print '';*/ + } + else + { + $var=!$var; + print ''; + print ''; + print ''; + } + + // BackgroundTableTitleColor + if ($foruserprofile) + { + + + } + else + { + $var=!$var; + print ''; + print ''; + print ''; - print ''; - - //if ($conf->theme == 'eldy') - //{ - // TopMenuBackgroundColor - $var=!$var; - print ''; - print ''; - print ''; - - // BackgroundTableTitleColor - $var=!$var; - print ''; - print ''; - print ''; - //} print ''; } + // TextTitleColor + if ($foruserprofile) + { + + + } + else + { + $var=!$var; + print ''; + print ''; + print ''; + + print ''; + } + + // Use Hover + $var=!$var; + if ($foruserprofile) + { + /* Must first change option to choose color of highlight instead of yes or no. + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + */ + } + else + { + print ''; + print ''; + print ''; + print ''; + } + + // TopMenuBackgroundColor + if ($foruserprofile) + { + /*$var=!$var; + print ''; + print ''; + print ''; + print ''; + print '';*/ + } + else + { + $var=!$var; + print ''; + print ''; + print ''; + } + print '
    '.$langs->trans("DefaultSkin").''.$conf->global->MAIN_THEME.' '.$langs->trans("UsePersonalValue").' '.$langs->trans("UsePersonalValue").' 
    '.$langs->trans("DefaultSkin").''; - $url='http://www.dolistore.com/lang-en/4-skins'; - if (preg_match('/fr/i',$langs->defaultlang)) $url='http://www.dolistore.com/lang-fr/4-themes'; + $url='https://www.dolistore.com/lang-en/4-skins'; + if (preg_match('/fr/i',$langs->defaultlang)) $url='https://www.dolistore.com/fr/4-themes'; //if (preg_match('/es/i',$langs->defaultlang)) $url='http://www.dolistore.com/lang-es/4-themes'; print ''; print $langs->trans('DownloadMoreSkins'); @@ -351,7 +367,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) print ''; @@ -378,57 +394,235 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) print '
    '.$langs->trans("TopMenuBackgroundColor").''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); + print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo + print '> '.$langs->trans("UsePersonalValue").''; + if ($edit) + { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' '; + } + else + { + $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''); + if ($color) print ''; + else print ''; + } + if ($edit) print '
    ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + print '
    '.$langs->trans("HighlightLinesOnMouseHover").''; - print '   ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + print ''.$langs->trans("BackgroundColor").''; + //var_dump($conf->global->THEME_ELDY_BACKBODY); + if ($edit) + { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY,array()),''),'THEME_ELDY_BACKBODY','formcolor',1).' '; + } + else + { + $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY,array()),''); + if ($color) print ''; + else print $langs->trans("Default"); + } + print '   ('.$langs->trans("Default").': ffffff, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + print '
    '.$langs->trans("TopMenuBackgroundColor").''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); + print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo + print '> '.$langs->trans("UsePersonalValue").''; + if ($edit) + { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' '; + } + else + { + $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''); + if ($color) print ''; + else print ''; + } + if ($edit) print '
    ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + print '
    '.$langs->trans("TopMenuBackgroundColor").''; + if ($edit) + { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' '; + } + else + { + $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''); + if ($color) print ''; + else print $langs->trans("Default"); + } + print '   ('.$langs->trans("Default").': 7882aa, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + print '
    '.$langs->trans("BackgroundTableTitleColor").''; + if ($edit) + { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKTITLE1,array()),''),'THEME_ELDY_BACKTITLE1','formcolor',1).' '; + } + else + { + print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default")); + } + print '   ('.$langs->trans("Default").': e6e6e6, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; print '
    '.$langs->trans("TopMenuBackgroundColor").''; - if ($edit) - { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' '; - } - else - { - $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''); - if ($color) print ''; - else print $langs->trans("Default"); - } - print '   ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; - print '
    '.$langs->trans("BackgroundTableTitleColor").''; - if ($edit) - { - print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKTITLE1,array()),''),'THEME_ELDY_BACKTITLE1','formcolor',1).' '; - } - else - { - print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default")); - } - print '   ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; - print '
    '.$langs->trans("TextTitleColor").''; + if ($edit) + { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLENOTAB,array()),''),'THEME_ELDY_TEXTTITLENOTAB','formcolor',1).' '; + } + else + { + print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default")); + } + print '   ('.$langs->trans("Default").': 3c3c14, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + print '
    '.$langs->trans("HighlightLinesOnMouseHover").'global->THEME_ELDY_USE_HOVER?" checked":"").'> '.$langs->trans("UsePersonalValue").''; + print '   ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + print '
    '.$langs->trans("HighlightLinesColor").''; + //print ''; + //print '   ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + if ($edit) + { + if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color='edf4fb'; + else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER,array()),''); + print $formother->selectColor($color,'THEME_ELDY_USE_HOVER','formcolor',1).' '; + } + else + { + if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color='edf4fb'; + else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER,array()),''); + if ($color) + { + if ($color != 'edf4fb') print ''; + else print $langs->trans("Default"); + } + else print $langs->trans("None"); + } + print '   ('.$langs->trans("Default").': edf4fb, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + print '
    '.$langs->trans("TopMenuBackgroundColor").''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); + print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo + print '> '.$langs->trans("UsePersonalValue").''; + if ($edit) + { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''),'THEME_ELDY_TOPMENU_BACK1','formcolor',1).' '; + } + else + { + $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1,array()),''); + if ($color) print ''; + else print ''; + } + if ($edit) print '
    ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + print '
    '.$langs->trans("LinkColor").''; + if ($edit) + { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),''),'THEME_ELDY_TEXTLINK','formcolor',1).' '; + } + else + { + $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),''); + if ($color) print ''; + else print $langs->trans("Default"); + } + print '   ('.$langs->trans("Default").': 000078, '.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; + print '
    '; } diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 208ccd0c37c..71b93f8ee82 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -138,7 +138,7 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest) $ldap->searchUser=$ldapuserattr."=".$usertotest.",".$ldapdn; // Default dn (will work if LDAP accept a dn with login value inside) // But if LDAP need a dn with name like "cn=Jhon Bloggs,ou=People,dc=foo,dc=com", previous part must have been executed to have // dn detected into ldapUserDN. - if ($resultFetchLdapUser) $ldap->searchUser = $ldap->ldapUserDN; + if ($resultFetchLdapUser AND !empty($ldap->ldapUserDN)) $ldap->searchUser = $ldap->ldapUserDN; $ldap->searchPassword=$passwordtotest; // Test with this->seachUser and this->searchPassword diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 8444a855650..6c0f30c6b6c 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -11,19 +11,19 @@ delete from llx_menu where menu_handler=__HANDLER__ and entity=__ENTITY__; insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', 1__+MAX_llx_menu__, __HANDLER__, 'top', 'home', '', 0, '/index.php?mainmenu=home&leftmenu=', 'Home', -1, '', '', '', 2, 10, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('societe|fournisseur', '( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)', 2__+MAX_llx_menu__, __HANDLER__, 'top', 'companies', '', 0, '/societe/index.php?mainmenu=companies&leftmenu=', 'ThirdParties', -1, 'companies', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 20, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('product|service', '$conf->product->enabled || $conf->service->enabled', 3__+MAX_llx_menu__, __HANDLER__, 'top', 'products', '', 0, '/product/index.php?mainmenu=products&leftmenu=', 'Products/Services', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 30, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('propal|commande|fournisseur|contrat|ficheinter', '$conf->propal->enabled || $conf->commande->enabled || $conf->fournisseur->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting|facture|deplacement|don|tax|salaries|loan', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->loan->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->deplacement->lire || $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read', '', 2, 50, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('propal|commande|fournisseur|contrat|ficheinter', '$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting|facture|don|tax|salaries|loan', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read', '', 2, 50, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('banque|prelevement', '$conf->banque->enabled || $conf->prelevement->enabled', 14__+MAX_llx_menu__, __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/index.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 60, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('projet', '$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 70, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('mailing|export|import|opensurvey', '$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled', 8__+MAX_llx_menu__, __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read', '', 2, 90, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('adherent', '$conf->adherent->enabled', 13__+MAX_llx_menu__, __HANDLER__, 'top', 'members', '', 0, '/adherents/index.php?mainmenu=members&leftmenu=', 'Members', -1, 'members', '$user->rights->adherent->lire', '', 2, 110, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('hrm', '$conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled', 15__+MAX_llx_menu__, __HANDLER__, 'top', 'hrm', '', 0, '/compta/hrm.php?mainmenu=hrm&leftmenu=', 'HRM', -1, 'holiday', '$user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire', '', 0, 80, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('hrm|holiday|deplacement|expensereport', '$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled', 15__+MAX_llx_menu__, __HANDLER__, 'top', 'hrm', '', 0, '/compta/hrm.php?mainmenu=hrm&leftmenu=', 'HRM', -1, 'holiday', '$user->rights->hrm->employee->read || $user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire', '', 0, 80, __ENTITY__); -- Home - Setup insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$user->admin', __HANDLER__, 'left', 100__+MAX_llx_menu__, 'home', 'setup', 1__+MAX_llx_menu__, '/admin/index.php?leftmenu=setup', 'Setup', 0, 'admin', '', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 101__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/company.php?leftmenu=setup', 'MenuCompanySetup', 1, 'admin', '', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 102__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/ihm.php?leftmenu=setup', 'GUISetup', 1, 'admin', '', '', 2, 4, __ENTITY__); - +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 115__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=setup', 'Fiscalyear', 1, 'admin', '', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 114__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/translation.php?leftmenu=setup', 'Translation', 1, 'admin', '', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="setup"', __HANDLER__, 'left', 103__+MAX_llx_menu__, 'home', '', 100__+MAX_llx_menu__, '/admin/modules.php?leftmenu=setup', 'Modules', 1, 'admin', '', '', 2, 2, __ENTITY__); @@ -58,7 +58,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 310__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/support/index.php?leftmenu=admintools', 'HelpCenter', 1, 'help', '', '_blank', 2, 13, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 311__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/about.php?leftmenu=admintools', 'About', 1, 'admin', '', '', 2, 14, __ENTITY__); -- Home - Module Tools --- Added by ??? +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$user->admin', __HANDLER__, 'left', 700__+MAX_llx_menu__, 'home', 'modulesadmintools', 1__+MAX_llx_menu__, '/admin/tools/index.php?leftmenu=modulesadmintools', 'ModulesSystemTools', 0, 'admin', '', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="modulesadmintools"', __HANDLER__, 'left', 701__+MAX_llx_menu__, 'home', '', 700__+MAX_llx_menu__, '/product/admin/product_tools.php?mainmenu=home&leftmenu=modulesadmintools', 'ProductVatMassChange', 1, 'products', '', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled || $leftmenu=="modulesadmintools"', __HANDLER__, 'left', 702__+MAX_llx_menu__, 'home', '', 700__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=home&leftmenu=modulesadmintools', 'InitAccountancy', 1, 'accountancy', '', '', 2, 0, __ENTITY__); -- Home - Menu users and groups insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/index.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__); @@ -69,11 +71,11 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 500__+MAX_llx_menu__, 'companies', 'thirdparties', 2__+MAX_llx_menu__, '/societe/index.php?leftmenu=thirdparties', 'ThirdParty', 0, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 501__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/soc.php?action=create', 'MenuNewThirdParty', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 502__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?action=create', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 503__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/fourn/list.php?leftmenu=suppliers', 'ListSuppliersShort', 1, 'suppliers', '$user->rights->societe->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 503__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?type=f&leftmenu=suppliers', 'ListSuppliersShort', 1, 'suppliers', '$user->rights->societe->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 504__+MAX_llx_menu__, 'companies', '', 503__+MAX_llx_menu__, '/societe/soc.php?leftmenu=supplier&action=create&type=f', 'NewSupplier', 2, 'suppliers', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 506__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/comm/prospect/list.php?leftmenu=prospects', 'ListProspectsShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 506__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?type=p&leftmenu=prospects', 'ListProspectsShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 507__+MAX_llx_menu__, 'companies', '', 506__+MAX_llx_menu__, '/societe/soc.php?leftmenu=prospects&action=create&type=p', 'MenuNewProspect', 2, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 509__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/comm/list.php?leftmenu=customers', 'ListCustomersShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 509__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?type=c&leftmenu=customers', 'ListCustomersShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 510__+MAX_llx_menu__, 'companies', '', 509__+MAX_llx_menu__, '/societe/soc.php?leftmenu=customers&action=create&type=c', 'MenuNewCustomer', 2, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); -- Third parties - Contacts insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 600__+MAX_llx_menu__, 'companies', 'contacts', 2__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'ContactsAddresses', 0, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__); @@ -98,18 +100,18 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2802__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/list.php?leftmenu=product&type=0', 'List', 1, 'products', '$user->rights->produit->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2803__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/reassort.php?type=0', 'Stocks', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->productbatch->enabled', __HANDLER__, 'left', 2805__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/reassortlot.php?type=0', 'StocksByLotSerial', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 5, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 2804__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/popuprop.php?leftmenu=stats&type=0', 'Statistics', 1, 'main', '$user->rights->produit->lire', '', 2, 6, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 2804__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/stats/card.php?id=all&leftmenu=stats&type=0', 'Statistics', 1, 'main', '$user->rights->produit->lire', '', 2, 6, __ENTITY__); -- Product - Services insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2900__+MAX_llx_menu__, 'products', 'service', 3__+MAX_llx_menu__, '/product/index.php?leftmenu=service&type=1', 'Services', 0, 'products', '$user->rights->service->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2901__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/card.php?leftmenu=service&action=create&type=1', 'NewService', 1, 'products', '$user->rights->service->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->service->enabled', __HANDLER__, 'left', 2902__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/list.php?leftmenu=service&type=1', 'List', 1, 'products', '$user->rights->service->lire', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 2903__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/popuprop.php?leftmenu=stats&type=1', 'Statistics', 1, 'main', '$user->rights->service->lire', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->propal->enabled', __HANDLER__, 'left', 2903__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/stats/card.php?id=all&leftmenu=stats&type=1', 'Statistics', 1, 'main', '$user->rights->service->lire', '', 2, 5, __ENTITY__); -- Product - Stocks insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3100__+MAX_llx_menu__, 'products', 'stock', 3__+MAX_llx_menu__, '/product/stock/index.php?leftmenu=stock', 'Stock', 0, 'stocks', '$user->rights->stock->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3101__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/card.php?action=create', 'MenuNewWarehouse', 1, 'stocks', '$user->rights->stock->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3102__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/list.php', 'List', 1, 'stocks', '$user->rights->stock->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3104__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/mouvement.php', 'Movements', 1, 'stocks', '$user->rights->stock->mouvement->lire', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 3105__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/replenish.php', 'Replenishments', 1, 'stocks', '$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled && $conf->supplier_order->enabled', __HANDLER__, 'left', 3105__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/replenish.php', 'Replenishments', 1, 'stocks', '$user->rights->stock->mouvement->creer && $user->rights->fournisseur->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->stock->enabled', __HANDLER__, 'left', 3106__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/massstockmove.php', 'StockTransfer', 1, 'stocks', '$user->rights->stock->mouvement->creer', '', 2, 5, __ENTITY__); -- Product - Categories @@ -143,10 +145,10 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1208__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?leftmenu=orders&viewstatut=-1', 'StatusOrderCanceledShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 7, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1209__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/stats/index.php?leftmenu=orders', 'Statistics', 1, 'orders', '$user->rights->commande->lire', '', 2, 4, __ENTITY__); -- Commercial - Supplier's orders -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5100__+MAX_llx_menu__, 'commercial', 'orders_suppliers', 5__+MAX_llx_menu__, '/fourn/commande/index.php?leftmenu=orders_suppliers', 'SuppliersOrders', 0, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 6, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5101__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/card.php?action=create&leftmenu=orders_suppliers', 'NewOrder', 1, 'orders', '$user->rights->fournisseur->commande->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5102__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/list.php?leftmenu=orders_suppliers&viewstatut=0', 'List', 1, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 5108__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier', 'Statistics', 1, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 7, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_order->enabled', __HANDLER__, 'left', 5100__+MAX_llx_menu__, 'commercial', 'orders_suppliers', 5__+MAX_llx_menu__, '/fourn/commande/index.php?leftmenu=orders_suppliers', 'SuppliersOrders', 0, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 6, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_order->enabled', __HANDLER__, 'left', 5101__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/card.php?action=create&leftmenu=orders_suppliers', 'NewOrder', 1, 'orders', '$user->rights->fournisseur->commande->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_order->enabled', __HANDLER__, 'left', 5102__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/list.php?leftmenu=orders_suppliers&viewstatut=0', 'List', 1, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_order->enabled', __HANDLER__, 'left', 5108__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier', 'Statistics', 1, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 7, __ENTITY__); -- Commercial - Contracts insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled', __HANDLER__, 'left', 1400__+MAX_llx_menu__, 'commercial', 'contracts', 5__+MAX_llx_menu__, '/contrat/index.php?leftmenu=contracts', 'Contracts', 0, 'contracts', '$user->rights->contrat->lire', '', 2, 7, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->contrat->enabled', __HANDLER__, 'left', 1401__+MAX_llx_menu__, 'commercial', '', 1400__+MAX_llx_menu__, '/contrat/card.php?&action=create&leftmenu=contracts', 'NewContract', 1, 'contracts', '$user->rights->contrat->creer', '', 2, 0, __ENTITY__); @@ -160,12 +162,13 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->ficheinter->enabled', __HANDLER__, 'left', 1500__+MAX_llx_menu__, 'commercial', 'ficheinter', 5__+MAX_llx_menu__, '/fichinter/list.php?leftmenu=ficheinter', 'Interventions', 0, 'interventions', '$user->rights->ficheinter->lire', '', 2, 8, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->ficheinter->enabled', __HANDLER__, 'left', 1501__+MAX_llx_menu__, 'commercial', '', 1500__+MAX_llx_menu__, '/fichinter/card.php?action=create&leftmenu=ficheinter', 'NewIntervention', 1, 'interventions', '$user->rights->ficheinter->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->ficheinter->enabled', __HANDLER__, 'left', 1502__+MAX_llx_menu__, 'commercial', '', 1500__+MAX_llx_menu__, '/fichinter/list.php?leftmenu=ficheinter', 'List', 1, 'interventions', '$user->rights->ficheinter->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->ficheinter->enabled', __HANDLER__, 'left', 1503__+MAX_llx_menu__, 'commercial', '', 1500__+MAX_llx_menu__, '/fichinter/stats/index.php?leftmenu=ficheinter', 'Statistics', 1, 'interventions', '$user->rights->ficheinter->lire', '', 2, 2, __ENTITY__); -- Accountancy - Supplier invoice -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 1600__+MAX_llx_menu__, 'accountancy', 'supplier_bills', 6__+MAX_llx_menu__, '/fourn/facture/list.php?leftmenu=suppliers_bills', 'BillsSuppliers', 0, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 1601__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/card.php?action=create&leftmenu=suppliers_bills', 'NewBill', 1, 'bills', '$user->rights->fournisseur->facture->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 1602__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/impayees.php?leftmenu=suppliers_bills', 'Unpaid', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 1603__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/paiement.php?leftmenu=suppliers_bills', 'Payments', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled', __HANDLER__, 'left', 1604__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier', 'Statistics', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 8, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1600__+MAX_llx_menu__, 'accountancy', 'supplier_bills', 6__+MAX_llx_menu__, '/fourn/facture/list.php?leftmenu=suppliers_bills', 'BillsSuppliers', 0, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1601__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/card.php?action=create&leftmenu=suppliers_bills', 'NewBill', 1, 'bills', '$user->rights->fournisseur->facture->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1602__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/impayees.php?leftmenu=suppliers_bills', 'Unpaid', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1603__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/fourn/facture/paiement.php?leftmenu=suppliers_bills', 'Payments', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_invoice->enabled', __HANDLER__, 'left', 1604__+MAX_llx_menu__, 'accountancy', '', 1600__+MAX_llx_menu__, '/compta/facture/stats/index.php?leftmenu=customers_bills&mode=supplier', 'Statistics', 1, 'bills', '$user->rights->fournisseur->facture->lire', '', 2, 8, __ENTITY__); -- Accountancy - Customer invoice insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1700__+MAX_llx_menu__, 'accountancy', 'customer_bills', 6__+MAX_llx_menu__, '/compta/facture/list.php?leftmenu=customers_bills', 'BillsCustomers', 0, 'bills', '$user->rights->facture->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled', __HANDLER__, 'left', 1701__+MAX_llx_menu__, 'accountancy', '', 1700__+MAX_llx_menu__, '/compta/facture.php?action=create&leftmenu=customers_bills', 'NewBill', 1, 'bills', '$user->rights->facture->creer', '', 2, 3, __ENTITY__); @@ -201,26 +204,44 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2251__+MAX_llx_menu__, 'accountancy', '', 2250__+MAX_llx_menu__, '/compta/sociales/charges.php?leftmenu=tax_social&action=create', 'MenuNewSocialContribution', 2, '', '$user->rights->tax->charges->creer', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2252__+MAX_llx_menu__, 'accountancy', '', 2250__+MAX_llx_menu__, '/compta/charges/index.php?leftmenu=tax_social&mainmenu=accountancy&mode=sconly', 'Payments', 2, '', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)', __HANDLER__, 'left', 2300__+MAX_llx_menu__, 'accountancy', 'tax_vat', 2200__+MAX_llx_menu__, '/compta/tva/index.php?leftmenu=tax_vat&mainmenu=accountancy', 'VAT', 1, 'companies', '$user->rights->tax->charges->lire', '', 0, 7, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2301__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/card.php?leftmenu=tax_vat&action=create', 'NewPayment', 2, 'companies', '$user->rights->tax->charges->creer', '', 0, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2302__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/reglement.php?leftmenu=tax_vat', 'Payments', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2301__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/card.php?leftmenu=tax_vat&action=create', 'New', 2, 'companies', '$user->rights->tax->charges->creer', '', 0, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2302__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/reglement.php?leftmenu=tax_vat', 'List', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2303__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?leftmenu=tax_vat', 'ReportByCustomers', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__); --- Ventilation (accounting) -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2400__+MAX_llx_menu__, 'accountancy', 'ventil_customer', 6__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=ventil_customer', 'CustomersVentilation', 0, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 8, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ventil_customer"', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/accountancy/customer/list.php', 'ToDispatch', 1, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ventil_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/accountancy/customer/lines.php', 'Dispatched', 1, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 1, __ENTITY__); - -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'ventil_supplier', 6__+MAX_llx_menu__, '/accountancy/supplier/index.php?leftmenu=ventil_supplier', 'SuppliersVentilation', 0, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 9, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="ventil_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php', 'ToDispatch', 1, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="ventil_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php', 'Dispatched', 1, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 1, __ENTITY__); --- Rapports -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2700__+MAX_llx_menu__, 'accountancy', 'ca', 6__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 0, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 11, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2701__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2702__+MAX_llx_menu__, 'accountancy', '', 2701__+MAX_llx_menu__, '/compta/resultat/clientfourn.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2703__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/stats/index.php?leftmenu=ca', 'ReportTurnover', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2704__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2705__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2708__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); +-- Accounting Expert +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2400__+MAX_llx_menu__, 'accountancy', 'accounting', 6__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=accounting', 'MenuAccountancy', 0, 'accountancy', '(! empty($conf->accounting->enabled) || $user->rights->accounting->ventilation->read || $user->rights->accounting->ventilation->dispatch || $user->rights->compta->resultat->lire', '', 0, 7, __ENTITY__); + -- Dispatch + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 1, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 2, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="dispatch_customer"', __HANDLER__, 'left', 2403__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 3, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'ventil_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?leftmenu=dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 4, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 5, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 6, __ENTITY__); + -- Journals + -- insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'journal', 2400__+MAX_llx_menu__, '/accountancy/journal/index.php?leftmenu=journal', 'Journaux', 1, 'accountancy', '$user->rights->accounting->comptarapport->lire', '', 0, 7, __ENTITY__); + -- General Ledger + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2430__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/list.php?leftmenu=bookkeeping', 'Bookkeeping', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 15, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="bookkeeping"', __HANDLER__, 'left', 2431__+MAX_llx_menu__, 'accountancy', '', 2430__+MAX_llx_menu__, '/accountancy/bookkeeping/listbyyear.php', 'ByYear', 2, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="bookkeeping"', __HANDLER__, 'left', 2432__+MAX_llx_menu__, 'accountancy', '', 2430__+MAX_llx_menu__, '/accountancy/bookkeeping/balancebymonth.php', 'AccountBalanceByMonth', 2, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__); + -- Reports + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2440__+MAX_llx_menu__, 'accountancy', 'report', 2400__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2441__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2442__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/resultat/clientfourn.php?leftmenu=ca', 'ByCompanies', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 19, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2443__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/index.php?leftmenu=ca', 'ReportTurnover', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 20, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2444__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 21, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2445__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 22, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2446__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 23, __ENTITY__); + -- Admin + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2450__+MAX_llx_menu__, 'home', '', 2400__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?leftmenu=setup', 'Fiscalyear', 1, 'admin', '$user->rights->accounting->fiscalyear', '', 0, 24, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2451__+MAX_llx_menu__, 'home', '', 2400__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy', 'Chartofaccounts', 1, 'admin', '$user->rights->accounting->chartofaccount', '', 0, 25, __ENTITY__); +-- Rapports compta simple +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled', __HANDLER__, 'left', 2700__+MAX_llx_menu__, 'accountancy', 'ca', 6__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 0, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 11, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2701__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2702__+MAX_llx_menu__, 'accountancy', '', 2701__+MAX_llx_menu__, '/compta/resultat/clientfourn.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2703__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/stats/index.php?leftmenu=ca', 'ReportTurnover', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2704__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2705__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2708__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2706__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/sellsjournal.php?leftmenu=ca', 'SellsJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2707__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/purchasesjournal.php?leftmenu=ca', 'PurchasesJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); -- Book Keeping @@ -228,7 +249,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="bookkeeping"', __HANDLER__, 'left', 2721__+MAX_llx_menu__, 'accountancy', '', 2720__+MAX_llx_menu__, '/accountancy/bookkeeping/listbyyear.php', 'ByYear', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="bookkeeping"', __HANDLER__, 'left', 2722__+MAX_llx_menu__, 'accountancy', '', 2720__+MAX_llx_menu__, '/accountancy/bookkeeping/balancebymonth.php', 'AccountBalanceByMonth', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 1, __ENTITY__); -- Fiscal year & Chart of accounts -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2750__+MAX_llx_menu__, 'home', '', 6__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?leftmenu=setup', 'Fiscalyear', 1, 'accountancy', '$user->rights->accounting->fiscalyear', '', 2, 20, __ENTITY__); +-- insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2750__+MAX_llx_menu__, 'home', '', 6__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?leftmenu=setup', 'Fiscalyear', 1, 'accountancy', '$user->rights->accounting->fiscalyear', '', 2, 20, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2751__+MAX_llx_menu__, 'home', '', 6__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy', 'Chartofaccounts', 1, 'accountancy', '$user->rights->accounting->chartofaccount', '', 2, 21, __ENTITY__); -- Check deposit insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1711__+MAX_llx_menu__, 'accountancy', 'checks', 14__+MAX_llx_menu__, '/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank', 'MenuChequeDeposits', 0, 'bills', '$user->rights->banque->lire', '', 2, 9, __ENTITY__); @@ -259,12 +280,12 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3700__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/activity/index.php?leftmenu=projects', 'Activities', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3701__+MAX_llx_menu__, 'project', '', 3700__+MAX_llx_menu__, '/projet/tasks.php?leftmenu=projects&action=create', 'NewTask', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3702__+MAX_llx_menu__, 'project', '', 3700__+MAX_llx_menu__, '/projet/tasks/index.php?leftmenu=projects', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3702__+MAX_llx_menu__, 'project', '', 3700__+MAX_llx_menu__, '/projet/tasks/list.php?leftmenu=projects', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3703__+MAX_llx_menu__, 'project', '', 3700__+MAX_llx_menu__, '/projet/activity/perweek.php?leftmenu=projects', 'NewTimeSpent', 1, 'projects', '$user->rights->projet->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3800__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/activity/index.php?leftmenu=projects&mode=mine', 'MyActivities', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3801__+MAX_llx_menu__, 'project', '', 3800__+MAX_llx_menu__, '/projet/tasks.php?leftmenu=projects&action=create&mode=mine', 'NewTask', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3802__+MAX_llx_menu__, 'project', '', 3800__+MAX_llx_menu__, '/projet/tasks/index.php?leftmenu=projects&mode=mine', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3801__+MAX_llx_menu__, 'project', '', 3800__+MAX_llx_menu__, '/projet/tasks.php?leftmenu=projects&action=create', 'NewTask', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3802__+MAX_llx_menu__, 'project', '', 3800__+MAX_llx_menu__, '/projet/tasks/list.php?leftmenu=projects&mode=mine', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3803__+MAX_llx_menu__, 'project', '', 3800__+MAX_llx_menu__, '/projet/activity/perweek.php?leftmenu=projects&mode=mine', 'NewTimeSpent', 1, 'projects', '$user->rights->projet->lire', '', 2, 3, __ENTITY__); -- Tools insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->mailing->enabled', __HANDLER__, 'left', 3900__+MAX_llx_menu__, 'tools', 'mailing', 8__+MAX_llx_menu__, '/comm/mailing/index.php?leftmenu=mailing', 'EMailings', 0, 'mails', '$user->rights->mailing->lire', '', 0, 0, __ENTITY__); @@ -299,12 +320,17 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Members - Category member insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 5200__+MAX_llx_menu__, 'members', 'cat', 13__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=3', 'MembersCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 5201__+MAX_llx_menu__, 'members', '', 5200__+MAX_llx_menu__, '/categories/card.php?action=create&type=3', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); +-- HRM - Employee +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4600__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/user/index.php?&leftmenu=hrm&mode=employee', 'Employees', 0, 'hrm', '$user->rights->hrm->employee->read', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4601__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/card.php?&action=create', 'NewEmployee', 1, 'hrm', '$user->rights->hrm->employee->write', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4602__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/index.php?$leftmenu=hrm&mode=employee', 'List', 1, 'hrm', '$user->rights->hrm->employee->read', '', 0, 2, __ENTITY__); -- HRM - Holiday -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5000__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/holiday/list.php?&leftmenu=hrm', 'CPTitreMenu', 0, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5000__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/holiday/list.php?&leftmenu=hrm', 'CPTitreMenu', 0, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card.php?&action=request', 'MenuAddCP', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5002__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?&action=request', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?&action=request', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->view_log', '', 0, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/month_report.php?&action=request', 'MenuReportMonth', 1, 'holiday', '$user->rights->holiday->month_report', '', 0, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5002__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/list.php?&leftmenu=hrm', 'List', 1, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5002__+MAX_llx_menu__, '/holiday/list.php?select_statut=2&leftmenu=hrm', 'ListToApprove', 2, 'trips', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?&action=request', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5005__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/view_log.php?&action=request', 'MenuLogCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 3, __ENTITY__); -- HRM - Expense reports insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2100__+MAX_llx_menu__, 'accountancy', 'tripsandexpenses', 15__+MAX_llx_menu__, '/compta/deplacement/index.php?leftmenu=tripsandexpenses', 'TripsAndExpenses', 0, 'trips', '$user->rights->deplacement->lire', '', 0, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->deplacement->enabled', __HANDLER__, 'left', 2101__+MAX_llx_menu__, 'accountancy', '', 2100__+MAX_llx_menu__, '/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses', 'New', 1, 'trips', '$user->rights->deplacement->creer', '', 0, 1, __ENTITY__); diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 9624bf66341..a24a2d32baa 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -205,14 +205,15 @@ function print_end_menu_array_auguria() * @param DoliDB $db Database handler * @param array $menu_array_before Table of menu entries to show before entries of menu handler * @param array $menu_array_after Table of menu entries to show after entries of menu handler - * @param array $tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty) + * @param array $tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty) * @param Menu $menu Object Menu to return back list of menu entries * @param int $noout Disable output (Initialise &$menu only). * @param string $forcemainmenu 'x'=Force mainmenu to mainmenu='x' * @param string $forceleftmenu 'all'=Force leftmenu to '' (= all) + * @param array $moredata An array with more data to output * @return int Nb of entries */ -function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabMenu,&$menu,$noout=0,$forcemainmenu='',$forceleftmenu='') +function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabMenu,&$menu,$noout=0,$forcemainmenu='',$forceleftmenu='',$moredata=null) { global $user,$conf,$langs,$dolibarr_main_db_name,$mysoc; @@ -235,7 +236,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM } $title=$langs->trans("GoIntoSetupToChangeLogo"); print "\n".''."\n"; - print '
    '."\n"; + print '